Time Library
Ashley Yakeley
ashley at semantic.org
Tue Mar 21 18:19:37 EST 2006
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/
More information about the Haskell-prime
mailing list