Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit e533091

Browse files
committed
🔥 Gensym.
1 parent cda5e3d commit e533091

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

semantic-core/src/Data/Name.hs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,12 @@ module Data.Name
1111
, isSimpleCharacter
1212
, needsQuotation
1313
, encloseIf
14-
, Gensym(..)
1514
) where
1615

1716
import qualified Data.Char as Char
1817
import Data.HashSet (HashSet)
1918
import qualified Data.HashSet as HashSet
20-
import Data.Stack
2119
import Data.Text as Text (Text, any, unpack)
22-
import Data.Text.Prettyprint.Doc (Pretty (..))
2320

2421
-- | User-specified and -relevant names.
2522
type User = Text
@@ -69,12 +66,3 @@ isSimpleCharacter = \case
6966
'_' -> True
7067
'?' -> True -- common in Ruby
7168
c -> Char.isAlphaNum c
72-
73-
74-
data Gensym = Gensym (Stack Text) Int
75-
deriving (Eq, Ord, Show)
76-
77-
instance Pretty Gensym where
78-
pretty (Gensym _ i) = pretty (alphabet !! r : if q > 0 then show q else "")
79-
where (q, r) = i `divMod` 26
80-
alphabet = ['a'..'z']

0 commit comments

Comments
 (0)