Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
Gesh
GHC
Commits
99471691
Commit
99471691
authored
25 years ago
by
Keith Wansbrough
Browse files
Options
Downloads
Patches
Plain Diff
[project @ 1999-04-27 12:25:58 by keithw]
Documentation added for RegexString.
parent
e7df5b39
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ghc/docs/users_guide/libmisc.vsgml
+37
-6
37 additions, 6 deletions
ghc/docs/users_guide/libmisc.vsgml
with
37 additions
and
6 deletions
ghc/docs/users_guide/libmisc.vsgml
+
37
−
6
View file @
99471691
...
...
@@ -556,7 +556,7 @@ unzipWith :: (a -> b -> c) -> [(a, b)] -> [c]
%* *
%************************************************************************
The GHC system library (@-syslib
gh
c@) also provides interfaces to
The GHC system library (@-syslib
mis
c@) also provides interfaces to
several useful C libraries, mostly from the GNU project.
%************************************************************************
...
...
@@ -600,8 +600,8 @@ will see in the GNU readline documentation.)
%************************************************************************
%* *
<sect2>The @Regex
p
@ and @MatchPS@ interfaces
<label id="Regex
p
">
<sect2>The @Regex@ and @MatchPS@ interfaces
<label id="Regex">
<p>
<nidx>Regex library (GHC syslib)</nidx>
<nidx>MatchPS library (GHC syslib)</nidx>
...
...
@@ -612,9 +612,10 @@ will see in the GNU readline documentation.)
(Sigbjorn Finne supplied the regular-expressions interface.)
The @Regex@ library provides quite direct interface to the GNU
regular-expression library, for doing manipulation on
@PackedString@s. You probably need to see the GNU documentation
if you are operating at this level.
regular-expression library, for doing manipulation on @PackedString@s.
You probably need to see the GNU documentation if you are operating at
this level. Alternatively, you can use the simpler and higher-level
@RegexString@ interface.
The datatypes and functions that @Regex@ provides are:
<tscreen><verb>
...
...
@@ -742,6 +743,36 @@ chopPS :: PackedString -> PackedString
matchPrefixPS :: PackedString -> PackedString -> Int
</verb></tscreen>
%************************************************************************
%* *
<sect2>The @RegexString@ interface
<label id="RegexString">
<p>
<nidx>RegexString library (GHC syslib)</nidx>
<nidx>regular-expressions library</nidx>
%* *
%************************************************************************
(Simon Marlow supplied the String Regex wrapper.)
For simple regular expression operations, the @Regex@ library is a
little heavyweight. @RegexString@ permits regex matching on ordinary
Haskell @String@s.
The datatypes and functions that @RegexString@ provides are:
<tscreen><verb>
data Regex -- a compiled regular expression
mkRegEx
:: String -- regexp to compile
-> Regex -- compiled regexp
matchRegex
:: Regex -- compiled regexp
-> String -- string to match
-> Maybe [String] -- text of $1, $2, ... (if matched)
</verb></tscreen>
%************************************************************************
%* *
<sect2>Network-interface toolkit---@Socket@ and @SocketPrim@
...
...
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