Idris2/tests/idris2/interface003/Do.idr
Edwin Brady a972778eab Add test script
They don't all pass yet, for minor reasons. Coming shortly...
Unfortunately the startup overhead for chez is really noticeable here!
2020-05-19 18:25:18 +01:00

13 lines
364 B
Idris

public export
interface Do (m : Type) where
Next : (a : Type) -> (b : Type) -> m -> Type
bind : (x : m) -> Next a b x
-- This won't actually achieve anything useful, but we're testing whether
-- it successfully typechecks and in the type of 'foo' we have the right 'a'
public export
Monad m => Do (m a) where
Next a b x = (a -> m b) -> m b
bind x = ?foo