Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Cabal
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
Haskell
Cabal
Commits
f2638095
Commit
f2638095
authored
5 years ago
by
Oleg Grenrus
Browse files
Options
Downloads
Patches
Plain Diff
Add doctests for Parsec PkgconfigVersion
Related to
https://github.com/haskell/cabal/issues/6539
parent
9c4512dd
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Cabal/Distribution/Types/PkgconfigVersion.hs
+8
-0
8 additions, 0 deletions
Cabal/Distribution/Types/PkgconfigVersion.hs
with
8 additions
and
0 deletions
Cabal/Distribution/Types/PkgconfigVersion.hs
+
8
−
0
View file @
f2638095
...
@@ -40,6 +40,14 @@ instance NFData PkgconfigVersion where rnf = genericRnf
...
@@ -40,6 +40,14 @@ instance NFData PkgconfigVersion where rnf = genericRnf
instance
Pretty
PkgconfigVersion
where
instance
Pretty
PkgconfigVersion
where
pretty
(
PkgconfigVersion
bs
)
=
PP
.
text
(
BS8
.
unpack
bs
)
pretty
(
PkgconfigVersion
bs
)
=
PP
.
text
(
BS8
.
unpack
bs
)
-- |
--
-- >>> simpleParsec "1.0.2n" :: Maybe PkgconfigVersion
-- Just (PkgconfigVersion "1.0.2n")
--
-- >>> simpleParsec "0.3.5+ds" :: Maybe PkgconfigVersion
-- Nothing
--
instance
Parsec
PkgconfigVersion
where
instance
Parsec
PkgconfigVersion
where
parsec
=
PkgconfigVersion
.
BS8
.
pack
<$>
P
.
munch1
predicate
where
parsec
=
PkgconfigVersion
.
BS8
.
pack
<$>
P
.
munch1
predicate
where
predicate
c
=
isAsciiAlphaNum
c
||
c
==
'.'
||
c
==
'-'
predicate
c
=
isAsciiAlphaNum
c
||
c
==
'.'
||
c
==
'-'
...
...
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