<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">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>