Skip to content

HLS not working with QuasiQuotes #270

Closed
@vaclavsvejcar

Description

@vaclavsvejcar

So I'm trying to migrate from HIE to HLS and so far I'm really happy about it, the only thing that doesn't work for me is that HLS has some obvious issues to work with source code files with QuasiQuotes.

Snímek obrazovky 2020-08-02 v 12 05 05

The reported error is

• Can't find interface-file declaration for variable compileUnsafe
    Probable cause: bug in .hi-boot file, or inconsistent .hi file
    Use -ddump-if-trace to get an idea of which file caused the error
• In the first argument of ‘(.)’, namely ‘compileUnsafe’
  In the expression: (compileUnsafe . pack)
  In the first argument of ‘match’, namely
    ‘(((compileUnsafe . pack) $ "^package (.*);$"))’

It basically makes the HLS unusable for these files as all the stuff like code checking and showing popup on hover doesn't work any longer. The project can be normally built using stack so I guess this is some issue in HLS.

Used Software

  • VSCode + Haskell extension v1.0.0
  • HLS version 0.2.2
  • LTS Haskell 16.8 + GHC 8.8.3

How to reproduce

$ git clone https://github.com/vaclavsvejcar/headroom
$ cd headroom/
$ stack build

Then open the file src/Headroom/Ext/Java.hs in VSCode + HLS. You might need to install additional pcre libraries, for me on macOS brew install pcre made it.

If you'll need any additional info & help, let me know. Also, if this is a bug, is there any workaround for it? Thanks a lot in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions