type error trying to specialize polymorphic function
The attached module won't compile---definition of 'wrap' is rejected. The error message is
[ 1 of 13] Compiling Pain ( Pain.hs, Pain.o ) Pain.hs:18:7: Couldn't match expected type `n C O' against inferred type `C' Expected type: ExTriple (Counter n) Inferred type: ExTriple (->) In the expression: scalar In the definition of `wrap': wrap = scalar
The inferred type is alarming, and in any case the type of wrap is a straightforward specialization of the type of scalar.
Could the problem be with liberal type synonyms? I don't think we're doing anything unreasonable...
|Component||Compiler (Type checker)|