symantic-base-0.4.0.20211106: Basic symantic combinators for Embedded Domain-Specific Languages (EDSL)
Safe HaskellNone
LanguageHaskell2010

Symantic.Viewer

Documentation

data Viewer a where Source #

Constructors

Viewer :: (ViewerEnv -> ShowS) -> Viewer a 
ViewerUnifix :: Unifix -> String -> String -> Viewer (a -> b) 
ViewerInfix :: Infix -> String -> String -> Viewer (a -> b -> c) 
ViewerApp :: Viewer (b -> a) -> Viewer b -> Viewer a 

Instances

Instances details
LiftDerived Viewer Source # 
Instance details

Defined in Symantic.Viewer

Maybeable Viewer Source # 
Instance details

Defined in Symantic.Viewer

Methods

nothing :: Viewer (Maybe a) Source #

just :: Viewer (a -> Maybe a) Source #

Listable Viewer Source # 
Instance details

Defined in Symantic.Viewer

Methods

cons :: Viewer (a -> [a] -> [a]) Source #

nil :: Viewer [a] Source #

Equalable Viewer Source # 
Instance details

Defined in Symantic.Viewer

Methods

equal :: Eq a => Viewer (a -> a -> Bool) Source #

Eitherable Viewer Source # 
Instance details

Defined in Symantic.Viewer

Methods

left :: Viewer (l -> Either l r) Source #

right :: Viewer (r -> Either l r) Source #

Bottomable Viewer Source # 
Instance details

Defined in Symantic.Viewer

Methods

bottom :: Viewer a Source #

Anythingable Viewer Source # 
Instance details

Defined in Symantic.Viewer

Methods

anything :: Viewer a -> Viewer a Source #

Abstractable Viewer Source # 
Instance details

Defined in Symantic.Viewer

Methods

lam :: (Viewer a -> Viewer b) -> Viewer (a -> b) Source #

lam1 :: (Viewer a -> Viewer b) -> Viewer (a -> b) Source #

var :: Viewer a -> Viewer a Source #

(.@) :: Viewer (a -> b) -> Viewer a -> Viewer b Source #

Show c => Constantable c Viewer Source # 
Instance details

Defined in Symantic.Viewer

Methods

constant :: c -> Viewer c Source #

Show (Viewer a) Source # 
Instance details

Defined in Symantic.Viewer

Methods

showsPrec :: Int -> Viewer a -> ShowS #

show :: Viewer a -> String #

showList :: [Viewer a] -> ShowS #

IsString (Viewer a) Source # 
Instance details

Defined in Symantic.Viewer

Methods

fromString :: String -> Viewer a #

Show (SomeData Viewer a) Source # 
Instance details

Defined in Symantic.Viewer

type Derived Viewer Source #

Unusual, but enables to leverage default definition of methods.

Instance details

Defined in Symantic.Viewer

viewLam :: String -> (Viewer a -> Viewer b) -> Viewer (a -> b) Source #