Re: higher-kind deriving ... or not

2002-02-26 Thread Bernard James POPE
Conor writes: > newtype Copy a = Copy a deriving Show > >data Wonky f > = Wonky > | Manky (f (Wonky f)) > deriving Show > show (Wonky :: Wonky Copy) > I don't want to start an argument about how to solve this problem. I > do want to suggest that, for the time being, it would be better to > r

java program

2002-02-26 Thread Stewart Litt
dear sir/madam iam contacting you regarding a java problem which i have come across. My teacher at manchester met has set a problem for us to solve but thinking his teaching is excellent and everyone understands him wen no one does I would appreciate you helping me in this problem as it would sa

higher-kind deriving ... or not

2002-02-26 Thread Tom Pledger
Tom Pledger writes: | C T McBride writes: | : | | A little more tinkering, and it looks like it might be | | | | show :: Show (f (Wonky f)) => Wonky f -> String | | | | Is this really the type of show? | | That looks correct to me. Well, after the first context reduction, anyw

higher-kind deriving ... or not

2002-02-26 Thread Tom Pledger
C T McBride writes: : | A little more tinkering, and it looks like it might be | | show :: Show (f (Wonky f)) => Wonky f -> String | | Is this really the type of show? That looks correct to me. | If so, no wonder there's a problem. Yes, there's a vicious circle in context reduction,

higher-kind deriving ... or not

2002-02-26 Thread C T McBride
Hi I'm rather fond of fixpoint constructions like this one: > newtype Copy a = Copy a deriving Show > data Wonky f > = Wonky > | Manky (f (Wonky f)) > deriving Show (Clearly this is an ill-motivated example, but the real example which caused this problem is available on request...) The

Re: Help

2002-02-26 Thread Juan M. Duran
The problem is fixed. I fixed it using the do notation as Rijk said, it worked perfectly. Now I got two more problems: 1) Should I use the do notation in order to write this result (type IO [[Float]]) to a file? How? 2) The Glasglow compiler doesn let me compile one library because I use the func

Re: a more practical version of getLine???

2002-02-26 Thread D. Tweed
On Mon, 25 Feb 2002, Dean Herington wrote: > If you're using GHC, take a look at module Readline in the util package > (http://www.haskell.org/ghc/docs/latest/set/readline.html). I don't know > which other Haskell systems support this module. The annoying thing is the way that terminals general