You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running CPP for all modules causes some warnings, mostly due to the fact that #-} is recognized as directive if a line starts with #-}. There are rare cases were the warning is not caused by a comment but by some other construct that causes a line to start with #.
I am not currently running CPP first, but only if extensions yields an error. This is fine in my use case.
Because extensions parses CPP directives in general, we might in the future consider, whether this counterexample could be handled as well. For example, we know that there is in fact no ModuleSafeHaskellConflict because the branches of the directive can never be both enabled. I think it boils down to the fact that using the union of the pragmas in the branches of a conditional is an overapproximation. Perhaps using a kind of least upper bound would be more appropriate.
While implementing an approach is probably too much work for this rare case, keeping this information here will help others to know the limits of the current implementation.
I don't have a solution to this problem and it is a rare corner case. However, I would like to record the information somewhere. When parsing
ekmett/lens
modules https://github.com/ekmett/lens/blob/0ef83b761a820826aa729bf0e1c2c361ce8e198c/src/Control/Lens/Internal/FieldTH.hs#L9 and https://github.com/ekmett/lens/blob/0ef83b761a820826aa729bf0e1c2c361ce8e198c/src/Control/Lens/Internal/TH.hs#L4 fail because the cpp conditional activates eitherSafe
orTrustworthy
. As the library collects all pragmas in a conditional the extraction fails withModuleSafeHaskellConflict
.The text was updated successfully, but these errors were encountered: