summaryrefslogtreecommitdiff
path: root/testsuite/tests/generics
diff options
context:
space:
mode:
authorOleg Grenrus <oleg.grenrus@iki.fi>2015-02-05 17:42:36 -0600
committerAustin Seipp <austin@well-typed.com>2015-02-05 17:42:36 -0600
commitae39c5c040f121947e14877c3ceb47bbe80c0ccb (patch)
treeb81d499bb2e4ffffd0b1c2b9774c47f10ccf00b4 /testsuite/tests/generics
parentd4f25cb151db1a539aab66b26ccca4d166562b22 (diff)
downloadhaskell-ae39c5c040f121947e14877c3ceb47bbe80c0ccb.tar.gz
Add packageName to GHC.Generics.Datatype
Summary: Added packageName to GHC.Generics.Datatype class definition Reviewers: hvr, dreixel, austin Reviewed By: dreixel, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D631 GHC Trac Issues: #10030
Diffstat (limited to 'testsuite/tests/generics')
-rw-r--r--testsuite/tests/generics/GenDerivOutput.stderr2
-rw-r--r--testsuite/tests/generics/GenDerivOutput1_0.stderr1
-rw-r--r--testsuite/tests/generics/GenDerivOutput1_1.stderr4
-rw-r--r--testsuite/tests/generics/T10030.hs7
-rw-r--r--testsuite/tests/generics/T10030.stdout2
-rw-r--r--testsuite/tests/generics/all.T1
6 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/generics/GenDerivOutput.stderr b/testsuite/tests/generics/GenDerivOutput.stderr
index b47b3f3e42..68283ef63f 100644
--- a/testsuite/tests/generics/GenDerivOutput.stderr
+++ b/testsuite/tests/generics/GenDerivOutput.stderr
@@ -91,6 +91,7 @@ Derived instances:
instance GHC.Generics.Datatype GenDerivOutput.D1List where
GHC.Generics.datatypeName _ = "List"
GHC.Generics.moduleName _ = "GenDerivOutput"
+ GHC.Generics.packageName _ = "main"
instance GHC.Generics.Constructor GenDerivOutput.C1_0List where
GHC.Generics.conName _ = "Nil"
@@ -108,6 +109,7 @@ Derived instances:
instance GHC.Generics.Datatype GenDerivOutput.D1Rose where
GHC.Generics.datatypeName _ = "Rose"
GHC.Generics.moduleName _ = "GenDerivOutput"
+ GHC.Generics.packageName _ = "main"
instance GHC.Generics.Constructor GenDerivOutput.C1_0Rose where
GHC.Generics.conName _ = "Empty"
diff --git a/testsuite/tests/generics/GenDerivOutput1_0.stderr b/testsuite/tests/generics/GenDerivOutput1_0.stderr
index 222d2d3165..0a89f4bb1a 100644
--- a/testsuite/tests/generics/GenDerivOutput1_0.stderr
+++ b/testsuite/tests/generics/GenDerivOutput1_0.stderr
@@ -24,6 +24,7 @@ Derived instances:
instance GHC.Generics.Datatype GenDerivOutput1_0.D1List where
GHC.Generics.datatypeName _ = "List"
GHC.Generics.moduleName _ = "GenDerivOutput1_0"
+ GHC.Generics.packageName _ = "main"
instance GHC.Generics.Constructor GenDerivOutput1_0.C1_0List where
GHC.Generics.conName _ = "Nil"
diff --git a/testsuite/tests/generics/GenDerivOutput1_1.stderr b/testsuite/tests/generics/GenDerivOutput1_1.stderr
index 6b9f546990..3fac6d2803 100644
--- a/testsuite/tests/generics/GenDerivOutput1_1.stderr
+++ b/testsuite/tests/generics/GenDerivOutput1_1.stderr
@@ -156,6 +156,7 @@ Derived instances:
instance GHC.Generics.Datatype CanDoRep1_1.D1Da where
GHC.Generics.datatypeName _ = "Da"
GHC.Generics.moduleName _ = "CanDoRep1_1"
+ GHC.Generics.packageName _ = "main"
instance GHC.Generics.Constructor CanDoRep1_1.C1_0Da where
GHC.Generics.conName _ = "D0"
@@ -173,6 +174,7 @@ Derived instances:
instance GHC.Generics.Datatype CanDoRep1_1.D1Db where
GHC.Generics.datatypeName _ = "Db"
GHC.Generics.moduleName _ = "CanDoRep1_1"
+ GHC.Generics.packageName _ = "main"
instance GHC.Generics.Constructor CanDoRep1_1.C1_0Db where
GHC.Generics.conName _ = "D0b"
@@ -190,6 +192,7 @@ Derived instances:
instance GHC.Generics.Datatype CanDoRep1_1.D1Dc where
GHC.Generics.datatypeName _ = "Dc"
GHC.Generics.moduleName _ = "CanDoRep1_1"
+ GHC.Generics.packageName _ = "main"
instance GHC.Generics.Constructor CanDoRep1_1.C1_0Dc where
GHC.Generics.conName _ = "D0c"
@@ -207,6 +210,7 @@ Derived instances:
instance GHC.Generics.Datatype CanDoRep1_1.D1Dd where
GHC.Generics.datatypeName _ = "Dd"
GHC.Generics.moduleName _ = "CanDoRep1_1"
+ GHC.Generics.packageName _ = "main"
instance GHC.Generics.Constructor CanDoRep1_1.C1_0Dd where
GHC.Generics.conName _ = "D0d"
diff --git a/testsuite/tests/generics/T10030.hs b/testsuite/tests/generics/T10030.hs
new file mode 100644
index 0000000000..e57a115dfc
--- /dev/null
+++ b/testsuite/tests/generics/T10030.hs
@@ -0,0 +1,7 @@
+module Main where
+
+import GHC.Generics
+
+main = do
+ putStrLn $ packageName $ from $ Just True
+ putStrLn $ packageName $ from $ True
diff --git a/testsuite/tests/generics/T10030.stdout b/testsuite/tests/generics/T10030.stdout
new file mode 100644
index 0000000000..8d9f99b6ec
--- /dev/null
+++ b/testsuite/tests/generics/T10030.stdout
@@ -0,0 +1,2 @@
+base
+ghc-prim
diff --git a/testsuite/tests/generics/all.T b/testsuite/tests/generics/all.T
index b5050e458a..c51de18a9c 100644
--- a/testsuite/tests/generics/all.T
+++ b/testsuite/tests/generics/all.T
@@ -40,3 +40,4 @@ test('T7878', extra_clean(['T7878A.o' ,'T7878A.hi'
test('T8468', normal, compile_fail, [''])
test('T8479', normal, compile, [''])
test('T9563', normal, compile, [''])
+test('T10030', normal, compile_and_run, [''])