Skip to content

Commit

Permalink
Update ghc-lib, adding locations to errors with generic templates (di…
Browse files Browse the repository at this point in the history
…gital-asset#2894)

* Update ghc-lib, adding some locations to errors with generic templates

* Test for template instance location
  • Loading branch information
rohanjr authored Sep 13, 2019
1 parent 868cb78 commit e1ff195
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/haskell/BUILD.ghc-lib-parser
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ haskell_library(
"-I/compiler", "-I/compiler/utils"
],
package_name = "ghc-lib-parser",
version = "8.8.1.20190830",
version = "8.8.1.20190912",
)

cc_library(
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -484,12 +484,12 @@ GRPC_HASKELL_COMMIT = "11681ec6b99add18a8d1315f202634aea343d146"

GRPC_HASKELL_HASH = "c6201f4e2fd39f25ca1d47b1dac4efdf151de88a2eb58254d61abc2760e58fda"

GHC_LIB_VERSION = "8.8.1.20190830"
GHC_LIB_VERSION = "8.8.1.20190912"

http_archive(
name = "haskell_ghc__lib__parser",
build_file = "//3rdparty/haskell:BUILD.ghc-lib-parser",
sha256 = "8e223494b9622cfd46282a9544626f66e477d7652551cce7186603bfaa18d15d",
sha256 = "04140cbb24667d75259429c100ef49e20faa76f32441588b775c77ddf36acc44",
strip_prefix = "ghc-lib-parser-{}".format(GHC_LIB_VERSION),
urls = ["https://digitalassetsdk.bintray.com/ghc-lib/ghc-lib-parser-{}.tar.gz".format(GHC_LIB_VERSION)],
)
Expand Down Expand Up @@ -561,7 +561,7 @@ hazel_repositories(

# Read [Working on ghc-lib] for ghc-lib update instructions at
# https://github.com/digital-asset/daml/blob/master/ghc-lib/working-on-ghc-lib.md.
hazel_ghclibs(GHC_LIB_VERSION, "8e223494b9622cfd46282a9544626f66e477d7652551cce7186603bfaa18d15d", "9fa2ea51c634c0d9b2a4b132abdec398c6b2eb0150821ac5664abff2fe63373d") +
hazel_ghclibs(GHC_LIB_VERSION, "04140cbb24667d75259429c100ef49e20faa76f32441588b775c77ddf36acc44", "5a819b9e1a7b01cd327f8a1d11bf8d0441c4c37ab7528ddecf161fb33e596fa3") +
hazel_github_external("digital-asset", "hlint", "e679bd34bb4e7783e1468f5988c22e71d0152e9e", "c7d2a68459677aaec71cbe224f2b290a633b1aaddf94e773720bd159b3343cad") +
hazel_github_external("awakesecurity", "proto3-wire", "4f355bbac895d577d8a28f567ab4380f042ccc24", "031e05d523a887fbc546096618bc11dceabae224462a6cdd6aab11c1658e17a3") +
hazel_github_external(
Expand Down
16 changes: 16 additions & 0 deletions compiler/damlc/tests/daml-test-files/TemplateInstanceLoc.daml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
-- Copyright (c) 2019 The DAML Authors. All rights reserved.
-- SPDX-License-Identifier: Apache-2.0
--
-- @ERROR range=16:26-16:30; Not in scope: type constructor or class ‘Foo2Instance’ Perhaps you meant ‘FooInstance’ (line 10)
daml 1.2
module TemplateInstanceLoc where

data D = D {}

template Foo a
with
p : Party
where
signatory p

template instance FooD = Foo2 D

0 comments on commit e1ff195

Please sign in to comment.