-
-
Notifications
You must be signed in to change notification settings - Fork 389
Token parse error on {-# UNPACK #-} #1258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Might be related to this one? |
I think the problem is related with parser errors coming from the eval plugin (take look to latest issues labeled with) |
I confirmed manually that this bug will be solved by #1232. I've just added the following test case to regression test: {- | Won't panic on UNPACKs -}
module TUNPACK (THStatus(..)) where
type ByteString = String
type BSEndo = ByteString -> ByteString
type BSEndoList = [ByteString] -> [ByteString]
data THStatus = THStatus
{-# UNPACK #-} !Int -- running total byte count
BSEndoList -- previously parsed lines
BSEndo -- bytestrings to be prepended
-- >>> "Yay! UNPACK pragma didn't do bad things!" EDIT: ... And, of course, the above code fragments makes HLS 0.8.0, which doesn't include mentioned PR, hangs up as expected. |
* WIP: Comment parsing using module annotations * Line Comment parsers (wip) * Line comment implemented (block comment not implemented) * Completely switches to Megaparsec * T27 must be fixed * We can always assume that comment starts with "--" with no space prepended * must be horizontal space, not ANY whitespace * Block parser (WIP) * We don't need whole range; position suffices * Brutal parsing for block haddock comments * Brutal line parsing * unset Opt_Haddock * Wrong debug messages * Redundant debug output * Hacks for indentation levels and LHS * Updates block comment logic in Literate Haskell * Updates doctests * Allows doctest without newline at the end * Precise handling of line ending * Corrects last-line block eval handling * Makes normal line parsing LHS sensitive * Removes outdated note on block comments in a single line * Wait a moment before executing each code lenses * Sorting tests in order * Sorts lenses in order * Reverted to use executCmd * Changes sorting logic * Fixes test case: trailing space * Dummy commit to re-invoke CI * expect fail CPP Eval on Windows * Corrects typo * Test for #1258 * Corrects test header * Ad-hoc treatment for ending brace in nested comment block * `goldenTest` function from Eval plugin doesn't support multiple tests in the same block but in separate group * Dummy commit to rerun CI * Stop using CPP and use `knownBrokenForGhcVersions` and `knownBrokenOnWindows` * Nested `expectedFailure` didn't work as expected * Abolishes `Parser` type synonym * Removes unneccesary comment evals * Skip failed curentRange resolution Co-authored-by: Junyoung/Clare Jang <[email protected]>
Your environment
Output of
haskell-language-server --probe-tools
orhaskell-language-server-wrapper --probe-tools
:haskell-language-server version: 0.8.0.0 (GHC: 8.6.5) (PATH: /home/flix/.config/Code/User/globalStorage/haskell.haskell/haskell-language-server-0.8.0-linux-8.6.5) (GIT hash: eb58f13f7b8e4f9bc771af30ff9fd82dc4309ff5) Tool versions found on the $PATH cabal: 2.4.1.0 stack: 2.5.1 ghc: 8.0.2
Which lsp-client do you use: VSCode
Describe your project (alternative: link to the project): https://github.com/yesodweb/wai/blob/master/warp/Network/Wai/Handler/Warp/Request.hs#L212
Contents of
hie.yaml
: noneSteps to reproduce
Expected behaviour
Should just parse the .hs file.
Actual behaviour
HLS fails to process the file. (
Request.hs
, see link to project)Include debug information
LSP logs:
The text was updated successfully, but these errors were encountered: