diff --git a/semantic-python/src/Language/Python/Core.hs b/semantic-python/src/Language/Python/Core.hs index 8c024ef33..75d8dd79a 100644 --- a/semantic-python/src/Language/Python/Core.hs +++ b/semantic-python/src/Language/Python/Core.hs @@ -14,3 +14,6 @@ class Compile t where instance Compile Py.Module where compile (Module Nothing) = pure Unit compile (Module (Just _)) = pure Unit + +instance (Compile l, Compile r) => Compile (Either l r) where + compile = either compile compile