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 either Safe or Trustworthy. As the library collects all pragmas in a conditional the extraction fails with ModuleSafeHaskellConflict.
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/lensmodules 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 eitherSafeorTrustworthy. As the library collects all pragmas in a conditional the extraction fails withModuleSafeHaskellConflict.