From bfe6b5376a47c133b5aec21fd50a648e122cc40e Mon Sep 17 00:00:00 2001 From: Alexander Vershilov Date: Mon, 26 Aug 2013 11:43:06 +0000 Subject: dev-haskell/file-location: initial layout (Portage version: 2.2.1/cvs/Linux x86_64, signed Manifest commit with key 0xEAD50D64D8D3571A!) --- dev-haskell/file-location/ChangeLog | 9 +++++ .../file-location/file-location-0.4.5.2.ebuild | 29 ++++++++++++++++ dev-haskell/file-location/metadata.xml | 39 ++++++++++++++++++++++ 3 files changed, 77 insertions(+) create mode 100644 dev-haskell/file-location/ChangeLog create mode 100644 dev-haskell/file-location/file-location-0.4.5.2.ebuild create mode 100644 dev-haskell/file-location/metadata.xml (limited to 'dev-haskell/file-location') diff --git a/dev-haskell/file-location/ChangeLog b/dev-haskell/file-location/ChangeLog new file mode 100644 index 000000000000..04528905358d --- /dev/null +++ b/dev-haskell/file-location/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for dev-haskell/file-location +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/file-location/ChangeLog,v 1.1 2013/08/26 11:43:06 qnikst Exp $ + +*file-location-0.4.5.2 (26 Aug 2013) + + 26 Aug 2013; Alexander Vershilov + +file-location-0.4.5.2.ebuild, +metadata.xml: + dev-haskell/file-location: initial layout diff --git a/dev-haskell/file-location/file-location-0.4.5.2.ebuild b/dev-haskell/file-location/file-location-0.4.5.2.ebuild new file mode 100644 index 000000000000..3e27175338bb --- /dev/null +++ b/dev-haskell/file-location/file-location-0.4.5.2.ebuild @@ -0,0 +1,29 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-haskell/file-location/file-location-0.4.5.2.ebuild,v 1.1 2013/08/26 11:43:06 qnikst Exp $ + +EAPI=5 + +# ebuild generated by hackport 0.3.9999 + +CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite" +inherit haskell-cabal + +DESCRIPTION="common functions that show file location information" +HOMEPAGE="https://github.com/gregwebs/FileLocation.hs" +SRC_URI="mirror://hackage/packages/archive/${PN}/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="" +# tests fail: test: main:Main test/main.hs:30:5 Oh no! +# Test suite test: FAIL +RESTRICT="test" + +RDEPEND="dev-haskell/lifted-base:=[profile?] + >=dev-haskell/transformers-0.2:=[profile?] + =dev-lang/ghc-6.10.4:=" +DEPEND="${RDEPEND} + >=dev-haskell/cabal-1.8" diff --git a/dev-haskell/file-location/metadata.xml b/dev-haskell/file-location/metadata.xml new file mode 100644 index 000000000000..9126a5bb12ff --- /dev/null +++ b/dev-haskell/file-location/metadata.xml @@ -0,0 +1,39 @@ + + + + haskell + + haskell@gentoo.org + + + Common debugging/error/exception functions that give file location information + + > $(err "OH NO!") + > + > main:Main main.hs:16:1 OH NO! + + Notice how it displays package:module file:line:character + It exposes the functions err (error), undef (undefined), and trc (Debug.Trace.trace). All of these behave the same as their normal counterpart but also spit out a location. + + Here is my favorite helper, debug, which is like trace but just show the value. + + > debug [1,2,3] + > + > DEBUG: [1,2,3] + > [1,2,3] + + And The Template Haskell version. + + > $(dbg) [1,2,3] + > + > DEBUG main:Main main.hs:1:3 [1,2,3] + > [1,2,3] + + Also there is a version of thrwIO that gives location information + > ($(thrwIO) $ AException) `catch` \e -> putStrLn ("Caught " ++ show (e :: AException)) + > + > Caught AException "main:Main test/main.hs:25:6" + + See module for a listing of all the functions with short descriptions, and the homepage for some more examples https://github.com/gregwebs/ErrorLocation.hs + + -- cgit v1.2.3-65-gdbad