| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Main
Contents
Description
Main driver for the agda2train executable.
Synopsis
- main :: IO ()
- mkBackend :: TrainF -> Backend' Options Options ([ScopeEntry], [ScopeEntry]) () (String, [Sample])
- data Options = Options {}
- defaultOptions :: Options
- recOpt :: Monad m => Options -> m Options
- noJsonOpt :: Monad m => Options -> m Options
- ignoreJsonOpt :: Monad m => Options -> m Options
- printJsonOpt :: Monad m => Options -> m Options
- includeDefsOpt :: Monad m => Options -> m Options
- includePrivsOpt :: Monad m => Options -> m Options
- outDirOpt :: Monad m => FilePath -> Options -> m Options
- getOutDir :: Options -> FilePath
- getOutFn :: Options -> String -> FilePath
- encode :: ToJSON a => a -> ByteString
- encodeFile :: ToJSON a => FilePath -> a -> IO ()
Documentation
mkBackend :: TrainF -> Backend' Options Options ([ScopeEntry], [ScopeEntry]) () (String, [Sample]) Source #
Make an Agda backend from a given training function (c.f. TrainF).
Command-line flags
Available options to configure how agda2train generates training data:
recurse- whether to recursively generate data from all transitive dependencies
noJson- mock run without generating any actual JSON files
ignoreJson- compile everything from scratch
includeDefs- whether to include definitions in scope, or just their type
includePrivs- whether to include private definitions as well
(run agda2train -h/--help for a human-readable description of all options)
Constructors
| Options | |
Fields
| |
Instances
| Generic Options Source # | |
| NFData Options Source # | |
| type Rep Options Source # | |
Defined in Main type Rep Options = D1 ('MetaData "Options" "Main" "main" 'False) (C1 ('MetaCons "Options" 'PrefixI 'True) ((S1 ('MetaSel ('Just "recurse") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: (S1 ('MetaSel ('Just "noJson") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "ignoreJson") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) :*: ((S1 ('MetaSel ('Just "printJson") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "includeDefs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)) :*: (S1 ('MetaSel ('Just "includePrivs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool) :*: S1 ('MetaSel ('Just "outDir") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe FilePath)))))) | |
defaultOptions :: Options Source #
The default options.
JSON encoding
encode :: ToJSON a => a -> ByteString Source #
Uses Aeson.Pretty to order the JSON fields.
encodeFile :: ToJSON a => FilePath -> a -> IO () Source #