Skip to content

Steps toward pursuit 2#1055

Closed
hdgarrood wants to merge 4 commits intopurescript:0.7-devfrom
hdgarrood:pursuit2
Closed

Steps toward pursuit 2#1055
hdgarrood wants to merge 4 commits intopurescript:0.7-devfrom
hdgarrood:pursuit2

Conversation

@hdgarrood
Copy link
Copy Markdown
Contributor

Everything that was in #1041 (which has been squashed into one commit), plus:

Sorry this is so huge. The commits are logically separated this time, at least.

* Include a large chunk of code from psc-pages, allowing easier
  documentation output in multiple formats.
* Rework psc-docs in order to use this new code. This makes psc-docs
  much simpler.
* Partially fix #747, by putting instances in one chunk under their
  relevant data types and type classes.
* Language.PureScript.Docs.RenderedCode now uses pattern-arrows in
  order to avoid unnecessary parentheses appearing in rendered code.
* Remove unused code from psc-docs/Main.hs
Fixes #747

In addition to its previous behaviour of filtering out declarations
which are not exported, `exportedDeclarations` will also:

* Filter out instance declarations which refer to non-exported types,
  as these can be considered as unexported.
* Descend into data declarations, and filter out unexported constructors

The effect of this is that tooling like psci and psc-docs can now simply
call `exportedDeclarations` and not have to worry about anything.
@paf31
Copy link
Copy Markdown
Contributor

paf31 commented Apr 17, 2015

Cool. I'll review today. Don't worry about the upload step. I think that's probably best left to a tool like gulp-purescript or pulp anyway.

@hdgarrood
Copy link
Copy Markdown
Contributor Author

Thanks :)

@hdgarrood
Copy link
Copy Markdown
Contributor Author

Thinking about this a bit more, I'm happy with what I did here in the first two commits, but not so much the third one. In particular I don't think the "depsModules" key is necessary, because that information (i.e. which package a particular module is in) is already contained in the "bookmarks". I'll think about this a bit more and try to come up with a better way of representing it.

* remove unneeded depsModules from UploadedPackage
* little refactoring
* add toJSON/fromJSON tests for UploadedPackage
@hdgarrood
Copy link
Copy Markdown
Contributor Author

Just had a thought: this program should probably fail if you have code in your bower_components which you rely on and which is not declared as a dependency in your bower.json. It doesn't currently do that but I don't think it would be too hard to implement it.

@paf31 paf31 closed this Apr 18, 2015
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.

2 participants