From 3558633cda85024f2e9e3c2c6bb4aca289b1e3eb Mon Sep 17 00:00:00 2001 From: Bernhard Urban Date: Mon, 2 Apr 2012 21:40:00 +0200 Subject: [PATCH] src: move files into a Mate package hence, ghc(i) is able to figuring out the correct path --- Makefile | 4 ++-- Mate.hs | 2 +- {src => Mate}/BasicBlocks.hs | 4 ++-- {src => Mate}/RegisterAllocation.hs | 2 ++ {src => Mate}/Utilities.hs | 2 +- 5 files changed, 8 insertions(+), 6 deletions(-) rename {src => Mate}/BasicBlocks.hs (97%) rename {src => Mate}/RegisterAllocation.hs (97%) rename {src => Mate}/Utilities.hs (94%) diff --git a/Makefile b/Makefile index b82354e..3fcf204 100644 --- a/Makefile +++ b/Makefile @@ -10,13 +10,13 @@ test: mate %.class: %.java javac $< -trap.o mate: Mate.hs ./src/Utilities.hs trap.c +trap.o mate: Mate.hs trap.c ghc --make -Wall -O2 $^ -o mate clean: rm -f *.hi *.o mate src/*.class -tags: Mate.hs src/Utilities.hs trap.o +tags: Mate.hs Mate/Utilities.hs trap.o @# @-fforce-recomp, see @# http://stackoverflow.com/questions/7137414/how-do-i-force-interpretation-in-hint ghc -fforce-recomp -e :ctags $^ diff --git a/Mate.hs b/Mate.hs index f659455..a8e18e4 100644 --- a/Mate.hs +++ b/Mate.hs @@ -27,7 +27,7 @@ import Foreign.C.Types import Harpy import Harpy.X86Disassembler -import Utilities +import Mate.Utilities foreign import ccall "dynamic" code_void :: FunPtr (CInt -> IO CInt) -> (CInt -> IO CInt) diff --git a/src/BasicBlocks.hs b/Mate/BasicBlocks.hs similarity index 97% rename from src/BasicBlocks.hs rename to Mate/BasicBlocks.hs index e37979b..1db0710 100644 --- a/src/BasicBlocks.hs +++ b/Mate/BasicBlocks.hs @@ -1,5 +1,5 @@ {-# LANGUAGE OverloadedStrings #-} -module BasicBlocks where +module Mate.BasicBlocks where import Data.Binary import System.Environment @@ -12,7 +12,7 @@ import JVM.Converter import JVM.Dump import JVM.Assembler -import Utilities +import Mate.Utilities type Name = String -- use "virtual register id" instead? data Type = JInt | JFloat -- add more diff --git a/src/RegisterAllocation.hs b/Mate/RegisterAllocation.hs similarity index 97% rename from src/RegisterAllocation.hs rename to Mate/RegisterAllocation.hs index 0e8dac8..9fc43ae 100644 --- a/src/RegisterAllocation.hs +++ b/Mate/RegisterAllocation.hs @@ -1,3 +1,5 @@ +module Mate.RegisterAllocation where + import Data.List import Data.Maybe diff --git a/src/Utilities.hs b/Mate/Utilities.hs similarity index 94% rename from src/Utilities.hs rename to Mate/Utilities.hs index 540d054..8733ca3 100644 --- a/src/Utilities.hs +++ b/Mate/Utilities.hs @@ -1,4 +1,4 @@ -module Utilities where +module Mate.Utilities where import qualified Data.ByteString.Lazy as B -- 2.25.1