tdoc 0.4.6 → 0.4.7
raw patch · 4 files changed
+8/−10 lines, 4 filesdep ~template-haskell
Dependency ranges changed: template-haskell
Files
- Text/TDoc/Core.hs +0/−1
- Text/TDoc/QQ.hs +0/−1
- Text/TDoc/TH.hs +6/−6
- tdoc.cabal +2/−2
Text/TDoc/Core.hs view
@@ -12,7 +12,6 @@ TypeFamilies, FlexibleInstances, FlexibleContexts, TypeOperators #-} module Text.TDoc.Core where -import Data.Monoid import Data.Functor.Identity import Control.Monad.Trans.Writer
Text/TDoc/QQ.hs view
@@ -17,7 +17,6 @@ import Language.Haskell.TH.Quote import Text.TDoc (spanDoc, Star, Span, SpanTag(..), ToChildren(..), ChildOf(..)) import Data.Char (isSpace)-import Data.Monoid frTop :: SpanTag t => Star t Span frTop = spanDoc
Text/TDoc/TH.hs view
@@ -32,12 +32,12 @@ type NodeOpts = [NodeOpt] mkIs :: Name -> Name -> Dec-mkIs cl ty = InstanceD [] (ConT cl `AppT` ConT ty) []+mkIs cl ty = InstanceD Nothing [] (ConT cl `AppT` ConT ty) [] node :: String -> NodeOpts -> [Name] -> [Name] -> Q [Dec] node nod opts attrs children = return . concat- $ [ [ DataD [] nodeNm [] [] []+ $ [ [ DataD [] nodeNm [] Nothing [] [] , mkIs ''IsNode nodeNm ] , [ mkIs ''IsInline nodeNm | Inline `elem` opts ]@@ -68,7 +68,7 @@ attribute :: Name -> Q [Dec] attribute attr = return- [ InstanceD [] (ConT ''IsAttribute `AppT` ConT attr) []+ [ InstanceD Nothing [] (ConT ''IsAttribute `AppT` ConT attr) [] , mkTagClass attr ] @@ -80,7 +80,7 @@ tagInstance :: Name -> Name -> Dec tagInstance tagTy nm =- InstanceD [] (ConT nmTagCon `AppT` ConT tagTy)+ InstanceD Nothing [] (ConT nmTagCon `AppT` ConT tagTy) [ValD (VarP nmTagFun) (NormalB (ConE nmTagCon)) []] where nmBase = nameBase nm@@ -88,10 +88,10 @@ nmTagCon = mkTagName nmBase mkIsChildOf :: Name -> Name -> Dec-mkIsChildOf child nod = InstanceD [] (ConT ''IsChildOf `AppT` ConT child `AppT` ConT nod) []+mkIsChildOf child nod = InstanceD Nothing [] (ConT ''IsChildOf `AppT` ConT child `AppT` ConT nod) [] mkIsAttributeOf :: Name -> Name -> Dec-mkIsAttributeOf attr nod = InstanceD [] (ConT ''IsAttributeOf `AppT` ConT attr `AppT` ConT nod) []+mkIsAttributeOf attr nod = InstanceD Nothing [] (ConT ''IsAttributeOf `AppT` ConT attr `AppT` ConT nod) [] nodeChildren :: Name -> [Name] -> Q [Dec] nodeChildren nod = return . map (`mkIsChildOf` nod)
tdoc.cabal view
@@ -1,6 +1,6 @@ name: tdoc cabal-Version: >=1.2-version: 0.4.6+version: 0.4.7 license: BSD3 license-file: LICENSE copyright: (c) Nicolas Pouillard@@ -15,7 +15,7 @@ library build-depends: base>=3.0&&<5, transformers,- template-haskell >= 2.5, xhtml, bytestring+ template-haskell >= 2.11, xhtml, bytestring exposed-modules: Text.TDoc Text.TDoc.Core Text.TDoc.Attributes