Added cabal and vim dir

This commit is contained in:
hellerve
2015-04-05 17:47:08 +02:00
parent 1e73d5652c
commit ae5a30a4a4
2440 changed files with 40465 additions and 0 deletions

View File

@@ -0,0 +1,261 @@
;; TODO: this is incomplete at the moment
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; r7rs-small base library
;;;
(define-library (scheme base)
; TODO: load scheme defs from another file?
; maybe good enough that that other file is part of (scheme)
(export
*
+
-
/
<
<=
=
>
>=
abs
and
append
apply
assoc
assq
assv
begin
boolean?
bytevector
bytevector-append
bytevector-copy
bytevector-copy!
bytevector-length
bytevector-u8-ref
bytevector?
caar
cadr
call-with-current-continuation
call-with-values
call/cc
car
case
cdar
cddr
cdr
ceiling
char->integer
char-ready?
char<=?
char<?
char=?
char>=?
char>?
char?
close-input-port
close-output-port
complex?
cond
cons
current-input-port
current-output-port
denominator
do
dynamic-wind
eof-object?
eq?
equal?
eqv?
error
even?
inexact->exact ; Added for convenience, not standard anymore
exact->inexact ; Added for convenience, not standard anymore
(rename inexact->exact exact)
(rename exact->inexact inexact)
expt
floor
for-each
gcd
; JAE TODO: should import be included???
;import
include
;include-ci
input-port?
integer->char
integer?
lcm
length
let
let*
letrec
list
list->string
list->vector
list-ref
list-tail
list?
make-bytevector
make-string
make-vector
map
max
member
memq
memv
min
modulo
negative?
newline
not
null?
number->string
number?
numerator
odd?
or
output-port?
pair?
peek-char
positive?
procedure?
quasiquote
quotient
rational?
rationalize
read-char
real?
remainder
reverse
round
string
string->list
string->number
string->symbol
string->utf8
string-append
string-copy
string-length
string-ref
string<=?
string<?
string=?
string>=?
string>?
string?
substring
symbol->string
symbol?
truncate
utf8->string
values
vector
vector->list
vector-length
vector-ref
vector?
write-char
zero?
;=>
binary-port?
boolean=?
;bytevector-u8-set!
call-with-port
close-port
cond-expand
;current-error-port
;define
define-record-type
record?
;define-syntax
;define-values
;else
eof-object
;error-object-irritants
;error-object-message
;error-object?
exact-integer-sqrt
exact-integer?
exact?
features
;file-error?
;floor-quotient
;floor-remainder
;floor/
flush-output-port
get-output-bytevector
get-output-string
;guard
;if
inexact?
input-port-open?
;lambda
let*-values
;let-syntax
let-values
letrec*
;letrec-syntax
list-copy
;list-set!
make-list
make-parameter
open-input-bytevector
open-input-string
open-output-bytevector
open-output-string
output-port-open?
parameterize
;peek-u8
;port?
;quote
;raise
;raise-continuable
read-bytevector
;read-bytevector!
;read-error?
read-line
read-string
;read-u8
;set!
;set-car!
;set-cdr!
square
string->vector
string-copy!
string-fill!
string-for-each
string-map
;string-set!
;symbol=?
syntax-error
;syntax-rules
textual-port?
;truncate-quotient
;truncate-remainder
;truncate/
;u8-ready?
unless
;unquote
;unquote-splicing
vector->string
vector-append
vector-copy
vector-copy!
vector-fill!
vector-for-each
vector-map
;vector-set!
when
;with-exception-handler
write-bytevector
write-string
;write-u8
%husk-switch-to-parent-environment
)
(include "../srfi/srfi-9.scm")
(import (scheme)))

View File

@@ -0,0 +1,48 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; r7rs-small case-lambda library
;;;
; TODO: this is the macro from the spec, but husk
; does not handle the let-syntax portion...
(define-library (scheme case-lambda)
(export
case-lambda)
(import (scheme base))
(begin
(define-syntax case-lambda
(syntax-rules ()
((case-lambda (params body0 ...) ...)
(lambda args
(let ((len (length args)))
(let-syntax
((cl (syntax-rules ::: ()
((cl)
(error "no matching clause"))
((cl ((p :::) body :::) rest :::)
;((cl ((p :::) . body) . rest)
(if (= len (length '(p :::)))
(apply (lambda (p :::)
body :::)
;. body)
args)
(cl rest :::)))
;(cl . rest)))
; TODO: for now, var-length arg support is broken
;((cl ((p ::: . tail) . body)
; . rest)
; (if (>= len (length '(p :::)))
; (apply
; (lambda (p ::: . tail)
; . body)
; args)
; (cl . rest)))
)))
(cl (params body0 ...) ...)))))))
))

View File

@@ -0,0 +1,35 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; r7rs-small char library
;;;
(define-library (scheme char)
(export
char-alphabetic?
char-ci<=?
char-ci<?
char-ci=?
char-ci>=?
char-ci>?
char-downcase
;char-foldcase
char-lower-case?
char-numeric?
char-upcase
char-upper-case?
char-whitespace?
digit-value
string-ci<=?
string-ci<?
string-ci=?
string-ci>=?
string-ci>?
;string-downcase
;string-foldcase
;string-upcase
)
(import (scheme)))

View File

@@ -0,0 +1,19 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; r7rs complex library
;;;
(define-library (scheme complex)
(export
angle
imag-part
magnitude
make-polar
make-rectangular
real-part
)
(import (scheme)))

View File

@@ -0,0 +1,37 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; The cxr library from r7rs
;;;
(define-library (scheme cxr)
(export
caaaar
caaadr
caaar
caadar
caaddr
caadr
cadaar
cadadr
cadar
caddar
cadddr
caddr
cdaaar
cdaadr
cdaar
cdadar
cdaddr
cdadr
cddaar
cddadr
cddar
cdddar
cddddr
cdddr)
(include "../cxr.scm")
(import (scheme base)))

View File

@@ -0,0 +1,19 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; r7rs eval library
;;;
(define-library (scheme eval)
(export
eval
; environment
; TODO: not in r7rs, not sure proper place => current-environment
; TODO: this in in REPL - interaction-environment
; TODO: not in r7rs, not sure proper place => make-environment
; TODO: not in r7rs, not sure proper place => null-environment
)
(import (scheme)))

View File

@@ -0,0 +1,23 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; r7rs file library
;;;
(define-library (scheme file)
(export
call-with-input-file
call-with-output-file
delete-file
file-exists?
;TODO: open-binary-input-file
;TODO: open-binary-output-file
open-input-file
open-output-file
;TODO: with-input-from-file
;TODO: with-output-to-file
)
(import (scheme)))

View File

@@ -0,0 +1,25 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; r7rs-small inexact library
;;;
(define-library (scheme inexact)
(export
acos
asin
atan
cos
exp
finite?
infinite?
log
nan?
sin
sqrt
tan
)
(import (scheme)))

View File

@@ -0,0 +1,19 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; r7rs lazy library
;;;
(define-library (scheme lazy)
(export
delay
;delay-force
force
make-promise
;promise?
)
(include "../lazy.scm")
(import (scheme base)))

View File

@@ -0,0 +1,12 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; r7rs load library
;;;
(define-library (scheme load)
(export load)
(import (scheme)))

View File

@@ -0,0 +1,30 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; r7rs process-context library
;;;
(define-library (scheme process-context)
(export
exit
exit-fail
exit-success
emergency-exit
get-environment-variable
get-environment-variables
system)
(import (scheme))
(begin
(define (get-environment-variable var)
(let ((var+val (assoc var (get-environment-variables))))
(if var+val
(cdr var+val)
#f)))
(define (emergency-exit . obj)
(if (or (null? obj)
(car obj))
(exit-success)
(exit-fail)))))

View File

@@ -0,0 +1,229 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; r7rs-small r5rs library
;;;
(define-library (scheme r5rs)
(export
*
+
-
/
<
<=
=
>
>=
abs
acos
and
angle
append
apply
asin
assoc
assq
assv
atan
begin
boolean?
caaaar
caaadr
caaar
caadar
caaddr
caadr
caar
cadaar
cadadr
cadar
caddar
cadddr
caddr
cadr
call-with-current-continuation
call-with-input-file
call-with-output-file
call-with-values
car
case
cdaaar
cdaadr
cdaar
cdadar
cdaddr
cdadr
cdar
cddaar
cddadr
cddar
cdddar
cddddr
cdddr
cddr
cdr
ceiling
char->integer
char-alphabetic?
char-ci<=?
char-ci<?
char-ci=?
char-ci>=?
char-ci>?
char-downcase
char-lower-case?
char-numeric?
char-ready?
char-upcase
char-upper-case?
char-whitespace?
char<=?
char<?
char=?
char>=?
char>?
char?
close-input-port
close-output-port
complex?
cond
cons
cos
current-input-port
current-output-port
;define
;define-syntax
delay
denominator
display
do
dynamic-wind
eof-object?
eq?
equal?
eqv?
eval
even?
exact->inexact
exact?
exp
expt
floor
for-each
force
gcd
;if
imag-part
inexact->exact
inexact?
input-port?
integer->char
integer?
interaction-environment
;lambda
lcm
length
let
let*
;let-syntax
letrec
;letrec-syntax
list
list->string
list->vector
list-ref
list-tail
list?
load
log
magnitude
make-polar
make-rectangular
make-string
make-vector
map
max
member
memq
memv
min
modulo
negative?
newline
not
null-environment
null?
number->string
number?
numerator
odd?
open-input-file
open-output-file
or
output-port?
pair?
peek-char
positive?
procedure?
quasiquote
;quote
quotient
rational?
rationalize
read
read-char
real-part
real?
remainder
reverse
round
;scheme-report-environment
;set!
;set-car!
;set-cdr!
sin
sqrt
string
string->list
string->number
string->symbol
string-append
string-ci<=?
string-ci<?
string-ci=?
string-ci>=?
string-ci>?
string-copy
string-fill!
string-length
string-ref
;string-set!
string<=?
string<?
string=?
string>=?
string>?
string?
substring
symbol->string
symbol?
tan
truncate
values
vector
vector->list
vector-fill!
vector-length
vector-ref
;vector-set!
vector?
;optional in r5rs - with-input-from-file
;optional in r5rs - with-output-to-file
write
write-char
zero?)
(import (scheme)))

View File

@@ -0,0 +1,12 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; r7rs read library
;;;
(define-library (scheme read)
(export read)
(import (scheme)))

View File

@@ -0,0 +1,13 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; r7rs-small repl library
;;;
(define-library (scheme repl)
(export
interaction-environment)
(import (scheme)))

View File

@@ -0,0 +1,21 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; The r7rs time library
;;;
(define-library (scheme time)
(export
current-second
current-jiffy
jiffies-per-second)
(import
(scheme base)
(scheme time posix))
(begin
(define (jiffies-per-second) 10000)
(define (current-jiffy)
(exact (* (jiffies-per-second) (current-second))))))

View File

@@ -0,0 +1,17 @@
;;;
;;; husk-scheme
;;; http://justinethier.github.com/husk-scheme
;;;
;;; Written by Justin Ethier
;;;
;;; r7rs write library
;;;
(define-library (scheme write)
(export
display
write
; write-shared
; write-simple
)
(import (scheme)))