Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
time
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ian-Woo Kim
time
Commits
ada2277a
Unverified
Commit
ada2277a
authored
2 years ago
by
Ashley Yakeley
Committed by
GitHub
2 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #239 from type-dance/wasm-js-fixes
Fixes for wasm/js backend
parents
a0f8ed74
e0a5c26c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/ci.wasm32.yml
+12
-13
12 additions, 13 deletions
.github/workflows/ci.wasm32.yml
lib/Data/Time/Clock/Internal/CTimespec.hsc
+8
-0
8 additions, 0 deletions
lib/Data/Time/Clock/Internal/CTimespec.hsc
with
20 additions
and
13 deletions
.github/workflows/ci.wasm32.yml
+
12
−
13
View file @
ada2277a
name
:
ci-wasm32
on
:
push
:
pull_request
:
push
:
{}
pull_request
:
{}
jobs
:
ci-wasm32
:
name
:
ci-wasm32
runs-on
:
ubuntu-
20.04
runs-on
:
ubuntu-
latest
steps
:
-
name
:
setup-proot
run
:
|
sudo apt install -y proot
-
name
:
setup-ghc-wasm32-wasi
-
name
:
setup-wasm32-wasi-ghc
run
:
|
pushd $(mktemp -d)
curl -
L https://github.com/tweag
/ghc-wasm
32-wasi
/archive/
refs/heads/
master.tar.gz | tar xz --strip-components=1
./setup.sh
~
/.ghc-wasm
32-wasi
/add_to_github_path.sh
curl -
f -L --retry 5 https://gitlab.haskell.org/ghc
/ghc-wasm
-meta/-
/archive/
master/ghc-wasm-meta-
master.tar.gz | tar xz --strip-components=1
FLAVOUR=9.6 PREFIX=/tmp/.ghc-wasm
./setup.sh
/tmp
/.ghc-wasm/add_to_github_path.sh
popd
-
name
:
checkout
...
...
@@ -35,5 +31,8 @@ jobs:
autoreconf -i
wasmtime-run wasm32-wasi-cabal run ShowDefaultTZAbbreviations
wasmtime-run wasm32-wasi-cabal run ShowTime
wasm32-wasi-cabal build test:ShowDefaultTZAbbreviations
wasmtime run $(wasm32-wasi-cabal list-bin test:ShowDefaultTZAbbreviations)
wasm32-wasi-cabal build test:ShowTime
wasmtime run $(wasm32-wasi-cabal list-bin test:ShowTime)
This diff is collapsed.
Click to expand it.
lib/Data/Time/Clock/Internal/CTimespec.hsc
+
8
−
0
View file @
ada2277a
#if !defined(javascript_HOST_ARCH)
{-# LANGUAGE CApiFFI #-}
#endif
module Data.Time.Clock.Internal.CTimespec where
...
...
@@ -52,7 +54,13 @@ clockGetTime clockid = alloca (\ptspec -> do
peek ptspec
)
#if defined(javascript_HOST_ARCH)
-- JS backend doesn't support foreign imports with capi convention
clock_REALTIME :: ClockID
clock_REALTIME = #{const CLOCK_REALTIME}
#else
foreign import capi unsafe "HsTime.h value HS_CLOCK_REALTIME" clock_REALTIME :: ClockID
#endif
clock_TAI :: Maybe ClockID
clock_TAI =
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment