vector-circular 0.1.3 → 0.1.4
raw patch · 5 files changed
+40/−60 lines, 5 filesdep −doctestdep ~basedep ~template-haskell
Dependencies removed: doctest
Dependency ranges changed: base, template-haskell
Files
- changelog.md +17/−2
- src/Data/Vector/Circular.hs +5/−8
- src/Data/Vector/Circular/Generic.hs +4/−2
- test/doctests.hs +0/−34
- vector-circular.cabal +14/−14
changelog.md view
@@ -1,5 +1,20 @@-# Revision history for fun+# Revision history for vector-circular -## 0.1.0.0 -- YYYY-mm-dd+## 0.1.4 -- 2022-01-23+* Bump bounds on and support {base,template-haskell} +## 0.1.3 -- 2021-01-25+* Add `filter`++## 0.1.2 -- 2021-06-10+* Add convenience functions that match the API of Data.Vector.NonEmpty+* Add Data.Vector.Circular.Generic as a mirror of Data.Vector.Generic+* Add doctests++## 0.1.1 -- 2020-12-12+* Derive Generic, Traversable, and NFData+* Define a lot of special folds+* Implement more of the `vector` api++## 0.1 -- 2020-05-11 * First version. Released on an unsuspecting world.
src/Data/Vector/Circular.hs view
@@ -326,9 +326,11 @@ pure $ ConE ''CircularVector `AppE` (VarE 'NonEmpty.unsafeFromVector `AppE` v) `AppE` r-#if MIN_VERSION_template_haskell(2,16,0)+#if MIN_VERSION_template_haskell(2,17,0)+ liftTyped = unsafeCodeCoerce . lift+#elif MIN_VERSION_template_haskell(2,16,0) liftTyped = unsafeTExpCoerce . lift-#endif /* MIN_VERSION_template_haskell(2,16,0) */+#endif -- | Get the length of a 'CircularVector'. --@@ -555,12 +557,7 @@ -- @since 0.1 vec :: Lift a => [a] -> Q (TExp (CircularVector a)) vec [] = fail "Cannot create an empty CircularVector!"-vec xs =-#if MIN_VERSION_template_haskell(2,16,0)- liftTyped (unsafeFromList xs)-#else- unsafeTExpCoerce [|unsafeFromList xs|]-#endif /* MIN_VERSION_template_haskell(2,16,0) */+vec xs = unsafeTExpCoerce (lift (unsafeFromList xs)) -- | @since 0.1 equivalent :: Ord a => CircularVector a -> CircularVector a -> Bool
src/Data/Vector/Circular/Generic.hs view
@@ -327,9 +327,11 @@ pure $ ConE ''CircularVector `AppE` v `AppE` r-#if MIN_VERSION_template_haskell(2,16,0)+#if MIN_VERSION_template_haskell(2,17,0)+ liftTyped = unsafeCodeCoerce . lift+#elif MIN_VERSION_template_haskell(2,16,0) liftTyped = unsafeTExpCoerce . lift-#endif /* MIN_VERSION_template_haskell(2,16,0) */+#endif -- | Get the length of a 'CircularVector'. --
− test/doctests.hs
@@ -1,34 +0,0 @@-module Main (main) where--import Test.DocTest---main :: IO ()-main = doctest $ ["-isrc" ] ++ ghcExts ++ files---ghcExts :: [String]-ghcExts = map ("-X" ++)- [ "Haskell2010"- , "TypeApplications"- ]--files :: [String]-files = map toFile modules---toFile :: String -> String-toFile = (\s -> "src/" <> s <> ".hs") . replace '.' '/'--replace :: Eq a => a -> a -> [a] -> [a]-replace a b = go- where- go [] = []- go (c:cs) | c == a = b:go cs- | otherwise = c:go cs--modules :: [String]-modules =- [ "Data.Vector.Circular"- , "Data.Vector.Circular.Generic"- ]
vector-circular.cabal view
@@ -2,11 +2,11 @@ name: vector-circular version:- 0.1.3+ 0.1.4 synopsis: circular vectors description:- nonempty circular vector data structure library. indexing always total+ nonempty circular vector data structure library. indexing is always total bug-reports: https://github.com/chessai/vector-circular.git license:@@ -36,7 +36,7 @@ , nonempty-vector >= 0.2 && < 0.3 , primitive >= 0.6.4 && < 0.8 , semigroupoids >= 5.3 && < 5.4- , template-haskell >= 2.12 && < 2.17+ , template-haskell >= 2.12 && < 2.19 , vector >= 0.12 && < 0.13 , deepseq >= 1.4 && < 1.5 ghc-options:@@ -60,17 +60,17 @@ default-language: Haskell2010 -test-suite doctests- if os(windows)- buildable: False- type: exitcode-stdio-1.0- ghc-options: -threaded- hs-source-dirs: test- main-is: doctests.hs- build-depends: base- , doctest >= 0.8-- default-language: Haskell2010+--test-suite doctests+-- if os(windows)+-- buildable: False+-- type: exitcode-stdio-1.0+-- ghc-options: -threaded+-- hs-source-dirs: test+-- main-is: doctests.hs+-- build-depends: base+-- , doctest >= 0.8+--+-- default-language: Haskell2010 source-repository head