[Haskell-cafe] Upgrading GHC 7.6.3 global packages to latest versions

2013-06-28 Thread Rouan van Dalen
Hi, I am trying to install the latest version of some hackage packages I use often in GHC 7.6.3. However, I am having some problems with packages like [containers] and [time], which are shipped with GHC as global packages. Now when I try to install the latest version of the [time] package, I

[Haskell-cafe] Why does Enum succ and pred functions throw exception

2012-06-21 Thread Rouan van Dalen
Hi everyone, Can anyone shed some light on why the succ and pred functions of the Enum typeclass throw exceptions if we go over the upper or lower boundary, and not return Maybe a? I was hoping to have some functions like:   safeSucc :: (Enum a) = a - Maybe a Because the succ and pred

[Haskell-cafe] struggling with blocking shell cmd when using System.Process

2012-03-20 Thread Rouan van Dalen
Hi Everyone, I am strugling to get the following code to work correctly and I'm hoping someone will be able to shed some light as to why the code is behaving as it does:    {-| runs the supplied command and args as a SHELL command -}    runShell :: String - IO (String, ExitCode)    runShell

[Haskell-cafe] struggling with blocking shell cmd when using System.Process - part 2

2012-03-20 Thread Rouan van Dalen
Hi Everyone, I forgot to say, I am running GHC 7.2.2 on Windows7 x64. Regards.___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] is the evaluation order deterministic when using applicative with IO

2012-03-16 Thread Rouan van Dalen
Hi everyone. I was wondering if I can make assumptions about the evaluation order of the following code: isTrue :: Int - IO Bool isTrue val = pure (||) * boolTest1 val * boolTest2 val {- boolTest1 is an inexpensive, quick check -} boolTest1 :: Int - IO Bool boolTest1 val = undefined {-

[Haskell-cafe] Idiomatic error handling in Haskell

2011-03-02 Thread Rouan van Dalen
There are quite a few exception handling mechanisms provided by Haskell, as can be seen from this post: http://www.randomhacks.net/articles/2007/03/10/haskell-8-ways-to-report-errors I would like to know what is the preferred Haskell mechanism for handling exceptions in the IO monad? I am not

[Haskell-cafe] Tree Semantics and efficiency

2009-06-17 Thread Rouan van Dalen
Hi everyone. I would like to confirm the following semantics. I want a tree which can be traversed both downwards and upwards. To do this i need to store the following for each node: o) a reference to the parent node (so we can traverse up the tree). This must be a reference as i dont want

[Haskell-cafe] Writing a compiler in Hakell

2009-05-06 Thread Rouan van Dalen
Hi everyone. I am designing my own programming language. I would like to know what is the best way to go about writing my compiler in haskell. What are the tools available in haskell that can help with compiler construction? I know about Happy. Is that a good tool to use? The compiler is

[Haskell-cafe] Writing a compiler in Hakell (continued 1)

2009-05-06 Thread Rouan van Dalen
Hi everyone. Thanks for the speedy replies. Let me elaborate on my language and situation. The language I have in mind is a statically typed, hybrid (OOP + functional), strict language. It contains both functional and imperitive features (much the same as OCaml/F#) with ideas from haskell,

[Haskell-cafe] daemon process

2008-10-20 Thread Rouan van Dalen
Hi Everyone. I have been learning Haskell the past few months and there are tons of things I still don't understand :) I would like to write a very very simple haskell daemon that disconnects itself from the terminal and sists in the background doing something. What is the easiest way to go