implicit-hie: Auto generate hie-bios cradles & hie.yaml

[ bsd3, development, hie, hls, library, tools ] [ Propose Tags ] [ Report a vulnerability ]

Auto generate a stack or cabal multi component hie.yaml file


[Skip to Readme]

Flags

Automatic Flags
NameDescriptionDefault
executable

Build the gen-hie executable

Enabled

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.2.0, 0.1.2.1, 0.1.2.2, 0.1.2.3, 0.1.2.4, 0.1.2.5, 0.1.2.6, 0.1.2.7, 0.1.3.0, 0.1.4.0 (info)
Change log ChangeLog.md
Dependencies attoparsec (>=0.13), base (>=4.7 && <5), directory (>=1.3), filepath (>=1.4), filepattern (>=0.1), implicit-hie, text (>=1.2), transformers (>=0.5), yaml (>=0.5) [details]
Tested with ghc ==8.8.3 || ==8.10.1
License BSD-3-Clause
Copyright 2020
Author Avi Dessauer
Maintainer avi.the.coder@gmail.com
Category Development, Tools, Hie, HLS
Home page https://github.com/Avi-D-coder/implicit-hie#readme
Bug tracker https://github.com/Avi-D-coder/implicit-hie/issues
Source repo head: git clone https://github.com/Avi-D-coder/implicit-hie
Uploaded by Avi_Dessauer at 2022-12-22T21:33:40Z
Distributions Arch:0.1.2.7, NixOS:0.1.4.0
Reverse Dependencies 2 direct, 39 indirect [details]
Executables gen-hie
Downloads 14369 total (159 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for implicit-hie-0.1.4.0

[back to package description]

implicit-hie

cd your-stack-or-cabal-package
stack install implicit-hie # or cabal install implicit-hie
gen-hie > hie.yaml

gen-hie should be run the root of a cabal or stack project. The config type (cabal or stack) is determined by the existence of dist-newstyle, .stack-work, stack.yaml, if none are found the default is cabal. You can use --cabal, or --stack options to override config type.

Cabal Multi project example

❯ git clone https://github.com/well-typed/optics.git
❯ cd optics
❯ gen-hie
cradle:
  cabal:
    - path: "indexed-profunctors/src"
      component: "lib:indexed-profunctors"

    - path: "optics-th/src"
      component: "lib:optics-th"

    - path: "optics-th/tests"
      component: "optics-th:test:optics-th-tests"

    - path: "optics-vl/src"
      component: "lib:optics-vl"

    - path: "codegen/./Subtypes.hs"
      component: "optics-codegen:exe:optics-codegen-subtypes"

    - path: "optics-core/src"
      component: "lib:optics-core"

    - path: "optics-sop/src"
      component: "lib:optics-sop"

    - path: "optics-extra/src"
      component: "lib:optics-extra"

    - path: "template-haskell-optics/src"
      component: "lib:template-haskell-optics"

    - path: "optics/src"
      component: "lib:optics"

    - path: "optics/tests"
      component: "optics:test:optics-tests"

    - path: "metametapost/src/Cli.hs"
      component: "metametapost:exe:metametapost-optics"

Features

All common Cabal and Stack configurations should just work. If you use more advanced features, the generated config may not be complete.

  • multi component cabal, stack projects
  • multiple executables under a single path
  • multiple paths provided to hs-source-dirs
  • lookup nested packages in cabal.project or stack.yaml
  • Handle Exe and Bench other-modules
  • common stanzas

Work, Twitter