summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/indexed-types/should_compile/Simple15.hs
blob: 8a28d27b6f0ee281f2aacbf6bc92113365c352b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{-# LANGUAGE TypeFamilies #-}

module Simple15 where

(<$) :: p -> (p -> q) -> q
x <$ f = f x

type family Def p

def :: Def p -> p
def = undefined

data EQU a b = EQU

equ_refl :: EQU a a
equ_refl = EQU

data FOO = FOO
type instance Def FOO = EQU () ()

foo :: FOO
foo = equ_refl <$ def
-- This works:
-- foo = def $ equ_refl