--- options-1.2.1-orig/lib/Options/Tokenize.hs 2014-12-14 16:34:53.000000000 +1100 +++ options-1.2.1/lib/Options/Tokenize.hs 2015-01-02 00:14:05.390013340 +1100 @@ -11,6 +11,7 @@ , tokenize ) where +import Control.Applicative import Control.Monad.Error hiding (throwError) import qualified Control.Monad.Error import Control.Monad.State @@ -53,6 +54,13 @@ newtype Tok a = Tok { unTok :: ErrorT String (StateT TokState Identity) a } +instance Functor Tok where + fmap = liftM + +instance Applicative Tok where + pure = return + (<*>) = ap + instance Monad Tok where return = Tok . return m >>= f = Tok (unTok m >>= unTok . f)