From bf84fa3eb63fad7f2360b863e7f26005ee2d5aa8 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Thu, 22 Aug 2019 22:21:59 -0400 Subject: Parser for JVM types. --- stdlib/source/lux/target/jvm/type.lux | 257 ++++++++++++++--------- stdlib/source/lux/target/jvm/type/descriptor.lux | 8 +- stdlib/source/lux/target/jvm/type/lux.lux | 16 +- stdlib/source/lux/target/jvm/type/reflection.lux | 16 +- stdlib/source/lux/target/jvm/type/signature.lux | 31 ++- 5 files changed, 196 insertions(+), 132 deletions(-) (limited to 'stdlib/source') diff --git a/stdlib/source/lux/target/jvm/type.lux b/stdlib/source/lux/target/jvm/type.lux index e28e9633a..83a9d017a 100644 --- a/stdlib/source/lux/target/jvm/type.lux +++ b/stdlib/source/lux/target/jvm/type.lux @@ -1,10 +1,11 @@ (.module: [lux (#- Type int char) [abstract - [equivalence (#+ Equivalence)]] + [equivalence (#+ Equivalence)] + [monad (#+ do)]] [control ["." function] - ["<>" parser + ["<>" parser ("#@." monad) ["" text (#+ Parser)]]] [data ["." product] @@ -24,14 +25,14 @@ ["#." descriptor (#+ Descriptor)] ["#." reflection (#+ Reflection)]]) -(abstract: #export (Type brand) +(abstract: #export (Type category) {} - [(Signature Any) (Descriptor Any) (Reflection Any)] + [(Signature category) (Descriptor category) (Reflection category)] (template [