Move Expr to Type.hs
parent
f7e64faed5
commit
b52fe34667
|
@ -17,6 +17,12 @@ Main repo: https://git.sudoer.ch/me/really-bad-compiler-in-haskell
|
|||
- Use `stack run <file>` to run the program (for example, `stack run example/1.hear`).
|
||||
- The LLVM will be generated as `a.out.ll`, and the executable will be generated as `a.out`.
|
||||
|
||||
## Currently Supported functionality
|
||||
|
||||
- Arithmetic
|
||||
- Parenthesis
|
||||
- print() statement
|
||||
|
||||
## To edit
|
||||
|
||||
I recommend using VSCodium, which is preconfigured to have syntax highlighting and (currently broken) debugging features and will automatically suggest the Haskell extensions to install.
|
||||
|
|
|
@ -18,7 +18,7 @@ executable really-bad-compiler-in-haskell
|
|||
other-modules:
|
||||
Main.LLVMGen
|
||||
Main.Parser.Megaparsec
|
||||
Main.Types.Expr
|
||||
Main.Type
|
||||
Paths_really_bad_compiler_in_haskell
|
||||
hs-source-dirs:
|
||||
src
|
||||
|
|
|
@ -22,7 +22,7 @@ import LLVM.IRBuilder.Constant
|
|||
import LLVM.IRBuilder.Instruction
|
||||
import LLVM.IRBuilder.Module
|
||||
import LLVM.IRBuilder.Monad
|
||||
import Main.Types.Expr as Expr
|
||||
import Main.Type as Expr
|
||||
|
||||
data Env = Env
|
||||
{ operands :: M.Map Text Operand,
|
||||
|
|
|
@ -8,7 +8,7 @@ import Control.Monad.Combinators.Expr
|
|||
import Data.Functor.Identity qualified
|
||||
import Data.Text
|
||||
import Data.Void (Void)
|
||||
import Main.Types.Expr
|
||||
import Main.Type
|
||||
import Text.Megaparsec as MP hiding (parse)
|
||||
import Text.Megaparsec qualified as MP
|
||||
import Text.Megaparsec.Char qualified as C
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
module Main.Types.Expr (Expr (..)) where
|
||||
module Main.Type (Expr (..)) where
|
||||
|
||||
data Expr
|
||||
= Lit Int
|
Reference in New Issue