Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

GHC is still C-boostrap-able. That's literally the only reason why the C backend still exists:

> The C code generator is only supported when GHC is built in unregisterised mode, a mode where GHC produces 'portable' C code as output to facilitate porting GHC itself to a new platform.



so GHC can generate C code to bootstrap GHC?


GHC can compile GHC (or Haskell in general) to C, the main use case being bootstrapping GHC without cross-compilation, as the latter has historically been lacking:

> Support for cross-compilation works reasonably well in 7.8.1. Previous versions had various issues which are usually work-aroundable.

(7.8.1 was released in 2014, GHC itself is 25 years old)




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: