Commit af9b4495 authored by Diederik van Arkel's avatar Diederik van Arkel
Browse files

convert to 2.0 import syntax + minor extensions

parent a6e0ebd7
......@@ -21,16 +21,11 @@ definition module EdAction
* EdAction.dcl: performing editor Actions
*/
from EdSelection import Position, ColumnNr, LineNr
from EdText import TextFragment, StrictList
//1.3
from EdText import String
//3.1
import EdMonad, EdMovement
import EdCommon
from EdActionType import Action
import EdMonad, EdMovement
import EdCommon
from EdSelection import :: Position
from EdText import :: TextFragment
from EdActionType import :: Action
performAction :: Action -> EditMonad (PSt PLocState) nothing
......
......@@ -17,9 +17,9 @@ definition module EdActionType
// permission.
//*********************************************************************************
import StdOverloaded
import EdMovement
from EdText import TextFragment
import StdOverloaded
import EdMovement
from EdText import :: TextFragment
:: Action
= Move Movement
......
......@@ -20,7 +20,7 @@ implementation module EdActionType
import StdOverloaded, StdArray, StdInt, StdString, StdChar, StdList
import StrictList
import EdMovement
from EdText import TextFragment
from EdText import :: TextFragment
:: Action
= Move Movement
......
......@@ -4,13 +4,10 @@
definition module EdFile
from StdFile import FileSystem, Files
//1.3
from StdString import String
//3.1
from EdText import Text
from StdFile import class FileSystem
from EdText import :: Text
import StdError, StdMaybe
from UtilNewlinesFile import NewlineConvention
from UtilNewlinesFile import :: NewlineConvention
readText :: !String !*env -> ((Error Text,NewlineConvention,Bool), !*env) | FileSystem env
writeText :: !String !NewlineConvention !Text !*env -> (Maybe String, !*env) | FileSystem env
......
definition module EdFind
import StdString, StdMaybe
from StrictList import StrictList
import StdMaybe
from StrictList import :: StrictList
import EdSelection
simpleLineSearch ::
......
......@@ -4,13 +4,13 @@
definition module EdKeyMapping
from StdFile import Files
from StdPSt import PSt, IOSt
from StdIOCommon import KeyboardState, SpecialKey, KeyState, Modifiers
from StdMaybe import Maybe
from StdOverloaded import ==, toString, fromString
from EdActionType import Action
from EdMonad import EditMonad, EditState, StateM
from StdFile import :: Files
from StdPSt import :: PSt
from StdIOCommon import :: KeyboardState, :: SpecialKey
from StdMaybe import :: Maybe
from StdOverloaded import class ==, class toString, class fromString
from EdActionType import :: Action
//from EdMonad import EditMonad, EditState, StateM
:: KeyMapping
......
......@@ -4,10 +4,10 @@
definition module EdKeyboard
from StdIOCommon import KeyboardState, KeyState, SpecialKey, Modifiers, IsRepeatKey, IdFun
from StdPSt import PSt, IOSt
from EdState import EditorState
from EdKeyMapping import KeyMapping
from StdIOCommon import :: KeyboardState
from StdPSt import :: PSt
//from EdState import EditorState
from EdKeyMapping import :: KeyMapping
import EdMonad, StdMaybe
import EdCommon
......
......@@ -6,7 +6,7 @@ implementation module EdKeyboard
import StdClass, StdBool, StdArray, StdInt, StdChar, StdTuple, StdList, StdMisc
import StdIOCommon, StdWindow, StdPSt
import EdVisualText, EdVisualCursor,
import EdVisualText, EdVisualCursor, EdSelection,
EdAction, EdKeyMapping, EdState, StrictList
import EdActionType
......
......@@ -4,12 +4,8 @@
definition module EdLineText
from StrictList import StrictList
from EdPosition import LineNr
//1.3
from StdString import String
//3.1
from StrictList import :: StrictList
from EdPosition import :: LineNr
:: Text
:: TextFragment
......
......@@ -6,7 +6,7 @@ implementation module EdLineText
import StdString, StdClass, StdInt, StdList, StdBool, StdFunc, StdArray, StdTuple
import StrictList
from EdPosition import LineNr
from EdPosition import :: LineNr
import syncol
import Platform
......
......@@ -4,15 +4,8 @@
definition module EdLook
from StdPicture import Picture
from StdIOCommon import SelectState, UpdateState, ViewFrame, UpdateArea,
Rectangle, Point2
from StdPicture import FontName, FontSize, FontStyle,
FontDef, FontMetrics, Font
//1.3
from StdString import String
//3.1
from StdPSt import PSt, IOSt
from StdPicture import :: Picture
from StdIOCommon import :: SelectState, :: UpdateState
import EdMonad
editWindowLook :: EditState SelectState !UpdateState -> (!*Picture -> *Picture)
......
......@@ -7,7 +7,7 @@ implementation module EdLook
import StdInt, StdBool, StdClass
import StdIOCommon
import StdPicture
import EdVisualText, EdVisualCursor, EdVisualLineNr
import EdVisualText, EdVisualCursor, EdVisualLineNr, EdSelection
// editWindowLook: updating the affected areas is done by updating
// each of the rectangles.
......
......@@ -4,10 +4,10 @@
definition module EdMessage
from StdId import Id,RId,Ids
from StdPSt import PSt, IOSt
from StdReceiver import Receiver2, R2Id, Receiver2Function, ReceiverAttribute
from EdMonad import EditState, EditMonad, StateM
from StdId import class Ids
from StdPSt import :: PSt
from StdReceiver import :: Receiver2
from EdMonad import :: EditState, :: EditMonad, :: StateM
:: EditId
:: Message
......
......@@ -4,22 +4,19 @@
definition module EdMonad
//1.3
from StdString import String
//3.1
from StdPicture import Font, FontMetrics, Colour
from StdPSt import PSt, IOSt
from StdId import Id
from StdPicture import Picture
from StdClipboard import ClipboardItem
from StdOverloaded import ==, toString
from StdMaybe import Maybe
from StdPicture import :: Font, :: FontMetrics, :: Colour
from StdPSt import :: PSt, :: IOSt
from StdId import :: Id
from StdPicture import :: Picture
from StdClipboard import :: ClipboardItem
from StdOverloaded import class ==, class toString
from StdMaybe import :: Maybe
import StateMonad
from UtilNewlinesFile import NewlineConvention
from UtilNewlinesFile import :: NewlineConvention
from EdText import Text, StrictList, TextFragment
from EdSelection import Selection, Position, ColumnNr, LineNr
from EdText import :: Text, :: StrictList, :: TextFragment
from EdSelection import :: Selection, :: Position, :: ColumnNr, :: LineNr
:: TabSize :== Int
......@@ -135,7 +132,7 @@ pathNameToWindowTitle :: !String -> String
pathNameToWindowTitle` :: !String -> String
//-- P4
from StdIOBasic import Point2
from StdIOBasic import :: Point2
getTimerId :: EditMonad .env Id
getToolPt :: EditMonad .env Point2
......
......@@ -21,8 +21,8 @@ definition module EdMouse
* EdMouse.dcl: handling mouse events
*/
from StdIOCommon import MouseState, Point2, Modifiers
from StdPSt import PSt, IOSt
from StdIOCommon import :: MouseState
from StdPSt import :: PSt
import EdMonad, EdCommon
editWindowMouse :: MouseState (!EditState, !PSt PLocState) -> (EditState, PSt PLocState)
......
......@@ -4,8 +4,8 @@
definition module EdMovement
from StdClass import ==, toString, fromString
from EdSelection import Position, ColumnNr, LineNr
from StdClass import class ==, class toString, class fromString
from EdSelection import :: Position, :: ColumnNr, :: LineNr
import EdMonad
:: Movement
......
......@@ -6,7 +6,7 @@ implementation module EdMovement
import StdMisc, StdInt, StdTuple, StdArray, StdChar, StdBool, StdList, StdFunc
import StdIOCommon, StdPSt
import EdMonad, EdVisualText
import EdMonad, EdVisualText, EdSelection
:: Movement
= LineUp
......
......@@ -4,7 +4,7 @@
definition module EdPosition
from StdClass import <, ==
from StdClass import class <, class ==
:: Position
= { col :: ColumnNr
......
......@@ -5,7 +5,7 @@
definition module EdSelection
import EdPosition
from EdLineText import Text
from EdLineText import :: Text
:: Selection
= { start :: Position
......
......@@ -4,12 +4,12 @@
definition module EdState
from StdId import Id
from StdPSt import PSt, IOSt
from StdMaybe import Maybe
from EdKeyMapping import KeyMapping
from EdMonad import EditState
from EdMessage import EditId
from StdId import :: Id
from StdPSt import :: PSt
from StdMaybe import :: Maybe
from EdKeyMapping import :: KeyMapping
//from EdMonad import EditState
from EdMessage import :: EditId
class Editor env
where
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment