[project @ 2002-11-21 11:27:05 by simonmar]
[ghc-hetmet.git] / ghc / compiler / hsSyn / Convert.lhs
index e521be0..0a0d64b 100644 (file)
@@ -14,9 +14,9 @@ import Language.Haskell.THSyntax as Meta
 
 import HsSyn as Hs
        (       HsExpr(..), HsLit(..), ArithSeqInfo(..), 
-               HsStmtContext(..), 
+               HsStmtContext(..), TyClDecl(..),
                Match(..), GRHSs(..), GRHS(..), HsPred(..),
-               HsDecl(..), InstDecl(..), ConDecl(..),
+               HsDecl(..), TyClDecl(..), InstDecl(..), ConDecl(..),
                Stmt(..), HsBinds(..), MonoBinds(..), Sig(..),
                Pat(..), HsConDetails(..), HsOverLit, BangType(..),
                placeHolderType, HsType(..), HsTupCon(..),
@@ -49,6 +49,9 @@ convertToHsDecls ds = map cvt_top ds
 cvt_top d@(Val _ _ _) = ValD (cvtd d)
 cvt_top d@(Fun _ _)   = ValD (cvtd d)
  
+cvt_top (TySyn tc tvs rhs)
+  = TyClD (TySynonym (tconName tc) (cvt_tvs tvs) (cvtType rhs) loc0)
+
 cvt_top (Data tc tvs constrs derivs)
   = TyClD (mkTyData DataType 
                    (noContext, tconName tc, cvt_tvs tvs)