diff options
Diffstat (limited to 'frontend/checksupport.icl')
-rw-r--r-- | frontend/checksupport.icl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/frontend/checksupport.icl b/frontend/checksupport.icl index 4a439d7..5ae31d2 100644 --- a/frontend/checksupport.icl +++ b/frontend/checksupport.icl @@ -56,6 +56,16 @@ newPosition id (PreDefPos file_name) newPosition id NoPos = { ip_ident = id, ip_line = cNotALineNumber, ip_file = "???" } +stringPosition :: !String !Position -> StringPos +stringPosition id (FunPos file_name line_nr _) + = { sp_name = id, sp_line = line_nr, sp_file = file_name } +stringPosition id (LinePos file_name line_nr) + = { sp_name = id, sp_line = line_nr, sp_file = file_name } +stringPosition id (PreDefPos file_name) + = { sp_name = id, sp_line = cNotALineNumber, sp_file = file_name.id_name } +stringPosition id NoPos + = { sp_name = id, sp_line = cNotALineNumber, sp_file = "???" } + checkError :: !a !b !*ErrorAdmin -> *ErrorAdmin | <<< a & <<< b // PK checkError id mess error=:{ea_file,ea_loc=[]} = { error & ea_file = ea_file <<< "Error " <<< " " <<< id <<< " " <<< mess <<< '\n', ea_ok = False } @@ -504,6 +514,12 @@ where = file <<< '[' <<< ip_file <<< ',' <<< ip_ident <<< ']' = file <<< '[' <<< ip_file <<< ',' <<< ip_line <<< ',' <<< ip_ident <<< ']' +instance <<< StringPos where + (<<<) file {sp_file,sp_line,sp_name} + | sp_line == cNotALineNumber + = file <<< '[' <<< sp_file <<< ',' <<< sp_name <<< ']' + = file <<< '[' <<< sp_file <<< ',' <<< sp_line <<< ',' <<< sp_name <<< ']' + instance <<< ExplImpInfo where (<<<) file (ExplImpInfo eii_ident eii_declaring_modules) |