
8 Sep
2014
8 Sep
'14
2:31 p.m.
2014-09-03 5:07 GMT+02:00 Kim-Ee Yeoh
On Wed, Sep 3, 2014 at 2:32 AM, Dmitriy Matrosov
wrote: How can i write this constraints so they're checked at compile time, not at runtime?
Smart constructors won't check them at compile time but it does the next best thing, which is validate at the earliest possible moment.
In between compile time and runtime, you probably could use refinements types; see LiquidHaskell (http://goto.ucsd.edu:8090/index.html, https://github.com/ucsd-progsys/liquidhaskell/ ) David.