]> git.wincent.com - docvim.git/log
docvim.git
6 years agoAdd another explicit Control.Applicative input
Greg Hurrell [Fri, 17 Jun 2016 04:17:35 +0000 (21:17 -0700)] 
Add another explicit Control.Applicative input

To fix build bustage like this one:

https://travis-ci.org/wincent/docvim/jobs/138265053

6 years agoFix lint
Greg Hurrell [Fri, 17 Jun 2016 04:04:39 +0000 (21:04 -0700)] 
Fix lint

Only happens in CI here:

    https://travis-ci.org/wincent/docvim/jobs/138121738

Quoting:

    lib/Text/Docvim/Visitor.hs:52:26: Warning: Redundant bracket
    Found:
      (a -> m c) -> (a -> m b)
    Why not:
      (a -> m c) -> a -> m b

    lib/Text/Docvim/Visitor.hs:52:55: Warning: Redundant bracket
    Found:
      (b -> m c) -> (a -> m c)
    Why not:
      (b -> m c) -> a -> m c

6 years agoExplicitly import <$> from Control.Applicative
Greg Hurrell [Fri, 17 Jun 2016 04:02:06 +0000 (21:02 -0700)] 
Explicitly import <$> from Control.Applicative

To hopefully fix this build error:

https://travis-ci.org/wincent/docvim/jobs/138121730

Without introducing any other build failures...

6 years agoTry relaxing lower bound of base dependency to 4.6
Greg Hurrell [Thu, 16 Jun 2016 15:02:42 +0000 (08:02 -0700)] 
Try relaxing lower bound of base dependency to 4.6

To see if it fixes some CI failures, or exposes new ones:

https://travis-ci.org/wincent/docvim/builds/138094055

6 years agoUse sorting to produce stable ASTs
Greg Hurrell [Thu, 16 Jun 2016 15:44:34 +0000 (08:44 -0700)] 
Use sorting to produce stable ASTs

I think we're falling prey to inode iteration order issues, meaning that our AST
is not always the same, depending on which system we run on.

Example failure:

https://travis-ci.org/wincent/docvim/jobs/138109029

Should be fixed by always visiting the files in the same order.

6 years agoFix for HFS+ brain-deadness
Greg Hurrell [Thu, 16 Jun 2016 14:52:43 +0000 (07:52 -0700)] 
Fix for HFS+ brain-deadness

Case-insensitivity strikes again. I suspect this will fix some build failures.
See:

https://github.com/wincent/docvim/issues/24

6 years agoDefer type errors in REPL
Greg Hurrell [Thu, 16 Jun 2016 14:48:46 +0000 (07:48 -0700)] 
Defer type errors in REPL

- https://www.reddit.com/r/haskell/comments/4np0l2/a_ghci_annoyance_wondering_if_anyones_else_also/
- https://downloads.haskell.org/~ghc/7.8.2/docs/html/users_guide/defer-type-errors.html

6 years agoDon't use -Werror in Stack
Greg Hurrell [Thu, 16 Jun 2016 14:41:55 +0000 (07:41 -0700)] 
Don't use -Werror in Stack

I intend this to mostly be a local feedback tool, so I *think* that defaulting
this to off is right call. I fixed the specific build failure cited below anyway
in c9efe9d7b010adbd1, but I think it's ok to turn off `-Werror` in Stack because
other "real" errors will still be errors; these are just warnings.

I've added explicit `-Werror` to all my wrapper scripts except `bin/repl`, which
is not "build-like" and I want to be lenient. (I actually meant to make it more
lenient in the future by deferring type errors with `-fdefer-type-errors`.

See:

- https://github.com/wincent/docvim/issues/24
- https://travis-ci.org/wincent/docvim/jobs/138094062
- https://www.reddit.com/r/haskell/comments/4np0l2/a_ghci_annoyance_wondering_if_anyones_else_also/

6 years agoTweak Control.Lens import for better compatibility
Greg Hurrell [Thu, 16 Jun 2016 14:32:31 +0000 (07:32 -0700)] 
Tweak Control.Lens import for better compatibility

One of the CI runs blowing up:

    /home/travis/build/wincent/docvim/lib/Text/Docvim/Optimize.hs:3:1: Warning:
        Module ‘Control.Lens’ does not export ‘Empty’
    <no location info>:
    Failing due to -Werror.

Source: https://travis-ci.org/wincent/docvim/jobs/138094062

I'm going to turn off `-Werror` in CI and keep it locally, but in the meantime I
think I can get compatibility with a wider range of Lens versions if I switch
the import to not mention `Empty`.

See also: https://github.com/wincent/docvim/issues/24

6 years agoRemove cabal.config
Greg Hurrell [Thu, 16 Jun 2016 14:07:03 +0000 (07:07 -0700)] 
Remove cabal.config

I had added this in 9b8d1674510ab57a530c7aba8bba0c7dbb3b0207 in order to get
reproducible builds, before switching to Stack. But it is causing Travis CI
build failures (eg. https://travis-ci.org/wincent/docvim/jobs/137999458), so
let's remove it: Stack should give me the reproducibility I need.

6 years agoPrepare for 0.3.1.2 release 0.3.1.2
Greg Hurrell [Thu, 16 Jun 2016 07:47:12 +0000 (00:47 -0700)] 
Prepare for 0.3.1.2 release

6 years agoAdd missing fixture files
Greg Hurrell [Thu, 16 Jun 2016 06:42:39 +0000 (23:42 -0700)] 
Add missing fixture files

As noted in this issue, tests are failing because these fixtures are not
included:

  https://github.com/wincent/docvim/issues/25

6 years agoAdd README badges for Travis CI and Stackage
Greg Hurrell [Thu, 16 Jun 2016 06:19:18 +0000 (23:19 -0700)] 
Add README badges for Travis CI and Stackage

6 years agoAdd .travis.yml
Greg Hurrell [Thu, 16 Jun 2016 06:08:51 +0000 (23:08 -0700)] 
Add .travis.yml

From:

  http://docs.haskellstack.org/en/stable/GUIDE/#travis-with-caching

More context:

  https://www.fpcomplete.com/blog/2016/02/updated-haskell-travis-config

Similar sample from pandoc:

  https://github.com/jgm/pandoc/blob/master/.travis.yml

6 years agoProvide instructions for installing via Stack
Greg Hurrell [Thu, 16 Jun 2016 02:31:21 +0000 (19:31 -0700)] 
Provide instructions for installing via Stack

I think this should work now, or soon at least, thanks to:

https://github.com/fpco/stackage/commit/b6eb03bf6b6de1083567eb69a9cfdb67ea6a184b

6 years agoUpdate CHANGELOG 0.3.1.1
Greg Hurrell [Wed, 15 Jun 2016 07:39:51 +0000 (00:39 -0700)] 
Update CHANGELOG

6 years agoReintroduce base upper bound, but make it more lenient
Greg Hurrell [Wed, 15 Jun 2016 07:37:52 +0000 (00:37 -0700)] 
Reintroduce base upper bound, but make it more lenient

Because `cabal check` informs me that Hackage would reject it.

6 years agoPrepare 0.3.1.1 for release
Greg Hurrell [Wed, 15 Jun 2016 07:34:38 +0000 (00:34 -0700)] 
Prepare 0.3.1.1 for release

Having tested compatibility with GHC 8.0.1.

6 years agoRelax base dependency
Greg Hurrell [Wed, 15 Jun 2016 07:24:43 +0000 (00:24 -0700)] 
Relax base dependency

Hopefully this is loose enough. Tested by updating to latest nightly resolver in
the stack.yml file, then:

```
stack build
bin/test
bin/lint
bin/docvim -h
```

For additional context:

https://www.fpcomplete.com/blog/2014/05/lenient-lower-bounds

6 years agoUpdate to latest Stack lts version (5.9 -> 6.3)
Greg Hurrell [Wed, 15 Jun 2016 07:10:37 +0000 (00:10 -0700)] 
Update to latest Stack lts version (5.9 -> 6.3)

Tested with `stack build`. It works.

6 years agoMove footer content down to footer
Greg Hurrell [Mon, 13 Jun 2016 14:26:09 +0000 (07:26 -0700)] 
Move footer content down to footer

6 years agoUpdate Loupe fixtures
Greg Hurrell [Mon, 13 Jun 2016 14:20:15 +0000 (07:20 -0700)] 
Update Loupe fixtures

6 years agoSpecial-case empty output
Greg Hurrell [Mon, 13 Jun 2016 04:58:04 +0000 (21:58 -0700)] 
Special-case empty output

Don't print a blank-line, prefer a zero-byte file.

Closes: https://github.com/wincent/docvim/issues/21
6 years agoAdd loupe files to integration tests
Greg Hurrell [Sun, 12 Jun 2016 22:33:30 +0000 (15:33 -0700)] 
Add loupe files to integration tests

6 years agoAdd vim-clipper to integration tests
Greg Hurrell [Sun, 12 Jun 2016 22:31:02 +0000 (15:31 -0700)] 
Add vim-clipper to integration tests

6 years agoAdd Terminus to the integration tests
Greg Hurrell [Sun, 12 Jun 2016 22:24:12 +0000 (15:24 -0700)] 
Add Terminus to the integration tests

This is a good one as we don't have any doc comments. Should produce empty
files, but produces files with a blank line.

6 years agoAdd Command-T files to integration tests
Greg Hurrell [Sun, 12 Jun 2016 22:19:15 +0000 (15:19 -0700)] 
Add Command-T files to integration tests

And yay, we've exposed a bug. Note that Command-T isn't
at all docvim-ready yet (no doc comments) but we still
shouldn't blow up trying to process it.

6 years agoTeach bin/get to grab from HEAD, not master
Greg Hurrell [Sun, 12 Jun 2016 22:15:31 +0000 (15:15 -0700)] 
Teach bin/get to grab from HEAD, not master

Seeing as Command-T is usually pointing at next, for example, and I don't want
to add the complexity of special-casing this at this point.

6 years agoAdd Pinnacle to integration tests
Greg Hurrell [Sun, 12 Jun 2016 22:06:31 +0000 (15:06 -0700)] 
Add Pinnacle to integration tests

6 years agoFix gitignore
Greg Hurrell [Sun, 12 Jun 2016 22:00:17 +0000 (15:00 -0700)] 
Fix gitignore

To actually ignore the files I (don't) care about.

6 years agoAttempt workaround for cyclic update issue
Greg Hurrell [Sun, 12 Jun 2016 21:59:11 +0000 (14:59 -0700)] 
Attempt workaround for cyclic update issue

On the one hand, I like the simplicity of keeping all
the files in the input dirs (and also the fact that it
exercises the logic that targets only .vim files), but
I don't want to deal with cyclic updates, so let's just
pretend these files don't exist.

6 years agoAdd vim-docvim to integration tests
Greg Hurrell [Sun, 12 Jun 2016 21:48:26 +0000 (14:48 -0700)] 
Add vim-docvim to integration tests

6 years agoUpdate integration test files
Greg Hurrell [Sun, 12 Jun 2016 21:47:14 +0000 (14:47 -0700)] 
Update integration test files

Evidently, we have a circular dependency here. You update the
input files, get new output, copy the output over to the
other repo, commit it there, and now your input files have
changed. Not too worried about this, but it would be nice to
find a neat way to avoid the issue.

6 years agoGet changelog ready for master development
Greg Hurrell [Sun, 12 Jun 2016 07:56:30 +0000 (00:56 -0700)] 
Get changelog ready for master development

6 years agoAdd missing changelog updates
Greg Hurrell [Sun, 12 Jun 2016 07:55:51 +0000 (00:55 -0700)] 
Add missing changelog updates

6 years agoPrepare for 0.3.1.0 release 0.3.1.0
Greg Hurrell [Sun, 12 Jun 2016 07:52:31 +0000 (00:52 -0700)] 
Prepare for 0.3.1.0 release

6 years agoSquelch warning
Greg Hurrell [Sun, 12 Jun 2016 07:48:30 +0000 (00:48 -0700)] 
Squelch warning

> Exposed modules use unallocated top-level names: Paths_docvim

Closes: https://github.com/wincent/docvim/issues/13
6 years agoGet back -Werror, at least when running via Stack
Greg Hurrell [Sun, 12 Jun 2016 07:29:52 +0000 (00:29 -0700)] 
Get back -Werror, at least when running via Stack

This seems the easiest way to get the behavior I desire, seeing as I only ever
run stuff via Stack, but this won't block package uploads to Hackage.

6 years agoStart new changelog section
Greg Hurrell [Sun, 12 Jun 2016 07:22:30 +0000 (00:22 -0700)] 
Start new changelog section

6 years agoDon't use Werror 0.3.0.0
Greg Hurrell [Sun, 12 Jun 2016 07:18:25 +0000 (00:18 -0700)] 
Don't use Werror

Otherwise, I can't upload a package:

> Invalid package
>
> 'ghc-options: -Wall -Werror' makes the package very easy to break with future
> GHC versions because new GHC versions often add new warnings. Use just
> 'ghc-options: -Wall' instead. Alternatively, if you want to use this, make it
> conditional based on a Cabal configuration flag (with 'manual: True' and
> 'default: False') and enable that flag during development.

6 years agoUpdate CHANGELOG prior to 0.3.0.0 release
Greg Hurrell [Sun, 12 Jun 2016 06:59:25 +0000 (23:59 -0700)] 
Update CHANGELOG prior to 0.3.0.0 release

6 years agoAdd bin/get and bin/put for updating integration tests and downstreams
Greg Hurrell [Sun, 12 Jun 2016 06:50:47 +0000 (23:50 -0700)] 
Add bin/get and bin/put for updating integration tests and downstreams

6 years agoRemove useless script
Greg Hurrell [Sun, 12 Jun 2016 06:07:17 +0000 (23:07 -0700)] 
Remove useless script

Those tests don't exist any more, so no need to update them.

6 years agoFix explicit links to GitHub headings
Greg Hurrell [Sun, 12 Jun 2016 06:03:22 +0000 (23:03 -0700)] 
Fix explicit links to GitHub headings

Not sure whether I want to apply this to h3 or just h1/h2, but for now doing it
to all headings.

Closes: https://github.com/wincent/docvim/issues/3
6 years agoGet rid of ugly ast, ast2, ast3 etc bindings
Greg Hurrell [Sun, 12 Jun 2016 05:01:40 +0000 (22:01 -0700)] 
Get rid of ugly ast, ast2, ast3 etc bindings

The replacement is pretty ugly too, so will look at refactoring further.

Closes: https://github.com/wincent/docvim/issues/11
6 years agoFix indent
Greg Hurrell [Sat, 11 Jun 2016 07:10:01 +0000 (00:10 -0700)] 
Fix indent

6 years agoRemove redundant integration tests
Greg Hurrell [Sat, 11 Jun 2016 07:01:35 +0000 (00:01 -0700)] 
Remove redundant integration tests

This and more now covered by tests/fixtures/integration.

Closes: https://github.com/wincent/docvim/issues/10
6 years agoAdd parser tests to integration tests
Greg Hurrell [Sat, 11 Jun 2016 06:59:47 +0000 (23:59 -0700)] 
Add parser tests to integration tests

6 years agoUpdate changelog
Greg Hurrell [Sat, 11 Jun 2016 06:57:35 +0000 (23:57 -0700)] 
Update changelog

Want to get into the habit of doing this early and often.

6 years agoFilter out Empty nodes
Greg Hurrell [Sat, 11 Jun 2016 06:51:21 +0000 (23:51 -0700)] 
Filter out Empty nodes

I wanted (want) to do this in a more generic way, but I first figured I would do
this "manually" using pattern matching and explicit constructors. Will keep
looking thought to see if there is something in `Control.Lens` or `Data.Data`
that would help me do this.

Closes: https://github.com/wincent/docvim/issues/9
6 years agoAdd file meant to be included in previous commit
Greg Hurrell [Sat, 11 Jun 2016 06:28:47 +0000 (23:28 -0700)] 
Add file meant to be included in previous commit

6 years agoPartial implementation of pruning empty paths
Greg Hurrell [Sat, 11 Jun 2016 06:03:56 +0000 (23:03 -0700)] 
Partial implementation of pruning empty paths

Partly addresses: https://github.com/wincent/docvim/issues/9

6 years agoFix jumbled sections
Greg Hurrell [Sat, 11 Jun 2016 05:22:11 +0000 (22:22 -0700)] 
Fix jumbled sections

Injected headings were not getting correctly extracted because they didn't
appear inside `DocBlock`s.

Closes: https://github.com/wincent/docvim/issues/8
6 years agoFix style by camel-casing
Greg Hurrell [Sat, 11 Jun 2016 05:09:48 +0000 (22:09 -0700)] 
Fix style by camel-casing

6 years agoFix case for Vim help plugin header
Greg Hurrell [Sat, 11 Jun 2016 02:29:24 +0000 (19:29 -0700)] 
Fix case for Vim help plugin header

Always lower. And no need to be in the symbol table because the Vim printer
doesn't even consult it.

6 years agoCenter plugin header
Greg Hurrell [Sat, 11 Jun 2016 02:18:56 +0000 (19:18 -0700)] 
Center plugin header

Or "justify", if you prefer.

6 years agoDRY
Greg Hurrell [Sat, 11 Jun 2016 01:37:45 +0000 (18:37 -0700)] 
DRY

6 years agoDRY up the integration tests
Greg Hurrell [Fri, 10 Jun 2016 16:30:36 +0000 (09:30 -0700)] 
DRY up the integration tests

6 years agoAdd Vim help integration tests
Greg Hurrell [Fri, 10 Jun 2016 16:27:06 +0000 (09:27 -0700)] 
Add Vim help integration tests

With the magic of copy-pasta. Will refactor away the duplication presently.

6 years agoIndentation
Greg Hurrell [Fri, 10 Jun 2016 16:20:11 +0000 (09:20 -0700)] 
Indentation

6 years agoAdd (Markdown) integration tests
Greg Hurrell [Fri, 10 Jun 2016 16:12:54 +0000 (09:12 -0700)] 
Add (Markdown) integration tests

Plaintext to follow. Just need to figure out a way to do it cleanly.

6 years agoAdd integration test files
Greg Hurrell [Fri, 10 Jun 2016 15:29:05 +0000 (08:29 -0700)] 
Add integration test files

Copied into place with:

git --git-dir ~/code/ferret/.git archive --prefix=ferret/input/ master | tar -x -C tests/fixtures/integration -f -
git --git-dir ~/code/scalpel/.git archive --prefix=scalpel/input/ master | tar -x -C tests/fixtures/integration -f -

Will add more of these, I guess, as I start using docvim in more places.

6 years agoMore misguided refactoring
Greg Hurrell [Fri, 10 Jun 2016 14:46:13 +0000 (07:46 -0700)] 
More misguided refactoring

6 years agoStart refactoring golden tests to support end-to-end testing
Greg Hurrell [Fri, 10 Jun 2016 14:26:21 +0000 (07:26 -0700)] 
Start refactoring golden tests to support end-to-end testing

6 years agoShow compiled AST when debug flag is set
Greg Hurrell [Fri, 10 Jun 2016 07:15:18 +0000 (00:15 -0700)] 
Show compiled AST when debug flag is set

6 years agoRemove a stale comment
Greg Hurrell [Fri, 10 Jun 2016 06:43:12 +0000 (23:43 -0700)] 
Remove a stale comment

6 years agoFix remaining lint about duplication
Greg Hurrell [Fri, 10 Jun 2016 06:42:22 +0000 (23:42 -0700)] 
Fix remaining lint about duplication

First lint-free status in months. Yay.

6 years agoMake linter happier about duplication
Greg Hurrell [Fri, 10 Jun 2016 06:40:03 +0000 (23:40 -0700)] 
Make linter happier about duplication

Still not entirely happy.

6 years agoAdd bin/clean script
Greg Hurrell [Fri, 10 Jun 2016 06:06:33 +0000 (23:06 -0700)] 
Add bin/clean script

6 years agoAdd bin/build script and use it
Greg Hurrell [Fri, 10 Jun 2016 06:06:20 +0000 (23:06 -0700)] 
Add bin/build script and use it

6 years agoFix remaining warnings
Greg Hurrell [Fri, 10 Jun 2016 05:56:21 +0000 (22:56 -0700)] 
Fix remaining warnings

Which means we can turn -Werror back on.

Made sure to get a full rebuild with:

```
rm -rf .stack-work/dist/*
bin/build # really just `stack build --file-watch`
bin/lint
bin/test
```

6 years agoFurther improve type annotations
Greg Hurrell [Fri, 10 Jun 2016 05:40:23 +0000 (22:40 -0700)] 
Further improve type annotations

6 years agoImprove Parse.hs type signatures
Greg Hurrell [Fri, 10 Jun 2016 05:24:50 +0000 (22:24 -0700)] 
Improve Parse.hs type signatures

With the help of:

http://stackoverflow.com/questions/37739029/understanding-parsec-type-annotations

Now warning-free.

6 years agoFix a bunch of warnings from -W -Wall
Greg Hurrell [Fri, 10 Jun 2016 04:30:16 +0000 (21:30 -0700)] 
Fix a bunch of warnings from -W -Wall

In many ways, this makes the code uglier, but have to get worse in order to get
better, I think. Will keep ploughing on.

6 years agoBack out -Werror
Greg Hurrell [Fri, 10 Jun 2016 01:11:48 +0000 (18:11 -0700)] 
Back out -Werror

Not ready for it yet after all, still plenty to do.

6 years agoRemove some over-zealous indentation
Greg Hurrell [Fri, 10 Jun 2016 01:02:18 +0000 (18:02 -0700)] 
Remove some over-zealous indentation

6 years agoTurn on -Wall -Werror -W
Greg Hurrell [Fri, 10 Jun 2016 01:02:18 +0000 (18:02 -0700)] 
Turn on -Wall -Werror -W

I think we're clean even with all these turned on. Great. Want this now that we
are not being explicit about imports.

Some tweaks needed to keep the tests clean. Notably, to deal with:

    Defaulting the following constraint(s) to type ‘Integer’
      (Eq a0) arising from a use of ‘@=?’ at tests/Tasty.hs:35:7-9
      (Num a0) arising from the literal ‘7’ at tests/Tasty.hs:35:5
      (Show a0) arising from a use of ‘@=?’ at tests/Tasty.hs:35:7-9
      (Num a0) arising from a use of ‘walk’ at tests/Tasty.hs:48:30-33

Need to opt out of `-fwarn-type-defaults` in Tasty.hs.

6 years agoCut back on explicit imports as per the GHC style guide
Greg Hurrell [Fri, 10 Jun 2016 01:00:39 +0000 (18:00 -0700)] 
Cut back on explicit imports as per the GHC style guide

Quoting:

> Do not use explicit import lists, except to resolve name clashes. There are several reasons for this:
>
> - They slow down development: almost every change is accompanied by an import
>   list change.
> - They cause spurious conflicts between developers.
> - They lead to useless warnings about unused imports, and time wasted trying
>   to keep the import declarations "minimal".
> - GHC's warnings are useful for detecting unnecessary imports: see
>   `-fwarn-unused-imports`.
> - TAGS is a good way to find out where an identifier is defined (use `make tags`
>   in `ghc/compiler`, and hit `M-.` in emacs).

https://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle

Fair enough then!

6 years agoSilence build complaints about tasty other-modules being messing
Greg Hurrell [Fri, 10 Jun 2016 01:00:39 +0000 (18:00 -0700)] 
Silence build complaints about tasty other-modules being messing

Specifically:

```
Warning: modules not listed in docvim.cabal for 'tasty' component (add to
other-modules):
```

6 years agoMove under Text.* namespace
Greg Hurrell [Thu, 9 Jun 2016 15:36:56 +0000 (08:36 -0700)] 
Move under Text.* namespace

Closes: https://github.com/wincent/docvim/issues/7
6 years agodoc: add CHANGELOG.md
Greg Hurrell [Thu, 9 Jun 2016 15:23:40 +0000 (08:23 -0700)] 
doc: add CHANGELOG.md

6 years agodoc: update README
Greg Hurrell [Thu, 9 Jun 2016 15:23:26 +0000 (08:23 -0700)] 
doc: update README

- Note new annotations.
- Add notes on release process.
- Add links section.
- Add installation section.

6 years agoPrepare for 0.0.0.2 release 0.2.0.0
Greg Hurrell [Thu, 9 Jun 2016 15:06:16 +0000 (08:06 -0700)] 
Prepare for 0.0.0.2 release

Previous release doesn't seem to be available for download, possibly due to a
mismatch in the version numbers/tags.

6 years agoFix ordering within links in TOC 0.1.0.0
Greg Hurrell [Thu, 9 Jun 2016 14:25:25 +0000 (07:25 -0700)] 
Fix ordering within links in TOC

6 years agoDon't hardwrap inside fenced codeblocks
Greg Hurrell [Thu, 9 Jun 2016 14:22:21 +0000 (07:22 -0700)] 
Don't hardwrap inside fenced codeblocks

6 years agoAdd source-repository info to docvim.cabal
Greg Hurrell [Thu, 9 Jun 2016 14:17:27 +0000 (07:17 -0700)] 
Add source-repository info to docvim.cabal

As recommended by `cabal check`.

6 years agoTry to make `toc` more readable
Greg Hurrell [Thu, 9 Jun 2016 14:11:59 +0000 (07:11 -0700)] 
Try to make `toc` more readable

Instead of threading the `suffix` through multiple layers of function calls,
create a new scope with an inner function `toc'` that we can use to have
implicit access to it instead.

I think this might be more readable, although it is still somewhat of a hot
mess.

6 years agoPrint TOC in Vim output
Greg Hurrell [Thu, 9 Jun 2016 07:52:03 +0000 (00:52 -0700)] 
Print TOC in Vim output

6 years agoMake sure generated headings appear in TOC node
Greg Hurrell [Thu, 9 Jun 2016 05:03:43 +0000 (22:03 -0700)] 
Make sure generated headings appear in TOC node

6 years agoMostly-working TOC generation for AST
Greg Hurrell [Thu, 9 Jun 2016 02:52:52 +0000 (19:52 -0700)] 
Mostly-working TOC generation for AST

Not used in printers yet, and also note that because the printers may generate
headings of their own, we are missing generated headings.

6 years agoRemove unused type declaration
Greg Hurrell [Wed, 8 Jun 2016 17:49:54 +0000 (10:49 -0700)] 
Remove unused type declaration

6 years agoUse function application operator as reducer
Greg Hurrell [Wed, 8 Jun 2016 14:22:21 +0000 (07:22 -0700)] 
Use function application operator as reducer

I like this.

6 years agoImprove ordering in the compiler
Greg Hurrell [Wed, 8 Jun 2016 14:10:51 +0000 (07:10 -0700)] 
Improve ordering in the compiler

Make the footer go at the end. Not that the order matters, this just looks
better. (And speaking of the ordering not matter, that makes me wonder if there
is something Applicative I could to here... Probably not. Also thinking of using
a State monad or even just a simple fold to get rid of those intermediate
bindings.)

6 years agoFix options parsing when no default value is provided
Greg Hurrell [Wed, 8 Jun 2016 07:40:28 +0000 (00:40 -0700)] 
Fix options parsing when no default value is provided

6 years agoPrefer named imports
Greg Hurrell [Wed, 8 Jun 2016 06:27:26 +0000 (23:27 -0700)] 
Prefer named imports

6 years agoInject other kinds of headings
Greg Hurrell [Wed, 8 Jun 2016 06:25:06 +0000 (23:25 -0700)] 
Inject other kinds of headings

Mostly seems to work? Other than some suspicious empty
headings in some golden files.

6 years agoDRY up injection
Greg Hurrell [Wed, 8 Jun 2016 06:15:31 +0000 (23:15 -0700)] 
DRY up injection

6 years agoAuto-inject @commands annotation when necessary
Greg Hurrell [Wed, 8 Jun 2016 06:11:33 +0000 (23:11 -0700)] 
Auto-inject @commands annotation when necessary

6 years agoFix lints
Greg Hurrell [Wed, 8 Jun 2016 06:10:35 +0000 (23:10 -0700)] 
Fix lints

6 years agoMore elegant solution for state passthrough
Greg Hurrell [Wed, 8 Jun 2016 02:07:23 +0000 (19:07 -0700)] 
More elegant solution for state passthrough