Skip to content

Commit

Permalink
[ re agda#357 ] Wrap result of guard in Erase
Browse files Browse the repository at this point in the history
  • Loading branch information
jespercockx committed Sep 12, 2024
1 parent ffae44a commit 1f9ade6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Haskell/Control/Monad.agda
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ open import Haskell.Prim
open import Haskell.Prim.Bool
open import Haskell.Prim.Monad
open import Haskell.Prim.String
open import Haskell.Extra.Erase

guard : {{ MonadFail m }} (b : Bool) m (b ≡ True)
guard True = return refl
guard : {{ MonadFail m }} (b : Bool) m (Erase (b ≡ True))
guard True = return (Erased refl)
guard False = fail "Guard was not True"

0 comments on commit 1f9ade6

Please sign in to comment.