diff options
Diffstat (limited to 'testsuite/tests/hiefile/should_compile')
-rw-r--r-- | testsuite/tests/hiefile/should_compile/T22416.hs | 20 | ||||
-rw-r--r-- | testsuite/tests/hiefile/should_compile/T22416.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/hiefile/should_compile/all.T | 1 |
3 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/tests/hiefile/should_compile/T22416.hs b/testsuite/tests/hiefile/should_compile/T22416.hs new file mode 100644 index 0000000000..97a09d6b62 --- /dev/null +++ b/testsuite/tests/hiefile/should_compile/T22416.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE Haskell2010 #-} +module Swish.GraphMatch where + +import qualified Data.Map as M +import Data.Word (Word32) + +class Label lb + +type LabelIndex = (Word32, Word32) + +data (Label lb, Eq lv, Show lv) => GenLabelMap lb lv = + MkLabelMap Word32 (M.Map lb lv) + +type LabelMap lb = GenLabelMap lb LabelIndex + +emptyMap :: Label lb => LabelMap lb +emptyMap = MkLabelMap 1 M.empty + +-- MkLabelMap :: forall lb lv. (Label lb, Eq lv, Show lv) +-- => Word32 -> M.Map lb lv -> GenLabelMap lb lv
\ No newline at end of file diff --git a/testsuite/tests/hiefile/should_compile/T22416.stderr b/testsuite/tests/hiefile/should_compile/T22416.stderr new file mode 100644 index 0000000000..f31d37d99f --- /dev/null +++ b/testsuite/tests/hiefile/should_compile/T22416.stderr @@ -0,0 +1,2 @@ +Got valid scopes +Got no roundtrip errors diff --git a/testsuite/tests/hiefile/should_compile/all.T b/testsuite/tests/hiefile/should_compile/all.T index 73b98a1f94..8b90f91376 100644 --- a/testsuite/tests/hiefile/should_compile/all.T +++ b/testsuite/tests/hiefile/should_compile/all.T @@ -22,3 +22,4 @@ test('Scopes', normal, compile, ['-fno-code -fwrite-ide- # See https://gitlab.haskell.org/ghc/ghc/-/issues/18425 and https://gitlab.haskell.org/ghc/ghc/-/merge_requests/2464#note_301989 test('ScopesBug', expect_broken(18425), compile, ['-fno-code -fwrite-ide-info -fvalidate-ide-info']) test('T18425', normal, compile, ['-fno-code -fwrite-ide-info -fvalidate-ide-info']) +test('T22416', normal, compile, ['-fno-code -fwrite-ide-info -fvalidate-ide-info']) |