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

Commit 467292d

Browse files
committed
🔥 Name.
1 parent 62c09c3 commit 467292d

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

semantic-core/src/Data/Name.hs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
module Data.Name
33
( User
44
, Namespaced
5-
, Name(..)
65
, Named(..)
76
, named
87
, named'
@@ -31,23 +30,6 @@ type User = Text
3130
-- This corresponds to the @Agent@ type synonym described in /I Am Not a Number—I Am a Free Variable/.
3231
type Namespaced a = Gensym -> a
3332

34-
data Name
35-
-- | A locally-bound, machine-generatable name.
36-
--
37-
-- This should be used for locals, function parameters, and similar names which can’t escape their defining scope.
38-
= Gen Gensym
39-
-- | A name provided by a user.
40-
--
41-
-- This should be used for names which the user provided and which other code (other functions, other modules, other packages) could call, e.g. declaration names.
42-
| User User
43-
deriving (Eq, Ord, Show)
44-
45-
instance Pretty Name where
46-
pretty = \case
47-
Gen p -> pretty p
48-
User n -> pretty n
49-
50-
5133
-- | Annotates an @a@ with a 'User'-provided name, which is ignored for '==' and 'compare'.
5234
data Named a = Named (Ignored User) a
5335
deriving (Eq, Foldable, Functor, Ord, Show, Traversable)

0 commit comments

Comments
 (0)