From 1c31749b288259149387a32587f6c2b60410ab14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Facundo=20Dom=C3=ADnguez?= Date: Wed, 26 Apr 2023 09:49:41 -0300 Subject: [PATCH] Fix building of Foreign.R.Parse --- inline-r/inline-r.cabal | 2 +- inline-r/src/Foreign/R/Parse.hsc | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/inline-r/inline-r.cabal b/inline-r/inline-r.cabal index 08b51d71..cebf3768 100644 --- a/inline-r/inline-r.cabal +++ b/inline-r/inline-r.cabal @@ -57,7 +57,7 @@ library Foreign.R.Encoding Foreign.R.Error Foreign.R.Internal --- Foreign.R.Parse + Foreign.R.Parse Foreign.R.Type -- H.Prelude -- H.Prelude.Interactive diff --git a/inline-r/src/Foreign/R/Parse.hsc b/inline-r/src/Foreign/R/Parse.hsc index ee74d957..192c3560 100644 --- a/inline-r/src/Foreign/R/Parse.hsc +++ b/inline-r/src/Foreign/R/Parse.hsc @@ -17,7 +17,6 @@ module Foreign.R.Parse , ParseStatus(..) ) where -import Foreign.R.Constraints import qualified Foreign.R as R import Foreign @@ -53,12 +52,11 @@ instance Enum ParseStatus where -- TODO: use ParseStatus or write a wrapper for parseVector. parseVector - :: (In a [R.Nil, R.String]) - => R.SEXP s R.String + :: R.SEXP s -> Int -> Ptr CInt - -> R.SEXP s a - -> IO (R.SEXP s R.Expr) + -> R.SEXP s + -> IO (R.SEXP s) parseVector (R.unsexp -> s) (fromIntegral -> cnt) reti (R.unsexp -> input) = R.sexp <$> c_parseVector s cnt reti input