Maintainer | mainland@eecs.harvard.edu |
---|---|
Safe Haskell | None |
- 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
Documentation
Position type.
advancePos :: Pos -> Char -> PosSource
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.
class IsLocation a whereSource
Locations
noLoc :: IsLocation a => aSource
No location.
Located values have a location.
An 'L a' is an a
with an associated Loc
, but this location is ignored
when performing comparisons.