X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcDeriv.lhs;h=a1f98a94fe34947a90717a83eae72e4d5a1d3c49;hb=2eb105009654588b2130997509645841800681b9;hp=e79318b587700a97e8f585a487785337f47cf0bc;hpb=162ae90572443ca726992ea54f4cbc75658453d3;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcDeriv.lhs b/compiler/typecheck/TcDeriv.lhs index e79318b..a1f98a9 100644 --- a/compiler/typecheck/TcDeriv.lhs +++ b/compiler/typecheck/TcDeriv.lhs @@ -265,7 +265,7 @@ tcDeriving :: [LTyClDecl Name] -- All type constructors HsValBinds Name) -- Extra generated top-level bindings tcDeriving tycl_decls inst_decls deriv_decls - = recoverM (returnM ([], emptyValBindsOut)) $ + = recoverM (return ([], emptyValBindsOut)) $ do { -- Fish the "deriving"-related information out of the TcEnv -- And make the necessary "equations". ; early_specs <- makeDerivSpecs tycl_decls inst_decls deriv_decls @@ -798,10 +798,10 @@ mkNewTypeEqn orig mayDeriveDataTypeable newtype_deriving tvs -- Want to drop 1 arg from (T s a) and (ST s a) -- to get instance Monad (ST s) => Monad (T s) - -- Note [newtype representation] - -- Need newTyConRhs *not* newTyConRep to get the representation - -- type, because the latter looks through all intermediate newtypes - -- For example + -- Note [Newtype representation] + -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + -- Need newTyConRhs (*not* a recursive representation finder) + -- to get the representation type. For example -- newtype B = MkB Int -- newtype A = MkA B deriving( Num ) -- We want the Num instance of B, *not* the Num instance of Int,