summaryrefslogtreecommitdiff
path: root/top/has-utils.scm
blob: 62a0c3f051029b1e7db88402b1619e899048d68b (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
;;; These utilities are specific to the Haskell language.

(define (add-con-prefix str)  ; should be in some utility file
  (string-append ";" str))

(define (remove-con-prefix string)
  (substring string 1 (string-length string)))

(define (has-con-prefix? string)
  (char=? (string-ref string 0) '#\;))

(define (add-con-prefix/symbol sym)
  (string->symbol (add-con-prefix (symbol->string sym))))

(define (remove-con-prefix/symbol sym)
  (string->symbol (remove-con-prefix (symbol->string sym))))

(define (has-con-prefix/symbol? sym)
  (has-con-prefix? (symbol->string sym)))