Provide spans in error messages about fundeps
#147 (closed)
FixesThis PR adds span infos to InstInfo
(and InstMatchInfo
). These are populated when binding local instances1 and later passed to the corresponding error message, which now looks as follows:
FunDepConflict.curry:9:1-10:20 Error:
Functional dependency conflict between instances
Convert Int () (defined in FunDepConflict)
Convert Int Float (defined in FunDepConflict)
|
9 | instance Convert Int () where
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
-
Imported instances will still get
NoSpanInfo
for now, if we figure out a nice way of ideally finding the origin spans we could add those too. ↩