Unclear syntastic errors with ghc-mod - haskell

This problem only appears to happen when I am using cabal sandboxes. Everytime i type check I get this error syntastic: error: checker haskell/ghc_mod returned abnormal status 1 This error is very unhelpful is there anyway to make syntastic errors more verbose?

Related

How to fix this warning un torque?

When trying ./configure I get this
configure: WARNING: This compilation has strict compiler options enabled that cause the build to fail if any compiler warnings are emitted. If this build fails because of a harmless warning, please report the problem to torqueusers#supercluster.org
After I get an error when make
attr_fn_acl.c: In the 'set_allacl' function:
attr_fn_acl.c:454:20: error: this statement may fail [-Werror=implicit-fallthrough=]
pas->as_next = pas->as_buf;
~~~~~~~~~~~~~%~~~~~~~~~~~~
attr_fn_acl.c:458:5: note: here
case INCR:
%~~~
cc1: all warnings are treated as errors
How can this be fixed?
Tried other versions, same
Only with version 6.0.1 it turned out, but there he writes that he requires crypto, which I already have

How to diagnose the 'Oops! Entered absent arg' GHC error?

When running my GHC program, I see the following runtime error:
my-program: Oops! Entered absent arg moduleLen Int
Unfortunately, the error message is not that helpful. I wonder, what does this error usually mean and how can I fix it?

GHC not generating dyn_hi

I'm working on a Linux machine with GHC 7.8.2 and cabal 1.20.0.1.
I'm trying to install semigroups and whenever I do, I get the dreaded error message about missing dyn_hi files.
/home/me/.cabal/lib/x86_64-linux-ghc-7.8.2/semigroups-0.14
setup-Simple-Cabal-1.18.1.3-x86_64-linux-ghc-7.8.2: Error: Could not find
module: Data.Semigroup with any suffix: ["dyn_hi"] in the search path:
["dist/build"]
cabal: Error: some packages failed to install:
semigroups-0.14 failed during the final install step. The exception was:
I've tried following the advice given here and here. I've removed .cabal/config, .ghc, added shared : True and followed each step.But after multiple repetitions of these instructions I'm still getting the same errors.
Is there any other way to diagnose and fix these errors?

Make HLint ignore parse error due to multi-way if?

I'm using the MultiWayIf language extension. While I love HLint (I'm using version v1.8.61), unfortunately it appears that HLint is not aware of this extension, and it reports multi-way ifs as parse errors:
Warning: Parse error: |
The HLint Manual (http://community.haskell.org/~ndm/darcs/hlint/hlint.htm) describes how you can use pragmas to indicate suggestions to ignore; however, this doesn't seem to work for warnings due to parse errors.
Is there any way to tell HLint to ignore the parse error warnings?
Thank you!
You can run:
hlint "--ignore=Parse error" MyFile.hs
There is a test that this invocation works in the HLint test suite.
Note that as soon as there is a parse error you won't get any other hints from the file, since HLint can't operate on a file until it is parsed.
However, if you upgrade to haskell-src-exts-1.15 or higher then reinstall HLint it should parse multi-way-if fine. If not, please report a bug.

Haskell Plugins and cabal sandbox

So, I'm trying to use the Plugins package to dynamically load a haskell function from a source file. The source file depends on a package foo with module Foo.Bar. I'm running my project in a Cabal sandbox, where I have foo installed. Both my main program, and the module I'm loading with plugins, depend on foo. I always get one of the following two errors:
When I have foo installed in ~/.cabal, I get the error:
GHCi runtime linker: fatal error: I found a duplicate definition for symbol
aizmvszmaizmlibzm0zi1_FooziBar_zdfTypeableBazzuds2_closure
whilst processing object file
/home/joey/.cabal/lib/foo-0.1/ghc-7.6.3/HSfoo-0.1.o
This could be caused by:
* Loading two different object files which export the same symbol
* Specifying the same object file twice on the GHCi command line
* An incorrect `package.conf' entry, causing some object to be
loaded twice.
GHCi cannot safely continue in this situation. Exiting now. Sorry.
When I don't have it installed in ~/.cabal, I get a standard "module not found" error. And when I don't have it installed in my sandbox, I get the same module not found error trying to compile my main program code.
The plugins documentation is scarce at best. Any thoughts on how to solve this?
I got this working by using System.Plugins.Make to actually do the compliation, instead of relying on pre-existing object files. Not a complete solution, doesn't explain the problem, but it works for me for now.

Resources