[GHC] #11979: ghc: panic! (the 'impossible' happened)
GHC
ghc-devs at haskell.org
Mon Apr 25 01:28:11 UTC 2016
#11979: ghc: panic! (the 'impossible' happened)
-------------------------------------+-------------------------------------
Reporter: javierlopm | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Keywords: panic | Operating System: Linux
Architecture: | Type of failure: Documentation
Unknown/Multiple | bug
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
Error when compiling, maybe parser wasn't able to detect error at "type
TokContent = { position :: Pos, content::String }"
ghc: panic! (the 'impossible' happened)
(GHC version 7.6.3 for x86_64-unknown-linux):
tc_hs_type: record
{{{#!hs
{-# LANGUAGE DeriveDataTypeable #-}
module Tokens(
Token (..),
Pos
) where
import Data.Data(toConstr,Data,Typeable)
type Pos = (Int,Int)
type TokContent = { position :: Pos, content::String }
data Token = TkString { position :: Pos, content::String }
| TkLB { position :: Pos, content::String }
| TkRB { position :: Pos, content::String }
| TkLCurly { position :: Pos, content::String }
| TkRCurly { position :: Pos, content::String }
| TkLP { position :: Pos, content::String }
| TkRP { position :: Pos, content::String }
| TkDColon { position :: Pos, content::String }
| TkColon { position :: Pos, content::String }
| TkSColon { position :: Pos, content::String }
| TkTEQ { position :: Pos, content::String }
| TkPEQ { position :: Pos, content::String }
| TkDot { position :: Pos, content::String }
| TkExcMark { position :: Pos, content::String }
| TkNEQ { position :: Pos, content::String }
| TkDAmp { position :: Pos, content::String }
| TkAnd { position :: Pos, content::String }
| TkPOr { position :: Pos, content::String }
| TkOr { position :: Pos, content::String }
| TkDEQ { position :: Pos, content::String }
| TkGE { position :: Pos, content::String }
| TkLE { position :: Pos, content::String }
| TkGT { position :: Pos, content::String }
| TkLT { position :: Pos, content::String }
| TkIDiv { position :: Pos, content::String }
| TkDiv { position :: Pos, content::String }
| TkSum { position :: Pos, content::String }
| TkMin { position :: Pos, content::String }
| TkPower { position :: Pos, content::String }
| TkTimes { position :: Pos, content::String }
| TkMod { position :: Pos, content::String }
| TkEq { position :: Pos, content::String }
| TkAssign { position :: Pos, content::String }
| TkInt { position :: Pos, content::String }
| TkBool { position :: Pos, content::String }
| TkChar { position :: Pos, content::String }
| TkVoid { position :: Pos, content::String }
| TkFloat { position :: Pos, content::String }
| TkStruct { position :: Pos, content::String }
| TkUnion { position :: Pos, content::String }
| TkEnum { position :: Pos, content::String }
| TkEnumCons { position :: Pos, content::String }
| TkNull { position :: Pos, content::String }
| TKGlobal { position :: Pos, content::String }
| TkFunc { position :: Pos, content::String }
| TkIf { position :: Pos, content::String }
| TkElif { position :: Pos, content::String }
| TkElse { position :: Pos, content::String }
| TkEnd { position :: Pos, content::String }
| TkWhile { position :: Pos, content::String }
| TkFor { position :: Pos, content::String }
| TkBegin { position :: Pos, content::String }
| TkBreak { position :: Pos, content::String }
| TkContinue { position :: Pos, content::String }
| TkReturn { position :: Pos, content::String }
| TkExit { position :: Pos, content::String }
| TkRead { position :: Pos, content::String }
| TkWrite { position :: Pos, content::String }
| TkPrint { position :: Pos, content::String }
| TkAlloc { position :: Pos, content::String }
| TkFree { position :: Pos, content::String }
| TkSizeOf { position :: Pos, content::String }
| TkGet { position :: Pos, content::String }
| TkTruFal { position :: Pos, content::String }
| TkNum { position :: Pos, content::Int }
| TkDId { position :: Pos, content::String }
| TkId { position :: Pos, content::String }
| TkError { position :: Pos, content::String }
deriving(Data,Typeable)
instance Show Token where
show generic = show (toConstr generic )++ "\n" ++
" line: " ++ show l ++ "\n" ++
" column: " ++ show c ++ "\n"
where (l,c) = position generic
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11979>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list