mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-23 11:43:08 +03:00
16 lines
317 B
Idris
16 lines
317 B
Idris
module Data.Linear.LEither
|
|
|
|
import Data.Linear.Notation
|
|
|
|
%default total
|
|
|
|
public export
|
|
data LEither : (a, b : Type) -> Type where
|
|
Left : a -@ LEither a b
|
|
Right : b -@ LEither a b
|
|
|
|
export
|
|
(Consumable a, Consumable b) => Consumable (LEither a b) where
|
|
consume (Left a) = consume a
|
|
consume (Right b) = consume b
|