From fedfa8e41ea8da32c2ee779ce65982544ed4800f Mon Sep 17 00:00:00 2001 From: quasicomputational Date: Fri, 5 Oct 2018 15:42:54 +0100 Subject: [PATCH] GHC 8.6 stuff (#623) This is the first version of repline with GHC 8.6 support, but it comes with some API changes. --- dhall.cabal | 4 ++-- nix/repline.nix | 11 +++++++++++ src/Dhall/Repl.hs | 5 +++-- stack-lts-11.yaml | 1 + stack-lts-6.yaml | 2 +- stack.yaml | 1 + 6 files changed, 19 insertions(+), 5 deletions(-) create mode 100644 nix/repline.nix diff --git a/dhall.cabal b/dhall.cabal index 20a0e24..b28761e 100644 --- a/dhall.cabal +++ b/dhall.cabal @@ -193,7 +193,7 @@ Library parsers >= 0.12.4 && < 0.13, prettyprinter >= 1.2.0.1 && < 1.3 , prettyprinter-ansi-terminal >= 1.1.1 && < 1.2 , - repline >= 0.1.6.0 && < 0.2 , + repline >= 0.2.0.0 && < 0.3 , serialise >= 0.2.0.0 && < 0.3 , scientific >= 0.3.0.0 && < 0.4 , template-haskell < 2.15, @@ -319,7 +319,7 @@ Benchmark deep-nested-large-record Main-Is: Main.hs Build-Depends: base >= 4 && < 5 , - containers >= 0.5.0.0 && < 0.6, + containers >= 0.5.0.0 && < 0.7, criterion >= 1.1 && < 1.6, dhall Default-Language: Haskell2010 diff --git a/nix/repline.nix b/nix/repline.nix new file mode 100644 index 0000000..e9fa564 --- /dev/null +++ b/nix/repline.nix @@ -0,0 +1,11 @@ +{ mkDerivation, base, containers, haskeline, mtl, process, stdenv +}: +mkDerivation { + pname = "repline"; + version = "0.2.0.0"; + sha256 = "ecc72092d0340b896ee6bf96bf6645694dbcd33361725a2cd28c5ab5d60c02de"; + libraryHaskellDepends = [ base containers haskeline mtl process ]; + homepage = "https://github.com/sdiehl/repline"; + description = "Haskeline wrapper for GHCi-like REPL interfaces"; + license = stdenv.lib.licenses.mit; +} diff --git a/src/Dhall/Repl.hs b/src/Dhall/Repl.hs index b7fe96d..567b475 100644 --- a/src/Dhall/Repl.hs +++ b/src/Dhall/Repl.hs @@ -45,10 +45,11 @@ repl characterSet explain _protocolVersion = io = evalStateT ( Repline.evalRepl - "⊢ " + ( pure "⊢ " ) ( dontCrash . eval ) options - ( Repline.Word completer ) + Nothing + ( Repline.Word completer ) greeter ) (emptyEnv { characterSet, explain, _protocolVersion }) diff --git a/stack-lts-11.yaml b/stack-lts-11.yaml index c56bd63..d3bb34c 100644 --- a/stack-lts-11.yaml +++ b/stack-lts-11.yaml @@ -4,6 +4,7 @@ extra-deps: - serialise-0.2.0.0 - megaparsec-7.0.0 - parser-combinators-1.0.0 + - repline-0.2.0.0 nix: packages: - ncurses diff --git a/stack-lts-6.yaml b/stack-lts-6.yaml index 8348cf0..9b6f145 100644 --- a/stack-lts-6.yaml +++ b/stack-lts-6.yaml @@ -16,7 +16,7 @@ extra-deps: - directory-1.2.7.1 - foundation-0.0.19 - process-1.6.2.0 -- repline-0.1.7.0 +- repline-0.2.0.0 - haskeline-0.7.4.2 - aeson-1.2.3.0 - th-abstraction-0.2.6.0 diff --git a/stack.yaml b/stack.yaml index 115bd78..24b0d63 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1,6 +1,7 @@ resolver: lts-12.4 extra-deps: - megaparsec-7.0.0@rev:0 + - repline-0.2.0.0@rev:0 # Version 0.2.0.0 of cborg, the latest on Hackage, is broken on i386. - github: well-typed/cborg commit: master