> Lets imagine I want a type for a point like: > type Point = (Int, Int) > But what, if I can predict that the X and Y values are in a range between 0 > and 100?
1. this only works with "dependent types", which Haskell does not have - by design (type inference/checking would be undecidable). It works in Coq, PVS etc. but there the programmer has to help the type checker (i.e. attach a proof that the type is correct) 2. using "type" (instead of "data") is generally a bad idea. J.W.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe