8000 Contramap, IR and Source printing improvements by deusaquilus · Pull Request #340 · finos/morphir-scala · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Contramap, IR and Source printing improvements #340

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

Merged
merged 10 commits into from
Aug 17, 2023

Conversation

deusaquilus
Copy link
Contributor
@deusaquilus deusaquilus commented Aug 17, 2023
  • Introduce contramap and various other deriver and MDM helper functions.
  • Introduce PrintMDM to pretty-print MDM constructs with different "zoom levels."
  • Enhance PrintSpec to print ELM definitions from a Concept grouped by module as well as write to files if specified.
  • Rename SpecificDeriver to CustomDeriver, the latter makes more sense conceptually.
  • Consolidate Derivers for Scala 2 and Scala 3. Scala 3 Derivers used to be givens. They are moved to a package-object as implicits (they cannot be put into Deriver.scala because the latter is differently defined for Scala 2 and Scala 3.

Migration Guide:

  • Replace all instances of org.finos.morphir.datamodel.SpecificDeriver with org.finos.morphir.datamodel.CustomDeriver.
  • Getting Dervivers into scope by importing org.finos.morphir.datamodel.{given} should still work in Scala 3 (since implicits are automatically imported via the given-import mechanic. It will also now work to call org.finos.morphir.datamodel._.

@netlify
Copy link
netlify bot commented Aug 17, 2023

Deploy Preview for magical-donut-e8221d ready!

Name Link
🔨 Latest commit bc79812
🔍 Latest deploy log https://app.netlify.com/sites/magical-donut-e8221d/deploys/64de78b9883a2d00099c6ed5
😎 Deploy Preview https://deploy-preview-340--magical-donut-e8221d.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@@ -0,0 +1,8 @@
package org.finos.morphir.datamodel

sealed trait UnionType
Copy link
Member

Choose a reason for hiding this comment

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

What is the difference between SealedTrait, Enum, and Sum?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

When I used reflection to construct them I needed to be able to tell Scala 3 Enum and SealedTrait apart. Now since I use Mirror.ordinal it's not needed. I'll keep in mind to remove one of the cases.

Copy link
Member
@DamianReeves DamianReeves left a comment

Choose a reason for hiding this comment

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

LGTM

@DamianReeves DamianReeves merged commit 3ed4c28 into finos:main Aug 17, 2023
Sign up for free < 5FD5 strong>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.

2 participants
0