@@ -280,14 +280,11 @@ decodeTuple cont err json =
280280 Right $ cont a b
281281 _ -> Left $ err unit
282282
283−data Triple a b c = T1 a | T2 b | T3 c
284−
285283decodeTriple
286− :: forall fst sec trd res
284+ :: forall fst sec res
287285 . DecodeJson fst
288286 => DecodeJson sec
289− => DecodeJson trd
290− => (fst -> sec -> trd -> res)
287+ => (fst -> sec -> sec -> res)
291288 -> (forall a. a -> String)
292289 -> Json
293290 -> Either String res
@@ -297,11 +294,11 @@ decodeTriple cont err json =
297294 Just arrOfJsons -> do
298295 let arrayOfVariants =
299296 arrOfJsons <#> \variantJson ->
300− T1 <$> decodeJson variantJson <|>
301− T2 <$> decodeJson variantJson <|>
302− T3 <$> decodeJson variantJson
297+ Left <$> decodeJson variantJson <|>
298+ Right <$> decodeJson variantJson <|>
299+ Right <$> decodeJson variantJson
303300 case arrayOfVariants of
304− [ Right (T1 a), Right (T2 b), Right (T3 c) ] ->
301+ [ Right (Left a), Right (Right b), Right (Right c) ] ->
305302 Right $ cont a b c
306303 _ -> Left $ err unit
307304