More type safety in Core?

Ari Fordsham arifordsham at gmail.com
Tue Sep 14 12:49:55 UTC 2021


Source for Eliott:
https://github.com/conal/lambda-ccc/blob/master/src/LambdaCCC/Lambda.hs

AF


On Tue, 14 Sept 2021 at 13:38, Ari Fordsham <arifordsham at gmail.com> wrote:

> I don't know if this is the right forum for this, I apologise if I'm
> intruding...
>
> Are there any plans to use the type system to enforce safety in Core, via
> e.g. GADTs? This would replace much of core-lint with static checking.
>
> Conal Eliottt has done something similar in a blog post (
> http://conal.net/blog/posts/overloading-lambda#:~:text=Haskell%20source%20language.-,I,-originally%20intended%20to)
> and it seems relatively straightforward.
>
> This would be especially beneficial to those working at the cutting edge
> of GHC features, statically ensuring their Core manipulations are correct.
> I would be surprised if existing compiler bugs wouldn't be found while
> implementing this.
>
> What would the performance impact be? would using GADTs incur extra
> overhead? I'd assume you'd save something by lugging around less type
> information in Core.
>
> Ari Fordsham
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20210914/b73daf87/attachment.html>


More information about the ghc-devs mailing list