Implict parameters and monomorphism

Simon Peyton-Jones simonpj@microsoft.com
Thu, 3 May 2001 01:37:22 -0700


| 	a) That adding a type signature can change the dynamic semantics
| 	    of the program.  This would be the first and only=20
| occurrence of
| 	    such behaviour.
|=20
| At present, adding a type signature changes both the static=20
| semantics and the cost of running a program=20

That's true: but adopting (B) means that adding a type signature
may cause the program to print a different answer!  That seems
qualitiatively different to giving the same answer only slower or
faster;
or rejecting the program altogether.  Type signatures should specialise
a type -- which means that efficiency may increase, or that the program
may
no longer be typable, but surely it shouldn't change the answer! =20

| Are you sure this second one really holds? I claim the=20
| effects analysis is just type inference!=20

Indeed it is.  I just don't want programmers to have to do type=20
inference in their heads to figure out the meaning of the program.

Simon