Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clean-ide
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
6
Issues
6
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
clean-and-itasks
clean-ide
Commits
904ee1fe
Commit
904ee1fe
authored
Mar 14, 2003
by
Diederik van Arkel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add strictness annots to getLine(s)
parent
a58ff24c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
Ed/EdLineText.dcl
Ed/EdLineText.dcl
+1
-1
Ed/EdLineText.icl
Ed/EdLineText.icl
+4
-3
No files found.
Ed/EdLineText.dcl
View file @
904ee1fe
...
...
@@ -27,7 +27,7 @@ validateLineNr :: !LineNr Text -> LineNr
getLine
::
!
LineNr
!
u
:
Text
->
(!
String
,
!
u
:
Text
)
getLineC
::
!
LineNr
!
u
:
Text
->
((!
Info
,!
String
),
!
u
:
Text
)
getLines
::
LineNr
LineNr
Text
->
(
StrictList
String
,
Text
)
getLines
::
!
LineNr
!
LineNr
!
Text
->
(!
StrictList
String
,
!
Text
)
//getLinesC :: LineNr LineNr Text -> (StrictList (Int,String), Text)
updateLine
::
!
LineNr
!
String
!.
Text
->
(!
Int
,!
Int
,!.
Text
)
...
...
Ed/EdLineText.icl
View file @
904ee1fe
...
...
@@ -101,6 +101,7 @@ where
sSize
(
SCons
string
SNil
)
=
size
string
sSize
(
SCons
string
rest
)
=
size
string
+
sizeNewline
+
sSize
rest
sUpdate
::
!
Int
!*
String
!(
StrictList
String
)
->
*
String
sUpdate
i
s
SNil
=
s
sUpdate
i
s
(
SCons
string
SNil
)
#
(_,
s
)
=
sU
(
size
string
)
i
0
s
string
...
...
@@ -143,7 +144,7 @@ blocksToStrings :: ![StrictList (Info,String)] -> StrictList String
blocksToStrings
[]
=
SNil
blocksToStrings
[
block
:
blocks
]
=
slAppend
(
blockToStrings
block
)
(
blocksToStrings
blocks
)
blocksToStringsC
::
![
StrictList
(
Info
,
String
)]
->
StrictList
(
Info
,
String
)
blocksToStringsC
[]
=
SNil
blocksToStringsC
[
block
:
blocks
]
...
...
@@ -200,7 +201,7 @@ where
// denotes by the line numbers. It also returns the number of
// the first block
getBlocks
::
LineNr
LineNr
Text
->
(
Int
,
[
StrictList
(
Info
,
String
)])
getBlocks
::
!
LineNr
!
LineNr
!
Text
->
(!
Int
,
!
[
StrictList
(
Info
,
String
)])
getBlocks
first
last
{
blocks
}
=
(
nrSkip
,
blocks
%(
nrSkip
,
nrTake
)
...
...
@@ -209,7 +210,7 @@ where
nrSkip
=
first
/
BlockSize
nrTake
=
last
/
BlockSize
+
1
getLines
::
LineNr
LineNr
Text
->
(
StrictList
String
,
Text
)
getLines
::
!
LineNr
!
LineNr
!
Text
->
(!
StrictList
String
,
!
Text
)
getLines
first
last
text
=
(
slTake
(
last
-
first
+
1
)
(
slDrop
first`
(
blocksToStrings
blocks
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment