]> git.unchartedbackwaters.co.uk Git - francis/ofc.git/commitdiff
Separate build into library and executable.
authorFrancis Russell <francis@unchartedbackwaters.co.uk>
Fri, 21 Sep 2012 00:01:42 +0000 (01:01 +0100)
committerFrancis Russell <francis@unchartedbackwaters.co.uk>
Fri, 21 Sep 2012 00:01:42 +0000 (01:01 +0100)
OFC/Parser.hs [moved from src/Parser.hs with 99% similarity]
OFC/TargetMapping.hs [moved from src/TargetMapping.hs with 96% similarity]
OFC/TopLevel.hs [moved from src/TopLevel.hs with 99% similarity]
ofc.cabal
src/Main.hs

similarity index 99%
rename from src/Parser.hs
rename to OFC/Parser.hs
index 1cf5d06c232bf6e85b1fc23a1c28d6a6eb27876b..6469ccea6a0c6721b13e813e0357534c958aadc6 100644 (file)
@@ -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
similarity index 96%
rename from src/TargetMapping.hs
rename to OFC/TargetMapping.hs
index 6fc4b0357b09ff0f0890df84141a06338ad183fe..33a115ea773e9e8e43ca239d93686fe56526dfc9 100644 (file)
@@ -1,4 +1,4 @@
-module TargetMapping where
+module OFC.TargetMapping where
 
 data TargetType = 
   FortranParameter [FortranParameterProperty] |
similarity index 99%
rename from src/TopLevel.hs
rename to OFC/TopLevel.hs
index c11e687954a118c7e5faeacbb0464549885b2687..91b3df9dcc3179daa8a133fbe02a62903e4776aa 100644 (file)
@@ -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)
index fb95212e6df6d84ad23665ed419122a24d0cc361..7852547e92f433054e513c8758871318e3ae6033 100644 (file)
--- 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 
index d397356598398cfee30aacf73e3c4bed15a50bb9..31fdc9092f13bcc03c2c7c973ffb116844dab960 100644 (file)
@@ -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