3 ms·
We probably wanna add to it to make it useful {-# LANGUAGE GeneralizedNewtypeDeriving #-} newtype Kilogram = Kilogram Double deriving (Show, Eq, Or
by sparkie 13y ago
We probably wanna add to it to make it useful
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
newtype Kilogram = Kilogram Double deriving (Show, Eq, Ord, Num, Real, Fractional, Floating, ...)
And remind ourselves that Haskell is really quite expressive.
- dllthomas 13y agoThough unfortunately can't handle (mass * accel :: Newton) without swapping out the Prelude.