Revert "fixes"

This reverts commit c6c375b02a.
pull/1/head
Matthew Butterick 10 years ago
parent c6c375b02a
commit 63e381a6f7

@ -1,6 +1,6 @@
#lang racket/base
(require racket/string racket/list)
(require sugar/string sugar/coercion/values)
(require sugar/string sugar/coerce)
(provide (all-defined-out))

@ -1,3 +1,3 @@
#lang info
(define collection "chirp")
(define scribblings '(("scribblings/chirp.scrbl" ())))
(define collection "css-tools")
(define scribblings '(("scribblings/css-tools.scrbl" ())))

@ -1,7 +1,7 @@
#lang racket/base
(require "core.rkt" racket/match sugar/define/contract sugar/container sugar/coercion/values racket/string racket/list)
(require "core.rkt" racket/match)
(define+provide/contract (css-unit? x)
(define/contract (css-unit? x)
(any/c . -> . boolean?)
(x . in? . '("%" "in" "cm" "mm" "em" "ex" "pt" "pc" "px" "rem")))
@ -10,17 +10,17 @@
[(define write-proc
(λ(x port mode) (display (format "~a~a" (cssq-num x) (cssq-unit x)) port)))])
(define+provide/contract (cssqish? x)
(define/contract (cssqish? x)
(any/c . -> . boolean?)
(->boolean (or (cssq? x) (string? x))))
(define+provide/contract (string->unit x)
(define/contract (string->unit x)
(string? . -> . css-unit?)
(if (css-unit? x)
x
(error 'string->unit "'~a' not a valid css unit" x)))
(define+provide/contract (cssqish->cssq x)
(define/contract (cssqish->cssq x)
(cssqish? . -> . cssq?)
(cond
[(cssq? x) x]
@ -34,7 +34,7 @@
(list (string->number (first pieces))
(string->unit (second pieces))))))]))
(define+provide/contract (css-math-op op left right)
(define/contract (css-math-op op left right)
(procedure? cssqish? cssqish? . -> . cssq?)
(let ([left (cssqish->cssq left)]
[right (cssqish->cssq right)])

@ -3,34 +3,34 @@
@(require scribble/eval (for-label racket "../main.rkt"))
@(define my-eval (make-base-eval))
@(my-eval `(require chirp))
@(my-eval `(require css-tools))
@title{chirp}
@title{css-tools}
@author[(author+email "Matthew Butterick" "mb@mbtype.com")]
Chirp = CSS & HTML Racket preprocessor.
A collection of little functions that help make Racket code more readable.
@section{Installation & updates}
At the command line:
@verbatim{raco pkg install chirp}
@verbatim{raco pkg install css-tools}
After that, you can update the package from the command line:
@verbatim{raco pkg update chirp}
@verbatim{raco pkg update css-tools}
@section{Interface}
@defmodule[chirp]
@defmodule[css-tools]
Hello chirp.
Hello css-tools.
@section{License & source code}
This module is licensed under the LGPL.
Source repository at @link["http://github.com/mbutterick/chirp"]{http://github.com/mbutterick/chirp}. Suggestions & corrections welcome.
Source repository at @link["http://github.com/mbutterick/css-tools"]{http://github.com/mbutterick/css-tools}. Suggestions & corrections welcome.
Loading…
Cancel
Save