[gambit-list] anyone get schelog working with gambit-c?

Bradley Lucier lucier at math.purdue.edu
Tue Aug 21 22:22:16 EDT 2007


On Aug 21, 2007, at 10:08 PM, naruto canada wrote:

> (%which () %true)
>
> I get:
> *** ERROR -- Ill-formed expression
> ()

You need a quote to denote the empty list: '()

Just two parentheses by themselves is a syntax error in scheme; it's  
a function call but without a function name.

Unfortunately, several scheme implementations accept it as an  
extension to mean the empty list and so it gets propagated to scheme  
sources throughout the internets ...

> Thanks, it works now, this is what I did.
> first, "makeport" couldn't detect my OS, so I modify it:
>
> ;(set! *operating-system*
> ;  (case *dialect*
> ;    ((bigloo gambit guile mzscheme petite scm stk)
> ;     (cond ((getenv "COMSPEC") 'windows)
> ;           (else 'unix)))
> ;    ((mitscheme)
> ;     (cond ((get-environment-variable "COMSPEC") 'windows)
> ;           (else 'unix)))
> ;    ((pscheme) 'windows)
> ;    (else
> ;      (display "What is your operating system? [unix windows]")
> ;      (newline)
> ;      (read))))
> (set! *operating-system* 'unix)

I changed makeport.scm to do

(set! *operating-system*
   (case *dialect*
     ((gambit)
      (if (getenv "COMSPEC" #f)
          'windows
          'unix))
     ((bigloo guile mzscheme petite scm stk)
      (cond ((getenv "COMSPEC") 'windows)
            (else 'unix)))
     ((mitscheme)
      (cond ((get-environment-variable "COMSPEC") 'windows)
            (else 'unix)))
     ((pscheme) 'windows)
     (else
       (display "What is your operating system? [unix windows]")
       (newline)
       (read))))





More information about the Gambit-list mailing list