Skip to content

Commit

Permalink
Merge branch 'master' into appveyor
Browse files Browse the repository at this point in the history
  • Loading branch information
jneira authored Jan 19, 2019
2 parents 66393d9 + bebfbf2 commit d78f948
Show file tree
Hide file tree
Showing 746 changed files with 407 additions and 4,561 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "dhall/dhall-lang"]
path = dhall/dhall-lang
url = https://github.com/dhall-lang/dhall-lang.git
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let
import ./nix/shared.nix { compiler = "ghcjs"; system = "x86_64-linux"; };

in
{ inherit (shared) dhall dhall-bash dhall-json dhall-text;
{ inherit (shared.possibly-static) dhall dhall-bash dhall-json dhall-text;

inherit (shared_ghcjs) dhall-try;

Expand Down
1 change: 0 additions & 1 deletion dhall/Prelude/Monoid

This file was deleted.

1 change: 0 additions & 1 deletion dhall/Prelude/package.dhall

This file was deleted.

1 change: 1 addition & 0 deletions dhall/dhall-lang
Submodule dhall-lang added at 732bf1
577 changes: 324 additions & 253 deletions dhall/dhall.cabal

Large diffs are not rendered by default.

24 changes: 10 additions & 14 deletions dhall/tests/Dhall/Test/Import.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,34 @@ tests =
[ shouldFail
3
"alternative of several unset env variables"
"./tests/import/failure/alternativeEnv.dhall"
"./dhall-lang/tests/import/failure/alternativeEnv.dhall"
, shouldFail
1
"alternative of env variable and missing"
"./tests/import/failure/alternativeEnvMissing.dhall"
"./dhall-lang/tests/import/failure/alternativeEnvMissing.dhall"
, shouldFail
0
"just missing"
"./tests/import/failure/missing.dhall"
"./dhall-lang/tests/import/failure/missing.dhall"
, shouldNotFail
"alternative of env variable, missing, and a Natural"
"./tests/import/success/alternativeEnvNaturalA.dhall"
"./dhall-lang/tests/import/success/alternativeEnvNaturalA.dhall"
, shouldNotFail
"alternative of env variable and a Natural"
"./tests/import/success/alternativeEnvSimpleA.dhall"
"./dhall-lang/tests/import/success/alternativeEnvSimpleA.dhall"
, shouldNotFail
"alternative of a Natural and missing"
"./tests/import/success/alternativeNaturalA.dhall"
"./dhall-lang/tests/import/success/alternativeNaturalA.dhall"
]
, Test.Tasty.testGroup "import relative to argument"
[ shouldNotFailRelative
"works"
"./tests/import/data/foo/bar"
"./tests/import/success/relative.dhall"
, shouldNotFailRelative
"a semantic integrity check if fields are reordered"
"./tests/import/success/"
"./tests/import/success/fieldOrderA.dhall"
"./dhall-lang/tests/import/success/"
"./dhall-lang/tests/import/success/fieldOrderA.dhall"
, shouldNotFailRelative
"a semantic integrity check when importing an expression using `constructors`"
"./tests/import/success/"
"./tests/import/success/issue553B.dhall"
"./dhall-lang/tests/import/success/"
"./dhall-lang/tests/import/success/issue553B.dhall"
]
]

Expand Down
4 changes: 2 additions & 2 deletions dhall/tests/Dhall/Test/Normalization.hs
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ nestedReduction = testCase "doubleReduction" $ do
should :: Text -> Text -> TestTree
should name basename =
Test.Tasty.HUnit.testCase (Data.Text.unpack name) $ do
let actualCode = "./tests/normalization/" <> basename <> "A.dhall"
let expectedCode = "./tests/normalization/" <> basename <> "B.dhall"
let actualCode = "./dhall-lang/tests/normalization/" <> basename <> "A.dhall"
let expectedCode = "./dhall-lang/tests/normalization/" <> basename <> "B.dhall"

actualExpr <- case Dhall.Parser.exprFromText mempty actualCode of
Left err -> Control.Exception.throwIO err
Expand Down
101 changes: 49 additions & 52 deletions dhall/tests/Dhall/Test/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -18,155 +18,152 @@ tests =
[ Test.Tasty.testGroup "whitespace"
[ shouldParse
"prefix/suffix"
"./tests/parser/success/whitespace"
"./dhall-lang/tests/parser/success/whitespace"
, shouldParse
"block comment"
"./tests/parser/success/blockComment"
"./dhall-lang/tests/parser/success/blockComment"
, shouldParse
"nested block comment"
"./tests/parser/success/nestedBlockComment"
"./dhall-lang/tests/parser/success/nestedBlockComment"
, shouldParse
"line comment"
"./tests/parser/success/lineComment"
"./dhall-lang/tests/parser/success/lineComment"
, shouldParse
"Unicode comment"
"./tests/parser/success/unicodeComment"
"./dhall-lang/tests/parser/success/unicodeComment"
, shouldParse
"whitespace buffet"
"./tests/parser/success/whitespaceBuffet"
"./dhall-lang/tests/parser/success/whitespaceBuffet"
]
, shouldParse
"label"
"./tests/parser/success/label"
"./dhall-lang/tests/parser/success/label"
, shouldParse
"quoted label"
"./tests/parser/success/quotedLabel"
"./dhall-lang/tests/parser/success/quotedLabel"
, shouldParse
"double quoted string"
"./tests/parser/success/doubleQuotedString"
"./dhall-lang/tests/parser/success/doubleQuotedString"
, shouldParse
"Unicode double quoted string"
"./tests/parser/success/unicodeDoubleQuotedString"
"./dhall-lang/tests/parser/success/unicodeDoubleQuotedString"
, shouldParse
"escaped double quoted string"
"./tests/parser/success/escapedDoubleQuotedString"
"./dhall-lang/tests/parser/success/escapedDoubleQuotedString"
, shouldParse
"interpolated double quoted string"
"./tests/parser/success/interpolatedDoubleQuotedString"
"./dhall-lang/tests/parser/success/interpolatedDoubleQuotedString"
, shouldParse
"single quoted string"
"./tests/parser/success/singleQuotedString"
"./dhall-lang/tests/parser/success/singleQuotedString"
, shouldParse
"escaped single quoted string"
"./tests/parser/success/escapedSingleQuotedString"
"./dhall-lang/tests/parser/success/escapedSingleQuotedString"
, shouldParse
"interpolated single quoted string"
"./tests/parser/success/interpolatedSingleQuotedString"
"./dhall-lang/tests/parser/success/interpolatedSingleQuotedString"
, shouldParse
"double"
"./tests/parser/success/double"
"./dhall-lang/tests/parser/success/double"
, shouldParse
"natural"
"./tests/parser/success/natural"
"./dhall-lang/tests/parser/success/natural"
, shouldParse
"identifier"
"./tests/parser/success/identifier"
"./dhall-lang/tests/parser/success/identifier"
, shouldParse
"paths"
"./tests/parser/success/paths"
"./dhall-lang/tests/parser/success/paths"
, shouldParse
"path termination"
"./tests/parser/success/pathTermination"
"./dhall-lang/tests/parser/success/pathTermination"
, shouldParse
"urls"
"./tests/parser/success/urls"
"./dhall-lang/tests/parser/success/urls"
, shouldParse
"environmentVariables"
"./tests/parser/success/environmentVariables"
"./dhall-lang/tests/parser/success/environmentVariables"
, shouldParse
"lambda"
"./tests/parser/success/lambda"
"./dhall-lang/tests/parser/success/lambda"
, shouldParse
"if then else"
"./tests/parser/success/ifThenElse"
"./dhall-lang/tests/parser/success/ifThenElse"
, shouldParse
"let"
"./tests/parser/success/let"
"./dhall-lang/tests/parser/success/let"
, shouldParse
"forall"
"./tests/parser/success/forall"
"./dhall-lang/tests/parser/success/forall"
, shouldParse
"function type"
"./tests/parser/success/functionType"
"./dhall-lang/tests/parser/success/functionType"
, shouldParse
"operators"
"./tests/parser/success/operators"
"./dhall-lang/tests/parser/success/operators"
, shouldParse
"annotations"
"./tests/parser/success/annotations"
"./dhall-lang/tests/parser/success/annotations"
, shouldParse
"merge"
"./tests/parser/success/merge"
"./dhall-lang/tests/parser/success/merge"
, shouldParse
"constructors"
"./tests/parser/success/constructors"
"./dhall-lang/tests/parser/success/constructors"
, shouldParse
"fields"
"./tests/parser/success/fields"
"./dhall-lang/tests/parser/success/fields"
, shouldParse
"record"
"./tests/parser/success/record"
"./dhall-lang/tests/parser/success/record"
, shouldParse
"union"
"./tests/parser/success/union"
"./dhall-lang/tests/parser/success/union"
, shouldParse
"list"
"./tests/parser/success/list"
"./dhall-lang/tests/parser/success/list"
, shouldParse
"builtins"
"./tests/parser/success/builtins"
"./dhall-lang/tests/parser/success/builtins"
, shouldParse
"import alternatives"
"./tests/parser/success/importAlt"
"./dhall-lang/tests/parser/success/importAlt"
, shouldParse
"large expression"
"./tests/parser/success/largeExpression"
"./dhall-lang/tests/parser/success/largeExpression"
, shouldParse
"names that begin with reserved identifiers"
"./tests/parser/success/reservedPrefix"
"./dhall-lang/tests/parser/success/reservedPrefix"
, shouldParse
"interpolated expressions with leading whitespace"
"./tests/parser/success/template"
"./dhall-lang/tests/parser/success/template"
, shouldParse
"collections with type annotations containing imports"
"./tests/parser/success/collectionImportType"
"./dhall-lang/tests/parser/success/collectionImportType"
, shouldParse
"a parenthesized custom header import"
"./tests/parser/success/parenthesizeUsing"
"./dhall-lang/tests/parser/success/parenthesizeUsing"
, shouldNotParse
"accessing a field of an import without parentheses"
"./tests/parser/failure/importAccess.dhall"
"./dhall-lang/tests/parser/failure/importAccess.dhall"
, shouldParse
"Sort"
"./tests/parser/success/sort"
"./dhall-lang/tests/parser/success/sort"
, shouldParse
"quoted path components"
"./tests/parser/success/quotedPaths"
"./dhall-lang/tests/parser/success/quotedPaths"
, shouldNotParse
"positive double out of bounds"
"./tests/parser/failure/doubleBoundsPos.dhall"
"./dhall-lang/tests/parser/failure/doubleBoundsPos.dhall"
, shouldNotParse
"negative double out of bounds"
"./tests/parser/failure/doubleBoundsNeg.dhall"
"./dhall-lang/tests/parser/failure/doubleBoundsNeg.dhall"
, shouldParse
"as Text"
"./tests/parser/success/asText"
, shouldParse
"custom headers"
"./tests/parser/success/customHeaders"
"./dhall-lang/tests/parser/success/asText"
, shouldNotParse
"a multi-line literal without an initial newline"
"./tests/parser/failure/mandatoryNewline.dhall"
"./dhall-lang/tests/parser/failure/mandatoryNewline.dhall"
]

shouldParse :: Text -> FilePath -> TestTree
Expand Down
6 changes: 3 additions & 3 deletions dhall/tests/Dhall/Test/TypeCheck.hs
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ accessTypeChecks =
should :: Text -> Text -> TestTree
should name basename =
Test.Tasty.HUnit.testCase (Data.Text.unpack name) $ do
let actualCode = "./tests/typecheck/" <> basename <> "A.dhall"
let expectedCode = "./tests/typecheck/" <> basename <> "B.dhall"
let actualCode = "./dhall-lang/tests/typecheck/" <> basename <> "A.dhall"
let expectedCode = "./dhall-lang/tests/typecheck/" <> basename <> "B.dhall"

actualExpr <- case Dhall.Parser.exprFromText mempty actualCode of
Left err -> Control.Exception.throwIO err
Expand All @@ -116,7 +116,7 @@ should name basename =
shouldNotTypeCheck :: Text -> Text -> TestTree
shouldNotTypeCheck name basename =
Test.Tasty.HUnit.testCase (Data.Text.unpack name) $ do
let code = "./tests/typecheck/" <> basename <> ".dhall"
let code = "./dhall-lang/tests/typecheck/" <> basename <> ".dhall"

expression <- case Dhall.Parser.exprFromText mempty code of
Left exception -> Control.Exception.throwIO exception
Expand Down
1 change: 0 additions & 1 deletion dhall/tests/import/data/fieldOrder/1.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/tests/import/data/fieldOrder/2.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/tests/import/data/foo/bar/a.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/tests/import/failure/alternativeEnv.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/tests/import/failure/alternativeEnvMissing.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/tests/import/failure/missing.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/tests/import/success/alternativeEnvNaturalA.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/tests/import/success/alternativeEnvNaturalB.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/tests/import/success/alternativeEnvSimpleA.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/tests/import/success/alternativeEnvSimpleB.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/tests/import/success/alternativeNaturalA.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/tests/import/success/alternativeNaturalB.dhall

This file was deleted.

5 changes: 0 additions & 5 deletions dhall/tests/import/success/fieldOrderA.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/tests/import/success/fieldOrderB.dhall

This file was deleted.

5 changes: 0 additions & 5 deletions dhall/tests/import/success/issue553A.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/tests/import/success/issue553B.dhall

This file was deleted.

2 changes: 0 additions & 2 deletions dhall/tests/import/success/relative.dhall

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

9 changes: 0 additions & 9 deletions dhall/tests/normalization/success/multiline/escapeA.dhall

This file was deleted.

1 change: 0 additions & 1 deletion dhall/tests/normalization/success/multiline/escapeB.dhall

This file was deleted.

15 changes: 0 additions & 15 deletions dhall/tests/normalization/success/multiline/hangingIndentA.dhall

This file was deleted.

Loading

0 comments on commit d78f948

Please sign in to comment.