Commit d120bc74 authored by Diederik van Arkel's avatar Diederik van Arkel

Commit windows mods

parent c85ad9d9
...@@ -4,6 +4,7 @@ definition module EdLineText ...@@ -4,6 +4,7 @@ definition module EdLineText
from StrictList import :: StrictList from StrictList import :: StrictList
from EdPosition import :: LineNr from EdPosition import :: LineNr
from syncol import :: Info
:: Text :: Text
:: TextFragment :: TextFragment
...@@ -25,7 +26,7 @@ lastLineNr :: !Text -> LineNr ...@@ -25,7 +26,7 @@ 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 -> ((!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) //getLinesC :: LineNr LineNr Text -> (StrictList (Int,String), Text)
......
...@@ -21,8 +21,8 @@ where ...@@ -21,8 +21,8 @@ where
export TextAnnot Void, SyncInf, ConsInf export TextAnnot Void, SyncInf, ConsInf
*/ */
:: LineAnnot :== Int :: LineAnnot :== Info
dummyLineAnnot :== 0 dummyLineAnnot :== (0,False)
annotLine :== slMap (\s->(dummyLineAnnot,s)) annotLine :== slMap (\s->(dummyLineAnnot,s))
annotWhole :== firstParse annotWhole :== firstParse
annotPart :== quickParse annotPart :== quickParse
...@@ -64,7 +64,7 @@ textToStrings :: !Text -> StrictList String ...@@ -64,7 +64,7 @@ textToStrings :: !Text -> StrictList String
textToStrings { blocks } textToStrings { blocks }
= blocksToStrings blocks = blocksToStrings blocks
textToStringsC :: !Text -> StrictList (Int,String) textToStringsC :: !Text -> StrictList (Info,String)
textToStringsC { blocks } textToStringsC { blocks }
= blocksToStringsC blocks = blocksToStringsC blocks
...@@ -133,15 +133,15 @@ where ...@@ -133,15 +133,15 @@ where
StringToText s StringToText s
:== stringsToText (stringToStrings s) :== stringsToText (stringToStrings s)
blockToStrings :: !(StrictList (Int,String)) -> StrictList String blockToStrings :: !(StrictList (Info,String)) -> StrictList String
blockToStrings block = slMap snd block blockToStrings block = slMap snd block
blocksToStrings :: ![StrictList (Int,String)] -> StrictList String blocksToStrings :: ![StrictList (Info,String)] -> StrictList String
blocksToStrings [] = SNil blocksToStrings [] = SNil
blocksToStrings [block:blocks] blocksToStrings [block:blocks]
= slAppend (blockToStrings block) (blocksToStrings blocks) = slAppend (blockToStrings block) (blocksToStrings blocks)
blocksToStringsC :: ![StrictList (Int,String)] -> StrictList (Int,String) blocksToStringsC :: ![StrictList (Info,String)] -> StrictList (Info,String)
blocksToStringsC [] = SNil blocksToStringsC [] = SNil
blocksToStringsC [block:blocks] blocksToStringsC [block:blocks]
= slAppend block (blocksToStringsC blocks) = slAppend block (blocksToStringsC blocks)
...@@ -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 -> ((!Info,!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)
...@@ -197,7 +197,7 @@ where ...@@ -197,7 +197,7 @@ where
// denotes by the line numbers. It also returns the number of // denotes by the line numbers. It also returns the number of
// the first block // the first block
getBlocks :: LineNr LineNr Text -> (Int, [StrictList (Int,String)]) getBlocks :: LineNr LineNr Text -> (Int, [StrictList (Info,String)])
getBlocks first last { blocks } getBlocks first last { blocks }
= ( nrSkip = ( nrSkip
, blocks%(nrSkip,nrTake) , blocks%(nrSkip,nrTake)
...@@ -216,7 +216,7 @@ where ...@@ -216,7 +216,7 @@ where
(firstBlockNr, blocks) = getBlocks first last text (firstBlockNr, blocks) = getBlocks first last text
first` = first - firstBlockNr * BlockSize first` = first - firstBlockNr * BlockSize
getLinesC :: LineNr LineNr Text -> (StrictList (Int,String), Text) getLinesC :: LineNr LineNr Text -> (StrictList (Info,String), Text)
getLinesC first last text getLinesC first last text
# lines = textToStringsC text # lines = textToStringsC text
# lines = slTake (last - first + 1) (slDrop first lines) # lines = slTake (last - first + 1) (slDrop first lines)
......
...@@ -53,6 +53,7 @@ from EdSelection import :: Selection, :: Position, :: ColumnNr, :: LineNr ...@@ -53,6 +53,7 @@ from EdSelection import :: Selection, :: Position, :: ColumnNr, :: LineNr
, stringColour :: !Colour , stringColour :: !Colour
, charColour :: !Colour , charColour :: !Colour
, keywordColour :: !Colour , keywordColour :: !Colour
, typedefColour :: !Colour
} }
DefaultSyntaxColours :: SyntaxColours DefaultSyntaxColours :: SyntaxColours
......
...@@ -87,6 +87,7 @@ import EdAction ...@@ -87,6 +87,7 @@ import EdAction
, stringColour :: !Colour , stringColour :: !Colour
, charColour :: !Colour , charColour :: !Colour
, keywordColour :: !Colour , keywordColour :: !Colour
, typedefColour :: !Colour
} }
instance toString ActionInfo instance toString ActionInfo
...@@ -410,6 +411,7 @@ DefaultSyntaxColours = ...@@ -410,6 +411,7 @@ DefaultSyntaxColours =
, stringColour = Green , stringColour = Green
, charColour = Magenta , charColour = Magenta
, keywordColour = Grey , keywordColour = Grey
, typedefColour = Black
} }
//-- //--
......
...@@ -91,7 +91,7 @@ mouse (MouseDrag point modifiers) // mouse drag ...@@ -91,7 +91,7 @@ mouse (MouseDrag point modifiers) // mouse drag
getText >>>= \text -> getText >>>= \text ->
vChangeSelectionTo (selectLines firstLine newPosition.row text) vChangeSelectionTo (selectLines firstLine newPosition.row text)
) >>> ) >>>
vScrollToCursor vDragCursor point
mouse (MouseUp point modifiers) // mouse up handling mouse (MouseUp point modifiers) // mouse up handling
= getSelection >>>= \selection -> = getSelection >>>= \selection ->
......
definition module EdPosition definition module EdPosition
from StdClass import class <, class == from StdClass import class <, class ==, class toString
:: Position :: Position
= { col :: ColumnNr = { col :: ColumnNr
...@@ -12,3 +12,4 @@ from StdClass import class <, class == ...@@ -12,3 +12,4 @@ from StdClass import class <, class ==
instance < Position instance < Position
instance == Position instance == Position
instance toString Position
implementation module EdPosition implementation module EdPosition
import StdClass, StdBool, StdInt import StdClass, StdBool, StdInt, StdString
:: Position :: Position
= { col :: ColumnNr = { col :: ColumnNr
...@@ -20,3 +20,5 @@ instance < Position where ...@@ -20,3 +20,5 @@ instance < Position where
(<) { col=col1, row=row1 } { col=col2, row=row2 } (<) { col=col1, row=row1 } { col=col2, row=row2 }
= row1 < row2 || (row1 == row2 && col1 < col2) = row1 < row2 || (row1 == row2 && col1 < col2)
instance toString Position where
toString {col,row} = "(" +++ toString row +++ "," +++ toString col +++ ")"
...@@ -2,9 +2,10 @@ definition module EdTab ...@@ -2,9 +2,10 @@ definition module EdTab
// functions that deal with those annoying tab characters // functions that deal with those annoying tab characters
from StdIOCommon import :: Point2 from StdIOCommon import :: Point2
from StdPicture import :: Picture from StdPicture import :: Picture
from EdMonad import :: FontInfo from EdMonad import :: FontInfo
from syncol import :: Info
splitAtTabs :: !String -> .[String] splitAtTabs :: !String -> .[String]
// splitAtTabs: splits a string into several strings that were // splitAtTabs: splits a string into several strings that were
...@@ -17,7 +18,6 @@ tabTake :: !Int [String] -> [String] ...@@ -17,7 +18,6 @@ tabTake :: !Int [String] -> [String]
// ["abc",""] // ["abc",""]
tabDrawString :: !Point2 !String !FontInfo !*Picture -> *Picture tabDrawString :: !Point2 !String !FontInfo !*Picture -> *Picture
tabDrawStringC :: !Point2 !(!Int,!String) !FontInfo !*Picture -> *Picture tabDrawStringC :: !Point2 !(!Info,!String) !FontInfo !*Picture -> *Picture
// tabDrawString: draws a string containing tabs properly. // tabDrawString: draws a string containing tabs properly.
// tabDrawStringC: draws a string containing tabs properly with syntax colours. // tabDrawStringC: draws a string containing tabs properly with syntax colours.
This diff is collapsed.
...@@ -23,6 +23,10 @@ vScrollToCursor :: EditMonad (PSt .l) nothing ...@@ -23,6 +23,10 @@ vScrollToCursor :: EditMonad (PSt .l) nothing
// vScrollToCursor: scrolls the view frame up to the point that the cursor // vScrollToCursor: scrolls the view frame up to the point that the cursor
// becomes visible. // becomes visible.
vDragCursor :: !Point2 -> EditMonad (PSt .l) nothing
// vDragToCursor: scrolls the view frame up to the point that the cursor
// becomes visible with space to spare.
vMoveCursor :: !Movement -> EditMonad (PSt .l) nothing vMoveCursor :: !Movement -> EditMonad (PSt .l) nothing
vDoCursorSafe :: (EditMonad (PSt .l) a) -> EditMonad (PSt .l) a vDoCursorSafe :: (EditMonad (PSt .l) a) -> EditMonad (PSt .l) a
......
...@@ -10,18 +10,22 @@ import ioutil, StrictList ...@@ -10,18 +10,22 @@ import ioutil, StrictList
//-- //--
vCenterCursor :: EditMonad (PSt .l) nothing vCenterCursor :: EditMonad (PSt .l) nothing
vCenterCursor = vMakeCursorVisible True vCenterCursor = vMakeCursorVisible True Nothing
vScrollToCursor :: EditMonad (PSt .l) nothing vScrollToCursor :: EditMonad (PSt .l) nothing
vScrollToCursor = vMakeCursorVisible False vScrollToCursor = vMakeCursorVisible False Nothing
vMakeCursorVisible :: !Bool -> EditMonad (PSt .l) nothing vDragCursor :: !Point2 -> EditMonad (PSt .l) nothing
vMakeCursorVisible center = vDragCursor point = vMakeCursorVisible False (Just point)
vMakeCursorVisible :: !Bool !(Maybe Point2) -> EditMonad (PSt .l) nothing
vMakeCursorVisible center drag =
getWindowId >>>= \windowId -> getWindowId >>>= \windowId ->
accEnv (accPIO (getWindowViewFrame windowId)) >>>= \viewFrame -> accEnv (accPIO (getWindowViewFrame windowId)) >>>= \viewFrame ->
getSelection >>>= \{end} -> // accEnv (accPIO (getWindowViewDomain windowId)) >>>= \viewDomain ->
getSelection >>>= \{start,end} ->
getText >>>= \text -> getText >>>= \text ->
getFontInfo >>>= \fontInfo=:{FontInfo | lineHeight} -> getFontInfo >>>= \fontInfo=:{FontInfo | lineHeight,charWidth} ->
let // give names to the components of the view frame let // give names to the components of the view frame
cursorPoint = positionToPoint end text fontInfo cursorPoint = positionToPoint end text fontInfo
left = viewFrame.corner1.x left = viewFrame.corner1.x
...@@ -31,14 +35,80 @@ vMakeCursorVisible center = ...@@ -31,14 +35,80 @@ vMakeCursorVisible center =
// determine whether the cursor is on the // determine whether the cursor is on the
// correct (visible) side of the borders // correct (visible) side of the borders
leftOk = cursorPoint.x >= left leftOk = cursorPoint.x - charWidth >= left
rightOk = cursorPoint.x <= right // leftOk = case end.col of
// 0 -> (fromJust viewDomain).corner1.x = left
// _ -> cursorPoint.x - charWidth >= left
rightOk = cursorPoint.x + charWidth <= right
topOk = cursorPoint.y >= top topOk = cursorPoint.y >= top
bottomOk = cursorPoint.y + lineHeight <= bottom bottomOk = cursorPoint.y + lineHeight <= bottom
cursorOk = leftOk && rightOk && topOk && bottomOk
singleline= end.row - start.row == 0
(dontMove,nrHPixels)
= case drag of
Just point #
hslop` = charWidth
vslop` = lineHeight
// leftOk` = point.x - hslop` >= left
// rightOk` = point.x + hslop` <= right
leftOk` = point.x >= left
rightOk` = point.x <= right
topOk` = point.y >= top
bottomOk` = point.y <= bottom
mouseOk = leftOk` && rightOk` && topOk` && bottomOk`
hslop`` = charWidth * 8
vslop`` = lineHeight
leftOk`` = cursorPoint.x - hslop`` >= left
rightOk`` = cursorPoint.x + hslop`` <= right
topOk`` = cursorPoint.y >= top
bottomOk`` = cursorPoint.y + vslop`` <= bottom
cursorOk`` = leftOk`` && rightOk`` && topOk`` && bottomOk``
/*
nrHPixels = if (leftOk`` && rightOk``)
0
(if rightOk``
( point.x - hslop` - left )
( point.x + hslop` - right )
)
*/
nrHPixels`` = if (leftOk`` && rightOk``)
0
(if rightOk``
(~charWidth)//( point.x - hslop` - left )
charWidth//( point.x + hslop` - right )
)
nrHPixels = if (leftOk && rightOk)
0
(if rightOk
( cursorPoint.x - charWidth - left )
( cursorPoint.x + charWidth - right )
)
/* nrHPixels = if (leftOk`` && rightOk``)
0
(if rightOk``
( cursorPoint.x - hslop`` - left )
( cursorPoint.x + hslop`` - right )
)
*/
// -> (if singleline (mouseOk || cursorOk``) (cursorOk``), nrHPixels)
-> if singleline
(mouseOk || cursorOk``,nrHPixels``)
(cursorOk``,nrHPixels)
Nothing #
nrHPixels = if (leftOk && rightOk)
0
(if rightOk
( cursorPoint.x - charWidth - left )
( cursorPoint.x + charWidth - right )
)
-> (cursorOk, nrHPixels)
in in
// if cursor is visible, nothing has to be done // if cursor is visible, nothing has to be done
IF (leftOk && rightOk && topOk && bottomOk) IF (dontMove)
THEN THEN
( skip ) ( skip )
ELSE ELSE
...@@ -47,7 +117,7 @@ vMakeCursorVisible center = ...@@ -47,7 +117,7 @@ vMakeCursorVisible center =
halfWidth = ( right - left ) / 2 halfWidth = ( right - left ) / 2
newTop = if (topOk && bottomOk) top (cursorPoint.y - halfHeight) newTop = if (topOk && bottomOk) top (cursorPoint.y - halfHeight)
newLeft = if (leftOk && rightOk) left (cursorPoint.x - halfWidth) newLeft = if (leftOk && rightOk) left (cursorPoint.x - halfWidth)
nrPixels = if (topOk && bottomOk) nrVPixels = if (topOk && bottomOk)
0 // if visible do nothing 0 // if visible do nothing
(if bottomOk (if bottomOk
( cursorPoint.y - top ) // if move up move to top... ( cursorPoint.y - top ) // if move up move to top...
...@@ -55,7 +125,7 @@ vMakeCursorVisible center = ...@@ -55,7 +125,7 @@ vMakeCursorVisible center =
) )
vector = if center vector = if center
{ vx = newLeft - left, vy = newTop - top } { vx = newLeft - left, vy = newTop - top }
{ vx = newLeft - left, vy = nrPixels } { vx = nrHPixels, vy = nrVPixels }
in in
appEnv (appPIO (moveWindowViewFrame windowId vector)) appEnv (appPIO (moveWindowViewFrame windowId vector))
) )
...@@ -146,11 +216,13 @@ vUpdateCursor visible end height fontInfo text viewFrame rectangles = ...@@ -146,11 +216,13 @@ vUpdateCursor visible end height fontInfo text viewFrame rectangles =
{x,y} = point {x,y} = point
in in
IF (any (isCursorInRectangle point height) rectangles) IF (any (isCursorInRectangle point height) rectangles)
THEN (seq // THEN (seq
THEN (appXorPicture (seq
[ setPenColour Black [ setPenColour Black
, drawLine { x=x, y=y } , drawLine { x=x, y=y }
{ x=x, y=y+height - 1 } { x=x, y=y+height - 1 }
]) // ])
]))
ELSE ELSE
id id
) )
...@@ -165,13 +237,26 @@ vDrawCursor show end cursorHeight text fontInfo = ...@@ -165,13 +237,26 @@ vDrawCursor show end cursorHeight text fontInfo =
in in
// ( appXorPicture (seq // ( appXorPicture (seq
// [ setPenColour Black // [ setPenColour Black
/*
( (seq ( (seq
[ setPenColour (if show Black fontInfo.syntaxColours.backgroundColour) [ setPenColour (if show Black fontInfo.syntaxColours.backgroundColour)
, drawLine { x=x, y=y } , drawLine { x=x, y=y }
{ x=x, y=y+cursorHeight - 1 } { x=x, y=y+cursorHeight - 1 }
]) ])
) )
*/
( if show
(appXorPicture (seq
[ setPenColour Black
, drawLine { x=x, y=y }
{ x=x, y=y+cursorHeight - 1 }
]))
(seq
[ setPenColour (fontInfo.syntaxColours.backgroundColour)
, drawLine { x=x, y=y }
{ x=x, y=y+cursorHeight - 1 }
])
)
//--- Visual Selection Stuff //--- Visual Selection Stuff
vUpdateSelection :: !Selection FontInfo Text ViewFrame [Rectangle] -> (*Picture -> *Picture) vUpdateSelection :: !Selection FontInfo Text ViewFrame [Rectangle] -> (*Picture -> *Picture)
......
...@@ -5,5 +5,7 @@ definition module syncol ...@@ -5,5 +5,7 @@ definition module syncol
import StdString import StdString
import StrictList import StrictList
firstParse :: !(StrictList String) -> StrictList (Int,String) :: Info :== (!Int,!Bool)
quickParse :: !Int !Int !(StrictList (Int,String)) -> (Int,StrictList (Int,String))
firstParse :: !(StrictList String) -> StrictList (Info,String)
quickParse :: !Int !Int !(StrictList (Info,String)) -> (Int,StrictList (Info,String))
...@@ -9,13 +9,12 @@ import StrictList ...@@ -9,13 +9,12 @@ import StrictList
parseLine: initial comment nesting level & textline -> new comment nesting level parseLine: initial comment nesting level & textline -> new comment nesting level
*/ */
parseLine :: !.Int !.String -> Int parseLine :: !.Info !.String -> Info
parseLine comment_level line parseLine comment_level line
= pL comment_level 0 = pL comment_level 0
where where
funnyChar c = isStringMember c (dec funnySize) funnyChars funnyChar c = isStringMember c (dec funnySize) funnyChars
//isStringMember:: a !.[a] -> .Bool | Eq a
isStringMember :: !Char !Int !String -> Bool isStringMember :: !Char !Int !String -> Bool
isStringMember x i s isStringMember x i s
| i < 0 = False | i < 0 = False
...@@ -28,64 +27,89 @@ where ...@@ -28,64 +27,89 @@ where
line_size = size line line_size = size line
pL :: !Int !Int -> Int pL :: !Info !Int -> Info
pL l i // parse normal text pL (level,typedef) i // parse normal text
| i >= line_size = l | i >= line_size = (level,typedef)
#! char = line.[i] #! char = line.[i]
| char == '*' | char == '*'
# i = inc i # i = inc i
| i >= line_size = l | i >= line_size = (level,typedef)
| line.[i] == '/' | line.[i] == '/'
#! i = inc i #! i = inc i
| l <> 0 = pL (dec l) i // try to fix problem below | level <> 0 = pL (dec level,typedef) i // try to fix problem below
| i < line_size && funnyChar line.[i] | i < line_size && funnyChar line.[i]
= scanFunny l i // hmmm excludes */*/ and *//*...*/ = scanFunny (level,typedef) i // hmmm excludes */*/ and *//*...*/
= pL (dec l) i = pL (dec level,typedef) i
= pL l i = pL (level,typedef) i
| char == '/' | char == '/'
#! i = inc i #! i = inc i
| i >= line_size = l | i >= line_size = (level,typedef)
#! char = line.[i] #! char = line.[i]
| char == '/' = l // shouldn't we exclude funnyId's ?? | char == '/' = (level,typedef) // shouldn't we exclude funnyId's ??
| char == '*' = pL (inc l) (inc i) | char == '*' = pL (inc level,typedef) (inc i)
= pL l i = pL (level,typedef) i
| (char == '"') && (l == 0) | (char == '"') && (level == 0)
= pS (inc i) = pS (level,typedef) (inc i)
| (char == '\'') && (l == 0) | (char == '\'') && (level == 0)
= pC (inc i) = pC (level,typedef) (inc i)
| (l == 0) && (funnyChar char) | (level == 0) && (funnyChar char)
= scanFunny l i = scanFunny (level,typedef) i
= pL l (inc i) | i == 0 && not (WhiteSpace char)
= pL (level,False) (inc i)
= pL (level,typedef) (inc i)
scanFunny l i scanFunny (level=:0,typedef) 0
| i >= line_size = pL l line_size | (line_size == 2 && line == "::")
|| (line_size >= 3 && line%(0,1) == "::" && not (funnyChar line.[2]))
= pL (level,True) 2
# c = line.[0]
| typedef
| (line_size == 1 && (line == "|" || line == "="))
|| (line_size >= 2 && (line%(0,0) == "|" || line%(0,0) == "=") && not (funnyChar line.[1]))
|| (line_size == 3 && line == ":==")
|| (line_size >= 4 && line%(0,2) == ":==" && not (funnyChar line.[3]))
= pL (level,typedef) 1
| funnyChar c
= scanFunny (level,False) 1
= pL (level,False) 0
| funnyChar c
= scanFunny (level,typedef) 1
= pL (level,typedef) 0
where
no_c` = line_size < 2
c` = line.[1]
scanFunny (level,typedef) i
| i >= line_size = pL (level,typedef) line_size
#! c = line.[i] #! c = line.[i]
| funnyChar c = scanFunny l (inc i) | funnyChar c = scanFunny (level,typedef) (inc i)
= pL l i = pL (level,typedef) i
pS i // parse string constant pS cl i // parse string constant
| i >= line_size = 0 // unterminated string constant... | i >= line_size = cl // unterminated string constant...
# char = line.[i] # char = line.[i]
| char == '"' = pL 0 (inc i) | char == '"' = pL cl (inc i)
| char == '\\' | char == '\\'
= pS (i + 2) = pS cl (i + 2)
= pS (inc i) = pS cl (inc i)
pC i // parse character constant pC cl i // parse character constant
| i >= line_size = 0 // unterminated char constant... | i >= line_size = cl // unterminated char constant...
# char = line.[i] # char = line.[i]
| char == '\'' = pL 0 (inc i) | char == '\'' = pL cl (inc i)
| char == '\\' = pC (i + 2) | char == '\\' = pC cl (i + 2)
= pC (inc i) = pC cl (inc i)
// pT i // parse type // pT i // parse type
WhiteSpace c
:== c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '\f';
/* /*
firstParse: textlines -> zip initial comment nesting level & textlines firstParse: textlines -> zip initial comment nesting level & textlines
*/ */
firstParse :: !(StrictList String) -> StrictList (Int,String) firstParse :: !(StrictList String) -> StrictList (Info,String)
firstParse lines firstParse lines
= slFromList (fP 0 lines) = slFromList (fP (0,False) lines)
where where
fP i SNil fP i SNil
= [] = []
...@@ -93,31 +117,19 @@ where ...@@ -93,31 +117,19 @@ where
#! j = parseLine i h #! j = parseLine i h
= [ (i,h) : (fP j t) ] = [ (i,h) : (fP j t) ]
/*
firstParse lines
= fP 0 lines
where
fP i SNil