@@ -434,18 +434,18 @@ exposing =
434434 Space.chompAndCheckIndent E.ExposingSpace E.ExposingIndentEnd
435435 word1 0x29 {-)-} E.ExposingEnd
436436 return Src.Open
437− , do exposed <- addLocation chompExposed
437+ , do exposed <- chompExposed
438438 Space.chompAndCheckIndent E.ExposingSpace E.ExposingIndentEnd
439439 exposingHelp [exposed]
440440 ]
441441
442442
443−exposingHelp :: [A.Located Src.Exposed] -> Parser E.Exposing Src.Exposing
443+exposingHelp :: [Src.Exposed] -> Parser E.Exposing Src.Exposing
444444exposingHelp revExposed =
445445 oneOf E.ExposingEnd
446446 [ do word1 0x2C {-,-} E.ExposingEnd
447447 Space.chompAndCheckIndent E.ExposingSpace E.ExposingIndentValue
448− exposed <- addLocation chompExposed
448+ exposed <- chompExposed
449449 Space.chompAndCheckIndent E.ExposingSpace E.ExposingIndentEnd
450450 exposingHelp (exposed:revExposed)
451451 , do word1 0x29 {-)-} E.ExposingEnd
@@ -455,16 +455,21 @@ exposingHelp revExposed =
455455
456456chompExposed :: Parser E.Exposing Src.Exposed
457457chompExposed =
458− oneOf E.ExposingValue
459− [ Src.Lower <$> Var.lower E.ExposingValue
460− , do word1 0x28 {-(-} E.ExposingValue
461− op <- Symbol.operator E.ExposingOperator E.ExposingOperatorReserved
462− word1 0x29 {-)-} E.ExposingOperatorRightParen
463− return (Src.Operator op)
464− , do name <- Var.upper E.ExposingValue
465− Space.chompAndCheckIndent E.ExposingSpace E.ExposingIndentEnd
466− Src.Upper name <$> privacy
467− ]
458+ do start <- getPosition
459+ oneOf E.ExposingValue
460+ [ do name <- Var.lower E.ExposingValue
461+ end <- getPosition
462+ return $ Src.Lower $ A.at start end name
463+ , do word1 0x28 {-(-} E.ExposingValue
464+ op <- Symbol.operator E.ExposingOperator E.ExposingOperatorReserved
465+ word1 0x29 {-)-} E.ExposingOperatorRightParen
466+ end <- getPosition
467+ return $ Src.Operator (A.Region start end) op
468+ , do name <- Var.upper E.ExposingValue
469+ end <- getPosition
470+ Space.chompAndCheckIndent E.ExposingSpace E.ExposingIndentEnd
471+ Src.Upper (A.at start end name) <$> privacy
472+ ]
468473
469474
470475privacy :: Parser E.Exposing Src.Privacy
@@ -472,9 +477,11 @@ privacy =
472477 oneOfWithFallback
473478 [ do word1 0x28 {-(-} E.ExposingTypePrivacy
474479 Space.chompAndCheckIndent E.ExposingSpace E.ExposingTypePrivacy
480+ start <- getPosition
475481 word2 0x2E 0x2E {-..-} E.ExposingTypePrivacy
482+ end <- getPosition
476483 Space.chompAndCheckIndent E.ExposingSpace E.ExposingTypePrivacy
477484 word1 0x29 {-)-} E.ExposingTypePrivacy
478− return Src.Public
485+ return $ Src.Public (A.Region start end)
479486 ]
480487 Src.Private