dhall-nix 1.0.10 → 1.1.0
raw patch · 2 files changed
+18/−14 lines, 2 filesdep +insert-ordered-containersdep +scientificdep ~dhalldep ~optparse-genericPVP ok
version bump matches the API change (PVP)
Dependencies added: insert-ordered-containers, scientific
Dependency ranges changed: dhall, optparse-generic
API changes (from Hackage documentation)
- Dhall.Nix: NoDoubles :: Double -> CompileError
+ Dhall.Nix: NoDoubles :: Scientific -> CompileError
Files
- dhall-nix.cabal +13/−11
- src/Dhall/Nix.hs +5/−3
dhall-nix.cabal view
@@ -1,5 +1,5 @@ Name: dhall-nix-Version: 1.0.10+Version: 1.1.0 Cabal-Version: >=1.8.0.2 Build-Type: Simple Tested-With: GHC == 8.0.1@@ -27,15 +27,17 @@ Library Hs-Source-Dirs: src Build-Depends:- base >= 4.8.0.0 && < 5 ,- containers < 0.6 ,- data-fix < 0.3 ,- dhall >= 1.9.0 && < 1.10,- hnix >= 0.3.4 && < 0.4 ,- neat-interpolation < 0.4 ,- text >= 0.8.0.0 && < 1.3 ,- text-format < 0.4 ,- vector >= 0.3 && < 0.13+ base >= 4.8.0.0 && < 5 ,+ containers < 0.6 ,+ data-fix < 0.3 ,+ dhall >= 1.10.0 && < 1.11,+ hnix >= 0.3.4 && < 0.4 ,+ insert-ordered-containers >= 0.1.0.1 && < 0.3 ,+ neat-interpolation < 0.4 ,+ scientific < 0.4 ,+ text >= 0.8.0.0 && < 1.3 ,+ text-format < 0.4 ,+ vector >= 0.3 && < 0.13 Exposed-Modules: Dhall.Nix GHC-Options: -Wall@@ -48,7 +50,7 @@ dhall , dhall-nix , hnix ,- optparse-generic >= 1.1.1 && < 1.3,+ optparse-generic >= 1.1.1 && < 1.4, text , trifecta >= 1.0 && < 1.8 GHC-Options: -Wall
src/Dhall/Nix.hs view
@@ -94,6 +94,7 @@ import Control.Exception (Exception) import Data.Foldable (toList) import Data.Fix (Fix(..))+import Data.Scientific (Scientific) import Data.Typeable (Typeable) import Dhall.Core (Chunks(..), Const(..), Expr(..), Var(..)) import Dhall.TypeCheck (X(..))@@ -109,6 +110,7 @@ , ParamSet(..) ) +import qualified Data.HashMap.Strict.InsOrd import qualified Data.Map import qualified Data.Text import qualified Data.Text.Buildable@@ -124,7 +126,7 @@ data CompileError = CannotReferenceShadowedVariable Var -- ^ Nix does not provide a way to reference a shadowed variable- | NoDoubles Double+ | NoDoubles Scientific -- ^ Nix does not provide a way to represent floating point values | UnexpectedConstructorsKeyword -- ^ The @constructors@ keyword is not yet supported@@ -429,7 +431,7 @@ loop (RecordLit a) = do a' <- traverse loop a let a'' = do- (k, v) <- Data.Map.toAscList a'+ (k, v) <- Data.HashMap.Strict.InsOrd.toList a' let k' = Data.Text.Lazy.toStrict k return (NamedVar [StaticKey k'] v) return (Fix (NSet a''))@@ -438,7 +440,7 @@ v' <- loop v let k' = Data.Text.Lazy.toStrict k let e0 = do- k'' <- k : toList (Data.Map.keysSet kts)+ k'' <- k : Data.HashMap.Strict.InsOrd.keys kts return (Data.Text.Lazy.toStrict k'', Nothing) let e1 = Data.Map.fromAscList e0 let e2 = Fix (NApp (Fix (NSym k')) v')