Comments (6)
Important part of error message is the cross referencing information point to related files and lines of code. gcc and clang always put file name and line number as first information in output line:
file.cpp:12: ambiguous symbol 'xxx'
file.h:12: from a file included here
header.h:444: from a file included here
Sadly GHC likes to put paths to source files inside sentences so we have to discover where is the cross referencing information.
from haskell-ide-engine.
It would be great to have -fdefer-type-errors
prepend something to the warnings which are outputted for errors (maybe "Error: "). I'd like to have -fdefer-type-errors
be a default, but still present the messages as if they were errors.
from haskell-ide-engine.
I think there has been a change to prepend "error", will be in 8.0.1, may
be in 7.10.2 already
On Tue, Oct 27, 2015 at 12:41 AM, Michael Sloan [email protected]
wrote:
It would be great to have -fdefer-type-errors prepend something to the
warnings which are outputted for errors (maybe "Error: "). I'd like to have
-fdefer-type-errors be a default, but still present the messages as if
they were errors.—
Reply to this email directly or view it on GitHub
#7 (comment).
from haskell-ide-engine.
One thing that I keep stumbling upon is the fact that suggestions to enable pragmas always have slightly different formats causing tools which try to parse them such as haskell-mode
to not recognize them in a lot of cases.
from haskell-ide-engine.
What about .cabal
errors? Now there are errors which are returned without any file position information, so we can't put them as diagnostics.
from haskell-ide-engine.
As pointed by @mpickering there are a ghc proposal to implement structured errors: https://github.com/bgamari/ghc-proposals/blob/rich-errors-proposal/proposals/0000-rich-errors-proposal.rst. It is pretty recent (3 months).
To fix some bugs for windows i had to add more cases in parsing human readable ghc errors:
haskell-ide-engine/test/functional/FunctionalCodeActionsSpec.hs
Lines 224 to 228 in 5385087
or
haskell-ide-engine/src/Haskell/Ide/Engine/Plugin/HsImport.hs
Lines 489 to 501 in 5385087
from haskell-ide-engine.
Related Issues (20)
- 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
- bad module error handling with hlint enabled HOT 4
- 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
- server crashes 5 times HOT 2
- Type signatures are doubled and no hoogle info is displayed HOT 10
- No snippet for "do"
- Hoogle warning when Haddock docs present 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.