summaryrefslogtreecommitdiff
path: root/testsuite/tests/indexed-types/should_fail/Overlap15.hs
blob: 2e31b53fbef41f19294f6142b1e7d3d160964452 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
{-# LANGUAGE TypeFamilies #-}

-- In an ideal world, this would work. But, GHC doesn't implement
-- a full infinite-type unifier, so it can't figure out that F b [b] Bool
-- can safely reduce to Bool.

module Overlap15 where

import Data.Proxy

type family F a b c where
  F a a a    = Int
  F b c Bool = Bool

foo :: Proxy b -> F b [b] Bool
foo _ = False