Created
August 1, 2011 15:51
-
-
Save OnorioCatenacci/1118401 to your computer and use it in GitHub Desktop.
F# Units of Measure and Interfaces
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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