- data Pos = Pos !String !Int !Int !Int
- posFile :: Pos -> String
- posLine :: Pos -> Int
- posCol :: Pos -> Int
- posCoff :: Pos -> Int
- startPos :: String -> Pos
- linePos :: String -> Int -> Pos
- advancePos :: Pos -> Char -> Pos
- data Loc
- locStart :: Loc -> Loc
- locEnd :: Loc -> Loc
- (<-->) :: (Located a, Located b) => a -> b -> Loc
- newtype SrcLoc = SrcLoc Loc
- srclocOf :: Located a => a -> SrcLoc
- srcspan :: (Located a, Located b) => a -> b -> SrcLoc
- class IsLocation a where
- noLoc :: IsLocation a => a
- class Located a where
- class Relocatable a where
- data L a = L Loc a
- unLoc :: L a -> a
Location type, consisting of a beginning position and an end position.
Source location type. Source location are all equal, which allows AST nodes to be compared modulo location information.
Located values have a location.
Values that can be relocated
An 'L a' is an
a with an associated
Loc, but this location is ignored
when performing comparisons.