Skip to content

Instantly share code, notes, and snippets.

@notogawa
Created November 3, 2014 13:41
Show Gist options
  • Save notogawa/0618394f41d536c7f396 to your computer and use it in GitHub Desktop.
Save notogawa/0618394f41d536c7f396 to your computer and use it in GitHub Desktop.
open import Category.Monad
module DoLikeNotation {l M} (monad : RawMonad {l} M) where
open RawMonad monad
bind-syntax = _>>=_
syntax bind-syntax F (λ x → G) = ∣ x ← F ∣ G
test : {A B C : Set l} → M A → (A → M B) → (A → B → M C) → M C
test F G H = ∣ x ← F
∣ ∣ y ← G x
∣ ∣ y ← G x
∣ ∣ _ ← F
∣ H x y
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment