Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hercules.CNix.Expr.Typed
Synopsis
- newtype Value a = Value {}
- type NixInt = Int64
- data NixFloat
- data NixString
- data NixPath
- data NixAttrs
- data NixList
- data NixFunction
- data NixPrimOp
- data NixPrimOpApp
- data NixExternal
- unsafeAssertType :: RawValue -> Value a
- data Match
- match :: Ptr EvalState -> RawValue -> IO (Either SomeException Match)
- match' :: Ptr EvalState -> RawValue -> IO Match
- getBool :: Value Bool -> IO Bool
- getInt :: Value NixInt -> IO Int64
- getStringIgnoreContext :: Value NixString -> IO ByteString
- hasContext :: Value NixString -> IO Bool
- class CheckType a where
- assertType :: (HasCallStack, MonadIO m, CheckType t) => Ptr EvalState -> RawValue -> m (Value t)
- class HasRawValueType s where
- getRawValueType :: Proxy s -> RawValueType
Documentation
Runtime-Typed Value. This implies that it has been forced, because otherwise the type would not be known.
This is distinct from Nix, which calls its objects Value
regardless if
they're thunks.
Instances
ToRawValue (Value a) Source # | Upcast |
Defined in Hercules.CNix.Expr | |
ToValue (Value a) Source # | Identity |
Defined in Hercules.CNix.Expr Associated Types type NixTypeFor (Value a) Source # | |
type NixTypeFor (Value a) Source # | |
Defined in Hercules.CNix.Expr |
data NixFunction Source #
Instances
CheckType NixFunction Source # | |
HasRawValueType NixFunction Source # | |
Defined in Hercules.CNix.Expr.Typed Methods getRawValueType :: Proxy NixFunction -> RawValueType Source # |
data NixPrimOpApp Source #
data NixExternal Source #
Instances
unsafeAssertType :: RawValue -> Value a Source #
assertType :: (HasCallStack, MonadIO m, CheckType t) => Ptr EvalState -> RawValue -> m (Value t) Source #
class HasRawValueType s where Source #
Methods
getRawValueType :: Proxy s -> RawValueType Source #
Instances
HasRawValueType Int64 Source # | |
Defined in Hercules.CNix.Expr.Typed Methods getRawValueType :: Proxy Int64 -> RawValueType Source # | |
HasRawValueType NixAttrs Source # | |
Defined in Hercules.CNix.Expr.Typed Methods | |
HasRawValueType NixFloat Source # | |
Defined in Hercules.CNix.Expr.Typed Methods | |
HasRawValueType NixFunction Source # | |
Defined in Hercules.CNix.Expr.Typed Methods getRawValueType :: Proxy NixFunction -> RawValueType Source # | |
HasRawValueType NixList Source # | |
Defined in Hercules.CNix.Expr.Typed Methods | |
HasRawValueType NixPath Source # | |
Defined in Hercules.CNix.Expr.Typed Methods | |
HasRawValueType NixString Source # | |
Defined in Hercules.CNix.Expr.Typed Methods | |
HasRawValueType () Source # | |
Defined in Hercules.CNix.Expr.Typed Methods getRawValueType :: Proxy () -> RawValueType Source # | |
HasRawValueType Bool Source # | |
Defined in Hercules.CNix.Expr.Typed Methods getRawValueType :: Proxy Bool -> RawValueType Source # |