@@ -2,13 +2,15 @@
2module Reporting.Annotation
2module Reporting.Annotation
3 ( Located(..)
3 ( Located(..)
4 , at, merge
4 , at, merge
11−import Prelude hiding (drop, map, traverse)
13+import Prelude hiding (map, traverse)
12import qualified Reporting.Region as R
14import qualified Reporting.Region as R
@@ -43,11 +45,16 @@ map f (At info value) =
43 At info (f value)
45 At info (f value)
46−drop :: Located a -> a
48+toValue :: Located a -> a
47−drop (At _ value) =
49+toValue (At _ value) =
53+toRegion :: Located a -> R.Region
54+toRegion (At region _) =
51traverse :: (Functor f) => (a -> f b) -> Located a -> f (Located b)
58traverse :: (Functor f) => (a -> f b) -> Located a -> f (Located b)
52traverse func (At region value) =
59traverse func (At region value) =
53 At region <$> func value
60 At region <$> func value