Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#9193 closed bug (fixed)

GHC panic usinig HList and Lens

Reported by: maxigit Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.6.3
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: x86
Type of failure: GHCi crash Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


This bug might have been fixed in GHC 7.8.2 but I haven't been able to test it. Some packages required to reproduce the bug are broken under 7.8.*.

GHC 'panic' whilst trying to compile the following. Strangely, removing doing the last line of code 'manually' in ghci works.

{-# LANGUAGE TypeFamilies, DataKinds, PolyKinds, TypeOperators #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
module Database.Harehouse.SQLFragment where
import Data.HList
import Control.Lens hiding(from)

x = hLens' (Label :: Label "x")

Note. I'm using HList- and lens- I think it wasn't working with lens 4.2 either, but since I tried to install ghc 7.8.2 I haven't be able to reinstall lens 4.2. (cabal hell).

Change History (4)

comment:1 Changed 3 years ago by archblob

Everything works with 7.8.2. What was the panic about exactly ? Is this the complete code that caused the problem ?

comment:2 Changed 3 years ago by maxigit

There is only one line of code ... I get the following error message

ghc: panic! (the 'impossible' happened)
  (GHC version 7.6.3 for x86_64-apple-darwin):
<<details unavailable>>

Please report this as a GHC bug:

So I did I. As I said I tried with 7.8.2 but I couldn't install some dependencies which are mainly text and distributive :-(

comment:3 Changed 3 years ago by simonpj

Resolution: fixed
Status: newclosed

Perhaps a dup of #8230, #8225, #7502?

I'll close as fixed, but reopen if you disagree.


comment:4 Changed 3 years ago by maxigit

It's definitely a duplicate of #8225 : adding

import GHC.TypeLits

solves the problem. This workaround should be enough until I can get 7.8.* working. Thank you very much for your really quick answers.


Note: See TracTickets for help on using tickets.