/var/lib/ghc/package.conf.d/file-location-0.4.9.conf is in libghc-file-location-dev 0.4.9-6build6.
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 | name: file-location
version: 0.4.9
id: file-location-0.4.9-2I2No221qgh7G4OUz6mTjc
key: file-location-0.4.9-2I2No221qgh7G4OUz6mTjc
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
abi: 1852dd069f82776c304ae8d3f4f16650
trusted: False
import-dirs: /usr/lib/haskell-packages/ghc/lib/x86_64-linux-ghc-8.0.2/file-location-0.4.9-2I2No221qgh7G4OUz6mTjc
library-dirs: /usr/lib/haskell-packages/ghc/lib/x86_64-linux-ghc-8.0.2/file-location-0.4.9-2I2No221qgh7G4OUz6mTjc
dynamic-library-dirs: /usr/lib/haskell-packages/ghc/lib/x86_64-linux-ghc-8.0.2
data-dir: /usr/share/file-location
hs-libraries: HSfile-location-0.4.9-2I2No221qgh7G4OUz6mTjc
depends:
HUnit-1.5.0.0-DvjF79OHhCC7SzfeEty4OI base-4.9.1.0
containers-0.5.7.1 lifted-base-0.2.3.11-EJk3wL9KL8YEccVtoTgqIE
template-haskell-2.11.1.0 th-orphans-0.13.4-Fu1VNDPCZwy5vTj9Aqstsw
transformers-0.5.2.0
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/
|