Add notices about multidimensional arrays

This commit is contained in:
Nikita Volkov 2019-05-27 20:43:46 +03:00
parent 3fcbcb23ba
commit de0e34b62e
2 changed files with 9 additions and 0 deletions

View File

@ -367,6 +367,9 @@ This function is merely a shortcut to the following expression:
@ @
('array' . 'dimension' Control.Monad.'replicateM' . 'element') ('array' . 'dimension' Control.Monad.'replicateM' . 'element')
@ @
Please notice that in case of multidimensional arrays nesting 'listArray' decoder
won't work. You have to explicitly construct the array decoder using 'array'.
-} -}
{-# INLINE listArray #-} {-# INLINE listArray #-}
listArray :: NullableOrNot Value element -> Value [element] listArray :: NullableOrNot Value element -> Value [element]
@ -380,6 +383,9 @@ This function is merely a shortcut to the following expression:
@ @
('array' . 'dimension' Data.Vector.Generic.'GenericVector.replicateM' . 'element') ('array' . 'dimension' Data.Vector.Generic.'GenericVector.replicateM' . 'element')
@ @
Please notice that in case of multidimensional arrays nesting 'vectorArray' decoder
won't work. You have to explicitly construct the array decoder using 'array'.
-} -}
{-# INLINE vectorArray #-} {-# INLINE vectorArray #-}
vectorArray :: GenericVector.Vector vector element => NullableOrNot Value element -> Value (vector element) vectorArray :: GenericVector.Vector vector element => NullableOrNot Value element -> Value (vector element)

View File

@ -316,6 +316,9 @@ This function is merely a shortcut to the following expression:
@ @
('array' . 'dimension' 'foldl'' . 'element') ('array' . 'dimension' 'foldl'' . 'element')
@ @
Please notice that in case of multidimensional arrays nesting 'foldableArray' encoder
won't work. You have to explicitly construct the array encoder using 'array'.
-} -}
{-# INLINE foldableArray #-} {-# INLINE foldableArray #-}
foldableArray :: Foldable foldable => NullableOrNot Value element -> Value (foldable element) foldableArray :: Foldable foldable => NullableOrNot Value element -> Value (foldable element)