gitlab-ci: Update bootstrap compiled used for Darwin builds
[ghc.git] / testsuite / tests / partial-sigs / should_compile / T12845.hs
1 {-# LANGUAGE DataKinds #-}
2 {-# LANGUAGE PartialTypeSignatures #-}
3 {-# LANGUAGE ScopedTypeVariables #-}
4 {-# LANGUAGE TypeFamilies #-}
5 {-# LANGUAGE TypeOperators #-}
6
7 module T12845 where
8
9 import Data.Proxy
10
11 data Foo (m :: Bool)
12
13 type family Head (xs :: [(Bool, Bool)]) where Head (x ': xs) = x
14
15 type family Bar (x :: Bool) (y :: Bool) :: Bool
16
17 -- to trigger the bug, r and r' cannot *both* appear on the RHS
18 broken :: forall r r' rngs . ('(r,r') ~ Head rngs, Bar r r' ~ 'True, _)
19 => Foo r -> Proxy rngs -> ()
20 broken x _ = let y = requireBar x :: Foo r' in ()
21
22 requireBar :: (Bar m m' ~ 'True) => Foo m -> Foo m'
23 requireBar = undefined