module Type.Yoko.Type
(qK, Proxy(Proxy), module Type.Yoko.Type, module Type.Spine.Stage0,
module Type.Booleans, IsEQ, Compare, EqT(..), (:=:)(..)) where
import Data.Proxy (Proxy(..))
import Type.Spine
import Type.Spine.Stage0 (KS, KTSS)
import Type.Serialize
import Data.Proxy.TH (qProxy)
import Type.Booleans
import Type.Ord.SpineSerialize (IsEQ, Compare)
import Data.Type.Equality
qP = qProxy
type family Med m a
data IdM = IdM; type instance Med IdM a = a
class Wrapper f where wrap :: Unwrap f a -> f a; unwrap :: f a -> Unwrap f a
type family Unwrap (f :: * -> *) a
type family Pred (p :: * -> *) a
type instance Pred ((:=:) a) b = IsEQ (Compare a b)
derive n = do
d <- spineType n
(d ++) `fmap` serializeTypeAsHash n
newtype (f :. g) a = Compose (f (g a))
type instance Unwrap (f :. g) a = f (g a)
instance Wrapper (f :. g) where wrap = Compose; unwrap (Compose x) = x
composeWith :: [qProxy|g :: *->*|] -> f (g a) -> (f :. g) a
composeWith _ = Compose