1 module Globals where 2 3 import Tags 4 5 import Core_datatype 6 7 import Type_defs 8 9 type Global_state = ( Int , [Attribute] , Tag_table ) 10 11 initial_gst :: Global_state 12 13 initial_gst = ( -1 , [] , default_tag_tbl ) 14 15 set_print_depth pd ( _ , attL , tags ) = ( pd , attL , tags ) 16 17 set_attributes attL ( pd , _ , tags ) = ( pd , attL , tags ) 18 19 set_tag_table tags ( pd , attL , _ ) = ( pd , attL , tags ) 20 21 get_print_depth ( pd , _ , _ ) = pd 22 23 get_attributes ( _ , attL , _ ) = attL 24 25 get_tag_table ( _ , _ , tags ) = tags 26 27 --different :: Global_state -> Global_state -> Bool 28 29 --different gst1 gst2 = gst1 /= gst2 30 31 fetch_ps ( _ , _ , tgL ) = tgL