symantic-lib-0.0.3.20180213: 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 #

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 # 

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 # 

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 # 

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 # 

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 # 

Methods

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

TypeInstancesFor (* -> * -> *) Either Source # 

Methods

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

NameTyOf (* -> * -> *) Either Source # 

Methods

nameTyOf :: proxy c -> Mod NameTy #

isNameTyOp :: proxy c -> Bool #

FixityOf (* -> * -> *) Either Source # 

Methods

fixityOf :: proxy c -> Maybe Fixity #

(Source src, SymInj (* -> * -> *) ss Either) => ModuleFor (* -> * -> *) src ss Either Source # 

Methods

moduleFor :: (PathMod, Module ss Either) #

Gram_Term_AtomsFor (* -> * -> *) src ss g Either Source # 

Methods

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