From 01f03cb30426fad1b848051fa142c04c8816a80c Mon Sep 17 00:00:00 2001 From: Simon Peyton Jones Date: Thu, 27 Nov 2014 15:44:10 +0000 Subject: Get the right fixity-env in standalone deriving (Trac #9830) --- testsuite/tests/deriving/should_run/T9830.hs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 testsuite/tests/deriving/should_run/T9830.hs (limited to 'testsuite/tests/deriving/should_run/T9830.hs') diff --git a/testsuite/tests/deriving/should_run/T9830.hs b/testsuite/tests/deriving/should_run/T9830.hs new file mode 100644 index 0000000000..353decc347 --- /dev/null +++ b/testsuite/tests/deriving/should_run/T9830.hs @@ -0,0 +1,13 @@ +{-# LANGUAGE StandaloneDeriving #-} +module Main where + +import T9830a + +deriving instance (Show a, Show b) => Show (ADT a b) + +main :: IO () +main = do + putStrLn $ "Prec 6: " ++ showsPrec 6 ("test" :?: "show") "" + putStrLn $ "Prec 7: " ++ showsPrec 7 ("test" :?: "show") "" + putStrLn $ "Prec 9: " ++ showsPrec 9 ("test" :?: "show") "" + putStrLn $ "Prec 10: " ++ showsPrec 10 ("test" :?: "show") "" -- cgit v1.2.1