Ticket #1807: Test2.hs

File Test2.hs, 404 bytes (added by Remi, 6 years ago)

Test module for the second case where it breaks

Line 
1{-# LANGUAGE TypeFamilies, GADTs, KindSignatures, TypeOperators, RankNTypes, FlexibleContexts #-}
2module Foo where
3
4data Equal a b = (b ~ a) => Refl
5
6foo         :: forall a b. ((a ~ b) => a -> b -> Bool) -> Equal a b -> a -> b -> Bool
7foo f Refl a b = f a b
8
9x   :: Eq b => Equal a b -> a -> b -> Bool
10x   = foo (==)
11
12-- Doesn't typecheck
13{-
14y   :: Eq a => Equal a b -> a -> b -> Bool
15y   = foo (==)
16-}