Created
January 26, 2015 17:45
-
-
Save massysett/32ec3cc00f8722a415ba to your computer and use it in GitHub Desktop.
Cartel without the header
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
-- 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