9eb446e24b
- 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
19 lines
658 B
Haskell
19 lines
658 B
Haskell
module Language.Haskell.GhcMod.Doc where
|
|
|
|
import DynFlags (DynFlags)
|
|
import Language.Haskell.GhcMod.Gap (withStyle, styleUnqualified)
|
|
import Outputable
|
|
import Pretty
|
|
|
|
styleQualified :: PprStyle
|
|
styleQualified = mkUserStyle alwaysQualify AllTheWay
|
|
|
|
showQualifiedPage :: DynFlags -> SDoc -> String
|
|
showQualifiedPage dflag = showDocWith PageMode . withStyle dflag styleQualified
|
|
|
|
showQualifiedOneLine :: DynFlags -> SDoc -> String
|
|
showQualifiedOneLine dflag = showDocWith OneLineMode . withStyle dflag styleQualified
|
|
|
|
showUnqualifiedOneLine :: DynFlags -> SDoc -> String
|
|
showUnqualifiedOneLine dflag = showDocWith OneLineMode . withStyle dflag styleUnqualified
|