module Hydra.Ext.Avro.Language where

import Hydra.All

import qualified Data.Set as S


avroLanguage :: Language m
avroLanguage :: forall m. Language m
avroLanguage = forall m. LanguageName -> LanguageConstraints m -> Language m
Language (String -> LanguageName
LanguageName String
"hydra/ext/avro") forall a b. (a -> b) -> a -> b
$ LanguageConstraints {
  languageConstraintsEliminationVariants :: Set EliminationVariant
languageConstraintsEliminationVariants = forall a. Set a
S.empty,
  languageConstraintsLiteralVariants :: Set LiteralVariant
languageConstraintsLiteralVariants = forall a. Ord a => [a] -> Set a
S.fromList [
    LiteralVariant
LiteralVariantBinary, LiteralVariant
LiteralVariantBoolean, LiteralVariant
LiteralVariantFloat, LiteralVariant
LiteralVariantInteger, LiteralVariant
LiteralVariantString],
  languageConstraintsFloatTypes :: Set FloatType
languageConstraintsFloatTypes = forall a. Ord a => [a] -> Set a
S.fromList [FloatType
FloatTypeFloat32, FloatType
FloatTypeFloat64],
  languageConstraintsFunctionVariants :: Set FunctionVariant
languageConstraintsFunctionVariants = forall a. Set a
S.empty,
  languageConstraintsIntegerTypes :: Set IntegerType
languageConstraintsIntegerTypes = forall a. Ord a => [a] -> Set a
S.fromList [IntegerType
IntegerTypeInt32, IntegerType
IntegerTypeInt64],
  languageConstraintsTermVariants :: Set TermVariant
languageConstraintsTermVariants = forall a. Ord a => [a] -> Set a
S.fromList [
    TermVariant
TermVariantList,
    TermVariant
TermVariantLiteral,
    TermVariant
TermVariantMap,
    TermVariant
TermVariantOptional,
    TermVariant
TermVariantRecord],
  languageConstraintsTypeVariants :: Set TypeVariant
languageConstraintsTypeVariants = forall a. Ord a => [a] -> Set a
S.fromList [
    TypeVariant
TypeVariantAnnotated,
    TypeVariant
TypeVariantList,
    TypeVariant
TypeVariantLiteral,
    TypeVariant
TypeVariantMap,
    TypeVariant
TypeVariantNominal,
    TypeVariant
TypeVariantOptional,
    TypeVariant
TypeVariantRecord],
  languageConstraintsTypes :: Type m -> Bool
languageConstraintsTypes = \Type m
typ -> case forall m. Type m -> Type m
stripType Type m
typ of
    TypeOptional (TypeOptional Type m
_) -> Bool
False
    Type m
_ -> Bool
True }