BNFC-meta 0.1.0.1 → 0.1.0.2
raw patch · 2 files changed
+9/−7 lines, 2 filesdep ~alex-metadep ~happy-metadep ~haskell-src-meta
Dependency ranges changed: alex-meta, happy-meta, haskell-src-meta
Files
- BNFC-meta.cabal +4/−4
- Language/LBNF/CFtoPrinter.hs +5/−3
BNFC-meta.cabal view
@@ -1,5 +1,5 @@ Name: BNFC-meta-version: 0.1.0.1+version: 0.1.0.2 cabal-Version: >= 1.6 build-type: Simple license: GPL-2@@ -27,10 +27,10 @@ base>=4.2&&<5 , array==0.3.0.* , template-haskell >=2.4&&<2.5- , haskell-src-meta >= 0.1.1 && < 0.2+ , haskell-src-meta >= 0.1.1 && < 0.4 , th-lift >=0.5&&<0.6- , happy-meta- , alex-meta+ , happy-meta < 0.3+ , alex-meta < 0.3 Exposed-modules: Language.LBNF Other-modules:
Language/LBNF/CFtoPrinter.hs view
@@ -93,8 +93,9 @@ ruleOf s = maybe undefined id $ lookup s (rulesOfCF cf) -- case_fun :: Cat -> [(Con,Rule)] -> Q Dec-case_fun cat xs lst = instanceD (cxt []) (appT (conT ''Print) $ conT $ mkName cat) - [newName "i" >>= \i -> newName "x" >>= prtc i] where+case_fun cat xs lst = + instanceD (cxt []) (appT (conT ''Print) $ conT $ mkName cat) $+ [newName "i" >>= \i -> newName "x" >>= prtc i] ++ lst where prtc i n = funD ('prt) [clause [varP i,varP n] (body) []] where body = normalB $ caseE (varE n) $ map mtch xs@@ -142,7 +143,8 @@ mk _ _ = [] prt' :: String -> String -> ExpQ prt' c arg = [| prt $(lift $ precCat c) $(varE $ mkName arg) |]-+ + {- "(concatD [" ++ unwords (intersperse "," (mk args its)) ++ "])" where