
2 Sep
2014
2 Sep
'14
7:32 p.m.
Hi. I have a type data Interval = Seconds Float | MicroSeconds Int The Float field of data constructor Seconds should be >= 1, and Int field of constructor MicroSeconds should be in the range from 0 to 1000000. How can i write this constraints so they're checked at compile time, not at runtime? -- Dmitriy Matrosov