X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcInstDcls.lhs;h=1be9ffc8b8c8b80e9768d0632cb010306f109f0f;hp=32b51d060f8f7c63d553c038037c68ed090d232f;hb=171d4582f4b9a8e0f11f8738079accbb22bafdcb;hpb=57610c7b3369dfc0fcf1ee311a1ed10cfe13f7d4 diff --git a/compiler/typecheck/TcInstDcls.lhs b/compiler/typecheck/TcInstDcls.lhs index 32b51d0..1be9ffc 100644 --- a/compiler/typecheck/TcInstDcls.lhs +++ b/compiler/typecheck/TcInstDcls.lhs @@ -571,6 +571,9 @@ tcInstDecl2 (InstInfo { iSpec = ispec, iBinds = NewTypeDerived mb_preds }) the_rhs = mkHsConApp cls_data_con cls_inst_tys $ map HsVar (sc_dict_ids ++ op_ids) + -- Warning: this HsCase scrutinises a value with a PredTy, which is + -- never otherwise seen in Haskell source code. It'd be + -- nicer to generate Core directly! ; return (HsCase (noLoc coerced_rep_dict) $ MatchGroup [the_match] (mkFunTy inst_head_ty inst_head_ty)) } where