Re: [Haskell-cafe] \Parsec\Token.hs

2005-11-08 Thread Bernard Pope
On Mon, 2005-11-07 at 21:32 -0500, Sara Kenedy wrote: > Dear all, > > I run file Token.hs in > hugs98\libraries\Text\ParserCombinator\Parsec\Token.hs, but it > displays this error > > ERROR : 64 - Syntax error in data type definition (unexpected '.') > > Anyone know how to fix this? Thanks. The

Re: Re[2]: [Haskell-cafe] Re: FPS: Finalizers not running (was Memoryusageoutside of the Haskell heap)

2005-11-08 Thread Jan-Willem Maessen
On Nov 7, 2005, at 9:02 AM, Bulat Ziganshin wrote: ...Simon, can you please write some docs about all these foreign stuff and their interaction with pure Haskell code? i see some bits of this information in these newsgroups regularly (for example, are you remember discussion about using lots of h

Re: Re[2]: [Haskell-cafe] Re: FPS: Finalizers not running (was Memoryusageoutside of the Haskell heap)

2005-11-08 Thread Sebastian Sylvan
On 11/8/05, Jan-Willem Maessen <[EMAIL PROTECTED]> wrote: > On Nov 7, 2005, at 9:02 AM, Bulat Ziganshin wrote: > > ...Simon, can you please write some docs about all these foreign stuff > > and their interaction with pure Haskell code? i see some bits of this > > information in these newsgroups reg

[Haskell-cafe] Inferred type less polymorphic than expected

2005-11-08 Thread Joel Reymont
Folks, How do I fix this? data Prop = forall a b.(Eq a, Show a) => Attr a := a data Attr a = Attr String (a -> Dynamic, Dynamic -> Maybe a) (PU a) type Props = M.Map String (Int, Prop) instance Ord (Int, Prop) where compare (a, _) (b, _) | a == b = EQ | a > b = GT

Re: [Haskell-cafe] Inferred type less polymorphic than expected

2005-11-08 Thread Joel Reymont
This gets me pretty close. I now have to figure out how to return a PU Props instead of a PU [Prop] which is what it's returning. Still, it's a huge step forward. props :: Props -> PU Props props m = props' $ sort $ M.toList m where props' [] = lift [] props' ((_, (_, x)):xs) =

Re: [Haskell-cafe] Inferred type less polymorphic than expected

2005-11-08 Thread Udo Stenzel
Joel Reymont wrote: > Folks, > > How do I fix this? > > data Prop = forall a b.(Eq a, Show a) => Attr a := a > > data Attr a = Attr String > (a -> Dynamic, Dynamic -> Maybe a) > (PU a) > > type Props = M.Map String (Int, Prop) > > instance Ord (Int, Prop) where > compare (a, _) (b,

Re: [Haskell-cafe] Inferred type less polymorphic than expected

2005-11-08 Thread Joel Reymont
The road to hell is paved with good intentions. I sold this to the client as a "simple scripting language" and I have to deliver now, lest I loose my credibility. This were working quite well ... except the program is spending 50% of the time collecting garbage and is shuffling a few Gb of

[Haskell-cafe] Request for subject suggestions for a series of informal top 10 Haskell articles

2005-11-08 Thread Kenneth Hoste
Greetings, As you all might know, the Haskell community has it's own informal magazine, The Monad.Reader (http://haskell.org/tmrwiki). I'm planning to write (with some support from the frequent users of #haskell @ irc.freenode.net) a series of articles for TMR, which describe some aspect of Has

[Haskell-cafe] Parameterizing on type

2005-11-08 Thread Joel Reymont
Folks, How can I create a generic pickler that's parameterized on type and constructor? I define types like this: newtype AvgPot = AvgPot Word64 deriving (Show, Typeable) newtype NumberOfPlayers = NumberOfPlayers Word16 deriving (Show, Typeable) and then have a lot of boiler-plate code l