on master help sign in
Merge branch '25_ghc_8'
commit2097579327617cbd3d6a9895185f925ec3110b14 authorAgentM <agentm@themactionfaction.com> dateSat 7 Jan 2017, 11:37 (10 years ago) parent47e826592984b9
11 files changed+95−141
project-m36.cabal+26−40 src/bin/ProjectM36/Server/RemoteCallTypes/Json.hs−14 src/bin/TutorialD/Interpreter/RelationalExpr.hs+6−6 src/bin/TutorialD/tutd.hs+3 src/bin/benchmark/bigrel.hs+1 src/lib/ProjectM36/AtomFunctionBody.hs+40−24 src/lib/ProjectM36/ConcreteTypeRep.hs−34 src/lib/ProjectM36/Server/ParseArgs.hs+1 src/lib/ProjectM36/TransactionGraph/Merge.hs+1−1 src/persistent/Database/Persist/ProjectM36.hs+14−20 test/TutorialD/Interpreter/AtomFunctionScript.hs+3−2
project-m36.cabal+26−40
@@ -12,7 +12,7 @@ Synopsis: Relational Algebra Engine
1212Description: A relational algebra engine which can be used to persist and query Haskell data types.
1313
1414Library
15− Build-Depends: base>=4.8 && < 4.9
15+ Build-Depends: base>=4.8 && < 5.0
1616 ,ghc >= 7.8 && <= 8.0.1
1717 ,ghc-paths
1818 ,mtl
@@ -51,7 +51,7 @@ Library
5151 ,extended-reals
5252 ,network-transport
5353--required for persistent db driver
54− ,persistent >= 2.2 && < 2.3
54+ ,persistent >= 2.2 && <2.3
5555 ,persistent-template
5656 ,aeson
5757 ,path-pieces
@@ -60,12 +60,10 @@ Library
6060 ,http-api-data
6161--needed for remote access
6262 ,distributed-process-client-server
63− ,distributed-process-extras
64− ,distributed-process-async
6563 ,distributed-process
64+ ,distributed-process-extras
6665 ,network-transport-tcp
6766 ,network-transport
68− ,distributed-process
6967 ,stm-containers
7068 ,list-t
7169 ,optparse-applicative
@@ -104,7 +102,6 @@ Library
104102 ProjectM36.AtomType,
105103 ProjectM36.AtomFunctions.Basic,
106104 ProjectM36.AtomFunctions.Primitive,
107− ProjectM36.ConcreteTypeRep,
108105 ProjectM36.DataConstructorDef,
109106 ProjectM36.DataTypes.Basic,
110107 ProjectM36.DataTypes.Day,
@@ -124,7 +121,7 @@ Library
124121 ProjectM36.Transaction.Persist,
125122 ProjectM36.TypeConstructor,
126123 ProjectM36.TypeConstructorDef
127− GHC-Options: -Wall -rtsopts
124+ GHC-Options: -Wall
128125 if os(windows)
129126 Build-Depends: Win32 >= 2.3 && < 2.4
130127 Other-Modules: ProjectM36.Win32Handle
@@ -134,10 +131,13 @@ Library
134131 CC-Options: -fPIC
135132 Hs-Source-Dirs: ./src/lib
136133 Default-Language: Haskell2010
137− Default-Extensions: OverloadedStrings
134+ Default-Extensions: OverloadedStrings, CPP
135+ if impl(ghc>= 8)
136+ build-depends:
137+ ghc-boot
138138
139139Executable tutd
140− Build-Depends: base >=4.8 && <4.9,
140+ Build-Depends: base >=4.8 && <5.0,
141141 ghc >= 7.8 && <= 8.0.1,
142142 ghc-paths,
143143 project-m36 == 0.1,
@@ -155,13 +155,6 @@ Executable tutd
155155 time,
156156 hashable-time,
157157 bytestring,
158− distributed-process-client-server,
159− distributed-process-extras,
160− distributed-process-async,
161− distributed-process,
162− network-transport-tcp,
163− network-transport,
164− distributed-process,
165158 stm,
166159 deepseq,
167160 binary,
@@ -217,13 +210,6 @@ Executable project-m36-server
217210 ghc >= 7.8 && <= 8.0.1,
218211 ghc-paths,
219212 project-m36 == 0.1,
220− distributed-process-client-server,
221− distributed-process-extras,
222− distributed-process-async,
223− distributed-process,
224− network-transport-tcp,
225− network-transport,
226− distributed-process,
227213 binary,
228214 transformers,
229215 temporary,
@@ -260,7 +246,7 @@ Executable project-m36-server
260246Executable bigrel
261247 Default-Language: Haskell2010
262248 Default-Extensions: OverloadedStrings
263− 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, megaparsec, text, base64-bytestring, data-interval, filepath, optparse-applicative, stm-containers, list-t, ghc, ghc-paths, transformers, project-m36 == 0.1, MonadRandom
249+ 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 == 0.1, MonadRandom
264250 Other-Modules: TutorialD.Interpreter.Base,
265251 TutorialD.Interpreter.DatabaseContextExpr,
266252 TutorialD.Interpreter.RelationalExpr,
@@ -276,7 +262,7 @@ Test-Suite test-tutoriald
276262 Default-Extensions: OverloadedStrings
277263 type: exitcode-stdio-1.0
278264 main-is: test/TutorialD/Interpreter.hs
279− 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, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, list-t, project-m36 == 0.1, MonadRandom
265+ 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 == 0.1, MonadRandom
280266 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
281267 GHC-Options: -Wall
282268 Hs-Source-Dirs: ./src/bin, ., test
@@ -298,7 +284,7 @@ Test-Suite test-relation
298284 Default-Extensions: OverloadedStrings
299285 type: exitcode-stdio-1.0
300286 main-is: test/Relation/Basic.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, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36 == 0.1
287+ 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 == 0.1
302288 GHC-Options: -Wall
303289
304290Test-Suite test-static-optimizer
@@ -306,7 +292,7 @@ Test-Suite test-static-optimizer
306292 Default-Extensions: OverloadedStrings
307293 type: exitcode-stdio-1.0
308294 main-is: test/Relation/StaticOptimizer.hs
309− 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, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36 == 0.1
295+ 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 == 0.1
310296 GHC-Options: -Wall
311297 CPP-Options: -DPROJECTM36_VERSION="v0.1"
312298
@@ -315,7 +301,7 @@ Test-Suite test-transactiongraph-persist
315301 Default-Extensions: OverloadedStrings
316302 type: exitcode-stdio-1.0
317303 main-is: test/TransactionGraph/Persist.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, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36 == 0.1, MonadRandom
304+ 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 == 0.1, MonadRandom
319305 Other-Modules: TutorialD.Interpreter.Base, TutorialD.Interpreter.RelationalExpr, TutorialD.Interpreter.Types, TutorialD.Interpreter.DatabaseContextExpr, TutorialD.Interpreter.Import.BasicExamples
320306 Hs-Source-Dirs: ., ./src/bin
321307 GHC-Options: -Wall
@@ -325,7 +311,7 @@ Test-Suite test-relation-import-csv
325311 Default-Extensions: OverloadedStrings
326312 type: exitcode-stdio-1.0
327313 main-is: test/Relation/Import/CSV.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, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36 == 0.1
314+ 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 == 0.1
329315 GHC-Options: -Wall
330316 CPP-Options: -DPROJECTM36_VERSION="v0.1"
331317
@@ -334,7 +320,7 @@ Test-Suite test-tutoriald-import-tutoriald
334320 Default-Extensions: OverloadedStrings
335321 type: exitcode-stdio-1.0
336322 main-is: test/TutorialD/Interpreter/Import/TutorialD.hs
337− 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, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36 == 0.1, MonadRandom
323+ 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 == 0.1, MonadRandom
338324 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
339325 GHC-Options: -Wall
340326 Hs-Source-Dirs: ., ./src/bin
@@ -344,7 +330,7 @@ Test-Suite test-relation-export-csv
344330 Default-Extensions: OverloadedStrings
345331 type: exitcode-stdio-1.0
346332 main-is: test/Relation/Export/CSV.hs
347− 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, megaparsec, text, base64-bytestring, data-interval, filepath, stm-containers, project-m36 == 0.1
333+ 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 == 0.1
348334 GHC-Options: -Wall
349335
350336Test-Suite test-persistent-driver
@@ -353,7 +339,7 @@ Test-Suite test-persistent-driver
353339 type: exitcode-stdio-1.0
354340 main-is: test/persistent-driver/test.hs
355341 Other-Modules: Database.Persist.ProjectM36
356− 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, megaparsec, 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
342+ 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, persistent-template, conduit, persistent, either, path-pieces, http-api-data, stm-containers, list-t, project-m36 == 0.1
357343 Hs-Source-Dirs: ., src/persistent
358344 GHC-Options: -Wall
359345
@@ -362,7 +348,7 @@ Test-Suite test-transactiongraph-merge
362348 Default-Extensions: OverloadedStrings
363349 type: exitcode-stdio-1.0
364350 main-is: test/TransactionGraph/Merge.hs
365− 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, megaparsec, 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
351+ 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, persistent-template, conduit, persistent, either, path-pieces, http-api-data, stm-containers, list-t, project-m36 == 0.1
366352 GHC-Options: -Wall
367353
368354benchmark bench
@@ -370,7 +356,7 @@ benchmark bench
370356 Default-Extensions: OverloadedStrings
371357 type: exitcode-stdio-1.0
372358 main-is: benchmark/Relation.hs
373− 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, megaparsec, text, base64-bytestring, data-interval, filepath, criterion, stm-containers, project-m36 == 0.1
359+ 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 == 0.1
374360 GHC-Options: -Wall -rtsopts
375361 Hs-Source-Dirs: ./src/bin
376362
@@ -379,21 +365,21 @@ Test-Suite test-server
379365 Default-Extensions: OverloadedStrings
380366 type: exitcode-stdio-1.0
381367 main-is: test/Server/Main.hs
382− 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, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, project-m36 == 0.1
368+ 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 == 0.1
383369 HS-Source-Dirs: ., ./src/bin
384370 GHC-Options: -Wall
385371
386372Executable Example-SimpleClient
387373 Default-Language: Haskell2010
388374 Default-Extensions: OverloadedStrings
389− 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, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, ghc, ghc-paths, project-m36 == 0.1, MonadRandom
375+ 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 == 0.1, MonadRandom
390376 Main-Is: examples/SimpleClient.hs
391377 GHC-Options: -Wall
392378
393379Executable Example-PersistClient
394380 Default-Language: Haskell2010
395381 Default-Extensions: OverloadedStrings
396− 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, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, persistent, aeson, path-pieces, either, conduit, http-api-data, template-haskell, persistent-template, ghc, ghc-paths, project-m36 == 0.1
382+ 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, persistent, aeson, path-pieces, either, conduit, http-api-data, template-haskell, persistent-template, ghc, ghc-paths, project-m36 == 0.1
397383 Main-Is: examples/PersistClient.hs
398384 GHC-Options: -Wall
399385 CPP-Options: -DPROJECTM36_VERSION="v0.1"
@@ -405,7 +391,7 @@ Test-Suite test-scripts
405391 Default-Extensions: OverloadedStrings
406392 type: exitcode-stdio-1.0
407393 main-is: test/scripts.hs
408− 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, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, project-m36 == 0.1, MonadRandom
394+ 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 == 0.1, MonadRandom
409395 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
410396 GHC-Options: -Wall
411397 Hs-Source-Dirs: ., ./src/bin
@@ -424,7 +410,7 @@ Test-Suite test-websocket-server
424410 Default-Language: Haskell2010
425411 type: exitcode-stdio-1.0
426412 main-is: test/Server/WebSocket.hs
427− 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, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, uuid-aeson, project-m36 == 0.1, MonadRandom
413+ 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, uuid-aeson, project-m36 == 0.1, MonadRandom
428414 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
429415 Default-Extensions: OverloadedStrings
430416 GHC-Options: -Wall
@@ -435,7 +421,7 @@ Test-Suite test-isomorphic-schemas
435421 Default-Language: Haskell2010
436422 type: exitcode-stdio-1.0
437423 main-is: test/IsomorphicSchema.hs
438− 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, megaparsec, text, base64-bytestring, data-interval, filepath, transformers, stm-containers, list-t, websockets, optparse-applicative, network, aeson, uuid-aeson, project-m36 == 0.1
424+ 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, uuid-aeson, project-m36 == 0.1
439425 Default-Extensions: OverloadedStrings
440426 GHC-Options: -Wall
441427 Hs-Source-Dirs: ./src/bin, .
src/bin/ProjectM36/Server/RemoteCallTypes/Json.hs−14
@@ -4,7 +4,6 @@
44module ProjectM36.Server.RemoteCallTypes.Json where
55import ProjectM36.Server.RemoteCallTypes
66import ProjectM36.Base
7−import ProjectM36.ConcreteTypeRep
87import ProjectM36.Error
98import ProjectM36.DataTypes.Primitive
109import ProjectM36.IsomorphicSchema
@@ -60,25 +59,12 @@ instance FromJSON TypeConstructor
6059instance ToJSON TypeConstructorArg
6160instance FromJSON TypeConstructorArg
6261
63−instance ToJSON SerialRep
64−instance FromJSON SerialRep
65−
6662instance ToJSON SchemaExpr
6763instance FromJSON SchemaExpr
6864
6965instance ToJSON SchemaIsomorph
7066instance FromJSON SchemaIsomorph
7167
72−instance FromJSON ConcreteTypeRep where
73− parseJSON = withObject "ctr" $ \o -> do
74− serialRep <- o .: "serialrep"
75− pure $ fromSerial serialRep
76−
77−instance ToJSON ConcreteTypeRep where
78− toJSON ctr = object [
79− "serialrep" .= toSerial ctr
80− ]
81−
8268instance ToJSON Atom where
8369 toJSON atom@(IntAtom i) = object [ "type" .= atomTypeForAtom atom,
8470 "val" .= i ]
src/bin/TutorialD/Interpreter/RelationalExpr.hs+6−6
@@ -65,7 +65,7 @@ tupleAtomExprP = do
6565 atomExpr <- atomExprP
6666 pure $ (attributeName, atomExpr)
6767
68−projectP :: RelationalMarkerExpr a => Parser (RelationalExprBase a -> RelationalExprBase a)
68+projectP :: Parser (RelationalExprBase a -> RelationalExprBase a)
6969projectP = do
7070 attrs <- braces attributeListP
7171 pure $ Project attrs
@@ -77,7 +77,7 @@ renameClauseP = do
7777 newAttr <- identifier
7878 pure $ (oldAttr, newAttr)
7979
80−renameP :: RelationalMarkerExpr a => Parser (RelationalExprBase a -> RelationalExprBase a)
80+renameP :: Parser (RelationalExprBase a -> RelationalExprBase a)
8181renameP = do
8282 reservedOp "rename"
8383 renameList <- braces (sepBy renameClauseP comma)
@@ -96,14 +96,14 @@ groupClauseP = do
9696 newAttrName <- identifier
9797 return $ (attrs, newAttrName)
9898
99−groupP :: RelationalMarkerExpr a => Parser (RelationalExprBase a -> RelationalExprBase a)
99+groupP :: Parser (RelationalExprBase a -> RelationalExprBase a)
100100groupP = do
101101 reservedOp "group"
102102 (groupAttrList, groupAttrName) <- parens groupClauseP
103103 pure $ Group groupAttrList groupAttrName
104104
105105--in "Time and Relational Theory" (2014), Date's Tutorial D grammar for ungroup takes one attribute, while in previous books, it take multiple arguments. Let us assume that nested ungroups are the same as multiple attributes.
106−ungroupP :: RelationalMarkerExpr a => Parser (RelationalExprBase a -> RelationalExprBase a)
106+ungroupP :: Parser (RelationalExprBase a -> RelationalExprBase a)
107107ungroupP = do
108108 reservedOp "ungroup"
109109 rvaAttrName <- identifier
@@ -195,13 +195,13 @@ consumeAtomExprP consume = try functionAtomExprP <|>
195195 nakedAtomExprP <|>
196196 relationalAtomExprP
197197
198−attributeAtomExprP :: RelationalMarkerExpr a => Parser (AtomExprBase a)
198+attributeAtomExprP :: Parser (AtomExprBase a)
199199attributeAtomExprP = do
200200 _ <- string "@"
201201 attrName <- identifier
202202 return $ AttributeAtomExpr attrName
203203
204−nakedAtomExprP :: RelationalMarkerExpr a => Parser (AtomExprBase a)
204+nakedAtomExprP :: Parser (AtomExprBase a)
205205nakedAtomExprP = NakedAtomExpr <$> atomP
206206
207207constructedAtomExprP :: RelationalMarkerExpr a => Bool -> Parser (AtomExprBase a)
src/bin/TutorialD/tutd.hs+3
@@ -5,6 +5,9 @@ import ProjectM36.Client
55import System.IO
66import Options.Applicative
77import System.Exit
8+#if __GLASGOW_HASKELL__ >= 800
9+import Data.Monoid
10+#endif
811
912parseArgs :: Parser InterpreterConfig
1013parseArgs = LocalInterpreterConfig <$> parsePersistenceStrategy <*> parseHeadName <*> parseGhcPkgPaths <|>
src/bin/benchmark/bigrel.hs+1
@@ -22,6 +22,7 @@ import System.IO
2222import Control.Monad.State
2323import Control.DeepSeq
2424import Data.Text hiding (map)
25+import Data.Monoid
2526
2627dumpcsv :: Relation -> IO ()
2728dumpcsv rel = case relationAsCSV rel of
src/lib/ProjectM36/AtomFunctionBody.hs+40−24
@@ -6,17 +6,21 @@ import ProjectM36.Error
66
77import Control.Monad.IO.Class
88import Control.Exception
9−import Data.Text hiding (map)
9+import Data.Text hiding (map, foldl)
1010
1111import Unsafe.Coerce
1212import GHC
1313import GHC.Paths (libdir)
14+#if __GLASGOW_HASKELL__ >= 800
15+import GHC.LanguageExtensions
16+#endif
1417import DynFlags
1518import Panic
16−import Outputable hiding ((<>))
19+import Outputable --hiding ((<>))
1720import PprTyThing
1821import Type hiding (pprTyThing)
1922import System.FilePath.Glob
23+import Debug.Trace
2024
2125data ScriptSession = ScriptSession {
2226 hscEnv :: HscEnv,
@@ -36,34 +40,46 @@ initScriptSession ghcPkgPaths = do
3640 dflags <- getSessionDynFlags
3741 let localPkgPaths = map PkgConfFile (ghcPkgPaths ++ sandboxPkgPaths)
3842
39− let dflags' = dflags { hscTarget = HscInterpreted ,
43+ let dflags' = applyGopts . applyXopts $ dflags { hscTarget = HscInterpreted ,
4044 ghcLink = LinkInMemory,
4145 safeHaskell = Sf_Trustworthy,
4246 safeInfer = True,
4347 safeInferred = True,
44− --trustFlags = [TrustPackage "base"] -- new in 8
48+ --verbosity = 3,
49+#if __GLASGOW_HASKELL__ >= 800
50+ trustFlags = map TrustPackage required_packages,
51+#endif
4552 packageFlags = (packageFlags dflags) ++ packages,
46− extraPkgConfs = const ([GlobalPkgConf, UserPkgConf] ++ localPkgPaths)
53+ extraPkgConfs = const (localPkgPaths ++ [UserPkgConf, GlobalPkgConf])
4754 }
48− `xopt_set` Opt_ExtendedDefaultRules
49− `xopt_set` Opt_ImplicitPrelude
50− `xopt_set` Opt_OverloadedStrings
51− `gopt_set` Opt_DistrustAllPackages
52− `xopt_set` Opt_ScopedTypeVariables
53− `gopt_set` Opt_PackageTrust
54− --`gopt_set` Opt_ImplicitImportQualified
55− packages = map TrustPackage ["base",
56− "containers",
57− "unordered-containers",
58− "hashable",
59− "uuid",
60− "vector",
61− "text",
62− "binary",
63− "vector-binary-instances",
64− "time",
65− "project-m36",
66− "bytestring"] -- package flags changed in 8.0
55+ applyGopts flags = foldl gopt_set flags gopts
56+ applyXopts flags = foldl xopt_set flags xopts
57+#if __GLASGOW_HASKELL__ >= 800
58+ xopts = [OverloadedStrings, ExtendedDefaultRules, ImplicitPrelude, ScopedTypeVariables]
59+#else
60+ xopts = [Opt_OverloadedStrings, Opt_ExtendedDefaultRules, Opt_ImplicitPrelude, Opt_ScopedTypeVariables]
61+#endif
62+ gopts = [] --[Opt_DistrustAllPackages, Opt_PackageTrust]
63+ required_packages = ["base",
64+ "containers",
65+ "Glob",
66+ "directory",
67+ "unordered-containers",
68+ "hashable",
69+ "uuid",
70+ "vector",
71+ "text",
72+ "binary",
73+ "vector-binary-instances",
74+ "time",
75+ "project-m36",
76+ "bytestring"]
77+#if __GLASGOW_HASKELL__ >= 800
78+ packages = map (\m -> ExposePackage ("-package " ++ m) (PackageArg m) (ModRenaming True [])) required_packages
79+#else
80+ packages = map TrustPackage required_packages
81+#endif
82+ --liftIO $ traceShowM (showSDoc dflags' (ppr packages))
6783 _ <- setSessionDynFlags dflags'
6884 let safeImportDecl mn = ImportDecl {
6985 ideclSourceSrc = Nothing,
src/lib/ProjectM36/ConcreteTypeRep.hsdeleted−34
@@ -1,34 +0,0 @@
1−{-# LANGUAGE GeneralizedNewtypeDeriving, DeriveGeneric #-}
2−-- adapted from https://hackage.haskell.org/package/concrete-typerep
3−module ProjectM36.ConcreteTypeRep where
4−import Data.Binary
5−import Data.Typeable
6−import Data.Typeable.Internal
7−import Control.DeepSeq (NFData)
8−import GHC.Generics
9−
10−newtype ConcreteTypeRep = CTR { unCTR :: TypeRep } deriving (Eq, Typeable, NFData)
11−
12−newtype SerialRep = SR (TyConRep, [SerialRep]) deriving (Binary, Generic)
13−
14−instance Show ConcreteTypeRep where
15− show (CTR tRep) = show tRep
16−
17−type TyConRep = (String, String, String)
18−toTyConRep :: TyCon -> TyConRep
19−toTyConRep (TyCon _ pack modul name) = (pack, modul, name)
20−
21−fromTyConRep :: TyConRep -> TyCon
22−fromTyConRep (pack, modul, name) = mkTyCon3 pack modul name
23−
24−toSerial :: ConcreteTypeRep -> SerialRep
25−toSerial (CTR t) = case splitTyConApp t of
26− (con, args) -> SR (toTyConRep con, map (toSerial . CTR) args)
27−
28−fromSerial :: SerialRep -> ConcreteTypeRep
29−fromSerial (SR (con, args)) = CTR $ mkTyConApp (fromTyConRep con) (map (unCTR . fromSerial) args)
30−
31−instance Binary ConcreteTypeRep where
32− put = put . toSerial
33− get = fromSerial <$> get
34−
src/lib/ProjectM36/Server/ParseArgs.hs+1
@@ -3,6 +3,7 @@ import ProjectM36.Base
33import ProjectM36.Client
44import Options.Applicative
55import ProjectM36.Server.Config
6+import Data.Monoid
67
78parseArgs :: Parser ServerConfig
89parseArgs = ServerConfig <$> parsePersistenceStrategy <*> parseDatabaseName <*> parseHostname <*> parsePort <*> many parseGhcPkgPaths
src/lib/ProjectM36/TransactionGraph/Merge.hs+1−1
@@ -12,7 +12,7 @@ import qualified Data.HashSet as HS
1212data MergePreference = PreferFirst | PreferSecond | PreferNeither
1313
1414-- Check for overlapping keys. If the values differ, try a preference resolution
15−unionMergeMaps :: (Ord k, Eq k, Eq a) => MergePreference -> M.Map k a -> M.Map k a -> Either MergeError (M.Map k a)
15+unionMergeMaps :: (Ord k, Eq a) => MergePreference -> M.Map k a -> M.Map k a -> Either MergeError (M.Map k a)
1616unionMergeMaps prefer mapA mapB = case prefer of
1717 PreferFirst -> pure $ M.union mapA mapB
1818 PreferSecond -> pure $ M.union mapB mapA
src/persistent/Database/Persist/ProjectM36.hs+14−20
@@ -36,7 +36,7 @@ import Web.HttpApiData (ToHttpApiData(..), FromHttpApiData(..), parseUrlPieceWit
3636type ProjectM36Backend = (C.SessionId, C.Connection)
3737
3838--convert a PersistEntity to a RelationTuple
39−recordAsTuple :: forall record. (PersistEntity record, PersistEntityBackend record ~ ProjectM36Backend)
39+recordAsTuple :: forall record. (PersistEntity record)
4040 => Maybe U.UUID -> record -> Either RelationalError RelationTuple
4141recordAsTuple uuid record = do -- if the uuid is passed in, set the idDBName attribute
4242 let entInfo = zip entFields entValues
@@ -46,7 +46,7 @@ recordAsTuple uuid record = do -- if the uuid is passed in, set the idDBName att
4646 atomVec <- recordAsAtoms uuid attrVec record
4747 return $ RelationTuple attrVec atomVec
4848
49−recordAttributes :: forall record. (PersistEntity record, PersistEntityBackend record ~ ProjectM36Backend)
49+recordAttributes :: forall record. (PersistEntity record)
5050 => [(EmbedFieldDef, PersistValue)] -> record -> Either RelationalError Attributes
5151recordAttributes entInfo record = do
5252 let convertAttr = uncurry fieldDefAsAttribute
@@ -86,7 +86,7 @@ atomAsPersistValue (ByteStringAtom i) = PersistByteString i
8686atomAsPersistValue (BoolAtom i) = PersistBool i
8787atomAsPersistValue _ = error "Persist: missing conversion"
8888
89−recordAsAtoms :: forall record. (PersistEntity record, PersistEntityBackend record ~ ProjectM36Backend)
89+recordAsAtoms :: forall record. (PersistEntity record)
9090 => Maybe U.UUID -> Attributes -> record -> Either RelationalError (V.Vector Atom)
9191recordAsAtoms freshUUID _ record = do
9292 let pValues = map toPersistValue $ toPersistFields record
@@ -99,7 +99,7 @@ recordAsAtoms freshUUID _ record = do
9999 Just uuid -> [TextAtom $ T.pack (U.toString uuid)] ++ atoms
100100
101101--used by insert operations
102−recordsAsRelation :: forall record. (PersistEntity record, PersistEntityBackend record ~ ProjectM36Backend) =>
102+recordsAsRelation :: forall record. (PersistEntity record) =>
103103 [(Maybe U.UUID, record)] -> Either RelationalError Relation
104104recordsAsRelation [] = Left EmptyTuplesError
105105recordsAsRelation recordZips = do
@@ -108,16 +108,13 @@ recordsAsRelation recordZips = do
108108 mkRelation (tupleAttributes oneTuple) (RelationTupleSet tupleList)
109109
110110keyFromValuesOrDie :: (Trans.MonadIO m,
111− PersistEntity record,
112− PersistEntityBackend record ~ ProjectM36Backend
113− ) => [PersistValue] -> m (Key record)
111+ PersistEntity record) => [PersistValue] -> m (Key record)
114112keyFromValuesOrDie val = case keyFromValues val of
115113 Right k -> return k
116114 Left _ -> Trans.liftIO $ throwIO $ PersistError "key pooped"
117115
118116insertNewRecords :: (Trans.MonadIO m,
119− PersistEntity record,
120− PersistEntityBackend record ~ ProjectM36Backend) =>
117+ PersistEntity record) =>
121118 [U.UUID] -> [record] -> ReaderT ProjectM36Backend m [Key record]
122119insertNewRecords uuids records = do
123120 let recordsZip = zip (map Just uuids) records
@@ -134,8 +131,7 @@ throwIOPersistError msg = Trans.liftIO $ throwIO $ PersistError (T.pack msg)
134131
135132lookupByKey :: forall record m.
136133 (Trans.MonadIO m,
137− PersistEntity record,
138− PersistEntityBackend record ~ ProjectM36Backend)
134+ PersistEntity record)
139135 => Key record -> ReaderT ProjectM36Backend m (Maybe (Entity record))
140136lookupByKey key = do
141137 (relVarName, restrictionPredicate) <- commonKeyQueryProperties key
@@ -152,8 +148,7 @@ lookupByKey key = do
152148 return $ Just entity
153149
154150fromPersistValuesThrow :: (Trans.MonadIO m,
155− PersistEntity record,
156− PersistEntityBackend record ~ ProjectM36Backend) => EntityDef -> RelationTuple -> m (Entity record)
151+ PersistEntity record) => EntityDef -> RelationTuple -> m (Entity record)
157152fromPersistValuesThrow entDef tuple = do
158153 let body = fromPersistValues $ map getValue (entityFields entDef)
159154 getValue field = case atomForAttributeName (unDBName (fieldDB field)) tuple of
@@ -168,7 +163,7 @@ fromPersistValuesThrow entDef tuple = do
168163 Left err -> throwIOPersistError (show err)
169164 Right body' -> return $ Entity key body'
170165
171−commonKeyQueryProperties :: (Trans.MonadIO m, PersistEntityBackend val ~ ProjectM36Backend, PersistEntity val) => Key val -> ReaderT ProjectM36Backend m (RelVarName, RestrictionPredicateExpr)
166+commonKeyQueryProperties :: (Trans.MonadIO m, PersistEntity val) => Key val -> ReaderT ProjectM36Backend m (RelVarName, RestrictionPredicateExpr)
172167commonKeyQueryProperties key = do
173168 let matchUUID = keyToUUID key
174169 keyAttributeName = unDBName (fieldDB $ entityId entityInfo)
@@ -178,7 +173,7 @@ commonKeyQueryProperties key = do
178173 restrictionPredicate = AttributeEqualityPredicate keyAttributeName (NakedAtomExpr (TextAtom matchUUIDText))
179174 return (relVarName, restrictionPredicate)
180175
181−deleteByKey :: (Trans.MonadIO m, PersistEntityBackend val ~ ProjectM36Backend, PersistEntity val) => Key val -> ReaderT ProjectM36Backend m (Bool)
176+deleteByKey :: (Trans.MonadIO m, PersistEntity val) => Key val -> ReaderT ProjectM36Backend m (Bool)
182177deleteByKey key = do
183178 (relVarName, restrictionPredicate) <- commonKeyQueryProperties key
184179 let query = Delete relVarName restrictionPredicate
@@ -188,7 +183,6 @@ deleteByKey key = do
188183
189184--convert persistent update list to ProjectM36 Update map
190185updatesToUpdateMap :: (Trans.MonadIO m,
191− PersistEntityBackend val ~ ProjectM36Backend,
192186 PersistEntity val) =>
193187 [DP.Update val] -> ReaderT ProjectM36Backend m (M.Map AttributeName AtomExpr)
194188updatesToUpdateMap updates = do
@@ -202,7 +196,7 @@ updatesToUpdateMap updates = do
202196 updateAtomList <- mapM convertMap updates
203197 return $ M.fromList updateAtomList
204198
205−updateByKey :: (Trans.MonadIO m, PersistEntityBackend val ~ ProjectM36Backend, PersistEntity val) => Key val -> [DP.Update val] -> ReaderT ProjectM36Backend m ()
199+updateByKey :: (Trans.MonadIO m, PersistEntity val) => Key val -> [DP.Update val] -> ReaderT ProjectM36Backend m ()
206200updateByKey key updates = do
207201 (relVarName, restrictionPredicate) <- commonKeyQueryProperties key
208202 updateMap <- updatesToUpdateMap updates
@@ -316,7 +310,7 @@ executeDatabaseContextExpr sessionId conn expr = do
316310 Nothing -> return ()
317311 Just err -> throwIO (PersistError $ T.pack (show err))
318312
319−relVarNameFromRecord :: (PersistEntity record, PersistEntityBackend record ~ ProjectM36Backend)
313+relVarNameFromRecord :: (PersistEntity record)
320314 => record -> RelVarName
321315relVarNameFromRecord = unDBName . entityDB . entityDef . Just
322316
@@ -361,12 +355,12 @@ instance PersistConfig C.ConnectionInfo where
361355 --runPool :: (MonadBaseControl IO m, MonadIO m) => c -> PersistConfigBackend c m a -> PersistConfigPool c -> m a
362356 runPool _ r = runReaderT r
363357
364−withProjectM36Conn :: (Monad m, Trans.MonadIO m) => C.ConnectionInfo -> (ProjectM36Backend -> m a) -> m a
358+withProjectM36Conn :: (Trans.MonadIO m) => C.ConnectionInfo -> (ProjectM36Backend -> m a) -> m a
365359withProjectM36Conn conf connReader = do
366360 backend <- Trans.liftIO $ createPoolConfig conf
367361 connReader backend
368362
369−runProjectM36Conn :: (Trans.MonadIO m) => ReaderT ProjectM36Backend m a -> (C.SessionId, C.Connection) -> m a
363+runProjectM36Conn :: ReaderT ProjectM36Backend m a -> (C.SessionId, C.Connection) -> m a
370364runProjectM36Conn m1 (sessionId, conn) = runReaderT m1 (sessionId, conn)
371365
372366instance PathPiece (BackendKey ProjectM36Backend) where
test/TutorialD/Interpreter/AtomFunctionScript.hs+3−2
@@ -37,9 +37,10 @@ testErrorAtomFunction = TestCase $ do
3737 let attrs = [Attribute "x" IntAtomType]
3838 funcAtomExpr = FunctionAtomExpr "mkTest" [NakedAtomExpr (IntAtom 3)] ()
3939 tupleExprs = [TupleExpr (M.singleton "x" funcAtomExpr)]
40− expectedResult = Left (UnhandledExceptionError "1")
4140 result <- executeRelationalExpr sess conn (MakeRelationFromExprs (Just (map NakedAttributeExpr attrs)) tupleExprs)
42− assertEqual "catch error exception from script" expectedResult result
41+ assertBool "catch error exception from script" (case result of
42+ Left (UnhandledExceptionError _) -> True
43+ _ -> False)
4344
4445testNoArgumentAtomFunction :: Test
4546testNoArgumentAtomFunction = TestCase $ do