@@ -20,9 +20,10 @@ import System.IO
20import System.Directory
20import System.Directory
22idrNamespace :: String
22idrNamespace :: String
23−idrNamespace = "__IDR__"
23+idrNamespace = "__IDR__"
24−idrRTNamespace = "__IDRRT__"
24+idrRTNamespace = "__IDRRT__"
25−idrLTNamespace = "__IDRLT__"
25+idrLTNamespace = "__IDRLT__"
26+idrCTRNamespace = "__IDRCTR__"
28data JSTarget = Node | JavaScript deriving Eq
29data JSTarget = Node | JavaScript deriving Eq
@@ -564,14 +565,14 @@ initConstructors js =
565 replaceHelper :: [Int] -> JS -> JS
566 replaceHelper :: [Int] -> JS -> JS
566 replaceHelper tags (JSNew "__IDRRT__Con" [JSNum (JSInt tag), JSArray []])
567 replaceHelper tags (JSNew "__IDRRT__Con" [JSNum (JSInt tag), JSArray []])
567− | tag `elem` tags = JSIdent ("__IDRCTR__" ++ show tag)
568+ | tag `elem` tags = JSIdent (idrCTRNamespace ++ show tag)
569 replaceHelper tags js = transformJS (replaceHelper tags) js
570 replaceHelper tags js = transformJS (replaceHelper tags) js
572 createConstant :: Int -> JS
573 createConstant :: Int -> JS
573 createConstant tag =
574 createConstant tag =
574− JSAlloc ("__IDRCTR__" ++ show tag) (Just (
575+ JSAlloc (idrCTRNamespace ++ show tag) (Just (
575 JSNew (idrRTNamespace ++ "Con") [JSNum (JSInt tag), JSArray []]
576 JSNew (idrRTNamespace ++ "Con") [JSNum (JSInt tag), JSArray []]