scope of header files

Roman Leshchinskiy rl at cse.unsw.edu.au
Sun Mar 16 21:38:44 EDT 2008


Jason Dusek wrote:
> Ross Paterson <ross at soi.city.ac.uk> wrote:
>> Jason Dusek wrote:
>>> Why doesn't GHC know about const?
>>  Because the Ptr type doesn't indicate const-ness (perhaps it
>>  should).
> 
>   If it did, could we read constant strings without
>   unsafePerformIO?

That would be unsound since a const pointer doesn't necessarily point to 
const data. Constness here only means that the data can't be modified 
through this particular pointer.

Roman




More information about the Glasgow-haskell-users mailing list