rename Error.inj to one
This commit is contained in:
parent
9bd02d185a
commit
bc3230e000
1 changed files with 3 additions and 3 deletions
|
@ -36,8 +36,8 @@ Uninhabited (OneOf []) where uninhabited x = uninhabited x.elem
|
||||||
|
|
||||||
|
|
||||||
export %inline
|
export %inline
|
||||||
inj : ty `Elem` tys => ty -> OneOf tys
|
one : type `Elem` types => type -> OneOf types
|
||||||
inj @{elem} value = One {elem, value}
|
one @{elem} value = One {elem, value}
|
||||||
|
|
||||||
||| `All p types` computes a constraint for `p a` for each `a` in `types`
|
||| `All p types` computes a constraint for `p a` for each `a` in `types`
|
||||||
public export
|
public export
|
||||||
|
@ -189,7 +189,7 @@ implementation
|
||||||
(Monad m, err `Elem` errs) =>
|
(Monad m, err `Elem` errs) =>
|
||||||
MonadThrow err (ErrorT errs m)
|
MonadThrow err (ErrorT errs m)
|
||||||
where
|
where
|
||||||
throw = MkErrorT . pure . Left . inj
|
throw = MkErrorT . pure . Left . one
|
||||||
|
|
||||||
export %inline
|
export %inline
|
||||||
implementation
|
implementation
|
||||||
|
|
Loading…
Reference in a new issue