packages feed

aspell-pipe 0.4 → 0.5

raw patch · 3 files changed

+15/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Text.Aspell: RawArg :: Text -> AspellOption

Files

CHANGELOG.md view
@@ -1,4 +1,11 @@ +0.5+---++New features:+ * Added support for passing arguments directly to `aspell` via the new+   `RawArg` constructor of `AspellOption` (#6)+ 0.4 --- 
aspell-pipe.cabal view
@@ -1,5 +1,5 @@ name:                aspell-pipe-version:             0.4+version:             0.5 synopsis:            Pipe-based interface to the Aspell program description:         A pipe-based interface to the Aspell program (no                      dynamic linking required).
src/Text/Aspell.hs view
@@ -75,10 +75,15 @@ data AspellOption =     UseDictionary T.Text     -- ^ Use the specified dictionary (see aspell -d).+    | RawArg T.Text+    -- ^ Provide a command-line argument directly to aspell.     deriving (Show, Eq)  -- | Start Aspell with the specified options. Returns either an error -- message on failure or an Aspell handle on success.+--+-- Any 'RawArg's provided in the option list are provided to @aspell@ as+-- command-line arguments in the order provided. startAspell :: [AspellOption] -> IO (Either String Aspell) startAspell options = do     optResult <- checkOptions options@@ -139,6 +144,7 @@ aspellCommand = "aspell"  checkOption :: AspellOption -> IO (Maybe String)+checkOption (RawArg {}) = return Nothing checkOption (UseDictionary d) = do     -- Get the list of installed dictionaries and check whether the     -- desired dictionary is included.@@ -158,6 +164,7 @@  optionToArgs :: AspellOption -> [String] optionToArgs (UseDictionary d) = ["-d", T.unpack d]+optionToArgs (RawArg val) = [T.unpack val]  -- | Stop a running Aspell instance. stopAspell :: Aspell -> IO ()