Module ParseWarning

Warnings for Parsers

Author: Jasper Sikorra - jsi@informatik.uni-kiel.de

Version: January 2014

Summary of exported operations:

getWarnPos :: (Pos,String) -> Pos   
setWarnPos :: (Pos,String) -> Pos -> (Pos,String)   
getWarnMsg :: (Pos,String) -> String   
setWarnMsg :: (Pos,String) -> String -> (Pos,String)   
returnWM :: a -> [(Pos,String)] -> WM a   
The Warning Monad's return function
bindWM :: WM a -> (a -> WM b) -> WM b   
The Warning Monad's bind function
mapWarns :: ((Pos,String) -> (Pos,String)) -> WM a -> WM a   
Apply a function on each Warning of a Warning Monad
cleanWM :: a -> WM a   
singleWM :: a -> (Pos,String) -> WM a   
discardWarnings :: WM a -> a   
getWarnings :: WM a -> [(Pos,String)]   

Exported datatypes:


WM

The Warning Monad

Constructors:


Warning

Type synonym: Warning = (Pos,String)


Exported operations:

getWarnPos :: (Pos,String) -> Pos   

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

setWarnPos :: (Pos,String) -> Pos -> (Pos,String)   

getWarnMsg :: (Pos,String) -> String   

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

setWarnMsg :: (Pos,String) -> String -> (Pos,String)   

returnWM :: a -> [(Pos,String)] -> WM a   

The Warning Monad's return function

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

bindWM :: WM a -> (a -> WM b) -> WM b   

The Warning Monad's bind function

mapWarns :: ((Pos,String) -> (Pos,String)) -> WM a -> WM a   

Apply a function on each Warning of a Warning Monad

cleanWM :: a -> WM a   

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

singleWM :: a -> (Pos,String) -> WM a   

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

discardWarnings :: WM a -> a   

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

getWarnings :: WM a -> [(Pos,String)]   

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