aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/lux/tool/compiler/reference.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/lux/tool/compiler/reference.lux')
-rw-r--r--stdlib/source/lux/tool/compiler/reference.lux84
1 files changed, 0 insertions, 84 deletions
diff --git a/stdlib/source/lux/tool/compiler/reference.lux b/stdlib/source/lux/tool/compiler/reference.lux
deleted file mode 100644
index 98a1f0c07..000000000
--- a/stdlib/source/lux/tool/compiler/reference.lux
+++ /dev/null
@@ -1,84 +0,0 @@
-(.module:
- [lux #*
- [abstract
- [equivalence (#+ Equivalence)]
- [hash (#+ Hash)]]
- [control
- [pipe (#+ case>)]]
- [data
- ["." name]
- [text
- ["%" format (#+ Format)]]]
- [math
- [number
- ["n" nat]]]]
- ["." / #_
- ["#." variable (#+ Variable)]])
-
-(type: #export Constant
- Name)
-
-(type: #export Reference
- (#Variable Variable)
- (#Constant Constant))
-
-(implementation: #export equivalence
- (Equivalence Reference)
-
- (def: (= reference sample)
- (case [reference sample]
- (^template [<tag> <equivalence>]
- [[(<tag> reference) (<tag> sample)]
- (\ <equivalence> = reference sample)])
- ([#Variable /variable.equivalence]
- [#Constant name.equivalence])
-
- _
- false)))
-
-(implementation: #export hash
- (Hash Reference)
-
- (def: &equivalence
- ..equivalence)
-
- (def: (hash value)
- (case value
- (^template [<factor> <tag> <hash>]
- [(<tag> value)
- ($_ n.* <factor>
- (\ <hash> hash value))])
- ([2 #Variable /variable.hash]
- [3 #Constant name.hash])
- )))
-
-(template [<name> <family> <tag>]
- [(template: #export (<name> content)
- (<| <family>
- <tag>
- content))]
-
- [local #..Variable #/variable.Local]
- [foreign #..Variable #/variable.Foreign]
- )
-
-(template [<name> <tag>]
- [(template: #export (<name> content)
- (<| <tag>
- content))]
-
- [variable #..Variable]
- [constant #..Constant]
- )
-
-(def: #export self
- Reference
- (..local 0))
-
-(def: #export format
- (Format Reference)
- (|>> (case> (#Variable variable)
- (/variable.format variable)
-
- (#Constant constant)
- (%.name constant))))