-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Labels
Description
I want to extract the position information on lexing errors so I can send them to an LSP client, but the error type for the wrappers is hard coded to be string, so it is difficult to send along that extra information.
As far as I can tell, the change would mostly consist of replacing Either String a with Either err a, adding a corresponding type parameter to Alex a and adjusting the line
AlexError ((AlexPn _ line column),_,_,_) -> alexError $ "lexical error at line " ++ (show line) ++ ", column " ++ (show column)
- Is there an easier way to do this?
- Am I missing some problems with this approach?
Ericson2314, MonliH, andreasabel, Boarders, solomon-b and 2 more