Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,249
    • Issues 5,249
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 578
    • Merge requests 578
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #8540
Closed
Open
Issue created Nov 19, 2013 by awson@awsonReporter

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 Mar 09, 2019 by awson
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking