packages feed

Shellac-haskeline 0.2.0.2 → 0.2.1

raw patch · 2 files changed

+22/−13 lines, 2 filesdep ~mtlnew-uploaderPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: mtl

API changes (from Hackage documentation)

Files

Shellac-haskeline.cabal view
@@ -1,12 +1,13 @@ Name:           Shellac-haskeline-Cabal-Version:  >=1.6-Version:        0.2.0.2+Cabal-Version:  >=1.22+Version:        0.2.1 Category:       User Interfaces+Build-Type:     Simple License:        BSD3 License-File:   LICENSE Copyright:      (c) Judah Jacobson Author:         Judah Jacobson-Maintainer:     Judah Jacobson <judah.jacobson@gmail.com>+Maintainer:     Rob Dockins <robdockins@fastmail.fm> Category:       User Interfaces Synopsis:       Haskeline backend module for Shellac Description:    This module provides a backend for Shellac using the Haskeline library.  It@@ -15,9 +16,17 @@ Stability:      Experimental Build-Type:     Simple +Source-repository head+  type:     git+  location: git://github.com/robdockins/shellac+  subdir:   shellac-haskeline+ Library-    Build-depends: base>=3 && <5, Shellac==0.9.*, haskeline==0.7.*, -                   mtl>=2.0 && < 2.2+    Build-depends: base>=3 && <5,+                   Shellac==0.9.*,+                   haskeline==0.7.*,+                   mtl>=2.2 && < 2.3     Exposed-Modules:                 System.Console.Shell.Backend.Haskeline+    Default-Language: Haskell2010     ghc-options: -Wall
System/Console/Shell/Backend/Haskeline.hs view
@@ -24,16 +24,16 @@     complRef <- newIORef (wrapHaskelineCompleter listFiles)     dcomplRef <- newIORef Nothing     let completionWrapper = \line -> do-        wbcs <- readIORef wbcsRef-        compl <- readIORef complRef-        dcompl <- readIORef dcomplRef-        wrapShellacCompleter wbcs compl dcompl line+         wbcs <- readIORef wbcsRef+         compl <- readIORef complRef+         dcompl <- readIORef dcomplRef+         wrapShellacCompleter wbcs compl dcompl line     is <- initializeInput Settings {complete = completionWrapper,                         autoAddHistory = False,                         historyFile = Nothing}     return ShellacState {inputState = is, wordBreakChars = wbcsRef,                 completer = complRef, defaultCompleter = dcomplRef}-        + queryInputState :: ShellacState -> (InputT IO a) -> IO a queryInputState = queryInput . inputState @@ -46,7 +46,7 @@             flushOutput = \_ -> hFlush stdout,             getSingleChar = \ss pre -> queryInputState ss $ getInputChar pre,             getInput = \ss pre -> queryInputState ss $ getInputLine pre,-            addHistory = \ss line -> queryInputState ss +            addHistory = \ss line -> queryInputState ss                     $ modifyHistory $ History.addHistory line,             setWordBreakChars = \ss -> writeIORef (wordBreakChars ss),             getWordBreakChars = readIORef . wordBreakChars,@@ -59,10 +59,10 @@             setMaxHistoryEntries = \ss n -> let                         stifle = if n < 0 then Nothing else Just n                         in queryInputState ss $ modifyHistory $ History.stifleHistory stifle,-            getMaxHistoryEntries = \ss -> queryInputState ss +            getMaxHistoryEntries = \ss -> queryInputState ss                             $ fmap (fromMaybe (-1) . History.stifleAmount)                                 getHistory,-            readHistory = \ss file -> History.readHistory file +            readHistory = \ss file -> History.readHistory file                                 >>= queryInputState ss . putHistory,             writeHistory = \ss file -> queryInputState ss getHistory                                         >>= History.writeHistory file