wordsetdiff 0.0.3 → 0.0.3.1
raw patch · 2 files changed
+7/−6 lines, 2 files
Files
- Text/WordSetDiff/Main.hs +5/−5
- wordsetdiff.cabal +2/−1
Text/WordSetDiff/Main.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE CPP #-} -------------------------------------------------------------------------------------------s+------------------------------------------------------------------------------------------ {-| Is one text file a subset of the other? Or is there some bit of new text that needs to be salvaged?@@ -17,7 +17,7 @@ -- TODO: can make the map of sets more efficient by defining a non-empty set type. -------------------------------------------------------------------------------------------s+------------------------------------------------------------------------------------------ module Main where @@ -88,8 +88,8 @@ #endif pack_window :: [B.ByteString] -> Window-toStrict :: BC.ByteString -> B.ByteString-toStrict lazy = +mytoStrict :: BC.ByteString -> B.ByteString+mytoStrict lazy = case BC.toChunks lazy of [] -> B.empty [a] -> a@@ -167,7 +167,7 @@ filtered = List.filter (not . B.null . fst) withpos withpos = List.scanl scanner (B.empty,-1) split - scanner (last,pos) chunk = (toStrict chunk, pos + (fromIntegral$ B.length last) + 1)+ scanner (last,pos) chunk = (mytoStrict chunk, pos + (fromIntegral$ B.length last) + 1) split = BC.splitWith (not . isWordChar) bs
wordsetdiff.cabal view
@@ -3,9 +3,10 @@ -- version 0.0.1: initial release -- version 0.0.2: switched to HashMap -- version 0.0.3: Added -l and -a options.+-- version 0.0.3.1: Small fix because of upstream change. Name: wordsetdiff-Version: 0.0.3+Version: 0.0.3.1 License: BSD3 License-file: LICENSE Stability: Beta