aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Convert.hs
diff options
context:
space:
mode:
authorBartosz Nitka <niteria@gmail.com>2017-07-02 11:12:01 +0100
committerAlex Biehl <alexbiehl@gmail.com>2017-07-02 12:12:01 +0200
commit901b327f46dc4bd70cd310ae2c6339aa9ce572bb (patch)
tree142d0b0cf1c2a4acac3471617f45b8884ed73adb /haddock-api/src/Haddock/Convert.hs
parentaf3e6c7c027389df18b15ee9a9d72ffc97dc1852 (diff)
Fix haddock: internal error: links: UnhelpfulSpan (#561)
* Fix haddock: internal error: links: UnhelpfulSpan This fixes #554 for me. I believe this is another fall out of `wildcard-refactor`, like #549. * Comment to clarify why we take the methods name location
Diffstat (limited to 'haddock-api/src/Haddock/Convert.hs')
-rw-r--r--haddock-api/src/Haddock/Convert.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index 577b1a3c..4aaaed9d 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -29,7 +29,7 @@ import Name
import NameSet ( emptyNameSet )
import RdrName ( mkVarUnqual )
import PatSyn
-import SrcLoc ( Located, noLoc, unLoc )
+import SrcLoc ( Located, noLoc, unLoc, GenLocated(..), srcLocSpan )
import TcType ( tcSplitSigmaTy )
import TyCon
import Type
@@ -318,7 +318,7 @@ synifyDataCon use_gadt_syntax dc =
, con_doc = Nothing }
synifyName :: NamedThing n => n -> Located Name
-synifyName = noLoc . getName
+synifyName n = L (srcLocSpan (getSrcLoc n)) (getName n)
synifyIdSig :: SynifyTypeState -> Id -> Sig Name