[GHC] #12795: Add more types to System.Posix.Types

GHC ghc-devs at haskell.org
Sun Jan 15 16:56:05 UTC 2017


#12795: Add more types to System.Posix.Types
-------------------------------------+-------------------------------------
        Reporter:  DanielG           |                Owner:  DanielG
            Type:  feature request   |               Status:  closed
        Priority:  normal            |            Milestone:  8.2.1
       Component:  libraries/base    |              Version:
      Resolution:  fixed             |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):  Phab:D2664
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Ryan Scott <ryan.gl.scott@…>):

 In [changeset:"db91d17edfbe7deecb62bbb89c804249f9c4a4bd/ghc"
 db91d17e/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="db91d17edfbe7deecb62bbb89c804249f9c4a4bd"
 Properly introduce CTimer to System.Posix.Types

 Summary:
 In ffc2327070dbb664bdb407a804121eacb2a7c734, an attempt was made at
 adding a Haskell wrapper around the C `timer_t` type. Unfortunately, GHC's
 autoconf macros weren't sophisticated enough at the time to properly
 detect
 that `timer_t` is represented by a `void *` (i.e., a pointer) on most
 OSes.

 This is a second attempt at `CTimer`, this time using `AC_COMPILE_IFELSE`
 to
 detect if a type is a pointer type by compiling the following program:

 ```
 type val;
 *val;
 ```

 This also only derives a small subset of class instances for `CTimer` that
 are
 known to be compatible with `Ptr` using a new `OPAQUE_TYPE_WITH_CTYPE`
 macro.

 Test Plan: ./validate

 Reviewers: erikd, hvr, austin, bgamari

 Reviewed By: bgamari

 Subscribers: thomie

 Differential Revision: https://phabricator.haskell.org/D2952

 GHC Trac Issues: #12795, #12998
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12795#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list