From 5db4b3db7fa0920e99d54e0e9d36db69a5e0b40c Mon Sep 17 00:00:00 2001 From: Sean Gillespie <sean@mistersg.net> Date: Wed, 17 Jan 2018 22:23:14 -0500 Subject: [PATCH] Replace readline with haskeline * Use haskeline to alleviate headaches * Update to latest lts --- app/Main.hs | 4 ++-- lambda-calculator.cabal | 4 ++-- package.yaml | 2 +- stack.yaml | 11 ++++------- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index bf9abf8..3a1ea88 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -6,7 +6,7 @@ import Data.Semigroup import Options.Applicative hiding (ParseError) import System.Console.Shell import System.Console.Shell.ShellMonad -import System.Console.Shell.Backend.Readline (readlineBackend) +import System.Console.Shell.Backend.Haskeline (haskelineBackend) import qualified Paths_lambda_calculator as P @@ -73,7 +73,7 @@ cliParser = CliOptions runShell' :: CliOptions -> IO () runShell' CliOptions{version=True} = putStrLn version' runShell' CliOptions{language=Eval lang eval} - = runShell (mkShellDesc lang eval) readlineBackend () + = runShell (mkShellDesc lang eval) haskelineBackend () mkShellDesc :: Language -> (String -> Result String) diff --git a/lambda-calculator.cabal b/lambda-calculator.cabal index 311ede2..21391ff 100644 --- a/lambda-calculator.cabal +++ b/lambda-calculator.cabal @@ -2,7 +2,7 @@ -- -- see: https://github.com/sol/hpack -- --- hash: 9a56fe4c7e5a1adfc4da3434edc5d4540a51680a8c8023849d39866eb7602ccb +-- hash: 797b677552c81b80399ac8b69e2e398479887a332862d9878a7c508a259975ee name: lambda-calculator version: 2.0.0 @@ -53,7 +53,7 @@ executable lambda-calculator ghc-options: -threaded -rtsopts -with-rtsopts=-N build-depends: Shellac - , Shellac-readline + , Shellac-haskeline , base >=4.9 && <5 , lambda-calculator , optparse-applicative >=0.13 diff --git a/package.yaml b/package.yaml index 3929ffa..f935f54 100644 --- a/package.yaml +++ b/package.yaml @@ -40,7 +40,7 @@ executables: - lambda-calculator - optparse-applicative >=0.13 - Shellac - - Shellac-readline + - Shellac-haskeline tests: lambda-calculus-test: diff --git a/stack.yaml b/stack.yaml index 0639b74..d78ebf9 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,9 +1,6 @@ -flags: {} -extra-package-dbs: [] +resolver: lts-10.3 packages: -- '.' + - '.' extra-deps: -- Shellac-0.9.9 -- Shellac-readline-0.9.9 -- readline-1.0.3.0 -resolver: lts-10.0 + - Shellac-0.9.9 + - Shellac-haskeline-0.2.1 -- GitLab