Skip to content

Commit

Permalink
fix: help menu for refine command (idris-lang#3393)
Browse files Browse the repository at this point in the history
* remove reference to column number parameter

* update contributors and changelog_next

* fix expected test output
  • Loading branch information
Jyang772 authored and andrevidela committed Dec 17, 2024
1 parent ab51b18 commit d70242d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG_NEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ This CHANGELOG describes the merged but unreleased changes. Please see [CHANGELO
where Idris2 will install the given package if `idris2 --install
{ipkg-filename}` is called.

* Remove reference to column number parameter in help menu for `refine` command.

### Building/Packaging changes

* The Nix flake's `buildIdris` function now returns a set with `executable` and
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Jens Petersen
Joel Berkeley
Joey Eremondi
Johann Rudloff
Justin Yang
Kamil Shakirov
Kevin Boulain
LuoChen
Expand Down
3 changes: 1 addition & 2 deletions src/Idris/Parser.idr
Original file line number Diff line number Diff line change
Expand Up @@ -2241,7 +2241,7 @@ knownCommands =
explain ["mc", "makecase"] "Make case on term <n> defined on line <l>" ++
explain ["mw", "makewith"] "Add with expression on term <n> defined on line <l>" ++
[ ("intro", "Introduce unambiguous constructor in hole <n> defined on line <l>")
, ("refine", "Refine hole <h> with identifier <n> on line <l> and column <c>")
, ("refine", "Refine hole <h> with identifier <n> on line <l>")
] ++
explain ["ps", "proofsearch"] "Search for a proof" ++
[ ("psnext", "Show next proof")
Expand Down Expand Up @@ -2587,7 +2587,6 @@ editLineNamePTermArgCmd : ParseCmd -> (Bool -> Int -> Name -> PTerm -> EditCmd)
editLineNamePTermArgCmd parseCmd command doc =
( names
, Args [ NamedCmdArg "l" NumberArg
, NamedCmdArg "c" NumberArg
, NamedCmdArg "h" StringArg
, NamedCmdArg "e" ExprArg
]
Expand Down
6 changes: 3 additions & 3 deletions tests/idris2/repl/repl001/expected
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Main> <expr> Evaluate an express
: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>
:refine <l:number> <h:string> <e:expr> Refine hole <h> with identifier <n> on line <l>
: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
Expand Down Expand Up @@ -79,7 +79,7 @@ Main> <expr> Evaluate an express
: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>
:refine <l:number> <h:string> <e:expr> Refine hole <h> with identifier <n> on line <l>
: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
Expand Down Expand Up @@ -124,7 +124,7 @@ Main> <expr> Evaluate an express
: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>
:refine <l:number> <h:string> <e:expr> Refine hole <h> with identifier <n> on line <l>
: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
Expand Down

0 comments on commit d70242d

Please sign in to comment.