Skip to content

Commit 4c1adc8

Browse files
committed
Data.Some is safe too, prelare 1.0.2
1 parent 22bee3e commit 4c1adc8

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

ChangeLog.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1-
# 1.0.1.1
1+
# 1.0.2
22

3-
- GHC-9.0 compatibility
3+
- Explicitly mark `Data.Some` as `Safe`.
4+
It was previously inferred, yet it was Safe too,
5+
as it only re-exports other explicitly marked modules.
6+
- Allow `base-4.15`, GHC-9.0 compatibility
47

58
# 1.0.1
69

some.cabal

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: some
2-
version: 1.0.1.1
2+
version: 1.0.2
33
stability: provisional
44
cabal-version: >=1.10
55
build-type: Simple
@@ -70,7 +70,7 @@ library
7070

7171
other-modules: Data.GADT.Internal
7272
build-depends:
73-
base >=4.3 && <4.15
73+
base >=4.3 && <4.16
7474
, deepseq >=1.3.0.0 && <1.5
7575

7676
if !impl(ghc >=7.8)
@@ -82,6 +82,11 @@ library
8282
, transformers >=0.3 && <0.6
8383
, transformers-compat >=0.6 && <0.7
8484

85+
if impl(ghc >= 9.0)
86+
-- these flags may abort compilation with GHC-8.10
87+
-- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295
88+
ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode
89+
8590
test-suite hkd-example
8691
default-language: Haskell2010
8792
type: exitcode-stdio-1.0

src/Data/Some.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
{-# LANGUAGE CPP #-}
1+
{-# LANGUAGE CPP #-}
2+
#if __GLASGOW_HASKELL__ >= 704
3+
{-# LANGUAGE Safe #-}
4+
#elif __GLASGOW_HASKELL__ >= 702
5+
{-# LANGUAGE Trustworthy #-}
6+
#endif
27
-- | An existential type.
38
--
49
-- The constructor is exported only on GHC-8 and later.

0 commit comments

Comments
 (0)