From a51eadf7065db89ac9a65ee854f6f134c9f9da60 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 21 Aug 2019 22:05:16 -0400 Subject: A unified type module to tie together the different JVM kinds of type. --- documentation/research/debugging.md | 1 + documentation/research/machine_learning.md | 1 + stdlib/source/lux/target/jvm/type.lux | 416 +++++++++++++++-------------- 3 files changed, 211 insertions(+), 207 deletions(-) diff --git a/documentation/research/debugging.md b/documentation/research/debugging.md index 6b9671d47..239663175 100644 --- a/documentation/research/debugging.md +++ b/documentation/research/debugging.md @@ -1,5 +1,6 @@ # Tool +1. [Debug Adapter Protocol](https://microsoft.github.io/debug-adapter-protocol/) 1. https://github.com/srg-imperial/SaBRe 1. https://developer.mozilla.org/en-US/docs/Mozilla/Projects/WebReplay 1. https://umaar.github.io/performance-debugging-devtools-2018/#/ diff --git a/documentation/research/machine_learning.md b/documentation/research/machine_learning.md index 04df5bbc1..8e72ed079 100644 --- a/documentation/research/machine_learning.md +++ b/documentation/research/machine_learning.md @@ -24,6 +24,7 @@ # Deep learning +1. [Monadic Deep Learning: Performing monadic automatic differentiation in parallel](https://deeplearning.thoughtworks.school/assets/paper.pdf) 1. https://github.com/microsoft/tensorwatch 1. https://d2l.ai/ 1. https://hadrienj.github.io/posts/Deep-Learning-Book-Series-Introduction/ diff --git a/stdlib/source/lux/target/jvm/type.lux b/stdlib/source/lux/target/jvm/type.lux index a74fab40a..4a2260aef 100644 --- a/stdlib/source/lux/target/jvm/type.lux +++ b/stdlib/source/lux/target/jvm/type.lux @@ -12,214 +12,216 @@ ["." text ("#@." equivalence) ["%" format (#+ format)]] [collection - ["." list ("#@." functor)]]]] + ["." list ("#@." functor)]]] + [type + abstract]] ["." // #_ [encoding - ["#." name]]]) - -(template [ ] - [(def: #export )] - - ["V" void-descriptor] - ["Z" boolean-descriptor] - ["B" byte-descriptor] - ["S" short-descriptor] - ["I" int-descriptor] - ["J" long-descriptor] - ["F" float-descriptor] - ["D" double-descriptor] - ["C" char-descriptor] + ["#." name (#+ External)]]] + ["." / #_ + ["#." signature (#+ Signature)] + ["#." descriptor (#+ Descriptor)] + ["#." reflection (#+ Reflection)]]) + +(abstract: #export Void' {} Any) +(abstract: #export (Value' kind) {} Any) +(abstract: #export (Return' kind) {} Any) +(abstract: #export Method {} Any) + +(abstract: #export (Type brand) + {} + + [(Signature Any) (Descriptor Any) (Reflection Any)] + + (type: #export Return (<| Return' Any)) + (type: #export Value (<| Return' Value' Any)) + (type: #export Void (<| Return' Void')) + + (abstract: #export (Object' brand) {} Any) + (type: #export Object (<| Return' Value' Object' Any)) + + (abstract: #export (Parameter' brand) {} Any) + (type: #export Parameter (<| Return' Value' Object' Parameter' Any)) + + (template [ ] + [(with-expansions [ (template.identifier [ "'"])] + (abstract: #export {} Any) + (type: #export + (`` (<| Return' Value' (~~ (template.splice )) ))))] + + [[] Primitive] + [[Object' Parameter'] Class] + [[Object'] Array] + ) + + (template [