[commit: testsuite] master: Test #7631 (fc09a86)
José Pedro Magalhães
jpm at cs.uu.nl
Wed Feb 13 11:42:21 CET 2013
Repository : ssh://darcs.haskell.org//srv/darcs/testsuite
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/fc09a8620ecd52dce75c54e5cff85ae0fd235bba
>---------------------------------------------------------------
commit fc09a8620ecd52dce75c54e5cff85ae0fd235bba
Author: Jose Pedro Magalhaes <jpm at cs.ox.ac.uk>
Date: Wed Feb 13 10:39:34 2013 +0000
Test #7631
>---------------------------------------------------------------
tests/generics/GenNewtype.hs | 10 ++++++++++
tests/generics/GenNewtype.stdout | 1 +
tests/generics/all.T | 1 +
3 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/tests/generics/GenNewtype.hs b/tests/generics/GenNewtype.hs
new file mode 100644
index 0000000..c1161fe
--- /dev/null
+++ b/tests/generics/GenNewtype.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE DeriveGeneric #-}
+
+module Main where
+
+import GHC.Generics
+
+data X = X deriving Generic
+newtype Y = Y X deriving Generic
+
+main = print [isNewtype (from X), isNewtype (from (Y X))]
diff --git a/tests/generics/GenNewtype.stdout b/tests/generics/GenNewtype.stdout
new file mode 100644
index 0000000..a9896e7
--- /dev/null
+++ b/tests/generics/GenNewtype.stdout
@@ -0,0 +1 @@
+[False,True]
diff --git a/tests/generics/all.T b/tests/generics/all.T
index 1541a47..7a88487 100644
--- a/tests/generics/all.T
+++ b/tests/generics/all.T
@@ -9,6 +9,7 @@ test('GenCannotDoRep0', normal, compile_fail, [''])
test('GenCannotDoRep1', normal, compile_fail, [''])
test('GenCannotDoRep2', normal, compile_fail, [''])
test('T5884', normal, compile, [''])
+test('GenNewtype', normal, compile_and_run, [''])
test('GenCanDoRep1_0', normal, compile, [''])
test('GenDerivOutput1_0', normal, compile, ['-dsuppress-uniques'])
More information about the ghc-commits
mailing list