qual_pkg panic with template haskell
I'm updating some things that use Template Haskell to derive lenses to work with GHC HEAD, but I'm getting the following error. My cabal-install
a fresh build from the master branch of the cabal
repository.
src/Lib.hs:11:1:ghc: panic! (the 'impossible' happened)
(GHC version 7.9.20141029 for x86_64-unknown-linux):
qual_pkg lens-4.5.0.0.1
lenstest.cabal
name: lenstest
version: 0.1.0.0
license-file: LICENSE
author: Luite Stegeman
maintainer: stegeman@gmail.com
build-type: Simple
cabal-version: >=1.10
library
build-depends: base >= 4.8 && < 4.9,
lens >= 4.5
exposed-modules: Lib
default-language: Haskell2010
hs-source-dirs: src
src/Lib.hs:
{-# LANGUAGE TemplateHaskell #-}
module Lib where
import Control.Lens
data XY = X Int
| Y String
makeLenses ''XY
makePrisms ''XY
The lens
and free
packages need to be patched to work with the latest GHC, because of a conflict with Data.Bifunctor
. I've attached updated version that use PackageImports
to get the module from bifunctors
as a workaround.
Use
cabal install --allow-newer
to install, since some dependencies have too restrictive upper bounds.
Trac metadata
Trac field | Value |
---|---|
Version | 7.9 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |