
Hi, There was a 'I want to write a compiler' thread recently. I wonder if there is such kind of pointers for compilation of strict functional languages (perhaps with lazy evaluation annotations) . Although GRIN is designed for lazy languages, would it be ok to use it for a strict one (and leverage its thunk representation for the lazy part of the language)? The 'whole program' optimization aspect is a plus. On a related note, I have another question. Say we have some data structure, for instance a list, some functions on this data structure (probably defined with some well known functions, such as map or fold), and a program using them. Is there any research trying to rewrite the program, and the data structure, to optimize them ? A contrived example is the length of a list : instead of traversing a list to know its length, the list can have an additional field which is incremented at each cons. Thanks, Thu