misfortune 0.1.1.1 → 0.1.1.2
raw patch · 3 files changed
+5/−4 lines, 3 filesdep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: base
API changes (from Hackage documentation)
- Data.Fortune: filterFortunes :: (Enum a, Num a) => (IndexEntry -> Bool) -> FortuneFile -> IO [a]
+ Data.Fortune: filterFortunes :: (Num a, Enum a) => (IndexEntry -> Bool) -> FortuneFile -> IO [a]
- Data.Fortune: filterFortunesM :: (Enum a, Num a) => (IndexEntry -> IO Bool) -> FortuneFile -> IO [a]
+ Data.Fortune: filterFortunesM :: (Num a, Enum a) => (IndexEntry -> IO Bool) -> FortuneFile -> IO [a]
- Data.Fortune: filterFortunesWithIndex :: (Enum a, Num a) => (a -> IndexEntry -> Bool) -> FortuneFile -> IO [a]
+ Data.Fortune: filterFortunesWithIndex :: (Num a, Enum a) => (a -> IndexEntry -> Bool) -> FortuneFile -> IO [a]
- Data.Fortune: filterFortunesWithIndexM :: (Enum a, Num a) => (a -> IndexEntry -> IO Bool) -> FortuneFile -> IO [a]
+ Data.Fortune: filterFortunesWithIndexM :: (Num a, Enum a) => (a -> IndexEntry -> IO Bool) -> FortuneFile -> IO [a]
- Data.Fortune: mapFortunesWithIndex :: (Enum a, Num a) => (a -> IO b) -> FortuneFile -> IO [b]
+ Data.Fortune: mapFortunesWithIndex :: (Num a, Enum a) => (a -> IO b) -> FortuneFile -> IO [b]
- Data.Fortune: mapFortunesWithIndexM :: (Enum a, Num a) => (a -> IndexEntry -> IO b) -> FortuneFile -> IO [b]
+ Data.Fortune: mapFortunesWithIndexM :: (Num a, Enum a) => (a -> IndexEntry -> IO b) -> FortuneFile -> IO [b]
Files
- README.md +1/−1
- misfortune.cabal +1/−1
- src/Fortune.hs +3/−2
README.md view
@@ -1,4 +1,4 @@-misfortune+misfortune  =========== This is a fortune-mod clone. In addition to the features generally expected of a `fortune` program, this can be used as a Haskell library (`import Data.Fortune`) and also supports UTF-8 fortune files, configurable search paths, automatic merging of fortune databases with the same name (so you can have a local fortunes folder that just adds to existing fortune databases), filtering fortunes by line lengths, and a "print fortune matching regex" mode (instead of just "print all fortunes matching regex" mode).
misfortune.cabal view
@@ -1,5 +1,5 @@ name: misfortune-version: 0.1.1.1+version: 0.1.1.2 stability: experimental cabal-version: >= 1.6
src/Fortune.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE RecordWildCards #-}+{-# LANGUAGE FlexibleContexts #-} module Main (main) where import Control.Applicative@@ -44,7 +45,7 @@ let isErr = not (null errors) out = if isErr then stderr else stdout - mapM_ (hPutStr out) errors+ mapM_ (hPutStrLn out) errors when isErr (hPutStrLn out "") hPutStrLn out versionString@@ -97,7 +98,7 @@ parseArgs = do (opts, files, errors) <- getOpt Permute flags <$> getArgs- when (not (null errors)) (usage errors)+ when (not (null errors)) (usage (errors >>= lines)) when (H `elem` opts) (usage []) when (V `elem` opts) printVersion