recipe(){
    local -x RECIPE="$1"
    shift
    perl -d:Confess \
         -MDebian::Debhelper::Buildsystem::Haskell::Recipes=/.*/ \
         -MUnicode::UTF8=decode_utf8,encode_utf8 \
         -E 'my @decoded = map { decode_utf8($_) } @ARGV; my @results = $ENV{RECIPE}->(@decoded); my $output = join(q{ }, @results); say encode_utf8($output) if length $output;' "$@" \
        || exit
}

run () {
    recipe "${FUNCNAME[0]}" "$@"
}

cpu(){
    recipe "${FUNCNAME[0]}" "$@"
}

os(){
    recipe "${FUNCNAME[0]}" "$@"
}

ghcjs_version(){
    recipe "${FUNCNAME[0]}" "$@"
}

ghcjs_ghc_version(){
    recipe "${FUNCNAME[0]}" "$@"
}

package_prefix(){
    recipe "${FUNCNAME[0]}" "$@"
}

package_hc(){
    recipe "${FUNCNAME[0]}" "$@"
}

package_ext(){
    recipe "${FUNCNAME[0]}" "$@"
}

packages_hc(){
    recipe "${FUNCNAME[0]}" "$@"
}

hc_libdir(){
    recipe "${FUNCNAME[0]}" "$@"
}

package_libdir(){
    recipe "${FUNCNAME[0]}" "$@"
}

hc_pkgdir(){
    recipe "${FUNCNAME[0]}" "$@"
}

package_pkgdir(){
    recipe "${FUNCNAME[0]}" "$@"
}

hc_prefix(){
    recipe "${FUNCNAME[0]}" "$@"
}

hc_haddock(){
    recipe "${FUNCNAME[0]}" "$@"
}

hc_docdir(){
    recipe "${FUNCNAME[0]}" "$@"
}

hc_htmldir(){
    recipe "${FUNCNAME[0]}" "$@"
}

hc_hoogle(){
    recipe "${FUNCNAME[0]}" "$@"
}

strip_hash(){
    recipe "${FUNCNAME[0]}" "$@"
}

sort_uniq(){
    recipe "${FUNCNAME[0]}" "$@"
}

dependency(){
    recipe "${FUNCNAME[0]}" "$@"
}

ghc_pkg_field(){
    recipe "${FUNCNAME[0]}" "$@"
}

providing_package_for_ghc(){
    recipe "${FUNCNAME[0]}" "$@"
}

providing_package_for_ghc_prof(){
    recipe "${FUNCNAME[0]}" "$@"
}

cabal_package_ids(){
    recipe "${FUNCNAME[0]}" "$@"
}

cabal_depends(){
    recipe "${FUNCNAME[0]}" "$@"
}

hashed_dependency(){
    recipe "${FUNCNAME[0]}" "$@"
}

depends_for_ghc(){
    recipe "${FUNCNAME[0]}" "$@"
}

depends_for_ghc_prof(){
    recipe "${FUNCNAME[0]}" "$@"
}

usable_ghc_pkg() {
    recipe "${FUNCNAME[0]}" "$@"
}

tmp_package_db() {
    recipe "${FUNCNAME[0]}" "$@"
}

provides_for_ghc(){
    recipe "${FUNCNAME[0]}" "$@"
}

provides_for_ghc_prof(){
    recipe "${FUNCNAME[0]}" "$@"
}

package_id_to_virtual_package(){
    recipe "${FUNCNAME[0]}" "$@"
}

depends_for_hugs(){
    recipe "${FUNCNAME[0]}" "$@"
}

find_config_for_ghc(){
    recipe "${FUNCNAME[0]}" "$@"
}

clean_recipe(){
    recipe "${FUNCNAME[0]}" "$@"
}

make_setup_recipe(){
    recipe "${FUNCNAME[0]}" "$@"
}

configure_recipe(){
    recipe "${FUNCNAME[0]}" "$@"
}

build_recipe(){
    recipe "${FUNCNAME[0]}" "$@"
}

check_recipe(){
    recipe "${FUNCNAME[0]}" "$@"
}

haddock_recipe(){
    recipe "${FUNCNAME[0]}" "$@"
}

extra_depends_recipe(){
    recipe "${FUNCNAME[0]}" "$@"
}

install_dev_recipe(){
    recipe "${FUNCNAME[0]}" "$@"
}

install_prof_recipe(){
    recipe "${FUNCNAME[0]}" "$@"
}

install_doc_recipe(){
    recipe "${FUNCNAME[0]}" "$@"
}
