Module AST.PositionUtils

Summary of exported operations:

line :: (Int,Int) -> Int   
col :: (Int,Int) -> Int   
allColEq :: [(Int,Int)] -> Bool   
allLinesEq :: [(Int,Int)] -> Bool   
moveColBy :: (Int,Int) -> Int -> (Int,Int)   
relocate :: (Int,Int) -> (Int,Int) -> (Int,Int)   
|Change a position by a delta
qidPos :: QualIdent -> (Int,Int)   
idPos :: Ident -> (Int,Int)   
sidPos :: SymIdent -> (Int,Int)   
sqidPos :: SymQualIdent -> (Int,Int)   
exportPos :: Export -> (Int,Int)   
declPos :: Decl -> (Int,Int)   
declPosEq :: Decl -> (Int,Int)   
infPos :: Infix -> (Int,Int)   
constrDeclPos :: ConstrDecl -> (Int,Int)   
constrDeclConstrTypePos :: ConstrDecl -> [(Int,Int)]   
firstCDConstrTypePos :: ConstrDecl -> (Int,Int)   
fieldDeclCPos :: FieldDecl -> [(Int,Int)]   
fieldDeclDCPos :: FieldDecl -> (Int,Int)   
fieldDeclIDPos :: FieldDecl -> (Int,Int)   
fieldDeclTEPos :: FieldDecl -> (Int,Int)   
typeExprPos :: TypeExpr -> (Int,Int)   
rhsPos :: Rhs -> (Int,Int)   
lhsPos :: Lhs -> (Int,Int)   
condExprPos :: CondExpr -> (Int,Int)   
litPos :: Literal -> (Int,Int)   
patPos :: Pattern -> (Int,Int)   
exprPos :: Expression -> (Int,Int)   
stmtPos :: Statement -> (Int,Int)   
altPos :: Alt -> (Int,Int)   
spanToken :: ((Int,Int),Token) -> (((Int,Int),(Int,Int)),Token)   

Exported operations:

line :: (Int,Int) -> Int   

Further infos:
  • solution complete, i.e., able to compute all solutions

col :: (Int,Int) -> Int   

Further infos:
  • solution complete, i.e., able to compute all solutions

allColEq :: [(Int,Int)] -> Bool   

allLinesEq :: [(Int,Int)] -> Bool   

moveColBy :: (Int,Int) -> Int -> (Int,Int)   

relocate :: (Int,Int) -> (Int,Int) -> (Int,Int)   

|Change a position by a delta

Example call:
(relocate l c ml mc)
Parameters:
  • l : line
  • c : column
  • ml : delta line
  • mc : delta column
Returns:
  • input position changed by delta line and delta column

qidPos :: QualIdent -> (Int,Int)   

idPos :: Ident -> (Int,Int)   

sidPos :: SymIdent -> (Int,Int)   

sqidPos :: SymQualIdent -> (Int,Int)   

exportPos :: Export -> (Int,Int)   

declPos :: Decl -> (Int,Int)   

declPosEq :: Decl -> (Int,Int)   

infPos :: Infix -> (Int,Int)   

constrDeclPos :: ConstrDecl -> (Int,Int)   

constrDeclConstrTypePos :: ConstrDecl -> [(Int,Int)]   

firstCDConstrTypePos :: ConstrDecl -> (Int,Int)   

fieldDeclCPos :: FieldDecl -> [(Int,Int)]   

fieldDeclDCPos :: FieldDecl -> (Int,Int)   

fieldDeclIDPos :: FieldDecl -> (Int,Int)   

fieldDeclTEPos :: FieldDecl -> (Int,Int)   

typeExprPos :: TypeExpr -> (Int,Int)   

rhsPos :: Rhs -> (Int,Int)   

lhsPos :: Lhs -> (Int,Int)   

condExprPos :: CondExpr -> (Int,Int)   

litPos :: Literal -> (Int,Int)   

patPos :: Pattern -> (Int,Int)   

exprPos :: Expression -> (Int,Int)   

stmtPos :: Statement -> (Int,Int)   

altPos :: Alt -> (Int,Int)   

spanToken :: ((Int,Int),Token) -> (((Int,Int),(Int,Int)),Token)