Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2018
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. orin% poly
  2. Poly/ML 5.7.1 Release
  3. > signature FOO = sig type foo val foo : foo end;
  4. signature FOO = sig val foo: foo type foo end
  5. > structure Foo : FOO = struct type foo = int val foo = 0 end;
  6. structure Foo: FOO
  7. > Foo.foo = 0;
  8. val it = true: bool
  9. > structure Foo :> FOO = struct type foo = int val foo = 0 end;
  10. structure Foo: FOO
  11. > Foo.foo = 0;
  12. poly: : error: Type error in function application.
  13. Function: = : ''a * ''a -> bool
  14. Argument: (Foo.foo, 0) : Foo.foo * int
  15. Reason: Can't unify ''a to Foo.foo (Requires equality type)
  16. Found near Foo.foo = 0
  17. Static Errors
  18. >
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement