dhall-nix 1.1.0 → 1.1.1
raw patch · 2 files changed
+11/−12 lines, 2 filesdep −vectordep ~dhallPVP ok
version bump matches the API change (PVP)
Dependencies removed: vector
Dependency ranges changed: dhall
API changes (from Hackage documentation)
Files
- dhall-nix.cabal +3/−4
- src/Dhall/Nix.hs +8/−8
dhall-nix.cabal view
@@ -1,5 +1,5 @@ Name: dhall-nix-Version: 1.1.0+Version: 1.1.1 Cabal-Version: >=1.8.0.2 Build-Type: Simple Tested-With: GHC == 8.0.1@@ -30,14 +30,13 @@ base >= 4.8.0.0 && < 5 , containers < 0.6 , data-fix < 0.3 ,- dhall >= 1.10.0 && < 1.11,+ dhall >= 1.11.0 && < 1.12, 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+ text-format < 0.4 Exposed-Modules: Dhall.Nix GHC-Options: -Wall
src/Dhall/Nix.hs view
@@ -91,6 +91,7 @@ , CompileError(..) ) where +import Control.Applicative (empty) import Control.Exception (Exception) import Data.Foldable (toList) import Data.Fix (Fix(..))@@ -116,7 +117,6 @@ import qualified Data.Text.Buildable import qualified Data.Text.Lazy import qualified Data.Text.Lazy.Builder-import qualified Data.Vector import qualified Dhall.Core import qualified NeatInterpolation @@ -411,9 +411,9 @@ return (Fix (NAbs "t" e6)) loop Optional = return (Fix (NAbs "t" (Fix (NSet [])))) loop (OptionalLit _ b) =- if Data.Vector.null b- then return (Fix (NConstant NNull))- else loop (Data.Vector.head b)+ case b of+ Nothing -> return (Fix (NConstant NNull))+ Just c -> loop c loop OptionalFold = do let e0 = Fix (NBinary NEq "x" (Fix (NConstant NNull))) let e1 = Fix (NIf e0 "nothing" (Fix (NApp "just" "x")))@@ -423,8 +423,8 @@ let e0 = Pi "nothing" "optional" "optional" let e1 = Pi "just" (Pi "_" "a" "optional") e0 let e2 = Pi "optional" (Const Type) e1- let e3 = OptionalLit "a" Data.Vector.empty- let e4 = Lam "x" "a" (OptionalLit "a" (Data.Vector.singleton "x"))+ let e3 = OptionalLit "a" empty+ let e4 = Lam "x" "a" (OptionalLit "a" (pure "x")) let e5 = App (App (App "f" (App Optional "a")) e4) e3 loop (Lam "a" (Const Type) (Lam "f" e2 e5)) loop (Record _) = return (Fix (NSet []))@@ -457,7 +457,7 @@ let valL = Fix (NApp (Fix (NApp "builtins.getAttr" "k")) "kvsL") let valR = Fix (NApp (Fix (NApp "builtins.getAttr" "k")) "kvsR") - let empty = Fix (NList [])+ let empty_ = Fix (NList []) let toNameValue v = let bindings = [ NamedVar ["name" ] "k"@@ -471,7 +471,7 @@ let e6 = Fix (NBinary NAnd e4 e5) let e7 = Fix (NIf e6 (toNameValue e3) (toNameValue valR)) let e8 = Fix (NIf defR e7 (toNameValue valL))- let e9 = Fix (NIf defR (toNameValue valR) empty)+ let e9 = Fix (NIf defR (toNameValue valR) empty_) let toKeyVals = Fix (NAbs "k" (Fix (NIf defL e8 e9))) let ksL = Fix (NApp "builtins.attrNames" "kvsL")