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
Here's an example of a non-exhaustive pattern in Moscow ML:
- fun foo (x::xs) = xs;
! Toplevel input:
! fun foo (x::xs) = xs;
! ^^^^^^^^^^^^^^^^
! Warning: pattern matching is not exhaustive
Here's an example of the same non-exhaustive pattern in OCaml:
# let foo (x::xs) = xs;;
Warning P: this pattern-matching is not exhaustive.
Here is an example of a value that is not matched:
[]
val foo : 'a list -> 'a list = <fun>
It'd be quite nice if Moscow ML, similarily to this, gave an example of an unmatched pattern.
The text was updated successfully, but these errors were encountered:
I agree that this would be a nice feature to add, but I'm not sure how hard is to implement. Moscow ML has at least some of the needed machinery in place.
Here's an example of a non-exhaustive pattern in Moscow ML:
Here's an example of the same non-exhaustive pattern in OCaml:
It'd be quite nice if Moscow ML, similarily to this, gave an example of an unmatched pattern.
The text was updated successfully, but these errors were encountered: