Skip to content

Commit

Permalink
More building and instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
singpolyma committed Feb 24, 2012
1 parent 6ed54c6 commit 5a7a640
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
18 changes: 15 additions & 3 deletions Makefile
@@ -1,17 +1,29 @@
GHCFLAGS=-Wall -XNoCPP -fno-warn-name-shadowing -XHaskell98 -O2
HLINTFLAGS=-XHaskell98 -XNoCPP -i 'Use camelCase' -i 'Use String' -i 'Use head' -i 'Use string literal' -i 'Use list comprehension' --utf8

.PHONY: all shell clean

all: match Main.class

match: match.hs
ghc $(GHCFLAGS) -o $@ $^

Main.class: match.scala jackson.jar com/codahale/jerkson/Json.class
scalac -classpath .:jackson.jar match.scala

com/codahale/jerkson/Json.class: jackson.jar com/codahale/jerkson/JsonSnakeCase.class
find com/codahale/jerkson/ -name '*.scala' | xargs scalac -classpath .:jackson.jar

com/codahale/jerkson/JsonSnakeCase.class: jackson.jar
find com/codahale/jerkson/ -name '*.java' | xargs javac -classpath jackson.jar

report.html: match.hs
-hlint $(HLINTFLAGS) --report $^

.PHONY: shell clean

shell:
ghci $(GHCFLAGS)

clean:
find -name '*.o' -o -name '*.hi' | xargs $(RM)
find . -name '*.o' -o -name '*.hi' | xargs $(RM)
find . -name '*.class' | xargs $(RM)
$(RM) match
8 changes: 8 additions & 0 deletions README
Expand Up @@ -8,6 +8,14 @@ All solutions write the final JSON to stdout. Run like this:

./match > output.json

== Requirements for the Haskell ==

The Haskell solution requires Text.JSON to be installed. On Debian derivatives the package name is libghc6-json-dev

== Requirements for the Scala ==

The Scala solution requires a JAR file for Jackson (the Java JSON parser) in the top level called jackson.jar. It also requires all the source code or class files from <https://github.com/codahale/jerkson> be at the top level.

== Status of Solutions ==

A program is never really "complete", and that is especially true of this problem. I will probably for quite some time wake up with things to try that might improve precision or recall.
Expand Down

0 comments on commit 5a7a640

Please sign in to comment.