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
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
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
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
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
://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