-
Notifications
You must be signed in to change notification settings - Fork 701
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
There are fixed size of known VCS, implement Representable container. #6432
Comments
@phadej how would you like this Either String like wrapper to look? |
Currently we have data RepoType = Darcs | Git | SVN | CVS
| Mercurial | GnuArch | Bazaar | Monotone
| OtherRepoType String After we could have data KnownRepoType = Darcs | Git | SVN | CVS
| Mercurial | GnuArch | Bazaar | Monotone
data RepoType = KnownRepoType KnownRepoType
| OtherRepoType String |
Hey @phadej I made the changes and blindly fixed the compiler errors in code and tests. There is one test that keeps failing and I need some help fixing it:
|
The |
The patch looks fine. I'll comment more when you make a PR. Thanks for picking this issue! |
I.e. container such
lookup :: RepoType -> VCS a -> a
would be total.One would need to split
OtherRepoType String
out ofRepoType
, into separate type.There're handful of
error
s to be removed by this refactor.I think this is newcomer friendly refactoring.
One example of this "issue", is e.g. miss-typing
type
insource-repository-package
:Technically, we don't need to accept unknown
RepoType
s to begin with in thecabal.project
parser. Thus there's small argument from splittingRepoType
intoEnum
part, andEither String
like wrapper.The text was updated successfully, but these errors were encountered: