Skip to content

Commit

Permalink
Remove SSEXPTYPE
Browse files Browse the repository at this point in the history
  • Loading branch information
facundominguez committed Apr 26, 2023
1 parent c395d96 commit 932bae8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
4 changes: 0 additions & 4 deletions inline-r/src/Foreign/R/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import Foreign.R.Context (SEXP0(..))
import Control.Applicative
import Control.DeepSeq (NFData(..))
import Control.Monad.Primitive ( unsafeInlineIO )
import Data.Singletons (fromSing)
import Foreign (Ptr, Storable(..))
import Foreign.C
import Prelude hiding (asTypeOf, length)
Expand Down Expand Up @@ -75,9 +74,6 @@ cIntConv = fromIntegral
cIntToEnum :: Enum a => CInt -> a
cIntToEnum = toEnum . cIntConv

cUIntFromSingEnum :: SSEXPTYPE a -> CUInt
cUIntFromSingEnum = cIntConv . fromEnum . fromSing

cIntFromEnum :: Enum a => a -> CInt
cIntFromEnum = cIntConv . fromEnum

Expand Down
10 changes: 0 additions & 10 deletions inline-r/src/Foreign/R/Type.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,9 @@
-- c2hs for discharging the boilerplate around 'SEXPTYPE'. This is because
-- 'SEXPTYPE' is nearly but not quite a true enumeration and c2hs has trouble
-- dealing with that.
--
-- This module also defines a singleton version of 'SEXPTYPE', called
-- 'SSEXPTYPE'. This is actually a family of types, one for each possible
-- 'SEXPTYPE'. Singleton types are a way of emulating dependent types in
-- a language that does not have true dependent type. They are useful in
-- functions whose result type depends on the value of one of its arguments. See
-- e.g. 'Foreign.R.allocVector'.

module Foreign.R.Type
( SEXPTYPE(..)
, SSEXPTYPE(..)
, Sing
, Logical(..)
, PairList
Expand Down Expand Up @@ -188,8 +180,6 @@ instance Enum ParseStatus where
(#const PARSE_EOF) -> PARSE_EOF
_ -> error "ParseStatus.fromEnum: can't mach value"

genSingletons [''SEXPTYPE]

-- | Used where the R documentation speaks of "pairlists", which are really just
-- regular lists.
type PairList = List
Expand Down

0 comments on commit 932bae8

Please sign in to comment.