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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
- '9.8.2'
- '9.10.1'
- '9.12.1'
- '9.14.1'
exclude:
- os: macOS-latest
ghc: 9.8.2
Expand Down
2 changes: 1 addition & 1 deletion relude.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ library
, Data.ByteString.Short


build-depends: base >= 4.11 && < 4.22
build-depends: base >= 4.11 && < 4.23
, bytestring >= 0.10 && < 0.13
, containers >= 0.5.10 && < 0.9
, deepseq >= 1.4 && < 1.6
Expand Down
13 changes: 0 additions & 13 deletions src/Relude/Debug.hs
Original file line number Diff line number Diff line change
Expand Up @@ -261,19 +261,6 @@
⚠️__CAUTION__⚠️ Unlike "Prelude" version, 'error' takes
t'Relude.String.Reexport.Text' as an argument. In case it used by mistake,
the user will see the following:

>>> error ("oops" :: String)
...
... 'error' expects 'Text' but was given 'String'.
Possible fixes:
* Make sure OverloadedStrings extension is enabled
* Use 'error (toText msg)' instead of 'error msg'
...
>>> error False
...
... 'error' works with 'Text'
But given: Bool
...
-}
error
:: forall (r :: RuntimeRep) (a :: TYPE r) (t :: Type) .
Expand Down Expand Up @@ -303,7 +290,7 @@

-- | Similar to 'undefined' but data type.
data Undefined = Undefined
deriving stock (Eq, Ord, Show, Read, Enum, Bounded, Data, Typeable, Generic)

Check warning on line 293 in src/Relude/Debug.hs

View workflow job for this annotation

GitHub Actions / windows-latest / ghc 9.12.1

• Deriving ‘Typeable’ has no effect: all types now auto-derive Typeable

Check warning on line 293 in src/Relude/Debug.hs

View workflow job for this annotation

GitHub Actions / windows-latest / ghc 9.14.1

• Deriving ‘Typeable’ has no effect: all types now auto-derive Typeable

Check warning on line 293 in src/Relude/Debug.hs

View workflow job for this annotation

GitHub Actions / macOS-latest / ghc 9.14.1

• Deriving ‘Typeable’ has no effect: all types now auto-derive Typeable

Check warning on line 293 in src/Relude/Debug.hs

View workflow job for this annotation

GitHub Actions / macOS-latest / ghc 9.12.1

• Deriving ‘Typeable’ has no effect: all types now auto-derive Typeable

Check warning on line 293 in src/Relude/Debug.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest / ghc 9.12.1

• Deriving ‘Typeable’ has no effect: all types now auto-derive Typeable

Check warning on line 293 in src/Relude/Debug.hs

View workflow job for this annotation

GitHub Actions / ubuntu-latest / ghc 9.14.1

• Deriving ‘Typeable’ has no effect: all types now auto-derive Typeable
{-# WARNING Undefined "'Undefined' type remains in code" #-}

-- | 'Prelude.undefined' that leaves warning in code on every usage.
Expand Down
72 changes: 0 additions & 72 deletions src/Relude/List/NonEmpty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -194,24 +194,6 @@ but it was given a more complex type to provide friendlier compile time errors.

>>> head ('a' :| "bcde")
'a'
>>> head [0..5 :: Int]
...
... 'head' works with 'NonEmpty', not ordinary lists.
Possible fix:
Replace: [Int]
With: NonEmpty Int
...
However, you can use 'head' with the ordinary lists.
Apply 'viaNonEmpty' function from relude:
viaNonEmpty head (yourList)
Note, that this will return 'Maybe Int'
therefore it is a safe function unlike 'head' from the standard Prelude
...
>>> head (Just 'a')
...
... 'head' works with 'NonEmpty Char' lists
But given: Maybe Char
...
-}
head :: IsNonEmpty f a a "head" => f a -> a
head = NE.head
Expand All @@ -230,24 +212,6 @@ but it was given a more complex type to provide friendlier compile time errors.

>>> init ('a' :| "bcde")
"abcd"
>>> init [0..5 :: Int]
...
... 'init' works with 'NonEmpty', not ordinary lists.
Possible fix:
Replace: [Int]
With: NonEmpty Int
...
However, you can use 'init' with the ordinary lists.
Apply 'viaNonEmpty' function from relude:
viaNonEmpty init (yourList)
Note, that this will return 'Maybe [Int]'
therefore it is a safe function unlike 'init' from the standard Prelude
...
>>> init (Just 'a')
...
... 'init' works with 'NonEmpty Char' lists
But given: Maybe Char
...
-}
init :: IsNonEmpty f a [a] "init" => f a -> [a]
init = NE.init
Expand All @@ -265,24 +229,6 @@ but it was given a more complex type to provide friendlier compile time errors.

>>> last ('a' :| "bcde")
'e'
>>> last [0..5 :: Int]
...
... 'last' works with 'NonEmpty', not ordinary lists.
Possible fix:
Replace: [Int]
With: NonEmpty Int
...
However, you can use 'last' with the ordinary lists.
Apply 'viaNonEmpty' function from relude:
viaNonEmpty last (yourList)
Note, that this will return 'Maybe Int'
therefore it is a safe function unlike 'last' from the standard Prelude
...
>>> last (Just 'a')
...
... 'last' works with 'NonEmpty Char' lists
But given: Maybe Char
...
-}
last :: IsNonEmpty f a a "last" => f a -> a
last = NE.last
Expand All @@ -301,24 +247,6 @@ but it was given a more complex type to provide friendlier compile time errors.

>>> tail ('a' :| "bcde")
"bcde"
>>> tail [0..5 :: Int]
...
... 'tail' works with 'NonEmpty', not ordinary lists.
Possible fix:
Replace: [Int]
With: NonEmpty Int
...
However, you can use 'tail' with the ordinary lists.
Apply 'viaNonEmpty' function from relude:
viaNonEmpty tail (yourList)
Note, that this will return 'Maybe [Int]'
therefore it is a safe function unlike 'tail' from the standard Prelude
...
>>> tail (Just 'a')
...
... 'tail' works with 'NonEmpty Char' lists
But given: Maybe Char
...
-}
tail :: IsNonEmpty f a [a] "tail" => f a -> [a]
tail = NE.tail
Expand Down
52 changes: 0 additions & 52 deletions src/Relude/String/Reexport.hs
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,6 @@ but it was given a more complex type to provide friendlier compile time errors.
["one line"]
>>> lines "line 1\nline 2"
["line 1","line 2"]
>>> lines ("string line" :: String)
...
... 'lines' works with 'Text', not 'String'.
Possible fixes:
1. Make sure OverloadedStrings extension is enabled.
2. Apply 'toText' to a single value.
3. Apply 'map toText' to the list value.
...
>>> lines True
...
... 'lines' works with 'Text'
But given: 'Bool'
...
-}
lines :: IsText t "lines" => t -> [t]
lines = Text.lines
Expand All @@ -140,19 +127,6 @@ but it was given a more complex type to provide friendlier compile time errors.
"line 1\n"
>>> unlines ["first line", "second line"]
"first line\nsecond line\n"
>>> unlines (["line 1", "line 2"] :: [String])
...
... 'unlines' works with 'Text', not 'String'.
Possible fixes:
1. Make sure OverloadedStrings extension is enabled.
2. Apply 'toText' to a single value.
3. Apply 'map toText' to the list value.
...
>>> unlines [True, False]
...
... 'unlines' works with 'Text'
But given: 'Bool'
...
-}
unlines :: IsText t "unlines" => [t] -> t
unlines = Text.unlines
Expand All @@ -174,19 +148,6 @@ but it was given a more complex type to provide friendlier compile time errors.
["one","line"]
>>> words " >_< "
[">_<"]
>>> words ("string words" :: String)
...
... 'words' works with 'Text', not 'String'.
Possible fixes:
1. Make sure OverloadedStrings extension is enabled.
2. Apply 'toText' to a single value.
3. Apply 'map toText' to the list value.
...
>>> words True
...
... 'words' works with 'Text'
But given: 'Bool'
...
-}
words :: IsText t "words" => t -> [t]
words = Text.words
Expand All @@ -208,19 +169,6 @@ but it was given a more complex type to provide friendlier compile time errors.
"singleWord"
>>> unwords ["word", "another"]
"word another"
>>> unwords (["word", "another"] :: [String])
...
... 'unwords' works with 'Text', not 'String'.
Possible fixes:
1. Make sure OverloadedStrings extension is enabled.
2. Apply 'toText' to a single value.
3. Apply 'map toText' to the list value.
...
>>> unwords [True, False]
...
... 'unwords' works with 'Text'
But given: 'Bool'
...
-}
unwords :: IsText t "unwords" => [t] -> t
unwords = Text.unwords
Expand Down
Loading