summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/tc220.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/tc220.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/tc220.hs26
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/tc220.hs b/testsuite/tests/typecheck/should_compile/tc220.hs
new file mode 100644
index 0000000000..f9f5443bc0
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/tc220.hs
@@ -0,0 +1,26 @@
+{-# LANGUAGE DeriveDataTypeable #-}
+
+-- See Trac #1033
+
+module Pointful' where
+
+import Data.Generics
+import Control.Monad.State
+
+data HsExp = HsWildCard deriving( Typeable, Data )
+data HsName = HsName deriving( Typeable, Data )
+
+-- rename :: () -> HsExp -> State (HsName, [HsName]) HsExp
+-- Type sig commented out
+rename1 = \_ -> everywhereM (mkM (\e -> case e of HsWildCard -> return e))
+
+rename2 _ = everywhereM (mkM (\e -> case e of HsWildCard -> return e))
+
+uncomb1 :: State (HsName, [HsName]) HsExp
+uncomb1 = rename1 () undefined
+
+uncomb2 :: State (HsName, [HsName]) HsExp
+uncomb2 = rename2 () undefined
+
+
+