RE: [Haskell-cafe] closed classes [was: Re: exceptions vs. Either]

2004-08-09 Thread C T McBride
Hi On Mon, 9 Aug 2004, Simon Peyton-Jones wrote: Closed classes are certainly interesting, but a better way to go in this case is to allow the programmer to declear new kinds, as well as new types. This is what Tim Sheard's language Omega lets you do, and I'm considering adding it to GHC.

Re: Monads and Maybe

2003-08-21 Thread C T McBride
Hi Or, more generally, infixl 9 $ ($) :: Monad m = m (s - t) - m s - m t mf $ ms = do f - mf s - ms return (f s) or just liftM2 ($) or just ap OK, I'm a bad citizen and I never look things up in the library. If it isn't in the Gentle Introduction

Re: higher-kind deriving ... or not

2002-02-27 Thread C T McBride
Hi On Thu, 28 Feb 2002, Tom Pledger wrote: C T McBride writes: | data Fix f = Fix (f (Fix f)) | | There's no equivalent first-order definition. This is where | higher-kind parameters actually buy us extra stuff, and it's also the | point at which the first-order constraint for show

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: argument permutation and fundeps

2001-05-10 Thread C T McBride
C T McBride wrote: Hi This is a long message, containing a program which makes heavy use of type classes with functional dependencies, and a query about how the typechecker treats them. It might be a bit of an effort, but I'd be grateful for any comment and advice more experienced