Skip to content

Instantly share code, notes, and snippets.

@adinapoli
Created June 1, 2020 13:17
Show Gist options
  • Save adinapoli/07a2deda38bce2b20aee6e9b045fb1a8 to your computer and use it in GitHub Desktop.
Save adinapoli/07a2deda38bce2b20aee6e9b045fb1a8 to your computer and use it in GitHub Desktop.
Liquid Warnings
typecheckHook :: [CommandLineOption] -> ModSummary -> TcGblEnv -> TcM TcGblEnv
typecheckHook _ modSum tcGblEnv = do
let fakeSpan = Ghc.RealSrcSpan $
Ghc.realSrcLocSpan (Ghc.mkRealSrcLoc (Ghc.mkFastString (moduleNameString $ moduleName . ms_mod $ modSum)) 10 20)
addWarnAt NoReason fakeSpan (O.text "This is a test!")
-- addErrAt fakeSpan (O.text "huhu")
pure tcGblEnv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment