]> git.wincent.com - docvim.git/log
docvim.git
6 years agoSet up test suite for running HLint from cabal
Greg Hurrell [Sun, 20 Mar 2016 05:44:23 +0000 (22:44 -0700)] 
Set up test suite for running HLint from cabal

With:

    cabal test

After one-time set-up:

    cabal configure --enable -tests

6 years agoFix hlint nits
Greg Hurrell [Sun, 20 Mar 2016 05:25:22 +0000 (22:25 -0700)] 
Fix hlint nits

Mostly unnecessary parens, plus one unnecessary `$`.

6 years agoUse parseTest
Greg Hurrell [Sun, 20 Mar 2016 05:00:51 +0000 (22:00 -0700)] 
Use parseTest

6 years agoStart really parsing VimL
Greg Hurrell [Sun, 20 Mar 2016 04:59:27 +0000 (21:59 -0700)] 
Start really parsing VimL

6 years agoAdd support for @function annotation
Greg Hurrell [Sat, 19 Mar 2016 21:32:11 +0000 (14:32 -0700)] 
Add support for @function annotation

6 years agoAdd some more stuff to the parser
Greg Hurrell [Sat, 19 Mar 2016 02:34:01 +0000 (19:34 -0700)] 
Add some more stuff to the parser

6 years agoTidy up parser a little
Greg Hurrell [Sat, 19 Mar 2016 00:43:00 +0000 (17:43 -0700)] 
Tidy up parser a little

6 years agoGrow parser
Greg Hurrell [Sat, 19 Mar 2016 00:19:32 +0000 (17:19 -0700)] 
Grow parser

Applying some things I learned in the lexer to the parser. If I can pull
the parser off without having to split into lexer + parser I will. Seems
the best way to avoid jumping through hoops to get better error
messages:

http://stackoverflow.com/questions/15216202

6 years agoSimplify content-free token constructors
Greg Hurrell [Fri, 18 Mar 2016 16:02:40 +0000 (09:02 -0700)] 
Simplify content-free token constructors

These have fixed content in them, so we don't need to record it.

6 years agoUnify an import statement
Greg Hurrell [Fri, 18 Mar 2016 16:02:40 +0000 (09:02 -0700)] 
Unify an import statement

6 years agoTeach lexer to recognize a few more token types
Greg Hurrell [Fri, 18 Mar 2016 16:02:40 +0000 (09:02 -0700)] 
Teach lexer to recognize a few more token types

6 years agoAdd some cheatsheet info to the README
Greg Hurrell [Fri, 18 Mar 2016 16:02:40 +0000 (09:02 -0700)] 
Add some cheatsheet info to the README

6 years agoAdd separate lexer
Greg Hurrell [Fri, 18 Mar 2016 16:01:23 +0000 (09:01 -0700)] 
Add separate lexer

I think this will likely end up being simpler in the long run, so
trying it out for now.

6 years agoDon's export parseUnit
Greg Hurrell [Fri, 18 Mar 2016 15:28:30 +0000 (08:28 -0700)] 
Don's export parseUnit

Now that we export `p`, we don't need it.

6 years agoFacilitate testing in the REPL with `p`
Greg Hurrell [Fri, 18 Mar 2016 14:31:34 +0000 (07:31 -0700)] 
Facilitate testing in the REPL with `p`

6 years agoUse simpler char rather than string parser
Greg Hurrell [Fri, 18 Mar 2016 14:23:24 +0000 (07:23 -0700)] 
Use simpler char rather than string parser

6 years agoStep towards actually parsing comments
Greg Hurrell [Fri, 18 Mar 2016 14:21:41 +0000 (07:21 -0700)] 
Step towards actually parsing comments

6 years agoMake filter lambda point-free
Greg Hurrell [Fri, 18 Mar 2016 06:31:49 +0000 (23:31 -0700)] 
Make filter lambda point-free

6 years agoSlightly neaten conditional logging
Greg Hurrell [Fri, 18 Mar 2016 06:02:37 +0000 (23:02 -0700)] 
Slightly neaten conditional logging

6 years agoLog filenames when -v is passed
Greg Hurrell [Fri, 18 Mar 2016 05:59:44 +0000 (22:59 -0700)] 
Log filenames when -v is passed

There are surely neater ways to do this (a monad for logging as we go),
but this is it for now.

6 years agoSplit out Parse module
Greg Hurrell [Fri, 18 Mar 2016 05:46:49 +0000 (22:46 -0700)] 
Split out Parse module

6 years agoPrep to move parsing into separate module
Greg Hurrell [Fri, 18 Mar 2016 05:41:31 +0000 (22:41 -0700)] 
Prep to move parsing into separate module

6 years agoParse to EOF
Greg Hurrell [Fri, 18 Mar 2016 05:30:23 +0000 (22:30 -0700)] 
Parse to EOF

6 years agoStart build out more AST types
Greg Hurrell [Fri, 18 Mar 2016 05:11:09 +0000 (22:11 -0700)] 
Start build out more AST types

6 years agoPass contents of file through parsec
Greg Hurrell [Fri, 18 Mar 2016 03:48:45 +0000 (20:48 -0700)] 
Pass contents of file through parsec

6 years agoRemove Paths_docvim.hs hack
Greg Hurrell [Thu, 17 Mar 2016 21:43:26 +0000 (14:43 -0700)] 
Remove Paths_docvim.hs hack

Not needed. Can just use `cabal repl` instead of `ghci`.

6 years agoSwitch doc comment ordering
Greg Hurrell [Thu, 17 Mar 2016 20:55:21 +0000 (13:55 -0700)] 
Switch doc comment ordering

I prefer to keep the type right next to the function.

6 years agoActually read from file system
Greg Hurrell [Thu, 17 Mar 2016 20:54:22 +0000 (13:54 -0700)] 
Actually read from file system

As noted, some potential danger here, but we'll worry
about it later:

https://mail.haskell.org/pipermail/beginners/2010-October/005569.html

6 years agoActually respect -c command-line option
Greg Hurrell [Thu, 17 Mar 2016 20:38:46 +0000 (13:38 -0700)] 
Actually respect -c command-line option

6 years agoFilter out non-Vim source files
Greg Hurrell [Thu, 17 Mar 2016 20:35:02 +0000 (13:35 -0700)] 
Filter out non-Vim source files

6 years agoImprove variable name
Greg Hurrell [Thu, 17 Mar 2016 20:25:26 +0000 (13:25 -0700)] 
Improve variable name

6 years agoStub out reading in current directory
Greg Hurrell [Thu, 17 Mar 2016 20:24:56 +0000 (13:24 -0700)] 
Stub out reading in current directory

6 years agoSplit options parsing into a separate file
Greg Hurrell [Wed, 16 Mar 2016 16:07:44 +0000 (09:07 -0700)] 
Split options parsing into a separate file

6 years agoAdd hack so that we can :load src/Main.hs in ghci
Greg Hurrell [Wed, 16 Mar 2016 14:48:26 +0000 (07:48 -0700)] 
Add hack so that we can :load src/Main.hs in ghci

Without this, we fail to find the Paths_docvim module.

6 years agoAdd missing type annotations
Greg Hurrell [Wed, 16 Mar 2016 14:48:20 +0000 (07:48 -0700)] 
Add missing type annotations

6 years agoShow default value for -c option
Greg Hurrell [Wed, 16 Mar 2016 14:32:36 +0000 (07:32 -0700)] 
Show default value for -c option

6 years agoParse --verbose and OUTFILE arguments
Greg Hurrell [Wed, 16 Mar 2016 14:32:14 +0000 (07:32 -0700)] 
Parse --verbose and OUTFILE arguments

6 years agoFormat
Greg Hurrell [Wed, 16 Mar 2016 14:31:26 +0000 (07:31 -0700)] 
Format

6 years agoCorrect typo in help output
Greg Hurrell [Wed, 16 Mar 2016 14:08:44 +0000 (07:08 -0700)] 
Correct typo in help output

6 years agoAdd --version flag
Greg Hurrell [Wed, 16 Mar 2016 14:05:01 +0000 (07:05 -0700)] 
Add --version flag

Google search for how to use `infoOption` led to this:

https://github.com/fujimura/git-freq/blob/12d38a1f9109d307e420acc7facc85e425bb6349/src/Main.hs

Cargo-culted it from there.

6 years agoDefault to running in the current directory
Greg Hurrell [Wed, 16 Mar 2016 07:14:12 +0000 (00:14 -0700)] 
Default to running in the current directory

6 years agoSplit out option parsing functions
Greg Hurrell [Wed, 16 Mar 2016 06:57:14 +0000 (23:57 -0700)] 
Split out option parsing functions

This might make things a little more readable.

6 years agoRename "{C,c}onfig" to "{O,o}ptions"
Greg Hurrell [Wed, 16 Mar 2016 05:54:05 +0000 (22:54 -0700)] 
Rename "{C,c}onfig" to "{O,o}ptions"

6 years agoRename "intro" to "run"
Greg Hurrell [Wed, 16 Mar 2016 05:52:32 +0000 (22:52 -0700)] 
Rename "intro" to "run"

6 years agoAdd starting point for options parsing
Greg Hurrell [Tue, 15 Mar 2016 15:36:09 +0000 (08:36 -0700)] 
Add starting point for options parsing

Based on sample in docs at:

https://hackage.haskell.org/package/optparse-applicative#readme

I will go through and add more options in a later pass. This article has
a nice overview of how things should be structured:

https://robots.thoughtbot.com/applicative-options-parsing-in-haskell

6 years agoAdd type annotation to main
Greg Hurrell [Tue, 15 Mar 2016 14:53:35 +0000 (07:53 -0700)] 
Add type annotation to main

As this is a learning exercise, let's be explicit about types.

6 years agoIgnore built files in "dist/"
Greg Hurrell [Tue, 15 Mar 2016 14:52:14 +0000 (07:52 -0700)] 
Ignore built files in "dist/"

I suppose this is the right thing to do.

6 years agoStart Haddock-generated documentation
Greg Hurrell [Tue, 15 Mar 2016 14:49:59 +0000 (07:49 -0700)] 
Start Haddock-generated documentation

Produce it via `cabal haddock --executables`.

Required me to add an explicit `module ... where` declaration before it
would parse the file.

6 years agoAdd executable
Greg Hurrell [Tue, 15 Mar 2016 14:40:30 +0000 (07:40 -0700)] 
Add executable

This is our "Hello, world!". Runs with `cabal run`.

6 years agoRun cabal init
Greg Hurrell [Tue, 15 Mar 2016 14:34:40 +0000 (07:34 -0700)] 
Run cabal init

This is the result of running `cabal init` as per:

http://jabberwocky.eu/2013/10/24/how-to-start-a-new-haskell-project/

and cleaning up:

- Fix whitespace errors in docvim.cabal.
- Add "description" field.
- Update LICENSE reference to LICENSE.md, as I already had that.

6 years agoAdd README and LICENSE
Greg Hurrell [Tue, 15 Mar 2016 14:16:22 +0000 (07:16 -0700)] 
Add README and LICENSE

Resetting the master branch and restarting development in Haskell.