summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T8044.hs
blob: 0a1ce69bc9a442784a412c48bfbabc539cd443dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{-# LANGUAGE GADTs, TypeFamilies #-}

module T8044 where

data X a where
  XInt :: X Int
  XBool :: X Bool
  XChar :: X Char

type family Frob a where
  Frob Int = Int
  Frob x   = Char

frob :: X a -> X (Frob a)
frob XInt = XInt
frob _    = XChar