Allow command name resolution for GHCi commands with option `!`
Motivation
Currently, GHCi can't perform command name resolution with option !
as follows:
ghci> :k Int
Int :: *
ghci> :k! Int
unknown command ':k!'
use :? for help.
However, :kind!
command is useful, especially in recnet kind-rich GHC.
Proposal
So I propose change to the prefix match implementation of GHCi as follows:
Current implementation:
- Prefix match with full string including the option
!
(e.g.k!
)
Proposed implementation:
- Prefix match without option suffix
!
(e.g.k
) - in addition, suffix match with option
!
I have a patch for this. I'll send MR.
See also #8305 (closed) and #8113 (closed)