zwirn-0.2.2.0: src/zwirn-core/Zwirn/Core/Lib/Text.hs
module Zwirn.Core.Lib.Text where
{-
Text.hs - lifting functions on text to signals
Copyright (C) 2025, Martin Gius
This library is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this library. If not, see <http://www.gnu.org/licenses/>.
-}
import qualified Data.Text as T
import Zwirn.Core.Core ()
import Zwirn.Core.Types
append :: (MultiApplicative k) => ZwirnT k st i T.Text -> ZwirnT k st i T.Text -> ZwirnT k st i T.Text
append = liftA2Left T.append
length :: (Functor k) => ZwirnT k st i T.Text -> ZwirnT k st i Int
length = fmap T.length