On Fri, 10 May 2019 08:06:41 -0700 (PDT), Rabican
<
[email protected]> wrote:
https://www.scylladb.com/2019/05/06/introducing-scylla-enterprise-2019-1/
I always like hearing the subject heading "Can Haskell Do This",
because (unless we're talking an undecidable problem), since Haskell
is Turing-complete, the answer is trivially YES.
On the other hand, since Haskell does not provide a ScyllaDB
interface, the answer is, equally trivially, NO. On the third hand,
Haskell allows you to WRITE ScyllaDB, so the answer again becomes YES.
Since you didn't really explain what you meant by `Haskell', or what
you meant by `do this', your question has no useful answer. Perhaps if
you refined your question, you might get something more worthwhile.
In the case of ScyllaDB, a cursory examination of the website
indicates that it's written in C++. Therefore, any Haskell system with
a C/C++ FFI should be able to access it. Currently, one way of
possibly accomplishing this task might be to use the procedure
described at the Web page "CPlusPlus from Haskell" (see
https://wiki.haskell.org/CPlusPlus_from_Haskell); _viz._:
According to the Foreign Function Interface section of the Haskell
2010 report, you import a C++ function by simply specifying the calling convention cplusplus. Unfortunately, no Haskell compiler actually supports this calling convention, so we have to use the C calling convention instead.
The standard method for dealing with this is to write C++ code that uses extern "C" to export the methods unmangled. Of course, you still have to uniquify the method names, but *you* get to pick the names instead of
letting the compiler do whatever wacky method it wants.
The method presented on this page does not use that method � it just
calls the mangled names directly. So far this seems to work OK...
--
Benjamin L. Russell / DekuDekuplex at Yahoo dot com
http://dekudekuplex.wordpress.com/
Computer Science Document Translator/Editor
"Furuike ya, kawazu tobikomu mizu no oto." -- Matsuo Basho^
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)