packages feed

dhall-nix 1.1.24 → 1.1.25

raw patch · 2 files changed

+12/−3 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

dhall-nix.cabal view
@@ -1,5 +1,5 @@ Name: dhall-nix-Version: 1.1.24+Version: 1.1.25 Cabal-Version: >=1.10 Build-Type: Simple License: BSD3
src/Dhall/Nix.hs view
@@ -120,7 +120,9 @@ import Nix.Expr     ( Antiquoted (..)     , NExpr-    , NExprF (NStr)+    , NExprF (NStr, NSet)+    , NRecordType (NNonRecursive)+    , Binding (NamedVar)     , NKeyName (..)     , NString (..)     , Params (Param)@@ -596,7 +598,14 @@     loop (Record _) = return untranslatable     loop (RecordLit a) = do         a' <- traverse (loop . Dhall.Core.recordFieldValue) a-        return (Nix.attrsE (Dhall.Map.toList a'))+        return (nixAttrs (Dhall.Map.toList a'))+      where+        -- nonrecursive attrset that uses correctly quoted keys+        -- see https://github.com/dhall-lang/dhall-haskell/issues/2414+        nixAttrs pairs =+          Fix $ NSet NNonRecursive $+          (\(key, val) -> NamedVar (DynamicKey (Plain (DoubleQuoted [Plain key])) :| []) val Nix.nullPos)+          <$> pairs     loop (Union _) = return untranslatable     loop (Combine _ _ a b) = do         a' <- loop a