[Haskell-beginners] Is it possible to check list length at compile time?

Kelong Cong kelongcong at gmail.com
Tue Mar 17 17:26:39 UTC 2015


Hello,

I have a function that takes a list as its parameter. The list must always
have the same length, for example 16. Instead of producing a "Nothing" or
bottom out when an invalid list is supplied, are there ways to verify this
at compile time? If not, are there alternative data types that has this
kind of functionality?

Thanks,
Kelong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150317/99990cd3/attachment.html>


More information about the Beginners mailing list