hist-pl 0.3.0 → 0.3.1
raw patch · 2 files changed
+19/−6 lines, 2 filesdep +pipesdep ~hist-pl-dawgdep ~hist-pl-lexiconPVP ok
version bump matches the API change (PVP)
Dependencies added: pipes
Dependency ranges changed: hist-pl-dawg, hist-pl-lexicon
API changes (from Hackage documentation)
Files
- hist-pl.cabal +5/−4
- tools/hist-pl.hs +14/−2
hist-pl.cabal view
@@ -1,5 +1,5 @@ name: hist-pl-version: 0.3.0+version: 0.3.1 synopsis: Umbrella package for the historical dictionary of Polish description: The package provides a tool for creating and searching the@@ -22,7 +22,7 @@ , containers , text , aeson >= 0.6 && < 0.7- , hist-pl-lexicon >= 0.5 && < 0.6+ , hist-pl-lexicon >= 0.6 && < 0.7 , hist-pl-transliter >= 0.1 && < 0.2 , morfeusz >= 0.4 && < 0.5 @@ -34,10 +34,11 @@ , cmdargs , bytestring , aeson-pretty >= 0.7 && < 0.8+ , pipes >= 3.3 && < 3.4 , polimorf >= 0.7.1 && < 0.8- , hist-pl-lexicon >= 0.5 && < 0.6+ , hist-pl-lexicon >= 0.6 && < 0.7 , hist-pl-fusion >= 0.5 && < 0.6- , hist-pl-dawg >= 0.1 && < 0.2+ , hist-pl-dawg >= 0.2 && < 0.3 , hist-pl-lmf >= 0.1 && < 0.2 source-repository head
tools/hist-pl.hs view
@@ -6,6 +6,7 @@ import Control.Applicative ((<$>)) import Control.Monad (void, forM_, (<=<))+import Control.Proxy import System.Console.CmdArgs import qualified Data.Set as S import qualified Data.Map as M@@ -107,7 +108,7 @@ -- putStrLn "Reading historical dictionary of Polish..." hist <- LMF.readLMF lmfPath -- putStrLn "Creating the binary version of the dictionary..."- void $ H.build outPath (addForms poli hist)+ runProxy $ fromListI (addForms poli hist) >-> H.save outPath where addForms poli hist = [ ( lexEntry@@ -121,7 +122,7 @@ exec Print{..} = do hpl <- H.open binPath- H.loadAll hpl >>= L.putStr . LMF.showLMF . map snd+ runProxy $ H.load hpl >-> mapMD (L.putStrLn . LMF.showLexEntry . snd) exec Analyse{..} = do@@ -145,3 +146,14 @@ 2 -> A.ForceShowCont _ -> A.ShowCont , A.showDefs = printDefs }+++---------------------------------------+-- Misc+---------------------------------------+++fromListI :: (Monad m, Proxy p) => [a] -> () -> Producer p (Maybe a) m r+fromListI xs () = runIdentityP $ do+ mapM_ (respond . Just) xs+ forever $ respond Nothing