Hello Haskellers,

I've got the following piece of code


type Memory addr value = Map.Map addr value

type Stack item = [item]

data MachineState addr value item = MachineState
  { memory :: Memory addr value
  , stack  :: Stack item
  }
  deriving (Show)

newtype Machine addr value item m a =
    Machine { unMachine :: StateT (MachineState addr value item) m a }
deriving (Monad, MonadState (MachineState addr value item), MonadTrans, MonadIO)


and HLint complains:


Machine.hs:20:31: Parse failure, Parse error


This is exactly the position of the opening bracket after MonadState. Why can GHC parse this and HLint cannot?

Regards,

Martin.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to