Skip to content

Commit b3e29e1

Browse files
jian-linfendor
authored andcommitted
Print type in one line
fixes #4724
1 parent bf77001 commit b3e29e1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ghcide/src/Development/IDE/Spans/AtPoint.hs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ import Development.IDE.Core.PositionMapping
4141
import Development.IDE.Core.RuleTypes
4242
import Development.IDE.GHC.Compat
4343
import qualified Development.IDE.GHC.Compat.Util as Util
44-
import Development.IDE.GHC.Util (printOutputable)
44+
import Development.IDE.GHC.Util (printOutputable,
45+
printOutputableOneLine)
4546
import Development.IDE.Spans.Common
4647
import Development.IDE.Types.Options
4748

@@ -371,11 +372,11 @@ atPoint opts@IdeOptions{} shakeExtras@ShakeExtras{ withHieDb, hiedbWriter } har@
371372

372373
prettyTypeFromType :: Maybe Name -> M.Map Name Location -> Type -> T.Text
373374
prettyTypeFromType boundNameMay locationsMap ty =
374-
prettyTypeCommon boundNameMay locationsMap (S.fromList $ namesInType ty) (printOutputable ty)
375+
prettyTypeCommon boundNameMay locationsMap (S.fromList $ namesInType ty) (printOutputableOneLine ty)
375376

376377
prettyType :: Maybe Name -> M.Map Name Location -> hietype -> T.Text
377378
prettyType boundNameMay locationsMap t =
378-
prettyTypeCommon boundNameMay locationsMap (typeNames t) (printOutputable . expandType $ t)
379+
prettyTypeCommon boundNameMay locationsMap (typeNames t) (printOutputableOneLine . expandType $ t)
379380

380381
prettyTypeCommon :: Maybe Name -> M.Map Name Location -> Set Name -> T.Text -> T.Text
381382
prettyTypeCommon boundNameMay locationsMap names expandedType =

0 commit comments

Comments
 (0)