summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/tcfail201.hs
blob: 5b18dd98607ae15e00c75caa0b67c6c5f24ba02d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{-# LANGUAGE RankNTypes #-}


-- Claus reported by email that
-- GHCi, version 6.9.20080217 loops on this program
-- http://www.haskell.org/pipermail/cvs-ghc/2008-June/043173.html
-- So I'm adding it to the test suite so that we'll see it if it happens again

module Foo where

data HsDoc id
  = DocEmpty
  | DocParagraph (HsDoc id)

gfoldl' :: (forall a b . c (a -> b) -> a -> c b) -> (forall g . g -> c g) -> a -> c a
gfoldl' k z hsDoc = case hsDoc of
                          DocEmpty                  -> z DocEmpty
--                        (DocParagraph hsDoc)      -> z DocParagraph `k` hsDoc