Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: Type depending on value (Marcin Mrotek)
----------------------------------------------------------------------
Message: 1
Date: Fri, 13 May 2016 12:19:24 +0200
From: Marcin Mrotek <[email protected]>
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Subject: Re: [Haskell-beginners] Type depending on value
Message-ID:
<CAJcfPzkpiweKQfsPuxk0tFgjbac1cuvMpvJm-oO=jebfpbg...@mail.gmail.com>
Content-Type: text/plain; charset="utf-8"
Hello,
Well, yes, singleton defined that way doesn't enforce the value to be equal
to the type. Maybe you could use a type class for natVec? It's not a
particularly elegant solution, but it's the only one I came up with. Or
maybe use two different singleton types, one hidden and only used in
SNatClass, and the other exposed and defined the way you did originally?
Best regards,
Marcin Mrotek
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mail.haskell.org/pipermail/beginners/attachments/20160513/27565ee8/attachment-0001.html>
------------------------------
Subject: Digest Footer
_______________________________________________
Beginners mailing list
[email protected]
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
------------------------------
End of Beginners Digest, Vol 95, Issue 19
*****************************************