The GHC(i)/RTS linker and Template Haskell

2022-05-31 Thread Alexis King
Hi all, I’ve recently been trying to better understand how and where time is spent at compile-time when running Template Haskell splices, and one of the areas I’ve been struggling to figure out is the operation of the linker. From reading the source code, here’s a summary of what I think I’ve figu

Re: The GHC(i)/RTS linker and Template Haskell

2022-05-31 Thread Phyx
Hi Alexis, Most information on this can be found on the Wiki, where a lot of these design decisions are made. e.g. https://gitlab.haskell.org/ghc/ghc/-/wikis/dynamic-ghc-programs The points you've figured out are correct so far, to answer some of your questions: > But I don’t actually understan

Re: The GHC(i)/RTS linker and Template Haskell

2022-05-31 Thread Moritz Angermann
Hi Alexis, let me try to provide the high up view. I'm sorry if I'm going a bit overboard on details you already know. But let's start with clearing up a misconception first. No, GHCi does not always require dynamic linking. At the very abstract level we have a compiler that knows how to turn var