element :: NullableOrNot Value a -> Array a
element = \ case
  NonNullable (Value imp) -> Array (Array.nonNullValue (Value.run imp))
  Nullable (Value imp) -> Array (Array.value (Value.run imp))


-- * Composite decoders
-------------------------

{-|
Composable decoder of composite values (rows, records).
-}
element :: NullableOrNot Value a -> Array a
element = \ case
  NonNullable (Value imp) -> Array (Array.nonNullValue (Value.run imp))
  Nullable (Value imp) -> Array (Array.value (Value.run imp))


-- * Composite decoders
-------------------------

{-|
Composable decoder of composite values (rows, records).
-}
element = \ case
  NonNullable (Value imp) -> Array (Array.nonNullValue (Value.run imp))
  Nullable (Value imp) -> Array (Array.value (Value.run imp))


-- * Composite decoders
-------------------------

{-|
Composable decoder of composite values (rows, records).
-}