File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -117,14 +117,14 @@ instance decodeJsonJson :: DecodeJson Json where
117117
118118toNonEmpty :: forall a f . (Plus f ) => ({ head :: f a -> Maybe a , tail :: f a -> Maybe (f a ) } ) -> (f a ) -> Either String (NonEmpty f a )
119119toNonEmpty i a = case (Tuple (i.head a) (i.tail a)) of
120- (Tuple Nothing _) -> Left " is empty."
120+ (Tuple Nothing _) -> Left " is empty."
121121 (Tuple (Just h) Nothing ) -> Right $ singleton h
122122 (Tuple (Just h) (Just t)) -> Right $ h :| t
123123
124124instance decodeJsonNonEmptyArray :: (DecodeJson a ) => DecodeJson (NonEmpty Array a ) where
125125 decodeJson
126- = lmap (" Couldn't decode Array: " <> _)
127- <<< (traverse decodeJson <=< (toNonEmpty { head : Arr .head, tail : Arr .tail } ) <=< decodeJArray)
126+ = lmap (" Couldn't decode NonEmpty Array: " <> _)
127+ <<< (traverse decodeJson <=< (lmap ( " Array " <> _) <<< toNonEmpty { head : Arr .head, tail : Arr .tail } ) <=< decodeJArray)
128128
129129instance decodeJsonNonEmptyList :: (DecodeJson a ) => DecodeJson (NonEmpty List a ) where
130130 decodeJson
You can’t perform that action at this time.
0 commit comments