Code Monkey home page Code Monkey logo

hafly's Issues

Allow for `Dynamic`s to be displayed properly.

Currently, we have:

> [1,2,3,4.2]
[<<Int>>,<<Int>>,<<Int>>,<<Double>>]

whereas it would be nice if we had:

> [1, 2, 3, 4.2]
[1, 2, 3, 4.2]

Maybe the best approach for this would be to have the interpreter see if there is a show instance for each element of the list, and try to display it that way -- otherwise, falling-back to just displaying the type?

Implement record accessors.

We'll need some way to disambiguate these from function calls, maybe something like:

For an expression x.y:

  1. If x is a record, first check to see if it has any fields y. If so, use y as a record accessor for that field.
  2. Otherwise, check to see if there is a function y that could act on x.

Fix issues with currying

Currently, currying seems to be causing issues, e.x.

f = \x y -> x
g = f 2

> g 3
3 -- (expected 2)

Allow way of specifying variance of Haskell data types.

In order to properly act on Dynamic data with higher-order functions, we'll probably need to consider variance (e.x. implicitly lifting a [Int] to a [Dynamic]. We want this to be able to be specified for an arbitrary Haskell data type to keep things extensible.

This may also be relevant for features like functor/applicative/monad polymorphism. e.x. if f : Int -> Int and x: [Int], we could say f x, and have that automatically lifted to map f x. This I think is the general idea behind what I was thinking of as "reactive polymorphism".

Allow for user-defined multiple dispatch

Currently multiple dispatch only works on library-defined functions.

I believe one reason for this is that the user currently has no way of being able to specify type signatures.

We should probably make our type signatures mirror that of Haskell's.

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.