id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
1833,Haddock 2 can not process the base package with HscTarget = HscNothing,guest,,"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
}}}",bug,closed,normal,6.8.2,GHC API,6.8.1,fixed,,david.waern@…,Linux,x86,,Unknown,,,,
