Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax overhaul #n #78

Open
9 of 18 tasks
nilern opened this issue Sep 13, 2020 · 0 comments
Open
9 of 18 tasks

Syntax overhaul #n #78

nilern opened this issue Sep 13, 2020 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@nilern
Copy link
Member

nilern commented Sep 13, 2020

  • (1, 2) -- (unboxed) tuple
  • (1, 2).0 -- get tuple element
  • (:int, {:}) -- tuple type
  • {foo = bar; baz} -- record
  • {foo = bar; baz}.foo -- get record field
  • {:foo : int; bar : (:)} -- record type
  • #foo -- lens for .foo
  • %Foo -- prism for Foo polymorphic variant
  • 'Foo bar -- review (preview in patterns)
  • '%Foo bar -- (p)review Foo polymorphic variant
  • [|Foo : int | Bar : (:)] -- polymorphic variant type
  • (|Foo : int | Bar : (:)) -- row type
  • [1, 2] -- array
  • array int -- array type
  • {| a, b, c ? g : c -> b, f : a -> b |-> {|x|-> f (g x)}} -- function
  • {|-> print "foo"} -- thunk
  • foo bar baz = foo (bar, baz) -- call
  • foo () -- force thunk
@nilern nilern added the enhancement New feature or request label Sep 13, 2020
@nilern nilern added this to the MVP milestone Sep 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant