Re: [Haskell-cafe] Why cannot ghc find a existng module ?

2010-05-11 Thread zaxis
`ghc-pkg list` finds two random packages. After `ghc-pkg unregsiter` the one installed by cabal in ~/.ghc/, all works normally now! %ghc-pkg list|grep -i random random-1.0.0.2 zaxis wrote: I have reinstall ghc, xmonad and xmonad-contrib but it still doesnot work! %ghc-pkg list|grep

Re: [Haskell-cafe] Why cannot ghc find a existng module ?

2010-05-11 Thread David Virebayre
On Tue, May 11, 2010 at 10:10 AM, zaxis z_a...@163.com wrote: `ghc-pkg list` finds two random packages.  After `ghc-pkg unregsiter` the one installed by cabal in ~/.ghc/, all works normally now! I stopped counting the number of times I've reinstalled GHC because I forgot to tell cabal to

Re: [Haskell-cafe] Why cannot ghc find a existng module ?

2010-05-11 Thread Ivan Lazar Miljenovic
David Virebayre dav.vire+hask...@gmail.com writes: On Tue, May 11, 2010 at 10:10 AM, zaxis z_a...@163.com wrote: `ghc-pkg list` finds two random packages.  After `ghc-pkg unregsiter` the one installed by cabal in ~/.ghc/, all works normally now! I stopped counting the number of times I've

[Haskell-cafe] Haskell meeting in Leipzig, Germany, June 4

2010-05-11 Thread Johannes Waldmann
The Fifth Haskell in Leipzig meeting will be held on June 4, see http://www.iba-cg.de/hal5.html . You can still submit proposals (and wishes) for tutorials and talks (deadline: May 14). For instance, we'd love to hear about recent advances in Haskell IDEs (eclipsefp? leksah?), and

Re: [Haskell-cafe] How efficient is read?

2010-05-11 Thread Gwern Branwen
On Tue, May 11, 2010 at 12:16 AM, Tom Hawkins tomahawk...@gmail.com wrote: The tarball was missing its Rules.hs; as it happens, GHC has a module named Rules.hs as well, hence the confusing error. I've uploaded a fresh one that should work. Thanks.  This builds and installs fine. But I

Re: [Haskell-cafe] How efficient is read?

2010-05-11 Thread Malcolm Wallace
data Something = Something Int (Maybe String) deriving Show {-! derive : Parse !-} There is nothing in the generated parser to look for parens around the Maybe in case it is a (Just string). Sorry, that will be my fault. I contributed the rules for deriving Parse to DrIFT. I am on holiday

[Haskell-cafe] Functions of type foo :: f a - g a

2010-05-11 Thread Gordon J. Uszkay
I would like to build a class that includes a method to move data from one arbitrary functor to another, a natural transformation. The structures might be more than just functors, but I can start with that. I ran into some practical issues with resolving the type variables for my

Re: [Haskell-cafe] Functions of type foo :: f a - g a

2010-05-11 Thread John Meacham
On Tue, May 11, 2010 at 02:01:05PM -0400, Gordon J. Uszkay wrote: I would like to build a class that includes a method to move data from one arbitrary functor to another, a natural transformation. The structures might be more than just functors, but I can start with that. I ran into some

Re: [Haskell-cafe] Functions of type foo :: f a - g a

2010-05-11 Thread Edward Kmett
On Tue, May 11, 2010 at 2:01 PM, Gordon J. Uszkay uszka...@mcmaster.cawrote: I would like to build a class that includes a method to move data from one arbitrary functor to another, a natural transformation. The structures might be more than just functors, but I can start with that. I ran

Re: [Haskell-cafe] Functions of type foo :: f a - g a

2010-05-11 Thread C. McCann
On Tue, May 11, 2010 at 2:06 PM, John Meacham j...@repetae.net wrote: A better way might be class (Functor f, Functor g) = FunctorPair f g where        transformFunctor :: f a - g a though, I am not sure what your use is, there isn't an obvious instance to me, but I don't know what your

[Haskell-cafe] comprehending monad execution

2010-05-11 Thread rick
All: I've been analyzing monads for a while now and have a question on execution. I suspect I've missed something basic. In the snippet below the ghc debugger shows that in just one single step Discriminate has been substituted for g. Even with :trace turned on in the debugger there is no

[Haskell-cafe] hSetEncoding on socket handles

2010-05-11 Thread David Powell
Greetings, I am having trouble sending unicode characters as utf8 over a socket handle. Despite setting the encoding on the socket handle to utf8, it still seems to use some other encoding when writing to the socket. It works correctly when writing to stdout, but not to a socket handle. I am

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-11 Thread wren ng thornton
Max Cantor wrote: Based on some discussions in #haskell, it seemed to be a consensus that using a modified continuation monad for Error handling instead of Eithers would be a significant optimization since it would eliminate a lot of conditional branching (everytime = is called in the Either

[Haskell-cafe] Tsuru Capital is hiring

2010-05-11 Thread Simon Cranshaw
We are looking to hire a programmer that has experience programming in a functional language, and is familiar with Haskell. There is a wide range of tools and applications that we want to build over time, including graphical interfaces and profiling tools for our trading system, parsers for new

Re: [Haskell-cafe] Speed of Error handling with Continuations vs. Eithers

2010-05-11 Thread wren ng thornton
wren ng thornton wrote: Here's one big difference: newtype ErrCPS e m a = ErrCPS { runErrCPS :: forall r . (e - m r) -- error handler - (a - m r) -- success handler - m r } The analogous version I use is: newtype MaybeCPS a = MaybeCPS (forall r. (a - Maybe r) -