[GHC] #1813: Strange type representation bug with phantom type
synonyms in interactive mode
GHC
trac at galois.com
Mon Oct 29 19:41:07 EDT 2007
#1813: Strange type representation bug with phantom type synonyms in interactive
mode
------------------------+---------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: GHCi | Version: 6.9
Severity: normal | Resolution:
Keywords: | Difficulty: Unknown
Os: Unknown | Testcase:
Architecture: Unknown |
------------------------+---------------------------------------------------
Comment (by guest):
I think it is an internal representation bug, because Template Haskell
also returns an incorrect reification
{{{
./ghc-inplace -fth --interactive /tmp/Phantom.hs
GHCi, version 6.9.20071025: http://www.haskell.org/ghc/ :? for help
Loading package base ... linking ... done.
[1 of 1] Compiling Phantom ( /tmp/Phantom.hs, interpreted )
Ok, modules loaded: Phantom.
*Phantom> :m +Language.Haskell.TH
*Phantom Language.Haskell.TH> $(do {i <- reify (mkName "f"); runIO $
putStrLn (pprint i);[| 1 |]})
Loading package array-0.1 ... linking ... done.
Loading package packedstring-0.1 ... linking ... done.
Loading package pretty-1.0 ... linking ... done.
Loading package containers-0.1 ... linking ... done.
Loading package template-haskell ... linking ... done.
Phantom.f :: Phantom.PhantomSyn GHC.Prim.Any -> GHC.Base.Int
Phantom.f :: Phantom.PhantomSyn GHC.Prim.Any -> GHC.Base.Int
Phantom.f :: Phantom.PhantomSyn GHC.Prim.Any -> GHC.Base.Int
Phantom.f :: Phantom.PhantomSyn GHC.Prim.Any -> GHC.Base.Int
1
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1813#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list