souffle-haskell-1.0.0: Souffle Datalog bindings for Haskell

Safe HaskellNone
LanguageHaskell2010

Language.Souffle.Internal.Constraints

Description

A helper module for generating more user friendly type errors in the form of custom constraints. This is an internal module, not meant to be used directly.

Synopsis

Documentation

type family SimpleProduct (a :: Type) (f :: Type -> Type) :: Constraint where ... Source #

A helper type family used for generating a more user-friendly type error for incompatible types when generically deriving marshalling code for the Marshal typeclass.

The a type parameter is the original type, used when displaying the type error. The f type parameter should be equal to 'Rep a', used for analyzing the structure of the data type.

A type error is returned if the passed in type is not a simple product type consisting of only simple types like Int32, String and Text.

Equations

SimpleProduct a f = (ProductLike a f, OnlySimpleFields a f)