diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T2497.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/T2497.hs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T2497.hs b/testsuite/tests/typecheck/should_compile/T2497.hs new file mode 100644 index 0000000000..0e6ab4e9f7 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/T2497.hs @@ -0,0 +1,19 @@ +{-# OPTIONS_GHC -fwarn-unused-binds #-} + +module ShouldCompile() where + +-- Trac #2497; test should compile without language +-- pragmas to swith on the forall +{-# RULES "id" forall (x :: a). id x = x #-} + + + +-- Trac #2213; eq should not be reported as unused + +eq,beq :: Eq a => a -> a -> Bool +eq = (==) -- Used +beq = (==) -- Unused + +{-# RULES + "rule 1" forall x y. x == y = y `eq` x + #-} |