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

*** empty log message ***

parent df4509e2
......@@ -25,24 +25,27 @@ Start world
// x = Bin (Tip 'a') 42 (Tip 'b')
// x = Rose 1 [Rose 2 [], Rose 3 []]
// x = [[C1, C2], [C3, C2, C1]]
// x = {naam = ['aap'], leeftijd = 13.5, rec = Nothing}
x = ["Hello", "world"]
// r1 = {naam = ['aap'], leeftijd = 13.5, rec = Nothing}
// r2 = {naam = ['aap'], leeftijd = 13.5, rec = Just r1}
// x = array {r1, r2, r2, r1}
// 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
g = writeGerda "test" x g
g = writeGerda "test2" x2 g
(y, g) = readGerda "test" g
(y2, g) = readGerda "test2" g
x = PAIR Nothing Nothing
g = writeGerda "test`.1" x g
// g = writeGerda "test2" x2 g
(y, g) = readGerda "test`.1" g
// (y2, g) = readGerda "test2" g
/* = case y `typeOf` x of
Just x`
# g = writeGerda "test2" x` g
(z, g) = readGerda "test" g
-> (z `typeOf` x, closeGerda g world)*/
= (y `typeOf` x, y2 `typeOf` x2, closeGerda g world)
= (y `typeOf` x, closeGerda g world)
// x = gerdaObject 42
// g = writeGerda "test" x g
// (y, g) = readGerda "test" g
......@@ -53,7 +56,7 @@ Start world
// (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`) :: !(Maybe (EITHER Int Int)) (PAIR (Maybe Int) (Maybe Int)) -> Maybe (EITHER Int Int)
(`typeOf`) x _ = x
x :: Phantom [Int]
......
......@@ -66,7 +66,7 @@ MainModule
LastModified: No 0 0 0 0 0 0
OtherModules
Module
Name: odbccp
Name: Gerda
Dir: {Project}
Compiler
NeverMemoryProfile: False
......@@ -76,29 +76,27 @@ 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
DclOpen: False
X: 88
Y: 44
SizeX: 751
SizeY: 477
DclOpen: True
Icl
WindowPosition
X: 10
Y: 10
X: 26
Y: 41
SizeX: 800
SizeY: 640
IclOpen: False
SizeY: 494
IclOpen: True
LastModified: No 0 0 0 0 0 0
NeededLibraries
Library: odbccp_library
Module
Name: odbc
Dir: {Project}
Name: StdGeneric
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
......@@ -110,12 +108,6 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 211
Y: 44
SizeX: 800
SizeY: 646
DclOpen: False
Icl
WindowPosition
......@@ -125,10 +117,8 @@ OtherModules
SizeY: 640
IclOpen: False
LastModified: No 0 0 0 0 0 0
NeededLibraries
Library: odbc_library
Module
Name: StdDebug
Name: StdInt
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -145,7 +135,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdCharList
Name: StdOverloaded
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -158,11 +148,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: StdTuple
Name: StdMisc
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -179,7 +175,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdOrdList
Name: StdClass
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -202,7 +198,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: _SystemEnum
Name: StdBool
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -219,8 +215,8 @@ OtherModules
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
......@@ -232,11 +228,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: StdList
Name: StdFunc
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -249,11 +251,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: StdFile
Name: StdEnv
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -270,7 +278,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdString
Name: StdReal
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -283,17 +291,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: _SystemArray
Name: StdChar
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -306,19 +308,7 @@ 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
......@@ -345,7 +335,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdChar
Name: _SystemArray
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -358,11 +348,23 @@ 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: StdReal
Name: StdString
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -375,11 +377,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: StdEnv
Name: StdFile
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -396,7 +404,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdFunc
Name: StdList
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -409,18 +417,12 @@ 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: StdMaybe
Dir: {Application}\Libraries\StdLib
Name: StdEnum
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
......@@ -432,17 +434,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: StdBool
Name: _SystemEnum
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -459,7 +455,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdClass
Name: StdOrdList
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -482,7 +478,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdMisc
Name: StdTuple
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -499,7 +495,7 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdOverloaded
Name: StdCharList
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -512,17 +508,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: StdInt
Name: StdDebug
Dir: {Application}\Libraries\StdEnv
Compiler
NeverMemoryProfile: False
......@@ -539,8 +529,8 @@ OtherModules
IclOpen: False
LastModified: No 0 0 0 0 0 0
Module
Name: StdGeneric
Dir: {Application}\Libraries\StdEnv
Name: odbc
Dir: {Project}
Compiler
NeverMemoryProfile: False
NeverTimeProfile: False
......@@ -552,6 +542,12 @@ OtherModules
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 211
Y: 44
SizeX: 800
SizeY: 646
DclOpen: False
Icl
WindowPosition
......@@ -561,8 +557,10 @@ OtherModules
SizeY: 640
IclOpen: False
LastModified: No 0 0 0 0 0 0
NeededLibraries
Library: odbc_library
Module
Name: Gerda
Name: odbccp
Dir: {Project}
Compiler
NeverMemoryProfile: False
......@@ -572,52 +570,54 @@ OtherModules
ListAttributes: True
Warnings: True
Verbose: True
ReadableABC: True
ReadableABC: False
ReuseUniqueNodes: True
Fusion: False
Dcl
WindowPosition
X: 88
Y: 44
SizeX: 751
SizeY: 477
X: 224
Y: 74
SizeX: 800
SizeY: 632
DclOpen: False
Icl
WindowPosition
X: 26
Y: 41
SizeX: 795
SizeY: 497
X: 10
Y: 10
SizeX: 800
SizeY: 640
IclOpen: False
LastModified: No 0 0 0 0 0 0
NeededLibraries
Library: odbccp_library
Static
Mods
Path: {Project}\GenericDatabase.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
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
Objs
Path: {Application}\Libraries\StdEnv\Clean System Files\_startup0.o
Path: {Application}\Libraries\StdEnv\Clean System Files\_startup1Profile.o
......
......@@ -186,10 +186,11 @@ where
either2pair (LEFT x) = PAIR (Just x) Nothing
either2pair (RIGHT y) = PAIR Nothing (Just y)
readE = mapRead readP pair2either
readE g = case readP g of (m, g) -> (pair2either m, g)
where
pair2either (PAIR (Just x) _) = LEFT x
pair2either (PAIR _ (Just y)) = RIGHT y
pair2either (Just (PAIR (Just x) _)) = Just (LEFT x)
pair2either (Just (PAIR _ (Just y))) = Just (RIGHT y)
pair2either _ = Nothing
gerda{|CONS of {gcd_name, gcd_arity, gcd_type, gcd_type_def}|} gerdaA
= GerdaFunctions typeC layoutC writeC readC
......@@ -560,7 +561,7 @@ removeTable :: !String !*Gerda -> *Gerda
removeTable name g=:{layout, connection, state}
# (r, h, state) = SQLAllocHandle SQL_HANDLE_STMT connection state
| r <> SQL_SUCCESS = abort "SQLAllocHandle SQL_HANDLE_STMT failed"
# drop = "DROP TABLE " +++ sqlEscape tableName
# drop = "DROP TABLE" +++ sqlEscape tableName
(r, state) = SQLExecDirect h (TRACE_SQL drop) (size drop) state
// | r <> SQL_SUCCESS = abort ("SQLExecDirect failed " +++ drop)
# (r, state) = SQLFreeHandle SQL_HANDLE_STMT h state
......@@ -871,6 +872,7 @@ where
| toInt c < 32 = abort ("Illegal SQL string, cannot escape symbol < 32: " +++ s)
| toInt c > 127 = abort ("Illegal SQL string, cannot escape symbol > 127: " +++ s)
// | c == '`' = abort ("Illegal SQL string, contains a `: " +++ s)
| c == '.' = ['"':escape cs]
| c == '`' = ['\'':escape cs]
= [c:escape cs]
escape _ = ['`']
......
Supports Markdown
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