diff options
author | Ondřej Čertík <ondrej@certik.us> | 2020-03-03 20:40:34 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-03 20:40:34 -0800 |
commit | 8e6fd427508e10999349c7e08c53a3d34bcea143 (patch) | |
tree | c035acf8a4d71e9201dc7394a43bc0dcef28ac83 /src/Lib.hs | |
parent | 45cc57a901594eaa94535659e2aafe9971a24c00 (diff) | |
parent | a145a9fc1e7dffbacbb7151fa543267a86e90cde (diff) | |
download | fpm-8e6fd427508e10999349c7e08c53a3d34bcea143.tar.gz fpm-8e6fd427508e10999349c7e08c53a3d34bcea143.zip |
Merge pull request #41 from certik/call
Test calling GFortran from Haskell
Diffstat (limited to 'src/Lib.hs')
-rw-r--r-- | src/Lib.hs | 19 |
1 files changed, 17 insertions, 2 deletions
@@ -1,6 +1,21 @@ module Lib - ( someFunc + ( someFunc, + someFunc2 ) where +import Development.Shake.FilePath ((</>)) +import System.Process (callCommand) + + someFunc :: IO () -someFunc = putStrLn "someFunc" +someFunc = do + putStrLn "someFunc" + a <- callCommand "gfortran test/test1.f90 -o test1" + a <- callCommand $ "." </> "test1" + return () + +someFunc2 :: IO () +someFunc2 = do + putStrLn "example" + a <- callCommand "cd example_project && stack run -- build" + return () |