Skip to content

Instantly share code, notes, and snippets.

@OnorioCatenacci
Created August 1, 2011 15:51
Show Gist options
  • Save OnorioCatenacci/1118401 to your computer and use it in GitHub Desktop.
Save OnorioCatenacci/1118401 to your computer and use it in GitHub Desktop.
F# Units of Measure and Interfaces
module measures
type ILinear =
interface
end
[<Measure>] type inch =
interface ILinear
[<Measure>] type foot =
interface ILinear
(* Gives FS0010 unexpected symbol on : *)
let move100 (float<'u:#ILinear>) =
d + 100.0<'u>;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment