Copyright | (c) 2022 Xy Ren |
---|---|
License | BSD3 |
Maintainer | xy.r@outlook.com |
Stability | unstable |
Portability | non-portable (GHC only) |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
Plugin
is the compiler plugin data type. Try to avoid
constructing one of these directly, and just modify some fields of
defaultPlugin
instead: this is to try and preserve source-code
compatibility when we add fields to this.
Nonetheless, this API is preliminary and highly likely to change in the future.
type Names = [(String, String, String)] Source #
A list of unique, unambiguous Haskell names in the format of (packageName, moduleName, identifier)
.
makePlugin :: Names -> Plugin Source #
Make a polysemy-plugin
-style effect disambiguation plugin that applies to all the "element-of" typeclasses
passed in. Each of the names passed in should have type k -> [k] ->
where Type
k
can be either
polymorphic or monomorphic.
Some examples include:
("cleff", "Cleff.Internal.Rec", ":>") ("polysemy", "Polysemy.Internal.Union", "Member") ("effectful", "Effectful.Internal.Effect", ":>")
You can see the source code for notes on the implementation of the plugin.