mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-19 09:12:34 +03:00
47c2de3148
A common issue for users is that the behaviour of the various repl commands are not documented anywhere despite some of them having complex behaviour (e.g. `:set` which accepts a specific set of options). This implements the ability to call `:?|:h|:help` on repl commands to request detailed help for a specific repl command, while preserving the behaviour that calling the help command without any arguments prints the general help text. Generic help is defined as the first line of the help text. Detailed help is defined as the entire help text. This means that `:help :t`, for example, does not error (there is no detailed help) but instead just prints the single line of help text. * [ repl ] Use unlines for detailed help (see #2087) Ideally, the lines affected should be multiline strings. But for some arcane reason, newlines in those get swallowed in Nix and Windows **CI** only Ô.o This was already documented in issue #2087. * [ new ] --except for golden testing lib To allow CI to pass despite #2087 Co-authored-by: Guillaume Allais <guillaume.allais@ens-lyon.org>
138 lines
12 KiB
Plaintext
138 lines
12 KiB
Plaintext
Main> <expr> Evaluate an expression
|
|
:t :type <expr> Check the type of an expression
|
|
:ti <expr> Check the type of an expression, showing implicit arguments
|
|
:printdef <expr> Show the definition of a pattern-matching function
|
|
:s :search <expr> Search for values by type
|
|
:di <name> Show debugging information for a name
|
|
:module :import <module> Import an extra module
|
|
:package <string> Import every module of the package
|
|
:q :quit :exit Exit the Idris system
|
|
:cwd Displays the current working directory
|
|
:cd <string> Change the current working directory
|
|
:sh <string> Run a shell command
|
|
:set <option> Set an option
|
|
:unset <option> Unset an option
|
|
:opts Show current options settings
|
|
:c :compile <file> <expr> Compile to an executable
|
|
:exec <expr> Compile to an executable and run
|
|
:directive <string> Set a codegen-specific directive
|
|
:l :load <string> Load a file
|
|
:r :reload Reload current file
|
|
:e :edit Edit current file using $EDITOR or $VISUAL
|
|
:miss :missing <name> Show missing clauses
|
|
:total <name> Check the totality of a name
|
|
:doc <keyword|expr> Show documentation for a keyword, a name, or a primitive
|
|
:browse <module> Browse contents of a namespace
|
|
:log :logging <string> <number> Set logging level
|
|
:consolewidth <number|auto> Set the width of the console output (0 for unbounded) (auto by default)
|
|
:colour :color (on|off) Whether to use colour for the console output (enabled by default)
|
|
:m :metavars Show remaining proof obligations (metavariables or holes)
|
|
:typeat <l:number> <c:number> <n:string> Show type of term <n> defined on line <l> and column <c>
|
|
:cs :casesplit <l:number> <c:number> <n:string> Case split term <n> defined on line <l> and column <c>
|
|
:ac :addclause <l:number> <n:string> Add clause to term <n> defined on line <l>
|
|
:ml :makelemma <l:number> <n:string> Make lemma for term <n> defined on line <l>
|
|
:mc :makecase <l:number> <n:string> Make case on term <n> defined on line <l>
|
|
:mw :makewith <l:number> <n:string> Add with expression on term <n> defined on line <l>
|
|
:intro <l:number> <n:string> Introduce unambiguous constructor in hole <n> defined on line <l>
|
|
:refine <l:number> <c:number> <h:string> <e:expr>Refine hole <h> with identifier <n> on line <l> and column <c>
|
|
:ps :proofsearch <l:number> <n:string> <h:[name]> Search for a proof
|
|
:psnext Show next proof
|
|
:gd <l:number> <n:string> <r:number|0> Try to generate a definition using proof-search
|
|
:gdnext Show next definition
|
|
:version Display the Idris version
|
|
:? :h :help <string> Display help text, optionally of a specific command.
|
|
:let <decls> Define a new value.
|
|
:fs :fsearch <expr> Search for global definitions by sketching the names distribution of the wanted type(s).
|
|
Main> <expr> Evaluate an expression
|
|
:t :type <expr> Check the type of an expression
|
|
:ti <expr> Check the type of an expression, showing implicit arguments
|
|
:printdef <expr> Show the definition of a pattern-matching function
|
|
:s :search <expr> Search for values by type
|
|
:di <name> Show debugging information for a name
|
|
:module :import <module> Import an extra module
|
|
:package <string> Import every module of the package
|
|
:q :quit :exit Exit the Idris system
|
|
:cwd Displays the current working directory
|
|
:cd <string> Change the current working directory
|
|
:sh <string> Run a shell command
|
|
:set <option> Set an option
|
|
:unset <option> Unset an option
|
|
:opts Show current options settings
|
|
:c :compile <file> <expr> Compile to an executable
|
|
:exec <expr> Compile to an executable and run
|
|
:directive <string> Set a codegen-specific directive
|
|
:l :load <string> Load a file
|
|
:r :reload Reload current file
|
|
:e :edit Edit current file using $EDITOR or $VISUAL
|
|
:miss :missing <name> Show missing clauses
|
|
:total <name> Check the totality of a name
|
|
:doc <keyword|expr> Show documentation for a keyword, a name, or a primitive
|
|
:browse <module> Browse contents of a namespace
|
|
:log :logging <string> <number> Set logging level
|
|
:consolewidth <number|auto> Set the width of the console output (0 for unbounded) (auto by default)
|
|
:colour :color (on|off) Whether to use colour for the console output (enabled by default)
|
|
:m :metavars Show remaining proof obligations (metavariables or holes)
|
|
:typeat <l:number> <c:number> <n:string> Show type of term <n> defined on line <l> and column <c>
|
|
:cs :casesplit <l:number> <c:number> <n:string> Case split term <n> defined on line <l> and column <c>
|
|
:ac :addclause <l:number> <n:string> Add clause to term <n> defined on line <l>
|
|
:ml :makelemma <l:number> <n:string> Make lemma for term <n> defined on line <l>
|
|
:mc :makecase <l:number> <n:string> Make case on term <n> defined on line <l>
|
|
:mw :makewith <l:number> <n:string> Add with expression on term <n> defined on line <l>
|
|
:intro <l:number> <n:string> Introduce unambiguous constructor in hole <n> defined on line <l>
|
|
:refine <l:number> <c:number> <h:string> <e:expr>Refine hole <h> with identifier <n> on line <l> and column <c>
|
|
:ps :proofsearch <l:number> <n:string> <h:[name]> Search for a proof
|
|
:psnext Show next proof
|
|
:gd <l:number> <n:string> <r:number|0> Try to generate a definition using proof-search
|
|
:gdnext Show next definition
|
|
:version Display the Idris version
|
|
:? :h :help <string> Display help text, optionally of a specific command.
|
|
:let <decls> Define a new value.
|
|
:fs :fsearch <expr> Search for global definitions by sketching the names distribution of the wanted type(s).
|
|
Main> <expr> Evaluate an expression
|
|
:t :type <expr> Check the type of an expression
|
|
:ti <expr> Check the type of an expression, showing implicit arguments
|
|
:printdef <expr> Show the definition of a pattern-matching function
|
|
:s :search <expr> Search for values by type
|
|
:di <name> Show debugging information for a name
|
|
:module :import <module> Import an extra module
|
|
:package <string> Import every module of the package
|
|
:q :quit :exit Exit the Idris system
|
|
:cwd Displays the current working directory
|
|
:cd <string> Change the current working directory
|
|
:sh <string> Run a shell command
|
|
:set <option> Set an option
|
|
:unset <option> Unset an option
|
|
:opts Show current options settings
|
|
:c :compile <file> <expr> Compile to an executable
|
|
:exec <expr> Compile to an executable and run
|
|
:directive <string> Set a codegen-specific directive
|
|
:l :load <string> Load a file
|
|
:r :reload Reload current file
|
|
:e :edit Edit current file using $EDITOR or $VISUAL
|
|
:miss :missing <name> Show missing clauses
|
|
:total <name> Check the totality of a name
|
|
:doc <keyword|expr> Show documentation for a keyword, a name, or a primitive
|
|
:browse <module> Browse contents of a namespace
|
|
:log :logging <string> <number> Set logging level
|
|
:consolewidth <number|auto> Set the width of the console output (0 for unbounded) (auto by default)
|
|
:colour :color (on|off) Whether to use colour for the console output (enabled by default)
|
|
:m :metavars Show remaining proof obligations (metavariables or holes)
|
|
:typeat <l:number> <c:number> <n:string> Show type of term <n> defined on line <l> and column <c>
|
|
:cs :casesplit <l:number> <c:number> <n:string> Case split term <n> defined on line <l> and column <c>
|
|
:ac :addclause <l:number> <n:string> Add clause to term <n> defined on line <l>
|
|
:ml :makelemma <l:number> <n:string> Make lemma for term <n> defined on line <l>
|
|
:mc :makecase <l:number> <n:string> Make case on term <n> defined on line <l>
|
|
:mw :makewith <l:number> <n:string> Add with expression on term <n> defined on line <l>
|
|
:intro <l:number> <n:string> Introduce unambiguous constructor in hole <n> defined on line <l>
|
|
:refine <l:number> <c:number> <h:string> <e:expr>Refine hole <h> with identifier <n> on line <l> and column <c>
|
|
:ps :proofsearch <l:number> <n:string> <h:[name]> Search for a proof
|
|
:psnext Show next proof
|
|
:gd <l:number> <n:string> <r:number|0> Try to generate a definition using proof-search
|
|
:gdnext Show next definition
|
|
:version Display the Idris version
|
|
:? :h :help <string> Display help text, optionally of a specific command.
|
|
:let <decls> Define a new value.
|
|
:fs :fsearch <expr> Search for global definitions by sketching the names distribution of the wanted type(s).
|
|
Main>
|
|
Bye for now!
|