Skip to content

Instantly share code, notes, and snippets.

@phadej

phadej/bar-Bar.hs

Created Dec 21, 2019
Embed
What would you like to do?
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
{-# 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)
packages: foo bar
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
{-# 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)
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