Skip to content

Instantly share code, notes, and snippets.

@Lysxia
Last active June 20, 2021 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Lysxia/cfaad135ccd09ecffc7388cae6ecbb4c to your computer and use it in GitHub Desktop.
Save Lysxia/cfaad135ccd09ecffc7388cae6ecbb4c to your computer and use it in GitHub Desktop.
Source plugin skeleton
-- GHC 9+
import GHC.Plugins hiding (Type)
import GHC.Hs
plugin :: Plugin
plugin = defaultPlugin
{ parsedResultAction = \_ _ m -> pure (transform m)
}
transform :: HsParsedModule -> HsParsedModule
transform m = m -- TODO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment