-
Notifications
You must be signed in to change notification settings - Fork 199
Expand file tree
/
Copy pathcodeworld-api.cabal
More file actions
146 lines (133 loc) · 6.03 KB
/
codeworld-api.cabal
File metadata and controls
146 lines (133 loc) · 6.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
Name: codeworld-api
Version: 0.7.0
Synopsis: Graphics library for CodeWorld
License: Apache
License-file: LICENSE
Author: The CodeWorld Authors
Maintainer: Chris Smith <cdsmith@gmail.com>
Copyright: (c) 2020, The CodeWorld Authors
Bug-reports: https://github.com/google/codeworld/issues
Build-type: Simple
Cabal-version: >=1.10
Description:
This module provides the drawing code for CodeWorld. It is heavily inspired by
Gloss, but modified for consistency and pedagogical reasons.
.
It comes with two backends. When compiled with GHCJS, it uses the JavaScript FFI to
run on <http://code.world/>. When compiled with GHC, it uses the blank-canvas
package to provide a webpage consisting of just a panel locally. This way, the same
program that runs on the CodeWorld server can also be run locally.
Extra-source-files: data/README.md,
data/*.svg
Flag strictbuild
Description: Fail on warnings
Default: False
Manual: True
Library
Exposed: True
Hs-source-dirs: src
Exposed-modules: CodeWorld,
CodeWorld.App,
CodeWorld.App2,
CodeWorld.Image,
CodeWorld.Parameter,
CodeWorld.Reflex,
CodeWorld.Sketches
Other-modules: CodeWorld.CanvasM,
CodeWorld.CollaborationUI,
CodeWorld.Color,
CodeWorld.DrawState,
CodeWorld.Driver,
CodeWorld.EntryPoints,
CodeWorld.Event,
CodeWorld.Picture,
Util.EmbedAsUrl
Build-depends: aeson >= 1.4.3 && < 1.5,
base >= 4.11 && < 5,
base64-bytestring >= 1.0 && < 1.1,
bytestring >= 0.9 && < 0.11,
cereal >= 0.5.4 && < 0.6,
cereal-text >= 0.1.0 && < 0.2,
containers >= 0.5.7 && < 0.7,
deepseq >= 1.4 && < 1.5,
dependent-sum >= 0.4 && < 0.6.2,
ghc-prim >= 0.3.1 && < 0.8,
hashable >= 1.2.4 && < 1.4,
monad-loops >= 0.3 && < 0.5,
mtl >= 2.2.1 && < 2.3,
random >= 1.1 && < 1.2,
ref-tf >= 0.4 && < 0.5,
reflex >= 0.6.3,
template-haskell >= 2.8 && < 2.18,
text >= 1.2.2 && < 1.3,
time >= 1.8 && < 2.0,
witherable >= 0.3
if impl(ghcjs)
Js-sources: jsbits/sim_fp.js
Build-depends: ghcjs-base,
ghcjs-prim,
codeworld-game-api,
codeworld-prediction,
ghcjs-dom >= 0.9,
transformers
else
Build-depends: blank-canvas >= 0.6 && < 0.8,
time >= 1.8 && < 2.0
Ghc-options: -O2 -Wall
if flag(strictbuild)
Ghc-options: -Werror
Default-language: Haskell2010
Test-suite unit-tests
Type: exitcode-stdio-1.0
Main-is: Main.hs
Hs-source-dirs: test,
src
Other-modules: CodeWorld,
CodeWorld.CanvasM,
CodeWorld.CollaborationUI,
CodeWorld.Color,
CodeWorld.DrawState,
CodeWorld.Driver,
CodeWorld.EntryPoints,
CodeWorld.Event,
CodeWorld.Picture,
Util.EmbedAsUrl
-- Test libraries
Build-depends: HUnit,
test-framework,
test-framework-hunit
-- Copy of the build dependencies above
Build-depends: aeson >= 1.4.3 && < 1.5,
base >= 4.11 && < 5,
base64-bytestring >= 1.0 && < 1.1,
bytestring >= 0.9 && < 0.11,
cereal >= 0.5.4 && < 0.6,
cereal-text >= 0.1.0 && < 0.2,
containers >= 0.5.7 && < 0.7,
deepseq >= 1.4 && < 1.5,
dependent-sum >= 0.4 && < 0.6.2,
ghc-prim >= 0.3.1 && < 0.8,
hashable >= 1.2.4 && < 1.4,
monad-loops >= 0.3 && < 0.5,
mtl >= 2.2.1 && < 2.3,
random >= 1.1 && < 1.2,
ref-tf >= 0.4 && < 0.5,
reflex >= 0.6.3,
template-haskell >= 2.8 && < 2.18,
text >= 1.2.2 && < 1.3,
time >= 1.8 && < 2.0,
witherable >= 0.3
if impl(ghcjs)
Js-sources: jsbits/sim_fp.js
Build-depends: ghcjs-base,
ghcjs-prim,
codeworld-game-api,
codeworld-prediction,
ghcjs-dom >= 0.9,
transformers
else
Build-depends: blank-canvas >= 0.6 && < 0.8,
time >= 1.8 && < 2.0
Ghc-options: -O2
Cpp-options: -DCODEWORLD_UNIT_TEST
Default-language: Haskell2010