haskell - Is it possible to use irrefutable tilde (`~`) patterns in lambda expressions? -
The GHC gives me a You have to add a location between Lambda and Tilde code> \ ~ is parsed as the beginning of the lambda expression instead of being parsed: parse error on the input <~ if I type the pattern of lambda expression to tilde As I can do the designated work
step = \ ~ (X, S) -> gt; Run (fx) s - pars error ~ (x, s) = run (fx) s - works fine
\ ~ (x, s) - & gt; The source of confusion is because the
\ and
~ are both valid characters for the user defined operator, so
- Define the definition of a custom operator is allowed: a \ ~ B = {- ... -}
Comments
Post a Comment