@@ -3,11 +3,11 @@ module Language.Python.Core
33( compile
44) where
55
6- import Control.Monad.Fail
7- import Data.Core as Core
8- import GHC.Generics
9- import Prelude hiding (fail )
10- import TreeSitter.Python.AST as Py
6+ import Control.Monad.Fail
7+ import Data.Core as Core
8+ import GHC.Generics
9+ import Prelude hiding (fail )
10+ import qualified TreeSitter.Python.AST as Py
1111
1212class Compile t where
1313 -- FIXME: we should really try not to fail
@@ -47,7 +47,7 @@ instance Compile Py.Expression where compile = compileSum
4747
4848instance Compile Py. ExpressionStatement
4949
50- instance Compile Py. False where compile _ = pure (Bool Prelude. False )
50+ instance Compile Py. False where compile _ = pure (Bool False )
5151
5252instance Compile Py. Float
5353instance Compile Py. ForStatement
@@ -58,11 +58,11 @@ instance Compile Py.GlobalStatement
5858instance Compile Py. Identifier
5959
6060instance Compile Py. IfStatement where
61- compile IfStatement {.. } = If <$> compile condition <*> compile consequence <*> case alternative of
62- Nothing -> pure Unit
61+ compile Py. IfStatement {.. } = If <$> compile condition <*> compile consequence <*> case alternative of
62+ Nothing -> pure Unit
6363 Just clauses -> foldr clause (pure Unit ) clauses
64- where clause (Left ElifClause {.. }) rest = If <$> compile condition <*> compile consequence <*> rest
65- clause (Right ElseClause {.. }) _ = compile body
64+ where clause (Left Py. ElifClause {.. }) rest = If <$> compile condition <*> compile consequence <*> rest
65+ clause (Right Py. ElseClause {.. }) _ = compile body
6666
6767instance Compile Py. ImportFromStatement
6868instance Compile Py. ImportStatement
@@ -73,8 +73,8 @@ instance Compile Py.List
7373instance Compile Py. ListComprehension
7474
7575instance Compile Py. Module where
76- compile (Module Nothing ) = pure Unit
77- compile (Module (Just statements)) = block <$> traverse compile statements
76+ compile (Py. Module Nothing ) = pure Unit
77+ compile (Py. Module (Just statements)) = block <$> traverse compile statements
7878
7979instance Compile Py. NamedExpression
8080instance Compile Py. None
@@ -96,7 +96,7 @@ instance Compile Py.SimpleStatement where compile = compileSum
9696instance Compile Py. String
9797instance Compile Py. Subscript
9898
99- instance Compile Py. True where compile _ = pure (Bool Prelude. True )
99+ instance Compile Py. True where compile _ = pure (Bool True )
100100
101101instance Compile Py. TryStatement
102102instance Compile Py. Tuple
0 commit comments