diff options
author | Greg Brown <greg.brown@cl.cam.ac.uk> | 2021-12-20 17:45:17 +0000 |
---|---|---|
committer | Greg Brown <greg.brown@cl.cam.ac.uk> | 2021-12-20 17:50:58 +0000 |
commit | d06b8c0a651f101a03ac2efca7cbc3cad0f4496f (patch) | |
tree | 7204170f8d7e22ed0bc3c8a56774919d159edd80 /src/Helium/Semantics/Denotational/Core.agda | |
parent | e32ce3737798d4519c5497c36e912e92d60bd36b (diff) |
Inline and rearrange to make vadd and vhsub look more similar.
If there are other functions with a similar structure, I may extract larger
patterns. copy-masked is one example of a structure that was easy to extract.
Diffstat (limited to 'src/Helium/Semantics/Denotational/Core.agda')
-rw-r--r-- | src/Helium/Semantics/Denotational/Core.agda | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Helium/Semantics/Denotational/Core.agda b/src/Helium/Semantics/Denotational/Core.agda index bf5f20f..8c1e231 100644 --- a/src/Helium/Semantics/Denotational/Core.agda +++ b/src/Helium/Semantics/Denotational/Core.agda @@ -102,6 +102,9 @@ infixr 9 _∙_ skip : ∀ {n ls} {Γ : Sets n ls} → Statement n Γ τ skip cont = cont +ignore : ∀ {n ls} {Γ : Sets n ls} → Expr n Γ τ → Statement n Γ τ′ +ignore e cont σ ρ = e σ ρ >>= λ (σ , _) → cont σ ρ + return : ∀ {n ls} {Γ : Sets n ls} → Expr n Γ τ → Statement n Γ τ return e _ = e |