Language::Haskell - Perl bindings to Haskell


Language-Haskell documentation Contained in the Language-Haskell distribution.

Index


Code Index:

NAME

Top

Language::Haskell - Perl bindings to Haskell

VERSION

Top

This document describes version 0.01 of Language::Haskell, released December 26, 2004.

SYNOPSIS

Top

    use Language::Haskell;
    my $env = Language::Haskell->new;
    print $env->eval('product [1..10]'); # 3628800

    # See t/*.t in the source distribution for more!

DESCRIPTION

Top

This module provides Perl bindings to the Haskell language, via the embedded Haskell User's Gofer System (Hugs).

The documentation is sorely lacking at this moment. For an overview of supported features, please consult t/*.t in the source distribution.

SEE ALSO

Top

Language::Haskell::API

http://www.haskell.org/hugs/

AUTHORS

Top

Autrijus Tang <autrijus@autrijus.org>

COPYRIGHT

Top


Language-Haskell documentation Contained in the Language-Haskell distribution.
package Language::Haskell;
$Language::Haskell::VERSION = '0.01';

use strict;
use vars qw(@EXPORT @EXPORT_OK %EXPORT_TAGS);
use Language::Haskell_in;
use Language::Haskell::API;

BEGIN {
    @EXPORT_OK = @EXPORT;
    @EXPORT = ();
    %EXPORT_TAGS = ( all => \@EXPORT_OK );

    no strict 'refs';
    foreach my $sym ( @EXPORT_OK ) {
        $sym =~ /^__HugsServerAPI__(.+)/ or next;
        my $code = __PACKAGE__->can($sym) or die $sym;
        *{"Language::Haskell::API::$1"} = (
            ($1 eq 'clearError') ? $code : sub {
                my $rv = $code->(@_);
                die($_[0]->clearError || (return $rv));
            }
        );
    }
}

sub new { initHugsServer(1+@_, [$0, @_]) }


1;

__END__