@@ -26,9 +26,6 @@ module Data.Syntax.Combinator
2626 sepBy,
2727 sepBy1,
2828
29− -- * Arrowized combinators.
30− takeArr,
31−
3229 -- * Vectors.
3330 vecNSepBy,
3431 ivecNSepBy,
@@ -51,11 +48,10 @@ import Control.Category.Structures
5148import Control.Lens
5249import Control.Lens.SemiIso
5350import Control.SIArrow
54−import qualified Data.MonoTraversable as Seq
5551import Data.Syntax
5652import qualified Data.Vector as V
5753import qualified Data.Vector.Unboxed as VU
58−import Prelude hiding (id, (.), take)
54+import Prelude hiding (id, (.))
5955
6056-- | One or zero occurences of @f@.
6157optional :: SIArrow cat => cat () a -> cat () (Maybe a)
@@ -93,11 +89,6 @@ sepBy v s = sepBy1 v s /+/ sipure _Empty
9389sepBy1 :: SIArrow cat => cat () a -> cat () () -> cat () [a]
9490sepBy1 v s = _Cons /$/ v /*/ (s */ sepBy1 v s /+/ sipure _Empty)
9591
96−-- | A string of given length.
97−takeArr :: Syntax syn => syn Int (Seq syn)
98−takeArr = sibind $ iso (\n -> constant n #>> take n)
99− (\s -> constant (Seq.olength s) #>> take (Seq.olength s))
100−
10192-- | Constant size vector with separators.
10293--
10394-- @vecNSepBy n e sep@ describes a size @n@ vector with elements @e@ separated by @sep@.