Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
index-state:
-- Bump this if you need newer packages from Hackage
, hackage.haskell.org 2024-12-09T15:45:06Z
, hackage.haskell.org 2024-12-30T06:24:32Z

packages:
fs-api
Expand Down
8 changes: 8 additions & 0 deletions fs-api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Revision history for fs-api

## ?.?.?.? -- ????-??-??

### Non-breaking

* Make the orphan `Condense` instance for `System.IO.SeekMode` into a non-orphan
instance. The instance is still exported from the same modules it was exported
from previously, `System.FS.API.Types` in particular.

## 0.3.0.1 -- 2024-10-02

### Patch
Expand Down
7 changes: 0 additions & 7 deletions fs-api/src/System/FS/API/Types.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}

-- For Show Errno and Condense SeekMode instances
{-# OPTIONS_GHC -Wno-orphans #-}
module System.FS.API.Types (
-- * Modes
AllowExisting (..)
Expand Down Expand Up @@ -452,11 +450,6 @@ ioToFsErrorType ioErr = case Errno <$> GHC.ioe_errno ioErr of
Condense instances
-------------------------------------------------------------------------------}

instance Condense SeekMode where
condense RelativeSeek = "r"
condense AbsoluteSeek = "a"
condense SeekFromEnd = "e"

instance Condense AllowExisting where
condense AllowExisting = ""
condense MustBeNew = "!"
Expand Down
6 changes: 6 additions & 0 deletions fs-api/src/System/FS/Condense.hs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import Data.Text (Text, unpack)
import Data.Void
import Data.Word
import Numeric.Natural
import System.IO (SeekMode (..))
import Text.Printf (printf)

{-------------------------------------------------------------------------------
Expand Down Expand Up @@ -111,3 +112,8 @@ instance Condense BS.Strict.ByteString where

instance Condense BS.Lazy.ByteString where
condense bs = show bs ++ "<" ++ show (BS.Lazy.length bs) ++ "b>"

instance Condense SeekMode where
condense RelativeSeek = "r"
condense AbsoluteSeek = "a"
condense SeekFromEnd = "e"
Loading