X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=ghc%2Fcompiler%2FhsSyn%2FConvert.lhs;h=7343a8baa49f7203a8433a00be9baac60ed85c39;hp=8b4abaffe72f58da5863d7a461c8266ff40d37d4;hb=ff845ab59d1d465d874d3908fd0cdd61b8594da2;hpb=900ca61d2d1c61cb5a100dbcd67c265c89bbc8b5 diff --git a/ghc/compiler/hsSyn/Convert.lhs b/ghc/compiler/hsSyn/Convert.lhs index 8b4abaf..7343a8b 100644 --- a/ghc/compiler/hsSyn/Convert.lhs +++ b/ghc/compiler/hsSyn/Convert.lhs @@ -14,6 +14,7 @@ import Language.Haskell.TH as TH hiding (sigP) import Language.Haskell.TH.Syntax as TH import HsSyn as Hs +import qualified Class (FunDep) import RdrName ( RdrName, mkRdrUnqual, mkRdrQual, mkOrig, nameRdrName, getRdrName ) import Module ( ModuleName, mkModuleName ) import RdrHsSyn ( mkHsIntegral, mkHsFractional, mkClassDecl, mkTyData ) @@ -95,10 +96,13 @@ cvt_top (NewtypeD ctxt tc tvs constr derivs) Nothing [mk_con constr] (mk_derivs derivs)) -cvt_top (ClassD ctxt cl tvs decs) - = Left $ TyClD (mkClassDecl (cvt_context ctxt, noLoc (tconName cl), cvt_tvs tvs) - noFunDeps sigs - binds) +cvt_top (ClassD ctxt cl tvs fds decs) + = Left $ TyClD $ mkClassDecl (cvt_context ctxt, + noLoc (tconName cl), + cvt_tvs tvs) + (map (noLoc . cvt_fundep) fds) + sigs + binds where (binds,sigs) = cvtBindsAndSigs decs @@ -133,6 +137,9 @@ cvt_top (ForeignD (ExportF callconv as nm typ)) CCall -> CCallConv StdCall -> StdCallConv +cvt_fundep :: FunDep -> Class.FunDep RdrName +cvt_fundep (FunDep xs ys) = (map tName xs, map tName ys) + parse_ccall_impent :: String -> String -> Maybe (FastString, CImportSpec) parse_ccall_impent nm s = case lex_ccall_impent s of @@ -175,7 +182,6 @@ lex_ccall_impent xs = case span is_valid xs of noContext = noLoc [] noExistentials = [] -noFunDeps = [] ------------------------------------------------------------------- convertToHsExpr :: TH.Exp -> LHsExpr RdrName