packages feed

symantic-document 0.0.0.20170623 → 0.0.0.20180213

raw patch · 4 files changed

+40/−90 lines, 4 filesdep ~ansi-terminaldep ~textPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: ansi-terminal, text

API changes (from Hackage documentation)

- Language.Symantic.Document.Sym: class SplitOnCharWithEmpty t
- Language.Symantic.Document.Sym: instance Language.Symantic.Document.Sym.SplitOnCharWithEmpty Data.Text.Internal.Lazy.Text
- Language.Symantic.Document.Sym: instance Language.Symantic.Document.Sym.SplitOnCharWithEmpty Data.Text.Internal.Text
- Language.Symantic.Document.Sym: instance Language.Symantic.Document.Sym.SplitOnCharWithEmpty GHC.Base.String
- Language.Symantic.Document.Sym: lines :: SplitOnCharWithEmpty t => t -> [t]
- Language.Symantic.Document.Sym: splitOnCharWithEmpty :: SplitOnCharWithEmpty t => Char -> t -> [t]
- Language.Symantic.Document.Sym: class Doc_Color d where reverse = trans1 reverse black = trans1 black red = trans1 red green = trans1 green yellow = trans1 yellow blue = trans1 blue magenta = trans1 magenta cyan = trans1 cyan white = trans1 white blacker = trans1 blacker redder = trans1 redder greener = trans1 greener yellower = trans1 yellower bluer = trans1 bluer magentaer = trans1 magentaer cyaner = trans1 cyaner whiter = trans1 whiter onBlack = trans1 onBlack onRed = trans1 onRed onGreen = trans1 onGreen onYellow = trans1 onYellow onBlue = trans1 onBlue onMagenta = trans1 onMagenta onCyan = trans1 onCyan onWhite = trans1 onWhite onBlacker = trans1 onBlacker onRedder = trans1 onRedder onGreener = trans1 onGreener onYellower = trans1 onYellower onBluer = trans1 onBluer onMagentaer = trans1 onMagentaer onCyaner = trans1 onCyaner onWhiter = trans1 onWhiter
+ Language.Symantic.Document.Sym: class Doc_Color d
- Language.Symantic.Document.Sym: class Doc_Decoration d where bold = trans1 bold underline = trans1 underline italic = trans1 italic
+ Language.Symantic.Document.Sym: class Doc_Decoration d
- Language.Symantic.Document.Sym: class (IsString d, Semigroup d) => Doc_Text d where charH = trans . charH stringH = trans . stringH textH = trans . textH ltextH = trans . ltextH replicate = trans1 . replicate integer = trans . integer empty = "" eol = "\n" space = char ' ' spaces i = replicate i space int = integer . toInteger char = \case { '\n' -> eol c -> charH c } string = catV . fmap stringH . lines text = catV . fmap textH . lines ltext = catV . fmap ltextH . lines catH = foldr (<>) empty catV l = if null l then empty else foldr1 (\ a acc -> a <> eol <> acc) l paren d = charH '(' <> d <> charH ')' brace d = charH '{' <> d <> charH '}' bracket d = charH '[' <> d <> charH ']' bquote d = charH '`' <> d <> charH '`' dquote d = charH '"' <> d <> charH '"' fquote d = "\171 " <> d <> " \187" squote d = charH '\'' <> d <> charH '\''
+ Language.Symantic.Document.Sym: class (IsString d, Semigroup d) => Doc_Text d
- Language.Symantic.Document.Sym: class Trans tr where type ReprOf tr :: * trans1 f = trans . f . unTrans trans2 f t1 t2 = trans (f (unTrans t1) (unTrans t2)) trans3 f t1 t2 t3 = trans (f (unTrans t1) (unTrans t2) (unTrans t3)) where {
+ Language.Symantic.Document.Sym: class Trans tr where {

Files

Language/Symantic/Document/Plain.hs view
@@ -25,7 +25,6 @@ plain :: Plain -> TLB.Builder plain (Plain d) = d - instance Semigroup Plain where 	Plain x <> Plain y = Plain (x <> y) instance Monoid Plain where
Language/Symantic/Document/Sym.hs view
@@ -1,14 +1,11 @@ {-# LANGUAGE PolyKinds #-}-{-# LANGUAGE ViewPatterns #-} module Language.Symantic.Document.Sym where  import Data.Char (Char)-import Data.Eq (Eq(..)) import Data.Foldable (Foldable(..)) import Data.Function ((.)) import Data.Functor (Functor(..)) import Data.Int (Int, Int64)-import Data.Maybe (Maybe(..)) import Data.Semigroup (Semigroup(..)) import Data.String (String, IsString) import Data.Text (Text)@@ -63,9 +60,9 @@ 	spaces i  = replicate i space 	int       = integer . toInteger 	char      = \case '\n' -> eol; c -> charH c-	string    = catV . fmap stringH . lines-	text      = catV . fmap textH   . lines-	ltext     = catV . fmap ltextH  . lines+	string    = catV . fmap stringH . L.lines+	text      = catV . fmap textH   . T.lines+	ltext     = catV . fmap ltextH  . TL.lines 	catH      = foldr (<>) empty 	catV l    = if null l then empty else foldr1 (\a acc -> a <> eol <> acc) l 	paren   d = charH '('   <> d <> charH ')'@@ -232,56 +229,5 @@ 	 -> (tr -> tr -> tr -> tr) 	trans3 f t1 t2 t3 = trans (f (unTrans t1) (unTrans t2) (unTrans t3)) ---- * Class 'SplitOnCharWithEmpty'-class SplitOnCharWithEmpty t where-	splitOnCharWithEmpty :: Char -> t -> [t]-instance SplitOnCharWithEmpty Text where-	splitOnCharWithEmpty sep t =-		case T.break (== sep) t of-		 (chunk, T.uncons -> Just (_, rest)) -> chunk : splitOnCharWithEmpty sep rest-		 (chunk, _) -> [chunk]-instance SplitOnCharWithEmpty TL.Text where-	splitOnCharWithEmpty sep t =-		case TL.break (== sep) t of-		 (chunk, TL.uncons -> Just (_, rest)) -> chunk : splitOnCharWithEmpty sep rest-		 (chunk, _) -> [chunk]-instance SplitOnCharWithEmpty String where-	splitOnCharWithEmpty sep t =-		case L.break (== sep) t of-		 (chunk, _:rest) -> chunk : splitOnCharWithEmpty sep rest-		 (chunk, []) -> [chunk]--lines :: SplitOnCharWithEmpty t => t -> [t]-lines = splitOnCharWithEmpty '\n'- int64OfInt :: Int -> Int64 int64OfInt = fromInteger . toInteger---{---- * Class 'SplitOnChar'--class SplitOnChar t where-	splitOnChar :: Char -> t -> [t]-instance SplitOnChar Text where-	splitOnChar sep t =-		case Text.uncons t of-		 Nothing -> []-		 Just (x, xs) ->-			if x == sep-			then splitOnChar sep xs-			else-				let (chunk, rest) = Text.break (== sep) t in-				chunk:splitOnChar sep rest-instance SplitOnChar String where-	splitOnChar sep t =-		case t of-		 [] -> []-		 x:xs ->-			if x == sep-			then splitOnChar sep xs-			else-				let (chunk, rest) = List.break (== sep) t in-				chunk:splitOnChar sep rest--}
stack.yaml view
@@ -1,3 +1,3 @@-resolver: nightly-2017-02-03+resolver: lts-10.5 packages: - '.'
symantic-document.cabal view
@@ -1,33 +1,41 @@-author: Julien Moutinho <julm+symantic@autogeree.net>--- bug-reports: http://bug.autogeree.net/symantic-build-type: Simple-cabal-version: >= 1.8+name: symantic-document+-- PVP:  +-+------- breaking API changes+--       | | +----- non-breaking API additions+--       | | | +--- code changes with no API change+version: 0.0.0.20180213 category: Text--- data-dir: data--- data-files: +synopsis: Document symantics. description: Symantics for generating documents.-extra-source-files:-  stack.yaml-extra-tmp-files:--- homepage: http://pad.autogeree.net/informatique/symantic+extra-doc-files: license: GPL-3 license-file: COPYING-maintainer: Julien Moutinho <julm+symantic@autogeree.net>-name: symantic-document stability: experimental-synopsis: Document symantics.-tested-with: GHC==8.0.2--- PVP:  +-+------- breaking API changes---       | | +----- non-breaking API additions---       | | | +--- code changes with no API change-version: 0.0.0.20170623+author:      Julien Moutinho <julm+symantic@autogeree.net>+maintainer:  Julien Moutinho <julm+symantic@autogeree.net>+bug-reports: Julien Moutinho <julm+symantic@autogeree.net>+-- homepage: +build-type: Simple+cabal-version: >= 1.10+tested-with: GHC==8.2.2+extra-source-files:+  stack.yaml+extra-tmp-files:+ source-repository head   location: git://git.autogeree.net/symantic   type:     git  Library-  extensions:+  exposed-modules:+    Language.Symantic.Document+    Language.Symantic.Document.ANSI+    Language.Symantic.Document.Dim+    Language.Symantic.Document.Plain+    Language.Symantic.Document.Sym+    Language.Symantic.Document.Valid+  default-language: Haskell2010+  default-extensions:     NoImplicitPrelude     DataKinds     DefaultSignatures@@ -42,16 +50,13 @@     TupleSections     TypeFamilies     TypeOperators-  ghc-options: -Wall -fno-warn-tabs-  exposed-modules:-    Language.Symantic.Document-    Language.Symantic.Document.ANSI-    Language.Symantic.Document.Dim-    Language.Symantic.Document.Plain-    Language.Symantic.Document.Sym-    Language.Symantic.Document.Valid+  ghc-options:+    -Wall+    -Wincomplete-uni-patterns+    -Wincomplete-record-updates+    -fno-warn-tabs+    -fhide-source-paths   build-depends:-    ansi-terminal-    , base >= 4.6 && < 5-    , text-    -- , transformers >= 0.4 && < 0.5+      ansi-terminal >= 0.7+    , base          >= 4.6 && < 5+    , text          >= 1.2