{-# LANGUAGE EmptyDataDecls #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE TemplateHaskellQuotes #-} module Hercules.CNix.Expr.Context ( context, evalContext, EvalState, Value', Attr', BindingsBuilder', module Hercules.CNix.Store.Context, (=:), ) where import qualified Data.Map as M import Hercules.CNix.Store.Context hiding (context) import qualified Language.C.Inline.Context as C import qualified Language.C.Inline.Cpp as C import qualified Language.C.Types as C import Protolude data EvalState data Value' data Attr' data BindingsBuilder' context :: C.Context context :: Context context = Context C.cppCtx Context -> Context -> Context forall a. Semigroup a => a -> a -> a <> Context C.fptrCtx Context -> Context -> Context forall a. Semigroup a => a -> a -> a <> Context C.bsCtx Context -> Context -> Context forall a. Semigroup a => a -> a -> a <> Context evalContext (=:) :: k -> a -> Map k a =: :: forall k a. k -> a -> Map k a (=:) = k -> a -> Map k a forall k a. k -> a -> Map k a M.singleton evalContext :: C.Context evalContext :: Context evalContext = Context forall a. Monoid a => a mempty { C.ctxTypesTable = C.TypeName "EvalState" =: [t|EvalState|] <> C.TypeName "Value" =: [t|Value'|] <> C.TypeName "Attr" =: [t|Attr'|] <> C.TypeName "BindingsBuilder" =: [t|BindingsBuilder'|] }