mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 08:34:33 +00:00
32 lines
636 B
Text
32 lines
636 B
Text
app "primary"
|
|
packages { blah: "./blah" }
|
|
imports [ Dep1, Dep2.{ two, foo }, Dep3.Blah.{ bar }, Res ]
|
|
provides [ blah2, blah3, str, alwaysThree, identity, z, w, succeed, withDefault, yay ] to blah
|
|
|
|
blah2 = Dep2.two
|
|
blah3 = bar
|
|
|
|
str = Dep1.str
|
|
|
|
# alwaysThree = \_ -> Dep1.three # TODO FIXME for some reason this infers as a circular type
|
|
alwaysThree = \_ -> "foo"
|
|
|
|
identity = \a -> a
|
|
|
|
z = identity (alwaysThree {})
|
|
|
|
w : Dep1.Identity {}
|
|
w = Identity {}
|
|
|
|
succeed : a -> Dep1.Identity a
|
|
succeed = \x -> Identity x
|
|
|
|
withDefault = Res.withDefault
|
|
|
|
yay : Res.Res {} err
|
|
yay =
|
|
ok = Ok "foo"
|
|
|
|
f = \_ -> {}
|
|
|
|
Res.map ok f
|