[Haskell-beginners] Check constructor's field numeric value at compile time

Alexandre Lucchesi alexandrelucchesi at gmail.com
Wed Sep 3 03:07:10 UTC 2014


Hmm.. Nice to know about that!

Thank you. :)


On Wed, Sep 3, 2014 at 12:04 AM, Kim-Ee Yeoh <ky3 at atamo.com> wrote:

>
> On Wed, Sep 3, 2014 at 3:58 AM, Alexandre Lucchesi <
> alexandrelucchesi at gmail.com> wrote:
>
>> In order to add such constraints you should define "constructor
>> functions" and apply the validation there, i.e.:
>
>
> To OP: Yes, the searchable term is "smart constructors". However, it has
> been used at least once on this list to mean something different, so look
> out.
>
> -- Kim-Ee
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/mailman/listinfo/beginners
>
>


-- 
alexandre lucchesi

*Perfection is achieved, not when there is nothing more to add, but when
there is nothing left to take away!*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140903/a15f537c/attachment.html>


More information about the Beginners mailing list