summaryrefslogtreecommitdiff
path: root/src/Data/Maybe/Properties.idr
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/Maybe/Properties.idr')
-rw-r--r--src/Data/Maybe/Properties.idr5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Data/Maybe/Properties.idr b/src/Data/Maybe/Properties.idr
index 459cb8f..c9fea96 100644
--- a/src/Data/Maybe/Properties.idr
+++ b/src/Data/Maybe/Properties.idr
@@ -85,3 +85,8 @@ appNothingInverse :
Either (IsNothing f) (IsNothing x)
appNothingInverse Nothing x prf = Left ItIsNothing
appNothingInverse (Just f) Nothing prf = Right ItIsNothing
+
+%inline
+export
+bindNothing : {x : Maybe a} -> (0 ok : IsNothing x) -> (f : a -> Maybe b) -> IsNothing (x >>= f)
+bindNothing ItIsNothing f = ItIsNothing