[Haskell-beginners] Overriding >>= for a Monad?

Patrick LeBoutillier patrick.leboutillier at gmail.com
Thu Feb 26 20:46:32 EST 2009

Hi all,

I'm using Control.Monad.StateT as such:

 data TapState = TapState {
   planSet :: Bool,
   noPlan :: Bool,
   skipAll :: Bool,
   testDied :: Bool,
   expectedTests :: Int,
   executedTests :: Int,
   failedTests :: Int
 } deriving (Show)

 type TAP a = StateT TapState IO a

but I'd like to provide my own >>= function. Is there a way to
"derive" a new type from StateT in order to implement my own >>=?
Is thin done using "instance"?



Patrick LeBoutillier
Rosemère, Québec, Canada

More information about the Beginners mailing list