diff options
Diffstat (limited to 'fig-utils/src')
| -rw-r--r-- | fig-utils/src/Fig/Utils/FFI.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fig-utils/src/Fig/Utils/FFI.hs b/fig-utils/src/Fig/Utils/FFI.hs index b5ee80e..be5e612 100644 --- a/fig-utils/src/Fig/Utils/FFI.hs +++ b/fig-utils/src/Fig/Utils/FFI.hs @@ -9,8 +9,8 @@ import Foreign.Marshal.Alloc foreign import ccall "check_answer" c_check_answer :: Ptr CString -> CString -> CString -> IO Int -checkAnswer :: Text -> Text -> IO (Either Text Bool) -checkAnswer tcode tanswer = +checkAnswer :: MonadIO m => Text -> Text -> m (Either Text Bool) +checkAnswer tcode tanswer = liftIO $ withCString (unpack tcode) $ \code -> withCString (unpack tanswer) $ \answer -> alloca $ \rerr -> do |
