ccfail001.hs:10:1: Unacceptable result type in foreign declaration: State# RealWorld When checking declaration: foreign import ccall safe "static foo" foo :: Int -> State# RealWorld