packages feed

debian 3.95.1 → 3.96

raw patch · 3 files changed

+27/−15 lines, 3 filesdep +prettyclassdep ~pretty

Dependencies added: prettyclass

Dependency ranges changed: pretty

Files

debian.cabal view
@@ -1,11 +1,11 @@ Name:           debian-Version:        3.95.1+Version:        3.96 License:        BSD3 License-File:   debian/copyright Author:         David Fox <dsf@seereason.com>, Jeremy Shaw <jeremy@seereason.com>, Clifford Beshers <beshers@seereason.com> Category:       Debian-Maintainer:     Clint Adams <clint@debian.org>-Homepage:       https://github.com/clinty/debian-haskell+Maintainer:     David Fox <dsf@seereason.com>+Homepage:       https://github.com/ddssff/debian-haskell Build-Type:     Simple Synopsis:       Modules for working with the Debian package system Cabal-Version: >= 1.9@@ -20,6 +20,11 @@  Description: Get Network.URI from the network-uri package  Default: True +flag pretty-new+ Description: pretty-1.1.2 includes the Text.PrettyPrint.HughesPJClass module from prettyclass+ Default: True+ Manual: True+ Library  Hs-Source-Dirs: src  Build-Depends:@@ -40,7 +45,6 @@    mtl,    old-locale,    parsec >= 2 && <4,-   pretty >= 1.1.2,    process,    process-extras >= 0.2.0,    pureMD5,@@ -62,6 +66,10 @@    Build-Depends: network-uri >= 2.6  else    Build-Depends: network >= 2.4 && < 2.6+ if flag(pretty-new)+   Build-Depends: pretty >= 1.1.2+ else+   Build-Depends: pretty, prettyclass   ghc-options: -Wall  Exposed-modules:@@ -136,9 +144,13 @@   Type: exitcode-stdio-1.0   Hs-Source-Dirs: Test   Main-Is: Main.hs- Build-Depends: base, Cabal, debian, HUnit, parsec, pretty >= 1.1.2, regex-tdfa, text+ Build-Depends: base, Cabal, debian, HUnit, parsec, regex-tdfa, text  Other-Modules: Changes Control Dependencies Paths_debian Versions+ if flag(pretty-new)+   Build-Depends: pretty >= 1.1.2+ else+   Build-Depends: pretty, prettyclass  source-repository head   type:     git-  location: https://github.com/clinty/debian-haskell+  location: https://github.com/ddssff/debian-haskell
debian/copyright view
@@ -8,7 +8,6 @@  Copyright (c) 2007, David Fox Copyright (c) 2007, Jeremy Shaw-Copyright 2019 Clint Adams  All rights reserved. 
src/Debian/Control/ByteString.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, FlexibleContexts, MultiParamTypeClasses, PackageImports, ScopedTypeVariables #-}+{-# LANGUAGE CPP, FlexibleContexts, MultiParamTypeClasses, PackageImports, ScopedTypeVariables, TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-name-shadowing -fno-warn-orphans #-} module Debian.Control.ByteString     ( Control'(..)@@ -32,13 +32,14 @@ import Data.Word (Word8) import Data.List import qualified Data.ListLike as LL-import qualified Data.ListLike.String as LL+import qualified Data.ListLike.String ()  import Text.ParserCombinators.Parsec.Error import Text.ParserCombinators.Parsec.Pos  -- Third Party Modules +import qualified Data.ByteString as W import qualified Data.ByteString.Char8 as C  import Debian.Control.Common hiding (protectFieldText')@@ -129,15 +130,15 @@     protectFieldText = protectFieldText'     asString = C.unpack -protectFieldText' :: (LL.StringLike a, LL.ListLike a Word8) => ControlFunctions a => a -> a+protectFieldText' :: (a ~ C.ByteString, LL.ListLike a Word8, ControlFunctions a) => a -> a protectFieldText' s =-    case LL.lines s of+    case C.lines s of       [] -> LL.empty-      (l : ls) -> dropWhileEnd (isSpace . chr . fromIntegral) $ LL.unlines $ l : map protect ls+      (l : ls) -> dropWhileEnd (isSpace . chr . fromIntegral) $ C.unlines $ l : map protect ls     where-      dropWhileEnd :: (LL.StringLike a, LL.ListLike a Word8) => (Word8 -> Bool) -> a -> a-      dropWhileEnd func = LL.reverse . LL.dropWhile func . LL.reverse -- foldr (\x xs -> if func x && LL.null xs then LL.empty else LL.cons x xs) empty-      protect :: (LL.StringLike a, LL.ListLike a Word8) => a -> a+      dropWhileEnd :: (a ~ W.ByteString, LL.ListLike a Word8) => (Word8 -> Bool) -> a -> a+      dropWhileEnd func = LL.reverse . W.dropWhile func . LL.reverse -- foldr (\x xs -> if func x && LL.null xs then LL.empty else LL.cons x xs) empty+      protect :: (LL.ListLike a Word8) => a -> a       protect l = maybe LL.empty (\ c -> if isHorizSpace c then l else LL.cons (ord' ' ' :: Word8) l) (LL.find (const True :: Word8 -> Bool) l)       -- isSpace' = isSpace . chr'       isHorizSpace c = elem c (map ord' " \t")