mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-09-21 02:48:14 +03:00
d965cb44ae
Fixes #1608.
25 lines
398 B
Plaintext
25 lines
398 B
Plaintext
enum Maybe a = Nothing | Just a
|
|
|
|
maybeMapBad1 : {a, b} (a -> b) -> Maybe a -> Maybe b
|
|
maybeMapBad1 f m =
|
|
case m of
|
|
Just x -> Just (f x)
|
|
|
|
maybeMapBad2 : {a, b} (a -> b) -> Maybe a -> Maybe b
|
|
maybeMapBad2 f m =
|
|
case m of
|
|
Nothing -> Nothing
|
|
|
|
enum Foo = A | B | C
|
|
|
|
fooBad1 : Foo -> ()
|
|
fooBad1 f =
|
|
case f of
|
|
A -> ()
|
|
|
|
fooGood : Foo -> ()
|
|
fooGood f =
|
|
case f of
|
|
A -> ()
|
|
_ -> ()
|