file name letters

Arthur van Leeuwen arthurvl at
Wed Sep 5 09:04:34 EDT 2007

On 5-sep-2007, at 9:01, Serge D. Mechveliani wrote:

> Dear GHC users and developers,
> there has occured a curious case with file name letters.
> One user has built the  docon library  application (in Haskell)
> on
>    MacOS X 10.4  +  ghc-6.6.1.
> And making the test program has failed due to the presence of the file
>   linalg.hs
> in the directory of the testing modules for DoCon.
> This file is not needed for this docon release, it is a reserve. I set
> its name in the lower case letters in order for GHC to ignore it.
> I test DoCon only in Linux, and have not access to MacOS.
> Thanks to  Christian Maeder <Christian.Maeder at>,
> he noticed that MacOS ignores the  letter case  in the file names!
> When the commands
>                   cd demotest
>                   ghc ... --make Main
> run on MacOS, ghc suddenly touches the file  linalg.hs  -- for some  
> reason
> (and there also exists  LinAlg  in the library built).
> All right, I shall readily fix this `bug'.
> But out of curiosity, who's bug is this: of GHC, DoCon, or MacOS ?
> Is the file name letters a matter of Haskell-98 ?
> Do the GHC docs mention the question of the letter case in the file  
> names?

Ouch, the well-known case-preserving but case-ignoring default behaviour
of MacOS X's file system bites someone again.

In short: Mac OS X's filesystem ignores case when opening a file, but  
case when creating. Therefore, if you have a file linalg.hs and you  
wish to open
LinAlg.hs then the file linalg.hs is going to be opened. Trying to  
create LinAlg.hs
will fail, as linalg.hs already exists! Yes, this leads to stupid  
behaviour from time
to time. The behaviour can be changed, but only on creation of the  

WIth regards, Arthur.


   /\    / |       arthurvl at       | Work like you don't need  
the money
/__\  /  | A friend is someone with whom | Love like you have never  
been hurt
/    \/__ | you can dare to be yourself   | Dance like there's nobody  

More information about the Glasgow-haskell-users mailing list