From: Siraaj Khandkar Date: Wed, 25 Mar 2015 18:04:31 +0000 (-0400) Subject: Re-order exports to clearly show monad interface. X-Git-Tag: 2.5.0~1 X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=1c003d17c239bc4a83368139fc52371831c3a28d;p=hope.git Re-order exports to clearly show monad interface. --- diff --git a/src/hope_option.erl b/src/hope_option.erl index 7a87438..02ef2f3 100644 --- a/src/hope_option.erl +++ b/src/hope_option.erl @@ -7,13 +7,16 @@ ]). -export( - [ put/2 - , get/2 - , return/1 - , return/2 + % Generic monad interface + [ return/1 , map/2 - , iter/2 , pipe/2 + + % Specific to hope_option:t() + , return/2 + , put/2 + , get/2 + , iter/2 , of_result/1 , of_undefined/1 ]). diff --git a/src/hope_result.erl b/src/hope_result.erl index 0f9fb05..9d4235b 100644 --- a/src/hope_result.erl +++ b/src/hope_result.erl @@ -9,12 +9,15 @@ ]). -export( + % Generic monad interface [ return/1 - , map/2 % map/2 is alias for map_ok/2 + , map/2 % map/2 is alias for map_ok/2 + , pipe/2 + + % Specific to hope_result:t() , map_ok/2 , map_error/2 , tag_error/2 - , pipe/2 , lift_exn/1 , lift_exn/2 , lift_map_exn/3