mirror of
https://github.com/urbit/shrub.git
synced 2024-12-25 04:52:06 +03:00
urbit-atom: Debugging hacks to test in GHCJS.
This commit is contained in:
parent
f7356fe1ed
commit
28ae8bbaf2
1
pkg/hs/urbit-atom/.gitignore
vendored
1
pkg/hs/urbit-atom/.gitignore
vendored
@ -1 +1,2 @@
|
||||
urbit-atom.cabal
|
||||
dist-newstyle/
|
||||
|
30
pkg/hs/urbit-atom/app/Main.hs
Normal file
30
pkg/hs/urbit-atom/app/Main.hs
Normal file
@ -0,0 +1,30 @@
|
||||
module Main where
|
||||
|
||||
import Prelude
|
||||
import Urbit.Atom
|
||||
import Urbit.Atom.Internal (bit, byt)
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
print (bit, byt)
|
||||
f "a"
|
||||
f "x"
|
||||
f "aa"
|
||||
f "ax"
|
||||
f "aaa"
|
||||
f "aax"
|
||||
f "aaaa"
|
||||
f "aaax"
|
||||
f "aaaaa"
|
||||
f "aaaax"
|
||||
f "aaaaaa"
|
||||
f "aaaaax"
|
||||
f "aaaaaaa"
|
||||
f "aaaaaax"
|
||||
f "aaaaaaaa"
|
||||
f "aaaaaaax"
|
||||
f "aaaaaaaaa"
|
||||
f "aaaaaaaax"
|
||||
|
||||
where
|
||||
f x = print (x, utf8Atom x)
|
@ -50,6 +50,12 @@ import qualified Foreign.ForeignPtr.Unsafe as Ptr
|
||||
#error WORD_SIZE_IN_BITS must be either 32 or 64
|
||||
#endif
|
||||
|
||||
bit :: Word
|
||||
bit = BIT
|
||||
|
||||
byt :: Word
|
||||
byt = BYT
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@ -12,14 +12,27 @@ library:
|
||||
- -Werror
|
||||
- -O2
|
||||
|
||||
executables:
|
||||
urbit-atom:
|
||||
source-dirs: app
|
||||
main: Main.hs
|
||||
dependencies:
|
||||
- urbit-atom
|
||||
ghc-options:
|
||||
- -threaded
|
||||
- -rtsopts
|
||||
- -static
|
||||
- -O2
|
||||
- "-with-rtsopts=-N"
|
||||
|
||||
dependencies:
|
||||
- base
|
||||
- bytestring
|
||||
- ghc-prim
|
||||
- integer-gmp
|
||||
- primitive
|
||||
- text
|
||||
- vector
|
||||
- base == 4.12.0.0
|
||||
- bytestring == 0.10.8.2
|
||||
- ghc-prim == 0.5.3
|
||||
- integer-gmp == 1.0.2.0
|
||||
- primitive == 0.6.4.0
|
||||
- text == 1.2.3.1
|
||||
- vector == 0.12.0.3
|
||||
|
||||
default-extensions:
|
||||
- ApplicativeDo
|
||||
|
Loading…
Reference in New Issue
Block a user