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

-- This one requires careful handling in
-- GHC.Tc.Utils.Unify.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