symantic-lib-0.0.5.20190614: Symantics for common types.

Safe HaskellNone
LanguageHaskell2010

Language.Symantic.Lib.Either

Contents

Description

Symantic for Either.

Synopsis

Class Sym_Either

class Sym_Either term where Source #

Minimal complete definition

Nothing

Methods

_Left :: term l -> term (Either l r) Source #

_Right :: term r -> term (Either l r) Source #

either :: term (l -> a) -> term (r -> a) -> term (Either l r) -> term a Source #

_Left :: Sym_Either (UnT term) => Trans term => term l -> term (Either l r) Source #

_Right :: Sym_Either (UnT term) => Trans term => term r -> term (Either l r) Source #

either :: Sym_Either (UnT term) => Trans term => term (l -> a) -> term (r -> a) -> term (Either l r) -> term a Source #

Instances
Sym_Either View Source # 
Instance details

Defined in Language.Symantic.Lib.Either

Methods

_Left :: View l -> View (Either l r) Source #

_Right :: View r -> View (Either l r) Source #

either :: View (l -> a) -> View (r -> a) -> View (Either l r) -> View a Source #

Sym_Either Eval Source # 
Instance details

Defined in Language.Symantic.Lib.Either

Methods

_Left :: Eval l -> Eval (Either l r) Source #

_Right :: Eval r -> Eval (Either l r) Source #

either :: Eval (l -> a) -> Eval (r -> a) -> Eval (Either l r) -> Eval a Source #

(Sym_Either term, Sym_Lambda term) => Sym_Either (BetaT term) Source # 
Instance details

Defined in Language.Symantic.Lib.Either

Methods

_Left :: BetaT term l -> BetaT term (Either l r) Source #

_Right :: BetaT term r -> BetaT term (Either l r) Source #

either :: BetaT term (l -> a) -> BetaT term (r -> a) -> BetaT term (Either l r) -> BetaT term a Source #

(Sym_Either r1, Sym_Either r2) => Sym_Either (Dup r1 r2) Source # 
Instance details

Defined in Language.Symantic.Lib.Either

Methods

_Left :: Dup r1 r2 l -> Dup r1 r2 (Either l r) Source #

_Right :: Dup r1 r2 r -> Dup r1 r2 (Either l r) Source #

either :: Dup r1 r2 (l -> a) -> Dup r1 r2 (r -> a) -> Dup r1 r2 (Either l r) -> Dup r1 r2 a Source #

Types

tyEither :: Source src => Type src vs l -> Type src vs r -> Type src vs (Either l r) Source #

Terms

teEither_Left :: TermDef Either '[Proxy a, Proxy b] (() #> (a -> Either a b)) Source #

teEither_Right :: TermDef Either '[Proxy a, Proxy b] (() #> (b -> Either a b)) Source #

teEither_either :: TermDef Either '[Proxy a, Proxy b, Proxy c] (() #> ((a -> c) -> (b -> c) -> Either a b -> c)) Source #

Orphan instances

ClassInstancesFor Either Source # 
Instance details

Methods

proveConstraintFor :: Source src => proxy Either -> Type src vs q -> Maybe (Qual q) #

TypeInstancesFor Either Source # 
Instance details

Methods

expandFamFor :: Source src => proxy Either -> Len vs -> Const src fam -> Types src vs ts -> Maybe (Type src vs (Fam fam ts)) #

NameTyOf Either Source # 
Instance details

Methods

nameTyOf :: proxy Either -> Mod NameTy #

isNameTyOp :: proxy Either -> Bool #

FixityOf Either Source # 
Instance details

Methods

fixityOf :: proxy Either -> Maybe Fixity #

(Source src, SymInj ss Either) => ModuleFor src ss Either Source # 
Instance details

Methods

moduleFor :: (PathMod, Module src ss) #

Gram_Term_AtomsFor src ss g Either Source # 
Instance details

Methods

g_term_atomsFor :: [CF g (AST_Term src ss)] #