blob: 276efd05aeeedb1d45bb8fe3e4c5f8ed6fc65a14 (
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 Rank2Types #-}
-- 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
|