summaryrefslogtreecommitdiff
path: root/testsuite/tests/quantified-constraints/T14863.hs
blob: 35e1a14b4298583ac6a97e9bd8e3efd7e003acbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ImpredicativeTypes #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE QuantifiedConstraints #-}
{-# LANGUAGE UndecidableInstances #-}
module T14863 where

data Dict c where
  Dict :: c => Dict c

class    (a => b) => Implies a b
instance (a => b) => Implies a b

uncurryCImpredic1 :: forall a b c. Implies a (b => c) => Dict (Implies (a, b) c)
uncurryCImpredic1 = Dict

uncurryCImpredic2 :: forall a b c. a => Implies b c => Dict (Implies (a, b) c)
uncurryCImpredic2 = Dict

uncurryC1 :: forall a b c. (a => b => c) => Dict (Implies (a, b) c)
uncurryC1 = Dict

uncurryC2 :: forall a b c. Implies a (Implies b c) => Dict (Implies (a, b) c)
uncurryC2 = Dict