summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_fail/T3330a.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/indexed-types/should_fail/T3330a.hs')
-rw-r--r--testsuite/tests/indexed-types/should_fail/T3330a.hs25
1 files changed, 25 insertions, 0 deletions
diff --git a/testsuite/tests/indexed-types/should_fail/T3330a.hs b/testsuite/tests/indexed-types/should_fail/T3330a.hs
new file mode 100644
index 0000000000..c09eb0fd5c
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T3330a.hs
@@ -0,0 +1,25 @@
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE TypeFamilies #-}
+
+-- A very bogus program (multiple errors) but
+-- sent GHC 6.12 into a loop
+
+module T3330a where
+
+import Control.Monad.Writer
+
+data AnyF (s :: * -> *) = AnyF
+class HFunctor (f :: (* -> *) -> * -> *)
+type family PF (phi :: * -> *) :: (* -> *) -> * -> *
+
+children :: s ix -> (PF s) r ix -> [AnyF s]
+children p x = execWriter (hmapM p collect x)
+
+collect :: HFunctor (PF s) => s ix -> r ix -> Writer [AnyF s] (r ix)
+collect = undefined
+
+hmapM :: (forall ix. phi ix -> r ix -> m (r' ix))
+ -> phi ix -> f r ix -> m (f r' ix)
+hmapM = undefined
+