Skip to content

Conversation

AlexKnauth
Copy link
Contributor

@AlexKnauth AlexKnauth commented Jun 27, 2018

This pull request adds the form, which behaves like the : form in Typed Racket, or like the declaration variant of the :: form in Haskell. A Program like

(⋮ x τ)
(def x e)

is like this Haskell program,

x :: τ
x = e

which defines x with type τ to be equal to the value produced by e. It typechecks e with τ as the expected type just like if you wrote (def x : τ e).

This is similar to #74, but uses a different name so that : can be the expression variant even in "ambiguous" positions such as the REPL.

@AlexKnauth
Copy link
Contributor Author

Closing in favor of #86.

@AlexKnauth AlexKnauth closed this Jul 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant