[GHC] #1833: Haddock 2 can not process the base package with
HscTarget = HscNothing
GHC
trac at galois.com
Mon Nov 5 16:20:00 EST 2007
#1833: Haddock 2 can not process the base package with HscTarget = HscNothing
-----------------------+----------------------------------------------------
Reporter: guest | Owner:
Type: bug | Status: new
Priority: normal | Component: GHC API
Version: 6.8.1 | Severity: major
Keywords: | Testcase:
Architecture: x86 | Os: Linux
-----------------------+----------------------------------------------------
My guess is that this is a problem with the load function from the GHC
API.
When Haddock 2 has HscTarget set to HscNothing, running it on the base
package yields the following GHC error message:
{{{
Foreign/Storable.hs:158:58:
Couldn't match expected type `Integer' against inferred type `Int'
In the first argument of `(*)', namely `off'
In the second argument of `peekByteOff', namely
`(off * sizeOf undef)'
In the expression: peekByteOff ptr (off * sizeOf undef)
Foreign/Storable.hs:162:46:
Couldn't match expected type `Integer' against inferred type `Int'
In the first argument of `(*)', namely `off'
In the second argument of `pokeByteOff', namely
`(off * sizeOf val)'
In the expression: pokeByteOff ptr (off * sizeOf val) val
}}}
When HscTarget is set to HscAsm, the base package compiles fine using
Haddock 2.
This is the coded used to load files in Haddock 2, the same code that
produces the error message:
{{{
typecheckFiles session files = do
-- load all argument files
targets <- mapM (\f -> guessTarget f Nothing) files
setTargets session targets
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1833>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list