mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-20 18:21:47 +03:00
a972778eab
They don't all pass yet, for minor reasons. Coming shortly... Unfortunately the startup overhead for chez is really noticeable here!
17 lines
508 B
Idris
17 lines
508 B
Idris
public export
|
|
interface Do (m : Type) where
|
|
Next : m -> Type
|
|
bind : (x : m) -> Next x
|
|
|
|
-- Test that the implicits don't turn into as patterns on the LHS - they
|
|
-- shouldn't, because the elaborator hasn't got that far yet
|
|
foom : Int -> {a, b : Type} -> (a -> b) -> a -> b
|
|
foom = ?thurlingdrome
|
|
|
|
-- Similarly, for bind (we can't just implement it as >>= because of where
|
|
-- the implicits end up...)
|
|
public export
|
|
Monad m => Do (m a) where
|
|
Next x = {b : Type} -> (a -> m b) -> m b
|
|
bind = ?oops -- (>>=)
|