module Wumpus.Basic.Kernel.Objects.Basis
(
PrimResult
, UConvert(..)
, ignoreAns
, replaceAns
, Decorate(..)
, sdecorate
, adecorate
, selaborate
, aelaborate
) where
import Wumpus.Basic.Kernel.Base.BaseDefs
import Wumpus.Basic.Kernel.Base.WrappedPrimitive
import Wumpus.Core
type PrimResult u a = (a, CatPrim)
class UConvert (f :: * -> * -> *) where
uconvF :: (Functor t, InterpretUnit u, InterpretUnit u1)
=> f u (t u) -> f u1 (t u1)
uconvZ :: (InterpretUnit u, InterpretUnit u1)
=> f u a -> f u1 a
ignoreAns :: Functor (f u) => f u a -> f u (UNil u)
ignoreAns = fmap (const UNil)
replaceAns :: Functor (f u) => a -> f u z -> f u a
replaceAns a = fmap (const a)
class Decorate (f :: * -> * -> *) where
decorate :: ZDeco -> f u a -> f u z -> f u a
elaborate :: ZDeco -> f u a -> (a -> f u z) -> f u a
obliterate :: f u a -> f u a
hyperlink :: XLink -> f u a -> f u a
svgId :: String -> f u a -> f u a
svgAnnotate :: [SvgAttr] -> f u a -> f u a
sdecorate :: Decorate f => f u a -> f u z -> f u a
sdecorate = decorate SUPERIOR
adecorate :: Decorate f => f u a -> f u z -> f u a
adecorate = decorate ANTERIOR
selaborate :: Decorate f => f u a -> (a -> f u z) -> f u a
selaborate = elaborate SUPERIOR
aelaborate :: Decorate f => f u a -> (a -> f u z) -> f u a
aelaborate = elaborate ANTERIOR