Skip to content
This repository was archived by the owner on Aug 9, 2024. It is now read-only.

Commit f9d0ae2

Browse files
committed
Compile to WASM
1 parent a058d25 commit f9d0ae2

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

cabal.project

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
with-compiler: wasm32-wasi-ghc
2+
with-hc-pkg: wasm32-wasi-ghc-pkg
3+
packages: .
4+
allow-newer: ghc-prim

cabal2json.cabal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ executable cabal2json
2525
hs-source-dirs: src
2626
default-language: Haskell2010
2727
build-depends:
28-
Cabal >=3.2.1.0 && <3.3,
29-
aeson >=1.5.6.0 && <1.6,
28+
Cabal >=3.9 && <3.10,
29+
aeson >=1.5.6.0 && <3,
3030
base >=4.7 && <5,
31-
bytestring >=0.10.12.0 && <0.11,
31+
bytestring >=0.10.12.0 && <0.12,
3232
filepath >=1.4.2.1 && <1.5

src/Main.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{-# OPTIONS_GHC -Wall #-}
1+
{-# OPTIONS_GHC -Wall -Werror #-}
22
{-# LANGUAGE OverloadedStrings #-}
33

44
module Main (main) where
@@ -8,8 +8,8 @@ import Distribution.Package
88
import Distribution.PackageDescription
99
import Distribution.PackageDescription.Parsec (parseGenericPackageDescriptionMaybe)
1010
import Distribution.ModuleName (ModuleName, toFilePath)
11-
import Distribution.Types.UnqualComponentName
1211
import Distribution.Types.Version
12+
import Distribution.Utils.Path
1313

1414
import System.Environment (getArgs)
1515
import System.FilePath
@@ -79,7 +79,7 @@ getComponentFromFile gpkg file =
7979
omod = otherModules info
8080
sourceDirs = hsSourceDirs info
8181
modules = map Left omod ++ fjoin mainmod
82-
genFP f = map (normalise . (</> f)) sourceDirs
82+
genFP f = map (normalise . (</> f) . getSymbolicPath) sourceDirs
8383
check = any (
8484
either (any (`isPrefixOf` file) . genFP . toFilePath)
8585
(elem file . genFP))

0 commit comments

Comments
 (0)