use anyhow::Result;
use super::{GeneratedFile, Mechanism, MechanismContext, StepResult};
pub struct HaskellCabal;
impl Mechanism for HaskellCabal {
fn id(&self) -> &'static str {
"haskell_cabal"
}
fn description(&self) -> &'static str {
"Haskell wrapper (stub — cabal/hackage binary helper)"
}
fn stable(&self) -> bool {
false
}
fn generate(&self, ctx: &MechanismContext<'_>) -> Result<StepResult> {
let bin = &ctx.config.project.binary_name;
let base = format!(
"{}/haskell",
ctx.config.paths.packaging_dir.trim_end_matches('/')
);
Ok(StepResult {
files: vec![GeneratedFile {
relative_path: format!("{base}/README.md"),
contents: format!(
"# Haskell packaging for `{bin}` (stub)\n\n\
Planned: thin helper that installs the prebuilt Release binary\n\
(not a reimplementation). Register as a new `Mechanism` when ready.\n"
),
executable: false,
}],
notes: vec!["haskell_cabal is a stub — no cabal file emitted yet.".into()],
})
}
}