Copyright | (c) Harvard University 2006-2011 (c) Geoffrey Mainland 2011-2014 |
---|---|
License | BSD-style |
Maintainer | Geoffrey Mainland <mainland@cs.drexel.edu> |
Safe Haskell | Safe-Inferred |
Language | Haskell98 |
- 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
data Pos
Position type.
advancePos :: Pos -> Char -> Pos
data Loc
Location type, consisting of a beginning position and an end position.
(<-->) :: (Located a, Located b) => a -> b -> Loc infixl 6
Merge the locations of two Located
values.
newtype SrcLoc
Source location type. Source location are all equal, which allows AST nodes to be compared modulo location information.
class IsLocation a where
Locations
noLoc :: IsLocation a => a
No location.
class Located a where
Located values have a location.