halma/src/Game/Halma/Rules.hs
Use lambda-case Open
Open
A.withText "MoveRestriction" $ \text ->
case text of
"allowed" -> pure Allowed
"temporarily" -> pure Temporarily
"forbidden" -> pure Forbidden
- Read upRead up
- Exclude checks
Found
\ text ->
case text of
"allowed" -> pure Allowed
"temporarily" -> pure Temporarily
"forbidden" -> pure Forbidden
_ -> fail "expected 'allowed', 'temporarily' or 'forbidden'"
Perhaps
\case
"allowed" -> pure Allowed
"temporarily" -> pure Temporarily
"forbidden" -> pure Forbidden
_ -> fail "expected 'allowed', 'temporarily' or 'forbidden'"
Applying this change:
- may require
{-# LANGUAGE LambdaCase #-}
adding to the top of the file