This file is indexed.

/usr/share/doc/libghc-servant-doc/html/src/Servant-API-WithNamedContext.html is in libghc-servant-doc 0.11-3.

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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<!-- Generated by HsColour, http://code.haskell.org/~malcolm/hscolour/ -->
<title>src/Servant/API/WithNamedContext.hs</title>
<link type='text/css' rel='stylesheet' href='hscolour.css' />
</head>
<body>
<pre><a name="line-1"></a><span class='hs-comment'>{-# LANGUAGE DataKinds #-}</span>
<a name="line-2"></a><span class='hs-comment'>{-# LANGUAGE KindSignatures #-}</span>
<a name="line-3"></a>
<a name="line-4"></a><span class='hs-keyword'>module</span> <span class='hs-conid'>Servant</span><span class='hs-varop'>.</span><span class='hs-conid'>API</span><span class='hs-varop'>.</span><span class='hs-conid'>WithNamedContext</span> <span class='hs-keyword'>where</span>
<a name="line-5"></a>
<a name="line-6"></a><span class='hs-keyword'>import</span> <span class='hs-conid'>GHC</span><span class='hs-varop'>.</span><span class='hs-conid'>TypeLits</span>
<a name="line-7"></a>
<a name="line-8"></a><span class='hs-comment'>-- | 'WithNamedContext' names a specific tagged context to use for the</span>
<a name="line-9"></a><span class='hs-comment'>-- combinators in the API. (See also in @servant-server@,</span>
<a name="line-10"></a><span class='hs-comment'>-- @Servant.Server.Context@.) For example:</span>
<a name="line-11"></a><span class='hs-comment'>--</span>
<a name="line-12"></a><span class='hs-comment'>-- &gt; type UseNamedContextAPI = WithNamedContext "myContext" '[String] (</span>
<a name="line-13"></a><span class='hs-comment'>-- &gt;     ReqBody '[JSON] Int :&gt; Get '[JSON] Int)</span>
<a name="line-14"></a><span class='hs-comment'>--</span>
<a name="line-15"></a><span class='hs-comment'>-- Both the 'ReqBody' and 'Get' combinators will use the 'WithNamedContext' with</span>
<a name="line-16"></a><span class='hs-comment'>-- type tag "myContext" as their context.</span>
<a name="line-17"></a><span class='hs-comment'>--</span>
<a name="line-18"></a><span class='hs-comment'>-- 'Context's are only relevant for @servant-server@.</span>
<a name="line-19"></a><span class='hs-comment'>--</span>
<a name="line-20"></a><span class='hs-comment'>-- For more information, see the tutorial.</span>
<a name="line-21"></a><span class='hs-keyword'>data</span> <span class='hs-conid'>WithNamedContext</span> <span class='hs-layout'>(</span><span class='hs-varid'>name</span> <span class='hs-keyglyph'>::</span> <span class='hs-conid'>Symbol</span><span class='hs-layout'>)</span> <span class='hs-layout'>(</span><span class='hs-varid'>subContext</span> <span class='hs-keyglyph'>::</span> <span class='hs-keyglyph'>[</span><span class='hs-varop'>*</span><span class='hs-keyglyph'>]</span><span class='hs-layout'>)</span> <span class='hs-varid'>subApi</span>
</pre></body>
</html>