mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-26 21:23:53 +03:00
a972778eab
They don't all pass yet, for minor reasons. Coming shortly... Unfortunately the startup overhead for chez is really noticeable here!
16 lines
314 B
Idris
16 lines
314 B
Idris
export
|
|
record Core t where
|
|
constructor MkCore
|
|
runCore : IO (Either String t)
|
|
|
|
pure : a -> Core a
|
|
pure x = MkCore (pure (pure x))
|
|
|
|
export
|
|
(<*>) : Core (a -> b) -> Core a -> Core b
|
|
(<*>) (MkCore f) (MkCore a) = MkCore [| f `Prelude.(<*>)` a |]
|
|
|
|
addm : Maybe Int -> Maybe Int -> Maybe Int
|
|
addm x y = [| x + y |]
|
|
|