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

Introduce Univ newtype #24

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Introduce Univ newtype #24

wants to merge 8 commits into from

Conversation

phadej
Copy link
Collaborator

@phadej phadej commented Jun 29, 2016

This is first step for #23

I introduce Univ newtype, so instance definitions could be done based on combinators on Univ.

Also I change indentation to use spaces.

Follow-ups would be:

  • Don't use universe or universeF in instance declarations
    • Introduce needed combinators to Data.Universe.Helpers
  • Experiment on Univ implementation

Open questions:

  • universe and universeF don't need to be in the class anymore. Then we won't accidentally memoise when using them!
  • Monoid instance for Univ (using fair interleaving?)
  • Foldable/Traversable for Univ (Foldable provides natural toList!)
  • better name for Univ, maybe Distinct or USet?
  • Rename Data.Universe.Helpers to Data.Universe.Univ

Some answers:

  • I bumped versions to 2 as this is huge update.
  • I think that small breaking changes in universe-base (i.e. combinator removal, or even redefining of Univ) won't break universe-instance-* API. As Univ isn't exported from instance packages, their public api isn't broken (if they continue to work). So we can depend on universe-instances-* >= 2 && <3. That could be documented in universe package haddock if this scheme makes sense.

@phadej
Copy link
Collaborator Author

phadej commented Jun 29, 2016

@dmwit, I also commited .travis.yml into repository, with cabal-install-1.24 it's possible to build multi-package projects using "standard tools". .travis.yml has rough edges, new-build isn't yet polished, but having CI would be great!

@phadej
Copy link
Collaborator Author

phadej commented Jun 29, 2016

Note Univ is different implementation of Omega in https://hackage.haskell.org/package/control-monad-omega-0.3.1/docs/Control-Monad-Omega.html

By making similar Applicative instance, we can have similar definitions for Universe and Finite of tuples for example.

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.

1 participant