@@ -30,10 +30,12 @@ data CGI : Type -> Type where
3030getAction : CGI a -> CGIInfo -> IO (a, CGIInfo)
3131getAction (MkCGI act) = act
3232
33+export
3334implementation Functor CGI where
3435 map f (MkCGI c) = MkCGI (\s => do (a, i) <- c s
3536 pure (f a, i))
3637
38+export
3739implementation Applicative CGI where
3840 pure v = MkCGI (\s => pure (v, s))
3941
@@ -41,6 +43,7 @@ implementation Applicative CGI where
4143 (c, j) <- b i
4244 pure (f c, j))
4345
46+export
4447implementation Monad CGI where
4548 (>>=) (MkCGI f) k = MkCGI (\s => do v <- f s
4649 getAction (k (fst v)) (snd v))