Re: [Haskell-cafe] Using cmake with haskell

2011-05-15 Thread Nathan Howell
For some projects, the overhead of building proper Haskell bindings is far greater than coding more in C++ and having a simple binding layer. The same goes for Scala and Python. We've been using Protocol Buffers as the common pickling engine, which alleviates us from porting everything (lots of

[Haskell-cafe] Problems with high-level interface to LLVM

2011-05-15 Thread Николай Кудасов
Hi there, I use llvm package for building compiler for a small C-like language and it have some problems with high-level interface that package provides. I use simple scheme: [parser] - (untyped AST) - [analyser] - (typed AST) - [LLVM] - (object code). At first, as I want to use high-level

[Haskell-cafe] sort . nub (was Re: how to generate source code from TH Exp?)

2011-05-15 Thread Herbert Valerio Riedel
On Thu, 2011-05-12 at 19:31 +0200, Daniel Fischer wrote: Minor nitpick: instead of doing 'sort . nub', please use 'import qualified Data.Set as S' and do 'S.toAscList . S.fromList'. This should be a lot faster. Or `map head . group . sort', which may be faster than building an

Re: [Haskell-cafe] sort . nub (was Re: how to generate source code from TH Exp?)

2011-05-15 Thread Daniel Fischer
On Sunday 15 May 2011 15:32:03, Herbert Valerio Riedel wrote: On Thu, 2011-05-12 at 19:31 +0200, Daniel Fischer wrote: Minor nitpick: instead of doing 'sort . nub', please use 'import qualified Data.Set as S' and do 'S.toAscList . S.fromList'. This should be a lot faster. Or `map

[Haskell-cafe] generic putback

2011-05-15 Thread Sergey Mironov
Hi Cafe. I wonder if it is possible to write a IO putback function with following interface putback :: a - IO a - IO a putback x io = ??? where io is some action like reading from file or socket. I want putback to build new action which will return x on first call, and continue executing io

[Haskell-cafe] cannot install base-4.3.1.0 package

2011-05-15 Thread Immanuel Normann
Hi, how can I install the base-4.3.1.0 package. I tried first cabal install base that gives me this error: Resolving dependencies... cabal: Distribution/Client/Dependency/TopDown.hs:169:37-73: Non-exhaustive patterns in lambda I googled for this error and found nothing but the simple

Re: [Haskell-cafe] cannot install base-4.3.1.0 package

2011-05-15 Thread Malcolm Wallace
On 15 May 2011, at 15:35, Immanuel Normann wrote: Why is it so complicated to install the base package? You cannot upgrade the base package that comes with ghc. It's a bad design, but there we go. Regards, Malcolm ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] cannot install base-4.3.1.0 package

2011-05-15 Thread Daniel Fischer
On Sunday 15 May 2011 16:35:35, Immanuel Normann wrote: Hi, how can I install the base-4.3.1.0 package. I tried first No. That can't work (at least with GHC). The base package is one of the packages that the compiler was built with, it is impossible to replace it and have a working compiler

Re: [Haskell-cafe] generic putback

2011-05-15 Thread Artyom Kazak
I'm sorry, but I don't fully understand what do you want from putback. If putback'ed action does io and then returns x, it's trivial: putback x io = io return x If you want putback'ed action to return x on its first call and do io on second, third... calls, then you need to put

Re: [Haskell-cafe] generic putback

2011-05-15 Thread Daniel Gorín
I think you need to change the type of putback slightly: import Data.IORef putback :: a - IO a - IO (IO a) putback a action = do next - newIORef a return (do r - readIORef next; writeIORef next = action; return r) main = do getChar' - putback 'a' getChar str - sequence $ take

Re: [Haskell-cafe] Using cmake with haskell

2011-05-15 Thread Malcolm Wallace
On 5/14/11 6:12 PM, Nathan Howell wrote: Waf supports parallel builds and works with GHC without too much trouble. I'm surprised no-one has yet mentioned Shake, a build tool/library written in Haskell. It does parallel builds, multi-language working, accurate dependencies, etc etc. I use

Re: [Haskell-cafe] Using cmake with haskell

2011-05-15 Thread Rogan Creswick
On Sun, May 15, 2011 at 8:21 AM, Malcolm Wallace malcolm.wall...@me.com wrote: On 5/14/11 6:12 PM, Nathan Howell wrote: Waf supports parallel builds and works with GHC without too much trouble. I'm surprised no-one has yet mentioned Shake, a build tool/library written in Haskell.  It does

Re: [Haskell-cafe] Using cmake with haskell

2011-05-15 Thread Max Bolingbroke
On 15 May 2011 18:46, Rogan Creswick cresw...@gmail.com wrote: On Sun, May 15, 2011 at 8:21 AM, Malcolm Wallace malcolm.wall...@me.com wrote: On 5/14/11 6:12 PM, Nathan Howell wrote: Waf supports parallel builds and works with GHC without too much trouble. I'm surprised no-one has yet

[Haskell-cafe] Internship in Tokyo and Singapore reminder

2011-05-15 Thread employment
Tsuru Capital has openings for three month interns in the offices in Tokyo and in Singapore. Positions are available immediately and for the summer. We are looking for people with moderate experience with Haskell or another functional programming language. Evidence of work written in Haskell is