mirror of
https://github.com/zap-proto/haskell.git
synced 2026-10-30 15:05:00 +00:00
18 lines
497 B
Haskell
18 lines
497 B
Haskell
-- | Module: Capnp.New.Constraints
|
|
-- Description: convenience shorthands for various constraints.
|
|
{-# LANGUAGE ConstraintKinds #-}
|
|
{-# LANGUAGE FlexibleContexts #-}
|
|
{-# LANGUAGE TypeFamilies #-}
|
|
module Capnp.New.Constraints where
|
|
|
|
import qualified Capnp.New.Classes as C
|
|
import qualified Capnp.Repr as R
|
|
import qualified Capnp.Repr.Parsed as RP
|
|
|
|
-- | Constraints needed for @a@ to be a capnproto type parameter.
|
|
type TypeParam a =
|
|
( R.IsPtr a
|
|
, C.Parse a (RP.Parsed a)
|
|
)
|
|
|