diff --git a/README.md b/README.md
--- a/README.md
+++ b/README.md
@@ -45,6 +45,9 @@
 -------
 
 ```
+0.5.13 Put GHC 7.8.x -specific alex and happy versions, thanks
+       @simonmichael
+
 0.5.12 Put dependency on alex >= 3.0.5 in the cabal file, thanks @peti
 
 0.5.11 Remove pre-generated Lexer.hs as it does not work will all
diff --git a/language-javascript.cabal b/language-javascript.cabal
--- a/language-javascript.cabal
+++ b/language-javascript.cabal
@@ -1,5 +1,5 @@
 Name:                language-javascript
-Version:             0.5.12
+Version:             0.5.13
 Synopsis:            Parser for JavaScript
 Description:         Parses Javascript into an Abstract Syntax Tree (AST).  Initially intended as frontend to hjsmin.
                      .
@@ -37,7 +37,10 @@
                    , blaze-builder    >= 0.2     && < 1
                    , bytestring       >= 0.9.1   && < 1
                    , utf8-string      >= 0.3.7   && < 1
-  build-tools:       happy >= 1.18.5, alex >= 3.0.5
+  if impl(ghc >= 7.8)
+    build-tools:       happy >= 1.19, alex >= 3.1
+  else
+    build-tools:       happy >= 1.18.5, alex >= 3.0.5
   hs-source-dirs: src
   Exposed-modules:     Language.JavaScript.Parser
                        Language.JavaScript.Parser.Parser
@@ -51,7 +54,6 @@
                        Language.JavaScript.Parser.ParserMonad
                        Language.JavaScript.Parser.StringEscape
                        Language.JavaScript.Parser.Token
-  Build-tools:         happy
   ghc-options:         -Wall
 
 Test-Suite test-language-javascript
