Created
December 21, 2019 14:43
-
-
Save phadej/0a299e255f00031625da8de4ed190e34 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cabal-version: 2.2 | |
name: bar | |
version: 0 | |
library | |
default-language: Haskell2010 | |
build-tool-depends: foo:foo -any | |
exposed-modules: Bar | |
build-depends: | |
, base | |
, process | |
, template-haskell |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TemplateHaskell #-} | |
module Bar where | |
import System.Process (readProcess) | |
import Control.Monad.IO.Class (liftIO) | |
import Language.Haskell.TH.Syntax (lift) | |
fooBar :: String | |
fooBar = $(liftIO (readProcess "foo" [] "") >>= lift) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packages: foo bar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cabal-version: 2.2 | |
name: foo | |
version: 0 | |
library | |
default-language: Haskell2010 | |
build-tool-depends: foo:foo -any | |
exposed-modules: Foo | |
build-depends: | |
, base | |
, process | |
, template-haskell | |
executable foo | |
default-language: Haskell2010 | |
scope: private | |
main-is: FooExe.hs | |
build-depends: base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TemplateHaskell #-} | |
module Foo where | |
import System.Process (readProcess) | |
import Control.Monad.IO.Class (liftIO) | |
import Language.Haskell.TH.Syntax (lift) | |
fooFoo :: String | |
fooFoo = $(liftIO (readProcess "foo" [] "") >>= lift) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Main (main) where | |
main :: IO () | |
main = putStrLn "foo-executable" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment