Skip to content

Commit

Permalink
Improve deprecation warnings wrt #209
Browse files Browse the repository at this point in the history
  • Loading branch information
hasufell committed Dec 2, 2023
1 parent 18c4e3a commit 592b857
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 3 deletions.
46 changes: 45 additions & 1 deletion System/OsPath/Encoding/Internal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,55 @@
, BangPatterns
, TypeApplications
, MultiWayIf
, CPP
#-}
{-# OPTIONS_GHC -funbox-strict-fields #-}


#if __GLASGOW_HASKELL__ < 908
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
#else
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." #-}
EncodingException (..),
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
cWcharsToChars_UCS2,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
decodeWithBasePosix,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
decodeWithBaseWindows,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
encodeWithBasePosix,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
encodeWithBaseWindows,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
mkUcs2le,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
mkUTF16le_b,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
showEncodingException,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
ucs2le,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
ucs2le_decode,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
ucs2le_DF,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
ucs2le_EF,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
ucs2le_encode,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
utf16le_b,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
utf16le_b_decode,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
utf16le_b_DF,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
utf16le_b_EF,
{-# DEPRECATED "Use System.OsString.Encoding.Internal from os-string >= 2.0.0 package instead. This module will be removed in filepath >= 1.5." #-}
utf16le_b_encode,
)
where
#endif

import qualified System.OsPath.Data.ByteString.Short as BS8
import qualified System.OsPath.Data.ByteString.Short.Word16 as BS16
Expand Down
6 changes: 5 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

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

## 1.4.200.0 *Jul 2023*
## 1.4.200.1 *Dec 2023*

* Improve deprecation warnings for GHC 9.8+ wrt [#209](https://github.com/haskell/filepath/issues/209)

## 1.4.200.0 *Nov 2023*

* deprecate `OsString` modules

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.200.0
version: 1.4.200.1

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

0 comments on commit 592b857

Please sign in to comment.