summaryrefslogtreecommitdiff
path: root/src/Language/Tag.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2024-09-06 10:55:12 +0200
committerTom Smeding <tom@tomsmeding.com>2024-09-06 10:55:46 +0200
commit0f94ac819d664b0c1f8feaf567648a3724b5eadb (patch)
treef4595bc2770b7c7423fe01e23a3d6842f580ce0b /src/Language/Tag.hs
parent393592e7c180415c8e4c45523c0cf0904fa7b7c1 (diff)
Named source language
Diffstat (limited to 'src/Language/Tag.hs')
-rw-r--r--src/Language/Tag.hs22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/Language/Tag.hs b/src/Language/Tag.hs
deleted file mode 100644
index 9356073..0000000
--- a/src/Language/Tag.hs
+++ /dev/null
@@ -1,22 +0,0 @@
-{-# LANGUAGE BangPatterns #-}
-module Language.Tag (
- Tag(..), genTag,
-) where
-
-import Data.IORef
-import System.IO.Unsafe
-
-import AST
-
-
-data Tag t = Tag (STy t) Int
- deriving (Show)
-
-{-# NOINLINE tagCounter #-}
-tagCounter :: IORef Int
-tagCounter = unsafePerformIO $ newIORef 1
-
-{-# NOINLINE genTag #-}
-genTag :: handle -> STy t -> Tag t
-genTag !_ ty =
- unsafePerformIO $ Tag ty <$> atomicModifyIORef' tagCounter (\i -> (succ i, i))