Skip to content

Instantly share code, notes, and snippets.

@massysett
Created January 26, 2015 17:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save massysett/32ec3cc00f8722a415ba to your computer and use it in GitHub Desktop.
Save massysett/32ec3cc00f8722a415ba to your computer and use it in GitHub Desktop.
Cartel without the header
-- Cartel without the header
module Main where
import Cartel
import System.Exit
getCabal :: Betsy IO Cabal
getCabal = do
-- Assumes of course you have some modules in "lib".
-- Really, since this computation does not make flags, there's
-- no need to use Betsy
mods <- modules "lib"
return $ cabal (blank { name = "noCartelHeader", version = [1,0]})
[exposedModules mods] []
main :: IO ()
main = do
c <- renderBetsy getCabal
case c of
Left e -> do
putStr . renderIndented 0 $ e
exitFailure
Right g -> putStr g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment