6 data U_list = U_lcons U_VOID_STAR U_list | U_lnil
8 rdU_list :: _Addr -> UgnM U_list
10 = ioToUgnM (_ccall_ tlist t) `thenUgn` \ tag@(I# _) ->
11 if tag == ``lcons'' then
12 ioToUgnM (_ccall_ lhd t) `thenUgn` \ x_lhd ->
13 rdU_VOID_STAR x_lhd `thenUgn` \ y_lhd ->
14 ioToUgnM (_ccall_ ltl t) `thenUgn` \ x_ltl ->
15 rdU_list x_ltl `thenUgn` \ y_ltl ->
16 returnUgn (U_lcons y_lhd y_ltl)
17 else if tag == ``lnil'' then
20 error ("rdU_list: bad tag selection:"++show tag++"\n")