{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE KindSignatures #-}
module Data.JoinSemilattice.Class.Lifting where
import Data.JoinSemilattice.Defined (Defined (..))
import Data.JoinSemilattice.Intersect (Intersect, Intersectable)
import qualified Data.JoinSemilattice.Intersect as Intersect
import Data.Kind (Constraint, Type)
class Lifting (f :: Type -> Type) (c :: Type -> Constraint) | f -> c where
lift' :: c x => x -> f x
instance Lifting Defined Eq where
lift' :: x -> Defined x
lift' = x -> Defined x
forall x. x -> Defined x
Exactly
instance Lifting Intersect Intersectable where
lift' :: x -> Intersect x
lift' = x -> Intersect x
forall x. Hashable x => x -> Intersect x
Intersect.singleton