on master help sign in
Export interface implementations of Network.Cgi (#4580)

Without exporting these, the users get errors like: Can't find implementation for Monad CGI.

commitc536a6e483aea78c4aeb10ddfbb3dc9f73563be7 authorHadi Moshayedi <hadi@citusdata.com> dateTue 6 Nov 2018, 07:31 (8 years ago) parent5549d87
1 file changed+3
libs/contrib/Network/Cgi.idr+3
libs/contrib/Network/Cgi.idr+3
@@ -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))