hakyll-dhall 0.2.4.0 → 0.2.5.0
raw patch · 3 files changed
+27/−13 lines, 3 filesdep +eitherdep ~dhallPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependencies added: either
Dependency ranges changed: dhall
API changes (from Hackage documentation)
- Hakyll.Web.Dhall: instance Data.Text.Prettyprint.Doc.Internal.Pretty a => Hakyll.Core.Writable.Writable (Hakyll.Web.Dhall.DExpr a)
- Hakyll.Web.Dhall: instance Hakyll.Web.Dhall.DefaultDhallResolver Dhall.Syntax.Import
+ Hakyll.Web.Dhall: instance Hakyll.Web.Dhall.DefaultDhallResolver Dhall.Syntax.Import.Import
+ Hakyll.Web.Dhall: instance Prettyprinter.Internal.Pretty a => Hakyll.Core.Writable.Writable (Hakyll.Web.Dhall.DExpr a)
- Hakyll.Web.Dhall: [DRFull] :: {_drTrust :: Set DhallCompilerTrust " Set of "trusted" import behaviors. Files with external references or imports that aren't described in this set are always rebuilt every time. Default: @'S.singleton' 'DCTRemote'@ That is, do not trust any dependencies on the local disk outside of the project directory, but trust that any URL imports remain unchanged."} -> DhallResolver Void
+ Hakyll.Web.Dhall: [DRFull] :: Set DhallCompilerTrust -> DhallResolver Void
- Hakyll.Web.Dhall: [DRRaw] :: {_drRemap :: Import -> Compiler (Expr Src Import) " Optionally remap the destinations. __Important:__ '_drRemap' is /not/ applied recursively; it is only applied once. Any imports in the resulting 'Expr Src Import' are not re-expanded. Default: leave imports unchanged"} -> DhallResolver Import
+ Hakyll.Web.Dhall: [DRRaw] :: (Import -> Compiler (Expr Src Import)) -> DhallResolver Import
- Hakyll.Web.Dhall: dcoMinimize :: forall a_axMB. Lens' (DhallCompilerOptions a_axMB) Bool
+ Hakyll.Web.Dhall: dcoMinimize :: forall a_akvJ. Lens' (DhallCompilerOptions a_akvJ) Bool
- Hakyll.Web.Dhall: dcoNormalize :: forall a_axMB. Lens' (DhallCompilerOptions a_axMB) Bool
+ Hakyll.Web.Dhall: dcoNormalize :: forall a_akvJ. Lens' (DhallCompilerOptions a_akvJ) Bool
- Hakyll.Web.Dhall: dcoResolver :: forall a_axMB a_aBnc. Lens (DhallCompilerOptions a_axMB) (DhallCompilerOptions a_aBnc) (DhallResolver a_axMB) (DhallResolver a_aBnc)
+ Hakyll.Web.Dhall: dcoResolver :: forall a_akvJ a_alKK. Lens (DhallCompilerOptions a_akvJ) (DhallCompilerOptions a_alKK) (DhallResolver a_akvJ) (DhallResolver a_alKK)
Files
- CHANGELOG.md +9/−0
- hakyll-dhall.cabal +7/−7
- src/Hakyll/Web/Dhall.hs +11/−6
CHANGELOG.md view
@@ -1,6 +1,15 @@ CHANGELOG ========= +Version 0.2.5.0+---------------++*December 27, 2023*++<https://github.com/mstksg/hakyll-dhall/releases/tag/v0.2.5.0>++* Compatibility with *dhall-1.33*, dropping support for previous dhalls.+ Version 0.2.4.0 ---------------
hakyll-dhall.cabal view
@@ -1,13 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.2.+-- This file has been generated from package.yaml by hpack version 0.35.2. -- -- see: https://github.com/sol/hpack------ hash: 8217e2fc7df098b437688872bf86eb4566e4405b3e3f40efa69661d9cd2c3c49 name: hakyll-dhall-version: 0.2.4.0+version: 0.2.5.0 synopsis: Dhall compiler for Hakyll description: Hakyll compiler and loader for Dhall files. Functions are intended to track all local dependencies within the project directory, so rebuilds are@@ -24,8 +22,9 @@ copyright: (c) Justin Le 2018 license: BSD3 license-file: LICENSE-tested-with: GHC >= 8.4 build-type: Simple+tested-with:+ GHC >= 8.4 extra-source-files: README.md CHANGELOG.md@@ -52,7 +51,8 @@ , binary , containers , data-default-class- , dhall >=1.29+ , dhall >=1.33+ , either , filepath , hakyll >=4.10 , microlens@@ -72,7 +72,7 @@ ghc-options: -Wall -Wcompat -Wredundant-constraints -threaded -rtsopts -with-rtsopts=-N build-depends: base >=4.7 && <5- , dhall >=1.29+ , dhall , hakyll >=4.10 , hakyll-dhall default-language: Haskell2010
src/Hakyll/Web/Dhall.hs view
@@ -74,6 +74,7 @@ import Control.Monad import Control.Monad.Error.Class+import Data.Either.Validation import Control.Monad.Trans.State.Strict import Data.Default.Class import Data.Kind@@ -88,7 +89,6 @@ import Dhall.Parser import Dhall.Pretty import Dhall.TypeCheck-import GHC.Generics (Generic) import Hakyll.Core.Compiler import Hakyll.Core.Compiler.Internal import Hakyll.Core.Dependencies@@ -104,8 +104,8 @@ import qualified Data.Binary.Put as Bi import qualified Data.Set as S import qualified Data.Text as T-import qualified Data.Text.Prettyprint.Doc as PP-import qualified Data.Text.Prettyprint.Doc.Render.Text as PP+import qualified Prettyprinter as PP+import qualified Prettyprinter.Render.Text as PP import qualified Dhall.Map as DM -- | Newtype wrapper over @'Expr' 'Src' a@ (A Dhall expression) with an@@ -115,7 +115,10 @@ deriving (Generic, Typeable) instance Bi.Binary (DExpr Void) where- put = Bi.putLazyByteString . encodeExpression . denote . vacuous . getDExpr+ put = Bi.putLazyByteString+ . encodeExpression+ . denote+ . getDExpr get = do bs <- Bi.getRemainingLazyByteString either (fail . show) (pure . DExpr . denote @Void) $ decodeExpression bs@@ -475,12 +478,14 @@ interpretDhallCompiler t e = case rawInput t e of Nothing -> throwError . (terr:) . (:[]) $ case typeOf e of Left err -> show err- Right t0 -> T.unpack+ Right t0 -> case expected t of+ Success tExpect -> T.unpack . PP.renderStrict . PP.layoutSmart layoutOpts . doc- . diffNormalized (expected t)+ . diffNormalized tExpect $ t0+ Failure q -> showDhallErrors "" q Just x -> pure x where terr = "Error interpreting Dhall expression as desired type."