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

Commit bd9aaa5

Browse files
committed
Really really.
1 parent 4e24a1e commit bd9aaa5

File tree

1 file changed

+8
-6
lines changed
  • semantic-python/src/Language/Python

1 file changed

+8
-6
lines changed

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,13 @@ defaultCompile t = fail $ "compilation unimplemented for " <> show t
2121
instance (Compile l, Compile r) => Compile (Either l r) where
2222
compile = either compile compile
2323

24-
instance Compile Py.Module where
25-
compile (Module Nothing) = pure Unit
26-
compile (Module (Just statements)) = block <$> traverse compile statements
27-
28-
deriving via CompileSum Py.CompoundStatement instance Compile Py.CompoundStatement
29-
3024
instance Compile Py.AssertStatement
3125
instance Compile Py.Block
3226
instance Compile Py.BreakStatement
3327
instance Compile Py.ClassDefinition
28+
29+
deriving via CompileSum Py.CompoundStatement instance Compile Py.CompoundStatement
30+
3431
instance Compile Py.ContinueStatement
3532
instance Compile Py.DecoratedDefinition
3633
instance Compile Py.DeleteStatement
@@ -51,6 +48,11 @@ instance Compile Py.IfStatement where
5148

5249
instance Compile Py.ImportFromStatement
5350
instance Compile Py.ImportStatement
51+
52+
instance Compile Py.Module where
53+
compile (Module Nothing) = pure Unit
54+
compile (Module (Just statements)) = block <$> traverse compile statements
55+
5456
instance Compile Py.NonlocalStatement
5557
instance Compile Py.PassStatement
5658
instance Compile Py.PrintStatement

0 commit comments

Comments
 (0)