Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-and-itasks
clean-ide
Commits
3a153dc9
Commit
3a153dc9
authored
Feb 12, 2002
by
Diederik van Arkel
Browse files
Remove unused strictness annotations
parent
449c3d5a
Changes
65
Show whitespace changes
Inline
Side-by-side
Ed/EdFind.dcl
View file @
3a153dc9
...
@@ -16,7 +16,7 @@ simpleLineSearch ::
...
@@ -16,7 +16,7 @@ simpleLineSearch ::
->
Maybe
Selection
// maybe found selection
->
Maybe
Selection
// maybe found selection
simpleLineSearch`
::
// Alternative version for Replace All
simpleLineSearch`
::
// Alternative version for Replace All
!
Selection
!
Bool
!
Bool
!
Bool
!
Bool
!
String
!*{
String
}
->
!
(!
Maybe
Selection
,!*{
String
})
!
Selection
!
Bool
!
Bool
!
Bool
!
Bool
!
String
!*{
String
}
->
(!
Maybe
Selection
,!*{
String
})
regexpLineSearch
::
regexpLineSearch
::
// regexp search
// regexp search
...
@@ -30,7 +30,7 @@ regexpLineSearch ::
...
@@ -30,7 +30,7 @@ regexpLineSearch ::
->
Maybe
Selection
// maybe found selection
->
Maybe
Selection
// maybe found selection
regexpLineSearch`
::
// Alternative version for Replace All
regexpLineSearch`
::
// Alternative version for Replace All
!
Selection
!
Bool
!
Bool
!
Bool
!
Bool
!
String
!*{
String
}
->
!
(!
Maybe
Selection
,!*{
String
})
!
Selection
!
Bool
!
Bool
!
Bool
!
Bool
!
String
!*{
String
}
->
(!
Maybe
Selection
,!*{
String
})
regexpLineReplace
::
regexpLineReplace
::
// regexp replace
// regexp replace
...
...
Ed/EdFind.icl
View file @
3a153dc9
...
@@ -110,7 +110,7 @@ where
...
@@ -110,7 +110,7 @@ where
|
s
<=
col`
=
Just
(
s
,
f
)
|
s
<=
col`
=
Just
(
s
,
f
)
=
findb
r
=
findb
r
regexpLineSearch`
::
!
Selection
!
Bool
!
Bool
!
Bool
!
Bool
!
String
!*{
String
}
->
!
(!
Maybe
Selection
,!*{
String
})
regexpLineSearch`
::
!
Selection
!
Bool
!
Bool
!
Bool
!
Bool
!
String
!*{
String
}
->
(!
Maybe
Selection
,!*{
String
})
regexpLineSearch`
sel
=:{
start
,
end
}
backwards
wraparound
ignore_case
match_words
search
text`
regexpLineSearch`
sel
=:{
start
,
end
}
backwards
wraparound
ignore_case
match_words
search
text`
|
isEmpty
maybeREParserList
=
(
Nothing
,
text
)
// "no valid search pattern"
|
isEmpty
maybeREParserList
=
(
Nothing
,
text
)
// "no valid search pattern"
|
not
(
isEmpty
restParsers
)
=
(
Nothing
,
text
)
// "pattern generates multiple parsers"
|
not
(
isEmpty
restParsers
)
=
(
Nothing
,
text
)
// "pattern generates multiple parsers"
...
@@ -243,7 +243,7 @@ where
...
@@ -243,7 +243,7 @@ where
=
findIgnore`
(
next
column
)
=
findIgnore`
(
next
column
)
=
findIgnore`
(
next
column
)
=
findIgnore`
(
next
column
)
simpleLineSearch`
::
!
Selection
!
Bool
!
Bool
!
Bool
!
Bool
!
String
!*{
String
}
->
!
(!
Maybe
Selection
,!*{
String
})
simpleLineSearch`
::
!
Selection
!
Bool
!
Bool
!
Bool
!
Bool
!
String
!*{
String
}
->
(!
Maybe
Selection
,!*{
String
})
simpleLineSearch`
sel
=:{
start
,
end
}
backwards
wraparound
ignore_case
match_words
search
text`
simpleLineSearch`
sel
=:{
start
,
end
}
backwards
wraparound
ignore_case
match_words
search
text`
|
start
==
end
=
singleLineSearch`
True
sel
text
|
start
==
end
=
singleLineSearch`
True
sel
text
=
singleLineSearch`
True
{
sel
&
end
=
{
start
&
col
=
next
start
.
col
}}
text
=
singleLineSearch`
True
{
sel
&
end
=
{
start
&
col
=
next
start
.
col
}}
text
...
...
Ed/EdLineText.dcl
View file @
3a153dc9
...
@@ -24,8 +24,8 @@ textLength :: !Text -> Int
...
@@ -24,8 +24,8 @@ textLength :: !Text -> Int
lastLineNr
::
!
Text
->
LineNr
lastLineNr
::
!
Text
->
LineNr
validateLineNr
::
!
LineNr
Text
->
LineNr
validateLineNr
::
!
LineNr
Text
->
LineNr
getLine
::
!
LineNr
!
u
:
Text
->
!
(!
String
,
!
u
:
Text
)
getLine
::
!
LineNr
!
u
:
Text
->
(!
String
,
!
u
:
Text
)
getLineC
::
!
LineNr
!
u
:
Text
->
!
((!
Int
,!
String
),
!
u
:
Text
)
getLineC
::
!
LineNr
!
u
:
Text
->
((!
Int
,!
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)
//getLinesC :: LineNr LineNr Text -> (StrictList (Int,String), Text)
...
@@ -34,8 +34,8 @@ removeLine :: !LineNr !Text -> Text
...
@@ -34,8 +34,8 @@ removeLine :: !LineNr !Text -> Text
removeLines
::
!
LineNr
!
LineNr
!
Text
->
Text
removeLines
::
!
LineNr
!
LineNr
!
Text
->
Text
insertLines
::
!
LineNr
!(
StrictList
String
)
!
Text
->
Text
insertLines
::
!
LineNr
!(
StrictList
String
)
!
Text
->
Text
appendLines
::
!(
StrictList
String
)
!
Text
->
!
Text
appendLines
::
!(
StrictList
String
)
!
Text
->
Text
appendLines`
::
!(
StrictList
String
)
!
Text
->
!
Text
appendLines`
::
!(
StrictList
String
)
!
Text
->
Text
// newText: creates a new text. A new text consists of one
// newText: creates a new text. A new text consists of one
// empty line.
// empty line.
...
...
Ed/EdLineText.icl
View file @
3a153dc9
...
@@ -90,7 +90,7 @@ where
...
@@ -90,7 +90,7 @@ where
2
// silly DOS
2
// silly DOS
1
// mac
1
// mac
newline
newline
=
PlatformDependant
=
:
PlatformDependant
"
\xd\xa
"
// windows
"
\xd\xa
"
// windows
"
\xd
"
// mac
"
\xd
"
// mac
...
@@ -169,7 +169,7 @@ validateLineNr lineNr text
...
@@ -169,7 +169,7 @@ validateLineNr lineNr text
where
where
lastNr
=
lastLineNr
text
lastNr
=
lastLineNr
text
getLine
::
!
LineNr
!
u
:
Text
->
!
(!
String
,
!
u
:
Text
)
getLine
::
!
LineNr
!
u
:
Text
->
(!
String
,
!
u
:
Text
)
getLine
linenr
text
=:{
nrLines
,
blocks
}
getLine
linenr
text
=:{
nrLines
,
blocks
}
#
(_,
line
)
=
slIndex
lineNr`
theBlock
#
(_,
line
)
=
slIndex
lineNr`
theBlock
=
(
line
,
text
)
=
(
line
,
text
)
...
@@ -181,7 +181,7 @@ where
...
@@ -181,7 +181,7 @@ where
nrSkip
=
lineNr
/
BlockSize
nrSkip
=
lineNr
/
BlockSize
theBlock
=
blocks
!!
nrSkip
theBlock
=
blocks
!!
nrSkip
getLineC
::
!
LineNr
!
u
:
Text
->
!
((!
Int
,!
String
),
!
u
:
Text
)
getLineC
::
!
LineNr
!
u
:
Text
->
((!
Int
,!
String
),
!
u
:
Text
)
getLineC
linenr
text
=:{
nrLines
,
blocks
}
getLineC
linenr
text
=:{
nrLines
,
blocks
}
#
line
=
slIndex
lineNr`
theBlock
#
line
=
slIndex
lineNr`
theBlock
=
(
line
,
text
)
=
(
line
,
text
)
...
@@ -251,7 +251,7 @@ insertLines lineNr strings text=:{ nrLines, blocks }
...
@@ -251,7 +251,7 @@ insertLines lineNr strings text=:{ nrLines, blocks }
#
(_,
lines
)
=
annotPart
(
dec
lineNr
)
(
lineNr
+
nrInsertLines
)
lines
#
(_,
lines
)
=
annotPart
(
dec
lineNr
)
(
lineNr
+
nrInsertLines
)
lines
=
{
blocks
=
group
BlockSize
lines
,
nrLines
=
nrLines
+
nrInsertLines
}
=
{
blocks
=
group
BlockSize
lines
,
nrLines
=
nrLines
+
nrInsertLines
}
appendLines
::
!(
StrictList
String
)
!
Text
->
!
Text
appendLines
::
!(
StrictList
String
)
!
Text
->
Text
appendLines
strings
text
=:{
nrLines
,
blocks
}
appendLines
strings
text
=:{
nrLines
,
blocks
}
#
nrAppendLines
=
slLength
strings
#
nrAppendLines
=
slLength
strings
#
before
=
textToStringsC
text
#
before
=
textToStringsC
text
...
@@ -260,7 +260,7 @@ appendLines strings text=:{ nrLines, blocks }
...
@@ -260,7 +260,7 @@ appendLines strings text=:{ nrLines, blocks }
#
(_,
lines
)
=
annotPart
(
dec
nrLines
)
(
nrLines
+
nrAppendLines
)
lines
#
(_,
lines
)
=
annotPart
(
dec
nrLines
)
(
nrLines
+
nrAppendLines
)
lines
=
{
blocks
=
group
BlockSize
lines
,
nrLines
=
nrLines
+
nrAppendLines
}
=
{
blocks
=
group
BlockSize
lines
,
nrLines
=
nrLines
+
nrAppendLines
}
appendLines`
::
!(
StrictList
String
)
!
Text
->
!
Text
appendLines`
::
!(
StrictList
String
)
!
Text
->
Text
appendLines`
strings
text
=:{
nrLines
,
blocks
}
appendLines`
strings
text
=:{
nrLines
,
blocks
}
#
(
string
,
strings
)
=
case
strings
of
#
(
string
,
strings
)
=
case
strings
of
SNil
->
(
""
,
SNil
)
SNil
->
(
""
,
SNil
)
...
...
Ed/EdLook.dcl
View file @
3a153dc9
...
@@ -6,7 +6,7 @@ from StdPicture import :: Picture
...
@@ -6,7 +6,7 @@ from StdPicture import :: Picture
from
StdIOCommon
import
::
SelectState
,
::
UpdateState
from
StdIOCommon
import
::
SelectState
,
::
UpdateState
import
EdMonad
import
EdMonad
editWindowLook
::
EditState
SelectState
!
UpdateState
->
(
!
*
Picture
->
*
Picture
)
editWindowLook
::
EditState
SelectState
!
UpdateState
->
(*
Picture
->
*
Picture
)
// editWindowLook: defines the look of the editor window. This function
// editWindowLook: defines the look of the editor window. This function
// is used to handle update events.
// is used to handle update events.
Ed/EdLook.icl
View file @
3a153dc9
...
@@ -10,7 +10,7 @@ import EdVisualText, EdVisualCursor, EdVisualLineNr, EdSelection
...
@@ -10,7 +10,7 @@ import EdVisualText, EdVisualCursor, EdVisualLineNr, EdSelection
// editWindowLook: updating the affected areas is done by updating
// editWindowLook: updating the affected areas is done by updating
// each of the rectangles.
// each of the rectangles.
editWindowLook
::
EditState
SelectState
!
UpdateState
->
(
!
*
Picture
->
*
Picture
)
editWindowLook
::
EditState
SelectState
!
UpdateState
->
(*
Picture
->
*
Picture
)
editWindowLook
editState
selectState
updateState
=:{
updArea
,
newFrame
,
oldFrame
}
editWindowLook
editState
selectState
updateState
=:{
updArea
,
newFrame
,
oldFrame
}
=
editWindowLook`
=
editWindowLook`
where
where
...
...
Ed/EdMonad.dcl
View file @
3a153dc9
...
@@ -55,7 +55,7 @@ from EdSelection import :: Selection, :: Position, :: ColumnNr, :: LineNr
...
@@ -55,7 +55,7 @@ from EdSelection import :: Selection, :: Position, :: ColumnNr, :: LineNr
,
keywordColour
::
!
Colour
,
keywordColour
::
!
Colour
}
}
DefaultSyntaxColours
::
!
SyntaxColours
DefaultSyntaxColours
::
SyntaxColours
::
UndoInfo
=
::
UndoInfo
=
{
state
::
!
UndoState
// undo or redo
{
state
::
!
UndoState
// undo or redo
...
...
Ed/EdMonad.icl
View file @
3a153dc9
...
@@ -401,7 +401,7 @@ computeFontInfo font (tabSize,autoTab,showTabs,_,showSynCol) syncols pstate
...
@@ -401,7 +401,7 @@ computeFontInfo font (tabSize,autoTab,showTabs,_,showSynCol) syncols pstate
,
pstate
,
pstate
)
)
DefaultSyntaxColours
::
!
SyntaxColours
DefaultSyntaxColours
::
SyntaxColours
DefaultSyntaxColours
=
DefaultSyntaxColours
=
{
textColour
=
Black
{
textColour
=
Black
,
tabColour
=
Red
,
tabColour
=
Red
...
...
Ed/EdTab.icl
View file @
3a153dc9
...
@@ -99,7 +99,7 @@ tabDrawStringC point (clevel,string)
...
@@ -99,7 +99,7 @@ tabDrawStringC point (clevel,string)
=
tabDrawString`
(
N
clevel
)
point
strings
picture
=
tabDrawString`
(
N
clevel
)
point
strings
picture
where
where
tabDrawString`
::
!
CommentLevel
!
Point2
!.[
String
]
!*
Picture
->
!
*
Picture
tabDrawString`
::
!
CommentLevel
!
Point2
!.[
String
]
!*
Picture
->
*
Picture
// hmm, need to get if column 0 into local funs...
// hmm, need to get if column 0 into local funs...
tabDrawString`
_
_
[]
picture
tabDrawString`
_
_
[]
picture
// #! (_,picture) = optGetPenPos picture
// #! (_,picture) = optGetPenPos picture
...
@@ -128,11 +128,11 @@ where
...
@@ -128,11 +128,11 @@ where
drawC
::
!.
CommentLevel
!.
String
!*
Picture
->
!
(!.
CommentLevel
,!*
Picture
)
drawC
::
!.
CommentLevel
!.
String
!*
Picture
->
(!.
CommentLevel
,!*
Picture
)
drawC
c
s
pic
drawC
c
s
pic
=
drawC
c
pic
=
drawC
c
pic
where
where
drawC
::
!.
CommentLevel
!*
Picture
->
!
(!.
CommentLevel
,!*
Picture
)
drawC
::
!.
CommentLevel
!*
Picture
->
(!.
CommentLevel
,!*
Picture
)
drawC
S
pic
// string literal
drawC
S
pic
// string literal
#
pic
=
setPenColour
stringColour
pic
#
pic
=
setPenColour
stringColour
pic
=
dS
0
pic
=
dS
0
pic
...
@@ -156,10 +156,10 @@ where
...
@@ -156,10 +156,10 @@ where
|
s
.[
i
]
==
x
=
True
|
s
.[
i
]
==
x
=
True
=
isStringMember
x
(
dec
i
)
s
=
isStringMember
x
(
dec
i
)
s
funnyChars
=
"~@#$%^?!+-*<>
\\
/|&=:."
funnyChars
=
:
"~@#$%^?!+-*<>
\\
/|&=:."
funnySize
=
20
funnySize
=
20
dL
::
!.
Int
!.
Int
!*
Picture
->
!
(!.
CommentLevel
,!*
Picture
)
dL
::
!.
Int
!.
Int
!*
Picture
->
(!.
CommentLevel
,!*
Picture
)
dL
cl
i
pic
dL
cl
i
pic
|
i
>=
l
|
i
>=
l
=
(
N
cl
,
pic
)
=
(
N
cl
,
pic
)
...
@@ -237,7 +237,7 @@ where
...
@@ -237,7 +237,7 @@ where
#
pic
=
optDrawS
r
pic
#
pic
=
optDrawS
r
pic
=
dL
cl
j
pic
=
dL
cl
j
pic
where
where
scankeyword
::
!.
String
!
Int
->
!
(!
Bool
,!
Int
)
scankeyword
::
!.
String
!
Int
->
(!
Bool
,!
Int
)
scankeyword
s
i
scankeyword
s
i
#
c
=
s
.[
i
]
#
c
=
s
.[
i
]
|
not
(
isAlpha
c
)
|
not
(
isAlpha
c
)
...
@@ -315,7 +315,7 @@ where
...
@@ -315,7 +315,7 @@ where
|
funnyChar
i
=
scanfunny
(
inc
i
)
|
funnyChar
i
=
scanfunny
(
inc
i
)
=
i
=
i
dS
::
!
Int
!*
Picture
->
!
(!.
CommentLevel
,!*
Picture
)
dS
::
!
Int
!*
Picture
->
(!.
CommentLevel
,!*
Picture
)
dS
i
pic
dS
i
pic
|
i
>=
l
|
i
>=
l
=
(
S
,
pic
)
=
(
S
,
pic
)
...
@@ -332,7 +332,7 @@ where
...
@@ -332,7 +332,7 @@ where
=
dS
(
inc
i
)
pic
=
dS
(
inc
i
)
pic
#
pic
=
optDrawC
s
.[
i
]
pic
#
pic
=
optDrawC
s
.[
i
]
pic
=
dS
(
inc
i
)
pic
=
dS
(
inc
i
)
pic
dC
::
!
Int
!*
Picture
->
!
(!.
CommentLevel
,!*
Picture
)
dC
::
!
Int
!*
Picture
->
(!.
CommentLevel
,!*
Picture
)
dC
i
pic
dC
i
pic
|
i
>=
l
|
i
>=
l
=
(
C
,
pic
)
=
(
C
,
pic
)
...
...
Ed/EdText.dcl
View file @
3a153dc9
...
@@ -9,7 +9,7 @@ import EdLineText
...
@@ -9,7 +9,7 @@ import EdLineText
getTextFragment
::
!
Selection
!
Text
->
(!
TextFragment
,
!
Text
)
getTextFragment
::
!
Selection
!
Text
->
(!
TextFragment
,
!
Text
)
removeText
::
!
Selection
!
Text
->
(
Maybe
Int
,
Text
)
removeText
::
!
Selection
!
Text
->
(
Maybe
Int
,
Text
)
insertText
::
!
Position
!
TextFragment
!
Text
->
(
Maybe
Int
,
Text
)
insertText
::
!
Position
!
TextFragment
!
Text
->
(
Maybe
Int
,
Text
)
replaceText
::
!
Selection
!
TextFragment
!
Text
->
!
Text
replaceText
::
!
Selection
!
TextFragment
!
Text
->
Text
appendText
::
!
TextFragment
!
Text
->
Text
appendText
::
!
TextFragment
!
Text
->
Text
// getSelection: returns the text fragment that is denoted
// getSelection: returns the text fragment that is denoted
...
...
Ed/EdText.icl
View file @
3a153dc9
...
@@ -72,7 +72,7 @@ insertText { col, row } strings text
...
@@ -72,7 +72,7 @@ insertText { col, row } strings text
where
where
nrOfStrings
=
slLength
strings
nrOfStrings
=
slLength
strings
replaceText
::
!
Selection
!
TextFragment
!
Text
->
!
Text
replaceText
::
!
Selection
!
TextFragment
!
Text
->
Text
replaceText
sel
=:{
start
={
col
=
col1
,
row
=
row1
},
end
={
col
=
col2
,
row
=
row2
}}
strings
text
replaceText
sel
=:{
start
={
col
=
col1
,
row
=
row1
},
end
={
col
=
col2
,
row
=
row2
}}
strings
text
#
(
firstLine
,
text
)
=
getLine
row1
text
#
(
firstLine
,
text
)
=
getLine
row1
text
#
(
lastLine
,
text
)
=
if
(
row1
==
row2
)
#
(
lastLine
,
text
)
=
if
(
row1
==
row2
)
...
...
Ed/EdVisualText.dcl
View file @
3a153dc9
...
@@ -27,7 +27,7 @@ vRemoveText :: !Selection -> EditMonad (PSt .l) nothing
...
@@ -27,7 +27,7 @@ vRemoveText :: !Selection -> EditMonad (PSt .l) nothing
computeViewDomain
::
EditMonad
.
env
ViewDomain
computeViewDomain
::
EditMonad
.
env
ViewDomain
getViewFrame
::
EditMonad
(
PSt
.
l
)
ViewFrame
getViewFrame
::
EditMonad
(
PSt
.
l
)
ViewFrame
vResetViewDomain
::
EditMonad
!
(
PSt
.
l
)
nothing
vResetViewDomain
::
EditMonad
(
PSt
.
l
)
nothing
vTextUpdate
::
!
Position
Int
->
EditMonad
(
PSt
.
l
)
nothing
vTextUpdate
::
!
Position
Int
->
EditMonad
(
PSt
.
l
)
nothing
vDraw
::
(*
Picture
->
*
Picture
)
->
EditMonad
(
PSt
.
l
)
a
vDraw
::
(*
Picture
->
*
Picture
)
->
EditMonad
(
PSt
.
l
)
a
...
...
Ed/EdVisualText.icl
View file @
3a153dc9
...
@@ -233,7 +233,7 @@ vTextUpdate position=:{row} numLines =
...
@@ -233,7 +233,7 @@ vTextUpdate position=:{row} numLines =
// vResetViewDomain changes the view domain, so that the current visual
// vResetViewDomain changes the view domain, so that the current visual
// text fits in the window.
// text fits in the window.
vResetViewDomain
::
EditMonad
!
(
PSt
.
l
)
nothing
vResetViewDomain
::
EditMonad
(
PSt
.
l
)
nothing
vResetViewDomain
=
monad
vResetViewDomain
=
monad
where
where
monad
(
editState
,
pState
)
monad
(
editState
,
pState
)
...
...
Ed/EdWindow.dcl
View file @
3a153dc9
...
@@ -22,7 +22,7 @@ openEditWindow ::
...
@@ -22,7 +22,7 @@ openEditWindow ::
SyntaxColours
// syntax colours
SyntaxColours
// syntax colours
Id
// window id
Id
// window id
[.
WindowAttribute
*(
EditState
,*
PSt
*
b
)]
// initial attributes
[.
WindowAttribute
*(
EditState
,*
PSt
*
b
)]
// initial attributes
!*(
PSt
*
b
)
->
!
*
PSt
*
b
|
Editor
b
;
!*(
PSt
*
b
)
->
*
PSt
*
b
|
Editor
b
;
closeEditWindow
::
closeEditWindow
::
!
Id
// window id
!
Id
// window id
...
...
Ed/EdWindow.icl
View file @
3a153dc9
...
@@ -9,7 +9,7 @@ import ioutil
...
@@ -9,7 +9,7 @@ import ioutil
//---
//---
openEditWindow
::
Id
.
Title
String
Text
!
Font
(
Int
,
Bool
,
Bool
,
Bool
,
Bool
)
SyntaxColours
Id
[.
WindowAttribute
*(
EditState
,*
PSt
*
b
)]
!*(
PSt
*
b
)
->
!
*
PSt
*
b
|
Editor
b
openEditWindow
::
Id
.
Title
String
Text
!
Font
(
Int
,
Bool
,
Bool
,
Bool
,
Bool
)
SyntaxColours
Id
[.
WindowAttribute
*(
EditState
,*
PSt
*
b
)]
!*(
PSt
*
b
)
->
*
PSt
*
b
|
Editor
b
openEditWindow
uId
title
pathName
text
font
tabs
syncols
windowId
atts
ps
openEditWindow
uId
title
pathName
text
font
tabs
syncols
windowId
atts
ps
#
(
editorState
,
ps
)
=
getEditorState
ps
#
(
editorState
,
ps
)
=
getEditorState
ps
// generate a receiver identifier and store it in the editor state
// generate a receiver identifier and store it in the editor state
...
...
Ed/syncol.icl
View file @
3a153dc9
...
@@ -23,7 +23,7 @@ where
...
@@ -23,7 +23,7 @@ where
|
c
==
x
=
True
|
c
==
x
=
True
=
isStringMember
x
(
dec
i
)
s
=
isStringMember
x
(
dec
i
)
s
funnyChars
=
"~@#$%^?!+-*<>
\\
/|&=:."
funnyChars
=
:
"~@#$%^?!+-*<>
\\
/|&=:."
funnySize
=
20
// =: size funnyChars?
funnySize
=
20
// =: size funnyChars?
line_size
=
size
line
line_size
=
size
line
...
...
Ide/EdClient.icl
View file @
3a153dc9
...
@@ -550,6 +550,7 @@ msgScrollToCursor :: EditAction .l nothing
...
@@ -550,6 +550,7 @@ msgScrollToCursor :: EditAction .l nothing
msgScrollToCursor
msgScrollToCursor
=
vCenterCursor
=
vCenterCursor
msgScrollToLine
::
LineNr
->
EditAction
General
nothing
msgScrollToLine
::
LineNr
->
EditAction
General
nothing
msgScrollToLine
line
=
msgScrollToLine
line
=
vDoCursorSafe
(
vDoCursorSafe
(
...
@@ -702,13 +703,13 @@ msgReplaceAll fr =
...
@@ -702,13 +703,13 @@ msgReplaceAll fr =
vResetViewDomain
>>>
vResetViewDomain
>>>
result
(
length
ulist
)
result
(
length
ulist
)
where
where
searchFun
::
!
Selection
!*{
String
}
->
!
(!
Maybe
Selection
,!*{
String
})
searchFun
::
!
Selection
!*{
String
}
->
(!
Maybe
Selection
,!*{
String
})
searchFun
pos
txt
searchFun
pos
txt
|
fr
.
fr_regexp
|
fr
.
fr_regexp
=
regexpLineSearch`
pos
False
False
fr
.
fr_ignore_case
fr
.
fr_match_words
fr
.
fr_search
txt
=
regexpLineSearch`
pos
False
False
fr
.
fr_ignore_case
fr
.
fr_match_words
fr
.
fr_search
txt
=
simpleLineSearch`
pos
False
False
fr
.
fr_ignore_case
fr
.
fr_match_words
fr
.
fr_search
txt
=
simpleLineSearch`
pos
False
False
fr
.
fr_ignore_case
fr
.
fr_match_words
fr
.
fr_search
txt
replaceFun
::
!
Selection
!*{
String
}
->
!
(!
String
,!*{
String
})
replaceFun
::
!
Selection
!*{
String
}
->
(!
String
,!*{
String
})
replaceFun
sel
txt
replaceFun
sel
txt
|
fr
.
fr_regexp
|
fr
.
fr_regexp
#
(
line
,
txt
)
=
uselect
txt
sel
.
start
.
row
#
(
line
,
txt
)
=
uselect
txt
sel
.
start
.
row
...
@@ -717,7 +718,7 @@ where
...
@@ -717,7 +718,7 @@ where
=
(
nfrg
,
replaceText`
sel
nfrg
txt
)
=
(
nfrg
,
replaceText`
sel
nfrg
txt
)
=
(
fr
.
fr_replace
,
replaceText`
sel
fr
.
fr_replace
txt
)
=
(
fr
.
fr_replace
,
replaceText`
sel
fr
.
fr_replace
txt
)
allFun
::
!
Selection
![(
Selection
,
Selection
,
TextFragment
,
TextFragment
)]
!*{
String
}
->
!
(![(
Selection
,
Selection
,
TextFragment
,
TextFragment
)],!*{
String
})
allFun
::
!
Selection
![(
Selection
,
Selection
,
TextFragment
,
TextFragment
)]
!*{
String
}
->
(![(
Selection
,
Selection
,
TextFragment
,
TextFragment
)],!*{
String
})
allFun
pos
acc
txt
allFun
pos
acc
txt
#
(
msel
,
txt
)
=
searchFun
pos
txt
#
(
msel
,
txt
)
=
searchFun
pos
txt
|
isNothing
msel
|
isNothing
msel
...
@@ -729,7 +730,7 @@ where
...
@@ -729,7 +730,7 @@ where
#
endpos
=
newCursorPos
osel
.
start
nfrg
#
endpos
=
newCursorPos
osel
.
start
nfrg
=
allFun
{
start
=
endpos
,
end
=
endpos
}
[(
osel
,{
osel
&
end
=
endpos
},
frag
,
stringToStrings
nfrg
):
acc
]
txt
=
allFun
{
start
=
endpos
,
end
=
endpos
}
[(
osel
,{
osel
&
end
=
endpos
},
frag
,
stringToStrings
nfrg
):
acc
]
txt
newCursorPos
::
!
Position
!
String
->
!
Position
newCursorPos
::
!
Position
!
String
->
Position
newCursorPos
{
col
,
row
}
string
newCursorPos
{
col
,
row
}
string
=
{
col
=
col
+
size
string
,
row
=
row
}
=
{
col
=
col
+
size
string
,
row
=
row
}
...
@@ -742,7 +743,7 @@ where
...
@@ -742,7 +743,7 @@ where
)
)
=
abort
"EdClient: ReplaceAll: fragment must be single line..."
=
abort
"EdClient: ReplaceAll: fragment must be single line..."
replaceText`
::
!
Selection
!
String
!*{
String
}
->
!
*{
String
}
replaceText`
::
!
Selection
!
String
!*{
String
}
->
*{
String
}
replaceText`
sel
=:{
start
={
col
=
col1
,
row
=
row1
},
end
={
col
=
col2
,
row
=
row2
}}
string
text
replaceText`
sel
=:{
start
={
col
=
col1
,
row
=
row1
},
end
={
col
=
col2
,
row
=
row2
}}
string
text
|
row1
<>
row2
|
row1
<>
row2
=
abort
"EdClient: ReplaceAll: fragment must be single line..."
=
abort
"EdClient: ReplaceAll: fragment must be single line..."
...
...
Ide/IdeState.dcl
View file @
3a153dc9
...
@@ -21,8 +21,8 @@ instance Consoler General // Console
...
@@ -21,8 +21,8 @@ instance Consoler General // Console
getProject
::
!*(
PSt
*
General
)
->
(
Project
,*
PSt
*
General
)
getProject
::
!*(
PSt
*
General
)
->
(
Project
,*
PSt
*
General
)
setProject
::
!
Project
!*(
PSt
*
General
)
->
*
PSt
*
General
setProject
::
!
Project
!*(
PSt
*
General
)
->
*
PSt
*
General
appProject
::
(
!
Project
->
Project
)
!*(
PSt
*
General
)
->
*
PSt
*
General
appProject
::
(
Project
->
Project
)
!*(
PSt
*
General
)
->
*
PSt
*
General
accProject
::
(
!
Project
->
(.
a
,
Project
))
!*(
PSt
*
General
)
->
(.
a
,*
PSt
*
General
)
accProject
::
(
Project
->
(.
a
,
Project
))
!*(
PSt
*
General
)
->
(.
a
,*
PSt
*
General
)
::
EditMenuLS
l
=
// local state for the Edit menu
::
EditMenuLS
l
=
// local state for the Edit menu
{
zfun
::
(
PSt
l
)
->
PSt
l
// undo-function
{
zfun
::
(
PSt
l
)
->
PSt
l
// undo-function
...
@@ -153,10 +153,10 @@ getPMR :: !*(PSt *General) -> (R2Id PLMMessage PLMReply,*PSt *General)
...
@@ -153,10 +153,10 @@ getPMR :: !*(PSt *General) -> (R2Id PLMMessage PLMReply,*PSt *General)
getTargetIds
::
!*(
PSt
*
General
)
->
((!
Id
,!
Id
),!*
PSt
*
General
)
getTargetIds
::
!*(
PSt
*
General
)
->
((!
Id
,!
Id
),!*
PSt
*
General
)
getTargets
::
!*(
PSt
*
General
)
->
(![
Target
],!*
PSt
*
General
)
getTargets
::
!*(
PSt
*
General
)
->
(![
Target
],!*
PSt
*
General
)
setTargets
::
![
Target
]
!*(
PSt
*
General
)
->
!
*
PSt
*
General
setTargets
::
![
Target
]
!*(
PSt
*
General
)
->
*
PSt
*
General
getCurrentTarget
::
!*(
PSt
*
General
)
->
(!
Int
,!*
PSt
*
General
)
getCurrentTarget
::
!*(
PSt
*
General
)
->
(!
Int
,!*
PSt
*
General
)
setCurrentTarget
::
!
Int
!*(
PSt
*
General
)
->
!
*
PSt
*
General
setCurrentTarget
::
!
Int
!*(
PSt
*
General
)
->
*
PSt
*
General
getCurrentPaths
::
!*(
PSt
*
General
)
->
(!(
List
Pathname
),!*
PSt
*
General
)
getCurrentPaths
::
!*(
PSt
*
General
)
->
(!(
List
Pathname
),!*
PSt
*
General
)
getCurrentDlibs
::
!*(
PSt
*
General
)
->
(!(
List
String
),!*
PSt
*
General
)
getCurrentDlibs
::
!*(
PSt
*
General
)
->
(!(
List
String
),!*
PSt
*
General
)
...
@@ -173,13 +173,13 @@ getCurrentMeth :: !*(PSt *General) -> (!CompileMethod,!*PSt *General)
...
@@ -173,13 +173,13 @@ getCurrentMeth :: !*(PSt *General) -> (!CompileMethod,!*PSt *General)
//-- error window stuff
//-- error window stuff
setErrInfo
::
!(
ErrorInfo
(
PSt
*
General
))
!*(
PSt
*
General
)
->
!
*
PSt
*
General
setErrInfo
::
!(
ErrorInfo
(
PSt
*
General
))
!*(
PSt
*
General
)
->
*
PSt
*
General
getErrInfo
::
!*(
PSt
*
General
)
->
(!
ErrorInfo
(
PSt
*
General
),!*
PSt
*
General
)
getErrInfo
::
!*(
PSt
*
General
)
->
(!
ErrorInfo
(
PSt
*
General
),!*
PSt
*
General
)
//-- project window stuff
//-- project window stuff
getPWI
::
!*(
PSt
*
General
)
->
(!
ExtListBoxId
(
PSt
General
),!*
PSt
*
General
)
getPWI
::
!*(
PSt
*
General
)
->
(!
ExtListBoxId
(
PSt
General
),!*
PSt
*
General
)
setPWI
::
!(
ExtListBoxId
(
PSt
General
))
!*(
PSt
*
General
)
->
!
*
PSt
*
General
setPWI
::
!(
ExtListBoxId
(
PSt
General
))
!*(
PSt
*
General
)
->
*
PSt
*
General
getPWW
::
!*(
PSt
*
General
)
->
(!
Id
,!*
PSt
*
General
)
getPWW
::
!*(
PSt
*
General
)
->
(!
Id
,!*
PSt
*
General
)
getPWX
::
!*(
PSt
*
General
)
->
(!
FlexId
,!*
PSt
*
General
)
getPWX
::
!*(
PSt
*
General
)
->
(!
FlexId
,!*
PSt
*
General
)
getPWM
::
!*(
PSt
*
General
)
->
(!
FlexId
,!*
PSt
*
General
)
getPWM
::
!*(
PSt
*
General
)
->
(!
FlexId
,!*
PSt
*
General
)
...
@@ -187,17 +187,17 @@ getPWM :: !*(PSt *General) -> (!FlexId,!*PSt *General)
...
@@ -187,17 +187,17 @@ getPWM :: !*(PSt *General) -> (!FlexId,!*PSt *General)
//-- search stuff
//-- search stuff
getFBI
::
!*(
PSt
*
General
)
->
(!
FindBoxInfo
*(
PSt
*
General
),!*
PSt
*
General
)
getFBI
::
!*(
PSt
*
General
)
->
(!
FindBoxInfo
*(
PSt
*
General
),!*
PSt
*
General
)
setFBI
::
!(
FindBoxInfo
*(
PSt
*
General
))
!*(
PSt
*
General
)
->
!
*
PSt
*
General
setFBI
::
!(
FindBoxInfo
*(
PSt
*
General
))
!*(
PSt
*
General
)
->
*
PSt
*
General
//-- find stuff
//-- find stuff
getFI
::
!*(
PSt
*
General
)
->
(!
FindInfo
,!*
PSt
*
General
)
getFI
::
!*(
PSt
*
General
)
->
(!
FindInfo
,!*
PSt
*
General
)
setFI
::
!
FindInfo
!*(
PSt
*
General
)
->
!
*
PSt
*
General
setFI
::
!
FindInfo
!*(
PSt
*
General
)
->
*
PSt
*
General
//-- project path
//-- project path