packages feed

dhall 1.38.0 → 1.38.1

raw patch · 8 files changed

+32/−19 lines, 8 filesdep ~basedep ~doctestdep ~generic-randomPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, doctest, generic-random, memory

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,13 @@+1.38.1++* [Add `INLINABLE` annotations in more places](https://github.com/dhall-lang/dhall-haskell/pull/2164)+    * This may improve performance by enabling more specializations+* [Fix `hashable`-related test failures](https://github.com/dhall-lang/dhall-haskell/pull/2152)+* [Fix support for GHC 8.4.4](https://github.com/dhall-lang/dhall-haskell/pull/2143)+    * … by using `GeneralizedNewtypeDeriving` (with a `z`)+* [Allow doctest-0.18](https://github.com/dhall-lang/dhall-haskell/pull/2148)+* [Allow bytestring-0.11](https://github.com/dhall-lang/dhall-haskell/pull/2144)+ 1.38.0  * [BREAKING CHANGE: Detect preferred character set from input](https://github.com/dhall-lang/dhall-haskell/pull/2108)
dhall.cabal view
@@ -1,6 +1,6 @@ Name: dhall-Version: 1.38.0-Cabal-Version: >=1.10+Version: 1.38.1+Cabal-Version: 2.0 Build-Type: Simple Tested-With: GHC == 8.4.3, GHC == 8.6.1 License: BSD3@@ -477,7 +477,7 @@         aeson-pretty                               < 0.9 ,         ansi-terminal               >= 0.6.3.1  && < 0.12,         atomic-write                >= 0.2.0.7  && < 0.3 ,-        bytestring                                 < 0.11,+        bytestring                                 < 0.12,         case-insensitive                           < 1.3 ,         cborg                       >= 0.2.0.0  && < 0.3 ,         cborg-json                  >= 0.2.2.0  && < 0.3 ,@@ -657,7 +657,7 @@         Dhall.Test.Util     Build-Depends:         base                      >= 4        && < 5   ,-        bytestring                               < 0.11,+        bytestring                                     ,         cborg                     >= 0.2.0.0  && < 0.3 ,         containers                                     ,         data-fix                                       ,@@ -705,7 +705,7 @@         directory                     ,         filepath                < 1.5 ,         mockery                 < 0.4 ,-        doctest   >= 0.7.0   && < 0.18+        doctest   >= 0.7.0   && < 0.19     Default-Language: Haskell2010  Benchmark dhall-parser
src/Dhall.hs view
@@ -195,7 +195,7 @@ import qualified Data.Functor.Product import qualified Data.HashMap.Strict              as HashMap import qualified Data.HashSet-import qualified Data.List+import qualified Data.List                        as List import qualified Data.List.NonEmpty import qualified Data.Map import qualified Data.Maybe@@ -1183,7 +1183,7 @@             vList = Data.Foldable.toList vSeq             vSet = toSet vList             sameSize = size vSet == Data.Sequence.length vSeq-            duplicates = vList Data.List.\\ Data.Foldable.toList vSet+            duplicates = vList List.\\ Data.Foldable.toList vSet             err | length duplicates == 1 =                      "One duplicate element in the list: "                      <> (Data.Text.pack $ show $ head duplicates)@@ -1216,10 +1216,10 @@  {-| Decode a `HashMap` from a @toMap@ expression or generally a @Prelude.Map.Type@ ->>> input (Dhall.hashMap strictText bool) "toMap { a = True, b = False }"-fromList [("a",True),("b",False)]->>> input (Dhall.hashMap strictText bool) "[ { mapKey = \"foo\", mapValue = True } ]"-fromList [("foo",True)]+>>> fmap (List.sort . HashMap.toList) (input (Dhall.hashMap strictText bool) "toMap { a = True, b = False }")+[("a",True),("b",False)]+>>> fmap (List.sort . HashMap.toList) (input (Dhall.hashMap strictText bool) "[ { mapKey = \"foo\", mapValue = True } ]")+[("foo",True)]  If there are duplicate @mapKey@s, later @mapValue@s take precedence: @@ -2198,13 +2198,7 @@ instance ToDhall a => ToDhall (Data.Set.Set a) where     injectWith = fmap (contramap Data.Set.toAscList) injectWith -{-| Note that the output list may not be sorted-->>> let x = Data.HashSet.fromList ["hi", "mom" :: Text]->>> prettyExpr $ embed inject x-[ "mom", "hi" ]---}+-- | Note that the output list may not be sorted instance ToDhall a => ToDhall (Data.HashSet.HashSet a) where     injectWith = fmap (contramap Data.HashSet.toList) injectWith 
src/Dhall/Core.hs view
@@ -142,6 +142,7 @@ throws :: (Exception e, MonadIO io) => Either e a -> io a throws (Left  e) = liftIO (Control.Exception.throwIO e) throws (Right r) = return r+{-# INLINABLE throws #-}  {- $setup >>> import qualified Codec.Serialise
src/Dhall/Eval.hs view
@@ -144,6 +144,7 @@ toVHPi (VPi a b@(Closure x _ _)) = Just (x, a, instantiate b) toVHPi (VHPi x a b             ) = Just (x, a, b) toVHPi  _                        = Nothing+{-# INLINABLE toVHPi #-}  data Val a     = VConst !Const@@ -1025,6 +1026,7 @@ judgmentallyEqual :: Eq a => Expr s a -> Expr t a -> Bool judgmentallyEqual (Syntax.denote -> t) (Syntax.denote -> u) =     conv Empty (eval Empty t) (eval Empty u)+{-# INLINABLE judgmentallyEqual #-}  data Names   = EmptyNames@@ -1226,6 +1228,7 @@  normalize :: Eq a => Expr s a -> Expr t a normalize = nf Empty+{-# INLINABLE normalize #-}  alphaNormalize :: Expr s a -> Expr s a alphaNormalize = goEnv EmptyNames
src/Dhall/Import.hs view
@@ -1254,6 +1254,7 @@ assertNoImports :: MonadIO io => Expr Src Import -> io (Expr Src Void) assertNoImports expression =     Core.throws (traverse (\_ -> Left ImportResolutionDisabled) expression)+{-# INLINABLE assertNoImports #-}  {-| This function is used by the @--transitive@ option of the     @dhall {freeze,format,lint}@ subcommands to determine which dependencies
src/Dhall/Normalize.hs view
@@ -160,6 +160,7 @@ normalizeWith :: Eq a => Maybe (ReifiedNormalizer a) -> Expr s a -> Expr t a normalizeWith (Just ctx) t = runIdentity (normalizeWithM (getReifiedNormalizer ctx) t) normalizeWith _          t = Eval.normalize t+{-# INLINABLE normalizeWith #-}  {-| This function generalizes `normalizeWith` by allowing the custom normalizer     to use an arbitrary `Monad`@@ -940,6 +941,7 @@     denote' = Syntax.denote      strippedExpression = denote' expression+{-# INLINABLE freeIn #-}  {- $setup >>> import Dhall.Syntax (Const(..))
src/Dhall/Syntax.hs view
@@ -4,7 +4,7 @@ {-# LANGUAGE DeriveLift                 #-} {-# LANGUAGE DeriveTraversable          #-} {-# LANGUAGE DerivingStrategies         #-}-{-# LANGUAGE GeneralisedNewtypeDeriving #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE LambdaCase                 #-} {-# LANGUAGE OverloadedLists            #-} {-# LANGUAGE OverloadedStrings          #-}@@ -890,6 +890,7 @@         <*> f e         <*> pure s1         <*> pure s2+{-# INLINABLE recordFieldExprs #-}  {-| Traverse over the immediate 'Expr' children in a 'FunctionBinding'. -}@@ -904,6 +905,7 @@         <*> pure s1         <*> pure s2         <*> f type_+{-# INLINABLE functionBindingExprs #-}  -- | A traversal over the immediate sub-expressions in 'Chunks'. chunkExprs