Created
November 12, 2013 13:44
-
-
Save fujimura/7431024 to your computer and use it in GitHub Desktop.
Read `.cabal` and pretty print it
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
import Distribution.PackageDescription.Parse (readPackageDescription) | |
import Distribution.PackageDescription.PrettyPrint (showGenericPackageDescription) | |
import Distribution.Verbosity (silent) | |
-- Taken from http://therning.org/magnus/archives/514. Thanks @magthe | |
main = do | |
gpd <- readPackageDescription silent "hi.cabal" | |
putStrLn $ showGenericPackageDescription gpd |
Author
fujimura
commented
Dec 25, 2013
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment