[project @ 2002-12-11 14:02:28 by igloo]
authorigloo <unknown>
Wed, 11 Dec 2002 14:02:28 +0000 (14:02 +0000)
committerigloo <unknown>
Wed, 11 Dec 2002 14:02:28 +0000 (14:02 +0000)
Handle bindings to just a pattern variable in cvtd.

ghc/compiler/hsSyn/Convert.lhs

index 9c31331..aa3454d 100644 (file)
@@ -194,7 +194,7 @@ cvtd :: Meta.Dec -> MonoBinds RdrName
 -- Used only for declarations in a 'let/where' clause,
 -- not for top level decls
 cvtd (Val (Pvar s) body ds) = FunMonoBind (vName s) False 
-                                         (panic "what now?") loc0
+                                         [cvtclause (Clause [] body ds)] loc0
 cvtd (Fun nm cls)          = FunMonoBind (vName nm) False (map cvtclause cls) loc0
 cvtd (Val p body ds)       = PatMonoBind (cvtp p) (GRHSs (cvtguard body) 
                                                          (cvtdecs ds)