Code Monkey home page Code Monkey logo

Comments (12)

kazu-yamamoto avatar kazu-yamamoto commented on August 18, 2024

Colors dependes on your environment. In my environment, "gray" is used. I don't configure colors at all. I created unused variables and typing "M-?" results in "warning", not "error". If unused variables are categorized to "error" in your environment, please give me example code.

from ghc-mod.

mwotton avatar mwotton commented on August 18, 2024
module Foo() where
killer = 10

gives

Line 2: 1 error(s), 2 warning(s)
 Warning: Defined but not used: `killer'
Warning: Definition but no type signature for `killer'
         Inferred type: killer :: t

Warning: Defaulting the following constraint(s) to type `Integer'
         `Num t' arising from the literal `10' at foo.hs:2:9-10
In the expression: 10
In the definition of `killer': killer = 10

from ghc-mod.

kazu-yamamoto avatar kazu-yamamoto commented on August 18, 2024

I don't understand your point, sorry. This result seems natural to me. What is your problem?

from ghc-mod.

mwotton avatar mwotton commented on August 18, 2024

I'm trying to work out what the error is - it says "Line 2: 1 error, 2 warnings", but there are only two warnings listed, no errors.

from ghc-mod.

mwotton avatar mwotton commented on August 18, 2024

Three warnings, I mean:) but no errors.

from ghc-mod.

kazu-yamamoto avatar kazu-yamamoto commented on August 18, 2024

OK. I understand.
P.S.
Since I found ghc-mod does not work with GHC 6.12, I'm suffering from this bug now.

http://hackage.haskell.org/trac/ghc/ticket/4015

from ghc-mod.

mwotton avatar mwotton commented on August 18, 2024

really? But I don't have any records in that test program...

from ghc-mod.

kazu-yamamoto avatar kazu-yamamoto commented on August 18, 2024

Really? What's version of GHC? I'm using GHC 6.12.1.

from ghc-mod.

mwotton avatar mwotton commented on August 18, 2024

I'm using 6.12.1 too. The output from ghc-mod actually looks reasonable, I think it's just getting processed somewhere in the elisp.

mwotton@loki:/home/mwotton/projects$ ghc-mod check ./foo.hs
foo.hs:3:0:Warning: Definition but no type signature for `res'         Inferred type: res::t
foo.hs:3:6:Warning: Defaulting the following constraint(s) to type `Integer'         `Num t' arising from the literal `20' at foo.hs:3:6-7In the expression: 20In the definition of `res': res = 20
foo.hs:4:0: Warning: Defined but not used: `killer'
foo.hs:4:0:Warning: Definition but no type signature for `killer'         Inferred type: killer :: t
foo.hs:4:9:Warning: Defaulting the following constraint(s) to type `Integer'         `Num t' arising from the literal `10' at foo.hs:4:9-10In the expression: 10In the definition of `killer': killer = 10
Warning: output was redirected with -o, but no output will be generated

because there is no Main module.

from ghc-mod.

kazu-yamamoto avatar kazu-yamamoto commented on August 18, 2024

This bug is relating to "browse" not "check".

from ghc-mod.

kazu-yamamoto avatar kazu-yamamoto commented on August 18, 2024

In my environment, 3 warnings are displayed...

from ghc-mod.

mwotton avatar mwotton commented on August 18, 2024

right, this looks great now. THanks!

from ghc-mod.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.