1) What is a fundep? 2) This is a very interesting topic, and rather complex. It has come up (dimensions, units, -- not Haskell implementations of them) in some recent work on STEP (ISO 10303). I'm only now trying to come up to some speed on Haskell, and only now trying to recall what I used to know about the algebra of units and dimensions, so I'm not really prepared to comment deeply on this suggestion. However, I'd suggest that someone have a good long look at "An Ontology for Engineering Mathematics" (available at http://www-ksl.stanford.edu/KSL_Abstracts/KSL-94-18.html) (or similar work) before building anything in to standard libraries. John Velman Tom Pledger <Tom.Pledger@peace.com>@haskell.org on 04/09/2001 02:48:48 PM Sent by: haskell-admin@haskell.org To: anatoli <anatoli@yahoo.com>, haskell@haskell.org cc: Subject: Dimensional analysis with fundeps I like it! : | 3) Allow arbitrary user-defined "fundamental" dimensions | (for things like dollars or radians) -- this may be | very tricky; | | 4) Allow several unit systems (such as SI and Imperial) | to coexist. Some suggestions/quibbles... If you clearly make the type system deal with dimensions rather than units, there's no problem with plugging in multiple unit systems. You just have to pick a scale for the representation. newtype Dimensioned mass length time rep = Dimensioned rep type Mass rep = Dimensioned One Zero Zero rep kg, lb :: Num a => Mass a kg = dm 1 lb = dm 0.4535924 Angles are dimensionless. (Think of the Taylor series for trig functions.) radian, degree :: Unit radian = dm 1 degree = dm (pi/180) Regards, Tom _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell