packages feed

path-dhall-instance 0.1.0.0 → 0.1.0.1

raw patch · 4 files changed

+15/−4 lines, 4 filesdep +aeson

Dependencies added: aeson

Files

ChangeLog.md view
@@ -1,5 +1,5 @@ # Changelog for path-dhall-instance -# v0.1.0.0+# v0.1.0.1  * `FromDhall` and `ToDhall` instances for `Path`.
README.md view
@@ -1,3 +1,5 @@ # path-dhall-instance  `FromDhall` and `ToDhall` instances for [path](https://hackage.haskell.org/package/path).++Warning: This is not currently normalizing anything when parsing, because I don't understand dhall's instances.
path-dhall-instance.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           path-dhall-instance-version:        0.1.0.0+version:        0.1.0.1 synopsis:       ToDhall and FromDhall instances for Path. description:    ToDhall and FromDhall instances for Path. category:       Filesystem@@ -27,7 +27,8 @@   hs-source-dirs:       src   build-depends:-      base >=4.7 && <5+      aeson+    , base >=4.7 && <5     , dhall     , path   default-language: Haskell2010
src/Path/Dhall.hs view
@@ -3,14 +3,22 @@    License    : MIT    Stability  : experimental -Binary instance for `Path`.+Dhall instance for `Path`. -} {-# OPTIONS_GHC -fno-warn-orphans #-} {-# LANGUAGE FlexibleInstances  #-}+{-# LANGUAGE RecordWildCards #-} module Path.Dhall where +import Data.Aeson import Dhall+import Dhall.Syntax import Path++pathRelDir :: Decoder (Path Rel Dir)+pathRelDir = Decoder {..} where+  extract (TextLit (Chunks [] t)) = parseRelDir t+  expected = (Path Rel Dir)  instance FromDhall (Path Rel File) instance FromDhall (Path Rel Dir)