3 module U_pbinding where
8 import U_coresyn ( U_coresyn ) -- interface only
9 import U_hpragma ( U_hpragma ) -- interface only
11 import U_literal ( U_literal ) -- ditto
13 import U_ttype ( U_ttype ) -- ditto
14 data U_pbinding = U_pgrhs U_tree U_list U_binding U_stringId U_long
16 rdU_pbinding :: _Addr -> UgnM U_pbinding
18 = ioToUgnM (_ccall_ tpbinding t) `thenUgn` \ tag@(I# _) ->
19 if tag == ``pgrhs'' then
20 ioToUgnM (_ccall_ ggpat t) `thenUgn` \ x_ggpat ->
21 rdU_tree x_ggpat `thenUgn` \ y_ggpat ->
22 ioToUgnM (_ccall_ ggdexprs t) `thenUgn` \ x_ggdexprs ->
23 rdU_list x_ggdexprs `thenUgn` \ y_ggdexprs ->
24 ioToUgnM (_ccall_ ggbind t) `thenUgn` \ x_ggbind ->
25 rdU_binding x_ggbind `thenUgn` \ y_ggbind ->
26 ioToUgnM (_ccall_ ggfuncname t) `thenUgn` \ x_ggfuncname ->
27 rdU_stringId x_ggfuncname `thenUgn` \ y_ggfuncname ->
28 ioToUgnM (_ccall_ ggline t) `thenUgn` \ x_ggline ->
29 rdU_long x_ggline `thenUgn` \ y_ggline ->
30 returnUgn (U_pgrhs y_ggpat y_ggdexprs y_ggbind y_ggfuncname y_ggline)
32 error ("rdU_pbinding: bad tag selection:"++show tag++"\n")