/usr/share/doc/libghc-tagged-doc/html/tagged.txt is in libghc-tagged-doc 0.8.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 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 | -- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Haskell 98 phantom types to avoid unsafely passing dummy arguments
--
-- Haskell 98 phantom types to avoid unsafely passing dummy arguments
@package tagged
@version 0.8.2
module Data.Proxy.TH
-- | A proxy value quasiquoter. <tt>[pr|T|]</tt> will splice an expression
-- <tt>Proxy::Proxy T</tt>, while <tt>[pr|A,B,C|]</tt> will splice in a
-- value of <tt>Proxy :: Proxy [A,B,C]</tt>.
pr :: QuasiQuoter
-- | Like <a>pr</a>, but takes a single type, which is used to produce a
-- <tt>Proxy</tt> for a single-element list containing only that type.
-- This is useful for passing a single type to a function that wants a
-- list of types.
pr1 :: QuasiQuoter
module Data.Tagged
-- | A <tt><a>Tagged</a> s b</tt> value is a value <tt>b</tt> with an
-- attached phantom type <tt>s</tt>. This can be used in place of the
-- more traditional but less safe idiom of passing in an undefined value
-- with the type, because unlike an <tt>(s -> b)</tt>, a
-- <tt><a>Tagged</a> s b</tt> can't try to use the argument <tt>s</tt> as
-- a real value.
--
-- Moreover, you don't have to rely on the compiler to inline away the
-- extra argument, because the newtype is "free"
--
-- <a>Tagged</a> has kind <tt>k -> * -> *</tt> if the compiler
-- supports <tt>PolyKinds</tt>, therefore there is an extra <tt>k</tt>
-- showing in the instance haddocks that may cause confusion.
newtype Tagged s b
Tagged :: b -> Tagged s b
[unTagged] :: Tagged s b -> b
-- | Some times you need to change the tag you have lying around. Idiomatic
-- usage is to make a new combinator for the relationship between the
-- tags that you want to enforce, and define that combinator using
-- <a>retag</a>.
--
-- <pre>
-- data Succ n
-- retagSucc :: <a>Tagged</a> n a -> <a>Tagged</a> (Succ n) a
-- retagSucc = <a>retag</a>
-- </pre>
retag :: Tagged s b -> Tagged t b
-- | Alias for <a>unTagged</a>
untag :: Tagged s b -> b
-- | Tag a value with its own type.
tagSelf :: a -> Tagged a a
-- | <a>untagSelf</a> is a type-restricted version of <a>untag</a>.
untagSelf :: Tagged a a -> a
-- | <a>asTaggedTypeOf</a> is a type-restricted version of <a>const</a>. It
-- is usually used as an infix operator, and its typing forces its first
-- argument (which is usually overloaded) to have the same type as the
-- tag of the second.
asTaggedTypeOf :: s -> tagged s b -> s
witness :: Tagged a b -> a -> b
-- | Convert from a <a>Tagged</a> representation to a representation based
-- on a <a>Proxy</a>.
proxy :: Tagged s a -> proxy s -> a
-- | Convert from a representation based on a <a>Proxy</a> to a
-- <a>Tagged</a> representation.
unproxy :: (Proxy s -> a) -> Tagged s a
-- | Another way to convert a proxy to a tag.
tagWith :: proxy s -> a -> Tagged s a
-- | Some times you need to change the proxy you have lying around.
-- Idiomatic usage is to make a new combinator for the relationship
-- between the proxies that you want to enforce, and define that
-- combinator using <a>reproxy</a>.
--
-- <pre>
-- data Succ n
-- reproxySucc :: proxy n -> <a>Proxy</a> (Succ n)
-- reproxySucc = <a>reproxy</a>
-- </pre>
reproxy :: proxy a -> Proxy b
instance GHC.Generics.Selector Data.Tagged.S1_0_0Tagged
instance GHC.Generics.Constructor Data.Tagged.C1_0Tagged
instance GHC.Generics.Datatype Data.Tagged.D1Tagged
instance forall (k :: BOX) (s :: k). GHC.Generics.Generic1 (Data.Tagged.Tagged s)
instance forall (k :: BOX) (s :: k) b. GHC.Generics.Generic (Data.Tagged.Tagged s b)
instance forall (k :: BOX) (s :: k) b. GHC.Enum.Bounded b => GHC.Enum.Bounded (Data.Tagged.Tagged s b)
instance forall (k :: BOX) (s :: k) b. GHC.Arr.Ix b => GHC.Arr.Ix (Data.Tagged.Tagged s b)
instance forall (k :: BOX) (s :: k) b. GHC.Classes.Ord b => GHC.Classes.Ord (Data.Tagged.Tagged s b)
instance forall (k :: BOX) (s :: k) b. GHC.Classes.Eq b => GHC.Classes.Eq (Data.Tagged.Tagged s b)
instance (Data.Data.Data s, Data.Data.Data b) => Data.Data.Data (Data.Tagged.Tagged s b)
instance forall (k :: BOX) (s :: k) b. GHC.Show.Show b => GHC.Show.Show (Data.Tagged.Tagged s b)
instance forall (k :: BOX) (s :: k) b. GHC.Read.Read b => GHC.Read.Read (Data.Tagged.Tagged s b)
instance forall (k :: BOX) (s :: k) a. GHC.Base.Monoid a => GHC.Base.Monoid (Data.Tagged.Tagged s a)
instance forall (k :: BOX) (s :: k). GHC.Base.Functor (Data.Tagged.Tagged s)
instance Data.Bifunctor.Bifunctor Data.Tagged.Tagged
instance forall (k :: BOX) (s :: k) b. Control.DeepSeq.NFData b => Control.DeepSeq.NFData (Data.Tagged.Tagged s b)
instance forall (k :: BOX) (s :: k). GHC.Base.Applicative (Data.Tagged.Tagged s)
instance forall (k :: BOX) (s :: k). GHC.Base.Monad (Data.Tagged.Tagged s)
instance forall (k :: BOX) (s :: k). Data.Foldable.Foldable (Data.Tagged.Tagged s)
instance forall (k :: BOX) (s :: k). Data.Traversable.Traversable (Data.Tagged.Tagged s)
instance forall (k :: BOX) (s :: k) a. GHC.Enum.Enum a => GHC.Enum.Enum (Data.Tagged.Tagged s a)
instance forall (k :: BOX) (s :: k) a. GHC.Num.Num a => GHC.Num.Num (Data.Tagged.Tagged s a)
instance forall (k :: BOX) (s :: k) a. GHC.Real.Real a => GHC.Real.Real (Data.Tagged.Tagged s a)
instance forall (k :: BOX) (s :: k) a. GHC.Real.Integral a => GHC.Real.Integral (Data.Tagged.Tagged s a)
instance forall (k :: BOX) (s :: k) a. GHC.Real.Fractional a => GHC.Real.Fractional (Data.Tagged.Tagged s a)
instance forall (k :: BOX) (s :: k) a. GHC.Float.Floating a => GHC.Float.Floating (Data.Tagged.Tagged s a)
instance forall (k :: BOX) (s :: k) a. GHC.Real.RealFrac a => GHC.Real.RealFrac (Data.Tagged.Tagged s a)
instance forall (k :: BOX) (s :: k) a. GHC.Float.RealFloat a => GHC.Float.RealFloat (Data.Tagged.Tagged s a)
|