Re: [Haskell-cafe] Automated tests with cabal

2011-03-10 Thread Bas van Dijk
On 10 March 2011 08:12, Hauschild, Klaus (EXT) klaus.hauschild@siemens.com wrote: Hi Haskellers, I read about the cabal features for running test code from Setup.hs with defaultMainWithHooks. I'm looking for more generic code that allows me to place any haskell in a subdirectory test or

Re: [Haskell-cafe] Automated tests with cabal

2011-03-10 Thread Johan Tibell
On Thu, Mar 10, 2011 at 10:06 AM, Bas van Dijk v.dijk@gmail.com wrote: On 10 March 2011 08:12, Hauschild, Klaus (EXT) klaus.hauschild@siemens.com wrote: Hi Haskellers, I read about the cabal features for running test code from Setup.hs with defaultMainWithHooks. I'm looking for more

Re: [Haskell-cafe] Custom monad using ST

2011-03-10 Thread Yves Parès
In practice if you want to actually _use_ ST you'll find you'll need to let the world escape into your type. Otherwise you won't be able to create and pass around any STRefs or arrays and use them later. The universal quantification inside of MyST's definition will keep you from holding on to

Re: [Haskell-cafe] IPv6 issues for (code|community).haskell.org?

2011-03-10 Thread Yitzchak Gale
Erlend Hamberg wrote: When I wanted to get the newest xmonad code from darcs today¹ it was really, really slow... Being on an IPv6 network, and having been burnt by similar problems before, I tried adding IPv4 address for code.haskell.org in /etc/hosts... This fixed the issue ...Connecting

Re: [Haskell-cafe] [Haskell] Linker flags for foreign export.

2011-03-10 Thread Max Bolingbroke
On 10 March 2011 04:04, Jason Dusek jason.du...@gmail.com wrote:  I'm trying to hew relatively close to Duncan Coutts'  blog posting in working through this; so I have different  code and a new Makefile: Starting with your code I've managed to make it work (OS X 10.6, GHC 7). The Makefile is:

[Haskell-cafe] Update Cabal

2011-03-10 Thread Hauschild, Klaus (EXT)
Hallo, I'm using Haskell Platform 2010.2.0.0 on a Windows XP machine. This haskell platform includes cabal-1.8.0.6. Now I want to update cabal by cabal install cabal. Installation works well. Call like runhaskell ./Setup.hs will use the updatetd cabal-1.10.0.0. But cabal --version says still

Re: [Haskell-cafe] Update Cabal

2011-03-10 Thread Johan Tibell
On Thu, Mar 10, 2011 at 11:27 AM, Hauschild, Klaus (EXT) klaus.hauschild@siemens.com wrote: Hallo, I'm using Haskell Platform 2010.2.0.0 on a Windows XP machine. This haskell platform includes cabal-1.8.0.6. Now I want to update cabal by cabal install cabal. Installation works well.

Re: [Haskell-cafe] Update Cabal

2011-03-10 Thread Hauschild, Klaus (EXT)
Hi Johan, Thank you for the tip. After a tiny manupulation at my PATH variable it works. -Ursprüngliche Nachricht- Von: Johan Tibell [mailto:johan.tib...@gmail.com] Gesendet: Donnerstag, 10. März 2011 11:39 An: Hauschild, Klaus (EXT) Cc: haskell-cafe@haskell.org Betreff: Re:

Re: [Haskell-cafe] Update Cabal

2011-03-10 Thread Christian Maeder
What are the arguments for updating? Are you using ghc-7.0.2? Wait for Haskell Platform 2011.2.0.0 that will be based on cabal-install-0.10.2! Cheers Christian Am 10.03.2011 11:27, schrieb Hauschild, Klaus (EXT): Hallo, I'm using Haskell Platform 2010.2.0.0 on a Windows XP machine. This

Re: [Haskell-cafe] Tagless interpreter, expression problem and zipper

2011-03-10 Thread oleg
This is already an improvement to my current code. But I am not entirely satisfied. I can pick and choose which structures to use in my terms but the context type is still an ordinary data type. Each module which extends the expression language with new structures needs to define a

Re: [Haskell-cafe] Convert a function to a string of operators?

2011-03-10 Thread Lyndon Maydwell
Will methods explained here work for boolean expressions? The convenience of defining using specialised datatypes for serialising numeric operations comes from Num being a typeclass. This is not the case for Bool: Prelude :info Num class (Eq a, Show a) = Num a where (+) :: a - a - a ... --

Re: [Haskell-cafe] Haskell mail server fail?

2011-03-10 Thread Daniel Fischer
On Thursday 10 March 2011 07:24:45 you wrote: Like Kenneth Hoste, I haven't been receiving mails from haskell-cafe@ nor libraries@ for a few days to a week now. What is the status of the mailing lists? (Please CC me off-list, for obvious reasons) Like David, I receive posts for both lists.

Re: [Haskell-cafe] ANN: Updates in the monadic regions family

2011-03-10 Thread Bas van Dijk
In regions-0.9 I removed support for forking threads because it allowed you to use a closed handle in a forked thread. Unfortunately I just realized that it's still possible to fork threads in a region. The reason is that I've derived a MonadControlIO instance for RegionT which enables you to use

[Haskell-cafe] ContT and ST stack

2011-03-10 Thread Anakim Border
Dear list, I have the following (simplified) piece of code: find :: Int - [Int] find i = runST . (`runContT` return) $ callCC $ \escape - do return [] which used to compile correctly under GHC 6.12.3. Now that I've switched to 7.0.2 it gets rejected with the following error:

Re: [Haskell-cafe] ContT and ST stack

2011-03-10 Thread Daniel Fischer
On Thursday 10 March 2011 14:18:24, Anakim Border wrote: Dear list, I have the following (simplified) piece of code: find :: Int - [Int] find i = runST . (`runContT` return) $ callCC $ \escape - do return [] which used to compile correctly under GHC 6.12.3. Now that I've

Re: [Haskell-cafe] ContT and ST stack

2011-03-10 Thread Bas van Dijk
On 10 March 2011 14:47, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: If memory serves correctly, it's impredicative polymorphism. Indeed. For example the following also doesn't type check in GHC-7: foo :: (forall s. ST s a) - a foo st = ($) runST st Surprisingly the following does:

Re: [Haskell-cafe] ContT and ST stack

2011-03-10 Thread Daniel Fischer
On Thursday 10 March 2011 17:15:29, Bas van Dijk wrote: On 10 March 2011 14:47, Daniel Fischer daniel.is.fisc...@googlemail.com wrote: If memory serves correctly, it's impredicative polymorphism. Indeed. For example the following also doesn't type check in GHC-7: foo :: (forall s. ST s

Re: [Haskell-cafe] Why don't my OS threads terminate?

2011-03-10 Thread Simon Marlow
On 28/02/11 15:59, Bas van Dijk wrote: On 25 February 2011 19:10, Bas van Dijkv.dijk@gmail.com wrote: On 25 February 2011 18:27, sclvs.clo...@gmail.com wrote: Bas van Dijk-2 wrote: I believe the OS threads are created by my levmar library. This library uses bindings-levmar[4] which

Re: [Haskell-cafe] Parallel Haskell stories

2011-03-10 Thread John Lato
From: Simon Peyton-Jones simo...@microsoft.com Friends I'm giving a talk at a developer conference in London on Friday 18th, about parallel programming in Haskell. http://skillsmatter.com/event/scala/functionalpx-2011/ad-1382 I know that some of you have been using Haskell for

Re: [Haskell-cafe] ContT and ST stack

2011-03-10 Thread Yves Parès
Why has the operator (.) troubles with a type like (forall s. ST s a)? Why can't it match the type 'b' in (.) definition? 2011/3/10 Daniel Fischer daniel.is.fisc...@googlemail.com On Thursday 10 March 2011 14:18:24, Anakim Border wrote: Dear list, I have the following (simplified) piece

Re: [Haskell-cafe] ContT and ST stack

2011-03-10 Thread Bas van Dijk
On 10 March 2011 18:24, Yves Parès limestr...@gmail.com wrote: Why has the operator (.) troubles with a type like (forall s. ST s a)? Why can't it match the type 'b' in (.) definition? As explained by the email from SPJ that I linked to, instantiating a type variable (like 'b') with a

Re: [Haskell-cafe] Why don't my OS threads terminate?

2011-03-10 Thread Bas van Dijk
On 10 March 2011 18:11, Simon Marlow marlo...@gmail.com wrote: On 28/02/11 15:59, Bas van Dijk wrote: On 25 February 2011 19:10, Bas van Dijkv.dijk@gmail.com  wrote: On 25 February 2011 18:27, sclvs.clo...@gmail.com  wrote: Bas van Dijk-2 wrote: I believe the OS threads are created

Re: [Haskell-cafe] Learn You a Haskell for Great Good - a few doubts

2011-03-10 Thread Ben Moseley
On 7 Mar 2011, at 23:38, Alexander Solla wrote: _|_ /= (_|_,_|_) (undefined, undefined) (*** Exception: Prelude.undefined That is as close to Haskell-equality as you can get for a proto-value that does not have an Eq instance. As a consequence of referential transparency,

Re: [Haskell-cafe] possible bug for ghc 7 + xcode 4 on snow leopard?

2011-03-10 Thread steffen
Hi, I haven't installed XCode 4 yet, but the crt1.10.5.o is the c runtime file defining the symbol start which any program will be linked with being the programs real entry point. Disassembling crt1.10.5.o (for Leopard) and crt1.10.6.o (for Snow Leopard) reveals the very same code for the

Re: [Haskell-cafe] possible bug for ghc 7 + xcode 4 on snow leopard?

2011-03-10 Thread steffen
Questions: 1. How did you install ghc-7? Using a binary package? The one for leopard or snow leopard? 2. Which compiler flags did you use? Does it work with another backend? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

[Haskell-cafe] ANNOUNCE: Haskell Platform 2011.2 released!

2011-03-10 Thread Don Stewart
We're pleased to announce the 2011.2 release of the Haskell Platform: a single, standard Haskell distribution for everyone. Download the Haskell Platform 2011.2.0.0: http://haskell.org/platform/ The specification, along with installers (including Windows, Apple and Unix installers for a

Re: [Haskell-cafe] ANNOUNCE: cinvoke 0.1 released

2011-03-10 Thread Remi Turk
On Wed, Mar 09, 2011 at 05:50:12PM +0100, Gábor Lehel wrote: On Wed, Mar 9, 2011 at 5:26 PM, Remi Turk rt...@science.uva.nl wrote: Count on it having at least an order of magnitude more overhead. I did some simple test of calling the following three trivial functions (with constant

Re: [Haskell-cafe] Why don't my OS threads terminate?

2011-03-10 Thread Simon Marlow
On 10/03/11 18:20, Bas van Dijk wrote: On 10 March 2011 18:11, Simon Marlowmarlo...@gmail.com wrote: On 28/02/11 15:59, Bas van Dijk wrote: On 25 February 2011 19:10, Bas van Dijkv.dijk@gmail.comwrote: On 25 February 2011 18:27, sclvs.clo...@gmail.comwrote: Bas van Dijk-2

Re: [Haskell-cafe] possible bug for ghc 7 + xcode 4 on snow leopard?

2011-03-10 Thread Carter Schonwald
to answer the question of the other poster, ghc 7.0.2 packaged installer, 64 bit build Jurrien, I wound up doing something similar, namely just wholesale copying the 10.5 sdk into the sdks folder. i'm still curious why this problem even exists! 2011/3/10 Jurriën Stutterheim

Re: [Haskell-cafe] Parallel Haskell stories

2011-03-10 Thread John D. Ramsdell
On Wed, Mar 9, 2011 at 11:18 AM, Simon Peyton-Jones simo...@microsoft.com wrote:        could you contribute a little vignette or story        about using Haskell in a *parallel/concurrent* application        that I could use to illustrate my talk? The Cryptographic Protocol Shapes Analyzer

Re: [Haskell-cafe] Parallel Haskell stories

2011-03-10 Thread John D. Ramsdell
On Thu, Mar 10, 2011 at 6:04 PM, John D. Ramsdell ramsde...@gmail.com wrote: At the code level, all that is done is replace one map call with a parallelized version of map that I saw in one of your papers: #if defined HAVE_PAR parMap :: (a - b) - [a] - [b] parMap _ [] = [] Opps. Please

Re: [Haskell-cafe] Parallel Haskell stories

2011-03-10 Thread Jesper Louis Andersen
On Wed, Mar 9, 2011 at 17:18, Simon Peyton-Jones simo...@microsoft.com wrote:        could you contribute a little vignette or story        about using Haskell in a *parallel/concurrent* application        that I could use to illustrate my talk? Combinatorrent is a BitTorrent client written

[Haskell-cafe] hsc2hs not figuring out #include paths?

2011-03-10 Thread Edward Amsden
I'm trying to write some bindings using hsc2hs. At the top of my .hsc file, I have #include jack/types.h #include jack/jack.h When I compile a .c file with just these two lines in gcc, it works fine (the jack directory is in /usr/local/include). When I try to run hsc2hs, it complains that it

[Haskell-cafe] Help with how to concatenate with own datatypes

2011-03-10 Thread eldavido
Hi, I´m doing a project in haskell and I need to define an operator that concatenate some own defined data types, just like the operator ++ does for lists. I don´t see how to define the operator recursively since this adding function (:) doesn´t work on my own data types. This is my code: data

Re: [Haskell-cafe] Help with how to concatenate with own datatypes

2011-03-10 Thread Antoine Latter
On Thu, Mar 10, 2011 at 7:41 PM, eldavido eldavi...@hotmail.com wrote: Hi, I´m doing a project in haskell and I need to define an operator that concatenate some own defined data types, just like the operator ++ does for lists. I don´t see how to define the operator recursively since this