Hello Mathieu,
I have been playing with an old package named hR (written by Dylan
Simon) for years, on and off, and I was planning to release an update.
But with HaskellR/H there is little need for this.
The main difference in design philosophy is that hR tries to model R
structures on the Haskell
side, whereas HaskellR works in terms of SEXP's and let's R take care
of the AST's
(for efficiency).
While the H interface is very nice, I'm trying to work at a slightly
lower level so that I can
view the AST corresponding to a SEXP using the viewer hexp (as
advertised in your docs).
By browsing through inline-r/tests/Test/Vector.hs, the closest I have
been able to come to this
is (in ghci):
myvec = V.toSEXP (V.fromList [1..3::Double]) :: R.SEXP s 'R.Real
:t hexp myvec
ghci tells me that the type is HExp s 'R.Real, and there is no
corresponding Show, so I'm not sure what you mean by viewier?
Based on your docs what I'm looking for is the ability to create a
SEXP pointing to
an arbitrary R data type, and view this datatype as an HEXP on the Haskell side.
Is there any sample code that you can point me to that shows how to
use the viewer, and how to compute on R AST's in Haskell?
Thanks,
Dominick