Git Product home page Git Product logo

elm-type-inference's People

Contributors

emilyhorsman avatar

Watchers

 avatar  avatar  avatar

elm-type-inference's Issues

Function application and separation of terms and expressions(?)

Right now function application is fairly naive: FunctionApplication String [Expression].

We want to allow things like this:

f a = a + 1

f 1 + 2   -- Yields 4

But we don't want to allow things like this:

f if True then a else b

However this is fine:

f (if True then a else b)

Essentially, function application is an operator that does not bind as tightly something like an arithmetic binary operator.

Handle Unicode code point escaping in parser

From elm repl:

> '\a'
-- PARSE ERROR ------------------------------------------------------------- elm

Backslashes always start escaped characters, but I do not recognize this one:

4|   '\a'
      ^
Maybe there is some typo?

Hint: Valid escape characters include:

    \n
    \r
    \t
    \"
    \'
    \\
    \u{03BB}

The last one lets encode ANY character by its Unicode code point, so use that
for anything outside the ordinary six.
>

Handle row polymorphism for records

e.g.,

import Html exposing (..)


type alias State a =
    { a | count: Int }

type alias MoreState =
    State { test: Int }

increment : State a -> State a
increment s = { s | count = s.count + 1 }

state : MoreState
state =
    { count = 0
    , test = 1
    }
    |> increment
    |> increment

main = text (String.fromInt state.count)

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.