From 9d0afb4f0a56fc129b1f5099c0a1356b8695499c Mon Sep 17 00:00:00 2001 From: Patrick Thomson Date: Tue, 17 Dec 2019 13:25:59 -0500 Subject: [PATCH] Compile not statements. --- semantic-python/src/Language/Python/Core.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/semantic-python/src/Language/Python/Core.hs b/semantic-python/src/Language/Python/Core.hs index 1035ac406..556cd03ce 100644 --- a/semantic-python/src/Language/Python/Core.hs +++ b/semantic-python/src/Language/Python/Core.hs @@ -350,7 +350,11 @@ instance Compile Py.None where compile _it cc _ = cc (prelude ["None"]) instance Compile Py.NonlocalStatement -instance Compile Py.NotOperator + +instance Compile Py.NotOperator where + compile _it@Py.NotOperator{ argument } cc next = do + val <- compile argument pure next + cc (prelude ["not"] $$ val) instance Compile Py.ParenthesizedExpression where compile it@Py.ParenthesizedExpression { extraChildren } cc