Skip to content

Template Haskell handling bug in ghc-7.7.20131115 ?

Compiling this:

{-# LANGUAGE TemplateHaskell #-}
module Foo where

import Data.Aeson
import Data.Aeson.TH

data Test = Test

$(deriveFromJSON defaultOptions ''Test)

ghc-7.7.20131115 crashes with

Foo.hs:10:3:
    Can't find interface-file declaration for variable Data.Aeson.TH.parseTypeMismatch'
      Probable cause: bug in .hi-boot file, or inconsistent .hi file
      Use -ddump-if-trace to get an idea of which file caused the error
    In the expression:
      Data.Aeson.TH.parseTypeMismatch'
        "Test"
        "Foo.Test"
        "an empty Array"
        ("Array of length " ++ ((show . Data.Vector.length) arr_a3BM))
    In a case alternative:
        Array arr_a3BM
          | Data.Vector.null arr_a3BM -> Control.Applicative.pure Test
          | otherwise
          -> Data.Aeson.TH.parseTypeMismatch'
               "Test"
               "Foo.Test"
               "an empty Array"
               ("Array of length " ++ ((show . Data.Vector.length) arr_a3BM))
    In the expression:
      case value_a3BL of {
        Array arr_a3BM
          | Data.Vector.null arr_a3BM -> Control.Applicative.pure Test
          | otherwise
          -> Data.Aeson.TH.parseTypeMismatch'
               "Test"
               "Foo.Test"
               "an empty Array"
               ("Array of length " ++ ((show . Data.Vector.length) arr_a3BM))
        other_a3BN
          -> Data.Aeson.TH.parseTypeMismatch'
               "Test" "Foo.Test" "Array" (Data.Aeson.TH.valueConName other_a3BN) }
Trac metadata
Trac field Value
Version 7.7
Type Bug
TypeOfFailure OtherFailure
Priority high
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Windows
Architecture x86
Edited by awson
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information