on master help sign in
Don't need the export region for certain docs errors
126a0e3Evan Czaplicki
src/Elm/Docs.hs+5−5
@@ -421,7 +421,7 @@ addExport :: Info -> Module -> (N.Name, A.Located Can.Export) -> Result i w Modu
421addExport info (Module n c us as_ vs bs) (name, A.At region export) =
421addExport info (Module n c us as_ vs bs) (name, A.At region export) =
422 case export of
422 case export of
423 Can.ExportValue ->
423 Can.ExportValue ->
424− do tipe <- getType region name info
424+ do tipe <- getType name info
425 comment <- getComment region name info
425 comment <- getComment region name info
426
426
427 let newValues = Map.insert name (Value comment tipe) vs
427 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) =
429
429
430 Can.ExportBinop ->
430 Can.ExportBinop ->
431 do let (Can.Binop_ assoc prec realName) = _iBinops info ! name
431 do let (Can.Binop_ assoc prec realName) = _iBinops info ! name
432− tipe <- getType region realName info
432+ tipe <- getType realName info
433 comment <- getComment region realName info
433 comment <- getComment region realName info
434
434
435 let newBinops = Map.insert name (Binop comment tipe assoc prec) bs
435 let newBinops = Map.insert name (Binop comment tipe assoc prec) bs
@@ -470,11 +470,11 @@ getComment region name info =
470 Result.ok comment
470 Result.ok comment
471
471
472
472
473−getType :: R.Region -> N.Name -> Info -> Result i w Type.Type
473+getType :: N.Name -> Info -> Result i w Type.Type
474−getType exportRegion name info =
474+getType name info =
475 case _iValues info ! name of
475 case _iValues info ! name of
476 A.At defRegion Nothing ->
476 A.At defRegion Nothing ->
477− Result.throw (E.NoAnnotation name exportRegion defRegion)
477+ Result.throw (E.NoAnnotation name defRegion)
478
478
479 A.At _ (Just tipe) ->
479 A.At _ (Just tipe) ->
480 Result.ok (Extract.fromType tipe)
480 Result.ok (Extract.fromType tipe)