[GHC] #2184: if findExecutable finds a file that matchs the argument, check if it is an executable

GHC ghc-devs at haskell.org
Sun Sep 22 11:05:03 CEST 2013


#2184: if findExecutable finds a file that matchs the argument, check if it is an
executable
-------------------------------------+-------------------------------------
        Reporter:  iago              |            Owner:  leroux
            Type:  bug               |           Status:  patch
        Priority:  lowest            |        Milestone:  7.6.2
       Component:                    |          Version:  6.8.2
  libraries/directory                |         Keywords:  findExecutable
      Resolution:                    |  check executable
Operating System:  Linux             |     Architecture:  x86
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+-------------------------------------

Comment (by leroux):

 I've implemented findFiles, findFilesWith, and findExecutables as
 convenience functions.

 `findFilesWith` checks for existence and applies another boolean functions
 for filtering purposes (such as checking permission bits).

 `findFiles` and `findExecutables` are special cases of `findFilesWith`.

 `findFile` and `findExecutable` are now simply `listToMaybe` of
 `findFiles` and `findExecutables` respectively.

 I also took thoughtpolice's views on what a correct implementation is
 (fyi).

 attachment:0001-Fixes-2184-findExecutable-is-correctly-
 implemented-t.patch​

 This ticket is ready for another review to be merged in.

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



More information about the ghc-tickets mailing list