Repository navigation
Expand file tree
/
Copy pathhatter.cabal
More file actions
260 lines (240 loc) · 6.25 KB
/
Copy pathhatter.cabal
File metadata and controls
260 lines (240 loc) · 6.25 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
cabal-version: 3.0
name: hatter
version: 0.3.0
category: Mobile
homepage: https://github.com/jappeace/hatter#readme
bug-reports: https://github.com/jappeace/hatter/issues
author: Jappie Klooster
maintainer: hi@jappie.me
synopsis: Native IOS and Android applications in haskell!
description:
It's like flutter but instead of dart, haskell!
Write native mobile apps in Haskell.
This works similar to react native where we have
tight bindings on the existing UI frameworks
provided by android and IOS.
This project cross-compiles a Haskell library to Android (APK) and iOS (static library / IPA),
with a thin platform-native UI layer (Kotlin for Android, Swift for iOS).
There is support for android wear and wearOS as well,
because I personally want to build apps for those.
IOS and Android support was just a side effect.
The library fully controls the UI.
This is different from say Simplex chat where they call into the library to do Haskell from dirty java/swift code.
This library should've written all swift/java code you'll ever need,
so you can focus on your sweet Haskell.
NB: I uploaded this to hackage for the nice documentation, but I don't think this builds
with just cabal. You want to use the nix harness.
Although I'd like to get cabal to build stuff like this eventually,
that's a really big undertaking.
copyright: 2026 Jappie Klooster
license: MIT
license-file: LICENSE
build-type: Simple
extra-source-files:
Readme.md
LICENSE
cbits/*.c
include/*.h
extra-doc-files:
Changelog.md
hatter.png
source-repository head
type: git
location: https://github.com/jappeace/hatter
common common-options
default-extensions:
EmptyCase
FlexibleContexts
FlexibleInstances
InstanceSigs
MultiParamTypeClasses
LambdaCase
MultiWayIf
NamedFieldPuns
TupleSections
DeriveFoldable
DeriveFunctor
DeriveGeneric
DeriveLift
DeriveTraversable
DerivingStrategies
GeneralizedNewtypeDeriving
StandaloneDeriving
OverloadedStrings
TypeApplications
NumericUnderscores
ImportQualifiedPost
ghc-options:
-O2 -Wall -split-sections -Wincomplete-uni-patterns
-Wincomplete-record-updates -Widentities -Wredundant-constraints
-Wcpp-undef -fwarn-tabs -Wpartial-fields
-Werror=missing-fields
-fdefer-diagnostics -Wunused-packages
-fenable-th-splice-warnings
-fno-omit-yields
build-depends:
base >=4.9.1.0 && <4.23
default-language: Haskell2010
library
import: common-options
exposed-modules:
Hatter
Hatter.Action
Hatter.Animation
Hatter.AppContext
Hatter.Types
Hatter.Lifecycle
Hatter.Widget
Hatter.UIBridge
Hatter.Render
Hatter.Locale
Hatter.I18n
Hatter.Permission
Hatter.SecureStorage
Hatter.Ble
Hatter.BleAdvertisement
Hatter.Dialog
Hatter.Location
Hatter.AuthSession
Hatter.PlatformSignIn
Hatter.Camera
Hatter.BottomSheet
Hatter.Http
Hatter.NetworkStatus
Hatter.FilesDir
Hatter.DeviceInfo
hs-source-dirs:
src
build-depends:
text < 3,
containers < 1,
bytestring < 1,
transformers < 0.7,
time,
unwitch >= 3.0.0 && < 4,
uuid-types >= 1.0.4 && < 2
c-sources:
cbits/android_stubs.c
cbits/platform_log.c
cbits/ui_bridge.c
cbits/locale.c
cbits/permission_bridge.c
cbits/secure_storage_bridge.c
cbits/ble_bridge.c
cbits/dialog_bridge.c
cbits/location_bridge.c
cbits/auth_session_bridge.c
cbits/platform_sign_in_bridge.c
cbits/camera_bridge.c
cbits/bottom_sheet_bridge.c
cbits/http_bridge.c
cbits/network_status_bridge.c
cbits/animation_bridge.c
cbits/redraw_bridge.c
cbits/files_dir.c
cbits/device_info.c
include-dirs:
include
executable scrollview-switch-demo
import: common-options
main-is: ScrollViewSwitchDemoMain.hs
ghc-options: -Wno-unused-packages -threaded
hs-source-dirs:
test
build-depends:
hatter,
text
executable styled-type-change-demo
import: common-options
main-is: StyledTypeChangeDemoMain.hs
ghc-options: -Wno-unused-packages -threaded
hs-source-dirs:
test
build-depends:
hatter,
text
executable stack-demo
import: common-options
main-is: StackDemoMain.hs
ghc-options: -Wno-unused-packages -threaded
hs-source-dirs:
test
build-depends:
hatter,
text
executable horizontal-scroll-demo
import: common-options
main-is: HorizontalScrollDemoMain.hs
ghc-options: -Wno-unused-packages -threaded
hs-source-dirs:
test
build-depends:
hatter,
text
executable redraw-demo
import: common-options
main-is: RedrawDemoMain.hs
ghc-options: -Wno-unused-packages -threaded
hs-source-dirs:
test
build-depends:
hatter,
text,
unwitch >= 3.0.0 && < 4
executable confetti-repro-demo
import: common-options
main-is: ConfettiRepDemoMain.hs
ghc-options: -Wno-unused-packages -threaded
hs-source-dirs:
test
build-depends:
hatter,
text
executable device-info-demo
import: common-options
main-is: DeviceInfoDemoMain.hs
ghc-options: -Wno-unused-packages -threaded
hs-source-dirs:
test
build-depends:
hatter,
text
executable keyframe-demo
import: common-options
main-is: KeyframeDemoMain.hs
ghc-options: -Wno-unused-packages -threaded
hs-source-dirs:
test
build-depends:
hatter,
text,
time
test-suite unit
import: common-options
type: exitcode-stdio-1.0
main-is: Test.hs
other-modules:
Test.Helpers
Test.CoreTests
Test.WidgetTests
Test.PlatformTests
Test.AppContextTests
Test.ActionTests
Test.AnimationTests
Test.FilesDirTests
Test.DeviceInfoTests
ghc-options: -Wno-unused-packages -threaded -rtsopts "-with-rtsopts=-N -M7G -T -Iw10"
hs-source-dirs:
test
build-depends:
tasty,
tasty-hunit,
tasty-quickcheck,
hatter,
containers,
text,
bytestring,
directory,
filepath,
unwitch >= 3.0.0 && < 4,
uuid-types >= 1.0.4 && < 2