packages feed

haskeline 0.7.1.3 → 0.7.2.0

raw patch · 7 files changed

+25/−18 lines, 7 filesdep ~basedep ~filepathPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base, filepath

API changes (from Hackage documentation)

+ System.Console.Haskeline.Completion: instance [overlap ok] Eq Completion
+ System.Console.Haskeline.Completion: instance [overlap ok] Ord Completion
- System.Console.Haskeline.MonadException: class (Typeable e, Show e) => Exception e
+ System.Console.Haskeline.MonadException: class (Typeable * e, Show e) => Exception e

Files

Changelog view
@@ -1,3 +1,11 @@+Changed in version 0.7.2.0:+   * Bump upper-bound on base and filepath libraries to accomodate GHC HEAD (7.10)+   * Drop Cabal dependency to 1.10+   * Use explicit forall syntax to avoid warning+   * Support Applicative/Monad proposal in Win32/Draw backend+   * Add Eq/Ord instances to Completion+   * Add a "forall" quantifier before rank-n types+ Changed in version 0.7.1.3:    * Add support for transformers-0.4.0.0. 
System/Console/Haskeline/Backend/Win32.hsc view
@@ -260,9 +260,9 @@ closeHandles hs = closeHandle (hIn hs) >> closeHandle (hOut hs)
 
 newtype Draw m a = Draw {runDraw :: ReaderT Handles m a}
-    deriving (Monad,MonadIO,MonadException, MonadReader Handles)
+    deriving (Functor, Applicative, Monad, MonadIO, MonadException, MonadReader Handles)
 
-type DrawM a = (MonadIO m, MonadReader Layout m) => Draw m a
+type DrawM a = forall m . (MonadIO m, MonadReader Layout m) => Draw m a
 
 instance MonadTrans Draw where
     lift = Draw . lift
System/Console/Haskeline/Command/Completion.hs view
@@ -85,7 +85,7 @@             -> CmdM m () askFirst prefs n cmd     | maybe False (< n) (completionPromptLimit prefs) = do-        _ <- setState (Message () $ "Display all " ++ show n+        _ <- setState (Message $ "Display all " ++ show n                                  ++ " possibilities? (y or n)")         keyChoiceCmdM [             simpleChar 'y' +> cmd@@ -96,7 +96,7 @@ pageCompletions :: MonadReader Layout m => [String] -> CmdM m () pageCompletions [] = return () pageCompletions wws@(w:ws) = do-    _ <- setState $ Message () "----More----"+    _ <- setState $ Message "----More----"     keyChoiceCmdM [         simpleChar '\n' +> oneLine         , simpleKey DownKey +> oneLine
System/Console/Haskeline/Completion.hs view
@@ -39,7 +39,7 @@                             -- ^ Whether this word should be followed by a                             -- space, end quote, etc.                             }-                    deriving Show+                    deriving (Eq, Ord, Show)  -- | Disable completion altogether. noCompletion :: Monad m => CompletionFunc m@@ -51,7 +51,7 @@ -- | A custom 'CompletionFunc' which completes the word immediately to the left of the cursor. -- -- A word begins either at the start of the line or after an unescaped whitespace character.-completeWord :: Monad m => Maybe Char +completeWord :: Monad m => Maybe Char         -- ^ An optional escape character         -> [Char]-- ^ Characters which count as whitespace         -> (String -> m [Completion]) -- ^ Function to produce a list of possible completions@@ -119,7 +119,7 @@ completeQuotedWord :: Monad m => Maybe Char -- ^ An optional escape character                             -> [Char] -- ^ Characters which set off quotes                             -> (String -> m [Completion]) -- ^ Function to produce a list of possible completions-                            -> CompletionFunc m -- ^ Alternate completion to perform if the +                            -> CompletionFunc m -- ^ Alternate completion to perform if the                                             -- cursor is not at a quoted word                             -> CompletionFunc m completeQuotedWord esc qs completer alterative line@(left,_)@@ -136,7 +136,7 @@  splitAtQuote :: Maybe Char -> String -> String -> Maybe (String,String) splitAtQuote esc qs line = case line of-    c:e:cs | isEscape e && isEscapable c  +    c:e:cs | isEscape e && isEscapable c                         -> do                             (w,rest) <- splitAtQuote esc qs cs                             return (c:w,rest)@@ -164,9 +164,9 @@     -- get all of the files in that directory, as basenames     allFiles <- if not dirExists                     then return []-                    else fmap (map completion . filterPrefix) +                    else fmap (map completion . filterPrefix)                             $ getDirectoryContents fixedDir-    -- The replacement text should include the directory part, and also +    -- The replacement text should include the directory part, and also     -- have a trailing slash if it's itself a directory.     forM allFiles $ \c -> do             isDir <- doesDirectoryExist (fixedDir </> replacement c)
System/Console/Haskeline/LineState.hs view
@@ -356,10 +356,9 @@ applyCmdArg f am = withCommandMode (repeatN (arg am) f) (argState am)  ------------------ TODO: messageState param not needed anymore.-data Message s = Message {messageState :: s, messageText :: String}+newtype Message = Message {messageText :: String} -instance LineState (Message s) where+instance LineState Message where     beforeCursor _ = stringToGraphemes . messageText     afterCursor _ = [] 
System/Console/Haskeline/Term.hs view
@@ -40,7 +40,7 @@ -- | Operations needed for terminal-style interaction. data TermOps = TermOps {             getLayout :: IO Layout-            , withGetEvent :: CommandMonad m => (m Event -> m a) -> m a+            , withGetEvent :: forall m a . CommandMonad m => (m Event -> m a) -> m a             , evalTerm :: forall m . CommandMonad m => EvalTerm m             , saveUnusedKeys :: [Key] -> IO ()         }
haskeline.cabal view
@@ -1,6 +1,6 @@ Name:           haskeline-Cabal-Version:  >=1.16-Version:        0.7.1.3+Cabal-Version:  >=1.10+Version:        0.7.2.0 Category:       User Interfaces License:        BSD3 License-File:   LICENSE@@ -50,9 +50,9 @@     Default: False  Library-    Build-depends: base >=4.3 && < 4.8, containers>=0.4 && < 0.6,+    Build-depends: base >=4.3 && < 4.9, containers>=0.4 && < 0.6,                    directory>=1.1 && < 1.3, bytestring>=0.9 && < 0.11,-                   filepath >= 1.2 && < 1.4, transformers >= 0.2 && < 0.5+                   filepath >= 1.2 && < 1.5, transformers >= 0.2 && < 0.5     Default-Language: Haskell98     Default-Extensions:                  ForeignFunctionInterface, Rank2Types, FlexibleInstances,