/var/lib/ghc/package.conf.d/file-location-0.4.9.conf is in libghc-file-location-dev 0.4.9-3build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | name: file-location
version: 0.4.9
id: file-location-0.4.9-0b5f9caf60a9819d3b9bbe6875af2f50
key: filel_C5dnpDDlY3wL3lgPliKH9W
license: BSD3
maintainer: greg@gregweber.info
homepage: https://github.com/gregwebs/FileLocation.hs
synopsis: common functions that show file location information
description:
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
category: Development
author: Greg Weber
exposed: True
exposed-modules:
FileLocation Debug.FileLocation Control.Exception.FileLocation
Debug.Util FileLocation.LocationString Test.FileLocation
trusted: False
import-dirs: /usr/lib/haskell-packages/ghc/lib/x86_64-linux-ghc-7.10.3/file-location-0.4.9-C5dnpDDlY3wL3lgPliKH9W
library-dirs: /usr/lib/haskell-packages/ghc/lib/x86_64-linux-ghc-7.10.3/file-location-0.4.9-C5dnpDDlY3wL3lgPliKH9W
data-dir: /usr/share/file-location
hs-libraries: HSfile-location-0.4.9-C5dnpDDlY3wL3lgPliKH9W
depends:
HUnit-1.3.0.0-904109a490c85ff643c14c4cfbe058fb
base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d
containers-0.5.6.2-59326c33e30ec8f6afd574cbac625bbb
lifted-base-0.2.3.6-9276c4c1c671cb2ef990bb869656cca8
template-haskell-2.10.0.0-3c4cb52230f347282af9b2817f013181
th-orphans-0.13.0-ebdf331ad6319f706833dde902c7d776
transformers-0.4.2.0-81450cd8f86b36eaa8fa0cbaf6efc3a3
haddock-interfaces: /usr/lib/ghc-doc/haddock/file-location-0.4.9/file-location.haddock
haddock-html: /usr/share/doc/libghc-file-location-doc/html/
|