Read the `main-is` field from the cabal file for executables (#627)
authorTao He <sighingnow@gmail.com>
Mon, 18 Jun 2018 14:53:38 +0000 (22:53 +0800)
committerAndrey Mokhov <andrey.mokhov@gmail.com>
Mon, 18 Jun 2018 14:53:38 +0000 (15:53 +0100)
commitf3192439950ba3a3af58410c331d2492322dd4ab
tree565a48a4a1d12125df051fd1f4e23ee225a5c4ca
parent831e1ce04983f640a1234f7706fa4ba975ae6a92
Read the `main-is` field from the cabal file for executables (#627)

* For executables, we should read the `main-is` field from the cabal file.

Previously, we simply treat file name for `Main` module as `Main.hs` to
build executable. That doesn't work for the `timeout` program. This patch
fixes the problem.

* Add comments about the processing of `main-is` field from .cabal file.
src/Hadrian/Haskell/Cabal/PackageData.hs
src/Hadrian/Haskell/Cabal/Parse.hs
src/Oracles/ModuleFiles.hs