You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It turns out that you can change the meaning of _ # _ patterns by defining a function called splitAt in a where clause.
Cryptol> (\(x # y) -> (y, x)) (True, False) where splitAt a = a
[warning] at <interactive>:1:42--1:49
This binding for splitAt shadows the existing binding from
(at /var/folders/hf/g8kjlj3x4cz05819qsk684_c0000gp/T/Cryptol98291-0.cry:347:11--347:18, splitAt)
(False, True)
I don't think this is intentional. We should probably make it so that# patterns always mean the same thing.
This would probably be easier to fix if we do the NoPat pass after renaming, instead of before. (See #567.)
The text was updated successfully, but these errors were encountered:
It looks like the unary operators - and ~ are also rebindable:
Cryptol> - 0x4 where negate x = x
[warning] at <interactive>:1:13--1:19
This binding for negate shadows the existing binding from
(at /var/folders/hf/g8kjlj3x4cz05819qsk684_c0000gp/T/Cryptol99252-0.cry:103:11--103:17, negate)
0x4
Cryptol> ~ 0x4 where complement x = x
[warning] at <interactive>:1:13--1:23
This binding for complement shadows the existing binding from
(at /var/folders/hf/g8kjlj3x4cz05819qsk684_c0000gp/T/Cryptol99252-0.cry:109:11--109:21, complement)
0x4
It turns out that you can change the meaning of
_ # _
patterns by defining a function calledsplitAt
in awhere
clause.I don't think this is intentional. We should probably make it so that
#
patterns always mean the same thing.This would probably be easier to fix if we do the
NoPat
pass after renaming, instead of before. (See #567.)The text was updated successfully, but these errors were encountered: