dhall-nix 1.1.21 → 1.1.22
raw patch · 2 files changed
+15/−4 lines, 2 filesdep ~dhallPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: dhall
API changes (from Hackage documentation)
Files
- dhall-nix.cabal +3/−4
- src/Dhall/Nix.hs +12/−0
dhall-nix.cabal view
@@ -1,8 +1,7 @@ Name: dhall-nix-Version: 1.1.21+Version: 1.1.22 Cabal-Version: >=1.10 Build-Type: Simple-Tested-With: GHC == 8.0.1 License: BSD3 License-File: LICENSE Copyright: 2017 Gabriel Gonzalez@@ -30,8 +29,8 @@ base >= 4.11.0.0 && < 5 , containers < 0.7 , data-fix < 0.4 ,- dhall >= 1.39 && < 1.40,- hnix >= 0.7 && < 0.14,+ dhall >= 1.40 && < 1.41,+ hnix >= 0.7 && < 0.15, lens-family-core >= 1.0.0 && < 2.2 , neat-interpolation < 0.6 , text >= 0.8.0.0 && < 1.3
src/Dhall/Nix.hs view
@@ -130,6 +130,7 @@ import qualified Dhall.Core import qualified Dhall.Map import qualified Dhall.Optics+import qualified Dhall.Pretty import qualified NeatInterpolation import qualified Nix @@ -482,6 +483,9 @@ let quoted = Nix.mkStr "\"" $+ replaced $+ Nix.mkStr "\"" return ("t" ==> quoted)+ loop Date = return untranslatable+ loop Time = return untranslatable+ loop TimeZone = return untranslatable loop List = return (Fix (NAbs "t" untranslatable)) loop (ListAppend a b) = do a' <- loop a@@ -537,6 +541,14 @@ loop Optional = return (Fix (NAbs "t" untranslatable)) loop (Some a) = loop a loop None = return (Fix (NConstant NNull))+ loop t+ | Just text <- Dhall.Pretty.temporalToText t = do+ loop (Dhall.Core.TextLit (Dhall.Core.Chunks [] text))+ -- The next three cases are not necessary, because they are handled by the+ -- previous case+ loop DateLiteral{} = undefined+ loop TimeLiteral{} = undefined+ loop TimeZoneLiteral{} = undefined loop (Record _) = return untranslatable loop (RecordLit a) = do a' <- traverse (loop . Dhall.Core.recordFieldValue) a