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

Switch the configuration from Dahll to Yaml #1

Merged
merged 1 commit into from
Jun 15, 2019

Conversation

ndmitchell
Copy link
Contributor

Note that this patch is completely untested (other than it builds), since you didn't seem to have any Dahll test files sitting around. I went for a pretty simple encoding, so cabal: or cabal: {component: lib} are sufficient. It probably doesn't produce fantastic error messages.

parseJSON (Object (Map.toList -> [(key, val)]))
| key == "cabal" = case val of
Object x | Just (String v) <- Map.lookup "component" x -> return $ Cabal $ Just $ T.unpack v
_ -> return $ Cabal Nothing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is going to be confusing because it will accept cabal: garbage. Something to change in future.

@mpickering
Copy link
Collaborator

Good start. I'll merge this in but needs to be modified before being released (imo).

@mpickering mpickering merged commit 9f9fe00 into haskell:master Jun 15, 2019
@mpickering
Copy link
Collaborator

Also, all the documentation needs to be updated.

@ndmitchell
Copy link
Contributor Author

Thanks - agreed - more testing would be good too.

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.

None yet

2 participants