
New patches:

[Use alignment when allocating for a Storable.
lennart@augustsson.net**20090107154132] {
hunk ./Foreign/Marshal/Alloc.hs 35
-import Foreign.Storable         ( Storable(sizeOf) )
+import Foreign.Storable         ( Storable(sizeOf, alignment) )
+import Foreign.Ptr              ( alignPtr )
hunk ./Foreign/Marshal/Alloc.hs 78
-    doMalloc dummy  = mallocBytes (sizeOf dummy)
+    doMalloc dummy  = do
+        let align = alignment dummy
+        ptr <- mallocBytes (sizeOf dummy + align - 1)
+        return (alignPtr ptr align)
hunk ./Foreign/Marshal/Alloc.hs 103
-    doAlloca       :: Storable a' => a' -> (Ptr a' -> IO b') -> IO b'
-    doAlloca dummy  = allocaBytes (sizeOf dummy)
+    doAlloca           :: Storable a' => a' -> (Ptr a' -> IO b') -> IO b'
+    doAlloca dummy act  =
+        let align = alignment dummy
+        in  allocaBytes (sizeOf dummy + align - 1) $ \ ptr ->
+            act (alignPtr ptr align)
hunk ./Foreign/Marshal/Array.hs 65
-import Foreign.Ptr      (Ptr, plusPtr)
-import Foreign.Storable (Storable(sizeOf,peekElemOff,pokeElemOff))
+import Foreign.Ptr      (Ptr, plusPtr, alignPtr)
+import Foreign.Storable (Storable(sizeOf,peekElemOff,pokeElemOff,alignment))
hunk ./Foreign/Marshal/Array.hs 90
-    doMalloc dummy size  = mallocBytes (size * sizeOf dummy)
+    doMalloc dummy size  = do
+        let align = alignment dummy
+        ptr <- mallocBytes (size * sizeOf dummy + align - 1)
+        return (alignPtr ptr align)
hunk ./Foreign/Marshal/Array.hs 107
-    doAlloca            :: Storable a' => a' -> Int -> (Ptr a' -> IO b') -> IO b'
-    doAlloca dummy size  = allocaBytes (size * sizeOf dummy)
+    doAlloca                :: Storable a' => a' -> Int -> (Ptr a' -> IO b') -> IO b'
+    doAlloca dummy size act  =
+        let align = alignment dummy
+        in  allocaBytes (size * sizeOf dummy + align - 1) $ \ ptr ->
+            act (alignPtr ptr align)
hunk ./Foreign/Marshal/Array.hs 125
-    doRealloc dummy ptr size  = reallocBytes ptr (size * sizeOf dummy)
+    doRealloc dummy ptr size  = do
+        let align = alignment dummy
+        ptr <- reallocBytes ptr (size * sizeOf dummy + align - 1)
+        return (alignPtr ptr align)
}

Context:

[Fix build when we have HTYPE_TCFLAG_T
Ian Lynagh <igloo@earth.li>**20090105102020] 
[Fix the build on Windows
Ian Lynagh <igloo@earth.li>**20090105014625] 
[Add errno to the IOError type
Ian Lynagh <igloo@earth.li>**20090104173018] 
[Fix typo (reqwests -> requests); trac #2908, spotted by bancroft
Ian Lynagh <igloo@earth.li>**20090104154405] 
[More compact error messages for record selectors
simonpj@microsoft.com**20090102145325
 
 Make recSelError generate the standard part of the record selector
 error message (i.e. "No match in record selector") rather than have
 that string duplicated for every record selector.
 
] 
[extra dependencies for the new build system
Simon Marlow <marlowsd@gmail.com>**20081217104655] 
[warning fix: don't use -XPatternSignatures in GHC >= 6.10
Simon Marlow <marlowsd@gmail.com>**20081217104637] 
[Rollback INLINE patches
Simon Marlow <marlowsd@gmail.com>**20081216104143
 
 rolling back:
 
 Fri Dec  5 17:00:15 GMT 2008  simonpj@microsoft.com
   * Update INLINE pragmas for new INLINE story
   
   - (.) and foldr should inline when applied to only two arguments
   - Make unpackCString# NOINLINE; it inlines too much (with little gain)
   
 
     M ./GHC/Base.lhs -10 +31
] 
[FIX #1364: added support for C finalizers that run as soon as the value is no longer reachable.
Ivan Tomac <tomac@pacific.net.au>**20081210150510
 
 Patch amended by Simon Marlow:
   - mkWeakFinalizer# commoned up with mkWeakFinalizerEnv#
] 
[Fix #2760: deprecate mkNorepType, add mkNoRepType
Jose Pedro Magalhaes <jpm@cs.uu.nl>**20081121141905] 
[Update INLINE pragmas for new INLINE story
simonpj@microsoft.com**20081205170015
 
 - (.) and foldr should inline when applied to only two arguments
 - Make unpackCString# NOINLINE; it inlines too much (with little gain)
 
] 
[Fix #2750: change Prelude.(,) to Prelude.(,,)
Jose Pedro Magalhaes <jpm@cs.uu.nl>**20081201113411] 
[Fix typo (or out of date reference) in throwTo documentation.
shelarcy <shelarcy@gmail.com>**20081129024639] 
[Add more description of what "round" does, from the H98 report
Ian Lynagh <igloo@earth.li>**20081119143131] 
[re-instate the gcd/Integer and lcm/Integer RULES
Simon Marlow <marlowsd@gmail.com>**20081120101826
 Fixes a performance regression between 6.8.3 and 6.10.1
] 
[Change an "undefined" into a more informative error; trac #2782
Ian Lynagh <igloo@earth.li>**20081116160228] 
[updating Haddock documentation
jpm@cs.uu.nl**20081111095023
 
 Fixed the broken link from Data.Generics to Data.Data.
] 
[add GHC.Conc.runSparks (required by GHC patch "Run sparks in batches")
Simon Marlow <marlowsd@gmail.com>**20081106095419] 
[FIX #2722: update RULES for the Category/Arrow split
Ross Paterson <ross@soi.city.ac.uk>**20081104144515
 
 The rule
 
 	arr id = id
 
 interacts unpleasantly with the advice to define
 
 	id = arr id
 
 in instances of Category that are also instances of Arrow (#2722).
 
 Also changed a couple of >>>'s to .'s in later rules.
] 
[Add AnnotationWrapper type so GHC can capture annotation dictionaries during compilation
Max Bolingbroke <batterseapower@hotmail.com>**20081016122608] 
[docs about how exceptions are handled by forkIO'd threads (#2651)
Simon Marlow <marlowsd@gmail.com>**20081016100410] 
[Import n_capabilities via import symbol when linking dynamically
Clemens Fruhwirth <clemens@endorphin.org>**20081013161220] 
[add link to the new syb wiki
jpm@cs.uu.nl**20081013111605] 
[changing haddock links
jpm@cs.uu.nl**20081010095434] 
[add readTVarIO :: TVar a -> IO a
Simon Marlow <marlowsd@gmail.com>**20081010113835] 
[removed (->) instance from Data.Data
jpm@cs.uu.nl**20081006075254] 
[non-GHC: delete unnecessary imports
Ross Paterson <ross@soi.city.ac.uk>**20081007134809] 
[added new module Data.Data
'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002140535
 
 The new Data.Data module contains all of Data.Generics.Basics 
 and most of Data.Generics.Instances. The missing instances were 
 deemed dubious and moved to the syb package.
] 
[add new Data.Data module
'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002082735] 
[restore Complex's derived Data instance
'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002082655] 
[update Data.Generics import
'Jose Pedro Magalhaes <jpm@cs.uu.nl>'**20081002082604] 
[Don't use ^(2::Int) in Data.Complex.magnitude; partially fixes trac #2450
Ian Lynagh <igloo@earth.li>**20081004142651
 We still might want to make a RULE for this, so the bug is not fully fixed.
] 
[Restore the Haskell 98 behaviour of Show Ratio (#1920)
Simon Marlow <simonmarhaskell@gmail.com>**20080923134949] 
[Pad version number to 4.0.0.0
Ian Lynagh <igloo@earth.li>**20080920155801] 
[TAG 6.10 branch has been forked
Ian Lynagh <igloo@earth.li>**20080919123437] 
Patch bundle hash:
d07bd7c2e94332c181e53cd9d4d2a08ef164b240
