** outline README

This commit is contained in:
ben 2015-12-06 17:04:15 -05:00
commit 8654bfbb45
3 changed files with 70 additions and 0 deletions

7
.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
compiled
coverage
*\.swp
*~
\.\#*

11
LICENSE.txt Normal file
View File

@ -0,0 +1,11 @@
glob
Copyright (c) 2015 Ben Greenman
This package is distributed under the GNU Lesser General Public
License (LGPL). This means that you can link foo into proprietary
applications, provided you follow the rules stated in the LGPL. You
can also modify this package; if you distribute a modified version,
you must distribute it under the terms of the LGPL, which in
particular means that you must release the source code for the
modified software. See http://www.gnu.org/copyleft/lesser.html
for more information.

52
README.md Normal file
View File

@ -0,0 +1,52 @@
dependent
===
Typed Racket does not have dependent types, but [macros](http://www.greghendershott.com/fear-of-macros/) are a pretty close substitute.
This library implements a few standard library functions as macros to provide strong compile-time guarantees.
For example, `printf!` is a type-safe printer:
```
(require dependent/format)
(printf! "hello, ~a\n") ;; Arity mismatch: expected 1 argument, got nothing.
```
Install
---
From Github:
```
> git clone https://github.com/bennn/dependent
> raco pkg install ./dependent
```
From the Racket [package server](http://pkgs.racket-lang.org/):
```
> raco pkg install dependent
```
Use `(require dependent)` to import all bindings from this library.
Each file can be required individually, as in `(require dependent/format)`.
API
---
Note: these are __macros__, not functions.
Don't use them in higher-order positions.
Everything macro here is a front-end for a standard library function.
Check the [Racket docs](http://docs.racket-lang.org/) for basic type signatures & behavior.
This library's [Scribble docs](TODO) give full details on the static checks.
#### `dependent/format`
- `format`
- `printf`
#### `dependent/regexp`
- `regexp-match?`
- `regexp-match`