[Haskell-cafe] Re: GHC 6.7 and Associated Types

2007-04-17 Thread apfelmus
Maxime Henrion wrote: class MonadState m where type StateType m :: * get :: m StateType put :: m StateType - m () As for instances: instance MonadState (State s) where type StateType = s -- this is line 22 When defining the type

Re: [Haskell-cafe] Re: GHC 6.7 and Associated Types

2007-04-17 Thread Maxime Henrion
apfelmus wrote: Maxime Henrion wrote: class MonadState m where type StateType m :: * get :: m StateType put :: m StateType - m () As for instances: instance MonadState (State s) where type StateType = s -- this is line 22

[Haskell-cafe] Re: GHC 6.7 and Associated Types

2007-04-17 Thread apfelmus
Maxime Henrion wrote: apfelmus wrote: Maxime Henrion wrote: class MonadState m where type StateType m :: * get :: m StateType put :: m StateType - m () As for instances: instance MonadState (State s) where type StateType = s -- this

Re: [Haskell-cafe] Re: GHC 6.7 and Associated Types

2007-04-17 Thread Maxime Henrion
Simon Peyton-Jones wrote: Associated *data* types should work in the HEAD (=6.7). But associated *type synonyms* do not, I'm afraid. We are actively working on it, but it'll be a couple of months at least I guess. You can see the state of play, and description of where we are up to here

Re: [Haskell-cafe] Re: GHC 6.7 and Associated Types

2007-04-17 Thread Maxime Henrion
apfelmus wrote: Maxime Henrion wrote: apfelmus wrote: Maxime Henrion wrote: class MonadState m where type StateType m :: * get :: m StateType put :: m StateType - m () As for instances: instance MonadState (State s) where type StateType = s

RE: [Haskell-cafe] Re: GHC 6.7 and Associated Types

2007-04-17 Thread Simon Peyton-Jones
://hackage.haskell.org/trac/ghc/wiki/TypeFunctions Simon | -Original Message- | From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Maxime | Henrion | Sent: 17 April 2007 13:27 | To: apfelmus | Cc: haskell-cafe@haskell.org | Subject: Re: [Haskell-cafe] Re: GHC 6.7 and Associated Types | | apfelmus