Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
ToTrain
Description
This module contains everything related to the generation of the training data.
Synopsis
- type C = WriterT [Sample] TCM
- runC :: C () -> TCM [Sample]
- noop :: C ()
- silently :: C a -> C ()
- type TrainF = Type -> Term -> C ()
- train :: TrainF
- forEachHole :: TrainF -> Definition -> C ()
- defsToSkip :: [String]
- names :: Term -> [QName]
- maxDuration :: Int
- withTimeout :: TCM a -> TCM (Maybe a)
- mkReduced :: (MonadFail m, MonadTCM m, PrettyTCM a, Simplify a, Reduce a, Normalise a, Eq a) => a -> m (Reduced a)
- reportReduced :: (MonadTCM m, PrettyTCM a) => Reduced a -> m ()
Wrapper around Agda's typechecking monad TCMT
Training data generation
type TrainF = Type -> Term -> C () Source #
A training function generates training data for each typed sub-term, with access to the local context via the typechecking monad.
An example training function that records a Sample
(i.e. context, type, and term) for a given subterm.
forEachHole :: TrainF -> Definition -> C () Source #
Run the training function on each subterm of a definition.
defsToSkip :: [String] Source #
Read a list of definitions to skip from data/defsToSkip.txt
.
Reduction
maxDuration :: Int Source #
The hard limit on how much time can be spent on normalising a single term.