-instance Applicative Env where
- (<*>) f g = ap f g
- pure a = Env $ pure $ Right a
-
-//instance Alternative Env where
-// empty = Env $ pure $ Left (Error "Undefined error")
-// (<|>) f g = f >>= \ef -> g >>= \eg -> Env $ pure $ case ef of
-// Left e = eg
-// Right r = Right r
-
-instance Monad Env where
- bind e f = e >>= \ee -> Env $ pure $ case ee of
- (Left e) = Left e
- (Right r) = f r
-
-get = state $ \s -> (s,s)