summaryrefslogtreecommitdiff
path: root/testsuite/tests/quantified-constraints/T19921.hs
blob: a0ed4367840c621c3f30d4dff480bdf75f5cc54c (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
28
29
{-# LANGUAGE
    QuantifiedConstraints
  , StandaloneKindSignatures
  , TypeOperators
  , GADTs
  , ConstraintKinds
  , RankNTypes
  , UndecidableInstances
  , ImpredicativeTypes
#-}
module Typelevel.Constraint.Repro where

import Data.Kind (Constraint, Type)

type Dict :: Constraint -> Type
data Dict c
  where
  Dict :: c => Dict c

type (⇒) :: Constraint -> Constraint -> Constraint
type c ⇒ d = c => d
infixr 0 ⇒

type (\/) :: Constraint -> Constraint -> Constraint
type a \/ b = (forall r. (a ⇒ r, b ⇒ r) ⇒ r)
infixr 5 \/

dict :: Dict ((x \/ y) \/ z ⇒ x \/ y \/ z)
dict = Dict