<div dir="ltr">Source for Eliott: <a href="https://github.com/conal/lambda-ccc/blob/master/src/LambdaCCC/Lambda.hs">https://github.com/conal/lambda-ccc/blob/master/src/LambdaCCC/Lambda.hs</a><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><br></div>AF</div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 14 Sept 2021 at 13:38, Ari Fordsham <<a href="mailto:arifordsham@gmail.com">arifordsham@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">I don't know if this is the right forum for this, I apologise if I'm intruding...<div><br></div><div>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.</div><div><br></div><div>Conal Eliottt has done something similar in a blog post (<a href="http://conal.net/blog/posts/overloading-lambda#:~:text=Haskell%20source%20language.-,I,-originally%20intended%20to" target="_blank">http://conal.net/blog/posts/overloading-lambda#:~:text=Haskell%20source%20language.-,I,-originally%20intended%20to</a>) and it seems relatively straightforward.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Ari Fordsham</div></div>
</blockquote></div>