Skip to content

Commit

Permalink
chore: Update to new third_party method for haskell deps.
Browse files Browse the repository at this point in the history
  • Loading branch information
iphydf committed Nov 7, 2023
1 parent 90322ea commit 3ce65d6
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 64 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ bazel-opt_task:
- /src/workspace/tools/inject-repo hs-cimple
test_all_script:
- cd /src/workspace && bazel test -k
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
--config=ci
//hs-cimple/...
96 changes: 49 additions & 47 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("@ai_formation_hazel//tools:mangling.bzl", "hazel_library")
load("@rules_haskell//haskell:defs.bzl", "haskell_library")
load("//third_party/haskell/alex:build_defs.bzl", "alex_lexer")
load("//third_party/haskell/happy:build_defs.bzl", "happy_parser")
Expand All @@ -22,11 +21,11 @@ haskell_library(
src_strip_prefix = "src",
visibility = ["//hs-cimple:__subpackages__"],
deps = [
hazel_library("aeson"),
hazel_library("array"),
hazel_library("base"),
hazel_library("bytestring"),
hazel_library("text"),
"//third_party/haskell:aeson",
"//third_party/haskell:array",
"//third_party/haskell:base",
"//third_party/haskell:bytestring",
"//third_party/haskell:text",
],
)

Expand All @@ -36,10 +35,10 @@ haskell_library(
src_strip_prefix = "src",
visibility = ["//hs-cimple:__subpackages__"],
deps = [
hazel_library("aeson"),
hazel_library("base"),
hazel_library("data-fix"),
hazel_library("transformers-compat"),
"//third_party/haskell:aeson",
"//third_party/haskell:base",
"//third_party/haskell:data-fix",
"//third_party/haskell:transformers-compat",
],
)

Expand All @@ -54,16 +53,17 @@ haskell_library(
deps = [
":ast",
":lexer",
hazel_library("base"),
hazel_library("data-fix"),
hazel_library("text"),
"//third_party/haskell:base",
"//third_party/haskell:data-fix",
"//third_party/haskell:text",
],
)

happy_parser(
name = "Parser",
src = "src/Language/Cimple/Parser.y",
preproc = "expand_yacc.pl",
preproc_tool = "@perl",
)

haskell_library(
Expand All @@ -74,20 +74,21 @@ haskell_library(
deps = [
":ast",
":lexer",
hazel_library("aeson"),
hazel_library("array"),
hazel_library("base"),
hazel_library("data-fix"),
hazel_library("recursion-schemes"),
hazel_library("text"),
hazel_library("transformers-compat"),
"//third_party/haskell:aeson",
"//third_party/haskell:array",
"//third_party/haskell:base",
"//third_party/haskell:data-fix",
"//third_party/haskell:recursion-schemes",
"//third_party/haskell:text",
"//third_party/haskell:transformers-compat",
],
)

happy_parser(
name = "CommentParser",
src = "src/Language/Cimple/CommentParser.y",
preproc = "expand_yacc.pl",
preproc_tool = "@perl",
)

haskell_library(
Expand All @@ -99,17 +100,18 @@ haskell_library(
":ast",
":describe-ast",
":lexer",
hazel_library("array"),
hazel_library("base"),
hazel_library("data-fix"),
hazel_library("text"),
"//third_party/haskell:array",
"//third_party/haskell:base",
"//third_party/haskell:data-fix",
"//third_party/haskell:text",
],
)

happy_parser(
name = "TreeParser",
src = "src/Language/Cimple/TreeParser.y",
preproc = "expand_yacc.pl",
preproc_tool = "@perl",
)

haskell_library(
Expand All @@ -122,10 +124,10 @@ haskell_library(
":comment-parser",
":describe-ast",
":lexer",
hazel_library("array"),
hazel_library("base"),
hazel_library("data-fix"),
hazel_library("text"),
"//third_party/haskell:array",
"//third_party/haskell:base",
"//third_party/haskell:data-fix",
"//third_party/haskell:text",
],
)

Expand All @@ -150,19 +152,19 @@ haskell_library(
":lexer",
":parser",
":tree-parser",
hazel_library("aeson"),
hazel_library("ansi-wl-pprint"),
hazel_library("array"),
hazel_library("base"),
hazel_library("bytestring"),
hazel_library("containers"),
hazel_library("data-fix"),
hazel_library("filepath"),
hazel_library("monad-parallel"),
hazel_library("mtl"),
hazel_library("split"),
hazel_library("text"),
hazel_library("transformers-compat"),
"//third_party/haskell:aeson",
"//third_party/haskell:ansi-wl-pprint",
"//third_party/haskell:array",
"//third_party/haskell:base",
"//third_party/haskell:bytestring",
"//third_party/haskell:containers",
"//third_party/haskell:data-fix",
"//third_party/haskell:filepath",
"//third_party/haskell:monad-parallel",
"//third_party/haskell:mtl",
"//third_party/haskell:split",
"//third_party/haskell:text",
"//third_party/haskell:transformers-compat",
],
)

Expand All @@ -171,11 +173,11 @@ hspec_test(
size = "small",
deps = [
":hs-cimple",
hazel_library("ansi-wl-pprint"),
hazel_library("base"),
hazel_library("data-fix"),
hazel_library("hspec"),
hazel_library("text"),
hazel_library("transformers-compat"),
"//third_party/haskell:ansi-wl-pprint",
"//third_party/haskell:base",
"//third_party/haskell:data-fix",
"//third_party/haskell:hspec",
"//third_party/haskell:text",
"//third_party/haskell:transformers-compat",
],
)
31 changes: 15 additions & 16 deletions tools/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("@ai_formation_hazel//tools:mangling.bzl", "hazel_library")
load("@rules_haskell//haskell:defs.bzl", "haskell_binary")

haskell_binary(
Expand All @@ -7,9 +6,9 @@ haskell_binary(
visibility = ["//visibility:public"],
deps = [
"//hs-cimple",
hazel_library("base"),
hazel_library("bytestring"),
hazel_library("text"),
"//third_party/haskell:base",
"//third_party/haskell:bytestring",
"//third_party/haskell:text",
],
)

Expand All @@ -19,9 +18,9 @@ haskell_binary(
visibility = ["//visibility:public"],
deps = [
"//hs-cimple",
hazel_library("base"),
hazel_library("bytestring"),
hazel_library("groom"),
"//third_party/haskell:base",
"//third_party/haskell:bytestring",
"//third_party/haskell:groom",
],
)

Expand All @@ -31,10 +30,10 @@ haskell_binary(
visibility = ["//visibility:public"],
deps = [
"//hs-cimple",
hazel_library("base"),
hazel_library("bytestring"),
hazel_library("text"),
hazel_library("time"),
"//third_party/haskell:base",
"//third_party/haskell:bytestring",
"//third_party/haskell:text",
"//third_party/haskell:time",
],
)

Expand All @@ -44,9 +43,9 @@ haskell_binary(
visibility = ["//visibility:public"],
deps = [
"//hs-cimple",
hazel_library("base"),
hazel_library("bytestring"),
hazel_library("groom"),
"//third_party/haskell:base",
"//third_party/haskell:bytestring",
"//third_party/haskell:groom",
],
)

Expand All @@ -56,7 +55,7 @@ haskell_binary(
visibility = ["//visibility:public"],
deps = [
"//hs-cimple",
hazel_library("base"),
hazel_library("groom"),
"//third_party/haskell:base",
"//third_party/haskell:groom",
],
)

0 comments on commit 3ce65d6

Please sign in to comment.