defining typeForUser.
This commit is contained in:
parent
7fbd983172
commit
13738d4391
@ -20,6 +20,7 @@ module Language.Haskell.GhcMod.Gap (
|
||||
, pprInfo
|
||||
, HasType(..)
|
||||
, errorMsgSpan
|
||||
, typeForUser
|
||||
#if __GLASGOW_HASKELL__ >= 702
|
||||
#else
|
||||
, module Pretty
|
||||
@ -290,3 +291,10 @@ errorMsgSpan = errMsgSpan
|
||||
#else
|
||||
errorMsgSpan = head . errMsgSpans
|
||||
#endif
|
||||
|
||||
typeForUser :: Type -> SDoc
|
||||
#if __GLASGOW_HASKELL__ >= 707
|
||||
typeForUser = pprTypeForUser
|
||||
#else
|
||||
typeForUser = pprTypeForUser False
|
||||
#endif
|
||||
|
@ -29,7 +29,6 @@ import qualified Language.Haskell.GhcMod.Gap as Gap
|
||||
import Language.Haskell.GhcMod.Gap (HasType(..))
|
||||
import Language.Haskell.GhcMod.Types
|
||||
import Outputable
|
||||
import PprTyThing
|
||||
import TcHsSyn (hsPatType)
|
||||
import TcRnTypes
|
||||
|
||||
@ -152,11 +151,7 @@ listifyStaged :: Typeable r => Stage -> (r -> Bool) -> GenericQ [r]
|
||||
listifyStaged s p = everythingStaged s (++) [] ([] `mkQ` (\x -> [x | p x]))
|
||||
|
||||
pretty :: DynFlags -> Type -> String
|
||||
#if __GLASGOW_HASKELL__ >= 707
|
||||
pretty dflag = showUnqualifiedOneLine dflag . pprTypeForUser
|
||||
#else
|
||||
pretty dflag = showUnqualifiedOneLine dflag . pprTypeForUser False
|
||||
#endif
|
||||
pretty dflag = showUnqualifiedOneLine dflag . Gap.typeForUser
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user