feat(third_party/bazel): Check in rules_haskell from Tweag

This commit is contained in:
Vincent Ambo 2019-07-04 11:18:12 +01:00
parent 2eb1dc26e4
commit f723b8b878
479 changed files with 51484 additions and 0 deletions

View file

@ -0,0 +1,41 @@
load(
"@io_tweag_rules_haskell//haskell:haskell.bzl",
"haskell_library",
"haskell_test",
)
package(default_testonly = 1)
haskell_library(
name = "sublib",
srcs = ["TestSubLib.hs"],
exports = {"//tests/hackage:containers": "Data.Map as SubLib.Map"},
deps = [
"//tests/hackage:base",
"//tests/hackage:containers",
],
)
haskell_library(
name = "lib",
srcs = ["TestLib.hs"],
exports = {
":sublib": "TestSubLib",
"//tests/hackage:containers": "Data.Map as Lib.Map",
},
deps = [
":sublib",
"//tests/hackage:base",
],
)
haskell_test(
name = "library-exports",
size = "small",
srcs = ["Bin.hs"],
visibility = ["//visibility:public"],
deps = [
":lib",
"//tests/hackage:base",
],
)

View file

@ -0,0 +1,7 @@
module Main (main) where
import TestSubLib (messageEnd)
import Lib.Map
main :: IO ()
main = print $ Lib.Map.singleton 1 messageEnd

View file

@ -0,0 +1,7 @@
module TestLib (testMessage) where
import TestSubLib (messageEnd)
import SubLib.Map
testMessage :: String
testMessage = "hello " ++ messageEnd

View file

@ -0,0 +1,5 @@
{-# LANGUAGE ForeignFunctionInterface #-}
module TestSubLib (messageEnd) where
messageEnd :: String
messageEnd = "world"