CallStack naming

Eric Seidel eric at seidel.io
Thu Jan 21 16:14:43 UTC 2016


On Thu, Jan 21, 2016, at 04:07, Simon Peyton Jones wrote:
> Well, in the short term, let's 
>  * bikeshed about names

Ok, I don't like ICallStack :) It sounds like a C# interface, which,
while technically sort of accurate, is very misleading since users will
never write an instance. I'd prefer something a bit more descriptive,
like

- WithCallStack
- HasCallStack
- GetsCallStack

(in no particular order)

>  * write down the user-visible API, ensuring that it makes
>    no mention of implicit parameters (provide setCallStack)
> 
> Then we can implement the API differently later if we so desire.

In that case we'll probably want to move the CallStack section of the
user guide elsewhere, right now it's a subsection of ImplicitParams. 

> The main disadvantage is that the abstraction is leaky.  We can't
> *prevent* users from seeing and using the implicit parameter.

True, so perhaps a single mention of the implicit parameter, explaining
that it's not part of the API and that using it is *explicitly
unsupported*, i.e. we may change the implementation later.

> Does that sound like a plan.  Might you do it Eric?  The urgency is just
> to get 8.0 out with an API that we like

Sure, I'll try to have a patch out later today.


More information about the ghc-devs mailing list