[GHC] #7759: iOS patch no 14: libraries/base changes
#7759: iOS patch no 14: libraries/base changes --------------------------------+------------------------------------------- Reporter: StephenBlackheath | Owner: Type: bug | Status: new Priority: normal | Component: libraries/base Version: 7.6.2 | Keywords: Os: Other | Architecture: arm Failure: Building GHC failed | Blockedby: Blocking: 7724 | Related: --------------------------------+------------------------------------------- In this patch there are two changes to apply to libraries/base. 'GHC/Event/KQueue.hsc': The issue here is that the #defines EVFILT_READ and EVFILT_WRITE have the values -1 and -2. The original code translates that to {{{filterRead = Filter -1}}} which is wrong Haskell and fails to compile. The modified code produces the correct code {{{filterRead = Filter (-1)}}} 'cbits/DarwinUtils.c': This code is needed for iOS as well as Darwin, and on iOS we need to explicitly include <mach/mach_time.h> which is the correct file for Mac OS/X too. -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7759> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#7759: iOS patch no 14: libraries/base changes --------------------------------+------------------------------------------- Reporter: StephenBlackheath | Owner: Type: bug | Status: patch Priority: normal | Component: libraries/base Version: 7.6.2 | Keywords: Os: Other | Architecture: arm Failure: Building GHC failed | Blockedby: Blocking: 7724 | Related: --------------------------------+------------------------------------------- Changes (by StephenBlackheath): * status: new => patch -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7759#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#7759: iOS patch no 14: libraries/base changes --------------------------------+------------------------------------------- Reporter: StephenBlackheath | Owner: Type: bug | Status: patch Priority: normal | Component: libraries/base Version: 7.6.2 | Keywords: Os: Other | Architecture: arm Failure: Building GHC failed | Blockedby: Blocking: 7724 | Related: --------------------------------+------------------------------------------- Comment(by StephenBlackheath): Here's the error that the wrong generated code {{{Filter -1}}} produces, because there need to be parentheses around (-1). {{{ libraries/base/GHC/Event/KQueue.hsc:201:17: Couldn't match expected type ‛Filter’ with actual type ‛Word16 -> Filter’ In the first argument of ‛(-)’, namely ‛Filter’ In the expression: Filter - 1 In an equation for ‛filterRead’: filterRead = Filter - 1 libraries/base/GHC/Event/KQueue.hsc:203:17: Couldn't match expected type ‛Filter’ with actual type ‛Word16 -> Filter’ In the first argument of ‛(-)’, namely ‛Filter’ In the expression: Filter - 2 In an equation for ‛filterWrite’: filterWrite = Filter - 2 }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7759#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#7759: iOS patch no 14: libraries/base changes ----------------------------------+----------------------------------------- Reporter: StephenBlackheath | Owner: Type: bug | Status: patch Priority: normal | Milestone: 7.8.1 Component: libraries/base | Version: 7.6.2 Keywords: | Os: Other Architecture: arm | Failure: Building GHC failed Difficulty: Unknown | Testcase: Blockedby: | Blocking: 7724 Related: | ----------------------------------+----------------------------------------- Changes (by igloo): * difficulty: => Unknown * milestone: => 7.8.1 -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7759#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#7759: iOS patch no 14: libraries/base changes ----------------------------------+----------------------------------------- Reporter: StephenBlackheath | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.8.1 Component: libraries/base | Version: 7.6.2 Resolution: fixed | Keywords: Os: Other | Architecture: arm Failure: Building GHC failed | Difficulty: Unknown Testcase: | Blockedby: Blocking: 7724 | Related: ----------------------------------+----------------------------------------- Changes (by igloo): * status: patch => closed * resolution: => fixed Comment: Fixed, thanks: {{{ commit 93a4bdadd4d7b1428bcbbb15d9f777a5afc5c915 Author: Ian Lynagh <ian@well-typed.com> Date: Sun Apr 21 18:07:58 2013 +0100 Build fix for iOS; fixes #7759 Patch from Stephen Blackheath. The issue here is that the #defines EVFILT_READ and EVFILT_WRITE have the values -1 and -2. The original code translates that to filterRead = Filter -1 which is wrong Haskell and fails to compile. The modified code produces the correct code filterRead = Filter (-1) }}} -- Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7759#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC