Skip to content
This repository has been archived by the owner on Nov 24, 2018. It is now read-only.

Build against the latest dhall #61

Merged
merged 2 commits into from
Oct 5, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions nix/dhall.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ mkDerivation, ansi-terminal, base, bytestring, case-insensitive
, cborg, containers, contravariant, criterion, cryptonite, deepseq
, Diff, directory, doctest, exceptions, filepath, hashable
, haskeline, http-client, http-client-tls
, Diff, directory, doctest, exceptions, fetchgit, filepath
, hashable, haskeline, http-client, http-client-tls
, insert-ordered-containers, lens-family-core, megaparsec, memory
, mockery, mtl, optparse-applicative, parsers, prettyprinter
, prettyprinter-ansi-terminal, QuickCheck, quickcheck-instances
Expand All @@ -12,7 +12,11 @@
mkDerivation {
pname = "dhall";
version = "1.17.0";
sha256 = "a029fea856224a79f0b7cc56fbb5c566d0dfd1d915d214f682006cabf1274791";
src = fetchgit {
url = "https://github.com/dhall-lang/dhall-haskell.git";
sha256 = "0fj61llfr2sz8lh2xpryzp7q0ahgqbzgf72ppw34w5ibq5a6gd9l";
rev = "fedfa8e41ea8da32c2ee779ce65982544ed4800f";
};
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
Expand Down
25 changes: 25 additions & 0 deletions nix/megaparsec.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{ mkDerivation, base, bytestring, case-insensitive, containers
, criterion, deepseq, hspec, hspec-expectations, mtl
, parser-combinators, QuickCheck, scientific, stdenv, text
, transformers, weigh
}:
mkDerivation {
pname = "megaparsec";
version = "7.0.1";
sha256 = "6bbb385ea8bfb5b112dca234257bed36c061c56fbb576edda1b858549a7fc02c";
libraryHaskellDepends = [
base bytestring case-insensitive containers deepseq mtl
parser-combinators scientific text transformers
];
testHaskellDepends = [
base bytestring case-insensitive containers hspec
hspec-expectations mtl parser-combinators QuickCheck scientific
text transformers
];
benchmarkHaskellDepends = [
base containers criterion deepseq text weigh
];
homepage = "https://github.com/mrkkrp/megaparsec";
description = "Monadic parser combinators";
license = stdenv.lib.licenses.bsd2;
}
11 changes: 11 additions & 0 deletions nix/repline.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{ mkDerivation, base, containers, haskeline, mtl, process, stdenv
}:
mkDerivation {
pname = "repline";
version = "0.2.0.0";
sha256 = "ecc72092d0340b896ee6bf96bf6645694dbcd33361725a2cd28c5ab5d60c02de";
libraryHaskellDepends = [ base containers haskeline mtl process ];
homepage = "https://github.com/sdiehl/repline";
description = "Haskeline wrapper for GHCi-like REPL interfaces";
license = stdenv.lib.licenses.mit;
}
13 changes: 13 additions & 0 deletions src/Dhall/JSON.hs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,11 @@ dhallToJSON e0 = loop (Dhall.Core.normalize e0)
Dhall.Core.OptionalLit _ a -> do
a' <- traverse loop a
return (Data.Aeson.toJSON a')
Dhall.Core.Some a -> do
a' <- loop a
return (Data.Aeson.toJSON a')
Dhall.Core.App Dhall.Core.None _ -> do
return Data.Aeson.Null
Dhall.Core.RecordLit a ->
case toOrderedList a of
[ ( "contents"
Expand Down Expand Up @@ -594,6 +599,14 @@ convertToHomogeneousMaps (Conversion {..}) e0 = loop (Dhall.Core.normalize e0)
a' = loop a
b' = fmap loop b

Dhall.Core.Some a ->
Dhall.Core.Some a'
where
a' = loop a

Dhall.Core.None ->
Dhall.Core.None

Dhall.Core.OptionalFold ->
Dhall.Core.OptionalFold

Expand Down