diff options
author | Austin Seipp <austin@well-typed.com> | 2015-05-06 10:20:26 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2015-05-06 10:20:26 -0500 |
commit | 97d320f56b5848d6ba2c723c6e7f04f98e349a86 (patch) | |
tree | 0470a73a6b5934ddbd24593262f55b5bc36c34a5 /compiler/hsSyn/Convert.hs | |
parent | f34c072820f617f09c3d1c4e539c41fb2ab645b1 (diff) | |
download | haskell-97d320f56b5848d6ba2c723c6e7f04f98e349a86.tar.gz |
Revert "API Annotations : add Locations in hsSyn were layout occurs"
This reverts commit fb54b2c11cc7f2cfbafa35b6a1819d7443aa5494.
As Alan pointed out, this will make cherry picking a lot harder until
7.10.2, so lets back it out until after the release.
Diffstat (limited to 'compiler/hsSyn/Convert.hs')
-rw-r--r-- | compiler/hsSyn/Convert.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/hsSyn/Convert.hs b/compiler/hsSyn/Convert.hs index 6ec9970e4f..031a340a0b 100644 --- a/compiler/hsSyn/Convert.hs +++ b/compiler/hsSyn/Convert.hs @@ -153,7 +153,7 @@ cvtDec (TH.ValD pat body ds) ; body' <- cvtGuard body ; ds' <- cvtLocalDecs (ptext (sLit "a where clause")) ds ; returnJustL $ Hs.ValD $ - PatBind { pat_lhs = pat', pat_rhs = GRHSs body' (noLoc ds') + PatBind { pat_lhs = pat', pat_rhs = GRHSs body' ds' , pat_rhs_ty = placeHolderType, bind_fvs = placeHolderNames , pat_ticks = ([],[]) } } @@ -611,7 +611,7 @@ cvtClause (Clause ps body wheres) = do { ps' <- cvtPats ps ; g' <- cvtGuard body ; ds' <- cvtLocalDecs (ptext (sLit "a where clause")) wheres - ; returnL $ Hs.Match Nothing ps' Nothing (GRHSs g' (noLoc ds')) } + ; returnL $ Hs.Match Nothing ps' Nothing (GRHSs g' ds') } ------------------------------------------------------------------- @@ -650,7 +650,7 @@ cvtl e = wrapL (cvt e) | otherwise = do { alts' <- mapM cvtpair alts ; return $ HsMultiIf placeHolderType alts' } cvt (LetE ds e) = do { ds' <- cvtLocalDecs (ptext (sLit "a let expression")) ds - ; e' <- cvtl e; return $ HsLet (noLoc ds') e' } + ; e' <- cvtl e; return $ HsLet ds' e' } cvt (CaseE e ms) = do { e' <- cvtl e; ms' <- mapM cvtMatch ms ; return $ HsCase e' (mkMatchGroup FromSource ms') } cvt (DoE ss) = cvtHsDo DoExpr ss @@ -801,7 +801,7 @@ cvtHsDo do_or_lc stmts L loc (BodyStmt body _ _ _) -> return (L loc (mkLastStmt body)) _ -> failWith (bad_last last') - ; return $ HsDo do_or_lc (noLoc (stmts'' ++ [last''])) placeHolderType } + ; return $ HsDo do_or_lc (stmts'' ++ [last'']) placeHolderType } where bad_last stmt = vcat [ ptext (sLit "Illegal last statement of") <+> pprAStmtContext do_or_lc <> colon , nest 2 $ Outputable.ppr stmt @@ -814,7 +814,7 @@ cvtStmt :: TH.Stmt -> CvtM (Hs.LStmt RdrName (LHsExpr RdrName)) cvtStmt (NoBindS e) = do { e' <- cvtl e; returnL $ mkBodyStmt e' } cvtStmt (TH.BindS p e) = do { p' <- cvtPat p; e' <- cvtl e; returnL $ mkBindStmt p' e' } cvtStmt (TH.LetS ds) = do { ds' <- cvtLocalDecs (ptext (sLit "a let binding")) ds - ; returnL $ LetStmt (noLoc ds') } + ; returnL $ LetStmt ds' } cvtStmt (TH.ParS dss) = do { dss' <- mapM cvt_one dss; returnL $ ParStmt dss' noSyntaxExpr noSyntaxExpr } where cvt_one ds = do { ds' <- cvtStmts ds; return (ParStmtBlock ds' undefined noSyntaxExpr) } @@ -824,7 +824,7 @@ cvtMatch (TH.Match p body decs) = do { p' <- cvtPat p ; g' <- cvtGuard body ; decs' <- cvtLocalDecs (ptext (sLit "a where clause")) decs - ; returnL $ Hs.Match Nothing [p'] Nothing (GRHSs g' (noLoc decs')) } + ; returnL $ Hs.Match Nothing [p'] Nothing (GRHSs g' decs') } cvtGuard :: TH.Body -> CvtM [LGRHS RdrName (LHsExpr RdrName)] cvtGuard (GuardedB pairs) = mapM cvtpair pairs |