packages feed

dhall-bash 1.0.13 → 1.0.14

raw patch · 3 files changed

+11/−15 lines, 3 filesdep −formattingdep ~dhallPVP ok

version bump matches the API change (PVP)

Dependencies removed: formatting

Dependency ranges changed: dhall

API changes (from Hackage documentation)

Files

dhall-bash.cabal view
@@ -1,5 +1,5 @@ Name: dhall-bash-Version: 1.0.13+Version: 1.0.14 Cabal-Version: >=1.8.0.2 Build-Type: Simple Tested-With: GHC == 7.10.2, GHC == 8.0.1@@ -31,8 +31,7 @@         base                      >= 4.8.0.0 && < 5   ,         bytestring                              < 0.11,         containers                              < 0.6 ,-        formatting                >= 6.3     && < 6.4 ,-        dhall                     >= 1.14.0  && < 1.15,+        dhall                     >= 1.15.0  && < 1.16,         insert-ordered-containers >= 0.1.0.1 && < 0.3 ,         neat-interpolation                      < 0.4 ,         shell-escape                            < 0.3 ,
exec/Main.hs view
@@ -14,7 +14,7 @@  import qualified Control.Exception import qualified Data.ByteString-import qualified Data.Text.Lazy.IO+import qualified Data.Text.IO import qualified Dhall import qualified Dhall.Bash import qualified Dhall.Import@@ -38,7 +38,7 @@     Options {..} <- Options.Generic.getRecord "Compile Dhall to Bash"      (if unHelpful explain then Dhall.detailed else id) (handle (do-        inText <- Data.Text.Lazy.IO.getContents+        inText <- Data.Text.IO.getContents          expr <- case Dhall.Parser.exprFromText "(stdin)" inText of             Left  err  -> Control.Exception.throwIO err
src/Dhall/Bash.hs view
@@ -112,10 +112,7 @@ import qualified Data.HashMap.Strict.InsOrd import qualified Data.Text import qualified Data.Text.Encoding-import qualified Data.Text.Lazy-import qualified Data.Text.Lazy.Builder import qualified Dhall.Core-import qualified Formatting.Buildable import qualified NeatInterpolation import qualified Text.ShellEscape @@ -146,7 +143,8 @@ ↳ $txt |]       where-        txt = Data.Text.Lazy.toStrict (Dhall.Core.pretty e)+        txt = Dhall.Core.pretty e+     show (UnsupportedSubexpression e) =         -- Carefully note: No tip suggesting `--declare` since it won't work         -- here (and the user is already using `--declare`)@@ -161,7 +159,7 @@ ↳ $txt |]       where-        txt = Data.Text.Lazy.toStrict (Dhall.Core.pretty e)+        txt = Dhall.Core.pretty e  instance Exception StatementError @@ -186,7 +184,7 @@ ↳ $txt$tip |]       where-        txt = Data.Text.Lazy.toStrict (Dhall.Core.pretty e)+        txt = Dhall.Core.pretty e          tip = case e of             OptionalLit _ _ -> "\n\n" <> [NeatInterpolation.text|@@ -257,7 +255,7 @@     go (RecordLit a) = do         let process (k, v) = do                 v' <- dhallToExpression v-                let bytes = Data.Text.Encoding.encodeUtf8 (Data.Text.Lazy.toStrict k)+                let bytes = Data.Text.Encoding.encodeUtf8 k                 let k'    = Text.ShellEscape.bytes (Text.ShellEscape.bash bytes)                 return ("[" <> k' <> "]=" <> v')         kvs' <- first adapt (traverse process (Data.HashMap.Strict.InsOrd.toList a))@@ -291,9 +289,8 @@     go (NaturalLit a) = do         go (IntegerLit (fromIntegral a))     go (IntegerLit a) = do-        go (TextLit (Chunks [] (Formatting.Buildable.build a)))+        go (TextLit (Chunks [] (Data.Text.pack (show a))))     go (TextLit (Chunks [] a)) = do-        let text  = Data.Text.Lazy.Builder.toLazyText a-        let bytes = Data.Text.Encoding.encodeUtf8 (Data.Text.Lazy.toStrict text)+        let bytes = Data.Text.Encoding.encodeUtf8 a         return (Text.ShellEscape.bytes (Text.ShellEscape.bash bytes))     go e = Left (UnsupportedExpression e)