-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Reifies arbitrary terms into types that can be reflected back into terms
--   
--   This package addresses the configuration problem which is
--   propagating configurations that are available at run-time, allowing
--   multiple configurations to coexist without resorting to mutable global
--   variables or System.IO.Unsafe.unsafePerformIO.
--   
--   That package is an implementation of the ideas presented in the paper
--   "Functional Pearl: Implicit Configurations" by Oleg Kiselyov and
--   Chung-chieh Shan (original paper). However, the API has been
--   streamlined to improve performance.
--   
--   There are a handful of tutorials on how to use this library:
--   
--   
--   
- Austin Seipp's tutorial Reflecting values to types and back
--   provides a summary of the approach taken by this library, along with
--   more motivating examples.
--   
- Arnaud Spiwack's tutorial All about reflection explains how
--   to use this library.
--   
@package reflection
@version 2.1.9

-- | Reifies arbitrary terms at the type level. Based on the Functional
--   Pearl: Implicit Configurations paper by Oleg Kiselyov and Chung-chieh
--   Shan.
--   
--   http://okmij.org/ftp/Haskell/tr-15-04.pdf
--   
--   The approach from the paper was modified to work with Data.Proxy and
--   to cheat by using knowledge of GHC's internal representations by
--   Edward Kmett and Elliott Hird.
--   
--   Usage comes down to two combinators, reify and reflect.
--   
--   
--   >>> reify 6 (\p -> reflect p + reflect p)
--   12
--   
--   
--   The argument passed along by reify is just a data Proxy t =
--   Proxy, so all of the information needed to reconstruct your value
--   has been moved to the type level. This enables it to be used when
--   constructing instances (see examples/Monoid.hs).
--   
--   In addition, a simpler API is offered for working with singleton
--   values such as a system configuration, etc.
module Data.Reflection
class Reifies (s :: k) a | s -> a

-- | Recover a value inside a reify context, given a proxy for its
--   reified type.
reflect :: Reifies s a => proxy s -> a

-- | Reify a value at the type level, to be recovered with reflect.
reify :: a -> (forall s. Reifies s a => Proxy s -> r) -> r

-- | This upgraded version of reify can be used to generate a
--   KnownNat suitable for use with other APIs.
--   
--   Attemping to pass a negative Integer as an argument will result
--   in an Underflow exception.
--   
--   Available only on GHC 7.8+
--   
--   
--   >>> import GHC.TypeLits
--   
--   
--   
--   >>> reifyNat 4 natVal
--   4
--   
--   
--   
--   >>> reifyNat 4 reflect
--   4
--   
reifyNat :: Integer -> (forall (n :: Nat). KnownNat n => Proxy n -> r) -> r

-- | This upgraded version of reify can be used to generate a
--   KnownSymbol suitable for use with other APIs.
--   
--   Available only on GHC 7.8+
--   
--   
--   >>> import GHC.TypeLits
--   
--   
--   
--   >>> reifySymbol "hello" symbolVal
--   "hello"
--   
--   
--   
--   >>> reifySymbol "hello" reflect
--   "hello"
--   
reifySymbol :: String -> (forall (n :: Symbol). KnownSymbol n => Proxy n -> r) -> r

-- | Reify a value at the type level in a Typeable-compatible
--   fashion, to be recovered with reflect.
--   
--   This can be necessary to work around the changes to
--   Data.Typeable in GHC HEAD.
reifyTypeable :: Typeable a => a -> (forall s. (Typeable s, Reifies s a) => Proxy s -> r) -> r

-- | This is a version of Reifies that allows for only a single
--   value.
--   
--   This is easier to work with than Reifies and permits extended
--   defaulting, but it only offers a single reflected value of a given
--   type at a time.
class Given a

-- | Recover the value of a given type previously encoded with give.
given :: Given a => a

-- | Reify a value into an instance to be recovered with given.
--   
--   You should only give a single value for each type. If
--   multiple instances are in scope, then the behavior is implementation
--   defined.
give :: a -> (Given a => r) -> r

-- | This can be used to generate a template haskell splice for a type
--   level version of a given int.
--   
--   This does not use GHC TypeLits, instead it generates a numeric type by
--   hand similar to the ones used in the "Functional Pearl: Implicit
--   Configurations" paper by Oleg Kiselyov and Chung-Chieh Shan.
--   
--   instance Num (Q Exp) provided in this package allows writing
--   $(3) instead of $(int 3).
int :: Int -> TypeQ

-- | This is a restricted version of int that can only generate
--   natural numbers. Attempting to generate a negative number results in a
--   compile time error. Also the resulting sequence will consist entirely
--   of Z, D, and SD constructors representing the number in zeroless
--   binary.
nat :: Int -> TypeQ

-- | 0
data Z

-- | 2n
data D n

-- | 2n + 1
data SD n

-- | 2n - 1
data PD n
data ReifiedMonoid a
ReifiedMonoid :: (a -> a -> a) -> a -> ReifiedMonoid a
[reifiedMappend] :: ReifiedMonoid a -> a -> a -> a
[reifiedMempty] :: ReifiedMonoid a -> a
newtype ReflectedMonoid a (s :: k)
ReflectedMonoid :: a -> ReflectedMonoid a (s :: k)
reifyMonoid :: (a -> a -> a) -> a -> (forall s. Reifies s (ReifiedMonoid a) => t -> ReflectedMonoid a s) -> t -> a

-- | Fold a value using its Foldable instance using explicitly
--   provided Monoid operations. This is like foldMap where
--   the Monoid instance can be manually specified.
--   
--   
--   foldMapBy mappend mempty ≡ foldMap
--   
--   
--   
--   >>> foldMapBy (+) 0 length ["hello","world"]
--   10
--   
foldMapBy :: Foldable t => (r -> r -> r) -> r -> (a -> r) -> t a -> r

-- | Fold a value using its Foldable instance using explicitly
--   provided Monoid operations. This is like fold where the
--   Monoid instance can be manually specified.
--   
--   
--   foldBy mappend mempty ≡ fold
--   
--   
--   
--   >>> foldBy (++) [] ["hello","world"]
--   "helloworld"
--   
foldBy :: Foldable t => (a -> a -> a) -> a -> t a -> a
data ReifiedApplicative (f :: Type -> Type)
ReifiedApplicative :: (forall a. () => a -> f a) -> (forall a b. () => f (a -> b) -> f a -> f b) -> ReifiedApplicative (f :: Type -> Type)
[reifiedPure] :: ReifiedApplicative (f :: Type -> Type) -> forall a. () => a -> f a
[reifiedAp] :: ReifiedApplicative (f :: Type -> Type) -> forall a b. () => f (a -> b) -> f a -> f b
newtype ReflectedApplicative (f :: k -> Type) (s :: k1) (a :: k)
ReflectedApplicative :: f a -> ReflectedApplicative (f :: k -> Type) (s :: k1) (a :: k)
reifyApplicative :: (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> (forall s. Reifies s (ReifiedApplicative f) => t -> ReflectedApplicative f s a) -> t -> f a

-- | Traverse a container using its Traversable instance using
--   explicitly provided Applicative operations. This is like
--   traverse where the Applicative instance can be manually
--   specified.
traverseBy :: Traversable t => (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> (a -> f b) -> t a -> f (t b)

-- | Sequence a container using its Traversable instance using
--   explicitly provided Applicative operations. This is like
--   sequence where the Applicative instance can be manually
--   specified.
sequenceBy :: Traversable t => (forall x. () => x -> f x) -> (forall x y. () => f (x -> y) -> f x -> f y) -> t (f a) -> f (t a)
instance forall k (s :: k) (f :: * -> *). Data.Reflection.Reifies s (Data.Reflection.ReifiedApplicative f) => GHC.Internal.Base.Applicative (Data.Reflection.ReflectedApplicative f s)
instance Data.Reflection.B Data.Reflection.T0
instance Data.Reflection.B Data.Reflection.T1
instance Data.Reflection.B Data.Reflection.T10
instance Data.Reflection.B Data.Reflection.T100
instance Data.Reflection.B Data.Reflection.T101
instance Data.Reflection.B Data.Reflection.T102
instance Data.Reflection.B Data.Reflection.T103
instance Data.Reflection.B Data.Reflection.T104
instance Data.Reflection.B Data.Reflection.T105
instance Data.Reflection.B Data.Reflection.T106
instance Data.Reflection.B Data.Reflection.T107
instance Data.Reflection.B Data.Reflection.T108
instance Data.Reflection.B Data.Reflection.T109
instance Data.Reflection.B Data.Reflection.T11
instance Data.Reflection.B Data.Reflection.T110
instance Data.Reflection.B Data.Reflection.T111
instance Data.Reflection.B Data.Reflection.T112
instance Data.Reflection.B Data.Reflection.T113
instance Data.Reflection.B Data.Reflection.T114
instance Data.Reflection.B Data.Reflection.T115
instance Data.Reflection.B Data.Reflection.T116
instance Data.Reflection.B Data.Reflection.T117
instance Data.Reflection.B Data.Reflection.T118
instance Data.Reflection.B Data.Reflection.T119
instance Data.Reflection.B Data.Reflection.T12
instance Data.Reflection.B Data.Reflection.T120
instance Data.Reflection.B Data.Reflection.T121
instance Data.Reflection.B Data.Reflection.T122
instance Data.Reflection.B Data.Reflection.T123
instance Data.Reflection.B Data.Reflection.T124
instance Data.Reflection.B Data.Reflection.T125
instance Data.Reflection.B Data.Reflection.T126
instance Data.Reflection.B Data.Reflection.T127
instance Data.Reflection.B Data.Reflection.T128
instance Data.Reflection.B Data.Reflection.T129
instance Data.Reflection.B Data.Reflection.T13
instance Data.Reflection.B Data.Reflection.T130
instance Data.Reflection.B Data.Reflection.T131
instance Data.Reflection.B Data.Reflection.T132
instance Data.Reflection.B Data.Reflection.T133
instance Data.Reflection.B Data.Reflection.T134
instance Data.Reflection.B Data.Reflection.T135
instance Data.Reflection.B Data.Reflection.T136
instance Data.Reflection.B Data.Reflection.T137
instance Data.Reflection.B Data.Reflection.T138
instance Data.Reflection.B Data.Reflection.T139
instance Data.Reflection.B Data.Reflection.T14
instance Data.Reflection.B Data.Reflection.T140
instance Data.Reflection.B Data.Reflection.T141
instance Data.Reflection.B Data.Reflection.T142
instance Data.Reflection.B Data.Reflection.T143
instance Data.Reflection.B Data.Reflection.T144
instance Data.Reflection.B Data.Reflection.T145
instance Data.Reflection.B Data.Reflection.T146
instance Data.Reflection.B Data.Reflection.T147
instance Data.Reflection.B Data.Reflection.T148
instance Data.Reflection.B Data.Reflection.T149
instance Data.Reflection.B Data.Reflection.T15
instance Data.Reflection.B Data.Reflection.T150
instance Data.Reflection.B Data.Reflection.T151
instance Data.Reflection.B Data.Reflection.T152
instance Data.Reflection.B Data.Reflection.T153
instance Data.Reflection.B Data.Reflection.T154
instance Data.Reflection.B Data.Reflection.T155
instance Data.Reflection.B Data.Reflection.T156
instance Data.Reflection.B Data.Reflection.T157
instance Data.Reflection.B Data.Reflection.T158
instance Data.Reflection.B Data.Reflection.T159
instance Data.Reflection.B Data.Reflection.T16
instance Data.Reflection.B Data.Reflection.T160
instance Data.Reflection.B Data.Reflection.T161
instance Data.Reflection.B Data.Reflection.T162
instance Data.Reflection.B Data.Reflection.T163
instance Data.Reflection.B Data.Reflection.T164
instance Data.Reflection.B Data.Reflection.T165
instance Data.Reflection.B Data.Reflection.T166
instance Data.Reflection.B Data.Reflection.T167
instance Data.Reflection.B Data.Reflection.T168
instance Data.Reflection.B Data.Reflection.T169
instance Data.Reflection.B Data.Reflection.T17
instance Data.Reflection.B Data.Reflection.T170
instance Data.Reflection.B Data.Reflection.T171
instance Data.Reflection.B Data.Reflection.T172
instance Data.Reflection.B Data.Reflection.T173
instance Data.Reflection.B Data.Reflection.T174
instance Data.Reflection.B Data.Reflection.T175
instance Data.Reflection.B Data.Reflection.T176
instance Data.Reflection.B Data.Reflection.T177
instance Data.Reflection.B Data.Reflection.T178
instance Data.Reflection.B Data.Reflection.T179
instance Data.Reflection.B Data.Reflection.T18
instance Data.Reflection.B Data.Reflection.T180
instance Data.Reflection.B Data.Reflection.T181
instance Data.Reflection.B Data.Reflection.T182
instance Data.Reflection.B Data.Reflection.T183
instance Data.Reflection.B Data.Reflection.T184
instance Data.Reflection.B Data.Reflection.T185
instance Data.Reflection.B Data.Reflection.T186
instance Data.Reflection.B Data.Reflection.T187
instance Data.Reflection.B Data.Reflection.T188
instance Data.Reflection.B Data.Reflection.T189
instance Data.Reflection.B Data.Reflection.T19
instance Data.Reflection.B Data.Reflection.T190
instance Data.Reflection.B Data.Reflection.T191
instance Data.Reflection.B Data.Reflection.T192
instance Data.Reflection.B Data.Reflection.T193
instance Data.Reflection.B Data.Reflection.T194
instance Data.Reflection.B Data.Reflection.T195
instance Data.Reflection.B Data.Reflection.T196
instance Data.Reflection.B Data.Reflection.T197
instance Data.Reflection.B Data.Reflection.T198
instance Data.Reflection.B Data.Reflection.T199
instance Data.Reflection.B Data.Reflection.T2
instance Data.Reflection.B Data.Reflection.T20
instance Data.Reflection.B Data.Reflection.T200
instance Data.Reflection.B Data.Reflection.T201
instance Data.Reflection.B Data.Reflection.T202
instance Data.Reflection.B Data.Reflection.T203
instance Data.Reflection.B Data.Reflection.T204
instance Data.Reflection.B Data.Reflection.T205
instance Data.Reflection.B Data.Reflection.T206
instance Data.Reflection.B Data.Reflection.T207
instance Data.Reflection.B Data.Reflection.T208
instance Data.Reflection.B Data.Reflection.T209
instance Data.Reflection.B Data.Reflection.T21
instance Data.Reflection.B Data.Reflection.T210
instance Data.Reflection.B Data.Reflection.T211
instance Data.Reflection.B Data.Reflection.T212
instance Data.Reflection.B Data.Reflection.T213
instance Data.Reflection.B Data.Reflection.T214
instance Data.Reflection.B Data.Reflection.T215
instance Data.Reflection.B Data.Reflection.T216
instance Data.Reflection.B Data.Reflection.T217
instance Data.Reflection.B Data.Reflection.T218
instance Data.Reflection.B Data.Reflection.T219
instance Data.Reflection.B Data.Reflection.T22
instance Data.Reflection.B Data.Reflection.T220
instance Data.Reflection.B Data.Reflection.T221
instance Data.Reflection.B Data.Reflection.T222
instance Data.Reflection.B Data.Reflection.T223
instance Data.Reflection.B Data.Reflection.T224
instance Data.Reflection.B Data.Reflection.T225
instance Data.Reflection.B Data.Reflection.T226
instance Data.Reflection.B Data.Reflection.T227
instance Data.Reflection.B Data.Reflection.T228
instance Data.Reflection.B Data.Reflection.T229
instance Data.Reflection.B Data.Reflection.T23
instance Data.Reflection.B Data.Reflection.T230
instance Data.Reflection.B Data.Reflection.T231
instance Data.Reflection.B Data.Reflection.T232
instance Data.Reflection.B Data.Reflection.T233
instance Data.Reflection.B Data.Reflection.T234
instance Data.Reflection.B Data.Reflection.T235
instance Data.Reflection.B Data.Reflection.T236
instance Data.Reflection.B Data.Reflection.T237
instance Data.Reflection.B Data.Reflection.T238
instance Data.Reflection.B Data.Reflection.T239
instance Data.Reflection.B Data.Reflection.T24
instance Data.Reflection.B Data.Reflection.T240
instance Data.Reflection.B Data.Reflection.T241
instance Data.Reflection.B Data.Reflection.T242
instance Data.Reflection.B Data.Reflection.T243
instance Data.Reflection.B Data.Reflection.T244
instance Data.Reflection.B Data.Reflection.T245
instance Data.Reflection.B Data.Reflection.T246
instance Data.Reflection.B Data.Reflection.T247
instance Data.Reflection.B Data.Reflection.T248
instance Data.Reflection.B Data.Reflection.T249
instance Data.Reflection.B Data.Reflection.T25
instance Data.Reflection.B Data.Reflection.T250
instance Data.Reflection.B Data.Reflection.T251
instance Data.Reflection.B Data.Reflection.T252
instance Data.Reflection.B Data.Reflection.T253
instance Data.Reflection.B Data.Reflection.T254
instance Data.Reflection.B Data.Reflection.T255
instance Data.Reflection.B Data.Reflection.T26
instance Data.Reflection.B Data.Reflection.T27
instance Data.Reflection.B Data.Reflection.T28
instance Data.Reflection.B Data.Reflection.T29
instance Data.Reflection.B Data.Reflection.T3
instance Data.Reflection.B Data.Reflection.T30
instance Data.Reflection.B Data.Reflection.T31
instance Data.Reflection.B Data.Reflection.T32
instance Data.Reflection.B Data.Reflection.T33
instance Data.Reflection.B Data.Reflection.T34
instance Data.Reflection.B Data.Reflection.T35
instance Data.Reflection.B Data.Reflection.T36
instance Data.Reflection.B Data.Reflection.T37
instance Data.Reflection.B Data.Reflection.T38
instance Data.Reflection.B Data.Reflection.T39
instance Data.Reflection.B Data.Reflection.T4
instance Data.Reflection.B Data.Reflection.T40
instance Data.Reflection.B Data.Reflection.T41
instance Data.Reflection.B Data.Reflection.T42
instance Data.Reflection.B Data.Reflection.T43
instance Data.Reflection.B Data.Reflection.T44
instance Data.Reflection.B Data.Reflection.T45
instance Data.Reflection.B Data.Reflection.T46
instance Data.Reflection.B Data.Reflection.T47
instance Data.Reflection.B Data.Reflection.T48
instance Data.Reflection.B Data.Reflection.T49
instance Data.Reflection.B Data.Reflection.T5
instance Data.Reflection.B Data.Reflection.T50
instance Data.Reflection.B Data.Reflection.T51
instance Data.Reflection.B Data.Reflection.T52
instance Data.Reflection.B Data.Reflection.T53
instance Data.Reflection.B Data.Reflection.T54
instance Data.Reflection.B Data.Reflection.T55
instance Data.Reflection.B Data.Reflection.T56
instance Data.Reflection.B Data.Reflection.T57
instance Data.Reflection.B Data.Reflection.T58
instance Data.Reflection.B Data.Reflection.T59
instance Data.Reflection.B Data.Reflection.T6
instance Data.Reflection.B Data.Reflection.T60
instance Data.Reflection.B Data.Reflection.T61
instance Data.Reflection.B Data.Reflection.T62
instance Data.Reflection.B Data.Reflection.T63
instance Data.Reflection.B Data.Reflection.T64
instance Data.Reflection.B Data.Reflection.T65
instance Data.Reflection.B Data.Reflection.T66
instance Data.Reflection.B Data.Reflection.T67
instance Data.Reflection.B Data.Reflection.T68
instance Data.Reflection.B Data.Reflection.T69
instance Data.Reflection.B Data.Reflection.T7
instance Data.Reflection.B Data.Reflection.T70
instance Data.Reflection.B Data.Reflection.T71
instance Data.Reflection.B Data.Reflection.T72
instance Data.Reflection.B Data.Reflection.T73
instance Data.Reflection.B Data.Reflection.T74
instance Data.Reflection.B Data.Reflection.T75
instance Data.Reflection.B Data.Reflection.T76
instance Data.Reflection.B Data.Reflection.T77
instance Data.Reflection.B Data.Reflection.T78
instance Data.Reflection.B Data.Reflection.T79
instance Data.Reflection.B Data.Reflection.T8
instance Data.Reflection.B Data.Reflection.T80
instance Data.Reflection.B Data.Reflection.T81
instance Data.Reflection.B Data.Reflection.T82
instance Data.Reflection.B Data.Reflection.T83
instance Data.Reflection.B Data.Reflection.T84
instance Data.Reflection.B Data.Reflection.T85
instance Data.Reflection.B Data.Reflection.T86
instance Data.Reflection.B Data.Reflection.T87
instance Data.Reflection.B Data.Reflection.T88
instance Data.Reflection.B Data.Reflection.T89
instance Data.Reflection.B Data.Reflection.T9
instance Data.Reflection.B Data.Reflection.T90
instance Data.Reflection.B Data.Reflection.T91
instance Data.Reflection.B Data.Reflection.T92
instance Data.Reflection.B Data.Reflection.T93
instance Data.Reflection.B Data.Reflection.T94
instance Data.Reflection.B Data.Reflection.T95
instance Data.Reflection.B Data.Reflection.T96
instance Data.Reflection.B Data.Reflection.T97
instance Data.Reflection.B Data.Reflection.T98
instance Data.Reflection.B Data.Reflection.T99
instance GHC.Internal.Real.Fractional a => GHC.Internal.Real.Fractional (Language.Haskell.TH.Syntax.Q a)
instance forall k (s :: k) (f :: * -> *). Data.Reflection.Reifies s (Data.Reflection.ReifiedApplicative f) => GHC.Internal.Base.Functor (Data.Reflection.ReflectedApplicative f s)
instance forall k (s :: k) a. Data.Reflection.Reifies s (Data.Reflection.ReifiedMonoid a) => GHC.Internal.Base.Monoid (Data.Reflection.ReflectedMonoid a s)
instance GHC.Internal.Num.Num Language.Haskell.TH.Syntax.Exp
instance GHC.Internal.Num.Num a => GHC.Internal.Num.Num (Language.Haskell.TH.Syntax.Q a)
instance GHC.Internal.Num.Num Language.Haskell.TH.Syntax.Type
instance GHC.Internal.TypeNats.KnownNat n => Data.Reflection.Reifies n GHC.Num.Integer.Integer
instance GHC.Internal.TypeLits.KnownSymbol n => Data.Reflection.Reifies n GHC.Internal.Base.String
instance Data.Reflection.Reifies n GHC.Types.Int => Data.Reflection.Reifies (Data.Reflection.D n) GHC.Types.Int
instance Data.Reflection.Reifies n GHC.Types.Int => Data.Reflection.Reifies (Data.Reflection.PD n) GHC.Types.Int
instance Data.Reflection.Reifies n GHC.Types.Int => Data.Reflection.Reifies (Data.Reflection.SD n) GHC.Types.Int
instance (Data.Reflection.B b0, Data.Reflection.B b1, Data.Reflection.B b2, Data.Reflection.B b3, Data.Reflection.B b4, Data.Reflection.B b5, Data.Reflection.B b6, Data.Reflection.B b7, w0 GHC.Types.~ Data.Reflection.W b0 b1 b2 b3, w1 GHC.Types.~ Data.Reflection.W b4 b5 b6 b7) => Data.Reflection.Reifies (Data.Reflection.StableBox w0 w1 a) (Data.Reflection.Box a)
instance Data.Reflection.Reifies (Data.Reflection.StableBox w0 w1 a) (Data.Reflection.Box b) => Data.Reflection.Reifies (Data.Reflection.Stable w0 w1 a) b
instance Data.Reflection.Reifies Data.Reflection.Z GHC.Types.Int
instance forall k (s :: k) a. Data.Reflection.Reifies s (Data.Reflection.ReifiedMonoid a) => GHC.Internal.Base.Semigroup (Data.Reflection.ReflectedMonoid a s)
