[GHC] #11027: GHC API panic (evaluated the place holder for a PostTcType)
GHC
ghc-devs at haskell.org
Wed Oct 28 09:13:33 UTC 2015
#11027: GHC API panic (evaluated the place holder for a PostTcType)
-------------------------------------+-------------------------------------
Reporter: rubik | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHC API | Version: 7.8.4
Resolution: | Keywords: undefined,
| place holder, posttctype
Operating System: Linux | Architecture: x86_64
| (amd64)
Type of failure: Runtime crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Description changed by rubik:
Old description:
> The same code that works for GHC 7.10.2 blows up on GHC 7.8.4, with
> errors like
> {{{
> test/ArgonSpec.hs:104: (best-effort)
> 6) Argon.analyze accounts for && operator
> uncaught exception: GhcException (argon-test: panic! (the
> 'impossible' happened)
> (GHC version 7.8.4 for x86_64-unknown-linux):
> fixity
>
> Please report this as a GHC bug:
> http://www.haskell.org/ghc/reportabug
> )
>
> test/ArgonSpec.hs:106: (best-effort)
> 7) Argon.analyze counts everything in a real example
> uncaught exception: GhcException (argon-test: panic! (the
> 'impossible' happened)
> (GHC version 7.8.4 for x86_64-unknown-linux):
> Evaluated the place holder for a PostTcType
>
> Please report this as a GHC bug:
> http://www.haskell.org/ghc/reportabug
> )
> }}}
>
> The responsible module is
> [https://github.com/rubik/argon/blob/master/src/Argon/Visitor.hs]
> and in particular (I think):
> {{{
> visitExp :: Exp -> Int
> visitExp (GHC.HsIf {}) = 1
> visitExp (GHC.HsMultiIf _ alts) = length alts - 1
> visitExp (GHC.HsLamCase _ alts) = length (GHC.mg_alts alts) - 1
> visitExp (GHC.HsCase _ alts) = length (GHC.mg_alts alts) - 1
> visitExp _ = 0
>
> visitOp :: Exp -> Int
> visitOp (GHC.OpApp _ (GHC.L _ (GHC.HsVar op)) _ _) =
> case getName op of
> "||" -> 1
> "&&" -> 1
> _ -> 0
> visitOp _ = 0
> }}}
> somehow, even if I use wildcards, the first arguments of the type
> constructors gets evaluated and since it's undefined GHC crashes.
> What am I supposed to do?
> The documentation does not say anything on the matter.
New description:
The same code that works for GHC 7.10.2 blows up on GHC 7.8.4, with errors
like
{{{
test/ArgonSpec.hs:104: (best-effort)
6) Argon.analyze accounts for && operator
uncaught exception: GhcException (argon-test: panic! (the
'impossible' happened)
(GHC version 7.8.4 for x86_64-unknown-linux):
fixity
Please report this as a GHC bug:
http://www.haskell.org/ghc/reportabug
)
test/ArgonSpec.hs:106: (best-effort)
7) Argon.analyze counts everything in a real example
uncaught exception: GhcException (argon-test: panic! (the
'impossible' happened)
(GHC version 7.8.4 for x86_64-unknown-linux):
Evaluated the place holder for a PostTcType
Please report this as a GHC bug:
http://www.haskell.org/ghc/reportabug
)
}}}
The responsible module is
[https://github.com/rubik/argon/blob/ghc-7.8/src/Argon/Visitor.hs]
and in particular (I think):
{{{
visitExp :: Exp -> Int
visitExp (GHC.HsIf {}) = 1
visitExp (GHC.HsMultiIf _ alts) = length alts - 1
visitExp (GHC.HsLamCase _ alts) = length (GHC.mg_alts alts) - 1
visitExp (GHC.HsCase _ alts) = length (GHC.mg_alts alts) - 1
visitExp _ = 0
visitOp :: Exp -> Int
visitOp (GHC.OpApp _ (GHC.L _ (GHC.HsVar op)) _ _) =
case getName op of
"||" -> 1
"&&" -> 1
_ -> 0
visitOp _ = 0
}}}
somehow, even if I use wildcards, the first arguments of the type
constructors gets evaluated and since it's undefined GHC crashes.
What am I supposed to do?
The documentation does not say anything on the matter.
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11027#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list