summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2015-08-04 22:49:39 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2015-08-04 22:49:39 -0400
commit7a1a407e2bb007b0aba8ebdca6f767660f904a01 (patch)
treebd3a41fd86bd45984a04ddb605e60b6cdf2b3f63
parent392dea216eefbca5f338797c36a1154ab3ce33ce (diff)
longterm goal
-rw-r--r--doc/todo/ditch_yesod.mdwn32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/todo/ditch_yesod.mdwn b/doc/todo/ditch_yesod.mdwn
new file mode 100644
index 000000000..2b53402f6
--- /dev/null
+++ b/doc/todo/ditch_yesod.mdwn
@@ -0,0 +1,32 @@
+I'd like to move away from using yesod for the web app, for a number of
+reasons:
+
+* It's by far the largest use of TH in git-annex, and TH is of course very
+ painful for the android port, other builds like debian mips that don't
+ currently support TH, etc.
+* I think it's responsible for at least 50% of the executable size, and I
+ suspect a lot of that is unncessary bloat for parts of yesod that
+ git-annex doesn't really use.
+* Hamlet constantly annoys me by rejecting any file that contains tabs.
+ **Rage**
+* Hamlet contains code that's not really haskell, but looks a lot like it.
+ This is a continual frustration when dealing with the hamlet files.
+* I find that Hamlet does not lend itself to being refactored, everything
+ is essentially an IO action with side effects of generating html, so
+ can't really bring proper FP tools to bear.
+
+At the moment, servant seems like the nicest place to end up. Just as type
+safe as yesod afaik, and very lightweight and simple and rather awesome.
+
+As for the html generation, lucid seems like a good way to do it. Just as
+fast as hamlet, and pure haskell code.
+
+Game plan:
+
+1. Uploadd a yesod-lucid to hackage. (done)
+2. Get servant, lucid, maybe yesod-lucid, packaged in Debian
+3. Start converting individual yesod Handler Html to Handler LucidHtml.
+ This will ditch the hamlet. This is by far the most work, but it can be
+ done incrementally w/o breaking the build.
+4. Once all the hamlet is gone, remove the rest of the yesod stuff and
+ re-implement the routing etc with servant.