
10 Aug
2014
10 Aug
'14
6:52 p.m.
On 14-08-10 02:20 PM, martin wrote:
exProcess2 pState loc = LP {lstep = xxx} where xxx = myStep pState
vs
exProcess2 pState loc = LP {lstep = myStep pState} where xxx = myStep pState
The monomorphism restriction requires assigning a monomorphic (non-polymorphic) type to xxx. The assignment could come from declaring xxx's type (which you didn't do) or inferring from use sites (which you had in one example but not in another). When both are lacking, a job that needs done can't be done, and it is an error.