Ticket #109 (closed enhancement: fixed)
Completion with choice modifiers
|Reported by:||boris||Owned by:||boris|
Currently function completeWord receives a function to produce a list of possible completions and passes it a word which should be completed. The function does not know about other user input.
For example, if user entered ":m - Data.Lis" and " -" are in list of characters which count as whitespaces, the function which suggests completion will receive only "Data.Lis".
I want to pass modifiers(a bad term, perhaps) to the function as well. The modifier is a single optional character before word.
Use case: If function in ghci knows that modules will be removed, it will be more convenient if it suggests only modules which have already been added to the context.
I have written the function completeWordWithModifier and based already present completeWord on it. The behavior of completeWord was not modified. The modified file Completion.hs is attached.