Commit ee63cf34 authored by Tim Steenvoorden's avatar Tim Steenvoorden
Browse files

add impossible to Data.Function

parent 24fccdb7
......@@ -39,13 +39,14 @@ flip f :== g
where g b a = f a b
// curry :: ((a, b) -> c) a b -> c
curry f a b :== f (a, b)
curry f a b :== f (a,b)
// uncurry :: (a b -> c) (a,b) -> c
uncurry f (a, b) :== f a b
uncurry f (a,b) :== f a b
(`on`) infixl 0 //:: (b b -> c) (a -> b) a a -> c
(`on`) g f :== \x y -> g (f x) (f y)
abort :: !String -> .a
undefined :: .a
impossible :: .a
......@@ -9,4 +9,7 @@ abort s = code inline {
}
undefined :: .a
undefined = abort "Run-time error! Program evaluated undefined value!"
undefined = abort "Run-time error! Program evaluated an undefined value!"
impossible :: .a
impossible = abort "Run-time error! Program reached an impossible branch!"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment