diff options
| author | Christopher Pulte | 2016-09-07 14:42:01 +0100 |
|---|---|---|
| committer | Christopher Pulte | 2016-09-07 14:42:01 +0100 |
| commit | c669e42539f4b26adc6458ed9293cc6469f87bc6 (patch) | |
| tree | c0f2ee8579c171efa922217a6bd872b729599750 /src/gen_lib/prompt.lem | |
| parent | 808b1b30bd82d0ca1d59159d496a49db7546e152 (diff) | |
push some lem pp changes
Diffstat (limited to 'src/gen_lib/prompt.lem')
| -rw-r--r-- | src/gen_lib/prompt.lem | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gen_lib/prompt.lem b/src/gen_lib/prompt.lem index 3efdd163..6fa406b8 100644 --- a/src/gen_lib/prompt.lem +++ b/src/gen_lib/prompt.lem @@ -136,6 +136,9 @@ let return a = Done a val (>>=) : forall 'a 'b. M 'a -> ('a -> M 'b) -> M 'b val (>>>) : forall 'a 'b 'c. ('a -> M 'b) -> ('b -> M 'c) -> ('a -> M 'c) +val (>>) : forall 'b. M unit -> (unit -> M 'b) -> M 'b +let (>>) m n = m >>= fun _ -> n + let rec (>>=) m f = match m with | Done a -> f a | Read_mem rk addr sz rs k -> Read_mem rk addr sz rs (fun v -> (k v) >>= f) @@ -153,8 +156,6 @@ let rec (>>=) m f = match m with val exit : forall 'a 'e. 'e -> M 'a let exit _ = Escape -let (>>) m n = m >>= fun _ -> n - val byte_chunks : forall 'a. nat -> list 'a -> list (list 'a) let rec byte_chunks n list = match (n,list) with | (0,_) -> [] |
