Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

With Ormolu as the formatting provider, need BangPatterns (el al.) without putting it in every file #382

Closed
complyue opened this issue Sep 7, 2020 · 14 comments
Labels
component: plugins type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..

Comments

@complyue
Copy link

complyue commented Sep 7, 2020

Subject of the issue

With Ormolu as the formatting provider, need BangPatterns (el al.) without putting it in every file

Language extensions (those not enabled by Ormolu automatically), if not put in every source file, can only be specified on the command line of ormolu according to tweag/ormolu#650

Until it can obtain enabled extension list from the project's .cabal file, we need a way to customize Ormolu's command line to tell such extensions, when not willing to put them into every source file.

Your environment

  • Output of haskell-language-server --probe-tools or haskell-language-server-wrapper --probe-tools
$ haskell-language-server-wrapper --probe-tools
haskell-language-server version: 0.4.0.0 (GHC: 8.8.3) (PATH: /Users/cyue/.local/bin/haskell-language-server-wrapper) (GIT hash: 1d1ab3bad0d6d0528b8cdeaa697836b18508b596)
Tool versions found on the $PATH
cabal:		3.2.0.0
stack:		2.3.3
ghc:		8.8.3
  • Which lsp-client do you use

    • VSCode
  • Describe your project (alternative: link to the project)

https://github.com/e-wrks/edh

  • Contents of hie.yaml

    No this file

Steps to reproduce

Make sure Ormolu is selected as the "Formatting Provider"
Format some file uses BangPatterns syntax but doesn't contain a pragma for it.

Expected behaviour

File content formatted.

Actual behaviour

File content not formatted.

Include debug information

[Error - 7:57:08 PM] Request textDocument/formatting failed.
  Message: ormoluCmd: OrmoluParsingFailed (RealSrcSpan SrcSpanOneLine /some/where/xxx.hs" 48 20 24) "Illegal bang-pattern (use BangPatterns):\n! cap"
  Code: -32602 
@georgefst
Copy link
Collaborator

When used via HLS, Ormolu should be picking up extensions from your environment. I'd guess maybe you need an explicit hie.yaml?

@complyue
Copy link
Author

complyue commented Sep 8, 2020

I'm personally still on HIE+Brittany, just evaluating the transition to HLS+Ormolu. I routinely work with multi-root workspace, with each workspace having multiple targets (libs and exes), I've got the impression that hie.yaml is used to select a single component for the IDE to work with, but my use case need all components work simultaneously.

@georgefst
Copy link
Collaborator

I've got the impression that hie.yaml is used to select a single component for the IDE to work with

It's a lot broader than that - it's essentially a way of describing your build system to the IDE.

HLS has much better support for working with multiple components than HIE, but it requires a hie.yaml. See https://github.com/mpickering/hie-bios#multi-cradle.

The implicit-hie tool can often write this file for you.

@complyue
Copy link
Author

complyue commented Sep 8, 2020

The implicit-hie tool can often write this file for you.

I wonder what prevented similar treatments to be implemented by HLS, in case no hie.yaml presents?

I've been assuming by far, that the Cabal library can determine precise GHC compiler options for each src file, given either cabal or stack project information. I can understand that's not enough for static analysis against semantic AST of the whole program, for the IDE to perform, but for formatters, they'd better work on a per-src-file basis, where ghc command line options ought to be enough.

And tried [implicit-hie], got empty response :(

For the record, I use another package manager to automatically generate both cabal.project and stack.yaml, while each package has its .cabal file manually authored, there is no package.yaml for hpack.

$ gen-hie
cradle:
  cabal:
$ cat cabal.project

-- Please change Cabal project settings per your needs

-- FOLLOWING CONTENTS GONNA BE OVERWRITTEN BY EPM --

packages:
  /fw/m3cyue/edh-universe/complyue/edh/edh
  /fw/m3cyue/edh-universe/complyue/edh/lossless-decimal
  /fw/m3cyue/edh-universe/complyue/nedh/nedh
  /fw/m3cyue/edh-universe/complyue/sedh/sedh
  /fw/m3cyue/edh-universe/complyue/hasdim/hasdim
  /fw/m3cyue/edh-universe/complyue/haskit/haskit

$ cat stack.yaml

# Please change the resolver and other Stack settings per your needs
resolver: lts-16.11

ghc-options:
  edh: -O0

# extra-deps:
#   - dequeue-0.1.12

## FOLLOWING CONTENTS GONNA BE OVERWRITTEN BY EPM ##

local-bin-path: /fw/m3cyue/edh-universe/bin
packages:
 - /fw/m3cyue/edh-universe/complyue/edh/edh
 - /fw/m3cyue/edh-universe/complyue/edh/lossless-decimal
 - /fw/m3cyue/edh-universe/complyue/nedh/nedh
 - /fw/m3cyue/edh-universe/complyue/sedh/sedh
 - /fw/m3cyue/edh-universe/complyue/hasdim/hasdim
 - /fw/m3cyue/edh-universe/complyue/haskit/haskit
$ 

@georgefst
Copy link
Collaborator

I wonder what prevented similar treatments to be implemented by HLS, in case no hie.yaml presents?

It'll happen: #186

I've been assuming by far, that the Cabal library can determine precise GHC compiler options for each src file

It can, but neither Ormolu nor HLS depend on Cabal the library. Anyway, once you have hie.yaml set up correctly (which is pretty much necessary for HLS to work correctly at all), HLS will be able to work out these options, and pass them to Ormolu.

And tried [implicit-hie], got empty response :(

I guess that means your setup is too complicated. You'll need to write a manual hie.yaml, based on the documentation in hie-bios. If your code builds with Cabal or Stack, then it shouldn't be too hard.

@complyue
Copy link
Author

complyue commented Sep 8, 2020

Thanks @georgefst for the prompting answers, things are promising as always, but I don't think my .cabal file are that complicated, I used to simplify them with cabal-fmt (it does destroy some more advanced constructs e.g. common stanzas), I think I'd like to check back after it matures a bit more.

Or there's some tool/technique to quickly decipher the complication in my project setup those preventing the desired result?
(Sorry I don't have much time to go deeper, so long as HIE+Brittany still basically works for me)

@jneira
Copy link
Member

jneira commented Nov 9, 2020

@complyue hls is using a new implicit cradle so maybe your project can be fully loaded without an explicit hie.yaml.
If the issue still reproduces, please, use an explicit hie.yaml and attach it here: you could get a working one with : stack install implicit-hie && gen-hie in the project root directory.
A log of a session trying to format a file with ourmolu would be great too, to see why it is not getting the default extensions from the .cabal file.

@jneira jneira added status: needs repro type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc.. and removed type: enhancement New feature or request labels Nov 9, 2020
@jneira
Copy link
Member

jneira commented Nov 9, 2020

labeled as a bug cause hls/ourmolu plugin should pick the default extensions

@complyue
Copy link
Author

I just reproduced with hls built from master (0.6.0+)

$ git clone https://github.com/e-wrks/edh.git
Cloning into 'edh'...
remote: Enumerating objects: 915, done.
remote: Counting objects: 100% (915/915), done.
remote: Compressing objects: 100% (467/467), done.
remote: Total 7797 (delta 511), reused 646 (delta 258), pack-reused 6882
Receiving objects: 100% (7797/7797), 1.95 MiB | 451.00 KiB/s, done.
Resolving deltas: 100% (4699/4699), done.
$ code edh

hie.yaml at https://github.com/e-wrks/edh/blob/master/host.hs/hie.yaml

cradle:
  stack:
    - path: "./pub"
      component: "edh:lib"

    - path: "./src"
      component: "edh:lib:edh-internal"

    - path: "./repl/Main.hs"
      component: "edh:exe:edh"

    - path: "./repl/Repl.hs"
      component: "edh:exe:edh"

    - path: "./runfile/Main.hs"
      component: "edh:exe:runedh"

    - path: "./runmodu/Main.hs"
      component: "edh:exe:edhm"

    - path: "../lossless-decimal/src"
      component: "lossless-decimal:lib"

vscode-haskell output:

[client] run command: "haskell-language-server-wrapper --lsp"
[client] debug command: "haskell-language-server-wrapper --lsp"
[client] server cwd: undefined
Module "/fw/ttt/edh/a" is loaded by Cradle: Cradle {cradleRootDir = "/fw/ttt/edh", cradleOptsProg = CradleAction: Default}
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 0.6.0.0, Git revision c3af2dd141609f94ecadadfd13def7ccb6acb3bb (dirty) (828 commits) x86_64 ghc-8.8.3
Current directory: /fw/ttt/edh
Operating system: darwin
Arguments: ["--lsp"]
Cradle directory: /fw/ttt/edh
Cradle type: Default

Tool versions found on the $PATH
cabal:		3.2.0.0
stack:		2.3.3
ghc:		8.8.3


Consulting the cradle to get project GHC version...
Project GHC version: 8.8.3
haskell-language-server exe candidates: ["haskell-language-server-8.8.3","haskell-language-server-8.8","haskell-language-server"]
Launching haskell-language-server exe at:/Users/cyue/.local/bin/haskell-language-server-8.8.3
haskell-language-server version: 0.6.0.0 (GHC: 8.8.3) (PATH: /Users/cyue/.local/bin/haskell-language-server-8.8.3) (GIT hash: c3af2dd141609f94ecadadfd13def7ccb6acb3bb)
Starting (haskell-language-server)LSP server...
  with arguments: LspArguments {argLSP = True, argsCwd = Nothing, argFiles = [], argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "brittany",PluginId "eval",PluginId "floskell",PluginId "fourmolu",PluginId "ghcide",PluginId "hlint",PluginId "importLens",PluginId "moduleName",PluginId "ormolu",PluginId "pragmas",PluginId "retrie",PluginId "stylish-haskell",PluginId "tactic"]
  in directory: /fw/ttt/edh
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 Started LSP server in 0.00s
2020-11-18 21:16:05.176031 [ThreadId 25] - Registering ide configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri (-7166588250605988399) "file:///fw/ttt/edh"], clientSettings = hashed Nothing}
2020-11-18 21:16:05.17787 [ThreadId 25] - Configuration changed: Object (fromList [("haskell",Object (fromList [("logFile",String ""),("updateBehavior",String "prompt"),("hlintOn",Bool True),("formatOnImportOn",Bool True),("indentationRules",Object (fromList [("enabled",Bool True)])),("liquidOn",Bool False),("languageServerVariant",String "haskell-language-server"),("serverExecutablePath",String ""),("diagnosticsOnChange",Bool True),("completionSnippetsOn",Bool True),("maxNumberOfProblems",Number 100.0),("formattingProvider",String "ormolu"),("trace",Object (fromList [("server",String "off")]))]))])
2020-11-18 21:16:05.178786 [ThreadId 25] - Opened text document: file:///fw/ttt/edh/host.hs/src/Language/Edh/Utils.hs
2020-11-18 21:16:05.179612 [ThreadId 111] - getClientConfigAction:clientSettings:Just (Object (fromList [("haskell",Object (fromList [("logFile",String ""),("updateBehavior",String "prompt"),("hlintOn",Bool True),("formatOnImportOn",Bool True),("indentationRules",Object (fromList [("enabled",Bool True)])),("liquidOn",Bool False),("languageServerVariant",String "haskell-language-server"),("serverExecutablePath",String ""),("diagnosticsOnChange",Bool True),("completionSnippetsOn",Bool True),("maxNumberOfProblems",Number 100.0),("formattingProvider",String "ormolu"),("trace",Object (fromList [("server",String "off")]))]))]))
2020-11-18 21:16:05.179751 [ThreadId 111] - hlint:getIdeas:file:NormalizedFilePath "/fw/ttt/edh/host.hs/src/Language/Edh/Utils.hs"
2020-11-18 21:16:05.180365 [ThreadId 118] - Consulting the cradle for "host.hs/src/Language/Edh/Utils.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/fw/ttt/edh/host.hs", cradleOptsProg = CradleAction: Stack}
2020-11-18 21:16:05.439941 [ThreadId 139] - Plugin.makeCodeLens (ideLogger)
> Error parsing targets: Directory not found: edh:lib:edh-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /fw/ttt/edh/host.hs/.stack-work/install/x86_64-osx/b669a0fbc3952b933067cead8aef84cb191a04f5071cd34044324144b938ec64/8.8.3/pkgdb:/Users/cyue/.stack/snapshots/x86_64-osx/b669a0fbc3952b933067cead8aef84cb191a04f5071cd34044324144b938ec64/8.8.3/pkgdb:/Users/cyue/.stack/programs/x86_64-osx/ghc-8.8.3/lib/ghc-8.8.3/package.conf.d
2020-11-18 21:16:06.277745 [ThreadId 156] - finish: CodeAction (took 1.08s)
2020-11-18 21:16:06.27782 [ThreadId 160] - finish: codeLens (took 0.84s)
2020-11-18 21:16:06.277878 [ThreadId 161] - finish: CodeAction:PackageExports (took 0.00s)
2020-11-18 21:16:06.278303 [ThreadId 168] - finish: importLens (took 0.00s)
2020-11-18 21:16:06.278343 [ThreadId 170] - finish:  (took 0.00s)
2020-11-18 21:16:06.278642 [ThreadId 173] - finish: retrie (took 0.00s)
2020-11-18 21:16:06.27865 [ThreadId 171] - finish: ModuleName.ghcSession (took 0.00s)
2020-11-18 21:16:06.278732 [ThreadId 137] - Unexpected exception on request, please report!
Message: RequestMessage {_jsonrpc = "2.0", _id = IdInt 3, _method = TextDocumentCodeLens, _params = CodeLensParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///fw/ttt/edh/host.hs/src/Language/Edh/Utils.hs"}}, _workDoneToken = Nothing}}
Exception: BadDependency "GhcSession"
2020-11-18 21:16:06.278958 [ThreadId 176] - finish: tactic (took 0.00s)
[Error - 9:16:06 PM] Request textDocument/codeLens failed.
  Message: BadDependency "GhcSession"
  Code: -32603 
2020-11-18 21:16:06.536274 [ThreadId 182] - finish: CodeAction (took 0.00s)
2020-11-18 21:16:06.536348 [ThreadId 184] - finish: CodeAction:PackageExports (took 0.00s)
2020-11-18 21:16:06.536676 [ThreadId 186] - finish: importLens (took 0.00s)
2020-11-18 21:16:06.536934 [ThreadId 188] - finish: retrie (took 0.00s)
2020-11-18 21:16:06.537223 [ThreadId 190] - finish: tactic (took 0.00s)
2020-11-18 21:16:17.570413 [ThreadId 206] - finish: Formatter (took 0.00s)
2020-11-18 21:16:17.570539 [ThreadId 208] - finish: Ormolu (took 0.00s)
[Error - 9:16:17 PM] Request textDocument/formatting failed.
  Message: ormoluCmd: OrmoluParsingFailed (RealSrcSpan SrcSpanOneLine "/fw/ttt/edh/host.hs/src/Language/Edh/Utils.hs" 9 12 15) "Illegal bang-pattern (use BangPatterns):\n! xs"
  Code: -32602 

I suspect BadDependency "GhcSession" is the most evident message? But I have no clue where to go to tinker with it.

@complyue
Copy link
Author

complyue commented Nov 18, 2020

And I tried to put one https://github.com/e-wrks/edh/blob/master/hie.yaml which is one dir level up, error remains similar

[client] run command: "haskell-language-server-wrapper --lsp"
[client] debug command: "haskell-language-server-wrapper --lsp"
[client] server cwd: undefined
Found "/fw/ttt/edh/hie.yaml" for "/fw/ttt/edh/a"
Module "/fw/ttt/edh/a" is loaded by Cradle: Cradle {cradleRootDir = "/fw/ttt/edh", cradleOptsProg = CradleAction: Stack}
Run entered for haskell-language-server-wrapper(haskell-language-server-wrapper) Version 0.6.0.0, Git revision c3af2dd141609f94ecadadfd13def7ccb6acb3bb (dirty) (828 commits) x86_64 ghc-8.8.3
Current directory: /fw/ttt/edh
Operating system: darwin
Arguments: ["--lsp"]
Cradle directory: /fw/ttt/edh
Cradle type: Stack

Tool versions found on the $PATH
cabal:		3.2.0.0
stack:		2.3.3
ghc:		8.8.3


Consulting the cradle to get project GHC version...
Project GHC version: 8.8.3
haskell-language-server exe candidates: ["haskell-language-server-8.8.3","haskell-language-server-8.8","haskell-language-server"]
Launching haskell-language-server exe at:/Users/cyue/.local/bin/haskell-language-server-8.8.3
haskell-language-server version: 0.6.0.0 (GHC: 8.8.3) (PATH: /Users/cyue/.local/bin/haskell-language-server-8.8.3) (GIT hash: c3af2dd141609f94ecadadfd13def7ccb6acb3bb)
Starting (haskell-language-server)LSP server...
  with arguments: LspArguments {argLSP = True, argsCwd = Nothing, argFiles = [], argsShakeProfiling = Nothing, argsTesting = False, argsExamplePlugin = False, argsDebugOn = False, argsLogFile = Nothing, argsThreads = 0, argsProjectGhcVersion = False}
  with plugins: [PluginId "brittany",PluginId "eval",PluginId "floskell",PluginId "fourmolu",PluginId "ghcide",PluginId "hlint",PluginId "importLens",PluginId "moduleName",PluginId "ormolu",PluginId "pragmas",PluginId "retrie",PluginId "stylish-haskell",PluginId "tactic"]
  in directory: /fw/ttt/edh
If you are seeing this in a terminal, you probably should have run ghcide WITHOUT the --lsp option!
 Started LSP server in 0.00s
2020-11-18 21:35:27.400513 [ThreadId 25] - Registering ide configuration: IdeConfiguration {workspaceFolders = fromList [NormalizedUri (-7166588250605988399) "file:///fw/ttt/edh"], clientSettings = hashed Nothing}
2020-11-18 21:35:27.40335 [ThreadId 25] - Configuration changed: Object (fromList [("haskell",Object (fromList [("logFile",String ""),("updateBehavior",String "prompt"),("hlintOn",Bool True),("formatOnImportOn",Bool True),("indentationRules",Object (fromList [("enabled",Bool True)])),("liquidOn",Bool False),("languageServerVariant",String "haskell-language-server"),("serverExecutablePath",String ""),("diagnosticsOnChange",Bool True),("completionSnippetsOn",Bool True),("maxNumberOfProblems",Number 100.0),("formattingProvider",String "ormolu"),("trace",Object (fromList [("server",String "off")]))]))])
2020-11-18 21:35:27.404035 [ThreadId 25] - Opened text document: file:///fw/ttt/edh/host.hs/src/Language/Edh/Utils.hs
2020-11-18 21:35:27.405066 [ThreadId 99] - getClientConfigAction:clientSettings:Just (Object (fromList [("haskell",Object (fromList [("logFile",String ""),("updateBehavior",String "prompt"),("hlintOn",Bool True),("formatOnImportOn",Bool True),("indentationRules",Object (fromList [("enabled",Bool True)])),("liquidOn",Bool False),("languageServerVariant",String "haskell-language-server"),("serverExecutablePath",String ""),("diagnosticsOnChange",Bool True),("completionSnippetsOn",Bool True),("maxNumberOfProblems",Number 100.0),("formattingProvider",String "ormolu"),("trace",Object (fromList [("server",String "off")]))]))]))
2020-11-18 21:35:27.405205 [ThreadId 99] - hlint:getIdeas:file:NormalizedFilePath "/fw/ttt/edh/host.hs/src/Language/Edh/Utils.hs"
2020-11-18 21:35:27.405624 [ThreadId 103] - Consulting the cradle for "host.hs/src/Language/Edh/Utils.hs"
Output from setting up the cradle Cradle {cradleRootDir = "/fw/ttt/edh/host.hs", cradleOptsProg = CradleAction: Stack}
2020-11-18 21:35:27.664377 [ThreadId 119] - Plugin.makeCodeLens (ideLogger)
> Error parsing targets: Directory not found: edh:lib:edh-internal
> Note that to specify options to be passed to GHCi, use the --ghci-options flag
> /fw/ttt/edh/host.hs/.stack-work/install/x86_64-osx/b669a0fbc3952b933067cead8aef84cb191a04f5071cd34044324144b938ec64/8.8.3/pkgdb:/Users/cyue/.stack/snapshots/x86_64-osx/b669a0fbc3952b933067cead8aef84cb191a04f5071cd34044324144b938ec64/8.8.3/pkgdb:/Users/cyue/.stack/programs/x86_64-osx/ghc-8.8.3/lib/ghc-8.8.3/package.conf.d
2020-11-18 21:35:28.378135 [ThreadId 138] - finish: codeLens (took 0.71s)
2020-11-18 21:35:28.378593 [ThreadId 145] - finish:  (took 0.00s)
2020-11-18 21:35:28.378889 [ThreadId 146] - finish: ModuleName.ghcSession (took 0.00s)
2020-11-18 21:35:28.378915 [ThreadId 117] - Unexpected exception on request, please report!
Message: RequestMessage {_jsonrpc = "2.0", _id = IdInt 2, _method = TextDocumentCodeLens, _params = CodeLensParams {_textDocument = TextDocumentIdentifier {_uri = Uri {getUri = "file:///fw/ttt/edh/host.hs/src/Language/Edh/Utils.hs"}}, _workDoneToken = Nothing}}
Exception: BadDependency "GhcSession"
[Error - 9:35:28 PM] Request textDocument/codeLens failed.
  Message: BadDependency "GhcSession"
  Code: -32603 

@complyue
Copy link
Author

I got correct formatter behavior with another simpler package, but only after eliminated the internal-lib structure, specifically this mod: complyue/els@2703d25#diff-48645bb09bcfe26a8bd6b7059b050b157b96ffabba9b2e0f83f28a04fba5e03a

And an explicit hie.yaml seems necessary too, as gen-hie won't work unless stack.yaml is in same dir as .cabal file, don't know if implicit-hie lib always has this limitation.

So I think this issue can be closed now.

And do we have a dedicated issue to track internal-lib support? I see #509 some related, but hls won't work at all in my case with internal-lib present.

@jneira
Copy link
Member

jneira commented Nov 19, 2020

And do we have a dedicated issue to track internal-lib support?

stack internal/private libraries are not supported for now: #114
It is blocked on a stack issue not resolved: commercialhaskell/stack#4564

as gen-hie won't work unless stack.yaml is in same dir as .cabal file, don't know if implicit-hie lib always has this limitation.

well, not sure about that, or at least it works for some cases; it seems is working for me with a stack.yaml in the project dir and a .cabal in a supackage:

D:\ws\haskell\stack-test>type stack.yaml
resolver: lts-14.11

jobs: 1

packages:
- .
- subpackage

D:\ws\haskell\stack-test>dir subpackage /B
.stack-work
CHANGELOG.md
config
Setup.hs
src
subpackage.cabal


D:\ws\haskell\stack-test>gen-hie
cradle:
  stack:
    - path: "./src"
      component: "stack-test:lib"

    - path: "./app/Main.hs"
      component: "stack-test:exe:stack-test-exe"

    - path: "./app/Paths_stack_test.hs"
      component: "stack-test:exe:stack-test-exe"

    - path: "./test"
      component: "stack-test:test:stack-test-test"

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

@complyue
Copy link
Author

complyue commented Nov 19, 2020

Update: a reminder for readers later, I'm refactoring structure of my packages from internal/private lib into separated packages, then HLS+Ormolu works very nice, much smoother than HIE+Brittany as before. Also as HIE has been archived, now is good time to shift to HLS :D

Thanks @jneira and @georgefst I'm closing this issue.

For the record, my *.cabal files are a little deeper, I hope someday they can work right out-of-the-box.

cymp:edh-universe cyue$ cat stack.yaml

# Please change the resolver and other Stack settings per your needs
resolver: lts-16.11

ghc-options:
  elr: -O0
  edh: -O0

## FOLLOWING CONTENTS GONNA BE OVERWRITTEN BY EPM ##

local-bin-path: /fw/m3cyue/edh-universe/bin
packages:
 - /fw/m3cyue/edh-universe/e-wrks/edh/lossless-decimal
 - /fw/m3cyue/edh-universe/e-wrks/edh/elr
 - /fw/m3cyue/edh-universe/e-wrks/edh/host.hs
 - /fw/m3cyue/edh-universe/e-wrks/nedh/host.hs
 - /fw/m3cyue/edh-universe/e-wrks/sedh/host.hs
 - /fw/m3cyue/edh-universe/e-wrks/hasdim/host.hs
 - /fw/m3cyue/edh-universe/e-wrks/haskit/host.hs
 - /fw/m3cyue/edh-universe/e-wrks/els/host.hs
cymp:edh-universe cyue$
cymp:edh-universe cyue$ find . -name \*.cabal
./e-wrks/edh/lossless-decimal/lossless-decimal.cabal
./e-wrks/edh/elr/elr.cabal
./e-wrks/edh/host.hs/edh.cabal
./e-wrks/nedh/host.hs/nedh.cabal
./e-wrks/sedh/host.hs/sedh.cabal
./e-wrks/hasdim/host.hs/hasdim.cabal
./e-wrks/haskit/host.hs/haskit.cabal
./e-wrks/els/host.hs/els.cabal
cymp:edh-universe cyue$
cymp:edh-universe cyue$ gen-hie
gen-hie: No .cabal files found under/fw/m3cyue/edh-universe
 You may need to run stack build.
CallStack (from HasCallStack):
  error, called at app/Main.hs:32:21 in main:Main
cymp:edh-universe cyue$ 
cymp:edh-universe cyue$ cd e-wrks/els/host.hs
cymp:host.hs cyue$ gen-hie
gen-hie: user error (InvalidYaml (Just (YamlException "Yaml file not found: /fw/m3cyue/edh-universe/e-wrks/els/host.hs/stack.yaml")))
cymp:host.hs cyue$ 

@jneira
Copy link
Member

jneira commented Nov 19, 2020

@complyue thank you to spend time debugging and reporting the errors

I am gonna open an issue in implicit-hie about your use case.
//cc @Avi-D-coder

pepeiborra pushed a commit that referenced this issue Dec 27, 2020
* Update to latest hie-bios

* Remove explicit usage of type parameter Void from Cradle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: plugins type: bug Something isn't right: doesn't work as intended, documentation is missing/outdated, etc..
Projects
None yet
Development

No branches or pull requests

3 participants