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

Commit 9088708

Browse files
committed
Compile boolean literals.
1 parent eb72442 commit 9088708

File tree

1 file changed

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

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ instance Compile Py.ExecStatement
4646
instance Compile Py.Expression where compile = compileSum
4747

4848
instance Compile Py.ExpressionStatement
49-
instance Compile Py.False
49+
50+
instance Compile Py.False where compile _ = pure (Bool Prelude.False)
51+
5052
instance Compile Py.Float
5153
instance Compile Py.ForStatement
5254
instance Compile Py.FunctionDefinition
@@ -93,7 +95,9 @@ instance Compile Py.SimpleStatement where compile = compileSum
9395

9496
instance Compile Py.String
9597
instance Compile Py.Subscript
96-
instance Compile Py.True
98+
99+
instance Compile Py.True where compile _ = pure (Bool Prelude.True)
100+
97101
instance Compile Py.TryStatement
98102
instance Compile Py.Tuple
99103
instance Compile Py.UnaryOperator

0 commit comments

Comments
 (0)