Skip to content

Commit

Permalink
Code for #581
Browse files Browse the repository at this point in the history
  • Loading branch information
s-zanella committed Jul 14, 2016
1 parent 005d5a6 commit 85a1ec5
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions examples/bug-reports/bug581.fst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module M

#set-options "--log_types --print_effect_args"

assume new type p: int -> Type0

assume val f: n:int{p n} -> int

//The three declarations below are equivalent and with all of them g fails to typecheck
//val g: unit -> int
//val g: unit -> ML int
//val g: unit -> ALL int (fun post _ -> forall a h. post a h)

//Inferred type and effect when no declaration is given; with it g typechecks
val g: unit -> ALL int (fun post _ -> p 0 /\ (forall a h. post a h))

let g () = f 0

0 comments on commit 85a1ec5

Please sign in to comment.