Closed
Description
I.e. container such lookup :: RepoType -> VCS a -> a
would be total.
One would need to split OtherRepoType String
out of RepoType
, 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
in source-repository-package
:
% cabal build
cabal: (SourceRepo {repoKind = RepoThis, repoType = Just (OtherRepoType
"gitt"), repoLocation = Just "https://github.com/phadej/tree-diff.git",
repoModule = Nothing, repoBranch = Nothing, repoTag = Just "123", repoSubdir =
Nothing},SourceRepoRepoTypeUnsupported (OtherRepoType "gitt"))
Technically, we don't need to accept unknown RepoType
s to begin with in the cabal.project
parser. Thus there's small argument from splitting RepoType
into Enum
part, and Either String
like wrapper.