Skip to content

Improve template haskell support (upstream fix and workaround for compiler crashes) #1431

Closed
@jneira

Description

@jneira

Description of the problem (from #469 (comment)):

GHC has its own dynamic linker, in the rts, and it gets used in certain cases:

  • when GHC the binary is linked statically, by GHCI and TH
  • when ghc the library is linked statically, by TH and the ghc interactive api
    Implementing a dynamic linker with support for >=3 platforms is a risky and complex exercise. Fortunately there is an easy opt-out (-dynamic) but unfortunately that opt-out makes distribution much harder, and the precompiled HLS binaries are statically linked.

Hot to check if you hls binary is using the ghc dynamic linker (from #1982 (comment)):

/path/to/haskell-language-server  +RTS --info | grep "RTS way" | grep dyn && echo "Dynamic" || echo "Static

@pepeiborra @wz1000 could we sketch what could be the needed changes (mainly in ghcide i suppose) to improve it? is it even a good idea?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions