
I propose the following for Haskell': 1. Adding my Data.Fixed module to the base package. http://semantic.org/TimeLib/doc/html/Data-Fixed.html http://darcs.haskell.org/packages/time/fixed/Data/Fixed.hs 2. Adding my package "time" to the standard libraries. http://semantic.org/TimeLib/doc/html/ http://darcs.haskell.org/packages/time/ 3. Deprecating System.Time. http://haskell.org/ghc/dist/current/docs/libraries/base/System-Time.html I'm not sure what form deprecating takes. If this is OK, I'll create a ticket for it, and also make these changes in darcs and get it working with default-packages. More info: http://semantic.org/TimeLib/ -- Ashley Yakeley, Seattle WA WWED? http://www.cs.utexas.edu/users/EWD/

On 3/19/06, Ashley Yakeley
1. Adding my Data.Fixed module to the base package. http://semantic.org/TimeLib/doc/html/Data-Fixed.html http://darcs.haskell.org/packages/time/fixed/Data/Fixed.hs
When would you used a (Fixed a) without (HasResolution a)?
--
Taral

In article
On 3/19/06, Ashley Yakeley
wrote: 1. Adding my Data.Fixed module to the base package. http://semantic.org/TimeLib/doc/html/Data-Fixed.html http://darcs.haskell.org/packages/time/fixed/Data/Fixed.hs
When would you used a (Fixed a) without (HasResolution a)?
Never as far as I can imagine. The 'a' parameter will be taken by a phantom type. http://haskell.org/haskellwiki/Phantom_type The two I have, E6 and E12, represent 10^6 and 10^12, but you could use some other number, such as a power of 2. -- Ashley Yakeley, Seattle WA WWED? http://www.cs.utexas.edu/users/EWD/

On 3/20/06, Ashley Yakeley
Never as far as I can imagine. The 'a' parameter will be taken by a phantom type. http://haskell.org/haskellwiki/Phantom_type
Now I don't recall, but is it allowed to do:
data HasResolution a => Fixed a = ...?
--
Taral

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/

On 3/21/06, Ashley Yakeley
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.
I think it also allows the inference of HasResolution a from Fixed a,
thus removing the HasResolution condition on your instances.
--
Taral
participants (2)
-
Ashley Yakeley
-
Taral