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:
@@ -1,22 +1,16 @@
|
||||
module Language.Haskell.GhcMod.Doc where
|
||||
|
||||
import DynFlags (DynFlags)
|
||||
import Language.Haskell.GhcMod.Gap (withStyle)
|
||||
import Language.Haskell.GhcMod.Gap (withStyle, styleUnqualified)
|
||||
import Outputable
|
||||
import Pretty
|
||||
|
||||
styleQualified :: PprStyle
|
||||
styleQualified = mkUserStyle alwaysQualify AllTheWay
|
||||
|
||||
styleUnqualified :: PprStyle
|
||||
styleUnqualified = mkUserStyle neverQualify AllTheWay
|
||||
|
||||
showQualifiedPage :: DynFlags -> SDoc -> String
|
||||
showQualifiedPage dflag = showDocWith PageMode . withStyle dflag styleQualified
|
||||
|
||||
showUnqualifiedPage :: DynFlags -> SDoc -> String
|
||||
showUnqualifiedPage dflag = showDocWith PageMode . withStyle dflag styleUnqualified
|
||||
|
||||
showQualifiedOneLine :: DynFlags -> SDoc -> String
|
||||
showQualifiedOneLine dflag = showDocWith OneLineMode . withStyle dflag styleQualified
|
||||
|
||||
|
||||
Reference in New Issue
Block a user