[ats-lang-users] Changing the types of many list creation functions
Unleashing the potentials of types and templates
Status: Beta
Brought to you by:
ats-hwxi
From: Hongwei Xi <hw...@cs...> - 2009-06-08 01:09:58
|
FYI. I have just changed the types of many functions that are used to create lists. In ATS-0.1.4 (or previous versions), a list function such as list_map returns a nonlinear list, which the programmer cannot free in a safe manner. In practice, lists generated by functions like list_map may often be used for a short while and then become garbage. Now list_map returns a linear list; if needed, the programmer can always turn a linear list into a nonlinear one by calling [list_of_list_vt], which is just a safe no-op casting function. Of course, the programmer can also use the functions declared in [prelude/SATS/list0], which make no use of linear types. --Hongwei Computer Science Department Boston University 111 Cummington Street Boston, MA 02215 Email: hw...@cs... Url: http://www.cs.bu.edu/~hwxi Tel: +1 617 358 2511 (office) Fax: +1 617 353 6457 (department) |