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

Add explicit cradle predicates and multi cradle depend on its cradles #119

Merged
merged 3 commits into from
Jan 23, 2020

Conversation

fendor
Copy link
Collaborator

@fendor fendor commented Dec 27, 2019

This changes multi-cradles to have the name stack or cabal if their hie.yaml specification solely consists of stack or cabal and none cradles. To make stuff easier, we add is*Cradle predicates to the API. Users of this library can make use of them to obtain the cradle-type after it has been parsed.

Fixes haskell/haskell-ide-engine#1490

Also, changes the ActionName to be an extensible ADT.

@fendor fendor force-pushed the multi-cradle-names branch 2 times, most recently from 635ea1d to 095464e Compare December 27, 2019 17:00
@fendor fendor requested a review from jneira January 1, 2020 22:53
src/HIE/Bios/Cradle.hs Outdated Show resolved Hide resolved
@fendor fendor requested a review from jneira January 21, 2020 15:37
@fendor
Copy link
Collaborator Author

fendor commented Jan 21, 2020

cc @cocreature, @ndmitchell
This patch would change the type of Cradle to Cradle a and actionName :: String changes to ActionName a. For you the main difference would be that you would have to change occurrences of either Cradle or ActionName to Cradle Void and ActionName Void respectively, afaict. Would you be fine with this PR, or do you have counter arguments, or other suggestions?
Based on this PR, I plan a follow up PR for hooking into the parsing of hie.yaml, e.g. extending Config to allow specifying a custom cradle.

@ndmitchell
Copy link
Contributor

Doesn't seem too big a deal for the changes in ghcide.

@fendor fendor merged commit 1611297 into haskell:master Jan 23, 2020
@fendor fendor mentioned this pull request Jan 25, 2020
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

HieWrapper discovers the wrong ghc version in a multi-stack cradle
3 participants