blob: 599893cc09a6a0a414bb4818ec36ee8ed19675a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
{-# LANGUAGE MultiParamTypeClasses,
FlexibleInstances, OverlappingInstances, UndecidableInstances #-}
--
-- Test case adopted from the HList library
-- http://www.cwi.nl/~ralf/HList/
--
module TypeEq where
import FakePrelude
--
-- Type-level type equality;
-- defined in terms of type-level cast
--
instance TypeEq x x HTrue
instance (HBool b, TypeCast HFalse b) => TypeEq x y b
--
-- NOTE! instance TypeEq x y HFalse -- would violate functional dependency
--
|