[MLton] modifying flatten.fun to always flatten

Lukasz S Ziarek lziarek@cs.purdue.edu
Thu, 15 Jan 2004 10:49:38 -0500 (EST)

I am in the process of modifying flatten.fun to always flatten tupples.
The initial idea to accomplish this was to modify the if then else
branches in the flattening function as well the utility functions defined
within it (IE doitArgs).  As I understand it, the first part of the
flatten.fun file extracts all the needed information to correctly fillout
the two-point lattice,
where top signifies that the tupple will not be flattened and bottom that
it can be flattened.  The rest of the program checks the lattice and
either flattenes or does not flatten depending on the value.  The initial
idea was to have all functions default to the flatten case. However, I
have run into complications with the doitCaseCon function in which such a
simple approach does not work.  For doitCaseCon I removed the tupple
reconstruction,  but also to no avail.  One of the problem I am running
into, is the diachotomy being created between what the tupples I am trying to
flatten and the two-point lattice. Should I have to worry about the
values in the two-point lattice?  For that matter, should I simply set
them to bottom, or do I even need to do anything with the lattice?  When I
attempt to fixpoint I am recieving the detupple message, which is
generated if Tycons are not equal in the case of a tupple, whenever the
function detuple is called.  Any thoughts, ideas, or suggestions? Since I
am still fairly new to the MLton compiler, explenations are also very
welcome, I could have simply overlooked something silly.

thank you,