Skip to content

Commit

Permalink
Fix building of Foreign.R.Parse
Browse files Browse the repository at this point in the history
  • Loading branch information
facundominguez committed Oct 25, 2023
1 parent 534c005 commit 13ef16c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion inline-r/inline-r.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 3 additions & 5 deletions inline-r/src/Foreign/R/Parse.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ module Foreign.R.Parse
, ParseStatus(..)
) where

import Foreign.R.Constraints
import qualified Foreign.R as R

import Foreign
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 13ef16c

Please sign in to comment.