Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • 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 4,828
    • Issues 4,828
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 452
    • Merge requests 452
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #4056

Closed
Open
Created May 09, 2010 by verdelyi@trac-verdelyi

GHC panic with small TH code

[verdelyi@localhost CompilerGenerator-Haskell]$ cat BUG.hs 
{-# LANGUAGE TemplateHaskell, TypeFamilies, RankNTypes, FlexibleContexts #-}

import Language.Haskell.TH

astTest :: Q [Dec]
astTest = [d|
    generateWalker :: forall t . [t] -> [t]
    generateWalker = id

    class (Num (From t), Num (To t)) => TransformationPhase t where
        type From t
        type To t
        type Downwards t
        type Upwards t

        executeTransformationPhase :: [t] -> [t]
        executeTransformationPhase = undefined
  |]
[verdelyi@localhost CompilerGenerator-Haskell]$ ghci BUG.hs 
GHCi, version 6.12.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package ffi-1.0 ... linking ... done.
[1 of 1] Compiling Main             ( BUG.hs, interpreted )
ghc: panic! (the 'impossible' happened)
  (GHC version 6.12.2 for i386-unknown-linux):
	nameModule executeTransformationPhase{v agj}

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

> 
Edited Mar 09, 2019 by Ian Lynagh <igloo@earth.li>
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking