summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/indexed-types/should_compile/GADT9.hs
blob: 7ced0f76d1fdbee1654f4e7e485e799b8c2ec934 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE TypeFamilies, GADTs #-}

-- Fails with
--
--   Couldn't match expected type `z' against inferred type `y'
--
-- See also GADT2

module GADT2 where

data EQUAL x y where
  EQUAL :: x~y => EQUAL x y

foo :: EQUAL x y -> EQUAL y z -> x -> z
foo EQUAL EQUAL x = x