Ticket #2759: fix2759base.2.patch

File fix2759base.2.patch, 7.6 KB (added by dreixel, 6 years ago)
2New patches:
4[Fix #2759: add mkRealConstr and mkIntegralConstr, deprecate mkFloatConstr and mkIntConstr
5Jose Pedro Magalhaes <[email protected]>**20090116140655] {
6hunk ./Data/Data.hs 78
7-        mkFloatConstr,  -- :: DataType -> Double  -> Constr
8+        mkFloatConstr,  -- :: DataType -> Double -> Constr
9+        mkIntegralConstr,-- :: (Integral a) => DataType -> a -> Constr
10+        mkRealConstr,   -- :: (Real a) => DataType -> a -> Constr
11hunk ./Data/Data.hs 515
12-               | FloatConstr  Double
13+               | FloatConstr  Rational
14hunk ./Data/Data.hs 567
15-        (FloatRep,  FloatConstr f)    -> mkFloatConstr dt f
16+        (FloatRep,  FloatConstr f)    -> mkRealConstr dt f
17hunk ./Data/Data.hs 736
19+-- | This function is now deprecated. Please use 'mkIntegralConstr' instead.
20+{-# DEPRECATED mkIntConstr "Use mkIntegralConstr instead" #-}
21hunk ./Data/Data.hs 739
22-mkIntConstr dt i = case datarep dt of
23-                  IntRep -> mkPrimCon dt (show i) (IntConstr i)
24-                  _ -> error "mkIntConstr"
25+mkIntConstr = mkIntegralConstr
26hunk ./Data/Data.hs 741
27+mkIntegralConstr :: (Integral a) => DataType -> a -> Constr
28+mkIntegralConstr dt i = case datarep dt of
29+                  IntRep -> mkPrimCon dt (show i) (IntConstr (toInteger  i))
30+                  _ -> error "mkIntegralConstr"
31hunk ./Data/Data.hs 746
32+-- | This function is now deprecated. Please use 'mkRealConstr' instead.
33+{-# DEPRECATED mkFloatConstr "Use mkRealConstr instead" #-}
34hunk ./Data/Data.hs 749
35-mkFloatConstr dt f = case datarep dt of
36-                    FloatRep -> mkPrimCon dt (show f) (FloatConstr f)
37-                    _ -> error "mkFloatConstr"
38+mkFloatConstr dt = mkRealConstr dt . toRational
40+mkRealConstr :: (Real a) => DataType -> a -> Constr
41+mkRealConstr dt f = case datarep dt of
42+                    FloatRep -> mkPrimCon dt (show f) (FloatConstr (toRational f))
43+                    _ -> error "mkRealConstr"
44hunk ./Data/Data.hs 868
45-  toConstr x = mkFloatConstr floatType (realToFrac x)
46+  toConstr = mkRealConstr floatType
47hunk ./Data/Data.hs 881
48-  toConstr = mkFloatConstr floatType
49+  toConstr = mkRealConstr doubleType
50hunk ./Data/Data.hs 883
51-                    (FloatConstr x) -> z x
52+                    (FloatConstr x) -> z (realToFrac x)
57[Unbreak an import cycle caused by moving 'catch' definitions around.
58[email protected]**20090116110132
59 The new cycle was introduced for nhc98 only.
61[make the Monoid docs more self-contained
62Ross Paterson <[email protected]>**20090115222441]
63[Move some catch definitions around to avoid an import loop
64Ian Lynagh <[email protected]>**20090114211033
65 As suggested by simonpj in trac #2822.
67[Add NoImplicitPrelude to the extensions used when building with GHC
68Ian Lynagh <[email protected]>**20090114202810]
69[#2699: exit silently for EPIPE on stdout
70Simon Marlow <[email protected]>**20090114134612
71 Ignore-this: 4236560e8e9c1135129e9526355f11b4
73[Fix build when we have HTYPE_TCFLAG_T
74Ian Lynagh <[email protected]>**20090105102020]
75[Fix the build on Windows
76Ian Lynagh <[email protected]>**20090105014625]
77[Add errno to the IOError type
78Ian Lynagh <[email protected]>**20090104173018]
79[Fix typo (reqwests -> requests); trac #2908, spotted by bancroft
80Ian Lynagh <[email protected]>**20090104154405]
81[More compact error messages for record selectors
82[email protected]**20090102145325
84 Make recSelError generate the standard part of the record selector
85 error message (i.e. "No match in record selector") rather than have
86 that string duplicated for every record selector.
89[extra dependencies for the new build system
90Simon Marlow <[email protected]>**20081217104655]
91[warning fix: don't use -XPatternSignatures in GHC >= 6.10
92Simon Marlow <[email protected]>**20081217104637]
93[Rollback INLINE patches
94Simon Marlow <[email protected]>**20081216104143
96 rolling back:
98 Fri Dec  5 17:00:15 GMT 2008  [email protected]
99   * Update INLINE pragmas for new INLINE story
101   - (.) and foldr should inline when applied to only two arguments
102   - Make unpackCString# NOINLINE; it inlines too much (with little gain)
105     M ./GHC/Base.lhs -10 +31
107[FIX #1364: added support for C finalizers that run as soon as the value is no longer reachable.
108Ivan Tomac <[email protected]>**20081210150510
110 Patch amended by Simon Marlow:
111   - mkWeakFinalizer# commoned up with mkWeakFinalizerEnv#
113[Update INLINE pragmas for new INLINE story
114[email protected]**20081205170015
116 - (.) and foldr should inline when applied to only two arguments
117 - Make unpackCString# NOINLINE; it inlines too much (with little gain)
120[Fix #2750: change Prelude.(,) to Prelude.(,,)
121Jose Pedro Magalhaes <[email protected]>**20081201113411]
122[Fix typo (or out of date reference) in throwTo documentation.
123shelarcy <[email protected]>**20081129024639]
124[Fix #2760: deprecate mkNorepType, add mkNoRepType
125Jose Pedro Magalhaes <[email protected]>**20081121141905]
126[Add more description of what "round" does, from the H98 report
127Ian Lynagh <[email protected]>**20081119143131]
128[re-instate the gcd/Integer and lcm/Integer RULES
129Simon Marlow <[email protected]>**20081120101826
130 Fixes a performance regression between 6.8.3 and 6.10.1
132[Change an "undefined" into a more informative error; trac #2782
133Ian Lynagh <[email protected]>**20081116160228]
134[updating Haddock documentation
135[email protected]**20081111095023
137 Fixed the broken link from Data.Generics to Data.Data.
139[add GHC.Conc.runSparks (required by GHC patch "Run sparks in batches")
140Simon Marlow <[email protected]>**20081106095419]
141[FIX #2722: update RULES for the Category/Arrow split
142Ross Paterson <[email protected]>**20081104144515
144 The rule
146        arr id = id
148 interacts unpleasantly with the advice to define
150        id = arr id
152 in instances of Category that are also instances of Arrow (#2722).
154 Also changed a couple of >>>'s to .'s in later rules.
156[Add AnnotationWrapper type so GHC can capture annotation dictionaries during compilation
157Max Bolingbroke <[email protected]>**20081016122608]
158[docs about how exceptions are handled by forkIO'd threads (#2651)
159Simon Marlow <[email protected]>**20081016100410]
160[Import n_capabilities via import symbol when linking dynamically
161Clemens Fruhwirth <[email protected]>**20081013161220]
162[add link to the new syb wiki
163[email protected]**20081013111605]
164[add readTVarIO :: TVar a -> IO a
165Simon Marlow <[email protected]>**20081010113835]
166[changing haddock links
167[email protected]**20081010095434]
168[non-GHC: delete unnecessary imports
169Ross Paterson <[email protected]>**20081007134809]
170[removed (->) instance from Data.Data
171[email protected]**20081006075254]
172[added new module Data.Data
173'Jose Pedro Magalhaes <[email protected]>'**20081002140535
175 The new Data.Data module contains all of Data.Generics.Basics
176 and most of Data.Generics.Instances. The missing instances were
177 deemed dubious and moved to the syb package.
179[add new Data.Data module
180'Jose Pedro Magalhaes <[email protected]>'**20081002082735]
181[restore Complex's derived Data instance
182'Jose Pedro Magalhaes <[email protected]>'**20081002082655]
183[update Data.Generics import
184'Jose Pedro Magalhaes <[email protected]>'**20081002082604]
185[Don't use ^(2::Int) in Data.Complex.magnitude; partially fixes trac #2450
186Ian Lynagh <[email protected]>**20081004142651
187 We still might want to make a RULE for this, so the bug is not fully fixed.
189[Restore the Haskell 98 behaviour of Show Ratio (#1920)
190Simon Marlow <[email protected]>**20080923134949]
191[Pad version number to
192Ian Lynagh <[email protected]>**20080920155801]
193[TAG 6.10 branch has been forked
194Ian Lynagh <[email protected]>**20080919123437]
195Patch bundle hash: