summaryrefslogtreecommitdiff
path: root/testsuite/tests/gadt/gadt9.hs
blob: ab8d70d07a94c651bfa256dba2f9979c457f83ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{-# LANGUAGE GADTs #-}

-- This one requires careful handling in
-- TcUnify.unifyTyConApp, to preserve rigidity.

module ShouldCompile where

data X a b where
    X :: X a a

data Y x a b where
    Y :: x a b -> x b c -> Y x a c

doy :: Y X a b -> Y X a b
doy (Y X X) = Y X X