Skip to content

Commit 2434766

Browse files
Merge pull request #433 from tweag/fd/darwin-ci
Support R 4.5
2 parents 6ba666e + 6cccea9 commit 2434766

20 files changed

+38
-195
lines changed

.github/workflows/workflow.yaml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,14 @@ jobs:
4242
- ubuntu-latest
4343
stack_yaml:
4444
- stack.yaml
45-
- stack-lts-19.yaml
46-
- stack-lts-20.yaml
4745
- stack-lts-21.yaml
48-
- stack-nightly.yaml
46+
- stack-lts-22.yaml
47+
exclude:
48+
# Exclude macOS with old GHCs. We use a newer GHC to avoid FFI-related errors.
49+
- os: macos-latest
50+
stack_yaml: stack-lts-21.yaml
51+
- os: macos-latest
52+
stack_yaml: stack-lts-22.yaml
4953
runs-on: ${{ matrix.os }}
5054
steps:
5155
- uses: actions/checkout@v4

IHaskell/ihaskell-inline-r.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ library
1717
exposed-modules: IHaskell.Display.InlineR
1818
build-depends: base >=4.7 && <5
1919
,inline-r >=0.6.0.1 && <1.11
20-
,ihaskell >=0.10.2.2 && <0.12
20+
,ihaskell >=0.10.2.2 && <0.13
2121
,ihaskell-blaze >=0.3.0.1 && <0.4
2222
,blaze-html >=0.9.1.2 && <0.10
2323
,bytestring >=0.10.12.0 && <0.13
2424
,base64-bytestring >=1.1.0.0 && <1.3
25-
,template-haskell >=2.16.0.0 && <2.22
25+
,template-haskell >=2.16.0.0 && <2.23
2626
,temporary >=1.2 && <1.4
2727
other-extensions: TemplateHaskell
2828
QuasiQuotes

inline-r/cbits/missing_r.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,7 @@ static void test_R_interrupts_pending(){ int *a = &R_interrupts_pending; };
7575
int OBJECT(SEXP x);
7676
int NAMED(SEXP x);
7777
int LEVELS(SEXP x);
78-
int MARK(SEXP x);
7978
int RDEBUG(SEXP x);
80-
int RTRACE(SEXP x);
81-
int RSTEP(SEXP x);
8279
SEXP ATTRIB(SEXP x);
8380
void SET_ATTRIB(SEXP, SEXP);
8481
SEXP Rf_getAttrib(SEXP, SEXP);

inline-r/inline-r.cabal

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ library
104104
aeson >=0.6 && <2.3,
105105
bytestring >=0.10 && <0.13,
106106
containers >=0.5 && <0.8,
107-
data-default-class >=0.1.2.0 && <0.2,
107+
data-default-class >=0.1.2.0 && <0.3,
108108
deepseq >=1.3 && <1.6,
109109
exceptions >=0.6 && <1.1,
110110
heredoc >=0.2 && <0.3,
@@ -114,7 +114,7 @@ library
114114
process >=1.2 && <1.7,
115115
reflection >=2 && <2.2,
116116
setenv >=0.1.1 && <0.2,
117-
template-haskell >=2.8 && <2.22,
117+
template-haskell >=2.8 && <2.23,
118118
temporary >=1.2 && <1.4,
119119
text >=0.11 && <2.2,
120120
vector >=0.10 && <0.14,
@@ -124,7 +124,7 @@ library
124124
else
125125
build-depends:
126126
singletons >=3 && <3.1,
127-
singletons-th >=3 && <3.4,
127+
singletons-th >=3 && <3.5,
128128
hs-source-dirs: src
129129
includes: cbits/missing_r.h
130130
c-sources: cbits/missing_r.c
@@ -161,7 +161,7 @@ test-suite tests
161161
tasty >=0.11 && <1.6,
162162
tasty-expected-failure >=0.11 && <0.13,
163163
tasty-hunit >=0.4.1 && <0.11,
164-
tasty-quickcheck >=0.4.1 && <0.11,
164+
tasty-quickcheck >=0.4.1 && <0.12,
165165
temporary >=1.2 && <1.4,
166166
vector >=0.12.3.1 && <0.14,
167167
if !os(windows)
@@ -198,7 +198,7 @@ test-suite test-shootout
198198
process >=1.2 && <1.7,
199199
silently >=1.2 && <1.3,
200200
tasty >=0.11 && <1.6,
201-
template-haskell >=2.8 && <2.22,
201+
template-haskell >=2.8 && <2.23,
202202
if os(windows)
203203
buildable: False
204204

inline-r/src/Foreign/R/Internal.hs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
-- Copyright: (C) 2013 Amgen, Inc.
33
--
44
-- Low-level bindings to core R datatypes and functions which depend on
5-
-- computing offsets of C struct field. We use hsc2hs for this purpose.
5+
-- computing offsets of C struct field.
66

77
{-# LANGUAGE ConstraintKinds #-}
88
{-# LANGUAGE DataKinds #-}
@@ -187,10 +187,7 @@ data SEXPInfo = SEXPInfo
187187
, infoObj :: Bool -- ^ Is this an object with a class attribute.
188188
, infoNamed :: Int -- ^ Control copying information.
189189
, infoGp :: Int -- ^ General purpose data.
190-
, infoMark :: Bool -- ^ Mark object as 'in use' in GC.
191190
, infoDebug :: Bool -- ^ Debug marker.
192-
, infoTrace :: Bool -- ^ Trace marker.
193-
, infoSpare :: Bool -- ^ Alignment (not in use).
194191
} deriving ( Show )
195192

196193
-- | Extract the header from the given 'SEXP'.
@@ -201,22 +198,16 @@ peekInfo ts =
201198
<*> ((/=0) <$> cOBJECT s)
202199
<*> (fromIntegral <$> cNAMED s)
203200
<*> (fromIntegral <$> cLEVELS s)
204-
<*> ((/=0) <$> cMARK s)
205201
<*> ((/=0) <$> cRDEBUG s)
206-
<*> ((/=0) <$> cRTRACE s)
207-
<*> ((/=0) <$> cRSTEP s)
208202
where
209203
s = unsexp ts
210204

211205
-- These accessors are necessary because hsc2hs cannot determine the offset of
212-
-- C struct bit-fields. https://ghc.haskell.org/trac/ghc/ticket/12149
206+
-- C struct bit-fields. https://gitlab.haskell.org/ghc/ghc/-/issues/12149
213207
foreign import ccall unsafe "OBJECT" cOBJECT :: SEXP0 -> IO CInt
214208
foreign import ccall unsafe "NAMED" cNAMED :: SEXP0 -> IO CInt
215209
foreign import ccall unsafe "LEVELS" cLEVELS :: SEXP0 -> IO CInt
216-
foreign import ccall unsafe "MARK" cMARK :: SEXP0 -> IO CInt
217210
foreign import ccall unsafe "RDEBUG" cRDEBUG :: SEXP0 -> IO CInt
218-
foreign import ccall unsafe "RTRACE" cRTRACE :: SEXP0 -> IO CInt
219-
foreign import ccall unsafe "RSTEP" cRSTEP :: SEXP0 -> IO CInt
220211

221212
-------------------------------------------------------------------------------
222213
-- Attribute header --

inline-r/src/Language/R/Debug.hs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,7 @@ instance ToJSON SEXPInfo where
4747
, "obj" .= R.infoObj x
4848
, "named" .= R.infoNamed x
4949
, "gp" .= R.infoGp x
50-
, "mark" .= R.infoMark x
5150
, "debug" .= R.infoDebug x
52-
, "trace" .= R.infoTrace x
53-
, "spare" .= R.infoSpare x
5451
]
5552

5653
instance ToJSON a => ToJSON (Complex a) where

nixpkgs.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
let
2-
# NixOS/Nixpkgs master on 2024-02-01
3-
rev = "a6fefb39e18b6ff828c04d59ea26d4988135bb88";
4-
sha256 = "sha256-lsnvxt/1KCUgrV8KURXdZXRo+mLUZdc7o5H0MvYFOHQ=";
2+
# NixOS/Nixpkgs master on 2025-06-07
3+
rev = "3e3afe5174c561dee0df6f2c2b2236990146329f";
4+
sha256 = "0dcslr2lwfaclfl4pmbwb3yw27bnvwlqiif394d3d66vyd163dvy";
55
in
66
import (
77
fetchTarball {

shell-lts-19.nix

Lines changed: 0 additions & 1 deletion
This file was deleted.

shell-lts-20.nix

Lines changed: 0 additions & 1 deletion
This file was deleted.

shell-lts-22.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
builtins.import ./shell.nix { ghcAttr = "ghc96"; }

0 commit comments

Comments
 (0)