CPL - Chalmers Publication Library
| Utbildning | Forskning | Styrkeområden | Om Chalmers | In English In English Ej inloggad.

Foreign Exchange at Low, Low Rates

Anton Ekblad (Institutionen för data- och informationsteknik, Programvaruteknik (Chalmers))
Proceedings of the 27th Symposium on the Implementation and Application of Functional Programming Languages Vol. 2015 (2015),
[Konferensbidrag, refereegranskat]

We present a novel yet simple foreign function interface, designed for web-targeting Haskell dialects but also applicable to a wider range of high-level target languages. The interface automates marshalling, eliminates boilerplate code, allows increased sanity checking of external data, allows the import of functions as well as arbitrary expressions of JavaScript code, and is implementable as a plain Haskell ’98 library without any modification to the Haskell compiler or environment.

We give an implementation of this interface for the JavaScripttargeting Haste compiler, and show how the basic implementation can be further optimized with minimal effort to perform on par with Haskell’s vanilla foreign function interface, as well as extended to support automatic marshalling of higher-order functions and automatic marshalling of host language exceptions. We also discuss how the interface may be extended beyond the web domain and implemented across a larger range of host environments and target languages.

Nyckelord: compilers, interoperability, web, functional programming

Den här publikationen ingår i följande styrkeområden:

Läs mer om Chalmers styrkeområden  

Denna post skapades 2016-07-28. Senast ändrad 2016-10-26.
CPL Pubid: 239648


Läs direkt!

Lokal fulltext (fritt tillgänglig)

Länk till annan sajt (kan kräva inloggning)