@@ -13,9 +13,8 @@ module Development.IDE.Spans.Type(
13
13
14
14
import GHC
15
15
import Control.DeepSeq
16
- import Data.Maybe
17
16
import OccName
18
-
17
+ import Development.IDE.GHC.Util
19
18
20
19
-- | Type of some span of source code. Most of these fields are
21
20
-- unboxed but Haddock doesn't show that.
@@ -29,15 +28,17 @@ data SpanInfo =
29
28
,spaninfoEndCol :: {-# UNPACK #-} ! Int
30
29
-- ^ End column of the span (absolute), zero-based.
31
30
,spaninfoType :: ! (Maybe Type )
32
- -- ^ A pretty-printed representation fo the type.
31
+ -- ^ A pretty-printed representation for the type.
33
32
,spaninfoSource :: ! SpanSource
34
33
-- ^ The actutal 'Name' associated with the span, if
35
34
-- any. This can be useful for accessing a variety of
36
35
-- information about the identifier such as module,
37
36
-- locality, definition location, etc.
38
37
}
39
38
instance Show SpanInfo where
40
- show (SpanInfo sl sc el ec t n) = show [show sl, show sc, show el, show ec, show $ isJust t, show n]
39
+ show (SpanInfo sl sc el ec t n) =
40
+ unwords [" (SpanInfo" , show sl, show sc, show el, show ec
41
+ , show $ maybe " NoType" prettyPrint t, " (" <> show n <> " ))" ]
41
42
42
43
instance NFData SpanInfo where
43
44
rnf = rwhnf
0 commit comments