refactor: move misc utilities to Util.Extra
This commit is contained in:
parent
b996117482
commit
052d6623f0
2 changed files with 15 additions and 7 deletions
|
|
@ -5,16 +5,10 @@ Authors: Mac Malone
|
|||
-/
|
||||
import Lake.Util.Task
|
||||
import Lake.Util.OptionIO
|
||||
import Lake.Util.Misc
|
||||
|
||||
namespace Lake
|
||||
|
||||
def liftOption [Alternative m] : Option α → m α
|
||||
| some a => pure a
|
||||
| none => failure
|
||||
|
||||
instance [MonadLift m n] : MonadLift (ReaderT ρ m) (ReaderT ρ n) where
|
||||
monadLift x := fun r => liftM <| x r
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
-- # Async / Await Abstraction
|
||||
--------------------------------------------------------------------------------
|
||||
|
|
|
|||
14
Lake/Util/Misc.lean
Normal file
14
Lake/Util/Misc.lean
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
/-
|
||||
Copyright (c) 2021 Mac Malone. All rights reserved.
|
||||
Released under Apache 2.0 license as described in the file LICENSE.
|
||||
Authors: Mac Malone
|
||||
-/
|
||||
|
||||
namespace Lake
|
||||
|
||||
def liftOption [Alternative m] : Option α → m α
|
||||
| some a => pure a
|
||||
| none => failure
|
||||
|
||||
instance [MonadLiftT m n] : MonadLiftT (ReaderT ρ m) (ReaderT ρ n) where
|
||||
monadLift x := fun r => liftM <| x r
|
||||
Loading…
Add table
Reference in a new issue