GithubHelp home page GithubHelp logo

rhombus_dyn's Introduction

Dynamic Annotation for Rhombus

SYNOPSIS

Adds a Dyn annotation that selectively removes static information. Makes Static Rhombus a gradually typed language.

#lang rhombus/static

import:
  rhombus_dyn open

fun get_len(lst :: Dyn):
  lst.length()

DESCRIPTION

This is a little research proof-of-concept to see how far we can push Rhombus's macro and static information system. This is not intended for serious production use.

INSTALLATION

This package is not in the Racket/Rhombus package repository. Therefore, the easiest way to install this package is to clone the repository and install it directly with raco from the command line like so:

git clone https://github.com/ashton314/rhombus_dyn.git
cd rhombus_dyn
raco pkg install

LICENSE

MIT

BUGS

Feel free to report bugs here on GitHub. No promises on whether or not I'll look at them—this is a research POC and not intended for any production usage.

AUTHORS

rhombus_dyn's People

Contributors

ashton314 avatar

Watchers

 avatar  avatar

rhombus_dyn's Issues

Shplait fails to compile when using Dyn annotations

Error output:

raco make -v -l shplait
  making #
function call: not a function
  given: TVar('? a', #false, #false)
  compilation context...:
   /Users/ashton/Projects/shplait/private/eager_lib.rhm
  context...:
   .../private/macro-rhs.rkt:112:43
   .../private/parse-interp.rkt:643:50
   /Users/ashton/Projects/rhombus-prototype/rhombus/private/space-meta-macro.rkt:251:7
   /Users/ashton/Projects/rhombus-prototype/enforest/operator.rkt:238:3
   /Users/ashton/Projects/rhombus-prototype/enforest/main.rkt:245:8: dispatch-prefix-operator
   /Users/ashton/Projects/rhombus-prototype/enforest/main.rkt:175:2
   .../private/parse-classic.rkt:75:7: parse-:base81
   /Users/ashton/Projects/rhombus-prototype/rhombus/private/space-meta-macro.rkt:251:7
   /Users/ashton/Projects/rhombus-prototype/enforest/operator.rkt:238:3
   /Users/ashton/Projects/rhombus-prototype/enforest/main.rkt:245:8: dispatch-prefix-operator
   /Users/ashton/Projects/rhombus-prototype/enforest/main.rkt:175:2
   .../private/parse-classic.rkt:75:7: parse-:base81
   /Users/ashton/Projects/shplait/private/fun.rhm:36:2: parse_function_type
   .../private/parse-interp.rkt:643:50
   /Users/ashton/Projects/rhombus-prototype/enforest/transformer.rkt:120:3
   .../private/parse-classic.rkt:337:26
   ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.