diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/th/T18097.hs | 14 | ||||
-rw-r--r-- | testsuite/tests/th/all.T | 1 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/holes.stderr | 1 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_compile/holes3.stderr | 1 |
4 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/th/T18097.hs b/testsuite/tests/th/T18097.hs new file mode 100644 index 0000000000..2263dfe018 --- /dev/null +++ b/testsuite/tests/th/T18097.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE TemplateHaskell #-} +module T18097 where + +import Language.Haskell.TH +import GHC.Tuple + +f = case $( tupE [ [| "ok" |] ] ) of Unit x -> putStrLn x +g = case Unit "ok" of $( tupP [ [p| x |] ] ) -> putStrLn x + +h :: $( tupleT 1 ) String +h = Unit "ok" + +i :: Unit String +i = $( tupE [ [| "ok" |] ] ) diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index 458b45d67f..8e747cbefa 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -502,6 +502,7 @@ test('T17511', normal, compile, ['']) test('T17608', normal, compile, ['-v0 -ddump-splices -dsuppress-uniques']) test('T17688a', normal, compile, ['']) test('T17688b', normal, compile, ['']) +test('T18097', normal, compile, ['']) test('TH_PprStar', normal, compile, ['-v0 -dsuppress-uniques']) test('TH_StringLift', normal, compile, ['']) test('TH_BytesShowEqOrd', normal, compile_and_run, ['']) diff --git a/testsuite/tests/typecheck/should_compile/holes.stderr b/testsuite/tests/typecheck/should_compile/holes.stderr index 892f875f3c..ec5e1bf229 100644 --- a/testsuite/tests/typecheck/should_compile/holes.stderr +++ b/testsuite/tests/typecheck/should_compile/holes.stderr @@ -90,6 +90,7 @@ holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)] Nothing :: forall a. Maybe a Just :: forall a. a -> Maybe a [] :: forall a. [a] + Unit :: forall a. a -> Unit a asTypeOf :: forall a. a -> a -> a id :: forall a. a -> a until :: forall a. (a -> Bool) -> (a -> a) -> a -> a diff --git a/testsuite/tests/typecheck/should_compile/holes3.stderr b/testsuite/tests/typecheck/should_compile/holes3.stderr index ea1f5a6c2c..fa9590663b 100644 --- a/testsuite/tests/typecheck/should_compile/holes3.stderr +++ b/testsuite/tests/typecheck/should_compile/holes3.stderr @@ -93,6 +93,7 @@ holes3.hs:11:15: error: Nothing :: forall a. Maybe a Just :: forall a. a -> Maybe a [] :: forall a. [a] + Unit :: forall a. a -> Unit a asTypeOf :: forall a. a -> a -> a id :: forall a. a -> a until :: forall a. (a -> Bool) -> (a -> a) -> a -> a |