Provides a monad-transformer version of the Control.Exception.catch

Haskell function. For this, it defines the MonadCatchIO class, a subset
of MonadIO. It defines proper instances for most monad transformers in
the 'mtl' library.

WWW: http://code.haskell.org/~jcpetruzza/MonadCatchIO-mtl

PR:		ports/142283
Submitted by:	Jacula Modyun <jacula(at)gmail.com>
This commit is contained in:
Gabor Pali 2010-01-04 06:14:22 +00:00
parent 19158030a0
commit 4f0a88de09
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=247106
5 changed files with 99 additions and 0 deletions

View file

@ -525,6 +525,7 @@
SUBDIR += hp48cc
SUBDIR += hp48xgcc
SUBDIR += hptools
SUBDIR += hs-MonadCatchIO-mtl
SUBDIR += hs-ObjectName
SUBDIR += hs-QuickCheck
SUBDIR += hs-StateVar

View file

@ -0,0 +1,75 @@
# New ports collection makefile for: hs-MonadCatchIO-mtl
# Date created: December 20 2009
# Whom: Giuseppe Pilichi aka Jacula Modyun <jacula@gmail.com>
#
# $FreeBSD$
#
PORTNAME= MonadCatchIO-mtl
PORTVERSION= 0.2.0.0
CATEGORIES= devel haskell
MASTER_SITES= http://hackage.haskell.org/packages/archive/${PORTNAME}/${PORTVERSION}/
PKGNAMEPREFIX= hs-
MAINTAINER= jacula@gmail.com
COMMENT= Monad-transformer version of the Control.Exception Haskell module
BUILD_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
RUN_DEPENDS+= ghc:${PORTSDIR}/lang/ghc
GHC_VERSION= 6.10.4
MONADCATCHIOMTL_VERSION= ${PORTVERSION}
GHC_CMD= ${LOCALBASE}/bin/ghc
SETUP_CMD= ./setup
DOCSDIR= ${PREFIX}/share/doc/${DISTNAME}
MONADCATCHIOMTL_LIBDIR_REL= lib/${DISTNAME}
PLIST_SUB= GHC_VERSION=${GHC_VERSION} \
MONADCATCHIOMTL_VERSION=${MONADCATCHIOMTL_VERSION} \
MONADCATCHIOMTL_LIBDIR_REL=${MONADCATCHIOMTL_LIBDIR_REL}
.if defined(NOPORTDOCS)
PLIST_SUB+= NOPORTDOCS=""
.else
PLIST_SUB+= NOPORTDOCS="@comment "
.endif
.if !defined(NOPORTDOCS)
PORT_HADDOCK!= (cd ${.CURDIR}/../../lang/ghc && ${MAKE} -V PORT_HADDOCK)
.if !empty(PORT_HADDOCK:M?0)
BUILD_DEPENDS+= haddock:${PORTSDIR}/devel/hs-haddock
.endif
BUILD_DEPENDS+= HsColour:${PORTSDIR}/print/hs-hscolour
HSCOLOUR_VERSION= 1.15
HSCOLOUR_DATADIR= ${PREFIX}/share/hscolour-${HSCOLOUR_VERSION}
PORTDOCS= *
.endif
.SILENT:
do-configure:
cd ${WRKSRC} && ${GHC_CMD} --make Setup.lhs -o setup -package Cabal \
&& ${SETUP_CMD} configure --haddock-options=-w --prefix=${PREFIX}
do-build:
cd ${WRKSRC} && ${SETUP_CMD} build \
&& ${SETUP_CMD} register --gen-script
.if !defined(NOPORTDOCS)
cd ${WRKSRC} && ${SETUP_CMD} haddock --hyperlink-source \
--hscolour-css=${HSCOLOUR_DATADIR}/hscolour.css
.endif
do-install:
cd ${WRKSRC} && ${SETUP_CMD} install \
&& ${INSTALL_SCRIPT} register.sh ${PREFIX}/${MONADCATCHIOMTL_LIBDIR_REL}/register.sh
post-install:
${RM} -f ${PREFIX}/lib/ghc-${GHC_VERSION}/package.conf.old
.include <bsd.port.mk>

View file

@ -0,0 +1,3 @@
MD5 (MonadCatchIO-mtl-0.2.0.0.tar.gz) = 0c042ef7085e179685cc50c286641d66
SHA256 (MonadCatchIO-mtl-0.2.0.0.tar.gz) = 038e92d119d0187ce6384216e925927a5729873fba9aa834de1b402cb4ea0ff5
SIZE (MonadCatchIO-mtl-0.2.0.0.tar.gz) = 1694

View file

@ -0,0 +1,6 @@
Provides a monad-transformer version of the Control.Exception.catch
Haskell function. For this, it defines the MonadCatchIO class, a subset
of MonadIO. It defines proper instances for most monad transformers in
the 'mtl' library.
WWW: http://code.haskell.org/~jcpetruzza/MonadCatchIO-mtl

View file

@ -0,0 +1,14 @@
@comment $FreeBSD$
%%MONADCATCHIOMTL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Control/Monad/CatchIO.hi
%%MONADCATCHIOMTL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/HSMonadCatchIO-mtl-%%MONADCATCHIOMTL_VERSION%%.o
%%MONADCATCHIOMTL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/libHSMonadCatchIO-mtl-%%MONADCATCHIOMTL_VERSION%%.a
%%MONADCATCHIOMTL_LIBDIR_REL%%/register.sh
%%NOPORTDOCS%%@dirrmtry %%DOCSDIR%%
@dirrm %%MONADCATCHIOMTL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Control/Monad
@dirrm %%MONADCATCHIOMTL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%/Control
@dirrm %%MONADCATCHIOMTL_LIBDIR_REL%%/ghc-%%GHC_VERSION%%
@dirrm %%MONADCATCHIOMTL_LIBDIR_REL%%
@exec /bin/sh %D/%%MONADCATCHIOMTL_LIBDIR_REL%%/register.sh
@exec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old
@unexec %D/bin/ghc-pkg unregister MonadCatchIO-mtl
@unexec /bin/rm -f %D/lib/ghc-%%GHC_VERSION%%/package.conf.old