[ghc-steering-committee] Recommendation for #378: support the design for dependent types

Eric Seidel eric at seidel.io
Tue May 25 00:38:18 UTC 2021

On Thu, May 20, 2021, at 02:58, Joachim Breitner wrote:
> I am actually not opposed to compromising on the OIP, and would not
> mind seeing new features of Haskell be used in basic libraries where
> they make sense.
> Base has `HasCallStack`. It has Rank2Polymorphism. It has type
> equalities. It has generics, and thus associated types.

But they're all used judiciously. By and large, you do not need to understand any of these features to use `base` productively. And where they would bleed out too much, we have taken steps to hide the details. For example, when ($) became levity polymorphic, we suppressed runtime representations from GHC's output to avoid confusing less advanced users. 

`HasCallStack` is another interesting case. It's behavior is pretty straightforward but is implemented in terms of a very niche feature, ImplicitParams. The underlying representation is exposed in this case, but we did discuss whether we should prefer to make it abstract and just reuse the ImplicitParams machinery inside GHC. We didn't do that, but perhaps we should have.

More information about the ghc-steering-committee mailing list