hsdev 0.2.3.2 → 0.2.4.0
raw patch · 2 files changed
+6/−6 lines, 2 filesdep ~hlintdep ~text-region
Dependency ranges changed: hlint, text-region
Files
- hsdev.cabal +3/−3
- src/HsDev/Tools/AutoFix.hs +3/−3
hsdev.cabal view
@@ -1,5 +1,5 @@ name: hsdev -version: 0.2.3.2 +version: 0.2.4.0 synopsis: Haskell development library description: Haskell development library and tool with support of autocompletion, symbol info, go to declaration, find references, hayoo search etc. @@ -132,7 +132,7 @@ haskell-src-exts >= 1.18.0 && < 1.20.0, hdocs >= 0.5.0, hformat == 0.2.*, - hlint >= 1.9.13 && < 2.0.0, + hlint >= 1.9.13 && < 2.1, HTTP >= 4000.2.0, lens >= 4.8, lifted-base >= 0.2, @@ -149,7 +149,7 @@ syb >= 0.5.1, template-haskell, text >= 1.2.0, - text-region == 0.2.*, + text-region == 0.3.*, time >= 1.5.0, transformers >= 0.4.0, transformers-base >= 0.4.0,
src/HsDev/Tools/AutoFix.hs view
@@ -55,12 +55,12 @@ note (Correction (view (note . message) n) - (replace (fromRegion $ view noteRegion n) (by sugg))) + (replace (fromRegion $ view noteRegion n) sugg)) n -- | Apply corrections autoFix :: [Note Correction] -> ([Note Correction], Maybe String) -> ([Note Correction], Maybe String) -autoFix ns (upd, mcts) = (over (each . note . corrector . replaceRegion) (update act) upd, over (_Just . contents) (apply act) mcts) where +autoFix ns (upd, mcts) = (over (each . note . corrector . replaceRegion) (update act) upd, over _Just (apply act) mcts) where act = Edit (ns ^.. each . note . corrector) type CorrectorMatch = Note OutputMessage -> Maybe (Note Correction) @@ -75,7 +75,7 @@ (g `at` 1) (replace ((rgn ^. regionFrom) `regionSize` pt 0 (length $ g `at` 2)) - (by $ g `at` 3))] + (g `at` 3))] match :: String -> ((Int -> Maybe String) -> R.Region -> Correction) -> CorrectorMatch match pat f n = do