Idris2-boot/tests/idris2/basic013/Implicits.idr
Michael Morgan e6121e0935 Remove trailing whitespace from Idris sources.
This is the result of running the command:

$ find . -name '*.idr' -type f -exec sed -i -E 's/\s+$//' {} +

I confirmed before running it that this would not affect any markdown
formatting in documentation comments.
2019-10-25 14:24:25 -07:00

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 -- (>>=)