on master help sign in
Properly carry module uses through Result.andThen
commit357dedf533a66a2cedc229a27e299add803805b8 authorEvan Czaplicki <info@elm-lang.org> dateMon 4 May 2015, 08:39 (12 years ago) parentee3b209
1 file changed+3−1
src/Transform/Canonicalize/Result.hs+3−1
src/Transform/Canonicalize/Result.hs+3−1
@@ -58,7 +58,9 @@ andThen (Result uses rawResult) callback =
5858 Result uses (Err msg)
5959
6060 Ok value ->
61− callback value
61+ let (Result uses' rawResult') = callback value
62+ in
63+ Result (Set.union uses uses') rawResult'
6264
6365
6466instance F.Functor (Result e) where