on master help sign in
build tutd successfully under GHC 8
commitea0a22322e7fb385930338ecba4b3a3ed16ab4f6 authorAgentM <agentm@themactionfaction.com> dateThu 8 Dec 2016, 23:20 (10 years ago) parent5af6b66
7 files changed+59−107
project-m36.cabal+26−40 src/bin/ProjectM36/Server/RemoteCallTypes/Json.hs−11 src/bin/TutorialD/tutd.hs+1 src/lib/ProjectM36/AtomFunctionBody.hs+30−21 src/lib/ProjectM36/ConcreteTypeRep.hs−34 src/lib/ProjectM36/Server/ParseArgs.hs+1 src/lib/ProjectM36/TransactionGraph/Merge.hs+1−1
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−11
@@ -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
@@ -69,16 +68,6 @@ instance FromJSON SchemaExpr
6968instance ToJSON SchemaIsomorph
7069instance FromJSON SchemaIsomorph
7170
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−
8271instance ToJSON Atom where
8372 toJSON atom@(IntAtom i) = object [ "type" .= atomTypeForAtom atom,
8473 "val" .= i ]
src/bin/TutorialD/tutd.hs+1
@@ -5,6 +5,7 @@ import ProjectM36.Client
55import System.IO
66import Options.Applicative
77import System.Exit
8+import Data.Monoid
89
910parseArgs :: Parser InterpreterConfig
1011parseArgs = LocalInterpreterConfig <$> parsePersistenceStrategy <*> parseHeadName <*> parseGhcPkgPaths <|>
src/lib/ProjectM36/AtomFunctionBody.hs+30−21
@@ -6,11 +6,12 @@ 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+import GHC.LanguageExtensions
1415import DynFlags
1516import Panic
1617import Outputable hiding ((<>))
@@ -36,7 +37,7 @@ initScriptSession ghcPkgPaths = do
3637 dflags <- getSessionDynFlags
3738 let localPkgPaths = map PkgConfFile (ghcPkgPaths ++ sandboxPkgPaths)
3839
39− let dflags' = dflags { hscTarget = HscInterpreted ,
40+ let dflags' = applyGopts . applyXopts $ dflags { hscTarget = HscInterpreted ,
4041 ghcLink = LinkInMemory,
4142 safeHaskell = Sf_Trustworthy,
4243 safeInfer = True,
@@ -45,25 +46,33 @@ initScriptSession ghcPkgPaths = do
4546 packageFlags = (packageFlags dflags) ++ packages,
4647 extraPkgConfs = const ([GlobalPkgConf, UserPkgConf] ++ localPkgPaths)
4748 }
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
49+ applyGopts flags = foldl gopt_set flags gopts
50+ applyXopts flags = foldl xopt_set flags xopts
51+#if __GLASGOW_HASKELL__ >= 800
52+ xopts = [OverloadedStrings, ExtendedDefaultRules, ImplicitPrelude, ScopedTypeVariables]
53+ gopts = [Opt_DistrustAllPackages, Opt_PackageTrust]
54+#else
55+ xopts = [Opt_OverloadedStrings, Opt_ExtendedDefaultRules, Opt_ImplicitPrelude, Opt_ScopedTypeVariables]
56+ gopts = [Opt_DistrustAllPackages, Opt_PackageTrust]
57+#endif
58+ required_packages = ["base",
59+ "containers",
60+ "unordered-containers",
61+ "hashable",
62+ "uuid",
63+ "vector",
64+ "text",
65+ "binary",
66+ "vector-binary-instances",
67+ "time",
68+ "project-m36",
69+ "bytestring"]
70+#if __GLASGOW_HASKELL__ >= 800
71+ packages = map (\m -> ExposePackage ("-package " ++ m) (PackageArg m) (ModRenaming True [])) required_packages
72+#else
73+
74+ packages = map TrustPackage required_packages
75+#endif
6776 _ <- setSessionDynFlags dflags'
6877 let safeImportDecl mn = ImportDecl {
6978 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