: , Int
, , fromIntegral
. ( , fi = fromIntegral
, .)
- . , . Int
, ( 30- , 32- GHC 32- ), , , Integer
( bignum, ). , . 5-10 , Int
Integer
s.
:
depth :: Expr -> Integer
depth :: (Num a) => Expr -> a
, Int
, , . , , , Int
, , .
:
-, generic*
Data.List
. , genericLength
GHC 0.29, 1996 . length
genericLength
, :
length :: [a] -> Int
length = genericLength
GHC 0.29 #ifdef USE_REPORT_PRELUDE
, length
. generic*
0.29, GHC 4.02 (1998).
, Prelude
length
Foldable
s, ( GHC 7.10?), , genericLength
. , - , " " Haskell. .
-, lazy/strict ByteString
/Text
. , conduit-xml
ByteString
Text
, . conduit-xml
Text
, ByteString
s, , Text
, . , depth
Int
, , , fromInteger . depth
, .
-, , Integer
" " , . , depth
count
, , , , .
-, , . GHC , memoization .
, , Data.List
, Int
s.