initializeWorld = (\w -> do worldSetGravity w 0 (-1.0) 0 worldSetERP w 0.2 worldSetCFM w 1e-5 worldSetContactMaxCorrectingVel w 0.9 worldSetContactSurfaceLayer w 0.001 worldSetAutoDisableFlag w 1),
these worldSet* functions are unsafe FFI calls. initializeWorld is Ptr Int -> IO ()
commenting this prevents this bug. this code is found in a top level declaration:
initializeWorld = (\w -> do
--worldSetGravity w 0 (-1.0) 0
--worldSetERP w 0.2
--worldSetCFM w 1e-5
--worldSetContactMaxCorrectingVel w 0.9
worldSetContactSurfaceLayer w 0.001
), --worldSetAutoDisableFlag w 1),
--- now here is the:
ghc-6.6: panic! (the 'impossible' happened)
(GHC version 6.6 for i386-apple-darwin):
lookupDeprec base:GHC.Real.fromRational{v 01G}
-- Then change worldSetContactSurfaceLayer's second argument to 1.0 .... bug disappears.
Contains standalone compilable demonstrating issues with the above, the "impossible bug" which seems to relate to rational literals, has spread further from logic recently.
I've just compiled the file you sent (on Unix) with GHC 6.6, thus:
ghc --make -fno-implicit-prelude Level.hs
It worked fine. Can you help us reproduce this? Send the exact command line, and output you get. Pls start from a clean directory with precisely the download that you attached to this bug report.
Thanks
Simon
Ian Lynagh <igloo@earth.li>changed title from The impossible happened, code commented to [unreproducible] The impossible happened, code commented
changed title from The impossible happened, code commented to [unreproducible] The impossible happened, code commented