Core.hs (575B)
1 {-# LANGUAGE UndecidableSuperClasses #-} 2 3 module Lude.Constraint.Core ( 4 And, 5 type (&), 6 And', 7 (:&:), 8 ) where 9 10 import Prelude.Experimental qualified as GHC 11 12 import Lude.Haskell 13 14 -------------------------------------------------------------------------------- 15 16 type And :: Biendo Constraint 17 type And = GHC.CTuple2 18 19 type (&) :: Biendo Constraint 20 type (&) = And 21 infixl 7 & 22 23 type And' :: forall {k}. Biendo (Predicate k) 24 class (a x, b x) => And' a b x 25 instance (a x, b x) => And' a b x 26 27 type (:&:) :: forall {k}. Biendo (Predicate k) 28 type (:&:) = And' 29 infixl 7 :&: