packages feed

apply-refact 0.4.0.0 → 0.4.1.0

raw patch · 3 files changed

+12/−4 lines, 3 files

Files

CHANGELOG view
@@ -1,3 +1,11 @@+v0.4.1.0++	* 8.2 release compatability++v0.4.0.0++	* 8.2rc2 compatability+ v0.3.0.1  	* Version bound tweaking to build with optparse-applicative 0.13
apply-refact.cabal view
@@ -2,7 +2,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                apply-refact-version:             0.4.0.0+version:             0.4.1.0 synopsis:            Perform refactorings specified by the refact library. description:         Perform refactorings specified by the refact library. It is primarily used with HLint's --refactor flag. license:             BSD3
src/Refact/Apply.hs view
@@ -250,16 +250,16 @@ -- it is not specific enough. Instead we match on some bigger context which -- is contains the located name we want to replace. identSub :: Data a => a -> [(String, GHC.SrcSpan)] -> FunBind -> M FunBind-identSub m subs old@(GHC.FunRhs (GHC.L _ name) _) =+identSub m subs old@(GHC.FunRhs (GHC.L _ name) _ _) =   resolveRdrName' subst (findName m) old subs name   where     subst :: FunBind -> Name -> M FunBind-    subst (GHC.FunRhs n b) new = do+    subst (GHC.FunRhs n b s) new = do       let fakeExpr = GHC.L (getLoc new) (GHC.VarPat new)       -- Low level version as we need to combine the annotation information       -- from the template RdrName and the original VarPat.       modify (\r -> replaceAnnKey r (mkAnnKey n) (mkAnnKey fakeExpr) (mkAnnKey new) (mkAnnKey fakeExpr))-      return $ GHC.FunRhs new b+      return $ GHC.FunRhs new b s     subst o _ = return o identSub _ _ e = return e