 
 -- | Parse the named file into an FFI-friendly representation of an
 -- LLVM module.
-{#fun marshalLLVM { `String' } -> `ModulePtr' id #}
+{#fun marshalLLVM { `String', fromBool `Bool' } -> `ModulePtr' id #}
 
 -- | Free all of the resources allocated by 'marshalLLVM'
 {#fun disposeCModule { id `ModulePtr' } -> `()' #}

import Data.Array.Storable
import Data.ByteString.Char8 ( ByteString )
import qualified Data.ByteString.Char8 as BS
import Data.Int
import Data.IORef
import Data.Map ( Map )

                           , visitedTypes :: Set IntPtr
                           , localId :: Int
                           , constantTranslationDepth :: Int
                           , stringCache :: Map ByteString ByteString
                           }
emptyState :: IORef Int -> IORef Int -> KnotState
emptyState r1 r2 =
  KnotState { valueMap = M.empty
            , typeMap = M.empty
            , idSrc = r1
            , typeIdSrc = r2
            , result = Nothing
            , visitedTypes = S.empty
            , localId = 0
            , constantTranslationDepth = 0
            , stringCache = M.empty
            }

nextId :: KnotMonad Int
nextId = do
