[Yhc] Finfo flags

Robert Dockins robdockins at fastmail.fm
Thu Nov 2 10:28:51 EST 2006


On Nov 2, 2006, at 9:53 AM, Thomas Shackell wrote:

>> Can anyone tell me what the Finfo flags field means and is used for?
>> The C runtime defines this enum, which I assume is related:
>> enum FInfoFlags { FFL_NONE = 0x00, FFL_INVIS = 0x01, FFL_LAMBDA =  
>> 0x02,
>> FFL_PRIM_APPLY = 0x04 };
>> They were added in about May, and seem to relate to Hat, based on  
>> patch
>> comments.
>
> Sorry Rob,
>
> Took me a while to spot this email. It's entirely Hat related,
>
>   FFL_INVIS
>      means treat this function as though it didn't exist
>      from a tracing point of view.

When would you use this flag?  Is this for combinators introduced,  
eg, during lambda lifting?

>   FFL_LAMBDA
>      means this is a lambda function so don't try to
>      trace it's name or anything.

So this is particularly for anonymous functions, right?

>   FFL_PRIM_APPLY
>      means this is the special inbuilt apply function that is so  
> special
>      you can't even write it in Haskell. So please trace it specially.

Is this also used for the STRING function?  Does it have other uses?


So then, if no flags are set the default is a named, non-primitive  
function that Hat should trace?

Also, what happens if you get the flags wrong (like, set them all to  
0 regardless of what they should be).   Is Hat the only think  
affected?  Will Hat crash if they're wrong?

> Thanks
>
> Tom


Thanks
Rob Dockins

Speak softly and drive a Sherman tank.
Laugh hard; it's a long way to the bank.
           -- TMBG





More information about the Yhc mailing list