summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T12083a.hs
blob: 0ca86f722252e9b72d88f834c1c331a957cd5d90 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UnicodeSyntax #-}
module T12803a where

type Constrd a = Num a ⇒ a

data ADT a = ADT (Constrd a) ExistentiallyLost

data ExistentiallyLost = ∀ u. TC u ⇒ ExistentiallyLost u

class u ~ (ATF1 u, ATF2 u) ⇒ TC u where
    type ATF1    u ∷ *
    type ATF2    u ∷ *
    uie_handlers   ∷ ADT Int

-- Loop:
--  - ADT depends on ExistentiallyLost (also the Constrd appendage)
--  - ExistentiallyLost depends on TC
--  - TC depends on ADT