                            , 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
-                         }
+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


{#enum TypeTag {} deriving (Show, Eq) #}
{#enum ValueTag {underscoreToCase} deriving (Show, Eq) #}

data CModule
{#pointer *CModule as ModulePtr -> CModule #}

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