GHC cross-compilers do not support TH (nor annotations) out-of-the-box. You need to build an external interpreter program (called iserv) for the target, to run it into qemu or on a real aarch64 playform, to setup an iserv-proxy for ghc to communicate with it… haskell.nix does this automatically afaik, so it may be easier to use it.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Step by step to install external-interpreter iserv with ghc cross-compiler aarch64-linux-gnu-ghc
|
0 | 43 | July 13, 2025 | |
Porting ghc to a new platform | 9 | 330 | February 26, 2025 | |
How to build application in arm64 arch with a x86_64 host
|
12 | 3483 | September 19, 2023 | |
Need help: Error while building GHC 9.2.1 for target=aarch64-apple-ios
|
4 | 955 | March 1, 2022 | |
GHC's wasm backend now supports Template Haskell and ghci | 8 | 889 | November 22, 2024 |