Skip to content

Commit 18c4e3a

Browse files
committed
Merge branch 'deprecation-os-string'
2 parents 51501db + 56476c8 commit 18c4e3a

File tree

12 files changed

+17
-11
lines changed

12 files changed

+17
-11
lines changed

.github/workflows/test.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
- name: Install
7676
run: |
7777
apt-get update -y
78-
apt-get install -y autoconf build-essential zlib1g-dev libgmp-dev curl libncurses5 libtinfo5 libncurses5-dev libtinfo-dev
78+
apt-get install -y autoconf build-essential zlib1g-dev libgmp-dev curl libncurses5 libtinfo5 libncurses5-dev libtinfo-dev git
7979
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 sh
8080
- uses: actions/checkout@v1
8181
- name: Test

System/OsPath/Data/ByteString/Short.hs

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@
2323
--
2424
-- > import qualified Data.ByteString.Short as B.Short
2525
--
26-
module System.OsPath.Data.ByteString.Short (
26+
module System.OsPath.Data.ByteString.Short {-# DEPRECATED "Use System.OsString.Data.ByteString.Short from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
27+
28+
(
2729

2830
-- * The @ShortByteString@ type
2931

System/OsPath/Data/ByteString/Short/Internal.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
--
1818
-- Internal low-level utilities mostly for 'System.OsPath.Data.ByteString.Short.Word16',
1919
-- such as byte-array operations and other stuff not meant to be exported from Word16 module.
20-
module System.OsPath.Data.ByteString.Short.Internal where
20+
module System.OsPath.Data.ByteString.Short.Internal {-# DEPRECATED "Use System.OsString.Data.ByteString.Short.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-} where
2121

2222
import Control.Monad.ST
2323
import Control.Exception (assert, throwIO)

System/OsPath/Data/ByteString/Short/Word16.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
--
3030
-- All functions will error out if the input string is not a valid UTF16 stream (uneven number of bytes).
3131
-- So use this module with caution.
32-
module System.OsPath.Data.ByteString.Short.Word16 (
32+
module System.OsPath.Data.ByteString.Short.Word16 {-# DEPRECATED "Use System.OsString.Data.ByteString.Short.Word16 from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-} (
3333
-- * The @ShortByteString@ type and representation
3434
ShortByteString(..),
3535

System/OsPath/Encoding/Internal.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{-# OPTIONS_GHC -funbox-strict-fields #-}
77

88

9-
module System.OsPath.Encoding.Internal where
9+
module System.OsPath.Encoding.Internal {-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-} where
1010

1111
import qualified System.OsPath.Data.ByteString.Short as BS8
1212
import qualified System.OsPath.Data.ByteString.Short.Word16 as BS16

System/OsString.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
--
1515
-- It captures the notion of syscall specific encoding (or the lack thereof) to avoid roundtrip issues
1616
-- and memory fragmentation by using unpinned byte arrays. Bytes are not touched or interpreted.
17-
module System.OsString
17+
module System.OsString {-# DEPRECATED "Use System.OsString from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
1818
(
1919
-- * String types
2020
OsString

System/OsString/Common.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#define POSIX_DOC
1212
#endif
1313

14-
module System.OsString.MODULE_NAME
14+
module System.OsString.MODULE_NAME {-# DEPRECATED "Use System.OsString.MODULE_NAME from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
1515
(
1616
-- * Types
1717
#ifdef WINDOWS

System/OsString/Internal.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{-# LANGUAGE RankNTypes #-}
33
{-# LANGUAGE UnliftedFFITypes #-}
44

5-
module System.OsString.Internal where
5+
module System.OsString.Internal {-# DEPRECATED "Use System.OsString.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-} where
66

77
import System.OsString.Internal.Types
88

System/OsString/Internal/Types.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{-# LANGUAGE TypeApplications #-}
99
{-# LANGUAGE PatternSynonyms #-}
1010

11-
module System.OsString.Internal.Types
11+
module System.OsString.Internal.Types {-# DEPRECATED "Use System.OsString.Internal.Types from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
1212
(
1313
WindowsString(..)
1414
, pattern WS

System/OsString/Types.hs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module System.OsString.Types
1+
module System.OsString.Types {-# DEPRECATED "Use System.OsString.Types from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
22
(
33
WindowsString
44
, PosixString

changelog.md

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
_Note: below all `FilePath` values are unquoted, so `\\` really means two backslashes._
44

5+
## 1.4.200.0 *Jul 2023*
6+
7+
* deprecate `OsString` modules
8+
59
## 1.4.100.4 *Jul 2023*
610

711
* Fix isInfixOf and breakSubString in Word16, wrt [#195](https://github.com/haskell/filepath/issues/195)

filepath.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 2.2
22
name: filepath
3-
version: 1.4.100.4
3+
version: 1.4.200.0
44

55
-- NOTE: Don't forget to update ./changelog.md
66
license: BSD-3-Clause

0 commit comments

Comments
 (0)