
Hi folks apfelmus@quantentunnel.de wrote:
Btw, why are there no irrefutable patterns for GADTs? I mean, such a sin should be shame for a non-strict language...
Just imagine
data Eq a b where Refl :: Eq a a
coerce :: Eq a b -> a -> b coerce ~Refl a = b
coerce undefined True :: String Bang you're dead. Or rather... Twiddle you're dead. Moral: in a non-total language, if you're using indexing to act as evidence for something, you need to be strict about checking the evidence before you act on it, or you will be vulnerable to the blandishments of the most appalling liars. As Randy Pollack used to say to us when we were children, the best thing about working in a strongly normalizing language is not having to normalize things. All the best Conor This message has been checked for viruses but the contents of an attachment may still contain software viruses, which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.