Fix #17067 by making data family type constructors actually injective
[ghc.git] / testsuite / tests / partial-sigs / should_compile / T14715.hs
1 {-# LANGUAGE FlexibleContexts #-}
2 {-# LANGUAGE MultiParamTypeClasses #-}
3 {-# LANGUAGE PartialTypeSignatures #-}
4 {-# LANGUAGE ScopedTypeVariables #-}
5 {-# LANGUAGE TypeFamilies #-}
6 module T14715 (bench_mulPublic) where
7
8 data Cyc r
9 data CT zp r'q
10 class Reduce a b
11 type family LiftOf b
12
13 bench_mulPublic :: forall z zp zq . (z ~ LiftOf zq, _) => Cyc zp -> Cyc z -> IO (zp,zq)
14 bench_mulPublic pt sk = do
15 ct :: CT zp (Cyc zq) <- encrypt sk pt
16 undefined ct
17
18 encrypt :: forall z zp zq. Reduce z zq => Cyc z -> Cyc zp -> IO (CT zp (Cyc zq))
19 encrypt = undefined