Decoupling built-in data types from GHC?

Continuing the discussion from Pre-Pre-HFTP: Decoupling base and GHC:

One cool thing I remember from reading Agda code is that the stdlib defines things like Bool and List and tells the compiler “here is your definition of list” with a pragma. Porting the idea to Haskell would mean that GHC would be able to indirectly depend on the list in base rather than the other way around.

  • Is there anything fundamental about the difference between Agda and Haskell that invalidates the comparison?
  • Is this just a lot of work?
  • Is this the kind of thing Backpack enables?
  • Is GHC in principle able to use backpack like this?
1 Like

Let’s (politely :-) ask those who have taken on the associated challenge:

…it have been a few months since their paper was initially published: @Ericson2314, is there any good news? (I’m cautiously assuming this effort will help in some way to also disentangle base from GHC.)


Another bit of related work is Rust’s lang_items: lang_items - The Rust Unstable Book

1 Like