diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c88bd3..780bb73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/relude.cabal b/relude.cabal index ab5aa36..1dfb050 100644 --- a/relude.cabal +++ b/relude.cabal @@ -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 diff --git a/src/Relude/Debug.hs b/src/Relude/Debug.hs index c2dc564..a6f5d1d 100644 --- a/src/Relude/Debug.hs +++ b/src/Relude/Debug.hs @@ -261,19 +261,6 @@ error handling mechanism. ⚠️__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) . diff --git a/src/Relude/List/NonEmpty.hs b/src/Relude/List/NonEmpty.hs index aa73265..6b7855f 100644 --- a/src/Relude/List/NonEmpty.hs +++ b/src/Relude/List/NonEmpty.hs @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/src/Relude/String/Reexport.hs b/src/Relude/String/Reexport.hs index c294b77..54087db 100644 --- a/src/Relude/String/Reexport.hs +++ b/src/Relude/String/Reexport.hs @@ -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 @@ -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 @@ -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 @@ -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