From: Jim Pryor Date: Sun, 20 Feb 2011 14:10:00 +0000 (-0500) Subject: monads.ml tweak X-Git-Url: http://lambda.jimpryor.net/git/gitweb.cgi?p=lambda.git;a=commitdiff_plain;h=ec3295573e97fa652e7f917c971d9023fbe0addc monads.ml tweak Signed-off-by: Jim Pryor --- diff --git a/code/monads.ml b/code/monads.ml index 8b69ec1d..10ef808e 100644 --- a/code/monads.ml +++ b/code/monads.ml @@ -55,9 +55,11 @@ * derived from) *) -exception Undefined (* Some library functions used below. *) + +exception Undefined + module Util = struct let fold_right = List.fold_right let map = List.map @@ -78,14 +80,13 @@ module Util = struct let undef = Obj.magic (fun () -> raise Undefined) end - - (* * This module contains factories that extend a base set of * monadic definitions with a larger family of standard derived values. *) module Monad = struct + (* * Signature extenders: * Make :: BASE -> S @@ -1037,6 +1038,7 @@ end = struct let distribute f t = mapT (fun a -> elevate (f a)) t zero plus let expose u = u end + end;;