on master help sign in
WIP library compilation checkpoint
df60608AgentM
cabal.project+1−1
@@ -11,7 +11,7 @@ source-repository-package
11source-repository-package
11source-repository-package
12 type: git
12 type: git
13 location: https://github.com/agentm/curryer.git
13 location: https://github.com/agentm/curryer.git
14− tag: f67c45d1bfcb753d32ed3fe51b8e07b4c021c9bb
14+ tag: 1e60c0580ca33d6ae1e97aaddc32189fdfe3ef6c
15
15
16source-repository-package
16source-repository-package
17 type: git
17 type: git
examples/DerivingCustomTupleable.hs+3−2
@@ -3,16 +3,15 @@
3import ProjectM36.Tupleable.Deriving
3import ProjectM36.Tupleable.Deriving
4import ProjectM36.Atomable (Atomable)
4import ProjectM36.Atomable (Atomable)
5import Control.DeepSeq (NFData)
5import Control.DeepSeq (NFData)
6−import Data.Binary (Binary)
7import Data.Text (Text)
6import Data.Text (Text)
8import GHC.Generics (Generic)
7import GHC.Generics (Generic)
9
8
10newtype BlogId = BlogId { getBlogId :: Int }
9newtype BlogId = BlogId { getBlogId :: Int }
11 deriving stock (Eq, Ord, Show, Generic)
10 deriving stock (Eq, Ord, Show, Generic)
12 deriving newtype (Num)
11 deriving newtype (Num)
12+ deriving Serialise via WineryRecord BlogId
13
13
14instance NFData BlogId
14instance NFData BlogId
15−instance Binary BlogId
16instance Atomable BlogId
15instance Atomable BlogId
17
16
18data Blog = Blog
17data Blog = Blog
@@ -23,6 +22,7 @@ data Blog = Blog
23 deriving stock (Show, Generic)
22 deriving stock (Show, Generic)
24 deriving (Tupleable)
23 deriving (Tupleable)
25 via Codec (Field (DropPrefix "blog" >>> CamelCase)) Blog
24 via Codec (Field (DropPrefix "blog" >>> CamelCase)) Blog
25+ deriving Serialise via WineryRecord Blog
26
26
27data Comment = Comment
27data Comment = Comment
28 { commentAuthorName :: Text
28 { commentAuthorName :: Text
@@ -32,6 +32,7 @@ data Comment = Comment
32 deriving stock (Show, Generic)
32 deriving stock (Show, Generic)
33 deriving (Tupleable)
33 deriving (Tupleable)
34 via Codec (Field (DropPrefix "comment" >>> CamelCase)) Comment
34 via Codec (Field (DropPrefix "comment" >>> CamelCase)) Comment
35+ deriving Serialise via WineryRecord Comment
35
36
36main :: IO ()
37main :: IO ()
37main = do
38main = do
examples/hair.hs+1−2
@@ -3,14 +3,13 @@ import ProjectM36.Client
3import ProjectM36.Relation.Show.Term
3import ProjectM36.Relation.Show.Term
4import GHC.Generics
4import GHC.Generics
5import Data.Text
5import Data.Text
6−import Data.Binary
7import Control.DeepSeq
6import Control.DeepSeq
8import qualified Data.Map as M
7import qualified Data.Map as M
9import qualified Data.Text.IO as TIO
8import qualified Data.Text.IO as TIO
10import Data.Proxy
9import Data.Proxy
11
10
12data Hair = Bald | Brown | Blond | OtherColor Text
11data Hair = Bald | Brown | Blond | OtherColor Text
13− deriving (Generic, Show, Eq, Binary, NFData, Atomable)
12+ deriving (Generic, Show, Eq, NFData, Atomable)
14
13
15main :: IO ()
14main :: IO ()
16main = do
15main = do
project-m36.cabal+32−27
@@ -112,6 +112,11 @@ Library
112 ProjectM36.Server.EntryPoints,
112 ProjectM36.Server.EntryPoints,
113 ProjectM36.Server.ParseArgs,
113 ProjectM36.Server.ParseArgs,
114 ProjectM36.Server.RemoteCallTypes,
114 ProjectM36.Server.RemoteCallTypes,
115+ ProjectM36.Serialise.AtomFunctionError,
116+ ProjectM36.Serialise.DataFrame,
117+ ProjectM36.Serialise.DatabaseContextFunctionError,
118+ ProjectM36.Serialise.IsomorphicSchema,
119+ ProjectM36.Server.Types,
115 ProjectM36.Session,
120 ProjectM36.Session,
116 ProjectM36.Sessions,
121 ProjectM36.Sessions,
117 ProjectM36.Transaction.Persist,
122 ProjectM36.Transaction.Persist,
@@ -245,7 +250,7 @@ Executable project-m36-server
245Executable bigrel
250Executable bigrel
246 Default-Language: Haskell2010
251 Default-Language: Haskell2010
247 Default-Extensions: OverloadedStrings
252 Default-Extensions: OverloadedStrings
248− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, optparse-applicative, stm-containers, list-t, ghc, ghc-paths, transformers, project-m36, random, MonadRandom, semigroups, parser-combinators
253+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, optparse-applicative, stm-containers, list-t, ghc, ghc-paths, transformers, project-m36, random, MonadRandom, semigroups, parser-combinators
249 Other-Modules: TutorialD.Interpreter.Base,
254 Other-Modules: TutorialD.Interpreter.Base,
250 TutorialD.Interpreter.DatabaseContextExpr,
255 TutorialD.Interpreter.DatabaseContextExpr,
251 TutorialD.Interpreter.RelationalExpr,
256 TutorialD.Interpreter.RelationalExpr,
@@ -272,7 +277,7 @@ Test-Suite test-tutoriald
272 Default-Extensions: OverloadedStrings
277 Default-Extensions: OverloadedStrings
273 type: exitcode-stdio-1.0
278 type: exitcode-stdio-1.0
274 main-is: test/TutorialD/Interpreter.hs
279 main-is: test/TutorialD/Interpreter.hs
275− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, list-t, project-m36, random, MonadRandom, semigroups, parser-combinators
280+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, list-t, project-m36, random, MonadRandom, semigroups, parser-combinators
276 Other-Modules: TutorialD.Interpreter, TutorialD.Interpreter.Base, TutorialD.Interpreter.Export.Base, TutorialD.Interpreter.Export.CSV, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.CSV, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.RODatabaseContextOperator, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.TransactionGraphOperator, TutorialD.Interpreter.Types, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.InformationOperator, TutorialD.Interpreter.Import.BasicExamples, TutorialD.Interpreter.DatabaseContextIOOperator, TutorialD.Interpreter.TestBase, TutorialD.Interpreter.TransGraphRelationalOperator, TutorialD.Interpreter.SchemaOperator
281 Other-Modules: TutorialD.Interpreter, TutorialD.Interpreter.Base, TutorialD.Interpreter.Export.Base, TutorialD.Interpreter.Export.CSV, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.CSV, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.RODatabaseContextOperator, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.TransactionGraphOperator, TutorialD.Interpreter.Types, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.InformationOperator, TutorialD.Interpreter.Import.BasicExamples, TutorialD.Interpreter.DatabaseContextIOOperator, TutorialD.Interpreter.TestBase, TutorialD.Interpreter.TransGraphRelationalOperator, TutorialD.Interpreter.SchemaOperator
277 GHC-Options: -Wall -threaded
282 GHC-Options: -Wall -threaded
278 Hs-Source-Dirs: ./src/bin, ., test
283 Hs-Source-Dirs: ./src/bin, ., test
@@ -302,7 +307,7 @@ Test-Suite test-relation
302 Default-Extensions: OverloadedStrings
307 Default-Extensions: OverloadedStrings
303 type: exitcode-stdio-1.0
308 type: exitcode-stdio-1.0
304 main-is: test/Relation/Basic.hs
309 main-is: test/Relation/Basic.hs
305− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36, transformers
310+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36, transformers
306 GHC-Options: -Wall -threaded
311 GHC-Options: -Wall -threaded
307
312
308Test-Suite test-static-optimizer
313Test-Suite test-static-optimizer
@@ -310,7 +315,7 @@ Test-Suite test-static-optimizer
310 Default-Extensions: OverloadedStrings
315 Default-Extensions: OverloadedStrings
311 type: exitcode-stdio-1.0
316 type: exitcode-stdio-1.0
312 main-is: test/Relation/StaticOptimizer.hs
317 main-is: test/Relation/StaticOptimizer.hs
313− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36, transformers
318+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36, transformers
314 GHC-Options: -Wall -threaded
319 GHC-Options: -Wall -threaded
315
320
316Test-Suite test-transactiongraph-persist
321Test-Suite test-transactiongraph-persist
@@ -318,7 +323,7 @@ Test-Suite test-transactiongraph-persist
318 Default-Extensions: OverloadedStrings
323 Default-Extensions: OverloadedStrings
319 type: exitcode-stdio-1.0
324 type: exitcode-stdio-1.0
320 main-is: test/TransactionGraph/Persist.hs
325 main-is: test/TransactionGraph/Persist.hs
321− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36, random, MonadRandom, semigroups, parser-combinators
326+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36, random, MonadRandom, semigroups, parser-combinators
322 Other-Modules: TutorialD.Interpreter.Base, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.Types, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.Import.BasicExamples
327 Other-Modules: TutorialD.Interpreter.Base, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.Types, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.Import.BasicExamples
323 Hs-Source-Dirs: ., ./src/bin
328 Hs-Source-Dirs: ., ./src/bin
324 GHC-Options: -Wall -threaded
329 GHC-Options: -Wall -threaded
@@ -328,7 +333,7 @@ Test-Suite test-relation-import-csv
328 Default-Extensions: OverloadedStrings
333 Default-Extensions: OverloadedStrings
329 type: exitcode-stdio-1.0
334 type: exitcode-stdio-1.0
330 main-is: test/Relation/Import/CSV.hs
335 main-is: test/Relation/Import/CSV.hs
331− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36
336+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36
332 GHC-Options: -Wall -threaded
337 GHC-Options: -Wall -threaded
333
338
334Test-Suite test-tutoriald-import-tutoriald
339Test-Suite test-tutoriald-import-tutoriald
@@ -336,7 +341,7 @@ Test-Suite test-tutoriald-import-tutoriald
336 Default-Extensions: OverloadedStrings
341 Default-Extensions: OverloadedStrings
337 type: exitcode-stdio-1.0
342 type: exitcode-stdio-1.0
338 main-is: test/TutorialD/Interpreter/Import/TutorialD.hs
343 main-is: test/TutorialD/Interpreter/Import/TutorialD.hs
339− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36, random, MonadRandom, semigroups, parser-combinators
344+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36, random, MonadRandom, semigroups, parser-combinators
340 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
345 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
341 GHC-Options: -Wall -threaded
346 GHC-Options: -Wall -threaded
342 Hs-Source-Dirs: ., ./src/bin
347 Hs-Source-Dirs: ., ./src/bin
@@ -346,7 +351,7 @@ Test-Suite test-relation-export-csv
346 Default-Extensions: OverloadedStrings
351 Default-Extensions: OverloadedStrings
347 type: exitcode-stdio-1.0
352 type: exitcode-stdio-1.0
348 main-is: test/Relation/Export/CSV.hs
353 main-is: test/Relation/Export/CSV.hs
349− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36
354+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36
350 GHC-Options: -Wall -threaded
355 GHC-Options: -Wall -threaded
351
356
352Test-Suite test-transactiongraph-merge
357Test-Suite test-transactiongraph-merge
@@ -354,7 +359,7 @@ Test-Suite test-transactiongraph-merge
354 Default-Extensions: OverloadedStrings
359 Default-Extensions: OverloadedStrings
355 type: exitcode-stdio-1.0
360 type: exitcode-stdio-1.0
356 main-is: test/TransactionGraph/Merge.hs
361 main-is: test/TransactionGraph/Merge.hs
357− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, template-haskell, transformers, aeson, conduit, either, path-pieces, http-api-data, stm-containers, list-t, project-m36
362+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, template-haskell, transformers, aeson, conduit, either, path-pieces, http-api-data, stm-containers, list-t, project-m36
358 GHC-Options: -Wall -threaded
363 GHC-Options: -Wall -threaded
359
364
360benchmark bench
365benchmark bench
@@ -362,7 +367,7 @@ benchmark bench
362 Default-Extensions: OverloadedStrings
367 Default-Extensions: OverloadedStrings
363 type: exitcode-stdio-1.0
368 type: exitcode-stdio-1.0
364 main-is: benchmark/Relation.hs
369 main-is: benchmark/Relation.hs
365− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, criterion, stm-containers, project-m36
370+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, criterion, stm-containers, project-m36
366 GHC-Options: -Wall -rtsopts -threaded
371 GHC-Options: -Wall -rtsopts -threaded
367 Hs-Source-Dirs: ./src/bin
372 Hs-Source-Dirs: ./src/bin
368
373
@@ -371,28 +376,28 @@ Test-Suite test-server
371 Default-Extensions: OverloadedStrings
376 Default-Extensions: OverloadedStrings
372 type: exitcode-stdio-1.0
377 type: exitcode-stdio-1.0
373 main-is: test/Server/Main.hs
378 main-is: test/Server/Main.hs
374− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, project-m36, network-transport, semigroups
379+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, project-m36, network-transport, semigroups
375 HS-Source-Dirs: ., ./src/bin
380 HS-Source-Dirs: ., ./src/bin
376 GHC-Options: -Wall -threaded
381 GHC-Options: -Wall -threaded
377
382
378Executable Example-SimpleClient
383Executable Example-SimpleClient
379 Default-Language: Haskell2010
384 Default-Language: Haskell2010
380 Default-Extensions: OverloadedStrings
385 Default-Extensions: OverloadedStrings
381− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, ghc, ghc-paths, project-m36, random, MonadRandom
386+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, ghc, ghc-paths, project-m36, random, MonadRandom
382 Main-Is: examples/SimpleClient.hs
387 Main-Is: examples/SimpleClient.hs
383 GHC-Options: -Wall -threaded
388 GHC-Options: -Wall -threaded
384
389
385Executable Example-OutOfTheTarpit
390Executable Example-OutOfTheTarpit
386 Default-Language: Haskell2010
391 Default-Language: Haskell2010
387 Default-Extensions: OverloadedStrings
392 Default-Extensions: OverloadedStrings
388− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, aeson, path-pieces, either, conduit, http-api-data, template-haskell, ghc, ghc-paths, project-m36
393+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, aeson, path-pieces, either, conduit, http-api-data, template-haskell, ghc, ghc-paths, project-m36
389 Main-Is: examples/out_of_the_tarpit.hs
394 Main-Is: examples/out_of_the_tarpit.hs
390 GHC-Options: -Wall -threaded
395 GHC-Options: -Wall -threaded
391
396
392Executable Example-Blog
397Executable Example-Blog
393 Default-Language: Haskell2010
398 Default-Language: Haskell2010
394 Default-Extensions: OverloadedStrings
399 Default-Extensions: OverloadedStrings
395− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, aeson, path-pieces, either, conduit, http-api-data, template-haskell, ghc, ghc-paths, project-m36, scotty, blaze-html, http-types
400+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, aeson, path-pieces, either, conduit, http-api-data, template-haskell, ghc, ghc-paths, project-m36, scotty, blaze-html, http-types
396 Main-Is: examples/blog.hs
401 Main-Is: examples/blog.hs
397 GHC-Options: -Wall -threaded
402 GHC-Options: -Wall -threaded
398
403
@@ -400,14 +405,14 @@ Executable Example-Blog
400Executable Example-Hair
405Executable Example-Hair
401 Default-Language: Haskell2010
406 Default-Language: Haskell2010
402 Default-Extensions: OverloadedStrings
407 Default-Extensions: OverloadedStrings
403− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, aeson, path-pieces, either, conduit, http-api-data, template-haskell, ghc, ghc-paths, project-m36
408+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, aeson, path-pieces, either, conduit, http-api-data, template-haskell, ghc, ghc-paths, project-m36
404 Main-Is: examples/hair.hs
409 Main-Is: examples/hair.hs
405 GHC-Options: -Wall -threaded
410 GHC-Options: -Wall -threaded
406
411
407Executable Example-CustomTupleable
412Executable Example-CustomTupleable
408 Default-Language: Haskell2010
413 Default-Language: Haskell2010
409 Default-Extensions: OverloadedStrings
414 Default-Extensions: OverloadedStrings
410− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, aeson, path-pieces, either, conduit, http-api-data, template-haskell, ghc, ghc-paths, project-m36
415+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, aeson, path-pieces, either, conduit, http-api-data, template-haskell, ghc, ghc-paths, project-m36
411 Main-Is: examples/CustomTupleable.hs
416 Main-Is: examples/CustomTupleable.hs
412 GHC-Options: -Wall -threaded
417 GHC-Options: -Wall -threaded
413
418
@@ -417,7 +422,7 @@ Executable Example-DerivingCustomTupleable
417 else
422 else
418 Buildable: False
423 Buildable: False
419 Default-Language: Haskell2010
424 Default-Language: Haskell2010
420− Build-Depends: base, text, deepseq, binary, project-m36
425+ Build-Depends: base, text, deepseq,project-m36
421 Main-Is: examples/DerivingCustomTupleable.hs
426 Main-Is: examples/DerivingCustomTupleable.hs
422 GHC-Options: -Wall -threaded
427 GHC-Options: -Wall -threaded
423
428
@@ -426,7 +431,7 @@ Test-Suite test-scripts
426 Default-Extensions: OverloadedStrings
431 Default-Extensions: OverloadedStrings
427 type: exitcode-stdio-1.0
432 type: exitcode-stdio-1.0
428 main-is: test/scripts.hs
433 main-is: test/scripts.hs
429− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, project-m36, random, MonadRandom, semigroups, parser-combinators
434+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, network-transport-tcp, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, project-m36, random, MonadRandom, semigroups, parser-combinators
430 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
435 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
431 GHC-Options: -Wall -threaded
436 GHC-Options: -Wall -threaded
432 Hs-Source-Dirs: ., ./src/bin
437 Hs-Source-Dirs: ., ./src/bin
@@ -444,7 +449,7 @@ Test-Suite test-websocket-server
444 Default-Language: Haskell2010
449 Default-Language: Haskell2010
445 type: exitcode-stdio-1.0
450 type: exitcode-stdio-1.0
446 main-is: test/Server/WebSocket.hs
451 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, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36, random, MonadRandom, network-transport-tcp, semigroups, parser-combinators
452+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36, random, MonadRandom, network-transport-tcp, semigroups, parser-combinators
448 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, ProjectM36.Client.Json, ProjectM36.Server.RemoteCallTypes.Json, ProjectM36.Server.WebSocket, TutorialD.Interpreter, TutorialD.Interpreter.Base, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.Types, TutorialD.Interpreter.DatabaseContextIOOperator, TutorialD.Interpreter.TransGraphRelationalOperator, TutorialD.Interpreter.SchemaOperator
453 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, ProjectM36.Client.Json, ProjectM36.Server.RemoteCallTypes.Json, ProjectM36.Server.WebSocket, TutorialD.Interpreter, TutorialD.Interpreter.Base, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.Types, TutorialD.Interpreter.DatabaseContextIOOperator, TutorialD.Interpreter.TransGraphRelationalOperator, TutorialD.Interpreter.SchemaOperator
449 Default-Extensions: OverloadedStrings
454 Default-Extensions: OverloadedStrings
450 GHC-Options: -Wall -threaded
455 GHC-Options: -Wall -threaded
@@ -454,7 +459,7 @@ Test-Suite test-isomorphic-schemas
454 Default-Language: Haskell2010
459 Default-Language: Haskell2010
455 type: exitcode-stdio-1.0
460 type: exitcode-stdio-1.0
456 main-is: test/IsomorphicSchema.hs
461 main-is: test/IsomorphicSchema.hs
457− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36
462+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36
458 Default-Extensions: OverloadedStrings
463 Default-Extensions: OverloadedStrings
459 GHC-Options: -Wall -threaded
464 GHC-Options: -Wall -threaded
460 Hs-Source-Dirs: ./src/bin, .
465 Hs-Source-Dirs: ./src/bin, .
@@ -463,7 +468,7 @@ Test-Suite test-atomable
463 Default-Language: Haskell2010
468 Default-Language: Haskell2010
464 type: exitcode-stdio-1.0
469 type: exitcode-stdio-1.0
465 main-is: test/Relation/Atomable.hs
470 main-is: test/Relation/Atomable.hs
466− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36, random, MonadRandom, semigroups, parser-combinators
471+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36, random, MonadRandom, semigroups, parser-combinators, winery
467 Other-Modules: TutorialD.Interpreter, TutorialD.Interpreter.Base, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.DatabaseContextIOOperator, TutorialD.Interpreter.Export.Base, TutorialD.Interpreter.Export.CSV, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.BasicExamples, TutorialD.Interpreter.Import.CSV, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.InformationOperator, TutorialD.Interpreter.RODatabaseContextOperator, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.SchemaOperator, TutorialD.Interpreter.TestBase, TutorialD.Interpreter.TransGraphRelationalOperator, TutorialD.Interpreter.TransactionGraphOperator, TutorialD.Interpreter.Types
472 Other-Modules: TutorialD.Interpreter, TutorialD.Interpreter.Base, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.DatabaseContextIOOperator, TutorialD.Interpreter.Export.Base, TutorialD.Interpreter.Export.CSV, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.BasicExamples, TutorialD.Interpreter.Import.CSV, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.InformationOperator, TutorialD.Interpreter.RODatabaseContextOperator, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.SchemaOperator, TutorialD.Interpreter.TestBase, TutorialD.Interpreter.TransGraphRelationalOperator, TutorialD.Interpreter.TransactionGraphOperator, TutorialD.Interpreter.Types
468 Default-Extensions: OverloadedStrings
473 Default-Extensions: OverloadedStrings
469 GHC-Options: -Wall -threaded
474 GHC-Options: -Wall -threaded
@@ -473,7 +478,7 @@ Test-Suite test-multiprocess-access
473 Default-Language: Haskell2010
478 Default-Language: Haskell2010
474 type: exitcode-stdio-1.0
479 type: exitcode-stdio-1.0
475 main-is: test/MultiProcessDatabaseAccess.hs
480 main-is: test/MultiProcessDatabaseAccess.hs
476− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36, random, MonadRandom
481+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36, random, MonadRandom
477 Default-Extensions: OverloadedStrings
482 Default-Extensions: OverloadedStrings
478 GHC-Options: -Wall -threaded
483 GHC-Options: -Wall -threaded
479 Hs-Source-Dirs: ./src/bin, ., test/
484 Hs-Source-Dirs: ./src/bin, ., test/
@@ -482,7 +487,7 @@ Test-Suite test-transactiongraph-automerge
482 Default-Language: Haskell2010
487 Default-Language: Haskell2010
483 type: exitcode-stdio-1.0
488 type: exitcode-stdio-1.0
484 main-is: test/TransactionGraph/Automerge.hs
489 main-is: test/TransactionGraph/Automerge.hs
485− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36, random, MonadRandom, semigroups, parser-combinators
490+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36, random, MonadRandom, semigroups, parser-combinators
486 Other-Modules: TutorialD.Interpreter, TutorialD.Interpreter.Base, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.DatabaseContextIOOperator, TutorialD.Interpreter.Export.Base, TutorialD.Interpreter.Export.CSV, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.BasicExamples, TutorialD.Interpreter.Import.CSV, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.InformationOperator, TutorialD.Interpreter.RODatabaseContextOperator, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.SchemaOperator, TutorialD.Interpreter.TestBase, TutorialD.Interpreter.TransGraphRelationalOperator, TutorialD.Interpreter.TransactionGraphOperator, TutorialD.Interpreter.Types
491 Other-Modules: TutorialD.Interpreter, TutorialD.Interpreter.Base, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.DatabaseContextIOOperator, TutorialD.Interpreter.Export.Base, TutorialD.Interpreter.Export.CSV, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.BasicExamples, TutorialD.Interpreter.Import.CSV, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.InformationOperator, TutorialD.Interpreter.RODatabaseContextOperator, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.SchemaOperator, TutorialD.Interpreter.TestBase, TutorialD.Interpreter.TransGraphRelationalOperator, TutorialD.Interpreter.TransactionGraphOperator, TutorialD.Interpreter.Types
487 Default-Extensions: OverloadedStrings
492 Default-Extensions: OverloadedStrings
488 GHC-Options: -Wall -threaded
493 GHC-Options: -Wall -threaded
@@ -492,7 +497,7 @@ Test-Suite test-tupleable
492 Default-Language: Haskell2010
497 Default-Language: Haskell2010
493 type: exitcode-stdio-1.0
498 type: exitcode-stdio-1.0
494 main-is: test/Relation/Tupleable.hs
499 main-is: test/Relation/Tupleable.hs
495− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36, random, MonadRandom, semigroups
500+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36, random, MonadRandom, semigroups
496 Default-Extensions: OverloadedStrings
501 Default-Extensions: OverloadedStrings
497 GHC-Options: -Wall -threaded
502 GHC-Options: -Wall -threaded
498 Hs-Source-Dirs: ./src/bin, ., test/
503 Hs-Source-Dirs: ./src/bin, ., test/
@@ -501,7 +506,7 @@ Test-Suite test-client-simple
501 Default-Language: Haskell2010
506 Default-Language: Haskell2010
502 Main-Is: test/Client/Simple.hs
507 Main-Is: test/Client/Simple.hs
503 type: exitcode-stdio-1.0
508 type: exitcode-stdio-1.0
504− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36, random, MonadRandom, semigroups
509+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36, random, MonadRandom, semigroups
505 Default-Extensions: OverloadedStrings
510 Default-Extensions: OverloadedStrings
506 GHC-Options: -Wall -threaded
511 GHC-Options: -Wall -threaded
507 Hs-Source-Dirs: ./src/bin, ., test/
512 Hs-Source-Dirs: ./src/bin, ., test/
@@ -510,7 +515,7 @@ Test-Suite test-client-simple
510Executable handles
515Executable handles
511 Default-Language: Haskell2010
516 Default-Language: Haskell2010
512 Default-Extensions: OverloadedStrings
517 Default-Extensions: OverloadedStrings
513− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, optparse-applicative, stm-containers, list-t, ghc, ghc-paths, transformers, project-m36, random, MonadRandom, semigroups, parser-combinators
518+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, optparse-applicative, stm-containers, list-t, ghc, ghc-paths, transformers, project-m36, random, MonadRandom, semigroups, parser-combinators
514 main-is: benchmark/Handles.hs
519 main-is: benchmark/Handles.hs
515 Other-Modules: TutorialD.Interpreter,
520 Other-Modules: TutorialD.Interpreter,
516 TutorialD.Interpreter.Base,
521 TutorialD.Interpreter.Base,
@@ -539,7 +544,7 @@ Test-Suite test-dataframe
539 Main-Is: test/DataFrame.hs
544 Main-Is: test/DataFrame.hs
540 type: exitcode-stdio-1.0
545 type: exitcode-stdio-1.0
541 Other-Modules: TutorialD.Interpreter, TutorialD.Interpreter.Base, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.DatabaseContextIOOperator, TutorialD.Interpreter.Export.Base, TutorialD.Interpreter.Export.CSV, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.BasicExamples, TutorialD.Interpreter.Import.CSV, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.InformationOperator, TutorialD.Interpreter.RODatabaseContextOperator, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.SchemaOperator, TutorialD.Interpreter.TestBase, TutorialD.Interpreter.TransGraphRelationalOperator, TutorialD.Interpreter.TransactionGraphOperator, TutorialD.Interpreter.Types
546 Other-Modules: TutorialD.Interpreter, TutorialD.Interpreter.Base, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.DatabaseContextIOOperator, TutorialD.Interpreter.Export.Base, TutorialD.Interpreter.Export.CSV, TutorialD.Interpreter.Import.Base, TutorialD.Interpreter.Import.BasicExamples, TutorialD.Interpreter.Import.CSV, TutorialD.Interpreter.Import.TutorialD, TutorialD.Interpreter.InformationOperator, TutorialD.Interpreter.RODatabaseContextOperator, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.SchemaOperator, TutorialD.Interpreter.TestBase, TutorialD.Interpreter.TransGraphRelationalOperator, TutorialD.Interpreter.TransactionGraphOperator, TutorialD.Interpreter.Types
542− Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics, binary, parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36, random, MonadRandom, semigroups, parser-combinators
547+ Build-Depends: base, HUnit, Cabal, containers, hashable, unordered-containers, mtl, vector, vector-binary-instances, time, hashable-time, bytestring, uuid, stm, deepseq, deepseq-generics,parallel, cassava, attoparsec, gnuplot, directory, temporary, haskeline, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, project-m36, random, MonadRandom, semigroups, parser-combinators
543 Default-Extensions: OverloadedStrings
548 Default-Extensions: OverloadedStrings
544 GHC-Options: -Wall -threaded
549 GHC-Options: -Wall -threaded
545 Hs-Source-Dirs: ./src/bin, ., test/
550 Hs-Source-Dirs: ./src/bin, ., test/
release.nix+7−43
@@ -8,7 +8,6 @@ let
8 doJailbreak = pkgs.haskell.lib.doJailbreak;
8 doJailbreak = pkgs.haskell.lib.doJailbreak;
9 dontHaddock = pkgs.haskell.lib.dontHaddock;
9 dontHaddock = pkgs.haskell.lib.dontHaddock;
10 dontCheck = pkgs.haskell.lib.dontCheck;
10 dontCheck = pkgs.haskell.lib.dontCheck;
11− #distributed-process packages are no longer maintained- until we replace it entirely, add some hacks to build on newer GHC and packages
12 distProcessPkg = pkg : dontHaddock (doJailbreak (dontCheck pkg));
11 distProcessPkg = pkg : dontHaddock (doJailbreak (dontCheck pkg));
13 callHackageDirectWithOptions = {pkg,ver, sha256, options}:
12 callHackageDirectWithOptions = {pkg,ver, sha256, options}:
14 let pkgver = "${pkg}-${ver}";
13 let pkgver = "${pkg}-${ver}";
@@ -20,41 +19,6 @@ let
20
19
21 haskellPackages = pkgs.haskell.packages.${compiler}.override {
20 haskellPackages = pkgs.haskell.packages.${compiler}.override {
22 overrides = self: super: {
21 overrides = self: super: {
23− distributed-process-extras =
24− distProcessPkg (self.callHackageDirect {
25− pkg = "distributed-process-extras";
26− ver = "0.3.5";
27− sha256 = "13clq3alymcvknp7q8gz0i1hzx8im855lzmyrfffl8gglnlbi2w9";
28− }{});
29−
30− distributed-process-client-server =
31− distProcessPkg (self.callHackageDirect {
32− pkg = "distributed-process-client-server";
33− ver = "0.2.5.1";
34− sha256 = "0gkd8awapq7vy14vpnzawnwb67jvvcjaqg7imm0bp1wb6rw6x5x4";
35− }{});
36−
37− distributed-process-async =
38− distProcessPkg (callHackageDirectWithOptions {
39− pkg = "distributed-process-async";
40− ver = "0.2.6";
41− sha256 = "15wyfq115r6xjaz1h00sjh1v0fv498kkxr3xx6w84d8wdp2gxbn1";
42− options = "--no-check";
43− }{});
44−
45− distributed-process =
46− dontHaddock (self.callCabal2nix "distributed-process" (pkgs.fetchFromGitHub {
47− owner = "agentm";
48− repo = "distributed-process";
49− rev = "f352e097fbe494ad648b4e09249f865893ae90a3";
50− sha256 = "0xa2v77c9idmi89bky2wq1fykrn8grpk4rk7gcd5bkicxvdbcrym";}){});
51−
52− distributed-static =
53− self.callHackageDirect {
54− pkg = "distributed-static";
55− ver = "0.3.9";
56− sha256 = "0hibpzqwklnq335m7fwgk1bghz0lgxnd7ym10pbvxlcf7ly3nr6v";
57−}{};
58 rank1dynamic =
22 rank1dynamic =
59 distProcessPkg (self.callHackageDirect {
23 distProcessPkg (self.callHackageDirect {
60 pkg = "rank1dynamic";
24 pkg = "rank1dynamic";
@@ -75,19 +39,19 @@ let
75 sha256 = "0h9z6lawdm44minx9spvdb7sp645l36ri5cnxvhrcxwzr64s7qb5";
39 sha256 = "0h9z6lawdm44minx9spvdb7sp645l36ri5cnxvhrcxwzr64s7qb5";
76 }{};
40 }{};
77
41
78− network-transport-tcp =
79− dontCheck (self.callHackageDirect {
80− pkg = "network-transport-tcp";
81− ver = "0.7.0";
82− sha256 = "0kfzrcynf34xsxx4rccg4qfy7jvinwqd8baian8ifqad9lfcapsb";
83− }{});
84−
85 data-interval =
42 data-interval =
86 self.callHackageDirect {
43 self.callHackageDirect {
87 pkg = "data-interval";
44 pkg = "data-interval";
88 ver = "2.0.1";
45 ver = "2.0.1";
89 sha256 = "085j4yjr8wimxampxqdrg47p577whwg2mjxgfdl44yfck52fb6an";
46 sha256 = "085j4yjr8wimxampxqdrg47p577whwg2mjxgfdl44yfck52fb6an";
90 }{};
47 }{};
48+
49+ curryer =
50+ self.callHackageDirect {
51+ pkg = "curryer";
52+ ver = "0.1";
53+ sha256 = "085j4yjr8wimxampxqdrg47p577whwg2mjxgfdl44yfck52fb6ac";
54+ }{};
91
55
92 project-m36 = dontCheck (self.callCabal2nixWithOptions "project-m36" ./. "-f-haskell-scripting" { });
56 project-m36 = dontCheck (self.callCabal2nixWithOptions "project-m36" ./. "-f-haskell-scripting" { });
93
57
src/bin/ProjectM36/Server/WebSocket.hs+1−1
@@ -85,7 +85,7 @@ notificationCallback conn notifName evaldNotif = WS.sendTextData conn (encode (o
85
85
86--this creates a new database for each connection- perhaps not what we want (?)
86--this creates a new database for each connection- perhaps not what we want (?)
87createConnection :: WS.Connection -> DatabaseName -> Port -> Hostname -> IO (Either ConnectionError Connection)
87createConnection :: WS.Connection -> DatabaseName -> Port -> Hostname -> IO (Either ConnectionError Connection)
88−createConnection wsconn dbname port host = connectProjectM36 (RemoteProcessConnectionInfo dbname (createNodeId host port) (notificationCallback wsconn))
88+createConnection wsconn dbname port host = connectProjectM36 (RemoteConnectionInfo dbname host port (notificationCallback wsconn))
89
89
90sendError :: (ToJSON a) => WS.Connection -> a -> IO ()
90sendError :: (ToJSON a) => WS.Connection -> a -> IO ()
91sendError conn err = WS.sendTextData conn (encode (object ["displayerror" .= err]))
91sendError conn err = WS.sendTextData conn (encode (object ["displayerror" .= err]))
src/bin/TutorialD/Interpreter.hs+1−1
@@ -227,7 +227,7 @@ type TutorialDExec = String
227type CheckFS = Bool
227type CheckFS = Bool
228
228
229data InterpreterConfig = LocalInterpreterConfig PersistenceStrategy HeadName (Maybe TutorialDExec) [GhcPkgPath] CheckFS |
229data InterpreterConfig = LocalInterpreterConfig PersistenceStrategy HeadName (Maybe TutorialDExec) [GhcPkgPath] CheckFS |
230− RemoteInterpreterConfig C.NodeId C.DatabaseName HeadName (Maybe TutorialDExec) CheckFS
230+ RemoteInterpreterConfig C.Hostname C.Port C.DatabaseName HeadName (Maybe TutorialDExec) CheckFS
231
231
232outputNotificationCallback :: C.NotificationCallback
232outputNotificationCallback :: C.NotificationCallback
233outputNotificationCallback notName evaldNot = hPutStrLn stderr $ "Notification received " ++ show notName ++ ":\n" ++ "\n" ++ prettyEvaluatedNotification evaldNot
233outputNotificationCallback notName evaldNot = hPutStrLn stderr $ "Notification received " ++ show notName ++ ":\n" ++ "\n" ++ prettyEvaluatedNotification evaldNot
src/bin/TutorialD/tutd.hs+5−18
@@ -22,7 +22,7 @@ import qualified Data.Text as T
22
22
23parseArgs :: Parser InterpreterConfig
23parseArgs :: Parser InterpreterConfig
24parseArgs = LocalInterpreterConfig <$> parsePersistenceStrategy <*> parseHeadName <*> parseTutDExec <*> many parseGhcPkgPath <*> parseCheckFS <|>
24parseArgs = LocalInterpreterConfig <$> parsePersistenceStrategy <*> parseHeadName <*> parseTutDExec <*> many parseGhcPkgPath <*> parseCheckFS <|>
25− RemoteInterpreterConfig <$> parseNodeId <*> parseDatabaseName <*> parseHeadName <*> parseTutDExec <*> parseCheckFS
25+ RemoteInterpreterConfig <$> parseHostname "127.0.0.1" <*> parsePort defaultServerPort <*> parseDatabaseName <*> parseHeadName <*> parseTutDExec <*> parseCheckFS
26
26
27parseHeadName :: Parser HeadName
27parseHeadName :: Parser HeadName
28parseHeadName = option auto (long "head" <>
28parseHeadName = option auto (long "head" <>
@@ -31,19 +31,6 @@ parseHeadName = option auto (long "head" <>
31 value "master"
31 value "master"
32 )
32 )
33
33
34−parseNodeId :: Parser NodeId
35−parseNodeId = createNodeId <$>
36− strOption (long "host" <>
37− short 'h' <>
38− help "Remote host name" <>
39− metavar "HOSTNAME" <>
40− value "127.0.0.1") <*>
41− option auto (long "port" <>
42− metavar "PORT NUMBER" <>
43− short 'p' <>
44− help "Remote port" <>
45− value defaultServerPort)
46−
47--just execute some tutd and exit
34--just execute some tutd and exit
48parseTutDExec :: Parser (Maybe TutorialDExec)
35parseTutDExec :: Parser (Maybe TutorialDExec)
49parseTutDExec = optional $ strOption (long "exec-tutd" <>
36parseTutDExec = optional $ strOption (long "exec-tutd" <>
@@ -57,19 +44,19 @@ opts = info (parseArgs <**> helpOption) idm
57
44
58connectionInfoForConfig :: InterpreterConfig -> ConnectionInfo
45connectionInfoForConfig :: InterpreterConfig -> ConnectionInfo
59connectionInfoForConfig (LocalInterpreterConfig pStrategy _ _ ghcPkgPaths _) = InProcessConnectionInfo pStrategy outputNotificationCallback ghcPkgPaths
46connectionInfoForConfig (LocalInterpreterConfig pStrategy _ _ ghcPkgPaths _) = InProcessConnectionInfo pStrategy outputNotificationCallback ghcPkgPaths
60−connectionInfoForConfig (RemoteInterpreterConfig remoteNodeId remoteDBName _ _ _) = RemoteProcessConnectionInfo remoteDBName remoteNodeId outputNotificationCallback
47+connectionInfoForConfig (RemoteInterpreterConfig remoteHost remotePort remoteDBName _ _ _) = RemoteConnectionInfo remoteDBName remoteHost (show remotePort) outputNotificationCallback
61
48
62headNameForConfig :: InterpreterConfig -> HeadName
49headNameForConfig :: InterpreterConfig -> HeadName
63headNameForConfig (LocalInterpreterConfig _ headn _ _ _) = headn
50headNameForConfig (LocalInterpreterConfig _ headn _ _ _) = headn
64−headNameForConfig (RemoteInterpreterConfig _ _ headn _ _) = headn
51+headNameForConfig (RemoteInterpreterConfig _ _ _ headn _ _) = headn
65
52
66execTutDForConfig :: InterpreterConfig -> Maybe String
53execTutDForConfig :: InterpreterConfig -> Maybe String
67execTutDForConfig (LocalInterpreterConfig _ _ t _ _) = t
54execTutDForConfig (LocalInterpreterConfig _ _ t _ _) = t
68−execTutDForConfig (RemoteInterpreterConfig _ _ _ t _) = t
55+execTutDForConfig (RemoteInterpreterConfig _ _ _ _ t _) = t
69
56
70checkFSForConfig :: InterpreterConfig -> Bool
57checkFSForConfig :: InterpreterConfig -> Bool
71checkFSForConfig (LocalInterpreterConfig _ _ _ _ c) = c
58checkFSForConfig (LocalInterpreterConfig _ _ _ _ c) = c
72−checkFSForConfig (RemoteInterpreterConfig _ _ _ _ c) = c
59+checkFSForConfig (RemoteInterpreterConfig _ _ _ _ _ c) = c
73
60
74persistenceStrategyForConfig :: InterpreterConfig -> Maybe PersistenceStrategy
61persistenceStrategyForConfig :: InterpreterConfig -> Maybe PersistenceStrategy
75persistenceStrategyForConfig (LocalInterpreterConfig strat _ _ _ _) = Just strat
62persistenceStrategyForConfig (LocalInterpreterConfig strat _ _ _ _) = Just strat
src/lib/ProjectM36/Client.hs+20−27
@@ -1,4 +1,4 @@
1−{-# LANGUAGE DeriveAnyClass, DeriveGeneric, ScopedTypeVariables, MonoLocalBinds, DerivingVia, GeneralizedNewtypeDeriving #-}
1+{-# LANGUAGE DeriveAnyClass, DeriveGeneric, ScopedTypeVariables, MonoLocalBinds, DerivingVia, GeneralizedNewtypeDeriving, PackageImports #-}
2{-|
2{-|
3Module: ProjectM36.Client
3Module: ProjectM36.Client
4
4
@@ -9,6 +9,7 @@ module ProjectM36.Client
9 Connection(..),
9 Connection(..),
10 Port,
10 Port,
11 Hostname,
11 Hostname,
12+ ServiceName,
12 DatabaseName,
13 DatabaseName,
13 ConnectionError(..),
14 ConnectionError(..),
14 connectProjectM36,
15 connectProjectM36,
@@ -141,7 +142,7 @@ import Data.UUID.V4 (nextRandom)
141import Data.Word
142import Data.Word
142import Control.Exception (IOException, handle, AsyncException, throwIO, fromException, Exception)
143import Control.Exception (IOException, handle, AsyncException, throwIO, fromException, Exception)
143import Control.Concurrent.MVar
144import Control.Concurrent.MVar
144−import Codec.Winery hiding (Schema)
145+import Codec.Winery hiding (Schema, schema)
145import qualified Data.Map as M
146import qualified Data.Map as M
146#if MIN_VERSION_stm_containers(1,0,0)
147#if MIN_VERSION_stm_containers(1,0,0)
147import qualified StmContainers.Map as StmMap
148import qualified StmContainers.Map as StmMap
@@ -191,7 +192,7 @@ data ConnectionInfo = InProcessConnectionInfo PersistenceStrategy NotificationCa
191type EvaluatedNotifications = M.Map NotificationName EvaluatedNotification
192type EvaluatedNotifications = M.Map NotificationName EvaluatedNotification
192
193
193-- | Used for callbacks from the server when monitored changes have been made.
194-- | Used for callbacks from the server when monitored changes have been made.
194−newtype NotificationMessage = NotificationMessage EvaluatedNotifications
195+data NotificationMessage = NotificationMessage EvaluatedNotifications
195 deriving (Eq, Show, Generic)
196 deriving (Eq, Show, Generic)
196 deriving Serialise via WineryVariant NotificationMessage
197 deriving Serialise via WineryVariant NotificationMessage
197
198
@@ -206,8 +207,8 @@ data EvaluatedNotification = EvaluatedNotification {
206
207
207
208
208-- | Use this for connecting to remote servers on the default port.
209-- | Use this for connecting to remote servers on the default port.
209−defaultServerPort :: ServiceName
210+defaultServerPort :: Port
210−defaultServerPort = "6543"
211+defaultServerPort = 6543
211
212
212-- | Use this for connecting to remote servers with the default database name.
213-- | Use this for connecting to remote servers with the default database name.
213defaultDatabaseName :: DatabaseName
214defaultDatabaseName :: DatabaseName
@@ -220,7 +221,7 @@ defaultHeadName = "master"
220-- | Create a connection configuration which connects to the localhost on the default server port and default server database name. The configured notification callback is set to ignore all events.
221-- | Create a connection configuration which connects to the localhost on the default server port and default server database name. The configured notification callback is set to ignore all events.
221defaultRemoteConnectionInfo :: ConnectionInfo
222defaultRemoteConnectionInfo :: ConnectionInfo
222defaultRemoteConnectionInfo =
223defaultRemoteConnectionInfo =
223− RemoteConnectionInfo defaultDatabaseName defaultServerHostname defaultServerPort emptyNotificationCallback
224+ RemoteConnectionInfo defaultDatabaseName defaultServerHostname (show defaultServerPort) emptyNotificationCallback
224
225
225defaultServerHostname :: Hostname
226defaultServerHostname :: Hostname
226defaultServerHostname = "localhost"
227defaultServerHostname = "localhost"
@@ -286,8 +287,14 @@ connectProjectM36 (RemoteConnectionInfo dbName hostName servicePort notification
286 addrInfo:_ -> do
287 addrInfo:_ -> do
287 --supports IPv4 only for now
288 --supports IPv4 only for now
288 let (SockAddrInet port addr) = addrAddress addrInfo
289 let (SockAddrInet port addr) = addrAddress addrInfo
290+ notificationHandlers =
291+ [RPC.ClientAsyncRequestHandler $
292+ \(NotificationMessage notifications') ->
293+ forM_ (M.toList notifications') (\(notName, notInfo) ->
294+ notificationCallback notName notInfo)
295+ ]
289-- TODO missing async callback
296-- TODO missing async callback
290− conn <- RPC.connect [] (hostAddressToTuple addr) port
297+ conn <- RPC.connect notificationHandlers (hostAddressToTuple addr) port
291 eRet <- RPC.call conn (Login dbName)
298 eRet <- RPC.call conn (Login dbName)
292-- TODO handle connection errors
299-- TODO handle connection errors
293 case eRet of
300 case eRet of
@@ -296,18 +303,6 @@ connectProjectM36 (RemoteConnectionInfo dbName hostName servicePort notification
296 Right True ->
303 Right True ->
297 --TODO handle connection errors!
304 --TODO handle connection errors!
298 pure (Right (RemoteConnection (RemoteConnectionConf conn)))
305 pure (Right (RemoteConnection (RemoteConnectionConf conn)))
299− {-
300− mServerProcessId <- whereisRemote serverNodeId dbName
301− case mServerProcessId of
302− Nothing -> liftIO $ putMVar connStatus $ Left (NoSuchDatabaseByNameError databaseName)
303− Just serverProcessId -> do
304− loginConfirmation <- safeLogin (Login notificationListenerPid) serverProcessId
305− if not loginConfirmation then
306− liftIO $ putMVar connStatus (Left LoginError)
307− else
308− liftIO $ putMVar connStatus (Right $ RemoteProcessConnection RemoteProcessConnectionConf {rConn = )
309− takeMVar connStatus
310−-}
311
306
312addClientNode :: DatabaseName ->Connection -> RPC.Locking Socket -> IO ()
307addClientNode :: DatabaseName ->Connection -> RPC.Locking Socket -> IO ()
313addClientNode _ (RemoteConnection _) _ = error "addClientNode called on remote connection"
308addClientNode _ (RemoteConnection _) _ = error "addClientNode called on remote connection"
@@ -771,13 +766,11 @@ commit :: SessionId -> Connection -> IO (Either RelationalError ())
771commit sessionId conn@(InProcessConnection _) = executeGraphExpr sessionId conn Commit
766commit sessionId conn@(InProcessConnection _) = executeGraphExpr sessionId conn Commit
772commit sessionId conn@(RemoteConnection _) = remoteCall conn (ExecuteGraphExpr sessionId Commit)
767commit sessionId conn@(RemoteConnection _) = remoteCall conn (ExecuteGraphExpr sessionId Commit)
773
768
774−{-
775−sendNotifications :: EvaluatedNotifications -> IO ()
769+sendNotifications :: [ClientInfo] -> EvaluatedNotifications -> IO ()
776−sendNotifications nots = mapM_ sendNots pids
770+sendNotifications clients notifs =
777− where
771+ unless (M.null notifs) $
778− sendNots remoteClientPid =
772+ forM_ (map clientSocket clients) $ \sock -> RPC.sendMessage sock (NotificationMessage notifs)
779− unless (M.null nots) $ runProcess localNode $ send remoteClientPid (NotificationMessage nots)
773+
780− -}
781-- | Discard any changes made in the current 'Session' and 'DatabaseContext'. This resets the disconnected transaction to reference the original database context of the parent transaction and is a very cheap operation.
774-- | Discard any changes made in the current 'Session' and 'DatabaseContext'. This resets the disconnected transaction to reference the original database context of the parent transaction and is a very cheap operation.
782rollback :: SessionId -> Connection -> IO (Either RelationalError ())
775rollback :: SessionId -> Connection -> IO (Either RelationalError ())
783rollback sessionId conn@(InProcessConnection _) = executeGraphExpr sessionId conn Rollback
776rollback sessionId conn@(InProcessConnection _) = executeGraphExpr sessionId conn Rollback
@@ -1076,7 +1069,7 @@ commitLock_ sessionId conf stmBlock = do
1076 Right (notsToFire, nodesToNotify, newGraph, transactionIdsToPersist) -> do
1069 Right (notsToFire, nodesToNotify, newGraph, transactionIdsToPersist) -> do
1077 --update filesystem database, if necessary
1070 --update filesystem database, if necessary
1078 processTransactionGraphPersistence strat transactionIdsToPersist newGraph
1071 processTransactionGraphPersistence strat transactionIdsToPersist newGraph
1079− --sendNotifications nodesToNotify (ipLocalNode conf) notsToFire
1072+ sendNotifications nodesToNotify notsToFire
1080 pure (Right ())
1073 pure (Right ())
1081{-
1074{-
1082writeDisconAndGraph_ :: TVar TransactionGraph -> SessionId -> Session -> Sessions -> DisconnectedTransaction -> TransactionGraph -> STM ()
1075writeDisconAndGraph_ :: TVar TransactionGraph -> SessionId -> Session -> Sessions -> DisconnectedTransaction -> TransactionGraph -> STM ()
src/lib/ProjectM36/Server.hs+146−40
@@ -6,56 +6,121 @@ import ProjectM36.Server.EntryPoints
6import ProjectM36.Server.RemoteCallTypes
6import ProjectM36.Server.RemoteCallTypes
7import ProjectM36.Server.Config (ServerConfig(..))
7import ProjectM36.Server.Config (ServerConfig(..))
8import ProjectM36.FSType
8import ProjectM36.FSType
9−import ProjectM36.Server.Types
10
9
11−import Control.Monad.IO.Class (liftIO)
12−import Control.Concurrent.MVar (putMVar, MVar)
10+import Control.Concurrent.MVar (MVar)
13import System.IO (stderr, hPutStrLn)
11import System.IO (stderr, hPutStrLn)
14import System.FilePath (takeDirectory)
12import System.FilePath (takeDirectory)
15import System.Directory (doesDirectoryExist)
13import System.Directory (doesDirectoryExist)
16import Network.RPC.Curryer.Server
14import Network.RPC.Curryer.Server
17import Network.Socket
15import Network.Socket
18import qualified StmContainers.Map as StmMap
16import qualified StmContainers.Map as StmMap
17+import Control.Concurrent.STM
19
18
20-- the state should be a mapping of remote connection to the disconnected transaction- the graph should be the same, so discon must be removed from the stm tuple
19-- the state should be a mapping of remote connection to the disconnected transaction- the graph should be the same, so discon must be removed from the stm tuple
21--trying to refactor this for less repetition is very challenging because the return type cannot be polymorphic or the distributed-process call gets confused and drops messages
20--trying to refactor this for less repetition is very challenging because the return type cannot be polymorphic or the distributed-process call gets confused and drops messages
22type TestMode = Bool
21type TestMode = Bool
23
22
24requestHandlers :: TestMode -> Maybe Timeout -> RequestHandlers ServerState
23requestHandlers :: TestMode -> Maybe Timeout -> RequestHandlers ServerState
25−requestHandlers testBool ti =
24+requestHandlers testFlag ti =
26 [
25 [
26+ RequestHandler (\sState (Login dbName) -> do
27+ addClientLogin dbName sState
28+ conn <- getConn sState
29+ handleLogin dbName conn (connectionSocket sState)),
30+ RequestHandler (\sState Logout -> do
31+ conn <- getConn sState
32+ handleLogout ti conn),
33+ RequestHandler $ \sState (ExecuteHeadName sessionId) -> do
34+ --socket -> dbname --maybe create a socket->client state mapping in the server state, too
35+ conn <- getConn sState
27− RequestHandler $ \conn (ExecuteHeadName sessionId) -> handleExecuteHeadName ti sessionId conn,
36+ handleExecuteHeadName ti sessionId conn,
37+ RequestHandler (\sState (ExecuteRelationalExpr sessionId expr) -> do
38+ conn <- getConn sState
28− RequestHandler (\conn (ExecuteRelationalExpr sessionId expr) -> handleExecuteRelationalExpr ti sessionId conn expr),
39+ handleExecuteRelationalExpr ti sessionId conn expr),
40+ RequestHandler (\sState (ExecuteDataFrameExpr sessionId expr) -> do
41+ conn <- getConn sState
29− RequestHandler (\conn (ExecuteDataFrameExpr sessionId expr) -> handleExecuteDataFrameExpr ti sessionId conn expr),
42+ handleExecuteDataFrameExpr ti sessionId conn expr),
43+ RequestHandler (\sState (ExecuteDatabaseContextExpr sessionId expr) -> do
44+ conn <- getConn sState
30− RequestHandler (\conn (ExecuteDatabaseContextExpr sessionId expr) -> handleExecuteDatabaseContextExpr ti sessionId conn expr),
45+ handleExecuteDatabaseContextExpr ti sessionId conn expr),
46+ RequestHandler (\sState (ExecuteDatabaseContextIOExpr sessionId expr) -> do
47+ conn <- getConn sState
31− RequestHandler (\conn (ExecuteDatabaseContextIOExpr sessionId expr) -> handleExecuteDatabaseContextIOExpr ti sessionId conn expr),
48+ handleExecuteDatabaseContextIOExpr ti sessionId conn expr),
49+ RequestHandler (\sState (ExecuteGraphExpr sessionId expr) -> do
50+ conn <- getConn sState
32− RequestHandler (\conn (ExecuteGraphExpr sessionId expr) -> handleExecuteGraphExpr ti sessionId conn expr),
51+ handleExecuteGraphExpr ti sessionId conn expr),
52+ RequestHandler (\sState (ExecuteTransGraphRelationalExpr sessionId expr) -> do
53+ conn <- getConn sState
33− RequestHandler (\conn (ExecuteTransGraphRelationalExpr sessionId expr) -> handleExecuteTransGraphRelationalExpr ti sessionId conn expr),
54+ handleExecuteTransGraphRelationalExpr ti sessionId conn expr),
55+ RequestHandler (\sState (ExecuteTypeForRelationalExpr sessionId expr) -> do
56+ conn <- getConn sState
34− RequestHandler (\conn (ExecuteTypeForRelationalExpr sessionId expr) -> handleExecuteTypeForRelationalExpr ti sessionId conn expr),
57+ handleExecuteTypeForRelationalExpr ti sessionId conn expr),
58+ RequestHandler (\sState (RetrieveInclusionDependencies sessionId) -> do
59+ conn <- getConn sState
35− RequestHandler (\conn (RetrieveInclusionDependencies sessionId) -> handleRetrieveInclusionDependencies ti sessionId conn),
60+ handleRetrieveInclusionDependencies ti sessionId conn),
61+ RequestHandler (\sState (RetrievePlanForDatabaseContextExpr sessionId dbExpr) -> do
62+ conn <- getConn sState
36− RequestHandler (\conn (RetrievePlanForDatabaseContextExpr sessionId dbExpr) -> handleRetrievePlanForDatabaseContextExpr ti sessionId conn dbExpr),
63+ handleRetrievePlanForDatabaseContextExpr ti sessionId conn dbExpr),
64+ RequestHandler (\sState (RetrieveHeadTransactionId sessionId) -> do
65+ conn <- getConn sState
37− RequestHandler (\conn (RetrieveHeadTransactionId sessionId) -> handleRetrieveHeadTransactionId ti sessionId conn),
66+ handleRetrieveHeadTransactionId ti sessionId conn),
67+ RequestHandler (\sState (RetrieveTransactionGraph sessionId) -> do
68+ conn <- getConn sState
38− RequestHandler (\conn (RetrieveTransactionGraph sessionId) -> handleRetrieveTransactionGraph ti sessionId conn),
69+ handleRetrieveTransactionGraph ti sessionId conn),
39− RequestHandler (\conn (Login dbName) -> handleLogin dbName ti conn),
70+ RequestHandler (\sState (CreateSessionAtHead headn) -> do
71+ conn <- getConn sState
40− RequestHandler (\conn (CreateSessionAtHead headn) -> handleCreateSessionAtHead ti conn headn),
72+ handleCreateSessionAtHead ti conn headn),
73+ RequestHandler (\sState (CreateSessionAtCommit commitId) -> do
74+ conn <- getConn sState
41− RequestHandler (\conn (CreateSessionAtCommit commitId) -> handleCreateSessionAtCommit ti conn commitId),
75+ handleCreateSessionAtCommit ti conn commitId),
42− RequestHandler (\conn (CloseSession sessionId) -> handleCloseSession ti sessionId conn),
76+ RequestHandler (\sState (CloseSession sessionId) -> do
77+ conn <- getConn sState
78+ handleCloseSession sessionId conn),
79+ RequestHandler (\sState (RetrieveAtomTypesAsRelation sessionId) -> do
80+ conn <- getConn sState
43− RequestHandler (\conn (RetrieveAtomTypesAsRelation sessionId) -> handleRetrieveAtomTypesAsRelation ti sessionId conn),
81+ handleRetrieveAtomTypesAsRelation ti sessionId conn),
82+ RequestHandler (\sState (RetrieveRelationVariableSummary sessionId) -> do
83+ conn <- getConn sState
44− RequestHandler (\conn (RetrieveRelationVariableSummary sessionId) -> handleRetrieveRelationVariableSummary ti sessionId conn),
84+ handleRetrieveRelationVariableSummary ti sessionId conn),
85+ RequestHandler (\sState (RetrieveAtomFunctionSummary sessionId) -> do
86+ conn <- getConn sState
45− RequestHandler (\conn (RetrieveAtomFunctionSummary sessionId) -> handleRetrieveAtomFunctionSummary ti sessionId conn),
87+ handleRetrieveAtomFunctionSummary ti sessionId conn),
46− RequestHandler (\conn (RetrieveDatabaseContextFunctionSummary sessionId) -> handleRetrieveDatabaseContextFunctionSummary ti sessionId conn),
88+ RequestHandler (\sState (RetrieveDatabaseContextFunctionSummary sessionId) -> do
89+ conn <- getConn sState
90+ handleRetrieveDatabaseContextFunctionSummary ti sessionId conn), RequestHandler (\sState (RetrieveCurrentSchemaName sessionId) -> do
91+ conn <- getConn sState
47− RequestHandler (\conn (RetrieveCurrentSchemaName sessionId) -> handleRetrieveCurrentSchemaName ti sessionId conn),
92+ handleRetrieveCurrentSchemaName ti sessionId conn),
93+ RequestHandler (\sState (ExecuteSchemaExpr sessionId schemaExpr) -> do
94+ conn <- getConn sState
48− RequestHandler (\conn (ExecuteSchemaExpr sessionId schemaExpr) -> handleExecuteSchemaExpr ti sessionId conn schemaExpr),
95+ handleExecuteSchemaExpr ti sessionId conn schemaExpr),
96+ RequestHandler (\sState (RetrieveSessionIsDirty sessionId) -> do
97+ conn <- getConn sState
49− RequestHandler (\conn (RetrieveSessionIsDirty sessionId) -> handleRetrieveSessionIsDirty ti sessionId conn),
98+ handleRetrieveSessionIsDirty ti sessionId conn),
99+ RequestHandler (\sState (ExecuteAutoMergeToHead sessionId strat headName') -> do
100+ conn <- getConn sState
50− RequestHandler (\conn (ExecuteAutoMergeToHead sessionId strat headName') -> handleExecuteAutoMergeToHead ti sessionId conn strat headName'),
101+ handleExecuteAutoMergeToHead ti sessionId conn strat headName'),
102+ RequestHandler (\sState (RetrieveTypeConstructorMapping sessionId) -> do
103+ conn <- getConn sState
51− RequestHandler (\conn (RetrieveTypeConstructorMapping sessionId) -> handleRetrieveTypeConstructorMapping ti sessionId conn),
104+ handleRetrieveTypeConstructorMapping ti sessionId conn),
52− RequestHandler (\conn (ExecuteValidateMerkleHashes sessionId) -> handleValidateMerkleHashes ti sessionId conn),
105+ RequestHandler (\sState (ExecuteValidateMerkleHashes sessionId) -> do
53− RequestHandler (\conn Logout -> handleLogout ti conn)
106+ conn <- getConn sState
107+ handleValidateMerkleHashes ti sessionId conn)
54− ] ++ if testMode then testModeHandlers else []
108+ ] ++ if testFlag then testModeHandlers ti else []
55−
109+
110+getConn :: ConnectionState ServerState -> IO Connection
111+getConn connState = do
112+ let sock = lockless (connectionSocket connState)
113+ sState = connectionServerState connState
114+ mConn <- connectionForClient sock sState
115+ case mConn of
116+ Nothing -> error "failed to find socket in client map"
117+ Just conn -> pure conn
118+
56testModeHandlers :: Maybe Timeout -> RequestHandlers ServerState
119testModeHandlers :: Maybe Timeout -> RequestHandlers ServerState
57−testModeHandlers ti = [RequestHandler (\conn (TestTimeout sessionId) -> handleTestTimeout ti sessionId conn)]
120+testModeHandlers ti = [RequestHandler (\sState (TestTimeout sessionId) -> do
58−
121+ conn <- getConn sState
122+ handleTestTimeout ti sessionId conn)]
123+
59
124
60-- | A notification callback which logs the notification to stderr and does nothing else.
125-- | A notification callback which logs the notification to stderr and does nothing else.
61loggingNotificationCallback :: NotificationCallback
126loggingNotificationCallback :: NotificationCallback
@@ -81,8 +146,44 @@ checkFSType performCheck strat =
81checkFSErrorMsg :: String
146checkFSErrorMsg :: String
82checkFSErrorMsg = "The filesystem does not support journaling so writes may not be crash-safe. Use --disable-fscheck to disable this fatal error."
147checkFSErrorMsg = "The filesystem does not support journaling so writes may not be crash-safe. Use --disable-fscheck to disable this fatal error."
83
148
149+-- Sockets do not implement hashable, so we just use their string values as keys
150+type SocketString = String
151+
152+data ServerState =
153+ ServerState {
154+ --map available databases to local database configurations
84−type ServerState = StmMap.Map DatabaseName InProcessConnectionConf
155+ stateDBMap :: StmMap.Map DatabaseName Connection,
156+ --map clients to database names- after logging in, clients are afixed to specific database names
157+ stateClientMap :: StmMap.Map SocketString DatabaseName
158+ }
85
159
160+-- add a client socket to the database mapping
161+addClientLogin :: DatabaseName -> ConnectionState ServerState -> IO ()
162+addClientLogin dbName cState = do
163+ let clientMap = stateClientMap (connectionServerState cState)
164+ sock = lockless (connectionSocket cState)
165+ atomically $ do
166+ mVal <- StmMap.lookup (show sock) clientMap
167+ case mVal of
168+ Nothing -> StmMap.insert dbName (show sock) clientMap
169+ Just _ -> pure () --TODO: throw exception- user already logged in
170+
171+connectionForClient :: Socket -> ServerState -> IO (Maybe Connection)
172+connectionForClient sock sState =
173+ atomically $ do
174+ mdbname <- StmMap.lookup (show sock) (stateClientMap sState)
175+ case mdbname of
176+ Nothing -> pure Nothing
177+ Just dbname ->
178+ StmMap.lookup dbname (stateDBMap sState)
179+
180+initialServerState :: DatabaseName -> Connection -> IO ServerState
181+initialServerState dbName conn =
182+ atomically $ do
183+ dbmap <- StmMap.new
184+ clientMap <- StmMap.new
185+ StmMap.insert conn dbName dbmap
186+ pure (ServerState { stateDBMap = dbmap, stateClientMap = clientMap })
86-- | A synchronous function to start the project-m36 daemon given an appropriate 'ServerConfig'. Note that this function only returns if the server exits. Returns False if the daemon exited due to an error. If the second argument is not Nothing, the port is put after the server is ready to service the port.
187-- | A synchronous function to start the project-m36 daemon given an appropriate 'ServerConfig'. Note that this function only returns if the server exits. Returns False if the daemon exited due to an error. If the second argument is not Nothing, the port is put after the server is ready to service the port.
87launchServer :: ServerConfig -> Maybe (MVar SockAddr) -> IO Bool
188launchServer :: ServerConfig -> Maybe (MVar SockAddr) -> IO Bool
88launchServer daemonConfig mAddr = do
189launchServer daemonConfig mAddr = do
@@ -98,7 +199,8 @@ launchServer daemonConfig mAddr = do
98 pure False
199 pure False
99 Right conn -> do
200 Right conn -> do
100 let hostname = bindHost daemonConfig
201 let hostname = bindHost daemonConfig
101− port = bindPort daemonConfig
202+ port = fromIntegral (bindPort daemonConfig)
203+
102
204
103 --curryer only supports IPv4 for now
205 --curryer only supports IPv4 for now
104 let addrHints = defaultHints { addrSocketType = Stream, addrFamily = AF_INET }
206 let addrHints = defaultHints { addrSocketType = Stream, addrFamily = AF_INET }
@@ -107,7 +209,11 @@ launchServer daemonConfig mAddr = do
107 [] -> hPutStrLn stderr ("Failed to resolve: " <> hostname) >> pure False
209 [] -> hPutStrLn stderr ("Failed to resolve: " <> hostname) >> pure False
108 (AddrInfo _ _ _ _ (SockAddrInet _ addr32) _):_ -> do
210 (AddrInfo _ _ _ _ (SockAddrInet _ addr32) _):_ -> do
109 let hostAddr = hostAddressToTuple addr32
211 let hostAddr = hostAddressToTuple addr32
110− initialServerState <- StmMap.newIO @DatabaseName @InProcessConnectionConf
212+ mTimeout = fromIntegral <$> case perRequestTimeout daemonConfig of
213+ 0 -> Nothing
214+ v -> Just v
215+
216+ sState <- initialServerState (databaseName daemonConfig) conn
111− serve requestHandlers initialServerState hostAddr port mAddr
217+ serve (requestHandlers (testMode daemonConfig) mTimeout) sState hostAddr port mAddr
112−
218+ _ -> error "unsupported socket addressing mode (IPv4 only currently)"
113
219
src/lib/ProjectM36/Server/ParseArgs.hs+1−1
@@ -50,7 +50,7 @@ parseHostname defHostname = strOption (short 'h' <>
50 metavar "HOST_NAME" <>
50 metavar "HOST_NAME" <>
51 value defHostname)
51 value defHostname)
52
52
53−parsePort :: Port -> Parser Port
53+parsePort :: Port -> Parser Port
54parsePort defPort = option auto (short 'p' <>
54parsePort defPort = option auto (short 'p' <>
55 long "port" <>
55 long "port" <>
56 metavar "PORT_NUMBER" <>
56 metavar "PORT_NUMBER" <>
src/lib/ProjectM36/Server/Types.hs+1−1
@@ -28,7 +28,7 @@ data InProcessConnectionConf = InProcessConnectionConf {
28 }
28 }
29
29
30-- clients may connect associate one socket with one database
30-- clients may connect associate one socket with one database
31−data ClientInfo = ClientInfo { databaseName :: DatabaseName,
31+data ClientInfo = ClientInfo { clientDatabaseName :: DatabaseName,
32 clientSocket :: RPC.Locking Socket }
32 clientSocket :: RPC.Locking Socket }
33
33
34instance Eq ClientInfo where
34instance Eq ClientInfo where
test/Relation/Atomable.hs+28−15
@@ -1,8 +1,7 @@
1--Test Atomable typeclass which allows users to use existing Haskell datatypes to marshal them to and from the database as ConstructedAtoms.
1--Test Atomable typeclass which allows users to use existing Haskell datatypes to marshal them to and from the database as ConstructedAtoms.
2−{-# LANGUAGE DeriveGeneric, DeriveAnyClass, OverloadedStrings, TypeApplications #-}
2+{-# LANGUAGE DeriveGeneric, DeriveAnyClass, OverloadedStrings, TypeApplications, DerivingVia #-}
3import Test.HUnit
3import Test.HUnit
4import ProjectM36.Client
4import ProjectM36.Client
5−import Data.Binary
6import Control.DeepSeq
5import Control.DeepSeq
7import System.Exit
6import System.Exit
8import TutorialD.Interpreter.TestBase
7import TutorialD.Interpreter.TestBase
@@ -13,52 +12,65 @@ import Data.Time.Calendar (fromGregorian)
13import Data.Text
12import Data.Text
14import qualified Data.Map as M
13import qualified Data.Map as M
15import Data.Proxy
14import Data.Proxy
15+import Codec.Winery
16
16
17{-# ANN module ("Hlint: ignore Use newtype instead of data" :: String) #-}
17{-# ANN module ("Hlint: ignore Use newtype instead of data" :: String) #-}
18data Test1T = Test1C Integer
18data Test1T = Test1C Integer
19− deriving (Generic, Show, Eq, Binary, NFData, Atomable)
19+ deriving (Generic, Show, Eq, NFData, Atomable)
20+ deriving Serialise via WineryVariant Test1T
20
21
21data Test2T x = Test2C x
22data Test2T x = Test2C x
22− deriving (Show, Generic, Eq, Binary, NFData, Atomable)
23+ deriving (Show, Generic, Eq, NFData, Atomable)
24+ deriving Serialise via WineryVariant (Test2T x)
23
25
24data Test3T = Test3C Integer Integer
26data Test3T = Test3C Integer Integer
25− deriving (Show, Generic, Eq, Binary, NFData, Atomable)
27+ deriving (Show, Generic, Eq, NFData, Atomable)
28+ deriving Serialise via WineryVariant Test3T
26
29
27data Test4T = Test4Ca Integer |
30data Test4T = Test4Ca Integer |
28 Test4Cb Integer
31 Test4Cb Integer
29− deriving (Show, Generic, Eq, Binary, NFData, Atomable)
32+ deriving (Show, Generic, Eq, NFData, Atomable)
33+ deriving Serialise via WineryVariant Test4T
30
34
31data TestListT = TestListC [Integer]
35data TestListT = TestListC [Integer]
32− deriving (Show, Generic, Eq, Binary, NFData, Atomable)
36+ deriving (Show, Generic, Eq, NFData, Atomable)
37+ deriving Serialise via WineryVariant TestListT
33
38
34data TestNonEmptyT = TestNonEmptyC [Integer]
39data TestNonEmptyT = TestNonEmptyC [Integer]
35− deriving (Show, Generic, Eq, Binary, NFData, Atomable)
40+ deriving (Show, Generic, Eq, NFData, Atomable)
41+ deriving Serialise via WineryVariant TestNonEmptyT
36
42
37data Test5T = Test5C {
43data Test5T = Test5C {
38 con1 :: Integer,
44 con1 :: Integer,
39 con2 :: Integer
45 con2 :: Integer
40− } deriving (Show, Generic, Eq, Binary, NFData, Atomable)
46+ } deriving (Show, Generic, Eq, NFData, Atomable)
47+ deriving Serialise via WineryRecord Test5T
41
48
42data Test6T = Test6C (Maybe Integer)
49data Test6T = Test6C (Maybe Integer)
43− deriving (Show, Generic, Eq, Binary, NFData, Atomable)
50+ deriving (Show, Generic, Eq, NFData, Atomable)
51+ deriving Serialise via WineryVariant Test6T
44
52
45data Test7T = Test7C (Either Integer Integer)
53data Test7T = Test7C (Either Integer Integer)
46− deriving (Show, Generic, Eq, Binary, NFData, Atomable)
54+ deriving (Show, Generic, Eq, NFData, Atomable)
55+ deriving Serialise via WineryVariant Test7T
47
56
48data Test8T = Test8C Test1T
57data Test8T = Test8C Test1T
49− deriving (Show, Generic, Eq, Binary, NFData, Atomable)
58+ deriving (Show, Generic, Eq, NFData, Atomable)
59+ deriving Serialise via WineryVariant Test8T
50
60
51data User = User
61data User = User
52 { userFirstName :: Text
62 { userFirstName :: Text
53 , userLastName :: Text
63 , userLastName :: Text
54− } deriving (Eq, Ord, Show, Generic, NFData, Binary, Atomable)
64+ } deriving (Eq, Ord, Show, Generic, NFData, Atomable)
65+ deriving Serialise via WineryRecord User
55
66
56data Test9_4T = Test9_4C {
67data Test9_4T = Test9_4C {
57 f9_41 :: Int,
68 f9_41 :: Int,
58 f9_42 :: Int,
69 f9_42 :: Int,
59 f9_43 :: Int,
70 f9_43 :: Int,
60 f9_44 :: Int }
71 f9_44 :: Int }
61− deriving (Show, Generic, Eq, Binary, NFData, Atomable)
72+ deriving (Show, Generic, Eq, NFData, Atomable)
73+ deriving Serialise via WineryRecord Test9_4T
62
74
63data Test9_5T = Test9_5C {
75data Test9_5T = Test9_5C {
64 f9_51 :: Int,
76 f9_51 :: Int,
@@ -67,7 +79,8 @@ data Test9_5T = Test9_5C {
67 f9_54 :: Int,
79 f9_54 :: Int,
68 f9_55 :: Int
80 f9_55 :: Int
69 }
81 }
70− deriving (Show, Generic, Eq, Binary, NFData, Atomable)
82+ deriving (Show, Generic, Eq, NFData, Atomable)
83+ deriving Serialise via WineryRecord Test9_5T
71
84
72main :: IO ()
85main :: IO ()
73main = do
86main = do