agda2train-0.0.3.0: Agda backend to generate training data for machine learning purposes.
Safe HaskellSafe-Inferred
LanguageHaskell2010

ToTrain

Description

This module contains everything related to the generation of the training data.

Synopsis

Wrapper around Agda's typechecking monad TCMT

type C = WriterT [Sample] TCM Source #

Additionally records/outputs training samples.

runC :: C () -> TCM [Sample] Source #

noop :: C () Source #

silently :: C a -> C () Source #

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.

train :: TrainF Source #

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.

names :: Term -> [QName] Source #

Gathering names from terms.

Reduction

maxDuration :: Int Source #

The hard limit on how much time can be spent on normalising a single term.