Hi, The following code compiles OK with hugs (dec 2001) but produces a loop & stack overflow with GHC 5.04
data Ctx m a b = forall i. CBCC (a -> CUT m i -> CUT m i) (CUT m i) (Ctx m i b) newtype CUT m a = MkCut (forall b. Ctx m a b -> m b) promote :: Monad m => m a -> CUT m a promote m = MkCut (\ctx0 -> case ctx0 of CBCC c f ctx -> m >>= (\a -> let MkCut q = c a f in q ctx)) when I replace the 'newtype' by 'data', it compiles again with GHC - the code is taken (and simplified) from "Deriving Backtracking Monad Transformers" from Ralph Hinze - compiled with -fglasgow-exts (of course), Linux and Windows versions of GHC and GHCI 5.04 Alain _______________________________________________ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs