Skip to content
This repository was archived by the owner on Feb 7, 2026. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Aws/DynamoDb/Core.hs
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ import Data.Tagged
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
import Data.Time
import Data.Traversable (traverse)
import Data.Typeable
import qualified Data.Vector as V
import Data.Word
Expand Down Expand Up @@ -379,6 +380,18 @@ instance DynVal Double where
fromRep (DynNumber i) = Just $ toRealFloat i
toRep i = DynNumber (fromFloatDigits i)

instance DynVal a => DynVal (V.Vector a) where
type DynRep (V.Vector a) = DValue
toRep v = DList $ fmap toValue v
fromRep (DList l) = traverse fromValue l
fromRep _ = Nothing

instance DynVal a => DynVal (M.Map T.Text a) where
type DynRep (M.Map T.Text a) = DValue
toRep m = DMap $ fmap toValue m
fromRep (DMap m) = traverse fromValue m
fromRep _ = Nothing


-------------------------------------------------------------------------------
-- | Encoded as number of days
Expand Down