This repository was archived by the owner on Aug 3, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +40
-18
lines changed Expand file tree Collapse file tree 4 files changed +40
-18
lines changed Original file line number Diff line number Diff line change @@ -419,9 +419,12 @@ mkMaps dflags pkgName gre instances decls = do
419
419
instanceMap = M. fromList [ (getSrcSpan n, n) | n <- instances ]
420
420
421
421
names :: SrcSpan -> HsDecl GhcRn -> [Name ]
422
- names l (InstD d) = maybeToList (M. lookup loc instanceMap) -- See note [2].
422
+ names _ (InstD d) = maybeToList (M. lookup loc instanceMap) -- See note [2].
423
423
where loc = case d of
424
- TyFamInstD _ -> l -- The CoAx's loc is the whole line, but only for TFs
424
+ -- The CoAx's loc is the whole line, but only for TFs. The
425
+ -- workaround is to dig into the family instance declaration and
426
+ -- get the identifier with the right location.
427
+ TyFamInstD (TyFamInstDecl d') -> getLoc (feqn_tycon (hsib_body d'))
425
428
_ -> getInstLoc d
426
429
names l (DerivD {}) = maybeToList (M. lookup l instanceMap) -- See note [2].
427
430
names _ decl = getMainDeclBinder decl
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ module Haddock.Types (
28
28
import Control.Exception
29
29
import Control.Arrow hiding ((<+>) )
30
30
import Control.DeepSeq
31
+ import Control.Monad.IO.Class (MonadIO (.. ))
31
32
import Data.Typeable
32
33
import Data.Map (Map )
33
34
import Data.Data (Data )
@@ -661,6 +662,8 @@ instance Monad ErrMsgGhc where
661
662
m >>= k = WriterGhc $ runWriterGhc m >>= \ (a, msgs1) ->
662
663
fmap (second (msgs1 ++ )) (runWriterGhc (k a))
663
664
665
+ instance MonadIO ErrMsgGhc where
666
+ liftIO m = WriterGhc (fmap (\ x -> (x, [] )) (liftIO m))
664
667
665
668
-----------------------------------------------------------------------------
666
669
-- * Pass sensitive types
Original file line number Diff line number Diff line change 352
352
> < a href ="# " class ="selflink "
353
353
> #</ a
354
354
> </ td
355
- > < td class ="doc empty "
356
- > </ td
355
+ > < td class ="doc "
356
+ > < p
357
+ > External instance</ p
358
+ > </ td
357
359
> </ tr
358
360
> < tr
359
361
> < td colspan ="2 "
586
588
> < a href ="# " class ="selflink "
587
589
> #</ a
588
590
> </ td
589
- > < td class ="doc empty "
590
- > </ td
591
+ > < td class ="doc "
592
+ > < p
593
+ > Doc for: type instance Foo X = Y</ p
594
+ > </ td
591
595
> </ tr
592
596
> < tr
593
597
> < td colspan ="2 "
944
948
> < a href ="# " class ="selflink "
945
949
> #</ a
946
950
> </ td
947
- > < td class ="doc empty "
948
- > </ td
951
+ > < td class ="doc "
952
+ > < p
953
+ > Doc for: type instance Foo Y = X</ p
954
+ > </ td
949
955
> </ tr
950
956
> < tr
951
957
> < td colspan ="2 "
1234
1240
> < a href ="# " class ="selflink "
1235
1241
> #</ a
1236
1242
> </ td
1237
- > < td class ="doc empty "
1238
- > </ td
1243
+ > < td class ="doc "
1244
+ > < p
1245
+ > Doc for: type instance Foo Y = X</ p
1246
+ > </ td
1239
1247
> </ tr
1240
1248
> < tr
1241
1249
> < td colspan ="2 "
1274
1282
> < a href ="# " class ="selflink "
1275
1283
> #</ a
1276
1284
> </ td
1277
- > < td class ="doc empty "
1278
- > </ td
1285
+ > < td class ="doc "
1286
+ > < p
1287
+ > Doc for: type instance Foo X = Y</ p
1288
+ > </ td
1279
1289
> </ tr
1280
1290
> < tr
1281
1291
> < td colspan ="2 "
Original file line number Diff line number Diff line change 142
142
> < a href ="# " class ="selflink "
143
143
> #</ a
144
144
> </ td
145
- > < td class ="doc empty "
146
- > </ td
145
+ > < td class ="doc "
146
+ > < p
147
+ > Should be visible, but with a hidden right hand side</ p
148
+ > </ td
147
149
> </ tr
148
150
> < tr
149
151
> < td colspan ="2 "
202
204
> < a href ="# " class ="selflink "
203
205
> #</ a
204
206
> </ td
205
- > < td class ="doc empty "
206
- > </ td
207
+ > < td class ="doc "
208
+ > < p
209
+ > Should be visible, but with a hidden right hand side</ p
210
+ > </ td
207
211
> </ tr
208
212
> < tr
209
213
> < td colspan ="2 "
240
244
> < a href ="# " class ="selflink "
241
245
> #</ a
242
246
> </ td
243
- > < td class ="doc empty "
244
- > </ td
247
+ > < td class ="doc "
248
+ > < p
249
+ > External instance</ p
250
+ > </ td
245
251
> </ tr
246
252
> < tr
247
253
> < td colspan ="2 "
You can’t perform that action at this time.
0 commit comments