-
Notifications
You must be signed in to change notification settings - Fork 22
feat: add support for other namespaces (#240) #306
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
base: main
Are you sure you want to change the base?
Conversation
| = Hackage PackageName | ||
| | Repository RepositoryURL RepositoryName PackageName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you want to make Hackage more special than the others. Maybe a Pattern to build a Hackage package with pre-filled values would be useful, but I don't think it should be its own constructor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| newtype PackageName | ||
| = PackageName { unPackageName :: Text } | ||
| deriving stock (Eq, Ord, Show) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should do like Flora and use as many lib:Cabal types as possible, like https://hackage-content.haskell.org/package/Cabal-syntax-3.16.0.0/docs/Distribution-Types-PackageName.html#t:PackageName
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
| hackage = Repository (RepositoryURL "https://hackage.haskell.org") (RepositoryName "hackage") | ||
|
|
||
| newtype RepositoryURL | ||
| = RepositoryURL { unRepositoryURL :: Text } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this shouldn't be a proper URI or URL type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point it's not that important, that being said, if you have any good library to integrate, I'd be grateful
hsec-tools
/cc @tchoutri