Primitive functions
- data PrimFunc a where
- primFunc1 :: (Typeable a, PrimFunc :<: dom) => String -> (a -> b) -> ASTF dom a -> ASTF dom b
- primFunc2 :: (Typeable a, Typeable b, PrimFunc :<: dom) => String -> (a -> b -> c) -> ASTF dom a -> ASTF dom b -> ASTF dom c
- primFunc3 :: (Typeable a, Typeable b, Typeable c, PrimFunc :<: dom) => String -> (a -> b -> c -> d) -> ASTF dom a -> ASTF dom b -> ASTF dom c -> ASTF dom d
- primFunc4 :: (Typeable a, Typeable b, Typeable c, Typeable d, PrimFunc :<: dom) => String -> (a -> b -> c -> d -> e) -> ASTF dom a -> ASTF dom b -> ASTF dom c -> ASTF dom d -> ASTF dom e
- primFuncAnn1 :: (Typeable a, PrimFunc :<: dom) => String -> (a -> b) -> info b -> AnnSTF info dom a -> AnnSTF info dom b
- primFuncAnn2 :: (Typeable a, Typeable b, PrimFunc :<: dom) => String -> (a -> b -> c) -> info c -> AnnSTF info dom a -> AnnSTF info dom b -> AnnSTF info dom c
- primFuncAnn3 :: (Typeable a, Typeable b, Typeable c, PrimFunc :<: dom) => String -> (a -> b -> c -> d) -> info d -> AnnSTF info dom a -> AnnSTF info dom b -> AnnSTF info dom c -> AnnSTF info dom d
- primFuncAnn4 :: (Typeable a, Typeable b, Typeable c, Typeable d, PrimFunc :<: dom) => String -> (a -> b -> c -> d -> e) -> info e -> AnnSTF info dom a -> AnnSTF info dom b -> AnnSTF info dom c -> AnnSTF info dom d -> AnnSTF info dom e
- class IsFunction expr where
- toFunction :: expr a -> PrimFunc a
- exprEqFunc :: IsFunction expr => expr a -> expr b -> Bool
- renderPartFunc :: IsFunction expr => [String] -> expr a -> String
- evaluateFunc :: IsFunction expr => expr a -> a
- exprHashFunc :: IsFunction expr => expr a -> Hash
Documentation
primFunc2 :: (Typeable a, Typeable b, PrimFunc :<: dom) => String -> (a -> b -> c) -> ASTF dom a -> ASTF dom b -> ASTF dom cSource
primFunc3 :: (Typeable a, Typeable b, Typeable c, PrimFunc :<: dom) => String -> (a -> b -> c -> d) -> ASTF dom a -> ASTF dom b -> ASTF dom c -> ASTF dom dSource
primFunc4 :: (Typeable a, Typeable b, Typeable c, Typeable d, PrimFunc :<: dom) => String -> (a -> b -> c -> d -> e) -> ASTF dom a -> ASTF dom b -> ASTF dom c -> ASTF dom d -> ASTF dom eSource
primFuncAnn1 :: (Typeable a, PrimFunc :<: dom) => String -> (a -> b) -> info b -> AnnSTF info dom a -> AnnSTF info dom bSource
primFuncAnn2 :: (Typeable a, Typeable b, PrimFunc :<: dom) => String -> (a -> b -> c) -> info c -> AnnSTF info dom a -> AnnSTF info dom b -> AnnSTF info dom cSource
primFuncAnn3 :: (Typeable a, Typeable b, Typeable c, PrimFunc :<: dom) => String -> (a -> b -> c -> d) -> info d -> AnnSTF info dom a -> AnnSTF info dom b -> AnnSTF info dom c -> AnnSTF info dom dSource
primFuncAnn4 :: (Typeable a, Typeable b, Typeable c, Typeable d, PrimFunc :<: dom) => String -> (a -> b -> c -> d -> e) -> info e -> AnnSTF info dom a -> AnnSTF info dom b -> AnnSTF info dom c -> AnnSTF info dom d -> AnnSTF info dom eSource
class IsFunction expr whereSource
Class of expressions that can be treated as primitive functions
toFunction :: expr a -> PrimFunc aSource
exprEqFunc :: IsFunction expr => expr a -> expr b -> BoolSource
Default implementation of exprEq
renderPartFunc :: IsFunction expr => [String] -> expr a -> StringSource
Default implementation of renderPart
evaluateFunc :: IsFunction expr => expr a -> aSource
Default implementation of evaluate
exprHashFunc :: IsFunction expr => expr a -> HashSource
Default implementation of exprHash