Skip to content

Setup.hs seems inconsistent with the build-type option of the cabal file. #193

@ylecornec

Description

@ylecornec

The Setup.hs file seems to assume that a configure file is present in the package.
It uses main = defaultMainWithHooks autoconfUserHooks which is not consistent with the build-type: Simple option of the Win32.cabal file (according to cabal's documentation).

Looking at the appveyor.yml file, it seems that this configure file is present in some contexts, but I do not know which ones.
And because the cabal build-type is Simple, I wonder if this file may be optional, in which case the Setup.hs file should maybe use main = defaultMain by default.

This would make it possible to run runghc Setup.hs configure (which is what we usually do in the rules_haskell ruleset for Bazel).

Current Behavior

Trying to configure the package with runghc Setup.hs configure fails with the following error.

Setup.hs: configure script not found.

Steps to Reproduce (for bugs)

  1. git clone https://github.com/haskell/win32.git
  2. cd win32
  3. runghc Setup.hs configure

Your Environment

  • Win32: 2.13.2.0
  • runghc: 8.10.7
  • Os: NixOS

Github action failure

Here is also an example of this failure in a github action with the following environment:

  • Win32: 2.6.1.0
  • runghc: 8.10.4
  • Os: windows-latest github image.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions