Using Common Lisp Libraries from Coalton
By Robert Smith We discuss how we can make an efficient, type-safe interface to existing libraries written in Common Lisp so that they can be used in Coalton code. Table Of Contents Do we even need a library? Find a library and create a package Identify the rough API Decide on a binding strategy Define the types Wrap some other constructors Use type classes when possible Equality Ordering Efficiency? Other type classes A more difficult example Argument order? Wrapping it up Concluding remarks Source listing One of Coalton’s headline features is that it’s embedded in Common Lisp, and allows the use of Common Lisp code via the lisp operator. However, it’s not immediately obvious how one can use Common Lisp when Coalton is strongly typed. How do we do it? ...