4 ms·
> Mu can easily take several minutes to compile a single large application. We will circumvent those problems by switching our front-end to use GHC directly Wh
by YetAnotherNick 4y ago
> Mu can easily take several minutes to compile a single large application. We will circumvent those problems by switching our front-end to use GHC directly
What does he mean by this?
- Vosporos 4y agoFrom what I understand: GHC takes care of the parsing of the source file, error reporting, etc. Then the AST (or an intermediate representation) is passed to the of the Mu compiler, which performs whole-program optimisations.
- nequo 4y agoGergo Erdi gave a talk on the GHC efforts of Standard Chartered last year: https://www.youtube.com/watch?v=fZ66Pz7015Q https://www.youtube.com/watch?v=fZ66Pz7015Q
- wathef 4y agoI may be wrong, but if I remember correctly Standard Charter uses their own “dialect” called Mu[1]. 1 - https://icfp21.sigplan.org/details/hiw-2021-papers/14/Haskell-reinterpreted-large-scale-real-world-experience-with-the-Mu-compiler-in-Fin https://icfp21.sigplan.org/details/hiw-2021-papers/14/Haskel...
- deleted 4y ago[deleted]
- grumpyprole 4y agoHe probably means that GHC will parse and type check faster. Switching the front-end doesn't sound like it will circumvent the whole program nature of their compilation. But I'm just guessing.
- misja111 4y agoI'm also interested. Just guessing, but I guess it means that while they use their own (slow compiling) 'Mu' dialect for most applications, they have switched to using 'standard' GHC for their front-end apps.
- tuukkah 4y agoFrontend here refers to the first stage of the three-stage structure of compilers, ie. the functionalities such as parsing and type checking that come before the optimization and target code generation phases: https://en.wikipedia.org/wiki/Compiler#Three-stage_compiler_structure https://en.wikipedia.org/wiki/Compiler#Three-stage_compiler_...
- misja111 4y agoDidn't know that, thanks! But then I'm wondering how they can do parsing and type checking with GHC when they are using their own dialect, "Mu". How come GHC can parse that?
- nequo 4y agoThe differences between Mu and Haskell are not that large. They use GHC as a library in their front end. Gergo Erdi gave a talk on it last year: https://news.ycombinator.com/item?id=35801844 https://news.ycombinator.com/item?id=35801844
- tuukkah 4y agoGHC has a system for language extensions so they have developed a few proprietary ones for Mu. For the standard ones, see https://downloads.haskell.org/ghc/latest/docs/users_guide/exts.html https://downloads.haskell.org/ghc/latest/docs/users_guide/ex...
- mtl77 4y agoGergo and I are working on a new implementation of the Mu compiler that uses GHC up to Core; from which we translate to the legacy Mu bytecode format. The original Mu compiler is not designed for separate compilation, our new version is, based on GHC's binary representation of compiled interfaces with unfoldings.