[project @ 2002-12-10 21:25:07 by igloo]
authorigloo <unknown>
Tue, 10 Dec 2002 21:25:08 +0000 (21:25 +0000)
committerigloo <unknown>
Tue, 10 Dec 2002 21:25:08 +0000 (21:25 +0000)
Use real datatypes for TH Clause and Match

ghc/compiler/hsSyn/Convert.lhs

index 858d914..9785a5f 100644 (file)
@@ -160,8 +160,8 @@ cvtd x = panic "Illegal kind of declaration in where clause"
 
 
 cvtclause :: Meta.Clause (Meta.Pat) (Meta.Exp) (Meta.Dec) -> Hs.Match RdrName
-cvtclause (ps,body,wheres) = Match (map cvtp ps) Nothing 
-                             (GRHSs (cvtguard body) (cvtdecs wheres) void)
+cvtclause (Clause ps body wheres)
+    = Match (map cvtp ps) Nothing (GRHSs (cvtguard body) (cvtdecs wheres) void)
 
 
 
@@ -182,8 +182,8 @@ cvtstmts (ParSt dss : ss)  = ParStmt(map cvtstmts dss)      : cvtstmts ss
 
 
 cvtm :: Meta.Mat -> Hs.Match RdrName
-cvtm (p,body,wheres) = Match [cvtp p] Nothing 
-                             (GRHSs (cvtguard body) (cvtdecs wheres) void)
+cvtm (Mat p body wheres)
+    = Match [cvtp p] Nothing (GRHSs (cvtguard body) (cvtdecs wheres) void)
                              
 cvtguard :: Meta.Rhs -> [GRHS RdrName]
 cvtguard (Guarded pairs) = map cvtpair pairs