When wxHaskell is compiled with GHC 7.8.3, the following warning is given:
[10 of 23] Compiling Graphics.UI.WXCore.WxcDefs ( src\haskell\Graphics\UI\WXCore\WxcDefs.hs, dist\build\Graphics\UI\WXCore\WxcDefs.o ) src\haskell\Graphics\UI\WXCore\WxcDefs.hs:3437:13: Warning: Literal 2147483648 is out of the Int range -2147483648..2147483647
The offending part in the source file:
wxVSCROLL :: Int wxVSCROLL = 0x80000000
The constant is handled as if it were a negative number, therefore, you cannot add this to other flags, as is done in two sample programs:
>Findstr /s /c:"wxVSCROLL" *.hs *.lhs samples\wxcore\ImageViewer.hs: s <- scrolledWindowCreate f idAny rectNull (wxHSCROLL + wxVSCROLL + wxNO_FULL_REPAINT_ON_RESIZE + wxCLIP_CHILDREN) samples\wxcore\Paint.hs: s <- scrolledWindowCreate f idAny rectNull (wxHSCROLL + wxVSCROLL + wxNO_FULL_REPAINT_ON_RESIZE + wxCLIP_CHILDREN)
One solution, is to change the type of the constants to Word32 (from Data.Word) (this is lot of work, as lot of function types have to change), another is to never use + to combine flags, but .|. (from Data.Bits).
Log in to post a comment.