File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ import Data.Foldable (foldr)
88import Data.Generic (class Generic , GenericSpine (..), toSpine )
99import Data.Int (toNumber )
1010import Data.List (List (..), (:), toUnfoldable )
11+ import Data.List as L
12+
1113import Data.Map as M
1214import Data.Maybe (Maybe (..))
1315import Data.NonEmpty (NonEmpty (..))
@@ -79,7 +81,7 @@ instance encodeJsonNonEmptyArray :: (EncodeJson a) => EncodeJson (NonEmpty Array
7981 encodeJson (NonEmpty h t) = encodeJson $ Arr .cons h t
8082
8183instance encodeJsonNonEmptyList :: (EncodeJson a ) => EncodeJson (NonEmpty List a ) where
82- encodeJson (NonEmpty h t) = encodeJson $ Arr .cons h (toUnfoldable t)
84+ encodeJson (NonEmpty h t) = encodeJson $ L .insertAt 0 h t
8385
8486instance encodeJsonChar :: EncodeJson Char where
8587 encodeJson = encodeJson <<< singleton
You can’t perform that action at this time.
0 commit comments