[Haskell-cafe] ANNOUNCE: hackage-proxy 0.1.0.0

2013-02-17 Thread Michael Snoyman
I'd like to announce the first release of a new tool called hackage-proxy. The purpose is to provide a local proxy for a Hackage server, which somehow modifies files in transport. The motivating case for this was getting more meaningful error output from Stackage when compiling against GHC HEAD.

[Haskell-cafe] [ANNOUNCE] London Haskell user group - Being Lazy - Wed 27-Feb-13

2013-02-17 Thread Derek Wright
Wednesday 27-Feb-2013 6-45pm (prompt) City University, College Building, St John Street, London. EC1V 4PB http://www.meetup.com/London-HUG/events/103545552/ Being Lazy Speaker: Peter Marks This talk will explore lazy evaluation in Haskell. After a brief introduction to non-strictness, and

[Haskell-cafe] MonadReader laws

2013-02-17 Thread Roman Cheplyaka
Has anyone formulated a reasonable set of laws for MonadReader? The instances for continuation-based monad transformers contradict any intuition about local and ask. E.g. for LogicT: flip runReader 1 $ observeAllT $ local (const 2) ask [1] flip runReader 1 $ observeAllT $ local (const

[Haskell-cafe] FunPtr to C function with #arguments determined at runtime?

2013-02-17 Thread Ryan Newton
Hello cafe, I've been poking around and I haven't seen this addressed anywhere except obliquely in the end of section 8.5.1 of the report, where it says that variable argument C functions aren't supported: http://www.haskell.org/onlinereport/haskell2010/haskellch8.html The scenario is pretty

Re: [Haskell-cafe] FunPtr to C function with #arguments determined at runtime?

2013-02-17 Thread Krzysztof Skrzętnicki
Hi, I think libffi might be the answer here. Please see Hackage and Haskell wiki for details. Cheers, Krzysztof Skrzetnicki 17-02-2013 12:18, Ryan Newton rrnew...@gmail.com napisał(a): Hello cafe, I've been poking around and I haven't seen this addressed anywhere except obliquely in the end

[Haskell-cafe] JSON querying

2013-02-17 Thread Sergey Mironov
Hi folks. Hackage contains several JSON packages but as far as I see, they all provide 'static' conversion from JSON format to Haskell data type. Is there a method of converting object containing optional filed 'a' to for example Maybe a. Thanks, Sergey

Re: [Haskell-cafe] JSON querying

2013-02-17 Thread Simon Marechal
On 02/17/2013 04:01 PM, Sergey Mironov wrote: Hi folks. Hackage contains several JSON packages but as far as I see, they all provide 'static' conversion from JSON format to Haskell data type. Is there a method of converting object containing optional filed 'a' to for example Maybe a.

Re: [Haskell-cafe] JSON querying

2013-02-17 Thread Oliver Charles
On 02/17/2013 03:01 PM, Sergey Mironov wrote: Hi folks. Hackage contains several JSON packages but as far as I see, they all provide 'static' conversion from JSON format to Haskell data type. Is there a method of converting object containing optional filed 'a' to for example Maybe a. Assuming

[Haskell-cafe] Terminal Win32/Building Haskeline/8.3 file issue

2013-02-17 Thread Matthew Lamari
Hit this compiling darcs on a new machine. . . . But it may be more generic to Haskell platform itself. Bottom line, it presents a situation where someone could end up dead-in-the-water with respect to using haskell libraries. I burned a lot of time tracking this down, it may discourage users

Re: [Haskell-cafe] ifdef based on which OS you're on

2013-02-17 Thread Doug McIlroy
With apologies for prolonging a tangential topic, I'd like to sharpen anti-ifdef comments that have been posted already. 1. An ifdef for portability is an admission of nonportability. What it does is point out a nonportability--a useful crutch for maintainers, but a crutch nonetheless.

[Haskell-cafe] adding recursion to a DSL

2013-02-17 Thread fritsch
I have a tiny DSL that actually works quite well. When I say import language.CWMWL main = runCWMWL $ do out (matrixMult, A, 1, row, matrix-row) then runCWMWL is a function that is exported by language.CWMWL. This parses the experession and takes some action. Now, A is the name of the

[Haskell-cafe] Maintaining lambdabot

2013-02-17 Thread Jan Stolarek
Hi all, as some of you may have noticed Lambdabot doesn't build on GHC 7.6.1 due to OldException being removed (and a few other changes). I updated the code so that it builds on latest GHC release. The updated code is available here: https://github.com/killy/lambdabot/tree/upstream It

Re: [Haskell-cafe] FunPtr to C function with #arguments determined atruntime?

2013-02-17 Thread Donn Cave
Quoth Ryan Newton rrnew...@gmail.com, The scenario is pretty simple. I generate C code at runtime. I compile it to a .so. I know how many arguments it expects (but only at runtime), and I get a FunPtr back from 'dlsym'. How do I call it? I was hoping there would be some Raw lower level

Re: [Haskell-cafe] FunPtr to C function with #arguments determined atruntime?

2013-02-17 Thread Ryan Newton
The scenario is pretty simple. I generate C code at runtime. I compile it to a .so. I know how many arguments it expects (but only at runtime), and I get a FunPtr back from 'dlsym'. How do I call it? I feel that I might be confused about the problem, but since I don't see anyone

Re: [Haskell-cafe] FunPtr to C function with #arguments determined atruntime?

2013-02-17 Thread Donn Cave
Quoth Ryan Newton rrnew...@gmail.com, ... Anyway, in this case it wasn't *too *painful to just generate a bunch of extra boilerplate C functions for (1) creating a data structure to hold the arguments, (2) loading them in one at a time, and (3) deallocating the structure when the call is done.

Re: [Haskell-cafe] Maintaining lambdabot

2013-02-17 Thread Cale Gibbard
On 17 February 2013 18:03, Jan Stolarek jan.stola...@p.lodz.pl wrote: ... This changes would be quite invasive and code wouldn't be compatible with the lambdabot repo on haskell.org. So before I start making any of them I would like to hear from the community if such changes in the source

Re: [Haskell-cafe] Maintaining lambdabot

2013-02-17 Thread Dan Burton
Sounds great. Lambdabot is an important icon to the Haskell community; it will be nice to brush off the bitrot and make lambdabot easier for the average Haskeller to install without having to rely on Cale keeping it running on irc (grateful, though we are). -- Dan Burton On Feb 17, 2013 3:04 PM,

Re: [Haskell-cafe] JSON querying

2013-02-17 Thread Sergey Mironov
2013/2/17 Oliver Charles ol...@ocharles.org.uk: On 02/17/2013 03:01 PM, Sergey Mironov wrote: Hi folks. Hackage contains several JSON packages but as far as I see, they all provide 'static' conversion from JSON format to Haskell data type. Is there a method of converting object containing