summaryrefslogtreecommitdiff
path: root/testsuite/tests/profiling/should_compile/2410.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/profiling/should_compile/2410.hs')
-rw-r--r--testsuite/tests/profiling/should_compile/2410.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/profiling/should_compile/2410.hs b/testsuite/tests/profiling/should_compile/2410.hs
new file mode 100644
index 0000000000..5c56e82992
--- /dev/null
+++ b/testsuite/tests/profiling/should_compile/2410.hs
@@ -0,0 +1,10 @@
+{-# OPTIONS_GHC -fno-warn-missing-methods -fno-warn-deprecations #-}
+module C where
+
+ data Complex a = !a :+ !a
+ deriving (Eq, Show)
+
+ instance (RealFloat a) => Num (Complex a) where
+ {-# SPECIALISE instance Num (Complex Float) #-}
+ {-# SPECIALISE instance Num (Complex Double) #-}
+ (x :+ y) + (x' :+ y') = (x + x') :+ (y + y')