Comments (4)
Ok, i thing the error comes from hlint (the linter used by hie by default). If you turn off the extension option:
{
"languageServerHaskell.hlintOn": false
}
the problem is gone. hlint has to parse the module too and not always match the compiler parsing.
from haskell-ide-engine.
Apparently the upgrade didn't have anything to do with the problem I'm facing. It looks like HIE chokes on my code. To reproduce:
Create a new project with stack init foobar
and open with VSCode. Paste the following into src/Lib.hs
:
{-# LANGUAGE DeriveFunctor #-}
module Lib where
class ( Functor m ) => Mon m where
join :: m ( m x ) -> m x
data State s a = State ( s -> ( s, a ))
deriving Functor
instance Mon ( State s ) where
join ( State f ) = State $ \s ->
let
(ss, ( State g )) = f s
in
g ss
qqqq
This causes an error indicator to appear on the last line (qqqq
). So far so good. However, removing that line doesn't make the error indicator go away and Lib.hs
keeps marked as containing an error. Only after commenting out and in again the whole instance declaration for Mon
are things back to normal. At least until I make the next typo...
from haskell-ide-engine.
Hi! Sorry for the late response.
I can reproduce the error and it is a pretty weird one. The code is totally correct. It has to be related with some weird syntax handling error in hie... investigating
from haskell-ide-engine.
Thanks for confirming and providing a workaround. So far I've been hitting the "Haskell: restart HIE" action every now and then.
from haskell-ide-engine.
Related Issues (20)
- hie only loads the full suite of tests when configured without specifying the root file `Spec.hs` HOT 1
- HIE stops reporting messages to coc.nvim HOT 1
- Build fails on Windows: "realgcc.exe: error: CreateProcess: No such file or directory" HOT 13
- stack build failing on Windows and ghc-8.8.3: Access violation in generated code HOT 2
- Is HIE working with cabal script files? HOT 1
- can't load .so/.DLL for libHSghc-prim-0.5.3-ghc8.6.5.so HOT 9
- unable to install on windows10 build 2004 HOT 2
- Fail on initialisation for. Could not obtain flags for HOT 2
- Self-dependency in test suite fails with hie HOT 3
- Can't install due to OFD issue
- Windows 10 build fail. HOT 2
- HLint needs to be called using `-X QuasiQuotes` when they are enabled
- Conflict between running cabal manually and using hie HOT 1
- macOS Big Sur beta build fail. HOT 3
- Can not parse platformConstants HOT 5
- Multiple stack.yaml files HOT 2
- Cannot use hie-wrapper and so on the language server cannot be initialized HOT 4
- macos failure to build package primitive HOT 2
- Fail to stack install with RedownloadHttpError HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haskell-ide-engine.