ghc-tcplugin-api
ghc-tcplugin-api copied to clipboard
An interface for GHC type-checking plugins
On GHC 9.0 and below we need to be able to handle flattening variables. `classifyPredType` gets us most of the way, but it'd nice to be able to directly extract...
Something like this: ```hs mkTcPluginSolveResult :: [Ct] -> [(EvTerm, Ct)] -> [Ct] -> TcPluginSolveResult #if MIN_VERSION_ghc(9,3,0) mkTcPluginSolveResult = TcPluginSolveResult #else mkTcPluginSolveResult contras solved new = -- On GHC 9.2 and...
For some reason these are not available on GHC 8.10 and below, so it would be good to export compatibility helpers.
I understand what `splitTyConApp_maybe :: HasDebugCallStack => Type -> Maybe (TyCon, [Type])` does. It's a reverse of `mkTyConApp :: TyCon -> [Type] -> Type`. I don't really understand what `splitTyConApp_upTo`...