diff --git a/BNFC-meta.cabal b/BNFC-meta.cabal
--- a/BNFC-meta.cabal
+++ b/BNFC-meta.cabal
@@ -1,5 +1,5 @@
 Name:		BNFC-meta
-version:	0.3.0.1
+version:	0.3.0.2
 cabal-Version:  >= 1.6
 build-type:     Simple
 license:        GPL-2
@@ -17,17 +17,17 @@
   appropriate type. A few examples are included in the source tarball.
 
 extra-source-files:
-  examples/GHC7/jll/JavaletteLight.hs
-  examples/GHC7/jll/UseJll.hs
-  examples/GHC6/jll/JavaletteLight.hs
-  examples/GHC6/jll/UseJll.hs
+  examples/ghc7/jll/JavaletteLight.hs
+  examples/ghc7/jll/UseJll.hs
+  examples/ghc6/jll/JavaletteLight.hs
+  examples/ghc6/jll/UseJll.hs
   Bootstrap/Bootstrap.hs
 
 Library
   Build-Depends: 
     base>=4.2&&<5
-    , array==0.3.0.*
-    , template-haskell >=2.4&&<2.7
+    , array==0.4.*
+    , template-haskell >=2.4&&<2.8
     , haskell-src-meta >= 0.5 && < 1.0
     , happy-meta >= 0.2.0.4 && < 0.3
     , alex-meta >= 0.3.0.3 && < 0.4
diff --git a/examples/GHC6/jll/JavaletteLight.hs b/examples/GHC6/jll/JavaletteLight.hs
deleted file mode 100644
--- a/examples/GHC6/jll/JavaletteLight.hs
+++ /dev/null
@@ -1,59 +0,0 @@
-{-# LANGUAGE QuasiQuotes, TemplateHaskell #-}
-
-module JavaletteLight where
-
-import Language.LBNF(lbnf, dumpCode, bnfc)
-import Language.LBNF.Compiletime
-import qualified Language.LBNF.Grammar
-
-
-
-bnfc [$lbnf|
-
--- This is a new pragma. The rest of the grammar is original JL.
-antiquote "[" ":" ":]" ;
-
--- Javalette Light: a simple subset of C, covering
--- programs with a single zero-argument function.
--- example: koe.jll
--- ordinary rules
-
-Fun.      Prog     ::= Typ Ident "(" ")" "{" [Stm] "}" ;
-
-SDecl.    Stm      ::= Typ Ident ";"  ;
-SAss.     Stm      ::= Ident "=" Expr ";"  ;
-SIncr.    Stm      ::= Ident "++" ";"  ;
-SWhile.   Stm      ::= "while" "(" Expr ")" "{" [Stm] "}" ;
-
-ELt.      Expr0     ::= Expr1 "<" Expr1 ;
-EPlus.    Expr1     ::= Expr1 "+" Expr2 ;
-ETimes.   Expr2     ::= Expr2 "*" Expr3 ;
-EVar.     Expr3     ::= Ident ;
-EInt.     Expr3     ::= Integer ;
-EDouble.  Expr3     ::= Double ;
-
-[].       [Stm]    ::= ;
-(:).      [Stm]    ::= Stm [Stm] ;
-
--- coercions
-
-_.        Stm      ::= Stm ";" ;
-
-_.  Expr      ::= Expr0 ;
-_.  Expr0     ::= Expr1 ;
-_.  Expr1     ::= Expr2 ;
-_.  Expr2     ::= Expr3 ;
-_.  Expr3     ::= "(" Expr ")" ;
-
-TInt.     Typ  ::= "int" ;
-TDouble.  Typ  ::= "double" ;
-
--- pragmas
-
-comment "/*" "*/" ;
-comment "//" ;
-
-entrypoints Prog, Stm, Expr ;
-  |]
-
-
diff --git a/examples/GHC6/jll/UseJll.hs b/examples/GHC6/jll/UseJll.hs
deleted file mode 100644
--- a/examples/GHC6/jll/UseJll.hs
+++ /dev/null
@@ -1,46 +0,0 @@
-{-# LANGUAGE QuasiQuotes #-}
-import JavaletteLight
-import Language.LBNF.Runtime -- overloaded pretty-printing function
-import Prelude hiding (exp)
-
-{- This Javalette Light program is parsed at compile time, 
-and replaced by it's abstract syntax representation.
-The 'holes' in square brackets are anti-quoted Haskell 
-expression. 
-
-The QuasiQuoter prog is generated from the grammar in JavaletteLight.hs
-(it corresponds to the category Prog).
--}
-
-
-prg x v e = [$prog|
-int f() {
- int a; 
- [:SWhile (EInt 10 :: Expr) [x]:]
- int a;
- int [:v:];
- int tmp;
- while (n < [Expr:e:]) {
-   n = n + 1;
-   tmp = a + b;
-   a = b;
-   b = tmp;
- }
-}
-|] 
-
-st v = [$stm| [:v:] = 1; |]
-pr = prg (st (Ident "n")) (Ident "n") [$expr|n|]
-main = putStr $ printTree pr
-
-
-eval vs = eval' where
-  eval' [$expr| [:a:] < [:b:]  |] = if eval' a < eval' b then 1 else 0
-  eval' [$expr| [:a:] + [:b:]  |] = eval' a + eval' b
-  eval' [$expr| [:a:] * [:b:]  |] = eval' a * eval' b
-  eval' [$expr| [Integer: n:]  |] = fromInteger n
-  eval' [$expr| [Double:  n:]  |] = n
-  eval' [$expr| [Ident:   v:]  |] = varval v
-  varval v = maybe (error $ "undefined variable" ++ printTree v) id $ flip lookup vs v
-
-h = eval [(Ident "a",5)] [$expr|a+2+3*4|]
diff --git a/examples/GHC7/jll/JavaletteLight.hs b/examples/GHC7/jll/JavaletteLight.hs
deleted file mode 100644
--- a/examples/GHC7/jll/JavaletteLight.hs
+++ /dev/null
@@ -1,60 +0,0 @@
-{-# LANGUAGE QuasiQuotes, TemplateHaskell #-}
-
-module JavaletteLight where
-
-import Language.LBNF(lbnf, dumpCode, bnfc)
-import Language.LBNF.Compiletime
-import qualified Language.LBNF.Grammar
-
-
-
-
-bnfc [lbnf|
-
--- This is a new pragma. The rest of the grammar is original JL.
-antiquote "[" ":" ":]" ;
-
--- Javalette Light: a simple subset of C, covering
--- programs with a single zero-argument function.
--- example: koe.jll
--- ordinary rules
-
-Fun.      Prog     ::= Typ Ident "(" ")" "{" [Stm] "}" ;
-
-SDecl.    Stm      ::= Typ Ident ";"  ;
-SAss.     Stm      ::= Ident "=" Expr ";"  ;
-SIncr.    Stm      ::= Ident "++" ";"  ;
-SWhile.   Stm      ::= "while" "(" Expr ")" "{" [Stm] "}" ;
-
-ELt.      Expr0     ::= Expr1 "<" Expr1 ;
-EPlus.    Expr1     ::= Expr1 "+" Expr2 ;
-ETimes.   Expr2     ::= Expr2 "*" Expr3 ;
-EVar.     Expr3     ::= Ident ;
-EInt.     Expr3     ::= Integer ;
-EDouble.  Expr3     ::= Double ;
-
-[].       [Stm]    ::= ;
-(:).      [Stm]    ::= Stm [Stm] ;
-
--- coercions
-
-_.        Stm      ::= Stm ";" ;
-
-_.  Expr      ::= Expr0 ;
-_.  Expr0     ::= Expr1 ;
-_.  Expr1     ::= Expr2 ;
-_.  Expr2     ::= Expr3 ;
-_.  Expr3     ::= "(" Expr ")" ;
-
-TInt.     Typ  ::= "int" ;
-TDouble.  Typ  ::= "double" ;
-
--- pragmas
-
-comment "/*" "*/" ;
-comment "//" ;
-
-entrypoints Prog, Stm, Expr ;
-  |]
-
-
diff --git a/examples/GHC7/jll/UseJll.hs b/examples/GHC7/jll/UseJll.hs
deleted file mode 100644
--- a/examples/GHC7/jll/UseJll.hs
+++ /dev/null
@@ -1,46 +0,0 @@
-{-# LANGUAGE QuasiQuotes #-}
-import JavaletteLight
-import Language.LBNF.Runtime -- overloaded pretty-printing function
-import Prelude hiding (exp)
-
-{- This Javalette Light program is parsed at compile time, 
-and replaced by it's abstract syntax representation.
-The 'holes' in square brackets are anti-quoted Haskell 
-expression. 
-
-The QuasiQuoter prog is generated from the grammar in JavaletteLight.hs
-(it corresponds to the category Prog).
--}
-
-
-prg x v e = [prog|
-int f() {
- int a; 
- [:SWhile (EInt 10 :: Expr) [x]:]
- int a;
- int [:v:];
- int tmp;
- while (n < [Expr:e:]) {
-   n = n + 1;
-   tmp = a + b;
-   a = b;
-   b = tmp;
- }
-}
-|] 
-
-st v = [stm| [:v:] = 1; |]
-pr = prg (st (Ident "n")) (Ident "n") [expr|n|]
-main = putStr $ printTree pr
-
-
-eval vs = eval' where
-  varval v = maybe (error $ "undefined variable" ++ printTree v) id $ flip lookup vs v
-  eval' [expr| [:a:] < [:b:]  |] = if eval' a < eval' b then 1 else 0
-  eval' [expr| [:a:] + [:b:]  |] = eval' a + eval' b
-  eval' [expr| [:a:] * [:b:]  |] = eval' a * eval' b
-  eval' [expr| [Integer: n:]  |] = fromInteger n
-  eval' [expr| [Double:  n:]  |] = n
-  eval' [expr| [Ident:   v:]  |] = varval v
-
-h = eval [(Ident "a",5)] [expr|a+2+3*4|]
diff --git a/examples/ghc6/jll/JavaletteLight.hs b/examples/ghc6/jll/JavaletteLight.hs
new file mode 100644
--- /dev/null
+++ b/examples/ghc6/jll/JavaletteLight.hs
@@ -0,0 +1,59 @@
+{-# LANGUAGE QuasiQuotes, TemplateHaskell #-}
+
+module JavaletteLight where
+
+import Language.LBNF(lbnf, dumpCode, bnfc)
+import Language.LBNF.Compiletime
+import qualified Language.LBNF.Grammar
+
+
+
+bnfc [$lbnf|
+
+-- This is a new pragma. The rest of the grammar is original JL.
+antiquote "[" ":" ":]" ;
+
+-- Javalette Light: a simple subset of C, covering
+-- programs with a single zero-argument function.
+-- example: koe.jll
+-- ordinary rules
+
+Fun.      Prog     ::= Typ Ident "(" ")" "{" [Stm] "}" ;
+
+SDecl.    Stm      ::= Typ Ident ";"  ;
+SAss.     Stm      ::= Ident "=" Expr ";"  ;
+SIncr.    Stm      ::= Ident "++" ";"  ;
+SWhile.   Stm      ::= "while" "(" Expr ")" "{" [Stm] "}" ;
+
+ELt.      Expr0     ::= Expr1 "<" Expr1 ;
+EPlus.    Expr1     ::= Expr1 "+" Expr2 ;
+ETimes.   Expr2     ::= Expr2 "*" Expr3 ;
+EVar.     Expr3     ::= Ident ;
+EInt.     Expr3     ::= Integer ;
+EDouble.  Expr3     ::= Double ;
+
+[].       [Stm]    ::= ;
+(:).      [Stm]    ::= Stm [Stm] ;
+
+-- coercions
+
+_.        Stm      ::= Stm ";" ;
+
+_.  Expr      ::= Expr0 ;
+_.  Expr0     ::= Expr1 ;
+_.  Expr1     ::= Expr2 ;
+_.  Expr2     ::= Expr3 ;
+_.  Expr3     ::= "(" Expr ")" ;
+
+TInt.     Typ  ::= "int" ;
+TDouble.  Typ  ::= "double" ;
+
+-- pragmas
+
+comment "/*" "*/" ;
+comment "//" ;
+
+entrypoints Prog, Stm, Expr ;
+  |]
+
+
diff --git a/examples/ghc6/jll/UseJll.hs b/examples/ghc6/jll/UseJll.hs
new file mode 100644
--- /dev/null
+++ b/examples/ghc6/jll/UseJll.hs
@@ -0,0 +1,46 @@
+{-# LANGUAGE QuasiQuotes #-}
+import JavaletteLight
+import Language.LBNF.Runtime -- overloaded pretty-printing function
+import Prelude hiding (exp)
+
+{- This Javalette Light program is parsed at compile time, 
+and replaced by it's abstract syntax representation.
+The 'holes' in square brackets are anti-quoted Haskell 
+expression. 
+
+The QuasiQuoter prog is generated from the grammar in JavaletteLight.hs
+(it corresponds to the category Prog).
+-}
+
+
+prg x v e = [$prog|
+int f() {
+ int a; 
+ [:SWhile (EInt 10 :: Expr) [x]:]
+ int a;
+ int [:v:];
+ int tmp;
+ while (n < [Expr:e:]) {
+   n = n + 1;
+   tmp = a + b;
+   a = b;
+   b = tmp;
+ }
+}
+|] 
+
+st v = [$stm| [:v:] = 1; |]
+pr = prg (st (Ident "n")) (Ident "n") [$expr|n|]
+main = putStr $ printTree pr
+
+
+eval vs = eval' where
+  eval' [$expr| [:a:] < [:b:]  |] = if eval' a < eval' b then 1 else 0
+  eval' [$expr| [:a:] + [:b:]  |] = eval' a + eval' b
+  eval' [$expr| [:a:] * [:b:]  |] = eval' a * eval' b
+  eval' [$expr| [Integer: n:]  |] = fromInteger n
+  eval' [$expr| [Double:  n:]  |] = n
+  eval' [$expr| [Ident:   v:]  |] = varval v
+  varval v = maybe (error $ "undefined variable" ++ printTree v) id $ flip lookup vs v
+
+h = eval [(Ident "a",5)] [$expr|a+2+3*4|]
diff --git a/examples/ghc7/jll/JavaletteLight.hs b/examples/ghc7/jll/JavaletteLight.hs
new file mode 100644
--- /dev/null
+++ b/examples/ghc7/jll/JavaletteLight.hs
@@ -0,0 +1,60 @@
+{-# LANGUAGE QuasiQuotes, TemplateHaskell #-}
+
+module JavaletteLight where
+
+import Language.LBNF(lbnf, dumpCode, bnfc)
+import Language.LBNF.Compiletime
+import qualified Language.LBNF.Grammar
+
+
+
+
+bnfc [lbnf|
+
+-- This is a new pragma. The rest of the grammar is original JL.
+antiquote "[" ":" ":]" ;
+
+-- Javalette Light: a simple subset of C, covering
+-- programs with a single zero-argument function.
+-- example: koe.jll
+-- ordinary rules
+
+Fun.      Prog     ::= Typ Ident "(" ")" "{" [Stm] "}" ;
+
+SDecl.    Stm      ::= Typ Ident ";"  ;
+SAss.     Stm      ::= Ident "=" Expr ";"  ;
+SIncr.    Stm      ::= Ident "++" ";"  ;
+SWhile.   Stm      ::= "while" "(" Expr ")" "{" [Stm] "}" ;
+
+ELt.      Expr0     ::= Expr1 "<" Expr1 ;
+EPlus.    Expr1     ::= Expr1 "+" Expr2 ;
+ETimes.   Expr2     ::= Expr2 "*" Expr3 ;
+EVar.     Expr3     ::= Ident ;
+EInt.     Expr3     ::= Integer ;
+EDouble.  Expr3     ::= Double ;
+
+[].       [Stm]    ::= ;
+(:).      [Stm]    ::= Stm [Stm] ;
+
+-- coercions
+
+_.        Stm      ::= Stm ";" ;
+
+_.  Expr      ::= Expr0 ;
+_.  Expr0     ::= Expr1 ;
+_.  Expr1     ::= Expr2 ;
+_.  Expr2     ::= Expr3 ;
+_.  Expr3     ::= "(" Expr ")" ;
+
+TInt.     Typ  ::= "int" ;
+TDouble.  Typ  ::= "double" ;
+
+-- pragmas
+
+comment "/*" "*/" ;
+comment "//" ;
+
+entrypoints Prog, Stm, Expr ;
+  |]
+
+
diff --git a/examples/ghc7/jll/UseJll.hs b/examples/ghc7/jll/UseJll.hs
new file mode 100644
--- /dev/null
+++ b/examples/ghc7/jll/UseJll.hs
@@ -0,0 +1,46 @@
+{-# LANGUAGE QuasiQuotes #-}
+import JavaletteLight
+import Language.LBNF.Runtime -- overloaded pretty-printing function
+import Prelude hiding (exp)
+
+{- This Javalette Light program is parsed at compile time, 
+and replaced by it's abstract syntax representation.
+The 'holes' in square brackets are anti-quoted Haskell 
+expression. 
+
+The QuasiQuoter prog is generated from the grammar in JavaletteLight.hs
+(it corresponds to the category Prog).
+-}
+
+
+prg x v e = [prog|
+int f() {
+ int a; 
+ [:SWhile (EInt 10 :: Expr) [x]:]
+ int a;
+ int [:v:];
+ int tmp;
+ while (n < [Expr:e:]) {
+   n = n + 1;
+   tmp = a + b;
+   a = b;
+   b = tmp;
+ }
+}
+|] 
+
+st v = [stm| [:v:] = 1; |]
+pr = prg (st (Ident "n")) (Ident "n") [expr|n|]
+main = putStr $ printTree pr
+
+
+eval vs = eval' where
+  varval v = maybe (error $ "undefined variable" ++ printTree v) id $ flip lookup vs v
+  eval' [expr| [:a:] < [:b:]  |] = if eval' a < eval' b then 1 else 0
+  eval' [expr| [:a:] + [:b:]  |] = eval' a + eval' b
+  eval' [expr| [:a:] * [:b:]  |] = eval' a * eval' b
+  eval' [expr| [Integer: n:]  |] = fromInteger n
+  eval' [expr| [Double:  n:]  |] = n
+  eval' [expr| [Ident:   v:]  |] = varval v
+
+h = eval [(Ident "a",5)] [expr|a+2+3*4|]
