This is a port of John Goerzen's convertible package, intended to

distinguish between conversions which are guaranteed to succeed and
those which might fail.  It uses the attempt package, which in turn uses
the failure package, so that this package is fully compatible with the
failure framework.

This package currently contains all of the typeclasses and instances for
convertible.  However, as these features are ported to the convertible
package, this package will be left with only the instances for
converting to and from text types (String, ByteString (lazy and strict)
and Text (lazy and strict).

Be aware that conversions to and from bytestrings assume UTF-8 encoding.
If a different encoding is desired, you can use a newtype wrapper and
declare an instance of ConvertAttempt or ConvertSuccess on it.

WWW:	http://github.com/snoyberg/convertible/tree/text

Obtained from:	FreeBSD Haskell
This commit is contained in:
Gabor Pali 2012-02-18 16:48:46 +00:00
parent de130cdf1a
commit 2e61f0192e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=291702
5 changed files with 41 additions and 0 deletions

View File

@ -607,6 +607,7 @@
SUBDIR += hs-configurator
SUBDIR += hs-control-monad-attempt
SUBDIR += hs-convertible
SUBDIR += hs-convertible-text
SUBDIR += hs-cpphs
SUBDIR += hs-darcs
SUBDIR += hs-data-default

View File

@ -0,0 +1,20 @@
# New ports collection makefile for: hs-convertible-text
# Date created: December 26, 2011
# Whom: haskell@FreeBSD.org
#
# $FreeBSD$
#
PORTNAME= convertible-text
PORTVERSION= 0.4.0.2
CATEGORIES= devel haskell
MAINTAINER= haskell@FreeBSD.org
COMMENT= Type classes and instances for converting between types
LICENSE= BSD
USE_CABAL= attempt>=0.3.0 text>=0.5
.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
.include <bsd.port.mk>

View File

@ -0,0 +1,2 @@
SHA256 (cabal/convertible-text-0.4.0.2.tar.gz) = df8dc391ff4d82e3d18b049e3c4db50198aa1345c101d088683a075d5ba217f3
SIZE (cabal/convertible-text-0.4.0.2.tar.gz) = 14346

View File

@ -0,0 +1,17 @@
This is a port of John Goerzen's convertible package, intended to
distinguish between conversions which are guaranteed to succeed and
those which might fail. It uses the attempt package, which in turn uses
the failure package, so that this package is fully compatible with the
failure framework.
This package currently contains all of the typeclasses and instances for
convertible. However, as these features are ported to the convertible
package, this package will be left with only the instances for
converting to and from text types (String, ByteString (lazy and strict)
and Text (lazy and strict).
Be aware that conversions to and from bytestrings assume UTF-8 encoding.
If a different encoding is desired, you can use a newtype wrapper and
declare an instance of ConvertAttempt or ConvertSuccess on it.
WWW: http://github.com/snoyberg/convertible/tree/text

View File

@ -58,6 +58,7 @@ configurator_port= devel/hs-configurator
contravariant_port= math/hs-contravariant
control-monad-attempt_port= devel/hs-control-monad-attempt
convertible_port= devel/hs-convertible
convertible-text_port= devel/hs-convertible-text
cpphs_port= devel/hs-cpphs # executable
cprng-aes_port= security/hs-cprng-aes
criterion_port= benchmarks/hs-criterion