Skip to content
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
4 changes: 2 additions & 2 deletions dhall-bash/dhall-bash.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: dhall-bash
Version: 1.0.25
Version: 1.0.27
Cabal-Version: >=1.8.0.2
Build-Type: Simple
Tested-With: GHC == 7.10.3, GHC == 8.4.3, GHC == 8.6.1
Expand Down Expand Up @@ -31,7 +31,7 @@ Library
base >= 4.8.0.0 && < 5 ,
bytestring < 0.11,
containers < 0.7 ,
dhall >= 1.28.0 && < 1.29,
dhall >= 1.28.0 && < 1.30,
neat-interpolation < 0.4 ,
shell-escape < 0.3 ,
text >= 0.2 && < 1.3
Expand Down
4 changes: 4 additions & 0 deletions dhall-json/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.6.1

* [Fix typos in error messages](https://github.com/dhall-lang/dhall-haskell/pull/1595)

1.6.0

* BREAKING CHANGE: [Move `HsYAML` code to a new `dhall-yaml` package](https://github.com/dhall-lang/dhall-haskell/pull/1514)
Expand Down
4 changes: 2 additions & 2 deletions dhall-json/dhall-json.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: dhall-json
Version: 1.6.0
Version: 1.6.1
Cabal-Version: >=1.8.0.2
Build-Type: Simple
Tested-With: GHC == 7.10.3, GHC == 8.4.3, GHC == 8.6.1
Expand Down Expand Up @@ -40,7 +40,7 @@ Library
aeson-yaml >= 1.0.5 && < 1.1 ,
bytestring < 0.11,
containers ,
dhall >= 1.28.0 && < 1.29,
dhall >= 1.28.0 && < 1.30,
exceptions >= 0.8.3 && < 0.11,
filepath < 1.5 ,
optparse-applicative >= 0.14.0.0 && < 0.16,
Expand Down
4 changes: 2 additions & 2 deletions dhall-lsp-server/dhall-lsp-server.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: dhall-lsp-server
Version: 1.0.3
Version: 1.0.4
cabal-version: 1.12
synopsis: Language Server Protocol (LSP) server for Dhall
homepage: https://github.com/dhall-lang/dhall-haskell/dhall-lsp-server#readme
Expand Down Expand Up @@ -50,7 +50,7 @@ library
, containers >= 0.5.11.0 && < 0.7
, data-default >= 0.7.1.1 && < 0.8
, directory >= 1.2.2.0 && < 1.4
, dhall >= 1.28.0 && < 1.29
, dhall >= 1.29.0 && < 1.30
, dhall-json >= 1.4 && < 1.7
, filepath >= 1.4.2 && < 1.5
, haskell-lsp >= 0.19.0.0 && < 0.20
Expand Down
4 changes: 2 additions & 2 deletions dhall-nix/dhall-nix.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: dhall-nix
Version: 1.1.10
Version: 1.1.11
Cabal-Version: >=1.8.0.2
Build-Type: Simple
Tested-With: GHC == 8.0.1
Expand Down Expand Up @@ -30,7 +30,7 @@ Library
base >= 4.8.0.0 && < 5 ,
containers < 0.7 ,
data-fix < 0.3 ,
dhall >= 1.28 && < 1.29,
dhall >= 1.28 && < 1.30,
hnix >= 0.6.1 && < 0.7 ,
neat-interpolation < 0.4 ,
text >= 0.8.0.0 && < 1.3
Expand Down
2 changes: 1 addition & 1 deletion dhall-try/dhall-try.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ executable dhall-try
main-is: Main.hs
build-depends: base >= 4.11.0.0 && < 5
, aeson-pretty >= 0.8.7 && < 0.9
, dhall >= 1.19.0 && < 1.29
, dhall >= 1.19.0 && < 1.30
, dhall-json >= 1.2.5 && < 1.7
, prettyprinter >= 1.5.1 && < 1.6
, text >= 1.2.3.0 && < 1.3
Expand Down
4 changes: 2 additions & 2 deletions dhall-yaml/dhall-yaml.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: dhall-yaml
Version: 1.0.0
Version: 1.0.1
Cabal-Version: >=1.8.0.2
Build-Type: Simple
Tested-With: GHC == 7.10.3, GHC == 8.4.3, GHC == 8.6.1
Expand Down Expand Up @@ -37,7 +37,7 @@ Library
base >= 4.8.0.0 && < 5 ,
aeson >= 1.0.0.0 && < 1.5 ,
bytestring < 0.11,
dhall >= 1.28.0 && < 1.29,
dhall >= 1.28.0 && < 1.30,
dhall-json >= 1.6.0 && < 1.7 ,
optparse-applicative >= 0.14.0.0 && < 0.16,
text >= 0.11.1.0 && < 1.3 ,
Expand Down
41 changes: 41 additions & 0 deletions dhall/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
1.29.0

* [Supports version 13.0.0 of the standard](https://github.com/dhall-lang/dhall-lang/releases/tag/v13.0.0)
* BREAKING CHANGE: [Generate Haskell datatype declarations from Dhall types](https://github.com/dhall-lang/dhall-haskell/commit/b0280826790930d18a5498fb802120478fa11767#diff-a9729dccf50be61ce3d8c68c16f0fd50)
* You can now use the `makeHaskellTypeFromUnion` Template Haskell utility
to generate a Haskell datatype declaration from a Dhall union type
* This helps ensure that your Haskell types and Dhall types stay in sync,
when you want the Dhall type to be the source of truth
* This is a breaking change because the default `InterpretOptions` changed
the default handling of singleton constructors from `Wrapped` to `Smart`
* You can preserve the old behavior using:
`autoWith defaultInterpretOptions{ singletonConstructors = Wrapped }`
* BUG FIX: [Fix `dhall freeze --cache` and `dhall lint` to preserve `let`-related comments](https://github.com/dhall-lang/dhall-haskell/pull/1597)
* Now they match the behavior of `dhall format` with regard to preserving
these comments
* BUG FIX: [Fix escaping of significant leading whitespace when formatting code](https://github.com/dhall-lang/dhall-haskell/pull/1598)
* The formatter would sometimes unnecessarily escape significant leading
whitespace for the final line of multiline string literals, which this
change fixes
* BUG FIX: [Fix `dhall encode --json` for `Double` values](https://github.com/dhall-lang/dhall-haskell/issues/1350)
* NEW FEATURE: [`dhall to-directory-tree` command](https://github.com/dhall-lang/dhall-haskell/pull/1606)
* You can now generate a directory tree from a Dhall expression
* Specifically:
* records are converted to directories
* `Text` fields are converted to files named after the field
* `Optional` values are omitted if `None`
* Everything else is rejected
* NEW FEATURE: [Hexadecimal literals](https://github.com/dhall-lang/dhall-haskell/pull/1607)
* See the [changelog for standard version 13.0.0](https://github.com/dhall-lang/dhall-lang/releases/tag/v13.0.0) for more details
* NEW FEATURE: [`merge` works on `Optional` values](https://github.com/dhall-lang/dhall-haskell/pull/1608)
* See the [changelog for standard version 13.0.0](https://github.com/dhall-lang/dhall-lang/releases/tag/v13.0.0) for more details
* [Improve formatter](https://github.com/dhall-lang/dhall-haskell/pull/1609)
* `dhall format` will now render expressions nested inside record fields or
alternatives more compactly, including:
* Records
* Record completion expressions
* Expressions wrapped in `Some`
* Lists
* [Exclude the `using ...` suffix from imports listed by `dhall resolve`](https://github.com/dhall-lang/dhall-haskell/pull/1603)
* Specifically when using the `--{immediate,transitive}-dependencies` flags

1.28.0

* [Supports version 12.0.0 of the standard](https://github.com/dhall-lang/dhall-lang/releases/tag/v12.0.0)
Expand Down
2 changes: 1 addition & 1 deletion dhall/dhall-lang
Submodule dhall-lang updated 39 files
+22 −8 .github/CONTRIBUTING.md
+62 −0 CHANGELOG.md
+12 −0 Prelude/Function/identity
+3 −0 Prelude/Function/package.dhall
+10 −7 Prelude/JSON/Type
+7 −6 Prelude/JSON/array
+6 −5 Prelude/JSON/bool
+19 −7 Prelude/JSON/core.dhall
+33 −0 Prelude/JSON/double
+33 −0 Prelude/JSON/integer
+29 −0 Prelude/JSON/natural
+6 −5 Prelude/JSON/null
+6 −13 Prelude/JSON/number
+7 −6 Prelude/JSON/object
+12 −9 Prelude/JSON/omitNullFields
+4 −4 Prelude/JSON/package.dhall
+4 −3 Prelude/JSON/render
+24 −0 Prelude/JSON/renderInteger.dhall
+4 −3 Prelude/JSON/renderYAML
+6 −5 Prelude/JSON/string
+2 −2 Prelude/package.dhall
+0 −1 README.md
+1 −1 docs/howtos/How-to-integrate-Dhall.md
+1 −1 nixops/logical.nix
+11 −8 standard/dhall.abnf
+1 −1 standard/versioning.md
+1 −1 tests/normalization/success/unit/NaturalBuildFoldFusionB.dhall
+ tests/parser/success/preferMissingNoSpacesB.dhallb
+1 −1 tests/parser/success/preferMissingNoSpacesB.diag
+1 −0 tests/parser/success/unit/RecordLitSomeA.dhall
+ tests/parser/success/unit/RecordLitSomeB.dhallb
+1 −0 tests/parser/success/unit/RecordLitSomeB.diag
+1 −0 tests/parser/success/unit/SelectionSomeA.dhall
+ tests/parser/success/unit/SelectionSomeB.dhallb
+1 −0 tests/parser/success/unit/SelectionSomeB.diag
+1 −0 tests/parser/success/unit/UnionTypeSomeA.dhall
+1 −0 tests/parser/success/unit/UnionTypeSomeB.dhallb
+1 −0 tests/parser/success/unit/UnionTypeSomeB.diag
+68 −12 tests/type-inference/success/preludeB.dhall
21 changes: 13 additions & 8 deletions dhall/dhall.cabal
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Name: dhall
Version: 1.28.0
Version: 1.29.0
Cabal-Version: >=1.10
Build-Type: Simple
Tested-With: GHC == 7.10.3, GHC == 8.4.3, GHC == 8.6.1
Expand Down Expand Up @@ -39,6 +39,7 @@ Extra-Source-Files:
dhall-lang/Prelude/Double/package.dhall
dhall-lang/Prelude/Double/show
dhall-lang/Prelude/Function/compose
dhall-lang/Prelude/Function/identity
dhall-lang/Prelude/Function/package.dhall
dhall-lang/Prelude/Integer/abs
dhall-lang/Prelude/Integer/add
Expand All @@ -65,14 +66,18 @@ Extra-Source-Files:
dhall-lang/Prelude/JSON/array
dhall-lang/Prelude/JSON/bool
dhall-lang/Prelude/JSON/core.dhall
dhall-lang/Prelude/JSON/double
dhall-lang/Prelude/JSON/integer
dhall-lang/Prelude/JSON/keyText
dhall-lang/Prelude/JSON/keyValue
dhall-lang/Prelude/JSON/natural
dhall-lang/Prelude/JSON/null
dhall-lang/Prelude/JSON/number
dhall-lang/Prelude/JSON/object
dhall-lang/Prelude/JSON/omitNullFields
dhall-lang/Prelude/JSON/package.dhall
dhall-lang/Prelude/JSON/render
dhall-lang/Prelude/JSON/renderInteger.dhall
dhall-lang/Prelude/JSON/renderYAML
dhall-lang/Prelude/JSON/string
dhall-lang/Prelude/JSON/tagInline
Expand Down Expand Up @@ -169,12 +174,13 @@ Extra-Source-Files:
dhall-lang/Prelude/XML/render
dhall-lang/Prelude/XML/text
dhall-lang/Prelude/package.dhall
dhall-lang/tests/alpha-normalization/success/unit/*.dhall
dhall-lang/tests/binary-decode/failure/unit/*.dhallb
dhall-lang/tests/binary-decode/success/unit/*.dhall
dhall-lang/tests/binary-decode/success/unit/*.dhallb
dhall-lang/tests/import/cache/dhall/1220efc43103e49b56c5bf089db8e0365bbfc455b8a2f0dc6ee5727a3586f85969fd
dhall-lang/tests/import/data/*.txt
dhall-lang/tests/import/data/*.dhall
dhall-lang/tests/import/data/*.txt
dhall-lang/tests/import/data/fieldOrder/*.dhall
dhall-lang/tests/import/failure/*.dhall
dhall-lang/tests/import/success/*.dhall
Expand All @@ -186,18 +192,17 @@ Extra-Source-Files:
dhall-lang/tests/normalization/success/simple/*.dhall
dhall-lang/tests/normalization/success/simplifications/*.dhall
dhall-lang/tests/normalization/success/unit/*.dhall
dhall-lang/tests/alpha-normalization/success/unit/*.dhall
dhall-lang/tests/parser/failure/*.dhall
dhall-lang/tests/parser/success/*.dhall
dhall-lang/tests/parser/success/*.dhallb
dhall-lang/tests/parser/success/text/*.dhall
dhall-lang/tests/parser/success/text/*.dhallb
dhall-lang/tests/parser/success/unit/*.dhall
dhall-lang/tests/parser/success/unit/*.dhallb
dhall-lang/tests/parser/success/unit/import/*.dhall
dhall-lang/tests/parser/success/unit/import/*.dhallb
dhall-lang/tests/parser/success/unit/import/urls/*.dhall
dhall-lang/tests/parser/success/unit/import/urls/*.dhallb
dhall-lang/tests/parser/success/text/*.dhall
dhall-lang/tests/parser/success/text/*.dhallb
dhall-lang/tests/semantic-hash/success/*.dhall
dhall-lang/tests/semantic-hash/success/*.hash
dhall-lang/tests/semantic-hash/success/haskell-tutorial/access/*.dhall
Expand Down Expand Up @@ -391,13 +396,13 @@ Extra-Source-Files:
dhall-lang/tests/type-inference/success/prelude/Text/concatMap/*.dhall
dhall-lang/tests/type-inference/success/prelude/Text/concatMapSep/*.dhall
dhall-lang/tests/type-inference/success/prelude/Text/concatSep/*.dhall
dhall-lang/tests/type-inference/success/simple/access/*.dhall
dhall-lang/tests/type-inference/success/simple/*.dhall
dhall-lang/tests/type-inference/success/simple/access/*.dhall
dhall-lang/tests/type-inference/success/unit/*.dhall
tests/format/*.dhall
tests/lint/success/*.dhall
tests/diff/*.dhall
tests/diff/*.txt
tests/format/*.dhall
tests/lint/success/*.dhall
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the cleanup! :) 👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sjakobi: You're welcome! 🙂

tests/recursive/*.dhall
tests/regression/*.dhall
tests/tags/*.dhall
Expand Down
11 changes: 8 additions & 3 deletions dhall/src/Dhall/Parser/Token.hs
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,12 @@ simpleLabel allowReserved = try (do
Control.Monad.guard (allowReserved || not (Data.HashSet.member t reservedIdentifiers))
return t )
where
headCharacter c = alpha c || c == '_'

tailCharacter c = alphaNum c || c == '_' || c == '-' || c == '/'
headCharacter :: Char -> Bool
headCharacter c = alpha c || c == '_'

tailCharacter :: Char -> Bool
tailCharacter c = alphaNum c || c == '_' || c == '-' || c == '/'

backtickLabel :: Parser Text
backtickLabel = do
Expand Down Expand Up @@ -1120,7 +1123,9 @@ _equivalent = (void (char '≡' <?> "\"≡\"") <|> void (text "===")) <?> "opera

-- | Parse the @missing@ keyword
_missing :: Parser ()
_missing = keyword "missing"
_missing =
keyword "missing"
*> Text.Megaparsec.notFollowedBy (Text.Parser.Char.satisfy tailCharacter)

-- | Parse the @?@ symbol
_importAlt :: Parser ()
Expand Down
17 changes: 16 additions & 1 deletion dhall/tests/Dhall/Test/Import.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Test.Tasty (TestTree)
import Turtle (FilePath, (</>))

import qualified Control.Exception as Exception
import qualified Control.Monad as Monad
import qualified Control.Monad.Trans.State.Strict as State
import qualified Data.Text as Text
import qualified Data.Text.IO as Text.IO
Expand All @@ -28,7 +29,21 @@ importDirectory = "./dhall-lang/tests/import"

getTests :: IO TestTree
getTests = do
successTests <- Test.Util.discover (Turtle.chars <> "A.dhall") successTest (Turtle.lstree (importDirectory </> "success"))
let flakyTests =
[ -- This test is flaky, occasionally failing with:
--
-- Error: Remote host not found
--
-- URL: https://test.dhall-lang.org/Bool/package.dhall
importDirectory </> "success/headerForwardingA.dhall"
]

successTests <- Test.Util.discover (Turtle.chars <> "A.dhall") successTest (do
path <- Turtle.lstree (importDirectory </> "success")

Monad.guard (path `notElem` flakyTests)

return path )

failureTests <- Test.Util.discover (Turtle.chars <> ".dhall") failureTest (Turtle.lstree (importDirectory </> "failure"))

Expand Down
4 changes: 0 additions & 4 deletions dhall/tests/Dhall/Test/Parser.hs
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,6 @@ shouldParse path = do
-- This is a bug created by a parsing performance
-- improvement
[ parseDirectory </> "success/unit/MergeParenAnnotation"

-- https://github.com/dhall-lang/dhall-haskell/issues/1454
, parseDirectory </> "success/missingFoo"
, parseDirectory </> "success/missingSlash"
]

let pathString = Text.unpack path
Expand Down