Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 2367717

Browse files
committed
Derive the Either instance.
1 parent bd9aaa5 commit 2367717

File tree

1 file changed

+1
-2
lines changed
  • semantic-python/src/Language/Python

1 file changed

+1
-2
lines changed

semantic-python/src/Language/Python/Core.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ class Compile t where
1818
defaultCompile :: (MonadFail m, Show t) => t -> m Core
1919
defaultCompile t = fail $ "compilation unimplemented for " <> show t
2020

21-
instance (Compile l, Compile r) => Compile (Either l r) where
22-
compile = either compile compile
21+
deriving via CompileSum (Either l r) instance (Compile l, Compile r) => Compile (Either l r)
2322

2423
instance Compile Py.AssertStatement
2524
instance Compile Py.Block

0 commit comments

Comments
 (0)