Replies: 3 comments 5 replies
-
-- RFC 1: What should "arg" match?
fst :: (a, b) -> a
fst tup@(x, y) = x
-- ^^^^^^^^^^ <- 🎉 the whole pattern
-- ^^^ <- 👀 only the name of the whole argument, if given
-- ^^^ ^ ^ <- 🚀 all names in the pattern |
Beta Was this translation helpful? Give feedback.
0 replies
-
-- RFC 2: What should "branch" match?
foo = bar
where
bar = 1
-- 🎉 `foo = bar` and `bar = 1`
-- 👀 `foo = bar where bar = 1`
-- 🚀 `foo = bar where bar = 1` and `bar = 1` |
Beta Was this translation helpful? Give feedback.
0 replies
-
-- RFC 3: What should "condition" match?
bap :: Int -> Int
bap | 1 == 1, 2 == 2 = x
-- 🎉 `1 == 1` and `2 == 2`
-- 👀 `1 == 1, 2 == 2` |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This discussion is for support of the Haskell programming language (#2178).
The top-level comments below are RFCs asking for feedback on what the correct behaviour is for Haskell.
Please use the emoji reactions—🎉, 👀, 🚀—to vote.
Beta Was this translation helpful? Give feedback.
All reactions