[project @ 2002-12-18 17:45:30 by igloo]
authorigloo <unknown>
Wed, 18 Dec 2002 17:45:30 +0000 (17:45 +0000)
committerigloo <unknown>
Wed, 18 Dec 2002 17:45:30 +0000 (17:45 +0000)
Context predicates start with a tcon name, not a type variable

ghc/compiler/hsSyn/Convert.lhs

index 033f255..ac906b9 100644 (file)
@@ -272,7 +272,7 @@ cvt_context tys = map cvt_pred tys
 
 cvt_pred :: Typ -> HsPred RdrName
 cvt_pred ty = case split_ty_app ty of
-               (Tvar tc, tys) -> HsClassP (tconName tc) (map cvtType tys)
+               (Tcon (TconName tc), tys) -> HsClassP (tconName tc) (map cvtType tys)
                other -> panic "Malformed predicate"
 
 cvtType :: Meta.Typ -> HsType RdrName