Skip to content

Provide a way to detect what extensions are enabled via TH

This would be helpful for providing users with intuitive/explanatory error messages if generated code relies on an extension that the user may not have enabled.

Sample specification, to get things started:

enabledExts :: Q [Extension]
isExtEnabled :: Extension -> Q Bool
data Extension = LiberalTypeSynonyms | RankNTypes | ...
    -- mirroring ExtensionFlag in DynFlags

See #10819 (closed) for an example case where this could be of use.

Edited by Ben Gamari
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information