Commit df4509e2 authored by Rinus Plasmeijer's avatar Rinus Plasmeijer
Browse files

*** empty log message ***

parent 2375f81c
......@@ -14,10 +14,10 @@ import Gerda, StdEnv
Start world
# (g, world) = openGerda "Clean Data Structures" world
// x = 42
// x = C2
// x = [[1]]
// x = (1, 3.1415927, 'a', [C2, C1, C3])
// x = [3, 5, 7]
// x = [C3, C1, C2]
// x = [C3, C1, C2, C1, C3, C2]
// x = [[[[[[[1]]]]]]]
// x = ["test"]
// x = ['aapnoot']
......@@ -26,33 +26,51 @@ Start world
// x = Rose 1 [Rose 2 [], Rose 3 []]
// x = [[C1, C2], [C3, C2, C1]]
// x = {naam = ['aap'], leeftijd = 13.5, rec = Nothing}
// x = ["Hello", "world"]
x = ["Hello", "world"]
// x = Rose 1 [Rose 2 [], Rose 3 []]
// x = "a" +++ {'b' \\ _ <- [1..1000]}
// x = GRose (1, 'a', 0.5, "bud") [GRose (2, 'b', 0.75, "another bud") [], GRose (3, 'c', 0.875, "yet another bud") []]
// x = [1..10000]
// x = array {strictArray {1, 2, 3}, strictArray {1 .. 100}}
// x = Constr` 42
x = gerdaObject 42
g = writeGerda "test" x g
g = writeGerda "test2" x2 g
(y, g) = readGerda "test" g
f = case y of Just {gerdaWrite} -> gerdaWrite; _ -> const id
h = case y of Just {gerdaRead} -> gerdaRead; _ -> (\g -> (undef, g))
g = f 123 g
(w, g) = h g
(y2, g) = readGerda "test2" g
/* = case y `typeOf` x of
Just x`
# g = writeGerda "test2" x` g
(z, g) = readGerda "test" g
= (y `typeOf` x, Just w `typeOf` x.gerdaValue, z `typeOf` x, closeGerda g world)
-> (z `typeOf` x, closeGerda g world)*/
= (y `typeOf` x, y2 `typeOf` x2, closeGerda g world)
// x = gerdaObject 42
// g = writeGerda "test" x g
// (y, g) = readGerda "test" g
// f = case y of Just {gerdaWrite} -> gerdaWrite; _ -> const id
// h = case y of Just {gerdaRead} -> gerdaRead; _ -> (\g -> (undef, g))
// g = f 123 g
// (w, g) = h g
// (z, g) = readGerda "test" g
// = (y `typeOf` x, Just w `typeOf` x.gerdaValue, z `typeOf` x, closeGerda g world)
where
(`typeOf`) :: !(Maybe a) a -> Maybe a
(`typeOf`) x _ = x
x :: Phantom [Int]
x = Opera
x2 :: Phantom Char
x2 = Opera
array :: !{a} -> {a}
array x = x
strictArray :: !{!a} -> {!a}
strictArray x = x
derive gerda Tree, Rose, R, N, (,), (,,), (,,,), GRose, Test`
derive gerda Tree, Rose, R, N, (,), (,,), (,,,), GRose, Test`, Phantom
:: Phantom a = Opera
/*
:: T3 a b c = C3 a b c | D3 | E3
......
......@@ -18,7 +18,7 @@ Global
MarkingCollector: False
StandardRuntimeEnv: True
Profile
Memory: False
Memory: True
MemoryMinimumHeapSize: 0
Time: True
Stack: False
......@@ -66,7 +66,7 @@ MainModule
LastModified: No 0 0 0 0 0 0
OtherModules
Module
Name: Gerda
Name: odbccp
Dir: {Project}
Compiler
NeverMemoryProfile: False
......@@ -81,22 +81,24 @@ OtherModules
Fusion: False
Dcl
WindowPosition
X: 88
Y: 44
SizeX: 751
SizeY: 477
DclOpen: True
X: 224
Y: 74
SizeX: 800
SizeY: 632
DclOpen: False
Icl
WindowPosition
X: 26
Y: 41
SizeX: 795
SizeY: 497
IclOpen: True
X: 10
Y: 10
SizeX: 800
SizeY: 640
IclOpen: False
LastModified: No 0 0 0 0 0 0
NeededLibraries
Library: odbccp_library
Module
Name: StdGeneric
Dir: {Application}\Libraries\StdEnv
Name: odbc
Dir: {Project}
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
......@@ -108,6 +110,12 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 211
Y: 44
SizeX: 800
SizeY: 646
DclOpen: False
Icl
WindowPosition
......@@ -117,8 +125,10 @@ OtherModules
SizeY: 640
IclOpen: False
LastModified: No 0 0 0 0 0 0
NeededLibraries
Library: odbc_library
Module
Name: StdInt
Name: StdDebug
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -135,7 +145,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdOverloaded
Name: StdCharList
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -148,17 +158,11 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 10
Y: 10
SizeX: 800
SizeY: 640
DclOpen: False
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdMisc
Name: StdTuple
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -175,7 +179,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdClass
Name: StdOrdList
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -198,7 +202,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdBool
Name: _SystemEnum
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -215,8 +219,8 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdMaybe
Dir: {Application}\Libraries\StdLib
Name: StdEnum
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
......@@ -228,17 +232,11 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 10
Y: 10
SizeX: 800
SizeY: 640
DclOpen: False
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdFunc
Name: StdList
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -251,17 +249,11 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 10
Y: 10
SizeX: 800
SizeY: 640
DclOpen: False
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdEnv
Name: StdFile
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -278,7 +270,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdReal
Name: StdString
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -291,11 +283,17 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 10
Y: 10
SizeX: 800
SizeY: 640
DclOpen: False
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdChar
Name: _SystemArray
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -308,7 +306,19 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 10
Y: 10
SizeX: 800
SizeY: 640
DclOpen: False
Icl
WindowPosition
X: 10
Y: 10
SizeX: 800
SizeY: 640
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
......@@ -335,7 +345,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: _SystemArray
Name: StdChar
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -348,23 +358,11 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 10
Y: 10
SizeX: 800
SizeY: 640
DclOpen: False
Icl
WindowPosition
X: 10
Y: 10
SizeX: 800
SizeY: 640
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdString
Name: StdReal
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -377,17 +375,11 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 10
Y: 10
SizeX: 800
SizeY: 640
DclOpen: False
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdFile
Name: StdEnv
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -404,7 +396,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdList
Name: StdFunc
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -417,12 +409,18 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 10
Y: 10
SizeX: 800
SizeY: 640
DclOpen: False
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdEnum
Dir: {Application}\Libraries\StdEnv
Name: StdMaybe
Dir: {Application}\Libraries\StdLib
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
......@@ -434,11 +432,17 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 10
Y: 10
SizeX: 800
SizeY: 640
DclOpen: False
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: _SystemEnum
Name: StdBool
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -455,7 +459,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdOrdList
Name: StdClass
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -478,7 +482,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdTuple
Name: StdMisc
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -495,7 +499,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdCharList
Name: StdOverloaded
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -508,11 +512,17 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 10
Y: 10
SizeX: 800
SizeY: 640
DclOpen: False
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdDebug
Name: StdInt
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -529,8 +539,8 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: odbc
Dir: {Project}
Name: StdGeneric
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
......@@ -542,12 +552,6 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 211
Y: 44
SizeX: 800
SizeY: 646
DclOpen: False
Icl
WindowPosition
......@@ -557,10 +561,8 @@ OtherModules
SizeY: 640
IclOpen: False
LastModified: No 0 0 0 0 0 0
NeededLibraries
Library: odbc_library
Module
Name: odbccp
Name: Gerda
Dir: {Project}
Compiler
NeverMemoryProfile: False
......@@ -570,85 +572,83 @@ OtherModules
ListAttributes: True
Warnings: True
Verbose: True
ReadableABC: False
ReadableABC: True
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 224
Y: 74
SizeX: 800
SizeY: 632
X: 88
Y: 44
SizeX: 751
SizeY: 477
DclOpen: False
Icl
WindowPosition
X: 10
Y: 10
SizeX: 800
SizeY: 640
X: 26
Y: 41
SizeX: 795
SizeY: 497
IclOpen: False
LastModified: No 0 0 0 0 0 0
NeededLibraries
Library: odbccp_library
Static
Mods
Path: {Project}\GenericDatabase.icl
Path: {Project}\Gerda.icl
Path: {Application}\Libraries\StdEnv\StdGeneric.icl
Path: {Application}\Libraries\StdEnv\StdInt.icl
Path: {Application}\Libraries\StdEnv\StdOverloaded.icl
Path: {Application}\Libraries\StdEnv\StdMisc.icl
Path: {Application}\Libraries\StdEnv\StdClass.icl
Path: {Application}\Libraries\StdEnv\StdBool.icl
Path: {Application}\Libraries\StdLib\StdMaybe.icl
Path: {Application}\Libraries\StdEnv\StdFunc.icl
Path: {Application}\Libraries\StdEnv\StdEnv.icl
Path: {Application}\Libraries\StdEnv\StdReal.icl
Path: {Application}\Libraries\StdEnv\StdChar.icl
Path: {Application}\Libraries\StdEnv\StdArray.icl
Path: {Application}\Libraries\StdEnv\_SystemArray.icl
Path: {Application}\Libraries\StdEnv\StdString.icl
Path: {Application}\Libraries\StdEnv\StdFile.icl
Path: {Application}\Libraries\StdEnv\StdList.icl
Path: {Application}\Libraries\StdEnv\StdEnum.icl
Path: {Application}\Libraries\StdEnv\_SystemEnum.icl
Path: {Application}\Libraries\StdEnv\StdOrdList.icl
Path: {Application}\Libraries\StdEnv\StdTuple.icl
Path: {Application}\Libraries\StdEnv\StdCharList.icl
Path: {Application}\Libraries\StdEnv\StdDebug.icl
Path: {Project}\odbc.icl
Path: {Project}\odbccp.icl
Path: {Project}\odbc.icl
Path: {Application}\Libraries\StdEnv\StdDebug.icl
Path: {Application}\Libraries\StdEnv\StdCharList.icl
Path: {Application}\Libraries\StdEnv\StdTuple.icl
Path: {Application}\Libraries\StdEnv\StdOrdList.icl
Path: {Application}\Libraries\StdEnv\_SystemEnum.icl
Path: {Application}\Libraries\StdEnv\StdEnum.icl
Path: {Application}\Libraries\StdEnv\StdList.icl
Path: {Application}\Libraries\StdEnv\StdFile.icl
Path: {Application}\Libraries\StdEnv\StdString.icl
Path: {Application}\Libraries\StdEnv\_SystemArray.icl
Path: {Application}\Libraries\StdEnv\StdArray.icl
Path: {Application}\Libraries\StdEnv\StdChar.icl
Path: {Application}\Libraries\StdEnv\StdReal.icl
Path: {Application}\Libraries\StdEnv\StdEnv.icl
Path: {Application}\Libraries\StdEnv\StdFunc.icl
Path: {Application}\Libraries\StdLib\StdMaybe.icl
Path: {Application}\Libraries\StdEnv\StdBool.icl
Path: {Application}\Libraries\StdEnv\StdClass.icl
Path: {Application}\Libraries\StdEnv\StdMisc.icl
Path: {Application}\Libraries\StdEnv\StdOverloaded.icl
Path: {Application}\Libraries\StdEnv\StdInt.icl
Path: {Application}\Libraries\StdEnv\StdGeneric.icl
Path: {Project}\Gerda.icl
Objs
Path: {Application}\Libraries\StdEnv\Clean System Files\_startup0.o
Path: {Application}\Libraries\StdEnv\Clean System Files\_startup1Profile.o
Path: {Application}\Libraries\StdEnv\Clean System Files\_startup2.o
Path: {Application}\Libraries\StdEnv\Clean System Files\_system.o
Path: {Project}\Clean System Files\GenericDatabase.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdDebug.o
Path: {Project}\Clean System Files\odbc.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdCharList.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdTuple.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdOrdList.o
Path: {Application}\Libraries\StdEnv\Clean System Files\_SystemEnum.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdEnum.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdList.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdFile.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdString.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdReal.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdEnv.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdGeneric.o
Path: {Application}\Libraries\StdEnv\Clean System Files\_SystemArray.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdArray.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdClass.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdChar.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdInt.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdBool.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdOverloaded.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdFunc.o
Path: {Application}\Libraries\StdLib\Clean System Files\StdMaybe.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdMisc.o
Path: {Project}\Clean System Files\Gerda.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdMisc.o
Path: {Application}\Libraries\StdLib\Clean System Files\StdMaybe.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdFunc.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdOverloaded.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdBool.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdInt.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdChar.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdClass.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdArray.o
Path: {Application}\Libraries\StdEnv\Clean System Files\_SystemArray.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdGeneric.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdEnv.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdReal.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdString.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdFile.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdList.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdEnum.o
Path: {Application}\Libraries\StdEnv\Clean System Files\_SystemEnum.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdOrdList.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdTuple.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdCharList.o
Path: {Project}\Clean System Files\odbc.o
Path: {Project}\Clean System Files\odbccp.o
Path: {Application}\Libraries\StdEnv\Clean System Files\StdDebug.o
Dlib
Path: {Application}\Libraries\StdEnv\Clean System Files\kernel_library
Path: {Application}\Libraries\StdEnv\Clean System Files\user_library
......@@ -661,5 +661,5 @@ Static
Path: {Application}\Libraries\StdLib
Path: {Application}\Libraries\WrapDebug
Path: {Application}\Libraries\StdEnv
AppP: C:\Clean 2.1.2 beta
AppP: C:\Clean 19-9-06
PrjP: D:\Documents\Gerda
......@@ -10,7 +10,7 @@ writeGerda :: !String !a !*Gerda -> *Gerda | gerda{|*|} a
readGerda :: !String !*Gerda -> (!Maybe a, !*Gerda) | gerda{|*|} a
:: Binary252 = {binary252 :: !.String}
:: CompactList a = CompactList !a (Maybe (CompactList a))
:: CompactList a = CompactList a .(Maybe (CompactList a))
:: GerdaObject a = {gerdaValue :: !a,
gerdaWrite :: a -> *Gerda -> *Gerda,
gerdaRead :: *Gerda -> *(a, *Gerda)}
......
......@@ -160,19 +160,16 @@ where
writeO _ g = writeR Nothing g
readO g = case readR g of
(Just ref, g) -> unsafeInterleave (readObject ref) g
(Just ref, g) -> unsafeRead readA ref g
(_, g) -> (Nothing, g)
where
readObject ref g
# (m, g) = readFromTable tableName [] readA ref g
= (mapMaybe OBJECT m, g)
unsafeInterleave :: (*Gerda -> *(a, *Gerda)) !*Gerda -> (a, !*Gerda)
unsafeInterleave f g=:{layout, malloc8, connection, environment}
# state = fst (openSqlState (cast 42))
(x, _) = f {index = 0, buffer = {}, layout = layout, malloc8 = malloc8,