Re: [Haskell-cafe] Re: Stone age programming for space age hardware?

2010-06-09 Thread Matthias Guedemann
Perhaps it's just my lack of imagination that was driving my original question. I'm just having a hard time imagining how to write reasonably interesting algorithms that way. Very likely they have very specific functionality and hopefully a precise specification about what to do if the

[Haskell-cafe] Re: Rewriting a famous library and using the same name: pros and consf

2010-06-09 Thread Stephen Tetley
Hi John My feeling is that a beginner would be transferring almost all of the the knowledge they gained from Parsec 2.1 if they moved to Parsec 3.0. We're talking about famous libraries, so the library was previously valuable and useful before the discontinuous version change. In Parsec 3.0's

RE: [Haskell-cafe] HP/Cygwin and Curl

2010-06-09 Thread Chris Dornan
Thanks very much Claus and Malcolm. You have clarified the situation nicely: I was beginning to suspect my Cygwin setup and I bet that is where the problem lies. I won't have time to straighten my Cygwin environment this week, but when I do I will come back here and explain what went wrong (I

[Haskell-cafe] Monadic presentation of delimited continuations and dissection

2010-06-09 Thread Greg Meredith
Dear Haskellians, After reading through the Dybvig, Jones and Sabry paper on the monadic presentation of delimited continuations, it seems like one can come up with a direct representation of the control contexts and meta continuations framework as an instance of McBride's dissection mechanism.

Re: [Haskell-cafe] strange errors with unix-compat

2010-06-09 Thread Brandon S. Allbery KF8NH
On Jun 8, 2010, at 19:52 , Günther Schmidt wrote: 4 of 4] Compiling System.PosixCompat.Extensions ( dist/build/System/ PosixCompat/Extensions.hs, dist/build/System/PosixCompat/ Extensions.o ) cbits/HsUnixCompat.c: In function `unix_major': cbits/HsUnixCompat.c:4:0: warning: implicit

[Haskell-cafe] A Finally Tagless Pi Calculus

2010-06-09 Thread Edward Kmett
Keegan McAllister gave a very nice talk at Boston Haskell last night about First Class Concurrency. His slides are available online at http://t0rch.org/ His final few slides covered the Pi calculus: http://en.wikipedia.org/wiki/Pi_calculus I took a few minutes over lunch to dash out a finally

[Haskell-cafe] Re: Stone age programming for space age hardware?

2010-06-09 Thread Heinrich Apfelmus
Michael Schuerig wrote: Heinrich Apfelmus wrote: I have absolutely no experience with real time system, but if I were tasked to write with these coding standards, I would refuse and instead create a small DSL in Haskell that compiles to the requested subset of C. That suggestion is

Re: [Haskell-cafe] A Finally Tagless Pi Calculus

2010-06-09 Thread Dupont Corentin
Hello, I am making a little GATD: {-# LANGUAGE GADTs#-} data Obs a where Equal :: Obs a - Obs a - Obs Bool Plus :: (Num a) = Obs a - Obs a - Obs a (etc..) instance Show t = Show (Obs t) where show (Equal a b) = (show a) ++ Equal ++ (show b) show (Plus a b) = (show a) ++

Re: [Haskell-cafe] How to Show an Operation?

2010-06-09 Thread Martin Drautzburg
On Monday, 7. June 2010 23:28:08 Evan Laforge wrote: I just meant you could add instances: instance Functor (Named a) where fmap f named = named { val_of = f (val_of named) } instance Applicative (Named a) where ... likewise, but maybe not a great fit unless you have a no name for 'pure'

[Haskell-cafe] GATD and pattern matching

2010-06-09 Thread Dupont Corentin
Hello, I am making a little GATD: {-# LANGUAGE GADTs#-} data Obs a where Equal :: Obs a - Obs a - Obs Bool Plus :: (Num a) = Obs a - Obs a - Obs a (etc..) instance Show t = Show (Obs t) where show (Equal a b) = (show a) ++ Equal ++ (show b) show (Plus a b) = (show a) ++

Re: [Haskell-cafe] A Finally Tagless Pi Calculus

2010-06-09 Thread Dan Doel
On Wednesday 09 June 2010 2:32:29 pm Dupont Corentin wrote: I am making a little GATD: {-# LANGUAGE GADTs#-} data Obs a where Equal :: Obs a - Obs a - Obs Bool Plus :: (Num a) = Obs a - Obs a - Obs a (etc..) instance Show t = Show (Obs t) where show (Equal a

Re: [Haskell-cafe] GATD and pattern matching

2010-06-09 Thread Daniel Fischer
On Wednesday 09 June 2010 20:37:22, Dupont Corentin wrote: Hello, I am making a little GATD: {-# LANGUAGE GADTs#-} data Obs a where Equal :: Obs a - Obs a - Obs Bool Plus :: (Num a) = Obs a - Obs a - Obs a (etc..) instance Show t = Show (Obs t) where show (Equal a

Re: [Haskell-cafe] GATD and pattern matching

2010-06-09 Thread Dupont Corentin
Thanks for your response. How would you do it? I design this GATD for a game i'm making: data Obs a where Player :: Obs Integer Turn :: Obs Integer Official :: Obs Bool Equ :: Obs a - Obs a - Obs Bool --woops!! Plus :: (Num a) = Obs a - Obs a - Obs a

Re: [Haskell-cafe] Removing alternate items from a list

2010-06-09 Thread Markus Läll
So out of curiosity i took the definitions given in this thread, and tried to run timing-tests. Here's what I ran: ghc -prof -auto-all -o Test Test.h Test +RTS -p and then looked in the Test.prof file. All tests I ran from 3 to 10 times (depending on how sure I wanted to be), so the results

Re: [Haskell-cafe] Removing alternate items from a list

2010-06-09 Thread Markus Läll
Forgot the file -- here it is: module Main where import Data.Either (rights) import Data.Function (fix) test f = putStr $ show $ last $ f $ replicate 1000 (1 :: Int) main = test matchPattern4 -- 1. zipNums -- 2. matchPattern -- 3. zipBoolCycle -- 4. iterDrop -- 5. zipBoolCycle2 -- 6.

[Haskell-cafe] Strange discrepancy between Emacs interpreter and command-line on windows

2010-06-09 Thread Arnaud Bailly
Hello, I have a strange issue which sprang today out of nowhere. When I load a certain file using bytestring package in Ghci using emacs, I got the following error: Couldn't match expected type `Data.ByteString.Internal.ByteString' against inferred type

Re: [Haskell-cafe] Strange discrepancy between Emacs interpreter and command-line on windows

2010-06-09 Thread Don Stewart
arnaud.oqube: Hello, I have a strange issue which sprang today out of nowhere. When I load a certain file using bytestring package in Ghci using emacs, I got the following error: Couldn't match expected type `Data.ByteString.Internal.ByteString' against inferred type

Re: [Haskell-cafe] Removing alternate items from a list

2010-06-09 Thread Yitzchak Gale
Markus Läll wrote: So out of curiosity i took the definitions given in this thread, and tried to run timing-tests. Nice! Any comments? (besides -O2 ;-)  -- I remembered it too late and didn't want to restart... Oh, could you please run that again with -O2? My entry dearly depends on it :)

Re: [Haskell-cafe] How to Show an Operation?

2010-06-09 Thread Luke Palmer
On Wed, Jun 9, 2010 at 12:33 PM, Martin Drautzburg martin.drautzb...@web.de wrote: So far so good. However my Named things are all functions and I don't see I ever want to map over any of them. But what I'd like to do is use them like ordinary functions as in: f::Named (Int-Int) f x Is

Re: [Haskell-cafe] Strange discrepancy between Emacs interpreter and command-line on windows

2010-06-09 Thread Ivan Lazar Miljenovic
Don Stewart d...@galois.com writes: arnaud.oqube: Hello, I have a strange issue which sprang today out of nowhere. When I load a certain file using bytestring package in Ghci using emacs, I got the following error: Couldn't match expected type `Data.ByteString.Internal.ByteString'

Re: [Haskell-cafe] Problems with threading?

2010-06-09 Thread Isaac Gouy
--- On Mon, 6/7/10, Don Stewart d...@galois.com wrote: From: Don Stewart d...@galois.com Subject: Re: [Haskell-cafe] Problems with threading? To: Isaac Gouy igo...@yahoo.com Cc: Louis Wasserman wasserman.lo...@gmail.com, Haskell Café List haskell-cafe@haskell.org Date: Monday, June 7,

Re: [Haskell-cafe] Problems with threading?

2010-06-09 Thread Don Stewart
igouy2: Now how do we get those regex-dna and binary-trees programs to compile? http://shootout.alioth.debian.org/u32/measurements.php?lang=ghc binary-trees: Could not find module `Control.Parallel.Strategies': -- cabal install parallel regex-dna: cannot satisfy

Re: [Haskell-cafe] Removing alternate items from a list

2010-06-09 Thread John Meacham
On Wed, Jun 09, 2010 at 11:47:32PM +0300, Markus Läll wrote: As the function doing (x:_:rest) pattern-matching was the fastest I extended the idea from that to (x1:_:x2: ... x10:_:rest), but skipping from 5 to 10, where all steps showed a small increase in performance. So a question: when

[Haskell-cafe] Re: GATD and pattern matching

2010-06-09 Thread Maciej Piechotka
On Wed, 2010-06-09 at 22:28 +0200, Dupont Corentin wrote: Thanks for your response. How would you do it? I design this GATD for a game i'm making: data Obs a where Player :: Obs Integer Turn :: Obs Integer Official :: Obs Bool Equ :: Obs a - Obs a - Obs Bool

Re: [Haskell-cafe] Re: Rewriting a famous library and using the same name: pros and cons

2010-06-09 Thread sterl
There's a big range of issues here, and to be honest I'm not sure if our ability to distinguished between them is helped by the title of this thread, which somewhat begs the question. That is to say, it isn't clear to me that calling the proposed changes to the fgl rewriting a library is

Re: [Haskell-cafe] Re: Rewriting a famous library and using the same name: pros and cons

2010-06-09 Thread Ivan Miljenovic
On 10 June 2010 12:38, sterl s.clo...@gmail.com wrote: There's a big range of issues here, and to be honest I'm not sure if our ability to distinguished between them is helped by the title of this thread, which somewhat begs the question. That is to say, it isn't clear to me that calling the

[Haskell-cafe] Contacting Planet Haskell

2010-06-09 Thread Jason Dagit
Hello, I recently tried to send an email to the planet Haskell admins. The webpage says to use pla...@community.haskell.org. The mail was undelivered after several days and the daemon gave up trying to deliver it. My sending did overlap with the haskell.org downtown but I don't think that

Re: [Haskell-cafe] Strange discrepancy between Emacs interpreter and command-line on windows

2010-06-09 Thread Arnaud Bailly
Yes, I have two versions installed , 0.9.1.4 and 0.9.1.6. Here is the output of ghc-pkg -l: d:/Program Files/Haskell Platform/2009.2.0.2\package.conf: Cabal-1.6.0.3, GLUT-2.1.1.2, HSlim-0.1, HTTP-4000.0.6, HUnit-1.2.0.3, OpenGL-2.2.1.1, QuickCheck-1.2.0.0, QuickCheck-2.1.0.3,

Re: [Haskell-cafe] Strange discrepancy between Emacs interpreter and command-line on windows

2010-06-09 Thread Arnaud Bailly
I did: ghc-pkg unregister bytestring-0.9.1.6 then restarted emacs and it works now. Don't now if ther weill be side-effects on other packages... Thanks for the tip. arnaud On Thu, Jun 10, 2010 at 6:15 AM, Arnaud Bailly arnaud.oq...@gmail.com wrote: Yes, I have two versions installed ,

Re: [Haskell-cafe] Strange discrepancy between Emacs interpreter and command-line on windows

2010-06-09 Thread Ivan Miljenovic
On 10 June 2010 14:28, Arnaud Bailly arnaud.oq...@gmail.com wrote: I did: ghc-pkg unregister bytestring-0.9.1.6 then restarted emacs and it works now. Don't now if ther weill be side-effects on other packages... ghc-pkg check will tell if you if there are any breakages. -- Ivan Lazar