Changes between Version 3 and Version 4 of ForeignData


Ignore:
Timestamp:
Dec 1, 2005 4:20:02 AM (8 years ago)
Author:
john@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ForeignData

    v3 v4  
    3939 
    4040Implementation is trivial once you can parse the new constructs (purposfully similar to existing haskell constructs so lexer and parser need not be modified other than to add new rule). these declarations translate immediatly into equivalant C, C--, or assembly linker directives.  
     41 
     42 
     43== caveats == 
     44 
     45It is anoying that <n> must be a constant and <type> must be a builtin, but there is not really any other recourse without defining a preprocessor in haskell or a staged system like template haskell. however, use of CPP or a preprocessor like hsc2hs will mitigate these problems and the situation is no worse (and somewhat better) than when having to link against an external C library. 
     46 
     47A possible extension would be to allow implementations to derive instances of Storable and allow types with such derived instances be used in foreign space declarations too.