Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#10356 closed bug (duplicate)

Couldn't match type ‘a’ with ‘Int’ / ‘a’ is untouchable / inside the constraints ()

Reported by: radix Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.10.1
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Sadly I'm a Haskell newbie, so this won't be a very good bug report, but I am working on a codebase and I triggered a GHC bug (at least according to GHC itself).

Building json-log-viewer-0.0.1...
Preprocessing executable 'json-log-viewer' for json-log-viewer-0.0.1...
[3 of 3] Compiling Main             ( src/Main.hs, dist/build/json-log-viewer/json-log-viewer-tmp/Main.o )

src/Main.hs:316:41:
    Couldn't match type ‘a’ with ‘Int’
      ‘a’ is untouchable
        inside the constraints ()
        bound by the inferred type of refreshMessages :: IO ()
        at src/Main.hs:(300,7)-(324,48)ghc: panic! (the 'impossible' happened)
  (GHC version 7.10.1 for x86_64-apple-darwin):
	No skolem info: a_al2w[sk]

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

I saved the state of the code in a git branch and put it here: https://github.com/radix/json-log-viewer/tree/ghc-bug

I'll also attach my list of cabal dependencies installed. The only tricky one is that I'm working off of an unreleased version of vty-ui, at this revision: https://github.com/jtdaugherty/vty-ui/commit/c3a0c4b660119a4d5862a6f549a98739a3fc5fa7

I also don't know if the program is "valid" -- I'm in the middle of a refactor, and it's a big cluttered program that I know is very poorly written. Sorry about that. I would not usually report a bug in such a situation but the compiler implored me to, so I am.

Attachments (1)

installed-packages.txt (1.6 KB) - added by radix 3 years ago.
output of cabal list --installed --simple-output

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by radix

Attachment: installed-packages.txt added

output of cabal list --installed --simple-output

comment:1 Changed 3 years ago by radix

Oh, I just found https://ghc.haskell.org/trac/ghc/ticket/10045

I'm pretty sure this is a duplicate of that (fixed) bug. I'll close this one, in hopes that nobody looks at my horrible reproducer code :)

comment:2 Changed 3 years ago by radix

Resolution: duplicate
Status: newclosed

comment:3 Changed 3 years ago by goldfire

Without looking too deeply, yes, this does look like a dup of #10045.

Many thanks for reporting!

Note: See TracTickets for help on using tickets.