@@ -39,9 +39,9 @@ choose False = Right oh
39||| @ f the action to take on Left
39||| @ f the action to take on Left
40||| @ g the action to take on Right
40||| @ g the action to take on Right
41||| @ e the sum to analyze
41||| @ e the sum to analyze
42−either : (f : a -> c) -> (g : b -> c) -> (e : Either a b) -> c
42+either : (f : Lazy (a -> c)) -> (g : Lazy (b -> c)) -> (e : Either a b) -> c
43−either l r (Left x) = l x
43+either l r (Left x) = (Force l) x
44−either l r (Right x) = r x
44+either l r (Right x) = (Force r) x
46||| Keep the payloads of all Left constructors in a list of Eithers
46||| Keep the payloads of all Left constructors in a list of Eithers
47lefts : List (Either a b) -> List a
47lefts : List (Either a b) -> List a
@@ -74,7 +74,7 @@ fromEither (Right r) = r
75||| Convert a Maybe to an Either by using a default value in case of Nothing
75||| Convert a Maybe to an Either by using a default value in case of Nothing
76||| @ e the default value
76||| @ e the default value
77−maybeToEither : (def : e) -> Maybe a -> Either e a
77+maybeToEither : (def : Lazy e) -> Maybe a -> Either e a
78maybeToEither def (Just j) = Right j
78maybeToEither def (Just j) = Right j
79maybeToEither def Nothing = Left def
79maybeToEither def Nothing = Left def