Re: [Haskell-cafe] Model-driven development (was: Haskell participting in big science like CERN Hadrian...)

2008-10-06 Thread Martin DeMello
2008/10/4 Jason Dagit <[EMAIL PROTECTED]>: > 3) Write a python generating EDSL in Haskell > strong arguements against it. The main problem with #3, is that if I share > code with other devs they have to learn Haskell and my EDSL since they won't > be able to just hack the generated python, simila

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread wman
as usual, i forgot to use the magical "reply to all" and under the impression I'm still talking to the list had bothered dons personally (heresy/sacrilege/deathwish , i know) to rectify it a bit at least, i'm posting a summary, in hopes someone find it useful. -- this d

Re: [Haskell-cafe] I'll do USB in Haskell - tips?

2008-10-06 Thread Krzysztof Skrzętnicki
On Tue, Oct 7, 2008 at 01:55, Mauricio <[EMAIL PROTECTED]> wrote: > Hi, > > I'll need to use a lot of USB at work and, after > looking around, it seems there's no general USB > code done. 'libusb' and 'openusb' do not seem > ready enough so that wrapping them would be easier > than writing from scr

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread Don Stewart
666wman: >ghc -Onot -fstrictness --make Main1.hs && ghc -Onot -fstrictness --make >Main2.hs && ghc -Onot -fstrictness --make Main3.hs > >time Main1 < nums >real0m39.530s >user0m0.015s >sys 0m0.030s > >time Main2 < nums >real0m14.078s >user0m

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread wman
ghc -Onot -fstrictness --make Main1.hs && ghc -Onot -fstrictness --make Main2.hs && ghc -Onot -fstrictness --make Main3.hs time Main1 < nums real0m39.530s user0m0.015s sys 0m0.030s time Main2 < nums real0m14.078s user0m0.015s sys 0m0.015s time Main3.exe < nums real0m

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread Don Stewart
666wman: >just for the kicks i tried the new version of bytestring without -O2 and >the results were even worse: Note that without -O or -O2 no strictness analysis is performed. So that tail recursive loop ... won't be. You could try -Onot -fstrictness just for kicks, to see why strictness

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread John Van Enk
I've settled on scurry. Those of you interested in seeing the cabalized "Works For Me Alpha" version can check out the Google Code page below. http://code.google.com/p/scurry/ Again, suggestions/comments/hatemail are encouraged. /jve On Mon, Oct 6, 2008 at 10:22 PM, Gwern Branwen <[EMAIL PROTEC

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread Mike Coleman
On Mon, Oct 6, 2008 at 10:19 PM, Don Stewart <[EMAIL PROTECTED]> wrote: > To compile, try something like: > >ghc -O2 --make A.hs That did the trick--thanks. For input large enough to be a good test, this is I/O-bound on my laptop (the speed of the compiled and interpreted versions are almost

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread Brandon S. Allbery KF8NH
On 2008 Oct 6, at 23:54, wman wrote: just for the kicks i tried the new version of bytestring without -O2 and the results were even worse: Yep, ByteString does a lot of stuff that is really bad when GHC isn't performing stream fusion --- but when it is, the code compiles down to tight mach

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread wman
just for the kicks i tried the new version of bytestring without -O2 and the results were even worse: time Main1 < nums real0m40.092s user0m0.015s sys 0m0.015s time Main3 < nums real0m41.405s user0m0.015s sys 0m0.015s it got pwned even by this very naive ruby scipt (which

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread wman
new figures, after updating bytestring (0.9.0.1.1 -> 0.9.1.2) && using -O2 time Main < nums real0m2.531s user0m0.015s sys 0m0.015s time Main2 < nums real0m13.999s user0m0.015s sys 0m0.015s time Main3 < nums real0m2.796s user0m0.015s sys 0m0.015s thats more li

Re: [Haskell-cafe] After upgrade bytestring to 0.9.1.3, my program cannot run.

2008-10-06 Thread Don Stewart
magicloud.magiclouds: > Just a simple text process program. When I runhaskell it. I got: > > GHCi runtime linker: fatal error: I found a duplicate definition for symbol > fps_minimum > whilst processing object file > ~/.cabal/lib/bytestring-0.9.1.3/ghc-6.8.3/HSbytestring-0.9.1.3.o > This could

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread Don Stewart
tutufan: > Thanks for your replies. Hoogle is pretty cool--I didn't know about that. > > I ended up with this, which is pretty close to the original (it will > also bomb if given non-integer input): > > import qualified Data.ByteString.Lazy.Char8 as L > import qualified Data.Maybe as M > > main

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread Don Stewart
Hmm. How are you compiling it? Using bytestring 0.9.1.x ? Should be fast, http://shootout.alioth.debian.org/gp4/benchmark.php?test=sumcol&lang=all Assuming you're turning on optimisations ( ghc -O2 ) -- Don 666wman: >the problem is that using readInt is actually _as slow_, at least usi

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread wman
the problem is that using readInt is actually _as slow_, at least using my test script :-(( On Tue, Oct 7, 2008 at 5:12 AM, Don Stewart <[EMAIL PROTECTED]> wrote: > 666wman: > >a slight modification to compile it : > > > >change: > >where sumFile = sum . map read . L.words > >to :

[Haskell-cafe] After upgrade bytestring to 0.9.1.3, my program cannot run.

2008-10-06 Thread Magicloud
Just a simple text process program. When I runhaskell it. I got: GHCi runtime linker: fatal error: I found a duplicate definition for symbol fps_minimum whilst processing object file ~/.cabal/lib/bytestring-0.9.1.3/ghc-6.8.3/HSbytestring-0.9.1.3.o This could be caused by: * Loading two diff

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread Mike Coleman
Thanks for your replies. Hoogle is pretty cool--I didn't know about that. I ended up with this, which is pretty close to the original (it will also bomb if given non-integer input): import qualified Data.ByteString.Lazy.Char8 as L import qualified Data.Maybe as M main = do contents <-

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread Don Stewart
666wman: >a slight modification to compile it : > >change: >where sumFile = sum . map read . L.words >to : >where sumFile = sum . map (read . L.unpack) . L.words > >but it's actually _slower_ than the non-bytestring version. Never unpack a bytestring. import qualifie

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread wman
a slight modification to compile it : change: where sumFile = sum . map read . L.words to : where sumFile = sum . map (read . L.unpack) . L.words but it's actually _slower_ than the non-bytestring version. i did a little test, three versions of the same script and manufactured meself a ~50 MB f

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread Gwern Branwen
On 2008.10.06 21:19:17 -0400, John Van Enk <[EMAIL PROTECTED]> scribbled 4.3K characters: >Hmm... > >I like Securry, but I'm going to go ahead and shorten it to Scurry. >I also like HaPN a lot. > >Any suggestions why either of these would be better than the other? > Perhaps a thir

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread Daniel Fischer
Am Dienstag, 7. Oktober 2008 04:21 schrieb Jason Dagit: > On Mon, Oct 6, 2008 at 7:06 PM, Mike Coleman <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I could use a little help. I was looking through the Real World > > Haskell book and came across a trivial program for summing numbers in > > a file. T

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread Don Stewart
dagit: >As the top search result. > >This means that you can convert any list of maybes into a list of what you >want. It just tosses out the Nothings. > > 2. Why doesn't ByteString implement 'read'? Is it just that this > function (like 'input' in Python) isn't really ve

Re: [Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread Jason Dagit
On Mon, Oct 6, 2008 at 7:06 PM, Mike Coleman <[EMAIL PROTECTED]> wrote: > Hi, > > I could use a little help. I was looking through the Real World > Haskell book and came across a trivial program for summing numbers in > a file. They mentioned that that implementation was very slow, as > it's bas

[Haskell-cafe] newbie questions (read, etc., with Data.ByteString.Lazy.Char8)

2008-10-06 Thread Mike Coleman
Hi, I could use a little help. I was looking through the Real World Haskell book and came across a trivial program for summing numbers in a file. They mentioned that that implementation was very slow, as it's based on String's, so I thought I'd try my hand at converting it to use lazy ByteString

Re: [Haskell-cafe] Darcs / Git

2008-10-06 Thread wman
the mingw git worked flawlessly for me (and will be certainly a lot less of hassle, if one tries to remain cygwin-free). their version of git-gui also works (i didn't test it extensively). http://code.google.com/p/msysgit/ featuring an installer as well ;-) as for darcs, look here: http://wiki.

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread John Van Enk
Hmm... I like Securry, but I'm going to go ahead and shorten it to Scurry. I also like HaPN a lot. Any suggestions why either of these would be better than the other? Perhaps a third party candidate would be more appropriate? So... 1. Scurry 2. HaPN 3. ??? (bah, sorry Brandon, reply all, reply

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread Brandon S. Allbery KF8NH
On 2008 Oct 6, at 20:56, [EMAIL PROTECTED] wrote: Quoting John Van Enk <[EMAIL PROTECTED]>: I'm working on a Haskell based VPN. I can't think of any good names, so I'm crowd sourcing it. (elided abuse of Old Possum) I'd be tempted to pick a word starting with "lan" and put a "v" in front

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread ajb
G'day all. Quoting John Van Enk <[EMAIL PROTECTED]>: I'm working on a Haskell based VPN. I can't think of any good names, so I'm crowd sourcing it. The naming of code is a difficult matter, It isn't just one of your LAN party games; You may think at first I'm as mad as a hatter

Re: [Haskell-cafe] a really juvenile question .. hehehehe ;^)

2008-10-06 Thread Cale Gibbard
2008/10/6 Arnar Birgisson <[EMAIL PROTECTED]>: > Ah, that's pretty neat and subtle. Now, say I have a type created with > data that has only one constructor. Couldn't the compiler optimize > away this unneccessary evaluation during pattern matching? I.e. it > would make what you just wrote implicit

Re: [Haskell-cafe] Darcs / Git

2008-10-06 Thread Marc Weber
On Mon, Oct 06, 2008 at 08:11:21PM +0100, Dominic Steinitz wrote: > Not really a Haskell question but I'm not sure where else to go. > > What's the preferred method of converting a darcs repository to git? And > is there a way of converting from git to darcs? > > The reason I ask is that my colle

[Haskell-cafe] I'll do USB in Haskell - tips?

2008-10-06 Thread Mauricio
Hi, I'll need to use a lot of USB at work and, after looking around, it seems there's no general USB code done. 'libusb' and 'openusb' do not seem ready enough so that wrapping them would be easier than writing from scratch. (If you think I am wrong until here and have time to write me your opini

Re: [Haskell-cafe] Monad transformers [Stacking monads]

2008-10-06 Thread Reid Barton
Hi Andrew, On Mon, Oct 06, 2008 at 09:48:51PM +0100, Andrew Coppin wrote: > data ResultSet x = Pack {unpack :: [[x]]} deriving (Eq) Your ResultSet monad is roughly equivalent to newtype Nat = Nat Int instance Monoid Nat where mempty = Nat 0 (Nat x) `mappend` (Nat y) = Nat (x+y) type ResultSe

Re: [Haskell-cafe] Monad transformers [Stacking monads]

2008-10-06 Thread Anton van Straaten
Andrew Coppin wrote: If so, I guess that means I have to somehow construct ResultSetT. Is there an easy way to do that, given that I already have ResultSet? I haven't been following this thread closely, so forgive if this was already discussed, but my understanding is that the answer is no, i

Re: [Haskell-cafe] Inferred type is less polymorphic than expected, depends on order

2008-10-06 Thread Jason Dagit
On Mon, Oct 6, 2008 at 2:27 PM, Jason Dagit <[EMAIL PROTECTED]> wrote: > > For what it's worth, in my real program where this came up, sy was created > by a recursive call like this: > I guess it should have been more like this: blah :: Sealed (p x) foo :: Sealed (q b) foo = do p <- blah q <

Re: [Haskell-cafe] Inferred type is less polymorphic than expected, depends on order

2008-10-06 Thread Jason Dagit
On Mon, Oct 6, 2008 at 1:56 PM, Ryan Ingram <[EMAIL PROTECTED]> wrote: > 2008/10/6 Jason Dagit <[EMAIL PROTECTED]>: > > \begin{code} > > badOrder :: (Sealed (p x)) -> (forall b. (Sealed (q b))) -> (Sealed (q > x)) > > badOrder sx sy = case sy of > > Sealed y -> case sx of > >

Re: [Haskell-cafe] Linux binary dist problems

2008-10-06 Thread Colin Fleming
Hi Marc, Great, thanks for the pointer. I'll take a look at nix, that might be an option. Thanks for the offer of server space too, but I'd really like to get it going on my own space since I have domains and whatnot pointed there. I also realise that the IDE support isn't there - it's even worse

Re: [Haskell-cafe] Inferred type is less polymorphic than expected, depends on order

2008-10-06 Thread Ryan Ingram
2008/10/6 Jason Dagit <[EMAIL PROTECTED]>: > \begin{code} > badOrder :: (Sealed (p x)) -> (forall b. (Sealed (q b))) -> (Sealed (q x)) > badOrder sx sy = case sy of > Sealed y -> case sx of > Sealed x -> Sealed (f x y) > \end{code} > > \begin{code} > go

Re: [Haskell-cafe] Monad transformers [Stacking monads]

2008-10-06 Thread Andrew Coppin
Andrew Coppin wrote: I have some longwinded code that works, but I'm still thinking about how to do this more elegantly. It looks like what I really need is something like type M = StateT State (ResultSetT (ErrorT ErrorType Identity)) Is that the correct ordering? If so, I guess that means

[Haskell-cafe] Re: I want my free (and good looking) parser!

2008-10-06 Thread Slavomir Kaslev
On Mon, Oct 6, 2008 at 9:36 PM, Christian Maeder <[EMAIL PROTECTED]> wrote: > import Text.ParserCombinators.Parsec > > freeParser :: (Enum a, Bounded a, Show a) => Parser a > freeParser = choice $ map (\ a -> try $ do >string $ show a >notFollowedBy (alphaNum <|> char '_') >return a) [m

Re: [Haskell-cafe] Linux binary dist problems

2008-10-06 Thread Marc Weber
Hi Colin, I only know about one other option: Try user mode linux / qemu / anotehr virtualziing software and setup the environment within that which you need... :-( Another thing you could try is installing nix (nixos.org) (software distirbution system).. It bootstraps current ghc via ghc-6.4.2 fr

Re: [Haskell-cafe] Hoogle? [Stacking monads]

2008-10-06 Thread Andrew Coppin
Mitchell, Neil wrote: Hi Try doing a Hoogle search for "c1 (c2 x) -> c2 (c1 x)". Hoogle correctly states that Data.Traversable.sequence will do it for you. Now try doing "c1 k (c2 x) -> c2 (c1 k x)". The 'sequence' function will also do this, but now Hoogle returns 0 results. This is p

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread Bulat Ziganshin
Hello John, Monday, October 6, 2008, 10:29:09 PM, you wrote: > I'm working on a Haskell based VPN. I can't think of any good names, so I'm > crowd sourcing it. octopus? (it was a good serial about italian mafia spreading its palpi all over the country :) -- Best regards, Bulat

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

2008-10-06 Thread Christopher Lane Hinson
I had this problem: [EMAIL PROTECTED]:~/src/roguestar/rsagl (master)$ SourceGraph rsagl.cabal dot: width (40671 >= 32768) is too large. dot: width (43275 >= 32768) is too large. dot: width (43720 >= 32768) is too large. dot: width (40525 >= 32768) is too large. Unable to generate report [EMAIL P

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread wman
As far as insults go, one simply cannot go wrong with THE Shakespearean insult kit ;-)) http://www.pangloss.com/seidel/shake_rule.html 2008/10/6 John Van Enk <[EMAIL PROTECTED]> > > On Mon, Oct 6, 2008 at 2:52 PM, Don Stewart <[EMAIL PROTECTED]> wrote: > >> >> Is the code around somewhere? This

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread John Van Enk
This is quite tempting, since my screen saver is a directory full of lambdacats On Mon, Oct 6, 2008 at 3:39 PM, Anton van Straaten <[EMAIL PROTECTED]>wrote: > Jason Dagit wrote: > >> >> >> 2008/10/6 John Van Enk <[EMAIL PROTECTED] > >> > ... > >>The best I can do

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread John Van Enk
Ah, one more thing. It's not secure or distributed or any of the other things I said yet. It's going to be. :) The version I just posted is able to have two clients talk to each other (notice that neither of them is a server). I'll get the encryption and other details hammered in later. :) On Mon

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread Anton van Straaten
Jason Dagit wrote: 2008/10/6 John Van Enk <[EMAIL PROTECTED] > ... The best I can do is HaskVPN. This name is so bad I'm afraid to admit it. A better suggestion would be much appreciated. My advice so to find something cute, like an animal, and use that in

Re: [Haskell-cafe] Darcs / Git

2008-10-06 Thread Jason Dagit
On Mon, Oct 6, 2008 at 12:11 PM, Dominic Steinitz < [EMAIL PROTECTED]> wrote: > Not really a Haskell question but I'm not sure where else to go. The best place to ask would be the darcs-users mailing list: http://lists.osuosl.org/mailman/listinfo/darcs-users What's the preferred method of conve

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread John Van Enk
On Mon, Oct 6, 2008 at 2:52 PM, Don Stewart <[EMAIL PROTECTED]> wrote: > > Is the code around somewhere? This sounds intriguing. > > -- Don > Yes! Though this is the "Works For Me (alpha release)" version. Keep in mind: * It's not cabalized yet, so... we use my quick-and-dirty build scripts to b

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread wman
And to be really original, try to sell some weird adjective with it. The ubuntu crowd didn't buy this, so maybe you could make it Horny Hornet VPN ;-) 2008/10/6 Jason Dagit <[EMAIL PROTECTED]> > > My advice so to find something cute, like an animal, and use that in the > name instead of some impl

[Haskell-cafe] Darcs / Git

2008-10-06 Thread Dominic Steinitz
Not really a Haskell question but I'm not sure where else to go. What's the preferred method of converting a darcs repository to git? And is there a way of converting from git to darcs? The reason I ask is that my colleague cannot get darcs to work on his Windows box. Thanks, Dominic. _

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread Corey O'Connor
2008/10/6 wman <[EMAIL PROTECTED]>: > How about HaPN (pronounced as happen), obviously standing for Haskell > Private Network. Whether it's better is a matter of taste ;-) +1 for HaPN Quite catchy IMO. :-) -- -Corey O'Connor ___ Haskell-Cafe mailing li

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread Jason Dagit
2008/10/6 John Van Enk <[EMAIL PROTECTED]> > Hello All, > > I'm working on a Haskell based VPN. I can't think of any good names, so I'm > crowd sourcing it. > > A few details that may help in naming it: > 1. It's distributed (doesn't need a "master" or "server"). > 2. It's secure (duh) > 3. It use

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread wman
> >The best I can do is HaskVPN. This name is so bad I'm afraid to admit > it. > >A better suggestion would be much appreciated. > How about HaPN (pronounced as happen), obviously standing for Haskell Private Network. Whether it's better is a matter of taste ;-) > > Is the code around so

Re: [Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread Don Stewart
vanenkj: >Hello All, > >I'm working on a Haskell based VPN. I can't think of any good names, so >I'm crowd sourcing it. > >A few details that may help in naming it: >1. It's distributed (doesn't need a "master" or "server"). >2. It's secure (duh) >3. It uses TUN/TAP >

[Haskell-cafe] Name for Haskell based VPN Client/Server

2008-10-06 Thread John Van Enk
Hello All, I'm working on a Haskell based VPN. I can't think of any good names, so I'm crowd sourcing it. A few details that may help in naming it: 1. It's distributed (doesn't need a "master" or "server"). 2. It's secure (duh) 3. It uses TUN/TAP 4. It's written (mostly) in Haskell! The best I c

[Haskell-cafe] Inferred type is less polymorphic than expected, depends on order

2008-10-06 Thread Jason Dagit
Originally I sent this to glasgow-haskell where I was hoping someone by the name of Simon would comment on the error message. No one commented at all, so I'm resending to haskell-cafe. Thanks! I was wondering if someone could help me understand why reordering the case statements changes the type

Re: [Haskell-cafe] MPFR / FFI - Nefarious (Simple?) bug

2008-10-06 Thread Jared Updike
> If you substitute your mpfr_set_signed_int for the one below, the noworks > should become works. Yes, this works perfectly. Thank you for saving my project! (Had I known about HMPFR when I started this project, I would have just used that instead of rolling my own, but it looks like HMPFR was u

Re: [Haskell-cafe] a really juvenile question .. hehehehe ;^)

2008-10-06 Thread Arnar Birgisson
On Mon, Oct 6, 2008 at 18:48, Ryan Ingram <[EMAIL PROTECTED]> wrote: > Also, you can get the same behavior out of "ta" if you write it like this: > > ta ~(A x) = True > > The translation looks something like this: > > f ~(A x) = e > => > f a = e > where x = case a of (A v) -> v -- a,v fresh vari

Re: [Haskell-cafe] Re: I want my free (and good looking) parser!

2008-10-06 Thread Jeremy Shaw
At Mon, 6 Oct 2008 20:20:57 +0300, Slavomir Kaslev wrote: > > On Mon, Oct 6, 2008 at 8:07 PM, Christian Maeder > <[EMAIL PROTECTED]> wrote: > > Slavomir Kaslev wrote: > >>> freeParser = freeParser' minBound > >>> where enumAll' :: (Bounded a, Enum a) => a -> [a] > >>> enumAll' _ = en

[Haskell-cafe] Re: I want my free (and good looking) parser!

2008-10-06 Thread Slavomir Kaslev
On Mon, Oct 6, 2008 at 8:07 PM, Christian Maeder <[EMAIL PROTECTED]> wrote: > Slavomir Kaslev wrote: >>> freeParser = freeParser' minBound >>> where enumAll' :: (Bounded a, Enum a) => a -> [a] >>> enumAll' _ = enumAll >>> freeParser' :: (Enum a, Bounded a, Show a, Read a) =>

[Haskell-cafe] Re: I want my free (and good looking) parser!

2008-10-06 Thread Christian Maeder
Slavomir Kaslev wrote: >> freeParser = freeParser' minBound >> where enumAll' :: (Bounded a, Enum a) => a -> [a] >> enumAll' _ = enumAll >> freeParser' :: (Enum a, Bounded a, Show a, Read a) => a -> Parser a >> freeParser' x = liftM read $ choice (map (string . sho

Re: [Haskell-cafe] a really juvenile question .. hehehehe ;^)

2008-10-06 Thread Ryan Ingram
On Mon, Oct 6, 2008 at 3:30 PM, Arnar Birgisson <[EMAIL PROTECTED]> wrote: >> "undefined" is evaluated to see if it matches the >> constructor "A". But we don't even get to check, because undefined >> throws an exception during its evaluation. >> >> In the "tb" case, (B x) always matches because B

Re: [Haskell-cafe] MPFR / FFI - Nefarious (Simple?) bug

2008-10-06 Thread Aleš Bizjak
In order to create an arbitrary precision floating point / drop in replacement for Double, I'm trying to wrap MPFR (http://www.mpfr.org/) using the FFI but despite all my efforts the simplest bit of code doesn't work. It compiles, it runs, but it crashes mockingly after pretending to work for a wh

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

2008-10-06 Thread Iavor Diatchki
Hi all, (this message is an ad:-) For people interested in visualizing dependencies between the modules in their project: on Hackage there is another simple tool called "graphmod" that can generate a dot graph from your Haskell source code. -Iavor 2008/10/6 Magnus Therning <[EMAIL PROTECTED]>: > O

[Haskell-cafe] I want my free (and good looking) parser!

2008-10-06 Thread Slavomir Kaslev
I am writing a Parsec parser for a C-like language and I have several datas that look more or less like this one: > import Control.Monad( liftM ) > import Text.ParserCombinators.Parsec > data FooBar = Foo | Bar > deriving (Show,Read,Bounded,Enum) Looking at these, it seems that there

Re: [Haskell-cafe] MPFR / FFI - Nefarious (Simple?) bug

2008-10-06 Thread Henning Thielemann
On Sun, 5 Oct 2008, Jared Updike wrote: In order to create an arbitrary precision floating point / drop in replacement for Double, I'm trying to wrap MPFR (http://www.mpfr.org/) using the FFI but despite all my efforts the simplest bit of code doesn't work. Don't forget to add it to http:/

[Haskell-cafe] editing a Alex and Happy file

2008-10-06 Thread Manlio Perillo
Hi. There is support for editing an Alex or Happy file? I have seen some files that make use of tabs for layout (even Alex template files, and examples from both Alex and Happy), however tabs seems to be not recommended in Haskell. Thanks Manlio Perillo __

Re: [Haskell-cafe] a really juvenile question .. hehehehe ;^)

2008-10-06 Thread Arnar Birgisson
Hi, On Mon, Oct 6, 2008 at 16:10, Ryan Ingram <[EMAIL PROTECTED]> wrote: > On Mon, Oct 6, 2008 at 2:19 PM, Arnar Birgisson <[EMAIL PROTECTED]> wrote: >> And this requirement is there why? Is it specifically put in so that >> one is able to create this overhead-less implementation? >> >> Given: >>

Re: [Haskell-cafe] a really juvenile question .. hehehehe ;^)

2008-10-06 Thread Ryan Ingram
On Mon, Oct 6, 2008 at 2:19 PM, Arnar Birgisson <[EMAIL PROTECTED]> wrote: > And this requirement is there why? Is it specifically put in so that > one is able to create this overhead-less implementation? > > Given: > > data A = A Int > newtype B = B Int > > ta (A x) = True > tb (B x) = True > > Th

Re: [Haskell-cafe] a really juvenile question .. hehehehe ;^)

2008-10-06 Thread Josef Svenningsson
On Mon, Oct 6, 2008 at 2:58 PM, Cale Gibbard <[EMAIL PROTECTED]> wrote: > 2008/10/6 Don Stewart <[EMAIL PROTECTED]>: >> dagit: >>>data and newtype vary in one more subtle way, and that's how/when they >>>evaluate to bottom. Most of the time they behave identically, but in the >>>right

Re: [Haskell-cafe] a really juvenile question .. hehehehe ;^)

2008-10-06 Thread Arnar Birgisson
On Mon, Oct 6, 2008 at 14:58, Cale Gibbard <[EMAIL PROTECTED]> wrote: > 2008/10/6 Don Stewart <[EMAIL PROTECTED]>: >> dagit: >>>data and newtype vary in one more subtle way, and that's how/when they >>>evaluate to bottom. Most of the time they behave identically, but in the >>>right ca

Re: [Haskell-cafe] a really juvenile question .. hehehehe ;^)

2008-10-06 Thread Cale Gibbard
2008/10/6 Don Stewart <[EMAIL PROTECTED]>: > dagit: >>data and newtype vary in one more subtle way, and that's how/when they >>evaluate to bottom. Most of the time they behave identically, but in the >>right cases they act sightly differently. newtype is usually regarded as >>more

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

2008-10-06 Thread Magnus Therning
On Mon, Oct 6, 2008 at 1:19 PM, Niklas Broberg <[EMAIL PROTECTED]> wrote: >> * the dependency on haskell-src-exts says any version should do, but >> the one shipped in Debian Sid >> (http://packages.debian.org/sid/libghc6-src-exts-dev) doesn't do, so >> some extra versioning info seems to be re

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

2008-10-06 Thread Ivan Miljenovic
2008/10/6 Niklas Broberg <[EMAIL PROTECTED]>: >> * the dependency on haskell-src-exts says any version should do, but >> the one shipped in Debian Sid >> (http://packages.debian.org/sid/libghc6-src-exts-dev) doesn't do, so >> some extra versioning info seems to be required > > Ouch, that one's

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

2008-10-06 Thread Niklas Broberg
> * the dependency on haskell-src-exts says any version should do, but > the one shipped in Debian Sid > (http://packages.debian.org/sid/libghc6-src-exts-dev) doesn't do, so > some extra versioning info seems to be required Ouch, that one's pretty old. Don't the wheels of debian packaging spin

Re: [Haskell-cafe] Help me prove macid can scale! (Macid stress tests results for happs-tutorial toy job board disappointing so far.)

2008-10-06 Thread Thomas Hartman
There's a thread at happs group about this with good answers http://groups.google.com/group/HAppS/browse_thread/thread/1031809dca26f349 My top post should probably have been a cc, apologies. Looks pretty likely that the issues are solvable. Grokking the answers now. thomas. 2008/10/6 Duncan C

Re: [Haskell-cafe] Re: Hmm, what license to use?

2008-10-06 Thread david48
There's an article on slashdot about a developper that has a dilemna with his BSD-licenced work, I thought that might be relevant to this thread : http://ask.slashdot.org/article.pl?sid=08/10/05/1317252 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.

[Haskell-cafe] Re: MPFR / FFI - Nefarious (Simple?) bug

2008-10-06 Thread Michal Konecny
Jared Updike wrote on 6 Oct 02:25: > In order to create an arbitrary precision floating point / drop in > replacement for Double, I'm trying to wrap MPFR > (http://www.mpfr.org/) Have you looked at: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hmpfr Michal -- |o| Michal Konecny |o

Re: [Haskell-cafe] Linux binary dist problems

2008-10-06 Thread Colin Fleming
Hi Chris, Unfortunately that's not easy for me, I don't know exactly what the config of the server is, and I use OSX at home. I could probably rig something up using VMWare but that's a lot of work just to install the compiler. Another option might be to create an unregisterised build, as detailed

Re: [Haskell-cafe] Simplifying a IsFunction type class using type equality constraints

2008-10-06 Thread Ryan Ingram
On Sat, Oct 4, 2008 at 2:58 AM, Corey O'Connor <[EMAIL PROTECTED]> wrote: > I recently had a need to use the IsFunction typeclass described by Oleg here: > http://okmij.org/ftp/Haskell/isFunction.lhs > > and am wondering if the use of the TypeCast class can be correctly > replaced by a type equalit

Re: [Haskell-cafe] Re: [Haskell] ANNOUNCE: SourceGraph-0.1 and Graphalyze-0.3

2008-10-06 Thread Magnus Therning
Ivan, I tried building your tool today and found a few packaging related things: * the dependency on haskell-src-exts says any version should do, but the one shipped in Debian Sid (http://packages.debian.org/sid/libghc6-src-exts-dev) doesn't do, so some extra versioning info seems to be required

RE: [Haskell-cafe] Hoogle? [Stacking monads]

2008-10-06 Thread Mitchell, Neil
Hi > Try doing a Hoogle search for "c1 (c2 x) -> c2 (c1 x)". > Hoogle correctly states that Data.Traversable.sequence will > do it for you. > > Now try doing "c1 k (c2 x) -> c2 (c1 k x)". The 'sequence' > function will also do this, but now Hoogle returns 0 results. > > This is puzzling, sinc

Re: [Haskell-cafe] a really juvenile question .. hehehehe ;^)

2008-10-06 Thread Don Stewart
dagit: >data and newtype vary in one more subtle way, and that's how/when they >evaluate to bottom. Most of the time they behave identically, but in the >right cases they act sightly differently. newtype is usually regarded as >more efficient than data. This is because the compil

Re: [Haskell-cafe] a really juvenile question .. hehehehe ;^)

2008-10-06 Thread Jason Dagit
2008/10/5 Galchin, Vasili <[EMAIL PROTECTED]> > ok ... by using "newtype", we are constricting/constraining to a subset of > CInt .. e.g. something like a "subtype" of CInt?? (where by "subtype", I > mean like the notion of subtype in languages like Ada). For our audience, > can you perhaps distin

Re: [Haskell-cafe] a really juvenile question .. hehehehe ;^)

2008-10-06 Thread Johan Tibell
2008/10/6 Galchin, Vasili <[EMAIL PROTECTED]>: > ok ... by using "newtype", we are constricting/constraining to a subset of > CInt .. e.g. something like a "subtype" of CInt?? (where by "subtype", I > mean like the notion of subtype in languages like Ada). For our audience, > can you perhaps distin