+ f = div' n d
+
+-- | The type parameter should be an instance of 'HasResolution'.
+newtype Fixed a = MkFixed Integer
+#ifndef __NHC__
+ deriving (Eq,Ord,Typeable)
+#else
+ deriving (Eq,Ord)
+#endif
+
+#ifndef __NHC__
+-- We do this because the automatically derived Data instance requires (Data a) context.
+-- Our manual instance has the more general (Typeable a) context.
+tyFixed :: DataType
+tyFixed = mkDataType "Data.Fixed.Fixed" [conMkFixed]
+conMkFixed :: Constr
+conMkFixed = mkConstr tyFixed "MkFixed" [] Prefix
+instance (Typeable a) => Data (Fixed a) where
+ gfoldl k z (MkFixed a) = k (z MkFixed) a
+ gunfold k z _ = k (z MkFixed)
+ dataTypeOf _ = tyFixed
+ toConstr _ = conMkFixed
+#endif