on master help sign in
Don't need the export region for certain docs errors
commit126a0e36ceecdc83cec43e6302e35dd2ac15260a authorEvan Czaplicki <evancz@users.noreply.github.com> dateTue 19 Dec 2017, 18:39 (9 years ago) parentae0bf2b
1 file changed+5−5
src/Elm/Docs.hs+5−5
src/Elm/Docs.hs+5−5
@@ -421,7 +421,7 @@ addExport :: Info -> Module -> (N.Name, A.Located Can.Export) -> Result i w Modu
421421addExport info (Module n c us as_ vs bs) (name, A.At region export) =
422422 case export of
423423 Can.ExportValue ->
424− do tipe <- getType region name info
424+ do tipe <- getType name info
425425 comment <- getComment region name info
426426
427427 let newValues = Map.insert name (Value comment tipe) vs
@@ -429,7 +429,7 @@ addExport info (Module n c us as_ vs bs) (name, A.At region export) =
429429
430430 Can.ExportBinop ->
431431 do let (Can.Binop_ assoc prec realName) = _iBinops info ! name
432− tipe <- getType region realName info
432+ tipe <- getType realName info
433433 comment <- getComment region realName info
434434
435435 let newBinops = Map.insert name (Binop comment tipe assoc prec) bs
@@ -470,11 +470,11 @@ getComment region name info =
470470 Result.ok comment
471471
472472
473−getType :: R.Region -> N.Name -> Info -> Result i w Type.Type
474−getType exportRegion name info =
473+getType :: N.Name -> Info -> Result i w Type.Type
474+getType name info =
475475 case _iValues info ! name of
476476 A.At defRegion Nothing ->
477− Result.throw (E.NoAnnotation name exportRegion defRegion)
477+ Result.throw (E.NoAnnotation name defRegion)
478478
479479 A.At _ (Just tipe) ->
480480 Result.ok (Extract.fromType tipe)