Moving all CPP stuff (that depends on GHC version) to Gap

- Moved some functions from Language.Haskell.GhcMod.Doc to Gap
- Moved HasType typeclass and some functions from Info to Gap
- Adjusted all the other modules to use necessary functions from Gap
  instead of the functions from modified modules
This commit is contained in:
Daniil Frumin
2013-07-02 12:48:44 +04:00
parent 54d6f5f690
commit 9eb446e24b
6 changed files with 128 additions and 100 deletions

View File

@@ -7,6 +7,7 @@ import Data.Maybe (fromMaybe)
import DataCon (dataConRepType)
import GHC
import Language.Haskell.GhcMod.Doc
import qualified Language.Haskell.GhcMod.Gap as Gap
import Language.Haskell.GhcMod.GHCApi
import Language.Haskell.GhcMod.Types
import Name
@@ -102,4 +103,4 @@ removeForAlls' ty (Just (pre, ftype))
| otherwise = ty
showOutputable :: Outputable a => DynFlags -> a -> String
showOutputable dflag = unwords . lines . showUnqualifiedPage dflag . ppr
showOutputable dflag = unwords . lines . Gap.showUnqualifiedPage dflag . ppr