#5659: hsc2hs should add explicit type annotations to peeks and pokes
------------------------------------------+---------------------------------
  Reporter:  ezyang                       |          Owner:                  
      Type:  bug                          |         Status:  closed          
  Priority:  normal                       |      Milestone:                  
 Component:  hsc2hs                       |        Version:  7.0.2           
Resolution:  wontfix                      |       Keywords:                  
  Testcase:                               |      Blockedby:                  
Difficulty:                               |             Os:  Unknown/Multiple
  Blocking:                               |   Architecture:  Unknown/Multiple
   Failure:  GHC accepts invalid program  |  
------------------------------------------+---------------------------------
Changes (by igloo):

  * status:  new => closed
  * resolution:  => wontfix


Comment:

 You mean the correct code is this, right?:
 {{{
   c_len   <- #{peek ZNotice_t, z_message_len}     c_note
   c_msg   <- #{peek ZNotice_t, z_message}         c_note
   message <- B.packCStringLen (c_msg, fromIntegral (c_len :: CInt))
 }}}

 I don't think there's anything we can do. You can `peek` anything that is
 `Storable`, and while that does have a `sizeof` method I don't see a
 reasonable way for `hsc2hs` to call it with the right type.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5659#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to