Safe Haskell | None |
---|---|
Language | Haskell2010 |
Agda.Mimer.Types
Synopsis
- data MimerResult
- isNoResult :: MimerResult -> Bool
- data SearchStepResult
- data SearchBranch = SearchBranch {
- sbTCState :: TCState
- sbGoals :: [Goal]
- sbCost :: Int
- sbCache :: Map CheckpointId ComponentCache
- sbComponentsUsed :: Map Name Int
- addBranchGoals :: [Goal] -> SearchBranch -> SearchBranch
- data Goal = Goal {}
- nextGoal :: SearchBranch -> (Goal, SearchBranch)
- type ComponentCache = Map Component (Maybe [Component])
- data BaseComponents = BaseComponents {
- hintFns :: [Component]
- hintDataTypes :: [Component]
- hintRecordTypes :: [Component]
- hintAxioms :: [Component]
- hintLevel :: [Component]
- hintProjections :: [Component]
- hintThisFn :: Maybe Component
- hintLetVars :: [Open Component]
- hintRecVars :: Open [(Term, NoSubst Term Int)]
- type CompId = Int
- data Component = Component {}
- mkComponent :: CompId -> [MetaId] -> Cost -> Maybe Name -> Nat -> Term -> Type -> Component
- mkComponentQ :: CompId -> Cost -> QName -> Nat -> Term -> Type -> Component
- noName :: Maybe Name
- addCost :: Cost -> Component -> Component
- replaceCompMeta :: MetaId -> [MetaId] -> Component -> Component
- data SearchOptions = SearchOptions {
- searchBaseComponents :: BaseComponents
- searchHintMode :: HintMode
- searchTimeout :: MilliSeconds
- searchGenProjectionsLocal :: Bool
- searchGenProjectionsLet :: Bool
- searchGenProjectionsExternal :: Bool
- searchGenProjectionsRec :: Bool
- searchSpeculateProjections :: Bool
- searchTopMeta :: MetaId
- searchTopEnv :: TCEnv
- searchTopCheckpoint :: CheckpointId
- searchInteractionId :: InteractionId
- searchFnName :: Maybe QName
- searchCosts :: Costs
- searchStats :: IORef MimerStats
- searchRewrite :: Rewrite
- searchBuiltinFlat :: Maybe QName
- type Cost = Int
- data Costs = Costs {
- costLocal :: Cost
- costFn :: Cost
- costDataCon :: Cost
- costRecordCon :: Cost
- costSpeculateProj :: Cost
- costProj :: Cost
- costAxiom :: Cost
- costLet :: Cost
- costLevel :: Cost
- costSet :: Cost
- costRecCall :: Cost
- costNewMeta :: Cost
- costNewHiddenMeta :: Cost
- costCompReuse :: Nat -> Cost
- noCost :: Cost
- defaultCosts :: Costs
- data MimerStats = MimerStats {
- statCompHit :: !Int
- statCompGen :: !Int
- statCompRegen :: !Int
- statCompNoRegen :: !Int
- statMetasCreated :: !Int
- statTypeEqChecks :: !Int
- statRefineSuccess :: !Int
- statRefineFail :: !Int
- emptyMimerStats :: MimerStats
- incCompHit :: MimerStats -> MimerStats
- incCompGen :: MimerStats -> MimerStats
- incCompRegen :: MimerStats -> MimerStats
- incCompNoRegen :: MimerStats -> MimerStats
- incMetasCreated :: MimerStats -> MimerStats
- incTypeEqChecks :: MimerStats -> MimerStats
- incRefineSuccess :: MimerStats -> MimerStats
- incRefineFail :: MimerStats -> MimerStats
- haskellRecord :: Doc -> [(Doc, Doc)] -> Doc
- keyValueList :: [(Doc, Doc)] -> Doc
Results
data MimerResult Source #
Constructors
MimerExpr String | Returns |
MimerList [(Int, String)] | |
MimerNoResult |
Instances
isNoResult :: MimerResult -> Bool Source #
data SearchStepResult Source #
Constructors
ResultExpr Expr | |
OpenBranch SearchBranch | |
NoSolution |
Instances
NFData SearchStepResult Source # | |||||
Defined in Agda.Mimer.Types Methods rnf :: SearchStepResult -> () # | |||||
Generic SearchStepResult Source # | |||||
Defined in Agda.Mimer.Types Associated Types
Methods from :: SearchStepResult -> Rep SearchStepResult x # to :: Rep SearchStepResult x -> SearchStepResult # | |||||
type Rep SearchStepResult Source # | |||||
Defined in Agda.Mimer.Types type Rep SearchStepResult = D1 ('MetaData "SearchStepResult" "Agda.Mimer.Types" "Agda-2.9.0-inplace" 'False) (C1 ('MetaCons "ResultExpr" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Expr)) :+: (C1 ('MetaCons "OpenBranch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SearchBranch)) :+: C1 ('MetaCons "NoSolution" 'PrefixI 'False) (U1 :: Type -> Type))) |
Search branches
data SearchBranch Source #
Constructors
SearchBranch | |
Fields
|
Instances
Pretty SearchBranch Source # | |||||
Defined in Agda.Mimer.Types Methods pretty :: SearchBranch -> Doc Source # prettyPrec :: Int -> SearchBranch -> Doc Source # prettyList :: [SearchBranch] -> Doc Source # | |||||
NFData SearchBranch Source # | |||||
Defined in Agda.Mimer.Types Methods rnf :: SearchBranch -> () # | |||||
Generic SearchBranch Source # | |||||
Defined in Agda.Mimer.Types Associated Types
| |||||
Eq SearchBranch Source # | |||||
Defined in Agda.Mimer.Types | |||||
Ord SearchBranch Source # | |||||
Defined in Agda.Mimer.Types Methods compare :: SearchBranch -> SearchBranch -> Ordering # (<) :: SearchBranch -> SearchBranch -> Bool # (<=) :: SearchBranch -> SearchBranch -> Bool # (>) :: SearchBranch -> SearchBranch -> Bool # (>=) :: SearchBranch -> SearchBranch -> Bool # max :: SearchBranch -> SearchBranch -> SearchBranch # min :: SearchBranch -> SearchBranch -> SearchBranch # | |||||
type Rep SearchBranch Source # | |||||
Defined in Agda.Mimer.Types type Rep SearchBranch = D1 ('MetaData "SearchBranch" "Agda.Mimer.Types" "Agda-2.9.0-inplace" 'False) (C1 ('MetaCons "SearchBranch" 'PrefixI 'True) ((S1 ('MetaSel ('Just "sbTCState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 TCState) :*: S1 ('MetaSel ('Just "sbGoals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Goal])) :*: (S1 ('MetaSel ('Just "sbCost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: (S1 ('MetaSel ('Just "sbCache") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map CheckpointId ComponentCache)) :*: S1 ('MetaSel ('Just "sbComponentsUsed") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Map Name Int)))))) |
addBranchGoals :: [Goal] -> SearchBranch -> SearchBranch Source #
nextGoal :: SearchBranch -> (Goal, SearchBranch) Source #
Take the first goal off a search branch. Precondition: the set of goals is non-empty.
Components
data BaseComponents Source #
Components that are not changed during search. Components that do change
(local variables and let bindings) are stored in each SearchBranch
.
Constructors
BaseComponents | |
Fields
|
Instances
Pretty BaseComponents Source # | |||||
Defined in Agda.Mimer.Types Methods pretty :: BaseComponents -> Doc Source # prettyPrec :: Int -> BaseComponents -> Doc Source # prettyList :: [BaseComponents] -> Doc Source # | |||||
PrettyTCM BaseComponents Source # | |||||
Defined in Agda.Mimer.Types Methods prettyTCM :: MonadPretty m => BaseComponents -> m Doc Source # | |||||
NFData BaseComponents Source # | |||||
Defined in Agda.Mimer.Types Methods rnf :: BaseComponents -> () # | |||||
Generic BaseComponents Source # | |||||
Defined in Agda.Mimer.Types Associated Types
Methods from :: BaseComponents -> Rep BaseComponents x # to :: Rep BaseComponents x -> BaseComponents # | |||||
type Rep BaseComponents Source # | |||||
Defined in Agda.Mimer.Types type Rep BaseComponents = D1 ('MetaData "BaseComponents" "Agda.Mimer.Types" "Agda-2.9.0-inplace" 'False) (C1 ('MetaCons "BaseComponents" 'PrefixI 'True) (((S1 ('MetaSel ('Just "hintFns") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Component]) :*: S1 ('MetaSel ('Just "hintDataTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Component])) :*: (S1 ('MetaSel ('Just "hintRecordTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Component]) :*: S1 ('MetaSel ('Just "hintAxioms") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Component]))) :*: ((S1 ('MetaSel ('Just "hintLevel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Component]) :*: S1 ('MetaSel ('Just "hintProjections") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Component])) :*: (S1 ('MetaSel ('Just "hintThisFn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Component)) :*: (S1 ('MetaSel ('Just "hintLetVars") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Open Component]) :*: S1 ('MetaSel ('Just "hintRecVars") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Open [(Term, NoSubst Term Int)]))))))) |
Constructors
Component | |
Fields
|
Instances
Pretty Component Source # | |||||
PrettyTCM Component Source # | |||||
Defined in Agda.Mimer.Types | |||||
NFData Component Source # | |||||
Defined in Agda.Mimer.Types | |||||
Generic Component Source # | |||||
Defined in Agda.Mimer.Types Associated Types
| |||||
Eq Component Source # | |||||
Ord Component Source # | |||||
type Rep Component Source # | |||||
Defined in Agda.Mimer.Types type Rep Component = D1 ('MetaData "Component" "Agda.Mimer.Types" "Agda-2.9.0-inplace" 'False) (C1 ('MetaCons "Component" 'PrefixI 'True) (((S1 ('MetaSel ('Just "compId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 CompId) :*: S1 ('MetaSel ('Just "compName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Name))) :*: (S1 ('MetaSel ('Just "compPars") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nat) :*: S1 ('MetaSel ('Just "compTerm") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Term))) :*: ((S1 ('MetaSel ('Just "compType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Type) :*: S1 ('MetaSel ('Just "compRec") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "compMetas") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [MetaId]) :*: S1 ('MetaSel ('Just "compCost") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Cost))))) |
mkComponent :: CompId -> [MetaId] -> Cost -> Maybe Name -> Nat -> Term -> Type -> Component Source #
SearchOptions
data SearchOptions Source #
Constructors
SearchOptions | |
Fields
|
Instances
Pretty SearchOptions Source # | |
Defined in Agda.Mimer.Types Methods pretty :: SearchOptions -> Doc Source # prettyPrec :: Int -> SearchOptions -> Doc Source # prettyList :: [SearchOptions] -> Doc Source # | |
PrettyTCM SearchOptions Source # | |
Defined in Agda.Mimer.Types Methods prettyTCM :: MonadPretty m => SearchOptions -> m Doc Source # |
Constructors
Costs | |
Fields
|
defaultCosts :: Costs Source #
Measure performance
data MimerStats Source #
Constructors
MimerStats | |
Fields
|
Instances
NFData MimerStats Source # | |||||
Defined in Agda.Mimer.Types Methods rnf :: MimerStats -> () # | |||||
Generic MimerStats Source # | |||||
Defined in Agda.Mimer.Types Associated Types
| |||||
Show MimerStats Source # | |||||
Defined in Agda.Mimer.Types Methods showsPrec :: Int -> MimerStats -> ShowS # show :: MimerStats -> String # showList :: [MimerStats] -> ShowS # | |||||
Eq MimerStats Source # | |||||
Defined in Agda.Mimer.Types | |||||
type Rep MimerStats Source # | |||||
Defined in Agda.Mimer.Types type Rep MimerStats = D1 ('MetaData "MimerStats" "Agda.Mimer.Types" "Agda-2.9.0-inplace" 'False) (C1 ('MetaCons "MimerStats" 'PrefixI 'True) (((S1 ('MetaSel ('Just "statCompHit") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "statCompGen") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "statCompRegen") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "statCompNoRegen") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))) :*: ((S1 ('MetaSel ('Just "statMetasCreated") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "statTypeEqChecks") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "statRefineSuccess") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "statRefineFail") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int))))) |
incCompHit :: MimerStats -> MimerStats Source #
incCompGen :: MimerStats -> MimerStats Source #
incCompRegen :: MimerStats -> MimerStats Source #
incRefineFail :: MimerStats -> MimerStats Source #