From: Francis Russell Date: Fri, 21 Sep 2012 00:01:42 +0000 (+0100) Subject: Separate build into library and executable. X-Git-Url: https://git.unchartedbackwaters.co.uk/w/?a=commitdiff_plain;h=49d616c4731e4795dd62c8d4a433dde58a15a918;p=francis%2Fofc.git Separate build into library and executable. --- diff --git a/src/Parser.hs b/OFC/Parser.hs similarity index 99% rename from src/Parser.hs rename to OFC/Parser.hs index 1cf5d06..6469cce 100644 --- a/src/Parser.hs +++ b/OFC/Parser.hs @@ -1,6 +1,6 @@ -module Parser (runOFLParser) where -import TopLevel -import TargetMapping +module OFC.Parser (runOFLParser) where +import OFC.TopLevel +import OFC.TargetMapping import Data.Functor.Identity (Identity) import Text.Parsec import Text.Parsec.Expr diff --git a/src/TargetMapping.hs b/OFC/TargetMapping.hs similarity index 96% rename from src/TargetMapping.hs rename to OFC/TargetMapping.hs index 6fc4b03..33a115e 100644 --- a/src/TargetMapping.hs +++ b/OFC/TargetMapping.hs @@ -1,4 +1,4 @@ -module TargetMapping where +module OFC.TargetMapping where data TargetType = FortranParameter [FortranParameterProperty] | diff --git a/src/TopLevel.hs b/OFC/TopLevel.hs similarity index 99% rename from src/TopLevel.hs rename to OFC/TopLevel.hs index c11e687..91b3df9 100644 --- a/src/TopLevel.hs +++ b/OFC/TopLevel.hs @@ -1,5 +1,5 @@ -module TopLevel where -import TargetMapping +module OFC.TopLevel where +import OFC.TargetMapping import Text.PrettyPrint import Data.List (foldl') import Data.Map (Map) diff --git a/ofc.cabal b/ofc.cabal index fb95212..7852547 100644 --- a/ofc.cabal +++ b/ofc.cabal @@ -1,13 +1,21 @@ Name: ofc Version: 0.1 -Description: ONTEP Form Compiler +Description: ONETEP Form Compiler Author: Francis Russell Maintainer: fpr02@doc.ic.ac.uk Build-Type: Simple -Cabal-Version: >=1.2 +Cabal-Version: >=1.8.0.2 + +Library + Hs-Source-Dirs: . + GHC-Options: -Wall -fno-warn-missing-signatures + Build-Depends: base, containers, parsec >= 3, pretty, transformers + Exposed-Modules: OFC.Parser + OFC.TopLevel + OFC.TargetMapping Executable ofc Main-is: Main.hs Hs-Source-Dirs: src - GHC-Options: -Wall -fno-warn-missing-signatures - Build-Depends: base, containers, parsec >= 3, pretty, transformers + GHC-Options: -Wall + Build-Depends: base, ofc diff --git a/src/Main.hs b/src/Main.hs index d397356..31fdc90 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1,7 +1,7 @@ module Main (main) where import System.Environment (getArgs) -import Parser (runOFLParser) -import TopLevel (prettyPrint) +import OFC.Parser (runOFLParser) +import OFC.TopLevel (prettyPrint) main :: IO() main = do