fix(library/init/control/combinators): [inline] ==> [macro_inline]

This commit is contained in:
Leonardo de Moura 2018-09-26 09:08:06 -07:00
parent b324aa4b33
commit 938c8dae83

View file

@ -54,14 +54,14 @@ def list.mforall {m : Type → Type u} [monad m] {α : Type v} (f : α → m boo
| [] := pure tt
| (a::as) := do b ← f a, if b then list.mforall as else pure ff
@[inline] def when {m : Type → Type u} [monad m] (c : Prop) [h : decidable c] (t : m unit) : m unit :=
@[macro_inline] def when {m : Type → Type u} [monad m] (c : Prop) [h : decidable c] (t : m unit) : m unit :=
if c then t else pure ()
@[inline] def unless {m : Type → Type u} [monad m] (c : Prop) [h : decidable c] (e : m unit) : m unit :=
@[macro_inline] def unless {m : Type → Type u} [monad m] (c : Prop) [h : decidable c] (e : m unit) : m unit :=
if c then pure () else e
def mcond {m : Type → Type u} [monad m] {α : Type} (mbool : m bool) (tm fm : m α) : m α :=
@[macro_inline] def mcond {m : Type → Type u} [monad m] {α : Type} (mbool : m bool) (tm fm : m α) : m α :=
do b ← mbool, cond b tm fm
def mwhen {m : Type → Type u} [monad m] (c : m bool) (t : m unit) : m unit :=
@[macro_inline] def mwhen {m : Type → Type u} [monad m] (c : m bool) (t : m unit) : m unit :=
mcond c t (pure ())