[Haskell-cafe] hdbc-odbc adds a space to the value

2011-03-23 Thread vagif . verdi
I have a weird problem ?
When preparing sql statements with ? placeholders, hdbc-odbc adds a space to a 
string value at the end.

run conn "update sometable set somefield = ? where id = ?" [SqlString "bla", 
toSql 10]

Database: Ms Sql Server 2005.
Driver: FreeTds on linux

Please help!

Regards,
Vagif Verdi

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Looking for feedback on my attempt at a tree construction edsl

2011-03-23 Thread Stephen Tetley
A shallow embedding would typically use just functions - a famous
example is Paul Hudak's "region server". A deep embedding would build
syntax - represented with data types - and interpret the syntax or
compile the syntax for another use (so called "off-shoring" e.g. Conal
Elliott's Pan).

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANN: clash-0.1.3.0 (Functional Hardware Descriptions)

2011-03-23 Thread Christiaan Baaij
I now also fixed the examples on the website [1] to work with version 0.1.3.0 
of CLaSH :-)

-- Christiaan

[1] http://clash.ewi.utwente.nl

On Mar 22, 2011, at 6:43 PM, Christiaan Baaij wrote:

> Hello,
> 
> I am pleased to announce an incremental update to CLaSH, version 0.1.3.0.
> 
> CLaSH can translate a (semantic) subset of Haskell to RTL-style VHDL. Instead 
> of being an embedded DSL like Lava or ForSyDe, CLaSH takes are more 
> 'traditional' approach to synthesis/compilation. It uses the GHC API as a 
> front-end for parsing, type-checking and desugaring the Haskell source. It 
> then exhaustively applies a list of meaning-preserving transformations to the 
> intermediate GHC Core representation until it is in the desired normal form. 
> The normalized Core/System Fc is then 'trivially' translated to RTL-style 
> VHDL.
> 
> The new version of CLaSH has the following updates:
> - Support for simulation and synthesis of multi-clock hardware [6]
> - Significant synthesis speed-up (4x to 10x)
> 
> CLaSH already supported synthesis of:
> - User-defined Higher-Order functions [1]
> - User-defined ADTs (GADTs are not tested, but *might* work)
> - All of Haskell's choice constructs (Guards, Pattern Matching, etc.)
> - Lambda-abstraction / Anonymous Functions
> 
> You can use CLaSH as a library, but the use of the adapted GHC interpreter 
> (added the :vhdl command) is recommended. The interpreter can be found on the 
> CLaSH website [2], where you will also find examples, papers, tutorials, etc. 
> The library can be downloaded from Hackage [3].
> 
> I recently gave a demo of CLaSH at the DATE'11 conference in grenoble, this 
> demo already made use of the multi-clock feature (and is actually the only 
> reference if you want to experiment with multi-clock hardware yourself). The 
> source for the demo (audio spectrum analyzer programmed on an Altera Cyclone 
> II FPGA board) can be downloaded from my github page [4].
> 
> Do note that CLaSH only works when you have the 6.12.* branch of GHC 
> installed! I am currently analyzing the impact of the GHC API changes made in 
> the 7.0.* brach, and hope to make the transition to the new API within the 
> next month. Although the compiler is already used by 2 other phd's in our 
> group [5], it is not a thoroughly tested product, so your coding style might 
> not be anticipated by the current version of CLaSH ;-)
> 
> -- Christiaan Baaij
> 
> 
> [1] There is hard-coded support for a set of recursively defined higher-order 
> functions such as map, fold, zipWith, etc.
> [2] http://clash.ewi.utwente.nl
> [3] http://hackage.haskell.org/package/clash-0.1.3.0
> [4] http://github.com/christiaanb/DE1-Cyclone-II-FPGA-Board-Support-Package
> [5] http://caes.ewi.utwente.nl
> [6] Simulation does not show meta-stability, you will have to take care of 
> synchronization (dual flipflop) yourself


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Looking for feedback on my attempt at a tree construction edsl

2011-03-23 Thread C K Kashyap
>
> A shallow embedding would typically use just functions - a famous
> example is Paul Hudak's "region server". A deep embedding would build
> syntax - represented with data types - and interpret the syntax or
> compile the syntax for another use (so called "off-shoring" e.g. Conal
> Elliott's Pan).
>
>
I am not able to ascertain  if what you are saying is consistent with
http://www.haskell.org/haskellwiki/Embedded_domain_specific_language

Regards,
Kashyap
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Installation of Haskell Platform on CentOS 5.5

2011-03-23 Thread frode k
On Mon, Mar 21, 2011 at 5:57 PM, Ketil Malde  wrote:

> I got gcc44 (RHEL package) installed, but the suggested (by ./configure
> --help) "./configure CC=gcc44" doesn't seem to do anything, this seems
> to be a documentation bug.
>

The command should be "-with-gcc". I've used the following command to
configure the installation:
./configure --prefix=/usr/haskell/2011.2.0.0/ --with-gcc=/usr/bin/gcc44

I've at this stage also finally managed to install GHC 7.0.2. However when I
downloaded and tried to install the Haskell Platform 2011.2.0.0 I ran into
more problems. It seems like this happen when installing Cabal /
transformers. I get the error message (full output further down):

Implicit import declaration:
Could not find module `Prelude':
  Perhaps you haven't installed the profiling libraries for package
`base'?
  Use -v to see a list of the files searched for.

I've searched but so far haven't found any solution to this issue. Any idea
how to solve this? How can I install profiling libraries for package 'base'?

[k]


- entire output -
# make
scripts/build.sh
**
Scanning system for any installed Haskell Platform components...

Found:None.

New packages to install: None! All done.

**
Building transformers-0.2.2.0
"/usr/haskell/2011.2.0.0/bin//ghc" "--make" "Setup" "-o" "Setup" "-package"
"Cabal-1.10.1.0"
[1 of 1] Compiling Main ( Setup.hs, Setup.o )
Linking Setup ...
"./Setup" "configure" "--package-db=../../packages/package.conf.inplace"
"--prefix=/usr/haskell/2011.2.0.0"
"--with-compiler=/usr/haskell/2011.2.0.0/bin//ghc"
"--with-hc-pkg=/usr/haskell/2011.2.0.0/bin//ghc-pkg"
"--with-hsc2hs=/usr/haskell/2011.2.0.0/bin//hsc2hs"
"--enable-library-profiling"
"--ghc-pkg-option=--package-conf=../../packages/package.conf.inplace"
Configuring transformers-0.2.2.0...
"./Setup" "build"
Preprocessing library transformers-0.2.2.0...
Building transformers-0.2.2.0...
[ 1 of 21] Compiling Data.Functor.Product ( Data/Functor/Product.hs,
dist/build/Data/Functor/Product.o )
[ 2 of 21] Compiling Data.Functor.Constant ( Data/Functor/Constant.hs,
dist/build/Data/Functor/Constant.o )
[ 3 of 21] Compiling Data.Functor.Compose ( Data/Functor/Compose.hs,
dist/build/Data/Functor/Compose.o )
[ 4 of 21] Compiling Data.Functor.Identity ( Data/Functor/Identity.hs,
dist/build/Data/Functor/Identity.o )
[ 5 of 21] Compiling Control.Monad.Trans.Class (
Control/Monad/Trans/Class.hs, dist/build/Control/Monad/Trans/Class.o )
[ 6 of 21] Compiling Control.Monad.IO.Class ( Control/Monad/IO/Class.hs,
dist/build/Control/Monad/IO/Class.o )
[ 7 of 21] Compiling Control.Monad.Trans.Cont ( Control/Monad/Trans/Cont.hs,
dist/build/Control/Monad/Trans/Cont.o )
[ 8 of 21] Compiling Control.Monad.Trans.Error (
Control/Monad/Trans/Error.hs, dist/build/Control/Monad/Trans/Error.o )
[ 9 of 21] Compiling Control.Monad.Trans.Identity (
Control/Monad/Trans/Identity.hs, dist/build/Control/Monad/Trans/Identity.o )
[10 of 21] Compiling Control.Monad.Trans.List ( Control/Monad/Trans/List.hs,
dist/build/Control/Monad/Trans/List.o )
[11 of 21] Compiling Control.Monad.Trans.Maybe (
Control/Monad/Trans/Maybe.hs, dist/build/Control/Monad/Trans/Maybe.o )
[12 of 21] Compiling Control.Monad.Trans.Reader (
Control/Monad/Trans/Reader.hs, dist/build/Control/Monad/Trans/Reader.o )
[13 of 21] Compiling Control.Monad.Trans.RWS.Lazy (
Control/Monad/Trans/RWS/Lazy.hs, dist/build/Control/Monad/Trans/RWS/Lazy.o )
[14 of 21] Compiling Control.Monad.Trans.RWS ( Control/Monad/Trans/RWS.hs,
dist/build/Control/Monad/Trans/RWS.o )
[15 of 21] Compiling Control.Monad.Trans.RWS.Strict (
Control/Monad/Trans/RWS/Strict.hs,
dist/build/Control/Monad/Trans/RWS/Strict.o )
[16 of 21] Compiling Control.Monad.Trans.State.Lazy (
Control/Monad/Trans/State/Lazy.hs,
dist/build/Control/Monad/Trans/State/Lazy.o )
[17 of 21] Compiling Control.Monad.Trans.State (
Control/Monad/Trans/State.hs, dist/build/Control/Monad/Trans/State.o )
[18 of 21] Compiling Control.Monad.Trans.State.Strict (
Control/Monad/Trans/State/Strict.hs,
dist/build/Control/Monad/Trans/State/Strict.o )
[19 of 21] Compiling Control.Monad.Trans.Writer.Lazy (
Control/Monad/Trans/Writer/Lazy.hs,
dist/build/Control/Monad/Trans/Writer/Lazy.o )
[20 of 21] Compiling Control.Monad.Trans.Writer (
Control/Monad/Trans/Writer.hs, dist/build/Control/Monad/Trans/Writer.o )
[21 of 21] Compiling Control.Monad.Trans.Writer.Strict (
Control/Monad/Trans/Writer/Strict.hs,
dist/build/Control/Monad/Trans/Writer/Strict.o )

Implicit import declaration:
Could not find module `Prelude':
  Perhaps you haven't installed the profiling libraries for package
`base'?
  Use -v to see a list of the files searched for.

Error:
Building the transformers-0.2.2.0 package failed
make: *** [build.stamp] Error 2
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/

[Haskell-cafe] threading question for ghc 7.0.2

2011-03-23 Thread Oliver Mueller
hello,
i'm a bit lost here so i hope s.o. can help me here:
seems i have a problem in my code when compiled with ghc-7.0.2:

what i try to do:
serverside:
-listen on a socket and reply to requests
client-side:
-send a request to that server
-wait for a response (with a timeout)

any ideas on how i can make this work again without using the -threaded flag?
is there is a better way for what i'm trying to achieve?
many thanks,
oliver

the simplified code is available at https://gist.github.com/882770
explanation:
the code forks of a lightweight thread (not an OS thread) that will
listen for incoming responses.
the main thread will go on to push out a message and then wait for the
receiver thread to finish.

i used to compile my application with the -threaded option but ran
into some obscure FFI problems after upgrading from ghc-6.12.3 to
ghc-7.0.2. so i tried to remove the -threaded option.
but now the message does not get pushed out until the receiver-thread
has finished.
what is strange to me is that this worked without problems on 6.12.3
but not on 7.0.2.
also the behavior is a little different on mac os X with 7.0.2: here i
get a "resource vanished (Connection reset by peer)"

see the output of the program below ([S] marks output from the main
thread, [R] from the receiver thread)

compiled on ghc-7.0.2/ubuntu 64bit, without -threaded

"running all things..."
   [R]listening for response...
   [R]wait for data with timeout:2000 ms
.
   [R]no message available
[S]pushing out the message
[S]sending --> "\EOT\ETX"
"[S]going on..."
Nothing


compiled on ghc-7.0.2/ubuntu 64bit, using -threaded

"running all things..."
[S]pushing out the message
   [R]listening for response...
[S]sending --> "\EOT\ETX"
   [R]wait for data with timeout:2000 ms
"[S]going on..."

..Just "\ETX\EOT"


and...also very strange: when i introduce a putStrLn in the main
thread (not a print !) it will work again...only a lot
(see code snipped line38: putStrLn "[S]hickup"

"running all things..."
[S]hickup
   [R]listening for response...
[S]pushing out the message
[S]sending --> "\EOT\ETX"
   [R]wait for data with timeout:2000 ms
"[S]going on..."
..Just "\ETX\EOT"

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hdbc-odbc adds a space to the value

2011-03-23 Thread Gershom Bazerman
On Mar 23, 2011, at 4:01 AM, vagif.ve...@gmail.com wrote:

> I have a weird problem ?
> When preparing sql statements with ? placeholders, hdbc-odbc adds a space to 
> a 
> string value at the end.
> 
> run conn "update sometable set somefield = ? where id = ?" [SqlString "bla", 
> toSql 10]
> 
> Database: Ms Sql Server 2005.
> Driver: FreeTds on linux

I've run into that bug too. I'm pretty sure its an issue with hdbc-odbc, but 
haven't wanted to patch it without testing it across a few other 
configurations., which I haven't had time/found straightforward to do. John 
Goerzen sent a message recently explaining that HDBC needs some more 
eyes/contributors on it, and particularly the ODBC backend [1].

In any case, for the moment, you can always avoid bound parameters with 
hdbc-odbc. I've found support for them to be partial at best anyway.

Cheers,
Gershom

[1] http://www.haskell.org/pipermail/haskell-cafe/2011-February/089535.html___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Installation of Haskell Platform on CentOS 5.5

2011-03-23 Thread Ketil Malde
frode k  writes:

> The command should be "-with-gcc".

Ah, thanks, missed that, I guess.

> Implicit import declaration:
> Could not find module `Prelude':
>   Perhaps you haven't installed the profiling libraries for package
> `base'?
>   Use -v to see a list of the files searched for.

At least for me, the supplied base was installed with profiling
already, and I just profiled a program, just to make sure.  I also have
transformers-0.2.2.0 installed (probably got pulled in by some other
program).

I haven't bothered with the Platform, but just cabal-install'ed stuff as
and when it became necessary. 

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hdbc-odbc adds a space to the value

2011-03-23 Thread Gershom Bazerman
> I've run into that bug too. I'm pretty sure its an issue with hdbc-odbc, but 
> haven't wanted to patch it without testing it across a few other 
> configurations, which I haven't had time/found straightforward to do.

I should add, for those interested, where I think the bug is. In the bindCol 
method of Statement.hsc, there's the following:

rc2 <- sqlBindParameter sthptr (fromIntegral icol)
   #{const SQL_PARAM_INPUT}
   #{const SQL_C_CHAR} coltype
   (if isOK rc1 then colsize else fromIntegral cslen + 1) decdigits
   csptr (fromIntegral cslen + 1) pcslen

Either one or both of the "fromIntegral csLen + 1" expressions shouldn't have 
the "+ 1". 

Cheers,
Gershom___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Help optimising a Haskell program

2011-03-23 Thread David MacIver
On 22 March 2011 15:49, Jason Dagit  wrote:
>> This seems to consistently give about a 0.4s improvement, which isn't
>> nothing but isn't a particularly interesting chunck of 8s (actually
>> it's 8.4s -> 8s). Setting it to 256M doesn't make any difference.
>
> You should use criterion to make sure that your assessments of the
> performance difference are grounded in statistically robust reasoning :)
>  Progression may also help.

Thanks. These look useful.

> GHC 7 has a new rts option, +RTS -H -RTS that gives you a good high default
> for these memory numbers.  You might give it ago, but I doubt it's going to
> help much here.

It didn't seem to, no.

> One thing I noticed was that you calculate the length of elts more than once
> inside aggregate.  It's probably not going to account for a big boost, but
> I'd recommend doing it only once.  Something like:
>   let lenelts = length elts
> Then use lenelts everywhere.

This doesn't seem to make much difference - elts is only a thousand or
so items.

> Also, it seems like you use Data.Set to sort and uniquify the input then you
> throw away the Set, that's potentially costly.

This is actually the fastest way I've found to do it! It replaced an
earlier implementation that looked like it should have been more
optimised but wasn't. If you have any better suggestions, I'm
definitely open to hearing them.

> There are probably better
> types for aggregate than [[a]] -> [a].

What did you have in mind? That's largely the format the data comes in
as, so other than changing from lists to some other ordered container
I'm not sure what to change.

> You use Arrays, but it's possible
> that a different vector library such as Data.Vector gives better performance
> here.

For the case I'm using arrays I'm specifically using unboxed double
arrays with integer indices, mainly because I do a very large number
of lookups.

> Or, perhaps you want that instead of lists everywhere.

Possibly. I looked into it briefly and it's not that easy to do. In
particular there are important bits in the code which depend on being
able to do pull the list apart head/tail-wise. It might be possible
for some of this to use vectors internally, or I might be able to
replace those with something else. I'm not entirely sure.

> For example,
> you build an index and a reverse index.  It seems like with an array or
> vector you could eliminate at least one index and have O(1) lookup time
> instead of Data.Map's O(log n) lookup time.

Yeah, in particular the reverse index really should be a vector. But
that particular code is only actually used once right at the end and
takes a tiny amount of time, so it's not actually that useful to do so
I think.

> I hope that helps,

It does. Thanks!

David

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Looking for feedback on my attempt at a tree construction edsl

2011-03-23 Thread Stephen Tetley
On 23 March 2011 10:28, C K Kashyap  wrote:

> I am not able to ascertain  if what you are saying is consistent with
>  http://www.haskell.org/haskellwiki/Embedded_domain_specific_language
> Regards,
> Kashyap

Well - I'm not sure if the description of a shallow embedding on that
page is particularly enlightening...

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] STM, newArray, and a stack overflow?

2011-03-23 Thread Ketil Malde

Hi,

I'm seeing some weirdness here.  My code does this:

omap <- atomically $ (newArray_ (0,n-1) :: STM (TArray Int Int))

This gives a stack overflow when n is one million.  The equivalent code
in the ST monad doesn't show this behavior, and works as expected.

I'm not sure what is going on here, so I thought I'd ask in case anybody
can put me on the right track.

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] STM, newArray, and a stack overflow?

2011-03-23 Thread Bas van Dijk
On 23 March 2011 13:35, Ketil Malde  wrote:
> I'm seeing some weirdness here.  My code does this:
>
>    omap <- atomically $ (newArray_ (0,n-1) :: STM (TArray Int Int))
>
> This gives a stack overflow when n is one million.

I can't reproduce this with ghci-7.0.2 (base-4.3.1.0, array-0.3.0.2
and stm-2.2.0.1). What version of ghc/ghci are you using?

Bas

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] STM, newArray, and a stack overflow?

2011-03-23 Thread Felipe Almeida Lessa
On Wed, Mar 23, 2011 at 2:22 PM, Bas van Dijk  wrote:
> On 23 March 2011 13:35, Ketil Malde  wrote:
>> I'm seeing some weirdness here.  My code does this:
>>
>>    omap <- atomically $ (newArray_ (0,n-1) :: STM (TArray Int Int))
>>
>> This gives a stack overflow when n is one million.
>
> I can't reproduce this with ghci-7.0.2 (base-4.3.1.0, array-0.3.0.2
> and stm-2.2.0.1). What version of ghc/ghci are you using?

I can't reproduce it either, using ghci-6.12.3, base-4.2.0.2,
array-0.3.0.1 and stm-2.2.0.1.  However it takes a lng time and a
lot of CPU time =).

Cheers,

-- 
Felipe.

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell internship in the south of France

2011-03-23 Thread David Waern
To all undergrads on this list:

Are you a student looking for an internship? Do you want to work with
Haskell in the south of France? My company, Amadeus, is able to offer
an internship on the subject of property-based testing of XML schema
based web service APIs. The project goal is to write an XML test case
generation tool in Haskell. The exact length of the intership can be
discussed. It may be six months or a full year.

XML based web services may not be the most fashionable technology, but
this is a chance to apply Haskell to real world problems!  Also, you
get to work in Sophia-Antipolis, a beautiful technology park close to
Nice on the French riviera.

Contact me if you're interested!

David

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] STM, newArray, and a stack overflow?

2011-03-23 Thread Ketil Malde
Bas van Dijk  writes:

Thanks to you and Felipe for trying this out.

>> omap <- atomically $ (newArray_ (0,n-1) :: STM (TArray Int Int))

> I can't reproduce this with ghci-7.0.2 (base-4.3.1.0, array-0.3.0.2
> and stm-2.2.0.1). 

It works (calling the same function) from GHCi, but breaks when
compiled.  Also when compiling with -O0.

I'm probably doing something wrong, but I can't for the life of me work
out what it might be.  I've surrounded the offending newArray with print
statements, so I can't see how it could be something else.

> What version of ghc/ghci are you using?

Happens with GHC 6.12.1 and 7.0.2.

6.12.1, array-0.3.0.0, stm-2.1.1.2
7.0.2,  array-0.3.0.2, stm-2.2.0.1

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] STM, newArray, and a stack overflow?

2011-03-23 Thread Jake McArthur

On 03/23/2011 10:34 AM, Ketil Malde wrote:

It works (calling the same function) from GHCi, but breaks when
compiled.  Also when compiling with -O0.


Confirmed for GHC 7.0.2. Works fine in GHCi, but compiling it (in my 
case, with -O) and running the executable causes a stack overflow unless 
I run it with +RTS -K16m, and even then it spends 90% of its time in GC. 
This looks like it is probably a bug, to me. Maybe it should be reported 
in GHC's Trac?


- Jake

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] STM, newArray, and a stack overflow?

2011-03-23 Thread Bas van Dijk
On 23 March 2011 17:19, Jake McArthur  wrote:
> On 03/23/2011 10:34 AM, Ketil Malde wrote:
>>
>> It works (calling the same function) from GHCi, but breaks when
>> compiled.  Also when compiling with -O0.
>
> Confirmed for GHC 7.0.2. Works fine in GHCi, but compiling it (in my case,
> with -O) and running the executable causes a stack overflow unless I run it
> with +RTS -K16m, and even then it spends 90% of its time in GC. This looks
> like it is probably a bug, to me. Maybe it should be reported in GHC's Trac?

It looks like a bug indeed.

The problem can be reduced to just:

atomically $ replicateM 100 (newTVar undefined)

or even simpler:

replicateM 100 (newIORef undefined)

Bas

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] STM, newArray, and a stack overflow?

2011-03-23 Thread Bas van Dijk
On 23 March 2011 18:42, Bas van Dijk  wrote:
> On 23 March 2011 17:19, Jake McArthur  wrote:
>> On 03/23/2011 10:34 AM, Ketil Malde wrote:
>>>
>>> It works (calling the same function) from GHCi, but breaks when
>>> compiled.  Also when compiling with -O0.
>>
>> Confirmed for GHC 7.0.2. Works fine in GHCi, but compiling it (in my case,
>> with -O) and running the executable causes a stack overflow unless I run it
>> with +RTS -K16m, and even then it spends 90% of its time in GC. This looks
>> like it is probably a bug, to me. Maybe it should be reported in GHC's Trac?
>
> It looks like a bug indeed.
>
> The problem can be reduced to just:
>
> atomically $ replicateM 100 (newTVar undefined)
>
> or even simpler:
>
> replicateM 100 (newIORef undefined)
>
> Bas
>

Maybe it's not really a bug:

For example the following very similar program also overflows the
stack: (note that: replicateM n x = sequence (replicate n x))

main = sequence $ replicate 100 $ (randomIO :: IO Int)

This happens because sequence is defined using a right fold:

sequence ms = foldr k (return []) ms
where
  k m m' = do
x <- m
xs <- m'
return (x:xs)

What happens is that sequence repeatedly pushes an x onto the stack
then continues with m' until your stack overflows.

The stack overflow disappears when you use a left fold:

sequencel xs = foldl k (\r -> return $ r []) xs id
where
  k g m = \r -> do
x <- m
g (r . (x:))

or written with explicit recursion:

sequencel xs = go xs id
where
  go [] r = return $ r []
  go (m:ms) r = do x <- m
   go ms (r . (x:))

Note that I used a difference list to keep the list in the right
order. Alternatively you can use a normal list (x:r) and reverse it
when done. I'm not sure what's more efficient.

I'm surprised I haven't encountered this problem with sequence before.
Does this suggest we need the left folded sequencel?

Regards,

Bas

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] STM, newArray, and a stack overflow?

2011-03-23 Thread Bas van Dijk
I fixed the bug in the newArray method of a TArray:

http://hackage.haskell.org/trac/ghc/ticket/5042

Bas

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] STM, newArray, and a stack overflow?

2011-03-23 Thread Ketil Malde
Bas van Dijk  writes:

> sequence ms = foldr k (return []) ms
> where
>   k m m' = do
> x <- m
> xs <- m'
> return (x:xs)

Isn't this really a strictness problem with the STM monad?  If I
understand correctly, this forces xs before x can be examined. Something
to be fed to listArray should be able to be consumed lazily, shouldn't
it? 

> Note that I used a difference list to keep the list in the right
> order. Alternatively you can use a normal list (x:r) and reverse it
> when done. I'm not sure what's more efficient.

Hm, they will all need to allocate everything on the heap, no?
Shouldn't it be possible to create an array in a loop with only constant
memory overhead?

> Does this suggest we need the left folded sequencel?

Or unsafeInterleaveSTM?

It's interesting to see that newArray is using listArray under the
covers, I really want to initialize the array from a list - but
neither a listArray function nor the TArray constructor seem to be
available.

Thanks for helping out!

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Installation of Haskell Platform on CentOS 5.5

2011-03-23 Thread frode k
Thanks a lot for all assistance and help. I'm now as well finally running
GHC 7.0.2.

I spent some time documenting all the steps I made here:
http://klevstul.posterous.com/haskell-ghc-702-on-centos-55

Cheers,
Frode

[k]
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hdbc-odbc adds a space to the value

2011-03-23 Thread John Goerzen

On 03/23/2011 06:43 AM, Gershom Bazerman wrote:

I've run into that bug too. I'm pretty sure its an issue with
hdbc-odbc, but haven't wanted to patch it without testing it across a
few other configurations, which I haven't had time/found
straightforward to do.


I should add, for those interested, where I think the bug is. In the
bindCol method of Statement.hsc, there's the following:

rc2 <- sqlBindParameter sthptr (fromIntegral icol)
#{const SQL_PARAM_INPUT}
#{const SQL_C_CHAR} coltype
(if isOK rc1 then colsize else fromIntegral cslen + 1) decdigits
csptr (fromIntegral cslen + 1) pcslen

Either one or both of the "fromIntegral csLen + 1" expressions shouldn't
have the "+ 1".


What version of HDBC-ODBC are those of you with the problem running?  I 
believe a fix for this was recently checked into my git tree.


-- John



Cheers,
Gershom



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] hdbc-odbc adds a space to the value

2011-03-23 Thread vagif . verdi
Latest from hackage: 2.2.3.2

On Wednesday, March 23, 2011 01:58:52 PM you wrote:
> On 03/23/2011 06:43 AM, Gershom Bazerman wrote:
> >> I've run into that bug too. I'm pretty sure its an issue with
> >> hdbc-odbc, but haven't wanted to patch it without testing it across a
> >> few other configurations, which I haven't had time/found
> >> straightforward to do.
> > 
> > I should add, for those interested, where I think the bug is. In the
> > bindCol method of Statement.hsc, there's the following:
> > 
> > rc2 <- sqlBindParameter sthptr (fromIntegral icol)
> > #{const SQL_PARAM_INPUT}
> > #{const SQL_C_CHAR} coltype
> > (if isOK rc1 then colsize else fromIntegral cslen + 1) decdigits
> > csptr (fromIntegral cslen + 1) pcslen
> > 
> > Either one or both of the "fromIntegral csLen + 1" expressions shouldn't
> > have the "+ 1".
> 
> What version of HDBC-ODBC are those of you with the problem running?  I
> believe a fix for this was recently checked into my git tree.
> 
> -- John
> 
> > Cheers,
> > Gershom
> > 
> > 
> > 
> > ___
> > Haskell-Cafe mailing list
> > Haskell-Cafe@haskell.org
> > http://www.haskell.org/mailman/listinfo/haskell-cafe
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] STM, newArray, and a stack overflow?

2011-03-23 Thread Ketil Malde
Bas van Dijk  writes:

> Maybe it's not really a bug:

Any idea why it works in GHCI?

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] a finite free category

2011-03-23 Thread Vasili I. Galchin
Hello,

Does there exist Haskell to generate a finite free category from a
finite multipath graph with loops?

Thank you,

Vasilki
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] a finite free category

2011-03-23 Thread Luke Palmer
On Wed, Mar 23, 2011 at 3:58 PM, Vasili I. Galchin  wrote:
> Hello,
>
>     Does there exist Haskell to generate a finite free category from a
> finite multipath graph with loops?

AKA the transitive closure of a graph?

Luke

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to use roots package?

2011-03-23 Thread Henning Thielemann
James Cook schrieb:

> Those are both options,  as is to simply restart findRoot if it returns
> a 'Left' vaule.  I personally would incline toward a custom driver
> function (findRoot).  I should probably add one to the library that
> accepts a step limit and/or one that just iterates until convergence.

I thought that the mosts Haskellish way to do numerical iterations is to
generate a list of successive approximations (by List.iterate, of
course) and then let the user choose where and why he wants to abort the
list, and thus the iteration.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] a finite free category

2011-03-23 Thread Vasili I. Galchin
I think that would be the case ...I would have to think. Should reflexive
and transitive operations I think on the finite graph (possibly with
equations).

Vasili

On Wed, Mar 23, 2011 at 5:26 PM, Luke Palmer  wrote:

> On Wed, Mar 23, 2011 at 3:58 PM, Vasili I. Galchin 
> wrote:
> > Hello,
> >
> > Does there exist Haskell to generate a finite free category from a
> > finite multipath graph with loops?
>
> AKA the transitive closure of a graph?
>
> Luke
>
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] DSL for task dependencies

2011-03-23 Thread Brandon S Allbery KF8NH
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 3/18/11 00:43 , Conal Elliott wrote:
> Speaking of which, for a while now I've been interested in designs of
> make-like systems that have precise & simple (denotational) semantics with
> pleasant properties. What Peter Landin called "denotative" (as opposed to
> functional-looking but semantically ill-defined or intractable).
> 
> Norman Ramsey (cc'd) pointed me to the Vesta
>  system
> from DEC SRC. If anyone knows of other related experiments, I'd appreciate
> hearing.

Back in the late 1980s there were several attempts at this kind of thing;
the ones that stick in my mind are Shape[1] and Cake[2].  Their
declarative/denotative abilities were primitive at best, but they helped
shape further development and I find these papers often cited in later research.

[1]
http://citeseer.ist.psu.edu/viewdoc/download;jsessionid=30B4EC21BAD13166AFBEBB20246221B8?doi=10.1.1.55.6969&rep=rep1&type=pdf
(http://tinyurl.com/4l79vg4)
[2] http://www.cs.mu.oz.au/~zs/papers/cake.ps.gz

- -- 
brandon s. allbery [linux,solaris,freebsd,perl]allber...@gmail.com
system administrator  [openafs,heimdal,too many hats]kf8nh
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2Khm0ACgkQIn7hlCsL25X+lgCeP4U8lUcVOvLKQQVcmbAhLT11
dvMAoIabif8gGlsLKnvg0e3ZKqgVpPVn
=ApVq
-END PGP SIGNATURE-

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] STM, newArray, and a stack overflow?

2011-03-23 Thread Bas van Dijk
On 23 March 2011 21:07, Ketil Malde  wrote:
> Shouldn't it be possible to create an array in a loop with only constant
> memory overhead?

I think it should. Maybe we need something like this:

unsafeArrayM :: Ix i => (i, i) -> Int -> IO e -> IO (Array i e)
unsafeArrayM (l,u) n@(I# n#) (IO f) = IO $ \s1# ->
case newArray# n# arrEleBottom s1# of
(# s2#, marr# #) ->
let go i# s#
| i# ==# n# =
case unsafeFreezeArray# marr# s# of
  (# s3#, arr# #) -> (# s3#, Array l u n arr# #)
| otherwise =
case f s# of
  (# s3#, x #) ->
  case writeArray# marr# i# x s3# of
s4# -> go (i# +# 1#) s4#
in go 0# s2#

The given IO computation can then be something like: unsafeIOToSTM $ newTVar e.

Note that I haven't compiled and tested this code at all nor thought
about it to deeply ;-)

Bas

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] STM, newArray, and a stack overflow?

2011-03-23 Thread Bas van Dijk
On 24 March 2011 01:22, Bas van Dijk  wrote:
> The given IO computation can then be something like: unsafeIOToSTM $ newTVar 
> e.

Oops I meant: unsafeSTMToIO $ newTVar e

where

unsafeSTMToIO :: STM a -> IO a
unsafeSTMToIO (STM m) = IO m

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] How to use roots package?

2011-03-23 Thread James Cook

On Mar 23, 2011, at 6:57 PM, Henning Thielemann wrote:


James Cook schrieb:

Those are both options,  as is to simply restart findRoot if it  
returns

a 'Left' vaule.  I personally would incline toward a custom driver
function (findRoot).  I should probably add one to the library that
accepts a step limit and/or one that just iterates until convergence.


I thought that the mosts Haskellish way to do numerical iterations  
is to

generate a list of successive approximations (by List.iterate, of
course) and then let the user choose where and why he wants to abort  
the

list, and thus the iteration.



That's probably true, and the same module exports a function that does  
so.  But sometimes you just want to ask "what is the root?", and get  
an answer without taking (possibly literally) forever.


Overall, the code is relatively un-Haskellish to begin with though.   
It was assembled in a short period of time in order to simply have  
code that performs the task, and hasn't really been touched since.


-- James___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Class constraints for associated type synonyms

2011-03-23 Thread Jan-Willem Maessen
Hi all -

I've been trying to construct a class declaration with an associated
type synonym, but I'd like to constrain that type to belong to a
particular class.

Consider the following class:

class Monoid m => Constructs c m | c -> m where
  construct :: m -> c

This captures the idea that the collection c ought to be constructed
using the monoid m (say if we're doing the construction using the
Writer monad)--the functional dependency indicates the desire for the
type c to injectively determine the choice of monoid m.  For example:

newtype ListBuilder a = Builder ([a] -> [a]) deriving (Monoid)

instance Constructs [a] (ListBuilder a) where
  construct (Builder f) = f []

instance (Ord a) => Constructs (Set a) (Set a) where
  construct = id

Now I'd like to be able to do the same thing using an associated type
synonym, something like this:

class Monoid (GeneratorOf a) => Generable a where
  type GeneratorOf a :: * -> *
  construct :: GeneratorOf a -> a

Now, it seems I need FlexibleInstances to do this when I'm using an
associated type synonym, but I don't need the flexibility when using a
multiparameter type class.  In both cases the instance constraint
involves types that can be injectively inferred (if I have my
terminology straight; work with me here) from a single type mentioned
in the class head.  In particular, I can imagine storing the
dictionary for Monoid (GeneratorOf a) in the dictionary for Generable
a, and thus allowing context reduction of (Monoid (GeneratorOf tyvar))
to (Generable tyvar).  Meanwhile, I think there are things that are
permitted by FlexibleInstances that I'd rather *not* have creeping
into my programs.

Is there a fundamental constraint I'm missing here that requires the
full generality of FlexibleInstances?  Do I need to use
FlexibleInstances whenever I use associated types in my programs?

-Jan-Willem Maessen

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell Weekly News: Issue 174

2011-03-23 Thread Daniel Santa Cruz
   Welcome to issue 174 of the HWN, a newsletter covering developments in the
   [1]Haskell community. This release covers the week of March 13-19.

   You can find the HTML version at: http://bit.ly/hLu36R

Announcements

   JP Moresmau [2]announced a new release of EclipseFP with support for ghc 7!

   S. Doaitse Swierstra [3]announced the release of version 2.7.0 to the
   uu-parsinglib library to hackage.

   Vincent Gerard [4]informed us that he has taken over maintainership
of hsmagick,
   which is "a FFI bindings library to ImageMagick." He is pleased to
announce the
   0.5 release of the library.

   Malte Harder [5]announce the first release of the Craftwerk
graphics library for
   2d vector graphics.

   Corey O'Connor [6]annouced a new release of his VTY library.

   Brent Yorgey [7]announced the release of the special Poetry and
Fiction Edition
   of The Monad.Reader. Thanks for putting this together Brent!

   Gregory D. Weber [8]announced version 1.2.4 of his Sifflet and
sifflet-lib. "This
   is a compatibility release for HXT >= 9.1."

   Edward Kmett [9]remminded us that the Google Summer of Code is upon
us. Follow
   the link to see the sign up information.

Quotes of the Week

 * ddarius: *ddarius is more of a glass SUM_n (-1)^n full person.

 * monochrom: some kind of lazy evaluation is already known to
highschool kids.
   teachers tell you that in a*(b+c), "evaluate b+c first", right? well, I
   challenge you to take 0*(389238493+97283748) and find one
single student who
   faithfully evaluate 389238493+97283748 first.

 * hpc: in soviet russia, yoda speaks flawless english

 * lambdabot: trololololo

 * hpc: jokes are subject to an incompleteness theorem; if you can
prove they
   are funny, they were never good jokes to begin with

 * hpc: when all you have is Haskell, everything looks like a research paper

 * Edward Kmett:Clearly we need some sort of xbox live-like
achievement system
   for these. Achievement Unlocked: Stumped Oleg!

Top Reddit Stories

 * Haskell.org has been accepted for the 2011 Google Summer of Code
   From (twitter.com), scored 48 with 1 comments.
   Read on [10]reddit.
   Read the [11]original post.

 * Haskell's Niche: Hard Problems
   From (cdsmith.wordpress.com), scored 47 with 17 comments.
   Read on [12]reddit.
   Read the [13]original post.

 * A little care and feeding can go a long way
   From (serpentine.com), scored 39 with 6 comments.
   Read on [14]reddit.
   Read the [15]original post.

 * The reception of monads circa 1995...
   From (self.haskell), scored 35 with 1 comments.
   Read on [16]reddit.

 * BlazeHtml: a blazingly fast HTML combinator library
   From (skillsmatter.com), scored 29 with 18 comments.
   Read on [17]reddit.
   Read the [18]original post.

 * Simon Peyton Jones: Managing parallelism: embrace diversity,
but control side
   effects
   From (skillsmatter.com), scored 28 with 12 comments.
   Read on [19]reddit.
   Read the [20]original post.

 * EZYang: Mutation is frequently not what people expect ; mutation is not
   modular, and mutation is complicated.
   From (blog.ezyang.com), scored 26 with 0 comments.
   Read on [21]reddit.
   Read the [22]original post.

 * Functor is to Lens as Applicative is to Biplate: Introducing Multiplate
   From (front.math.ucdavis.edu), scored 25 with 19 comments.
   Read on [23]reddit.
   Read the [24]original post.

 * Monad.Reader special poetry and fiction edition
   From (themonadreader.wordpress.com), scored 23 with 1 comments.
   Read on [25]reddit.
   Read the [26]original post.

 * Functional flocks : modelling and visualizing flocking behavior
in Haskell
   From (syntacticsalt.com), scored 22 with 0 comments.
   Read on [27]reddit.
   Read the [28]original post.

Top StackOverflow Answers

 * [29]Why does application of `sequence` on List of Lists lead to
computation
   of its Cartesian Product? votes: 12

   This works because using lists as monads in Haskell makes them
   model indeterminism. Consider:

   sequence [[1,2],[3,4]]

   By definition this is the same as:

   do x <- [1,2]
  y <- [3,4]
  return [x,y]

   Just read it as "First a choice between 1 and 2, then a choice
   between 3 and 4". The list monad will now accumulate all
   possible outcomes - hence the ...

 * [30]In GHCi, why does the kind of the function arrow `:kind (->)` include
   question marks `(->) :: ?? -&ht; ? -> *`? votes: 11

   The ? and ?? kinds refer to GHC extensions, specifically
   unboxed types.
   http://hackage.haskell.org/trac/ghc/wiki/IntermediateTypes has
   a diagram showing relationships between the extended kinds ?
   (all possible types), # (unboxed types), ?? (boxed or normal
   unboxed typ

Re: [Haskell-cafe] Class constraints for associated type synonyms

2011-03-23 Thread Brandon Moore
> From: Jan-Willem Maessen 

> Sent: Wed, March 23, 2011 8:43:14 PM
> 
> Hi all -
> 
> I've been trying to construct a class declaration with an  associated
> type synonym, but I'd like to constrain that type to belong to  a
> particular class.
> 
> Consider the following class:
> 
> class Monoid  m => Constructs c m | c -> m where
>   construct :: m ->  c
> 
> This captures the idea that the collection c ought to be  constructed
> using the monoid m (say if we're doing the construction using  the
> Writer monad)--the functional dependency indicates the desire for  the
> type c to injectively determine the choice of monoid m.  For  example:
> 
> newtype ListBuilder a = Builder ([a] -> [a]) deriving  (Monoid)
> 
> instance Constructs [a] (ListBuilder a) where
>construct (Builder f) = f []
> 
> instance (Ord a) => Constructs (Set a)  (Set a) where
>   construct = id
> 
> Now I'd like to be able to do the  same thing using an associated type
> synonym, something like  this:
> 
>   type  GeneratorOf a :: * -> *
>   construct :: GeneratorOf a ->  a
> 
> Now, it seems I need FlexibleInstances to do this when I'm using  an
> associated type synonym, but I don't need the flexibility when using  a
> multiparameter type class.

The conditions in the report are quite restrictive - in particular, the context
must consist only of classes applied to type variables. When you used a
multiparameter type class and an FD, the type you wanted to mention was
just a type variable.

http://www.haskell.org/onlinereport/haskell2010/haskellch4.html#x10-750004.3

The GHC user's guide suggests FlexibleContexts should be enough to allow
you to declare that class:

http://www.haskell.org/ghc/docs/7.0-latest/html/users_guide/type-class-extensions.html


FlexibleInstances seems only to affect what is allowed in an instance head.
I don't see how it helps at all, unless it implies some other extensions.

You might still run into termination issues - as a an associated type synonym
rather than an associated data type, GeneratorOf a might very well be something
large, and the conditions (disabled by UndecidableInstances) don't take 
advantage
of the acyclic superclass relationship.

http://www.haskell.org/ghc/docs/7.0-latest/html/users_guide/type-class-extensions.html#instance-rules


> In both cases the instance  constraint
> involves types that can be injectively inferred (if I have  my
> terminology straight; work with me here) from a single type  mentioned
> in the class head.  In particular, I can imagine storing  the
> dictionary for Monoid (GeneratorOf a) in the dictionary for  Generable
> a, and thus allowing context reduction of (Monoid (GeneratorOf  tyvar))
> to (Generable tyvar).  Meanwhile, I think there are things that  are
> permitted by FlexibleInstances that I'd rather *not* have  creeping
> into my programs.

Do you have any examples? I've always found FlexibleInstances alone
unproblematic - it's only when you add OverlappingInstances or worse
that things can get messy.
 
Brandon



  

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe