{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE Safe #-}
module Cardano.Prelude.Base
( module X
, identity
, putTextLn
, length
)
where
import Protolude as X
hiding ( Hashable
, Map
, hash
, hashUsing
, hashWithSalt
, identity
, length
, witness
, (.)
)
import qualified Protolude as Y
import Data.Map.Strict as X (Map)
import qualified Data.Text as T
import Control.Category (id)
import Control.Category as X hiding (id)
import Numeric.Natural as X
identity :: Category cat => cat a a
identity :: cat a a
identity = cat a a
forall k (cat :: k -> k -> *) (a :: k). Category cat => cat a a
id
putTextLn :: Text -> IO ()
putTextLn :: Text -> IO ()
putTextLn = Text -> IO ()
forall a (m :: * -> *). (Print a, MonadIO m) => a -> m ()
putStrLn
class HasLength a where
length' :: a -> Int
instance HasLength Text where
length' :: Text -> Int
length' = Text -> Int
T.length
instance Foldable t => HasLength (t a) where
length' :: t a -> Int
length' = t a -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
Y.length
length :: HasLength a => a -> Int
length :: a -> Int
length = a -> Int
forall a. HasLength a => a -> Int
length'