2014-01-01 21:52:25 +00:00
|
|
|
Import Int.
|
|
|
|
Import Real.
|
2013-09-04 00:24:05 +00:00
|
|
|
Variable f : Int -> Int -> Int
|
|
|
|
Show forall a, f a a > 0
|
|
|
|
Show forall a b, f a b > 0
|
|
|
|
Variable g : Int -> Real -> Int
|
|
|
|
Show forall a b, g a b > 0
|
|
|
|
Show forall a b, g a (f a b) > 0
|
2013-12-19 05:18:45 +00:00
|
|
|
SetOption pp::coercion true
|
2013-09-04 00:24:05 +00:00
|
|
|
Show forall a b, g a (f a b) > 0
|
|
|
|
Show fun a, a + 1
|
|
|
|
Show fun a b, a + b
|
|
|
|
Show fun (a b) (c : Int), a + c + b
|
|
|
|
(*
|
|
|
|
The next example shows a limitation of the current elaborator.
|
|
|
|
The current elaborator resolves overloads before solving the implicit argument constraints.
|
|
|
|
So, it does not have enough information for deciding which overload to use.
|
|
|
|
*)
|
|
|
|
Show (fun a b, a + b) 10 20.
|
|
|
|
Variable x : Int
|
|
|
|
(* The following one works because the type of x is used to decide which + should be used *)
|
|
|
|
Show fun a b, a + x + b
|