Commit e2072177 authored by Bas Lijnse's avatar Bas Lijnse

Moved all necessary patches for external libraries to Patches folder.

PLEASE UPDATE YOUR ITASK ENVIRONMENT


git-svn-id: https://svn.cs.ru.nl/repos/iTask-system/trunk@2380 63da3aa8-80fd-4f01-9db8-e6ea747a3da2
parent dd69ae62
implementation module _SystemArray
class Array .a e where
select :: !.(a .e) !Int -> .e
uselect :: !u:(a e) !Int -> *(e, !u:(a e))
size :: !.(a .e) -> Int
usize :: !u:(a .e) -> *(!Int, !u:(a .e))
update :: !*(a .e) !Int .e -> *(a .e)
createArray :: !Int e -> *(a e)
_createArray :: !Int -> *(a .e)
replace :: !*(a .e) !Int .e -> *(.e, !*(a .e))
instance Array {#} Int where
select :: !.{#e:Int} !Int -> e:Int
select arr index =
code
{
select INT 0 1
}
uselect arr index =
code
{
push_a 0
select INT 0 1
}
size arr =
code
{
push_arraysize INT 0 1
}
usize arr =
code
{
push_a 0
push_arraysize INT 0 1
}
update arr index el =
code
{
update INT 0 1
}
createArray size el =
code
{
create_array INT 0 1
}
replace arr index el =
code
{
replace INT 0 1
}
_createArray size =
code
{
create_array_ INT 0 1
}
instance Array {#} Char where
select arr index =
code
{
select CHAR 0 1
}
uselect arr index =
code
{
push_a 0
select CHAR 0 1
}
size arr =
code
{
push_arraysize CHAR 0 1
}
usize arr =
code
{
push_a 0
push_arraysize CHAR 0 1
}
update arr index el =
code
{
update CHAR 0 1
}
createArray size el =
code
{
create_array CHAR 0 1
}
replace arr index el =
code
{
replace CHAR 0 1
}
_createArray size =
code
{
create_array_ CHAR 0 1
}
instance Array {#} Real where
select arr index =
code
{
select REAL 0 1
}
uselect arr index =
code
{
push_a 0
select REAL 0 1
}
size arr =
code
{
push_arraysize REAL 0 1
}
usize arr =
code
{
push_a 0
push_arraysize REAL 0 1
}
update arr index el =
code
{
update REAL 0 1
}
createArray size el =
code
{
create_array REAL 0 1
}
replace arr index el =
code
{
replace REAL 0 1
}
_createArray size =
code
{
create_array_ REAL 0 1
}
instance Array {#} Bool where
select arr index =
code
{
select BOOL 0 1
}
uselect arr index =
code
{
push_a 0
select BOOL 0 1
}
size arr =
code
{
push_arraysize BOOL 0 1
}
usize arr =
code
{
push_a 0
push_arraysize BOOL 0 1
}
update arr index el =
code
{
update BOOL 0 1
}
createArray size el =
code
{
create_array BOOL 0 1
}
replace arr index el =
code
{
replace BOOL 0 1
}
_createArray size =
code
{
create_array_ BOOL 0 1
}
instance Array {#} {#.a} where
select arr index =
code
{
select _ 1 0
}
uselect arr index =
code
{
push_a 0
select _ 1 0
}
size arr =
code
{
push_arraysize _ 1 0
}
usize arr =
code
{
push_a 0
push_arraysize _ 1 0
}
update arr index el =
code
{
update _ 1 0
}
createArray size el =
code
{
create_array _ 1 0
}
replace arr index el =
code
{
replace _ 1 0
}
_createArray size =
code
{
create_array_ _ 1 0
}
instance Array {#} {!.a} where
select arr index =
code
{
select _ 1 0
}
uselect arr index =
code
{
push_a 0
select _ 1 0
}
size arr =
code
{
push_arraysize _ 1 0
}
usize arr =
code
{
push_a 0
push_arraysize _ 1 0
}
update arr index el =
code
{
update _ 1 0
}
createArray size el =
code
{
create_array _ 1 0
}
replace arr index el =
code
{
replace _ 1 0
}
_createArray size =
code
{
create_array_ _ 1 0
}
instance Array {#} {.a} where
select arr index =
code
{
select _ 1 0
}
uselect arr index =
code
{
push_a 0
select _ 1 0
}
size arr =
code
{
push_arraysize _ 1 0
}
usize arr =
code
{
push_a 0
push_arraysize _ 1 0
}
update arr index el =
code
{
update _ 1 0
}
createArray size el =
code
{
create_array _ 1 0
}
replace arr index el =
code
{
replace _ 1 0
}
_createArray size =
code
{
create_array_ _ 1 0
}
instance Array {#} a where
select arr index =
code
{
buildAC "StdArray:select ({#} a) should not be called"
.d 1 0
jsr print_string_
.o 0 0
halt
}
uselect arr index =
code
{
buildAC "StdArray:uselect ({#} a) should not be called"
.d 1 0
jsr print_string_
.o 0 0
halt
}
size arr =
code
{
buildAC "StdArray:size ({#} a) should not be called"
.d 1 0
jsr print_string_
.o 0 0
halt
}
usize arr =
code
{
buildAC "StdArray:usize ({#} a) should not be called"
.d 1 0
jsr print_string_
.o 0 0
halt
}
update arr index el =
code
{
buildAC "StdArray:update ({#} a) should not be called"
.d 1 0
jsr print_string_
.o 0 0
halt
}
createArray size el =
code
{
buildAC "StdArray:createArray ({#} a) should not be called"
.d 1 0
jsr print_string_
.o 0 0
halt
}
replace arr index el =
code
{
buildAC "StdArray:replace ({#} a) should not be called"
.d 1 0
jsr print_string_
.o 0 0
halt
}
_createArray size =
code
{
buildAC "StdArray:_createArray ({#} a) should not be called"
.d 1 0
jsr print_string_
.o 0 0
halt
}
instance Array {!} a where
select arr index =
code
{
select _ 1 0
}
uselect arr index =
code
{
push_a 0
select _ 1 0
}
size arr =
code
{
push_arraysize _ 1 0
}
usize arr =
code
{
push_a 0
push_arraysize _ 1 0
}
update arr index el =
code
{
update _ 1 0
}
createArray size el =
code
{
create_array _ 1 0
}
replace arr index el =
code
{
replace _ 1 0
}
_createArray size =
code
{
create_array_ _ 1 0
}
instance Array {} a where
select arr index =
code
{
select _ 1 0
jsr_eval 0
}
uselect arr index =
code
{
push_a 0
select _ 1 0
}
size arr =
code
{
push_arraysize _ 1 0
}
usize arr =
code
{
push_a 0
push_arraysize _ 1 0
}
update arr index el =
code
{
update _ 1 0
}
createArray size el =
code
{
create_array _ 1 0
}
replace arr index el =
code
{
replace _ 1 0
}
_createArray size =
code
{
create_array_ _ 1 0
}
definition module GenEq_NG
definition module GenEq
import StdGeneric
......
implementation module GenEq_NG
implementation module GenEq
import StdGeneric, StdEnv
......
definition module GenParse_NG
definition module GenParse
import StdGeneric, StdMaybe
......
implementation module GenParse_NG
implementation module GenParse
import StdGeneric, StdEnv, StdMaybe
......
definition module Generic_NG
definition module Generic
import StdGeneric
......
implementation module Generic_NG
implementation module Generic
import StdGeneric, StdList
......
definition module List_NG
definition module List
import Functor, GenEq_NG
import Functor, GenEq
unzip3 :: ![(.a,.b,.c)] -> ([.a],[.b],[.c])
unzip4 :: ![(.a,.b,.c,.d)] -> ([.a],[.b],[.c],[.d])
......
implementation module List_NG
implementation module List
import StdTuple, StdBool, StdList, StdOrdList, Functor, GenEq_NG
import StdTuple, StdBool, StdList, StdOrdList, Functor, GenEq
unzip3 :: ![(.a,.b,.c)] -> ([.a],[.b],[.c])
unzip3 [] = ([], [], [])
......
definition module JSON_NG
definition module JSON
/*
* This module provides functions to encode and decode any Clean data type
* to JSON format. It provides two generic functions JSONEncode and JSONDecode
......
implementation module JSON_NG
implementation module JSON
import StdGeneric, Maybe, StdList, StdOrdList, StdString, _SystemArray, StdTuple, StdBool, StdFunc, StdOverloadedList
import Text, PPrint
......
This folder contains patched versions of external libraries.
The necessity for this folder comes from the fact that the clean compiler used to make
iTasks applications has modifications which require library changes, but we can't change
them upstream because then they will no longer work with the vanilla clean 2.4 compiler.
Always make sure the paths to this folder and its subfolders are the topmost entries in
environments and project files.
Sorry for the inconvenience.
\ No newline at end of file
......@@ -4,9 +4,6 @@ This repository holds the iTasks Software Development Kit (SDK).
= Preparation of the IDE =
- Make sure that this SDK is placed in the folder of the Clean 2.4 32-bit distribution (the one that contains "CleanIDE.exe")
and is called "iTasks-SDK".
- Copy the files "iTasks-SDK/Compiler/StdGeneric.dcl" and "iTasks-SDK/Compiler/StdGeneric.icl" to "Libraries/StdEnv/" (overwriting the existing files)
- Copy the files "iTasks-SDK/Compiler/TCPChannels.dcl" and "iTasks-SDK/Compiler/TCPChannels.icl" to "Libraries/TCPIP/" (overwriting the existing files)
- Copy the files "iTasks-SDK/Compiler/_SystemDynamic.dcl" and "iTasks-SDK/Compiler/_SystemDynamic.icl" to "Libraries/Dynamics/implementation" (overwriting the existing files)
- Start the CleanIDE
- Import the "iTasks" environment by choosing "Environment" -> "Import..." from the menu
and selecting the "iTasks-SDK/Server/iTasks.env" file.
......
......@@ -2,7 +2,7 @@ implementation module CommonCombinators
/**
* This module contains a collection of useful iTasks combinators defined in terms of the basic iTask combinators
*/
import StdBool, StdList,StdOrdList, StdTuple, StdGeneric, StdMisc, StdInt, StdClass, GenRecord, Text, Time, Tuple, List_NG
import StdBool, StdList,StdOrdList, StdTuple, StdGeneric, StdMisc, StdInt, StdClass, GenRecord, Text, Time, Tuple, List
import Util, Either, GenVisualize, GenUpdate
from StdFunc import id, const, o
from SystemTypes import :: User(..), :: Note(..)
......
implementation module DBTasks
import StdList, StdOrdList, Util, List_NG
import StdList, StdOrdList, Util, List
import iTaskClass, Task, Shared
from CoreTasks import get, set, return
from CommonCombinators import >>|, >>=
......
......@@ -3,7 +3,7 @@ implementation module InteractionTasks
from StdFunc import id, const, o, flip
from SystemData import null
from Tuple import appSnd