summaryrefslogtreecommitdiff
path: root/ghc/compiler/hsSyn/Convert.lhs
diff options
context:
space:
mode:
authorsimonpj <unknown>2004-04-05 10:52:25 +0000
committersimonpj <unknown>2004-04-05 10:52:25 +0000
commit25ef3ade4257614cd966e29d0ed595c9db5587a7 (patch)
tree038494afb1be35374e732ba8577b43fed57410af /ghc/compiler/hsSyn/Convert.lhs
parentc7c01b0d35e816c4e85177d22d82be22261684a1 (diff)
downloadhaskell-25ef3ade4257614cd966e29d0ed595c9db5587a7.tar.gz
[project @ 2004-04-05 10:52:23 by simonpj]
Remove the entirely-redundant location from the argument of constructor HsPredTy, so that we have HsPredTy HsType rather than HsPredTy LHsType
Diffstat (limited to 'ghc/compiler/hsSyn/Convert.lhs')
-rw-r--r--ghc/compiler/hsSyn/Convert.lhs10
1 files changed, 5 insertions, 5 deletions
diff --git a/ghc/compiler/hsSyn/Convert.lhs b/ghc/compiler/hsSyn/Convert.lhs
index 03abd3c25e..480c64edd7 100644
--- a/ghc/compiler/hsSyn/Convert.lhs
+++ b/ghc/compiler/hsSyn/Convert.lhs
@@ -62,7 +62,7 @@ mk_con con = L loc0 $ case con of
= (noLoc (vName i), noLoc $ BangType HsNoBang (cvtType ty))
mk_derivs [] = Nothing
-mk_derivs cs = Just [noLoc $ HsPredTy $ noLoc $ HsClassP (tconName c) [] | c <- cs]
+mk_derivs cs = Just [noLoc $ HsPredTy $ HsClassP (tconName c) [] | c <- cs]
cvt_ltop :: TH.Dec -> Either (LHsDecl RdrName) Message
cvt_ltop d = case cvt_top d of
@@ -305,12 +305,12 @@ cvt_tvs :: [TH.Name] -> [LHsTyVarBndr RdrName]
cvt_tvs tvs = map (noLoc . UserTyVar . tName) tvs
cvt_context :: Cxt -> LHsContext RdrName
-cvt_context tys = noLoc (map cvt_pred tys)
+cvt_context tys = noLoc (map (noLoc . cvt_pred) tys)
-cvt_pred :: TH.Type -> LHsPred RdrName
+cvt_pred :: TH.Type -> HsPred RdrName
cvt_pred ty = case split_ty_app ty of
- (ConT tc, tys) -> noLoc (HsClassP (tconName tc) (map cvtType tys))
- (VarT tv, tys) -> noLoc (HsClassP (tName tv) (map cvtType tys))
+ (ConT tc, tys) -> HsClassP (tconName tc) (map cvtType tys)
+ (VarT tv, tys) -> HsClassP (tName tv) (map cvtType tys)
other -> cvtPanic "Malformed predicate" (text (TH.pprint ty))
convertToHsType = cvtType