File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ isSingle comm@(L (anchor -> span) _) =
54
54
-- * Not a whitespace comment "-- "
55
55
isSingleSome :: LEpaComment -> Bool
56
56
isSingleSome comm@ (L (anchor -> span ) _) =
57
- isOneLineRealSpan span
57
+ isOneLineSpan ( RealSrcSpan span GHC.Data.Strict. Nothing )
58
58
&& not (isPointRealSpan span )
59
59
&& not (isCommentMultiline comm || isHaddock comm || isCommentWhitespace comm)
60
60
@@ -125,9 +125,7 @@ grab msg o@(L pos _) s2 =
125
125
f s = if isCommentMultiline o then " {-" ++ s ++ " -}" else " --" ++ s
126
126
in rawIdea Suggestion msg loc (f s1) (Just $ f s2) [] (refact loc $ f s2)
127
127
128
- -- | 'True' if the span is known to straddle only one line.
129
- -- SEE: https://gitlab.haskell.org/ghc/ghc/-/blob/master/compiler/GHC/Types/SrcLoc.hs#L480-483
128
+ -- | 'True' if the span is known to straddle only one line. GHC doesn't export
129
+ -- isOneLineRealSpan.
130
130
isOneLineRealSpan :: RealSrcSpan -> Bool
131
- isOneLineRealSpan span = line1 == line2 where
132
- line1 = srcLocLine $ realSrcSpanStart span
133
- line2 = srcLocLine $ realSrcSpanEnd span
131
+ isOneLineRealSpan span = isOneLineSpan (RealSrcSpan span GHC.Data.Strict. Nothing )
You can’t perform that action at this time.
0 commit comments