diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-03-24 11:39:59 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-03-24 12:29:42 +0100 |
commit | 371608f1cdaf20c49eb6c5ec165b9eb08b745a89 (patch) | |
tree | 65cd080f700448034e4206223852ae1a201a86fb /testsuite | |
parent | 1448f8ab2379452312f1f74f6d5ba4de8ad3d47e (diff) | |
download | haskell-371608f1cdaf20c49eb6c5ec165b9eb08b745a89.tar.gz |
Default RuntimeRep variables unless -fprint-explicit-runtime-reps
Summary:
Addresses #11549 by defaulting `RuntimeRep` variables to `PtrRepLifted`
and adding a new compiler flag `-fprint-explicit-runtime-reps` to
disable this behavior.
This is just a guess at the right way to go about this. If it's
wrong-beyond-any-hope just say so.
Test Plan: Working on a testcase
Reviewers: goldfire, austin
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D1961
GHC Trac Issues: #11549
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/tests/dependent/ghci/T11549.script | 14 | ||||
-rw-r--r-- | testsuite/tests/dependent/ghci/T11549.stdout | 12 | ||||
-rw-r--r-- | testsuite/tests/dependent/ghci/all.T | 3 | ||||
-rw-r--r-- | testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/ghci/scripts/T7627.stdout | 10 |
5 files changed, 32 insertions, 9 deletions
diff --git a/testsuite/tests/dependent/ghci/T11549.script b/testsuite/tests/dependent/ghci/T11549.script new file mode 100644 index 0000000000..5f8c500519 --- /dev/null +++ b/testsuite/tests/dependent/ghci/T11549.script @@ -0,0 +1,14 @@ +:set -XTypeInType +import GHC.Exts + +putStrLn "-fno-print-explicit-runtime-reps" +:set -fno-print-explicit-runtime-reps +:ty ($) +:kind TYPE +:ty error + +putStrLn "\n-fprint-explicit-runtime-reps" +:set -fprint-explicit-runtime-reps +:ty ($) +:kind TYPE +:ty error diff --git a/testsuite/tests/dependent/ghci/T11549.stdout b/testsuite/tests/dependent/ghci/T11549.stdout new file mode 100644 index 0000000000..c8449ba09f --- /dev/null +++ b/testsuite/tests/dependent/ghci/T11549.stdout @@ -0,0 +1,12 @@ +-fno-print-explicit-runtime-reps +($) :: (a -> b) -> a -> b +TYPE :: RuntimeRep -> * +error :: GHC.Stack.Types.HasCallStack => [Char] -> a + +-fprint-explicit-runtime-reps +($) :: forall (r :: RuntimeRep) a (b :: TYPE r). (a -> b) -> a -> b +TYPE :: RuntimeRep -> * +error + :: forall (r :: RuntimeRep) (a :: TYPE r). + GHC.Stack.Types.HasCallStack => + [Char] -> a diff --git a/testsuite/tests/dependent/ghci/all.T b/testsuite/tests/dependent/ghci/all.T new file mode 100644 index 0000000000..6d9332adaa --- /dev/null +++ b/testsuite/tests/dependent/ghci/all.T @@ -0,0 +1,3 @@ +test('T11549', + normal, + ghci_script, ['T11549.script']) diff --git a/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr b/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr index a4ce1e4131..963dcbb6a3 100644 --- a/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr +++ b/testsuite/tests/dependent/should_fail/TypeSkolEscape.stderr @@ -2,6 +2,6 @@ TypeSkolEscape.hs:8:1: error: • Quantified type's kind mentions quantified type variable (skolem escape) - type: forall (v1 :: RuntimeRep) (a1 :: TYPE v1). a1 + type: forall a1. a1 of kind: TYPE v • In the type synonym declaration for ‘Bad’ diff --git a/testsuite/tests/ghci/scripts/T7627.stdout b/testsuite/tests/ghci/scripts/T7627.stdout index ee6dfa4f10..81a360facb 100644 --- a/testsuite/tests/ghci/scripts/T7627.stdout +++ b/testsuite/tests/ghci/scripts/T7627.stdout @@ -28,12 +28,6 @@ instance (Monoid a, Monoid b) => Monoid (a, b) data (#,#) (c :: TYPE a) (d :: TYPE b) = (#,#) c d -- Defined in ‘GHC.Prim’ (,) :: a -> b -> (a, b) -(#,#) - :: forall (a :: GHC.Types.RuntimeRep) (b :: GHC.Types.RuntimeRep) (c :: TYPE - a) (d :: TYPE b). - c -> d -> (# c, d #) +(#,#) :: c -> d -> (# c, d #) ( , ) :: a -> b -> (a, b) -(# , #) - :: forall (a :: GHC.Types.RuntimeRep) (b :: GHC.Types.RuntimeRep) (c :: TYPE - a) (d :: TYPE b). - c -> d -> (# c, d #) +(# , #) :: c -> d -> (# c, d #) |