@@ -200,6 +200,14 @@ instance Result TimeOfDay where
200200 case makeTimeOfDayValid hours mins (fromIntegral secs) of
201201 Just t -> return (pure t)
202202 _ -> return (returnError ConversionFailed f "could not parse")
203+
204+instance (Result a, Result b) => Result (Either a b) where
205+ convert f dat = case convert f dat of
206+ Right x -> Right (Right x)
207+ Left _ -> case convert f dat of
208+ Right x -> Right (Left x)
209+ Left e -> Left e
210+
203211newtype Compat = Compat Word64
204212
205213mkCompats :: [BuiltinType] -> Compat