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

module Simple12 where

type family F a

same :: a -> a -> a
same = undefined

mkf :: a -> F a
mkf p = undefined

-- works with either of these signatures
-- foo :: a ~ F a => a -> a
-- foo :: a ~ F a => a -> F a
foo p = same p (mkf p)