]> gitweb.michael.orlitzky.com - dead/lwn-epub.git/commitdiff
Initial commit. Hello, world.
authorMichael Orlitzky <michael@orlitzky.com>
Fri, 22 Jun 2012 20:38:48 +0000 (16:38 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Fri, 22 Jun 2012 20:38:48 +0000 (16:38 -0400)
Setup.hs [new file with mode: 0644]
lwn-epub.cabal [new file with mode: 0644]
makefile [new file with mode: 0644]
src/Main.hs [new file with mode: 0644]

diff --git a/Setup.hs b/Setup.hs
new file mode 100644 (file)
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 (file)
index 0000000..4c60779
--- /dev/null
@@ -0,0 +1,38 @@
+name:           lwn-epub
+version:        0.0
+cabal-version:  >= 1.8
+author:         Michael Orlitzky
+maintainer:    Michael Orlitzky <michael@orlitzky.com>
+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 (file)
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 (file)
index 0000000..da760e4
--- /dev/null
@@ -0,0 +1,7 @@
+module Main
+where
+
+
+main :: IO ()
+main = do
+  putStrLn "Hello, world."