Skip to content

Commit

Permalink
Merge branch 'deprecation-os-string'
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Nov 25, 2023
2 parents 51501db + 56476c8 commit 18c4e3a
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
- name: Install
run: |
apt-get update -y
apt-get install -y autoconf build-essential zlib1g-dev libgmp-dev curl libncurses5 libtinfo5 libncurses5-dev libtinfo-dev
apt-get install -y autoconf build-essential zlib1g-dev libgmp-dev curl libncurses5 libtinfo5 libncurses5-dev libtinfo-dev git
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | BOOTSTRAP_HASKELL_NONINTERACTIVE=1 BOOTSTRAP_HASKELL_INSTALL_NO_STACK=1 sh
- uses: actions/checkout@v1
- name: Test
Expand Down
4 changes: 3 additions & 1 deletion System/OsPath/Data/ByteString/Short.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
--
-- > import qualified Data.ByteString.Short as B.Short
--
module System.OsPath.Data.ByteString.Short (
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." #-}

(

-- * The @ShortByteString@ type

Expand Down
2 changes: 1 addition & 1 deletion System/OsPath/Data/ByteString/Short/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
--
-- Internal low-level utilities mostly for 'System.OsPath.Data.ByteString.Short.Word16',
-- such as byte-array operations and other stuff not meant to be exported from Word16 module.
module System.OsPath.Data.ByteString.Short.Internal where
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

import Control.Monad.ST
import Control.Exception (assert, throwIO)
Expand Down
2 changes: 1 addition & 1 deletion System/OsPath/Data/ByteString/Short/Word16.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
--
-- All functions will error out if the input string is not a valid UTF16 stream (uneven number of bytes).
-- So use this module with caution.
module System.OsPath.Data.ByteString.Short.Word16 (
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." #-} (
-- * The @ShortByteString@ type and representation
ShortByteString(..),

Expand Down
2 changes: 1 addition & 1 deletion System/OsPath/Encoding/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{-# OPTIONS_GHC -funbox-strict-fields #-}


module System.OsPath.Encoding.Internal where
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

import qualified System.OsPath.Data.ByteString.Short as BS8
import qualified System.OsPath.Data.ByteString.Short.Word16 as BS16
Expand Down
2 changes: 1 addition & 1 deletion System/OsString.hs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
--
-- It captures the notion of syscall specific encoding (or the lack thereof) to avoid roundtrip issues
-- and memory fragmentation by using unpinned byte arrays. Bytes are not touched or interpreted.
module System.OsString
module System.OsString {-# DEPRECATED "Use System.OsString from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
(
-- * String types
OsString
Expand Down
2 changes: 1 addition & 1 deletion System/OsString/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define POSIX_DOC
#endif

module System.OsString.MODULE_NAME
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." #-}
(
-- * Types
#ifdef WINDOWS
Expand Down
2 changes: 1 addition & 1 deletion System/OsString/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE UnliftedFFITypes #-}

module System.OsString.Internal where
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

import System.OsString.Internal.Types

Expand Down
2 changes: 1 addition & 1 deletion System/OsString/Internal/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE PatternSynonyms #-}

module System.OsString.Internal.Types
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." #-}
(
WindowsString(..)
, pattern WS
Expand Down
2 changes: 1 addition & 1 deletion System/OsString/Types.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module System.OsString.Types
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." #-}
(
WindowsString
, PosixString
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

## 1.4.200.0 *Jul 2023*

* deprecate `OsString` modules

## 1.4.100.4 *Jul 2023*

* Fix isInfixOf and breakSubString in Word16, wrt [#195](https://github.com/haskell/filepath/issues/195)
Expand Down
2 changes: 1 addition & 1 deletion filepath.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.2
name: filepath
version: 1.4.100.4
version: 1.4.200.0

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

0 comments on commit 18c4e3a

Please sign in to comment.