Opened 14 months ago

Closed 14 months ago

Last modified 14 months 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 Revisions:

Description

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-0.3.4.1 and lens-4.1.2.1. 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 14 months 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 14 months 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):
        lookupVers2
<<details unavailable>>

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

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 14 months ago by simonpj

  • Resolution set to fixed
  • Status changed from new to closed

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

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

Simon

comment:4 Changed 14 months 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.

Max

Note: See TracTickets for help on using tickets.