Safe Haskell | None |
---|---|
Language | Haskell98 |
- type Prim = (Int, Int, Type, TyVar, Typed [CoreExpr])
- class WithCommon a where
- class WithCommon a => ProgramGenerator a where
- class WithCommon a => ProgramGeneratorIO a where
- extractTCL :: WithCommon a => a -> TyConLib
- extractVL :: WithCommon a => a -> VarLib
- extractRTrie :: WithCommon a => a -> RTrie
- reducer :: Common -> CoreExpr -> Dynamic
- data Common = Cmn {}
- mkCommon :: Options -> [Primitive] -> [Primitive] -> [Int] -> Common
- initCommon :: Options -> [Primitive] -> Common
- updateCommon :: [Dynamic] -> [Dynamic] -> [Int] -> Common -> Common
- type Options = Opt [[Primitive]]
- retsTVar :: (t3, t2, Type, t1, t) -> Bool
- annotateTCEs :: Typed [CoreExpr] -> Prim
- splitPrims :: [Typed [CoreExpr]] -> ([Prim], [Prim])
- splitPrimss :: [[Typed [CoreExpr]]] -> ([[Prim]], [[Prim]])
- mapSum :: (MonadPlus m, Delay m) => (a -> m b) -> [[a]] -> m b
- applyDo :: (Functor m, Monad m) => ([Type] -> Type -> PriorSubsts m a) -> [Type] -> Type -> PriorSubsts m a
- wind :: (a -> a) -> ([Type] -> Type -> a) -> [Type] -> Type -> a
- wind_ :: ([Type] -> Type -> a) -> [Type] -> Type -> a
- fromAssumptions :: (Search m, Expression e) => Common -> Int -> (Type -> PriorSubsts m [e]) -> (Type -> Type -> PriorSubsts m ()) -> Type -> [Type] -> PriorSubsts m [e]
- retMono :: (Search m, Expression e) => Common -> Int -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m ()) -> (Int8, (Int, [Type], Type)) -> PriorSubsts m [e]
- fromAvail :: [Type] -> [(Int8, (Int, [Type], Type))]
- mguAssumptions :: (Functor m, MonadPlus m) => Type -> [Type] -> PriorSubsts m [CoreExpr]
- mguAssumptions' :: MonadPlus m => [Type] -> Type -> PriorSubsts m [CoreExpr]
- matchAssumptions :: (Functor m, MonadPlus m, Expression e) => Common -> Int -> Type -> [Type] -> PriorSubsts m [e]
- mguAssumptions_ :: (Functor m, MonadPlus m) => Type -> [Type] -> PriorSubsts m ()
- mguAssumptions_' :: MonadPlus m => [Type] -> Type -> PriorSubsts m ()
- retPrimMono :: (Search m, Expression e) => Common -> Int -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> Type -> PriorSubsts m ()) -> Type -> Prim -> PriorSubsts m [e]
- funApSub :: (Search m, Expression e) => (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> Type -> [e] -> PriorSubsts m [e]
- funApSubOp :: (Monad m, Monad m1) => (r -> a2 -> r) -> (Type -> m1 (m a2)) -> (Type -> m1 (m a2)) -> (Type -> m1 (m a2)) -> Type -> m r -> m1 (m r)
- fap :: (Expression r, Monad m, Monad m1, Foldable t) => (t1 -> m1 (m r)) -> t t1 -> m r -> m1 (m r)
- mapAndFoldM :: Monad m => (t2 -> t1 -> t2) -> t2 -> (t -> m t1) -> [t] -> m t2
- retGen :: (Search m, Expression e) => Common -> Int -> (Type -> Type -> [e] -> [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> Type -> Prim -> PriorSubsts m [e]
- retGenOrd :: (Search m, Expression e) => Common -> Int -> (Type -> Type -> [e] -> [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> Type -> Prim -> PriorSubsts m [e]
- retGenTV1 :: (Search m, Expression e) => Common -> Int -> (Type -> Type -> [e] -> [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> Type -> Prim -> PriorSubsts m [e]
- retGen' :: (Integral i, Expression e, Search n) => (Type -> t1 -> PriorSubsts n b) -> Common -> i -> (Type -> Type -> [e] -> t1) -> (Type -> PriorSubsts n [e]) -> (Type -> PriorSubsts n [e]) -> (Type -> PriorSubsts n [e]) -> Type -> (Int, Int, t, TyVar, Typed [CoreExpr]) -> PriorSubsts n b
- orderedAndUsedArgs :: Type -> Bool
- usedArg :: TyVar -> Type -> Bool
- retGenTV0 :: (Integral i, Integral j, Expression e, Search n) => Common -> i -> (Type -> Type -> [e] -> b) -> (Type -> PriorSubsts n [e]) -> (Type -> PriorSubsts n [e]) -> (Type -> PriorSubsts n [e]) -> Type -> (j, j, t, TyVar, Typed [CoreExpr]) -> PriorSubsts n b
- filtExprs :: Expression e => Bool -> Type -> Type -> [e] -> [e]
- filterExprs :: Expression e => Type -> Type -> [e] -> [e]
- getArgExprs :: CoreExpr -> [CoreExpr]
- gae :: CoreExpr -> [CoreExpr] -> [CoreExpr]
- constEq :: Type -> [CoreExpr] -> Bool
- ceq :: CoreExpr -> Type -> [CoreExpr] -> Bool
- recHead :: Type -> CoreExpr -> Bool
- retSameVal :: Type -> [CoreExpr] -> Bool
- rsv :: Type -> [CoreExpr] -> Bool
- rsv' :: CoreExpr -> Type -> [CoreExpr] -> Bool
- returnsAtoA :: Type -> Bool
- returnsId :: Type -> CoreExpr -> Bool
- isId :: CoreExpr -> Bool
- isId' :: Int8 -> CoreExpr -> Bool
- isId'' :: Int8 -> Int8 -> CoreExpr -> Bool
- retVal :: Type -> CoreExpr -> CoreExpr
- rv :: Type -> Int8 -> CoreExpr -> CoreExpr
- mapsub :: Int8 -> CoreExpr -> CoreExpr
- isConstrExpr :: CoreExpr -> Bool
- isClosed :: CoreExpr -> Bool
- isClosed' :: Int8 -> CoreExpr -> Bool
- includesStrictArg :: [CoreExpr] -> Bool
- anyRec :: Type -> [CoreExpr] -> Bool
- recursive :: Type -> CoreExpr -> Bool
- constRec :: Int8 -> CoreExpr -> Bool
- belowIsUsed :: Int8 -> CoreExpr -> Bool
- isUsed :: Int8 -> CoreExpr -> Bool
- mkSubsts :: Search m => Int -> TyVar -> Type -> PriorSubsts m Int
- mkSubst :: Search m => Int -> TyVar -> Type -> PriorSubsts m Int
- mkRetty :: Type -> (Type, Type)
- reorganizer_ :: ([Type] -> a) -> [Type] -> a
- hit :: Type -> [Type] -> Bool
- combs :: (Num t1, Eq t1) => t1 -> [t] -> [[t]]
- tails :: [t] -> [[t]]
Documentation
class WithCommon a where Source #
extractCommon :: a -> Common Source #
WithCommon ProgGen Source # | |
Expression e => WithCommon (PGSF e) Source # | |
Expression e => WithCommon (PGSFIOR e) Source # | |
class WithCommon a => ProgramGenerator a where Source #
ProgramGenerator is a generalization of the old Memo
type.
mkTrie :: Common -> [Typed [CoreExpr]] -> [[Typed [CoreExpr]]] -> a Source #
|mkTrie| creates the generator with the default parameters.
mkTrieOpt :: Common -> [Typed [CoreExpr]] -> [[Typed [CoreExpr]]] -> [[Typed [CoreExpr]]] -> a Source #
matchingPrograms, matchingProgramsWOAbsents, unifyingPrograms :: Search m => Type -> a -> m AnnExpr Source #
ProgramGenerator ProgGen Source # | |
Expression e => ProgramGenerator (PGSF e) Source # | |
class WithCommon a => ProgramGeneratorIO a where Source #
mkTrieIO :: Common -> [Typed [CoreExpr]] -> [[Typed [CoreExpr]]] -> IO a Source #
|mkTrie| creates the generator with the default parameters.
mkTrieOptIO :: Common -> [Typed [CoreExpr]] -> [[Typed [CoreExpr]]] -> [[Typed [CoreExpr]]] -> IO a Source #
matchingProgramsIO, unifyingProgramsIO :: Type -> a -> RecompT IO AnnExpr Source #
Use memoization requiring IO
extractTCL :: WithCommon a => a -> TyConLib Source #
extractVL :: WithCommon a => a -> VarLib Source #
extractRTrie :: WithCommon a => a -> RTrie Source #
updateCommon :: [Dynamic] -> [Dynamic] -> [Int] -> Common -> Common Source #
updateCommon
can be used for incremetal learning
annotateTCEs :: Typed [CoreExpr] -> Prim Source #
applyDo :: (Functor m, Monad m) => ([Type] -> Type -> PriorSubsts m a) -> [Type] -> Type -> PriorSubsts m a Source #
fromAssumptions :: (Search m, Expression e) => Common -> Int -> (Type -> PriorSubsts m [e]) -> (Type -> Type -> PriorSubsts m ()) -> Type -> [Type] -> PriorSubsts m [e] Source #
retMono :: (Search m, Expression e) => Common -> Int -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m ()) -> (Int8, (Int, [Type], Type)) -> PriorSubsts m [e] Source #
mguAssumptions' :: MonadPlus m => [Type] -> Type -> PriorSubsts m [CoreExpr] Source #
matchAssumptions :: (Functor m, MonadPlus m, Expression e) => Common -> Int -> Type -> [Type] -> PriorSubsts m [e] Source #
mguAssumptions_ :: (Functor m, MonadPlus m) => Type -> [Type] -> PriorSubsts m () Source #
mguAssumptions_' :: MonadPlus m => [Type] -> Type -> PriorSubsts m () Source #
retPrimMono :: (Search m, Expression e) => Common -> Int -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> Type -> PriorSubsts m ()) -> Type -> Prim -> PriorSubsts m [e] Source #
funApSub :: (Search m, Expression e) => (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> Type -> [e] -> PriorSubsts m [e] Source #
funApSubOp :: (Monad m, Monad m1) => (r -> a2 -> r) -> (Type -> m1 (m a2)) -> (Type -> m1 (m a2)) -> (Type -> m1 (m a2)) -> Type -> m r -> m1 (m r) Source #
fap :: (Expression r, Monad m, Monad m1, Foldable t) => (t1 -> m1 (m r)) -> t t1 -> m r -> m1 (m r) Source #
mapAndFoldM :: Monad m => (t2 -> t1 -> t2) -> t2 -> (t -> m t1) -> [t] -> m t2 Source #
retGen :: (Search m, Expression e) => Common -> Int -> (Type -> Type -> [e] -> [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> Type -> Prim -> PriorSubsts m [e] Source #
retGenOrd :: (Search m, Expression e) => Common -> Int -> (Type -> Type -> [e] -> [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> Type -> Prim -> PriorSubsts m [e] Source #
retGenTV1 :: (Search m, Expression e) => Common -> Int -> (Type -> Type -> [e] -> [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> (Type -> PriorSubsts m [e]) -> Type -> Prim -> PriorSubsts m [e] Source #
retGen' :: (Integral i, Expression e, Search n) => (Type -> t1 -> PriorSubsts n b) -> Common -> i -> (Type -> Type -> [e] -> t1) -> (Type -> PriorSubsts n [e]) -> (Type -> PriorSubsts n [e]) -> (Type -> PriorSubsts n [e]) -> Type -> (Int, Int, t, TyVar, Typed [CoreExpr]) -> PriorSubsts n b Source #
orderedAndUsedArgs :: Type -> Bool Source #
retGenTV0 :: (Integral i, Integral j, Expression e, Search n) => Common -> i -> (Type -> Type -> [e] -> b) -> (Type -> PriorSubsts n [e]) -> (Type -> PriorSubsts n [e]) -> (Type -> PriorSubsts n [e]) -> Type -> (j, j, t, TyVar, Typed [CoreExpr]) -> PriorSubsts n b Source #
filtExprs :: Expression e => Bool -> Type -> Type -> [e] -> [e] Source #
filterExprs :: Expression e => Type -> Type -> [e] -> [e] Source #
getArgExprs :: CoreExpr -> [CoreExpr] Source #
retSameVal :: Type -> [CoreExpr] -> Bool Source #
returnsAtoA :: Type -> Bool Source #
isConstrExpr :: CoreExpr -> Bool Source #
includesStrictArg :: [CoreExpr] -> Bool Source #
reorganizer_ :: ([Type] -> a) -> [Type] -> a Source #