
John Meacham wrote:
I was wondering if we could be sure to get
dependingOn :: a -> b -> a dependingOn = ....
in ghc 6.6? this has been discussed before, it is implemented in jhc and I have found all sorts of use for it as it can be used to control let floating and inlining in a nice general way and is trivial to implement. (one for ghc was posted before based on primitives it already implements)
we just need to decide on a module to export it.
the meaning is that
x = ... `dependingOn` y
returns x with an artificial dependency on y. so things using x cannot be floated out above where y is defined.
If you make a ticket for it, we can try to get to it for 6.6, but it's probably unlikely at this stage. It's like the touch# primitive we already have, but I'm not sure if it can be implemented using touch#. We did discuss this before, IIRC - do you have a pointer to the discussion? Cheers, Simon