Syntax overhaul #n
nilern opened this issue · 0 comments
nilern commented
-
(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 forFoo
polymorphic variant -
'Foo bar
-- review (preview in patterns) -
'%Foo bar
-- (p)reviewFoo
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