Skip to content

Instantly share code, notes, and snippets.

@robkuz
Created July 21, 2016 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save robkuz/955fbb663df7fb928640b0990d692498 to your computer and use it in GitHub Desktop.
Save robkuz/955fbb663df7fb928640b0990d692498 to your computer and use it in GitHub Desktop.
F# inferrer on nested tuples
type FooProtocol =
abstract member foo: unit -> string
type Foo = Foo of string with
interface FooProtocol with
member this.foo () = "foo"
let bar (foo: FooProtocol, _) = ()
let barnested ((foo: FooProtocol, _), y) = ()
let barnestedrev (y, (foo: FooProtocol, _)) = ()
let x = bar (Foo "foo", "bar")
let y = barnested ((Foo "foo", "bar"), "lala")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment