xiaohongshu
xiaohongshu
create-haskell-bazel-target
Create a target for haskell application.
Full skill instructions
Core GHC packages MUST use //: prefix (NOT @stackage//:)
//:package-name)//:base - Always required//:bytestring//:containers//:directory//:filepath//:text//:time//:array//:deepseq//:process//:mtl//:transformers@stackage//:package-name)@stackage//:aeson@stackage//:yaml@stackage//:cmark@stackage//:QuickCheck@stackage//:hspec@stackage//:http-conduit@stackage//:vector@stackage//:randomUsing @stackage//:base or @stackage//:text will cause visibility errors:
ERROR: target '@@rules_haskell~~stack_snapshot~stackage//:base' is not visible from target
Fix: Replace @stackage//:base with //:base (same for text, containers, etc.)
When configuring custom Hackage packages in non_module_deps.bzl, ensure glob patterns match the directory structure AFTER strip_prefix is applied:
WRONG:
http_archive(
name = "libyaml",
urls = ["https://hackage.haskell.org/package/libyaml-0.1.4/libyaml-0.1.4.tar.gz"],
strip_prefix = "libyaml-0.1.4", # This strips the directory
build_file_content = """
haskell_cabal_library(
name = "libyaml",
srcs = glob(["libyaml-0.1.4/**/*"]), # ❌ WRONG - directory already stripped!
...
)
"""
)
CORRECT:
http_archive(
name = "libyaml",
urls = ["https://hackage.haskell.org/package/libyaml-0.1.4/libyaml-0.1.4.tar.gz"],
strip_prefix = "libyaml-0.1.4", # This strips the directory
build_file_content = """
haskell_cabal_library(
name = "libyaml",
srcs = glob(["**/*"]), # ✓ CORRECT - files are at root after strip
...
)
"""
)
Without strip_prefix:
http_archive(
name = "yaml",
urls = ["https://hackage.haskell.org/package/yaml-0.11.11.2/yaml-0.11.11.2.tar.gz"],
# No strip_prefix - directory preserved
build_file_content = """
haskell_cabal_library(
name = "yaml",
srcs = glob(["yaml-0.11.11.2/**/*"]), # ✓ CORRECT - directory exists
...
)
"""
)
haskell_test(
name = "hackage-doc-cli-test",
srcs = glob(["**/*.hs"]),
data = glob(["Fixtures/**/*"])
)
source code
haskell/app/hackage-doc-cli/test/Fixtures/aeson-package.json
# Neural network from scratch application
haskell_binary(
name = "neural-network",
srcs = [":Main.hs"],
deps = [
"//:base", # Core GHC package
"//haskell/libs/neural-network", # Local library
"@stackage//:random", # Third-party package
],
)
haskell_library(
name = "neural-network",
srcs = glob(["src/**/*.hs"]),
src_strip_prefix = "src",
ghcopts = ["-XRecordWildCards"],
visibility = ["//visibility:public"],
deps = [
"//:base", # Core GHC package
"@stackage//:vector", # Third-party package
"@stackage//:random", # Third-party package
],
)
haskell_test(
name = "unit-tests",
srcs = glob(["test/**/*.hs"]),
src_strip_prefix = "test",
deps = [
":my-library", # Local library being tested
"//:base", # Core GHC package
"//:text", # Core GHC package
"//:containers", # Core GHC package
"@stackage//:QuickCheck", # Third-party test framework
"@stackage//:hspec", # Third-party test framework
],
)
haskell_library(
name = "rpg-ruleset-core",
srcs = glob(["src/**/*.hs"]),
src_strip_prefix = "src",
visibility = ["//visibility:public"],
deps = [
# Core GHC packages (use //:)
"//:base",
"//:bytestring",
"//:containers",
"//:directory",
"//:filepath",
"//:text",
"//:time",
# Third-party packages (use @stackage//:)
"@stackage//:aeson",
"@stackage//:cmark",
"@stackage//:yaml",
],
)
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience