Skip to content
Commits on Jan 30, 2014
  1. @hvr

    Derive `FiniteBits` for integral newtype wrappers

    hvr committed Jan 30, 2014
    When `FiniteBits` was introduced in cddc902
    only the standard Haskell 2010 finite-size integral types were given a
    `FiniteBits` instance, however, since also a DEPRECATION warning was put
    in place (as per 701d9ed) for `bitSize`
    which might point people to to `FiniteBits`, it seems sensible to derive
    `FiniteBits` for all integral newtype wrappers as well.
    
    N.B.: This makes `Integer` the only type in `base` with a `Bits`
          instance but no `FiniteBits` instance.
    
    Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Commits on Sep 28, 2013
  1. @hvr

    Remove obsolete `include/Nhc98BaseConfig.h`

    hvr committed Sep 28, 2013
    This is a left-over from f231a01
    
    Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Commits on Sep 17, 2013
  1. @hvr

    Make `<Typeable.h>` obsolete and refactor away its use

    hvr committed Sep 15, 2013
    With GHC 7.8's PolyKinds the macros in `<Typeable.h>` are no longer of any
    use, and their use is clearly obsolete. The sites using those macros are
    replaced by auto-derivations of `Typeable` instances.
    
    This reduces reliance on the CPP extension and the compile dependency on
    `Typeable.h` in a couple of modules.
    
    Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
  2. @hvr

    Constant-fold `__GLASGOW_HASKELL__` CPP conditionals

    hvr committed Sep 15, 2013
    Now that HUGS and NHC specific code has been removed, this commit "folds"
    the now redundant `#if((n)def)`s containing `__GLASGOW_HASKELL__`.  This
    renders `base` officially GHC only.
    
    This commit also removes redundant `{-# LANGUAGE CPP #-}`.
    
    Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Commits on May 21, 2013
  1. @simonmar
Commits on Feb 15, 2013
  1. @igfoo
Commits on Feb 12, 2013
  1. @dreixel

    Implement poly-kinded Typeable

    dreixel committed Feb 7, 2013
    This patch makes the Data.Typeable.Typeable class work with arguments of any
    kind. In particular, this removes the Typeable1..7 class hierarchy, greatly
    simplyfing the whole Typeable story. Also added is the AutoDeriveTypeable
    language extension, which will automatically derive Typeable for all types and
    classes declared in that module. Since there is now no good reason to give
    handwritten instances of the Typeable class, those are ignored (for backwards
    compatibility), and a warning is emitted.
    
    The old, kind-* Typeable class is now called OldTypeable, and lives in the
    Data.OldTypeable module. It is deprecated, and should be removed in some future
    version of GHC.
Commits on Nov 18, 2012
  1. @joeyadams

    GHC.Windows: more error support (guards, system error strings)

    joeyadams committed Nov 12, 2012
    This changes the output of throwGetLastError to include the system error
    message, rather than the message of our fictitious errno.
    
    It also adds several definitions to GHC.Windows, mostly from the Win32 package.
    The exceptions are:
    
     * getErrorMessage: returns a String, unlike in System.Win32.Types,
       where it returns an LPWSTR.
    
     * errCodeToIOError: new
    
     * c_maperrno_func: new
Commits on Oct 15, 2012
  1. @igfoo
Commits on Oct 4, 2012
  1. @iquiw @simonmar

    FFI wrapper for kevent()

    iquiw committed with simonmar Sep 16, 2012
  2. @iquiw @simonmar

    Adapt to NetBSD's struct kevent

    iquiw committed with simonmar Sep 16, 2012
Commits on May 8, 2012
  1. @pcapriotti
Commits on Apr 25, 2012
  1. @mainland

    Don't include sys/timeb.h on FreeBSD.

    mainland committed Apr 25, 2012
    sys/timeb.h is deprecated on FreeBSD meaning validation fails quite early
    without this patch.
Commits on Apr 17, 2012
  1. @pcapriotti
  2. @pcapriotti
Commits on Apr 16, 2012
  1. @pcapriotti
Commits on Feb 26, 2012
  1. @igfoo
  2. @igfoo

    Use CAPI for lseek

    igfoo committed Feb 26, 2012
  3. @igfoo

    Remove another unused definition

    igfoo committed Feb 26, 2012
  4. @igfoo

    Remove some unused code

    igfoo committed Feb 26, 2012
  5. @igfoo
Commits on Feb 22, 2012
  1. @igfoo

    Remove an unsed definition in HsBase.h

    igfoo committed Feb 22, 2012
    Bytestring uses it, so I've moved it into that package.
Commits on Feb 21, 2012
  1. @igfoo
  2. @igfoo

    Redo the sigset capi changes

    igfoo committed Feb 21, 2012
    Now that we have the CTYPE pragma we can do this in such a way that
    it doesn't break the build on OS X.
Commits on Dec 4, 2011
  1. @igfoo

    Roll back the sigset capi changes

    igfoo committed Dec 4, 2011
    They broken the build on OSX. See #2979.
Commits on Nov 29, 2011
  1. @igfoo
  2. @igfoo

    Use capi some more (part of #5480)

    igfoo committed Nov 28, 2011
Commits on Nov 28, 2011
  1. @igfoo
Commits on Nov 25, 2011
  1. @igfoo
  2. @igfoo
  3. @igfoo

    Add a C wrapper for gettimeofday

    igfoo committed Nov 25, 2011
    Based on part of a patch from Arnaud Degroote in #5480.
    On NetBSD just calling the function directly warns:
        warning: reference to compatibility gettimeofday(); include <sys/time.h>
        to generate correct reference
Commits on Nov 8, 2011
  1. @tibbe

    Add unsafeShift to Data.Bits

    tibbe committed Aug 14, 2011
    This allows shifting by a non-statically known amount without
    introducing a branch (to check for "overflow").
Commits on Aug 25, 2011
  1. @tibbe

    Add Data.Bits.popCount

    tibbe committed Aug 23, 2011
Commits on Aug 1, 2011
  1. @igfoo

    Remove some antiquated C constructs

    igfoo committed Aug 1, 2011
    Fixes validate on amd64/Linux with:
    
    SRC_CC_OPTS += -Wmissing-parameter-type
    SRC_CC_OPTS += -Wold-style-declaration
    SRC_CC_OPTS += -Wold-style-definition
Commits on Jul 11, 2011
  1. @simonmar

    Typeable overhaul (see #5275)

    simonmar committed Jul 8, 2011
    Instances of Typeable used to call mkTyCon:
    
      mkTyCon :: String -> TyCon
    
    which internally kept a table mapping Strings to Ints, so that each
    TyCon could be given a unique Int for fast comparison.  This meant the
    String has to be unique across all types in the program.  However,
    derived instances of typeable used the qualified original
    name (e.g. "GHC.Types.Int") which is not necessarily unique, is
    non-portable, and exposes implementation details.
    
    The String passed to mkTyCon is returned by
    
      tyConString :: TyCon -> String
    
    which let the user get at this non-portable representation (also the
    Show instance returns this String).
    
    Now we store three Strings in TyCon.  The internal representation is
    this:
    
    data TyCon = TyCon {
       tyConHash    :: {-# UNPACK #-} !Fingerprint,
       tyConPackage :: String,
       tyConModule  :: String,
       tyConName    :: String
     }
    
    (internal representations are now provided by Data.Typeable.Internal)
    
    The fields of TyCon are not exposed via the public API.  Together the
    three fields tyConPackage, tyConModule and tyConName uniquely identify
    a TyCon, and the Fingerprint is a hash of the concatenation of these
    three Strings (so no more internal cache to map strings to unique
    Ids). tyConString now returns the value of tyConName only, so is
    therefore portable (but the String returned does not uniquely
    identify the TyCon).
    
    I've measured the performance impact of this change, and performance
    seems to be uniformly better.  This should improve things for SYB in
    particular.  Also, the size of the code generated for deriving
    Typeable is less than half as much as before.
    
    == API changes ==
    
    === mkTyCon is DEPRECATED ==
    
    mkTyCon is used by some hand-written instances of Typeable.  It still
    works as before, but is deprecated in favour of...
    
    === Add mkTyCon3 ===
    
      mkTyCon3 :: String -> String -> String -> TyCon
    
    mkTyCon3 takes the package, module, and name of the TyCon respectively.
    Most users can just derive Typeable, there's no need to use mkTyCon3.
    
    In due course we can rename mkTyCon3 back to mkTyCon.
    
    === typeRepKey changed ===
    
    Previously we had
    
      typeRepKey :: TypeRep -> IO Int
    
    but since we don't assign unique Ints to TypeReps any more, this is
    difficult to implement.  Instead we provide an abstract key type which
    is an instance of Eq and Ord, and internally is implemented by the
    fingerprint:
    
      data TypeRepKey -- abstract, instance of Eq, Ord
      typeRepKey :: TypeRep -> IO TypeRepKey
    
    typeRepKey is still in the IO monad, because the Ord instance is
    implementation-defined.
Something went wrong with that request. Please try again.