-
-parseYesOrNo :: ArrowChoice a => a String Bool
-parseYesOrNo
- = proc str -> do case str of
- "yes" -> returnA -< True
- "no" -> returnA -< False
- _ -> returnA -< error ("Expected yes or no: " ++ str)
-
+parseYesOrNo ∷ (Eq s, Show s, IsString s, ArrowChoice (⇝)) ⇒ s ⇝ Bool
+parseYesOrNo
+ = proc str →
+ case str of
+ _ | str ≡ "yes" → returnA ⤙ True
+ | str ≡ "no" → returnA ⤙ False
+ | otherwise → returnA ⤙ error ("Expected yes or no: " ⊕ show str)