Skip to content

Instantly share code, notes, and snippets.

@joseph-montanez
Created February 6, 2014 06:05
Show Gist options
  • Save joseph-montanez/8839043 to your computer and use it in GitHub Desktop.
Save joseph-montanez/8839043 to your computer and use it in GitHub Desktop.
Get the type of a some generic?
main.fs: error FS0001: This expression was expected to have type
'a
but here has type
'b option
let foo<'a> (o: 'a) =
match o with
| Some(n) -> typeof<n>
| None -> ""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment