| 1 | |
|---|
| 2 | New patches: |
|---|
| 3 | |
|---|
| 4 | [Fix Windows DEP violations (bug #885) |
|---|
| 5 | brianlsmith@gmail.com**20061007060621] |
|---|
| 6 | < |
|---|
| 7 | > { |
|---|
| 8 | hunk ./compiler/ghci/ByteCodeFFI.lhs 7 |
|---|
| 9 | \section[ByteCodeGen]{Generate machine-code sequences for foreign import} |
|---|
| 10 | |
|---|
| 11 | \begin{code} |
|---|
| 12 | -module ByteCodeFFI ( mkMarshalCode, moan64 ) where |
|---|
| 13 | +module ByteCodeFFI ( mkMarshalCode, moan64, newExec ) where |
|---|
| 14 | |
|---|
| 15 | #include "HsVersions.h" |
|---|
| 16 | |
|---|
| 17 | hunk ./compiler/ghci/ByteCodeFFI.lhs 20 |
|---|
| 18 | -- there is ifdeffery below |
|---|
| 19 | import Control.Exception ( throwDyn ) |
|---|
| 20 | import DATA_BITS ( Bits(..), shiftR, shiftL ) |
|---|
| 21 | -import Foreign ( newArray ) |
|---|
| 22 | import Data.List ( mapAccumL ) |
|---|
| 23 | |
|---|
| 24 | import DATA_WORD ( Word8, Word32 ) |
|---|
| 25 | hunk ./compiler/ghci/ByteCodeFFI.lhs 23 |
|---|
| 26 | -import Foreign ( Ptr ) |
|---|
| 27 | +import Foreign ( Ptr, FunPtr, castPtrToFunPtr, |
|---|
| 28 | + Storable, sizeOf, pokeArray ) |
|---|
| 29 | +import Foreign.C ( CUInt ) |
|---|
| 30 | import System.IO.Unsafe ( unsafePerformIO ) |
|---|
| 31 | import IO ( hPutStrLn, stderr ) |
|---|
| 32 | -- import Debug.Trace ( trace ) |
|---|
| 33 | hunk ./compiler/ghci/ByteCodeFFI.lhs 74 |
|---|
| 34 | -} |
|---|
| 35 | mkMarshalCode :: CCallConv |
|---|
| 36 | -> (Int, CgRep) -> Int -> [(Int, CgRep)] |
|---|
| 37 | - -> IO (Ptr Word8) |
|---|
| 38 | + -> IO (FunPtr ()) |
|---|
| 39 | mkMarshalCode cconv (r_offW, r_rep) addr_offW arg_offs_n_reps |
|---|
| 40 | = let bytes = mkMarshalCode_wrk cconv (r_offW, r_rep) |
|---|
| 41 | addr_offW arg_offs_n_reps |
|---|
| 42 | hunk ./compiler/ghci/ByteCodeFFI.lhs 78 |
|---|
| 43 | - in Foreign.newArray bytes |
|---|
| 44 | - |
|---|
| 45 | + in newExec bytes |
|---|
| 46 | |
|---|
| 47 | hunk ./compiler/ghci/ByteCodeFFI.lhs 80 |
|---|
| 48 | +newExec :: Storable a => [a] -> IO (FunPtr ()) |
|---|
| 49 | +newExec code |
|---|
| 50 | + = do ptr <- _allocateExec (fromIntegral $ codeSize undefined code) |
|---|
| 51 | + pokeArray ptr code |
|---|
| 52 | + return (castPtrToFunPtr ptr) |
|---|
| 53 | + where |
|---|
| 54 | + codeSize :: Storable a => a -> [a] -> Int |
|---|
| 55 | + codeSize dummy array = sizeOf(dummy) * length array |
|---|
| 56 | |
|---|
| 57 | hunk ./compiler/ghci/ByteCodeFFI.lhs 89 |
|---|
| 58 | +foreign import ccall unsafe "allocateExec" |
|---|
| 59 | + _allocateExec :: CUInt -> IO (Ptr a) |
|---|
| 60 | |
|---|
| 61 | mkMarshalCode_wrk :: CCallConv |
|---|
| 62 | -> (Int, CgRep) -> Int -> [(Int, CgRep)] |
|---|
| 63 | hunk ./compiler/ghci/ByteCodeGen.lhs 12 |
|---|
| 64 | #include "HsVersions.h" |
|---|
| 65 | |
|---|
| 66 | import ByteCodeInstr |
|---|
| 67 | +import ByteCodeItbls ( ItblPtr(..) ) |
|---|
| 68 | import ByteCodeFFI ( mkMarshalCode, moan64 ) |
|---|
| 69 | import ByteCodeAsm ( CompiledByteCode(..), UnlinkedBCO, |
|---|
| 70 | assembleBCO, assembleBCOs, iNTERP_STACK_CHECK_THRESH ) |
|---|
| 71 | hunk ./compiler/ghci/ByteCodeGen.lhs 58 |
|---|
| 72 | |
|---|
| 73 | import Data.List ( intersperse, sortBy, zip4, zip6, partition ) |
|---|
| 74 | import Foreign ( Ptr, castPtr, mallocBytes, pokeByteOff, Word8, |
|---|
| 75 | - withForeignPtr ) |
|---|
| 76 | + withForeignPtr, castFunPtrToPtr ) |
|---|
| 77 | import Foreign.C ( CInt ) |
|---|
| 78 | import Control.Exception ( throwDyn ) |
|---|
| 79 | |
|---|
| 80 | hunk ./compiler/ghci/ByteCodeGen.lhs 148 |
|---|
| 81 | -> Int |
|---|
| 82 | -> [StgWord] |
|---|
| 83 | -> Bool -- True <=> is a return point, rather than a function |
|---|
| 84 | - -> [Ptr ()] |
|---|
| 85 | + -> [BcPtr] |
|---|
| 86 | -> ProtoBCO name |
|---|
| 87 | mkProtoBCO nm instrs_ordlist origin arity bitmap_size bitmap |
|---|
| 88 | is_ret mallocd_blocks |
|---|
| 89 | hunk ./compiler/ghci/ByteCodeGen.lhs 923 |
|---|
| 90 | ioToBc (mkMarshalCode cconv |
|---|
| 91 | (r_offW, r_rep) addr_offW |
|---|
| 92 | (zip args_offW a_reps)) `thenBc` \ addr_of_marshaller -> |
|---|
| 93 | - recordMallocBc addr_of_marshaller `thenBc_` |
|---|
| 94 | + recordItblMallocBc (ItblPtr (castFunPtrToPtr addr_of_marshaller)) `thenBc_` |
|---|
| 95 | let |
|---|
| 96 | -- Offset of the next stack frame down the stack. The CCALL |
|---|
| 97 | -- instruction needs to describe the chunk of stack containing |
|---|
| 98 | hunk ./compiler/ghci/ByteCodeGen.lhs 932 |
|---|
| 99 | stk_offset = d_after_r - s |
|---|
| 100 | |
|---|
| 101 | -- do the call |
|---|
| 102 | - do_call = unitOL (CCALL stk_offset (castPtr addr_of_marshaller)) |
|---|
| 103 | + do_call = unitOL (CCALL stk_offset (castFunPtrToPtr addr_of_marshaller)) |
|---|
| 104 | -- slide and return |
|---|
| 105 | wrapup = mkSLIDE r_sizeW (d_after_r - r_sizeW - s) |
|---|
| 106 | `snocOL` RETURN_UBX r_rep |
|---|
| 107 | hunk ./compiler/ghci/ByteCodeGen.lhs 1099 |
|---|
| 108 | -- to be on the safe side we copy the string into |
|---|
| 109 | -- a malloc'd area of memory. |
|---|
| 110 | ioToBc (mallocBytes (n+1)) `thenBc` \ ptr -> |
|---|
| 111 | - recordMallocBc ptr `thenBc_` |
|---|
| 112 | + recordMallocBc ptr `thenBc_` |
|---|
| 113 | ioToBc ( |
|---|
| 114 | withForeignPtr fp $ \p -> do |
|---|
| 115 | memcpy ptr p (fromIntegral n) |
|---|
| 116 | hunk ./compiler/ghci/ByteCodeGen.lhs 1305 |
|---|
| 117 | -- ----------------------------------------------------------------------------- |
|---|
| 118 | -- The bytecode generator's monad |
|---|
| 119 | |
|---|
| 120 | +type BcPtr = Either ItblPtr (Ptr ()) |
|---|
| 121 | + |
|---|
| 122 | data BcM_State |
|---|
| 123 | = BcM_State { |
|---|
| 124 | nextlabel :: Int, -- for generating local labels |
|---|
| 125 | hunk ./compiler/ghci/ByteCodeGen.lhs 1310 |
|---|
| 126 | - malloced :: [Ptr ()] } -- ptrs malloced for current BCO |
|---|
| 127 | + malloced :: [BcPtr] } -- thunks malloced for current BCO |
|---|
| 128 | -- Should be free()d when it is GCd |
|---|
| 129 | |
|---|
| 130 | newtype BcM r = BcM (BcM_State -> IO (BcM_State, r)) |
|---|
| 131 | hunk ./compiler/ghci/ByteCodeGen.lhs 1344 |
|---|
| 132 | (>>) = thenBc_ |
|---|
| 133 | return = returnBc |
|---|
| 134 | |
|---|
| 135 | -emitBc :: ([Ptr ()] -> ProtoBCO Name) -> BcM (ProtoBCO Name) |
|---|
| 136 | +emitBc :: ([BcPtr] -> ProtoBCO Name) -> BcM (ProtoBCO Name) |
|---|
| 137 | emitBc bco |
|---|
| 138 | = BcM $ \st -> return (st{malloced=[]}, bco (malloced st)) |
|---|
| 139 | |
|---|
| 140 | hunk ./compiler/ghci/ByteCodeGen.lhs 1350 |
|---|
| 141 | recordMallocBc :: Ptr a -> BcM () |
|---|
| 142 | recordMallocBc a |
|---|
| 143 | - = BcM $ \st -> return (st{malloced = castPtr a : malloced st}, ()) |
|---|
| 144 | + = BcM $ \st -> return (st{malloced = Right (castPtr a) : malloced st}, ()) |
|---|
| 145 | + |
|---|
| 146 | +recordItblMallocBc :: ItblPtr -> BcM () |
|---|
| 147 | +recordItblMallocBc a |
|---|
| 148 | + = BcM $ \st -> return (st{malloced = Left a : malloced st}, ()) |
|---|
| 149 | |
|---|
| 150 | getLabelBc :: BcM Int |
|---|
| 151 | getLabelBc |
|---|
| 152 | hunk ./compiler/ghci/ByteCodeInstr.lhs 14 |
|---|
| 153 | #include "HsVersions.h" |
|---|
| 154 | #include "../includes/MachDeps.h" |
|---|
| 155 | |
|---|
| 156 | +import ByteCodeItbls ( ItblPtr ) |
|---|
| 157 | + |
|---|
| 158 | import Outputable |
|---|
| 159 | import Name ( Name ) |
|---|
| 160 | import Id ( Id ) |
|---|
| 161 | hunk ./compiler/ghci/ByteCodeInstr.lhs 42 |
|---|
| 162 | -- what the BCO came from |
|---|
| 163 | protoBCOExpr :: Either [AnnAlt Id VarSet] (AnnExpr Id VarSet), |
|---|
| 164 | -- malloc'd pointers |
|---|
| 165 | - protoBCOPtrs :: [Ptr ()] |
|---|
| 166 | + protoBCOPtrs :: [Either ItblPtr (Ptr ())] |
|---|
| 167 | } |
|---|
| 168 | |
|---|
| 169 | type LocalLabel = Int |
|---|
| 170 | hunk ./compiler/ghci/ByteCodeItbls.lhs 10 |
|---|
| 171 | |
|---|
| 172 | {-# OPTIONS -optc-DNON_POSIX_SOURCE #-} |
|---|
| 173 | |
|---|
| 174 | -module ByteCodeItbls ( ItblEnv, ItblPtr, mkITbls ) where |
|---|
| 175 | +module ByteCodeItbls ( ItblEnv, ItblPtr(..), itblCode, mkITbls ) where |
|---|
| 176 | |
|---|
| 177 | #include "HsVersions.h" |
|---|
| 178 | |
|---|
| 179 | hunk ./compiler/ghci/ByteCodeItbls.lhs 14 |
|---|
| 180 | +import ByteCodeFFI ( newExec ) |
|---|
| 181 | import Name ( Name, getName ) |
|---|
| 182 | import NameEnv |
|---|
| 183 | import SMRep ( typeCgRep ) |
|---|
| 184 | hunk ./compiler/ghci/ByteCodeItbls.lhs 26 |
|---|
| 185 | import Util ( lengthIs, listLengthCmp ) |
|---|
| 186 | |
|---|
| 187 | import Foreign |
|---|
| 188 | -import Foreign.C |
|---|
| 189 | import DATA_BITS ( Bits(..), shiftR ) |
|---|
| 190 | |
|---|
| 191 | import GHC.Exts ( Int(I#), addr2Int# ) |
|---|
| 192 | hunk ./compiler/ghci/ByteCodeItbls.lhs 43 |
|---|
| 193 | %************************************************************************ |
|---|
| 194 | |
|---|
| 195 | \begin{code} |
|---|
| 196 | -type ItblPtr = Ptr StgInfoTable |
|---|
| 197 | +newtype ItblPtr = ItblPtr (Ptr ()) deriving Show |
|---|
| 198 | + |
|---|
| 199 | +itblCode :: ItblPtr -> Ptr () |
|---|
| 200 | +itblCode (ItblPtr ptr) |
|---|
| 201 | + = (castPtr ptr) `plusPtr` (wORD_SIZE * 2) |
|---|
| 202 | + |
|---|
| 203 | type ItblEnv = NameEnv (Name, ItblPtr) |
|---|
| 204 | -- We need the Name in the range so we know which |
|---|
| 205 | -- elements to filter out when unloading a module |
|---|
| 206 | hunk ./compiler/ghci/ByteCodeItbls.lhs 115 |
|---|
| 207 | -- This is the only arch-dependent bit. |
|---|
| 208 | code = mkJumpToAddr entry_addr |
|---|
| 209 | in |
|---|
| 210 | - do addr <- malloc_exec (sizeOf itbl) |
|---|
| 211 | + do addr <- newExec [itbl] |
|---|
| 212 | --putStrLn ("SIZE of itbl is " ++ show (sizeOf itbl)) |
|---|
| 213 | --putStrLn ("# ptrs of itbl is " ++ show ptrs) |
|---|
| 214 | --putStrLn ("# nptrs of itbl is " ++ show nptrs_really) |
|---|
| 215 | hunk ./compiler/ghci/ByteCodeItbls.lhs 119 |
|---|
| 216 | - poke addr itbl |
|---|
| 217 | - return (getName dcon, addr `plusPtr` (2 * wORD_SIZE)) |
|---|
| 218 | + return (getName dcon, ItblPtr (castFunPtrToPtr addr)) |
|---|
| 219 | |
|---|
| 220 | |
|---|
| 221 | -- Make code which causes a jump to the given address. This is the |
|---|
| 222 | hunk ./compiler/ghci/ByteCodeItbls.lhs 364 |
|---|
| 223 | load = do addr <- advance |
|---|
| 224 | lift (peek addr) |
|---|
| 225 | |
|---|
| 226 | -foreign import ccall unsafe "allocateExec" |
|---|
| 227 | - _allocateExec :: CUInt -> IO (Ptr a) |
|---|
| 228 | - |
|---|
| 229 | -malloc_exec :: Int -> IO (Ptr a) |
|---|
| 230 | -malloc_exec bytes = _allocateExec (fromIntegral bytes) |
|---|
| 231 | - |
|---|
| 232 | \end{code} |
|---|
| 233 | hunk ./compiler/ghci/ByteCodeLink.lhs 18 |
|---|
| 234 | |
|---|
| 235 | #include "HsVersions.h" |
|---|
| 236 | |
|---|
| 237 | -import ByteCodeItbls ( ItblEnv, ItblPtr ) |
|---|
| 238 | +import ByteCodeItbls ( ItblEnv, ItblPtr, itblCode ) |
|---|
| 239 | import ByteCodeAsm ( UnlinkedBCO(..), BCOPtr(..), sizeSS, ssElts ) |
|---|
| 240 | import ObjLink ( lookupSymbol ) |
|---|
| 241 | |
|---|
| 242 | hunk ./compiler/ghci/ByteCodeLink.lhs 51 |
|---|
| 243 | |
|---|
| 244 | import GHC.Arr ( Array(..) ) |
|---|
| 245 | import GHC.IOBase ( IO(..) ) |
|---|
| 246 | -import GHC.Ptr ( Ptr(..) ) |
|---|
| 247 | +import GHC.Ptr ( Ptr(..), castPtr ) |
|---|
| 248 | import GHC.Base ( writeArray#, RealWorld, Int(..) ) |
|---|
| 249 | \end{code} |
|---|
| 250 | |
|---|
| 251 | hunk ./compiler/ghci/ByteCodeLink.lhs 129 |
|---|
| 252 | ptrs_parr = case ptrs_arr of Array lo hi parr -> parr |
|---|
| 253 | |
|---|
| 254 | itbls_arr = listArray (0, n_itbls-1) linked_itbls |
|---|
| 255 | - :: UArray Int ItblPtr |
|---|
| 256 | + |
|---|
| 257 | itbls_barr = case itbls_arr of UArray lo hi barr -> barr |
|---|
| 258 | |
|---|
| 259 | literals_arr = listArray (0, n_literals-1) linked_literals |
|---|
| 260 | hunk ./compiler/ghci/ByteCodeLink.lhs 227 |
|---|
| 261 | lookupIE :: ItblEnv -> Name -> IO (Ptr a) |
|---|
| 262 | lookupIE ie con_nm |
|---|
| 263 | = case lookupNameEnv ie con_nm of |
|---|
| 264 | - Just (_, Ptr a) -> return (Ptr a) |
|---|
| 265 | + Just (_, a) -> return (castPtr (itblCode a)) |
|---|
| 266 | Nothing |
|---|
| 267 | -> do -- try looking up in the object files. |
|---|
| 268 | let sym_to_find1 = nameToCLabel con_nm "con_info" |
|---|
| 269 | hunk ./rts/Linker.c 13 |
|---|
| 270 | #include "PosixSource.h" |
|---|
| 271 | #endif |
|---|
| 272 | |
|---|
| 273 | -/* Linux needs _GNU_SOURCE to get RTLD_DEFAULT from <dlfcn.h> and |
|---|
| 274 | +/* Linux needs _GNU_SOURCE to get RTLD_DEFAULT from <dlfcn.h> and |
|---|
| 275 | MREMAP_MAYMOVE from <sys/mman.h>. |
|---|
| 276 | */ |
|---|
| 277 | #ifdef __linux__ |
|---|
| 278 | hunk ./rts/Linker.c 1253 |
|---|
| 279 | void *map_addr = NULL; |
|---|
| 280 | #else |
|---|
| 281 | FILE *f; |
|---|
| 282 | - int misalignment; |
|---|
| 283 | #endif |
|---|
| 284 | initLinker(); |
|---|
| 285 | |
|---|
| 286 | hunk ./rts/Linker.c 1258 |
|---|
| 287 | /* debugBelch("loadObj %s\n", path ); */ |
|---|
| 288 | |
|---|
| 289 | - /* Check that we haven't already loaded this object. |
|---|
| 290 | + /* Check that we haven't already loaded this object. |
|---|
| 291 | Ignore requests to load multiple times */ |
|---|
| 292 | { |
|---|
| 293 | ObjectCode *o; |
|---|
| 294 | hunk ./rts/Linker.c 1348 |
|---|
| 295 | #define EXTRA_MAP_FLAGS 0 |
|---|
| 296 | #endif |
|---|
| 297 | |
|---|
| 298 | - oc->image = mmap(map_addr, n, PROT_EXEC|PROT_READ|PROT_WRITE, |
|---|
| 299 | + oc->image = mmap(map_addr, n, PROT_EXEC|PROT_READ|PROT_WRITE, |
|---|
| 300 | MAP_PRIVATE|EXTRA_MAP_FLAGS, fd, 0); |
|---|
| 301 | if (oc->image == MAP_FAILED) |
|---|
| 302 | barf("loadObj: can't map `%s'", path); |
|---|
| 303 | hunk ./rts/Linker.c 1362 |
|---|
| 304 | if (!f) |
|---|
| 305 | barf("loadObj: can't read `%s'", path); |
|---|
| 306 | |
|---|
| 307 | -#ifdef darwin_HOST_OS |
|---|
| 308 | +# if defined(mingw32_HOST_OS) |
|---|
| 309 | + // TODO: We would like to use allocateExec here, but allocateExec |
|---|
| 310 | + // cannot currently allocate blocks large enough. |
|---|
| 311 | + oc->image = VirtualAlloc(NULL, oc->fileSize, MEM_RESERVE | MEM_COMMIT, |
|---|
| 312 | + PAGE_EXECUTE_READWRITE); |
|---|
| 313 | +# elif defined(darwin_HOST_OS) |
|---|
| 314 | // In a Mach-O .o file, all sections can and will be misaligned |
|---|
| 315 | // if the total size of the headers is not a multiple of the |
|---|
| 316 | // desired alignment. This is fine for .o files that only serve |
|---|
| 317 | hunk ./rts/Linker.c 1377 |
|---|
| 318 | // We calculate the correct alignment from the header before |
|---|
| 319 | // reading the file, and then we misalign oc->image on purpose so |
|---|
| 320 | // that the actual sections end up aligned again. |
|---|
| 321 | - misalignment = machoGetMisalignment(f); |
|---|
| 322 | - oc->misalignment = misalignment; |
|---|
| 323 | -#else |
|---|
| 324 | - misalignment = 0; |
|---|
| 325 | -#endif |
|---|
| 326 | - |
|---|
| 327 | + oc->misalignment = machoGetMisalignment(f); |
|---|
| 328 | oc->image = stgMallocBytes(oc->fileSize + misalignment, "loadObj(image)"); |
|---|
| 329 | hunk ./rts/Linker.c 1379 |
|---|
| 330 | - oc->image += misalignment; |
|---|
| 331 | - |
|---|
| 332 | +# else |
|---|
| 333 | + oc->image = stgMallocBytes(oc->fileSize, "loadObj(image)"); |
|---|
| 334 | +# endif |
|---|
| 335 | + |
|---|
| 336 | n = fread ( oc->image, 1, oc->fileSize, f ); |
|---|
| 337 | if (n != oc->fileSize) |
|---|
| 338 | barf("loadObj: error whilst reading `%s'", path); |
|---|
| 339 | hunk ./rts/Linker.c 1495 |
|---|
| 340 | prev->next = oc->next; |
|---|
| 341 | } |
|---|
| 342 | |
|---|
| 343 | - /* We're going to leave this in place, in case there are |
|---|
| 344 | - any pointers from the heap into it: */ |
|---|
| 345 | - /* stgFree(oc->image); */ |
|---|
| 346 | + // We're going to leave this in place, in case there are |
|---|
| 347 | + // any pointers from the heap into it: |
|---|
| 348 | + // #ifdef mingw32_HOST_OS |
|---|
| 349 | + // VirtualFree(oc->image); |
|---|
| 350 | + // #else |
|---|
| 351 | + // stgFree(oc->image); |
|---|
| 352 | + // #endif |
|---|
| 353 | stgFree(oc->fileName); |
|---|
| 354 | stgFree(oc->symbols); |
|---|
| 355 | stgFree(oc->sections); |
|---|
| 356 | hunk ./rts/Linker.c 1576 |
|---|
| 357 | |
|---|
| 358 | /* |
|---|
| 359 | ocAllocateJumpIslands |
|---|
| 360 | - |
|---|
| 361 | + |
|---|
| 362 | Allocate additional space at the end of the object file image to make room |
|---|
| 363 | for jump islands. |
|---|
| 364 | |
|---|
| 365 | hunk ./rts/Storage.c 995 |
|---|
| 366 | in the page, and when the page is emptied (all objects on the page |
|---|
| 367 | are free) we free the page again, not forgetting to make it |
|---|
| 368 | non-executable. |
|---|
| 369 | + |
|---|
| 370 | + TODO: The inability to handle objects bigger than BLOCK_SIZE_W means that |
|---|
| 371 | + the linker cannot use allocateExec for loading object code files |
|---|
| 372 | + on Windows. Once allocateExec can handle larger objects, the linker |
|---|
| 373 | + should be modified to use allocateExec instead of VirtualAlloc. |
|---|
| 374 | ------------------------------------------------------------------------- */ |
|---|
| 375 | |
|---|
| 376 | static bdescr *exec_block; |
|---|
| 377 | } |
|---|
| 378 | |
|---|
| 379 | Context: |
|---|
| 380 | |
|---|
| 381 | [remove unused origPkgIdMap field from PackageState |
|---|
| 382 | Simon Marlow <simonmar@microsoft.com>**20061006105148] |
|---|
| 383 | [Fix _module_registered bug for sparc linux. |
|---|
| 384 | Simon Marlow <simonmar@microsoft.com>**20061006104534 |
|---|
| 385 | Patch by Ferris McCormick <fmccor@gentoo.org> |
|---|
| 386 | This patch has been tested with GHC-6.4.2 where it fixes a |
|---|
| 387 | huge number of testsuite failures (down from 406 to 17) |
|---|
| 388 | ] |
|---|
| 389 | [Cache the package database the first time it is read |
|---|
| 390 | Simon Marlow <simonmar@microsoft.com>**20061006104221 |
|---|
| 391 | This was a slight oversight on my part, I intended to store the |
|---|
| 392 | pristine database in the pkgDatabase of DynFlags, but managed to |
|---|
| 393 | forget to do it. |
|---|
| 394 | ] |
|---|
| 395 | [Improve the correlation betweens documented and existent options |
|---|
| 396 | Ian Lynagh <igloo@earth.li>**20061003220354] |
|---|
| 397 | [Document -dfaststring-stats |
|---|
| 398 | Ian Lynagh <igloo@earth.li>**20061003154147] |
|---|
| 399 | [Rearrange docs to have all the -ddump-* options together |
|---|
| 400 | Ian Lynagh <igloo@earth.li>**20061003153422] |
|---|
| 401 | [Remove unused option -femit-extern-decls |
|---|
| 402 | Ian Lynagh <igloo@earth.li>**20061003145854] |
|---|
| 403 | [Documentation updates |
|---|
| 404 | Ian Lynagh <igloo@earth.li>**20061003142658] |
|---|
| 405 | [Fix typo |
|---|
| 406 | Ian Lynagh <igloo@earth.li>**20061003121926] |
|---|
| 407 | [MERGE: Improve unification error messages (again) (push to 6.6 branch) |
|---|
| 408 | Ian Lynagh <igloo@earth.li>**20061001011202] |
|---|
| 409 | [Latin-1-to-UTF8 pre-processor example for docs from Christian Maeder |
|---|
| 410 | Ian Lynagh <igloo@earth.li>**20061001010700] |
|---|
| 411 | [Amplify scoped tyvar changes |
|---|
| 412 | simonpj@microsoft.com**20060929165038] |
|---|
| 413 | [Update release notes |
|---|
| 414 | simonpj@microsoft.com**20060929122855] |
|---|
| 415 | [Remove casts from lvalues to allow compilation under GCC 4.0 |
|---|
| 416 | brianlsmith@gmail.com**20060929185931] |
|---|
| 417 | [rejig library include/ files |
|---|
| 418 | sof@galois.com**20060929225751] |
|---|
| 419 | [add :edit to the release notes, and improve the docs a bit |
|---|
| 420 | Simon Marlow <simonmar@microsoft.com>**20060929112108] |
|---|
| 421 | [:edit runs notepad by default on Windows |
|---|
| 422 | Simon Marlow <simonmar@microsoft.com>**20060929102739] |
|---|
| 423 | [unbreak :edit patch on Windows |
|---|
| 424 | Simon Marlow <simonmar@microsoft.com>**20060928155951] |
|---|
| 425 | [Fix #906, and do #914 while I'm in here (it wasn't too hard) |
|---|
| 426 | Simon Marlow <simonmar@microsoft.com>**20060928151705] |
|---|
| 427 | [Add basic :edit support |
|---|
| 428 | Simon Marlow <simonmar@microsoft.com>**20060928135156 |
|---|
| 429 | Without jumping to line numbers or %-expansion, we could add that later. |
|---|
| 430 | ] |
|---|
| 431 | [tiny fix in porting docs I just spotted |
|---|
| 432 | Simon Marlow <simonmar@microsoft.com>**20060928105611] |
|---|
| 433 | [only make stdin/stdout unbuffered in GHCi, not runghc or ghc -e. |
|---|
| 434 | Simon Marlow <simonmar@microsoft.com>**20060928105403] |
|---|
| 435 | [testsuite *is* boring |
|---|
| 436 | Simon Marlow <simonmar@microsoft.com>**20060928105342] |
|---|
| 437 | [Fix mulIntMayOflo on 64-bit arches; fixes trac #867 |
|---|
| 438 | Ian Lynagh <igloo@earth.li>**20060928004806 |
|---|
| 439 | We were assuming we could multiply 2 32-bit numbers without overflowing |
|---|
| 440 | a 64-bit number, but we can't as the top bit is the sign bit. |
|---|
| 441 | ] |
|---|
| 442 | [Handle clock_gettime failing |
|---|
| 443 | Ian Lynagh <igloo@earth.li>**20060927234630] |
|---|
| 444 | [fix typo in comment |
|---|
| 445 | Andres Loeh <mail@andres-loeh.de>**20060914235648] |
|---|
| 446 | [remove non-boring directories |
|---|
| 447 | Norman Ramsey <nr@eecs.harvard.edu>**20060915234902] |
|---|
| 448 | [Modify toArgs to parse quotes/escapes like /bin/sh |
|---|
| 449 | rjmccall@gmail.com**20060917003641 |
|---|
| 450 | Addresses ticket #197, which asks for escape sequences to be supported directly (i.e. |
|---|
| 451 | not only in dquoted strings) on :load commands in GHCI. Fix modifies the toArgs |
|---|
| 452 | function to parse its input like /bin/sh does, i.e. recognizing escapes anywhere |
|---|
| 453 | and treating quoted strings as atomic chunks. Thus: |
|---|
| 454 | :load a\ b c\"d e" "f |
|---|
| 455 | would parse with three arguments, namely 'a b', 'c"d', and 'e f'. |
|---|
| 456 | |
|---|
| 457 | toArgs is used to parse arguments for both :load and :main, but doesn't appear to |
|---|
| 458 | be used elsewhere. I see no harm in modifying both to be consistent -- in fact, |
|---|
| 459 | the functionality is probably more useful for :main than for :load. |
|---|
| 460 | ] |
|---|
| 461 | [Rename -no-recomp to -fforce-recomp, and document it |
|---|
| 462 | Simon Marlow <simonmar@microsoft.com>**20060927132707] |
|---|
| 463 | [Make printing of binding results optional in GHCi, and document it |
|---|
| 464 | Simon Marlow <simonmar@microsoft.com>**20060927132550 |
|---|
| 465 | You can say :set -fno-print-bind-result in GHCi to disable this behaviour. |
|---|
| 466 | Addresses #887 |
|---|
| 467 | ] |
|---|
| 468 | [Various documentation improvements suggested by Bulat Ziganshin |
|---|
| 469 | Ian Lynagh <igloo@earth.li>**20060925231855] |
|---|
| 470 | [Fix comment/code inconsistency spotted by Bulat Ziganshin |
|---|
| 471 | Ian Lynagh <igloo@earth.li>**20060925195925 |
|---|
| 472 | I'm not sure if this is the example that was intended, but it's at least |
|---|
| 473 | now consistent. |
|---|
| 474 | ] |
|---|
| 475 | [Document -F in the flag reference |
|---|
| 476 | Ian Lynagh <igloo@earth.li>**20060925134816] |
|---|
| 477 | [Remove duplicate call to getDOpts |
|---|
| 478 | simonpj@microsoft.com**20060922190350] |
|---|
| 479 | [64bit fixes for the symbol lookup table |
|---|
| 480 | sven.panne@aedion.de**20060923162408] |
|---|
| 481 | [Fix Linker import when BREAKPOINT is off |
|---|
| 482 | Manuel M T Chakravarty <chak@cse.unsw.edu.au>**20060921210029] |
|---|
| 483 | [Use --export-dynamic to ensure ghci works on newer openbsds |
|---|
| 484 | Don Stewart <dons@cse.unsw.edu.au>**20060921010155 |
|---|
| 485 | |
|---|
| 486 | Changes to the RTLD_DEFAULT semantics broke the trick we used to ensure |
|---|
| 487 | libc symbols were available to the ghci linker, in OpenBSD 4.0. We can |
|---|
| 488 | fix this by linking the ghc binary itself with --export-dynamic on this |
|---|
| 489 | system, removing the need for any magic Linker.c games. |
|---|
| 490 | |
|---|
| 491 | GHCi now works on OpenBSD 4.0 |
|---|
| 492 | |
|---|
| 493 | Contributed by Eric Mertens <emertens at gmail.com> |
|---|
| 494 | |
|---|
| 495 | ] |
|---|
| 496 | [Currently we don't build cabal-setup |
|---|
| 497 | sven.panne@aedion.de**20060919081759] |
|---|
| 498 | [Packages cleanup, and allow new packages to be loaded with :set again |
|---|
| 499 | Simon Marlow <simonmar@microsoft.com>**20060919012448 |
|---|
| 500 | |
|---|
| 501 | This cleans up the package subsystem a little. There are some |
|---|
| 502 | changes to the GHC API as a result. |
|---|
| 503 | |
|---|
| 504 | - GHC.init and GHC.initFromArgs are no longer necessary. |
|---|
| 505 | |
|---|
| 506 | - GHC.newSession takes the root of the GHC tree as an argument |
|---|
| 507 | (previously passed to GHC.init). |
|---|
| 508 | |
|---|
| 509 | - You *must* do GHC.setSessionDynFlags after GHC.newSession, |
|---|
| 510 | this is what loads the package database. |
|---|
| 511 | |
|---|
| 512 | - Several global vars removed from SysTools |
|---|
| 513 | |
|---|
| 514 | - The :set command in GHCi can now cause new packages to be loaded, |
|---|
| 515 | or can hide/ignore existing packages. |
|---|
| 516 | ] |
|---|
| 517 | [one more boring file |
|---|
| 518 | Simon Marlow <simonmar@microsoft.com>**20060919011849] |
|---|
| 519 | [fix one boring file |
|---|
| 520 | Simon Marlow <simonmar@microsoft.com>**20060919011823] |
|---|
| 521 | [unused imports |
|---|
| 522 | Simon Marlow <simonmar@microsoft.com>**20060919011746] |
|---|
| 523 | [add boring files from a build tree |
|---|
| 524 | Simon Marlow <simonmar@microsoft.com>**20060919011722] |
|---|
| 525 | [remove old comment |
|---|
| 526 | Simon Marlow <simonmar@microsoft.com>**20060919010333] |
|---|
| 527 | [unused import |
|---|
| 528 | Simon Marlow <simonmar@microsoft.com>**20060919010303] |
|---|
| 529 | [some updates |
|---|
| 530 | Simon Marlow <simonmar@microsoft.com>**20060918232924] |
|---|
| 531 | [use ghc-pkg --force-files, and update command-line syntax |
|---|
| 532 | Simon Marlow <simonmar@microsoft.com>**20060918232903] |
|---|
| 533 | [add --force-files, like --force but doesn't allow missing dependencies |
|---|
| 534 | Simon Marlow <simonmar@microsoft.com>**20060918232834] |
|---|
| 535 | [emit an error if the user ran autoconf instead of autoreconf |
|---|
| 536 | Simon Marlow <simonmar@microsoft.com>**20060916084205] |
|---|
| 537 | [Sanity check that all the core packages are present |
|---|
| 538 | Simon Marlow <simonmar@microsoft.com>**20060916070529 |
|---|
| 539 | To catch the case of not running darcs-all get. |
|---|
| 540 | ] |
|---|
| 541 | [reformat import |
|---|
| 542 | Simon Marlow <simonmar@microsoft.com>**20060913103512] |
|---|
| 543 | [minor reformatting |
|---|
| 544 | Simon Marlow <simonmar@microsoft.com>**20060913103427] |
|---|
| 545 | [compiler/ isn't boring |
|---|
| 546 | Simon Marlow <simonmar@microsoft.com>**20060913021300] |
|---|
| 547 | [Added parsing rule for BangPattern in case expr |
|---|
| 548 | Markus Lauer <markus.lauer@acm.org>**20060918161850] |
|---|
| 549 | [Fix a bug in subsumption, and tweak error messages |
|---|
| 550 | simonpj@microsoft.com**20060918005223 |
|---|
| 551 | |
|---|
| 552 | This commit does two largely-unrelated things, but they hit the same code. |
|---|
| 553 | |
|---|
| 554 | First, I tweaked the error messages a bit, to give better errors |
|---|
| 555 | for impredicative polymorphism. This added the mb_fun argument to |
|---|
| 556 | tc_sub. |
|---|
| 557 | |
|---|
| 558 | Second, I fixed a long-standing bug in tc_sub. In the isBoxyTyVar case |
|---|
| 559 | of tc_sub (rule F2) I was not recursing to tc_sub as the rule suggests, |
|---|
| 560 | but rather calling u_tys. This is plain wrong, because the first |
|---|
| 561 | arugment might have more foralls. |
|---|
| 562 | |
|---|
| 563 | The solution is to recurse to tc_sub, but that in turn requires a parameter, |
|---|
| 564 | exp_ib, which says when we are inside a box. |
|---|
| 565 | |
|---|
| 566 | Test is tc210. |
|---|
| 567 | |
|---|
| 568 | ] |
|---|
| 569 | [Comments |
|---|
| 570 | simonpj@microsoft.com**20060918005142] |
|---|
| 571 | [Ensure that only zonked poly_ids are passed to tcSpecPrag |
|---|
| 572 | simonpj@microsoft.com**20060918004805 |
|---|
| 573 | |
|---|
| 574 | This is a long-standing bug really (Trac #900). The poly_id passed |
|---|
| 575 | to tcSpecPrag should be zonked, else it calls tcSubExp with a non-zonked |
|---|
| 576 | type; but that contradicts the latter's invariant. |
|---|
| 577 | |
|---|
| 578 | I ended up doing a bit of refactoring too. The extra lines are |
|---|
| 579 | comments I think; the code line count is reduced. |
|---|
| 580 | |
|---|
| 581 | Test is tc212.hs |
|---|
| 582 | |
|---|
| 583 | ] |
|---|
| 584 | [Comments only |
|---|
| 585 | simonpj@microsoft.com**20060918004109] |
|---|
| 586 | [Add a missing renamer dump (related to Template Haskell) |
|---|
| 587 | simonpj@microsoft.com**20060917171707] |
|---|
| 588 | [Instantiate data constructor type variables with the type constructor type variables in constraints for derived class instances. Fixes instance deriving for GADTs which declar H98 types, closing ticket #902. |
|---|
| 589 | bringert@cs.chalmers.se**20060915233315] |
|---|
| 590 | [Fixed error in user's manual, gadt section, part about deriving. Data constructor type was Maybe, should be Maybe1. |
|---|
| 591 | bringert@cs.chalmers.se**20060915230517] |
|---|
| 592 | [remove generated files in a 'finally' manner |
|---|
| 593 | sof@galois.com**20060909144432] |
|---|
| 594 | [Replace "&" with "and" as this also gets pulled into the docbook docs |
|---|
| 595 | Ian Lynagh <igloo@earth.li>**20060912125617] |
|---|
| 596 | [Another s/autrijus/audreyt/ in comments. |
|---|
| 597 | audreyt@audreyt.org**20060912121323] |
|---|
| 598 | [Take away XXXs in GADT records related code that are no longer TODOs. |
|---|
| 599 | audreyt@audreyt.org**20060912120942] |
|---|
| 600 | [Add postfix ops to the release notes |
|---|
| 601 | simonpj@microsoft.com**20060912081104] |
|---|
| 602 | [Document postfix operators |
|---|
| 603 | simonpj@microsoft.com**20060911162843] |
|---|
| 604 | [Fix ~2000 second profiling time wrapping bug |
|---|
| 605 | Ian Lynagh <igloo@earth.li>**20060911223210] |
|---|
| 606 | [move the "meat" into the wiki, this file just contains pointers now |
|---|
| 607 | Simon Marlow <simonmar@microsoft.com>**20060911135037] |
|---|
| 608 | [Simplify desugaring of left sections |
|---|
| 609 | simonpj@microsoft.com**20060911083510 |
|---|
| 610 | |
|---|
| 611 | MERGE TO 6.6 branch! |
|---|
| 612 | |
|---|
| 613 | Some while ago I made the type checker a tiny bit more lenient about |
|---|
| 614 | left sections, so that |
|---|
| 615 | (x !) |
|---|
| 616 | would typecheck iff |
|---|
| 617 | ((!) x) |
|---|
| 618 | typechecks. |
|---|
| 619 | |
|---|
| 620 | Strictly, Haskell 98 requires that the section typechecks iff |
|---|
| 621 | (\y. (!) x y) |
|---|
| 622 | typechecks, and I should really have made the relaxation dependent on a |
|---|
| 623 | flag, but I didn't. |
|---|
| 624 | |
|---|
| 625 | Anyway, this commit fixes the *desugarer* so that it correctly desugars |
|---|
| 626 | the programs that the typechecker passes. |
|---|
| 627 | |
|---|
| 628 | |
|---|
| 629 | ] |
|---|
| 630 | [Add comment |
|---|
| 631 | simonpj@microsoft.com**20060911083440] |
|---|
| 632 | [adapt stylesheet to example-contents class used by xsltproc |
|---|
| 633 | Ross Paterson <ross@soi.city.ac.uk>**20060910143941] |
|---|
| 634 | [Fix warnings traceBegin/traceEnd implicitly declared |
|---|
| 635 | Ian Lynagh <igloo@earth.li>**20060910200611] |
|---|
| 636 | [Fix linking to expf on Windows |
|---|
| 637 | Ian Lynagh <igloo@earth.li>**20060910141506] |
|---|
| 638 | [8 byte align data. Fixes SIBGUSs on HPPA/Linux. |
|---|
| 639 | Ian Lynagh <igloo@earth.li>**20060909102445] |
|---|
| 640 | [We now need alex >= 2.0.1 |
|---|
| 641 | Ian Lynagh <igloo@earth.li>**20060908191706] |
|---|
| 642 | [Add source code links to Haddock docs |
|---|
| 643 | Simon Marlow <simonmar@microsoft.com>**20060908112725 |
|---|
| 644 | |
|---|
| 645 | Right now we can only manage to add a source code link for the module, |
|---|
| 646 | but that's better than nothing. |
|---|
| 647 | |
|---|
| 648 | I had to put the list of core packages in a Makefile variable, |
|---|
| 649 | $(CorePackages), so we'll have to be careful to keep this up to date. |
|---|
| 650 | (I could have slurped it out of libraries/core-packages with $(shell), |
|---|
| 651 | but that's ugly and really slow on Windows). |
|---|
| 652 | |
|---|
| 653 | There are a couple of new tweakables: CorePackageSourceURL and |
|---|
| 654 | ExtraPackageSourceURL in config.mk.in, set these to the appropriate |
|---|
| 655 | patterns for generating source links. |
|---|
| 656 | |
|---|
| 657 | (when we merge this patch onto the HEAD we'll have to tweak these |
|---|
| 658 | settings). |
|---|
| 659 | |
|---|
| 660 | Unfortunately it still doesn't work for all the modules, because |
|---|
| 661 | modules compiled without -cpp don't get any #line directives. More |
|---|
| 662 | hackery required... |
|---|
| 663 | ] |
|---|
| 664 | [Catch errors in pattern matching for unboxed tuples |
|---|
| 665 | simonpj@microsoft.com**20060908095217 |
|---|
| 666 | |
|---|
| 667 | When fiddling with pattern-matching for unboxed tuples, I'd messed up |
|---|
| 668 | the slightly-tricky tests for pattern matching on unboxed tuples, notably |
|---|
| 669 | case (# foo, bar #) of r -> ...r... |
|---|
| 670 | |
|---|
| 671 | The fix is in TcPat, and test are tcfail115, tcfail120, and tc209 |
|---|
| 672 | |
|---|
| 673 | ] |
|---|
| 674 | [Fixed typo in users guide section about lexically scoped type variables. |
|---|
| 675 | bringert@cs.chalmers.se**20060907214626] |
|---|
| 676 | [Typo, spotted by Bulat Ziganshin |
|---|
| 677 | Ian Lynagh <igloo@earth.li>**20060908014947] |
|---|
| 678 | [Release note tweaks suggested by Bulat Ziganshin |
|---|
| 679 | Ian Lynagh <igloo@earth.li>**20060908014050] |
|---|
| 680 | [Doc fix: generic classes are no longer broken |
|---|
| 681 | Ian Lynagh <igloo@earth.li>**20060907205426 |
|---|
| 682 | Spotted by Bulat Ziganshin. |
|---|
| 683 | ] |
|---|
| 684 | [If we get an unknown or unimplemented opcode, say what it is |
|---|
| 685 | Ian Lynagh <igloo@earth.li>**20060907171038] |
|---|
| 686 | [remove __HUGS__ #if's (Hugs uses the standalone version) |
|---|
| 687 | Ross Paterson <ross@soi.city.ac.uk>**20060907152930] |
|---|
| 688 | [Fix the handling of names in declaration brackets |
|---|
| 689 | simonpj@microsoft.com**20060907141845 |
|---|
| 690 | |
|---|
| 691 | The handling of top-level names in declaration brackets is a bit tricky. |
|---|
| 692 | This commit fixes Trac #977; test is TH_spliceD2. |
|---|
| 693 | |
|---|
| 694 | The changes are commented in RnExpr.rnBracket and RdrName.hideSomeUnquals |
|---|
| 695 | |
|---|
| 696 | |
|---|
| 697 | ] |
|---|
| 698 | [Remove the -optP-P from .raw-hs generation |
|---|
| 699 | Simon Marlow <simonmar@microsoft.com>**20060907151855 |
|---|
| 700 | We need the #line directives left in, so that Haddock can figure out |
|---|
| 701 | what the name of the original source file was called, which is |
|---|
| 702 | necessary for generating source links. You probably now need an |
|---|
| 703 | updated Haddock to generate HTML from the libraries, but a release |
|---|
| 704 | will be forthcoming shortly. |
|---|
| 705 | |
|---|
| 706 | ] |
|---|
| 707 | [urk, the dependencies added in the last commit don't really work properly |
|---|
| 708 | Simon Marlow <simonmar@microsoft.com>**20060907113702 |
|---|
| 709 | first, I got the dependencies wrong (should be the .o file, not the |
|---|
| 710 | .hs), and secondly GHC's recompilation checker refuses to recompile |
|---|
| 711 | these files anyway. I haven't done anything about the second problem |
|---|
| 712 | yet, except to comment it. |
|---|
| 713 | |
|---|
| 714 | ] |
|---|
| 715 | [Add dependencies on .h files #included into Haskell source |
|---|
| 716 | Simon Marlow <simonmar@microsoft.com>**20060907094751 |
|---|
| 717 | Our .depend machinery doesn't automatically generate these, so we have |
|---|
| 718 | to add them manually. (this fixes one instance of missing |
|---|
| 719 | dependencies in the GHC build tree, there are lots more...). |
|---|
| 720 | ] |
|---|
| 721 | [Remove CONSTR_CHARLIKE and CONSTR_INTLIKE closure types |
|---|
| 722 | Simon Marlow <simonmar@microsoft.com>**20060907093005 |
|---|
| 723 | These closure types aren't used/needed, as far as I can tell. The |
|---|
| 724 | commoning up of Chars/Ints happens by comparing info pointers, and |
|---|
| 725 | the info table for a dynamic C#/I# is CONSTR_0_1. The RTS seemed |
|---|
| 726 | a little confused about whether CONSTR_CHARLIKE/CONSTR_INTLIKE were |
|---|
| 727 | supposed to be static or dynamic closures, too. |
|---|
| 728 | ] |
|---|
| 729 | [Documentation for impredicative polymorphism |
|---|
| 730 | simonpj@microsoft.com**20060907111540] |
|---|
| 731 | [Comments only |
|---|
| 732 | simonpj@microsoft.com**20060907105705] |
|---|
| 733 | [Remove result type signatures from documentation |
|---|
| 734 | simonpj@microsoft.com**20060907104301] |
|---|
| 735 | [Fix bug in error message |
|---|
| 736 | simonpj@microsoft.com**20060907103052] |
|---|
| 737 | [Result type signatures are no longer supported (partial) |
|---|
| 738 | simonpj@microsoft.com**20060907102718 |
|---|
| 739 | |
|---|
| 740 | I had failed to remove the bit where result type signatures bind |
|---|
| 741 | lexical type variables. And now we are planning to remove them entirely. |
|---|
| 742 | |
|---|
| 743 | This commit therefore does a partial removal (to avoid destablising 6.6). |
|---|
| 744 | It also arranges that |
|---|
| 745 | f :: sig = rhs |
|---|
| 746 | means a *pattern* binding (not a function binding with no arguments |
|---|
| 747 | and a result signature), which makes sense. |
|---|
| 748 | |
|---|
| 749 | ] |
|---|
| 750 | [Remove trailing CRs with sed rather than relying on diff in nofib |
|---|
| 751 | Ian Lynagh <igloo@earth.li>**20060907112027 |
|---|
| 752 | Some diffs don't understand --strip-trailing-cr. |
|---|
| 753 | ] |
|---|
| 754 | [document -V in the +RTS --help outpout |
|---|
| 755 | Simon Marlow <simonmar@microsoft.com>**20060907084445] |
|---|
| 756 | [Pattern-match warning police |
|---|
| 757 | simonpj@microsoft.com**20060906220417] |
|---|
| 758 | [Improve error reporting for SigTvs, and add comments |
|---|
| 759 | simonpj@microsoft.com**20060906220309] |
|---|
| 760 | [Check that top-level binders are unqualified names |
|---|
| 761 | simonpj@microsoft.com**20060906220101 |
|---|
| 762 | |
|---|
| 763 | Not having this check led to strange error messages. |
|---|
| 764 | See test rnfail046. |
|---|
| 765 | |
|---|
| 766 | ] |
|---|
| 767 | [Documentation for lexically-scoped type variables |
|---|
| 768 | simonpj@microsoft.com**20060906164103 |
|---|
| 769 | |
|---|
| 770 | GHC's design for lexically scoped type variables has changed. |
|---|
| 771 | Here, belatedly, is the documentation. |
|---|
| 772 | |
|---|
| 773 | ] |
|---|
| 774 | [Make record selection look cheap |
|---|
| 775 | simonpj@microsoft.com**20060906115242 |
|---|
| 776 | |
|---|
| 777 | exprIsCheap was already making record selection look cheap, esp for |
|---|
| 778 | dictionary selection; e.g. |
|---|
| 779 | (==) dEq |
|---|
| 780 | |
|---|
| 781 | The idea is to allow those record selections to migrate inside a |
|---|
| 782 | lambda, because on the whole it's more expensive to share than |
|---|
| 783 | repeat them. |
|---|
| 784 | |
|---|
| 785 | But sometimes dictionary selection is nested; e.g. |
|---|
| 786 | (==) ($p1Num dNum) |
|---|
| 787 | |
|---|
| 788 | This turned out to make a (fragile) rewrite rule fire a little |
|---|
| 789 | more robustly, but it seems like a good idea in any case. |
|---|
| 790 | |
|---|
| 791 | This patch makes nested record selections also look cheap. |
|---|
| 792 | |
|---|
| 793 | ] |
|---|
| 794 | [Now in the wiki |
|---|
| 795 | Simon Marlow <simonmar@microsoft.com>**20060906104022] |
|---|
| 796 | [-threaded and -prof do not currently work together |
|---|
| 797 | Simon Marlow <simonmar@microsoft.com>**20060906093158] |
|---|
| 798 | [Don't fail on missing happy/alex if we don't need them |
|---|
| 799 | Ian Lynagh <igloo@earth.li>**20060906195415] |
|---|
| 800 | [Fix the Windows "VirtualAlloc MEM_COMMIT failed" bug |
|---|
| 801 | Ian Lynagh <igloo@earth.li>**20060906112750 |
|---|
| 802 | We had |
|---|
| 803 | base=01100000 size=1048576 size_delta=0 it->size=2097152 |
|---|
| 804 | it->base=00F00000 base-it->base=00200000 |
|---|
| 805 | in commitBlocks. |
|---|
| 806 | Esa Ilari Vuokko identified this inequality test as the cause. |
|---|
| 807 | ] |
|---|
| 808 | [Tell the 6.6 branch where to find extralibs |
|---|
| 809 | Ian Lynagh <igloo@earth.li>**20060906124640] |
|---|
| 810 | [Correct the Cabal version number and remove features. |
|---|
| 811 | Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060905232047 |
|---|
| 812 | We're not going to include cabal-setup and cabal-install in this release. |
|---|
| 813 | ] |
|---|
| 814 | [Strip trailing CRs when comparing output for nofib. Fixes #797. |
|---|
| 815 | Ian Lynagh <igloo@earth.li>**20060905184910] |
|---|
| 816 | [Fix dependency analysis (notably bindInstsOfLocalFuns) in TcBinds |
|---|
| 817 | simonpj@microsoft.com**20060905105143 |
|---|
| 818 | |
|---|
| 819 | GHC 6.5 does enhanced dependency analysis for recursive bindings, to |
|---|
| 820 | maximise polymorphism based on type signatures. (See Mark Jones's |
|---|
| 821 | THIH paper.) |
|---|
| 822 | |
|---|
| 823 | I didn't do the bindInstsOfLocalFuns part correctly though, and jhc |
|---|
| 824 | showed up the bug. (It only matters when you have a recursive group |
|---|
| 825 | of two or more functions with a type signature, not at top level, which |
|---|
| 826 | is why it hasn't shown up till now.) |
|---|
| 827 | |
|---|
| 828 | Test is tc207.hs |
|---|
| 829 | |
|---|
| 830 | |
|---|
| 831 | ] |
|---|
| 832 | [Add note about overlapping instances |
|---|
| 833 | simonpj@microsoft.com**20060905092201] |
|---|
| 834 | [Record that TH doesn't support pattern types signature |
|---|
| 835 | simonpj@microsoft.com**20060905091834] |
|---|
| 836 | [new RTS flag: -V to modify the resolution of the RTS timer |
|---|
| 837 | Ian Lynagh <igloo@earth.li>**20060905141545 |
|---|
| 838 | Fixed version of an old patch by Simon Marlow. His description read: |
|---|
| 839 | Also, now an arbitrarily short context switch interval may now be |
|---|
| 840 | specified, as we increase the RTS ticker's resolution to match the |
|---|
| 841 | requested context switch interval. This also applies to +RTS -i (heap |
|---|
| 842 | profiling) and +RTS -I (the idle GC timer). +RTS -V is actually only |
|---|
| 843 | required for increasing the resolution of the profile timer. |
|---|
| 844 | ] |
|---|
| 845 | [Refactoring for derived Read |
|---|
| 846 | simonpj@microsoft.com**20060904132212 |
|---|
| 847 | |
|---|
| 848 | There are no functional changes in this commit. But the code for |
|---|
| 849 | derived Read is refactored to make it tidier --- and also to make |
|---|
| 850 | it very easy if we want derived Read to parse the prefix form of |
|---|
| 851 | infix ocnstructors. |
|---|
| 852 | |
|---|
| 853 | For example, |
|---|
| 854 | data T = Int `T1` Int |
|---|
| 855 | According to the H98 report, the derived Read instance will parse |
|---|
| 856 | infix uses of T1, but not prefix uses (T1 4 3). It's arguable that it |
|---|
| 857 | should parse both -- and easy to implement, but it would cause a little bit |
|---|
| 858 | of code bloat. |
|---|
| 859 | |
|---|
| 860 | Similarly records. |
|---|
| 861 | |
|---|
| 862 | Anyway this commit doesn't implement the change; just makes it easy |
|---|
| 863 | to do so. |
|---|
| 864 | |
|---|
| 865 | ] |
|---|
| 866 | [Improve pretty-printing for HsExpr |
|---|
| 867 | simonpj@microsoft.com**20060904131334] |
|---|
| 868 | [Fix typos. |
|---|
| 869 | Ian Lynagh <igloo@earth.li>**20060904190958] |
|---|
| 870 | [Enable bang-patterns only when the flag says so (had missed a case before) |
|---|
| 871 | simonpj@microsoft.com**20060904131412] |
|---|
| 872 | [Remove linear implicit parameters, and document in release notes |
|---|
| 873 | simonpj@microsoft.com**20060904125105] |
|---|
| 874 | [Release notes should mention better newtype-deriving |
|---|
| 875 | simonpj@microsoft.com**20060904124458] |
|---|
| 876 | [Documentation for bang patterns, and other improvements |
|---|
| 877 | simonpj@microsoft.com**20060904123438] |
|---|
| 878 | [Add a hint on tab completion |
|---|
| 879 | Ian Lynagh <igloo@earth.li>**20060903224823] |
|---|
| 880 | [Add :main docs to ghci commands page |
|---|
| 881 | Ian Lynagh <igloo@earth.li>**20060903223107] |
|---|
| 882 | [Ambiguities are now allowed in ghci command names |
|---|
| 883 | Ian Lynagh <igloo@earth.li>**20060903222115] |
|---|
| 884 | [More output updates |
|---|
| 885 | Ian Lynagh <igloo@earth.li>**20060903221933] |
|---|
| 886 | [Add docs for :main |
|---|
| 887 | Ian Lynagh <igloo@earth.li>**20060903220130] |
|---|
| 888 | [More doc output fixes |
|---|
| 889 | Ian Lynagh <igloo@earth.li>**20060903215748] |
|---|
| 890 | [Update ghci output in docs |
|---|
| 891 | Ian Lynagh <igloo@earth.li>**20060903214128] |
|---|
| 892 | [Fix typo |
|---|
| 893 | Ian Lynagh <igloo@earth.li>**20060903212651] |
|---|
| 894 | [Update ghci output in docs |
|---|
| 895 | Ian Lynagh <igloo@earth.li>**20060903210805] |
|---|
| 896 | [Remove a tab causing ghci's :? alignment to go wrong |
|---|
| 897 | Ian Lynagh <igloo@earth.li>**20060903210349] |
|---|
| 898 | [Change default repo root for the 6.6 branch |
|---|
| 899 | Ian Lynagh <igloo@earth.li>**20060902174936] |
|---|
| 900 | [Don't lose linked list tail |
|---|
| 901 | Esa Ilari Vuokko <ei@vuokko.info>**20060831223315] |
|---|
| 902 | [Fix Windows MBlock alloctor bookkeeping bug |
|---|
| 903 | Esa Ilari Vuokko <ei@vuokko.info>**20060830185540] |
|---|
| 904 | [-fglasgow-exts no longer implies -fbang-patterns |
|---|
| 905 | simonpj@microsoft.com**20060901125714] |
|---|
| 906 | [Fix error in release notes, spotted by Esa Ilari Vuokko |
|---|
| 907 | Ian Lynagh <igloo@earth.li>**20060901125841] |
|---|
| 908 | [Remove changes in packages we don't build |
|---|
| 909 | Ian Lynagh <igloo@earth.li>**20060901125436] |
|---|
| 910 | [Don't enable SMP if we are unregisterised |
|---|
| 911 | Ian Lynagh <igloo@earth.li>**20060829123228] |
|---|
| 912 | [Add a pointer to the fundeps paper |
|---|
| 913 | simonpj@microsoft.com**20060831135511] |
|---|
| 914 | [free the task *after* calling closeCond and closeMutex |
|---|
| 915 | Simon Marlow <simonmar@microsoft.com>**20060831103648] |
|---|
| 916 | [add missing ghc_ge_605 |
|---|
| 917 | Simon Marlow <simonmar@microsoft.com>**20060831101813] |
|---|
| 918 | [don't closeMutex() the Capability lock |
|---|
| 919 | Simon Marlow <simonmar@microsoft.com>**20060831085728 |
|---|
| 920 | There might be threads in foreign calls that will attempt to return |
|---|
| 921 | via resumeThread() and grab this lock, so we can't safely destroy it. |
|---|
| 922 | |
|---|
| 923 | Fixes one cause of |
|---|
| 924 | |
|---|
| 925 | internal error: ASSERTION FAILED: file Capability.c, line 90 |
|---|
| 926 | |
|---|
| 927 | although I haven't repeated that assertion failure in the wild, only |
|---|
| 928 | with a specially crafted test case, so I can't be sure I really got |
|---|
| 929 | it. |
|---|
| 930 | ] |
|---|
| 931 | [fix Unix build |
|---|
| 932 | Simon Marlow <simonmar@microsoft.com>**20060830141529] |
|---|
| 933 | [add sysErrorBelch() for reporting system call errors |
|---|
| 934 | Simon Marlow <simonmar@microsoft.com>**20060830140252] |
|---|
| 935 | [call ShutdownIOManager() before closing handles |
|---|
| 936 | Simon Marlow <simonmar@microsoft.com>**20060830123131 |
|---|
| 937 | To avoid IO requests completing only to discover that the |
|---|
| 938 | completed_table_sema has been CloseHandle()'d. This all looks a bit |
|---|
| 939 | wrong, though: we shouldn't really be waiting for these requests to |
|---|
| 940 | complete, they might take forever. |
|---|
| 941 | ] |
|---|
| 942 | [Windows: make some soft failures into fatal errors |
|---|
| 943 | Simon Marlow <simonmar@microsoft.com>**20060830091859 |
|---|
| 944 | Some of the memory allocation calls were being checked for error, but |
|---|
| 945 | the RTS was printing a message and continuing. These error cases |
|---|
| 946 | lead to crashes later, so better to just fail immediately. |
|---|
| 947 | ] |
|---|
| 948 | [MAYBE_GC: initialise HpAlloc |
|---|
| 949 | Simon Marlow <simonmar@microsoft.com>**20060830091529 |
|---|
| 950 | HpAlloc was not being set when returning to the scheduler via MAYBE_GC(), |
|---|
| 951 | which at the least was just wrong (the scheduler might allocate a large |
|---|
| 952 | block more than once), and at worst could lead to crashes if HpAlloc contains |
|---|
| 953 | garbage. |
|---|
| 954 | |
|---|
| 955 | Fixes at least one threaded2 test on Windows. |
|---|
| 956 | ] |
|---|
| 957 | [FILL_SLOP: don't fill slop for BLACKHOLE/CAF_BLACKHOLE |
|---|
| 958 | Simon Marlow <simonmar@microsoft.com>**20060830083311 |
|---|
| 959 | This affects -debug only, avoids crash with test conc012. |
|---|
| 960 | ] |
|---|
| 961 | [oops, got the sense of the error case wrong |
|---|
| 962 | Simon Marlow <simonmar@microsoft.com>**20060829151751] |
|---|
| 963 | [fix some rerrors in the worker counting |
|---|
| 964 | Simon Marlow <simonmar@microsoft.com>**20060829135150] |
|---|
| 965 | [add missing case for BlockedOnDoProc |
|---|
| 966 | Simon Marlow <simonmar@microsoft.com>**20060829113345] |
|---|
| 967 | [omit HGL on Windows |
|---|
| 968 | Simon Marlow <simonmar@microsoft.com>**20060829104921] |
|---|
| 969 | [Don't trust "ln -sf" to do the right thing (it doesn't on Solaris) |
|---|
| 970 | Simon Marlow <simonmar@microsoft.com>**20060829093735 |
|---|
| 971 | Patch from: Roman Leshchinskiy |
|---|
| 972 | ] |
|---|
| 973 | [don't include HaXml, Japi and monads in a GHC checkout |
|---|
| 974 | Simon Marlow <simonmar@microsoft.com>**20060829085946 |
|---|
| 975 | They aren't built as part of a GHC build anyway, it doesn't make much |
|---|
| 976 | sense to include them in checkouts or source tarballs. |
|---|
| 977 | ] |
|---|
| 978 | [don't include .depend (attempt to fix Windows stage2 build failure) |
|---|
| 979 | Simon Marlow <simonmar@microsoft.com>**20060829083842] |
|---|
| 980 | [Add mipsel case to configure.ac |
|---|
| 981 | Ian Lynagh <igloo@earth.li>**20060825193603] |
|---|
| 982 | [incremented versions of arrows and X11 |
|---|
| 983 | Ross Paterson <ross@soi.city.ac.uk>**20060825162415] |
|---|
| 984 | [omit Control.Sequential.STM |
|---|
| 985 | Ross Paterson <ross@soi.city.ac.uk>**20060825161645 |
|---|
| 986 | |
|---|
| 987 | It's an internal module used by non-GHC implementations only. |
|---|
| 988 | ] |
|---|
| 989 | [various minor tweaks, and rearrange to put "important" changes near the top |
|---|
| 990 | Simon Marlow <simonmar@microsoft.com>**20060825154955] |
|---|
| 991 | [mention -fno-mono-pat-binds, since this is a diversion from Haskell 98 |
|---|
| 992 | Simon Marlow <simonmar@microsoft.com>**20060825152613] |
|---|
| 993 | [Document SMP support |
|---|
| 994 | Simon Marlow <simonmar@microsoft.com>**20060825151236] |
|---|
| 995 | [Load the target of a dynamic foreign call into a temporary |
|---|
| 996 | Simon Marlow <simonmar@microsoft.com>**20060825140906 |
|---|
| 997 | Fixes ffi011(opt) on x86_64. I don't know why this has only just |
|---|
| 998 | appeared today, it's apparently been broken for some time. |
|---|
| 999 | ] |
|---|
| 1000 | [Sparc supports SMP too |
|---|
| 1001 | Simon Marlow <simonmar@microsoft.com>**20060825133628] |
|---|
| 1002 | [Fix rewriting of Control.Exception.Assert; fixes 875 |
|---|
| 1003 | Ian Lynagh <igloo@earth.li>**20060825010219] |
|---|
| 1004 | [Add the regex reshuffle to the release notes |
|---|
| 1005 | Ian Lynagh <igloo@earth.li>**20060825110520] |
|---|
| 1006 | [parsec is now a core library |
|---|
| 1007 | Ian Lynagh <igloo@earth.li>**20060825102418] |
|---|
| 1008 | [Add a default case to pprDynamicLinkerAsmLabel |
|---|
| 1009 | Roman Leshchinskiy <rl@cse.unsw.edu.au>**20060825101846 |
|---|
| 1010 | |
|---|
| 1011 | This is mainly for the benefit of Solaris. I'll fix this properly later. |
|---|
| 1012 | ] |
|---|
| 1013 | [Reserve a register for REG_Base on the Sparc |
|---|
| 1014 | Roman Leshchinskiy <rl@cse.unsw.edu.au>**20060825101820] |
|---|
| 1015 | [Add atomic SMP primitives for the Sparc |
|---|
| 1016 | Roman Leshchinskiy <rl@cse.unsw.edu.au>**20060825101753] |
|---|
| 1017 | [Make sure GCC uses the Sparc V9 instruction set |
|---|
| 1018 | Roman Leshchinskiy <rl@cse.unsw.edu.au>**20060825101646 |
|---|
| 1019 | |
|---|
| 1020 | We only support Sparc V9 and better as V8 lacks an atomic CAS instruction |
|---|
| 1021 | which we need for SMP. This means that we have to pass -mcpu=v9 to GCC when |
|---|
| 1022 | compiling and assembling. Hardcoding the flag is hackish but seems to be |
|---|
| 1023 | our best bet at the moment. It can still be overridden by the user as GCC |
|---|
| 1024 | picks the best -mcpu flag regardless of the ordering. |
|---|
| 1025 | ] |
|---|
| 1026 | [shutdownCapability(): don't bail out after 50 iterations |
|---|
| 1027 | Simon Marlow <simonmar@microsoft.com>**20060825100244 |
|---|
| 1028 | See comments for details. Fixes assertion failures in stage 3 build |
|---|
| 1029 | which appeared after recent closeMutex() addidion. May fix other |
|---|
| 1030 | shutdown issues. |
|---|
| 1031 | ] |
|---|
| 1032 | [add dependency on regex-compat |
|---|
| 1033 | Simon Marlow <simonmar@microsoft.com>**20060825093226] |
|---|
| 1034 | [move parsec into $(GhcBootLibs); tidy up |
|---|
| 1035 | Simon Marlow <simonmar@microsoft.com>**20060825091013] |
|---|
| 1036 | [Mips registerised support |
|---|
| 1037 | Simon Marlow <simonmar@microsoft.com>**20060825085712 |
|---|
| 1038 | Contributed by: Thiemo Seufer <ths@networkno.de> |
|---|
| 1039 | ] |
|---|
| 1040 | [parsec is required to be a core package, genprimopcode uses it |
|---|
| 1041 | Simon Marlow <simonmar@microsoft.com>**20060825084607] |
|---|
| 1042 | [Free Win32 Handles on shutdown |
|---|
| 1043 | Simon Marlow <simonmar@microsoft.com>**20060825084435 |
|---|
| 1044 | patch from #878 |
|---|
| 1045 | ] |
|---|
| 1046 | [Fix unregisterised builds, and building on non-x86/amd64/powerpc |
|---|
| 1047 | Ian Lynagh <igloo@earth.li>**20060825003945] |
|---|
| 1048 | [Release notes for GHC 6.6 |
|---|
| 1049 | Ian Lynagh <igloo@earth.li>**20060824211646] |
|---|
| 1050 | [Update for changes to packages |
|---|
| 1051 | Simon Marlow <simonmar@microsoft.com>**20060824153500 |
|---|
| 1052 | Not much has changed really: just the removal of the overlap |
|---|
| 1053 | restriction, and the re-instatement of the requirement that |
|---|
| 1054 | -package-name must be used when compiling a package now. |
|---|
| 1055 | ] |
|---|
| 1056 | [somehow I lost the unix subdir; recover it |
|---|
| 1057 | Simon Marlow <simonmar@microsoft.com>**20060824152529] |
|---|
| 1058 | [expand the section on getting the source. |
|---|
| 1059 | Simon Marlow <simonmar@microsoft.com>**20060824150647] |
|---|
| 1060 | [config in regex-posix too |
|---|
| 1061 | Simon Marlow <simonmar@microsoft.com>**20060824145717] |
|---|
| 1062 | [make all AC_CONFIG_SUBDIRS optional |
|---|
| 1063 | Simon Marlow <simonmar@microsoft.com>**20060824143016] |
|---|
| 1064 | [Add dynCompileExpr |
|---|
| 1065 | Esa Ilari Vuokko <ei@vuokko.info>**20060823221828] |
|---|
| 1066 | [Remove duplicate documentation of -package flag |
|---|
| 1067 | Ian Lynagh <igloo@earth.li>**20060824121806] |
|---|
| 1068 | [Remove a reference to -fglobalise-toplev-names that got left behind |
|---|
| 1069 | Ian Lynagh <igloo@earth.li>**20060824121442] |
|---|
| 1070 | [Add closeMutex and use it on clean up |
|---|
| 1071 | Esa Ilari Vuokko <ei@vuokko.info>**20060823194604] |
|---|
| 1072 | [Add shared Typeable support |
|---|
| 1073 | Esa Ilari Vuokko <ei@vuokko.info>**20060823003041] |
|---|
| 1074 | [Ignore sections generated from .ident |
|---|
| 1075 | Esa Ilari Vuokko <ei@vuokko.info>**20060823155023] |
|---|
| 1076 | [update with respect to darcs-all changes |
|---|
| 1077 | Simon Marlow <simonmar@microsoft.com>**20060824115535] |
|---|
| 1078 | [divide packages into "core" and "extra" packages |
|---|
| 1079 | Simon Marlow <simonmar@microsoft.com>**20060824114902 |
|---|
| 1080 | The following packages are now "core" packages: |
|---|
| 1081 | |
|---|
| 1082 | base, Cabal, haskell98, readline, regex-base, regex-compat |
|---|
| 1083 | regex-posix, stm, template-haskell, unix, Win32 |
|---|
| 1084 | |
|---|
| 1085 | Core packages are those packages required to bootstrap GHC, or are |
|---|
| 1086 | closely tied to GHC (stm, template-haskell). These are the packages |
|---|
| 1087 | that will be provided in a source distribution from now on. |
|---|
| 1088 | |
|---|
| 1089 | All other packages are classified as "extra" packages. As far as |
|---|
| 1090 | binary distributions and nightly builds go, nothing will change - |
|---|
| 1091 | we'll still build and include all these packages in the distributions. |
|---|
| 1092 | |
|---|
| 1093 | NOTE: 'sh darcs-all get' will now get the core packages only. To get |
|---|
| 1094 | the extra packages too, use 'sh darcs-all --extra get'. |
|---|
| 1095 | ] |
|---|
| 1096 | [Sparc fix: work around gcc optimising away the reserved stack chunk |
|---|
| 1097 | Simon Marlow <simonmar@microsoft.com>**20060824113750 |
|---|
| 1098 | This bug causes crashse on Sparc when calling foreign functions with |
|---|
| 1099 | more than 13 arguments. |
|---|
| 1100 | ] |
|---|
| 1101 | [add new regex packages |
|---|
| 1102 | Simon Marlow <simonmar@microsoft.com>**20060824094443] |
|---|
| 1103 | [Clean up coding style |
|---|
| 1104 | Esa Ilari Vuokko <ei@vuokko.info>**20060823075822] |
|---|
| 1105 | [Use stgMallc and stgFree instead of malloc/free |
|---|
| 1106 | Esa Ilari Vuokko <ei@vuokko.info>**20060823002902] |
|---|
| 1107 | [Remove wrong VirtualAlloc MEM_DECOMMITs on cleanup |
|---|
| 1108 | Esa Ilari Vuokko <ei@vuokko.info>**20060821180332] |
|---|
| 1109 | [Remove few format-warnings by adding casts |
|---|
| 1110 | Esa Ilari Vuokko <ei@vuokko.info>**20060813111029] |
|---|
| 1111 | [Remove warning: Correct includes for mingw |
|---|
| 1112 | Esa Ilari Vuokko <ei@vuokko.info>**20060813002216] |
|---|
| 1113 | [Add few more guesses where to find bits of mingw-gcc |
|---|
| 1114 | Esa Ilari Vuokko <ei@vuokko.info>**20060812020901] |
|---|
| 1115 | [in the GHCi prompt, print ModuleNames not Modules |
|---|
| 1116 | Simon Marlow <simonmar@microsoft.com>**20060823095258] |
|---|
| 1117 | [In the Compiling/Skipping message, print ModuleNames not Modules |
|---|
| 1118 | Simon Marlow <simonmar@microsoft.com>**20060823095225 |
|---|
| 1119 | These modules are always home modules, by definition, so the package |
|---|
| 1120 | name is redundant. |
|---|
| 1121 | |
|---|
| 1122 | ] |
|---|
| 1123 | [Fix typo |
|---|
| 1124 | Ian Lynagh <igloo@earth.li>**20060822163300] |
|---|
| 1125 | [Fix typo |
|---|
| 1126 | Ian Lynagh <igloo@earth.li>**20060822163212] |
|---|
| 1127 | [FastString and StringBuffer need -funbox-strict-fields too |
|---|
| 1128 | Simon Marlow <simonmar@microsoft.com>**20060822143337 |
|---|
| 1129 | For the benefit of old GHCs that don't understand {-# UNPACK #-} |
|---|
| 1130 | ] |
|---|
| 1131 | [minor fix to the clashing export error message |
|---|
| 1132 | Simon Marlow <simonmar@microsoft.com>**20060822112518 |
|---|
| 1133 | The ordering of items in the parsed export list is now correct, so we |
|---|
| 1134 | have to compensate to get the right output again. |
|---|
| 1135 | ] |
|---|
| 1136 | [findModule: add a fallthrough error case |
|---|
| 1137 | Simon Marlow <simonmar@microsoft.com>**20060822112409] |
|---|
| 1138 | [notes about which versions of GHC can be used to bootstrap |
|---|
| 1139 | Simon Marlow <simonmar@microsoft.com>**20060822093554] |
|---|
| 1140 | [disable .ident generation on darwin_TARGET_OS |
|---|
| 1141 | Simon Marlow <simonmar@microsoft.com>**20060822090349] |
|---|
| 1142 | [fix typo |
|---|
| 1143 | Simon Marlow <simonmar@microsoft.com>**20060822073731] |
|---|
| 1144 | [fixes to PPC version of cas(), from David Kirkman <dkirkman@gmail.com> |
|---|
| 1145 | Simon Marlow <simonmar@microsoft.com>**20060821153136 |
|---|
| 1146 | |
|---|
| 1147 | From David's email: |
|---|
| 1148 | The problem is that the inline assembler code was placing the result |
|---|
| 1149 | of an operation in a register that is used as input later in the code. |
|---|
| 1150 | At the bottom of this message I've extracted a short short code |
|---|
| 1151 | fragment that you can run through gcc (on a powerpc machine) to see |
|---|
| 1152 | the generated assembly output. |
|---|
| 1153 | |
|---|
| 1154 | The changes to fix the problem are fairly simple. The first adds an |
|---|
| 1155 | ampersand to the output list of the assembly fragment ("=r" (result) |
|---|
| 1156 | --> "=&r" (result)) The ampersand just tells gcc that result can not |
|---|
| 1157 | be placed in a register used for any of the input parameters (o, n, or |
|---|
| 1158 | p). Otherwise, it feels free to place output parameters in the same |
|---|
| 1159 | registers used by the inputs -- but because of the flow of control |
|---|
| 1160 | here we need everything in a distinct register. This change fixes the |
|---|
| 1161 | TVar program above. |
|---|
| 1162 | |
|---|
| 1163 | The second change adds a clobber list (the :"cc", "memory"). This |
|---|
| 1164 | tells gcc that the condition code (due to the compare) and memory (due |
|---|
| 1165 | to the store) might be changed during the asm execution. The lack of |
|---|
| 1166 | a clobber list did not seem to be causing any trouble, but without it |
|---|
| 1167 | gcc is free to assume that no state is changed during the execution. |
|---|
| 1168 | ] |
|---|
| 1169 | [Always use -funbox-strict-fields for Binary |
|---|
| 1170 | Simon Marlow <simonmar@microsoft.com>**20060821152111 |
|---|
| 1171 | For some reason this was only enabled when $(bootstrapped)=YES. This |
|---|
| 1172 | would be one reason why the stage1 compiler is slow. I guess we'll |
|---|
| 1173 | find out if anything goes wrong. |
|---|
| 1174 | ] |
|---|
| 1175 | [disable automagic building of GHCi in stage1 |
|---|
| 1176 | Simon Marlow <simonmar@microsoft.com>**20060821151957] |
|---|
| 1177 | [remove ancient file with incorrect information |
|---|
| 1178 | Simon Marlow <simonmar@microsoft.com>**20060821141946] |
|---|
| 1179 | [new option -a (append) for hasktags |
|---|
| 1180 | Martin Grabmueller <magr@cs.tu-berlin.de>**20060816091427] |
|---|
| 1181 | [ugly hack to cause ghc_boot_platform.h to be built before primops.txt |
|---|
| 1182 | Simon Marlow <simonmar@microsoft.com>**20060821120630] |
|---|
| 1183 | [add libraries/cgi and libraries/xhtml |
|---|
| 1184 | Simon Marlow <simonmar@microsoft.com>**20060821102908] |
|---|
| 1185 | [(temp) #814 - More flexible memory allocation in Windows |
|---|
| 1186 | Esa Ilari Vuokko <ei@vuokko.info>**20060820150720] |
|---|
| 1187 | [fix export/import list parsing (allow (,)), and remove unnecessary reverses |
|---|
| 1188 | Simon Marlow <simonmar@microsoft.com>**20060821102633] |
|---|
| 1189 | [comply with Haskell 98 by not allowing extra commas in import/export lists |
|---|
| 1190 | Simon Marlow <simonmar@microsoft.com>**20060821095912] |
|---|
| 1191 | [Missing stage1's in hc-build |
|---|
| 1192 | Ian Lynagh <igloo@earth.li>**20060821092226 |
|---|
| 1193 | Add mising stage1/ directories to object files touched by hc-build, and |
|---|
| 1194 | give stage=1 as an argument to make install. |
|---|
| 1195 | ] |
|---|
| 1196 | [remove spurious commas in imports |
|---|
| 1197 | Ross Paterson <ross@soi.city.ac.uk>**20060819173423] |
|---|
| 1198 | [whitespace cleanup only |
|---|
| 1199 | Ross Paterson <ross@soi.city.ac.uk>**20060818224014] |
|---|
| 1200 | [remove gcj libs from bin dist |
|---|
| 1201 | sof@galois.com**20060818214155] |
|---|
| 1202 | [I don't thing we want to add a call-context here; it just clutters the output |
|---|
| 1203 | simonpj@microsoft.com**20060818160729] |
|---|
| 1204 | [Avoid duplicate "In type ..." in error messages |
|---|
| 1205 | simonpj@microsoft.com**20060818160611] |
|---|
| 1206 | [Better pretty-printing for TvSubst |
|---|
| 1207 | simonpj@microsoft.com**20060818160551] |
|---|
| 1208 | [Fall over more gracefully when there's a Template Haskell error |
|---|
| 1209 | simonpj@microsoft.com**20060818110702 |
|---|
| 1210 | |
|---|
| 1211 | For a long time, Template Haskell has fallen over in a very un-graceful |
|---|
| 1212 | way (i.e. panic) even when it encounters a programmer error. In particular, |
|---|
| 1213 | when DsMeta converts HsSyn to TH syntax, it may find Haskell code that |
|---|
| 1214 | TH does not understand. This should be reported as a normal programmer |
|---|
| 1215 | error, not with a compiler panic! |
|---|
| 1216 | |
|---|
| 1217 | Originally the desugarer was supposed to never generate error |
|---|
| 1218 | messages, but this TH desugaring thing does make it do so. And in |
|---|
| 1219 | fact, for other reasons, the desugarer now uses the TcRnIf monad, the |
|---|
| 1220 | common monad used by the renamer, typechecker, interface checker, and |
|---|
| 1221 | desugarer. |
|---|
| 1222 | |
|---|
| 1223 | This patch completes the job, by |
|---|
| 1224 | - allowing the desugarer to generate errors |
|---|
| 1225 | - re-plumbing the error handling to take account of this |
|---|
| 1226 | - making DsMeta use the new facilities to report error gracefully |
|---|
| 1227 | |
|---|
| 1228 | Quite a few lines of code are touched, but nothing deep is going on. |
|---|
| 1229 | |
|---|
| 1230 | Fixes Trac# 760. |
|---|
| 1231 | |
|---|
| 1232 | ] |
|---|
| 1233 | [Fix typo (fst --> head) in docs on implicit parameters |
|---|
| 1234 | simonpj@microsoft.com**20060818075937] |
|---|
| 1235 | [One last hs-boot update |
|---|
| 1236 | simonpj@microsoft.com**20060817134216] |
|---|
| 1237 | [Missing import for stage 2 |
|---|
| 1238 | simonpj@microsoft.com**20060817133247] |
|---|
| 1239 | [One more hs-boot file |
|---|
| 1240 | simonpj@microsoft.com**20060817133220] |
|---|
| 1241 | [Refactoring for valid rule checking |
|---|
| 1242 | simonpj@microsoft.com**20060817130141] |
|---|
| 1243 | [Do not CSE in INLINE and NOINLINE things |
|---|
| 1244 | simonpj@microsoft.com**20060817130005 |
|---|
| 1245 | |
|---|
| 1246 | See extensive comments with Note [INLINE and NOINLINE] in this file. |
|---|
| 1247 | |
|---|
| 1248 | ] |
|---|
| 1249 | [Update lhs-boot files |
|---|
| 1250 | simonpj@microsoft.com**20060817132003 |
|---|
| 1251 | |
|---|
| 1252 | A consequence of my recent meddling with hs-boot files is that GHC is |
|---|
| 1253 | more picky about the correpondence between the hs-boot file and the hs file. |
|---|
| 1254 | In particular, you must use the same type synonyms. |
|---|
| 1255 | |
|---|
| 1256 | This patche fixes up GHC's own hs-boot files to match the restriction. |
|---|
| 1257 | |
|---|
| 1258 | ] |
|---|
| 1259 | [Add ad-hoc typing checks for tagToEnum# |
|---|
| 1260 | simonpj@microsoft.com**20060816203156 |
|---|
| 1261 | |
|---|
| 1262 | The problem with tagToEnum# is that it is not overloaded (in the |
|---|
| 1263 | Haskell sense) but you are only supposed to apply it to a TyCon |
|---|
| 1264 | that is an enumeration (isEnumerationTyCon). |
|---|
| 1265 | |
|---|
| 1266 | The Real Way to do this is to have some special kind of type constraint |
|---|
| 1267 | for the purpose, but that is wild overkill. So this patch adds a small |
|---|
| 1268 | rather ad-hoc check to TcExpr.instFun. Crude, simple, but it works fine. |
|---|
| 1269 | |
|---|
| 1270 | Fixes Trac #786 |
|---|
| 1271 | Test is tcfail164 |
|---|
| 1272 | |
|---|
| 1273 | ] |
|---|
| 1274 | [Get dead-ness right in knownCon |
|---|
| 1275 | simonpj@microsoft.com**20060816164216] |
|---|
| 1276 | [Tuning for argToPat |
|---|
| 1277 | simonpj@microsoft.com**20060816164103 |
|---|
| 1278 | |
|---|
| 1279 | argToPat is a crucial function for SpecConstr, because it decides |
|---|
| 1280 | what patterns are worth specialising. I was being much too gung-ho about |
|---|
| 1281 | constants. This patch makes it much better. |
|---|
| 1282 | |
|---|
| 1283 | ] |
|---|
| 1284 | [Re-factor mkAtomicArgs and completeNonRecX |
|---|
| 1285 | simonpj@microsoft.com**20060816163645 |
|---|
| 1286 | |
|---|
| 1287 | This refactoring ensures that when mkAtomicArgs adds new bindings, |
|---|
| 1288 | it does so using completeNonRecX, which adds unfoldings etc. More |
|---|
| 1289 | modular, and saves passes too. |
|---|
| 1290 | |
|---|
| 1291 | (This was important when getting rules to work right. We want tob |
|---|
| 1292 | fire a rule as soon as possible, taking into account all inlinings, |
|---|
| 1293 | else a less-good rule applies. That's what I found when doing |
|---|
| 1294 | stream fusion anyway.) |
|---|
| 1295 | |
|---|
| 1296 | Regardless, this is an improvement. |
|---|
| 1297 | |
|---|
| 1298 | ] |
|---|
| 1299 | [Another try at the continuation-swapping stuff |
|---|
| 1300 | simonpj@microsoft.com**20060816105042 |
|---|
| 1301 | |
|---|
| 1302 | I have spent altogether too long on my attempt to avoid case-of-case |
|---|
| 1303 | in situations where it is a Bad Thing. All the action is in the |
|---|
| 1304 | case for mkDupableAlt that handles cases with a single alternative. |
|---|
| 1305 | |
|---|
| 1306 | I've added rather extensive comments, and it finally seems to be working |
|---|
| 1307 | more or less right. If you compile (say) GHC/Real.o you'll see quite a |
|---|
| 1308 | few case-of-cases remain (which didn't happen before), and they mostly look |
|---|
| 1309 | pretty sensible to me. |
|---|
| 1310 | |
|---|
| 1311 | ] |
|---|
| 1312 | [Don't build unnecessary lets in knownCon |
|---|
| 1313 | simonpj@microsoft.com**20060816104831 |
|---|
| 1314 | |
|---|
| 1315 | Faced with |
|---|
| 1316 | case x of y { (a,b) -> rhs } |
|---|
| 1317 | |
|---|
| 1318 | where x is bound to (c,d), we were generating |
|---|
| 1319 | |
|---|
| 1320 | let y = (c,d) in rhs |
|---|
| 1321 | |
|---|
| 1322 | and thenn hoping to get rid of the y binding by CSE or some such. It's |
|---|
| 1323 | better simply not to build it in the first place, by generating |
|---|
| 1324 | |
|---|
| 1325 | let y = x in rhs |
|---|
| 1326 | |
|---|
| 1327 | This patch does the job. |
|---|
| 1328 | |
|---|
| 1329 | ] |
|---|
| 1330 | [Comments only |
|---|
| 1331 | simonpj@microsoft.com**20060816104817] |
|---|
| 1332 | [Refactoring, plus record recursive-function *components* as RecArg too |
|---|
| 1333 | simonpj@microsoft.com**20060816085809] |
|---|
| 1334 | [Record constructor arg occs correctly (bug-fix) |
|---|
| 1335 | simonpj@microsoft.com**20060816085628 |
|---|
| 1336 | |
|---|
| 1337 | I was forgetting the non-pattern-matched type args of a constructor. |
|---|
| 1338 | |
|---|
| 1339 | ] |
|---|
| 1340 | [Disable form-checking for rule LHSs |
|---|
| 1341 | simonpj@microsoft.com**20060816085612 |
|---|
| 1342 | |
|---|
| 1343 | Previously we checked the form of the arguments of a RULE lhs, to |
|---|
| 1344 | ensure that they were simple applications. There was no good reason |
|---|
| 1345 | for that, save to prevent you writing LHSs that were unlikely to match. |
|---|
| 1346 | |
|---|
| 1347 | And Don Stewart found he wanted to do something we didn't allow (a section, |
|---|
| 1348 | I think). So I have just disabled the check. |
|---|
| 1349 | |
|---|
| 1350 | ] |
|---|
| 1351 | [Allow class and instance decls in hs-boot files |
|---|
| 1352 | simonpj@microsoft.com**20060815123402 |
|---|
| 1353 | |
|---|
| 1354 | For some reason, in 6.5 the manual said you could put a class decl in |
|---|
| 1355 | an interface file, but not an instance decl; whereas the implementation |
|---|
| 1356 | was exactly the othe way round. |
|---|
| 1357 | |
|---|
| 1358 | This patch makes it possible to put *both* class and instance decls |
|---|
| 1359 | in an interface file. |
|---|
| 1360 | |
|---|
| 1361 | I also did a bit of re-factoring; comparing the declarations in the |
|---|
| 1362 | hs-boot and hs file is now done by converting to IfaceSyn, because we |
|---|
| 1363 | have good comparison operations for IfaceSyn already implemented. |
|---|
| 1364 | This fixed a bug that previously let through an inconsistent declaration |
|---|
| 1365 | of a data type. |
|---|
| 1366 | |
|---|
| 1367 | The remaining infelicity concerns "abstract" TyCons. They are a bit |
|---|
| 1368 | of a hack anyway; and Classes are not handled in the same way. Need |
|---|
| 1369 | to think about this, but I think it's probably ok as it stands. |
|---|
| 1370 | |
|---|
| 1371 | |
|---|
| 1372 | ] |
|---|
| 1373 | [Reject derivable type classes with higher-rank methods |
|---|
| 1374 | simonpj@microsoft.com**20060815075928 |
|---|
| 1375 | |
|---|
| 1376 | Trac #864 suggested a derivable type class with a higher-rank method. |
|---|
| 1377 | |
|---|
| 1378 | In principle this is quite do-able, but in practice the mechanism works |
|---|
| 1379 | by generating source code and then doing type inference. To make this work |
|---|
| 1380 | with higher-rank types would require impredicative polymorphism. And we |
|---|
| 1381 | do have that, so it could probably be made to work by generating (source-level) |
|---|
| 1382 | type annotations. But it's real work, so I'm settling for generating a |
|---|
| 1383 | decent error message rather than crashing. |
|---|
| 1384 | |
|---|
| 1385 | |
|---|
| 1386 | ] |
|---|
| 1387 | [SpecConstr now specialises on constants and lambdas |
|---|
| 1388 | simonpj@microsoft.com**20060815162605 |
|---|
| 1389 | |
|---|
| 1390 | Roman inspired me to beef up SpecConstr to deal with |
|---|
| 1391 | a) constant arguments |
|---|
| 1392 | b) lambda arguments |
|---|
| 1393 | |
|---|
| 1394 | This is described in elaborate comments in the file: |
|---|
| 1395 | Note [Specialising for constant parameters] |
|---|
| 1396 | Note [Specialising for lambda parameters] |
|---|
| 1397 | |
|---|
| 1398 | I also took the opportunity to fix the usage analysis done by |
|---|
| 1399 | SpecConstr, which was only handling the top-level correctly. |
|---|
| 1400 | Now it does nesting too. |
|---|
| 1401 | |
|---|
| 1402 | |
|---|
| 1403 | ] |
|---|
| 1404 | [Fix two bugs in rule-matching |
|---|
| 1405 | simonpj@microsoft.com**20060815162030 |
|---|
| 1406 | |
|---|
| 1407 | These two typo-like bugs have been there for a long time! |
|---|
| 1408 | |
|---|
| 1409 | One concerns the selection of overlapping rules, |
|---|
| 1410 | which was back to front |
|---|
| 1411 | |
|---|
| 1412 | The other was name-lining-up bug in the Case case of matching |
|---|
| 1413 | |
|---|
| 1414 | This patch also arranges to export matchN. |
|---|
| 1415 | (Not a good name, but still!) |
|---|
| 1416 | |
|---|
| 1417 | |
|---|
| 1418 | ] |
|---|
| 1419 | [Moving list-length code from one place in the file to another |
|---|
| 1420 | simonpj@microsoft.com**20060815161947] |
|---|
| 1421 | [Make UniqSM into a proper monad |
|---|
| 1422 | simonpj@microsoft.com**20060815161829] |
|---|
| 1423 | [Typo in patch that dealt with duplicating continuations in Simplify |
|---|
| 1424 | simonpj@microsoft.com**20060815070246] |
|---|
| 1425 | [Be more conservative about duplicating continuations |
|---|
| 1426 | simonpj@microsoft.com**20060814165424 |
|---|
| 1427 | |
|---|
| 1428 | Roman found that GHC was duplicating continuations that arose (essentially) |
|---|
| 1429 | from uses of 'seq', or strict constructors. This fixes the problem; |
|---|
| 1430 | see the comments mkDupableCont (the Select case with a single alternative). |
|---|
| 1431 | |
|---|
| 1432 | I'm a little concerned that this may also miss useful case-of-case |
|---|
| 1433 | tranformations, so I'd like to know if anyone finds that this patch |
|---|
| 1434 | makes performance worse. |
|---|
| 1435 | |
|---|
| 1436 | To make it a bit more gung-ho, one could check for all the binders |
|---|
| 1437 | being dead, before choosing this new, conservative alternative. |
|---|
| 1438 | |
|---|
| 1439 | |
|---|
| 1440 | ] |
|---|
| 1441 | [Inline into tail-called constructor args |
|---|
| 1442 | simonpj@microsoft.com**20060814165127 |
|---|
| 1443 | |
|---|
| 1444 | Consider |
|---|
| 1445 | x = case y of { True -> (p,q); ... } |
|---|
| 1446 | |
|---|
| 1447 | The occurrence analyser was marking p,q as 'Many', because they args |
|---|
| 1448 | of a constructor in an RhsCtxt. But actually they aren't in a RhsCtxt, |
|---|
| 1449 | and in this case it's better to inline. |
|---|
| 1450 | |
|---|
| 1451 | ] |
|---|
| 1452 | [Improve exprIsCheap |
|---|
| 1453 | simonpj@microsoft.com**20060814165043 |
|---|
| 1454 | |
|---|
| 1455 | exprIsCheap is meant to return True iff it's ok to push the expression |
|---|
| 1456 | inside a lambda. But the previous version would return True of a nested |
|---|
| 1457 | construtor application like (1:2:3:[]), which isn't right. |
|---|
| 1458 | |
|---|
| 1459 | This patch re-factors the code somewhat, and fixes the bug. |
|---|
| 1460 | |
|---|
| 1461 | ] |
|---|
| 1462 | [Added xhtml and cgi as default libraries. |
|---|
| 1463 | bringert@cs.chalmers.se**20060814113242] |
|---|
| 1464 | [Improve error message in TcHsType |
|---|
| 1465 | simonpj@microsoft.com**20060814095617 |
|---|
| 1466 | |
|---|
| 1467 | Fixes Trac #863. |
|---|
| 1468 | Test is tcfail162 |
|---|
| 1469 | |
|---|
| 1470 | ] |
|---|
| 1471 | [Warning police: Removed overlapped pattern warnings |
|---|
| 1472 | sven.panne@aedion.de**20060811151353] |
|---|
| 1473 | [Complete -fmono-pat-binds patch |
|---|
| 1474 | simonpj@microsoft.com**20060811142842 |
|---|
| 1475 | |
|---|
| 1476 | When adding the experimental -fmono-pat-binds, I forgot to check |
|---|
| 1477 | for type signatures of the now-monomorphic patterns. This patch |
|---|
| 1478 | completes the job. |
|---|
| 1479 | |
|---|
| 1480 | I documented the design too: |
|---|
| 1481 | http://haskell.galois.com/cgi-bin/haskell-prime/trac.cgi/wiki/MonomorphicPatternBindings |
|---|
| 1482 | |
|---|
| 1483 | ] |
|---|
| 1484 | [Avoid warning about overlapped pattern for Linux target |
|---|
| 1485 | sven.panne@aedion.de**20060811140512] |
|---|
| 1486 | [Improve error message layouts |
|---|
| 1487 | simonpj@microsoft.com**20060811133317] |
|---|
| 1488 | [Add type signature |
|---|
| 1489 | simonpj@microsoft.com**20060811133302] |
|---|
| 1490 | [Improve the "could not find module" error message |
|---|
| 1491 | Simon Marlow <simonmar@microsoft.com>**20060811132135 |
|---|
| 1492 | In particular, if we're searching for the profiling version of a |
|---|
| 1493 | module in another package, then suggest that perhaps it might not have |
|---|
| 1494 | been installed. |
|---|
| 1495 | ] |
|---|
| 1496 | [On FreeBSD, use -lthr instead of -pthread for now (see comments) |
|---|
| 1497 | Simon Marlow <simonmar@microsoft.com>**20060811113453] |
|---|
| 1498 | [Two more error message indendations |
|---|
| 1499 | simonpj@microsoft.com**20060811110435] |
|---|
| 1500 | [Go back to calling type veriables t |
|---|
| 1501 | simonpj@microsoft.com**20060811110412] |
|---|
| 1502 | [Indent an error message |
|---|
| 1503 | simonpj@microsoft.com**20060811110347] |
|---|
| 1504 | [Improve error message (imported from Prelude at Implicit import declaration) |
|---|
| 1505 | simonpj@microsoft.com**20060811110301] |
|---|
| 1506 | [don't qualify module name for importedSrcLoc |
|---|
| 1507 | Simon Marlow <simonmar@microsoft.com>**20060811101327] |
|---|
| 1508 | [use "Defined in" rather than "Imported from" when printing ImportedSrcLoc |
|---|
| 1509 | Simon Marlow <simonmar@microsoft.com>**20060811101159] |
|---|
| 1510 | [Now that we have an "html" package, put the Haddock docs somewhere else |
|---|
| 1511 | sven.panne@aedion.de**20060811092609] |
|---|
| 1512 | [Nuked hschooks.h in favour of cutils.h, which has the prototypes we need |
|---|
| 1513 | sven.panne@aedion.de**20060810154225] |
|---|
| 1514 | [Match format strings and arguments for printf-like functions |
|---|
| 1515 | sven.panne@aedion.de**20060810153624] |
|---|
| 1516 | [Warning police: Make prototype for LDV_recordDead_FILL_SLOP_DYNAMIC visible |
|---|
| 1517 | sven.panne@aedion.de**20060810144837] |
|---|
| 1518 | [Warning police: Make strlen and friends known |
|---|
| 1519 | sven.panne@aedion.de**20060810144729] |
|---|
| 1520 | [Tweak GCC's inlining parameters to get thread_obj inlined |
|---|
| 1521 | sven.panne@aedion.de**20060810144505] |
|---|
| 1522 | [Add an IAmDead case to postInlineUnconditionally, and comments |
|---|
| 1523 | simonpj@microsoft.com**20060810142034] |
|---|
| 1524 | [Do not repeatedly simplify an argument more than once |
|---|
| 1525 | simonpj@microsoft.com**20060810141526 |
|---|
| 1526 | |
|---|
| 1527 | A very important invariant of the simplifier is that we do not simplify |
|---|
| 1528 | an arbitrarily large expression more than once in a single pass. If this |
|---|
| 1529 | can happen, then we can get exponential behaviour, when the large expression |
|---|
| 1530 | itself has a large sub-expression which is simplified twice, and so on. |
|---|
| 1531 | |
|---|
| 1532 | GHC has a long-standing bug which allows this repeated simplification to |
|---|
| 1533 | happen. It shows up when we have a function like this |
|---|
| 1534 | |
|---|
| 1535 | f d BIG |
|---|
| 1536 | where f's unfolding looks like |
|---|
| 1537 | \x -> case x of (a,b) -> a |
|---|
| 1538 | Of course this is v common for overloaded functions. |
|---|
| 1539 | |
|---|
| 1540 | Before this patch we simplified all the args (d and BIG) before |
|---|
| 1541 | deciding to unfold f. Then we push back the simplified BIG onto the |
|---|
| 1542 | continuation stack, inline f, so now we have |
|---|
| 1543 | (case d of (a,b) -> a) BIG |
|---|
| 1544 | After we reduce the case a bit, we'll simplify BIG a second time. And |
|---|
| 1545 | that's the problem. |
|---|
| 1546 | |
|---|
| 1547 | The quick-and-dirty solution is to keep a flag in the ApplyTo continuation |
|---|
| 1548 | to say whather the arg has already been simplified. An alternative would |
|---|
| 1549 | be to simplify it when first encountered, but that's a bigger change. |
|---|
| 1550 | |
|---|
| 1551 | |
|---|
| 1552 | ] |
|---|
| 1553 | [Do not call preInlineUnconditionally in simplNonRecX |
|---|
| 1554 | simonpj@microsoft.com**20060810141340 |
|---|
| 1555 | |
|---|
| 1556 | This looks to me like a long-standing bug. simplNonRecX was calling |
|---|
| 1557 | preInlineUnconditionally, even though it was given an already-simplified |
|---|
| 1558 | expression. Exponential behaviour beckons. |
|---|
| 1559 | |
|---|
| 1560 | ] |
|---|
| 1561 | [Make postInlineUnconditaionally more conservative |
|---|
| 1562 | simonpj@microsoft.com**20060810141145 |
|---|
| 1563 | |
|---|
| 1564 | I'm being more paranoid about repeatedly simplifying things (to avoid |
|---|
| 1565 | exponential behaviour.) postInlineUnconditionally looks as if it |
|---|
| 1566 | could repeated simplify the same expression; this patch stops it doing |
|---|
| 1567 | so. |
|---|
| 1568 | |
|---|
| 1569 | The extra lines are all comments! |
|---|
| 1570 | |
|---|
| 1571 | |
|---|
| 1572 | ] |
|---|
| 1573 | [Control.Exception.unblock wasn't unblocking exceptions |
|---|
| 1574 | Simon Marlow <simonmar@microsoft.com>**20060810132307] |
|---|
| 1575 | [remove out of date comment |
|---|
| 1576 | Simon Marlow <simonmar@microsoft.com>**20060810130154] |
|---|
| 1577 | [move html before network, for now |
|---|
| 1578 | Simon Marlow <simonmar@microsoft.com>**20060810121930] |
|---|
| 1579 | [add html package |
|---|
| 1580 | Simon Marlow <simonmar@microsoft.com>**20060810113719] |
|---|
| 1581 | [Egregious bug in tcLHsConResTy |
|---|
| 1582 | simonpj@microsoft.com**20060810120828 |
|---|
| 1583 | |
|---|
| 1584 | This terrible bug in tcLHsConTy is pretty much guaranteed to show up |
|---|
| 1585 | on an program involving a GADT with more than one type parameter. |
|---|
| 1586 | |
|---|
| 1587 | This bug isn't present in the STABLE branch. |
|---|
| 1588 | |
|---|
| 1589 | Manuel: it is *not* necesary to merge this patch into the FC branch; |
|---|
| 1590 | just ignore it. |
|---|
| 1591 | |
|---|
| 1592 | ] |
|---|
| 1593 | [Comments about improvements to SpecConstr |
|---|
| 1594 | simonpj@microsoft.com**20060810120759] |
|---|
| 1595 | [Remove HasBounds-instance and implement MArray.getBounds instead |
|---|
| 1596 | Esa Ilari Vuokko <ei@vuokko.info>**20060809163012] |
|---|
| 1597 | [Fix Array imports |
|---|
| 1598 | Esa Ilari Vuokko <ei@vuokko.info>**20060809161341] |
|---|
| 1599 | [Where we use $(GhcHcOpts), also add $(GhcStage1HcOpts) |
|---|
| 1600 | Simon Marlow <simonmar@microsoft.com>**20060809144845 |
|---|
| 1601 | This fixes building the compiler with -prof in $(GhcStage1HcOpts) |
|---|
| 1602 | ] |
|---|
| 1603 | [fixes to the stage2 build following removal of old FFI syntax |
|---|
| 1604 | Simon Marlow <simonmar@microsoft.com>**20060809143153] |
|---|
| 1605 | [fix bug in task freeing |
|---|
| 1606 | Simon Marlow <simonmar@microsoft.com>**20060809141225] |
|---|
| 1607 | [add some more options to stage 2 |
|---|
| 1608 | Simon Marlow <simonmar@microsoft.com>**20060809141058] |
|---|
| 1609 | [remove debugging code accidentally left in |
|---|
| 1610 | Simon Marlow <simonmar@microsoft.com>**20060809102936] |
|---|
| 1611 | [remember that old FFI syntax has been dropped |
|---|
| 1612 | Simon Marlow <simonmar@microsoft.com>**20060809101655] |
|---|
| 1613 | [only define GHCI if $(GhcWithInterpreter)=YES, also add -threaded |
|---|
| 1614 | Simon Marlow <simonmar@microsoft.com>**20060809101634] |
|---|
| 1615 | [move altzone test to base package |
|---|
| 1616 | Ross Paterson <ross@soi.city.ac.uk>**20060809124215] |
|---|
| 1617 | [remove unused FPTOOLS_CHECK_HTYPE macro |
|---|
| 1618 | Ross Paterson <ross@soi.city.ac.uk>**20060809124036] |
|---|
| 1619 | [Remove the artifical cap on the number of workers |
|---|
| 1620 | Simon Marlow <simonmar@microsoft.com>**20060809095908 |
|---|
| 1621 | See #805. This was here to catch bugs that resulted in an infinite |
|---|
| 1622 | number of worker threads being created. However, we can't put a |
|---|
| 1623 | reasonable bound on the number of worker threads, because legitimate |
|---|
| 1624 | programs may need to create large numbers of (probably blocked) worker |
|---|
| 1625 | threads. Furthermore, the OS probably has a bound on the number of |
|---|
| 1626 | threads that a process can create in any case. |
|---|
| 1627 | |
|---|
| 1628 | |
|---|
| 1629 | |
|---|
| 1630 | ] |
|---|
| 1631 | [Remove old FFI syntax |
|---|
| 1632 | Simon Marlow <simonmar@microsoft.com>**20060809095201 |
|---|
| 1633 | See #815 |
|---|
| 1634 | ] |
|---|
| 1635 | [make exit() overridable, for use in DLLs |
|---|
| 1636 | Simon Marlow <simonmar@microsoft.com>**20060809092439 |
|---|
| 1637 | See #753 |
|---|
| 1638 | ] |
|---|
| 1639 | [More fixes to pre-matching and pre-subsumption |
|---|
| 1640 | simonpj@microsoft.com**20060808224924 |
|---|
| 1641 | |
|---|
| 1642 | Actually this patch fixes two errors. one was a trivial typo in |
|---|
| 1643 | tha last patch (b_ty should be b_tau), which led to an infinite loop |
|---|
| 1644 | when compiling Data.Generic.Twins. |
|---|
| 1645 | |
|---|
| 1646 | Fixing that revealed a more serious error in the same function. |
|---|
| 1647 | I was sloppy about dealing robsutly with name-capture for nested |
|---|
| 1648 | quantifiers in pre-subsumption and pre-matching; and sure enough |
|---|
| 1649 | I got bitten. Sigh. I think it is right now. |
|---|
| 1650 | |
|---|
| 1651 | ] |
|---|
| 1652 | [Group exports so that all length functions are together; no semantic change |
|---|
| 1653 | simonpj@microsoft.com**20060808224808] |
|---|
| 1654 | [Check that lazy patterns are for lifted types |
|---|
| 1655 | simonpj@microsoft.com**20060808135910 |
|---|
| 1656 | |
|---|
| 1657 | A lazy pattern match must be for a lifted type. This is illegal: |
|---|
| 1658 | |
|---|
| 1659 | f x = case g x of |
|---|
| 1660 | ~(# x,y #) -> ... |
|---|
| 1661 | |
|---|
| 1662 | This commit fixes the problem. Trac #845, test is tcfail159 |
|---|
| 1663 | |
|---|
| 1664 | ] |
|---|
| 1665 | [Spelling in a comment |
|---|
| 1666 | simonpj@microsoft.com**20060808123514] |
|---|
| 1667 | [Remove srcSpanStartLine/srcSpanEndLine crash |
|---|
| 1668 | simonpj@microsoft.com**20060808123211 |
|---|
| 1669 | |
|---|
| 1670 | srcSpanStartLine/srcSpanEndLine panic on UnhelpfulLoc. They should not |
|---|
| 1671 | really be exported by SrcLoc at all, but unfortunately they are used in |
|---|
| 1672 | Lexer.x, which knows enough to avoid the panic. |
|---|
| 1673 | |
|---|
| 1674 | However the call in RnEnv didn't know, and the panic was triggered |
|---|
| 1675 | by Template Haskell spliced code. This patch fixes it by exporting |
|---|
| 1676 | the predicate RnEnv wanted, namely isOneLineSpan. |
|---|
| 1677 | |
|---|
| 1678 | ] |
|---|
| 1679 | [Replace deprecated AC_TRY_COMPILE macro with the reccomended replcament |
|---|
| 1680 | Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060706114902 |
|---|
| 1681 | See: http://www.gnu.org/software/autoconf/manual/html_node/Obsolete-Macros.html |
|---|
| 1682 | ] |
|---|
| 1683 | [Add ghc and version number in .ident directive in NCG |
|---|
| 1684 | Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060706114712 |
|---|
| 1685 | Just because we can and because every other compiler does, |
|---|
| 1686 | lets stick in an identifier directive: .ident "GHC x.y.z" |
|---|
| 1687 | into the assembly output of the NCG. |
|---|
| 1688 | ] |
|---|
| 1689 | [Support the GNU non-exec stack annotation system |
|---|
| 1690 | Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060706114331 |
|---|
| 1691 | On recent GNU ELF systems one can mark an object file as not |
|---|
| 1692 | requiring an executable stack. If all objects- linked into a |
|---|
| 1693 | program have this note then the program will not use an executable |
|---|
| 1694 | stack, which is good for security (and some distros have it as a |
|---|
| 1695 | QA policy). GHC generated code does not need an executable stack |
|---|
| 1696 | so add the note to the assembly output of the native code |
|---|
| 1697 | generator (conditional on a configure test). |
|---|
| 1698 | ] |
|---|
| 1699 | [Complain more loudly if any of the hsc2hs phases fail |
|---|
| 1700 | Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060703234356 |
|---|
| 1701 | previously hsc2hs just exits with a non-zero exit code, now if any of |
|---|
| 1702 | the compilation, linking or runing phases fail then we get a message |
|---|
| 1703 | saying so and the failing command is printed. |
|---|
| 1704 | ] |
|---|
| 1705 | [Remember to free() memory on exit |
|---|
| 1706 | Simon Marlow <simonmar@microsoft.com>**20060808103110 |
|---|
| 1707 | Patch mostly from Lennart Augustsson in #803, with additions to |
|---|
| 1708 | Task.c by me. |
|---|
| 1709 | ] |
|---|
| 1710 | [Fix pre-subsumption and pre-matching |
|---|
| 1711 | simonpj@microsoft.com**20060808091108 |
|---|
| 1712 | |
|---|
| 1713 | The pre-subsuption and pre-matching functions should NEVER make bogus |
|---|
| 1714 | bindings of type variables, although they are free to bale out and make |
|---|
| 1715 | too few bindings. |
|---|
| 1716 | |
|---|
| 1717 | I hadn't been thiking carefully enough about this, and there were two |
|---|
| 1718 | separate bugs. |
|---|
| 1719 | |
|---|
| 1720 | - Firstly, in pre-subsumption we must ignore the 'theta' |
|---|
| 1721 | part of any overloaded type. |
|---|
| 1722 | |
|---|
| 1723 | - Second, in pre-matching, we must return the empty subustition |
|---|
| 1724 | on a mis-match, rather than returning the substitution so far. |
|---|
| 1725 | |
|---|
| 1726 | This bug showed up when compiling Data.Generics.Schemes.hs, and is |
|---|
| 1727 | imortalised in test tc206 |
|---|
| 1728 | |
|---|
| 1729 | ] |
|---|
| 1730 | [Improve error message |
|---|
| 1731 | simonpj@microsoft.com**20060808080255 |
|---|
| 1732 | |
|---|
| 1733 | Improve a little-used error message. Given |
|---|
| 1734 | f :: a -> a |
|---|
| 1735 | f x y = e |
|---|
| 1736 | the error says |
|---|
| 1737 | |
|---|
| 1738 | The equations for f have two arguments |
|---|
| 1739 | but its type `a -> a' has only one |
|---|
| 1740 | |
|---|
| 1741 | (Before, it said "its type `a' has only one" which is bogus. |
|---|
| 1742 | |
|---|
| 1743 | ] |
|---|
| 1744 | [Pull out common removal code, and detect does-not-exist correctly |
|---|
| 1745 | Ian Lynagh <igloo@earth.li>**20060710214308] |
|---|
| 1746 | [Create our own directory in the temporary directory to avoid various races |
|---|
| 1747 | Ian Lynagh <igloo@earth.li>**20060710204424] |
|---|
| 1748 | [Merge SysTools import declarations |
|---|
| 1749 | Ian Lynagh <igloo@earth.li>**20060709183850] |
|---|
| 1750 | [Don't freeze the dynamic flags used for filename generation before the pipeline starts |
|---|
| 1751 | Ian Lynagh <igloo@earth.li>**20060709145101] |
|---|
| 1752 | [#807: Removed double fclose of prof_file |
|---|
| 1753 | Ian Lynagh <igloo@earth.li>**20060708152424 |
|---|
| 1754 | prof_file was being fclose'd in both gen_XML_logfile and hs_exit, leading |
|---|
| 1755 | to glibc complaining of a double free. |
|---|
| 1756 | ] |
|---|
| 1757 | [Add -fextended-default-rules and -fmono-pat-binds |
|---|
| 1758 | simonpj@microsoft.com**20060807112107 |
|---|
| 1759 | |
|---|
| 1760 | Add -fextended-deafult-rules (in response to Don Stewart's message below), |
|---|
| 1761 | and document them. |
|---|
| 1762 | |
|---|
| 1763 | Also doucument -fmono-pat-binds/-fno-mono-pat-binds, which has been in |
|---|
| 1764 | GHC a few weeks now. |
|---|
| 1765 | |
|---|
| 1766 | (The two are in one patch because the diffs were so close together |
|---|
| 1767 | that Darcs combined them.) |
|---|
| 1768 | |
|---|
| 1769 | Simon |
|---|
| 1770 | |
|---|
| 1771 | |
|---|
| 1772 | From: Donald Bruce Stewart [mailto:dons@cse.unsw.edu.au] |
|---|
| 1773 | Sent: 07 August 2006 10:52 |
|---|
| 1774 | |
|---|
| 1775 | While we're thinking about defaulting, I have a question.. |
|---|
| 1776 | |
|---|
| 1777 | ghci uses an extended defaulting system, to allow things like: |
|---|
| 1778 | Prelude> reverse [] |
|---|
| 1779 | [] |
|---|
| 1780 | to work, and to have the right instance of Show found. The manual says: |
|---|
| 1781 | |
|---|
| 1782 | "..it is tiresome for the user to have to specify the type, so GHCi extends |
|---|
| 1783 | Haskell's type-defaulting rules (Section 4.3.4 of the Haskell 98 Report |
|---|
| 1784 | (Revised)) as follows. If the expression yields a set of type constraints |
|---|
| 1785 | that are all from standard classes (Num, Eq etc.), and at least one is |
|---|
| 1786 | either a numeric class or the Show, Eq, or Ord class, GHCi will try to use |
|---|
| 1787 | one of the default types, just as described in the Report. The standard |
|---|
| 1788 | defaulting rules require that one of the classes is numeric; the difference |
|---|
| 1789 | here is that defaulting is also triggered at least one is Show, Eq, or Ord." |
|---|
| 1790 | |
|---|
| 1791 | Currently, there is no way to get at this "extended" defaulting for compiled |
|---|
| 1792 | modules. However, I have a use case for in fact doing this. |
|---|
| 1793 | |
|---|
| 1794 | With runtime evaluated Haskell, embedding 'interpreters' (over hs-plugins) is |
|---|
| 1795 | easy. lambdabot, for example, implements a sandboxed haskell eval system. But |
|---|
| 1796 | it doesn't have access to the defaulting mechanism of ghci, so we have: |
|---|
| 1797 | |
|---|
| 1798 | dons:: > reverse [] |
|---|
| 1799 | lambdabot:: Add a type signature |
|---|
| 1800 | dons:: > reverse [] :: [()] |
|---|
| 1801 | lambdabot:: [] |
|---|
| 1802 | |
|---|
| 1803 | Which is annoying -- newbies wonder why they have to add these extra |
|---|
| 1804 | constraints to get a Show instance. |
|---|
| 1805 | |
|---|
| 1806 | I'm wondering, since the extended defaulting mechanisms are already |
|---|
| 1807 | implemented, could they be made available to compiled modules as well, |
|---|
| 1808 | perhaps using a flag, -fextended-defaulting? |
|---|
| 1809 | |
|---|
| 1810 | ] |
|---|
| 1811 | [add a comment |
|---|
| 1812 | Simon Marlow <simonmar@microsoft.com>**20060807143102] |
|---|
| 1813 | [Do pre-subsumption in the main subsumption check |
|---|
| 1814 | simonpj@microsoft.com**20060804214942 |
|---|
| 1815 | |
|---|
| 1816 | This patch improves the subsumption check (in TcUnify.tc_sub) so that |
|---|
| 1817 | it does pre-subsumption first. The key code is in the case with |
|---|
| 1818 | guard (isSigmaTy actual_ty); note the new call to preSubType. |
|---|
| 1819 | |
|---|
| 1820 | Shorn of details, the question is this. Should this hold? |
|---|
| 1821 | |
|---|
| 1822 | forall a. a->a <= Int -> (forall b. Int) |
|---|
| 1823 | |
|---|
| 1824 | Really, it should; just instantiate 'a' to Int. This is just what |
|---|
| 1825 | the pre-subsumption phase (which used in function applications), |
|---|
| 1826 | will do. |
|---|
| 1827 | |
|---|
| 1828 | I did a bit of refactoring to achieve this. |
|---|
| 1829 | |
|---|
| 1830 | Fixes Trac #821. Test tc205 tests. |
|---|
| 1831 | |
|---|
| 1832 | ] |
|---|
| 1833 | [Make unification robust to a boxy type variable meeting itself |
|---|
| 1834 | simonpj@microsoft.com**20060801214302 |
|---|
| 1835 | |
|---|
| 1836 | Previously, the implicit assumption in unification is that a boxy |
|---|
| 1837 | type variable could never occur on both sides of the unification, |
|---|
| 1838 | so that we'd never find |
|---|
| 1839 | bx5 :=: bx5 |
|---|
| 1840 | |
|---|
| 1841 | But the pre-subsumption stuff really means that the same variable |
|---|
| 1842 | can occur on both sides. Consider |
|---|
| 1843 | forall a. a->Int <= bx5->Int |
|---|
| 1844 | Then pre-subumption will find a->bx5; and the full subsumption step |
|---|
| 1845 | will find bx5:=bx5. |
|---|
| 1846 | |
|---|
| 1847 | However, I think there is still no possiblity of a full occurs-check |
|---|
| 1848 | failure; that is, |
|---|
| 1849 | bx5 :=: Tree bx5 |
|---|
| 1850 | Although I can't quite see how to prove it! So I've added a |
|---|
| 1851 | DEBUG test in uMetaVar to check for this case. |
|---|
| 1852 | |
|---|
| 1853 | ] |
|---|
| 1854 | [Added cabal-setup |
|---|
| 1855 | sven.panne@aedion.de**20060804142149] |
|---|
| 1856 | [Don't include the package name in a cost centre's module name |
|---|
| 1857 | Simon Marlow <simonmar@microsoft.com>**20060803093337 |
|---|
| 1858 | This is mainly to restore the old behaviour, but also we shouldn't |
|---|
| 1859 | normally need the package name in a cost centre because only the |
|---|
| 1860 | "main" package normally has cost centres. |
|---|
| 1861 | ] |
|---|
| 1862 | [Add a new section "Getting the Source" to both HACKING and README. But what about win32 users? |
|---|
| 1863 | shae@ScannedInAvian.com**20060720152929] |
|---|
| 1864 | [savingOldConfig: add Exception.block for extra paranoia |
|---|
| 1865 | Simon Marlow <simonmar@microsoft.com>**20060801131027 |
|---|
| 1866 | |
|---|
| 1867 | ] |
|---|
| 1868 | [Refactor ghc-pkg |
|---|
| 1869 | Ian Lynagh <igloo@earth.li>**20060729192946 |
|---|
| 1870 | This patch fixes a couple of issues with the |
|---|
| 1871 | Be lazier in user config creation, and don't fail on missing configs. |
|---|
| 1872 | patch. It puts the createDirectoryIfMissing back in and removes assumptions |
|---|
| 1873 | that the package.conf file already exists. |
|---|
| 1874 | ] |
|---|
| 1875 | [No functionality changes |
|---|
| 1876 | Ian Lynagh <igloo@earth.li>**20060730105256 |
|---|
| 1877 | Consistently used spaces rather than tabs. |
|---|
| 1878 | Removed trailing whitespace. |
|---|
| 1879 | Wrapped comments to fit in a standard terminal. |
|---|
| 1880 | ] |
|---|
| 1881 | [Add notes about unsafeCoerce |
|---|
| 1882 | simonpj@microsoft.com**20060731080922] |
|---|
| 1883 | [.hi-boot-5 is obsolete; the earliest GHC we support uses .hi-boot-6 |
|---|
| 1884 | Simon Marlow <simonmar@microsoft.com>**20060728140809 |
|---|
| 1885 | |
|---|
| 1886 | |
|---|
| 1887 | ] |
|---|
| 1888 | [update to match .lhs-boot |
|---|
| 1889 | Simon Marlow <simonmar@microsoft.com>**20060728140607] |
|---|
| 1890 | [get ReadP from the right place. |
|---|
| 1891 | Simon Marlow <simonmar@microsoft.com>**20060728140444 |
|---|
| 1892 | |
|---|
| 1893 | ] |
|---|
| 1894 | [Improve error message for deriving |
|---|
| 1895 | simonpj@microsoft.com**20060727160832] |
|---|
| 1896 | [Lazy patterns are like wild-cards for overlap warnings |
|---|
| 1897 | simonpj@microsoft.com**20060727155009 |
|---|
| 1898 | |
|---|
| 1899 | MERGE TO STABLE |
|---|
| 1900 | |
|---|
| 1901 | Fixes Trac #827 |
|---|
| 1902 | Test is should_compiler/ds058 |
|---|
| 1903 | |
|---|
| 1904 | ] |
|---|
| 1905 | [fix some problems with wired-in packages |
|---|
| 1906 | Simon Marlow <simonmar@microsoft.com>**20060727153802] |
|---|
| 1907 | [oops, remove old packages when updating |
|---|
| 1908 | Simon Marlow <simonmar@microsoft.com>**20060727150650] |
|---|
| 1909 | [fix symbols for GHC.PrimopWrappers |
|---|
| 1910 | Simon Marlow <simonmar@microsoft.com>**20060727134755] |
|---|
| 1911 | [a couple more symbols need package names |
|---|
| 1912 | Simon Marlow <simonmar@microsoft.com>**20060727102129] |
|---|
| 1913 | [Add missing import |
|---|
| 1914 | simonpj@microsoft.com**20060727085605] |
|---|
| 1915 | [Make -fcontext-stack into a dynamic flag |
|---|
| 1916 | simonpj@microsoft.com**20060727080422 |
|---|
| 1917 | |
|---|
| 1918 | This allows you to put -fcontext-stack into an options pragma, |
|---|
| 1919 | as requested by Trac #829 |
|---|
| 1920 | |
|---|
| 1921 | While I was at it, I added OptIntPrefix to the forms allowed |
|---|
| 1922 | in CmdLineParser. |
|---|
| 1923 | |
|---|
| 1924 | ] |
|---|
| 1925 | [Deal correctly with infix type constructors in GADT decls |
|---|
| 1926 | simonpj@microsoft.com**20060726225304] |
|---|
| 1927 | [Improve pretty printing of ConDecl |
|---|
| 1928 | simonpj@microsoft.com**20060726225223] |
|---|
| 1929 | [fix parse error (merge-o, I think) |
|---|
| 1930 | Simon Marlow <simonmar@microsoft.com>**20060726103526] |
|---|
| 1931 | [fix DEBUG build |
|---|
| 1932 | Simon Marlow <simonmar@microsoft.com>**20060726103433] |
|---|
| 1933 | [missed one symbol that needs a package name |
|---|
| 1934 | Simon Marlow <simonmar@microsoft.com>**20060726085844] |
|---|
| 1935 | [change wired-in Haskell symbols to include the package name |
|---|
| 1936 | Simon Marlow <simonmar@microsoft.com>**20060726084659] |
|---|
| 1937 | [Unbox the Unique stored in a Name |
|---|
| 1938 | Simon Marlow <simonmar@microsoft.com>**20060725141747 |
|---|
| 1939 | I measured that this makes the comiler allocate a bit more, but it |
|---|
| 1940 | might also make it faster and reduce residency. The extra allocation |
|---|
| 1941 | is probably just because we're not inlining enough somewhere, so I |
|---|
| 1942 | think this change is a step in the right direction. |
|---|
| 1943 | ] |
|---|
| 1944 | [optimisations to newUnique |
|---|
| 1945 | Simon Marlow <simonmar@microsoft.com>**20060725140816 |
|---|
| 1946 | |
|---|
| 1947 | It turned out that newUnique was wasting one node of the splittable |
|---|
| 1948 | uniq supply per invocation: it took the current supply, split it, used |
|---|
| 1949 | the unique from one half and stored the other half in the monad. In |
|---|
| 1950 | other words, the unique in the supply stored in the monad was never |
|---|
| 1951 | used. |
|---|
| 1952 | |
|---|
| 1953 | This optimisation fixes that and adds a bit of strictness, which |
|---|
| 1954 | together lead to small reduction in allocations by the compiler, and |
|---|
| 1955 | possibly an improvement in residency (hard to tell for sure when GCs |
|---|
| 1956 | move around). |
|---|
| 1957 | ] |
|---|
| 1958 | [tiny bit of extra strictness |
|---|
| 1959 | Simon Marlow <simonmar@microsoft.com>**20060725131201] |
|---|
| 1960 | [Make a SplitUniqSupply contain an Int# rather than an Int |
|---|
| 1961 | Simon Marlow <simonmar@microsoft.com>**20060725120252 |
|---|
| 1962 | The I# constructor is always removed when we make a unique later |
|---|
| 1963 | anyway, so this just saves a bit of time and allocation. |
|---|
| 1964 | ] |
|---|
| 1965 | [Use -package-name rather than -ignore-package |
|---|
| 1966 | Simon Marlow <simonmar@microsoft.com>**20060725130913] |
|---|
| 1967 | [Remove most of the conflict checking and auto-hiding |
|---|
| 1968 | Simon Marlow <simonmar@microsoft.com>**20060725130850 |
|---|
| 1969 | Now that the module restriction has been lifted, the auto-hiding is |
|---|
| 1970 | mostly not required. GHC itself automatically hides old versions of a |
|---|
| 1971 | package. |
|---|
| 1972 | ] |
|---|
| 1973 | [Generalise Package Support |
|---|
| 1974 | Simon Marlow <simonmar@microsoft.com>**20060725130154 |
|---|
| 1975 | |
|---|
| 1976 | This patch pushes through one fundamental change: a module is now |
|---|
| 1977 | identified by the pair of its package and module name, whereas |
|---|
| 1978 | previously it was identified by its module name alone. This means |
|---|
| 1979 | that now a program can contain multiple modules with the same name, as |
|---|
| 1980 | long as they belong to different packages. |
|---|
| 1981 | |
|---|
| 1982 | This is a language change - the Haskell report says nothing about |
|---|
| 1983 | packages, but it is now necessary to understand packages in order to |
|---|
| 1984 | understand GHC's module system. For example, a type T from module M |
|---|
| 1985 | in package P is different from a type T from module M in package Q. |
|---|
| 1986 | Previously this wasn't an issue because there could only be a single |
|---|
| 1987 | module M in the program. |
|---|
| 1988 | |
|---|
| 1989 | The "module restriction" on combining packages has therefore been |
|---|
| 1990 | lifted, and a program can contain multiple versions of the same |
|---|
| 1991 | package. |
|---|
| 1992 | |
|---|
| 1993 | Note that none of the proposed syntax changes have yet been |
|---|
| 1994 | implemented, but the architecture is geared towards supporting import |
|---|
| 1995 | declarations qualified by package name, and that is probably the next |
|---|
| 1996 | step. |
|---|
| 1997 | |
|---|
| 1998 | It is now necessary to specify the package name when compiling a |
|---|
| 1999 | package, using the -package-name flag (which has been un-deprecated). |
|---|
| 2000 | Fortunately Cabal still uses -package-name. |
|---|
| 2001 | |
|---|
| 2002 | Certain packages are "wired in". Currently the wired-in packages are: |
|---|
| 2003 | base, haskell98, template-haskell and rts, and are always referred to |
|---|
| 2004 | by these versionless names. Other packages are referred to with full |
|---|
| 2005 | package IDs (eg. "network-1.0"). This is because the compiler needs |
|---|
| 2006 | to refer to entities in the wired-in packages, and we didn't want to |
|---|
| 2007 | bake the version of these packages into the comiler. It's conceivable |
|---|
| 2008 | that someone might want to upgrade the base package independently of |
|---|
| 2009 | GHC. |
|---|
| 2010 | |
|---|
| 2011 | Internal changes: |
|---|
| 2012 | |
|---|
| 2013 | - There are two module-related types: |
|---|
| 2014 | |
|---|
| 2015 | ModuleName just a FastString, the name of a module |
|---|
| 2016 | Module a pair of a PackageId and ModuleName |
|---|
| 2017 | |
|---|
| 2018 | A mapping from ModuleName can be a UniqFM, but a mapping from Module |
|---|
| 2019 | must be a FiniteMap (we provide it as ModuleEnv). |
|---|
| 2020 | |
|---|
| 2021 | - The "HomeModules" type that was passed around the compiler is now |
|---|
| 2022 | gone, replaced in most cases by the current package name which is |
|---|
| 2023 | contained in DynFlags. We can tell whether a Module comes from the |
|---|
| 2024 | current package by comparing its package name against the current |
|---|
| 2025 | package. |
|---|
| 2026 | |
|---|
| 2027 | - While I was here, I changed PrintUnqual to be a little more useful: |
|---|
| 2028 | it now returns the ModuleName that the identifier should be qualified |
|---|
| 2029 | with according to the current scope, rather than its original |
|---|
| 2030 | module. Also, PrintUnqual tells whether to qualify module names with |
|---|
| 2031 | package names (currently unused). |
|---|
| 2032 | |
|---|
| 2033 | Docs to follow. |
|---|
| 2034 | ] |
|---|
| 2035 | [comment formatting |
|---|
| 2036 | Simon Marlow <simonmar@microsoft.com>**20060725110519 |
|---|
| 2037 | |
|---|
| 2038 | ] |
|---|
| 2039 | [unused import |
|---|
| 2040 | Simon Marlow <simonmar@microsoft.com>**20060706141349] |
|---|
| 2041 | [unused import |
|---|
| 2042 | Simon Marlow <simonmar@microsoft.com>**20060706141205] |
|---|
| 2043 | [remove more Addr bits |
|---|
| 2044 | Simon Marlow <simonmar@microsoft.com>**20060704151217] |
|---|
| 2045 | [unused import |
|---|
| 2046 | Simon Marlow <simonmar@microsoft.com>**20060704141319] |
|---|
| 2047 | [add default cases |
|---|
| 2048 | Simon Marlow <simonmar@microsoft.com>**20060704135444] |
|---|
| 2049 | [redundant import |
|---|
| 2050 | Simon Marlow <simonmar@microsoft.com>**20060704135435] |
|---|
| 2051 | [unused imports |
|---|
| 2052 | Simon Marlow <simonmar@microsoft.com>**20060704135117] |
|---|
| 2053 | [unused import |
|---|
| 2054 | Simon Marlow <simonmar@microsoft.com>**20060704134557] |
|---|
| 2055 | [remove unused bits, mostly to do with the Addr type |
|---|
| 2056 | Simon Marlow <simonmar@microsoft.com>**20060704124912] |
|---|
| 2057 | [In interface files, store FastStrings rather than OccNames where possible |
|---|
| 2058 | Simon Marlow <simonmar@microsoft.com>**20060724154826 |
|---|
| 2059 | In all cases the namespace is known from the context, so this saves 1 |
|---|
| 2060 | byte per variable binding/occurrence (a few percent per iface file). |
|---|
| 2061 | ] |
|---|
| 2062 | [Add -fmono-pat-binds, and make it the default |
|---|
| 2063 | simonpj@microsoft.com**20060722102245 |
|---|
| 2064 | |
|---|
| 2065 | In Haskell 98, pattern bindings are generalised. Thus in |
|---|
| 2066 | (f,g) = (\x->x, \y->y) |
|---|
| 2067 | both f and g will get polymorphic types. I have become convinced |
|---|
| 2068 | that generalisation for pattern-bound variables is just a bridge |
|---|
| 2069 | toof far. It is (I claim) almost never needed, and it adds significant |
|---|
| 2070 | complication. (All the more so if we add bang patterns.) |
|---|
| 2071 | |
|---|
| 2072 | So the flag -fmono-pat-binds switches off generalisation for pattern |
|---|
| 2073 | bindings. (A single variable is treated as a degnerate funtction |
|---|
| 2074 | binding.) |
|---|
| 2075 | |
|---|
| 2076 | Furthremore, as an experiment, I'm making it the default. I want |
|---|
| 2077 | to see how many progarms fail with monomorphic pattern bindings. |
|---|
| 2078 | |
|---|
| 2079 | You can recover the standard behaviour with -fno-mono-pa-binds. |
|---|
| 2080 | |
|---|
| 2081 | ] |
|---|
| 2082 | [Fix RULES lossage |
|---|
| 2083 | simonpj@microsoft.com**20060722101756 |
|---|
| 2084 | |
|---|
| 2085 | Don Stewart and Duncan Coutts encountered the following situation. |
|---|
| 2086 | f = <rhs> |
|---|
| 2087 | {-# RULES f ... #-} |
|---|
| 2088 | where f is not exported, but appears in the inlinings of other |
|---|
| 2089 | functions that are exported. Then what happened was that the desugarer |
|---|
| 2090 | produced this: |
|---|
| 2091 | M.f = f |
|---|
| 2092 | f = <rhs> |
|---|
| 2093 | where the rules get attached to the M.f. But since M.f's RHS is trivial |
|---|
| 2094 | (just f) it was unconditionally inlinined at all its call sites, |
|---|
| 2095 | thereby losing the RULES attached to it. |
|---|
| 2096 | |
|---|
| 2097 | This *is* a fragile aspect of rules. However this fix solves the |
|---|
| 2098 | problem by instead generating |
|---|
| 2099 | f = M.f |
|---|
| 2100 | M.f = <rhs> |
|---|
| 2101 | |
|---|
| 2102 | A pretty small chanage to the desugarer does the job. It still feels |
|---|
| 2103 | a little fragile, bt it's certainly more robust than before. |
|---|
| 2104 | |
|---|
| 2105 | ] |
|---|
| 2106 | [Fix broken regex |
|---|
| 2107 | Simon Marlow <simonmar@microsoft.com>**20060721111144 |
|---|
| 2108 | Don't know how I managed to use this before... maybe a different regex |
|---|
| 2109 | library. |
|---|
| 2110 | ] |
|---|
| 2111 | [fix bug in sample code |
|---|
| 2112 | Simon Marlow <simonmar@microsoft.com>**20060721083200] |
|---|
| 2113 | [fix eran error message by reordering a couple of tests |
|---|
| 2114 | simonmar@microsoft.com**20060719111638] |
|---|
| 2115 | [Use a recursive error handler in case the exception causes more exceptions. |
|---|
| 2116 | Lemmih <lemmih@gmail.com>**20060717232553] |
|---|
| 2117 | [Check for overlap-flag differences in hi files |
|---|
| 2118 | simonpj@microsoft.com**20060714163843 |
|---|
| 2119 | |
|---|
| 2120 | MERGE TO STABLE |
|---|
| 2121 | |
|---|
| 2122 | I'd forgotten to compare the per-instance overlap flag when |
|---|
| 2123 | comparing interface files, and that meant that consequential |
|---|
| 2124 | recompilations weren't being triggered when the only change |
|---|
| 2125 | was to add -fallow-overlapping-instances |
|---|
| 2126 | |
|---|
| 2127 | Fixes Trac bug #824 |
|---|
| 2128 | |
|---|
| 2129 | |
|---|
| 2130 | ] |
|---|
| 2131 | [Add a clarification about overlapping instances in the manual |
|---|
| 2132 | simonpj@microsoft.com**20060714143220] |
|---|
| 2133 | [Comments and import trimming |
|---|
| 2134 | simonpj@microsoft.com**20060712153306] |
|---|
| 2135 | [Experimental flag -fdicts-cheap |
|---|
| 2136 | simonpj@microsoft.com**20060712153204 |
|---|
| 2137 | |
|---|
| 2138 | This experimental flag, -fdicts-cheap, makes a let-binding that bind a |
|---|
| 2139 | value of dictionary type look cheap. That in turn leads to more |
|---|
| 2140 | eta expansion. Instead of |
|---|
| 2141 | f = /\a. \(d1:Ord a). let d2:Ord [a] = dfOrd a d1 in |
|---|
| 2142 | \(x:a). <stuff> |
|---|
| 2143 | which has arity 1, you get |
|---|
| 2144 | f = /\a. \(d1:Ord a). \(x:a). |
|---|
| 2145 | let d2:Ord [a] = dfOrd a d1 in <stuff> |
|---|
| 2146 | Now f has arity 2. |
|---|
| 2147 | |
|---|
| 2148 | This can cretainly waste dictionary-construction work, if f is |
|---|
| 2149 | partially applied to its dictionary argument. However it has knock-on |
|---|
| 2150 | effects. Because f has arity 2, we won't float (f Int d) out of |
|---|
| 2151 | \x. h (f Int d) |
|---|
| 2152 | Floating f out of this lambda makes it impossible for an h/f fusion |
|---|
| 2153 | rule to fire; and this unexpected loss of RULE application was the |
|---|
| 2154 | immediate reason for implementing this flag. (Roman Leshchinskiy came |
|---|
| 2155 | across this when working on array fusion.) |
|---|
| 2156 | |
|---|
| 2157 | |
|---|
| 2158 | I've implemented the change only in CoreUtils.arityType, which |
|---|
| 2159 | only affects eta expansion. I thought of putting the change in |
|---|
| 2160 | exprIsCheap, which is a more systematic place (the former calls |
|---|
| 2161 | the latter) but |
|---|
| 2162 | |
|---|
| 2163 | a) I wanted this under flag control, and the flags |
|---|
| 2164 | are not readily available to all callers of exprIsCheap |
|---|
| 2165 | |
|---|
| 2166 | b) I'm not 100% convinced that this change is a good |
|---|
| 2167 | idea, so it's reasonable to do the narrowest change |
|---|
| 2168 | that solves the immediate problem. |
|---|
| 2169 | ] |
|---|
| 2170 | [document that -fglasgow-exts is needed for RULES to work |
|---|
| 2171 | Malcolm.Wallace@cs.york.ac.uk**20060712093907] |
|---|
| 2172 | [do a better job of ignoring unrecognised pragmas |
|---|
| 2173 | Simon Marlow <simonmar@microsoft.com>**20060712083550] |
|---|
| 2174 | [Don't z-encode module names in external-core output |
|---|
| 2175 | Jan Rochel <jan.rochel@stud.uka.de>**20060706131109] |
|---|
| 2176 | [re-add -fvia-C |
|---|
| 2177 | Simon Marlow <simonmar@microsoft.com>**20060710081522 |
|---|
| 2178 | There are still some fixes required to get the threaded RTS compilable |
|---|
| 2179 | with the NCG, and apparently there are problems on 32-bit archs too. |
|---|
| 2180 | |
|---|
| 2181 | ] |
|---|
| 2182 | [Be lazier in user config creation, and don't fail on missing configs. |
|---|
| 2183 | Ian Lynagh <igloo@earth.li>**20060624230800] |
|---|
| 2184 | [Z-Encode external-core output |
|---|
| 2185 | Jan Rochel <jan.rochel@stud.uka.de>**20060702214438 |
|---|
| 2186 | |
|---|
| 2187 | HEAD doesn't z-encode external-core output (unlike 6.4). I suppose, that |
|---|
| 2188 | this is unwanted behaviour. It probably results from this patch: |
|---|
| 2189 | |
|---|
| 2190 | ======================================================================== |
|---|
| 2191 | Fri Jan 6 17:30:19 CET 2006 simonmar |
|---|
| 2192 | * [project @ 2006-01-06 16:30:17 by simonmar] |
|---|
| 2193 | Add support for UTF-8 source files |
|---|
| 2194 | |
|---|
| 2195 | [...] |
|---|
| 2196 | |
|---|
| 2197 | Z-encoding has been moved right to the back end. Previously we |
|---|
| 2198 | used to Z-encode every identifier on the way in for simplicity, |
|---|
| 2199 | and only decode when we needed to show something to the user. |
|---|
| 2200 | Instead, we now keep every string in its UTF-8 encoding, and |
|---|
| 2201 | Z-encode right before printing it out. |
|---|
| 2202 | |
|---|
| 2203 | [...] |
|---|
| 2204 | ======================================================================== |
|---|
| 2205 | |
|---|
| 2206 | Greetings |
|---|
| 2207 | Jan |
|---|
| 2208 | ] |
|---|
| 2209 | [Add %local-tag to external core output |
|---|
| 2210 | Jan Rochel <jan.rochel@stud.uka.de>**20060702204559 |
|---|
| 2211 | |
|---|
| 2212 | Hello, this is my first patch contributed to GHC. If there are any |
|---|
| 2213 | inadequacies about it (maybe like this introductory disclaimer), please |
|---|
| 2214 | let me know about it. |
|---|
| 2215 | |
|---|
| 2216 | So, the need for this patch arose, while I was involved with processing |
|---|
| 2217 | hcr files (external core output) and I noticed, that the output didn't |
|---|
| 2218 | fully conform to the specification [1]. |
|---|
| 2219 | No %local-tags were used, which turned out to be a real nuisance as it |
|---|
| 2220 | was not possible to determine which VDEFs can be erased in a further |
|---|
| 2221 | optimization process and which ones are exported by the module. |
|---|
| 2222 | |
|---|
| 2223 | Since the specification does not define the meaning of the %local-tag, I |
|---|
| 2224 | assume, it makes sense, that it tags all functions, that are not |
|---|
| 2225 | exported by the module. |
|---|
| 2226 | |
|---|
| 2227 | The patch does not fully comply to the specification, as in my |
|---|
| 2228 | implementation a local tag may appear before a VDEF but not before a |
|---|
| 2229 | VDEFG. |
|---|
| 2230 | |
|---|
| 2231 | [1] An External Representation for the GHC Core Language |
|---|
| 2232 | (DRAFT for GHC5.02), page 3, line 1 |
|---|
| 2233 | |
|---|
| 2234 | Greetings |
|---|
| 2235 | Jan |
|---|
| 2236 | ] |
|---|
| 2237 | [Remove bashisms from darcs-all |
|---|
| 2238 | Alec Berryman <alec@thened.net>**20060703012911 |
|---|
| 2239 | |
|---|
| 2240 | darcs-all may now be run with any POSIX-compatible /bin/sh. |
|---|
| 2241 | ] |
|---|
| 2242 | [Fix for warning message (bug #812) |
|---|
| 2243 | Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060704163413 |
|---|
| 2244 | say "{-# SOURCE #-}" rather than "{- SOURCE -}" in warning message. |
|---|
| 2245 | Fixes http://hackage.haskell.org/trac/ghc/ticket/812 |
|---|
| 2246 | ] |
|---|
| 2247 | [The dict-bindings in an IPBinds need not be in dependency order |
|---|
| 2248 | simonpj@microsoft.com**20060703151517 |
|---|
| 2249 | |
|---|
| 2250 | This appears to be a long-standing bug, discovered by BlueSpec |
|---|
| 2251 | (ravi@bluespec.com), Trac bug #795 |
|---|
| 2252 | |
|---|
| 2253 | The problem was that in an IP binding group, the dict bindings |
|---|
| 2254 | aren't necessarily in dependency order; and if they aren't |
|---|
| 2255 | we get a core-lint error. |
|---|
| 2256 | |
|---|
| 2257 | Test tc203 checks this case. (Though whether it shows up at |
|---|
| 2258 | all depends a bit on accidental factors of binding ordering.) |
|---|
| 2259 | |
|---|
| 2260 | ] |
|---|
| 2261 | [x86 needs -fno-unit-at-a-time too |
|---|
| 2262 | Simon Marlow <simonmar@microsoft.com>**20060704083308 |
|---|
| 2263 | Fixes #809 |
|---|
| 2264 | ] |
|---|
| 2265 | [x86-64: fix a problem exposed by negative offsets in vector tables |
|---|
| 2266 | Simon Marlow <simonmar@microsoft.com>**20060629140608 |
|---|
| 2267 | static relative offsets (eg .long l1-l2) are restricted to 32 bits on |
|---|
| 2268 | x86-64 due to lack of support in the linker. The codegen, NCG and |
|---|
| 2269 | runtime work around this, using 32-bit offsets instead of 64. |
|---|
| 2270 | However, we were missing a workaround for vector tables, and it |
|---|
| 2271 | happened to work by accident because the offsets were always positive |
|---|
| 2272 | and resolved by the assembler. The bug was exposed by using the NCG |
|---|
| 2273 | to compile the RTS, where the offsets became negative, again by |
|---|
| 2274 | accident. |
|---|
| 2275 | ] |
|---|
| 2276 | [No longer force -fvia-C for the RTS, it can now be compiled with the NCG |
|---|
| 2277 | Simon Marlow <simonmar@microsoft.com>**20060629135836] |
|---|
| 2278 | [Replace inline C functions with C-- macros in .cmm code |
|---|
| 2279 | Simon Marlow <simonmar@microsoft.com>**20060629134726 |
|---|
| 2280 | So that we can build the RTS with the NCG. |
|---|
| 2281 | ] |
|---|
| 2282 | [remove conditionals from definition of StgRegTable |
|---|
| 2283 | Simon Marlow <simonmar@microsoft.com>**20060629134405 |
|---|
| 2284 | so that we can calculate deterministic offsets to some of the fields |
|---|
| 2285 | of Capability. |
|---|
| 2286 | ] |
|---|
| 2287 | [mpz_foo() functions are really called __gmpz_foo() in GMP |
|---|
| 2288 | Simon Marlow <simonmar@microsoft.com>**20060629122217 |
|---|
| 2289 | gmp.h #defines mpz_foo to __gmpz_foo, so the real ABI is __gmpz_foo, |
|---|
| 2290 | so that is what we must invoke in order to be portable here. |
|---|
| 2291 | Similarly for mpn --> __gmpn. |
|---|
| 2292 | ] |
|---|
| 2293 | [use the new "prim %write_barrier()" in .cmm instead of calls to wb() |
|---|
| 2294 | Simon Marlow <simonmar@microsoft.com>**20060629120526] |
|---|
| 2295 | [fix some problems with the fixup block code |
|---|
| 2296 | Simon Marlow <simonmar@microsoft.com>**20060629120210 |
|---|
| 2297 | We weren't handling InBoth properly. InBoth needs to be expanded to |
|---|
| 2298 | appropriate InReg/InMem locations *before* building the interference |
|---|
| 2299 | graph, otherwise an InBoth will not be seen to conflict with other |
|---|
| 2300 | InReg/InMem locations. |
|---|
| 2301 | ] |
|---|
| 2302 | [small optimisation: eliminate more register-to-register moves |
|---|
| 2303 | Simon Marlow <simonmar@microsoft.com>**20060629120029] |
|---|
| 2304 | [new syntax: "prim %OP (args)" for using CallishMachOps in .cmm |
|---|
| 2305 | Simon Marlow <simonmar@microsoft.com>**20060629115949 |
|---|
| 2306 | |
|---|
| 2307 | |
|---|
| 2308 | ] |
|---|
| 2309 | [add MO_WriteBarrier to CallishMachOps |
|---|
| 2310 | Simon Marlow <simonmar@microsoft.com>**20060629115837 |
|---|
| 2311 | This will let us express write barriers in C-- |
|---|
| 2312 | ] |
|---|
| 2313 | [Use -fno-strict-aliasing for *all* C files in the runtime |
|---|
| 2314 | Simon Marlow <simonmar@microsoft.com>**20060629082902 |
|---|
| 2315 | as a precautionary measure. It is definitely required for GC.c, |
|---|
| 2316 | but it may well become necessary for other files in the future due to |
|---|
| 2317 | our (mis-)use of the C "type system". |
|---|
| 2318 | ] |
|---|
| 2319 | [the unlifted kind |
|---|
| 2320 | Simon Marlow <simonmar@microsoft.com>**20060623152626] |
|---|
| 2321 | [fix a lint-o |
|---|
| 2322 | Simon Marlow <simonmar@microsoft.com>**20060620151901] |
|---|
| 2323 | [fix sloppy conditionals |
|---|
| 2324 | Simon Marlow <simonmar@microsoft.com>**20060620151758] |
|---|
| 2325 | [fix sloppy conditionals |
|---|
| 2326 | Simon Marlow <simonmar@microsoft.com>**20060620151039] |
|---|
| 2327 | [fix a few sloppy conditionals caught by new test in CmmLint |
|---|
| 2328 | Simon Marlow <simonmar@microsoft.com>**20060620150618] |
|---|
| 2329 | [flattenCgStmts: fix a case of empty code blocks being generated |
|---|
| 2330 | Simon Marlow <simonmar@microsoft.com>**20060620150520] |
|---|
| 2331 | [improve a panic message |
|---|
| 2332 | Simon Marlow <simonmar@microsoft.com>**20060620141219] |
|---|
| 2333 | [check that the argument to CmmCondBranch is really a conditional |
|---|
| 2334 | Simon Marlow <simonmar@microsoft.com>**20060620141204] |
|---|
| 2335 | [Generate a new unique for each label |
|---|
| 2336 | Simon Marlow <simonmar@microsoft.com>**20060620140106] |
|---|
| 2337 | [Remove long-redundant FieldLabel.lhs |
|---|
| 2338 | simonpj@microsoft.com**20060629105321] |
|---|
| 2339 | [Add comments to SpecConstr |
|---|
| 2340 | simonpj@microsoft.com**20060627161520] |
|---|
| 2341 | [fix up slop-overwriting for THUNK_SELECTORS in DEBUG mode |
|---|
| 2342 | Simon Marlow <simonmar@microsoft.com>**20060627123951] |
|---|
| 2343 | [Make SpecConstr work better for nested functions |
|---|
| 2344 | simonpj@microsoft.com**20060627094742 |
|---|
| 2345 | |
|---|
| 2346 | In SpecConstr.scBind, we should pass the optimised body (body') to |
|---|
| 2347 | specialise, not the un-optimised one. In this way we'll benefit from |
|---|
| 2348 | specialising any nested functions inside body. |
|---|
| 2349 | |
|---|
| 2350 | Discovered by Roman. |
|---|
| 2351 | |
|---|
| 2352 | ] |
|---|
| 2353 | [More SpecConstr tuning |
|---|
| 2354 | simonpj@microsoft.com**20060626201709 |
|---|
| 2355 | |
|---|
| 2356 | For some reason, SpecConstr wasn't taking account of let-bound constructors: |
|---|
| 2357 | let v = Just 4 |
|---|
| 2358 | in ...(f v)... |
|---|
| 2359 | |
|---|
| 2360 | Now it does. An easy fix fortunately. |
|---|
| 2361 | |
|---|
| 2362 | ] |
|---|
| 2363 | [Improve consistency checking for derived instances |
|---|
| 2364 | simonpj@microsoft.com**20060626100034 |
|---|
| 2365 | |
|---|
| 2366 | This patch arranges that derived instances use the same instance-decl |
|---|
| 2367 | checking code as user-defined instances. That gives greater consistency |
|---|
| 2368 | in error messages. |
|---|
| 2369 | |
|---|
| 2370 | Furthermore, the error description if this consistency check fails is now |
|---|
| 2371 | much more explicit. For example, drvfail003 now says |
|---|
| 2372 | Variable occurs more often in a constraint than in the instance head |
|---|
| 2373 | in the constraint: Show (v (v a)) |
|---|
| 2374 | (Use -fallow-undecidable-instances to permit this) |
|---|
| 2375 | In the derived instance |
|---|
| 2376 | instance (Show (v (v a))) => Show (Square_ v w a) |
|---|
| 2377 | |
|---|
| 2378 | ] |
|---|
| 2379 | [Slight improvement in TH error reporting |
|---|
| 2380 | simonpj@microsoft.com**20060626095952] |
|---|
| 2381 | [Improve location info when typechecking interface fiels |
|---|
| 2382 | simonpj@microsoft.com**20060614114813] |
|---|
| 2383 | [Fix a bug in the pretty printing of class declarations |
|---|
| 2384 | davve@dtek.chalmers.se**20060625160826] |
|---|
| 2385 | [Improve RULE matching a bit more |
|---|
| 2386 | simonpj@microsoft.com**20060624160421 |
|---|
| 2387 | |
|---|
| 2388 | Consider this example (provided by Roman) |
|---|
| 2389 | |
|---|
| 2390 | foo :: Int -> Maybe Int -> Int |
|---|
| 2391 | foo 0 (Just n) = n |
|---|
| 2392 | foo m (Just n) = foo (m-n) (Just n) |
|---|
| 2393 | |
|---|
| 2394 | SpecConstr sees this fragment: |
|---|
| 2395 | |
|---|
| 2396 | case w_smT of wild_Xf [Just A] { |
|---|
| 2397 | Data.Maybe.Nothing -> lvl_smf; |
|---|
| 2398 | Data.Maybe.Just n_acT [Just S(L)] -> |
|---|
| 2399 | case n_acT of wild1_ams [Just A] { GHC.Base.I# y_amr [Just L] -> |
|---|
| 2400 | $wfoo_smW (GHC.Prim.-# ds_Xmb y_amr) wild_Xf |
|---|
| 2401 | }}; |
|---|
| 2402 | |
|---|
| 2403 | and correctly generates the rule |
|---|
| 2404 | |
|---|
| 2405 | RULES: "SC:$wfoo1" [0] __forall {y_amr [Just L] :: GHC.Prim.Int# |
|---|
| 2406 | sc_snn :: GHC.Prim.Int#} |
|---|
| 2407 | $wfoo_smW sc_snn (Data.Maybe.Just @ GHC.Base.Int (GHC.Base.I# y_amr)) |
|---|
| 2408 | = $s$wfoo_sno y_amr sc_snn ;] |
|---|
| 2409 | |
|---|
| 2410 | BUT we must ensure that this rule matches in the original function! |
|---|
| 2411 | Note that the call to $wfoo is |
|---|
| 2412 | $wfoo_smW (GHC.Prim.-# ds_Xmb y_amr) wild_Xf |
|---|
| 2413 | |
|---|
| 2414 | During matching we expand wild_Xf to (Just n_acT). But then we must also |
|---|
| 2415 | expand n_acT to (I# y_amr). And we can only do that if we look up n_acT |
|---|
| 2416 | in the in-scope set, because in wild_Xf's unfolding it won't have an unfolding |
|---|
| 2417 | at all. |
|---|
| 2418 | |
|---|
| 2419 | Happily, fixing the bug is easy: add a call to 'lookupRnInScope' in the |
|---|
| 2420 | (Var v2) case of 'match'. |
|---|
| 2421 | |
|---|
| 2422 | ] |
|---|
| 2423 | [--enable-src-tree-haddock and friends are no longer required |
|---|
| 2424 | Simon Marlow <simonmar@microsoft.com>**20060623113303 |
|---|
| 2425 | Happy, Alex and Haddock are built separately using Cabal now. |
|---|
| 2426 | ] |
|---|
| 2427 | [fix a couple of bugs in markSparkQueue (#799) |
|---|
| 2428 | Simon Marlow <simonmar@microsoft.com>**20060623092044] |
|---|
| 2429 | [pull in STABLE(!) tweaks |
|---|
| 2430 | sof@galois.com**20060622202734] |
|---|
| 2431 | [fix for when path to GHC contains spaces, from #695 |
|---|
| 2432 | Simon Marlow <simonmar@microsoft.com>**20060622131700] |
|---|
| 2433 | [Comment only |
|---|
| 2434 | simonpj@microsoft.com**20060621223940] |
|---|
| 2435 | [Transfer INLINE to specialised functions |
|---|
| 2436 | simonpj@microsoft.com**20060621223637 |
|---|
| 2437 | |
|---|
| 2438 | When the Specialise pass generates a specialised copy of a function, |
|---|
| 2439 | it should transfer the INLINE information to the specialised function. |
|---|
| 2440 | Otherwise, whether or not the INLNE happens can depend on whether |
|---|
| 2441 | specialisation happens, which seems wrong. See Note [Inline specialisation] |
|---|
| 2442 | in Specialise.lhs |
|---|
| 2443 | |
|---|
| 2444 | Here's the example Roman reported |
|---|
| 2445 | |
|---|
| 2446 | primWriteMU :: UAE e => MUArr e s -> Int -> e -> ST s () |
|---|
| 2447 | {-# INLINE primWriteMU #-} |
|---|
| 2448 | primWriteMU = writeMBU . unMUAPrim |
|---|
| 2449 | ------ |
|---|
| 2450 | |
|---|
| 2451 | The problem is that primWriteMU doesn't get inlined *sometimes*, which |
|---|
| 2452 | results in code like |
|---|
| 2453 | |
|---|
| 2454 | case Data.Array.Parallel.Unlifted.Flat.UArr.$sprimWriteMU |
|---|
| 2455 | @ s11_X1nJ |
|---|
| 2456 | marr_s25s |
|---|
| 2457 | (GHC.Base.I# sc_s27F) |
|---|
| 2458 | GHC.Base.False |
|---|
| 2459 | new_s_a1Db |
|---|
| 2460 | of wild3_a1Dd { (# new_s1_X1F9, r_a1Dc #) -> ... |
|---|
| 2461 | |
|---|
| 2462 | Note the fact that we have a call to the *specialised* $sprimWriteMU. |
|---|
| 2463 | |
|---|
| 2464 | ] |
|---|
| 2465 | [Arity and eta-expansion tuning |
|---|
| 2466 | simonpj@microsoft.com**20060621205855 |
|---|
| 2467 | |
|---|
| 2468 | Roman found that |
|---|
| 2469 | loop :: STRef s a -> Int -> ST s Int |
|---|
| 2470 | loop ref n = case n of |
|---|
| 2471 | 0 -> return n |
|---|
| 2472 | n -> loop ref (n-1) |
|---|
| 2473 | wasn't eta-expanding nicely, despite the 'state hack' |
|---|
| 2474 | (see Id.isStateHackType). The reason was two-fold: |
|---|
| 2475 | |
|---|
| 2476 | a) a bug in CoreUtils.arityType (the Var case) |
|---|
| 2477 | |
|---|
| 2478 | b) the arity of a recursive function was not being |
|---|
| 2479 | exposed in its RHS (see commments with |
|---|
| 2480 | SimplEnv.addLetIdInfo |
|---|
| 2481 | |
|---|
| 2482 | The commit fixes both. |
|---|
| 2483 | |
|---|
| 2484 | ] |
|---|
| 2485 | [documentation for TH w/ profiling |
|---|
| 2486 | Simon Marlow <simonmar@microsoft.com>**20060621112523] |
|---|
| 2487 | [Allow Template Haskell to be used with -prof |
|---|
| 2488 | Simon Marlow <simonmar@microsoft.com>**20060621110436 |
|---|
| 2489 | |
|---|
| 2490 | In order for this to work, you need to build the program first in the |
|---|
| 2491 | normal way (without -prof), and then again with -prof and a suitable |
|---|
| 2492 | -osuf (eg. -osuf p_o). The compiler will pick up the object files |
|---|
| 2493 | from the normal way for running TH expressions, when it sees -prof |
|---|
| 2494 | together with -osuf. If you omit the -osuf, you get an error message: |
|---|
| 2495 | |
|---|
| 2496 | TH_genEx.hs:12:2: |
|---|
| 2497 | Dynamic linking required, but this is a non-standard build (eg. prof). |
|---|
| 2498 | You need to build the program twice: once the normal way, and then |
|---|
| 2499 | in the desired way using -osuf to set the object file suffix. |
|---|
| 2500 | |
|---|
| 2501 | If you use -osuf, but haven't built the program the normal way first, |
|---|
| 2502 | then you see: |
|---|
| 2503 | |
|---|
| 2504 | TH_genEx.hs:12:2: |
|---|
| 2505 | cannot find normal object file `TH_genExLib.o' |
|---|
| 2506 | while linking an interpreted expression |
|---|
| 2507 | |
|---|
| 2508 | Documentation to follow. |
|---|
| 2509 | |
|---|
| 2510 | Fixes: #651 |
|---|
| 2511 | ] |
|---|
| 2512 | [add decl for stg_block_throwto_ret |
|---|
| 2513 | Simon Marlow <simonmar@microsoft.com>**20060620083410] |
|---|
| 2514 | [comment out a non-true assertion |
|---|
| 2515 | Simon Marlow <simonmar@microsoft.com>**20060616140750] |
|---|
| 2516 | [make compilation a little less noisy |
|---|
| 2517 | Simon Marlow <simonmar@microsoft.com>**20060616140652] |
|---|
| 2518 | [allow the max number of workers to scale with +RTS -N |
|---|
| 2519 | Simon Marlow <simonmar@microsoft.com>**20060616140633] |
|---|
| 2520 | [fix one-character error in stack check |
|---|
| 2521 | Simon Marlow <simonmar@microsoft.com>**20060616135621] |
|---|
| 2522 | [add STM support to the new throwTo mechanism |
|---|
| 2523 | Simon Marlow <simonmar@microsoft.com>**20060616111937] |
|---|
| 2524 | [remove duplicate way names (-debug -debug didn't work) |
|---|
| 2525 | Simon Marlow <simonmar@microsoft.com>**20060616110258] |
|---|
| 2526 | [Asynchronous exception support for SMP |
|---|
| 2527 | Simon Marlow <simonmar@microsoft.com>**20060616103342 |
|---|
| 2528 | |
|---|
| 2529 | This patch makes throwTo work with -threaded, and also refactors large |
|---|
| 2530 | parts of the concurrency support in the RTS to clean things up. We |
|---|
| 2531 | have some new files: |
|---|
| 2532 | |
|---|
| 2533 | RaiseAsync.{c,h} asynchronous exception support |
|---|
| 2534 | Threads.{c,h} general threading-related utils |
|---|
| 2535 | |
|---|
| 2536 | Some of the contents of these new files used to be in Schedule.c, |
|---|
| 2537 | which is smaller and cleaner as a result of the split. |
|---|
| 2538 | |
|---|
| 2539 | Asynchronous exception support in the presence of multiple running |
|---|
| 2540 | Haskell threads is rather tricky. In fact, to my annoyance there are |
|---|
| 2541 | still one or two bugs to track down, but the majority of the tests run |
|---|
| 2542 | now. |
|---|
| 2543 | ] |
|---|
| 2544 | [make rmp_tmp_w an StgWord instead of StgInt |
|---|
| 2545 | Simon Marlow <simonmar@microsoft.com>**20060616102311] |
|---|
| 2546 | [__compat_long_path_size(): have proto and defn agree on return type |
|---|
| 2547 | sof@galois.com**20060614164650] |
|---|
| 2548 | [call wakeUpRts() in the correct place |
|---|
| 2549 | Simon Marlow <simonmar@microsoft.com>**20060614134728] |
|---|
| 2550 | [readerProc: split up text output using host's line termination convention |
|---|
| 2551 | sof@galois.com**20060613232605] |
|---|
| 2552 | [Improve pretty-printing for bags |
|---|
| 2553 | simonpj@microsoft.com**20060612114020] |
|---|
| 2554 | [Make scoped type variables work for default methods |
|---|
| 2555 | simonpj@microsoft.com**20060612113855 |
|---|
| 2556 | |
|---|
| 2557 | Consider |
|---|
| 2558 | class C a where |
|---|
| 2559 | op :: forall b. a -> b -> b |
|---|
| 2560 | op = <rhs> |
|---|
| 2561 | |
|---|
| 2562 | Then 'b' should be in scope in <rhs>. I had omitted this case. |
|---|
| 2563 | This patch fixes it. |
|---|
| 2564 | |
|---|
| 2565 | ] |
|---|
| 2566 | [And move 'Chasing ...' messages into verbosity 2 as well |
|---|
| 2567 | Don Stewart <dons@cse.unsw.edu.au>**20060612084656] |
|---|
| 2568 | [Emit 'linking not required' messages only with -v 2 or above. |
|---|
| 2569 | Don Stewart <dons@cse.unsw.edu.au>**20060611071041 |
|---|
| 2570 | |
|---|
| 2571 | Similar in philosophy to the 'Skipping' patch, this is another case of |
|---|
| 2572 | printing noisy messages when no work is being done. This patch makes the |
|---|
| 2573 | building-when-nothing-to-do case smoother. |
|---|
| 2574 | |
|---|
| 2575 | ] |
|---|
| 2576 | [Don't emit 'Skipping' messages unless -v2 or higher is on |
|---|
| 2577 | Don Stewart <dons@cse.unsw.edu.au>**20060610145713 |
|---|
| 2578 | |
|---|
| 2579 | Following GNU make, this patch makes GHC not emit messages about modules |
|---|
| 2580 | its skipping. This makes builds much quieter, and its a lot easier to |
|---|
| 2581 | work out what effects a change had on the code. |
|---|
| 2582 | |
|---|
| 2583 | The current behaviour can be recovered with -v2 |
|---|
| 2584 | |
|---|
| 2585 | ] |
|---|
| 2586 | [fix the stage3 build |
|---|
| 2587 | Simon Marlow <simonmar@microsoft.com>**20060612084114] |
|---|
| 2588 | [oops, undo accidental commit of version number |
|---|
| 2589 | Simon Marlow <simonmar@microsoft.com>**20060612083520] |
|---|
| 2590 | [Move readline configuration into the readline package |
|---|
| 2591 | Simon Marlow <simonmar@microsoft.com>**20060609135840] |
|---|
| 2592 | [fix possible ^C problems |
|---|
| 2593 | Simon Marlow <simonmar@microsoft.com>**20060608144457 |
|---|
| 2594 | Calling prodAllCapabilities() from interruptStgRts() was wrong, for |
|---|
| 2595 | the same reasons that we stopped doing it in handle_tick(). We now |
|---|
| 2596 | use the same mechanism (send a byte down the pipe to the IO manager |
|---|
| 2597 | thread), but abstract it in a wakeUpRts() function in the scheduler. |
|---|
| 2598 | ] |
|---|
| 2599 | [New tracing interface |
|---|
| 2600 | Simon Marlow <simonmar@microsoft.com>**20060608144210 |
|---|
| 2601 | A simple interface for generating trace messages with timestamps and |
|---|
| 2602 | thread IDs attached to them. Most debugging output goes through this |
|---|
| 2603 | interface now, so it is straightforward to get timestamped debugging |
|---|
| 2604 | traces with +RTS -vt. Also, we plan to use this to generate |
|---|
| 2605 | parallelism profiles from the trace output. |
|---|
| 2606 | ] |
|---|
| 2607 | [fix warnings |
|---|
| 2608 | Simon Marlow <simonmar@microsoft.com>**20060608143635] |
|---|
| 2609 | [fix warnings |
|---|
| 2610 | Simon Marlow <simonmar@microsoft.com>**20060608143520] |
|---|
| 2611 | [Make it so that StgWord/StgInt are longs |
|---|
| 2612 | Simon Marlow <simonmar@microsoft.com>**20060608143438 |
|---|
| 2613 | This means we can use a %ld format specifier for StgWord/StgInt with |
|---|
| 2614 | printf and not get shouted at by gcc. |
|---|
| 2615 | ] |
|---|
| 2616 | [more warning fixage |
|---|
| 2617 | Simon Marlow <simonmar@microsoft.com>**20060608142844] |
|---|
| 2618 | [fix a warning |
|---|
| 2619 | Simon Marlow <simonmar@microsoft.com>**20060608141903] |
|---|
| 2620 | [fix some warnings |
|---|
| 2621 | Simon Marlow <simonmar@microsoft.com>**20060608140201] |
|---|
| 2622 | [Add new RTS flags for tracing: |
|---|
| 2623 | Simon Marlow <simonmar@microsoft.com>**20060608130101 |
|---|
| 2624 | |
|---|
| 2625 | -vs Trace scheduler events (see also -Ds with -debug) |
|---|
| 2626 | -vt Time-stamp trace messages |
|---|
| 2627 | |
|---|
| 2628 | the intention is that we will pipe the -vs output into a |
|---|
| 2629 | profile-generating tool. This commit includes the flags only, |
|---|
| 2630 | functionality to follow. |
|---|
| 2631 | ] |
|---|
| 2632 | [codegen debug flag (+RTS -Dc) was unused; remove it |
|---|
| 2633 | Simon Marlow <simonmar@microsoft.com>**20060607145848] |
|---|
| 2634 | [add 'const' modifiers to types where appropriate |
|---|
| 2635 | Simon Marlow <simonmar@microsoft.com>**20060607145800] |
|---|
| 2636 | [rearrange casts to avoid gcc warnings |
|---|
| 2637 | Simon Marlow <simonmar@microsoft.com>**20060607145626] |
|---|
| 2638 | [warning fix |
|---|
| 2639 | Simon Marlow <simonmar@microsoft.com>**20060607141013] |
|---|
| 2640 | [remove //@ stuff |
|---|
| 2641 | Simon Marlow <simonmar@microsoft.com>**20060607134553] |
|---|
| 2642 | [Gather timing stats for a Task when it completes. |
|---|
| 2643 | Simon Marlow <simonmar@microsoft.com>**20060607124407 |
|---|
| 2644 | Previously we did this just for workers, now we do it for the main |
|---|
| 2645 | thread and for forkOS threads too. |
|---|
| 2646 | ] |
|---|
| 2647 | [Remove unnecessary SCHED_INTERRUPTED scheduler state |
|---|
| 2648 | Simon Marlow <simonmar@microsoft.com>**20060607115105 |
|---|
| 2649 | |
|---|
| 2650 | ] |
|---|
| 2651 | [fix a warning |
|---|
| 2652 | Simon Marlow <simonmar@microsoft.com>**20060427130048] |
|---|
| 2653 | [re-enable time package on Windows |
|---|
| 2654 | simonmar@microsoft.com**20060606124656] |
|---|
| 2655 | [fix a case of "naughty I386 byte reg" |
|---|
| 2656 | Simon Marlow <simonmar@microsoft.com>**20060606112357 |
|---|
| 2657 | The fix is a little hacky, because we don't have support for register |
|---|
| 2658 | classes in general, but it's an improvement. |
|---|
| 2659 | ] |
|---|
| 2660 | [A better icon for GHCi |
|---|
| 2661 | Neil Mitchell <http://www.cs.york.ac.uk/~ndm/>**20060602145913] |
|---|
| 2662 | [markSignalHandlers(): implementation was unnecessary, and had a bug |
|---|
| 2663 | simonmar@microsoft.com**20060606085805 |
|---|
| 2664 | |
|---|
| 2665 | There's no need to mark the signal handler here, because it is stored |
|---|
| 2666 | in a StablePtr and hence is a root anyway. Furthermore, the call to |
|---|
| 2667 | evac() was passing the address of a local variable, which turned out |
|---|
| 2668 | to be harmless for copying GC, but fatal for compacting GC: compacting |
|---|
| 2669 | GC assumes that the addresses of the roots are the same each time. |
|---|
| 2670 | |
|---|
| 2671 | Fixes: possibly #783, possibly #776, definitely #787 |
|---|
| 2672 | ] |
|---|
| 2673 | [disable time package on mingw to unblock builds. |
|---|
| 2674 | sof@galois.com**20060605165125] |
|---|
| 2675 | [Remove one more IfaceInlineCall |
|---|
| 2676 | simonpj@microsoft.com**20060605154305] |
|---|
| 2677 | [Remove InlinePlease and add inline function and RULE |
|---|
| 2678 | simonpj@microsoft.com**20060605114900 |
|---|
| 2679 | |
|---|
| 2680 | For a long time GHC has had some internal mechanism designed to support |
|---|
| 2681 | a call-site inline directive, thus |
|---|
| 2682 | inline f xs |
|---|
| 2683 | makes f be inlined at the call site even if f is big. |
|---|
| 2684 | |
|---|
| 2685 | However, the surface syntax seems to have gone, and in any case it |
|---|
| 2686 | can be done more neatly using a RULE. |
|---|
| 2687 | |
|---|
| 2688 | This commit: |
|---|
| 2689 | * Removes the InlineCall constructor for Note |
|---|
| 2690 | and InlinePlease for SimplCont |
|---|
| 2691 | |
|---|
| 2692 | * Adds a new known-key Id called 'inline', whose definition in |
|---|
| 2693 | GHC.Base is just the identity function |
|---|
| 2694 | |
|---|
| 2695 | * Adds a built-in RULE in PrelRules that rewrites (inline f) to |
|---|
| 2696 | the body of f, if possible |
|---|
| 2697 | |
|---|
| 2698 | * Adds documentation |
|---|
| 2699 | |
|---|
| 2700 | NOTE: I have not tested this (aeroplane work). Give it a try! |
|---|
| 2701 | |
|---|
| 2702 | ] |
|---|
| 2703 | [Fix typo |
|---|
| 2704 | simonpj@microsoft.com**20060605114719] |
|---|
| 2705 | [fix type of allocateExec |
|---|
| 2706 | Simon Marlow <simonmar@microsoft.com>**20060601125406] |
|---|
| 2707 | [stgMallocBytesRWX --> allocateExec |
|---|
| 2708 | Simon Marlow <simonmar@microsoft.com>**20060601123314] |
|---|
| 2709 | [fix non-Windows build |
|---|
| 2710 | Simon Marlow <simonmar@microsoft.com>**20060601121435] |
|---|
| 2711 | [Win32: set up the console code pages |
|---|
| 2712 | simonmar@microsoft.com**20060601115423 |
|---|
| 2713 | This may help with entering non-ASCII characters at the GHCi prompt, |
|---|
| 2714 | but as usual with Unicode there's no simple solution that just works. |
|---|
| 2715 | See commentary in InteractiveUI.hs for more details. |
|---|
| 2716 | ] |
|---|
| 2717 | [add a type signature |
|---|
| 2718 | simonmar@microsoft.com**20060601115335] |
|---|
| 2719 | [improvements to lexical error reporting |
|---|
| 2720 | simonmar@microsoft.com**20060601115306] |
|---|
| 2721 | [commented-out debugging code |
|---|
| 2722 | simonmar@microsoft.com**20060601115247] |
|---|
| 2723 | [understand Latin-1 symbols |
|---|
| 2724 | simonmar@microsoft.com**20060601115149] |
|---|
| 2725 | [stgMallocBytesRWX --> allocateExec |
|---|
| 2726 | Simon Marlow <simonmar@microsoft.com>**20060531091202 |
|---|
| 2727 | Not sure how I left this out of the previous patch, oh well. |
|---|
| 2728 | ] |
|---|
| 2729 | ['time' depends on 'Win32' when Windows=YES; mirror that |
|---|
| 2730 | sof@galois.com**20060530223009 |
|---|
| 2731 | when setting up SUBDIRS. |
|---|
| 2732 | ] |
|---|
| 2733 | [Win32: add _imp__tzname |
|---|
| 2734 | simonmar@microsoft.com**20060530101452] |
|---|
| 2735 | [fix Win32 build |
|---|
| 2736 | simonmar@microsoft.com**20060530101418] |
|---|
| 2737 | [replace stgMallocBytesRWX() with our own allocator |
|---|
| 2738 | Simon Marlow <simonmar@microsoft.com>**20060530100211 |
|---|
| 2739 | |
|---|
| 2740 | See bug #738 |
|---|
| 2741 | |
|---|
| 2742 | Allocating executable memory is getting more difficult these days. In |
|---|
| 2743 | particular, the default SELinux policy on Fedora Core 5 disallows |
|---|
| 2744 | making the heap (i.e. malloc()'d memory) executable, although it does |
|---|
| 2745 | apparently allow mmap()'ing anonymous executable memory by default. |
|---|
| 2746 | |
|---|
| 2747 | Previously, stgMallocBytesRWX() used malloc() underneath, and then |
|---|
| 2748 | tried to make the page holding the memory executable. This was rather |
|---|
| 2749 | hacky and fails with Fedora Core 5. |
|---|
| 2750 | |
|---|
| 2751 | This patch adds a mini-allocator for executable memory, based on the |
|---|
| 2752 | block allocator. We grab page-sized blocks and make them executable, |
|---|
| 2753 | then allocate small objects from the page. There's a simple free |
|---|
| 2754 | function, that will free whole pages back to the system when they are |
|---|
| 2755 | empty. |
|---|
| 2756 | |
|---|
| 2757 | ] |
|---|
| 2758 | [add time subdir |
|---|
| 2759 | Simon Marlow <simonmar@microsoft.com>**20060530070721] |
|---|
| 2760 | [Make rule-matching robust to lets |
|---|
| 2761 | simonpj@microsoft.com**20060525154447 |
|---|
| 2762 | |
|---|
| 2763 | Consider a RULE like |
|---|
| 2764 | forall arr. splitD (joinD arr) = arr |
|---|
| 2765 | |
|---|
| 2766 | Until now, this rule would not match code of form |
|---|
| 2767 | splitD (let { d = ... } in joinD (...d...)) |
|---|
| 2768 | because the 'let' got in the way. |
|---|
| 2769 | |
|---|
| 2770 | This patch makes the rule-matcher robust to lets. See comments with |
|---|
| 2771 | the Let case of Rules.match. |
|---|
| 2772 | |
|---|
| 2773 | This improvement is highly desirable in the fusion rules for NDP |
|---|
| 2774 | stuff that Roman is working on, where we are doing fusion of *overloaded* |
|---|
| 2775 | functions (which may look lazy). The let expression that Roman tripped |
|---|
| 2776 | up on was a dictioary binding. |
|---|
| 2777 | |
|---|
| 2778 | ] |
|---|
| 2779 | [Improve error reporting in interface typechecking |
|---|
| 2780 | simonpj@microsoft.com**20060525094545] |
|---|
| 2781 | [Fix egregious and long-standing tidying bug |
|---|
| 2782 | simonpj@microsoft.com**20060525094300 |
|---|
| 2783 | |
|---|
| 2784 | A typo in tidyAlt meant that we could get shadowing of occurrence names |
|---|
| 2785 | in the output of tidying. (Specifically, of existentially bound type |
|---|
| 2786 | variables.) That in turn meant that an IfaceExpr could have shadowing, so |
|---|
| 2787 | when the IfaceExpr was read in, it meant something different. |
|---|
| 2788 | That in turn led to an obscure crash like: |
|---|
| 2789 | Panic: tcIfaceTyVar |
|---|
| 2790 | |
|---|
| 2791 | Anyway, this fixes it. MERGE into 6.4.3. |
|---|
| 2792 | |
|---|
| 2793 | |
|---|
| 2794 | ] |
|---|
| 2795 | [Prune imports |
|---|
| 2796 | simonpj@microsoft.com**20060525094251] |
|---|
| 2797 | [performGC_(): don't use the existing Task, always grab a new one |
|---|
| 2798 | Simon Marlow <simonmar@microsoft.com>**20060525090035] |
|---|
| 2799 | [Better control of the IO manager thread; improvements to deadlock checking |
|---|
| 2800 | Simon Marlow <simonmar@microsoft.com>**20060524122839 |
|---|
| 2801 | |
|---|
| 2802 | In the threaded RTS on *nix platforms: |
|---|
| 2803 | |
|---|
| 2804 | - we now start the IO manager thread eagerly at startup time |
|---|
| 2805 | (previously was started on demand). |
|---|
| 2806 | |
|---|
| 2807 | - we now ask the IO manager thread to stop at shutdown |
|---|
| 2808 | |
|---|
| 2809 | - In Timer.c:handle_tick, if it looks like we might be in a |
|---|
| 2810 | deadlock, instead of calling prodOneCapability() which was known to be |
|---|
| 2811 | wrong, we now send a byte down the IO manager's pipe to wake it up. |
|---|
| 2812 | |
|---|
| 2813 | This also avoids a case of double-acquisition of a mutex, which |
|---|
| 2814 | happened if prodOneCapability() was called while the current thread |
|---|
| 2815 | was holding a mutex. |
|---|
| 2816 | ] |
|---|
| 2817 | [TARGET_OS ==> HOST_OS |
|---|
| 2818 | Simon Marlow <simonmar@microsoft.com>**20060524122103] |
|---|
| 2819 | [fix a _TARGET_ARCH that should be _HOST_ARCH |
|---|
| 2820 | Simon Marlow <simonmar@microsoft.com>**20060524122022] |
|---|
| 2821 | [we don't need OutOfHeapHook(), and the version in the RTS has a better message |
|---|
| 2822 | Simon Marlow <simonmar@microsoft.com>**20060524112007] |
|---|
| 2823 | [Bug-fix to patch "Run simplifier before SpecConstr" |
|---|
| 2824 | simonpj@microsoft.com**20060523130022] |
|---|
| 2825 | [Run simplifier before SpecConstr |
|---|
| 2826 | simonpj@microsoft.com**20060523085546 |
|---|
| 2827 | |
|---|
| 2828 | Arrange to run the simplifier before SpecConstr, to (almost entirely) |
|---|
| 2829 | eliminate shadowing. |
|---|
| 2830 | |
|---|
| 2831 | Reason: otherwise SpecConstr can generate a RULE that never |
|---|
| 2832 | files; and LiberateCase specifically *does* generate lots of shadowing. |
|---|
| 2833 | |
|---|
| 2834 | See Note [Shadowing] in SpecConstr.lhs |
|---|
| 2835 | |
|---|
| 2836 | |
|---|
| 2837 | ] |
|---|
| 2838 | [Prune imports |
|---|
| 2839 | simonpj@microsoft.com**20060522192532] |
|---|
| 2840 | [Add deShadowBinds |
|---|
| 2841 | simonpj@microsoft.com**20060522192404 |
|---|
| 2842 | |
|---|
| 2843 | Add CoreSubst.deShadowBinds, which removes shadowing from |
|---|
| 2844 | a Core term. I thought we wanted it for SpecConstr, but in |
|---|
| 2845 | fact decided not to use it. Nevertheless, it's a useful sort |
|---|
| 2846 | of function to have around, and it has a particularly simple |
|---|
| 2847 | definition! |
|---|
| 2848 | |
|---|
| 2849 | ] |
|---|
| 2850 | [Inline in a call argument if the caller has RULES |
|---|
| 2851 | simonpj@microsoft.com**20060522163255 |
|---|
| 2852 | |
|---|
| 2853 | This is an experimental change suggested by Roman. Consider |
|---|
| 2854 | |
|---|
| 2855 | {-# INLINE f #-} |
|---|
| 2856 | f x y = ... |
|---|
| 2857 | |
|---|
| 2858 | ....(g (f a b))... |
|---|
| 2859 | |
|---|
| 2860 | where g has RULES. Then we'd like to inline f, even though the context of |
|---|
| 2861 | the call is otherwise 100% boring -- g is lazy and we know nothing about |
|---|
| 2862 | x and y. |
|---|
| 2863 | |
|---|
| 2864 | This patch just records in the continuation that f has rules. And does so |
|---|
| 2865 | somewhat recursively...e.g. |
|---|
| 2866 | |
|---|
| 2867 | ...(g (h (f a b)))... |
|---|
| 2868 | |
|---|
| 2869 | where g has rules. |
|---|
| 2870 | |
|---|
| 2871 | |
|---|
| 2872 | ] |
|---|
| 2873 | [Add idHasRules |
|---|
| 2874 | simonpj@microsoft.com**20060522163109 |
|---|
| 2875 | |
|---|
| 2876 | Add Id.idHasRules :: Id -> Bool, with the obvious semantics. |
|---|
| 2877 | This patch makes sense by itself, but it's just a tidy-up. |
|---|
| 2878 | |
|---|
| 2879 | |
|---|
| 2880 | ] |
|---|
| 2881 | [Transmit inline pragmas faithfully |
|---|
| 2882 | simonpj@microsoft.com**20060522110256 |
|---|
| 2883 | |
|---|
| 2884 | *** WARNING: you will need to recompile your libraries |
|---|
| 2885 | *** when you pull this patch (make clean; make) |
|---|
| 2886 | |
|---|
| 2887 | The inline pragma on wrapper-functions was being lost; this patch |
|---|
| 2888 | makes it be transmitted faithfully. |
|---|
| 2889 | |
|---|
| 2890 | The reason is that we don't write the full inlining for a wrapper into |
|---|
| 2891 | an interface file, because it's generated algorithmically from its strictness |
|---|
| 2892 | info. But previously the inline pragma as being written out only when we |
|---|
| 2893 | wrote out an unfolding, and hence it was lost for a wrapper. |
|---|
| 2894 | |
|---|
| 2895 | This makes a particular difference when a function has a NOINLINE[k] pragma. |
|---|
| 2896 | Then it may be w/w'd, and we must retain the pragma. It's the only consistent |
|---|
| 2897 | thing to do really. |
|---|
| 2898 | |
|---|
| 2899 | The change does change the binary format of interface files, slightly. |
|---|
| 2900 | So you need to recompile all your libraries. |
|---|
| 2901 | |
|---|
| 2902 | ] |
|---|
| 2903 | [Improved RULE lhs typechecking; less dictionary sharing |
|---|
| 2904 | simonpj@microsoft.com**20060519103433 |
|---|
| 2905 | |
|---|
| 2906 | See long comment with Simplify.tcSimplifyRuleLhs. |
|---|
| 2907 | |
|---|
| 2908 | Here's the key example: |
|---|
| 2909 | |
|---|
| 2910 | RULE "g" forall x y z. g (x == y) (y == z) = ... |
|---|
| 2911 | |
|---|
| 2912 | Here, the two dictionaries are *identical*, but we do NOT WANT to |
|---|
| 2913 | generate the rule |
|---|
| 2914 | |
|---|
| 2915 | RULE forall x::a, y::a, z::a, d1::Eq a |
|---|
| 2916 | f ((==) d1 x y) ((>) d1 y z) = ... |
|---|
| 2917 | |
|---|
| 2918 | Instead we want |
|---|
| 2919 | |
|---|
| 2920 | RULE forall x::a, y::a, z::a, d1::Eq a, d2:Eq a |
|---|
| 2921 | f ((==) d1 x y) ((>) d2 y z) = ... |
|---|
| 2922 | |
|---|
| 2923 | ] |
|---|
| 2924 | [Bug-fix for infix function definitions (parse/rename) |
|---|
| 2925 | simonpj@microsoft.com**20060519095022 |
|---|
| 2926 | |
|---|
| 2927 | Fix a crash provoked by |
|---|
| 2928 | |
|---|
| 2929 | x `op` y = x |
|---|
| 2930 | op = True |
|---|
| 2931 | |
|---|
| 2932 | The trouble was that there is currently a single 'infix' flag for the |
|---|
| 2933 | whole group; and RnTypes.checkPrecMatch was therefore expecting the |
|---|
| 2934 | second eqn to have two args. |
|---|
| 2935 | |
|---|
| 2936 | This fixes the crash, and also or-s the infix flags for the various |
|---|
| 2937 | eqns together; previously it was just taken from the first eqn, which |
|---|
| 2938 | was wrong. |
|---|
| 2939 | |
|---|
| 2940 | |
|---|
| 2941 | ] |
|---|
| 2942 | [Remove misleading comments |
|---|
| 2943 | simonpj@microsoft.com**20060519094936] |
|---|
| 2944 | [Fix a nasty continuation-duplication bug |
|---|
| 2945 | simonpj@microsoft.com**20060518163617 |
|---|
| 2946 | |
|---|
| 2947 | For a long-time mkDupableCont has had a bug that allows it to duplicate |
|---|
| 2948 | an arbitrary continuation, which it should not do, of course. |
|---|
| 2949 | |
|---|
| 2950 | The bug was that in the Select case of mkDupableCont we were calling |
|---|
| 2951 | prepareCaseCont, which did not duplicate the continuation if there is |
|---|
| 2952 | but a single alternative. This is quite right in the case of the call |
|---|
| 2953 | in rebuildCase, but quite wrong in mkDupableCont. |
|---|
| 2954 | |
|---|
| 2955 | The bug manifest as follows. In the expression |
|---|
| 2956 | f (case ... of { ..several alts.. }) |
|---|
| 2957 | (when f is strict), we should transform to |
|---|
| 2958 | f (...transformed arg...) |
|---|
| 2959 | The application of f should not be pushed down (see notes with the |
|---|
| 2960 | ArgOf case of mkDupableCont. But that was not happening in an example |
|---|
| 2961 | like this (see how the call to f is pushed inwards). |
|---|
| 2962 | |
|---|
| 2963 | f (a `div` abs (b::Int)) |
|---|
| 2964 | ---> |
|---|
| 2965 | case b_afT of wild_aHa { GHC.Base.I# x_aHc -> |
|---|
| 2966 | let { |
|---|
| 2967 | $j_sIe :: GHC.Prim.Int# -> GHC.Base.Int |
|---|
| 2968 | [] |
|---|
| 2969 | $j_sIe = |
|---|
| 2970 | \ (ds1_aHr [Nothing OneShot] :: GHC.Prim.Int#) -> |
|---|
| 2971 | Foo7.f |
|---|
| 2972 | (case ds1_aHr of ds2_aHq { |
|---|
| 2973 | __DEFAULT -> |
|---|
| 2974 | case a_afS of wild1_aHM { GHC.Base.I# x_aHO -> |
|---|
| 2975 | GHC.Base.I# (GHC.Base.divInt# x_aHO ds2_aHq) |
|---|
| 2976 | }; |
|---|
| 2977 | 0 -> GHC.Err.divZeroError @ GHC.Base.Int |
|---|
| 2978 | }) |
|---|
| 2979 | } in |
|---|
| 2980 | case GHC.Prim.>=# x_aHc 0 of wild1_aHe [Dead Nothing] { |
|---|
| 2981 | GHC.Base.False -> |
|---|
| 2982 | let { |
|---|
| 2983 | ds1_aHr :: GHC.Prim.Int# |
|---|
| 2984 | [] |
|---|
| 2985 | ds1_aHr = GHC.Prim.negateInt# x_aHc |
|---|
| 2986 | } in $j_sIe ds1_aHr; |
|---|
| 2987 | GHC.Base.True -> $j_sIe x_aHc |
|---|
| 2988 | } |
|---|
| 2989 | } |
|---|
| 2990 | |
|---|
| 2991 | |
|---|
| 2992 | ] |
|---|
| 2993 | [Make simplifier report which phase it is doing in -ddump output |
|---|
| 2994 | simonpj@microsoft.com**20060518163448] |
|---|
| 2995 | [Comments only |
|---|
| 2996 | simonpj@microsoft.com**20060518163425] |
|---|
| 2997 | [take parsec out of $(GhcBootLibs) |
|---|
| 2998 | Simon Marlow <simonmar@microsoft.com>**20060518131506] |
|---|
| 2999 | [Improve documentation of INLINE pragmas |
|---|
| 3000 | simonpj@microsoft.com**20060518113212] |
|---|
| 3001 | [a couple of additions |
|---|
| 3002 | Simon Marlow <simonmar@microsoft.com>**20060518104025] |
|---|
| 3003 | [#define _REENTRANT 1 (needed to get the right errno on some OSs) |
|---|
| 3004 | Simon Marlow <simonmar@microsoft.com>**20060518103715 |
|---|
| 3005 | Partial fix for hanging problems on Solaris and possibly *BSD. |
|---|
| 3006 | A similar fix is also required to libraries/base/includes/HsBase.h. |
|---|
| 3007 | ] |
|---|
| 3008 | [Declare this file to be POSIX |
|---|
| 3009 | Simon Marlow <simonmar@microsoft.com>**20060518102858 |
|---|
| 3010 | This is simpler than using _POSIX_THREAD_SEMANTICS on Solaris to get |
|---|
| 3011 | the right version of ctime_r(). |
|---|
| 3012 | ] |
|---|
| 3013 | [somewhere to keep track of release notes for 6.6 |
|---|
| 3014 | Simon Marlow <simonmar@microsoft.com>**20060518074415] |
|---|
| 3015 | [Newtype data constructors get a compulsory unfolding |
|---|
| 3016 | simonpj@microsoft.com**20060517155009 |
|---|
| 3017 | |
|---|
| 3018 | With this change, newtype data constructors get a "compulsory" unfolding, |
|---|
| 3019 | which means that they *must* be inlined, and no top-level definition of |
|---|
| 3020 | the constructor is provided at all. Since these constructors are no-ops, |
|---|
| 3021 | I'm not sure why this wasn't the case all along. |
|---|
| 3022 | |
|---|
| 3023 | ] |
|---|
| 3024 | [White space only |
|---|
| 3025 | simonpj@microsoft.com**20060517154936] |
|---|
| 3026 | [Retain InlinePragInfo on wrappers |
|---|
| 3027 | simonpj@microsoft.com**20060517154725 |
|---|
| 3028 | |
|---|
| 3029 | For some reason, when doing the worker/wrapper split, we transferred the |
|---|
| 3030 | InlinePragInfo from the original function, but expunging it from the wrapper. |
|---|
| 3031 | This meant, for example, that a NOINLINE function would have its wrapper |
|---|
| 3032 | inlined, which isn't sensible. |
|---|
| 3033 | |
|---|
| 3034 | For a change, fixing a bug involves only deleting code! |
|---|
| 3035 | |
|---|
| 3036 | ] |
|---|
| 3037 | [Spelling correction |
|---|
| 3038 | simonpj@microsoft.com**20060517154710] |
|---|
| 3039 | [Retain INLINE pragma information during indirection-shorting |
|---|
| 3040 | simonpj@microsoft.com**20060517154449 |
|---|
| 3041 | |
|---|
| 3042 | During indirection-shorting, we were dropping the InlinePragInfo, |
|---|
| 3043 | although were were carefully retaining strictness info etc. |
|---|
| 3044 | I think this is a long-standing bug. |
|---|
| 3045 | |
|---|
| 3046 | ] |
|---|
| 3047 | [Improve pretty-printing |
|---|
| 3048 | simonpj@microsoft.com**20060517154349] |
|---|
| 3049 | [Comments only |
|---|
| 3050 | simonpj@microsoft.com**20060517154304] |
|---|
| 3051 | [Improve pretty-printing slightly |
|---|
| 3052 | simonpj@microsoft.com**20060517154204] |
|---|
| 3053 | [Let GHCi work with with Sparc32+/V8+ .o files |
|---|
| 3054 | Duncan Coutts <duncan.coutts@worc.ox.ac.uk>**20060516090430 |
|---|
| 3055 | Currently the GHCi linker looks exclusively for V7 ABI .o files. |
|---|
| 3056 | |
|---|
| 3057 | You can generate V8+ ABI .o files using flags to gcc such as: |
|---|
| 3058 | -optc-mcpu=ultrasparc -opta-mcpu=ultrasparc |
|---|
| 3059 | |
|---|
| 3060 | Note that this allows gcc to generate hardware integer division and |
|---|
| 3061 | hardware floating point instructions rather than using software emulation. |
|---|
| 3062 | All recent sparc hardware is V8+ or later. Perhaps we should check for the |
|---|
| 3063 | cpu generation in configure and use the later ABI if possible. |
|---|
| 3064 | |
|---|
| 3065 | Tested briefly on a SunBlade 100 (TI UltraSparc IIe) sparc-unknown-linux |
|---|
| 3066 | ] |
|---|
| 3067 | [match up more closely with compiler/main/DynFlags.hs:machdepCCOpts |
|---|
| 3068 | Simon Marlow <simonmar@microsoft.com>**20060515090031 |
|---|
| 3069 | In particular, add -fno-builtin to x86 and x86_64, which was missing. |
|---|
| 3070 | ] |
|---|
| 3071 | [set $(GhcVersion) and $(GhcPatchLevel) correctly when $(UseStage1)==YES |
|---|
| 3072 | Simon Marlow <simonmar@microsoft.com>**20060510124621] |
|---|
| 3073 | [.raw_s and .s live in $(odir), not the source dir |
|---|
| 3074 | Simon Marlow <simonmar@microsoft.com>**20060510121524] |
|---|
| 3075 | [additions from Reilly Hayes |
|---|
| 3076 | Simon Marlow <simonmar@microsoft.com>**20060510120000] |
|---|
| 3077 | [some tweaks to the HC bootstrapping instructions |
|---|
| 3078 | Simon Marlow <simonmar@microsoft.com>**20060510115236] |
|---|
| 3079 | [Ignore unboxed values in breakpoints. |
|---|
| 3080 | Lemmih <lemmih@gmail.com>**20060510072722] |
|---|
| 3081 | [Don't read ~/.ghci on breakpoints. |
|---|
| 3082 | Lemmih <lemmih@gmail.com>**20060509223455] |
|---|
| 3083 | [make it possible to define an alias for :quit |
|---|
| 3084 | Simon Marlow <simonmar@microsoft.com>**20060509083124] |
|---|
| 3085 | [Do not put wired-in things in interface files |
|---|
| 3086 | simonpj@microsoft.com**20060508142946 |
|---|
| 3087 | |
|---|
| 3088 | There is no need for wired-in things to go into interface files; the compiler |
|---|
| 3089 | knows about them anyway. Worse, it turns ou that if they are in an interface |
|---|
| 3090 | file, they may get read in with not-quite-right type info (e.g. GHC.Err.error), |
|---|
| 3091 | and the not-quite-right thing gets into the type envt. Than it gets used |
|---|
| 3092 | instead of the wired in thing. |
|---|
| 3093 | |
|---|
| 3094 | Best all round never to put them into interface files. This is the way |
|---|
| 3095 | it used to be, but it looks as if it rotted away some time ago. |
|---|
| 3096 | |
|---|
| 3097 | (I noticed this when fixing unsafePerformIO stuff, becuase 'lazy' was getting |
|---|
| 3098 | an unfolding when it shouldn't.) |
|---|
| 3099 | |
|---|
| 3100 | ] |
|---|
| 3101 | [Remove NOINLINE strictness hack |
|---|
| 3102 | simonpj@microsoft.com**20060508142834 |
|---|
| 3103 | |
|---|
| 3104 | The stricteness analyser used to have a HACK which ensured that NOINLNE things |
|---|
| 3105 | were not strictness-analysed. The reason was unsafePerformIO. Left to itself, |
|---|
| 3106 | the strictness analyser would discover this strictness for unsafePerformIO: |
|---|
| 3107 | unsafePerformIO: C(U(AV)) |
|---|
| 3108 | But then consider this sub-expression |
|---|
| 3109 | unsafePerformIO (\s -> let r = f x in |
|---|
| 3110 | case writeIORef v r s of (# s1, _ #) -> |
|---|
| 3111 | (# s1, r #) |
|---|
| 3112 | The strictness analyser will now find that r is sure to be eval'd, |
|---|
| 3113 | and may then hoist it out. This makes tests/lib/should_run/memo002 |
|---|
| 3114 | deadlock. |
|---|
| 3115 | |
|---|
| 3116 | Solving this by making all NOINLINE things have no strictness info is overkill. |
|---|
| 3117 | In particular, it's overkill for runST, which is perfectly respectable. |
|---|
| 3118 | Consider |
|---|
| 3119 | f x = runST (return x) |
|---|
| 3120 | This should be strict in x. |
|---|
| 3121 | |
|---|
| 3122 | So the new plan is to define unsafePerformIO using the 'lazy' combinator: |
|---|
| 3123 | |
|---|
| 3124 | unsafePerformIO (IO m) = lazy (case m realWorld# of (# _, r #) -> r) |
|---|
| 3125 | |
|---|
| 3126 | Remember, 'lazy' is a wired-in identity-function Id, of type a->a, which is |
|---|
| 3127 | magically NON-STRICT, and is inlined after strictness analysis. So |
|---|
| 3128 | unsafePerformIO will look non-strict, and that's what we want. |
|---|
| 3129 | |
|---|
| 3130 | Now we don't need the hack in the strictness analyser. |
|---|
| 3131 | |
|---|
| 3132 | ] |
|---|
| 3133 | [Trim imports |
|---|
| 3134 | simonpj@microsoft.com**20060508141804] |
|---|
| 3135 | [Trim imports |
|---|
| 3136 | simonpj@microsoft.com**20060508141713] |
|---|
| 3137 | [GHC_MANGLER-->MANGLER |
|---|
| 3138 | Simon Marlow <simonmar@microsoft.com>**20060508111206] |
|---|
| 3139 | [Fix bug #763: Breakpoint mechanism crashes when there's a type error. |
|---|
| 3140 | Lemmih <lemmih@gmail.com>**20060505232158] |
|---|
| 3141 | [breakpointCond |
|---|
| 3142 | Lemmih <lemmih@gmail.com>**20060502174340] |
|---|
| 3143 | [Preserve type variable names during type inference |
|---|
| 3144 | simonpj@microsoft.com**20060505153753 |
|---|
| 3145 | |
|---|
| 3146 | During unification we attempt to preserve the print-names of type variables, |
|---|
| 3147 | so that type error messages tend to mention type variables using the |
|---|
| 3148 | programmer's vocabulary. |
|---|
| 3149 | |
|---|
| 3150 | This had bit-rotted a bit when I added impredicative polymorphism; especially |
|---|
| 3151 | when unBoxing a boxy type variable we should not gratuitously lose its name. |
|---|
| 3152 | |
|---|
| 3153 | ] |
|---|
| 3154 | [Trim imports |
|---|
| 3155 | simonpj@microsoft.com**20060505150506] |
|---|
| 3156 | [fixup for new source tree layout |
|---|
| 3157 | Simon Marlow <simonmar@microsoft.com>**20060505114100] |
|---|
| 3158 | [FPTOOLS_TOP-->GHC_TOP, and remove some references to "fptools" |
|---|
| 3159 | Simon Marlow <simonmar@microsoft.com>**20060505110520] |
|---|
| 3160 | [$(FPTOOLS_TOP) is now known as $(GHC_TOP) |
|---|
| 3161 | Simon Marlow <simonmar@microsoft.com>**20060505110127 |
|---|
| 3162 | I kept $(FPTOOLS_TOP) as an alias for $(GHC_TOP) while we switch |
|---|
| 3163 | ] |
|---|
| 3164 | [update the build system documentation |
|---|
| 3165 | Simon Marlow <simonmar@microsoft.com>**20060505105843] |
|---|
| 3166 | [update for new source tree layout |
|---|
| 3167 | Simon Marlow <simonmar@microsoft.com>**20060505102903] |
|---|
| 3168 | [partial update for new source tree layout |
|---|
| 3169 | Simon Marlow <simonmar@microsoft.com>**20060505030218] |
|---|
| 3170 | [update for new source tree layout (untested) |
|---|
| 3171 | Simon Marlow <simonmar@microsoft.com>**20060505081549] |
|---|
| 3172 | [Print a more helpful error for find_thing |
|---|
| 3173 | simonpj@microsoft.com**20060504153337] |
|---|
| 3174 | [Fix a bug in rule matching |
|---|
| 3175 | simonpj@microsoft.com**20060504112430 |
|---|
| 3176 | |
|---|
| 3177 | The rule matcher uses a "rough-match" pre-filter, which was being too |
|---|
| 3178 | aggressive. The case looked like this: |
|---|
| 3179 | |
|---|
| 3180 | rule: f True |
|---|
| 3181 | expr: case e of x { True -> f x } |
|---|
| 3182 | |
|---|
| 3183 | Jues because x doesn't immediately look like True, we shouldn't say |
|---|
| 3184 | "can't match", but that is exactly what ruleCantMatch was doing. |
|---|
| 3185 | |
|---|
| 3186 | |
|---|
| 3187 | ] |
|---|
| 3188 | [Fix constructor-specialisation bug |
|---|
| 3189 | simonpj@microsoft.com**20060504112131 |
|---|
| 3190 | |
|---|
| 3191 | The constructor-specialisation optimisation was not dealing with the case |
|---|
| 3192 | of |
|---|
| 3193 | (letrec ... in f) a1 a2 |
|---|
| 3194 | |
|---|
| 3195 | We need to apply constructor specialisation in the letrec; previously |
|---|
| 3196 | we were leaving it untouched on the grounds that the function part of |
|---|
| 3197 | an application is almost always a variable. |
|---|
| 3198 | |
|---|
| 3199 | But in fact, float-in immediately precedes SpecConstr, so we can get |
|---|
| 3200 | these odd-looking applications. |
|---|
| 3201 | |
|---|
| 3202 | |
|---|
| 3203 | ] |
|---|
| 3204 | [Fix precedence for records in derived Read |
|---|
| 3205 | simonpj@microsoft.com**20060504111804 |
|---|
| 3206 | |
|---|
| 3207 | The derived instance for Read of records wasn't quite right. |
|---|
| 3208 | Consider |
|---|
| 3209 | data T = T1 T | T2 { x::Int } |
|---|
| 3210 | |
|---|
| 3211 | The string "T1 T2 { x=2 }" should parse correctly as |
|---|
| 3212 | T1 (T2 {x=2}) |
|---|
| 3213 | because of Haskell's odd precedence rules (record construction binds |
|---|
| 3214 | even more tightly than application), but the derived Read didn't take |
|---|
| 3215 | account of that. |
|---|
| 3216 | |
|---|
| 3217 | drvrun020 is the regression test |
|---|
| 3218 | |
|---|
| 3219 | |
|---|
| 3220 | ] |
|---|
| 3221 | [Make rules available in RHS |
|---|
| 3222 | simonpj@microsoft.com**20060504111500 |
|---|
| 3223 | |
|---|
| 3224 | After some earlier re-factoring, the code that was carefully trying |
|---|
| 3225 | to make RULES available in a function's own RHS was plain wrong. |
|---|
| 3226 | |
|---|
| 3227 | This commit fixes it. Some programs should go faster! |
|---|
| 3228 | |
|---|
| 3229 | ] |
|---|
| 3230 | [Pretty printing instance for Unfolding |
|---|
| 3231 | simonpj@microsoft.com**20060504111429] |
|---|
| 3232 | [small clarification |
|---|
| 3233 | Simon Marlow <simonmar@microsoft.com>**20060504103414] |
|---|
| 3234 | [small fix to booting instructions from #762 |
|---|
| 3235 | Simon Marlow <simonmar@microsoft.com>**20060504083104] |
|---|
| 3236 | [$(ProjectNameShort) => ghc |
|---|
| 3237 | Simon Marlow <simonmar@microsoft.com>**20060503102419] |
|---|
| 3238 | [only pass -fno-unit-at-a-time to gcc if it is supported |
|---|
| 3239 | Simon Marlow <simonmar@microsoft.com>**20060503093614] |
|---|
| 3240 | [Arrange that -fth is no longer implied by -fglasgow-exts |
|---|
| 3241 | simonpj@microsoft.com**20060426182114 |
|---|
| 3242 | |
|---|
| 3243 | Messages involving Template Haskell are deeply puzzling |
|---|
| 3244 | if you don't know about TH, so it seems better to make |
|---|
| 3245 | -fth an explicit flag. It is no longer switched on |
|---|
| 3246 | by -fglasgow-exts. |
|---|
| 3247 | |
|---|
| 3248 | ] |
|---|
| 3249 | [remove code not required in the new source tree layout |
|---|
| 3250 | Simon Marlow <simonmar@microsoft.com>**20060502114235] |
|---|
| 3251 | [move "compat" earlier in the build for .hc bootstrapping |
|---|
| 3252 | Simon Marlow <simonmar@microsoft.com>**20060502112001] |
|---|
| 3253 | [fix ctime_r problem on Solaris (I hope) |
|---|
| 3254 | Simon Marlow <simonmar@microsoft.com>**20060502111231] |
|---|
| 3255 | [fix whitespace problem that shows up on Solaris (x86) |
|---|
| 3256 | Simon Marlow <simonmar@microsoft.com>**20060502110001] |
|---|
| 3257 | [libraries/time is boring |
|---|
| 3258 | Simon Marlow <simonmar@microsoft.com>**20060502105524] |
|---|
| 3259 | [add time package to libraries Makefile |
|---|
| 3260 | Ashley Yakeley <ashley@semantic.org>**20060501092241] |
|---|
| 3261 | [add time package to default-packages |
|---|
| 3262 | Ashley Yakeley <ashley@semantic.org>**20060426070445] |
|---|
| 3263 | [Fix stage2 segfault on openbsd. |
|---|
| 3264 | dons@cse.unsw.edu.au**20060428074811 |
|---|
| 3265 | |
|---|
| 3266 | Somewhere along the 6.5 branch, gcc started compiling the rts such that |
|---|
| 3267 | it triggers the stack smash handler, causing stage2 to by kill'd |
|---|
| 3268 | immediately. This turns off the stack protector, which will do for now. |
|---|
| 3269 | |
|---|
| 3270 | ] |
|---|
| 3271 | [fix quoting around ${FPTOOLS_TOP_ABS} (fixes #749) |
|---|
| 3272 | Simon Marlow <simonmar@microsoft.com>**20060428085252] |
|---|
| 3273 | [Fix bug shown in the mod77 test. |
|---|
| 3274 | Lemmih <lemmih@gmail.com>**20060427113313] |
|---|
| 3275 | [Don't init root pointers if they aren't gonna be used. |
|---|
| 3276 | Lemmih <lemmih@gmail.com>**20060426111143] |
|---|
| 3277 | [Fix recompilation checking. |
|---|
| 3278 | Simon Marlow <simonmar@microsoft.com>**20060425140932 |
|---|
| 3279 | One-shot compilation was throwing away the old iface read by |
|---|
| 3280 | checkOldIface, with the result that version numbers were never being |
|---|
| 3281 | incremented. Fixes the recomp001 test too. |
|---|
| 3282 | ] |
|---|
| 3283 | [Solaris needs -lrt for the threaded RTS |
|---|
| 3284 | Simon Marlow <simonmar@microsoft.com>**20060425082823] |
|---|
| 3285 | [fix problem with binary-dist docs |
|---|
| 3286 | Simon Marlow <simonmar@microsoft.com>**20060424090159] |
|---|
| 3287 | [Enable breakpoint support. |
|---|
| 3288 | Lemmih <lemmih@gmail.com>**20060421113112] |
|---|
| 3289 | [Fixing some lexer errors with extcore |
|---|
| 3290 | Josef Svenningsson <josef.svenningsson@gmail.com>**20060420222625] |
|---|
| 3291 | [Extcore can now handle data types without constructors |
|---|
| 3292 | Josef Svenningsson <josef.svenningsson@gmail.com>**20060420213622] |
|---|
| 3293 | [Comments only |
|---|
| 3294 | Josef Svenningsson <josef.svenningsson@gmail.com>**20060420213555] |
|---|
| 3295 | [Resurrect ProjectName |
|---|
| 3296 | sven.panne@aedion.de**20060421085125] |
|---|
| 3297 | [Remove the section on platform support, link to the wiki page |
|---|
| 3298 | Simon Marlow <simonmar@microsoft.com>**20060420125555 |
|---|
| 3299 | The section in the building guide was becoming out of date, a wiki |
|---|
| 3300 | page is much more likely to be kept fresh. |
|---|
| 3301 | ] |
|---|
| 3302 | [Fix workaround for a GHC 6.4 bug |
|---|
| 3303 | rl@cse.unsw.edu.au**20060420044223] |
|---|
| 3304 | [hslibs is dead, Jim... |
|---|
| 3305 | sven.panne@aedion.de**20060419144609] |
|---|
| 3306 | [Synched .spec file with reality |
|---|
| 3307 | sven.panne@aedion.de**20060419143138] |
|---|
| 3308 | [Add .spec file to source distribution |
|---|
| 3309 | sven.panne@aedion.de**20060419103725] |
|---|
| 3310 | [remove paragraph about mutable objects that doesn't apply now |
|---|
| 3311 | Simon Marlow <simonmar@microsoft.com>**20060419082038] |
|---|
| 3312 | [HsBool should be HsInt, not StgBool |
|---|
| 3313 | Simon Marlow <simonmar@microsoft.com>**20060418144214 |
|---|
| 3314 | StgBool is mapped to C's int type. GHC doesn't currently know the |
|---|
| 3315 | size of a C int on the target arch, it's easier to use StgInt instead. |
|---|
| 3316 | I guess nobody ever uses Bool arguments to foreign imports/exports. |
|---|
| 3317 | ] |
|---|
| 3318 | [handle Bool arg to foreign import "wrapper" |
|---|
| 3319 | Simon Marlow <simonmar@microsoft.com>**20060418143936 |
|---|
| 3320 | Fixes #746 |
|---|
| 3321 | ] |
|---|
| 3322 | [update commentry for foreign import "wrapper" handling |
|---|
| 3323 | Simon Marlow <simonmar@microsoft.com>**20060418143714] |
|---|
| 3324 | [remove vestiges of ByteArray and MutableByteArray, which are no more |
|---|
| 3325 | Simon Marlow <simonmar@microsoft.com>**20060418143641] |
|---|
| 3326 | [Comment only |
|---|
| 3327 | simonpj@microsoft.com**20060418125624] |
|---|
| 3328 | [Fix rank-validity testing |
|---|
| 3329 | simonpj@microsoft.com**20060418125350 |
|---|
| 3330 | |
|---|
| 3331 | GHC does not now do "hoisting" as it used to. Instead, it allows |
|---|
| 3332 | foralls to the right of fuction arrows, as well as to the left. |
|---|
| 3333 | |
|---|
| 3334 | But the type-validity tester hadn't caught up. This commit fixes |
|---|
| 3335 | it. The test is tc203. |
|---|
| 3336 | |
|---|
| 3337 | Incidentally, GHC still doesn't let you write |
|---|
| 3338 | forall a. Eq a => forall b. b -> b |
|---|
| 3339 | because we get a zillion reduce/reduce errors if we allow that. I'm |
|---|
| 3340 | sure it's fixable. But meanwhile you have to use an auxiliary type |
|---|
| 3341 | synonym, which is a bit stupid. |
|---|
| 3342 | |
|---|
| 3343 | |
|---|
| 3344 | ] |
|---|
| 3345 | [Make the initial rdr and type scope available in the ghc-api. |
|---|
| 3346 | Lemmih <lemmih@gmail.com>**20060418023606] |
|---|
| 3347 | [Fix minor bug in Linker.withExtendedLinkEnv |
|---|
| 3348 | Lemmih <lemmih@gmail.com>**20060418023518] |
|---|
| 3349 | [Export 'insertSymbol' and 'insertStableSymbol'. |
|---|
| 3350 | Lemmih <lemmih@gmail.com>**20060418021806 |
|---|
| 3351 | |
|---|
| 3352 | 'insertStableSymbol' is used for exporting closures that are affected by the GC. |
|---|
| 3353 | |
|---|
| 3354 | ] |
|---|
| 3355 | [Allow $x, as well as $(x), at top level in TH |
|---|
| 3356 | simonpj@microsoft.com**20060414121907 |
|---|
| 3357 | |
|---|
| 3358 | Bulat pointed out that in Template Haskell |
|---|
| 3359 | $x |
|---|
| 3360 | is allowed instead of |
|---|
| 3361 | $(x) |
|---|
| 3362 | in expressions, but not at the top level of modules. |
|---|
| 3363 | |
|---|
| 3364 | This commit fixes the omission. Now you can say |
|---|
| 3365 | |
|---|
| 3366 | f x = x |
|---|
| 3367 | $h |
|---|
| 3368 | data T = T |
|---|
| 3369 | |
|---|
| 3370 | and the $h will run Template Haskell just as you'd expect. |
|---|
| 3371 | |
|---|
| 3372 | ] |
|---|
| 3373 | [Fix TH erorr recovery (test is TH_recover) |
|---|
| 3374 | simonpj@microsoft.com**20060414120411] |
|---|
| 3375 | [Comments only |
|---|
| 3376 | simonpj@microsoft.com**20060414120359] |
|---|
| 3377 | [Recover gracefully from a Template Haskell programmers error |
|---|
| 3378 | simonpj@microsoft.com**20060414115831 |
|---|
| 3379 | |
|---|
| 3380 | If a TH programmer uses a type constructor as a data constructor, |
|---|
| 3381 | GHC simply crashed. This commit makes it report the error in a |
|---|
| 3382 | graceful way. |
|---|
| 3383 | |
|---|
| 3384 | ] |
|---|
| 3385 | [Document newtype-unwrapping for IO in FFI |
|---|
| 3386 | simonpj@microsoft.com**20060414105212] |
|---|
| 3387 | [Cosmetics in SpecConstr |
|---|
| 3388 | simonpj@microsoft.com**20060412152721 |
|---|
| 3389 | |
|---|
| 3390 | SpecConstr currently uses substExpr for tiresome reasons to do with |
|---|
| 3391 | GADTs. Unfortunately the substExpr generates some WARNINGS (when DEBUG) |
|---|
| 3392 | is on, because we aren't adding all the in-scope Ids to the in-scope |
|---|
| 3393 | set of the substitution. |
|---|
| 3394 | |
|---|
| 3395 | When we move to FC these substExprs will go away, so I'm not going to |
|---|
| 3396 | worry about this now. |
|---|
| 3397 | |
|---|
| 3398 | ] |
|---|
| 3399 | [Improve pruning of case alternatives to account for GADTs |
|---|
| 3400 | simonpj@microsoft.com**20060412152327 |
|---|
| 3401 | |
|---|
| 3402 | Consider |
|---|
| 3403 | |
|---|
| 3404 | data T a where |
|---|
| 3405 | T1 :: T Int |
|---|
| 3406 | T2 :: T Bool |
|---|
| 3407 | T3 :: T Char |
|---|
| 3408 | |
|---|
| 3409 | f :: T Bool -> Int |
|---|
| 3410 | f x = case x of |
|---|
| 3411 | DEFAULT -> ... |
|---|
| 3412 | T2 -> 3 |
|---|
| 3413 | |
|---|
| 3414 | Here the DEFAULT case covers multiple constructors (T1,T3), but none |
|---|
| 3415 | of them can match a scrutinee of type (T Bool). So we can prune away |
|---|
| 3416 | the default case altogether. |
|---|
| 3417 | |
|---|
| 3418 | In implementing this, I re-factored this bit of the simplifier, elminiating |
|---|
| 3419 | prepareAlts from SimplUtils, and putting all the work into simplAlts in |
|---|
| 3420 | Simplify |
|---|
| 3421 | |
|---|
| 3422 | The proximate cause was a program written by Manuel using PArrays |
|---|
| 3423 | |
|---|
| 3424 | ] |
|---|
| 3425 | [Fix a bug in optimising division to shift right |
|---|
| 3426 | Simon Marlow <simonmar@microsoft.com>**20060412144247 |
|---|
| 3427 | Division by an integral log2 can't be directly optimised to a shift |
|---|
| 3428 | right, because shift right behaves like a division that rounds to |
|---|
| 3429 | negative infinity, whereas we want one that rounds to zero. Fix this |
|---|
| 3430 | by adding (divisor-1) to the dividend when it is negative before |
|---|
| 3431 | shifting. We do this without jumps, generating very slightly worse |
|---|
| 3432 | code than gcc, which uses conditional moves on CPUs that support it. |
|---|
| 3433 | ] |
|---|
| 3434 | [Omit lndir on Windows, as it used to be |
|---|
| 3435 | simonpj@microsoft.com**20060411135334] |
|---|
| 3436 | [remove a trace |
|---|
| 3437 | Simon Marlow <simonmar@microsoft.com>**20060411131531] |
|---|
| 3438 | [Allow IO to be wrapped in a newtype in foreign import/export |
|---|
| 3439 | simonpj@microsoft.com**20060411120441 |
|---|
| 3440 | |
|---|
| 3441 | Up to now, the silent unwrapping of newtypes in foreign import/export |
|---|
| 3442 | has been limited to data values. But it's useful for the IO monad |
|---|
| 3443 | itself: |
|---|
| 3444 | |
|---|
| 3445 | newtype MyIO a = MIO (IO a) |
|---|
| 3446 | |
|---|
| 3447 | foreign import foo :: Int -> MyIO Int |
|---|
| 3448 | |
|---|
| 3449 | This patch allows the IO monad to be |
|---|
| 3450 | wrapped too. This applies to foreign import "dynamic" and "wrapper", |
|---|
| 3451 | thus |
|---|
| 3452 | foreign import "wrapper" foo :: MyIO () -> HisIO (FunPtr (MyIO ())) |
|---|
| 3453 | |
|---|
| 3454 | Warning: I did on the plane, and I'm no longer sure if its 100% |
|---|
| 3455 | complete, so needs more testing. In particular the wrapper/dynamic bit. |
|---|
| 3456 | |
|---|
| 3457 | ] |
|---|
| 3458 | [Improve newtype deriving |
|---|
| 3459 | simonpj@microsoft.com**20060402215911 |
|---|
| 3460 | |
|---|
| 3461 | Ross Paterson pointed out a useful generalisation of GHC's |
|---|
| 3462 | newtype-deriving mechanism. This implements it. The idea |
|---|
| 3463 | is to allow |
|---|
| 3464 | newtype Wrap m a = Wrap (m a) deriving (Monad, Eq) |
|---|
| 3465 | where the representation type doesn't start with a type |
|---|
| 3466 | constructor. |
|---|
| 3467 | |
|---|
| 3468 | Actually GHC already *did* implement this, but the eta-ok |
|---|
| 3469 | check in TcDeriv missed a case, so there was a lurking bug. |
|---|
| 3470 | |
|---|
| 3471 | This patches fixes the documentation too. drvrun019 tests. |
|---|
| 3472 | |
|---|
| 3473 | |
|---|
| 3474 | ] |
|---|
| 3475 | [add take to the list of functions deforestable |
|---|
| 3476 | Simon Marlow <simonmar@microsoft.com>**20060411090131] |
|---|
| 3477 | [avoid versionitis in Numeric.showHex (should fix tcrun007) |
|---|
| 3478 | Simon Marlow <simonmar@microsoft.com>**20060411085009] |
|---|
| 3479 | [add a note about full-laziness |
|---|
| 3480 | Simon Marlow <simonmar@microsoft.com>**20060410093824] |
|---|
| 3481 | [robustify the test for the top of the tree a little |
|---|
| 3482 | Simon Marlow <simonmar@microsoft.com>**20060410082224] |
|---|
| 3483 | [Make darcs-all work without a ghc toplevel directory |
|---|
| 3484 | Josef Svenningsson <josef.svenningsson@gmail.com>**20060407161738] |
|---|
| 3485 | [Fix typo in darcsall warning |
|---|
| 3486 | Josef Svenningsson <josef.svenningsson@gmail.com>**20060407161335] |
|---|
| 3487 | [fix source dists |
|---|
| 3488 | Simon Marlow <simonmar@microsoft.com>**20060407150045] |
|---|
| 3489 | [add a README for binary dists |
|---|
| 3490 | Simon Marlow <simonmar@microsoft.com>**20060407143832] |
|---|
| 3491 | [fix binary dists |
|---|
| 3492 | Simon Marlow <simonmar@microsoft.com>**20060407143822] |
|---|
| 3493 | [remove the last bits of the ghc/ subdir |
|---|
| 3494 | Simon Marlow <simonmar@microsoft.com>**20060407085219] |
|---|
| 3495 | [TAG 07.04.06 |
|---|
| 3496 | Lemmih <lemmih@gmail.com>**20060407130411] |
|---|
| 3497 | Patch bundle hash: |
|---|
| 3498 | 777313de1f992c22d4d3508095ba0cb233ad670b |
|---|