mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-11 05:34:11 +03:00
use new hosted module for benchmarks example
This commit is contained in:
parent
a32e0bbd4c
commit
db2d437d78
10
examples/benchmarks/platform/Effect.roc
Normal file
10
examples/benchmarks/platform/Effect.roc
Normal file
@ -0,0 +1,10 @@
|
||||
hosted Effect
|
||||
exposes [ Effect, after, map, always, forever, loop, putLine, putInt, getInt ]
|
||||
imports []
|
||||
generates Effect with [ after, map, always, forever, loop ]
|
||||
|
||||
putLine : Str -> Effect {}
|
||||
|
||||
putInt : I64 -> Effect {}
|
||||
|
||||
getInt : Effect { value : I64, errorCode : [ A, B ], isError : Bool }
|
@ -4,12 +4,7 @@ platform "folkertdev/foo"
|
||||
packages {}
|
||||
imports [ Task.{ Task } ]
|
||||
provides [ mainForHost ]
|
||||
effects fx.Effect
|
||||
{
|
||||
putLine : Str -> Effect {},
|
||||
putInt : I64 -> Effect {},
|
||||
getInt : Effect { value : I64, errorCode : [ A, B ], isError : Bool }
|
||||
}
|
||||
effects fx.Unused {}
|
||||
|
||||
mainForHost : Task {} [] as Fx
|
||||
mainForHost = main
|
||||
|
@ -1,6 +1,6 @@
|
||||
interface Task
|
||||
exposes [ Task, succeed, fail, after, map, putLine, putInt, getInt, forever, loop ]
|
||||
imports [ fx.Effect ]
|
||||
imports [ pf.Effect ]
|
||||
|
||||
Task ok err : Effect.Effect (Result ok err)
|
||||
|
||||
|
@ -4,7 +4,7 @@ platform "folkertdev/foo"
|
||||
packages {}
|
||||
imports [ pf.Effect ]
|
||||
provides [ mainForHost ]
|
||||
effects fx.Unused { }
|
||||
effects fx.Unused {}
|
||||
|
||||
mainForHost : Effect.Effect {} as Fx
|
||||
mainForHost = main
|
||||
|
Loading…
Reference in New Issue
Block a user