File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1061,12 +1061,14 @@ module private PrintTypes =
10611061 nameL ^^ wordL " :" ^^ tauL
10621062
10631063
1064- let layoutPrettyType denv typ =
1064+ let layoutPrettyTypeWithPrec prec denv typ =
10651065 let _ , typ , cxs = PrettyTypes.PrettifyTypes1 denv.g typ
10661066 let env = SimplifyTypes.CollectInfo true [ typ] cxs
10671067 let cxsL = layoutConstraintsWithInfo denv env env.postfixConstraints
1068- layoutTypeWithInfoAndPrec denv env 2 typ --- cxsL
1068+ layoutTypeWithInfoAndPrec denv env prec typ --- cxsL
10691069
1070+ let layoutPrettyType denv typ = layoutPrettyTypeWithPrec 2 denv typ
1071+ let layoutPrettyTypeHighPrec denv typ = layoutPrettyTypeWithPrec 5 denv typ
10701072
10711073/// Printing TAST objects
10721074module private PrintTastMemberOrVals =
@@ -1879,6 +1881,7 @@ let isGeneratedExceptionField pos f = TastDefinitionPrinting.isGeneratedExce
18791881let stringOfTyparConstraint denv tpc = stringOfTyparConstraints denv [ tpc]
18801882let stringOfTy denv x = x |> PrintTypes.layoutType denv |> showL
18811883let prettyStringOfTy denv x = x |> PrintTypes.layoutPrettyType denv |> showL
1884+ let prettyStringOfTyHighPrec denv x = x |> PrintTypes.layoutPrettyTypeHighPrec denv |> showL
18821885let stringOfRecdField denv x = x |> TastDefinitionPrinting.layoutRecdField false denv |> showL
18831886let stringOfUnionCase denv x = x |> TastDefinitionPrinting.layoutUnionCase denv ( wordL " |" ) |> showL
18841887let stringOfExnDef denv x = x |> TastDefinitionPrinting.layoutExnDefn denv |> showL
Original file line number Diff line number Diff line change @@ -1848,11 +1848,11 @@ and FSharpType(cenv, typ:TType) =
18481848
18491849 member x.Format ( denv : FSharpDisplayContext ) =
18501850 protect <| fun () ->
1851- NicePrint.prettyStringOfTy ( denv.Contents cenv.g) typ
1851+ NicePrint.prettyStringOfTyHighPrec ( denv.Contents cenv.g) typ
18521852
18531853 override x.ToString () =
18541854 protect <| fun () ->
1855- " type " + NicePrint.prettyStringOfTy ( DisplayEnv.Empty( cenv.g)) typ
1855+ " type " + NicePrint.prettyStringOfTyHighPrec ( DisplayEnv.Empty( cenv.g)) typ
18561856
18571857 static member Prettify ( typ : FSharpType ) =
18581858 let t = PrettyTypes.PrettifyTypes1 typ.cenv.g typ.V |> p23
You can’t perform that action at this time.
0 commit comments