X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FhsSyn%2FConvert.lhs;h=cd5b36d6224c3b4f26d72d3cea18b562ebec1307;hp=88d8954bf17debaa18ecb9c68c2ae5dc77d9c603;hb=9da4639011348fb6c318e3cba4b08622f811d9c4;hpb=61d2625ae2e6a4cdae2ffc92df828905e81c24cc diff --git a/compiler/hsSyn/Convert.lhs b/compiler/hsSyn/Convert.lhs index 88d8954..cd5b36d 100644 --- a/compiler/hsSyn/Convert.lhs +++ b/compiler/hsSyn/Convert.lhs @@ -109,7 +109,7 @@ cvtTop (TySynD tc tvs rhs) = do { tc' <- tconNameL tc ; tvs' <- cvtTvs tvs ; rhs' <- cvtType rhs - ; returnL $ TyClD (TySynonym tc' tvs' rhs') } + ; returnL $ TyClD (TySynonym tc' tvs' Nothing rhs') } cvtTop (DataD ctxt tc tvs constrs derivs) = do { stuff <- cvt_tycl_hdr ctxt tc tvs @@ -125,17 +125,21 @@ cvtTop (NewtypeD ctxt tc tvs constr derivs) ; returnL $ TyClD (mkTyData NewType stuff Nothing [con'] derivs') } cvtTop (ClassD ctxt cl tvs fds decs) - = do { stuff <- cvt_tycl_hdr ctxt cl tvs + = do { (cxt', tc', tvs', _) <- cvt_tycl_hdr ctxt cl tvs ; fds' <- mapM cvt_fundep fds ; (binds', sigs') <- cvtBindsAndSigs decs - ; returnL $ TyClD $ mkClassDecl stuff fds' sigs' binds' } + ; returnL $ TyClD $ mkClassDecl (cxt', tc', tvs') fds' sigs' binds' [] + -- no ATs in TH^^ + } cvtTop (InstanceD tys ty decs) = do { (binds', sigs') <- cvtBindsAndSigs decs ; ctxt' <- cvtContext tys ; L loc pred' <- cvtPred ty ; inst_ty' <- returnL $ mkImplicitHsForAllTy ctxt' (L loc (HsPredTy pred')) - ; returnL $ InstD (InstDecl inst_ty' binds' sigs') } + ; returnL $ InstD (InstDecl inst_ty' binds' sigs' []) + -- ^^no ATs in TH + } cvtTop (ForeignD ford) = do { ford' <- cvtForD ford; returnL $ ForD ford' } @@ -143,7 +147,7 @@ cvt_tycl_hdr cxt tc tvs = do { cxt' <- cvtContext cxt ; tc' <- tconNameL tc ; tvs' <- cvtTvs tvs - ; return (cxt', tc', tvs') } + ; return (cxt', tc', tvs', Nothing) } --------------------------------------------------- -- Data types @@ -210,7 +214,7 @@ cvtForD (ImportF callconv safety from nm ty) = do { nm' <- vNameL nm ; ty' <- cvtType ty ; let i = CImport (cvt_conv callconv) safety' c_header nilFS cis - ; return $ ForeignImport nm' ty' i False } + ; return $ ForeignImport nm' ty' i } | otherwise = failWith $ text (show from)<+> ptext SLIT("is not a valid ccall impent") @@ -224,7 +228,7 @@ cvtForD (ExportF callconv as nm ty) = do { nm' <- vNameL nm ; ty' <- cvtType ty ; let e = CExport (CExportStatic (mkFastString as) (cvt_conv callconv)) - ; return $ ForeignExport nm' ty' e False } + ; return $ ForeignExport nm' ty' e } cvt_conv CCall = CCallConv cvt_conv StdCall = StdCallConv