Fix comment omission on type vars and qual type
parent
fedfeaaecd
commit
40509dc3f0
|
@ -30,7 +30,7 @@ layoutType ltype@(L _ typ) = docWrapNode ltype $ case typ of
|
||||||
-- _ | traceShow (ExactPrint.Types.mkAnnKey ltype) False -> error "impossible"
|
-- _ | traceShow (ExactPrint.Types.mkAnnKey ltype) False -> error "impossible"
|
||||||
HsTyVar name -> do
|
HsTyVar name -> do
|
||||||
t <- lrdrNameToTextAnn name
|
t <- lrdrNameToTextAnn name
|
||||||
docLit t
|
docWrapNode name $ docLit t
|
||||||
HsForAllTy bndrs (L _ (HsQualTy (L _ cntxts@(_:_)) typ2)) -> do
|
HsForAllTy bndrs (L _ (HsQualTy (L _ cntxts@(_:_)) typ2)) -> do
|
||||||
typeDoc <- docSharedWrapper layoutType typ2
|
typeDoc <- docSharedWrapper layoutType typ2
|
||||||
tyVarDocs <- bndrs `forM` \case
|
tyVarDocs <- bndrs `forM` \case
|
||||||
|
@ -184,11 +184,11 @@ layoutType ltype@(L _ typ) = docWrapNode ltype $ case typ of
|
||||||
]
|
]
|
||||||
x@(HsQualTy (L _ []) _) ->
|
x@(HsQualTy (L _ []) _) ->
|
||||||
unknownNodeError "HsQualTy [] _" x
|
unknownNodeError "HsQualTy [] _" x
|
||||||
HsQualTy (L _ cntxts@(_:_)) typ1 -> do
|
HsQualTy lcntxts@(L _ cntxts@(_:_)) typ1 -> do
|
||||||
typeDoc <- docSharedWrapper layoutType typ1
|
typeDoc <- docSharedWrapper layoutType typ1
|
||||||
cntxtDocs <- cntxts `forM` docSharedWrapper layoutType
|
cntxtDocs <- cntxts `forM` docSharedWrapper layoutType
|
||||||
let
|
let
|
||||||
contextDoc = case cntxtDocs of
|
contextDoc = docWrapNode lcntxts $ case cntxtDocs of
|
||||||
[x] -> x
|
[x] -> x
|
||||||
_ -> docAlt
|
_ -> docAlt
|
||||||
[ let
|
[ let
|
||||||
|
|
Loading…
Reference in New Issue