tcfail201.hs:18:58: Couldn't match type `a' with `HsDoc t0' `a' is a rigid type variable bound by the type signature for gfoldl' :: (forall a1 b. c (a1 -> b) -> a1 -> c b) -> (forall g. g -> c g) -> a -> c a at tcfail201.hs:16:1 Expected type: HsDoc t0 -> a Actual type: HsDoc t0 -> HsDoc t0 In the first argument of `z', namely `DocParagraph' In the first argument of `k', namely `z DocParagraph'