Overview  Index  Help 

Error


The First-Order LoopW Type Inference syntax error module. The error module exports the region type and function to display errors.

         
Type summary

type region = string * (int * int) * (int * int)
           store information about the file and the position in the file.

     
Value summary

val display
           converts a region into a string.

val fail
           displays the error message and region, and raise a failure.

val failm
           displays the error message, and raise a failure.

val optFail
           calls either fail or failm depending on the region Option.

val toString
           converts line and column into a string respresentation.

 

 
Type detail

region

type region = string * (int * int) * (int * int)

store information about the file and the position in the file.

     
Value detail

toString

fun toString (l, c)

converts line and column into a string respresentation.

Parameters:
(l,c)
the pair line-column.
Returns:
the string representation "[l].[c]".

display

fun display reg

converts a region into a string.

Parameters:
reg
the region.
Returns:
the string representation "fileName:[l1].[c1]-[l2].[c2]".

fail

fun fail reg msg

displays the error message and region, and raise a failure.

Parameters:
reg
the region.
msg
the error message.

failm

fun failm msg

displays the error message, and raise a failure.

Parameters:
msg
the error message.

optFail

fun optFail regOpt msg

calls either fail or failm depending on the region Option.

Parameters:
regOpt
the region option.
msg
the error message.

 


Overview  Index  Help