{-# LANGUAGE UndecidableInstances, FlexibleInstances, FlexibleContexts #-}
module Hyper.Unify.QuantifiedVar
( HasQuantifiedVar(..)
, MonadQuantify(..)
, OrdQVar
) where
import Control.Lens (Prism')
import Hyper.Type (HyperType)
import Prelude.Compat
class HasQuantifiedVar (t :: HyperType) where
type QVar t
quantifiedVar :: Prism' (t f) (QVar t)
class (HasQuantifiedVar t, Ord (QVar t)) => OrdQVar t
instance (HasQuantifiedVar t, Ord (QVar t)) => OrdQVar t
class MonadQuantify typeConstraints q m where
newQuantifiedVariable :: typeConstraints -> m q