[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Case sensitivity in modules?



At Tue, 19 Mar 2002 20:32:31 -0500 (EST), "Matt 'LEGO Guy' Jadud" wrote:
> (module modtest mzscheme
>   (provide foo bar)
>   (define foo (lambda () (equal? 'hello 'hello)))
>   (define bar (lambda () (equal? 'hello 'Hello)))
> )

To make a module body case-sensitive, prefix the module with `#cs':

 #cs
 (module modtest mzscheme
   (provide foo bar)
   (define foo (lambda () (equal? 'hello 'hello)))
   (define bar (lambda () (equal? 'hello 'Hello)))
  )

> 	Putting a (read-case-sensitive #t) in the module doesn't seem to
> convince it that I want it to be case sensitive.

While `require' loads a module, it disables case sensitivity --- and
sets all of the other reader parameters to specific values, too.

Forcing reader parameters to a sepcific state helps ensure that the
meaning of a module declaration depends only on its imports, and not
anything else about the environment.

> I have read of the PLT
> Language Manual concerning modules (5.8) and am at a loss 

I've added a note and hyperlink to section 5.8 about `#cs'. (I also
added links to `read-case-sensitive' documentation to 5.8.)

Matthew