
21 Mar
2006
21 Mar
'06
6:19 p.m.
Taral wrote:
Now I don't recall, but is it allowed to do:
data HasResolution a => Fixed a = ...?
Not usefully. data T a = MkT a data C a => T a = MkT a It's allowed, but it doesn't do what you probably want. All it does is change the type of the constructor MkT. If the parameter "a" to Fixed is free, we don't particularly want to hide away the HasResolution constraint on it somehow. Of course, once it's specialised as a particular type (e.g. Fixed E12), then it's not needed anymore. -- Ashley Yakeley, Seattle WA WWED? http://www.cs.utexas.edu/users/EWD/