On Wed, 17 May 2000, Viktor Kuncak wrote:
> newtype ContT c m a = Cont {unCont :: (a -> m c) -> m c}
> instance EnvMonad e m => EnvMonad e (ContT c m) where
> rdEnv = lift rdEnv
> inEnv e ma = Cont (\k ->
> do old <- rdEnv
> inEnv e (unCont ma (inEnv old . k)))
>
> which does not type check in Hugs98. The problem seems to be with
> the first argument of inEnv, when I use
[...]
You can probably use the GHC & Hugs extension of pattern type signatures:
inEnv (e::env) ma = Cont (\k ->
do old <- rdEnv
inEnv e (unCont ma (inEnv (old::env) . k)))
I haven't checked this.
--
__("< Marcin Kowalczyk * [EMAIL PROTECTED] http://qrczak.ids.net.pl/
\__/ GCS/M d- s+:-- a23 C+++$ UL++>++++$ P+++ L++>++++$ E-
^^ W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP+ t
QRCZAK 5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-