Re: [Haskell-cafe] FunPtr error?

2008-06-13 Thread Galchin, Vasili
oops .. my bad ... If I change data Sigval = SivalInt Int to newtype Sigval = SivalInt Int OR data Sigval = SivalPtr (Ptr Char) to newtype Sigval = SivalPtr (Ptr Char). Why should "newtype" instead of a data type allow my test case to build? Vasili On Fri, Jun 13, 2008 at 10:5

Re: [Haskell-cafe] cgi liftM liftIO

2008-06-13 Thread Gwern Branwen
On 2008.06.14 08:05:48 +0200, Adrian Neumann <[EMAIL PROTECTED]> scribbled 4.0K characters: > I think you need to put liftIO in front of the IO actions you want to do > inside the CGI Monad. Like in this example > > > http://www.haskell.org/haskellwiki/ > Practical_web_programming_in_Haskell#File_

Re: [Haskell-cafe] cgi liftM liftIO

2008-06-13 Thread Adrian Neumann
I think you need to put liftIO in front of the IO actions you want to do inside the CGI Monad. Like in this example > http://www.haskell.org/haskellwiki/ Practical_web_programming_in_Haskell#File_uploads (Why did I need to use google to find that? The wiki search in awful. Searching for CG

Re: [Haskell-cafe] FunPtr error?

2008-06-13 Thread Galchin, Vasili
If I change data Sigval = SivalInt Int | SivalPtr (Ptr Char) to ... newtype Sigval = Sivalint Int | SivalPtr (Ptr Char) then my test case builds and links. ?? Regards, Vasili On Mon, Jun 9, 2008 at 11:01 PM, Galchin, Vasili <[EMAIL PROTECTED]> wrote: > I have tried various things

Re: [Haskell-cafe] cabal-install failure

2008-06-13 Thread Gwern Branwen
On 2008.06.13 22:22:06 +0100, Duncan Coutts <[EMAIL PROTECTED]> scribbled 2.1K characters: > > On Fri, 2008-06-13 at 11:19 -0400, Darrin Thompson wrote: > > Cabal-install is looking good. It now, for the record, has only two > > deps outside of Cabal-1.4. > > > > I installed cabal-install-0.5 on u

Re: [Haskell-cafe] monomorphism restriction

2008-06-13 Thread Jonathan Cast
On Wed, 2008-06-11 at 20:24 -0700, Don Stewart wrote: > page: > > Definition of f: > >f = foldr (+) 0 > > Types: > >0 :: (Num t) => t > >foldr (+) 0 :: Num a => [a] -> a > >f :: [Integer] -> Integer > > > > Please remind me, again, of the advantages of f being something different

Re: [Haskell-cafe] monomorphism restriction

2008-06-13 Thread Ryan Ingram
On 6/11/08, Rex Page <[EMAIL PROTECTED]> wrote: > Please remind me, again, of the advantages of f being something different > from the formula defining it. fibs !a !b = a : fibs b (a+b) -- fibs :: Num a => a -> a -> [a] n = head $ drop 100 $ fibs 1 1 -- n :: Integer (due to monomorphism restr

Re: [Haskell-cafe] LDAP 0.6.3 build failure

2008-06-13 Thread Judah Jacobson
On Fri, Jun 13, 2008 at 4:39 PM, Jason Dusek <[EMAIL PROTECTED]> wrote: > I'm trying to build the LDAP libs, version 0.6.3, on a recent > MacBook Air with OpenLDAP 2.3.27 (the version of OpenLDAP > shipped by Apple). > > The "atom sorting error" I get from `ld` is outside my range > of knowled

[Haskell-cafe] LDAP 0.6.3 build failure

2008-06-13 Thread Jason Dusek
I'm trying to build the LDAP libs, version 0.6.3, on a recent MacBook Air with OpenLDAP 2.3.27 (the version of OpenLDAP shipped by Apple). The "atom sorting error" I get from `ld` is outside my range of knowledge -- if some could advise me on how to get around it, I'd be much obliged.

[Haskell-cafe] ANN: Haddock Trac

2008-06-13 Thread David Waern
Hi everyone, there's now a Haddock bug-tracker and wiki at http://trac.haskell.org/haddock. Please use it to submit bug reports and feature requests! David ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/ha

Re: [Haskell-cafe] cabal-install failure

2008-06-13 Thread Duncan Coutts
On Fri, 2008-06-13 at 11:19 -0400, Darrin Thompson wrote: > Cabal-install is looking good. It now, for the record, has only two > deps outside of Cabal-1.4. > > I installed cabal-install-0.5 on ubuntu with the haskell.org linux > binary for ghc 6.8.2. > > I then tried cabal-install yi > > Got t

Re: [Haskell-cafe] Re: [Haskell] ANN: random-access-list-0.1

2008-06-13 Thread wren ng thornton
Isaac Dupree wrote: "extractHead" is an ugly name for a nevertheless standardish-meaning function... what is it usually called? uncons? headTail? (Data.Sequence, which is meant to be left-right symmetric, calls it "viewr"... except your version doesn't have the Maybe, it's partial instead, fail

RE: [Haskell-cafe] Cabal-Install Fails To Compile

2008-06-13 Thread Aditya Siram
Thanks so much for your help. Actually Don got it fixed within twenty minutes but I mistakenly didn't cc the group. But it works perfectly now. -Deech > Subject: Re: [Haskell-cafe] Cabal-Install Fails To Compile > From: [EMAIL PROTECTED] > To: [EMAIL PROT

Re: [Haskell-cafe] working with Random.randoms

2008-06-13 Thread Daniel Fischer
Am Freitag, 13. Juni 2008 18:38 schrieb Stephen Howard: > Hi List, > > I am a newcomer doing my obligatory struggling with Haskell's type > system, and I've got a nut I've not been able to crack. Given: > > import Random > > random_test :: Int -> String > random_test n = do > g <- getStdGen >

[Haskell-cafe] working with Random.randoms

2008-06-13 Thread Stephen Howard
Hi List, I am a newcomer doing my obligatory struggling with Haskell's type system, and I've got a nut I've not been able to crack. Given: import Random random_test :: Int -> String random_test n = do g <- getStdGen take n (randoms g)::String I'm expecting that I ought to be able to p

[Haskell-cafe] Re: [Haskell] ANN: random-access-list-0.1

2008-06-13 Thread Stephan Friedrichs
Isaac Dupree wrote: [...] Well Chris Okasaki called them "Skew Binary Random-Access Lists", which is even longer :) :) hmm.. IndexableList? (just a thought, not sure whether I like it any better) RAList? IList? <- (will I be sued by a large computer company for that?) [...] Yes, I wasn

[Haskell-cafe] cabal-install failure

2008-06-13 Thread Darrin Thompson
Cabal-install is looking good. It now, for the record, has only two deps outside of Cabal-1.4. I installed cabal-install-0.5 on ubuntu with the haskell.org linux binary for ghc 6.8.2. I then tried cabal-install yi Got this output: ... many successful installs ... Registering vty-3.0.1... Reading

Re: [Haskell-cafe] Announce: Fortress talk in New York City

2008-06-13 Thread Jan-Willem Maessen
On Jun 13, 2008, at 10:43 AM, Bayley, Alistair wrote: From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Henning Thielemann There will be a talk on Fortress... --- This e-mail may contain confidential and/or privileged information. You send potentially confidential information

RE: [Haskell-cafe] Announce: Fortress talk in New York City

2008-06-13 Thread Bayley, Alistair
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Henning Thielemann > > > There will be a talk on Fortress... > > > > --- > > > > This e-mail may contain confidential and/or privileged information. > > You send potentially confidential information to a public > mailing list

Re: Maybe-summary was: Re: [Haskell-cafe] Re: [Haskell] ANN:random-access-list-0.1

2008-06-13 Thread Claus Reinke
http://thread.gmane.org/gmane.comp.lang.haskell.libraries/9082 .. that Maybe is not the most general abstraction - it loses information wrt to (Either String), for instance: Prelude> let {f [] = fail "empty"; f [_] = fail "singleton"; f l = return l } okay, I see, it's just that most partia

Re: [Haskell-cafe] [WARN] Bug fix release of pureMD5 (Was: pureMD5)

2008-06-13 Thread Uwe Schmidt
Thomas M. DuBuisson wrote: > As you can probably tell, I didn't invest enough into the > non-performance aspects of pureMD5. Faced with actual users ;-), I have > released version 0.2.0 which has the bug fix, a new API (type prevention > from re-finalizing a digest), and a reasonable set of quick

Re: [Haskell-cafe] Announce: Fortress talk in New York City

2008-06-13 Thread Henning Thielemann
On Fri, 13 Jun 2008, Jeff Polakow wrote: Hello, There will be a talk on Fortress ( a new OO/Functional language from Sun) on Wednesday June 25 at 6:30pm in Manhattan. Abstract: The Java Programming Language revolutionized programming with two simple concepts: "Write once run anywhere", and

Re: [Haskell-cafe] Announce: Fortress talk in New York City

2008-06-13 Thread Darrin Thompson
2008/6/13 Jeff Polakow <[EMAIL PROTECTED]>: > There will be a talk on Fortress ( a new OO/Functional language from Sun) on > Wednesday June 25 at 6:30pm in Manhattan. > Sounds interesting. Any plans to post video? -- Darrin ___ Haskell-Cafe mailing list

[Haskell-cafe] Announce: Fortress talk in New York City

2008-06-13 Thread Jeff Polakow
Hello, There will be a talk on Fortress ( a new OO/Functional language from Sun) on Wednesday June 25 at 6:30pm in Manhattan. Abstract: The Java Programming Language revolutionized programming with two simple concepts: "Write once run anywhere", and Garbage Collection. This led to a big s

[Haskell-cafe] cgi liftM liftIO

2008-06-13 Thread Cetin Sert
Hi, Could someone please care to explain what I am doing wrong below in cgiMain2 and how can I fix it? ./Main.hs:25:15: No instance for (MonadCGI IO) arising from a use of `output' at ./Main.hs:25:15-20 Possible fix: add an instance declaration for (MonadCGI IO) In the first ar

Re: [Haskell-cafe] Re: [Haskell] ANN: random-access-list-0.1

2008-06-13 Thread Jules Bean
Whether fail should be in Monad, or whether we really want MonadZero, MonadPlus, MonadError, or something else entirely has been open for discussion, but it is easily shown that Maybe is not the most general abstraction - it loses information wrt to (Either String), for instance: Prelude> let

Re: [Haskell-cafe] Difficulty installing hscurses

2008-06-13 Thread Duncan Coutts
On Fri, 2008-06-13 at 05:15 -0400, Dominic Espinosa wrote: > Hello, > > I'm trying to install hscurses on debian-testing. I have ghc6 installed, > which I've written some toy programs with, but I haven't tried to > install any Hackage packages until now. > > hscurses depends on old-time and old-

Maybe-summary was: Re: [Haskell-cafe] Re: [Haskell] ANN: random-access-list-0.1

2008-06-13 Thread Isaac Dupree
Claus Reinke wrote: To summarize: Monad isn't the proper abstraction for failable/Maybe. Maybe is an algebraic data type that *exactly* represents the spirit of what you're trying to do: e.g. Conor McBride said: "Maybe is the most general abstraction. Requiring (>>=), or even (<*>) seems exces

Re: [Haskell-cafe] Re: [Haskell] ANN: random-access-list-0.1

2008-06-13 Thread Claus Reinke
To summarize: Monad isn't the proper abstraction for failable/Maybe. Maybe is an algebraic data type that *exactly* represents the spirit of what you're trying to do: e.g. Conor McBride said: "Maybe is the most general abstraction. Requiring (>>=), or even (<*>) seems excessive. What we need is

[Haskell-cafe] Re: [Haskell] ANN: random-access-list-0.1

2008-06-13 Thread Isaac Dupree
Stephan Friedrichs wrote: Isaac Dupree wrote: [...] Great to see it, it deserved implementing, IIRC! I don't remember enough about it.. (and don't have Okasaki anywhere handy). Can it be lazy or infinitely long? No, it has to be finite as it's actually a list of complete binary trees whos

[Haskell-cafe] Difficulty installing hscurses

2008-06-13 Thread Dominic Espinosa
Hello, I'm trying to install hscurses on debian-testing. I have ghc6 installed, which I've written some toy programs with, but I haven't tried to install any Hackage packages until now. hscurses depends on old-time and old-locale (those names make me raise my eyebrows a bit). In turn, old-time se