| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Nix.Frames
Description
Definitions of Frames. Frames are messages that gather and ship themself with a context related to the message. For example - the message about some exception would also gather, keep and bring with it the tracing information.
Synopsis
- data NixLevel
- type Frames = [NixFrame]
- askFrames :: (MonadReader e m, Has e Frames) => m Frames
- type Framed e (m :: Type -> Type) = (MonadReader e m, Has e Frames, MonadThrow m)
- data NixFrame = NixFrame {}
- newtype NixException = NixException Frames
- withFrame :: forall s e m a. (Framed e m, Exception s) => NixLevel -> s -> m a -> m a
- throwError :: forall s e m a. (Framed e m, Exception s, MonadThrow m) => s -> m a
- data TyCon
- data Proxy (t :: k) = Proxy
- class Typeable (a :: k)
- type TypeRep = SomeTypeRep
- data (a :: k1) :~~: (b :: k2) where
- data (a :: k) :~: (b :: k) where
- tyConPackage :: TyCon -> String
- tyConModule :: TyCon -> String
- tyConName :: TyCon -> String
- tyConFingerprint :: TyCon -> Fingerprint
- rnfTyCon :: TyCon -> ()
- typeRepFingerprint :: TypeRep -> Fingerprint
- trLiftedRep :: TypeRep LiftedRep
- typeRepTyCon :: TypeRep -> TyCon
- typeRep :: forall {k} proxy (a :: k). Typeable a => proxy a -> TypeRep
- rnfTypeRep :: TypeRep -> ()
- showsTypeRep :: TypeRep -> ShowS
- cast :: (Typeable a, Typeable b) => a -> Maybe b
- eqT :: forall {k} (a :: k) (b :: k). (Typeable a, Typeable b) => Maybe (a :~: b)
- decT :: forall {k} (a :: k) (b :: k). (Typeable a, Typeable b) => Either ((a :~: b) -> Void) (a :~: b)
- heqT :: forall {k1} {k2} (a :: k1) (b :: k2). (Typeable a, Typeable b) => Maybe (a :~~: b)
- hdecT :: forall {k1} {k2} (a :: k1) (b :: k2). (Typeable a, Typeable b) => Either ((a :~~: b) -> Void) (a :~~: b)
- gcast :: forall {k} (a :: k) (b :: k) c. (Typeable a, Typeable b) => c a -> Maybe (c b)
- gcast1 :: forall {k1} {k2} c (t :: k2 -> k1) (t' :: k2 -> k1) (a :: k2). (Typeable t, Typeable t') => c (t a) -> Maybe (c (t' a))
- gcast2 :: forall {k1} {k2} {k3} c (t :: k2 -> k3 -> k1) (t' :: k2 -> k3 -> k1) (a :: k2) (b :: k3). (Typeable t, Typeable t') => c (t a b) -> Maybe (c (t' a b))
- funResultTy :: TypeRep -> TypeRep -> Maybe TypeRep
- mkFunTy :: TypeRep -> TypeRep -> TypeRep
- splitTyConApp :: TypeRep -> (TyCon, [TypeRep])
- typeRepArgs :: TypeRep -> [TypeRep]
- typeOf1 :: Typeable t => t a -> TypeRep
- typeOf2 :: Typeable t => t a b -> TypeRep
- typeOf3 :: Typeable t => t a b c -> TypeRep
- typeOf4 :: Typeable t => t a b c d -> TypeRep
- typeOf5 :: Typeable t => t a b c d e -> TypeRep
- typeOf6 :: Typeable t => t a b c d e f -> TypeRep
- typeOf7 :: Typeable t => t a b c d e f g -> TypeRep
Documentation
Instances
| Bounded NixLevel Source # | |
| Enum NixLevel Source # | |
| Show NixLevel Source # | |
| Eq NixLevel Source # | |
| Ord NixLevel Source # | |
Defined in Nix.Frames | |
type Framed e (m :: Type -> Type) = (MonadReader e m, Has e Frames, MonadThrow m) Source #
Constructors
| NixFrame | |
Fields
| |
newtype NixException Source #
Constructors
| NixException Frames |
Instances
| Exception NixException Source # | |
Defined in Nix.Frames Methods toException :: NixException -> SomeException # fromException :: SomeException -> Maybe NixException # displayException :: NixException -> String # backtraceDesired :: NixException -> Bool # | |
| Show NixException Source # | |
Defined in Nix.Frames Methods showsPrec :: Int -> NixException -> ShowS # show :: NixException -> String # showList :: [NixException] -> ShowS # | |
throwError :: forall s e m a. (Framed e m, Exception s, MonadThrow m) => s -> m a Source #
Proxy is a type that holds no data, but has a phantom parameter of
arbitrary type (or even kind). Its use is to provide type information, even
though there is no value available of that type (or it may be too costly to
create one).
Historically, is a safer alternative to the
Proxy :: Proxy a idiom.undefined :: a
>>>Proxy :: Proxy (Void, Int -> Int)Proxy
Proxy can even hold types of higher kinds,
>>>Proxy :: Proxy EitherProxy
>>>Proxy :: Proxy FunctorProxy
>>>Proxy :: Proxy complicatedStructureProxy
Constructors
| Proxy |
Instances
| Generic1 (Proxy :: k -> Type) | |
Defined in GHC.Internal.Generics | |
| FoldableWithIndex Void (Proxy :: Type -> Type) | |
Defined in WithIndex Methods ifoldMap :: Monoid m => (Void -> a -> m) -> Proxy a -> m Source # ifoldMap' :: Monoid m => (Void -> a -> m) -> Proxy a -> m Source # ifoldr :: (Void -> a -> b -> b) -> b -> Proxy a -> b Source # ifoldl :: (Void -> b -> a -> b) -> b -> Proxy a -> b Source # ifoldr' :: (Void -> a -> b -> b) -> b -> Proxy a -> b Source # ifoldl' :: (Void -> b -> a -> b) -> b -> Proxy a -> b Source # | |
| FunctorWithIndex Void (Proxy :: Type -> Type) | |
| TraversableWithIndex Void (Proxy :: Type -> Type) | |
| RepeatWithIndex Void (Proxy :: Type -> Type) | |
| SemialignWithIndex Void (Proxy :: Type -> Type) | |
Defined in Data.Semialign.Internal | |
| ZipWithIndex Void (Proxy :: Type -> Type) | |
| EqP (Proxy :: k -> Type) | |
| OrdP (Proxy :: k -> Type) | |
| FromJSON1 (Proxy :: Type -> Type) | |
Defined in Data.Aeson.Types.FromJSON | |
| ToJSON1 (Proxy :: Type -> Type) | |
Defined in Data.Aeson.Types.ToJSON Methods liftToJSON :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> Proxy a -> Value Source # liftToJSONList :: (a -> Bool) -> (a -> Value) -> ([a] -> Value) -> [Proxy a] -> Value Source # liftToEncoding :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> Proxy a -> Encoding Source # liftToEncodingList :: (a -> Bool) -> (a -> Encoding) -> ([a] -> Encoding) -> [Proxy a] -> Encoding Source # | |
| MonadZip (Proxy :: Type -> Type) | Since: base-4.9.0.0 |
| Eq1 (Proxy :: Type -> Type) | Since: base-4.9.0.0 |
| Ord1 (Proxy :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Functor.Classes | |
| Read1 (Proxy :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Functor.Classes | |
| Show1 (Proxy :: Type -> Type) | Since: base-4.9.0.0 |
| Contravariant (Proxy :: Type -> Type) | |
| NFData1 (Proxy :: Type -> Type) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| Alternative (Proxy :: Type -> Type) | Since: base-4.9.0.0 |
| Applicative (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
| Functor (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
| Monad (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
| MonadPlus (Proxy :: Type -> Type) | Since: base-4.9.0.0 |
| Foldable (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Proxy m -> m # foldMap :: Monoid m => (a -> m) -> Proxy a -> m # foldMap' :: Monoid m => (a -> m) -> Proxy a -> m # foldr :: (a -> b -> b) -> b -> Proxy a -> b # foldr' :: (a -> b -> b) -> b -> Proxy a -> b # foldl :: (b -> a -> b) -> b -> Proxy a -> b # foldl' :: (b -> a -> b) -> b -> Proxy a -> b # foldr1 :: (a -> a -> a) -> Proxy a -> a # foldl1 :: (a -> a -> a) -> Proxy a -> a # elem :: Eq a => a -> Proxy a -> Bool # maximum :: Ord a => Proxy a -> a # minimum :: Ord a => Proxy a -> a # | |
| Traversable (Proxy :: Type -> Type) | Since: base-4.7.0.0 |
| Hashable1 (Proxy :: Type -> Type) | |
Defined in Data.Hashable.Class | |
| Align (Proxy :: Type -> Type) | |
Defined in Data.Semialign.Internal | |
| Repeat (Proxy :: Type -> Type) | |
Defined in Data.Semialign.Internal | |
| Semialign (Proxy :: Type -> Type) | |
| Unalign (Proxy :: Type -> Type) | |
| Unzip (Proxy :: Type -> Type) | |
| Zip (Proxy :: Type -> Type) | |
| FromJSON (Proxy a) | |
| ToJSON (Proxy a) | |
| NFData (Proxy a) | Since: deepseq-1.4.0.0 |
Defined in Control.DeepSeq | |
| Monoid (Proxy s) | Since: base-4.7.0.0 |
| Semigroup (Proxy s) | Since: base-4.9.0.0 |
| Data t => Data (Proxy t) | Since: base-4.7.0.0 |
Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Proxy t -> c (Proxy t) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Proxy t) # toConstr :: Proxy t -> Constr # dataTypeOf :: Proxy t -> DataType # dataCast1 :: Typeable t0 => (forall d. Data d => c (t0 d)) -> Maybe (c (Proxy t)) # dataCast2 :: Typeable t0 => (forall d e. (Data d, Data e) => c (t0 d e)) -> Maybe (c (Proxy t)) # gmapT :: (forall b. Data b => b -> b) -> Proxy t -> Proxy t # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Proxy t -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Proxy t -> r # gmapQ :: (forall d. Data d => d -> u) -> Proxy t -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Proxy t -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Proxy t -> m (Proxy t) # | |
| Bounded (Proxy t) | Since: base-4.7.0.0 |
| Enum (Proxy s) | Since: base-4.7.0.0 |
| Generic (Proxy t) | |
Defined in GHC.Internal.Generics | |
| Ix (Proxy s) | Since: base-4.7.0.0 |
Defined in GHC.Internal.Data.Proxy | |
| Read (Proxy t) | Since: base-4.7.0.0 |
| Show (Proxy s) | Since: base-4.7.0.0 |
| Eq (Proxy s) | Since: base-4.7.0.0 |
| Ord (Proxy s) | Since: base-4.7.0.0 |
Defined in GHC.Internal.Data.Proxy | |
| Hashable (Proxy a) | |
| Serialise (Proxy a) | Since: serialise-0.2.0.0 |
| type Rep1 (Proxy :: k -> Type) | Since: base-4.6.0.0 |
| type Rep (Proxy t) | Since: base-4.6.0.0 |
The class Typeable allows a concrete representation of a type to
be calculated.
Minimal complete definition
typeRep#
type TypeRep = SomeTypeRep #
A quantified type representation.
data (a :: k1) :~~: (b :: k2) where infix 4 #
Kind heterogeneous propositional equality. Like :~:, a :~~: b is
inhabited by a terminating value if and only if a is the same type as b.
Since: base-4.10.0.0
Instances
| Category ((:~~:) :: k -> k -> Type) | Since: base-4.10.0.0 |
| TestEquality ((:~~:) a :: k -> Type) | Since: base-4.10.0.0 |
Defined in GHC.Internal.Data.Type.Equality | |
| EqP ((:~~:) a :: k -> Type) | |
| GNFData ((:~~:) a :: k -> Type) | Since: some-1.0.4 |
Defined in Data.GADT.DeepSeq | |
| GCompare ((:~~:) a :: k -> Type) | Since: some-1.0.4 |
| GEq ((:~~:) a :: k -> Type) | Since: some-1.0.4 |
| k1 ~ k2 => GRead ((:~~:) a :: k2 -> Type) | Since: some-1.0.4 |
Defined in Data.GADT.Internal | |
| GShow ((:~~:) a :: k -> Type) | Since: some-1.0.4 |
Defined in Data.GADT.Internal | |
| OrdP ((:~~:) a :: k -> Type) | |
| NFData2 ((:~~:) :: Type -> Type -> Type) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| NFData1 ((:~~:) a :: Type -> Type) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| NFData (a :~~: b) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| (Typeable i, Typeable j, Typeable a, Typeable b, a ~~ b) => Data (a :~~: b) | Since: base-4.10.0.0 |
Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> (a :~~: b) -> c (a :~~: b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (a :~~: b) # toConstr :: (a :~~: b) -> Constr # dataTypeOf :: (a :~~: b) -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (a :~~: b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (a :~~: b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> (a :~~: b) -> a :~~: b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (a :~~: b) -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (a :~~: b) -> r # gmapQ :: (forall d. Data d => d -> u) -> (a :~~: b) -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> (a :~~: b) -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> (a :~~: b) -> m (a :~~: b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~~: b) -> m (a :~~: b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~~: b) -> m (a :~~: b) # | |
| a ~~ b => Bounded (a :~~: b) | Since: base-4.10.0.0 |
| a ~~ b => Enum (a :~~: b) | Since: base-4.10.0.0 |
Defined in GHC.Internal.Data.Type.Equality Methods succ :: (a :~~: b) -> a :~~: b # pred :: (a :~~: b) -> a :~~: b # fromEnum :: (a :~~: b) -> Int # enumFrom :: (a :~~: b) -> [a :~~: b] # enumFromThen :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] # enumFromTo :: (a :~~: b) -> (a :~~: b) -> [a :~~: b] # enumFromThenTo :: (a :~~: b) -> (a :~~: b) -> (a :~~: b) -> [a :~~: b] # | |
| a ~~ b => Read (a :~~: b) | Since: base-4.10.0.0 |
| Show (a :~~: b) | Since: base-4.10.0.0 |
| Eq (a :~~: b) | Since: base-4.10.0.0 |
| Ord (a :~~: b) | Since: base-4.10.0.0 |
Defined in GHC.Internal.Data.Type.Equality | |
data (a :: k) :~: (b :: k) where infix 4 #
Propositional equality. If a :~: b is inhabited by some terminating
value, then the type a is the same as the type b. To use this equality
in practice, pattern-match on the a :~: b to get out the Refl constructor;
in the body of the pattern-match, the compiler knows that a ~ b.
Since: base-4.7.0.0
Instances
| Category ((:~:) :: k -> k -> Type) | Since: base-4.7.0.0 |
| TestEquality ((:~:) a :: k -> Type) | Since: base-4.7.0.0 |
Defined in GHC.Internal.Data.Type.Equality | |
| EqP ((:~:) a :: k -> Type) | |
| GNFData ((:~:) a :: k -> Type) | Since: some-1.0.3 |
Defined in Data.GADT.DeepSeq | |
| GCompare ((:~:) a :: k -> Type) | |
| GEq ((:~:) a :: k -> Type) | |
| GRead ((:~:) a :: k -> Type) | |
Defined in Data.GADT.Internal | |
| GShow ((:~:) a :: k -> Type) | |
Defined in Data.GADT.Internal | |
| OrdP ((:~:) a :: k -> Type) | |
| NFData2 ((:~:) :: Type -> Type -> Type) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| NFData1 ((:~:) a) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| NFData (a :~: b) | Since: deepseq-1.4.3.0 |
Defined in Control.DeepSeq | |
| (a ~ b, Data a) => Data (a :~: b) | Since: base-4.7.0.0 |
Defined in GHC.Internal.Data.Data Methods gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> (a :~: b) -> c (a :~: b) # gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (a :~: b) # toConstr :: (a :~: b) -> Constr # dataTypeOf :: (a :~: b) -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (a :~: b)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (a :~: b)) # gmapT :: (forall b0. Data b0 => b0 -> b0) -> (a :~: b) -> a :~: b # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> (a :~: b) -> r # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> (a :~: b) -> r # gmapQ :: (forall d. Data d => d -> u) -> (a :~: b) -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> (a :~: b) -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> (a :~: b) -> m (a :~: b) # | |
| a ~ b => Bounded (a :~: b) | Since: base-4.7.0.0 |
| a ~ b => Enum (a :~: b) | Since: base-4.7.0.0 |
Defined in GHC.Internal.Data.Type.Equality Methods succ :: (a :~: b) -> a :~: b # pred :: (a :~: b) -> a :~: b # fromEnum :: (a :~: b) -> Int # enumFrom :: (a :~: b) -> [a :~: b] # enumFromThen :: (a :~: b) -> (a :~: b) -> [a :~: b] # enumFromTo :: (a :~: b) -> (a :~: b) -> [a :~: b] # enumFromThenTo :: (a :~: b) -> (a :~: b) -> (a :~: b) -> [a :~: b] # | |
| a ~ b => Read (a :~: b) | Since: base-4.7.0.0 |
| Show (a :~: b) | Since: base-4.7.0.0 |
| Eq (a :~: b) | Since: base-4.7.0.0 |
| Ord (a :~: b) | Since: base-4.7.0.0 |
Defined in GHC.Internal.Data.Type.Equality | |
tyConPackage :: TyCon -> String #
tyConModule :: TyCon -> String #
tyConFingerprint :: TyCon -> Fingerprint #
typeRepFingerprint :: TypeRep -> Fingerprint #
Takes a value of type a and returns a concrete representation
of that type.
Since: base-4.7.0.0
typeRepTyCon :: TypeRep -> TyCon #
Observe the type constructor of a quantified type representation.
typeRep :: forall {k} proxy (a :: k). Typeable a => proxy a -> TypeRep #
Takes a value of type a and returns a concrete representation
of that type.
Since: base-4.7.0.0
rnfTypeRep :: TypeRep -> () #
Force a TypeRep to normal form.
showsTypeRep :: TypeRep -> ShowS #
Show a type representation
eqT :: forall {k} (a :: k) (b :: k). (Typeable a, Typeable b) => Maybe (a :~: b) #
Extract a witness of equality of two types
Since: base-4.7.0.0
decT :: forall {k} (a :: k) (b :: k). (Typeable a, Typeable b) => Either ((a :~: b) -> Void) (a :~: b) #
Decide an equality of two types
Since: base-4.19.0.0
heqT :: forall {k1} {k2} (a :: k1) (b :: k2). (Typeable a, Typeable b) => Maybe (a :~~: b) #
Extract a witness of heterogeneous equality of two types
Since: base-4.18.0.0
hdecT :: forall {k1} {k2} (a :: k1) (b :: k2). (Typeable a, Typeable b) => Either ((a :~~: b) -> Void) (a :~~: b) #
Decide heterogeneous equality of two types.
Since: base-4.19.0.0
gcast :: forall {k} (a :: k) (b :: k) c. (Typeable a, Typeable b) => c a -> Maybe (c b) #
A flexible variation parameterised in a type constructor
gcast1 :: forall {k1} {k2} c (t :: k2 -> k1) (t' :: k2 -> k1) (a :: k2). (Typeable t, Typeable t') => c (t a) -> Maybe (c (t' a)) #
Cast over k1 -> k2
gcast2 :: forall {k1} {k2} {k3} c (t :: k2 -> k3 -> k1) (t' :: k2 -> k3 -> k1) (a :: k2) (b :: k3). (Typeable t, Typeable t') => c (t a b) -> Maybe (c (t' a b)) #
Cast over k1 -> k2 -> k3
funResultTy :: TypeRep -> TypeRep -> Maybe TypeRep #
Applies a type to a function type. Returns: Just u if the first argument
represents a function of type t -> u and the second argument represents a
function of type t. Otherwise, returns Nothing.
splitTyConApp :: TypeRep -> (TyCon, [TypeRep]) #
Splits a type constructor application. Note that if the type constructor is polymorphic, this will not return the kinds that were used.
typeRepArgs :: TypeRep -> [TypeRep] #
Observe the argument types of a type representation