@@ -21,28 +21,39 @@ defaultCompile t = fail $ "compilation unimplemented for " <> show t
2121instance (Compile l , Compile r ) => Compile (Either l r ) where compile = compileSum
2222
2323instance Compile Py. AssertStatement
24+ instance Compile Py. Attribute
2425instance Compile Py. Await
26+ instance Compile Py. BinaryOperator
2527instance Compile Py. Block
2628instance Compile Py. BooleanOperator
2729instance Compile Py. BreakStatement
30+ instance Compile Py. Call
2831instance Compile Py. ClassDefinition
2932instance Compile Py. ComparisonOperator
3033
3134instance Compile Py. CompoundStatement where compile = compileSum
3235
36+ instance Compile Py. ConcatenatedString
3337instance Compile Py. ConditionalExpression
3438instance Compile Py. ContinueStatement
3539instance Compile Py. DecoratedDefinition
3640instance Compile Py. DeleteStatement
41+ instance Compile Py. Dictionary
42+ instance Compile Py. DictionaryComprehension
43+ instance Compile Py. Ellipsis
3744instance Compile Py. ExecStatement
3845
3946instance Compile Py. Expression where compile = compileSum
4047
4148instance Compile Py. ExpressionStatement
49+ instance Compile Py. False
50+ instance Compile Py. Float
4251instance Compile Py. ForStatement
4352instance Compile Py. FunctionDefinition
4453instance Compile Py. FutureImportStatement
54+ instance Compile Py. GeneratorExpression
4555instance Compile Py. GlobalStatement
56+ instance Compile Py. Identifier
4657
4758instance Compile Py. IfStatement where
4859 compile IfStatement {.. } = If <$> compile condition <*> compile consequence <*> case alternative of
@@ -53,24 +64,39 @@ instance Compile Py.IfStatement where
5364
5465instance Compile Py. ImportFromStatement
5566instance Compile Py. ImportStatement
67+ instance Compile Py. Integer
68+ instance Compile Py. KeywordIdentifier
5669instance Compile Py. Lambda
70+ instance Compile Py. List
71+ instance Compile Py. ListComprehension
5772
5873instance Compile Py. Module where
5974 compile (Module Nothing ) = pure Unit
6075 compile (Module (Just statements)) = block <$> traverse compile statements
6176
6277instance Compile Py. NamedExpression
78+ instance Compile Py. None
6379instance Compile Py. NonlocalStatement
6480instance Compile Py. NotOperator
81+ instance Compile Py. ParenthesizedExpression
6582instance Compile Py. PassStatement
66- instance Compile Py. PrimaryExpression
83+
84+ instance Compile Py. PrimaryExpression where compile = compileSum
85+
6786instance Compile Py. PrintStatement
6887instance Compile Py. ReturnStatement
6988instance Compile Py. RaiseStatement
89+ instance Compile Py. Set
90+ instance Compile Py. SetComprehension
7091
7192instance Compile Py. SimpleStatement where compile = compileSum
7293
94+ instance Compile Py. String
95+ instance Compile Py. Subscript
96+ instance Compile Py. True
7397instance Compile Py. TryStatement
98+ instance Compile Py. Tuple
99+ instance Compile Py. UnaryOperator
74100instance Compile Py. WhileStatement
75101instance Compile Py. WithStatement
76102
@@ -95,4 +121,5 @@ instance Compile t => GCompileSum (M1 C c (M1 S s (K1 R t))) where
95121-- FIXME: depend on https://github.com/tree-sitter/haskell-tree-sitter/pull/90 so we can get rid of these orphan instances
96122deriving instance Generic Py. CompoundStatement
97123deriving instance Generic Py. Expression
124+ deriving instance Generic Py. PrimaryExpression
98125deriving instance Generic Py. SimpleStatement
0 commit comments