diff options
author | Eduardo Julian | 2018-12-26 22:32:02 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-12-26 22:32:02 -0400 |
commit | 3af5ca67fc47c6a5559595d8b890df64c55c27a6 (patch) | |
tree | d73953bc6bc6284670982a543cd9946317be2867 | |
parent | 9f32b3c3c1095e8e80b521a6aaf160305854ff19 (diff) |
Small refactoring for JVM names.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/host/jvm.lux | 6 | ||||
-rw-r--r-- | stdlib/source/lux/host/jvm/name.lux | 12 |
2 files changed, 10 insertions, 8 deletions
diff --git a/stdlib/source/lux/host/jvm.lux b/stdlib/source/lux/host/jvm.lux index 388c5cb04..cc2216502 100644 --- a/stdlib/source/lux/host/jvm.lux +++ b/stdlib/source/lux/host/jvm.lux @@ -1,5 +1,5 @@ (.module: - [lux (#- Name) + [lux #* [data [format ["." binary (#+ Format)]] @@ -8,7 +8,7 @@ ["." row (#+ Row)]]]] [/ ["/." version (#+ Version Minor Major)] - ["/." name (#+ Name)] + ["/." name (#+ Internal)] [modifier ["/.M" class]] ["/." magic (#+ Magic)] @@ -45,7 +45,7 @@ (def: default-minor-version Minor (/version.version 0)) (def: #export (class version access super this interfaces) - (-> Major /classM.Modifier Name Name (List Name) Class) + (-> Major /classM.Modifier Internal Internal (List Internal) Class) (let [with-classes (: (-> Pool Pool) (|>> (row.add (#/constant.UTF8 (/name.read this))) (row.add (#/constant.Class (/index.index 1))) diff --git a/stdlib/source/lux/host/jvm/name.lux b/stdlib/source/lux/host/jvm/name.lux index d609b627d..7f2119bc0 100644 --- a/stdlib/source/lux/host/jvm/name.lux +++ b/stdlib/source/lux/host/jvm/name.lux @@ -1,5 +1,5 @@ (.module: - [lux (#- Name) + [lux #* [data ["." text]] [type @@ -8,23 +8,25 @@ (def: #export internal-separator "/") (def: #export external-separator ".") -(abstract: #export Name +(type: #export External Text) + +(abstract: #export Internal {} Text (def: #export internal - (-> Text Name) + (-> Text Internal) (|>> (text.replace-all ..external-separator ..internal-separator) :abstraction)) (def: #export read - (-> Name Text) + (-> Internal Text) (|>> :representation)) (def: #export external - (-> Name Text) + (-> Internal External) (|>> :representation (text.replace-all ..internal-separator ..external-separator)))) |