Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pretty
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Glasgow Haskell Compiler
Packages
pretty
Commits
e985cee6
Commit
e985cee6
authored
14 years ago
by
Christian.Maeder@dfki.de
Browse files
Options
Downloads
Patches
Plain Diff
added sizedText
parent
2bc029c7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Text/PrettyPrint/HughesPJ.hs
+7
-2
7 additions, 2 deletions
Text/PrettyPrint/HughesPJ.hs
pretty.cabal
+1
-1
1 addition, 1 deletion
pretty.cabal
with
8 additions
and
3 deletions
Text/PrettyPrint/HughesPJ.hs
+
7
−
2
View file @
e985cee6
...
...
@@ -173,8 +173,9 @@ module Text.PrettyPrint.HughesPJ (
Doc
,
-- Abstract
-- * Constructing documents
-- ** Converting values into documents
char
,
text
,
ptext
,
zeroWidthText
,
char
,
text
,
ptext
,
sizedText
,
zeroWidthText
,
int
,
integer
,
float
,
double
,
rational
,
-- ** Simple derived documents
...
...
@@ -265,6 +266,9 @@ instance IsString Doc where
-- | An obsolete function, now identical to 'text'.
ptext
::
String
->
Doc
-- | Some text with any width. (@text s = sizedText (length s) s@)
sizedText
::
Int
->
String
->
Doc
-- | Some text, but without any width. Use for non-printing text
-- such as a HTML or Latex tags
zeroWidthText
::
String
->
Doc
...
...
@@ -621,7 +625,8 @@ isEmpty _ = False
char
c
=
textBeside_
(
Chr
c
)
1
Empty
text
s
=
case
length
s
of
{
sl
->
textBeside_
(
Str
s
)
sl
Empty
}
ptext
s
=
case
length
s
of
{
sl
->
textBeside_
(
PStr
s
)
sl
Empty
}
zeroWidthText
s
=
textBeside_
(
Str
s
)
0
Empty
sizedText
l
s
=
textBeside_
(
Str
s
)
l
Empty
zeroWidthText
=
sizedText
0
nest
k
p
=
mkNest
k
(
reduceDoc
p
)
-- Externally callable version
...
...
This diff is collapsed.
Click to expand it.
pretty.cabal
+
1
−
1
View file @
e985cee6
name: pretty
version: 1.0.
1.2
version: 1.0.
2.0
license: BSD3
license-file: LICENSE
maintainer: libraries@haskell.org
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment