/var/lib/ghc/package.conf.d/file-location-0.4.5.2.conf is in libghc-file-location-dev 0.4.5.2-1.
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 66 67 68 69 70 71 72 73 | name: file-location
version: 0.4.5.2
id: file-location-0.4.5.2-56d9372732022a2ef83aee4acdfdcc6d
license: BSD3
copyright:
maintainer: greg@gregweber.info
stability:
homepage: https://github.com/gregwebs/FileLocation.hs
package-url:
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
hidden-modules:
trusted: False
import-dirs: /usr/lib/haskell-packages/ghc/lib/file-location-0.4.5.2/ghc-7.6.3
library-dirs: /usr/lib/haskell-packages/ghc/lib/file-location-0.4.5.2/ghc-7.6.3
hs-libraries: HSfile-location-0.4.5.2
extra-libraries:
extra-ghci-libraries:
include-dirs:
includes:
depends: base-4.6.0.1-8aa5d403c45ea59dcd2c39f123e27d57
containers-0.5.0.0-ab1dae9a94cd3cc84e7b2805636ebfa2
lifted-base-0.2.0.3-635db11b8313e1acaa5140f2757e862e
template-haskell-2.8.0.0-a3012803fde1dc362e555b35a1a78e6d
transformers-0.3.0.0-ff2bb6ac67241ebb987351a3db564af0
hugs-options:
cc-options:
ld-options:
framework-dirs:
frameworks:
haddock-interfaces: /usr/lib/ghc-doc/haddock/file-location-0.4.5.2/file-location.haddock
haddock-html: /usr/share/doc/libghc-file-location-doc/html/
|