summaryrefslogtreecommitdiff
path: root/src/Data/Maybe
diff options
context:
space:
mode:
authorGreg Brown <greg.brown01@ed.ac.uk>2023-07-12 14:02:42 +0100
committerGreg Brown <greg.brown01@ed.ac.uk>2023-07-12 14:02:42 +0100
commitfd658831ab53f07969524fee0257d086d6f79f5a (patch)
treeb1861aa0f726f35a40ec0f5c0809a845b39c4361 /src/Data/Maybe
parent66658a7102c5761fe6e4cfc5058f2fdafaa71b36 (diff)
Prove unification correct.
Diffstat (limited to 'src/Data/Maybe')
-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