pursuit
pursuit copied to clipboard
Source code with links (copy Hackage)
For example: http://hackage.haskell.org/package/base-4.8.1.0/docs/src/Data.List.html
But please not like Hackage were I get redirect to another page. => https://github.com/purescript/pursuit/issues/363#issuecomment-357523186
Sounds good. I think having just the function definition in the source displayable inline as well as a separate page with the whole file would be ideal; sometimes a little more context is needed to make sense of a function definition.
Curious why you want to host source code. I've never understood why hackage does that. I like GitHub UI for browsing source code. It only works for GitHub hosted source, but we could find an alternative to hosting it ourselves that still delegates hosting to the package author, I would guess. A package author has to have publicly accessible code, so it might be safe to presume they also have an HTML rendering service along with their Git hosting service.
- Keyword linking - It's really awesome that every variable / type /... is linked in Hackage. This will difficult to achieve on an external service.
- Offline availability - I could host Pursuit offline on my laptop and could still look up all code
- Extra PureScript smarts - GitHub is generic. We know it's only PureScript ... I think there will be a lot of things possible we just haven't thought of yet
That's one part of it: I don't want to presume the existence of a code hosting site. I particularly don't want to have to build in knowledge of the URL structure of every code hosting site which package authors might use in order to have working source links; currently we just have knowledge of GitHub built in but I would prefer to remove that so that people can host code elsewhere. Additionally, I don't want to have source links which can break (if the user deletes their account or renames the repo, or something like that).
I also think we can do a better job of hosting source than GitHub does. For example, we could generate links like @adius mentioned; see e.g. https://hackage.haskell.org/package/containers-0.5.10.2/docs/src/Data.Sequence.Internal.html for an example of what I mean.
Point in case - Bonsai source links are broken: https://pursuit.purescript.org/packages/purescript-bonsai/0.5.0/docs/Bonsai