Gave the code generator a proper module name.
This commit is contained in:
parent
bff75bb00b
commit
832efbcdd8
4 changed files with 9 additions and 9 deletions
|
|
@ -38,8 +38,8 @@ executable language
|
||||||
TypeChecker
|
TypeChecker
|
||||||
TypeCheckerIr
|
TypeCheckerIr
|
||||||
-- Interpreter
|
-- Interpreter
|
||||||
Compiler
|
Codegen.Codegen
|
||||||
LlvmIr
|
Codegen.LlvmIr
|
||||||
hs-source-dirs: src
|
hs-source-dirs: src
|
||||||
|
|
||||||
build-depends:
|
build-depends:
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,13 @@
|
||||||
{-# LANGUAGE LambdaCase #-}
|
{-# LANGUAGE LambdaCase #-}
|
||||||
{-# LANGUAGE OverloadedStrings #-}
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
|
||||||
module Compiler (compile) where
|
module Codegen.Codegen (compile) where
|
||||||
|
|
||||||
import Auxiliary (snoc)
|
import Auxiliary (snoc)
|
||||||
|
import Codegen.LlvmIr (CallingConvention (..), LLVMComp (..),
|
||||||
|
LLVMIr (..), LLVMType (..),
|
||||||
|
LLVMValue (..), Visibility (..),
|
||||||
|
llvmIrToString)
|
||||||
import Control.Monad.State (StateT, execStateT, foldM, foldM_, gets,
|
import Control.Monad.State (StateT, execStateT, foldM, foldM_, gets,
|
||||||
modify)
|
modify)
|
||||||
import qualified Data.Bifunctor as BI
|
import qualified Data.Bifunctor as BI
|
||||||
|
|
@ -14,10 +18,6 @@ import qualified Data.Map as Map
|
||||||
import Data.Tuple.Extra (dupe, first, second)
|
import Data.Tuple.Extra (dupe, first, second)
|
||||||
import qualified Grammar.Abs as GA
|
import qualified Grammar.Abs as GA
|
||||||
import Grammar.ErrM (Err)
|
import Grammar.ErrM (Err)
|
||||||
import LlvmIr (CallingConvention (..), LLVMComp (..),
|
|
||||||
LLVMIr (..), LLVMType (..),
|
|
||||||
LLVMValue (..), Visibility (..),
|
|
||||||
llvmIrToString)
|
|
||||||
import System.Process.Extra (readCreateProcess, shell)
|
import System.Process.Extra (readCreateProcess, shell)
|
||||||
import TypeCheckerIr (Bind (..), Case (..), Exp (..), Id,
|
import TypeCheckerIr (Bind (..), Case (..), Exp (..), Id,
|
||||||
Ident (..), Program (..), Type (..))
|
Ident (..), Program (..), Type (..))
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{-# LANGUAGE LambdaCase #-}
|
{-# LANGUAGE LambdaCase #-}
|
||||||
|
|
||||||
module LlvmIr (
|
module Codegen.LlvmIr (
|
||||||
LLVMType (..),
|
LLVMType (..),
|
||||||
LLVMIr (..),
|
LLVMIr (..),
|
||||||
llvmIrToString,
|
llvmIrToString,
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
module Main where
|
module Main where
|
||||||
|
|
||||||
import Compiler (compile)
|
import Codegen.Codegen (compile)
|
||||||
import GHC.IO.Handle.Text (hPutStrLn)
|
import GHC.IO.Handle.Text (hPutStrLn)
|
||||||
import Grammar.ErrM (Err)
|
import Grammar.ErrM (Err)
|
||||||
import Grammar.Par (myLexer, pProgram)
|
import Grammar.Par (myLexer, pProgram)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue