Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- type Var = Int16
- data CoreExpr
- newtype Dictionary = Dict {}
- arityCE :: CoreExpr -> Int
- isAbsent :: Int -> CoreExpr -> Bool
- isa :: Integer -> CoreExpr -> Integer
- type VarLib = Array Var Dynamic
- type VarPriorityLib = Array Var Int
- actualVarName :: String -> Exp
- stripByd_ :: [Char] -> [Char]
- headIsX :: CoreExpr -> Bool
- isAPrimitiveCombinator :: CoreExpr -> Bool
- removeAbsents :: CoreExpr -> CoreExpr
- adjustXs :: (Bits a, Num a) => a -> Int8 -> CoreExpr -> CoreExpr
- unboundXs :: (Bits a, Num a) => Int8 -> CoreExpr -> a
- subexprs :: CoreExpr -> [CoreExpr]
- sub :: Integral i => i -> CoreExpr -> [CoreExpr]
- branches :: CoreExpr -> [CoreExpr]
- bra :: Integral i => i -> CoreExpr -> [CoreExpr]
- parentsOfLeaves :: CoreExpr -> [CoreExpr]
- pol :: Integral i => i -> CoreExpr -> [CoreExpr]
- args :: CoreExpr -> [CoreExpr]
- isALeaf :: CoreExpr -> Bool
- ceToPriority :: VarPriorityLib -> CoreExpr -> Int
- exprToTHExp :: VarLib -> CoreExpr -> Exp
- exprToTHExpLite :: VarLib -> CoreExpr -> Exp
- exprToTHExp' :: Bool -> Array Var Dynamic -> CoreExpr -> Exp
- funOccursIn :: Int8 -> CoreExpr -> Bool
- lightBeta :: CoreExpr -> CoreExpr
- replace :: Int8 -> Int8 -> CoreExpr -> CoreExpr
- liftFun :: Int8 -> CoreExpr -> CoreExpr
- nlift :: Int8 -> Int8 -> CoreExpr -> CoreExpr
- nliftInt :: Int8 -> Int8 -> Int8 -> Int8
- napply :: Integral i => i -> (a -> a) -> a -> a
- type Primitive = (HValue, Exp, Type)
- newtype HValue = HV (forall a. a)
- primitivesToTCL :: [Primitive] -> TyConLib
- primitivesToVL :: TyConLib -> [Primitive] -> VarLib
- dynamicsToVL :: [Dynamic] -> VarLib
- prioritiesToVPL :: [Int] -> VarPriorityLib
- listToArray :: (Integral i, Ix i) => [a] -> Array i a
- primitiveToDynamic :: TyConLib -> Primitive -> Dynamic
- defaultVarLib :: VarLib
- lenDefaultPrimitives :: Integer
- defaultPrimitives :: [Dynamic]
Documentation
S | |
K | |
I | |
B | |
C | |
S' | |
B' | |
C' | |
Y | |
Lambda CoreExpr | |
X !Int8 | |
FunLambda CoreExpr | |
FunX Int8 | |
Tuple !Int8 | |
Primitive | |
PrimCon | |
Context Dictionary | |
CoreExpr :$ CoreExpr infixl 9 | |
Case CoreExpr [(Var, Int8, CoreExpr)] | |
Fix CoreExpr Int8 [Int8] | |
VarName String |
Instances
newtype Dictionary Source #
Instances
Eq Dictionary Source # | |
Defined in MagicHaskeller.CoreLang (==) :: Dictionary -> Dictionary -> Bool # (/=) :: Dictionary -> Dictionary -> Bool # | |
Ord Dictionary Source # | |
Defined in MagicHaskeller.CoreLang compare :: Dictionary -> Dictionary -> Ordering # (<) :: Dictionary -> Dictionary -> Bool # (<=) :: Dictionary -> Dictionary -> Bool # (>) :: Dictionary -> Dictionary -> Bool # (>=) :: Dictionary -> Dictionary -> Bool # max :: Dictionary -> Dictionary -> Dictionary # min :: Dictionary -> Dictionary -> Dictionary # | |
Show Dictionary Source # | |
Defined in MagicHaskeller.CoreLang showsPrec :: Int -> Dictionary -> ShowS # show :: Dictionary -> String # showList :: [Dictionary] -> ShowS # |
actualVarName :: String -> Exp Source #
removeAbsents :: CoreExpr -> CoreExpr Source #
parentsOfLeaves :: CoreExpr -> [CoreExpr] Source #
parentsOfLeaves
collects branch nodes whose children are leaf nodes. This can be used for incremental learning.
ceToPriority :: VarPriorityLib -> CoreExpr -> Int Source #
primitivesToTCL :: [Primitive] -> TyConLib Source #
primitivesToVL :: TyConLib -> [Primitive] -> VarLib Source #
dynamicsToVL :: [Dynamic] -> VarLib Source #
dynamicsToVL
is useful for incremental learning.
prioritiesToVPL :: [Int] -> VarPriorityLib Source #
primitiveToDynamic :: TyConLib -> Primitive -> Dynamic Source #
defaultVarLib :: VarLib Source #
defaultVarLib
can be used as a VarLib for testing and debugging. Currently this is used only by the analytical synthesizer.
defaultPrimitives :: [Dynamic] Source #
defaultPrimitives
is the set of primitives that we want to make sure to appear in VarLib but may not appear in the primitive set with which to synthesize.
In other words, it is the set of primitives we want to make sure to assign IDs to.