summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/typecheck/should_fail/tcfail188.hs
blob: a79087d90d2355e5325a6097cdfde14ddbc8542f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE Rank2Types, KindSignatures #-}
{-# OPTIONS_GHC -Werror #-}

-- Trac #959

module ShouldFail where

data D (f :: (* -> *) -> * -> *) (af :: * -> *) (ax :: *) =
  D (af (f af ax))

data CList (f :: (* -> *) -> * -> *) (a :: *) =
  RCons a (CList (D f) a)

type CycleList a = forall f. CList f a

chead :: CycleList a -> a
chead ys = case ys of (RCons x xs) -> x