mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-11-24 06:52:19 +03:00
961a28ee64
Things like (,) () aren't straightforward IVar's but are IAlternative's which present options about how the term should resolve. [| |] was not accounting for this.
15 lines
313 B
Idris
15 lines
313 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 |]
|