Skip to content

Commit

Permalink
Upgrade hlint (digital-asset#2406)
Browse files Browse the repository at this point in the history
* Upgrade hlint

* Reduce duplication
  • Loading branch information
Shayne Fletcher authored and mergify[bot] committed Aug 5, 2019
1 parent 3a02b56 commit c8783d0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ hazel_repositories(
# - To build the library : `bazel build @haskell_hlint//:lib`
# We'll be using it via the library, not the binary.
hazel_hackage("haskell-src-exts", "1.21.0", "95dac187824edfa23b6a2363880b5e113df8ce4a641e8a0f76e6d45aaa699ff3") +
hazel_github_external("digital-asset", "hlint", "f3d3acad10c9a4418a6fcad002087fc527f15d3d", "dbd091a6d59bf2d3cc387ab4a0ffc50ffad3242b808e7205ccceef49aed682f8") +
hazel_github_external("digital-asset", "hlint", "ccccbbbbdd2a1eb5fe1d9cc3dcf14e1c095f958c", "b84716b3896c4535fee93b1ee76ed2fd9b40d2cd09dbf078df8a9b520f05863f") +
hazel_github_external("awakesecurity", "proto3-wire", "43d8220dbc64ef7cc7681887741833a47b61070f", "1c3a7fbf4ab3308776675c6202583f9750de496757f3ad4815e81edd122d75e1") +
hazel_github_external("awakesecurity", "proto3-suite", "dd01df7a3f6d0f1ea36125a67ac3c16936b53da0", "59ea7b876b14991347918eefefe24e7f0e064b5c2cc14574ac4ab5d6af6413ca") +
hazel_hackage("happy", "1.19.10", "22eb606c97105b396e1c7dc27e120ca02025a87f3e44d2ea52be6a653a52caed") +
Expand Down
14 changes: 8 additions & 6 deletions compiler/damlc/tests/daml-test-files/List.daml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,23 @@ testSort6 = scenario do
assert $ head m == Foo 15 "c"
assert $ last m == Foo 42 "a"

-- Utility called on by 'testSort4' and 'testSort5'
check45 n m = do
assert $ n == [1, 1, 1, 2, 3]
let o = map (flip snd ()) m
assert $ o == ["A", "B", "C", "D", "E"]

testSort5 = scenario do
let l = [ (2, const "D"), (1, const "A"), (1, const "B"), (3, const "E"), (1, const "C") ]
let m = sortOn fst l
let n = map fst m
assert $ n == [1, 1, 1, 2, 3]
let o = map (flip snd ()) m
assert $ o == ["A", "B", "C", "D", "E"]
check45 n m

testSort4 = scenario do
let l = [ (2, const "D"), (1, const "A"), (1, const "B"), (3, const "E"), (1, const "C") ]
let m = sortBy (\x y -> compare (fst x) (fst y)) l
let n = map fst m
assert $ n == [1, 1, 1, 2, 3]
let o = map (flip snd ()) m
assert $ o == ["A", "B", "C", "D", "E"]
check45 n m

testSort3 = scenario do
let l = [ "C", "A", "E", "D", "B" ]
Expand Down

0 comments on commit c8783d0

Please sign in to comment.