diff options
Diffstat (limited to 'testsuite/tests/deriving/should_run/drvrun016.hs')
-rw-r--r-- | testsuite/tests/deriving/should_run/drvrun016.hs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/deriving/should_run/drvrun016.hs b/testsuite/tests/deriving/should_run/drvrun016.hs new file mode 100644 index 0000000000..1d6de577ac --- /dev/null +++ b/testsuite/tests/deriving/should_run/drvrun016.hs @@ -0,0 +1,18 @@ +-- Run with -funbox-strict-fields +-- Bug in GHC 5.04.3 + +module Main where + +data Foo = Foo Int String +data Bar = Bar Int Foo + +instance Ord Bar where + compare (Bar i _) (Bar j _) = compare i j + +instance Eq Bar where + (Bar i _) == (Bar j _) = i == j + + +data Zot = Zot !Bar !String deriving (Ord,Eq) + +main = putStrLn "Success" |