Re: [Haskell-cafe] MPTC inheritance - was operator error

2009-02-24 Thread Derek Gladding
y-job C++ in the intervening period. Main lesson learned: Read the ghc error message carefully, it contains all the information you need. Thankyou once again. - Derek Derek Gladding wrote: Please forgive me if I'm still mentally contaminated by the OO way of seeing (and discussing)

[Haskell-cafe] MPTC inheritance

2009-02-24 Thread Derek Gladding
Please forgive me if I'm still mentally contaminated by the OO way of seeing (and discussing) the universe, but I'm trying to figure out how to "inherit an interface" from a multi-parameter type class. I have a Graph class that's parameterisable by Node and Edge type: class (Node a, Edge b) =>

Re: [Haskell-cafe] Re: (flawed?) benchmark : sort

2008-03-12 Thread Derek Gladding
Speaking as someone who often has to answer questions along the lines of "why isn't my code generating the results I want on your system?", I wouldn't call it evil, just "commonly mistaken for Real". NaN breaks most assumptions about ordering: (NaN <= _) == false (NaN == _) == false (NaN >= _)

Re: [Haskell-cafe] Parsec problem

2007-06-06 Thread Derek Gladding
Neil Mitchell wrote: > Hi, > > I'm using parsec to parse something which is either a "name" or a > "type". The particular test string I'm using is a type, but isn't a > name. I want things to default to "name" before "type". I just finished a parsec grammar for C99, and found this very useful wh