From 44549423b80c9bf8edf5e942bc8ac457d9817195 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Fri, 22 Jun 2012 16:38:48 -0400 Subject: [PATCH 1/1] Initial commit. Hello, world. --- Setup.hs | 2 ++ lwn-epub.cabal | 38 ++++++++++++++++++++++++++++++++++++++ makefile | 20 ++++++++++++++++++++ src/Main.hs | 7 +++++++ 4 files changed, 67 insertions(+) create mode 100644 Setup.hs create mode 100644 lwn-epub.cabal create mode 100644 makefile create mode 100644 src/Main.hs diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/lwn-epub.cabal b/lwn-epub.cabal new file mode 100644 index 0000000..4c60779 --- /dev/null +++ b/lwn-epub.cabal @@ -0,0 +1,38 @@ +name: lwn-epub +version: 0.0 +cabal-version: >= 1.8 +author: Michael Orlitzky +maintainer: Michael Orlitzky +synopsis: + Convert issues of LWN (lwn.net) to EPUB format. +build-type: Simple + +executable lwn-epub + build-depends: + base == 4.5.* + + main-is: + Main.hs + + hs-source-dirs: + src/ + + ghc-options: + -Wall + -fwarn-hi-shadowing + -fwarn-missing-signatures + -fwarn-name-shadowing + -fwarn-orphans + -fwarn-type-defaults + -fwarn-tabs + -fwarn-incomplete-record-updates + -fwarn-monomorphism-restriction + -fwarn-unused-do-bind + -funbox-strict-fields + -fexcess-precision + -fno-spec-constr-count + -rtsopts + -threaded + -O2 + -optc-O3 + -optc-march=native diff --git a/makefile b/makefile new file mode 100644 index 0000000..1528ed3 --- /dev/null +++ b/makefile @@ -0,0 +1,20 @@ +.PHONY : test publish_doc doc src_html hlint + +lwn-epub: src/*.hs + runghc Setup.hs clean + runghc Setup.hs configure --user --flags=${FLAGS} + runghc Setup.hs build + +clean: + runghc Setup.hs clean + rm -f dist/ + rm -f *.prof + rm -rf .hpc + + +# Neither 'haddock' nor 'hscolour' seem to work properly. +doc: src_html + runghc Setup.hs hscolour --executables + runghc Setup.hs haddock --internal \ + --executables \ + --hyperlink-source diff --git a/src/Main.hs b/src/Main.hs new file mode 100644 index 0000000..da760e4 --- /dev/null +++ b/src/Main.hs @@ -0,0 +1,7 @@ +module Main +where + + +main :: IO () +main = do + putStrLn "Hello, world." -- 2.43.2