[Haskell] ANNOUNCE: GHC version 7.6.1

Ozgur Akgun ozgurakgun at gmail.com
Thu Sep 6 20:03:04 CEST 2012


On 6 September 2012 18:49, Thomas DuBuisson <thomas.dubuisson at gmail.com>wrote:

> > I don't remember if this was part of the motivation in creating this
> > feature, but it has a nice use case:  asserting on a test suite that
> > something should *not* type check.
> We're getting more meta than Haskell provides cleanly, but all
> significant uses I can currently think of for something like that
> would require universal quantification over types:

One way could be:

import Control.Spoon

f = 1 + 'a'

test = assertTrue (teaspoon f == Nothing)

Ozgur Akgun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20120906/b0499df9/attachment.htm>

More information about the Glasgow-haskell-users mailing list