module Plat.Utils where import Plat.Context type LineNumber = Int type CharNumber = Int -- | This type indicates some position in the template. type Pos = (LineNumber, CharNumber) -- | This function is used by Plat to display the position. It gives you the record -- with two fields, \"line\" and \"column\", indicating the line number and the column -- number respectively. posContext :: Pos -> Context () posContext (l, c) = do "line" =: show l "column" =: show c