Skip to content

Auto generating hie.yaml / better implicit configuration #122

@Avi-D-coder

Description

@Avi-D-coder

It seems like it should be possible in most cases to auto generate hie.yaml files given only cradle type. This would also remove the need for hie.yaml most of the time.

A .hie-bios.yaml in lowest parent directory could be used to determine stack, or cabal, if .stack-workxordist-newstylexorhie-bios` is not detected first.

We could start by looking in *.cabal for executable, library, test-suite, then any main-is and hs-source-dirs.

Caveats:

  1. If you are using stack with hpack, you need to invoke stack build before we can build an implicit config.
  2. In the event we observe multiple main-is or hs-source-dirs in a single module. Can we duplicate the cradle with the same name, but a different path?
if os(linux)
  hs-source-dirs: linux
if os(darwin)
  hs-source-dirs: osx
if os(windows)
  hs-source-dirs: win

cabal-helper could be used, but it's a heavy dependency for such a simple task.

Thoughts? I would implement this feature.

Update

implicit-hie

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