summaryrefslogtreecommitdiff
path: root/testsuite/tests/simplCore/should_compile/T10180.hs
blob: 55c52f0ecdeca9b1f4f449ba44e2e0a3cc6a434e (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
26
27
{-# LANGUAGE TypeOperators, TypeFamilies, GADTs, EmptyCase #-}
module T10180 where

newtype Foo = Foo Int

type family Bar a
type instance Bar Int = Int

type family Baz a where
  Baz Int = Int
  Baz Char = Int

data a :~: b where
  Refl :: a :~: a

absurd0 :: Int :~: Bool -> a
absurd0 x = case x of {}

absurd1 :: Foo :~: Bool -> a
absurd1 x = case x of {}

absurd2 :: Bar Int :~: Bool -> a
absurd2 x = case x of {}

absurd3 :: Baz a :~: Bool -> a
absurd3 x = case x of {}