on master help sign in
WIP all tests pass
commit668a16b8903c2202ecf6ad3ddf1b64244088a9a4 authorAgentM <agentm@themactionfaction.com> dateSun 21 Aug 2016, 12:51 (10 years ago) parent0a5ee8b
8 files changed+52−104
project-m36.cabal+25−73 test/Relation/Basic.hs+7−8 test/Relation/Export/CSV.hs+6−8 test/Relation/Import/CSV.hs+6−6 test/Server/Main.hs+3−4 test/TransactionGraph/Merge.hs+2−2 test/TutorialD/Interpreter/Import/TutorialD.hs+1−1 test/persistent-driver/test.hs+2−2
project-m36.cabal+25−73
@@ -277,19 +277,15 @@ Test-Suite test-relation
277277 Default-Extensions: OverloadedStrings
278278 type: exitcode-stdio-1.0
279279 main-is: test/Relation/Basic.hs
280− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, stm-containers
281− Other-Modules: ProjectM36.Atom, ProjectM36.AtomFunction, ProjectM36.AtomFunctions.Basic, ProjectM36.AtomFunctions.Primitive, ProjectM36.AtomType, ProjectM36.Attribute, ProjectM36.AttributeNames, ProjectM36.Base, ProjectM36.ConcreteTypeRep, ProjectM36.DataConstructorDef, ProjectM36.DataTypes.Basic, ProjectM36.DataTypes.Day, ProjectM36.DataTypes.Either, ProjectM36.DataTypes.Maybe, ProjectM36.DataTypes.Primitive, ProjectM36.DatabaseContext, ProjectM36.DateExamples, ProjectM36.Error, ProjectM36.Key, ProjectM36.MiscUtils, ProjectM36.Relation, ProjectM36.Tuple, ProjectM36.TupleSet, ProjectM36.TypeConstructor, ProjectM36.TypeConstructorDef, ProjectM36.RelationalExpression
280+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36 == 0.1
282281 GHC-Options: -Wall
283− Hs-Source-Dirs: ./src/bin
284− CPP-Options: -DPROJECTM36_VERSION="v0.1"
285282
286283Test-Suite test-static-optimizer
287284 Default-Language: Haskell2010
288285 Default-Extensions: OverloadedStrings
289286 type: exitcode-stdio-1.0
290287 main-is: test/Relation/StaticOptimizer.hs
291− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, stm-containers
292− Other-Modules: ProjectM36.Atom, ProjectM36.AtomFunction, ProjectM36.AtomFunctions.Basic, ProjectM36.AtomFunctions.Primitive, ProjectM36.AtomType, ProjectM36.Attribute, ProjectM36.AttributeNames, ProjectM36.Base, ProjectM36.ConcreteTypeRep, ProjectM36.DataConstructorDef, ProjectM36.DataTypes.Basic, ProjectM36.DataTypes.Day, ProjectM36.DataTypes.Either, ProjectM36.DataTypes.Maybe, ProjectM36.DataTypes.Primitive, ProjectM36.DatabaseContext, ProjectM36.DateExamples, ProjectM36.Error, ProjectM36.Key, ProjectM36.MiscUtils, ProjectM36.Relation, ProjectM36.RelationalExpression, ProjectM36.StaticOptimizer, ProjectM36.Tuple, ProjectM36.TupleSet, ProjectM36.TypeConstructor, ProjectM36.TypeConstructorDef
288+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36 == 0.1
293289 GHC-Options: -Wall
294290 CPP-Options: -DPROJECTM36_VERSION="v0.1"
295291
@@ -298,25 +294,17 @@ Test-Suite test-transactiongraph-persist
298294 Default-Extensions: OverloadedStrings
299295 type: exitcode-stdio-1.0
300296 main-is: test/TransactionGraph/Persist.hs
301− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, stm-containers
302− Other-Modules: ProjectM36.Atom, ProjectM36.AtomFunction, ProjectM36.AtomFunctions.Basic, ProjectM36.AtomFunctions.Primitive, ProjectM36.AtomType, ProjectM36.Attribute, ProjectM36.AttributeNames, ProjectM36.Base, ProjectM36.ConcreteTypeRep, ProjectM36.DataConstructorDef, ProjectM36.DataTypes.Basic, ProjectM36.DataTypes.Day, ProjectM36.DataTypes.Either, ProjectM36.DataTypes.Maybe, ProjectM36.DataTypes.Primitive, ProjectM36.DatabaseContext, ProjectM36.DateExamples, ProjectM36.Error, ProjectM36.Key, ProjectM36.MiscUtils, ProjectM36.Persist, ProjectM36.Relation, ProjectM36.RelationalExpression, ProjectM36.StaticOptimizer, ProjectM36.Transaction, ProjectM36.Transaction.Persist, ProjectM36.TransactionGraph, ProjectM36.TransactionGraph.Persist, ProjectM36.TransactionGraph.Merge, ProjectM36.Tuple, ProjectM36.TupleSet, ProjectM36.TypeConstructor, ProjectM36.TypeConstructorDef, TutorialD.Interpreter.Base, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.Types, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.Import.BasicExamples
297+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36 == 0.1
298+ Other-Modules: TutorialD.Interpreter.Base, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.Types, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.Import.BasicExamples
299+ Hs-Source-Dirs: ., ./src/bin
303300 GHC-Options: -Wall
304− CPP-Options: -DPROJECTM36_VERSION="v0.1"
305− if os(windows)
306− Build-Depends: Win32 >= 2.3 && < 2.4
307− Other-Modules: ProjectM36.Win32Handle
308− else
309− C-sources: ProjectM36/DirectoryFsync.c
310− Build-Depends: unix
311−
312301
313302Test-Suite test-relation-import-csv
314303 Default-Language: Haskell2010
315304 Default-Extensions: OverloadedStrings
316305 type: exitcode-stdio-1.0
317306 main-is: test/Relation/Import/CSV.hs
318− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, stm-containers
319− Other-Modules: ProjectM36.Atom, ProjectM36.AtomType, ProjectM36.Attribute, ProjectM36.AttributeNames, ProjectM36.Base, ProjectM36.ConcreteTypeRep, ProjectM36.DataConstructorDef, ProjectM36.DataTypes.Primitive, ProjectM36.Error, ProjectM36.MiscUtils, ProjectM36.Relation, ProjectM36.Relation.Parse.CSV, ProjectM36.Tuple, ProjectM36.TupleSet, ProjectM36.TypeConstructor, ProjectM36.TypeConstructorDef
307+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36 == 0.1
320308 GHC-Options: -Wall
321309 CPP-Options: -DPROJECTM36_VERSION="v0.1"
322310
@@ -325,78 +313,53 @@ Test-Suite test-tutoriald-import-tutoriald
325313 Default-Extensions: OverloadedStrings
326314 type: exitcode-stdio-1.0
327315 main-is: test/TutorialD/Interpreter/Import/TutorialD.hs
328− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, stm-containers
329− Other-Modules: ProjectM36.Atom, ProjectM36.AtomFunction, ProjectM36.AtomType, ProjectM36.Attribute, ProjectM36.AttributeNames, ProjectM36.Base, ProjectM36.ConcreteTypeRep, ProjectM36.DataConstructorDef, ProjectM36.DataTypes.Primitive, ProjectM36.Error, ProjectM36.Key, ProjectM36.MiscUtils, ProjectM36.Relation, ProjectM36.RelationalExpression, ProjectM36.StaticOptimizer, ProjectM36.Tuple, ProjectM36.TupleSet, ProjectM36.TypeConstructor, ProjectM36.TypeConstructorDef, ProjectM36.Relation.Show.Term, TutorialD.Interpreter.Base, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.Types, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.Import.BasicExamples
316+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36 == 0.1
317+ Other-Modules: TutorialD.Interpreter.Base, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.Types, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.Import.BasicExamples
330318 GHC-Options: -Wall
331− CPP-Options: -DPROJECTM36_VERSION="v0.1"
319+ Hs-Source-Dirs: ., ./src/bin
332320
333321Test-Suite test-relation-export-csv
334322 Default-Language: Haskell2010
335323 Default-Extensions: OverloadedStrings
336324 type: exitcode-stdio-1.0
337325 main-is: test/Relation/Export/CSV.hs
338− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, stm-containers
339− Other-Modules: ProjectM36.Atom, ProjectM36.AtomType, ProjectM36.Attribute, ProjectM36.AttributeNames, ProjectM36.Base, ProjectM36.ConcreteTypeRep, ProjectM36.DataConstructorDef, ProjectM36.DataTypes.Primitive, ProjectM36.Error, ProjectM36.MiscUtils, ProjectM36.Relation, ProjectM36.Relation.Parse.CSV, ProjectM36.Relation.Show.CSV, ProjectM36.Tuple, ProjectM36.TupleSet, ProjectM36.TypeConstructor, ProjectM36.TypeConstructorDef
326+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36 == 0.1
340327 GHC-Options: -Wall
341− CPP-Options: -DPROJECTM36_VERSION="v0.1"
342328
343329Test-Suite test-persistent-driver
344330 Default-Language: Haskell2010
345331 Default-Extensions: OverloadedStrings
346332 type: exitcode-stdio-1.0
347333 main-is: test/persistent-driver/test.hs
348− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, template-haskell, transformers, aeson, persistent-template, conduit, persistent >= 2.2 && < 2.3, either, path-pieces, http-api-data, stm-containers, list-t
334+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, template-haskell, transformers, aeson, persistent-template, conduit, persistent >= 2.2 && < 2.3, either, path-pieces, http-api-data, stm-containers, list-t, project-m36 == 0.1
335+ Hs-Source-Dirs: ., src/persistent
349336 GHC-Options: -Wall
350− Other-Modules: Database.Persist.ProjectM36, ProjectM36.Atom, ProjectM36.AtomFunction, ProjectM36.AtomFunctions.Basic, ProjectM36.AtomFunctions.Primitive, ProjectM36.AtomType, ProjectM36.Attribute, ProjectM36.AttributeNames, ProjectM36.Base, ProjectM36.Client, ProjectM36.ConcreteTypeRep, ProjectM36.DataConstructorDef, ProjectM36.DataTypes.Basic, ProjectM36.DataTypes.Day, ProjectM36.DataTypes.Either, ProjectM36.DataTypes.Maybe, ProjectM36.DataTypes.Primitive, ProjectM36.DatabaseContext, ProjectM36.Error, ProjectM36.MiscUtils, ProjectM36.Notifications, ProjectM36.Persist, ProjectM36.Relation, ProjectM36.RelationalExpression, ProjectM36.Server.RemoteCallTypes, ProjectM36.Session, ProjectM36.Sessions, ProjectM36.StaticOptimizer, ProjectM36.Transaction, ProjectM36.Transaction.Persist, ProjectM36.TransactionGraph, ProjectM36.TransactionGraph.Persist, ProjectM36.TransactionGraph.Merge, ProjectM36.Tuple, ProjectM36.TupleSet, ProjectM36.TypeConstructor, ProjectM36.TypeConstructorDef
351− CPP-Options: -DPROJECTM36_VERSION="v0.1"
352− if os(windows)
353− Build-Depends: Win32 >= 2.3 && < 2.4
354− Other-Modules: ProjectM36.Win32Handle
355− else
356− C-sources: ProjectM36/DirectoryFsync.c
357− Build-Depends: unix
358337
359338Test-Suite test-transactiongraph-merge
360339 Default-Language: Haskell2010
361340 Default-Extensions: OverloadedStrings
362341 type: exitcode-stdio-1.0
363342 main-is: test/TransactionGraph/Merge.hs
364− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, template-haskell, transformers, aeson, persistent-template, conduit, persistent, either, path-pieces, http-api-data, stm-containers, list-t
365− Other-Modules: ProjectM36.Atom, ProjectM36.AtomFunction, ProjectM36.AtomFunctions.Basic, ProjectM36.AtomFunctions.Primitive, ProjectM36.AtomType, ProjectM36.Attribute, ProjectM36.AttributeNames, ProjectM36.Base, ProjectM36.ConcreteTypeRep, ProjectM36.DataConstructorDef, ProjectM36.DataTypes.Basic, ProjectM36.DataTypes.Day, ProjectM36.DataTypes.Either, ProjectM36.DataTypes.Maybe, ProjectM36.DataTypes.Primitive, ProjectM36.DatabaseContext, ProjectM36.DateExamples, ProjectM36.Error, ProjectM36.Key, ProjectM36.MiscUtils, ProjectM36.Relation, ProjectM36.RelationalExpression, ProjectM36.Transaction, ProjectM36.TransactionGraph, ProjectM36.TransactionGraph.Merge, ProjectM36.TransactionGraph.Show, ProjectM36.TransactionGraph.Show.Dot, ProjectM36.Tuple, ProjectM36.TupleSet, ProjectM36.TypeConstructor, ProjectM36.TypeConstructorDef, ProjectM36.Relation.Show.Term
343+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, template-haskell, transformers, aeson, persistent-template, conduit, persistent, either, path-pieces, http-api-data, stm-containers, list-t, project-m36 == 0.1
366344 GHC-Options: -Wall
367− CPP-Options: -DPROJECTM36_VERSION="v0.1"
368− if os(windows)
369− Build-Depends: Win32 >= 2.3 && < 2.4
370− Other-Modules: ProjectM36.Win32Handle
371− else
372− C-sources: ProjectM36/DirectoryFsync.c
373− Build-Depends: unix
374−
375345
376346benchmark bench
377347 Default-Language: Haskell2010
378348 Default-Extensions: OverloadedStrings
379349 type: exitcode-stdio-1.0
380350 main-is: benchmark/Relation.hs
381− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, criterion, stm-containers
351+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, criterion, stm-containers, project-m36 == 0.1
382352 GHC-Options: -Wall -rtsopts
383− CPP-Options: -DPROJECTM36_VERSION="v0.1"
353+ Hs-Source-Dirs: ./src/bin
384354
385355Test-Suite test-server
386356 Default-Language: Haskell2010
387357 Default-Extensions: OverloadedStrings
388358 type: exitcode-stdio-1.0
389359 main-is: test/Server/Main.hs
390− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t
360+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, project-m36 == 0.1
361+ HS-Source-Dirs: ., ./src/bin
391362 GHC-Options: -Wall
392− CPP-Options: -DPROJECTM36_VERSION="v0.1"
393− Other-Modules: ProjectM36.Atom, ProjectM36.AtomFunction, ProjectM36.AtomFunctions.Basic, ProjectM36.AtomFunctions.Primitive, ProjectM36.AtomType, ProjectM36.Attribute, ProjectM36.AttributeNames, ProjectM36.Base, ProjectM36.Client, ProjectM36.ConcreteTypeRep, ProjectM36.DataConstructorDef, ProjectM36.DataTypes.Basic, ProjectM36.DataTypes.Day, ProjectM36.DataTypes.Either, ProjectM36.DataTypes.Maybe, ProjectM36.DataTypes.Primitive, ProjectM36.DatabaseContext, ProjectM36.Error, ProjectM36.MiscUtils, ProjectM36.Notifications, ProjectM36.Persist, ProjectM36.Relation, ProjectM36.RelationalExpression, ProjectM36.Server, ProjectM36.Server.Config, ProjectM36.Server.EntryPoints, ProjectM36.Server.RemoteCallTypes, ProjectM36.Session, ProjectM36.Sessions, ProjectM36.StaticOptimizer, ProjectM36.Transaction, ProjectM36.Transaction.Persist, ProjectM36.TransactionGraph, ProjectM36.TransactionGraph.Persist, ProjectM36.TransactionGraph.Merge, ProjectM36.Tuple, ProjectM36.TupleSet, ProjectM36.TypeConstructor, ProjectM36.TypeConstructorDef
394− if os(windows)
395− Build-Depends: Win32 >= 2.3 && < 2.4
396− Other-Modules: ProjectM36.Win32Handle
397− else
398− C-sources: ProjectM36/DirectoryFsync.c
399− Build-Depends: unix
400363
401364Executable Example-SimpleClient
402365 Default-Language: Haskell2010
@@ -420,16 +383,10 @@ Test-Suite test-scripts
420383 Default-Extensions: OverloadedStrings
421384 type: exitcode-stdio-1.0
422385 main-is: test/scripts.hs
423− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t
424− Other-Modules: ProjectM36.Atom, ProjectM36.AtomFunction, ProjectM36.AtomType, ProjectM36.Attribute, ProjectM36.AttributeNames, ProjectM36.Base, ProjectM36.ConcreteTypeRep, ProjectM36.DataConstructorDef, ProjectM36.DataTypes.Primitive, ProjectM36.Error, ProjectM36.Key, ProjectM36.MiscUtils, ProjectM36.Relation, ProjectM36.RelationalExpression, ProjectM36.StaticOptimizer, ProjectM36.Tuple, ProjectM36.TupleSet, ProjectM36.TypeConstructor, ProjectM36.TypeConstructorDef, ProjectM36.Relation.Show.Term, TutorialD.Interpreter.Base, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.Types, TutorialD.Interpreter.Import.BasicExamples
386+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, project-m36 == 0.1
387+ Other-Modules: TutorialD.Interpreter.Base, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.Types, TutorialD.Interpreter.Import.BasicExamples
425388 GHC-Options: -Wall
426− CPP-Options: -DPROJECTM36_VERSION="v0.1"
427− if os(windows)
428− Build-Depends: Win32 >= 2.3 && < 2.4
429− Other-Modules: ProjectM36.Win32Handle
430− else
431− C-sources: ProjectM36/DirectoryFsync.c
432− Build-Depends: unix
389+ Hs-Source-Dirs: ., ./src/bin
433390
434391Executable project-m36-websocket-server
435392 Default-Language: Haskell2010
@@ -437,21 +394,16 @@ Executable project-m36-websocket-server
437394 Main-Is: ProjectM36/Server/WebSocket/websocket-server.hs
438395 GHC-Options: -Wall
439396 CPP-Options: -DPROJECTM36_VERSION="v0.1"
440− Hs-Source-Dirs: src/bin
397+ Hs-Source-Dirs: ./src/bin
441398 Default-Extensions: OverloadedStrings
442399
443400Test-Suite test-websocket-server
444401 Default-Language: Haskell2010
445402 type: exitcode-stdio-1.0
446403 main-is: test/Server/WebSocket.hs
447− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, uuid-aeson
448− Other-Modules: ProjectM36.Atom, ProjectM36.AtomFunction, ProjectM36.AtomType, ProjectM36.Attribute, ProjectM36.AttributeNames, ProjectM36.Base, ProjectM36.ConcreteTypeRep, ProjectM36.DataConstructorDef, ProjectM36.DataTypes.Primitive, ProjectM36.Error, ProjectM36.Key, ProjectM36.MiscUtils, ProjectM36.Relation, ProjectM36.RelationalExpression, ProjectM36.StaticOptimizer, ProjectM36.Tuple, ProjectM36.TupleSet, ProjectM36.TypeConstructor, ProjectM36.TypeConstructorDef, TutorialD.Interpreter.Base, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.Types, ProjectM36.AtomFunctions.Basic, ProjectM36.AtomFunctions.Primitive, ProjectM36.Client, ProjectM36.Client.Json, ProjectM36.DataTypes.Basic, ProjectM36.DataTypes.Day, ProjectM36.DataTypes.Either, ProjectM36.DataTypes.Maybe, ProjectM36.DatabaseContext, ProjectM36.DateExamples, ProjectM36.Notifications, ProjectM36.Persist, ProjectM36.Relation.Parse.CSV, ProjectM36.Relation.Show.CSV, ProjectM36.Relation.Show.Gnuplot, ProjectM36.Relation.Show.Term, ProjectM36.Server, ProjectM36.Server.Config, ProjectM36.Server.EntryPoints, ProjectM36.Server.RemoteCallTypes, ProjectM36.Server.RemoteCallTypes.Json, ProjectM36.Server.WebSocket, ProjectM36.Session, ProjectM36.Sessions, ProjectM36.Transaction, ProjectM36.Transaction.Persist, ProjectM36.TransactionGraph, ProjectM36.TransactionGraph.Merge, ProjectM36.TransactionGraph.Persist, TutorialD.Interpreter, TutorialD.Interpreter.Export.Base, TutorialD.Interpreter.Export.CSV, TutorialD.Interpreter.Import.BasicExamples, TutorialD.Interpreter.Import.CSV, TutorialD.Interpreter.InformationOperator, TutorialD.Interpreter.RODatabaseContextOperator, TutorialD.Interpreter.TransactionGraphOperator
404+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, distributed-process, distributed-process-extras, distributed-process-client-server, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, parsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, uuid-aeson, project-m36 == 0.1
405+ Other-Modules: TutorialD.Interpreter.Export.Base, TutorialD.Interpreter.Export.CSV, TutorialD.Interpreter.Import.BasicExamples, TutorialD.Interpreter.Import.CSV, TutorialD.Interpreter.InformationOperator, TutorialD.Interpreter.RODatabaseContextOperator, TutorialD.Interpreter.TransactionGraphOperator
449406 Default-Extensions: OverloadedStrings
450407 GHC-Options: -Wall
451− CPP-Options: -DPROJECTM36_VERSION="v0.1"
452− if os(windows)
453− Build-Depends: Win32 >= 2.3 && < 2.4
454− Other-Modules: ProjectM36.Win32Handle
455− else
456− C-sources: ProjectM36/DirectoryFsync.c
457− Build-Depends: unix
408+ Hs-Source-Dirs: ./src/bin, .
409+ CPP-Options: -DPROJECTM36_VERSION="v0.1"
test/Relation/Basic.hs+7−8
@@ -6,7 +6,6 @@ import ProjectM36.DateExamples
66import ProjectM36.DataTypes.Primitive
77import ProjectM36.RelationalExpression
88import ProjectM36.Tuple
9−import ProjectM36.Atom
109import qualified ProjectM36.DatabaseContext as DBC
1110import Control.Monad.State
1211import qualified ProjectM36.Attribute as A
@@ -68,8 +67,8 @@ simpleRel = case mkRelation attrs tupleSet of
6867 Right rel -> rel
6968 Left _ -> undefined
7069 where
71− attrs = A.attributesFromList [Attribute "a" textAtomType, Attribute "b" textAtomType]
72− tupleSet = RelationTupleSet [mkRelationTuple attrs (V.fromList [textAtom "spam", textAtom "spam2"])]
70+ attrs = A.attributesFromList [Attribute "a" TextAtomType, Attribute "b" TextAtomType]
71+ tupleSet = RelationTupleSet [mkRelationTuple attrs (V.fromList [TextAtom "spam", TextAtom "spam2"])]
7372
7473--rename tests
7574testRename1 :: Test
@@ -83,13 +82,13 @@ testRename2 = TestCase $ assertEqual "attribute in use" (rename "b" "a" simpleRe
8382testMkRelation1 :: Test
8483testMkRelation1 = TestCase $ assertEqual "key mismatch" (Left $ TupleAttributeTypeMismatchError A.emptyAttributes) (mkRelation testAttrs testTupSet) -- the error attribute set is empty due to an optimization- the tuple attrs do not match the atoms' types
8584 where
86− testAttrs = A.attributesFromList [Attribute "a" textAtomType]
87− testTupSet = RelationTupleSet [mkRelationTuple testAttrs $ V.fromList [textAtom "v"],
88− mkRelationTuple testAttrs $ V.fromList [intAtom 2]]
85+ testAttrs = A.attributesFromList [Attribute "a" TextAtomType]
86+ testTupSet = RelationTupleSet [mkRelationTuple testAttrs $ V.fromList [TextAtom "v"],
87+ mkRelationTuple testAttrs $ V.fromList [IntAtom 2]]
8988
9089testMkRelationFromExprsBadAttrs :: Test
9190testMkRelationFromExprsBadAttrs = TestCase $ do
9291 let context = DBC.empty
93− case evalState (evalRelationalExpr (MakeRelationFromExprs (Just [AttributeAndTypeNameExpr "badAttr1" (PrimitiveTypeConstructor "Int" intAtomType)]) [TupleExpr (M.singleton "badAttr2" (NakedAtomExpr (intAtom 1)))])) context of
94− Left err -> assertEqual "tuple type mismatch" (TupleAttributeTypeMismatchError (A.attributesFromList [Attribute "badAttr2" intAtomType])) err
92+ case evalState (evalRelationalExpr (MakeRelationFromExprs (Just [AttributeAndTypeNameExpr "badAttr1" (PrimitiveTypeConstructor "Int" IntAtomType)]) [TupleExpr (M.singleton "badAttr2" (NakedAtomExpr (IntAtom 1)))])) context of
93+ Left err -> assertEqual "tuple type mismatch" (TupleAttributeTypeMismatchError (A.attributesFromList [Attribute "badAttr2" IntAtomType])) err
9594 Right _ -> assertFailure "expected tuple type mismatch"
test/Relation/Export/CSV.hs+6−8
@@ -5,8 +5,6 @@ import ProjectM36.Relation.Show.CSV
55import ProjectM36.Relation.Parse.CSV
66import qualified ProjectM36.Attribute as A
77import ProjectM36.Relation
8−import ProjectM36.Atom
9−import ProjectM36.DataTypes.Primitive
108
119main :: IO ()
1210main = do
@@ -16,13 +14,13 @@ main = do
1614--round-trip a basic relation through CSV
1715testCSVExport :: Test
1816testCSVExport = TestCase $ do
19− let attrs = A.attributesFromList [Attribute "S#" textAtomType,
20− Attribute "SNAME" textAtomType,
21− Attribute "STATUS" intAtomType,
22− Attribute "CITY" textAtomType]
17+ let attrs = A.attributesFromList [Attribute "S#" TextAtomType,
18+ Attribute "SNAME" TextAtomType,
19+ Attribute "STATUS" IntAtomType,
20+ Attribute "CITY" TextAtomType]
2321 relOrErr = mkRelationFromList attrs [
24− [textAtom "S9", textAtom "Perry", intAtom 170, textAtom "Londonderry"],
25− [textAtom "S8", textAtom "Mike", intAtom 150, textAtom "Boston"]]
22+ [TextAtom "S9", TextAtom "Perry", IntAtom 170, TextAtom "Londonderry"],
23+ [TextAtom "S8", TextAtom "Mike", IntAtom 150, TextAtom "Boston"]]
2624 case relOrErr of
2725 Left err -> assertFailure $ "export relation creation failure: " ++ (show err)
2826 Right rel -> do
test/Relation/Import/CSV.hs+6−6
@@ -18,13 +18,13 @@ main = do
1818testCSVSuccess :: Test
1919testCSVSuccess = TestCase $ do
2020 let sampleCSV = (encodeUtf8 . T.pack) "S#,CITY,STATUS,SNAME\n\"S8\",\"Boston\",150,\"Mike\"\nS9,Londonderry,170,Perry"
21− expectedAttrs = A.attributesFromList [Attribute "S#" textAtomType,
22− Attribute "SNAME" textAtomType,
23− Attribute "STATUS" intAtomType,
24− Attribute "CITY" textAtomType]
21+ expectedAttrs = A.attributesFromList [Attribute "S#" TextAtomType,
22+ Attribute "SNAME" TextAtomType,
23+ Attribute "STATUS" IntAtomType,
24+ Attribute "CITY" TextAtomType]
2525 expectedRel = mkRelationFromList expectedAttrs [
26− [textAtom "S9", textAtom "Perry", intAtom 170, textAtom "Londonderry"],
27− [textAtom "S8", textAtom "Mike", intAtom 150, textAtom "Boston"]]
26+ [TextAtom "S9", TextAtom "Perry", IntAtom 170, TextAtom "Londonderry"],
27+ [TextAtom "S8", TextAtom "Mike", IntAtom 150, TextAtom "Boston"]]
2828 case csvAsRelation sampleCSV expectedAttrs of
2929 Left err -> assertFailure $ show err
3030 Right csvRel -> assertEqual "csv->relation" expectedRel (Right csvRel)
test/Server/Main.hs+3−4
@@ -7,7 +7,6 @@ import qualified ProjectM36.Client as C
77import ProjectM36.Server
88import ProjectM36.Server.Config
99import ProjectM36.Relation
10−import ProjectM36.DataTypes.Primitive
1110import ProjectM36.TupleSet
1211
1312import System.Exit
@@ -71,8 +70,8 @@ testRelationalExpr sessionId conn = TestCase $ do
7170
7271testDatabaseContextExpr :: SessionId -> Connection -> Test
7372testDatabaseContextExpr sessionId conn = TestCase $ do
74− let attrExprs = [AttributeAndTypeNameExpr "x" (PrimitiveTypeConstructor "Text" textAtomType)]
75− attrs = attributesFromList [Attribute "x" textAtomType]
73+ let attrExprs = [AttributeAndTypeNameExpr "x" (PrimitiveTypeConstructor "Text" TextAtomType)]
74+ attrs = attributesFromList [Attribute "x" TextAtomType]
7675 testrv = "testrv"
7776 dbResult <- executeDatabaseContextExpr sessionId conn (Define testrv attrExprs)
7877 case dbResult of
@@ -100,7 +99,7 @@ testTypeForRelationalExpr sessionId conn = TestCase $ do
10099
101100testPlanForDatabaseContextExpr :: SessionId -> Connection -> Test
102101testPlanForDatabaseContextExpr sessionId conn = TestCase $ do
103− let attrExprs = [AttributeAndTypeNameExpr "x" (PrimitiveTypeConstructor "Int" intAtomType)]
102+ let attrExprs = [AttributeAndTypeNameExpr "x" (PrimitiveTypeConstructor "Int" IntAtomType)]
104103 testrv = "testrv"
105104 dbExpr = Define testrv attrExprs
106105 planResult <- planForDatabaseContextExpr sessionId conn dbExpr
test/TransactionGraph/Merge.hs+2−2
@@ -159,7 +159,7 @@ testUnionPreferMergeStrategy = TestCase $ do
159159 graph <- basicTransactionGraph
160160 branchATrans <- assertMaybe (transactionForHead "branchA" graph) "branchATrans"
161161 branchBTrans <- assertMaybe (transactionForHead "branchB" graph) "branchBTrans"
162− branchBRelVar <- assertEither $ mkRelationFromList (attributesFromList [Attribute "conflict" intAtomType]) []
162+ branchBRelVar <- assertEither $ mkRelationFromList (attributesFromList [Attribute "conflict" IntAtomType]) []
163163 let branchAContext = (transactionContext branchATrans) {relationVariables = M.insert conflictRelVarName branchARelVar (relationVariables (transactionContext branchATrans))}
164164 branchARelVar = relationTrue
165165 branchBContext = (transactionContext branchBTrans) {relationVariables = M.insert conflictRelVarName branchBRelVar (relationVariables (transactionContext branchBTrans))}
@@ -207,7 +207,7 @@ testUnionMergeStrategy = TestCase $ do
207207 assertEqual "merge transaction relvars" (Just relationTrue) (M.lookup branchBOnlyRelVarName (relationVariables mergeContext))
208208 assertEqual "merge transaction incdeps" (Just branchAOnlyIncDep) (M.lookup branchAOnlyIncDepName (inclusionDependencies mergeContext))
209209 -- test an expected conflict- add branchBOnlyRelVar with same name but different attributes
210− conflictRelVar <- assertEither $ mkRelationFromList (attributesFromList [Attribute "conflict" intAtomType]) []
210+ conflictRelVar <- assertEither $ mkRelationFromList (attributesFromList [Attribute "conflict" IntAtomType]) []
211211 let conflictContextA = updatedBranchAContext {relationVariables = M.insert branchBOnlyRelVarName conflictRelVar (relationVariables updatedBranchAContext) }
212212 conflictBranchATrans <- assertMaybe (transactionForHead "branchA" graph'') "retrieving head transaction for expected conflict"
213213 (_, graph''') <- addTransaction "branchA" (Transaction (fakeUUID 6) (TransactionInfo (transactionId conflictBranchATrans) S.empty) conflictContextA) graph''
test/TutorialD/Interpreter/Import/TutorialD.hs+1−1
@@ -17,6 +17,6 @@ testTutdImport = TestCase $ do
1717 withSystemTempFile "m.tutd" $ \tempPath handle -> do
1818 hPutStrLn handle "x:=relation{tuple{a 5,b \"spam\"}}"
1919 hClose handle
20− let expectedExpr = MultipleExpr [Assign "x" (MakeRelationFromExprs Nothing [TupleExpr (M.fromList [("a",NakedAtomExpr $ intAtom 5),("b",NakedAtomExpr $ textAtom "spam")])])]
20+ let expectedExpr = MultipleExpr [Assign "x" (MakeRelationFromExprs Nothing [TupleExpr (M.fromList [("a",NakedAtomExpr $ IntAtom 5),("b",NakedAtomExpr $ TextAtom "spam")])])]
2121 imported <- importTutorialD tempPath
2222 assertEqual "import tutd" (Right expectedExpr) imported
test/persistent-driver/test.hs+2−2
@@ -42,8 +42,8 @@ inProcSettings = InProcessConnectionInfo NoPersistence emptyNotificationCallback
4242
4343defPersonRel :: SessionId -> Connection -> IO ()
4444defPersonRel sessionId conn = do
45− let textTypCons = PrimitiveTypeConstructor "Text" textAtomType
46− intTypCons = PrimitiveTypeConstructor "Int" intAtomType
45+ let textTypCons = PrimitiveTypeConstructor "Text" TextAtomType
46+ intTypCons = PrimitiveTypeConstructor "Int" IntAtomType
4747
4848 maybeErr <- C.executeDatabaseContextExpr sessionId conn (Define "person" [
4949 AttributeAndTypeNameExpr "name" textTypCons,