diff options
-rw-r--r-- | app/Main.hs (renamed from src/Main.hs) | 10 | ||||
-rw-r--r-- | hie.yaml | 5 | ||||
-rw-r--r-- | hs-visinter.cabal | 15 |
3 files changed, 22 insertions, 8 deletions
diff --git a/src/Main.hs b/app/Main.hs index 750f749..b88d508 100644 --- a/src/Main.hs +++ b/app/Main.hs @@ -6,7 +6,7 @@ import Data.List (intersperse) import System.Environment (getArgs) import System.Exit (die, exitFailure) -import Parser +import HSVIS.Parser main :: IO () @@ -18,11 +18,11 @@ main = do prog <- case parse fname source of This errs -> do - sequence_ $ intersperse (putStrLn "") (map (putStrLn . printErrMsg) errs) - exitFailure + sequence_ $ intersperse (putStrLn "") (map (putStrLn . printErrMsg) errs) + exitFailure These errs res -> do - sequence_ $ intersperse (putStrLn "") (map (putStrLn . printErrMsg) errs) - return res + sequence_ $ intersperse (putStrLn "") (map (putStrLn . printErrMsg) errs) + return res That res -> return res print prog @@ -4,6 +4,11 @@ cradle: config: cradle: cabal: + component: "lib:hs-visinter" + - path: "./app" + config: + cradle: + cabal: component: "exe:hs-visinter" - path: "./examples" config: diff --git a/hs-visinter.cabal b/hs-visinter.cabal index 181d112..748355d 100644 --- a/hs-visinter.cabal +++ b/hs-visinter.cabal @@ -7,9 +7,8 @@ author: Tom Smeding maintainer: tom@tomsmeding.com build-type: Simple -executable hs-visinter - main-is: Main.hs - other-modules: +library + exposed-modules: Control.FAlternative HSVIS.AST HSVIS.Parser @@ -23,3 +22,13 @@ executable hs-visinter hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall -threaded + +executable hs-visinter + main-is: Main.hs + other-modules: + build-depends: + base, + hs-visinter + hs-source-dirs: app + default-language: Haskell2010 + ghc-options: -Wall -threaded |