packages feed

hydra 0.13.0 → 0.14.0

raw patch · 576 files changed

+193902/−151575 lines, 576 filesdep +regex-tdfadep −HsYAMLPVP ok

version bump matches the API change (PVP)

Dependencies added: regex-tdfa

Dependencies removed: HsYAML

API changes (from Hackage documentation)

- Hydra.Accessors: AccessorEdge :: AccessorNode -> AccessorPath -> AccessorNode -> AccessorEdge
- Hydra.Accessors: AccessorGraph :: [AccessorNode] -> [AccessorEdge] -> AccessorGraph
- Hydra.Accessors: AccessorNode :: Name -> String -> String -> AccessorNode
- Hydra.Accessors: AccessorPath :: [TermAccessor] -> AccessorPath
- Hydra.Accessors: TermAccessorAnnotatedBody :: TermAccessor
- Hydra.Accessors: TermAccessorApplicationArgument :: TermAccessor
- Hydra.Accessors: TermAccessorApplicationFunction :: TermAccessor
- Hydra.Accessors: TermAccessorInjectionTerm :: TermAccessor
- Hydra.Accessors: TermAccessorLambdaBody :: TermAccessor
- Hydra.Accessors: TermAccessorLetBinding :: Name -> TermAccessor
- Hydra.Accessors: TermAccessorLetBody :: TermAccessor
- Hydra.Accessors: TermAccessorListElement :: Int -> TermAccessor
- Hydra.Accessors: TermAccessorMapKey :: Int -> TermAccessor
- Hydra.Accessors: TermAccessorMapValue :: Int -> TermAccessor
- Hydra.Accessors: TermAccessorMaybeTerm :: TermAccessor
- Hydra.Accessors: TermAccessorProductTerm :: Int -> TermAccessor
- Hydra.Accessors: TermAccessorRecordField :: Name -> TermAccessor
- Hydra.Accessors: TermAccessorSetElement :: Int -> TermAccessor
- Hydra.Accessors: TermAccessorSumTerm :: TermAccessor
- Hydra.Accessors: TermAccessorTypeApplicationTerm :: TermAccessor
- Hydra.Accessors: TermAccessorTypeLambdaBody :: TermAccessor
- Hydra.Accessors: TermAccessorUnionCasesBranch :: Name -> TermAccessor
- Hydra.Accessors: TermAccessorUnionCasesDefault :: TermAccessor
- Hydra.Accessors: TermAccessorWrappedTerm :: TermAccessor
- Hydra.Accessors: [accessorEdgePath] :: AccessorEdge -> AccessorPath
- Hydra.Accessors: [accessorEdgeSource] :: AccessorEdge -> AccessorNode
- Hydra.Accessors: [accessorEdgeTarget] :: AccessorEdge -> AccessorNode
- Hydra.Accessors: [accessorGraphEdges] :: AccessorGraph -> [AccessorEdge]
- Hydra.Accessors: [accessorGraphNodes] :: AccessorGraph -> [AccessorNode]
- Hydra.Accessors: [accessorNodeId] :: AccessorNode -> String
- Hydra.Accessors: [accessorNodeLabel] :: AccessorNode -> String
- Hydra.Accessors: [accessorNodeName] :: AccessorNode -> Name
- Hydra.Accessors: [unAccessorPath] :: AccessorPath -> [TermAccessor]
- Hydra.Accessors: _AccessorEdge :: Name
- Hydra.Accessors: _AccessorEdge_path :: Name
- Hydra.Accessors: _AccessorEdge_source :: Name
- Hydra.Accessors: _AccessorEdge_target :: Name
- Hydra.Accessors: _AccessorGraph :: Name
- Hydra.Accessors: _AccessorGraph_edges :: Name
- Hydra.Accessors: _AccessorGraph_nodes :: Name
- Hydra.Accessors: _AccessorNode :: Name
- Hydra.Accessors: _AccessorNode_id :: Name
- Hydra.Accessors: _AccessorNode_label :: Name
- Hydra.Accessors: _AccessorNode_name :: Name
- Hydra.Accessors: _AccessorPath :: Name
- Hydra.Accessors: _TermAccessor :: Name
- Hydra.Accessors: _TermAccessor_annotatedBody :: Name
- Hydra.Accessors: _TermAccessor_applicationArgument :: Name
- Hydra.Accessors: _TermAccessor_applicationFunction :: Name
- Hydra.Accessors: _TermAccessor_injectionTerm :: Name
- Hydra.Accessors: _TermAccessor_lambdaBody :: Name
- Hydra.Accessors: _TermAccessor_letBinding :: Name
- Hydra.Accessors: _TermAccessor_letBody :: Name
- Hydra.Accessors: _TermAccessor_listElement :: Name
- Hydra.Accessors: _TermAccessor_mapKey :: Name
- Hydra.Accessors: _TermAccessor_mapValue :: Name
- Hydra.Accessors: _TermAccessor_maybeTerm :: Name
- Hydra.Accessors: _TermAccessor_productTerm :: Name
- Hydra.Accessors: _TermAccessor_recordField :: Name
- Hydra.Accessors: _TermAccessor_setElement :: Name
- Hydra.Accessors: _TermAccessor_sumTerm :: Name
- Hydra.Accessors: _TermAccessor_typeApplicationTerm :: Name
- Hydra.Accessors: _TermAccessor_typeLambdaBody :: Name
- Hydra.Accessors: _TermAccessor_unionCasesBranch :: Name
- Hydra.Accessors: _TermAccessor_unionCasesDefault :: Name
- Hydra.Accessors: _TermAccessor_wrappedTerm :: Name
- Hydra.Accessors: data AccessorEdge
- Hydra.Accessors: data AccessorGraph
- Hydra.Accessors: data AccessorNode
- Hydra.Accessors: data TermAccessor
- Hydra.Accessors: instance GHC.Classes.Eq Hydra.Accessors.AccessorEdge
- Hydra.Accessors: instance GHC.Classes.Eq Hydra.Accessors.AccessorGraph
- Hydra.Accessors: instance GHC.Classes.Eq Hydra.Accessors.AccessorNode
- Hydra.Accessors: instance GHC.Classes.Eq Hydra.Accessors.AccessorPath
- Hydra.Accessors: instance GHC.Classes.Eq Hydra.Accessors.TermAccessor
- Hydra.Accessors: instance GHC.Classes.Ord Hydra.Accessors.AccessorEdge
- Hydra.Accessors: instance GHC.Classes.Ord Hydra.Accessors.AccessorGraph
- Hydra.Accessors: instance GHC.Classes.Ord Hydra.Accessors.AccessorNode
- Hydra.Accessors: instance GHC.Classes.Ord Hydra.Accessors.AccessorPath
- Hydra.Accessors: instance GHC.Classes.Ord Hydra.Accessors.TermAccessor
- Hydra.Accessors: instance GHC.Read.Read Hydra.Accessors.AccessorEdge
- Hydra.Accessors: instance GHC.Read.Read Hydra.Accessors.AccessorGraph
- Hydra.Accessors: instance GHC.Read.Read Hydra.Accessors.AccessorNode
- Hydra.Accessors: instance GHC.Read.Read Hydra.Accessors.AccessorPath
- Hydra.Accessors: instance GHC.Read.Read Hydra.Accessors.TermAccessor
- Hydra.Accessors: instance GHC.Show.Show Hydra.Accessors.AccessorEdge
- Hydra.Accessors: instance GHC.Show.Show Hydra.Accessors.AccessorGraph
- Hydra.Accessors: instance GHC.Show.Show Hydra.Accessors.AccessorNode
- Hydra.Accessors: instance GHC.Show.Show Hydra.Accessors.AccessorPath
- Hydra.Accessors: instance GHC.Show.Show Hydra.Accessors.TermAccessor
- Hydra.Accessors: newtype AccessorPath
- Hydra.Adapt.Literals: comparePrecision :: Precision -> Precision -> Comparison
- Hydra.Adapt.Literals: convertFloatValue :: FloatType -> FloatValue -> FloatValue
- Hydra.Adapt.Literals: convertIntegerValue :: IntegerType -> IntegerValue -> IntegerValue
- Hydra.Adapt.Literals: disclaimer :: Bool -> String -> String -> String
- Hydra.Adapt.Literals: floatAdapter :: FloatType -> Flow AdapterContext (Adapter t0 t1 FloatType FloatType FloatValue FloatValue)
- Hydra.Adapt.Literals: integerAdapter :: IntegerType -> Flow AdapterContext (Adapter t0 t1 IntegerType IntegerType IntegerValue IntegerValue)
- Hydra.Adapt.Literals: literalAdapter :: LiteralType -> Flow AdapterContext (Adapter t0 t0 LiteralType LiteralType Literal Literal)
- Hydra.Adapt.Modules: adaptTypeToLanguage :: Language -> Type -> Flow Graph Type
- Hydra.Adapt.Modules: adaptTypeToLanguageAndEncode :: Language -> (Type -> Flow Graph t0) -> Type -> Flow Graph t0
- Hydra.Adapt.Modules: adaptedModuleDefinitions :: Language -> Module -> Flow Graph [Definition]
- Hydra.Adapt.Modules: constructCoder :: Language -> (Term -> Flow t0 t1) -> Type -> Flow Graph (Coder t0 t2 Term t1)
- Hydra.Adapt.Modules: languageAdapter :: Language -> Type -> Flow Graph (Adapter t0 t1 Type Type Term Term)
- Hydra.Adapt.Modules: transformModule :: Language -> (Term -> Flow t0 t1) -> (Module -> Map Type (Coder t0 t2 Term t1) -> [(Binding, TypeApplicationTerm)] -> Flow Graph t3) -> Module -> Flow Graph t3
- Hydra.Adapt.Simple: adaptDataGraph :: LanguageConstraints -> Bool -> Graph -> Flow Graph Graph
- Hydra.Adapt.Simple: adaptFloatType :: LanguageConstraints -> FloatType -> Maybe FloatType
- Hydra.Adapt.Simple: adaptGraphSchema :: Ord t0 => LanguageConstraints -> Map LiteralType LiteralType -> Map t0 Type -> Flow t1 (Map t0 Type)
- Hydra.Adapt.Simple: adaptIntegerType :: LanguageConstraints -> IntegerType -> Maybe IntegerType
- Hydra.Adapt.Simple: adaptLambdaDomains :: LanguageConstraints -> Map LiteralType LiteralType -> (t0 -> Flow t1 Term) -> t0 -> Flow t1 Term
- Hydra.Adapt.Simple: adaptLiteral :: LiteralType -> Literal -> Literal
- Hydra.Adapt.Simple: adaptLiteralType :: LanguageConstraints -> LiteralType -> Maybe LiteralType
- Hydra.Adapt.Simple: adaptLiteralTypesMap :: LanguageConstraints -> Map LiteralType LiteralType
- Hydra.Adapt.Simple: adaptLiteralValue :: Ord t0 => Map t0 LiteralType -> t0 -> Literal -> Literal
- Hydra.Adapt.Simple: adaptNestedTypes :: LanguageConstraints -> Map LiteralType LiteralType -> (t0 -> Flow t1 Term) -> t0 -> Flow t1 Term
- Hydra.Adapt.Simple: adaptPrimitive :: LanguageConstraints -> Map LiteralType LiteralType -> Primitive -> Flow t0 Primitive
- Hydra.Adapt.Simple: adaptTerm :: LanguageConstraints -> Map LiteralType LiteralType -> Term -> Flow Graph Term
- Hydra.Adapt.Simple: adaptType :: LanguageConstraints -> Map LiteralType LiteralType -> Type -> Flow t0 Type
- Hydra.Adapt.Simple: adaptTypeScheme :: LanguageConstraints -> Map LiteralType LiteralType -> TypeScheme -> Flow t0 TypeScheme
- Hydra.Adapt.Simple: dataGraphToDefinitions :: LanguageConstraints -> Bool -> Bool -> Bool -> Bool -> Graph -> [Namespace] -> Flow Graph (Graph, [[TermDefinition]])
- Hydra.Adapt.Simple: literalTypeSupported :: LanguageConstraints -> LiteralType -> Bool
- Hydra.Adapt.Simple: pushTypeAppsInward :: Term -> Term
- Hydra.Adapt.Simple: schemaGraphToDefinitions :: LanguageConstraints -> Graph -> [[Name]] -> Flow Graph (Map Name Type, [[TypeDefinition]])
- Hydra.Adapt.Simple: termAlternatives :: Term -> Flow Graph [Term]
- Hydra.Adapt.Simple: typeAlternatives :: Type -> [Type]
- Hydra.Adapt.Terms: fieldAdapter :: FieldType -> Flow AdapterContext (Adapter AdapterContext AdapterContext FieldType FieldType Field Field)
- Hydra.Adapt.Terms: forTypeReference :: Name -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: functionProxyName :: Name
- Hydra.Adapt.Terms: functionProxyType :: t0 -> Type
- Hydra.Adapt.Terms: functionToUnion :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: lambdaToMonotype :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: maybeToList :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: passApplication :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: passEither :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: passForall :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: passFunction :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: passList :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: passLiteral :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: passMap :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: passOptional :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: passRecord :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: passSet :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: passUnion :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: passUnit :: t0 -> Flow t1 (Adapter t2 t3 Type Type Term Term)
- Hydra.Adapt.Terms: passWrapped :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: setToList :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: simplifyApplication :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: termAdapter :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: unionToRecord :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Terms: unionTypeToRecordType :: RowType -> RowType
- Hydra.Adapt.Terms: unitToRecord :: t0 -> Flow t1 (Adapter t2 t3 Type Type Term Term)
- Hydra.Adapt.Terms: withGraphContext :: Flow Graph t0 -> Flow AdapterContext t0
- Hydra.Adapt.Terms: wrapToUnwrapped :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Adapt.Utils: bidirectional :: (CoderDirection -> t0 -> Flow t1 t0) -> Coder t1 t1 t0 t0
- Hydra.Adapt.Utils: chooseAdapter :: (t0 -> Flow t1 [Adapter t2 t3 t0 t0 t4 t4]) -> (t0 -> Bool) -> (t0 -> String) -> (t0 -> String) -> t0 -> Flow t1 (Adapter t2 t3 t0 t0 t4 t4)
- Hydra.Adapt.Utils: composeCoders :: Coder t0 t1 t2 t3 -> Coder t0 t1 t3 t4 -> Coder t0 t1 t2 t4
- Hydra.Adapt.Utils: encodeDecode :: CoderDirection -> Coder t0 t0 t1 t1 -> t1 -> Flow t0 t1
- Hydra.Adapt.Utils: floatTypeIsSupported :: LanguageConstraints -> FloatType -> Bool
- Hydra.Adapt.Utils: idAdapter :: t0 -> Adapter t1 t2 t0 t0 t3 t3
- Hydra.Adapt.Utils: idCoder :: Coder t0 t1 t2 t2
- Hydra.Adapt.Utils: integerTypeIsSupported :: LanguageConstraints -> IntegerType -> Bool
- Hydra.Adapt.Utils: literalTypeIsSupported :: LanguageConstraints -> LiteralType -> Bool
- Hydra.Adapt.Utils: nameToFilePath :: CaseConvention -> CaseConvention -> FileExtension -> Name -> String
- Hydra.Adapt.Utils: typeIsSupported :: LanguageConstraints -> Type -> Bool
- Hydra.Adapt.Utils: unidirectionalCoder :: (t0 -> Flow t1 t2) -> Coder t1 t3 t0 t2
- Hydra.Annotations: withDepth :: Name -> (Int -> Flow t0 t1) -> Flow t0 t1
- Hydra.CoderUtils: analyzeFunctionTermInline :: (t0 -> TypeContext) -> (TypeContext -> t0 -> t0) -> t0 -> Term -> Flow t1 (FunctionStructure t0)
- Hydra.CoderUtils: analyzeFunctionTermNoInfer :: (t0 -> TypeContext) -> (TypeContext -> t0 -> t0) -> t0 -> Term -> Flow t1 (FunctionStructure t0)
- Hydra.CoderUtils: analyzeFunctionTermNoInferWith :: (TypeContext -> Binding -> Maybe Term) -> (t0 -> TypeContext) -> (TypeContext -> t0 -> t0) -> t0 -> Term -> Flow t1 (FunctionStructure t0)
- Hydra.CoderUtils: analyzeFunctionTermNoInferWith_finish :: t0 -> [Name] -> [Name] -> [Binding] -> [Type] -> [Type] -> Term -> Flow t1 (FunctionStructure t0)
- Hydra.CoderUtils: analyzeFunctionTermNoInferWith_gather :: (TypeContext -> Binding -> Maybe Term) -> (t0 -> TypeContext) -> (TypeContext -> t0 -> t0) -> Bool -> t0 -> [Name] -> [Name] -> [Binding] -> [Type] -> [Type] -> Term -> Flow t1 (FunctionStructure t0)
- Hydra.CoderUtils: commentsFromElement :: Binding -> Flow Graph (Maybe String)
- Hydra.CoderUtils: inCoderGraphContext :: (t0 -> t1) -> (t0 -> t2) -> (t1 -> t2 -> t0) -> Flow t1 t3 -> Flow t0 t3
- Hydra.CoderUtils: tryTypeOf :: String -> TypeContext -> Term -> Flow t0 Type
- Hydra.CoderUtils: updateCoderMetadata :: (t0 -> t1) -> (t2 -> t3 -> t0) -> (t0 -> t2) -> (t1 -> t3) -> Flow t0 ()
- Hydra.CoderUtils: withGraphBindings :: (t0 -> Graph) -> (Graph -> t1 -> t0) -> (t0 -> t1) -> [Binding] -> Flow t0 t2 -> Flow t0 t2
- Hydra.CoderUtils: withUpdatedCoderGraph :: (t0 -> t1) -> (t0 -> t2) -> (t1 -> t2 -> t0) -> (t1 -> t1) -> Flow t0 t3 -> Flow t0 t3
- Hydra.Compute: Adapter :: Bool -> t1 -> t2 -> Coder s1 s2 v1 v2 -> Adapter s1 s2 t1 t2 v1 v2
- Hydra.Compute: Bicoder :: (t1 -> Adapter s1 s2 t1 t2 v1 v2) -> (t2 -> Adapter s2 s1 t2 t1 v2 v1) -> Bicoder s1 s2 t1 t2 v1 v2
- Hydra.Compute: Coder :: (v1 -> Flow s1 v2) -> (v2 -> Flow s2 v1) -> Coder s1 s2 v1 v2
- Hydra.Compute: Flow :: (s -> Trace -> FlowState s v) -> Flow s v
- Hydra.Compute: FlowState :: Maybe v -> s -> Trace -> FlowState s v
- Hydra.Compute: Trace :: [String] -> [String] -> Map Name Term -> Trace
- Hydra.Compute: [adapterCoder] :: Adapter s1 s2 t1 t2 v1 v2 -> Coder s1 s2 v1 v2
- Hydra.Compute: [adapterIsLossy] :: Adapter s1 s2 t1 t2 v1 v2 -> Bool
- Hydra.Compute: [adapterSource] :: Adapter s1 s2 t1 t2 v1 v2 -> t1
- Hydra.Compute: [adapterTarget] :: Adapter s1 s2 t1 t2 v1 v2 -> t2
- Hydra.Compute: [bicoderDecode] :: Bicoder s1 s2 t1 t2 v1 v2 -> t2 -> Adapter s2 s1 t2 t1 v2 v1
- Hydra.Compute: [bicoderEncode] :: Bicoder s1 s2 t1 t2 v1 v2 -> t1 -> Adapter s1 s2 t1 t2 v1 v2
- Hydra.Compute: [coderDecode] :: Coder s1 s2 v1 v2 -> v2 -> Flow s2 v1
- Hydra.Compute: [coderEncode] :: Coder s1 s2 v1 v2 -> v1 -> Flow s1 v2
- Hydra.Compute: [flowStateState] :: FlowState s v -> s
- Hydra.Compute: [flowStateTrace] :: FlowState s v -> Trace
- Hydra.Compute: [flowStateValue] :: FlowState s v -> Maybe v
- Hydra.Compute: [traceMessages] :: Trace -> [String]
- Hydra.Compute: [traceOther] :: Trace -> Map Name Term
- Hydra.Compute: [traceStack] :: Trace -> [String]
- Hydra.Compute: [unFlow] :: Flow s v -> s -> Trace -> FlowState s v
- Hydra.Compute: _Adapter :: Name
- Hydra.Compute: _Adapter_coder :: Name
- Hydra.Compute: _Adapter_isLossy :: Name
- Hydra.Compute: _Adapter_source :: Name
- Hydra.Compute: _Adapter_target :: Name
- Hydra.Compute: _Bicoder :: Name
- Hydra.Compute: _Bicoder_decode :: Name
- Hydra.Compute: _Bicoder_encode :: Name
- Hydra.Compute: _Coder :: Name
- Hydra.Compute: _Coder_decode :: Name
- Hydra.Compute: _Coder_encode :: Name
- Hydra.Compute: _Flow :: Name
- Hydra.Compute: _FlowState :: Name
- Hydra.Compute: _FlowState_state :: Name
- Hydra.Compute: _FlowState_trace :: Name
- Hydra.Compute: _FlowState_value :: Name
- Hydra.Compute: _Trace :: Name
- Hydra.Compute: _Trace_messages :: Name
- Hydra.Compute: _Trace_other :: Name
- Hydra.Compute: _Trace_stack :: Name
- Hydra.Compute: data Adapter s1 s2 t1 t2 v1 v2
- Hydra.Compute: data Bicoder s1 s2 t1 t2 v1 v2
- Hydra.Compute: data Coder s1 s2 v1 v2
- Hydra.Compute: data FlowState s v
- Hydra.Compute: data Trace
- Hydra.Compute: instance (GHC.Classes.Eq v, GHC.Classes.Eq s) => GHC.Classes.Eq (Hydra.Compute.FlowState s v)
- Hydra.Compute: instance (GHC.Classes.Ord v, GHC.Classes.Ord s) => GHC.Classes.Ord (Hydra.Compute.FlowState s v)
- Hydra.Compute: instance (GHC.Read.Read v, GHC.Read.Read s) => GHC.Read.Read (Hydra.Compute.FlowState s v)
- Hydra.Compute: instance (GHC.Show.Show v, GHC.Show.Show s) => GHC.Show.Show (Hydra.Compute.FlowState s v)
- Hydra.Compute: instance GHC.Classes.Eq Hydra.Compute.Trace
- Hydra.Compute: instance GHC.Classes.Ord Hydra.Compute.Trace
- Hydra.Compute: instance GHC.Read.Read Hydra.Compute.Trace
- Hydra.Compute: instance GHC.Show.Show Hydra.Compute.Trace
- Hydra.Compute: newtype Flow s v
- Hydra.Constants: placeholderName :: Name
- Hydra.Constraints: PathEquation :: Path -> Path -> PathEquation
- Hydra.Constraints: PatternImplication :: Pattern -> Pattern -> PatternImplication
- Hydra.Constraints: [pathEquationLeft] :: PathEquation -> Path
- Hydra.Constraints: [pathEquationRight] :: PathEquation -> Path
- Hydra.Constraints: [patternImplicationAntecedent] :: PatternImplication -> Pattern
- Hydra.Constraints: [patternImplicationConsequent] :: PatternImplication -> Pattern
- Hydra.Constraints: _PathEquation :: Name
- Hydra.Constraints: _PathEquation_left :: Name
- Hydra.Constraints: _PathEquation_right :: Name
- Hydra.Constraints: _PatternImplication :: Name
- Hydra.Constraints: _PatternImplication_antecedent :: Name
- Hydra.Constraints: _PatternImplication_consequent :: Name
- Hydra.Constraints: data PathEquation
- Hydra.Constraints: data PatternImplication
- Hydra.Constraints: instance GHC.Classes.Eq Hydra.Constraints.PathEquation
- Hydra.Constraints: instance GHC.Classes.Eq Hydra.Constraints.PatternImplication
- Hydra.Constraints: instance GHC.Classes.Ord Hydra.Constraints.PathEquation
- Hydra.Constraints: instance GHC.Classes.Ord Hydra.Constraints.PatternImplication
- Hydra.Constraints: instance GHC.Read.Read Hydra.Constraints.PathEquation
- Hydra.Constraints: instance GHC.Read.Read Hydra.Constraints.PatternImplication
- Hydra.Constraints: instance GHC.Show.Show Hydra.Constraints.PathEquation
- Hydra.Constraints: instance GHC.Show.Show Hydra.Constraints.PatternImplication
- Hydra.Core: RowType :: Name -> [FieldType] -> RowType
- Hydra.Core: WrappedType :: Name -> Type -> WrappedType
- Hydra.Core: [rowTypeFields] :: RowType -> [FieldType]
- Hydra.Core: [rowTypeTypeName] :: RowType -> Name
- Hydra.Core: [wrappedTypeBody] :: WrappedType -> Type
- Hydra.Core: [wrappedTypeTypeName] :: WrappedType -> Name
- Hydra.Core: _RowType :: Name
- Hydra.Core: _RowType_fields :: Name
- Hydra.Core: _RowType_typeName :: Name
- Hydra.Core: _WrappedType :: Name
- Hydra.Core: _WrappedType_body :: Name
- Hydra.Core: _WrappedType_typeName :: Name
- Hydra.Core: data RowType
- Hydra.Core: data WrappedType
- Hydra.Core: instance GHC.Classes.Eq Hydra.Core.RowType
- Hydra.Core: instance GHC.Classes.Eq Hydra.Core.WrappedType
- Hydra.Core: instance GHC.Classes.Ord Hydra.Core.RowType
- Hydra.Core: instance GHC.Classes.Ord Hydra.Core.WrappedType
- Hydra.Core: instance GHC.Read.Read Hydra.Core.RowType
- Hydra.Core: instance GHC.Read.Read Hydra.Core.WrappedType
- Hydra.Core: instance GHC.Show.Show Hydra.Core.RowType
- Hydra.Core: instance GHC.Show.Show Hydra.Core.WrappedType
- Hydra.Decode.Accessors: accessorEdge :: Graph -> Term -> Either DecodingError AccessorEdge
- Hydra.Decode.Accessors: accessorGraph :: Graph -> Term -> Either DecodingError AccessorGraph
- Hydra.Decode.Accessors: accessorNode :: Graph -> Term -> Either DecodingError AccessorNode
- Hydra.Decode.Accessors: accessorPath :: Graph -> Term -> Either DecodingError AccessorPath
- Hydra.Decode.Accessors: termAccessor :: Graph -> Term -> Either DecodingError TermAccessor
- Hydra.Decode.Compute: flowState :: (Graph -> Term -> Either DecodingError t0) -> (Graph -> Term -> Either DecodingError t1) -> Graph -> Term -> Either DecodingError (FlowState t0 t1)
- Hydra.Decode.Compute: trace :: Graph -> Term -> Either DecodingError Trace
- Hydra.Decode.Constraints: pathEquation :: Graph -> Term -> Either DecodingError PathEquation
- Hydra.Decode.Constraints: patternImplication :: Graph -> Term -> Either DecodingError PatternImplication
- Hydra.Decode.Core: rowType :: Graph -> Term -> Either DecodingError RowType
- Hydra.Decode.Core: wrappedType :: Graph -> Term -> Either DecodingError WrappedType
- Hydra.Decode.Grammar: constant :: Graph -> Term -> Either DecodingError Constant
- Hydra.Decode.Grammar: grammar :: Graph -> Term -> Either DecodingError Grammar
- Hydra.Decode.Grammar: label :: Graph -> Term -> Either DecodingError Label
- Hydra.Decode.Grammar: labeledPattern :: Graph -> Term -> Either DecodingError LabeledPattern
- Hydra.Decode.Grammar: pattern :: Graph -> Term -> Either DecodingError Pattern
- Hydra.Decode.Grammar: production :: Graph -> Term -> Either DecodingError Production
- Hydra.Decode.Grammar: regex :: Graph -> Term -> Either DecodingError Regex
- Hydra.Decode.Grammar: symbol :: Graph -> Term -> Either DecodingError Symbol
- Hydra.Decode.Testing: jsonCoderTestCase :: Graph -> Term -> Either DecodingError JsonCoderTestCase
- Hydra.Decode.Typing: inferenceContext :: Graph -> Term -> Either DecodingError InferenceContext
- Hydra.Decode.Typing: typeContext :: Graph -> Term -> Either DecodingError TypeContext
- Hydra.Decode.Util: decodingError :: Graph -> Term -> Either DecodingError DecodingError
- Hydra.Decode.Workflow: hydraSchemaSpec :: Graph -> Term -> Either DecodingError HydraSchemaSpec
- Hydra.Decode.Workflow: schemaSpec :: Graph -> Term -> Either DecodingError SchemaSpec
- Hydra.Decode.Workflow: transformWorkflow :: Graph -> Term -> Either DecodingError TransformWorkflow
- Hydra.Dsl.Grammars: (>:) :: String -> Pattern -> Pattern
- Hydra.Dsl.Grammars: alts :: [Pattern] -> Pattern
- Hydra.Dsl.Grammars: define :: String -> [Pattern] -> Production
- Hydra.Dsl.Grammars: ignored :: Pattern -> Pattern
- Hydra.Dsl.Grammars: infixr 0 >:
- Hydra.Dsl.Grammars: instance Data.String.IsString Hydra.Grammar.Pattern
- Hydra.Dsl.Grammars: list :: [Pattern] -> Pattern
- Hydra.Dsl.Grammars: nil :: Pattern
- Hydra.Dsl.Grammars: opt :: Pattern -> Pattern
- Hydra.Dsl.Grammars: plus :: Pattern -> Pattern
- Hydra.Dsl.Grammars: regex :: String -> Pattern
- Hydra.Dsl.Grammars: sep :: Pattern -> Pattern -> Pattern
- Hydra.Dsl.Grammars: sepp :: Pattern -> Pattern -> Pattern
- Hydra.Dsl.Grammars: star :: Pattern -> Pattern
- Hydra.Dsl.Grammars: symbol :: String -> Pattern
- Hydra.Dsl.Grammars: terminal :: String -> Pattern
- Hydra.Dsl.Meta.Accessors: accessorEdge :: TTerm AccessorNode -> TTerm AccessorPath -> TTerm AccessorNode -> TTerm AccessorEdge
- Hydra.Dsl.Meta.Accessors: accessorEdgePath :: TTerm a
- Hydra.Dsl.Meta.Accessors: accessorEdgeSource :: TTerm a
- Hydra.Dsl.Meta.Accessors: accessorEdgeTarget :: TTerm a
- Hydra.Dsl.Meta.Accessors: accessorGraph :: TTerm [AccessorNode] -> TTerm [AccessorEdge] -> TTerm AccessorGraph
- Hydra.Dsl.Meta.Accessors: accessorGraphEdges :: TTerm a
- Hydra.Dsl.Meta.Accessors: accessorGraphNodes :: TTerm a
- Hydra.Dsl.Meta.Accessors: accessorNode :: TTerm Name -> TTerm String -> TTerm String -> TTerm AccessorNode
- Hydra.Dsl.Meta.Accessors: accessorNodeId :: TTerm a
- Hydra.Dsl.Meta.Accessors: accessorNodeLabel :: TTerm a
- Hydra.Dsl.Meta.Accessors: accessorNodeName :: TTerm a
- Hydra.Dsl.Meta.Accessors: accessorPath :: TTerm [TermAccessor] -> TTerm AccessorPath
- Hydra.Dsl.Meta.Accessors: termAccessorAnnotatedBody :: TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorApplicationArgument :: TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorApplicationFunction :: TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorInjectionTerm :: TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorLambdaBody :: TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorLetBinding :: TTerm Name -> TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorLetEnvironment :: TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorListElement :: TTerm Int -> TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorMapKey :: TTerm Int -> TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorMapValue :: TTerm Int -> TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorOptionalTerm :: TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorProductTerm :: TTerm Int -> TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorRecordField :: TTerm Name -> TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorSetElement :: TTerm Int -> TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorSumTerm :: TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorTypeApplicationTerm :: TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorTypeLambdaBody :: TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorUnionCasesBranch :: TTerm Name -> TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorUnionCasesDefault :: TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: termAccessorWrappedTerm :: TTerm TermAccessor
- Hydra.Dsl.Meta.Accessors: unAccessorPath :: TTerm AccessorPath -> TTerm [TermAccessor]
- Hydra.Dsl.Meta.Ast: associativityBoth :: TTerm Associativity
- Hydra.Dsl.Meta.Ast: associativityLeft :: TTerm Associativity
- Hydra.Dsl.Meta.Ast: associativityNone :: TTerm Associativity
- Hydra.Dsl.Meta.Ast: associativityRight :: TTerm Associativity
- Hydra.Dsl.Meta.Ast: blockStyle :: TTerm (Maybe String) -> TTerm Bool -> TTerm Bool -> TTerm BlockStyle
- Hydra.Dsl.Meta.Ast: blockStyleIndent :: TTerm BlockStyle -> TTerm (Maybe String)
- Hydra.Dsl.Meta.Ast: blockStyleNewlineAfterContent :: TTerm BlockStyle -> TTerm Bool
- Hydra.Dsl.Meta.Ast: blockStyleNewlineBeforeContent :: TTerm BlockStyle -> TTerm Bool
- Hydra.Dsl.Meta.Ast: bracketExpr :: TTerm Brackets -> TTerm Expr -> TTerm BlockStyle -> TTerm BracketExpr
- Hydra.Dsl.Meta.Ast: bracketExprBrackets :: TTerm BracketExpr -> TTerm Brackets
- Hydra.Dsl.Meta.Ast: bracketExprEnclosed :: TTerm BracketExpr -> TTerm Expr
- Hydra.Dsl.Meta.Ast: bracketExprStyle :: TTerm BracketExpr -> TTerm BlockStyle
- Hydra.Dsl.Meta.Ast: brackets :: TTerm Symbol -> TTerm Symbol -> TTerm Brackets
- Hydra.Dsl.Meta.Ast: bracketsClose :: TTerm Brackets -> TTerm Symbol
- Hydra.Dsl.Meta.Ast: bracketsOpen :: TTerm Brackets -> TTerm Symbol
- Hydra.Dsl.Meta.Ast: exprBrackets :: TTerm BracketExpr -> TTerm Expr
- Hydra.Dsl.Meta.Ast: exprConst :: TTerm Symbol -> TTerm Expr
- Hydra.Dsl.Meta.Ast: exprIndent :: TTerm IndentedExpression -> TTerm Expr
- Hydra.Dsl.Meta.Ast: exprOp :: TTerm OpExpr -> TTerm Expr
- Hydra.Dsl.Meta.Ast: indentStyleAllLines :: TTerm String -> TTerm IndentStyle
- Hydra.Dsl.Meta.Ast: indentStyleSubsequentLines :: TTerm String -> TTerm IndentStyle
- Hydra.Dsl.Meta.Ast: indentedExpression :: TTerm IndentStyle -> TTerm Expr -> TTerm IndentedExpression
- Hydra.Dsl.Meta.Ast: indentedExpressionExpr :: TTerm IndentedExpression -> TTerm Expr
- Hydra.Dsl.Meta.Ast: indentedExpressionStyle :: TTerm IndentedExpression -> TTerm IndentStyle
- Hydra.Dsl.Meta.Ast: op :: TTerm Symbol -> TTerm Padding -> TTerm Precedence -> TTerm Associativity -> TTerm Op
- Hydra.Dsl.Meta.Ast: opAssociativity :: TTerm Op -> TTerm Associativity
- Hydra.Dsl.Meta.Ast: opExpr :: TTerm Op -> TTerm Expr -> TTerm Expr -> TTerm OpExpr
- Hydra.Dsl.Meta.Ast: opExprLhs :: TTerm OpExpr -> TTerm Expr
- Hydra.Dsl.Meta.Ast: opExprOp :: TTerm OpExpr -> TTerm Op
- Hydra.Dsl.Meta.Ast: opExprRhs :: TTerm OpExpr -> TTerm Expr
- Hydra.Dsl.Meta.Ast: opPadding :: TTerm Op -> TTerm Padding
- Hydra.Dsl.Meta.Ast: opPrecedence :: TTerm Op -> TTerm Precedence
- Hydra.Dsl.Meta.Ast: opSymbol :: TTerm Op -> TTerm Symbol
- Hydra.Dsl.Meta.Ast: padding :: TTerm Ws -> TTerm Ws -> TTerm Padding
- Hydra.Dsl.Meta.Ast: paddingLeft :: TTerm Padding -> TTerm Ws
- Hydra.Dsl.Meta.Ast: paddingRight :: TTerm Padding -> TTerm Ws
- Hydra.Dsl.Meta.Ast: precedence :: TTerm Int -> TTerm Precedence
- Hydra.Dsl.Meta.Ast: symbol :: TTerm String -> TTerm Symbol
- Hydra.Dsl.Meta.Ast: unPrecedence :: TTerm Precedence -> TTerm Int
- Hydra.Dsl.Meta.Ast: unSymbol :: TTerm Symbol -> TTerm String
- Hydra.Dsl.Meta.Ast: wsBreak :: TTerm Ws
- Hydra.Dsl.Meta.Ast: wsBreakAndIndent :: TTerm String -> TTerm Ws
- Hydra.Dsl.Meta.Ast: wsDoubleBreak :: TTerm Ws
- Hydra.Dsl.Meta.Ast: wsNone :: TTerm Ws
- Hydra.Dsl.Meta.Ast: wsSpace :: TTerm Ws
- Hydra.Dsl.Meta.Coders: adapterContext :: TTerm Graph -> TTerm Language -> TTerm (Map Name (Adapter AdapterContext AdapterContext Type Type Term Term)) -> TTerm AdapterContext
- Hydra.Dsl.Meta.Coders: adapterContextAdapters :: TTerm AdapterContext -> TTerm (Map Name (Adapter AdapterContext AdapterContext Type Type Term Term))
- Hydra.Dsl.Meta.Coders: adapterContextGraph :: TTerm AdapterContext -> TTerm Graph
- Hydra.Dsl.Meta.Coders: adapterContextLanguage :: TTerm AdapterContext -> TTerm Language
- Hydra.Dsl.Meta.Coders: coderDirectionDecode :: TTerm CoderDirection
- Hydra.Dsl.Meta.Coders: coderDirectionEncode :: TTerm CoderDirection
- Hydra.Dsl.Meta.Coders: language :: TTerm LanguageName -> TTerm LanguageConstraints -> TTerm Language
- Hydra.Dsl.Meta.Coders: languageConstraints :: TTerm (Set EliminationVariant) -> TTerm (Set LiteralVariant) -> TTerm (Set FloatType) -> TTerm (Set FunctionVariant) -> TTerm (Set IntegerType) -> TTerm (Set TermVariant) -> TTerm (Set TypeVariant) -> TTerm (Type -> Bool) -> TTerm LanguageConstraints
- Hydra.Dsl.Meta.Coders: languageConstraintsEliminationVariants :: TTerm LanguageConstraints -> TTerm (Set EliminationVariant)
- Hydra.Dsl.Meta.Coders: languageConstraintsFloatTypes :: TTerm LanguageConstraints -> TTerm (Set FloatType)
- Hydra.Dsl.Meta.Coders: languageConstraintsFunctionVariants :: TTerm LanguageConstraints -> TTerm (Set FunctionVariant)
- Hydra.Dsl.Meta.Coders: languageConstraintsIntegerTypes :: TTerm LanguageConstraints -> TTerm (Set IntegerType)
- Hydra.Dsl.Meta.Coders: languageConstraintsLiteralVariants :: TTerm LanguageConstraints -> TTerm (Set LiteralVariant)
- Hydra.Dsl.Meta.Coders: languageConstraintsProjection :: TTerm Language -> TTerm LanguageConstraints
- Hydra.Dsl.Meta.Coders: languageConstraintsTermVariants :: TTerm LanguageConstraints -> TTerm (Set TermVariant)
- Hydra.Dsl.Meta.Coders: languageConstraintsTypeVariants :: TTerm LanguageConstraints -> TTerm (Set TypeVariant)
- Hydra.Dsl.Meta.Coders: languageConstraintsTypes :: TTerm LanguageConstraints -> TTerm (Type -> Bool)
- Hydra.Dsl.Meta.Coders: languageName :: AsTerm t String => t -> TTerm LanguageName
- Hydra.Dsl.Meta.Coders: languageNameProjection :: TTerm Language -> TTerm LanguageName
- Hydra.Dsl.Meta.Coders: traversalOrderPost :: TTerm a
- Hydra.Dsl.Meta.Coders: traversalOrderPre :: TTerm a
- Hydra.Dsl.Meta.Coders: unLanguageName :: TTerm LanguageName -> TTerm String
- Hydra.Dsl.Meta.Compute: adapter :: AsTerm c (Coder s1 s2 v1 v2) => TTerm Bool -> TTerm t1 -> TTerm t2 -> c -> TTerm (Adapter s1 s2 t1 t2 v1 v2)
- Hydra.Dsl.Meta.Compute: adapterCoder :: TTerm (Adapter s1 s2 t1 t2 v1 v2) -> TTerm (Coder s1 s2 v1 v2)
- Hydra.Dsl.Meta.Compute: adapterIsLossy :: TTerm (Adapter s1 s2 t1 t2 v1 v2) -> TTerm Bool
- Hydra.Dsl.Meta.Compute: adapterSource :: TTerm (Adapter s1 s2 t1 t2 v1 v2) -> TTerm t1
- Hydra.Dsl.Meta.Compute: adapterTarget :: TTerm (Adapter s1 s2 t1 t2 v1 v2) -> TTerm t2
- Hydra.Dsl.Meta.Compute: adapterWithCoder :: TTerm (Adapter s1 s2 t1 t2 v1 v2) -> TTerm (Coder s1 s2 v1 v2) -> TTerm (Adapter s1 s2 t1 t2 v1 v2)
- Hydra.Dsl.Meta.Compute: adapterWithTarget :: TTerm (Adapter s1 s2 t1 t2 v1 v2) -> TTerm t2 -> TTerm (Adapter s1 s2 t1 t2 v1 v2)
- Hydra.Dsl.Meta.Compute: coder :: TTerm (v1 -> Flow s1 v2) -> TTerm (v2 -> Flow s2 v1) -> TTerm (Coder s1 s2 v1 v2)
- Hydra.Dsl.Meta.Compute: coderDecode :: TTerm (Coder s1 s2 v1 v2) -> TTerm (v2 -> Flow s2 v1)
- Hydra.Dsl.Meta.Compute: coderEncode :: TTerm (Coder s1 s2 v1 v2) -> TTerm (v1 -> Flow s1 v2)
- Hydra.Dsl.Meta.Compute: flow :: TTerm (s -> Trace -> FlowState s v) -> TTerm (Flow s v)
- Hydra.Dsl.Meta.Compute: flowState :: TTerm (Maybe x) -> TTerm s -> TTerm Trace -> TTerm (FlowState s x)
- Hydra.Dsl.Meta.Compute: flowStateState :: TTerm (FlowState s x) -> TTerm s
- Hydra.Dsl.Meta.Compute: flowStateTrace :: TTerm (FlowState s x) -> TTerm Trace
- Hydra.Dsl.Meta.Compute: flowStateValue :: TTerm (FlowState s x) -> TTerm (Maybe x)
- Hydra.Dsl.Meta.Compute: trace :: TTerm [String] -> TTerm [String] -> TTerm (Map Name Term) -> TTerm Trace
- Hydra.Dsl.Meta.Compute: traceMessages :: TTerm Trace -> TTerm [String]
- Hydra.Dsl.Meta.Compute: traceOther :: TTerm Trace -> TTerm (Map Name Term)
- Hydra.Dsl.Meta.Compute: traceStack :: TTerm Trace -> TTerm [String]
- Hydra.Dsl.Meta.Compute: traceWithOther :: TTerm Trace -> TTerm (Map Name Term) -> TTerm Trace
- Hydra.Dsl.Meta.Compute: unFlow :: AsTerm t Trace => TTerm (Flow s x) -> TTerm s -> t -> TTerm (FlowState s x)
- Hydra.Dsl.Meta.Core: equalName :: TTerm (Name -> Name -> Bool)
- Hydra.Dsl.Meta.Core: equalNameList :: TTerm ([Name] -> [Name] -> Bool)
- Hydra.Dsl.Meta.Core: int32 :: Int -> TTerm Term
- Hydra.Dsl.Meta.Core: rowType :: AsTerm t Name => t -> TTerm [FieldType] -> TTerm RowType
- Hydra.Dsl.Meta.Core: rowTypeFields :: TTerm RowType -> TTerm [FieldType]
- Hydra.Dsl.Meta.Core: rowTypeTypeName :: TTerm RowType -> TTerm Name
- Hydra.Dsl.Meta.Core: string :: String -> TTerm Term
- Hydra.Dsl.Meta.Core: unNamespace :: TTerm Namespace -> TTerm String
- Hydra.Dsl.Meta.Core: wrappedType :: AsTerm t Name => t -> TTerm Type -> TTerm WrappedType
- Hydra.Dsl.Meta.Core: wrappedTypeBody :: TTerm WrappedType -> TTerm Type
- Hydra.Dsl.Meta.Core: wrappedTypeTypeName :: TTerm WrappedType -> TTerm Name
- Hydra.Dsl.Meta.Grammar: labeledPatternLabel :: TTerm LabeledPattern -> TTerm Label
- Hydra.Dsl.Meta.Grammar: labeledPatternPattern :: TTerm LabeledPattern -> TTerm Pattern
- Hydra.Dsl.Meta.Grammar: production :: TTerm Symbol -> TTerm Pattern -> TTerm Production
- Hydra.Dsl.Meta.Grammar: productionPattern :: TTerm Production -> TTerm Pattern
- Hydra.Dsl.Meta.Grammar: productionSymbol :: TTerm Production -> TTerm Symbol
- Hydra.Dsl.Meta.Grammar: unConstant :: TTerm Constant -> TTerm String
- Hydra.Dsl.Meta.Grammar: unGrammar :: TTerm Grammar -> TTerm [Production]
- Hydra.Dsl.Meta.Grammar: unLabel :: TTerm Label -> TTerm String
- Hydra.Dsl.Meta.Grammar: unSymbol :: TTerm Symbol -> TTerm String
- Hydra.Dsl.Meta.Graph: graphBody :: TTerm Graph -> TTerm Term
- Hydra.Dsl.Meta.Graph: graphElements :: TTerm Graph -> TTerm [Binding]
- Hydra.Dsl.Meta.Graph: graphEnvironment :: TTerm Graph -> TTerm (Map Name (Maybe Term))
- Hydra.Dsl.Meta.Graph: graphSchema :: TTerm Graph -> TTerm (Maybe Graph)
- Hydra.Dsl.Meta.Graph: graphTypes :: TTerm Graph -> TTerm (Map Name TypeScheme)
- Hydra.Dsl.Meta.Graph: graphWithBody :: TTerm Graph -> TTerm Term -> TTerm Graph
- Hydra.Dsl.Meta.Graph: graphWithElements :: TTerm Graph -> TTerm [Binding] -> TTerm Graph
- Hydra.Dsl.Meta.Graph: graphWithEnvironment :: TTerm Graph -> TTerm (Map Name (Maybe Term)) -> TTerm Graph
- Hydra.Dsl.Meta.Graph: graphWithSchema :: TTerm Graph -> TTerm (Maybe Graph) -> TTerm Graph
- Hydra.Dsl.Meta.Graph: graphWithTypes :: TTerm Graph -> TTerm (Map Name TypeScheme) -> TTerm Graph
- Hydra.Dsl.Meta.Json: valueArray :: TTerm [Value] -> TTerm Value
- Hydra.Dsl.Meta.Json: valueBoolean :: TTerm Bool -> TTerm Value
- Hydra.Dsl.Meta.Json: valueNull :: TTerm Value
- Hydra.Dsl.Meta.Json: valueNumber :: TTerm Double -> TTerm Value
- Hydra.Dsl.Meta.Json: valueObject :: TTerm (Map String Value) -> TTerm Value
- Hydra.Dsl.Meta.Json: valueString :: TTerm String -> TTerm Value
- Hydra.Dsl.Meta.Lib.Flows: apply :: TTerm (Flow s (x -> y)) -> TTerm (Flow s x) -> TTerm (Flow s y)
- Hydra.Dsl.Meta.Lib.Flows: bind :: (AsTerm t (Flow s x), AsTerm f (x -> Flow s y)) => t -> f -> TTerm (Flow s y)
- Hydra.Dsl.Meta.Lib.Flows: fail :: AsTerm f String => f -> TTerm (Flow s x)
- Hydra.Dsl.Meta.Lib.Flows: foldl :: TTerm (x -> y -> Flow s x) -> TTerm x -> TTerm [y] -> TTerm (Flow s x)
- Hydra.Dsl.Meta.Lib.Flows: map :: (AsTerm f (x -> y), AsTerm t (Flow s x)) => f -> t -> TTerm (Flow s y)
- Hydra.Dsl.Meta.Lib.Flows: mapElems :: TTerm (v1 -> Flow s v2) -> TTerm (Map k v1) -> TTerm (Flow s (Map k v2))
- Hydra.Dsl.Meta.Lib.Flows: mapKeys :: TTerm (k1 -> Flow s k2) -> TTerm (Map k1 v) -> TTerm (Flow s (Map k2 v))
- Hydra.Dsl.Meta.Lib.Flows: mapList :: AsTerm f (x -> Flow s y) => f -> TTerm [x] -> TTerm (Flow s [y])
- Hydra.Dsl.Meta.Lib.Flows: mapMaybe :: AsTerm f (x -> Flow s y) => f -> TTerm (Maybe x) -> TTerm (Flow s (Maybe y))
- Hydra.Dsl.Meta.Lib.Flows: mapSet :: TTerm (x -> Flow s y) -> TTerm (Set x) -> TTerm (Flow s (Set y))
- Hydra.Dsl.Meta.Lib.Flows: pure :: AsTerm t x => t -> TTerm (Flow s x)
- Hydra.Dsl.Meta.Lib.Flows: sequence :: TTerm [Flow s a] -> TTerm (Flow s [a])
- Hydra.Dsl.Meta.Lib.Flows: withDefault :: AsTerm t x => t -> TTerm (Flow s x) -> TTerm (Flow s x)
- Hydra.Dsl.Meta.Module: definitionTerm :: TTerm TermDefinition -> TTerm Definition
- Hydra.Dsl.Meta.Module: definitionType :: TTerm TypeDefinition -> TTerm Definition
- Hydra.Dsl.Meta.Module: moduleDescription :: TTerm Module -> TTerm (Maybe String)
- Hydra.Dsl.Meta.Module: moduleElements :: TTerm Module -> TTerm [Binding]
- Hydra.Dsl.Meta.Module: moduleNamespace :: TTerm Module -> TTerm Namespace
- Hydra.Dsl.Meta.Module: moduleTermDependencies :: TTerm Module -> TTerm [Namespace]
- Hydra.Dsl.Meta.Module: moduleTypeDependencies :: TTerm Module -> TTerm [Namespace]
- Hydra.Dsl.Meta.Module: module_ :: TTerm Namespace -> TTerm [Binding] -> TTerm [Namespace] -> TTerm [Namespace] -> TTerm (Maybe String) -> TTerm Module
- Hydra.Dsl.Meta.Module: namespace :: TTerm String -> TTerm Namespace
- Hydra.Dsl.Meta.Module: namespaces :: TTerm (Namespace, n) -> TTerm (Map Namespace n) -> TTerm (Namespaces n)
- Hydra.Dsl.Meta.Module: namespacesFocus :: TTerm (Namespaces n) -> TTerm (Namespace, n)
- Hydra.Dsl.Meta.Module: namespacesMapping :: TTerm (Namespaces n) -> TTerm (Map Namespace n)
- Hydra.Dsl.Meta.Module: namespacesWithFocus :: TTerm (Namespaces n) -> TTerm (Namespace, n) -> TTerm (Namespaces n)
- Hydra.Dsl.Meta.Module: namespacesWithMapping :: TTerm (Namespaces n) -> TTerm (Map Namespace n) -> TTerm (Namespaces n)
- Hydra.Dsl.Meta.Module: qualifiedName :: TTerm (Maybe Namespace) -> TTerm String -> TTerm QualifiedName
- Hydra.Dsl.Meta.Module: qualifiedNameLocal :: TTerm QualifiedName -> TTerm String
- Hydra.Dsl.Meta.Module: qualifiedNameNamespace :: TTerm QualifiedName -> TTerm (Maybe Namespace)
- Hydra.Dsl.Meta.Module: termDefinition :: TTerm Name -> TTerm Term -> TTerm TypeScheme -> TTerm TermDefinition
- Hydra.Dsl.Meta.Module: termDefinitionName :: TTerm TermDefinition -> TTerm Name
- Hydra.Dsl.Meta.Module: termDefinitionTerm :: TTerm TermDefinition -> TTerm Term
- Hydra.Dsl.Meta.Module: termDefinitionType :: TTerm TermDefinition -> TTerm TypeScheme
- Hydra.Dsl.Meta.Module: typeDefinition :: TTerm Name -> TTerm Type -> TTerm TypeDefinition
- Hydra.Dsl.Meta.Module: typeDefinitionName :: TTerm TypeDefinition -> TTerm Name
- Hydra.Dsl.Meta.Module: typeDefinitionType :: TTerm TypeDefinition -> TTerm Type
- Hydra.Dsl.Meta.Module: unFileExtension :: TTerm FileExtension -> TTerm String
- Hydra.Dsl.Meta.Module: unNamespace :: TTerm Namespace -> TTerm String
- Hydra.Dsl.Meta.Parsing: parseError :: TTerm String -> TTerm String -> TTerm ParseError
- Hydra.Dsl.Meta.Parsing: parseErrorMessage :: TTerm ParseError -> TTerm String
- Hydra.Dsl.Meta.Parsing: parseErrorRemainder :: TTerm ParseError -> TTerm String
- Hydra.Dsl.Meta.Parsing: parseResultFailure :: TTerm ParseError -> TTerm (ParseResult a)
- Hydra.Dsl.Meta.Parsing: parseResultSuccess :: TTerm (ParseSuccess a) -> TTerm (ParseResult a)
- Hydra.Dsl.Meta.Parsing: parseSuccess :: TTerm a -> TTerm String -> TTerm (ParseSuccess a)
- Hydra.Dsl.Meta.Parsing: parseSuccessRemainder :: TTerm (ParseSuccess a) -> TTerm String
- Hydra.Dsl.Meta.Parsing: parseSuccessValue :: TTerm (ParseSuccess a) -> TTerm a
- Hydra.Dsl.Meta.Parsing: parser :: TTerm (String -> ParseResult a) -> TTerm (Parser a)
- Hydra.Dsl.Meta.Parsing: runParser :: TTerm (Parser a) -> TTerm String -> TTerm (ParseResult a)
- Hydra.Dsl.Meta.Phantoms: bind :: AsTerm t (Flow s a) => String -> t -> TTerm (Flow s b) -> TTerm (Flow s b)
- Hydra.Dsl.Meta.Phantoms: binds :: [Field] -> TTerm (Flow s a) -> TTerm (Flow s a)
- Hydra.Dsl.Meta.Phantoms: exec :: TTerm (Flow s a) -> TTerm (Flow s b) -> TTerm (Flow s b)
- Hydra.Dsl.Meta.Phantoms: produce :: AsTerm t a => t -> TTerm (Flow s a)
- Hydra.Dsl.Meta.Phantoms: trace :: TTerm String -> TTerm (Flow s a) -> TTerm (Flow s a)
- Hydra.Dsl.Meta.Terms: flowStateTerm :: TTerm Term -> TTerm Term -> TTerm Term -> TTerm Term
- Hydra.Dsl.Meta.Terms: traceTerm :: TTerm Term -> TTerm Term -> TTerm Term -> TTerm Term
- Hydra.Dsl.Meta.Terms: unFlowTerm :: TTerm Term
- Hydra.Dsl.Meta.Testing: coderCase :: String -> TTerm Type -> TTerm Term -> TTerm Value -> TTerm TestCaseWithMetadata
- Hydra.Dsl.Meta.Testing: isDisabledForPython :: TestCaseWithMetadata -> Bool
- Hydra.Dsl.Meta.Testing: isRequiresFlowDecoding :: TestCaseWithMetadata -> Bool
- Hydra.Dsl.Meta.Testing: jsonCoderTestCase :: TTerm Type -> TTerm Term -> TTerm Value -> TTerm JsonCoderTestCase
- Hydra.Dsl.Meta.Testing: tag_disabledForPython :: Tag
- Hydra.Dsl.Meta.Testing: tag_requiresFlowDecoding :: Tag
- Hydra.Dsl.Meta.Testing: testCaseJsonCoder :: TTerm JsonCoderTestCase -> TTerm TestCase
- Hydra.Dsl.Meta.Topology: orderingIsomorphism :: TTerm ([a] -> [a]) -> TTerm ([a] -> [a]) -> TTerm (OrderingIsomorphism a)
- Hydra.Dsl.Meta.Topology: tarjanState :: TTerm Int -> TTerm (Map Vertex Int) -> TTerm (Map Vertex Int) -> TTerm [Vertex] -> TTerm (Set Vertex) -> TTerm [[Vertex]] -> TTerm TarjanState
- Hydra.Dsl.Meta.Topology: tarjanStateCounter :: TTerm TarjanState -> TTerm Int
- Hydra.Dsl.Meta.Topology: tarjanStateIndices :: TTerm TarjanState -> TTerm (Map Vertex Int)
- Hydra.Dsl.Meta.Topology: tarjanStateLowLinks :: TTerm TarjanState -> TTerm (Map Vertex Int)
- Hydra.Dsl.Meta.Topology: tarjanStateOnStack :: TTerm TarjanState -> TTerm (Set Vertex)
- Hydra.Dsl.Meta.Topology: tarjanStateSccs :: TTerm TarjanState -> TTerm [[Vertex]]
- Hydra.Dsl.Meta.Topology: tarjanStateStack :: TTerm TarjanState -> TTerm [Vertex]
- Hydra.Dsl.Meta.Topology: tarjanStateWithCounter :: TTerm TarjanState -> TTerm Int -> TTerm TarjanState
- Hydra.Dsl.Meta.Topology: tarjanStateWithIndices :: TTerm TarjanState -> TTerm (Map Vertex Int) -> TTerm TarjanState
- Hydra.Dsl.Meta.Topology: tarjanStateWithLowLinks :: TTerm TarjanState -> TTerm (Map Vertex Int) -> TTerm TarjanState
- Hydra.Dsl.Meta.Topology: tarjanStateWithOnStack :: TTerm TarjanState -> TTerm (Set Vertex) -> TTerm TarjanState
- Hydra.Dsl.Meta.Topology: tarjanStateWithSccs :: TTerm TarjanState -> TTerm [[Vertex]] -> TTerm TarjanState
- Hydra.Dsl.Meta.Topology: tarjanStateWithStack :: TTerm TarjanState -> TTerm [Vertex] -> TTerm TarjanState
- Hydra.Dsl.Meta.Typing: inferenceContext :: TTerm (Map Name TypeScheme) -> TTerm (Map Name TypeScheme) -> TTerm (Map Name TypeScheme) -> TTerm (Map Name TypeVariableMetadata) -> TTerm Bool -> TTerm InferenceContext
- Hydra.Dsl.Meta.Typing: inferenceContextClassConstraints :: TTerm InferenceContext -> TTerm (Map Name TypeVariableMetadata)
- Hydra.Dsl.Meta.Typing: inferenceContextDataTypes :: TTerm InferenceContext -> TTerm (Map Name TypeScheme)
- Hydra.Dsl.Meta.Typing: inferenceContextDebug :: TTerm InferenceContext -> TTerm Bool
- Hydra.Dsl.Meta.Typing: inferenceContextPrimitiveTypes :: TTerm InferenceContext -> TTerm (Map Name TypeScheme)
- Hydra.Dsl.Meta.Typing: inferenceContextSchemaTypes :: TTerm InferenceContext -> TTerm (Map Name TypeScheme)
- Hydra.Dsl.Meta.Typing: inferenceContextWithClassConstraints :: TTerm InferenceContext -> TTerm (Map Name TypeVariableMetadata) -> TTerm InferenceContext
- Hydra.Dsl.Meta.Typing: inferenceContextWithDataTypes :: TTerm InferenceContext -> TTerm (Map Name TypeScheme) -> TTerm InferenceContext
- Hydra.Dsl.Meta.Typing: inferenceResult :: AsTerm t TypeSubst => TTerm Term -> TTerm Type -> t -> TTerm (Map Name TypeVariableMetadata) -> TTerm InferenceResult
- Hydra.Dsl.Meta.Typing: inferenceResultClassConstraints :: TTerm InferenceResult -> TTerm (Map Name TypeVariableMetadata)
- Hydra.Dsl.Meta.Typing: inferenceResultSubst :: TTerm InferenceResult -> TTerm TypeSubst
- Hydra.Dsl.Meta.Typing: inferenceResultTerm :: TTerm InferenceResult -> TTerm Term
- Hydra.Dsl.Meta.Typing: inferenceResultType :: TTerm InferenceResult -> TTerm Type
- Hydra.Dsl.Meta.Typing: termSubst :: TTerm (Map Name Term) -> TTerm TermSubst
- Hydra.Dsl.Meta.Typing: typeConstraint :: TTerm Type -> TTerm Type -> TTerm String -> TTerm TypeConstraint
- Hydra.Dsl.Meta.Typing: typeConstraintComment :: TTerm TypeConstraint -> TTerm String
- Hydra.Dsl.Meta.Typing: typeConstraintLeft :: TTerm TypeConstraint -> TTerm Type
- Hydra.Dsl.Meta.Typing: typeConstraintRight :: TTerm TypeConstraint -> TTerm Type
- Hydra.Dsl.Meta.Typing: typeContext :: TTerm (Map Name Type) -> TTerm (Map Name Term) -> TTerm (Set Name) -> TTerm (Set Name) -> TTerm (Set Name) -> TTerm InferenceContext -> TTerm TypeContext
- Hydra.Dsl.Meta.Typing: typeContextInferenceContext :: TTerm TypeContext -> TTerm InferenceContext
- Hydra.Dsl.Meta.Typing: typeContextLambdaVariables :: TTerm TypeContext -> TTerm (Set Name)
- Hydra.Dsl.Meta.Typing: typeContextLetVariables :: TTerm TypeContext -> TTerm (Set Name)
- Hydra.Dsl.Meta.Typing: typeContextMetadata :: TTerm TypeContext -> TTerm (Map Name Term)
- Hydra.Dsl.Meta.Typing: typeContextTypeVariables :: TTerm TypeContext -> TTerm (Set Name)
- Hydra.Dsl.Meta.Typing: typeContextTypes :: TTerm TypeContext -> TTerm (Map Name Type)
- Hydra.Dsl.Meta.Typing: typeContextWithLambdaVariables :: TTerm TypeContext -> TTerm (Set Name) -> TTerm TypeContext
- Hydra.Dsl.Meta.Typing: typeContextWithLetVariables :: TTerm TypeContext -> TTerm (Set Name) -> TTerm TypeContext
- Hydra.Dsl.Meta.Typing: typeContextWithMetadata :: TTerm TypeContext -> TTerm (Map Name Term) -> TTerm TypeContext
- Hydra.Dsl.Meta.Typing: typeContextWithTypeVariables :: TTerm TypeContext -> TTerm (Set Name) -> TTerm TypeContext
- Hydra.Dsl.Meta.Typing: typeContextWithTypes :: TTerm TypeContext -> TTerm (Map Name Type) -> TTerm TypeContext
- Hydra.Dsl.Meta.Typing: typeSubst :: TTerm (Map Name Type) -> TTerm TypeSubst
- Hydra.Dsl.Meta.Typing: unTermSubst :: TTerm TermSubst -> TTerm (Map Name Term)
- Hydra.Dsl.Meta.Typing: unTypeSubst :: TTerm TypeSubst -> TTerm (Map Name Type)
- Hydra.Dsl.Meta.Util: caseConventionCamel :: TTerm a
- Hydra.Dsl.Meta.Util: caseConventionLowerSnake :: TTerm a
- Hydra.Dsl.Meta.Util: caseConventionPascal :: TTerm a
- Hydra.Dsl.Meta.Util: caseConventionUpperSnake :: TTerm a
- Hydra.Dsl.Meta.Util: decodingError :: TTerm String -> TTerm DecodingError
- Hydra.Dsl.Meta.Util: precisionArbitrary :: TTerm Precision
- Hydra.Dsl.Meta.Util: precisionBits :: TTerm Int -> TTerm Precision
- Hydra.Dsl.Meta.Util: unDecodingError :: TTerm (DecodingError -> String)
- Hydra.Dsl.Meta.Variants: eliminationVariantRecord :: TTerm EliminationVariant
- Hydra.Dsl.Meta.Variants: eliminationVariantUnion :: TTerm EliminationVariant
- Hydra.Dsl.Meta.Variants: eliminationVariantWrap :: TTerm EliminationVariant
- Hydra.Dsl.Meta.Variants: functionVariantElimination :: TTerm FunctionVariant
- Hydra.Dsl.Meta.Variants: functionVariantLambda :: TTerm FunctionVariant
- Hydra.Dsl.Meta.Variants: functionVariantPrimitive :: TTerm FunctionVariant
- Hydra.Dsl.Meta.Variants: literalVariantBinary :: TTerm LiteralVariant
- Hydra.Dsl.Meta.Variants: literalVariantBoolean :: TTerm LiteralVariant
- Hydra.Dsl.Meta.Variants: literalVariantFloat :: TTerm LiteralVariant
- Hydra.Dsl.Meta.Variants: literalVariantInteger :: TTerm LiteralVariant
- Hydra.Dsl.Meta.Variants: literalVariantString :: TTerm LiteralVariant
- Hydra.Dsl.Meta.Variants: termVariantAnnotated :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantApplication :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantEither :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantFunction :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantLet :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantList :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantLiteral :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantMap :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantMaybe :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantPair :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantRecord :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantSet :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantTypeApplication :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantTypeLambda :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantUnion :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantUnit :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantVariable :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: termVariantWrap :: TTerm TermVariant
- Hydra.Dsl.Meta.Variants: typeVariantAnnotated :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantApplication :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantEither :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantForall :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantFunction :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantList :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantLiteral :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantMap :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantMaybe :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantPair :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantRecord :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantSet :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantUnion :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantUnit :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantVariable :: TTerm TypeVariant
- Hydra.Dsl.Meta.Variants: typeVariantWrap :: TTerm TypeVariant
- Hydra.Dsl.Prims: flow :: TermCoder s -> TermCoder x -> TermCoder (Flow s x)
- Hydra.Dsl.Prims: prim1Eval :: Name -> (Term -> Flow Graph Term) -> [TypeVar] -> TermCoder x -> TermCoder y -> Primitive
- Hydra.Dsl.Prims: prim2Eval :: Name -> (Term -> Term -> Flow Graph Term) -> [TypeVar] -> TermCoder x -> TermCoder y -> TermCoder z -> Primitive
- Hydra.Dsl.Prims: prim3Eval :: Name -> (Term -> Term -> Term -> Flow Graph Term) -> [TypeVar] -> TermCoder w -> TermCoder x -> TermCoder y -> TermCoder z -> Primitive
- Hydra.Dsl.Types: recordWithName :: Name -> [FieldType] -> Type
- Hydra.Dsl.Types: wrapWithName :: AsType a => Name -> a -> Type
- Hydra.Encode.Accessors: accessorEdge :: AccessorEdge -> Term
- Hydra.Encode.Accessors: accessorGraph :: AccessorGraph -> Term
- Hydra.Encode.Accessors: accessorNode :: AccessorNode -> Term
- Hydra.Encode.Accessors: accessorPath :: AccessorPath -> Term
- Hydra.Encode.Accessors: termAccessor :: TermAccessor -> Term
- Hydra.Encode.Compute: flowState :: (t0 -> Term) -> (t1 -> Term) -> FlowState t0 t1 -> Term
- Hydra.Encode.Compute: trace :: Trace -> Term
- Hydra.Encode.Constraints: pathEquation :: PathEquation -> Term
- Hydra.Encode.Constraints: patternImplication :: PatternImplication -> Term
- Hydra.Encode.Core: rowType :: RowType -> Term
- Hydra.Encode.Core: wrappedType :: WrappedType -> Term
- Hydra.Encode.Grammar: constant :: Constant -> Term
- Hydra.Encode.Grammar: grammar :: Grammar -> Term
- Hydra.Encode.Grammar: label :: Label -> Term
- Hydra.Encode.Grammar: labeledPattern :: LabeledPattern -> Term
- Hydra.Encode.Grammar: pattern :: Pattern -> Term
- Hydra.Encode.Grammar: production :: Production -> Term
- Hydra.Encode.Grammar: regex :: Regex -> Term
- Hydra.Encode.Grammar: symbol :: Symbol -> Term
- Hydra.Encode.Testing: jsonCoderTestCase :: JsonCoderTestCase -> Term
- Hydra.Encode.Typing: inferenceContext :: InferenceContext -> Term
- Hydra.Encode.Typing: typeContext :: TypeContext -> Term
- Hydra.Encode.Util: decodingError :: DecodingError -> Term
- Hydra.Encode.Workflow: hydraSchemaSpec :: HydraSchemaSpec -> Term
- Hydra.Encode.Workflow: schemaSpec :: SchemaSpec -> Term
- Hydra.Encode.Workflow: transformWorkflow :: TransformWorkflow -> Term
- Hydra.Eval.Lib.Flows: apply :: Term -> Term -> Flow t0 Term
- Hydra.Eval.Lib.Flows: bind :: Term -> Term -> Flow t0 Term
- Hydra.Eval.Lib.Flows: foldl :: Term -> Term -> Term -> Flow Graph Term
- Hydra.Eval.Lib.Flows: map :: Term -> Term -> Flow t0 Term
- Hydra.Eval.Lib.Flows: mapElems :: Term -> Term -> Flow t0 Term
- Hydra.Eval.Lib.Flows: mapKeys :: Term -> Term -> Flow t0 Term
- Hydra.Eval.Lib.Flows: mapList :: Term -> Term -> Flow Graph Term
- Hydra.Eval.Lib.Flows: mapMaybe :: Term -> Term -> Flow t0 Term
- Hydra.Eval.Lib.Flows: mapSet :: Term -> Term -> Flow Graph Term
- Hydra.Eval.Lib.Flows: withDefault :: Term -> Term -> Flow t0 Term
- Hydra.Ext.Haskell.Ast: Alternative :: Pattern -> CaseRhs -> Maybe LocalBindings -> Alternative
- Hydra.Ext.Haskell.Ast: ApplicationDeclarationHead :: DeclarationHead -> Variable -> ApplicationDeclarationHead
- Hydra.Ext.Haskell.Ast: ApplicationExpression :: Expression -> Expression -> ApplicationExpression
- Hydra.Ext.Haskell.Ast: ApplicationPattern :: Name -> [Pattern] -> ApplicationPattern
- Hydra.Ext.Haskell.Ast: ApplicationType :: Type -> Type -> ApplicationType
- Hydra.Ext.Haskell.Ast: AsPattern :: Name -> Pattern -> AsPattern
- Hydra.Ext.Haskell.Ast: AssertionClass :: ClassAssertion -> Assertion
- Hydra.Ext.Haskell.Ast: AssertionTuple :: [Assertion] -> Assertion
- Hydra.Ext.Haskell.Ast: CaseExpression :: Expression -> [Alternative] -> CaseExpression
- Hydra.Ext.Haskell.Ast: CaseRhs :: Expression -> CaseRhs
- Hydra.Ext.Haskell.Ast: ClassAssertion :: Name -> [Type] -> ClassAssertion
- Hydra.Ext.Haskell.Ast: ConstructRecordExpression :: Name -> [FieldUpdate] -> ConstructRecordExpression
- Hydra.Ext.Haskell.Ast: ConstructorOrdinary :: OrdinaryConstructor -> Constructor
- Hydra.Ext.Haskell.Ast: ConstructorRecord :: RecordConstructor -> Constructor
- Hydra.Ext.Haskell.Ast: ConstructorWithComments :: Constructor -> Maybe String -> ConstructorWithComments
- Hydra.Ext.Haskell.Ast: ContextType :: Assertion -> Type -> ContextType
- Hydra.Ext.Haskell.Ast: DataDeclaration :: DataOrNewtype -> [Assertion] -> DeclarationHead -> [ConstructorWithComments] -> [Deriving] -> DataDeclaration
- Hydra.Ext.Haskell.Ast: DataOrNewtypeData :: DataOrNewtype
- Hydra.Ext.Haskell.Ast: DataOrNewtypeNewtype :: DataOrNewtype
- Hydra.Ext.Haskell.Ast: DeclarationData :: DataDeclaration -> Declaration
- Hydra.Ext.Haskell.Ast: DeclarationHeadApplication :: ApplicationDeclarationHead -> DeclarationHead
- Hydra.Ext.Haskell.Ast: DeclarationHeadParens :: DeclarationHead -> DeclarationHead
- Hydra.Ext.Haskell.Ast: DeclarationHeadSimple :: Name -> DeclarationHead
- Hydra.Ext.Haskell.Ast: DeclarationType :: TypeDeclaration -> Declaration
- Hydra.Ext.Haskell.Ast: DeclarationTypedBinding :: TypedBinding -> Declaration
- Hydra.Ext.Haskell.Ast: DeclarationValueBinding :: ValueBinding -> Declaration
- Hydra.Ext.Haskell.Ast: DeclarationWithComments :: Declaration -> Maybe String -> DeclarationWithComments
- Hydra.Ext.Haskell.Ast: Deriving :: [Name] -> Deriving
- Hydra.Ext.Haskell.Ast: ExportDeclaration :: ImportExportSpec -> Export
- Hydra.Ext.Haskell.Ast: ExportModule :: ModuleName -> Export
- Hydra.Ext.Haskell.Ast: ExpressionApplication :: ApplicationExpression -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionCase :: CaseExpression -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionConstructRecord :: ConstructRecordExpression -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionDo :: [Statement] -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionIf :: IfExpression -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionInfixApplication :: InfixApplicationExpression -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionLambda :: LambdaExpression -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionLeftSection :: SectionExpression -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionLet :: LetExpression -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionList :: [Expression] -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionLiteral :: Literal -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionParens :: Expression -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionPrefixApplication :: PrefixApplicationExpression -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionRightSection :: SectionExpression -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionTuple :: [Expression] -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionTypeSignature :: TypeSignatureExpression -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionUpdateRecord :: UpdateRecordExpression -> Expression
- Hydra.Ext.Haskell.Ast: ExpressionVariable :: Name -> Expression
- Hydra.Ext.Haskell.Ast: Field :: Name -> Type -> Field
- Hydra.Ext.Haskell.Ast: FieldUpdate :: Name -> Expression -> FieldUpdate
- Hydra.Ext.Haskell.Ast: FieldWithComments :: Field -> Maybe String -> FieldWithComments
- Hydra.Ext.Haskell.Ast: FunctionType :: Type -> Type -> FunctionType
- Hydra.Ext.Haskell.Ast: IfExpression :: Expression -> Expression -> Expression -> IfExpression
- Hydra.Ext.Haskell.Ast: Import :: Bool -> ModuleName -> Maybe ModuleName -> Maybe SpecImport -> Import
- Hydra.Ext.Haskell.Ast: ImportExportSpec :: Maybe ImportModifier -> Name -> Maybe SubspecImportExportSpec -> ImportExportSpec
- Hydra.Ext.Haskell.Ast: ImportModifierPattern :: ImportModifier
- Hydra.Ext.Haskell.Ast: ImportModifierType :: ImportModifier
- Hydra.Ext.Haskell.Ast: InfixApplicationExpression :: Expression -> Operator -> Expression -> InfixApplicationExpression
- Hydra.Ext.Haskell.Ast: InfixType :: Type -> Operator -> Operator -> InfixType
- Hydra.Ext.Haskell.Ast: LambdaExpression :: [Pattern] -> Expression -> LambdaExpression
- Hydra.Ext.Haskell.Ast: LetExpression :: [LocalBinding] -> Expression -> LetExpression
- Hydra.Ext.Haskell.Ast: LiteralChar :: Int -> Literal
- Hydra.Ext.Haskell.Ast: LiteralDouble :: Double -> Literal
- Hydra.Ext.Haskell.Ast: LiteralFloat :: Float -> Literal
- Hydra.Ext.Haskell.Ast: LiteralInt :: Int -> Literal
- Hydra.Ext.Haskell.Ast: LiteralInteger :: Integer -> Literal
- Hydra.Ext.Haskell.Ast: LiteralString :: String -> Literal
- Hydra.Ext.Haskell.Ast: LocalBindingSignature :: TypeSignature -> LocalBinding
- Hydra.Ext.Haskell.Ast: LocalBindingValue :: ValueBinding -> LocalBinding
- Hydra.Ext.Haskell.Ast: LocalBindings :: [LocalBinding] -> LocalBindings
- Hydra.Ext.Haskell.Ast: Module :: Maybe ModuleHead -> [Import] -> [DeclarationWithComments] -> Module
- Hydra.Ext.Haskell.Ast: ModuleHead :: Maybe String -> ModuleName -> [Export] -> ModuleHead
- Hydra.Ext.Haskell.Ast: ModuleName :: String -> ModuleName
- Hydra.Ext.Haskell.Ast: NameImplicit :: QualifiedName -> Name
- Hydra.Ext.Haskell.Ast: NameNormal :: QualifiedName -> Name
- Hydra.Ext.Haskell.Ast: NameParens :: QualifiedName -> Name
- Hydra.Ext.Haskell.Ast: NamePart :: String -> NamePart
- Hydra.Ext.Haskell.Ast: OperatorBacktick :: QualifiedName -> Operator
- Hydra.Ext.Haskell.Ast: OperatorNormal :: QualifiedName -> Operator
- Hydra.Ext.Haskell.Ast: OrdinaryConstructor :: Name -> [Type] -> OrdinaryConstructor
- Hydra.Ext.Haskell.Ast: PatternApplication :: ApplicationPattern -> Pattern
- Hydra.Ext.Haskell.Ast: PatternAs :: AsPattern -> Pattern
- Hydra.Ext.Haskell.Ast: PatternField :: Name -> Pattern -> PatternField
- Hydra.Ext.Haskell.Ast: PatternList :: [Pattern] -> Pattern
- Hydra.Ext.Haskell.Ast: PatternLiteral :: Literal -> Pattern
- Hydra.Ext.Haskell.Ast: PatternName :: Name -> Pattern
- Hydra.Ext.Haskell.Ast: PatternParens :: Pattern -> Pattern
- Hydra.Ext.Haskell.Ast: PatternRecord :: RecordPattern -> Pattern
- Hydra.Ext.Haskell.Ast: PatternTuple :: [Pattern] -> Pattern
- Hydra.Ext.Haskell.Ast: PatternTyped :: TypedPattern -> Pattern
- Hydra.Ext.Haskell.Ast: PatternWildcard :: Pattern
- Hydra.Ext.Haskell.Ast: PrefixApplicationExpression :: Operator -> Expression -> PrefixApplicationExpression
- Hydra.Ext.Haskell.Ast: QualifiedName :: [NamePart] -> NamePart -> QualifiedName
- Hydra.Ext.Haskell.Ast: RecordConstructor :: Name -> [FieldWithComments] -> RecordConstructor
- Hydra.Ext.Haskell.Ast: RecordPattern :: Name -> [PatternField] -> RecordPattern
- Hydra.Ext.Haskell.Ast: RightHandSide :: Expression -> RightHandSide
- Hydra.Ext.Haskell.Ast: SectionExpression :: Operator -> Expression -> SectionExpression
- Hydra.Ext.Haskell.Ast: SimpleValueBinding :: Pattern -> RightHandSide -> Maybe LocalBindings -> SimpleValueBinding
- Hydra.Ext.Haskell.Ast: SpecImportHiding :: [ImportExportSpec] -> SpecImport
- Hydra.Ext.Haskell.Ast: SpecImportList :: [ImportExportSpec] -> SpecImport
- Hydra.Ext.Haskell.Ast: Statement :: Expression -> Statement
- Hydra.Ext.Haskell.Ast: SubspecImportExportSpecAll :: SubspecImportExportSpec
- Hydra.Ext.Haskell.Ast: SubspecImportExportSpecList :: [Name] -> SubspecImportExportSpec
- Hydra.Ext.Haskell.Ast: TypeApplication :: ApplicationType -> Type
- Hydra.Ext.Haskell.Ast: TypeCtx :: ContextType -> Type
- Hydra.Ext.Haskell.Ast: TypeDeclaration :: DeclarationHead -> Type -> TypeDeclaration
- Hydra.Ext.Haskell.Ast: TypeFunction :: FunctionType -> Type
- Hydra.Ext.Haskell.Ast: TypeInfix :: InfixType -> Type
- Hydra.Ext.Haskell.Ast: TypeList :: Type -> Type
- Hydra.Ext.Haskell.Ast: TypeParens :: Type -> Type
- Hydra.Ext.Haskell.Ast: TypeSignature :: Name -> Type -> TypeSignature
- Hydra.Ext.Haskell.Ast: TypeSignatureExpression :: Expression -> Type -> TypeSignatureExpression
- Hydra.Ext.Haskell.Ast: TypeTuple :: [Type] -> Type
- Hydra.Ext.Haskell.Ast: TypeVariable :: Name -> Type
- Hydra.Ext.Haskell.Ast: TypedBinding :: TypeSignature -> ValueBinding -> TypedBinding
- Hydra.Ext.Haskell.Ast: TypedPattern :: Pattern -> Type -> TypedPattern
- Hydra.Ext.Haskell.Ast: UpdateRecordExpression :: Expression -> [FieldUpdate] -> UpdateRecordExpression
- Hydra.Ext.Haskell.Ast: ValueBindingSimple :: SimpleValueBinding -> ValueBinding
- Hydra.Ext.Haskell.Ast: Variable :: Name -> Variable
- Hydra.Ext.Haskell.Ast: [alternativeBinds] :: Alternative -> Maybe LocalBindings
- Hydra.Ext.Haskell.Ast: [alternativePattern] :: Alternative -> Pattern
- Hydra.Ext.Haskell.Ast: [alternativeRhs] :: Alternative -> CaseRhs
- Hydra.Ext.Haskell.Ast: [applicationDeclarationHeadFunction] :: ApplicationDeclarationHead -> DeclarationHead
- Hydra.Ext.Haskell.Ast: [applicationDeclarationHeadOperand] :: ApplicationDeclarationHead -> Variable
- Hydra.Ext.Haskell.Ast: [applicationExpressionArgument] :: ApplicationExpression -> Expression
- Hydra.Ext.Haskell.Ast: [applicationExpressionFunction] :: ApplicationExpression -> Expression
- Hydra.Ext.Haskell.Ast: [applicationPatternArgs] :: ApplicationPattern -> [Pattern]
- Hydra.Ext.Haskell.Ast: [applicationPatternName] :: ApplicationPattern -> Name
- Hydra.Ext.Haskell.Ast: [applicationTypeArgument] :: ApplicationType -> Type
- Hydra.Ext.Haskell.Ast: [applicationTypeContext] :: ApplicationType -> Type
- Hydra.Ext.Haskell.Ast: [asPatternInner] :: AsPattern -> Pattern
- Hydra.Ext.Haskell.Ast: [asPatternName] :: AsPattern -> Name
- Hydra.Ext.Haskell.Ast: [caseExpressionAlternatives] :: CaseExpression -> [Alternative]
- Hydra.Ext.Haskell.Ast: [caseExpressionCase] :: CaseExpression -> Expression
- Hydra.Ext.Haskell.Ast: [classAssertionName] :: ClassAssertion -> Name
- Hydra.Ext.Haskell.Ast: [classAssertionTypes] :: ClassAssertion -> [Type]
- Hydra.Ext.Haskell.Ast: [constructRecordExpressionFields] :: ConstructRecordExpression -> [FieldUpdate]
- Hydra.Ext.Haskell.Ast: [constructRecordExpressionName] :: ConstructRecordExpression -> Name
- Hydra.Ext.Haskell.Ast: [constructorWithCommentsBody] :: ConstructorWithComments -> Constructor
- Hydra.Ext.Haskell.Ast: [constructorWithCommentsComments] :: ConstructorWithComments -> Maybe String
- Hydra.Ext.Haskell.Ast: [contextTypeCtx] :: ContextType -> Assertion
- Hydra.Ext.Haskell.Ast: [contextTypeType] :: ContextType -> Type
- Hydra.Ext.Haskell.Ast: [dataDeclarationConstructors] :: DataDeclaration -> [ConstructorWithComments]
- Hydra.Ext.Haskell.Ast: [dataDeclarationContext] :: DataDeclaration -> [Assertion]
- Hydra.Ext.Haskell.Ast: [dataDeclarationDeriving] :: DataDeclaration -> [Deriving]
- Hydra.Ext.Haskell.Ast: [dataDeclarationHead] :: DataDeclaration -> DeclarationHead
- Hydra.Ext.Haskell.Ast: [dataDeclarationKeyword] :: DataDeclaration -> DataOrNewtype
- Hydra.Ext.Haskell.Ast: [declarationWithCommentsBody] :: DeclarationWithComments -> Declaration
- Hydra.Ext.Haskell.Ast: [declarationWithCommentsComments] :: DeclarationWithComments -> Maybe String
- Hydra.Ext.Haskell.Ast: [fieldName] :: Field -> Name
- Hydra.Ext.Haskell.Ast: [fieldType] :: Field -> Type
- Hydra.Ext.Haskell.Ast: [fieldUpdateName] :: FieldUpdate -> Name
- Hydra.Ext.Haskell.Ast: [fieldUpdateValue] :: FieldUpdate -> Expression
- Hydra.Ext.Haskell.Ast: [fieldWithCommentsComments] :: FieldWithComments -> Maybe String
- Hydra.Ext.Haskell.Ast: [fieldWithCommentsField] :: FieldWithComments -> Field
- Hydra.Ext.Haskell.Ast: [functionTypeCodomain] :: FunctionType -> Type
- Hydra.Ext.Haskell.Ast: [functionTypeDomain] :: FunctionType -> Type
- Hydra.Ext.Haskell.Ast: [ifExpressionCondition] :: IfExpression -> Expression
- Hydra.Ext.Haskell.Ast: [ifExpressionElse] :: IfExpression -> Expression
- Hydra.Ext.Haskell.Ast: [ifExpressionThen] :: IfExpression -> Expression
- Hydra.Ext.Haskell.Ast: [importAs] :: Import -> Maybe ModuleName
- Hydra.Ext.Haskell.Ast: [importExportSpecModifier] :: ImportExportSpec -> Maybe ImportModifier
- Hydra.Ext.Haskell.Ast: [importExportSpecName] :: ImportExportSpec -> Name
- Hydra.Ext.Haskell.Ast: [importExportSpecSubspec] :: ImportExportSpec -> Maybe SubspecImportExportSpec
- Hydra.Ext.Haskell.Ast: [importModule] :: Import -> ModuleName
- Hydra.Ext.Haskell.Ast: [importQualified] :: Import -> Bool
- Hydra.Ext.Haskell.Ast: [importSpec] :: Import -> Maybe SpecImport
- Hydra.Ext.Haskell.Ast: [infixApplicationExpressionLhs] :: InfixApplicationExpression -> Expression
- Hydra.Ext.Haskell.Ast: [infixApplicationExpressionOperator] :: InfixApplicationExpression -> Operator
- Hydra.Ext.Haskell.Ast: [infixApplicationExpressionRhs] :: InfixApplicationExpression -> Expression
- Hydra.Ext.Haskell.Ast: [infixTypeLhs] :: InfixType -> Type
- Hydra.Ext.Haskell.Ast: [infixTypeOperator] :: InfixType -> Operator
- Hydra.Ext.Haskell.Ast: [infixTypeRhs] :: InfixType -> Operator
- Hydra.Ext.Haskell.Ast: [lambdaExpressionBindings] :: LambdaExpression -> [Pattern]
- Hydra.Ext.Haskell.Ast: [lambdaExpressionInner] :: LambdaExpression -> Expression
- Hydra.Ext.Haskell.Ast: [letExpressionBindings] :: LetExpression -> [LocalBinding]
- Hydra.Ext.Haskell.Ast: [letExpressionInner] :: LetExpression -> Expression
- Hydra.Ext.Haskell.Ast: [moduleDeclarations] :: Module -> [DeclarationWithComments]
- Hydra.Ext.Haskell.Ast: [moduleHeadComments] :: ModuleHead -> Maybe String
- Hydra.Ext.Haskell.Ast: [moduleHeadExports] :: ModuleHead -> [Export]
- Hydra.Ext.Haskell.Ast: [moduleHeadName] :: ModuleHead -> ModuleName
- Hydra.Ext.Haskell.Ast: [moduleHead] :: Module -> Maybe ModuleHead
- Hydra.Ext.Haskell.Ast: [moduleImports] :: Module -> [Import]
- Hydra.Ext.Haskell.Ast: [ordinaryConstructorFields] :: OrdinaryConstructor -> [Type]
- Hydra.Ext.Haskell.Ast: [ordinaryConstructorName] :: OrdinaryConstructor -> Name
- Hydra.Ext.Haskell.Ast: [patternFieldName] :: PatternField -> Name
- Hydra.Ext.Haskell.Ast: [patternFieldPattern] :: PatternField -> Pattern
- Hydra.Ext.Haskell.Ast: [prefixApplicationExpressionOperator] :: PrefixApplicationExpression -> Operator
- Hydra.Ext.Haskell.Ast: [prefixApplicationExpressionRhs] :: PrefixApplicationExpression -> Expression
- Hydra.Ext.Haskell.Ast: [qualifiedNameQualifiers] :: QualifiedName -> [NamePart]
- Hydra.Ext.Haskell.Ast: [qualifiedNameUnqualified] :: QualifiedName -> NamePart
- Hydra.Ext.Haskell.Ast: [recordConstructorFields] :: RecordConstructor -> [FieldWithComments]
- Hydra.Ext.Haskell.Ast: [recordConstructorName] :: RecordConstructor -> Name
- Hydra.Ext.Haskell.Ast: [recordPatternFields] :: RecordPattern -> [PatternField]
- Hydra.Ext.Haskell.Ast: [recordPatternName] :: RecordPattern -> Name
- Hydra.Ext.Haskell.Ast: [sectionExpressionExpression] :: SectionExpression -> Expression
- Hydra.Ext.Haskell.Ast: [sectionExpressionOperator] :: SectionExpression -> Operator
- Hydra.Ext.Haskell.Ast: [simpleValueBindingLocalBindings] :: SimpleValueBinding -> Maybe LocalBindings
- Hydra.Ext.Haskell.Ast: [simpleValueBindingPattern] :: SimpleValueBinding -> Pattern
- Hydra.Ext.Haskell.Ast: [simpleValueBindingRhs] :: SimpleValueBinding -> RightHandSide
- Hydra.Ext.Haskell.Ast: [typeDeclarationName] :: TypeDeclaration -> DeclarationHead
- Hydra.Ext.Haskell.Ast: [typeDeclarationType] :: TypeDeclaration -> Type
- Hydra.Ext.Haskell.Ast: [typeSignatureExpressionInner] :: TypeSignatureExpression -> Expression
- Hydra.Ext.Haskell.Ast: [typeSignatureExpressionType] :: TypeSignatureExpression -> Type
- Hydra.Ext.Haskell.Ast: [typeSignatureName] :: TypeSignature -> Name
- Hydra.Ext.Haskell.Ast: [typeSignatureType] :: TypeSignature -> Type
- Hydra.Ext.Haskell.Ast: [typedBindingTypeSignature] :: TypedBinding -> TypeSignature
- Hydra.Ext.Haskell.Ast: [typedBindingValueBinding] :: TypedBinding -> ValueBinding
- Hydra.Ext.Haskell.Ast: [typedPatternInner] :: TypedPattern -> Pattern
- Hydra.Ext.Haskell.Ast: [typedPatternType] :: TypedPattern -> Type
- Hydra.Ext.Haskell.Ast: [unCaseRhs] :: CaseRhs -> Expression
- Hydra.Ext.Haskell.Ast: [unDeriving] :: Deriving -> [Name]
- Hydra.Ext.Haskell.Ast: [unLocalBindings] :: LocalBindings -> [LocalBinding]
- Hydra.Ext.Haskell.Ast: [unModuleName] :: ModuleName -> String
- Hydra.Ext.Haskell.Ast: [unNamePart] :: NamePart -> String
- Hydra.Ext.Haskell.Ast: [unRightHandSide] :: RightHandSide -> Expression
- Hydra.Ext.Haskell.Ast: [unStatement] :: Statement -> Expression
- Hydra.Ext.Haskell.Ast: [unVariable] :: Variable -> Name
- Hydra.Ext.Haskell.Ast: [updateRecordExpressionFields] :: UpdateRecordExpression -> [FieldUpdate]
- Hydra.Ext.Haskell.Ast: [updateRecordExpressionInner] :: UpdateRecordExpression -> Expression
- Hydra.Ext.Haskell.Ast: _Alternative :: Name
- Hydra.Ext.Haskell.Ast: _Alternative_binds :: Name
- Hydra.Ext.Haskell.Ast: _Alternative_pattern :: Name
- Hydra.Ext.Haskell.Ast: _Alternative_rhs :: Name
- Hydra.Ext.Haskell.Ast: _ApplicationDeclarationHead :: Name
- Hydra.Ext.Haskell.Ast: _ApplicationDeclarationHead_function :: Name
- Hydra.Ext.Haskell.Ast: _ApplicationDeclarationHead_operand :: Name
- Hydra.Ext.Haskell.Ast: _ApplicationExpression :: Name
- Hydra.Ext.Haskell.Ast: _ApplicationExpression_argument :: Name
- Hydra.Ext.Haskell.Ast: _ApplicationExpression_function :: Name
- Hydra.Ext.Haskell.Ast: _ApplicationPattern :: Name
- Hydra.Ext.Haskell.Ast: _ApplicationPattern_args :: Name
- Hydra.Ext.Haskell.Ast: _ApplicationPattern_name :: Name
- Hydra.Ext.Haskell.Ast: _ApplicationType :: Name
- Hydra.Ext.Haskell.Ast: _ApplicationType_argument :: Name
- Hydra.Ext.Haskell.Ast: _ApplicationType_context :: Name
- Hydra.Ext.Haskell.Ast: _AsPattern :: Name
- Hydra.Ext.Haskell.Ast: _AsPattern_inner :: Name
- Hydra.Ext.Haskell.Ast: _AsPattern_name :: Name
- Hydra.Ext.Haskell.Ast: _Assertion :: Name
- Hydra.Ext.Haskell.Ast: _Assertion_class :: Name
- Hydra.Ext.Haskell.Ast: _Assertion_tuple :: Name
- Hydra.Ext.Haskell.Ast: _CaseExpression :: Name
- Hydra.Ext.Haskell.Ast: _CaseExpression_alternatives :: Name
- Hydra.Ext.Haskell.Ast: _CaseExpression_case :: Name
- Hydra.Ext.Haskell.Ast: _CaseRhs :: Name
- Hydra.Ext.Haskell.Ast: _ClassAssertion :: Name
- Hydra.Ext.Haskell.Ast: _ClassAssertion_name :: Name
- Hydra.Ext.Haskell.Ast: _ClassAssertion_types :: Name
- Hydra.Ext.Haskell.Ast: _ConstructRecordExpression :: Name
- Hydra.Ext.Haskell.Ast: _ConstructRecordExpression_fields :: Name
- Hydra.Ext.Haskell.Ast: _ConstructRecordExpression_name :: Name
- Hydra.Ext.Haskell.Ast: _Constructor :: Name
- Hydra.Ext.Haskell.Ast: _ConstructorWithComments :: Name
- Hydra.Ext.Haskell.Ast: _ConstructorWithComments_body :: Name
- Hydra.Ext.Haskell.Ast: _ConstructorWithComments_comments :: Name
- Hydra.Ext.Haskell.Ast: _Constructor_ordinary :: Name
- Hydra.Ext.Haskell.Ast: _Constructor_record :: Name
- Hydra.Ext.Haskell.Ast: _ContextType :: Name
- Hydra.Ext.Haskell.Ast: _ContextType_ctx :: Name
- Hydra.Ext.Haskell.Ast: _ContextType_type :: Name
- Hydra.Ext.Haskell.Ast: _DataDeclaration :: Name
- Hydra.Ext.Haskell.Ast: _DataDeclaration_constructors :: Name
- Hydra.Ext.Haskell.Ast: _DataDeclaration_context :: Name
- Hydra.Ext.Haskell.Ast: _DataDeclaration_deriving :: Name
- Hydra.Ext.Haskell.Ast: _DataDeclaration_head :: Name
- Hydra.Ext.Haskell.Ast: _DataDeclaration_keyword :: Name
- Hydra.Ext.Haskell.Ast: _DataOrNewtype :: Name
- Hydra.Ext.Haskell.Ast: _DataOrNewtype_data :: Name
- Hydra.Ext.Haskell.Ast: _DataOrNewtype_newtype :: Name
- Hydra.Ext.Haskell.Ast: _Declaration :: Name
- Hydra.Ext.Haskell.Ast: _DeclarationHead :: Name
- Hydra.Ext.Haskell.Ast: _DeclarationHead_application :: Name
- Hydra.Ext.Haskell.Ast: _DeclarationHead_parens :: Name
- Hydra.Ext.Haskell.Ast: _DeclarationHead_simple :: Name
- Hydra.Ext.Haskell.Ast: _DeclarationWithComments :: Name
- Hydra.Ext.Haskell.Ast: _DeclarationWithComments_body :: Name
- Hydra.Ext.Haskell.Ast: _DeclarationWithComments_comments :: Name
- Hydra.Ext.Haskell.Ast: _Declaration_data :: Name
- Hydra.Ext.Haskell.Ast: _Declaration_type :: Name
- Hydra.Ext.Haskell.Ast: _Declaration_typedBinding :: Name
- Hydra.Ext.Haskell.Ast: _Declaration_valueBinding :: Name
- Hydra.Ext.Haskell.Ast: _Deriving :: Name
- Hydra.Ext.Haskell.Ast: _Export :: Name
- Hydra.Ext.Haskell.Ast: _Export_declaration :: Name
- Hydra.Ext.Haskell.Ast: _Export_module :: Name
- Hydra.Ext.Haskell.Ast: _Expression :: Name
- Hydra.Ext.Haskell.Ast: _Expression_application :: Name
- Hydra.Ext.Haskell.Ast: _Expression_case :: Name
- Hydra.Ext.Haskell.Ast: _Expression_constructRecord :: Name
- Hydra.Ext.Haskell.Ast: _Expression_do :: Name
- Hydra.Ext.Haskell.Ast: _Expression_if :: Name
- Hydra.Ext.Haskell.Ast: _Expression_infixApplication :: Name
- Hydra.Ext.Haskell.Ast: _Expression_lambda :: Name
- Hydra.Ext.Haskell.Ast: _Expression_leftSection :: Name
- Hydra.Ext.Haskell.Ast: _Expression_let :: Name
- Hydra.Ext.Haskell.Ast: _Expression_list :: Name
- Hydra.Ext.Haskell.Ast: _Expression_literal :: Name
- Hydra.Ext.Haskell.Ast: _Expression_parens :: Name
- Hydra.Ext.Haskell.Ast: _Expression_prefixApplication :: Name
- Hydra.Ext.Haskell.Ast: _Expression_rightSection :: Name
- Hydra.Ext.Haskell.Ast: _Expression_tuple :: Name
- Hydra.Ext.Haskell.Ast: _Expression_typeSignature :: Name
- Hydra.Ext.Haskell.Ast: _Expression_updateRecord :: Name
- Hydra.Ext.Haskell.Ast: _Expression_variable :: Name
- Hydra.Ext.Haskell.Ast: _Field :: Name
- Hydra.Ext.Haskell.Ast: _FieldUpdate :: Name
- Hydra.Ext.Haskell.Ast: _FieldUpdate_name :: Name
- Hydra.Ext.Haskell.Ast: _FieldUpdate_value :: Name
- Hydra.Ext.Haskell.Ast: _FieldWithComments :: Name
- Hydra.Ext.Haskell.Ast: _FieldWithComments_comments :: Name
- Hydra.Ext.Haskell.Ast: _FieldWithComments_field :: Name
- Hydra.Ext.Haskell.Ast: _Field_name :: Name
- Hydra.Ext.Haskell.Ast: _Field_type :: Name
- Hydra.Ext.Haskell.Ast: _FunctionType :: Name
- Hydra.Ext.Haskell.Ast: _FunctionType_codomain :: Name
- Hydra.Ext.Haskell.Ast: _FunctionType_domain :: Name
- Hydra.Ext.Haskell.Ast: _IfExpression :: Name
- Hydra.Ext.Haskell.Ast: _IfExpression_condition :: Name
- Hydra.Ext.Haskell.Ast: _IfExpression_else :: Name
- Hydra.Ext.Haskell.Ast: _IfExpression_then :: Name
- Hydra.Ext.Haskell.Ast: _Import :: Name
- Hydra.Ext.Haskell.Ast: _ImportExportSpec :: Name
- Hydra.Ext.Haskell.Ast: _ImportExportSpec_modifier :: Name
- Hydra.Ext.Haskell.Ast: _ImportExportSpec_name :: Name
- Hydra.Ext.Haskell.Ast: _ImportExportSpec_subspec :: Name
- Hydra.Ext.Haskell.Ast: _ImportModifier :: Name
- Hydra.Ext.Haskell.Ast: _ImportModifier_pattern :: Name
- Hydra.Ext.Haskell.Ast: _ImportModifier_type :: Name
- Hydra.Ext.Haskell.Ast: _Import_as :: Name
- Hydra.Ext.Haskell.Ast: _Import_module :: Name
- Hydra.Ext.Haskell.Ast: _Import_qualified :: Name
- Hydra.Ext.Haskell.Ast: _Import_spec :: Name
- Hydra.Ext.Haskell.Ast: _InfixApplicationExpression :: Name
- Hydra.Ext.Haskell.Ast: _InfixApplicationExpression_lhs :: Name
- Hydra.Ext.Haskell.Ast: _InfixApplicationExpression_operator :: Name
- Hydra.Ext.Haskell.Ast: _InfixApplicationExpression_rhs :: Name
- Hydra.Ext.Haskell.Ast: _InfixType :: Name
- Hydra.Ext.Haskell.Ast: _InfixType_lhs :: Name
- Hydra.Ext.Haskell.Ast: _InfixType_operator :: Name
- Hydra.Ext.Haskell.Ast: _InfixType_rhs :: Name
- Hydra.Ext.Haskell.Ast: _LambdaExpression :: Name
- Hydra.Ext.Haskell.Ast: _LambdaExpression_bindings :: Name
- Hydra.Ext.Haskell.Ast: _LambdaExpression_inner :: Name
- Hydra.Ext.Haskell.Ast: _LetExpression :: Name
- Hydra.Ext.Haskell.Ast: _LetExpression_bindings :: Name
- Hydra.Ext.Haskell.Ast: _LetExpression_inner :: Name
- Hydra.Ext.Haskell.Ast: _Literal :: Name
- Hydra.Ext.Haskell.Ast: _Literal_char :: Name
- Hydra.Ext.Haskell.Ast: _Literal_double :: Name
- Hydra.Ext.Haskell.Ast: _Literal_float :: Name
- Hydra.Ext.Haskell.Ast: _Literal_int :: Name
- Hydra.Ext.Haskell.Ast: _Literal_integer :: Name
- Hydra.Ext.Haskell.Ast: _Literal_string :: Name
- Hydra.Ext.Haskell.Ast: _LocalBinding :: Name
- Hydra.Ext.Haskell.Ast: _LocalBinding_signature :: Name
- Hydra.Ext.Haskell.Ast: _LocalBinding_value :: Name
- Hydra.Ext.Haskell.Ast: _LocalBindings :: Name
- Hydra.Ext.Haskell.Ast: _Module :: Name
- Hydra.Ext.Haskell.Ast: _ModuleHead :: Name
- Hydra.Ext.Haskell.Ast: _ModuleHead_comments :: Name
- Hydra.Ext.Haskell.Ast: _ModuleHead_exports :: Name
- Hydra.Ext.Haskell.Ast: _ModuleHead_name :: Name
- Hydra.Ext.Haskell.Ast: _ModuleName :: Name
- Hydra.Ext.Haskell.Ast: _Module_declarations :: Name
- Hydra.Ext.Haskell.Ast: _Module_head :: Name
- Hydra.Ext.Haskell.Ast: _Module_imports :: Name
- Hydra.Ext.Haskell.Ast: _Name :: Name
- Hydra.Ext.Haskell.Ast: _NamePart :: Name
- Hydra.Ext.Haskell.Ast: _Name_implicit :: Name
- Hydra.Ext.Haskell.Ast: _Name_normal :: Name
- Hydra.Ext.Haskell.Ast: _Name_parens :: Name
- Hydra.Ext.Haskell.Ast: _Operator :: Name
- Hydra.Ext.Haskell.Ast: _Operator_backtick :: Name
- Hydra.Ext.Haskell.Ast: _Operator_normal :: Name
- Hydra.Ext.Haskell.Ast: _OrdinaryConstructor :: Name
- Hydra.Ext.Haskell.Ast: _OrdinaryConstructor_fields :: Name
- Hydra.Ext.Haskell.Ast: _OrdinaryConstructor_name :: Name
- Hydra.Ext.Haskell.Ast: _Pattern :: Name
- Hydra.Ext.Haskell.Ast: _PatternField :: Name
- Hydra.Ext.Haskell.Ast: _PatternField_name :: Name
- Hydra.Ext.Haskell.Ast: _PatternField_pattern :: Name
- Hydra.Ext.Haskell.Ast: _Pattern_application :: Name
- Hydra.Ext.Haskell.Ast: _Pattern_as :: Name
- Hydra.Ext.Haskell.Ast: _Pattern_list :: Name
- Hydra.Ext.Haskell.Ast: _Pattern_literal :: Name
- Hydra.Ext.Haskell.Ast: _Pattern_name :: Name
- Hydra.Ext.Haskell.Ast: _Pattern_parens :: Name
- Hydra.Ext.Haskell.Ast: _Pattern_record :: Name
- Hydra.Ext.Haskell.Ast: _Pattern_tuple :: Name
- Hydra.Ext.Haskell.Ast: _Pattern_typed :: Name
- Hydra.Ext.Haskell.Ast: _Pattern_wildcard :: Name
- Hydra.Ext.Haskell.Ast: _PrefixApplicationExpression :: Name
- Hydra.Ext.Haskell.Ast: _PrefixApplicationExpression_operator :: Name
- Hydra.Ext.Haskell.Ast: _PrefixApplicationExpression_rhs :: Name
- Hydra.Ext.Haskell.Ast: _QualifiedName :: Name
- Hydra.Ext.Haskell.Ast: _QualifiedName_qualifiers :: Name
- Hydra.Ext.Haskell.Ast: _QualifiedName_unqualified :: Name
- Hydra.Ext.Haskell.Ast: _RecordConstructor :: Name
- Hydra.Ext.Haskell.Ast: _RecordConstructor_fields :: Name
- Hydra.Ext.Haskell.Ast: _RecordConstructor_name :: Name
- Hydra.Ext.Haskell.Ast: _RecordPattern :: Name
- Hydra.Ext.Haskell.Ast: _RecordPattern_fields :: Name
- Hydra.Ext.Haskell.Ast: _RecordPattern_name :: Name
- Hydra.Ext.Haskell.Ast: _RightHandSide :: Name
- Hydra.Ext.Haskell.Ast: _SectionExpression :: Name
- Hydra.Ext.Haskell.Ast: _SectionExpression_expression :: Name
- Hydra.Ext.Haskell.Ast: _SectionExpression_operator :: Name
- Hydra.Ext.Haskell.Ast: _SimpleValueBinding :: Name
- Hydra.Ext.Haskell.Ast: _SimpleValueBinding_localBindings :: Name
- Hydra.Ext.Haskell.Ast: _SimpleValueBinding_pattern :: Name
- Hydra.Ext.Haskell.Ast: _SimpleValueBinding_rhs :: Name
- Hydra.Ext.Haskell.Ast: _SpecImport :: Name
- Hydra.Ext.Haskell.Ast: _SpecImport_hiding :: Name
- Hydra.Ext.Haskell.Ast: _SpecImport_list :: Name
- Hydra.Ext.Haskell.Ast: _Statement :: Name
- Hydra.Ext.Haskell.Ast: _SubspecImportExportSpec :: Name
- Hydra.Ext.Haskell.Ast: _SubspecImportExportSpec_all :: Name
- Hydra.Ext.Haskell.Ast: _SubspecImportExportSpec_list :: Name
- Hydra.Ext.Haskell.Ast: _Type :: Name
- Hydra.Ext.Haskell.Ast: _TypeDeclaration :: Name
- Hydra.Ext.Haskell.Ast: _TypeDeclaration_name :: Name
- Hydra.Ext.Haskell.Ast: _TypeDeclaration_type :: Name
- Hydra.Ext.Haskell.Ast: _TypeSignature :: Name
- Hydra.Ext.Haskell.Ast: _TypeSignatureExpression :: Name
- Hydra.Ext.Haskell.Ast: _TypeSignatureExpression_inner :: Name
- Hydra.Ext.Haskell.Ast: _TypeSignatureExpression_type :: Name
- Hydra.Ext.Haskell.Ast: _TypeSignature_name :: Name
- Hydra.Ext.Haskell.Ast: _TypeSignature_type :: Name
- Hydra.Ext.Haskell.Ast: _Type_application :: Name
- Hydra.Ext.Haskell.Ast: _Type_ctx :: Name
- Hydra.Ext.Haskell.Ast: _Type_function :: Name
- Hydra.Ext.Haskell.Ast: _Type_infix :: Name
- Hydra.Ext.Haskell.Ast: _Type_list :: Name
- Hydra.Ext.Haskell.Ast: _Type_parens :: Name
- Hydra.Ext.Haskell.Ast: _Type_tuple :: Name
- Hydra.Ext.Haskell.Ast: _Type_variable :: Name
- Hydra.Ext.Haskell.Ast: _TypedBinding :: Name
- Hydra.Ext.Haskell.Ast: _TypedBinding_typeSignature :: Name
- Hydra.Ext.Haskell.Ast: _TypedBinding_valueBinding :: Name
- Hydra.Ext.Haskell.Ast: _TypedPattern :: Name
- Hydra.Ext.Haskell.Ast: _TypedPattern_inner :: Name
- Hydra.Ext.Haskell.Ast: _TypedPattern_type :: Name
- Hydra.Ext.Haskell.Ast: _UpdateRecordExpression :: Name
- Hydra.Ext.Haskell.Ast: _UpdateRecordExpression_fields :: Name
- Hydra.Ext.Haskell.Ast: _UpdateRecordExpression_inner :: Name
- Hydra.Ext.Haskell.Ast: _ValueBinding :: Name
- Hydra.Ext.Haskell.Ast: _ValueBinding_simple :: Name
- Hydra.Ext.Haskell.Ast: _Variable :: Name
- Hydra.Ext.Haskell.Ast: data Alternative
- Hydra.Ext.Haskell.Ast: data ApplicationDeclarationHead
- Hydra.Ext.Haskell.Ast: data ApplicationExpression
- Hydra.Ext.Haskell.Ast: data ApplicationPattern
- Hydra.Ext.Haskell.Ast: data ApplicationType
- Hydra.Ext.Haskell.Ast: data AsPattern
- Hydra.Ext.Haskell.Ast: data Assertion
- Hydra.Ext.Haskell.Ast: data CaseExpression
- Hydra.Ext.Haskell.Ast: data ClassAssertion
- Hydra.Ext.Haskell.Ast: data ConstructRecordExpression
- Hydra.Ext.Haskell.Ast: data Constructor
- Hydra.Ext.Haskell.Ast: data ConstructorWithComments
- Hydra.Ext.Haskell.Ast: data ContextType
- Hydra.Ext.Haskell.Ast: data DataDeclaration
- Hydra.Ext.Haskell.Ast: data DataOrNewtype
- Hydra.Ext.Haskell.Ast: data Declaration
- Hydra.Ext.Haskell.Ast: data DeclarationHead
- Hydra.Ext.Haskell.Ast: data DeclarationWithComments
- Hydra.Ext.Haskell.Ast: data Export
- Hydra.Ext.Haskell.Ast: data Expression
- Hydra.Ext.Haskell.Ast: data Field
- Hydra.Ext.Haskell.Ast: data FieldUpdate
- Hydra.Ext.Haskell.Ast: data FieldWithComments
- Hydra.Ext.Haskell.Ast: data FunctionType
- Hydra.Ext.Haskell.Ast: data IfExpression
- Hydra.Ext.Haskell.Ast: data Import
- Hydra.Ext.Haskell.Ast: data ImportExportSpec
- Hydra.Ext.Haskell.Ast: data ImportModifier
- Hydra.Ext.Haskell.Ast: data InfixApplicationExpression
- Hydra.Ext.Haskell.Ast: data InfixType
- Hydra.Ext.Haskell.Ast: data LambdaExpression
- Hydra.Ext.Haskell.Ast: data LetExpression
- Hydra.Ext.Haskell.Ast: data Literal
- Hydra.Ext.Haskell.Ast: data LocalBinding
- Hydra.Ext.Haskell.Ast: data Module
- Hydra.Ext.Haskell.Ast: data ModuleHead
- Hydra.Ext.Haskell.Ast: data Name
- Hydra.Ext.Haskell.Ast: data Operator
- Hydra.Ext.Haskell.Ast: data OrdinaryConstructor
- Hydra.Ext.Haskell.Ast: data Pattern
- Hydra.Ext.Haskell.Ast: data PatternField
- Hydra.Ext.Haskell.Ast: data PrefixApplicationExpression
- Hydra.Ext.Haskell.Ast: data QualifiedName
- Hydra.Ext.Haskell.Ast: data RecordConstructor
- Hydra.Ext.Haskell.Ast: data RecordPattern
- Hydra.Ext.Haskell.Ast: data SectionExpression
- Hydra.Ext.Haskell.Ast: data SimpleValueBinding
- Hydra.Ext.Haskell.Ast: data SpecImport
- Hydra.Ext.Haskell.Ast: data SubspecImportExportSpec
- Hydra.Ext.Haskell.Ast: data Type
- Hydra.Ext.Haskell.Ast: data TypeDeclaration
- Hydra.Ext.Haskell.Ast: data TypeSignature
- Hydra.Ext.Haskell.Ast: data TypeSignatureExpression
- Hydra.Ext.Haskell.Ast: data TypedBinding
- Hydra.Ext.Haskell.Ast: data TypedPattern
- Hydra.Ext.Haskell.Ast: data UpdateRecordExpression
- Hydra.Ext.Haskell.Ast: data ValueBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Alternative
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.ApplicationDeclarationHead
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.ApplicationExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.ApplicationPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.ApplicationType
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.AsPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Assertion
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.CaseExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.CaseRhs
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.ClassAssertion
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.ConstructRecordExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Constructor
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.ConstructorWithComments
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.ContextType
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.DataDeclaration
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.DataOrNewtype
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Declaration
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.DeclarationHead
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.DeclarationWithComments
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Deriving
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Export
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Expression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Field
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.FieldUpdate
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.FieldWithComments
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.FunctionType
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.IfExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Import
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.ImportExportSpec
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.ImportModifier
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.InfixApplicationExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.InfixType
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.LambdaExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.LetExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Literal
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.LocalBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.LocalBindings
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Module
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.ModuleHead
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.ModuleName
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Name
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.NamePart
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Operator
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.OrdinaryConstructor
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Pattern
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.PatternField
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.PrefixApplicationExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.QualifiedName
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.RecordConstructor
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.RecordPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.RightHandSide
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.SectionExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.SimpleValueBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.SpecImport
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Statement
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.SubspecImportExportSpec
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Type
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.TypeDeclaration
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.TypeSignature
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.TypeSignatureExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.TypedBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.TypedPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.UpdateRecordExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.ValueBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Eq Hydra.Ext.Haskell.Ast.Variable
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Alternative
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.ApplicationDeclarationHead
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.ApplicationExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.ApplicationPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.ApplicationType
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.AsPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Assertion
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.CaseExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.CaseRhs
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.ClassAssertion
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.ConstructRecordExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Constructor
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.ConstructorWithComments
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.ContextType
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.DataDeclaration
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.DataOrNewtype
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Declaration
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.DeclarationHead
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.DeclarationWithComments
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Deriving
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Export
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Expression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Field
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.FieldUpdate
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.FieldWithComments
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.FunctionType
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.IfExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Import
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.ImportExportSpec
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.ImportModifier
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.InfixApplicationExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.InfixType
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.LambdaExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.LetExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Literal
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.LocalBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.LocalBindings
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Module
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.ModuleHead
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.ModuleName
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Name
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.NamePart
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Operator
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.OrdinaryConstructor
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Pattern
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.PatternField
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.PrefixApplicationExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.QualifiedName
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.RecordConstructor
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.RecordPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.RightHandSide
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.SectionExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.SimpleValueBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.SpecImport
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Statement
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.SubspecImportExportSpec
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Type
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.TypeDeclaration
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.TypeSignature
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.TypeSignatureExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.TypedBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.TypedPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.UpdateRecordExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.ValueBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Classes.Ord Hydra.Ext.Haskell.Ast.Variable
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Alternative
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.ApplicationDeclarationHead
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.ApplicationExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.ApplicationPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.ApplicationType
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.AsPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Assertion
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.CaseExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.CaseRhs
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.ClassAssertion
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.ConstructRecordExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Constructor
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.ConstructorWithComments
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.ContextType
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.DataDeclaration
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.DataOrNewtype
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Declaration
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.DeclarationHead
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.DeclarationWithComments
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Deriving
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Export
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Expression
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Field
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.FieldUpdate
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.FieldWithComments
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.FunctionType
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.IfExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Import
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.ImportExportSpec
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.ImportModifier
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.InfixApplicationExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.InfixType
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.LambdaExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.LetExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Literal
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.LocalBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.LocalBindings
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Module
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.ModuleHead
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.ModuleName
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Name
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.NamePart
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Operator
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.OrdinaryConstructor
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Pattern
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.PatternField
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.PrefixApplicationExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.QualifiedName
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.RecordConstructor
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.RecordPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.RightHandSide
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.SectionExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.SimpleValueBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.SpecImport
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Statement
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.SubspecImportExportSpec
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Type
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.TypeDeclaration
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.TypeSignature
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.TypeSignatureExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.TypedBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.TypedPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.UpdateRecordExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.ValueBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Read.Read Hydra.Ext.Haskell.Ast.Variable
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Alternative
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.ApplicationDeclarationHead
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.ApplicationExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.ApplicationPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.ApplicationType
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.AsPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Assertion
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.CaseExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.CaseRhs
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.ClassAssertion
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.ConstructRecordExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Constructor
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.ConstructorWithComments
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.ContextType
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.DataDeclaration
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.DataOrNewtype
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Declaration
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.DeclarationHead
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.DeclarationWithComments
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Deriving
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Export
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Expression
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Field
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.FieldUpdate
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.FieldWithComments
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.FunctionType
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.IfExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Import
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.ImportExportSpec
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.ImportModifier
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.InfixApplicationExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.InfixType
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.LambdaExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.LetExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Literal
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.LocalBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.LocalBindings
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Module
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.ModuleHead
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.ModuleName
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Name
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.NamePart
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Operator
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.OrdinaryConstructor
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Pattern
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.PatternField
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.PrefixApplicationExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.QualifiedName
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.RecordConstructor
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.RecordPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.RightHandSide
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.SectionExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.SimpleValueBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.SpecImport
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Statement
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.SubspecImportExportSpec
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Type
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.TypeDeclaration
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.TypeSignature
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.TypeSignatureExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.TypedBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.TypedPattern
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.UpdateRecordExpression
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.ValueBinding
- Hydra.Ext.Haskell.Ast: instance GHC.Show.Show Hydra.Ext.Haskell.Ast.Variable
- Hydra.Ext.Haskell.Ast: newtype CaseRhs
- Hydra.Ext.Haskell.Ast: newtype Deriving
- Hydra.Ext.Haskell.Ast: newtype LocalBindings
- Hydra.Ext.Haskell.Ast: newtype ModuleName
- Hydra.Ext.Haskell.Ast: newtype NamePart
- Hydra.Ext.Haskell.Ast: newtype RightHandSide
- Hydra.Ext.Haskell.Ast: newtype Statement
- Hydra.Ext.Haskell.Ast: newtype Variable
- Hydra.Ext.Org.Json.Coder: decodeRecord :: RowType -> [(FieldType, Coder t0 t1 Term Value)] -> Value -> Flow t1 Term
- Hydra.Ext.Org.Json.Coder: encodeRecord :: [(FieldType, Coder Graph t0 Term Value)] -> Term -> Flow Graph Value
- Hydra.Ext.Org.Json.Coder: jsonCoder :: Type -> Flow Graph (Coder Graph t0 Term Value)
- Hydra.Ext.Org.Json.Coder: literalJsonCoder :: LiteralType -> Flow t0 (Coder t1 t2 Literal Value)
- Hydra.Ext.Org.Json.Coder: readStringStub :: String -> Term
- Hydra.Ext.Org.Json.Coder: recordCoder :: RowType -> Flow t0 (Coder Graph t1 Term Value)
- Hydra.Ext.Org.Json.Coder: showValue :: t0 -> String
- Hydra.Ext.Org.Json.Coder: termCoder :: Type -> Flow t0 (Coder Graph t1 Term Value)
- Hydra.Ext.Org.Json.Coder: unitCoder :: Coder t0 t1 Term Value
- Hydra.Ext.Org.Json.Coder: untypedTermToJson :: Term -> Flow t0 Value
- Hydra.Ext.Org.Json.Language: jsonLanguage :: Language
- Hydra.Generation: printTrace :: Bool -> Trace -> IO ()
- Hydra.Generation: runFlow :: s -> Flow s a -> IO (Maybe a)
- Hydra.Generation: writeYaml :: FilePath -> [Module] -> [Module] -> IO ()
- Hydra.Grammar: Constant :: String -> Constant
- Hydra.Grammar: Grammar :: [Production] -> Grammar
- Hydra.Grammar: Label :: String -> Label
- Hydra.Grammar: LabeledPattern :: Label -> Pattern -> LabeledPattern
- Hydra.Grammar: PatternAlternatives :: [Pattern] -> Pattern
- Hydra.Grammar: PatternConstant :: Constant -> Pattern
- Hydra.Grammar: PatternIgnored :: Pattern -> Pattern
- Hydra.Grammar: PatternLabeled :: LabeledPattern -> Pattern
- Hydra.Grammar: PatternNil :: Pattern
- Hydra.Grammar: PatternNonterminal :: Symbol -> Pattern
- Hydra.Grammar: PatternOption :: Pattern -> Pattern
- Hydra.Grammar: PatternPlus :: Pattern -> Pattern
- Hydra.Grammar: PatternRegex :: Regex -> Pattern
- Hydra.Grammar: PatternSequence :: [Pattern] -> Pattern
- Hydra.Grammar: PatternStar :: Pattern -> Pattern
- Hydra.Grammar: Production :: Symbol -> Pattern -> Production
- Hydra.Grammar: Regex :: String -> Regex
- Hydra.Grammar: Symbol :: String -> Symbol
- Hydra.Grammar: [labeledPatternLabel] :: LabeledPattern -> Label
- Hydra.Grammar: [labeledPatternPattern] :: LabeledPattern -> Pattern
- Hydra.Grammar: [productionPattern] :: Production -> Pattern
- Hydra.Grammar: [productionSymbol] :: Production -> Symbol
- Hydra.Grammar: [unConstant] :: Constant -> String
- Hydra.Grammar: [unGrammar] :: Grammar -> [Production]
- Hydra.Grammar: [unLabel] :: Label -> String
- Hydra.Grammar: [unRegex] :: Regex -> String
- Hydra.Grammar: [unSymbol] :: Symbol -> String
- Hydra.Grammar: _Constant :: Name
- Hydra.Grammar: _Grammar :: Name
- Hydra.Grammar: _Label :: Name
- Hydra.Grammar: _LabeledPattern :: Name
- Hydra.Grammar: _LabeledPattern_label :: Name
- Hydra.Grammar: _LabeledPattern_pattern :: Name
- Hydra.Grammar: _Pattern :: Name
- Hydra.Grammar: _Pattern_alternatives :: Name
- Hydra.Grammar: _Pattern_constant :: Name
- Hydra.Grammar: _Pattern_ignored :: Name
- Hydra.Grammar: _Pattern_labeled :: Name
- Hydra.Grammar: _Pattern_nil :: Name
- Hydra.Grammar: _Pattern_nonterminal :: Name
- Hydra.Grammar: _Pattern_option :: Name
- Hydra.Grammar: _Pattern_plus :: Name
- Hydra.Grammar: _Pattern_regex :: Name
- Hydra.Grammar: _Pattern_sequence :: Name
- Hydra.Grammar: _Pattern_star :: Name
- Hydra.Grammar: _Production :: Name
- Hydra.Grammar: _Production_pattern :: Name
- Hydra.Grammar: _Production_symbol :: Name
- Hydra.Grammar: _Regex :: Name
- Hydra.Grammar: _Symbol :: Name
- Hydra.Grammar: data LabeledPattern
- Hydra.Grammar: data Pattern
- Hydra.Grammar: data Production
- Hydra.Grammar: instance GHC.Classes.Eq Hydra.Grammar.Constant
- Hydra.Grammar: instance GHC.Classes.Eq Hydra.Grammar.Grammar
- Hydra.Grammar: instance GHC.Classes.Eq Hydra.Grammar.Label
- Hydra.Grammar: instance GHC.Classes.Eq Hydra.Grammar.LabeledPattern
- Hydra.Grammar: instance GHC.Classes.Eq Hydra.Grammar.Pattern
- Hydra.Grammar: instance GHC.Classes.Eq Hydra.Grammar.Production
- Hydra.Grammar: instance GHC.Classes.Eq Hydra.Grammar.Regex
- Hydra.Grammar: instance GHC.Classes.Eq Hydra.Grammar.Symbol
- Hydra.Grammar: instance GHC.Classes.Ord Hydra.Grammar.Constant
- Hydra.Grammar: instance GHC.Classes.Ord Hydra.Grammar.Grammar
- Hydra.Grammar: instance GHC.Classes.Ord Hydra.Grammar.Label
- Hydra.Grammar: instance GHC.Classes.Ord Hydra.Grammar.LabeledPattern
- Hydra.Grammar: instance GHC.Classes.Ord Hydra.Grammar.Pattern
- Hydra.Grammar: instance GHC.Classes.Ord Hydra.Grammar.Production
- Hydra.Grammar: instance GHC.Classes.Ord Hydra.Grammar.Regex
- Hydra.Grammar: instance GHC.Classes.Ord Hydra.Grammar.Symbol
- Hydra.Grammar: instance GHC.Read.Read Hydra.Grammar.Constant
- Hydra.Grammar: instance GHC.Read.Read Hydra.Grammar.Grammar
- Hydra.Grammar: instance GHC.Read.Read Hydra.Grammar.Label
- Hydra.Grammar: instance GHC.Read.Read Hydra.Grammar.LabeledPattern
- Hydra.Grammar: instance GHC.Read.Read Hydra.Grammar.Pattern
- Hydra.Grammar: instance GHC.Read.Read Hydra.Grammar.Production
- Hydra.Grammar: instance GHC.Read.Read Hydra.Grammar.Regex
- Hydra.Grammar: instance GHC.Read.Read Hydra.Grammar.Symbol
- Hydra.Grammar: instance GHC.Show.Show Hydra.Grammar.Constant
- Hydra.Grammar: instance GHC.Show.Show Hydra.Grammar.Grammar
- Hydra.Grammar: instance GHC.Show.Show Hydra.Grammar.Label
- Hydra.Grammar: instance GHC.Show.Show Hydra.Grammar.LabeledPattern
- Hydra.Grammar: instance GHC.Show.Show Hydra.Grammar.Pattern
- Hydra.Grammar: instance GHC.Show.Show Hydra.Grammar.Production
- Hydra.Grammar: instance GHC.Show.Show Hydra.Grammar.Regex
- Hydra.Grammar: instance GHC.Show.Show Hydra.Grammar.Symbol
- Hydra.Grammar: newtype Constant
- Hydra.Grammar: newtype Grammar
- Hydra.Grammar: newtype Label
- Hydra.Grammar: newtype Regex
- Hydra.Grammar: newtype Symbol
- Hydra.Grammars: childName :: String -> String -> String
- Hydra.Grammars: findNames :: [Pattern] -> [String]
- Hydra.Grammars: grammarToModule :: Namespace -> Grammar -> Maybe String -> Module
- Hydra.Grammars: isComplex :: Pattern -> Bool
- Hydra.Grammars: isNontrivial :: Bool -> [Pattern] -> Bool
- Hydra.Grammars: makeElements :: Bool -> Namespace -> String -> Pattern -> [(String, Type)]
- Hydra.Grammars: rawName :: Pattern -> String
- Hydra.Grammars: simplify :: Bool -> [Pattern] -> [Pattern]
- Hydra.Grammars: toName :: Namespace -> String -> Name
- Hydra.Grammars: wrapType :: Type -> Type
- Hydra.Graph: [graphBody] :: Graph -> Term
- Hydra.Graph: [graphElements] :: Graph -> [Binding]
- Hydra.Graph: [graphEnvironment] :: Graph -> Map Name (Maybe Term)
- Hydra.Graph: [graphSchema] :: Graph -> Maybe Graph
- Hydra.Graph: [graphTypes] :: Graph -> Map Name TypeScheme
- Hydra.Graph: [termCoderCoder] :: TermCoder a -> Coder Graph Graph Term a
- Hydra.Graph: _Graph_body :: Name
- Hydra.Graph: _Graph_elements :: Name
- Hydra.Graph: _Graph_environment :: Name
- Hydra.Graph: _Graph_schema :: Name
- Hydra.Graph: _Graph_types :: Name
- Hydra.Graph: _TermCoder_coder :: Name
- Hydra.Hoisting: rewriteAndFoldTermWithTypeContext :: ((t0 -> Term -> (t0, Term)) -> TypeContext -> t0 -> Term -> (t0, Term)) -> TypeContext -> t0 -> Term -> (t0, Term)
- Hydra.Hoisting: rewriteAndFoldTermWithTypeContextAndPath :: ((t0 -> Term -> (t0, Term)) -> [TermAccessor] -> TypeContext -> t0 -> Term -> (t0, Term)) -> TypeContext -> t0 -> Term -> (t0, Term)
- Hydra.Hoisting: rewriteTermWithTypeContext :: ((Term -> t0) -> TypeContext -> Term -> t0) -> TypeContext -> Term -> t0
- Hydra.Inference: emptyInferenceContext :: InferenceContext
- Hydra.Inference: initialTypeContext :: Graph -> Flow t0 TypeContext
- Hydra.Kernel: eitherToFlow :: (t0 -> String) -> Either t0 t1 -> Flow t2 t1
- Hydra.Kernel: emptyTrace :: Trace
- Hydra.Kernel: fieldAdapter :: FieldType -> Flow AdapterContext (Adapter AdapterContext AdapterContext FieldType FieldType Field Field)
- Hydra.Kernel: flowSucceeds :: t0 -> Flow t0 t1 -> Bool
- Hydra.Kernel: forTypeReference :: Name -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: fromFlow :: t0 -> t1 -> Flow t1 t0 -> t0
- Hydra.Kernel: functionProxyName :: Name
- Hydra.Kernel: functionProxyType :: t0 -> Type
- Hydra.Kernel: functionToUnion :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: getState :: Flow t0 t0
- Hydra.Kernel: lambdaToMonotype :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: map :: (t0 -> t1) -> Flow t2 t0 -> Flow t2 t1
- Hydra.Kernel: maybeToList :: Maybe t0 -> [t0]
- Hydra.Kernel: modify :: (t0 -> t0) -> Flow t0 ()
- Hydra.Kernel: mutateTrace :: (Trace -> Either String Trace) -> (Trace -> Trace -> Trace) -> Flow t0 t1 -> Flow t0 t1
- Hydra.Kernel: passApplication :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: passEither :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: passForall :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: passFunction :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: passList :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: passLiteral :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: passMap :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: passOptional :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: passRecord :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: passSet :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: passUnion :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: passUnit :: t0 -> Flow t1 (Adapter t2 t3 Type Type Term Term)
- Hydra.Kernel: passWrapped :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: pushError :: String -> Trace -> Trace
- Hydra.Kernel: putState :: t0 -> Flow t0 ()
- Hydra.Kernel: setToList :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: simplifyApplication :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: termAdapter :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: traceSummary :: Trace -> String
- Hydra.Kernel: unexpected :: String -> String -> Flow t0 t1
- Hydra.Kernel: unionToRecord :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Kernel: unionTypeToRecordType :: RowType -> RowType
- Hydra.Kernel: unitToRecord :: t0 -> Flow t1 (Adapter t2 t3 Type Type Term Term)
- Hydra.Kernel: warn :: String -> Flow t0 t1 -> Flow t0 t1
- Hydra.Kernel: withFlag :: Name -> Flow t0 t1 -> Flow t0 t1
- Hydra.Kernel: withGraphContext :: Flow Graph t0 -> Flow AdapterContext t0
- Hydra.Kernel: withState :: t0 -> Flow t0 t1 -> Flow t2 t1
- Hydra.Kernel: withTrace :: String -> Flow t0 t1 -> Flow t0 t1
- Hydra.Kernel: wrapToUnwrapped :: Type -> Flow AdapterContext (Adapter AdapterContext AdapterContext Type Type Term Term)
- Hydra.Lexical: extendGraphWithBindings :: [Binding] -> Graph -> Graph
- Hydra.Lexical: schemaContext :: Graph -> Graph
- Hydra.Lexical: withEmptyGraph :: Flow Graph t0 -> Flow t1 t0
- Hydra.Lexical: withSchemaContext :: Flow Graph t0 -> Flow Graph t0
- Hydra.Lib.Flows: apply :: Flow s (x -> y) -> Flow s x -> Flow s y
- Hydra.Lib.Flows: bind :: Flow s x -> (x -> Flow s y) -> Flow s y
- Hydra.Lib.Flows: fail :: String -> Flow s x
- Hydra.Lib.Flows: foldl :: (a -> b -> Flow s a) -> a -> [b] -> Flow s a
- Hydra.Lib.Flows: instance Control.Monad.Fail.MonadFail (Hydra.Compute.Flow s)
- Hydra.Lib.Flows: instance GHC.Base.Applicative (Hydra.Compute.Flow s)
- Hydra.Lib.Flows: instance GHC.Base.Functor (Hydra.Compute.Flow s)
- Hydra.Lib.Flows: instance GHC.Base.Monad (Hydra.Compute.Flow s)
- Hydra.Lib.Flows: map :: (x -> y) -> Flow s x -> Flow s y
- Hydra.Lib.Flows: mapElems :: Ord k => (v1 -> Flow s v2) -> Map k v1 -> Flow s (Map k v2)
- Hydra.Lib.Flows: mapKeys :: Ord k2 => (k1 -> Flow s k2) -> Map k1 v -> Flow s (Map k2 v)
- Hydra.Lib.Flows: mapList :: (x -> Flow s y) -> [x] -> Flow s [y]
- Hydra.Lib.Flows: mapMaybe :: (x -> Flow s y) -> Maybe x -> Flow s (Maybe y)
- Hydra.Lib.Flows: mapSet :: Ord y => (x -> Flow s y) -> Set x -> Flow s (Set y)
- Hydra.Lib.Flows: pure :: x -> Flow s x
- Hydra.Lib.Flows: sequence :: [Flow s x] -> Flow s [x]
- Hydra.Lib.Flows: withDefault :: x -> Flow s x -> Flow s x
- Hydra.Module: [moduleElements] :: Module -> [Binding]
- Hydra.Module: _Module_elements :: Name
- Hydra.Monads: bind :: Flow t0 t1 -> (t1 -> Flow t0 t2) -> Flow t0 t2
- Hydra.Monads: eitherToFlow :: (t0 -> String) -> Either t0 t1 -> Flow t2 t1
- Hydra.Monads: emptyTrace :: Trace
- Hydra.Monads: exec :: Flow t0 t1 -> t0 -> t0
- Hydra.Monads: fail :: String -> Flow t0 t1
- Hydra.Monads: flowSucceeds :: t0 -> Flow t0 t1 -> Bool
- Hydra.Monads: fromFlow :: t0 -> t1 -> Flow t1 t0 -> t0
- Hydra.Monads: getState :: Flow t0 t0
- Hydra.Monads: map :: (t0 -> t1) -> Flow t2 t0 -> Flow t2 t1
- Hydra.Monads: maybeToList :: Maybe t0 -> [t0]
- Hydra.Monads: modify :: (t0 -> t0) -> Flow t0 ()
- Hydra.Monads: mutateTrace :: (Trace -> Either String Trace) -> (Trace -> Trace -> Trace) -> Flow t0 t1 -> Flow t0 t1
- Hydra.Monads: pure :: t0 -> Flow t1 t0
- Hydra.Monads: pushError :: String -> Trace -> Trace
- Hydra.Monads: putState :: t0 -> Flow t0 ()
- Hydra.Monads: traceSummary :: Trace -> String
- Hydra.Monads: unexpected :: String -> String -> Flow t0 t1
- Hydra.Monads: warn :: String -> Flow t0 t1 -> Flow t0 t1
- Hydra.Monads: withFlag :: Name -> Flow t0 t1 -> Flow t0 t1
- Hydra.Monads: withState :: t0 -> Flow t0 t1 -> Flow t2 t1
- Hydra.Monads: withTrace :: String -> Flow t0 t1 -> Flow t0 t1
- Hydra.Rewriting: rewriteAndFoldTermM :: ((t0 -> Term -> Flow t1 (t0, Term)) -> t0 -> Term -> Flow t1 (t0, Term)) -> t0 -> Term -> Flow t1 (t0, Term)
- Hydra.Rewriting: subtermsWithAccessors :: Term -> [(TermAccessor, Term)]
- Hydra.Schemas: extendTypeContextForLambda :: TypeContext -> Lambda -> TypeContext
- Hydra.Schemas: extendTypeContextForLet :: (TypeContext -> Binding -> Maybe Term) -> TypeContext -> Let -> TypeContext
- Hydra.Schemas: extendTypeContextForTypeLambda :: TypeContext -> TypeLambda -> TypeContext
- Hydra.Schemas: fTypeToTypeScheme :: Type -> TypeScheme
- Hydra.Schemas: graphToInferenceContext :: Graph -> Flow t0 InferenceContext
- Hydra.Schemas: graphToTypeContext :: Graph -> Flow t0 TypeContext
- Hydra.Schemas: termAsGraph :: Term -> [Binding]
- Hydra.Schemas: typeSchemeToFType :: TypeScheme -> Type
- Hydra.Show.Accessors: termAccessor :: TermAccessor -> Maybe String
- Hydra.Show.Accessors: termToAccessorGraph :: Map Namespace String -> Term -> AccessorGraph
- Hydra.Sources.CoderUtils: analyzeFunctionTermInline :: TBinding ((env -> TypeContext) -> (TypeContext -> env -> env) -> env -> Term -> Flow s (FunctionStructure env))
- Hydra.Sources.CoderUtils: analyzeFunctionTermNoInfer :: TBinding ((env -> TypeContext) -> (TypeContext -> env -> env) -> env -> Term -> Flow s (FunctionStructure env))
- Hydra.Sources.CoderUtils: analyzeFunctionTermNoInferWith :: TBinding ((TypeContext -> Binding -> Maybe Term) -> (env -> TypeContext) -> (TypeContext -> env -> env) -> env -> Term -> Flow s (FunctionStructure env))
- Hydra.Sources.CoderUtils: analyzeFunctionTermNoInferWith_finish :: TBinding (env -> [Name] -> [Name] -> [Binding] -> [Type] -> [Type] -> Term -> Flow s (FunctionStructure env))
- Hydra.Sources.CoderUtils: analyzeFunctionTermNoInferWith_gather :: TBinding ((TypeContext -> Binding -> Maybe Term) -> (env -> TypeContext) -> (TypeContext -> env -> env) -> Bool -> env -> [Name] -> [Name] -> [Binding] -> [Type] -> [Type] -> Term -> Flow s (FunctionStructure env))
- Hydra.Sources.CoderUtils: commentsFromElement :: TBinding (Binding -> Flow Graph (Maybe String))
- Hydra.Sources.CoderUtils: inCoderGraphContext :: TBinding ((state -> Graph) -> (state -> metadata) -> (Graph -> metadata -> state) -> Flow Graph a -> Flow state a)
- Hydra.Sources.CoderUtils: tryTypeOf :: TBinding (String -> TypeContext -> Term -> Flow s Type)
- Hydra.Sources.CoderUtils: updateCoderMetadata :: TBinding ((state -> metadata) -> (Graph -> metadata -> state) -> (state -> Graph) -> (metadata -> metadata) -> Flow state ())
- Hydra.Sources.CoderUtils: withGraphBindings :: TBinding ((state -> Graph) -> (Graph -> metadata -> state) -> (state -> metadata) -> [Binding] -> Flow state a -> Flow state a)
- Hydra.Sources.CoderUtils: withUpdatedCoderGraph :: TBinding ((state -> Graph) -> (state -> metadata) -> (Graph -> metadata -> state) -> (Graph -> Graph) -> Flow state a -> Flow state a)
- Hydra.Sources.Decode.Accessors: module_ :: Module
- Hydra.Sources.Decode.Compute: module_ :: Module
- Hydra.Sources.Decode.Constraints: module_ :: Module
- Hydra.Sources.Decode.Grammar: module_ :: Module
- Hydra.Sources.Decode.Workflow: module_ :: Module
- Hydra.Sources.Encode.Accessors: module_ :: Module
- Hydra.Sources.Encode.Compute: module_ :: Module
- Hydra.Sources.Encode.Constraints: module_ :: Module
- Hydra.Sources.Encode.Grammar: module_ :: Module
- Hydra.Sources.Encode.Workflow: module_ :: Module
- Hydra.Sources.Eval.Lib.Flows: apply_ :: TBinding (Term -> Term -> Flow s Term)
- Hydra.Sources.Eval.Lib.Flows: bind_ :: TBinding (Term -> Term -> Flow s Term)
- Hydra.Sources.Eval.Lib.Flows: define :: String -> TTerm a -> TBinding a
- Hydra.Sources.Eval.Lib.Flows: foldl_ :: TBinding (Term -> Term -> Term -> Flow s Term)
- Hydra.Sources.Eval.Lib.Flows: mapElems_ :: TBinding (Term -> Term -> Flow s Term)
- Hydra.Sources.Eval.Lib.Flows: mapKeys_ :: TBinding (Term -> Term -> Flow s Term)
- Hydra.Sources.Eval.Lib.Flows: mapList_ :: TBinding (Term -> Term -> Flow s Term)
- Hydra.Sources.Eval.Lib.Flows: mapMaybe_ :: TBinding (Term -> Term -> Flow s Term)
- Hydra.Sources.Eval.Lib.Flows: mapSet_ :: TBinding (Term -> Term -> Flow s Term)
- Hydra.Sources.Eval.Lib.Flows: map_ :: TBinding (Term -> Term -> Flow s Term)
- Hydra.Sources.Eval.Lib.Flows: module_ :: Module
- Hydra.Sources.Eval.Lib.Flows: ns :: Namespace
- Hydra.Sources.Eval.Lib.Flows: withDefault_ :: TBinding (Term -> Term -> Flow s Term)
- Hydra.Sources.Haskell.Ast: alternative :: Binding
- Hydra.Sources.Haskell.Ast: applicationDeclarationHead :: Binding
- Hydra.Sources.Haskell.Ast: applicationExpression :: Binding
- Hydra.Sources.Haskell.Ast: applicationPattern :: Binding
- Hydra.Sources.Haskell.Ast: applicationType :: Binding
- Hydra.Sources.Haskell.Ast: asPattern :: Binding
- Hydra.Sources.Haskell.Ast: assertion :: Binding
- Hydra.Sources.Haskell.Ast: caseExpression :: Binding
- Hydra.Sources.Haskell.Ast: caseRhs :: Binding
- Hydra.Sources.Haskell.Ast: classAssertion :: Binding
- Hydra.Sources.Haskell.Ast: constructRecordExpression :: Binding
- Hydra.Sources.Haskell.Ast: constructor :: Binding
- Hydra.Sources.Haskell.Ast: constructorWithComments :: Binding
- Hydra.Sources.Haskell.Ast: contextType :: Binding
- Hydra.Sources.Haskell.Ast: dataDeclaration :: Binding
- Hydra.Sources.Haskell.Ast: dataOrNewtype :: Binding
- Hydra.Sources.Haskell.Ast: declaration :: Binding
- Hydra.Sources.Haskell.Ast: declarationHead :: Binding
- Hydra.Sources.Haskell.Ast: declarationWithComments :: Binding
- Hydra.Sources.Haskell.Ast: define :: String -> Type -> Binding
- Hydra.Sources.Haskell.Ast: deriving_ :: Binding
- Hydra.Sources.Haskell.Ast: export :: Binding
- Hydra.Sources.Haskell.Ast: expression :: Binding
- Hydra.Sources.Haskell.Ast: field :: Binding
- Hydra.Sources.Haskell.Ast: fieldUpdate :: Binding
- Hydra.Sources.Haskell.Ast: fieldWithComments :: Binding
- Hydra.Sources.Haskell.Ast: functionType :: Binding
- Hydra.Sources.Haskell.Ast: ifExpression :: Binding
- Hydra.Sources.Haskell.Ast: importExportSpec :: Binding
- Hydra.Sources.Haskell.Ast: importModifier :: Binding
- Hydra.Sources.Haskell.Ast: import_ :: Binding
- Hydra.Sources.Haskell.Ast: infixApplicationExpression :: Binding
- Hydra.Sources.Haskell.Ast: infixType :: Binding
- Hydra.Sources.Haskell.Ast: lambdaExpression :: Binding
- Hydra.Sources.Haskell.Ast: letExpression :: Binding
- Hydra.Sources.Haskell.Ast: literal :: Binding
- Hydra.Sources.Haskell.Ast: localBinding :: Binding
- Hydra.Sources.Haskell.Ast: localBindings :: Binding
- Hydra.Sources.Haskell.Ast: module' :: Binding
- Hydra.Sources.Haskell.Ast: moduleHead :: Binding
- Hydra.Sources.Haskell.Ast: moduleName :: Binding
- Hydra.Sources.Haskell.Ast: module_ :: Module
- Hydra.Sources.Haskell.Ast: name :: Binding
- Hydra.Sources.Haskell.Ast: namePart :: Binding
- Hydra.Sources.Haskell.Ast: ns :: Namespace
- Hydra.Sources.Haskell.Ast: operator :: Binding
- Hydra.Sources.Haskell.Ast: ordinaryConstructor :: Binding
- Hydra.Sources.Haskell.Ast: pattern :: Binding
- Hydra.Sources.Haskell.Ast: patternField :: Binding
- Hydra.Sources.Haskell.Ast: prefixApplicationExpression :: Binding
- Hydra.Sources.Haskell.Ast: qualifiedName :: Binding
- Hydra.Sources.Haskell.Ast: recordConstructor :: Binding
- Hydra.Sources.Haskell.Ast: recordPattern :: Binding
- Hydra.Sources.Haskell.Ast: rightHandSide :: Binding
- Hydra.Sources.Haskell.Ast: sectionExpression :: Binding
- Hydra.Sources.Haskell.Ast: simpleValueBinding :: Binding
- Hydra.Sources.Haskell.Ast: specImport :: Binding
- Hydra.Sources.Haskell.Ast: statement :: Binding
- Hydra.Sources.Haskell.Ast: subspecImportExportSpec :: Binding
- Hydra.Sources.Haskell.Ast: typeDeclaration :: Binding
- Hydra.Sources.Haskell.Ast: typeSignature :: Binding
- Hydra.Sources.Haskell.Ast: typeSignatureExpression :: Binding
- Hydra.Sources.Haskell.Ast: type_ :: Binding
- Hydra.Sources.Haskell.Ast: typedBinding :: Binding
- Hydra.Sources.Haskell.Ast: typedPattern :: Binding
- Hydra.Sources.Haskell.Ast: updateRecordExpression :: Binding
- Hydra.Sources.Haskell.Ast: valueBinding :: Binding
- Hydra.Sources.Haskell.Ast: variable :: Binding
- Hydra.Sources.Json.Coder: decodeRecord :: TBinding (RowType -> [(FieldType, Coder Graph Graph Term Value)] -> Value -> Flow Graph Term)
- Hydra.Sources.Json.Coder: define :: String -> TTerm a -> TBinding a
- Hydra.Sources.Json.Coder: encodeRecord :: TBinding ([(FieldType, Coder Graph Graph Term Value)] -> Term -> Flow Graph Value)
- Hydra.Sources.Json.Coder: jsonCoder :: TBinding (Type -> Flow Graph (Coder Graph Graph Term Value))
- Hydra.Sources.Json.Coder: literalJsonCoder :: TBinding (LiteralType -> Flow Graph (Coder Graph Graph Literal Value))
- Hydra.Sources.Json.Coder: module_ :: Module
- Hydra.Sources.Json.Coder: ns :: Namespace
- Hydra.Sources.Json.Coder: readStringStub :: TBinding (String -> Term)
- Hydra.Sources.Json.Coder: recordCoder :: TBinding (RowType -> Flow Graph (Coder Graph Graph Term Value))
- Hydra.Sources.Json.Coder: showValue :: TBinding (Value -> String)
- Hydra.Sources.Json.Coder: termCoder :: TBinding (Type -> Flow Graph (Coder Graph Graph Term Value))
- Hydra.Sources.Json.Coder: unitCoder :: TBinding (Coder Graph Graph Term Value)
- Hydra.Sources.Json.Coder: untypedTermToJson :: TBinding (Term -> Flow s Value)
- Hydra.Sources.Json.Language: define :: String -> TTerm a -> TBinding a
- Hydra.Sources.Json.Language: jsonLanguage :: TBinding Language
- Hydra.Sources.Json.Language: module_ :: Module
- Hydra.Sources.Json.Language: ns :: Namespace
- Hydra.Sources.Kernel.Terms.Adapt.Literals: comparePrecision :: TBinding (Precision -> Precision -> Comparison)
- Hydra.Sources.Kernel.Terms.Adapt.Literals: convertFloatValue :: TBinding (FloatType -> FloatValue -> FloatValue)
- Hydra.Sources.Kernel.Terms.Adapt.Literals: convertIntegerValue :: TBinding (IntegerType -> IntegerValue -> IntegerValue)
- Hydra.Sources.Kernel.Terms.Adapt.Literals: define :: String -> TTerm a -> TBinding a
- Hydra.Sources.Kernel.Terms.Adapt.Literals: disclaimer :: TBinding (Bool -> String -> String -> String)
- Hydra.Sources.Kernel.Terms.Adapt.Literals: floatAdapter :: TBinding (FloatType -> Flow AdapterContext (SymmetricAdapter s FloatType FloatValue))
- Hydra.Sources.Kernel.Terms.Adapt.Literals: integerAdapter :: TBinding (IntegerType -> Flow AdapterContext (SymmetricAdapter s IntegerType IntegerValue))
- Hydra.Sources.Kernel.Terms.Adapt.Literals: literalAdapter :: TBinding (LiteralType -> Flow AdapterContext (SymmetricAdapter s LiteralType Literal))
- Hydra.Sources.Kernel.Terms.Adapt.Literals: module_ :: Module
- Hydra.Sources.Kernel.Terms.Adapt.Literals: ns :: Namespace
- Hydra.Sources.Kernel.Terms.Adapt.Modules: adaptTypeToLanguage :: TBinding (Language -> Type -> Flow Graph Type)
- Hydra.Sources.Kernel.Terms.Adapt.Modules: adaptTypeToLanguageAndEncode :: TBinding (Language -> (Type -> Flow Graph t) -> Type -> Flow Graph t)
- Hydra.Sources.Kernel.Terms.Adapt.Modules: adaptedModuleDefinitions :: TBinding (Language -> Module -> Flow Graph [Definition])
- Hydra.Sources.Kernel.Terms.Adapt.Modules: constructCoder :: TBinding (Language -> (Term -> Flow Graph c) -> Type -> Flow Graph (Coder Graph Graph Term c))
- Hydra.Sources.Kernel.Terms.Adapt.Modules: define :: String -> TTerm a -> TBinding a
- Hydra.Sources.Kernel.Terms.Adapt.Modules: languageAdapter :: TBinding (Language -> Type -> Flow Graph (SymmetricAdapter Graph Type Term))
- Hydra.Sources.Kernel.Terms.Adapt.Modules: module_ :: Module
- Hydra.Sources.Kernel.Terms.Adapt.Modules: ns :: Namespace
- Hydra.Sources.Kernel.Terms.Adapt.Modules: transformModule :: TBinding (Language -> (Term -> Flow Graph e) -> (Module -> Map Type (Coder Graph Graph Term e) -> [(Binding, TypeApplicationTerm)] -> Flow Graph d) -> Module -> Flow Graph d)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: adaptDataGraph :: TBinding (LanguageConstraints -> Bool -> Graph -> Flow s Graph)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: adaptFloatType :: TBinding (LanguageConstraints -> FloatType -> Maybe FloatType)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: adaptGraphSchema :: TBinding (LanguageConstraints -> Map LiteralType LiteralType -> Map Name Type -> Flow s (Map Name Type))
- Hydra.Sources.Kernel.Terms.Adapt.Simple: adaptIntegerType :: TBinding (LanguageConstraints -> IntegerType -> Maybe IntegerType)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: adaptLambdaDomains :: TBinding (LanguageConstraints -> Map LiteralType LiteralType -> (Term -> Flow s Term) -> Term -> Flow s Term)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: adaptLiteral :: TBinding (LiteralType -> Literal -> Literal)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: adaptLiteralType :: TBinding (LanguageConstraints -> LiteralType -> Maybe LiteralType)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: adaptLiteralTypesMap :: TBinding (LanguageConstraints -> Map LiteralType LiteralType)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: adaptLiteralValue :: TBinding (Map LiteralType LiteralType -> LiteralType -> Literal -> Literal)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: adaptNestedTypes :: TBinding (LanguageConstraints -> Map LiteralType LiteralType -> (Term -> Flow s Term) -> Term -> Flow s Term)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: adaptPrimitive :: TBinding (LanguageConstraints -> Map LiteralType LiteralType -> Primitive -> Flow s Primitive)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: adaptTerm :: TBinding (LanguageConstraints -> Map LiteralType LiteralType -> Term -> Flow Graph Term)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: adaptType :: TBinding (LanguageConstraints -> Map LiteralType LiteralType -> Type -> Flow s Type)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: adaptTypeScheme :: TBinding (LanguageConstraints -> Map LiteralType LiteralType -> TypeScheme -> Flow s TypeScheme)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: dataGraphToDefinitions :: TBinding (LanguageConstraints -> Bool -> Bool -> Bool -> Bool -> Graph -> [Namespace] -> Flow s (Graph, [[TermDefinition]]))
- Hydra.Sources.Kernel.Terms.Adapt.Simple: define :: String -> TTerm a -> TBinding a
- Hydra.Sources.Kernel.Terms.Adapt.Simple: literalTypeSupported :: TBinding (LanguageConstraints -> LiteralType -> Bool)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: module_ :: Module
- Hydra.Sources.Kernel.Terms.Adapt.Simple: ns :: Namespace
- Hydra.Sources.Kernel.Terms.Adapt.Simple: pushTypeAppsInward :: TBinding (Term -> Term)
- Hydra.Sources.Kernel.Terms.Adapt.Simple: schemaGraphToDefinitions :: TBinding (LanguageConstraints -> Graph -> [[Name]] -> Flow s (Map Name Type, [[TypeDefinition]]))
- Hydra.Sources.Kernel.Terms.Adapt.Simple: termAlternatives :: TBinding (Term -> Flow Graph [Term])
- Hydra.Sources.Kernel.Terms.Adapt.Simple: typeAlternatives :: TBinding (Type -> [Type])
- Hydra.Sources.Kernel.Terms.Adapt.Terms: define :: String -> TTerm a -> TBinding a
- Hydra.Sources.Kernel.Terms.Adapt.Terms: fieldAdapter :: TBinding (FieldType -> Flow AdapterContext (SymmetricAdapter AdapterContext FieldType Field))
- Hydra.Sources.Kernel.Terms.Adapt.Terms: forTypeReference :: TBinding (Name -> Flow AdapterContext (SymmetricAdapter AdapterContext Type Term))
- Hydra.Sources.Kernel.Terms.Adapt.Terms: functionProxyName :: TBinding Name
- Hydra.Sources.Kernel.Terms.Adapt.Terms: functionProxyType :: TBinding (a -> Type)
- Hydra.Sources.Kernel.Terms.Adapt.Terms: functionToUnion :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: lambdaToMonotype :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: maybeToList :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: module_ :: Module
- Hydra.Sources.Kernel.Terms.Adapt.Terms: ns :: Namespace
- Hydra.Sources.Kernel.Terms.Adapt.Terms: passApplication :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: passEither :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: passForall :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: passFunction :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: passList :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: passLiteral :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: passMap :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: passOptional :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: passRecord :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: passSet :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: passUnion :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: passUnit :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: passWrapped :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: setToList :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: simplifyApplication :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: termAdapter :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: unionToRecord :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: unionTypeToRecordType :: TBinding (RowType -> RowType)
- Hydra.Sources.Kernel.Terms.Adapt.Terms: unitToRecord :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Terms: withGraphContext :: TBinding (Flow Graph a -> Flow AdapterContext a)
- Hydra.Sources.Kernel.Terms.Adapt.Terms: wrapToUnwrapped :: TBinding TypeAdapter
- Hydra.Sources.Kernel.Terms.Adapt.Utils: bidirectional :: TBinding ((CoderDirection -> b -> Flow s b) -> Coder s s b b)
- Hydra.Sources.Kernel.Terms.Adapt.Utils: chooseAdapter :: TBinding ((t -> Flow so [SymmetricAdapter si t v]) -> (t -> Bool) -> (t -> String) -> (t -> String) -> t -> Flow so (SymmetricAdapter si t v))
- Hydra.Sources.Kernel.Terms.Adapt.Utils: composeCoders :: TBinding (Coder s s a b -> Coder s s b c -> Coder s s a c)
- Hydra.Sources.Kernel.Terms.Adapt.Utils: define :: String -> TTerm a -> TBinding a
- Hydra.Sources.Kernel.Terms.Adapt.Utils: encodeDecode :: TBinding (CoderDirection -> Coder s s x x -> x -> Flow s x)
- Hydra.Sources.Kernel.Terms.Adapt.Utils: floatTypeIsSupported :: TBinding (LanguageConstraints -> FloatType -> Bool)
- Hydra.Sources.Kernel.Terms.Adapt.Utils: idAdapter :: TBinding (t -> SymmetricAdapter s t v)
- Hydra.Sources.Kernel.Terms.Adapt.Utils: idCoder :: TBinding (Coder s s a a)
- Hydra.Sources.Kernel.Terms.Adapt.Utils: integerTypeIsSupported :: TBinding (LanguageConstraints -> IntegerType -> Bool)
- Hydra.Sources.Kernel.Terms.Adapt.Utils: literalTypeIsSupported :: TBinding (LanguageConstraints -> LiteralType -> Bool)
- Hydra.Sources.Kernel.Terms.Adapt.Utils: module_ :: Module
- Hydra.Sources.Kernel.Terms.Adapt.Utils: nameToFilePath :: TBinding (CaseConvention -> CaseConvention -> FileExtension -> Name -> FilePath)
- Hydra.Sources.Kernel.Terms.Adapt.Utils: ns :: Namespace
- Hydra.Sources.Kernel.Terms.Adapt.Utils: typeIsSupported :: TBinding (LanguageConstraints -> Type -> Bool)
- Hydra.Sources.Kernel.Terms.Adapt.Utils: unidirectionalCoder :: TBinding ((a -> Flow s b) -> Coder s s a b)
- Hydra.Sources.Kernel.Terms.Annotations: withDepth :: TBinding (Name -> (Int -> Flow s a) -> Flow s a)
- Hydra.Sources.Kernel.Terms.Constants: placeholderName :: TBinding Name
- Hydra.Sources.Kernel.Terms.Grammars: childName :: TBinding (String -> String -> String)
- Hydra.Sources.Kernel.Terms.Grammars: define :: String -> TTerm a -> TBinding a
- Hydra.Sources.Kernel.Terms.Grammars: findNames :: TBinding ([Pattern] -> [String])
- Hydra.Sources.Kernel.Terms.Grammars: grammarToModule :: TBinding (Namespace -> Grammar -> Maybe String -> Module)
- Hydra.Sources.Kernel.Terms.Grammars: isComplex :: TBinding (Pattern -> Bool)
- Hydra.Sources.Kernel.Terms.Grammars: isNontrivial :: TBinding (Bool -> [Pattern] -> Bool)
- Hydra.Sources.Kernel.Terms.Grammars: makeElements :: TBinding (Bool -> Namespace -> String -> Pattern -> [(String, Type)])
- Hydra.Sources.Kernel.Terms.Grammars: module_ :: Module
- Hydra.Sources.Kernel.Terms.Grammars: ns :: Namespace
- Hydra.Sources.Kernel.Terms.Grammars: rawName :: TBinding (Pattern -> String)
- Hydra.Sources.Kernel.Terms.Grammars: simplify :: TBinding (Bool -> [Pattern] -> [Pattern])
- Hydra.Sources.Kernel.Terms.Grammars: toName :: TBinding (Namespace -> String -> Name)
- Hydra.Sources.Kernel.Terms.Grammars: wrapType :: TBinding (Type -> Type)
- Hydra.Sources.Kernel.Terms.Hoisting: rewriteAndFoldTermWithTypeContext :: TBinding (((a -> Term -> (a, Term)) -> TypeContext -> a -> Term -> (a, Term)) -> TypeContext -> a -> Term -> (a, Term))
- Hydra.Sources.Kernel.Terms.Hoisting: rewriteAndFoldTermWithTypeContextAndPath :: TBinding (((a -> Term -> (a, Term)) -> [TermAccessor] -> TypeContext -> a -> Term -> (a, Term)) -> TypeContext -> a -> Term -> (a, Term))
- Hydra.Sources.Kernel.Terms.Hoisting: rewriteTermWithTypeContext :: TBinding (((Term -> Term) -> TypeContext -> Term -> Term) -> TypeContext -> Term -> Term)
- Hydra.Sources.Kernel.Terms.Inference: emptyInferenceContext :: TBinding InferenceContext
- Hydra.Sources.Kernel.Terms.Inference: initialTypeContext :: TBinding (Graph -> Flow s TypeContext)
- Hydra.Sources.Kernel.Terms.Lexical: extendGraphWithBindings :: TBinding ([Binding] -> Graph -> Graph)
- Hydra.Sources.Kernel.Terms.Lexical: schemaContext :: TBinding (Graph -> Graph)
- Hydra.Sources.Kernel.Terms.Lexical: withEmptyGraph :: TBinding (Flow Graph a -> Flow s a)
- Hydra.Sources.Kernel.Terms.Lexical: withSchemaContext :: TBinding (Flow Graph x -> Flow Graph x)
- Hydra.Sources.Kernel.Terms.Monads: bind :: TBinding (Flow s a -> (a -> Flow s b) -> Flow s b)
- Hydra.Sources.Kernel.Terms.Monads: define :: String -> TTerm a -> TBinding a
- Hydra.Sources.Kernel.Terms.Monads: eitherToFlow_ :: TBinding ((a -> String) -> Either a b -> Flow s b)
- Hydra.Sources.Kernel.Terms.Monads: emptyTrace :: TBinding Trace
- Hydra.Sources.Kernel.Terms.Monads: exec :: TBinding (Flow s a -> s -> s)
- Hydra.Sources.Kernel.Terms.Monads: fail :: TBinding (String -> Flow s a)
- Hydra.Sources.Kernel.Terms.Monads: flowSucceeds :: TBinding (Flow s a -> Bool)
- Hydra.Sources.Kernel.Terms.Monads: fromFlow :: TBinding (a -> s -> Flow s a -> a)
- Hydra.Sources.Kernel.Terms.Monads: getState :: TBinding (Flow s s)
- Hydra.Sources.Kernel.Terms.Monads: map :: TBinding ((a -> b) -> Flow s a -> Flow s b)
- Hydra.Sources.Kernel.Terms.Monads: maybeToList :: TBinding (Maybe a -> [a])
- Hydra.Sources.Kernel.Terms.Monads: modify :: TBinding ((s -> s) -> Flow s ())
- Hydra.Sources.Kernel.Terms.Monads: module_ :: Module
- Hydra.Sources.Kernel.Terms.Monads: mutateTrace :: TBinding ((Trace -> Either String Trace) -> (Trace -> Trace -> Trace) -> Flow s a -> Flow s a)
- Hydra.Sources.Kernel.Terms.Monads: ns :: Namespace
- Hydra.Sources.Kernel.Terms.Monads: pure :: TBinding (a -> Flow s a)
- Hydra.Sources.Kernel.Terms.Monads: pushError :: TBinding (String -> Trace -> Trace)
- Hydra.Sources.Kernel.Terms.Monads: putState :: TBinding (s -> Flow s ())
- Hydra.Sources.Kernel.Terms.Monads: traceSummary :: TBinding (Trace -> String)
- Hydra.Sources.Kernel.Terms.Monads: unexpected :: TBinding (String -> String -> Flow s x)
- Hydra.Sources.Kernel.Terms.Monads: warn :: TBinding (String -> Flow s a -> Flow s a)
- Hydra.Sources.Kernel.Terms.Monads: withFlag :: TBinding (a -> b)
- Hydra.Sources.Kernel.Terms.Monads: withState :: TBinding (s1 -> Flow s1 a -> Flow s2 a)
- Hydra.Sources.Kernel.Terms.Monads: withTrace :: TBinding (String -> Flow s a -> Flow s a)
- Hydra.Sources.Kernel.Terms.Rewriting: rewriteAndFoldTermM :: TBinding (((a -> Term -> Flow s (a, Term)) -> a -> Term -> Flow s (a, Term)) -> a -> Term -> Flow s (a, Term))
- Hydra.Sources.Kernel.Terms.Rewriting: subtermsWithAccessors :: TBinding (Term -> [(TermAccessor, Term)])
- Hydra.Sources.Kernel.Terms.Schemas: extendTypeContextForLambda :: TBinding (TypeContext -> Lambda -> TypeContext)
- Hydra.Sources.Kernel.Terms.Schemas: extendTypeContextForLet :: TBinding ((TypeContext -> Binding -> Maybe Term) -> TypeContext -> Let -> TypeContext)
- Hydra.Sources.Kernel.Terms.Schemas: extendTypeContextForTypeLambda :: TBinding (TypeContext -> TypeLambda -> TypeContext)
- Hydra.Sources.Kernel.Terms.Schemas: fTypeToTypeScheme :: TBinding (Type -> TypeScheme)
- Hydra.Sources.Kernel.Terms.Schemas: graphToInferenceContext :: TBinding (Graph -> Flow s InferenceContext)
- Hydra.Sources.Kernel.Terms.Schemas: graphToTypeContext :: TBinding (Graph -> Flow s TypeContext)
- Hydra.Sources.Kernel.Terms.Schemas: termAsGraph :: TBinding (Term -> [Binding])
- Hydra.Sources.Kernel.Terms.Schemas: typeSchemeToFType :: TBinding (TypeScheme -> Type)
- Hydra.Sources.Kernel.Terms.Show.Accessors: define :: String -> TTerm a -> TBinding a
- Hydra.Sources.Kernel.Terms.Show.Accessors: module_ :: Module
- Hydra.Sources.Kernel.Terms.Show.Accessors: ns :: Namespace
- Hydra.Sources.Kernel.Terms.Show.Accessors: termAccessor :: TBinding (TermAccessor -> Maybe String)
- Hydra.Sources.Kernel.Terms.Show.Accessors: termToAccessorGraph :: TBinding (Map Namespace String -> Term -> AccessorGraph)
- Hydra.Sources.Kernel.Terms.Tarjan: adjacencyListsToGraph :: TBinding ([(key, [key])] -> (Graph, Vertex -> key))
- Hydra.Sources.Kernel.Terms.Tarjan: define :: String -> TTerm a -> TBinding a
- Hydra.Sources.Kernel.Terms.Tarjan: initialState :: TBinding TarjanState
- Hydra.Sources.Kernel.Terms.Tarjan: module_ :: Module
- Hydra.Sources.Kernel.Terms.Tarjan: ns :: Namespace
- Hydra.Sources.Kernel.Terms.Tarjan: popStackUntil :: TBinding (Vertex -> Flow TarjanState [Vertex])
- Hydra.Sources.Kernel.Terms.Tarjan: strongConnect :: TBinding (Graph -> Vertex -> Flow TarjanState ())
- Hydra.Sources.Kernel.Terms.Tarjan: stronglyConnectedComponents :: TBinding (Graph -> [[Vertex]])
- Hydra.Sources.Kernel.Types.Accessors: accessorEdge :: Binding
- Hydra.Sources.Kernel.Types.Accessors: accessorGraph :: Binding
- Hydra.Sources.Kernel.Types.Accessors: accessorNode :: Binding
- Hydra.Sources.Kernel.Types.Accessors: accessorPath :: Binding
- Hydra.Sources.Kernel.Types.Accessors: define :: String -> Type -> Binding
- Hydra.Sources.Kernel.Types.Accessors: module_ :: Module
- Hydra.Sources.Kernel.Types.Accessors: ns :: Namespace
- Hydra.Sources.Kernel.Types.Accessors: termAccessor :: Binding
- Hydra.Sources.Kernel.Types.Compute: adapter :: Binding
- Hydra.Sources.Kernel.Types.Compute: bicoder :: Binding
- Hydra.Sources.Kernel.Types.Compute: coder :: Binding
- Hydra.Sources.Kernel.Types.Compute: define :: String -> Type -> Binding
- Hydra.Sources.Kernel.Types.Compute: flow :: Binding
- Hydra.Sources.Kernel.Types.Compute: flowState :: Binding
- Hydra.Sources.Kernel.Types.Compute: module_ :: Module
- Hydra.Sources.Kernel.Types.Compute: ns :: Namespace
- Hydra.Sources.Kernel.Types.Compute: trace :: Binding
- Hydra.Sources.Kernel.Types.Constraints: define :: String -> Type -> Binding
- Hydra.Sources.Kernel.Types.Constraints: module_ :: Module
- Hydra.Sources.Kernel.Types.Constraints: ns :: Namespace
- Hydra.Sources.Kernel.Types.Constraints: pathEquation :: Binding
- Hydra.Sources.Kernel.Types.Constraints: patternImplication :: Binding
- Hydra.Sources.Kernel.Types.Core: rowType :: Binding
- Hydra.Sources.Kernel.Types.Core: wrappedType :: Binding
- Hydra.Sources.Kernel.Types.Grammar: constant :: Binding
- Hydra.Sources.Kernel.Types.Grammar: define :: String -> Type -> Binding
- Hydra.Sources.Kernel.Types.Grammar: grammar :: Binding
- Hydra.Sources.Kernel.Types.Grammar: label :: Binding
- Hydra.Sources.Kernel.Types.Grammar: labeledPattern :: Binding
- Hydra.Sources.Kernel.Types.Grammar: module_ :: Module
- Hydra.Sources.Kernel.Types.Grammar: ns :: Namespace
- Hydra.Sources.Kernel.Types.Grammar: pattern :: Binding
- Hydra.Sources.Kernel.Types.Grammar: production :: Binding
- Hydra.Sources.Kernel.Types.Grammar: regex :: Binding
- Hydra.Sources.Kernel.Types.Grammar: symbol :: Binding
- Hydra.Sources.Kernel.Types.Testing: jsonCoderTestCase :: Binding
- Hydra.Sources.Kernel.Types.Typing: inferenceContext :: Binding
- Hydra.Sources.Kernel.Types.Typing: typeContext :: Binding
- Hydra.Sources.Kernel.Types.Util: decodingError :: Binding
- Hydra.Sources.Kernel.Types.Workflow: define :: String -> Type -> Binding
- Hydra.Sources.Kernel.Types.Workflow: hydraSchemaSpec :: Binding
- Hydra.Sources.Kernel.Types.Workflow: lastMile :: Binding
- Hydra.Sources.Kernel.Types.Workflow: module_ :: Module
- Hydra.Sources.Kernel.Types.Workflow: ns :: Namespace
- Hydra.Sources.Kernel.Types.Workflow: schemaSpec :: Binding
- Hydra.Sources.Kernel.Types.Workflow: transformWorkflow :: Binding
- Hydra.Sources.Libraries: hydraLibFlows :: Library
- Hydra.Sources.Test.Annotations: testTrace :: TTerm Term
- Hydra.Sources.Test.Checking.Advanced: flowsTests :: TBinding TestGroup
- Hydra.Sources.Test.Checking.Advanced: flowsWithFailureAcrossLetBindingsTests :: TBinding TestGroup
- Hydra.Sources.Test.Hoisting: allTests :: TBinding TestGroup
- Hydra.Sources.Test.Hoisting: emptyAnnMap :: TTerm (Map Name Term)
- Hydra.Sources.Test.Hoisting: hoistAllCase :: String -> TTerm Let -> TTerm Let -> TTerm TestCaseWithMetadata
- Hydra.Sources.Test.Hoisting: hoistCaseStatementsGroup :: TTerm TestGroup
- Hydra.Sources.Test.Hoisting: hoistLetBindingsGroup :: TTerm TestGroup
- Hydra.Sources.Test.Hoisting: hoistPolyCase :: String -> TTerm Let -> TTerm Let -> TTerm TestCaseWithMetadata
- Hydra.Sources.Test.Hoisting: hoistPolymorphicLetBindingsGroup :: TTerm TestGroup
- Hydra.Sources.Test.Hoisting: hoistPolymorphicTypeParametersGroup :: TTerm TestGroup
- Hydra.Sources.Test.Hoisting: hoistSubtermsGroup :: TTerm TestGroup
- Hydra.Sources.Test.Hoisting: letExpr :: String -> TTerm Term -> TTerm Term -> TTerm Term
- Hydra.Sources.Test.Hoisting: mkLet :: [(TTerm Name, TTerm Term, TTerm (Maybe TypeScheme))] -> TTerm Term -> TTerm Let
- Hydra.Sources.Test.Hoisting: mkLetUntyped :: [(TTerm Name, TTerm Term)] -> TTerm Term -> TTerm Let
- Hydra.Sources.Test.Hoisting: module_ :: Module
- Hydra.Sources.Test.Hoisting: monoType :: TTerm Type -> TTerm (Maybe TypeScheme)
- Hydra.Sources.Test.Hoisting: multiLet :: [(String, TTerm Term)] -> TTerm Term -> TTerm Term
- Hydra.Sources.Test.Hoisting: nm :: String -> TTerm Name
- Hydra.Sources.Test.Hoisting: ns :: Namespace
- Hydra.Sources.Test.Hoisting: polyType :: [String] -> TTerm Type -> TTerm (Maybe TypeScheme)
- Hydra.Sources.Test.Json.Coder: allTests :: TBinding TestGroup
- Hydra.Sources.Test.Json.Coder: coderTest :: String -> TTerm Type -> TTerm Term -> TTerm Value -> TTerm TestCaseWithMetadata
- Hydra.Sources.Test.Json.Coder: collectionCoderGroup :: TTerm TestGroup
- Hydra.Sources.Test.Json.Coder: define :: String -> TTerm a -> TBinding a
- Hydra.Sources.Test.Json.Coder: floatCoderGroup :: TTerm TestGroup
- Hydra.Sources.Test.Json.Coder: integerCoderGroup :: TTerm TestGroup
- Hydra.Sources.Test.Json.Coder: literalCoderGroup :: TTerm TestGroup
- Hydra.Sources.Test.Json.Coder: module_ :: Module
- Hydra.Sources.Test.Json.Coder: ns :: Namespace
- Hydra.Sources.Test.Json.Coder: optionalCoderGroup :: TTerm TestGroup
- Hydra.Sources.Test.Json.Coder: recordCoderGroup :: TTerm TestGroup
- Hydra.Sources.Test.Lib.Flows: allTests :: TBinding TestGroup
- Hydra.Sources.Test.Lib.Flows: flowsApply :: TTerm TestGroup
- Hydra.Sources.Test.Lib.Flows: flowsBind :: TTerm TestGroup
- Hydra.Sources.Test.Lib.Flows: flowsFail :: TTerm TestGroup
- Hydra.Sources.Test.Lib.Flows: flowsFoldl :: TTerm TestGroup
- Hydra.Sources.Test.Lib.Flows: flowsMap :: TTerm TestGroup
- Hydra.Sources.Test.Lib.Flows: flowsMapElems :: TTerm TestGroup
- Hydra.Sources.Test.Lib.Flows: flowsMapKeys :: TTerm TestGroup
- Hydra.Sources.Test.Lib.Flows: flowsMapList :: TTerm TestGroup
- Hydra.Sources.Test.Lib.Flows: flowsMapMaybe :: TTerm TestGroup
- Hydra.Sources.Test.Lib.Flows: flowsMapSet :: TTerm TestGroup
- Hydra.Sources.Test.Lib.Flows: flowsPure :: TTerm TestGroup
- Hydra.Sources.Test.Lib.Flows: flowsSequence :: TTerm TestGroup
- Hydra.Sources.Test.Lib.Flows: flowsWithDefault :: TTerm TestGroup
- Hydra.Sources.Test.Lib.Flows: module_ :: Module
- Hydra.Sources.Test.Lib.Flows: ns :: Namespace
- Hydra.Sources.Test.Lib.Flows: testTrace :: TTerm Term
- Hydra.Sources.Test.Monads: allTests :: TBinding TestGroup
- Hydra.Sources.Test.Monads: bindTests :: TTerm TestGroup
- Hydra.Sources.Test.Monads: errorTraceTests :: TTerm TestGroup
- Hydra.Sources.Test.Monads: mapTests :: TTerm TestGroup
- Hydra.Sources.Test.Monads: module_ :: Module
- Hydra.Sources.Test.Monads: ns :: Namespace
- Hydra.Sources.Test.Monads: pureTests :: TTerm TestGroup
- Hydra.Sources.Test.Monads: testTrace :: TTerm Term
- Hydra.Sources.Test.Monads: traceWithMessages :: [String] -> TTerm Term
- Hydra.Sources.Test.TestTypes: testTypeFlow :: TBinding Type
- Hydra.Sources.Test.TestTypes: testTypeFlowName :: TBinding Name
- Hydra.Sources.Test.TestTypes: testTypeFlowState :: TBinding Type
- Hydra.Sources.Test.TestTypes: testTypeFlowStateName :: TBinding Name
- Hydra.Sources.Test.TestTypes: testTypeTrace :: TBinding Type
- Hydra.Sources.Test.TestTypes: testTypeTraceName :: TBinding Name
- Hydra.Staging.Lib.Names: _chars_isAlphaNum :: Name
- Hydra.Staging.Lib.Names: _chars_isLower :: Name
- Hydra.Staging.Lib.Names: _chars_isSpace :: Name
- Hydra.Staging.Lib.Names: _chars_isUpper :: Name
- Hydra.Staging.Lib.Names: _chars_toLower :: Name
- Hydra.Staging.Lib.Names: _chars_toUpper :: Name
- Hydra.Staging.Lib.Names: _eithers_bimap :: Name
- Hydra.Staging.Lib.Names: _eithers_bind :: Name
- Hydra.Staging.Lib.Names: _eithers_either :: Name
- Hydra.Staging.Lib.Names: _eithers_fromLeft :: Name
- Hydra.Staging.Lib.Names: _eithers_fromRight :: Name
- Hydra.Staging.Lib.Names: _eithers_isLeft :: Name
- Hydra.Staging.Lib.Names: _eithers_isRight :: Name
- Hydra.Staging.Lib.Names: _eithers_lefts :: Name
- Hydra.Staging.Lib.Names: _eithers_map :: Name
- Hydra.Staging.Lib.Names: _eithers_mapList :: Name
- Hydra.Staging.Lib.Names: _eithers_mapMaybe :: Name
- Hydra.Staging.Lib.Names: _eithers_partitionEithers :: Name
- Hydra.Staging.Lib.Names: _eithers_rights :: Name
- Hydra.Staging.Lib.Names: _equality_compare :: Name
- Hydra.Staging.Lib.Names: _equality_equal :: Name
- Hydra.Staging.Lib.Names: _equality_gt :: Name
- Hydra.Staging.Lib.Names: _equality_gte :: Name
- Hydra.Staging.Lib.Names: _equality_identity :: Name
- Hydra.Staging.Lib.Names: _equality_lt :: Name
- Hydra.Staging.Lib.Names: _equality_lte :: Name
- Hydra.Staging.Lib.Names: _equality_max :: Name
- Hydra.Staging.Lib.Names: _equality_min :: Name
- Hydra.Staging.Lib.Names: _flows_apply :: Name
- Hydra.Staging.Lib.Names: _flows_bind :: Name
- Hydra.Staging.Lib.Names: _flows_fail :: Name
- Hydra.Staging.Lib.Names: _flows_foldl :: Name
- Hydra.Staging.Lib.Names: _flows_map :: Name
- Hydra.Staging.Lib.Names: _flows_mapElems :: Name
- Hydra.Staging.Lib.Names: _flows_mapKeys :: Name
- Hydra.Staging.Lib.Names: _flows_mapList :: Name
- Hydra.Staging.Lib.Names: _flows_mapMaybe :: Name
- Hydra.Staging.Lib.Names: _flows_mapSet :: Name
- Hydra.Staging.Lib.Names: _flows_pure :: Name
- Hydra.Staging.Lib.Names: _flows_sequence :: Name
- Hydra.Staging.Lib.Names: _flows_withDefault :: Name
- Hydra.Staging.Lib.Names: _hydra_lib_chars :: Namespace
- Hydra.Staging.Lib.Names: _hydra_lib_eithers :: Namespace
- Hydra.Staging.Lib.Names: _hydra_lib_equality :: Namespace
- Hydra.Staging.Lib.Names: _hydra_lib_flows :: Namespace
- Hydra.Staging.Lib.Names: _hydra_lib_lists :: Namespace
- Hydra.Staging.Lib.Names: _hydra_lib_literals :: Namespace
- Hydra.Staging.Lib.Names: _hydra_lib_logic :: Namespace
- Hydra.Staging.Lib.Names: _hydra_lib_maps :: Namespace
- Hydra.Staging.Lib.Names: _hydra_lib_math :: Namespace
- Hydra.Staging.Lib.Names: _hydra_lib_maybes :: Namespace
- Hydra.Staging.Lib.Names: _hydra_lib_pairs :: Namespace
- Hydra.Staging.Lib.Names: _hydra_lib_sets :: Namespace
- Hydra.Staging.Lib.Names: _hydra_lib_strings :: Namespace
- Hydra.Staging.Lib.Names: _hydra_typeclass :: Namespace
- Hydra.Staging.Lib.Names: _lists_apply :: Name
- Hydra.Staging.Lib.Names: _lists_at :: Name
- Hydra.Staging.Lib.Names: _lists_bind :: Name
- Hydra.Staging.Lib.Names: _lists_concat :: Name
- Hydra.Staging.Lib.Names: _lists_concat2 :: Name
- Hydra.Staging.Lib.Names: _lists_cons :: Name
- Hydra.Staging.Lib.Names: _lists_drop :: Name
- Hydra.Staging.Lib.Names: _lists_dropWhile :: Name
- Hydra.Staging.Lib.Names: _lists_elem :: Name
- Hydra.Staging.Lib.Names: _lists_filter :: Name
- Hydra.Staging.Lib.Names: _lists_find :: Name
- Hydra.Staging.Lib.Names: _lists_foldl :: Name
- Hydra.Staging.Lib.Names: _lists_group :: Name
- Hydra.Staging.Lib.Names: _lists_head :: Name
- Hydra.Staging.Lib.Names: _lists_init :: Name
- Hydra.Staging.Lib.Names: _lists_intercalate :: Name
- Hydra.Staging.Lib.Names: _lists_intersperse :: Name
- Hydra.Staging.Lib.Names: _lists_last :: Name
- Hydra.Staging.Lib.Names: _lists_length :: Name
- Hydra.Staging.Lib.Names: _lists_map :: Name
- Hydra.Staging.Lib.Names: _lists_nub :: Name
- Hydra.Staging.Lib.Names: _lists_null :: Name
- Hydra.Staging.Lib.Names: _lists_partition :: Name
- Hydra.Staging.Lib.Names: _lists_pure :: Name
- Hydra.Staging.Lib.Names: _lists_replicate :: Name
- Hydra.Staging.Lib.Names: _lists_reverse :: Name
- Hydra.Staging.Lib.Names: _lists_safeHead :: Name
- Hydra.Staging.Lib.Names: _lists_singleton :: Name
- Hydra.Staging.Lib.Names: _lists_sort :: Name
- Hydra.Staging.Lib.Names: _lists_sortOn :: Name
- Hydra.Staging.Lib.Names: _lists_span :: Name
- Hydra.Staging.Lib.Names: _lists_tail :: Name
- Hydra.Staging.Lib.Names: _lists_take :: Name
- Hydra.Staging.Lib.Names: _lists_transpose :: Name
- Hydra.Staging.Lib.Names: _lists_zip :: Name
- Hydra.Staging.Lib.Names: _lists_zipWith :: Name
- Hydra.Staging.Lib.Names: _literals_bigfloatToBigint :: Name
- Hydra.Staging.Lib.Names: _literals_bigfloatToFloat32 :: Name
- Hydra.Staging.Lib.Names: _literals_bigfloatToFloat64 :: Name
- Hydra.Staging.Lib.Names: _literals_bigintToBigfloat :: Name
- Hydra.Staging.Lib.Names: _literals_bigintToInt16 :: Name
- Hydra.Staging.Lib.Names: _literals_bigintToInt32 :: Name
- Hydra.Staging.Lib.Names: _literals_bigintToInt64 :: Name
- Hydra.Staging.Lib.Names: _literals_bigintToInt8 :: Name
- Hydra.Staging.Lib.Names: _literals_bigintToUint16 :: Name
- Hydra.Staging.Lib.Names: _literals_bigintToUint32 :: Name
- Hydra.Staging.Lib.Names: _literals_bigintToUint64 :: Name
- Hydra.Staging.Lib.Names: _literals_bigintToUint8 :: Name
- Hydra.Staging.Lib.Names: _literals_binaryToBytes :: Name
- Hydra.Staging.Lib.Names: _literals_binaryToString :: Name
- Hydra.Staging.Lib.Names: _literals_float32ToBigfloat :: Name
- Hydra.Staging.Lib.Names: _literals_float64ToBigfloat :: Name
- Hydra.Staging.Lib.Names: _literals_int16ToBigint :: Name
- Hydra.Staging.Lib.Names: _literals_int32ToBigint :: Name
- Hydra.Staging.Lib.Names: _literals_int64ToBigint :: Name
- Hydra.Staging.Lib.Names: _literals_int8ToBigint :: Name
- Hydra.Staging.Lib.Names: _literals_readBigfloat :: Name
- Hydra.Staging.Lib.Names: _literals_readBigint :: Name
- Hydra.Staging.Lib.Names: _literals_readBoolean :: Name
- Hydra.Staging.Lib.Names: _literals_readFloat32 :: Name
- Hydra.Staging.Lib.Names: _literals_readFloat64 :: Name
- Hydra.Staging.Lib.Names: _literals_readInt16 :: Name
- Hydra.Staging.Lib.Names: _literals_readInt32 :: Name
- Hydra.Staging.Lib.Names: _literals_readInt64 :: Name
- Hydra.Staging.Lib.Names: _literals_readInt8 :: Name
- Hydra.Staging.Lib.Names: _literals_readString :: Name
- Hydra.Staging.Lib.Names: _literals_readUint16 :: Name
- Hydra.Staging.Lib.Names: _literals_readUint32 :: Name
- Hydra.Staging.Lib.Names: _literals_readUint64 :: Name
- Hydra.Staging.Lib.Names: _literals_readUint8 :: Name
- Hydra.Staging.Lib.Names: _literals_showBigfloat :: Name
- Hydra.Staging.Lib.Names: _literals_showBigint :: Name
- Hydra.Staging.Lib.Names: _literals_showBoolean :: Name
- Hydra.Staging.Lib.Names: _literals_showFloat32 :: Name
- Hydra.Staging.Lib.Names: _literals_showFloat64 :: Name
- Hydra.Staging.Lib.Names: _literals_showInt16 :: Name
- Hydra.Staging.Lib.Names: _literals_showInt32 :: Name
- Hydra.Staging.Lib.Names: _literals_showInt64 :: Name
- Hydra.Staging.Lib.Names: _literals_showInt8 :: Name
- Hydra.Staging.Lib.Names: _literals_showString :: Name
- Hydra.Staging.Lib.Names: _literals_showUint16 :: Name
- Hydra.Staging.Lib.Names: _literals_showUint32 :: Name
- Hydra.Staging.Lib.Names: _literals_showUint64 :: Name
- Hydra.Staging.Lib.Names: _literals_showUint8 :: Name
- Hydra.Staging.Lib.Names: _literals_stringToBinary :: Name
- Hydra.Staging.Lib.Names: _literals_uint16ToBigint :: Name
- Hydra.Staging.Lib.Names: _literals_uint32ToBigint :: Name
- Hydra.Staging.Lib.Names: _literals_uint64ToBigint :: Name
- Hydra.Staging.Lib.Names: _literals_uint8ToBigint :: Name
- Hydra.Staging.Lib.Names: _logic_and :: Name
- Hydra.Staging.Lib.Names: _logic_ifElse :: Name
- Hydra.Staging.Lib.Names: _logic_not :: Name
- Hydra.Staging.Lib.Names: _logic_or :: Name
- Hydra.Staging.Lib.Names: _maps_alter :: Name
- Hydra.Staging.Lib.Names: _maps_bimap :: Name
- Hydra.Staging.Lib.Names: _maps_delete :: Name
- Hydra.Staging.Lib.Names: _maps_elems :: Name
- Hydra.Staging.Lib.Names: _maps_empty :: Name
- Hydra.Staging.Lib.Names: _maps_filter :: Name
- Hydra.Staging.Lib.Names: _maps_filterWithKey :: Name
- Hydra.Staging.Lib.Names: _maps_findWithDefault :: Name
- Hydra.Staging.Lib.Names: _maps_fromList :: Name
- Hydra.Staging.Lib.Names: _maps_insert :: Name
- Hydra.Staging.Lib.Names: _maps_keys :: Name
- Hydra.Staging.Lib.Names: _maps_lookup :: Name
- Hydra.Staging.Lib.Names: _maps_map :: Name
- Hydra.Staging.Lib.Names: _maps_mapKeys :: Name
- Hydra.Staging.Lib.Names: _maps_member :: Name
- Hydra.Staging.Lib.Names: _maps_null :: Name
- Hydra.Staging.Lib.Names: _maps_singleton :: Name
- Hydra.Staging.Lib.Names: _maps_size :: Name
- Hydra.Staging.Lib.Names: _maps_toList :: Name
- Hydra.Staging.Lib.Names: _maps_union :: Name
- Hydra.Staging.Lib.Names: _math_abs :: Name
- Hydra.Staging.Lib.Names: _math_acos :: Name
- Hydra.Staging.Lib.Names: _math_acosh :: Name
- Hydra.Staging.Lib.Names: _math_add :: Name
- Hydra.Staging.Lib.Names: _math_asin :: Name
- Hydra.Staging.Lib.Names: _math_asinh :: Name
- Hydra.Staging.Lib.Names: _math_atan :: Name
- Hydra.Staging.Lib.Names: _math_atan2 :: Name
- Hydra.Staging.Lib.Names: _math_atanh :: Name
- Hydra.Staging.Lib.Names: _math_ceiling :: Name
- Hydra.Staging.Lib.Names: _math_cos :: Name
- Hydra.Staging.Lib.Names: _math_cosh :: Name
- Hydra.Staging.Lib.Names: _math_div :: Name
- Hydra.Staging.Lib.Names: _math_e :: Name
- Hydra.Staging.Lib.Names: _math_even :: Name
- Hydra.Staging.Lib.Names: _math_exp :: Name
- Hydra.Staging.Lib.Names: _math_floor :: Name
- Hydra.Staging.Lib.Names: _math_log :: Name
- Hydra.Staging.Lib.Names: _math_logBase :: Name
- Hydra.Staging.Lib.Names: _math_max :: Name
- Hydra.Staging.Lib.Names: _math_min :: Name
- Hydra.Staging.Lib.Names: _math_mod :: Name
- Hydra.Staging.Lib.Names: _math_mul :: Name
- Hydra.Staging.Lib.Names: _math_negate :: Name
- Hydra.Staging.Lib.Names: _math_odd :: Name
- Hydra.Staging.Lib.Names: _math_pi :: Name
- Hydra.Staging.Lib.Names: _math_pow :: Name
- Hydra.Staging.Lib.Names: _math_pred :: Name
- Hydra.Staging.Lib.Names: _math_range :: Name
- Hydra.Staging.Lib.Names: _math_rem :: Name
- Hydra.Staging.Lib.Names: _math_round :: Name
- Hydra.Staging.Lib.Names: _math_signum :: Name
- Hydra.Staging.Lib.Names: _math_sin :: Name
- Hydra.Staging.Lib.Names: _math_sinh :: Name
- Hydra.Staging.Lib.Names: _math_sqrt :: Name
- Hydra.Staging.Lib.Names: _math_sub :: Name
- Hydra.Staging.Lib.Names: _math_succ :: Name
- Hydra.Staging.Lib.Names: _math_tan :: Name
- Hydra.Staging.Lib.Names: _math_tanh :: Name
- Hydra.Staging.Lib.Names: _math_truncate :: Name
- Hydra.Staging.Lib.Names: _maybes_apply :: Name
- Hydra.Staging.Lib.Names: _maybes_bind :: Name
- Hydra.Staging.Lib.Names: _maybes_cases :: Name
- Hydra.Staging.Lib.Names: _maybes_cat :: Name
- Hydra.Staging.Lib.Names: _maybes_compose :: Name
- Hydra.Staging.Lib.Names: _maybes_fromJust :: Name
- Hydra.Staging.Lib.Names: _maybes_fromMaybe :: Name
- Hydra.Staging.Lib.Names: _maybes_isJust :: Name
- Hydra.Staging.Lib.Names: _maybes_isNothing :: Name
- Hydra.Staging.Lib.Names: _maybes_map :: Name
- Hydra.Staging.Lib.Names: _maybes_mapMaybe :: Name
- Hydra.Staging.Lib.Names: _maybes_maybe :: Name
- Hydra.Staging.Lib.Names: _maybes_pure :: Name
- Hydra.Staging.Lib.Names: _pairs_bimap :: Name
- Hydra.Staging.Lib.Names: _pairs_first :: Name
- Hydra.Staging.Lib.Names: _pairs_second :: Name
- Hydra.Staging.Lib.Names: _sets_delete :: Name
- Hydra.Staging.Lib.Names: _sets_difference :: Name
- Hydra.Staging.Lib.Names: _sets_empty :: Name
- Hydra.Staging.Lib.Names: _sets_fromList :: Name
- Hydra.Staging.Lib.Names: _sets_insert :: Name
- Hydra.Staging.Lib.Names: _sets_intersection :: Name
- Hydra.Staging.Lib.Names: _sets_map :: Name
- Hydra.Staging.Lib.Names: _sets_member :: Name
- Hydra.Staging.Lib.Names: _sets_null :: Name
- Hydra.Staging.Lib.Names: _sets_singleton :: Name
- Hydra.Staging.Lib.Names: _sets_size :: Name
- Hydra.Staging.Lib.Names: _sets_toList :: Name
- Hydra.Staging.Lib.Names: _sets_union :: Name
- Hydra.Staging.Lib.Names: _sets_unions :: Name
- Hydra.Staging.Lib.Names: _strings_cat :: Name
- Hydra.Staging.Lib.Names: _strings_cat2 :: Name
- Hydra.Staging.Lib.Names: _strings_charAt :: Name
- Hydra.Staging.Lib.Names: _strings_fromList :: Name
- Hydra.Staging.Lib.Names: _strings_intercalate :: Name
- Hydra.Staging.Lib.Names: _strings_length :: Name
- Hydra.Staging.Lib.Names: _strings_lines :: Name
- Hydra.Staging.Lib.Names: _strings_null :: Name
- Hydra.Staging.Lib.Names: _strings_splitOn :: Name
- Hydra.Staging.Lib.Names: _strings_toList :: Name
- Hydra.Staging.Lib.Names: _strings_toLower :: Name
- Hydra.Staging.Lib.Names: _strings_toUpper :: Name
- Hydra.Staging.Lib.Names: _strings_unlines :: Name
- Hydra.Staging.Lib.Names: _typeclass_Eq :: Name
- Hydra.Staging.Lib.Names: _typeclass_Ord :: Name
- Hydra.Staging.Testing.Generation.Generate: TestGenerator :: (Module -> Flow Graph (Namespaces a)) -> (Namespaces a -> TestCodec) -> (Module -> TestGroup -> Flow Graph (FilePath, String)) -> Maybe (FilePath -> [Module] -> (FilePath, String)) -> TestGenerator a
- Hydra.Staging.Testing.Generation.Generate: [testGenAggregatorFile] :: TestGenerator a -> Maybe (FilePath -> [Module] -> (FilePath, String))
- Hydra.Staging.Testing.Generation.Generate: [testGenCreateCodec] :: TestGenerator a -> Namespaces a -> TestCodec
- Hydra.Staging.Testing.Generation.Generate: [testGenGenerateTestFile] :: TestGenerator a -> Module -> TestGroup -> Flow Graph (FilePath, String)
- Hydra.Staging.Testing.Generation.Generate: [testGenNamespacesForModule] :: TestGenerator a -> Module -> Flow Graph (Namespaces a)
- Hydra.Staging.Testing.Generation.Generate: buildNamespacesForTestGroup :: TestGenerator a -> Module -> TestGroup -> Flow Graph (Namespaces a)
- Hydra.Staging.Testing.Generation.Generate: buildTestGroupMap :: [Namespace] -> TestGroup -> Map Namespace TestGroup
- Hydra.Staging.Testing.Generation.Generate: createTestGroupLookup :: [Namespace] -> TestGroup -> Namespace -> Maybe TestGroup
- Hydra.Staging.Testing.Generation.Generate: data TestGenerator a
- Hydra.Staging.Testing.Generation.Generate: generateAggregatorSpec :: FilePath -> [Module] -> (FilePath, String)
- Hydra.Staging.Testing.Generation.Generate: generateAllModuleTests :: TestGenerator a -> FilePath -> [(Module, TestGroup)] -> Flow Graph [(FilePath, String)]
- Hydra.Staging.Testing.Generation.Generate: generateAllModuleTestsIncremental :: TestGenerator a -> FilePath -> [(Module, TestGroup)] -> ((FilePath, String) -> IO ()) -> Flow Graph Int
- Hydra.Staging.Testing.Generation.Generate: generateAndWriteModule :: TestGenerator a -> FilePath -> ((FilePath, String) -> IO ()) -> (Int, (Module, TestGroup)) -> Flow Graph ()
- Hydra.Staging.Testing.Generation.Generate: generateAndWriteModuleStrict :: TestGenerator a -> FilePath -> ((FilePath, String) -> IO ()) -> (Int, (Module, TestGroup)) -> Flow Graph ()
- Hydra.Staging.Testing.Generation.Generate: generateGenerationTestSuite :: TestGenerator a -> FilePath -> [Module] -> (Namespace -> Maybe TestGroup) -> IO Bool
- Hydra.Staging.Testing.Generation.Generate: generateModuleTest :: TestGenerator a -> FilePath -> (Module, TestGroup) -> Flow Graph (FilePath, String)
- Hydra.Staging.Testing.Generation.Generate: generateModuleTestWithProgress :: TestGenerator a -> FilePath -> (Int, (Module, TestGroup)) -> Flow Graph (FilePath, String)
- Hydra.Staging.Testing.Generation.Generate: runFlowWithGraph :: s -> Flow s a -> IO (Either Trace a)
- Hydra.Staging.Testing.Generation.Generate: tryFlow :: Flow s a -> Flow s (Maybe a)
- Hydra.Staging.Testing.Generation.Generate: tryFlowWithTrace :: Flow s a -> Flow s (Maybe a, String)
- Hydra.Staging.Testing.Generation.HaskellCodec: addNamespacesToNamespaces :: Namespaces ModuleName -> Set Name -> Namespaces ModuleName
- Hydra.Staging.Testing.Generation.HaskellCodec: buildTestModuleWithCodec :: TestCodec -> Module -> TestGroup -> String -> Namespaces ModuleName -> String
- Hydra.Staging.Testing.Generation.HaskellCodec: containsTriviallyPolymorphic :: Term -> Bool
- Hydra.Staging.Testing.Generation.HaskellCodec: extractEncodedTermVariableNames :: Graph -> Term -> Set Name
- Hydra.Staging.Testing.Generation.HaskellCodec: extractFlowStateValueType :: Type -> Flow Graph (Maybe Type)
- Hydra.Staging.Testing.Generation.HaskellCodec: findHaskellImports :: Namespaces ModuleName -> Set Name -> [String]
- Hydra.Staging.Testing.Generation.HaskellCodec: generateHaskellAggregatorSpec :: FilePath -> [Module] -> (FilePath, String)
- Hydra.Staging.Testing.Generation.HaskellCodec: generateHaskellTestFile :: Module -> TestGroup -> Flow Graph (FilePath, String)
- Hydra.Staging.Testing.Generation.HaskellCodec: generateTestCaseWithCodec :: InferenceContext -> Namespaces ModuleName -> TestCodec -> Int -> TestCaseWithMetadata -> Flow Graph [String]
- Hydra.Staging.Testing.Generation.HaskellCodec: generateTestFileWithCodec :: TestCodec -> Module -> TestGroup -> Namespaces ModuleName -> Flow Graph (FilePath, String)
- Hydra.Staging.Testing.Generation.HaskellCodec: generateTestGroupHierarchy :: InferenceContext -> Namespaces ModuleName -> TestCodec -> Int -> TestGroup -> Flow Graph String
- Hydra.Staging.Testing.Generation.HaskellCodec: generateTypeAnnotationFor :: InferenceContext -> Namespaces ModuleName -> Term -> Term -> Flow Graph (Maybe String)
- Hydra.Staging.Testing.Generation.HaskellCodec: generateTypeAnnotationForFlowStateValue :: InferenceContext -> Namespaces ModuleName -> Term -> Term -> Flow Graph (Maybe String)
- Hydra.Staging.Testing.Generation.HaskellCodec: haskellImportTemplate :: String
- Hydra.Staging.Testing.Generation.HaskellCodec: haskellModuleTemplate :: String
- Hydra.Staging.Testing.Generation.HaskellCodec: haskellTestCaseTemplate :: String
- Hydra.Staging.Testing.Generation.HaskellCodec: haskellTestCodec :: Namespaces ModuleName -> TestCodec
- Hydra.Staging.Testing.Generation.HaskellCodec: haskellTestGenerator :: TestGenerator ModuleName
- Hydra.Staging.Testing.Generation.HaskellCodec: haskellTestGroupTemplate :: String
- Hydra.Staging.Testing.Generation.HaskellCodec: isFlowStateRecord :: Term -> Maybe (Term, Term, Term)
- Hydra.Staging.Testing.Generation.HaskellCodec: namespaceToModuleName :: Namespace -> String
- Hydra.Staging.Testing.Generation.HaskellCodec: preprocessFlowInput :: Term -> Term
- Hydra.Staging.Testing.Generation.HaskellCodec: termToHaskell :: Namespaces ModuleName -> Term -> Flow Graph String
- Hydra.Staging.Testing.Generation.HaskellCodec: tryInferTypeOf :: InferenceContext -> Term -> Flow Graph (Maybe (Term, TypeScheme))
- Hydra.Staging.Testing.Generation.HaskellCodec: typeToHaskell :: Namespaces ModuleName -> Type -> Flow Graph String
- Hydra.Staging.Testing.Generation.Transform: addGenerationPrefix :: Namespace -> Namespace
- Hydra.Staging.Testing.Generation.Transform: buildConvertCaseCall :: CaseConvention -> CaseConvention -> String -> Term
- Hydra.Staging.Testing.Generation.Transform: buildTopologicalSortCall :: [(Int, [Int])] -> Term
- Hydra.Staging.Testing.Generation.Transform: buildTopologicalSortSCCCall :: [(Int, [Int])] -> Term
- Hydra.Staging.Testing.Generation.Transform: collectTestCases :: TestGroup -> [TestCaseWithMetadata]
- Hydra.Staging.Testing.Generation.Transform: encodeAdjacencyList :: [(Int, [Int])] -> Term
- Hydra.Staging.Testing.Generation.Transform: encodeCaseConvention :: CaseConvention -> Term
- Hydra.Staging.Testing.Generation.Transform: encodeEitherListList :: Either [[Int]] [Int] -> Term
- Hydra.Staging.Testing.Generation.Transform: encodeInt :: Int -> Term
- Hydra.Staging.Testing.Generation.Transform: encodeIntList :: [Int] -> Term
- Hydra.Staging.Testing.Generation.Transform: encodeListList :: [[Int]] -> Term
- Hydra.Staging.Testing.Generation.Transform: tag_requiresFlowDecoding :: Tag
- Hydra.Staging.Testing.Generation.Transform: transformModule :: Module -> Module
- Hydra.Staging.Testing.Generation.Transform: transformTestCase :: TestCaseWithMetadata -> Maybe TestCaseWithMetadata
- Hydra.Staging.Testing.Generation.Transform: transformToCompiledTests :: TestGroup -> Maybe TestGroup
- Hydra.Staging.Yaml.Coder: yamlCoder :: Type -> Flow Graph (Coder Graph Graph Term Node)
- Hydra.Staging.Yaml.Language: yamlLanguage :: Language
- Hydra.Staging.Yaml.Modules: moduleToYaml :: Module -> [Definition] -> Flow Graph (Map FilePath String)
- Hydra.Staging.Yaml.Serde: bytesToHsYaml :: ByteString -> Flow Graph (Node Pos)
- Hydra.Staging.Yaml.Serde: bytesToHydraYaml :: ByteString -> Flow Graph Node
- Hydra.Staging.Yaml.Serde: hsYamlToBytes :: Node () -> ByteString
- Hydra.Staging.Yaml.Serde: hsYamlToHydraYaml :: Node x -> Flow Graph Node
- Hydra.Staging.Yaml.Serde: hydraYamlToBytes :: Node -> ByteString
- Hydra.Staging.Yaml.Serde: hydraYamlToHsYaml :: Node -> Node ()
- Hydra.Staging.Yaml.Serde: hydraYamlToString :: Node -> String
- Hydra.Staging.Yaml.Serde: yamlByteStringCoder :: Type -> Flow Graph (Coder Graph Graph Term ByteString)
- Hydra.Staging.Yaml.Serde: yamlStringCoder :: Type -> Flow Graph (Coder Graph Graph Term String)
- Hydra.Tarjan: adjacencyListsToGraph :: Ord t0 => [(t0, [t0])] -> (Map Int [Int], Int -> t0)
- Hydra.Tarjan: initialState :: TarjanState
- Hydra.Tarjan: popStackUntil :: Int -> Flow TarjanState [Int]
- Hydra.Tarjan: strongConnect :: Map Int [Int] -> Int -> Flow TarjanState ()
- Hydra.Tarjan: stronglyConnectedComponents :: Map Int [Int] -> [[Int]]
- Hydra.Testing: JsonCoderTestCase :: Type -> Term -> Value -> JsonCoderTestCase
- Hydra.Testing: TestCaseJsonCoder :: JsonCoderTestCase -> TestCase
- Hydra.Testing: [jsonCoderTestCaseJson] :: JsonCoderTestCase -> Value
- Hydra.Testing: [jsonCoderTestCaseTerm] :: JsonCoderTestCase -> Term
- Hydra.Testing: [jsonCoderTestCaseType] :: JsonCoderTestCase -> Type
- Hydra.Testing: _JsonCoderTestCase :: Name
- Hydra.Testing: _JsonCoderTestCase_json :: Name
- Hydra.Testing: _JsonCoderTestCase_term :: Name
- Hydra.Testing: _JsonCoderTestCase_type :: Name
- Hydra.Testing: _TestCase_jsonCoder :: Name
- Hydra.Testing: data JsonCoderTestCase
- Hydra.Testing: instance GHC.Classes.Eq Hydra.Testing.JsonCoderTestCase
- Hydra.Testing: instance GHC.Classes.Ord Hydra.Testing.JsonCoderTestCase
- Hydra.Testing: instance GHC.Read.Read Hydra.Testing.JsonCoderTestCase
- Hydra.Testing: instance GHC.Show.Show Hydra.Testing.JsonCoderTestCase
- Hydra.Tools.Monads: flowToIo :: s -> Flow s a -> IO a
- Hydra.Tools.Monads: fromEither :: Show e => (e -> String) -> Either e a -> Flow c a
- Hydra.Tools.Monads: fromMaybe :: String -> Maybe a -> Flow s a
- Hydra.Typing: InferenceContext :: Map Name TypeScheme -> Map Name TypeScheme -> Map Name TypeScheme -> Map Name TypeVariableMetadata -> Bool -> InferenceContext
- Hydra.Typing: TypeContext :: Map Name Type -> Map Name Term -> Set Name -> Set Name -> Set Name -> InferenceContext -> TypeContext
- Hydra.Typing: [inferenceContextClassConstraints] :: InferenceContext -> Map Name TypeVariableMetadata
- Hydra.Typing: [inferenceContextDataTypes] :: InferenceContext -> Map Name TypeScheme
- Hydra.Typing: [inferenceContextDebug] :: InferenceContext -> Bool
- Hydra.Typing: [inferenceContextPrimitiveTypes] :: InferenceContext -> Map Name TypeScheme
- Hydra.Typing: [inferenceContextSchemaTypes] :: InferenceContext -> Map Name TypeScheme
- Hydra.Typing: [typeContextInferenceContext] :: TypeContext -> InferenceContext
- Hydra.Typing: [typeContextLambdaVariables] :: TypeContext -> Set Name
- Hydra.Typing: [typeContextLetVariables] :: TypeContext -> Set Name
- Hydra.Typing: [typeContextMetadata] :: TypeContext -> Map Name Term
- Hydra.Typing: [typeContextTypeVariables] :: TypeContext -> Set Name
- Hydra.Typing: [typeContextTypes] :: TypeContext -> Map Name Type
- Hydra.Typing: _InferenceContext :: Name
- Hydra.Typing: _InferenceContext_classConstraints :: Name
- Hydra.Typing: _InferenceContext_dataTypes :: Name
- Hydra.Typing: _InferenceContext_debug :: Name
- Hydra.Typing: _InferenceContext_primitiveTypes :: Name
- Hydra.Typing: _InferenceContext_schemaTypes :: Name
- Hydra.Typing: _TypeContext :: Name
- Hydra.Typing: _TypeContext_inferenceContext :: Name
- Hydra.Typing: _TypeContext_lambdaVariables :: Name
- Hydra.Typing: _TypeContext_letVariables :: Name
- Hydra.Typing: _TypeContext_metadata :: Name
- Hydra.Typing: _TypeContext_typeVariables :: Name
- Hydra.Typing: _TypeContext_types :: Name
- Hydra.Typing: data InferenceContext
- Hydra.Typing: data TypeContext
- Hydra.Typing: instance GHC.Classes.Eq Hydra.Typing.InferenceContext
- Hydra.Typing: instance GHC.Classes.Eq Hydra.Typing.TypeContext
- Hydra.Typing: instance GHC.Classes.Ord Hydra.Typing.InferenceContext
- Hydra.Typing: instance GHC.Classes.Ord Hydra.Typing.TypeContext
- Hydra.Typing: instance GHC.Read.Read Hydra.Typing.InferenceContext
- Hydra.Typing: instance GHC.Read.Read Hydra.Typing.TypeContext
- Hydra.Typing: instance GHC.Show.Show Hydra.Typing.InferenceContext
- Hydra.Typing: instance GHC.Show.Show Hydra.Typing.TypeContext
- Hydra.Util: DecodingError :: String -> DecodingError
- Hydra.Util: [unDecodingError] :: DecodingError -> String
- Hydra.Util: _DecodingError :: Name
- Hydra.Util: instance GHC.Classes.Eq Hydra.Util.DecodingError
- Hydra.Util: instance GHC.Classes.Ord Hydra.Util.DecodingError
- Hydra.Util: instance GHC.Read.Read Hydra.Util.DecodingError
- Hydra.Util: instance GHC.Show.Show Hydra.Util.DecodingError
- Hydra.Util: newtype DecodingError
- Hydra.Workflow: HydraSchemaSpec :: [Module] -> Name -> HydraSchemaSpec
- Hydra.Workflow: LastMile :: (Type -> Flow s (Term -> Graph -> Flow s [a])) -> ([a] -> Flow s String) -> String -> LastMile s a
- Hydra.Workflow: SchemaSpecFile :: String -> SchemaSpec
- Hydra.Workflow: SchemaSpecHydra :: HydraSchemaSpec -> SchemaSpec
- Hydra.Workflow: SchemaSpecProvided :: SchemaSpec
- Hydra.Workflow: TransformWorkflow :: String -> SchemaSpec -> String -> String -> TransformWorkflow
- Hydra.Workflow: [hydraSchemaSpecModules] :: HydraSchemaSpec -> [Module]
- Hydra.Workflow: [hydraSchemaSpecTypeName] :: HydraSchemaSpec -> Name
- Hydra.Workflow: [lastMileEncoder] :: LastMile s a -> Type -> Flow s (Term -> Graph -> Flow s [a])
- Hydra.Workflow: [lastMileFileExtension] :: LastMile s a -> String
- Hydra.Workflow: [lastMileSerializer] :: LastMile s a -> [a] -> Flow s String
- Hydra.Workflow: [transformWorkflowDestDir] :: TransformWorkflow -> String
- Hydra.Workflow: [transformWorkflowName] :: TransformWorkflow -> String
- Hydra.Workflow: [transformWorkflowSchemaSpec] :: TransformWorkflow -> SchemaSpec
- Hydra.Workflow: [transformWorkflowSrcDir] :: TransformWorkflow -> String
- Hydra.Workflow: _HydraSchemaSpec :: Name
- Hydra.Workflow: _HydraSchemaSpec_modules :: Name
- Hydra.Workflow: _HydraSchemaSpec_typeName :: Name
- Hydra.Workflow: _LastMile :: Name
- Hydra.Workflow: _LastMile_encoder :: Name
- Hydra.Workflow: _LastMile_fileExtension :: Name
- Hydra.Workflow: _LastMile_serializer :: Name
- Hydra.Workflow: _SchemaSpec :: Name
- Hydra.Workflow: _SchemaSpec_file :: Name
- Hydra.Workflow: _SchemaSpec_hydra :: Name
- Hydra.Workflow: _SchemaSpec_provided :: Name
- Hydra.Workflow: _TransformWorkflow :: Name
- Hydra.Workflow: _TransformWorkflow_destDir :: Name
- Hydra.Workflow: _TransformWorkflow_name :: Name
- Hydra.Workflow: _TransformWorkflow_schemaSpec :: Name
- Hydra.Workflow: _TransformWorkflow_srcDir :: Name
- Hydra.Workflow: data HydraSchemaSpec
- Hydra.Workflow: data LastMile s a
- Hydra.Workflow: data SchemaSpec
- Hydra.Workflow: data TransformWorkflow
- Hydra.Workflow: instance GHC.Classes.Eq Hydra.Workflow.HydraSchemaSpec
- Hydra.Workflow: instance GHC.Classes.Eq Hydra.Workflow.SchemaSpec
- Hydra.Workflow: instance GHC.Classes.Eq Hydra.Workflow.TransformWorkflow
- Hydra.Workflow: instance GHC.Classes.Ord Hydra.Workflow.HydraSchemaSpec
- Hydra.Workflow: instance GHC.Classes.Ord Hydra.Workflow.SchemaSpec
- Hydra.Workflow: instance GHC.Classes.Ord Hydra.Workflow.TransformWorkflow
- Hydra.Workflow: instance GHC.Read.Read Hydra.Workflow.HydraSchemaSpec
- Hydra.Workflow: instance GHC.Read.Read Hydra.Workflow.SchemaSpec
- Hydra.Workflow: instance GHC.Read.Read Hydra.Workflow.TransformWorkflow
- Hydra.Workflow: instance GHC.Show.Show Hydra.Workflow.HydraSchemaSpec
- Hydra.Workflow: instance GHC.Show.Show Hydra.Workflow.SchemaSpec
- Hydra.Workflow: instance GHC.Show.Show Hydra.Workflow.TransformWorkflow
+ Hydra.Adapt: adaptDataGraph :: LanguageConstraints -> Bool -> [Binding] -> Context -> Graph -> Either String (Graph, [Binding])
+ Hydra.Adapt: adaptFloatType :: LanguageConstraints -> FloatType -> Maybe FloatType
+ Hydra.Adapt: adaptGraphSchema :: Ord t0 => LanguageConstraints -> Map LiteralType LiteralType -> Map t0 Type -> Either String (Map t0 Type)
+ Hydra.Adapt: adaptIntegerType :: LanguageConstraints -> IntegerType -> Maybe IntegerType
+ Hydra.Adapt: adaptLambdaDomains :: LanguageConstraints -> Map LiteralType LiteralType -> (t0 -> Either String Term) -> t0 -> Either String Term
+ Hydra.Adapt: adaptLiteral :: LiteralType -> Literal -> Literal
+ Hydra.Adapt: adaptLiteralType :: LanguageConstraints -> LiteralType -> Maybe LiteralType
+ Hydra.Adapt: adaptLiteralTypesMap :: LanguageConstraints -> Map LiteralType LiteralType
+ Hydra.Adapt: adaptLiteralValue :: Ord t0 => Map t0 LiteralType -> t0 -> Literal -> Literal
+ Hydra.Adapt: adaptNestedTypes :: LanguageConstraints -> Map LiteralType LiteralType -> (t0 -> Either String Term) -> t0 -> Either String Term
+ Hydra.Adapt: adaptPrimitive :: LanguageConstraints -> Map LiteralType LiteralType -> Primitive -> Either String Primitive
+ Hydra.Adapt: adaptTerm :: LanguageConstraints -> Map LiteralType LiteralType -> Context -> Graph -> Term -> Either String Term
+ Hydra.Adapt: adaptTermForLanguage :: Language -> Context -> Graph -> Term -> Either String Term
+ Hydra.Adapt: adaptType :: LanguageConstraints -> Map LiteralType LiteralType -> Type -> Either String Type
+ Hydra.Adapt: adaptTypeForLanguage :: Language -> Type -> Either String Type
+ Hydra.Adapt: adaptTypeScheme :: LanguageConstraints -> Map LiteralType LiteralType -> TypeScheme -> Either String TypeScheme
+ Hydra.Adapt: composeCoders :: Coder t0 t1 -> Coder t1 t2 -> Coder t0 t2
+ Hydra.Adapt: dataGraphToDefinitions :: LanguageConstraints -> Bool -> Bool -> Bool -> Bool -> [Binding] -> Graph -> [Namespace] -> Context -> Either String (Graph, [[TermDefinition]])
+ Hydra.Adapt: literalTypeSupported :: LanguageConstraints -> LiteralType -> Bool
+ Hydra.Adapt: prepareFloatType :: FloatType -> (FloatType, (FloatValue -> FloatValue, Set String))
+ Hydra.Adapt: prepareIntegerType :: IntegerType -> (IntegerType, (IntegerValue -> IntegerValue, Set String))
+ Hydra.Adapt: prepareLiteralType :: LiteralType -> (LiteralType, (Literal -> Literal, Set String))
+ Hydra.Adapt: prepareSame :: Ord t2 => t0 -> (t0, (t1 -> t1, Set t2))
+ Hydra.Adapt: prepareType :: t0 -> Type -> (Type, (Term -> Term, Set String))
+ Hydra.Adapt: pushTypeAppsInward :: Term -> Term
+ Hydra.Adapt: schemaGraphToDefinitions :: LanguageConstraints -> Graph -> [[Name]] -> Context -> Either String (Map Name Type, [[TypeDefinition]])
+ Hydra.Adapt: simpleLanguageAdapter :: Language -> t0 -> Graph -> Type -> Either String (Adapter Type Type Term Term)
+ Hydra.Adapt: termAlternatives :: Context -> Graph -> Term -> Either String [Term]
+ Hydra.Adapt: typeAlternatives :: Type -> [Type]
+ Hydra.Ast: ExprSeq :: SeqExpr -> Expr
+ Hydra.Ast: SeqExpr :: Op -> [Expr] -> SeqExpr
+ Hydra.Ast: [seqExprElements] :: SeqExpr -> [Expr]
+ Hydra.Ast: [seqExprOp] :: SeqExpr -> Op
+ Hydra.Ast: _Expr_seq :: Name
+ Hydra.Ast: _SeqExpr :: Name
+ Hydra.Ast: _SeqExpr_elements :: Name
+ Hydra.Ast: _SeqExpr_op :: Name
+ Hydra.Ast: data SeqExpr
+ Hydra.Ast: instance GHC.Classes.Eq Hydra.Ast.SeqExpr
+ Hydra.Ast: instance GHC.Classes.Ord Hydra.Ast.SeqExpr
+ Hydra.Ast: instance GHC.Read.Read Hydra.Ast.SeqExpr
+ Hydra.Ast: instance GHC.Show.Show Hydra.Ast.SeqExpr
+ Hydra.CoderUtils: commentsFromBinding :: Context -> Graph -> Binding -> Either (InContext Error) (Maybe String)
+ Hydra.CoderUtils: nameToFilePath :: CaseConvention -> CaseConvention -> FileExtension -> Name -> String
+ Hydra.CoderUtils: reorderDefs :: [Definition] -> [Definition]
+ Hydra.CoderUtils: typeOfTerm :: Context -> Graph -> Term -> Either (InContext Error) Type
+ Hydra.Context: Context :: [String] -> [String] -> Map Name Term -> Context
+ Hydra.Context: InContext :: e -> Context -> InContext e
+ Hydra.Context: [contextMessages] :: Context -> [String]
+ Hydra.Context: [contextOther] :: Context -> Map Name Term
+ Hydra.Context: [contextTrace] :: Context -> [String]
+ Hydra.Context: [inContextContext] :: InContext e -> Context
+ Hydra.Context: [inContextObject] :: InContext e -> e
+ Hydra.Context: _Context :: Name
+ Hydra.Context: _Context_messages :: Name
+ Hydra.Context: _Context_other :: Name
+ Hydra.Context: _Context_trace :: Name
+ Hydra.Context: _InContext :: Name
+ Hydra.Context: _InContext_context :: Name
+ Hydra.Context: _InContext_object :: Name
+ Hydra.Context: data Context
+ Hydra.Context: data InContext e
+ Hydra.Context: instance GHC.Classes.Eq Hydra.Context.Context
+ Hydra.Context: instance GHC.Classes.Eq e => GHC.Classes.Eq (Hydra.Context.InContext e)
+ Hydra.Context: instance GHC.Classes.Ord Hydra.Context.Context
+ Hydra.Context: instance GHC.Classes.Ord e => GHC.Classes.Ord (Hydra.Context.InContext e)
+ Hydra.Context: instance GHC.Read.Read Hydra.Context.Context
+ Hydra.Context: instance GHC.Read.Read e => GHC.Read.Read (Hydra.Context.InContext e)
+ Hydra.Context: instance GHC.Show.Show Hydra.Context.Context
+ Hydra.Context: instance GHC.Show.Show e => GHC.Show.Show (Hydra.Context.InContext e)
+ Hydra.Core: TypeVoid :: Type
+ Hydra.Core: _Type_void :: Name
+ Hydra.Decode.Ast: seqExpr :: Graph -> Term -> Either DecodingError SeqExpr
+ Hydra.Decode.Context: context :: Graph -> Term -> Either DecodingError Context
+ Hydra.Decode.Context: inContext :: (Graph -> Term -> Either DecodingError t0) -> Graph -> Term -> Either DecodingError (InContext t0)
+ Hydra.Decode.Error.Checking: checkingError :: Graph -> Term -> Either DecodingError CheckingError
+ Hydra.Decode.Error.Checking: incorrectUnificationError :: Graph -> Term -> Either DecodingError IncorrectUnificationError
+ Hydra.Decode.Error.Checking: notAForallTypeError :: Graph -> Term -> Either DecodingError NotAForallTypeError
+ Hydra.Decode.Error.Checking: notAFunctionTypeError :: Graph -> Term -> Either DecodingError NotAFunctionTypeError
+ Hydra.Decode.Error.Checking: typeArityMismatchError :: Graph -> Term -> Either DecodingError TypeArityMismatchError
+ Hydra.Decode.Error.Checking: typeMismatchError :: Graph -> Term -> Either DecodingError TypeMismatchError
+ Hydra.Decode.Error.Checking: unboundTypeVariablesError :: Graph -> Term -> Either DecodingError UnboundTypeVariablesError
+ Hydra.Decode.Error.Checking: unequalTypesError :: Graph -> Term -> Either DecodingError UnequalTypesError
+ Hydra.Decode.Error.Checking: unsupportedTermVariantError :: Graph -> Term -> Either DecodingError UnsupportedTermVariantError
+ Hydra.Decode.Error.Checking: untypedLambdaError :: Graph -> Term -> Either DecodingError UntypedLambdaError
+ Hydra.Decode.Error.Checking: untypedLetBindingError :: Graph -> Term -> Either DecodingError UntypedLetBindingError
+ Hydra.Decode.Error.Core: constantConditionError :: Graph -> Term -> Either DecodingError ConstantConditionError
+ Hydra.Decode.Error.Core: duplicateBindingError :: Graph -> Term -> Either DecodingError DuplicateBindingError
+ Hydra.Decode.Error.Core: duplicateFieldError :: Graph -> Term -> Either DecodingError DuplicateFieldError
+ Hydra.Decode.Error.Core: duplicateRecordTypeFieldNamesError :: Graph -> Term -> Either DecodingError DuplicateRecordTypeFieldNamesError
+ Hydra.Decode.Error.Core: duplicateUnionTypeFieldNamesError :: Graph -> Term -> Either DecodingError DuplicateUnionTypeFieldNamesError
+ Hydra.Decode.Error.Core: emptyCaseStatementError :: Graph -> Term -> Either DecodingError EmptyCaseStatementError
+ Hydra.Decode.Error.Core: emptyLetBindingsError :: Graph -> Term -> Either DecodingError EmptyLetBindingsError
+ Hydra.Decode.Error.Core: emptyRecordTypeError :: Graph -> Term -> Either DecodingError EmptyRecordTypeError
+ Hydra.Decode.Error.Core: emptyTermAnnotationError :: Graph -> Term -> Either DecodingError EmptyTermAnnotationError
+ Hydra.Decode.Error.Core: emptyTypeAnnotationError :: Graph -> Term -> Either DecodingError EmptyTypeAnnotationError
+ Hydra.Decode.Error.Core: emptyTypeNameInTermError :: Graph -> Term -> Either DecodingError EmptyTypeNameInTermError
+ Hydra.Decode.Error.Core: emptyUnionTypeError :: Graph -> Term -> Either DecodingError EmptyUnionTypeError
+ Hydra.Decode.Error.Core: invalidForallParameterNameError :: Graph -> Term -> Either DecodingError InvalidForallParameterNameError
+ Hydra.Decode.Error.Core: invalidLambdaParameterNameError :: Graph -> Term -> Either DecodingError InvalidLambdaParameterNameError
+ Hydra.Decode.Error.Core: invalidLetBindingNameError :: Graph -> Term -> Either DecodingError InvalidLetBindingNameError
+ Hydra.Decode.Error.Core: invalidTermError :: Graph -> Term -> Either DecodingError InvalidTermError
+ Hydra.Decode.Error.Core: invalidTypeError :: Graph -> Term -> Either DecodingError InvalidTypeError
+ Hydra.Decode.Error.Core: invalidTypeLambdaParameterNameError :: Graph -> Term -> Either DecodingError InvalidTypeLambdaParameterNameError
+ Hydra.Decode.Error.Core: invalidTypeSchemeVariableNameError :: Graph -> Term -> Either DecodingError InvalidTypeSchemeVariableNameError
+ Hydra.Decode.Error.Core: nestedTermAnnotationError :: Graph -> Term -> Either DecodingError NestedTermAnnotationError
+ Hydra.Decode.Error.Core: nestedTypeAnnotationError :: Graph -> Term -> Either DecodingError NestedTypeAnnotationError
+ Hydra.Decode.Error.Core: nonComparableMapKeyTypeError :: Graph -> Term -> Either DecodingError NonComparableMapKeyTypeError
+ Hydra.Decode.Error.Core: nonComparableSetElementTypeError :: Graph -> Term -> Either DecodingError NonComparableSetElementTypeError
+ Hydra.Decode.Error.Core: redundantWrapUnwrapError :: Graph -> Term -> Either DecodingError RedundantWrapUnwrapError
+ Hydra.Decode.Error.Core: selfApplicationError :: Graph -> Term -> Either DecodingError SelfApplicationError
+ Hydra.Decode.Error.Core: singleVariantUnionError :: Graph -> Term -> Either DecodingError SingleVariantUnionError
+ Hydra.Decode.Error.Core: termVariableShadowingError :: Graph -> Term -> Either DecodingError TermVariableShadowingError
+ Hydra.Decode.Error.Core: typeVariableShadowingInForallError :: Graph -> Term -> Either DecodingError TypeVariableShadowingInForallError
+ Hydra.Decode.Error.Core: typeVariableShadowingInTypeLambdaError :: Graph -> Term -> Either DecodingError TypeVariableShadowingInTypeLambdaError
+ Hydra.Decode.Error.Core: undefinedFieldError :: Graph -> Term -> Either DecodingError UndefinedFieldError
+ Hydra.Decode.Error.Core: undefinedTermVariableError :: Graph -> Term -> Either DecodingError UndefinedTermVariableError
+ Hydra.Decode.Error.Core: undefinedTypeVariableError :: Graph -> Term -> Either DecodingError UndefinedTypeVariableError
+ Hydra.Decode.Error.Core: undefinedTypeVariableInBindingTypeError :: Graph -> Term -> Either DecodingError UndefinedTypeVariableInBindingTypeError
+ Hydra.Decode.Error.Core: undefinedTypeVariableInLambdaDomainError :: Graph -> Term -> Either DecodingError UndefinedTypeVariableInLambdaDomainError
+ Hydra.Decode.Error.Core: undefinedTypeVariableInTypeApplicationError :: Graph -> Term -> Either DecodingError UndefinedTypeVariableInTypeApplicationError
+ Hydra.Decode.Error.Core: unexpectedTermVariantError :: Graph -> Term -> Either DecodingError UnexpectedTermVariantError
+ Hydra.Decode.Error.Core: unexpectedTypeVariantError :: Graph -> Term -> Either DecodingError UnexpectedTypeVariantError
+ Hydra.Decode.Error.Core: unknownPrimitiveNameError :: Graph -> Term -> Either DecodingError UnknownPrimitiveNameError
+ Hydra.Decode.Error.Core: unnecessaryIdentityApplicationError :: Graph -> Term -> Either DecodingError UnnecessaryIdentityApplicationError
+ Hydra.Decode.Error.Core: untypedTermVariableError :: Graph -> Term -> Either DecodingError UntypedTermVariableError
+ Hydra.Decode.Error.Core: voidInNonBottomPositionError :: Graph -> Term -> Either DecodingError VoidInNonBottomPositionError
+ Hydra.Decode.Errors: decodingError :: Graph -> Term -> Either DecodingError DecodingError
+ Hydra.Decode.Errors: error :: Graph -> Term -> Either DecodingError Error
+ Hydra.Decode.Errors: otherError :: Graph -> Term -> Either DecodingError OtherError
+ Hydra.Decode.Errors: unificationError :: Graph -> Term -> Either DecodingError UnificationError
+ Hydra.Decode.Paths: subtermEdge :: Graph -> Term -> Either DecodingError SubtermEdge
+ Hydra.Decode.Paths: subtermGraph :: Graph -> Term -> Either DecodingError SubtermGraph
+ Hydra.Decode.Paths: subtermNode :: Graph -> Term -> Either DecodingError SubtermNode
+ Hydra.Decode.Paths: subtermPath :: Graph -> Term -> Either DecodingError SubtermPath
+ Hydra.Decode.Paths: subtermStep :: Graph -> Term -> Either DecodingError SubtermStep
+ Hydra.Decode.Paths: subtypeEdge :: Graph -> Term -> Either DecodingError SubtypeEdge
+ Hydra.Decode.Paths: subtypeGraph :: Graph -> Term -> Either DecodingError SubtypeGraph
+ Hydra.Decode.Paths: subtypeNode :: Graph -> Term -> Either DecodingError SubtypeNode
+ Hydra.Decode.Paths: subtypePath :: Graph -> Term -> Either DecodingError SubtypePath
+ Hydra.Decode.Paths: subtypeStep :: Graph -> Term -> Either DecodingError SubtypeStep
+ Hydra.Decode.Query: pathEquation :: Graph -> Term -> Either DecodingError PathEquation
+ Hydra.Decode.Query: patternImplication :: Graph -> Term -> Either DecodingError PatternImplication
+ Hydra.Decode.Testing: validateCoreTermTestCase :: Graph -> Term -> Either DecodingError ValidateCoreTermTestCase
+ Hydra.Decoding: decodeRecordTypeImpl :: Name -> [FieldType] -> Term
+ Hydra.Decoding: decodeRecordTypeNamed :: Name -> [FieldType] -> Term
+ Hydra.Decoding: decodeTypeNamed :: Name -> Type -> Term
+ Hydra.Decoding: decodeUnionTypeNamed :: Name -> [FieldType] -> Term
+ Hydra.Decoding: decodeWrappedTypeNamed :: Name -> Type -> Term
+ Hydra.Decoding: decoderFullResultTypeNamed :: Name -> Type -> Type
+ Hydra.Decoding: decoderTypeNamed :: Name -> Type -> Type
+ Hydra.Decoding: decoderTypeSchemeNamed :: Name -> Type -> TypeScheme
+ Hydra.Dsl.Ast: associativityBoth :: TTerm Associativity
+ Hydra.Dsl.Ast: associativityLeft :: TTerm Associativity
+ Hydra.Dsl.Ast: associativityNone :: TTerm Associativity
+ Hydra.Dsl.Ast: associativityRight :: TTerm Associativity
+ Hydra.Dsl.Ast: blockStyle :: TTerm (Maybe String) -> TTerm Bool -> TTerm Bool -> TTerm BlockStyle
+ Hydra.Dsl.Ast: blockStyleIndent :: TTerm BlockStyle -> TTerm (Maybe String)
+ Hydra.Dsl.Ast: blockStyleNewlineAfterContent :: TTerm BlockStyle -> TTerm Bool
+ Hydra.Dsl.Ast: blockStyleNewlineBeforeContent :: TTerm BlockStyle -> TTerm Bool
+ Hydra.Dsl.Ast: blockStyleWithIndent :: TTerm BlockStyle -> TTerm (Maybe String) -> TTerm BlockStyle
+ Hydra.Dsl.Ast: blockStyleWithNewlineAfterContent :: TTerm BlockStyle -> TTerm Bool -> TTerm BlockStyle
+ Hydra.Dsl.Ast: blockStyleWithNewlineBeforeContent :: TTerm BlockStyle -> TTerm Bool -> TTerm BlockStyle
+ Hydra.Dsl.Ast: bracketExpr :: TTerm Brackets -> TTerm Expr -> TTerm BlockStyle -> TTerm BracketExpr
+ Hydra.Dsl.Ast: bracketExprBrackets :: TTerm BracketExpr -> TTerm Brackets
+ Hydra.Dsl.Ast: bracketExprEnclosed :: TTerm BracketExpr -> TTerm Expr
+ Hydra.Dsl.Ast: bracketExprStyle :: TTerm BracketExpr -> TTerm BlockStyle
+ Hydra.Dsl.Ast: bracketExprWithBrackets :: TTerm BracketExpr -> TTerm Brackets -> TTerm BracketExpr
+ Hydra.Dsl.Ast: bracketExprWithEnclosed :: TTerm BracketExpr -> TTerm Expr -> TTerm BracketExpr
+ Hydra.Dsl.Ast: bracketExprWithStyle :: TTerm BracketExpr -> TTerm BlockStyle -> TTerm BracketExpr
+ Hydra.Dsl.Ast: brackets :: TTerm Symbol -> TTerm Symbol -> TTerm Brackets
+ Hydra.Dsl.Ast: bracketsClose :: TTerm Brackets -> TTerm Symbol
+ Hydra.Dsl.Ast: bracketsOpen :: TTerm Brackets -> TTerm Symbol
+ Hydra.Dsl.Ast: bracketsWithClose :: TTerm Brackets -> TTerm Symbol -> TTerm Brackets
+ Hydra.Dsl.Ast: bracketsWithOpen :: TTerm Brackets -> TTerm Symbol -> TTerm Brackets
+ Hydra.Dsl.Ast: exprBrackets :: TTerm BracketExpr -> TTerm Expr
+ Hydra.Dsl.Ast: exprConst :: TTerm Symbol -> TTerm Expr
+ Hydra.Dsl.Ast: exprIndent :: TTerm IndentedExpression -> TTerm Expr
+ Hydra.Dsl.Ast: exprOp :: TTerm OpExpr -> TTerm Expr
+ Hydra.Dsl.Ast: exprSeq :: TTerm SeqExpr -> TTerm Expr
+ Hydra.Dsl.Ast: indentStyleAllLines :: TTerm String -> TTerm IndentStyle
+ Hydra.Dsl.Ast: indentStyleSubsequentLines :: TTerm String -> TTerm IndentStyle
+ Hydra.Dsl.Ast: indentedExpression :: TTerm IndentStyle -> TTerm Expr -> TTerm IndentedExpression
+ Hydra.Dsl.Ast: indentedExpressionExpr :: TTerm IndentedExpression -> TTerm Expr
+ Hydra.Dsl.Ast: indentedExpressionStyle :: TTerm IndentedExpression -> TTerm IndentStyle
+ Hydra.Dsl.Ast: indentedExpressionWithExpr :: TTerm IndentedExpression -> TTerm Expr -> TTerm IndentedExpression
+ Hydra.Dsl.Ast: indentedExpressionWithStyle :: TTerm IndentedExpression -> TTerm IndentStyle -> TTerm IndentedExpression
+ Hydra.Dsl.Ast: op :: TTerm Symbol -> TTerm Padding -> TTerm Precedence -> TTerm Associativity -> TTerm Op
+ Hydra.Dsl.Ast: opAssociativity :: TTerm Op -> TTerm Associativity
+ Hydra.Dsl.Ast: opExpr :: TTerm Op -> TTerm Expr -> TTerm Expr -> TTerm OpExpr
+ Hydra.Dsl.Ast: opExprLhs :: TTerm OpExpr -> TTerm Expr
+ Hydra.Dsl.Ast: opExprOp :: TTerm OpExpr -> TTerm Op
+ Hydra.Dsl.Ast: opExprRhs :: TTerm OpExpr -> TTerm Expr
+ Hydra.Dsl.Ast: opExprWithLhs :: TTerm OpExpr -> TTerm Expr -> TTerm OpExpr
+ Hydra.Dsl.Ast: opExprWithOp :: TTerm OpExpr -> TTerm Op -> TTerm OpExpr
+ Hydra.Dsl.Ast: opExprWithRhs :: TTerm OpExpr -> TTerm Expr -> TTerm OpExpr
+ Hydra.Dsl.Ast: opPadding :: TTerm Op -> TTerm Padding
+ Hydra.Dsl.Ast: opPrecedence :: TTerm Op -> TTerm Precedence
+ Hydra.Dsl.Ast: opSymbol :: TTerm Op -> TTerm Symbol
+ Hydra.Dsl.Ast: opWithAssociativity :: TTerm Op -> TTerm Associativity -> TTerm Op
+ Hydra.Dsl.Ast: opWithPadding :: TTerm Op -> TTerm Padding -> TTerm Op
+ Hydra.Dsl.Ast: opWithPrecedence :: TTerm Op -> TTerm Precedence -> TTerm Op
+ Hydra.Dsl.Ast: opWithSymbol :: TTerm Op -> TTerm Symbol -> TTerm Op
+ Hydra.Dsl.Ast: padding :: TTerm Ws -> TTerm Ws -> TTerm Padding
+ Hydra.Dsl.Ast: paddingLeft :: TTerm Padding -> TTerm Ws
+ Hydra.Dsl.Ast: paddingRight :: TTerm Padding -> TTerm Ws
+ Hydra.Dsl.Ast: paddingWithLeft :: TTerm Padding -> TTerm Ws -> TTerm Padding
+ Hydra.Dsl.Ast: paddingWithRight :: TTerm Padding -> TTerm Ws -> TTerm Padding
+ Hydra.Dsl.Ast: precedence :: TTerm Int -> TTerm Precedence
+ Hydra.Dsl.Ast: seqExpr :: TTerm Op -> TTerm [Expr] -> TTerm SeqExpr
+ Hydra.Dsl.Ast: seqExprElements :: TTerm SeqExpr -> TTerm [Expr]
+ Hydra.Dsl.Ast: seqExprOp :: TTerm SeqExpr -> TTerm Op
+ Hydra.Dsl.Ast: seqExprWithElements :: TTerm SeqExpr -> TTerm [Expr] -> TTerm SeqExpr
+ Hydra.Dsl.Ast: seqExprWithOp :: TTerm SeqExpr -> TTerm Op -> TTerm SeqExpr
+ Hydra.Dsl.Ast: symbol :: TTerm String -> TTerm Symbol
+ Hydra.Dsl.Ast: unPrecedence :: TTerm Precedence -> TTerm Int
+ Hydra.Dsl.Ast: unSymbol :: TTerm Symbol -> TTerm String
+ Hydra.Dsl.Ast: wsBreak :: TTerm Ws
+ Hydra.Dsl.Ast: wsBreakAndIndent :: TTerm String -> TTerm Ws
+ Hydra.Dsl.Ast: wsDoubleBreak :: TTerm Ws
+ Hydra.Dsl.Ast: wsNone :: TTerm Ws
+ Hydra.Dsl.Ast: wsSpace :: TTerm Ws
+ Hydra.Dsl.Bootstrap: toTypeDef :: Binding -> Definition
+ Hydra.Dsl.Classes: typeClassEquality :: TTerm TypeClass
+ Hydra.Dsl.Classes: typeClassOrdering :: TTerm TypeClass
+ Hydra.Dsl.Coders: adapterContext :: TTerm Graph -> TTerm Language -> TTerm (Map Name (Adapter Type Type Term Term)) -> TTerm AdapterContext
+ Hydra.Dsl.Coders: adapterContextAdapters :: TTerm AdapterContext -> TTerm (Map Name (Adapter Type Type Term Term))
+ Hydra.Dsl.Coders: adapterContextGraph :: TTerm AdapterContext -> TTerm Graph
+ Hydra.Dsl.Coders: adapterContextLanguage :: TTerm AdapterContext -> TTerm Language
+ Hydra.Dsl.Coders: adapterContextWithAdapters :: TTerm AdapterContext -> TTerm (Map Name (Adapter Type Type Term Term)) -> TTerm AdapterContext
+ Hydra.Dsl.Coders: adapterContextWithGraph :: TTerm AdapterContext -> TTerm Graph -> TTerm AdapterContext
+ Hydra.Dsl.Coders: adapterContextWithLanguage :: TTerm AdapterContext -> TTerm Language -> TTerm AdapterContext
+ Hydra.Dsl.Coders: coderDirectionDecode :: TTerm CoderDirection
+ Hydra.Dsl.Coders: coderDirectionEncode :: TTerm CoderDirection
+ Hydra.Dsl.Coders: language :: TTerm LanguageName -> TTerm LanguageConstraints -> TTerm Language
+ Hydra.Dsl.Coders: languageConstraints :: TTerm Language -> TTerm LanguageConstraints
+ Hydra.Dsl.Coders: languageConstraintsEliminationVariants :: TTerm LanguageConstraints -> TTerm (Set EliminationVariant)
+ Hydra.Dsl.Coders: languageConstraintsFloatTypes :: TTerm LanguageConstraints -> TTerm (Set FloatType)
+ Hydra.Dsl.Coders: languageConstraintsFunctionVariants :: TTerm LanguageConstraints -> TTerm (Set FunctionVariant)
+ Hydra.Dsl.Coders: languageConstraintsIntegerTypes :: TTerm LanguageConstraints -> TTerm (Set IntegerType)
+ Hydra.Dsl.Coders: languageConstraintsLiteralVariants :: TTerm LanguageConstraints -> TTerm (Set LiteralVariant)
+ Hydra.Dsl.Coders: languageConstraintsTermVariants :: TTerm LanguageConstraints -> TTerm (Set TermVariant)
+ Hydra.Dsl.Coders: languageConstraintsTypeVariants :: TTerm LanguageConstraints -> TTerm (Set TypeVariant)
+ Hydra.Dsl.Coders: languageConstraintsTypes :: TTerm LanguageConstraints -> TTerm (Type -> Bool)
+ Hydra.Dsl.Coders: languageConstraintsWithEliminationVariants :: TTerm LanguageConstraints -> TTerm (Set EliminationVariant) -> TTerm LanguageConstraints
+ Hydra.Dsl.Coders: languageConstraintsWithFloatTypes :: TTerm LanguageConstraints -> TTerm (Set FloatType) -> TTerm LanguageConstraints
+ Hydra.Dsl.Coders: languageConstraintsWithFunctionVariants :: TTerm LanguageConstraints -> TTerm (Set FunctionVariant) -> TTerm LanguageConstraints
+ Hydra.Dsl.Coders: languageConstraintsWithIntegerTypes :: TTerm LanguageConstraints -> TTerm (Set IntegerType) -> TTerm LanguageConstraints
+ Hydra.Dsl.Coders: languageConstraintsWithLiteralVariants :: TTerm LanguageConstraints -> TTerm (Set LiteralVariant) -> TTerm LanguageConstraints
+ Hydra.Dsl.Coders: languageConstraintsWithTermVariants :: TTerm LanguageConstraints -> TTerm (Set TermVariant) -> TTerm LanguageConstraints
+ Hydra.Dsl.Coders: languageConstraintsWithTypeVariants :: TTerm LanguageConstraints -> TTerm (Set TypeVariant) -> TTerm LanguageConstraints
+ Hydra.Dsl.Coders: languageConstraintsWithTypes :: TTerm LanguageConstraints -> TTerm (Type -> Bool) -> TTerm LanguageConstraints
+ Hydra.Dsl.Coders: languageConstraints_ :: TTerm (Set EliminationVariant) -> TTerm (Set LiteralVariant) -> TTerm (Set FloatType) -> TTerm (Set FunctionVariant) -> TTerm (Set IntegerType) -> TTerm (Set TermVariant) -> TTerm (Set TypeVariant) -> TTerm (Type -> Bool) -> TTerm LanguageConstraints
+ Hydra.Dsl.Coders: languageName :: TTerm Language -> TTerm LanguageName
+ Hydra.Dsl.Coders: languageName_ :: TTerm String -> TTerm LanguageName
+ Hydra.Dsl.Coders: languageWithConstraints :: TTerm Language -> TTerm LanguageConstraints -> TTerm Language
+ Hydra.Dsl.Coders: languageWithName :: TTerm Language -> TTerm LanguageName -> TTerm Language
+ Hydra.Dsl.Coders: traversalOrderPost :: TTerm TraversalOrder
+ Hydra.Dsl.Coders: traversalOrderPre :: TTerm TraversalOrder
+ Hydra.Dsl.Coders: unLanguageName :: TTerm LanguageName -> TTerm String
+ Hydra.Dsl.Context: context :: TTerm [String] -> TTerm [String] -> TTerm (Map Name Term) -> TTerm Context
+ Hydra.Dsl.Context: contextMessages :: TTerm Context -> TTerm [String]
+ Hydra.Dsl.Context: contextOther :: TTerm Context -> TTerm (Map Name Term)
+ Hydra.Dsl.Context: contextTrace :: TTerm Context -> TTerm [String]
+ Hydra.Dsl.Context: contextWithMessages :: TTerm Context -> TTerm [String] -> TTerm Context
+ Hydra.Dsl.Context: contextWithOther :: TTerm Context -> TTerm (Map Name Term) -> TTerm Context
+ Hydra.Dsl.Context: contextWithTrace :: TTerm Context -> TTerm [String] -> TTerm Context
+ Hydra.Dsl.Context: inContext :: TTerm e -> TTerm Context -> TTerm (InContext e)
+ Hydra.Dsl.Context: inContextContext :: TTerm (InContext e) -> TTerm Context
+ Hydra.Dsl.Context: inContextObject :: TTerm (InContext e) -> TTerm e
+ Hydra.Dsl.Context: inContextWithContext :: TTerm (InContext e) -> TTerm Context -> TTerm (InContext e)
+ Hydra.Dsl.Context: inContextWithObject :: TTerm (InContext e) -> TTerm e -> TTerm (InContext e)
+ Hydra.Dsl.Core: annotatedTerm :: TTerm Term -> TTerm (Map Name Term) -> TTerm AnnotatedTerm
+ Hydra.Dsl.Core: annotatedTermAnnotation :: TTerm AnnotatedTerm -> TTerm (Map Name Term)
+ Hydra.Dsl.Core: annotatedTermBody :: TTerm AnnotatedTerm -> TTerm Term
+ Hydra.Dsl.Core: annotatedTermWithAnnotation :: TTerm AnnotatedTerm -> TTerm (Map Name Term) -> TTerm AnnotatedTerm
+ Hydra.Dsl.Core: annotatedTermWithBody :: TTerm AnnotatedTerm -> TTerm Term -> TTerm AnnotatedTerm
+ Hydra.Dsl.Core: annotatedType :: TTerm Type -> TTerm (Map Name Term) -> TTerm AnnotatedType
+ Hydra.Dsl.Core: annotatedTypeAnnotation :: TTerm AnnotatedType -> TTerm (Map Name Term)
+ Hydra.Dsl.Core: annotatedTypeBody :: TTerm AnnotatedType -> TTerm Type
+ Hydra.Dsl.Core: annotatedTypeWithAnnotation :: TTerm AnnotatedType -> TTerm (Map Name Term) -> TTerm AnnotatedType
+ Hydra.Dsl.Core: annotatedTypeWithBody :: TTerm AnnotatedType -> TTerm Type -> TTerm AnnotatedType
+ Hydra.Dsl.Core: application :: TTerm Term -> TTerm Term -> TTerm Application
+ Hydra.Dsl.Core: applicationArgument :: TTerm Application -> TTerm Term
+ Hydra.Dsl.Core: applicationFunction :: TTerm Application -> TTerm Term
+ Hydra.Dsl.Core: applicationType :: TTerm Type -> TTerm Type -> TTerm ApplicationType
+ Hydra.Dsl.Core: applicationTypeArgument :: TTerm ApplicationType -> TTerm Type
+ Hydra.Dsl.Core: applicationTypeFunction :: TTerm ApplicationType -> TTerm Type
+ Hydra.Dsl.Core: applicationTypeWithArgument :: TTerm ApplicationType -> TTerm Type -> TTerm ApplicationType
+ Hydra.Dsl.Core: applicationTypeWithFunction :: TTerm ApplicationType -> TTerm Type -> TTerm ApplicationType
+ Hydra.Dsl.Core: applicationWithArgument :: TTerm Application -> TTerm Term -> TTerm Application
+ Hydra.Dsl.Core: applicationWithFunction :: TTerm Application -> TTerm Term -> TTerm Application
+ Hydra.Dsl.Core: binding :: TTerm Name -> TTerm Term -> TTerm (Maybe TypeScheme) -> TTerm Binding
+ Hydra.Dsl.Core: bindingName :: TTerm Binding -> TTerm Name
+ Hydra.Dsl.Core: bindingTerm :: TTerm Binding -> TTerm Term
+ Hydra.Dsl.Core: bindingType :: TTerm Binding -> TTerm (Maybe TypeScheme)
+ Hydra.Dsl.Core: bindingWithName :: TTerm Binding -> TTerm Name -> TTerm Binding
+ Hydra.Dsl.Core: bindingWithTerm :: TTerm Binding -> TTerm Term -> TTerm Binding
+ Hydra.Dsl.Core: bindingWithType :: TTerm Binding -> TTerm (Maybe TypeScheme) -> TTerm Binding
+ Hydra.Dsl.Core: caseStatement :: TTerm Name -> TTerm (Maybe Term) -> TTerm [Field] -> TTerm CaseStatement
+ Hydra.Dsl.Core: caseStatementCases :: TTerm CaseStatement -> TTerm [Field]
+ Hydra.Dsl.Core: caseStatementDefault :: TTerm CaseStatement -> TTerm (Maybe Term)
+ Hydra.Dsl.Core: caseStatementTypeName :: TTerm CaseStatement -> TTerm Name
+ Hydra.Dsl.Core: caseStatementWithCases :: TTerm CaseStatement -> TTerm [Field] -> TTerm CaseStatement
+ Hydra.Dsl.Core: caseStatementWithDefault :: TTerm CaseStatement -> TTerm (Maybe Term) -> TTerm CaseStatement
+ Hydra.Dsl.Core: caseStatementWithTypeName :: TTerm CaseStatement -> TTerm Name -> TTerm CaseStatement
+ Hydra.Dsl.Core: eitherType :: TTerm Type -> TTerm Type -> TTerm EitherType
+ Hydra.Dsl.Core: eitherTypeLeft :: TTerm EitherType -> TTerm Type
+ Hydra.Dsl.Core: eitherTypeRight :: TTerm EitherType -> TTerm Type
+ Hydra.Dsl.Core: eitherTypeWithLeft :: TTerm EitherType -> TTerm Type -> TTerm EitherType
+ Hydra.Dsl.Core: eitherTypeWithRight :: TTerm EitherType -> TTerm Type -> TTerm EitherType
+ Hydra.Dsl.Core: eliminationRecord :: TTerm Projection -> TTerm Elimination
+ Hydra.Dsl.Core: eliminationUnion :: TTerm CaseStatement -> TTerm Elimination
+ Hydra.Dsl.Core: eliminationWrap :: TTerm Name -> TTerm Elimination
+ Hydra.Dsl.Core: field :: TTerm Name -> TTerm Term -> TTerm Field
+ Hydra.Dsl.Core: fieldName :: TTerm Field -> TTerm Name
+ Hydra.Dsl.Core: fieldTerm :: TTerm Field -> TTerm Term
+ Hydra.Dsl.Core: fieldType :: TTerm Name -> TTerm Type -> TTerm FieldType
+ Hydra.Dsl.Core: fieldTypeName :: TTerm FieldType -> TTerm Name
+ Hydra.Dsl.Core: fieldTypeType :: TTerm FieldType -> TTerm Type
+ Hydra.Dsl.Core: fieldTypeWithName :: TTerm FieldType -> TTerm Name -> TTerm FieldType
+ Hydra.Dsl.Core: fieldTypeWithType :: TTerm FieldType -> TTerm Type -> TTerm FieldType
+ Hydra.Dsl.Core: fieldWithName :: TTerm Field -> TTerm Name -> TTerm Field
+ Hydra.Dsl.Core: fieldWithTerm :: TTerm Field -> TTerm Term -> TTerm Field
+ Hydra.Dsl.Core: floatTypeBigfloat :: TTerm FloatType
+ Hydra.Dsl.Core: floatTypeFloat32 :: TTerm FloatType
+ Hydra.Dsl.Core: floatTypeFloat64 :: TTerm FloatType
+ Hydra.Dsl.Core: floatValueBigfloat :: TTerm Double -> TTerm FloatValue
+ Hydra.Dsl.Core: floatValueFloat32 :: TTerm Float -> TTerm FloatValue
+ Hydra.Dsl.Core: floatValueFloat64 :: TTerm Double -> TTerm FloatValue
+ Hydra.Dsl.Core: forallType :: TTerm Name -> TTerm Type -> TTerm ForallType
+ Hydra.Dsl.Core: forallTypeBody :: TTerm ForallType -> TTerm Type
+ Hydra.Dsl.Core: forallTypeParameter :: TTerm ForallType -> TTerm Name
+ Hydra.Dsl.Core: forallTypeWithBody :: TTerm ForallType -> TTerm Type -> TTerm ForallType
+ Hydra.Dsl.Core: forallTypeWithParameter :: TTerm ForallType -> TTerm Name -> TTerm ForallType
+ Hydra.Dsl.Core: functionElimination :: TTerm Elimination -> TTerm Function
+ Hydra.Dsl.Core: functionLambda :: TTerm Lambda -> TTerm Function
+ Hydra.Dsl.Core: functionPrimitive :: TTerm Name -> TTerm Function
+ Hydra.Dsl.Core: functionType :: TTerm Type -> TTerm Type -> TTerm FunctionType
+ Hydra.Dsl.Core: functionTypeCodomain :: TTerm FunctionType -> TTerm Type
+ Hydra.Dsl.Core: functionTypeDomain :: TTerm FunctionType -> TTerm Type
+ Hydra.Dsl.Core: functionTypeWithCodomain :: TTerm FunctionType -> TTerm Type -> TTerm FunctionType
+ Hydra.Dsl.Core: functionTypeWithDomain :: TTerm FunctionType -> TTerm Type -> TTerm FunctionType
+ Hydra.Dsl.Core: injection :: TTerm Name -> TTerm Field -> TTerm Injection
+ Hydra.Dsl.Core: injectionField :: TTerm Injection -> TTerm Field
+ Hydra.Dsl.Core: injectionTypeName :: TTerm Injection -> TTerm Name
+ Hydra.Dsl.Core: injectionWithField :: TTerm Injection -> TTerm Field -> TTerm Injection
+ Hydra.Dsl.Core: injectionWithTypeName :: TTerm Injection -> TTerm Name -> TTerm Injection
+ Hydra.Dsl.Core: integerTypeBigint :: TTerm IntegerType
+ Hydra.Dsl.Core: integerTypeInt16 :: TTerm IntegerType
+ Hydra.Dsl.Core: integerTypeInt32 :: TTerm IntegerType
+ Hydra.Dsl.Core: integerTypeInt64 :: TTerm IntegerType
+ Hydra.Dsl.Core: integerTypeInt8 :: TTerm IntegerType
+ Hydra.Dsl.Core: integerTypeUint16 :: TTerm IntegerType
+ Hydra.Dsl.Core: integerTypeUint32 :: TTerm IntegerType
+ Hydra.Dsl.Core: integerTypeUint64 :: TTerm IntegerType
+ Hydra.Dsl.Core: integerTypeUint8 :: TTerm IntegerType
+ Hydra.Dsl.Core: integerValueBigint :: TTerm Integer -> TTerm IntegerValue
+ Hydra.Dsl.Core: integerValueInt16 :: TTerm Int16 -> TTerm IntegerValue
+ Hydra.Dsl.Core: integerValueInt32 :: TTerm Int -> TTerm IntegerValue
+ Hydra.Dsl.Core: integerValueInt64 :: TTerm Int64 -> TTerm IntegerValue
+ Hydra.Dsl.Core: integerValueInt8 :: TTerm Int8 -> TTerm IntegerValue
+ Hydra.Dsl.Core: integerValueUint16 :: TTerm Int -> TTerm IntegerValue
+ Hydra.Dsl.Core: integerValueUint32 :: TTerm Int64 -> TTerm IntegerValue
+ Hydra.Dsl.Core: integerValueUint64 :: TTerm Integer -> TTerm IntegerValue
+ Hydra.Dsl.Core: integerValueUint8 :: TTerm Int16 -> TTerm IntegerValue
+ Hydra.Dsl.Core: lambda :: TTerm Name -> TTerm (Maybe Type) -> TTerm Term -> TTerm Lambda
+ Hydra.Dsl.Core: lambdaBody :: TTerm Lambda -> TTerm Term
+ Hydra.Dsl.Core: lambdaDomain :: TTerm Lambda -> TTerm (Maybe Type)
+ Hydra.Dsl.Core: lambdaParameter :: TTerm Lambda -> TTerm Name
+ Hydra.Dsl.Core: lambdaWithBody :: TTerm Lambda -> TTerm Term -> TTerm Lambda
+ Hydra.Dsl.Core: lambdaWithDomain :: TTerm Lambda -> TTerm (Maybe Type) -> TTerm Lambda
+ Hydra.Dsl.Core: lambdaWithParameter :: TTerm Lambda -> TTerm Name -> TTerm Lambda
+ Hydra.Dsl.Core: letBindings :: TTerm Let -> TTerm [Binding]
+ Hydra.Dsl.Core: letBody :: TTerm Let -> TTerm Term
+ Hydra.Dsl.Core: letWithBindings :: TTerm Let -> TTerm [Binding] -> TTerm Let
+ Hydra.Dsl.Core: letWithBody :: TTerm Let -> TTerm Term -> TTerm Let
+ Hydra.Dsl.Core: let_ :: TTerm [Binding] -> TTerm Term -> TTerm Let
+ Hydra.Dsl.Core: literalBinary :: TTerm ByteString -> TTerm Literal
+ Hydra.Dsl.Core: literalBoolean :: TTerm Bool -> TTerm Literal
+ Hydra.Dsl.Core: literalFloat :: TTerm FloatValue -> TTerm Literal
+ Hydra.Dsl.Core: literalInteger :: TTerm IntegerValue -> TTerm Literal
+ Hydra.Dsl.Core: literalString :: TTerm String -> TTerm Literal
+ Hydra.Dsl.Core: literalTypeBinary :: TTerm LiteralType
+ Hydra.Dsl.Core: literalTypeBoolean :: TTerm LiteralType
+ Hydra.Dsl.Core: literalTypeFloat :: TTerm FloatType -> TTerm LiteralType
+ Hydra.Dsl.Core: literalTypeInteger :: TTerm IntegerType -> TTerm LiteralType
+ Hydra.Dsl.Core: literalTypeString :: TTerm LiteralType
+ Hydra.Dsl.Core: mapType :: TTerm Type -> TTerm Type -> TTerm MapType
+ Hydra.Dsl.Core: mapTypeKeys :: TTerm MapType -> TTerm Type
+ Hydra.Dsl.Core: mapTypeValues :: TTerm MapType -> TTerm Type
+ Hydra.Dsl.Core: mapTypeWithKeys :: TTerm MapType -> TTerm Type -> TTerm MapType
+ Hydra.Dsl.Core: mapTypeWithValues :: TTerm MapType -> TTerm Type -> TTerm MapType
+ Hydra.Dsl.Core: name :: TTerm String -> TTerm Name
+ Hydra.Dsl.Core: pairType :: TTerm Type -> TTerm Type -> TTerm PairType
+ Hydra.Dsl.Core: pairTypeFirst :: TTerm PairType -> TTerm Type
+ Hydra.Dsl.Core: pairTypeSecond :: TTerm PairType -> TTerm Type
+ Hydra.Dsl.Core: pairTypeWithFirst :: TTerm PairType -> TTerm Type -> TTerm PairType
+ Hydra.Dsl.Core: pairTypeWithSecond :: TTerm PairType -> TTerm Type -> TTerm PairType
+ Hydra.Dsl.Core: projection :: TTerm Name -> TTerm Name -> TTerm Projection
+ Hydra.Dsl.Core: projectionField :: TTerm Projection -> TTerm Name
+ Hydra.Dsl.Core: projectionTypeName :: TTerm Projection -> TTerm Name
+ Hydra.Dsl.Core: projectionWithField :: TTerm Projection -> TTerm Name -> TTerm Projection
+ Hydra.Dsl.Core: projectionWithTypeName :: TTerm Projection -> TTerm Name -> TTerm Projection
+ Hydra.Dsl.Core: record :: TTerm Name -> TTerm [Field] -> TTerm Record
+ Hydra.Dsl.Core: recordFields :: TTerm Record -> TTerm [Field]
+ Hydra.Dsl.Core: recordTypeName :: TTerm Record -> TTerm Name
+ Hydra.Dsl.Core: recordWithFields :: TTerm Record -> TTerm [Field] -> TTerm Record
+ Hydra.Dsl.Core: recordWithTypeName :: TTerm Record -> TTerm Name -> TTerm Record
+ Hydra.Dsl.Core: termAnnotated :: TTerm AnnotatedTerm -> TTerm Term
+ Hydra.Dsl.Core: termApplication :: TTerm Application -> TTerm Term
+ Hydra.Dsl.Core: termEither :: TTerm (Either Term Term) -> TTerm Term
+ Hydra.Dsl.Core: termFunction :: TTerm Function -> TTerm Term
+ Hydra.Dsl.Core: termLet :: TTerm Let -> TTerm Term
+ Hydra.Dsl.Core: termList :: TTerm [Term] -> TTerm Term
+ Hydra.Dsl.Core: termLiteral :: TTerm Literal -> TTerm Term
+ Hydra.Dsl.Core: termMap :: TTerm (Map Term Term) -> TTerm Term
+ Hydra.Dsl.Core: termMaybe :: TTerm (Maybe Term) -> TTerm Term
+ Hydra.Dsl.Core: termPair :: TTerm (Term, Term) -> TTerm Term
+ Hydra.Dsl.Core: termRecord :: TTerm Record -> TTerm Term
+ Hydra.Dsl.Core: termSet :: TTerm (Set Term) -> TTerm Term
+ Hydra.Dsl.Core: termTypeApplication :: TTerm TypeApplicationTerm -> TTerm Term
+ Hydra.Dsl.Core: termTypeLambda :: TTerm TypeLambda -> TTerm Term
+ Hydra.Dsl.Core: termUnion :: TTerm Injection -> TTerm Term
+ Hydra.Dsl.Core: termUnit :: TTerm Term
+ Hydra.Dsl.Core: termVariable :: TTerm Name -> TTerm Term
+ Hydra.Dsl.Core: termWrap :: TTerm WrappedTerm -> TTerm Term
+ Hydra.Dsl.Core: typeAnnotated :: TTerm AnnotatedType -> TTerm Type
+ Hydra.Dsl.Core: typeApplication :: TTerm ApplicationType -> TTerm Type
+ Hydra.Dsl.Core: typeApplicationTerm :: TTerm Term -> TTerm Type -> TTerm TypeApplicationTerm
+ Hydra.Dsl.Core: typeApplicationTermBody :: TTerm TypeApplicationTerm -> TTerm Term
+ Hydra.Dsl.Core: typeApplicationTermType :: TTerm TypeApplicationTerm -> TTerm Type
+ Hydra.Dsl.Core: typeApplicationTermWithBody :: TTerm TypeApplicationTerm -> TTerm Term -> TTerm TypeApplicationTerm
+ Hydra.Dsl.Core: typeApplicationTermWithType :: TTerm TypeApplicationTerm -> TTerm Type -> TTerm TypeApplicationTerm
+ Hydra.Dsl.Core: typeEither :: TTerm EitherType -> TTerm Type
+ Hydra.Dsl.Core: typeForall :: TTerm ForallType -> TTerm Type
+ Hydra.Dsl.Core: typeFunction :: TTerm FunctionType -> TTerm Type
+ Hydra.Dsl.Core: typeLambda :: TTerm Name -> TTerm Term -> TTerm TypeLambda
+ Hydra.Dsl.Core: typeLambdaBody :: TTerm TypeLambda -> TTerm Term
+ Hydra.Dsl.Core: typeLambdaParameter :: TTerm TypeLambda -> TTerm Name
+ Hydra.Dsl.Core: typeLambdaWithBody :: TTerm TypeLambda -> TTerm Term -> TTerm TypeLambda
+ Hydra.Dsl.Core: typeLambdaWithParameter :: TTerm TypeLambda -> TTerm Name -> TTerm TypeLambda
+ Hydra.Dsl.Core: typeList :: TTerm Type -> TTerm Type
+ Hydra.Dsl.Core: typeLiteral :: TTerm LiteralType -> TTerm Type
+ Hydra.Dsl.Core: typeMap :: TTerm MapType -> TTerm Type
+ Hydra.Dsl.Core: typeMaybe :: TTerm Type -> TTerm Type
+ Hydra.Dsl.Core: typePair :: TTerm PairType -> TTerm Type
+ Hydra.Dsl.Core: typeRecord :: TTerm [FieldType] -> TTerm Type
+ Hydra.Dsl.Core: typeScheme :: TTerm [Name] -> TTerm Type -> TTerm (Maybe (Map Name TypeVariableMetadata)) -> TTerm TypeScheme
+ Hydra.Dsl.Core: typeSchemeConstraints :: TTerm TypeScheme -> TTerm (Maybe (Map Name TypeVariableMetadata))
+ Hydra.Dsl.Core: typeSchemeType :: TTerm TypeScheme -> TTerm Type
+ Hydra.Dsl.Core: typeSchemeVariables :: TTerm TypeScheme -> TTerm [Name]
+ Hydra.Dsl.Core: typeSchemeWithConstraints :: TTerm TypeScheme -> TTerm (Maybe (Map Name TypeVariableMetadata)) -> TTerm TypeScheme
+ Hydra.Dsl.Core: typeSchemeWithType :: TTerm TypeScheme -> TTerm Type -> TTerm TypeScheme
+ Hydra.Dsl.Core: typeSchemeWithVariables :: TTerm TypeScheme -> TTerm [Name] -> TTerm TypeScheme
+ Hydra.Dsl.Core: typeSet :: TTerm Type -> TTerm Type
+ Hydra.Dsl.Core: typeUnion :: TTerm [FieldType] -> TTerm Type
+ Hydra.Dsl.Core: typeUnit :: TTerm Type
+ Hydra.Dsl.Core: typeVariable :: TTerm Name -> TTerm Type
+ Hydra.Dsl.Core: typeVariableMetadata :: TTerm (Set Name) -> TTerm TypeVariableMetadata
+ Hydra.Dsl.Core: typeVariableMetadataClasses :: TTerm TypeVariableMetadata -> TTerm (Set Name)
+ Hydra.Dsl.Core: typeVariableMetadataWithClasses :: TTerm TypeVariableMetadata -> TTerm (Set Name) -> TTerm TypeVariableMetadata
+ Hydra.Dsl.Core: typeVoid :: TTerm Type
+ Hydra.Dsl.Core: typeWrap :: TTerm Type -> TTerm Type
+ Hydra.Dsl.Core: unName :: TTerm Name -> TTerm String
+ Hydra.Dsl.Core: wrappedTerm :: TTerm Name -> TTerm Term -> TTerm WrappedTerm
+ Hydra.Dsl.Core: wrappedTermBody :: TTerm WrappedTerm -> TTerm Term
+ Hydra.Dsl.Core: wrappedTermTypeName :: TTerm WrappedTerm -> TTerm Name
+ Hydra.Dsl.Core: wrappedTermWithBody :: TTerm WrappedTerm -> TTerm Term -> TTerm WrappedTerm
+ Hydra.Dsl.Core: wrappedTermWithTypeName :: TTerm WrappedTerm -> TTerm Name -> TTerm WrappedTerm
+ Hydra.Dsl.Error.Checking: checkingErrorIncorrectUnification :: TTerm IncorrectUnificationError -> TTerm CheckingError
+ Hydra.Dsl.Error.Checking: checkingErrorNotAForallType :: TTerm NotAForallTypeError -> TTerm CheckingError
+ Hydra.Dsl.Error.Checking: checkingErrorNotAFunctionType :: TTerm NotAFunctionTypeError -> TTerm CheckingError
+ Hydra.Dsl.Error.Checking: checkingErrorTypeArityMismatch :: TTerm TypeArityMismatchError -> TTerm CheckingError
+ Hydra.Dsl.Error.Checking: checkingErrorTypeMismatch :: TTerm TypeMismatchError -> TTerm CheckingError
+ Hydra.Dsl.Error.Checking: checkingErrorUnboundTypeVariables :: TTerm UnboundTypeVariablesError -> TTerm CheckingError
+ Hydra.Dsl.Error.Checking: checkingErrorUnequalTypes :: TTerm UnequalTypesError -> TTerm CheckingError
+ Hydra.Dsl.Error.Checking: checkingErrorUnsupportedTermVariant :: TTerm UnsupportedTermVariantError -> TTerm CheckingError
+ Hydra.Dsl.Error.Checking: checkingErrorUntypedLambda :: TTerm UntypedLambdaError -> TTerm CheckingError
+ Hydra.Dsl.Error.Checking: checkingErrorUntypedLetBinding :: TTerm UntypedLetBindingError -> TTerm CheckingError
+ Hydra.Dsl.Error.Checking: incorrectUnificationError :: TTerm TypeSubst -> TTerm IncorrectUnificationError
+ Hydra.Dsl.Error.Checking: incorrectUnificationErrorSubstitution :: TTerm IncorrectUnificationError -> TTerm TypeSubst
+ Hydra.Dsl.Error.Checking: incorrectUnificationErrorWithSubstitution :: TTerm IncorrectUnificationError -> TTerm TypeSubst -> TTerm IncorrectUnificationError
+ Hydra.Dsl.Error.Checking: notAForallTypeError :: TTerm Type -> TTerm [Type] -> TTerm NotAForallTypeError
+ Hydra.Dsl.Error.Checking: notAForallTypeErrorType :: TTerm NotAForallTypeError -> TTerm Type
+ Hydra.Dsl.Error.Checking: notAForallTypeErrorTypeArguments :: TTerm NotAForallTypeError -> TTerm [Type]
+ Hydra.Dsl.Error.Checking: notAForallTypeErrorWithType :: TTerm NotAForallTypeError -> TTerm Type -> TTerm NotAForallTypeError
+ Hydra.Dsl.Error.Checking: notAForallTypeErrorWithTypeArguments :: TTerm NotAForallTypeError -> TTerm [Type] -> TTerm NotAForallTypeError
+ Hydra.Dsl.Error.Checking: notAFunctionTypeError :: TTerm Type -> TTerm NotAFunctionTypeError
+ Hydra.Dsl.Error.Checking: notAFunctionTypeErrorType :: TTerm NotAFunctionTypeError -> TTerm Type
+ Hydra.Dsl.Error.Checking: notAFunctionTypeErrorWithType :: TTerm NotAFunctionTypeError -> TTerm Type -> TTerm NotAFunctionTypeError
+ Hydra.Dsl.Error.Checking: typeArityMismatchError :: TTerm Type -> TTerm Int -> TTerm Int -> TTerm [Type] -> TTerm TypeArityMismatchError
+ Hydra.Dsl.Error.Checking: typeArityMismatchErrorActualArity :: TTerm TypeArityMismatchError -> TTerm Int
+ Hydra.Dsl.Error.Checking: typeArityMismatchErrorExpectedArity :: TTerm TypeArityMismatchError -> TTerm Int
+ Hydra.Dsl.Error.Checking: typeArityMismatchErrorType :: TTerm TypeArityMismatchError -> TTerm Type
+ Hydra.Dsl.Error.Checking: typeArityMismatchErrorTypeArguments :: TTerm TypeArityMismatchError -> TTerm [Type]
+ Hydra.Dsl.Error.Checking: typeArityMismatchErrorWithActualArity :: TTerm TypeArityMismatchError -> TTerm Int -> TTerm TypeArityMismatchError
+ Hydra.Dsl.Error.Checking: typeArityMismatchErrorWithExpectedArity :: TTerm TypeArityMismatchError -> TTerm Int -> TTerm TypeArityMismatchError
+ Hydra.Dsl.Error.Checking: typeArityMismatchErrorWithType :: TTerm TypeArityMismatchError -> TTerm Type -> TTerm TypeArityMismatchError
+ Hydra.Dsl.Error.Checking: typeArityMismatchErrorWithTypeArguments :: TTerm TypeArityMismatchError -> TTerm [Type] -> TTerm TypeArityMismatchError
+ Hydra.Dsl.Error.Checking: typeMismatchError :: TTerm Type -> TTerm Type -> TTerm TypeMismatchError
+ Hydra.Dsl.Error.Checking: typeMismatchErrorActualType :: TTerm TypeMismatchError -> TTerm Type
+ Hydra.Dsl.Error.Checking: typeMismatchErrorExpectedType :: TTerm TypeMismatchError -> TTerm Type
+ Hydra.Dsl.Error.Checking: typeMismatchErrorWithActualType :: TTerm TypeMismatchError -> TTerm Type -> TTerm TypeMismatchError
+ Hydra.Dsl.Error.Checking: typeMismatchErrorWithExpectedType :: TTerm TypeMismatchError -> TTerm Type -> TTerm TypeMismatchError
+ Hydra.Dsl.Error.Checking: unboundTypeVariablesError :: TTerm (Set Name) -> TTerm Type -> TTerm UnboundTypeVariablesError
+ Hydra.Dsl.Error.Checking: unboundTypeVariablesErrorType :: TTerm UnboundTypeVariablesError -> TTerm Type
+ Hydra.Dsl.Error.Checking: unboundTypeVariablesErrorVariables :: TTerm UnboundTypeVariablesError -> TTerm (Set Name)
+ Hydra.Dsl.Error.Checking: unboundTypeVariablesErrorWithType :: TTerm UnboundTypeVariablesError -> TTerm Type -> TTerm UnboundTypeVariablesError
+ Hydra.Dsl.Error.Checking: unboundTypeVariablesErrorWithVariables :: TTerm UnboundTypeVariablesError -> TTerm (Set Name) -> TTerm UnboundTypeVariablesError
+ Hydra.Dsl.Error.Checking: unequalTypesError :: TTerm [Type] -> TTerm String -> TTerm UnequalTypesError
+ Hydra.Dsl.Error.Checking: unequalTypesErrorDescription :: TTerm UnequalTypesError -> TTerm String
+ Hydra.Dsl.Error.Checking: unequalTypesErrorTypes :: TTerm UnequalTypesError -> TTerm [Type]
+ Hydra.Dsl.Error.Checking: unequalTypesErrorWithDescription :: TTerm UnequalTypesError -> TTerm String -> TTerm UnequalTypesError
+ Hydra.Dsl.Error.Checking: unequalTypesErrorWithTypes :: TTerm UnequalTypesError -> TTerm [Type] -> TTerm UnequalTypesError
+ Hydra.Dsl.Error.Checking: unsupportedTermVariantError :: TTerm TermVariant -> TTerm UnsupportedTermVariantError
+ Hydra.Dsl.Error.Checking: unsupportedTermVariantErrorTermVariant :: TTerm UnsupportedTermVariantError -> TTerm TermVariant
+ Hydra.Dsl.Error.Checking: unsupportedTermVariantErrorWithTermVariant :: TTerm UnsupportedTermVariantError -> TTerm TermVariant -> TTerm UnsupportedTermVariantError
+ Hydra.Dsl.Error.Checking: untypedLambdaError :: TTerm UntypedLambdaError
+ Hydra.Dsl.Error.Checking: untypedLetBindingError :: TTerm Binding -> TTerm UntypedLetBindingError
+ Hydra.Dsl.Error.Checking: untypedLetBindingErrorBinding :: TTerm UntypedLetBindingError -> TTerm Binding
+ Hydra.Dsl.Error.Checking: untypedLetBindingErrorWithBinding :: TTerm UntypedLetBindingError -> TTerm Binding -> TTerm UntypedLetBindingError
+ Hydra.Dsl.Error.Core: constantConditionError :: TTerm SubtermPath -> TTerm Bool -> TTerm ConstantConditionError
+ Hydra.Dsl.Error.Core: constantConditionErrorLocation :: TTerm ConstantConditionError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: constantConditionErrorValue :: TTerm ConstantConditionError -> TTerm Bool
+ Hydra.Dsl.Error.Core: constantConditionErrorWithLocation :: TTerm ConstantConditionError -> TTerm SubtermPath -> TTerm ConstantConditionError
+ Hydra.Dsl.Error.Core: constantConditionErrorWithValue :: TTerm ConstantConditionError -> TTerm Bool -> TTerm ConstantConditionError
+ Hydra.Dsl.Error.Core: duplicateBindingError :: TTerm SubtermPath -> TTerm Name -> TTerm DuplicateBindingError
+ Hydra.Dsl.Error.Core: duplicateBindingErrorLocation :: TTerm DuplicateBindingError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: duplicateBindingErrorName :: TTerm DuplicateBindingError -> TTerm Name
+ Hydra.Dsl.Error.Core: duplicateBindingErrorWithLocation :: TTerm DuplicateBindingError -> TTerm SubtermPath -> TTerm DuplicateBindingError
+ Hydra.Dsl.Error.Core: duplicateBindingErrorWithName :: TTerm DuplicateBindingError -> TTerm Name -> TTerm DuplicateBindingError
+ Hydra.Dsl.Error.Core: duplicateFieldError :: TTerm SubtermPath -> TTerm Name -> TTerm DuplicateFieldError
+ Hydra.Dsl.Error.Core: duplicateFieldErrorLocation :: TTerm DuplicateFieldError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: duplicateFieldErrorName :: TTerm DuplicateFieldError -> TTerm Name
+ Hydra.Dsl.Error.Core: duplicateFieldErrorWithLocation :: TTerm DuplicateFieldError -> TTerm SubtermPath -> TTerm DuplicateFieldError
+ Hydra.Dsl.Error.Core: duplicateFieldErrorWithName :: TTerm DuplicateFieldError -> TTerm Name -> TTerm DuplicateFieldError
+ Hydra.Dsl.Error.Core: duplicateRecordTypeFieldNamesError :: TTerm SubtermPath -> TTerm Name -> TTerm DuplicateRecordTypeFieldNamesError
+ Hydra.Dsl.Error.Core: duplicateRecordTypeFieldNamesErrorLocation :: TTerm DuplicateRecordTypeFieldNamesError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: duplicateRecordTypeFieldNamesErrorName :: TTerm DuplicateRecordTypeFieldNamesError -> TTerm Name
+ Hydra.Dsl.Error.Core: duplicateRecordTypeFieldNamesErrorWithLocation :: TTerm DuplicateRecordTypeFieldNamesError -> TTerm SubtermPath -> TTerm DuplicateRecordTypeFieldNamesError
+ Hydra.Dsl.Error.Core: duplicateRecordTypeFieldNamesErrorWithName :: TTerm DuplicateRecordTypeFieldNamesError -> TTerm Name -> TTerm DuplicateRecordTypeFieldNamesError
+ Hydra.Dsl.Error.Core: duplicateUnionTypeFieldNamesError :: TTerm SubtermPath -> TTerm Name -> TTerm DuplicateUnionTypeFieldNamesError
+ Hydra.Dsl.Error.Core: duplicateUnionTypeFieldNamesErrorLocation :: TTerm DuplicateUnionTypeFieldNamesError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: duplicateUnionTypeFieldNamesErrorName :: TTerm DuplicateUnionTypeFieldNamesError -> TTerm Name
+ Hydra.Dsl.Error.Core: duplicateUnionTypeFieldNamesErrorWithLocation :: TTerm DuplicateUnionTypeFieldNamesError -> TTerm SubtermPath -> TTerm DuplicateUnionTypeFieldNamesError
+ Hydra.Dsl.Error.Core: duplicateUnionTypeFieldNamesErrorWithName :: TTerm DuplicateUnionTypeFieldNamesError -> TTerm Name -> TTerm DuplicateUnionTypeFieldNamesError
+ Hydra.Dsl.Error.Core: emptyCaseStatementError :: TTerm SubtermPath -> TTerm Name -> TTerm EmptyCaseStatementError
+ Hydra.Dsl.Error.Core: emptyCaseStatementErrorLocation :: TTerm EmptyCaseStatementError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: emptyCaseStatementErrorTypeName :: TTerm EmptyCaseStatementError -> TTerm Name
+ Hydra.Dsl.Error.Core: emptyCaseStatementErrorWithLocation :: TTerm EmptyCaseStatementError -> TTerm SubtermPath -> TTerm EmptyCaseStatementError
+ Hydra.Dsl.Error.Core: emptyCaseStatementErrorWithTypeName :: TTerm EmptyCaseStatementError -> TTerm Name -> TTerm EmptyCaseStatementError
+ Hydra.Dsl.Error.Core: emptyLetBindingsError :: TTerm SubtermPath -> TTerm EmptyLetBindingsError
+ Hydra.Dsl.Error.Core: emptyLetBindingsErrorLocation :: TTerm EmptyLetBindingsError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: emptyLetBindingsErrorWithLocation :: TTerm EmptyLetBindingsError -> TTerm SubtermPath -> TTerm EmptyLetBindingsError
+ Hydra.Dsl.Error.Core: emptyRecordTypeError :: TTerm SubtermPath -> TTerm EmptyRecordTypeError
+ Hydra.Dsl.Error.Core: emptyRecordTypeErrorLocation :: TTerm EmptyRecordTypeError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: emptyRecordTypeErrorWithLocation :: TTerm EmptyRecordTypeError -> TTerm SubtermPath -> TTerm EmptyRecordTypeError
+ Hydra.Dsl.Error.Core: emptyTermAnnotationError :: TTerm SubtermPath -> TTerm EmptyTermAnnotationError
+ Hydra.Dsl.Error.Core: emptyTermAnnotationErrorLocation :: TTerm EmptyTermAnnotationError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: emptyTermAnnotationErrorWithLocation :: TTerm EmptyTermAnnotationError -> TTerm SubtermPath -> TTerm EmptyTermAnnotationError
+ Hydra.Dsl.Error.Core: emptyTypeAnnotationError :: TTerm SubtermPath -> TTerm EmptyTypeAnnotationError
+ Hydra.Dsl.Error.Core: emptyTypeAnnotationErrorLocation :: TTerm EmptyTypeAnnotationError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: emptyTypeAnnotationErrorWithLocation :: TTerm EmptyTypeAnnotationError -> TTerm SubtermPath -> TTerm EmptyTypeAnnotationError
+ Hydra.Dsl.Error.Core: emptyTypeNameInTermError :: TTerm SubtermPath -> TTerm EmptyTypeNameInTermError
+ Hydra.Dsl.Error.Core: emptyTypeNameInTermErrorLocation :: TTerm EmptyTypeNameInTermError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: emptyTypeNameInTermErrorWithLocation :: TTerm EmptyTypeNameInTermError -> TTerm SubtermPath -> TTerm EmptyTypeNameInTermError
+ Hydra.Dsl.Error.Core: emptyUnionTypeError :: TTerm SubtermPath -> TTerm EmptyUnionTypeError
+ Hydra.Dsl.Error.Core: emptyUnionTypeErrorLocation :: TTerm EmptyUnionTypeError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: emptyUnionTypeErrorWithLocation :: TTerm EmptyUnionTypeError -> TTerm SubtermPath -> TTerm EmptyUnionTypeError
+ Hydra.Dsl.Error.Core: invalidForallParameterNameError :: TTerm SubtermPath -> TTerm Name -> TTerm InvalidForallParameterNameError
+ Hydra.Dsl.Error.Core: invalidForallParameterNameErrorLocation :: TTerm InvalidForallParameterNameError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: invalidForallParameterNameErrorName :: TTerm InvalidForallParameterNameError -> TTerm Name
+ Hydra.Dsl.Error.Core: invalidForallParameterNameErrorWithLocation :: TTerm InvalidForallParameterNameError -> TTerm SubtermPath -> TTerm InvalidForallParameterNameError
+ Hydra.Dsl.Error.Core: invalidForallParameterNameErrorWithName :: TTerm InvalidForallParameterNameError -> TTerm Name -> TTerm InvalidForallParameterNameError
+ Hydra.Dsl.Error.Core: invalidLambdaParameterNameError :: TTerm SubtermPath -> TTerm Name -> TTerm InvalidLambdaParameterNameError
+ Hydra.Dsl.Error.Core: invalidLambdaParameterNameErrorLocation :: TTerm InvalidLambdaParameterNameError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: invalidLambdaParameterNameErrorName :: TTerm InvalidLambdaParameterNameError -> TTerm Name
+ Hydra.Dsl.Error.Core: invalidLambdaParameterNameErrorWithLocation :: TTerm InvalidLambdaParameterNameError -> TTerm SubtermPath -> TTerm InvalidLambdaParameterNameError
+ Hydra.Dsl.Error.Core: invalidLambdaParameterNameErrorWithName :: TTerm InvalidLambdaParameterNameError -> TTerm Name -> TTerm InvalidLambdaParameterNameError
+ Hydra.Dsl.Error.Core: invalidLetBindingNameError :: TTerm SubtermPath -> TTerm Name -> TTerm InvalidLetBindingNameError
+ Hydra.Dsl.Error.Core: invalidLetBindingNameErrorLocation :: TTerm InvalidLetBindingNameError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: invalidLetBindingNameErrorName :: TTerm InvalidLetBindingNameError -> TTerm Name
+ Hydra.Dsl.Error.Core: invalidLetBindingNameErrorWithLocation :: TTerm InvalidLetBindingNameError -> TTerm SubtermPath -> TTerm InvalidLetBindingNameError
+ Hydra.Dsl.Error.Core: invalidLetBindingNameErrorWithName :: TTerm InvalidLetBindingNameError -> TTerm Name -> TTerm InvalidLetBindingNameError
+ Hydra.Dsl.Error.Core: invalidTermErrorConstantCondition :: TTerm ConstantConditionError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorDuplicateBinding :: TTerm DuplicateBindingError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorDuplicateField :: TTerm DuplicateFieldError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorEmptyCaseStatement :: TTerm EmptyCaseStatementError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorEmptyLetBindings :: TTerm EmptyLetBindingsError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorEmptyTermAnnotation :: TTerm EmptyTermAnnotationError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorEmptyTypeNameInTerm :: TTerm EmptyTypeNameInTermError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorInvalidLambdaParameterName :: TTerm InvalidLambdaParameterNameError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorInvalidLetBindingName :: TTerm InvalidLetBindingNameError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorInvalidTypeLambdaParameterName :: TTerm InvalidTypeLambdaParameterNameError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorNestedTermAnnotation :: TTerm NestedTermAnnotationError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorRedundantWrapUnwrap :: TTerm RedundantWrapUnwrapError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorSelfApplication :: TTerm SelfApplicationError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorTermVariableShadowing :: TTerm TermVariableShadowingError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorTypeVariableShadowingInTypeLambda :: TTerm TypeVariableShadowingInTypeLambdaError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorUndefinedTermVariable :: TTerm UndefinedTermVariableError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorUndefinedTypeVariableInBindingType :: TTerm UndefinedTypeVariableInBindingTypeError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorUndefinedTypeVariableInLambdaDomain :: TTerm UndefinedTypeVariableInLambdaDomainError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorUndefinedTypeVariableInTypeApplication :: TTerm UndefinedTypeVariableInTypeApplicationError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorUnknownPrimitiveName :: TTerm UnknownPrimitiveNameError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorUnnecessaryIdentityApplication :: TTerm UnnecessaryIdentityApplicationError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTermErrorUntypedTermVariable :: TTerm UntypedTermVariableError -> TTerm InvalidTermError
+ Hydra.Dsl.Error.Core: invalidTypeErrorDuplicateRecordTypeFieldNames :: TTerm DuplicateRecordTypeFieldNamesError -> TTerm InvalidTypeError
+ Hydra.Dsl.Error.Core: invalidTypeErrorDuplicateUnionTypeFieldNames :: TTerm DuplicateUnionTypeFieldNamesError -> TTerm InvalidTypeError
+ Hydra.Dsl.Error.Core: invalidTypeErrorEmptyRecordType :: TTerm EmptyRecordTypeError -> TTerm InvalidTypeError
+ Hydra.Dsl.Error.Core: invalidTypeErrorEmptyTypeAnnotation :: TTerm EmptyTypeAnnotationError -> TTerm InvalidTypeError
+ Hydra.Dsl.Error.Core: invalidTypeErrorEmptyUnionType :: TTerm EmptyUnionTypeError -> TTerm InvalidTypeError
+ Hydra.Dsl.Error.Core: invalidTypeErrorInvalidForallParameterName :: TTerm InvalidForallParameterNameError -> TTerm InvalidTypeError
+ Hydra.Dsl.Error.Core: invalidTypeErrorInvalidTypeSchemeVariableName :: TTerm InvalidTypeSchemeVariableNameError -> TTerm InvalidTypeError
+ Hydra.Dsl.Error.Core: invalidTypeErrorNestedTypeAnnotation :: TTerm NestedTypeAnnotationError -> TTerm InvalidTypeError
+ Hydra.Dsl.Error.Core: invalidTypeErrorNonComparableMapKeyType :: TTerm NonComparableMapKeyTypeError -> TTerm InvalidTypeError
+ Hydra.Dsl.Error.Core: invalidTypeErrorNonComparableSetElementType :: TTerm NonComparableSetElementTypeError -> TTerm InvalidTypeError
+ Hydra.Dsl.Error.Core: invalidTypeErrorSingleVariantUnion :: TTerm SingleVariantUnionError -> TTerm InvalidTypeError
+ Hydra.Dsl.Error.Core: invalidTypeErrorTypeVariableShadowingInForall :: TTerm TypeVariableShadowingInForallError -> TTerm InvalidTypeError
+ Hydra.Dsl.Error.Core: invalidTypeErrorUndefinedTypeVariable :: TTerm UndefinedTypeVariableError -> TTerm InvalidTypeError
+ Hydra.Dsl.Error.Core: invalidTypeErrorVoidInNonBottomPosition :: TTerm VoidInNonBottomPositionError -> TTerm InvalidTypeError
+ Hydra.Dsl.Error.Core: invalidTypeLambdaParameterNameError :: TTerm SubtermPath -> TTerm Name -> TTerm InvalidTypeLambdaParameterNameError
+ Hydra.Dsl.Error.Core: invalidTypeLambdaParameterNameErrorLocation :: TTerm InvalidTypeLambdaParameterNameError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: invalidTypeLambdaParameterNameErrorName :: TTerm InvalidTypeLambdaParameterNameError -> TTerm Name
+ Hydra.Dsl.Error.Core: invalidTypeLambdaParameterNameErrorWithLocation :: TTerm InvalidTypeLambdaParameterNameError -> TTerm SubtermPath -> TTerm InvalidTypeLambdaParameterNameError
+ Hydra.Dsl.Error.Core: invalidTypeLambdaParameterNameErrorWithName :: TTerm InvalidTypeLambdaParameterNameError -> TTerm Name -> TTerm InvalidTypeLambdaParameterNameError
+ Hydra.Dsl.Error.Core: invalidTypeSchemeVariableNameError :: TTerm SubtermPath -> TTerm Name -> TTerm InvalidTypeSchemeVariableNameError
+ Hydra.Dsl.Error.Core: invalidTypeSchemeVariableNameErrorLocation :: TTerm InvalidTypeSchemeVariableNameError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: invalidTypeSchemeVariableNameErrorName :: TTerm InvalidTypeSchemeVariableNameError -> TTerm Name
+ Hydra.Dsl.Error.Core: invalidTypeSchemeVariableNameErrorWithLocation :: TTerm InvalidTypeSchemeVariableNameError -> TTerm SubtermPath -> TTerm InvalidTypeSchemeVariableNameError
+ Hydra.Dsl.Error.Core: invalidTypeSchemeVariableNameErrorWithName :: TTerm InvalidTypeSchemeVariableNameError -> TTerm Name -> TTerm InvalidTypeSchemeVariableNameError
+ Hydra.Dsl.Error.Core: nestedTermAnnotationError :: TTerm SubtermPath -> TTerm NestedTermAnnotationError
+ Hydra.Dsl.Error.Core: nestedTermAnnotationErrorLocation :: TTerm NestedTermAnnotationError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: nestedTermAnnotationErrorWithLocation :: TTerm NestedTermAnnotationError -> TTerm SubtermPath -> TTerm NestedTermAnnotationError
+ Hydra.Dsl.Error.Core: nestedTypeAnnotationError :: TTerm SubtermPath -> TTerm NestedTypeAnnotationError
+ Hydra.Dsl.Error.Core: nestedTypeAnnotationErrorLocation :: TTerm NestedTypeAnnotationError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: nestedTypeAnnotationErrorWithLocation :: TTerm NestedTypeAnnotationError -> TTerm SubtermPath -> TTerm NestedTypeAnnotationError
+ Hydra.Dsl.Error.Core: nonComparableMapKeyTypeError :: TTerm SubtermPath -> TTerm Type -> TTerm NonComparableMapKeyTypeError
+ Hydra.Dsl.Error.Core: nonComparableMapKeyTypeErrorKeyType :: TTerm NonComparableMapKeyTypeError -> TTerm Type
+ Hydra.Dsl.Error.Core: nonComparableMapKeyTypeErrorLocation :: TTerm NonComparableMapKeyTypeError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: nonComparableMapKeyTypeErrorWithKeyType :: TTerm NonComparableMapKeyTypeError -> TTerm Type -> TTerm NonComparableMapKeyTypeError
+ Hydra.Dsl.Error.Core: nonComparableMapKeyTypeErrorWithLocation :: TTerm NonComparableMapKeyTypeError -> TTerm SubtermPath -> TTerm NonComparableMapKeyTypeError
+ Hydra.Dsl.Error.Core: nonComparableSetElementTypeError :: TTerm SubtermPath -> TTerm Type -> TTerm NonComparableSetElementTypeError
+ Hydra.Dsl.Error.Core: nonComparableSetElementTypeErrorElementType :: TTerm NonComparableSetElementTypeError -> TTerm Type
+ Hydra.Dsl.Error.Core: nonComparableSetElementTypeErrorLocation :: TTerm NonComparableSetElementTypeError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: nonComparableSetElementTypeErrorWithElementType :: TTerm NonComparableSetElementTypeError -> TTerm Type -> TTerm NonComparableSetElementTypeError
+ Hydra.Dsl.Error.Core: nonComparableSetElementTypeErrorWithLocation :: TTerm NonComparableSetElementTypeError -> TTerm SubtermPath -> TTerm NonComparableSetElementTypeError
+ Hydra.Dsl.Error.Core: redundantWrapUnwrapError :: TTerm SubtermPath -> TTerm Name -> TTerm RedundantWrapUnwrapError
+ Hydra.Dsl.Error.Core: redundantWrapUnwrapErrorLocation :: TTerm RedundantWrapUnwrapError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: redundantWrapUnwrapErrorTypeName :: TTerm RedundantWrapUnwrapError -> TTerm Name
+ Hydra.Dsl.Error.Core: redundantWrapUnwrapErrorWithLocation :: TTerm RedundantWrapUnwrapError -> TTerm SubtermPath -> TTerm RedundantWrapUnwrapError
+ Hydra.Dsl.Error.Core: redundantWrapUnwrapErrorWithTypeName :: TTerm RedundantWrapUnwrapError -> TTerm Name -> TTerm RedundantWrapUnwrapError
+ Hydra.Dsl.Error.Core: selfApplicationError :: TTerm SubtermPath -> TTerm Name -> TTerm SelfApplicationError
+ Hydra.Dsl.Error.Core: selfApplicationErrorLocation :: TTerm SelfApplicationError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: selfApplicationErrorName :: TTerm SelfApplicationError -> TTerm Name
+ Hydra.Dsl.Error.Core: selfApplicationErrorWithLocation :: TTerm SelfApplicationError -> TTerm SubtermPath -> TTerm SelfApplicationError
+ Hydra.Dsl.Error.Core: selfApplicationErrorWithName :: TTerm SelfApplicationError -> TTerm Name -> TTerm SelfApplicationError
+ Hydra.Dsl.Error.Core: singleVariantUnionError :: TTerm SubtermPath -> TTerm Name -> TTerm SingleVariantUnionError
+ Hydra.Dsl.Error.Core: singleVariantUnionErrorFieldName :: TTerm SingleVariantUnionError -> TTerm Name
+ Hydra.Dsl.Error.Core: singleVariantUnionErrorLocation :: TTerm SingleVariantUnionError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: singleVariantUnionErrorWithFieldName :: TTerm SingleVariantUnionError -> TTerm Name -> TTerm SingleVariantUnionError
+ Hydra.Dsl.Error.Core: singleVariantUnionErrorWithLocation :: TTerm SingleVariantUnionError -> TTerm SubtermPath -> TTerm SingleVariantUnionError
+ Hydra.Dsl.Error.Core: termVariableShadowingError :: TTerm SubtermPath -> TTerm Name -> TTerm TermVariableShadowingError
+ Hydra.Dsl.Error.Core: termVariableShadowingErrorLocation :: TTerm TermVariableShadowingError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: termVariableShadowingErrorName :: TTerm TermVariableShadowingError -> TTerm Name
+ Hydra.Dsl.Error.Core: termVariableShadowingErrorWithLocation :: TTerm TermVariableShadowingError -> TTerm SubtermPath -> TTerm TermVariableShadowingError
+ Hydra.Dsl.Error.Core: termVariableShadowingErrorWithName :: TTerm TermVariableShadowingError -> TTerm Name -> TTerm TermVariableShadowingError
+ Hydra.Dsl.Error.Core: typeVariableShadowingInForallError :: TTerm SubtermPath -> TTerm Name -> TTerm TypeVariableShadowingInForallError
+ Hydra.Dsl.Error.Core: typeVariableShadowingInForallErrorLocation :: TTerm TypeVariableShadowingInForallError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: typeVariableShadowingInForallErrorName :: TTerm TypeVariableShadowingInForallError -> TTerm Name
+ Hydra.Dsl.Error.Core: typeVariableShadowingInForallErrorWithLocation :: TTerm TypeVariableShadowingInForallError -> TTerm SubtermPath -> TTerm TypeVariableShadowingInForallError
+ Hydra.Dsl.Error.Core: typeVariableShadowingInForallErrorWithName :: TTerm TypeVariableShadowingInForallError -> TTerm Name -> TTerm TypeVariableShadowingInForallError
+ Hydra.Dsl.Error.Core: typeVariableShadowingInTypeLambdaError :: TTerm SubtermPath -> TTerm Name -> TTerm TypeVariableShadowingInTypeLambdaError
+ Hydra.Dsl.Error.Core: typeVariableShadowingInTypeLambdaErrorLocation :: TTerm TypeVariableShadowingInTypeLambdaError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: typeVariableShadowingInTypeLambdaErrorName :: TTerm TypeVariableShadowingInTypeLambdaError -> TTerm Name
+ Hydra.Dsl.Error.Core: typeVariableShadowingInTypeLambdaErrorWithLocation :: TTerm TypeVariableShadowingInTypeLambdaError -> TTerm SubtermPath -> TTerm TypeVariableShadowingInTypeLambdaError
+ Hydra.Dsl.Error.Core: typeVariableShadowingInTypeLambdaErrorWithName :: TTerm TypeVariableShadowingInTypeLambdaError -> TTerm Name -> TTerm TypeVariableShadowingInTypeLambdaError
+ Hydra.Dsl.Error.Core: undefinedFieldError :: TTerm Name -> TTerm Name -> TTerm UndefinedFieldError
+ Hydra.Dsl.Error.Core: undefinedFieldErrorFieldName :: TTerm UndefinedFieldError -> TTerm Name
+ Hydra.Dsl.Error.Core: undefinedFieldErrorTypeName :: TTerm UndefinedFieldError -> TTerm Name
+ Hydra.Dsl.Error.Core: undefinedFieldErrorWithFieldName :: TTerm UndefinedFieldError -> TTerm Name -> TTerm UndefinedFieldError
+ Hydra.Dsl.Error.Core: undefinedFieldErrorWithTypeName :: TTerm UndefinedFieldError -> TTerm Name -> TTerm UndefinedFieldError
+ Hydra.Dsl.Error.Core: undefinedTermVariableError :: TTerm SubtermPath -> TTerm Name -> TTerm UndefinedTermVariableError
+ Hydra.Dsl.Error.Core: undefinedTermVariableErrorLocation :: TTerm UndefinedTermVariableError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: undefinedTermVariableErrorName :: TTerm UndefinedTermVariableError -> TTerm Name
+ Hydra.Dsl.Error.Core: undefinedTermVariableErrorWithLocation :: TTerm UndefinedTermVariableError -> TTerm SubtermPath -> TTerm UndefinedTermVariableError
+ Hydra.Dsl.Error.Core: undefinedTermVariableErrorWithName :: TTerm UndefinedTermVariableError -> TTerm Name -> TTerm UndefinedTermVariableError
+ Hydra.Dsl.Error.Core: undefinedTypeVariableError :: TTerm SubtermPath -> TTerm Name -> TTerm UndefinedTypeVariableError
+ Hydra.Dsl.Error.Core: undefinedTypeVariableErrorLocation :: TTerm UndefinedTypeVariableError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: undefinedTypeVariableErrorName :: TTerm UndefinedTypeVariableError -> TTerm Name
+ Hydra.Dsl.Error.Core: undefinedTypeVariableErrorWithLocation :: TTerm UndefinedTypeVariableError -> TTerm SubtermPath -> TTerm UndefinedTypeVariableError
+ Hydra.Dsl.Error.Core: undefinedTypeVariableErrorWithName :: TTerm UndefinedTypeVariableError -> TTerm Name -> TTerm UndefinedTypeVariableError
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInBindingTypeError :: TTerm SubtermPath -> TTerm Name -> TTerm UndefinedTypeVariableInBindingTypeError
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInBindingTypeErrorLocation :: TTerm UndefinedTypeVariableInBindingTypeError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInBindingTypeErrorName :: TTerm UndefinedTypeVariableInBindingTypeError -> TTerm Name
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInBindingTypeErrorWithLocation :: TTerm UndefinedTypeVariableInBindingTypeError -> TTerm SubtermPath -> TTerm UndefinedTypeVariableInBindingTypeError
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInBindingTypeErrorWithName :: TTerm UndefinedTypeVariableInBindingTypeError -> TTerm Name -> TTerm UndefinedTypeVariableInBindingTypeError
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInLambdaDomainError :: TTerm SubtermPath -> TTerm Name -> TTerm UndefinedTypeVariableInLambdaDomainError
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInLambdaDomainErrorLocation :: TTerm UndefinedTypeVariableInLambdaDomainError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInLambdaDomainErrorName :: TTerm UndefinedTypeVariableInLambdaDomainError -> TTerm Name
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInLambdaDomainErrorWithLocation :: TTerm UndefinedTypeVariableInLambdaDomainError -> TTerm SubtermPath -> TTerm UndefinedTypeVariableInLambdaDomainError
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInLambdaDomainErrorWithName :: TTerm UndefinedTypeVariableInLambdaDomainError -> TTerm Name -> TTerm UndefinedTypeVariableInLambdaDomainError
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInTypeApplicationError :: TTerm SubtermPath -> TTerm Name -> TTerm UndefinedTypeVariableInTypeApplicationError
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInTypeApplicationErrorLocation :: TTerm UndefinedTypeVariableInTypeApplicationError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInTypeApplicationErrorName :: TTerm UndefinedTypeVariableInTypeApplicationError -> TTerm Name
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInTypeApplicationErrorWithLocation :: TTerm UndefinedTypeVariableInTypeApplicationError -> TTerm SubtermPath -> TTerm UndefinedTypeVariableInTypeApplicationError
+ Hydra.Dsl.Error.Core: undefinedTypeVariableInTypeApplicationErrorWithName :: TTerm UndefinedTypeVariableInTypeApplicationError -> TTerm Name -> TTerm UndefinedTypeVariableInTypeApplicationError
+ Hydra.Dsl.Error.Core: unexpectedTermVariantError :: TTerm TermVariant -> TTerm Term -> TTerm UnexpectedTermVariantError
+ Hydra.Dsl.Error.Core: unexpectedTermVariantErrorActualTerm :: TTerm UnexpectedTermVariantError -> TTerm Term
+ Hydra.Dsl.Error.Core: unexpectedTermVariantErrorExpectedVariant :: TTerm UnexpectedTermVariantError -> TTerm TermVariant
+ Hydra.Dsl.Error.Core: unexpectedTermVariantErrorWithActualTerm :: TTerm UnexpectedTermVariantError -> TTerm Term -> TTerm UnexpectedTermVariantError
+ Hydra.Dsl.Error.Core: unexpectedTermVariantErrorWithExpectedVariant :: TTerm UnexpectedTermVariantError -> TTerm TermVariant -> TTerm UnexpectedTermVariantError
+ Hydra.Dsl.Error.Core: unexpectedTypeVariantError :: TTerm TypeVariant -> TTerm Type -> TTerm UnexpectedTypeVariantError
+ Hydra.Dsl.Error.Core: unexpectedTypeVariantErrorActualType :: TTerm UnexpectedTypeVariantError -> TTerm Type
+ Hydra.Dsl.Error.Core: unexpectedTypeVariantErrorExpectedVariant :: TTerm UnexpectedTypeVariantError -> TTerm TypeVariant
+ Hydra.Dsl.Error.Core: unexpectedTypeVariantErrorWithActualType :: TTerm UnexpectedTypeVariantError -> TTerm Type -> TTerm UnexpectedTypeVariantError
+ Hydra.Dsl.Error.Core: unexpectedTypeVariantErrorWithExpectedVariant :: TTerm UnexpectedTypeVariantError -> TTerm TypeVariant -> TTerm UnexpectedTypeVariantError
+ Hydra.Dsl.Error.Core: unknownPrimitiveNameError :: TTerm SubtermPath -> TTerm Name -> TTerm UnknownPrimitiveNameError
+ Hydra.Dsl.Error.Core: unknownPrimitiveNameErrorLocation :: TTerm UnknownPrimitiveNameError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: unknownPrimitiveNameErrorName :: TTerm UnknownPrimitiveNameError -> TTerm Name
+ Hydra.Dsl.Error.Core: unknownPrimitiveNameErrorWithLocation :: TTerm UnknownPrimitiveNameError -> TTerm SubtermPath -> TTerm UnknownPrimitiveNameError
+ Hydra.Dsl.Error.Core: unknownPrimitiveNameErrorWithName :: TTerm UnknownPrimitiveNameError -> TTerm Name -> TTerm UnknownPrimitiveNameError
+ Hydra.Dsl.Error.Core: unnecessaryIdentityApplicationError :: TTerm SubtermPath -> TTerm UnnecessaryIdentityApplicationError
+ Hydra.Dsl.Error.Core: unnecessaryIdentityApplicationErrorLocation :: TTerm UnnecessaryIdentityApplicationError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: unnecessaryIdentityApplicationErrorWithLocation :: TTerm UnnecessaryIdentityApplicationError -> TTerm SubtermPath -> TTerm UnnecessaryIdentityApplicationError
+ Hydra.Dsl.Error.Core: untypedTermVariableError :: TTerm SubtermPath -> TTerm Name -> TTerm UntypedTermVariableError
+ Hydra.Dsl.Error.Core: untypedTermVariableErrorLocation :: TTerm UntypedTermVariableError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: untypedTermVariableErrorName :: TTerm UntypedTermVariableError -> TTerm Name
+ Hydra.Dsl.Error.Core: untypedTermVariableErrorWithLocation :: TTerm UntypedTermVariableError -> TTerm SubtermPath -> TTerm UntypedTermVariableError
+ Hydra.Dsl.Error.Core: untypedTermVariableErrorWithName :: TTerm UntypedTermVariableError -> TTerm Name -> TTerm UntypedTermVariableError
+ Hydra.Dsl.Error.Core: voidInNonBottomPositionError :: TTerm SubtermPath -> TTerm VoidInNonBottomPositionError
+ Hydra.Dsl.Error.Core: voidInNonBottomPositionErrorLocation :: TTerm VoidInNonBottomPositionError -> TTerm SubtermPath
+ Hydra.Dsl.Error.Core: voidInNonBottomPositionErrorWithLocation :: TTerm VoidInNonBottomPositionError -> TTerm SubtermPath -> TTerm VoidInNonBottomPositionError
+ Hydra.Dsl.Error.Packaging: conflictingModuleNamespaceError :: TTerm Namespace -> TTerm Namespace -> TTerm ConflictingModuleNamespaceError
+ Hydra.Dsl.Error.Packaging: conflictingModuleNamespaceErrorFirst :: TTerm ConflictingModuleNamespaceError -> TTerm Namespace
+ Hydra.Dsl.Error.Packaging: conflictingModuleNamespaceErrorSecond :: TTerm ConflictingModuleNamespaceError -> TTerm Namespace
+ Hydra.Dsl.Error.Packaging: conflictingModuleNamespaceErrorWithFirst :: TTerm ConflictingModuleNamespaceError -> TTerm Namespace -> TTerm ConflictingModuleNamespaceError
+ Hydra.Dsl.Error.Packaging: conflictingModuleNamespaceErrorWithSecond :: TTerm ConflictingModuleNamespaceError -> TTerm Namespace -> TTerm ConflictingModuleNamespaceError
+ Hydra.Dsl.Error.Packaging: conflictingVariantNameError :: TTerm Namespace -> TTerm Name -> TTerm Name -> TTerm Name -> TTerm ConflictingVariantNameError
+ Hydra.Dsl.Error.Packaging: conflictingVariantNameErrorConflictingName :: TTerm ConflictingVariantNameError -> TTerm Name
+ Hydra.Dsl.Error.Packaging: conflictingVariantNameErrorNamespace :: TTerm ConflictingVariantNameError -> TTerm Namespace
+ Hydra.Dsl.Error.Packaging: conflictingVariantNameErrorTypeName :: TTerm ConflictingVariantNameError -> TTerm Name
+ Hydra.Dsl.Error.Packaging: conflictingVariantNameErrorVariantName :: TTerm ConflictingVariantNameError -> TTerm Name
+ Hydra.Dsl.Error.Packaging: conflictingVariantNameErrorWithConflictingName :: TTerm ConflictingVariantNameError -> TTerm Name -> TTerm ConflictingVariantNameError
+ Hydra.Dsl.Error.Packaging: conflictingVariantNameErrorWithNamespace :: TTerm ConflictingVariantNameError -> TTerm Namespace -> TTerm ConflictingVariantNameError
+ Hydra.Dsl.Error.Packaging: conflictingVariantNameErrorWithTypeName :: TTerm ConflictingVariantNameError -> TTerm Name -> TTerm ConflictingVariantNameError
+ Hydra.Dsl.Error.Packaging: conflictingVariantNameErrorWithVariantName :: TTerm ConflictingVariantNameError -> TTerm Name -> TTerm ConflictingVariantNameError
+ Hydra.Dsl.Error.Packaging: definitionNotInModuleNamespaceError :: TTerm Namespace -> TTerm Name -> TTerm DefinitionNotInModuleNamespaceError
+ Hydra.Dsl.Error.Packaging: definitionNotInModuleNamespaceErrorName :: TTerm DefinitionNotInModuleNamespaceError -> TTerm Name
+ Hydra.Dsl.Error.Packaging: definitionNotInModuleNamespaceErrorNamespace :: TTerm DefinitionNotInModuleNamespaceError -> TTerm Namespace
+ Hydra.Dsl.Error.Packaging: definitionNotInModuleNamespaceErrorWithName :: TTerm DefinitionNotInModuleNamespaceError -> TTerm Name -> TTerm DefinitionNotInModuleNamespaceError
+ Hydra.Dsl.Error.Packaging: definitionNotInModuleNamespaceErrorWithNamespace :: TTerm DefinitionNotInModuleNamespaceError -> TTerm Namespace -> TTerm DefinitionNotInModuleNamespaceError
+ Hydra.Dsl.Error.Packaging: duplicateDefinitionNameError :: TTerm Namespace -> TTerm Name -> TTerm DuplicateDefinitionNameError
+ Hydra.Dsl.Error.Packaging: duplicateDefinitionNameErrorName :: TTerm DuplicateDefinitionNameError -> TTerm Name
+ Hydra.Dsl.Error.Packaging: duplicateDefinitionNameErrorNamespace :: TTerm DuplicateDefinitionNameError -> TTerm Namespace
+ Hydra.Dsl.Error.Packaging: duplicateDefinitionNameErrorWithName :: TTerm DuplicateDefinitionNameError -> TTerm Name -> TTerm DuplicateDefinitionNameError
+ Hydra.Dsl.Error.Packaging: duplicateDefinitionNameErrorWithNamespace :: TTerm DuplicateDefinitionNameError -> TTerm Namespace -> TTerm DuplicateDefinitionNameError
+ Hydra.Dsl.Error.Packaging: duplicateModuleNamespaceError :: TTerm Namespace -> TTerm DuplicateModuleNamespaceError
+ Hydra.Dsl.Error.Packaging: duplicateModuleNamespaceErrorNamespace :: TTerm DuplicateModuleNamespaceError -> TTerm Namespace
+ Hydra.Dsl.Error.Packaging: duplicateModuleNamespaceErrorWithNamespace :: TTerm DuplicateModuleNamespaceError -> TTerm Namespace -> TTerm DuplicateModuleNamespaceError
+ Hydra.Dsl.Error.Packaging: invalidModuleErrorConflictingVariantName :: TTerm ConflictingVariantNameError -> TTerm InvalidModuleError
+ Hydra.Dsl.Error.Packaging: invalidModuleErrorDefinitionNotInModuleNamespace :: TTerm DefinitionNotInModuleNamespaceError -> TTerm InvalidModuleError
+ Hydra.Dsl.Error.Packaging: invalidModuleErrorDuplicateDefinitionName :: TTerm DuplicateDefinitionNameError -> TTerm InvalidModuleError
+ Hydra.Dsl.Error.Packaging: invalidPackageErrorConflictingModuleNamespace :: TTerm ConflictingModuleNamespaceError -> TTerm InvalidPackageError
+ Hydra.Dsl.Error.Packaging: invalidPackageErrorDuplicateModuleNamespace :: TTerm DuplicateModuleNamespaceError -> TTerm InvalidPackageError
+ Hydra.Dsl.Error.Packaging: invalidPackageErrorInvalidModule :: TTerm InvalidModuleError -> TTerm InvalidPackageError
+ Hydra.Dsl.Errors: decodingError :: TTerm String -> TTerm DecodingError
+ Hydra.Dsl.Errors: errorChecking :: TTerm CheckingError -> TTerm Error
+ Hydra.Dsl.Errors: errorDecoding :: TTerm DecodingError -> TTerm Error
+ Hydra.Dsl.Errors: errorDuplicateBinding :: TTerm DuplicateBindingError -> TTerm Error
+ Hydra.Dsl.Errors: errorDuplicateField :: TTerm DuplicateFieldError -> TTerm Error
+ Hydra.Dsl.Errors: errorOther :: TTerm OtherError -> TTerm Error
+ Hydra.Dsl.Errors: errorUndefinedField :: TTerm UndefinedFieldError -> TTerm Error
+ Hydra.Dsl.Errors: errorUndefinedTermVariable :: TTerm UndefinedTermVariableError -> TTerm Error
+ Hydra.Dsl.Errors: errorUnexpectedTermVariant :: TTerm UnexpectedTermVariantError -> TTerm Error
+ Hydra.Dsl.Errors: errorUnexpectedTypeVariant :: TTerm UnexpectedTypeVariantError -> TTerm Error
+ Hydra.Dsl.Errors: errorUnification :: TTerm UnificationError -> TTerm Error
+ Hydra.Dsl.Errors: errorUntypedTermVariable :: TTerm UntypedTermVariableError -> TTerm Error
+ Hydra.Dsl.Errors: otherError :: TTerm String -> TTerm OtherError
+ Hydra.Dsl.Errors: unDecodingError :: TTerm DecodingError -> TTerm String
+ Hydra.Dsl.Errors: unOtherError :: TTerm OtherError -> TTerm String
+ Hydra.Dsl.Errors: unificationError :: TTerm Type -> TTerm Type -> TTerm String -> TTerm UnificationError
+ Hydra.Dsl.Errors: unificationErrorLeftType :: TTerm UnificationError -> TTerm Type
+ Hydra.Dsl.Errors: unificationErrorMessage :: TTerm UnificationError -> TTerm String
+ Hydra.Dsl.Errors: unificationErrorRightType :: TTerm UnificationError -> TTerm Type
+ Hydra.Dsl.Errors: unificationErrorWithLeftType :: TTerm UnificationError -> TTerm Type -> TTerm UnificationError
+ Hydra.Dsl.Errors: unificationErrorWithMessage :: TTerm UnificationError -> TTerm String -> TTerm UnificationError
+ Hydra.Dsl.Errors: unificationErrorWithRightType :: TTerm UnificationError -> TTerm Type -> TTerm UnificationError
+ Hydra.Dsl.Ext.Haskell.Syntax: alternative :: TTerm Pattern -> TTerm CaseRhs -> TTerm (Maybe LocalBindings) -> TTerm Alternative
+ Hydra.Dsl.Ext.Haskell.Syntax: alternativeBinds :: TTerm Alternative -> TTerm (Maybe LocalBindings)
+ Hydra.Dsl.Ext.Haskell.Syntax: alternativePattern :: TTerm Alternative -> TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: alternativeRhs :: TTerm Alternative -> TTerm CaseRhs
+ Hydra.Dsl.Ext.Haskell.Syntax: alternativeWithBinds :: TTerm Alternative -> TTerm (Maybe LocalBindings) -> TTerm Alternative
+ Hydra.Dsl.Ext.Haskell.Syntax: alternativeWithPattern :: TTerm Alternative -> TTerm Pattern -> TTerm Alternative
+ Hydra.Dsl.Ext.Haskell.Syntax: alternativeWithRhs :: TTerm Alternative -> TTerm CaseRhs -> TTerm Alternative
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationDeclarationHead :: TTerm DeclarationHead -> TTerm Variable -> TTerm ApplicationDeclarationHead
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationDeclarationHeadFunction :: TTerm ApplicationDeclarationHead -> TTerm DeclarationHead
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationDeclarationHeadOperand :: TTerm ApplicationDeclarationHead -> TTerm Variable
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationDeclarationHeadWithFunction :: TTerm ApplicationDeclarationHead -> TTerm DeclarationHead -> TTerm ApplicationDeclarationHead
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationDeclarationHeadWithOperand :: TTerm ApplicationDeclarationHead -> TTerm Variable -> TTerm ApplicationDeclarationHead
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationExpression :: TTerm Expression -> TTerm Expression -> TTerm ApplicationExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationExpressionArgument :: TTerm ApplicationExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationExpressionFunction :: TTerm ApplicationExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationExpressionWithArgument :: TTerm ApplicationExpression -> TTerm Expression -> TTerm ApplicationExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationExpressionWithFunction :: TTerm ApplicationExpression -> TTerm Expression -> TTerm ApplicationExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationPattern :: TTerm Name -> TTerm [Pattern] -> TTerm ApplicationPattern
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationPatternArgs :: TTerm ApplicationPattern -> TTerm [Pattern]
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationPatternName :: TTerm ApplicationPattern -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationPatternWithArgs :: TTerm ApplicationPattern -> TTerm [Pattern] -> TTerm ApplicationPattern
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationPatternWithName :: TTerm ApplicationPattern -> TTerm Name -> TTerm ApplicationPattern
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationType :: TTerm Type -> TTerm Type -> TTerm ApplicationType
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationTypeArgument :: TTerm ApplicationType -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationTypeContext :: TTerm ApplicationType -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationTypeWithArgument :: TTerm ApplicationType -> TTerm Type -> TTerm ApplicationType
+ Hydra.Dsl.Ext.Haskell.Syntax: applicationTypeWithContext :: TTerm ApplicationType -> TTerm Type -> TTerm ApplicationType
+ Hydra.Dsl.Ext.Haskell.Syntax: asPattern :: TTerm Name -> TTerm Pattern -> TTerm AsPattern
+ Hydra.Dsl.Ext.Haskell.Syntax: asPatternInner :: TTerm AsPattern -> TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: asPatternName :: TTerm AsPattern -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: asPatternWithInner :: TTerm AsPattern -> TTerm Pattern -> TTerm AsPattern
+ Hydra.Dsl.Ext.Haskell.Syntax: asPatternWithName :: TTerm AsPattern -> TTerm Name -> TTerm AsPattern
+ Hydra.Dsl.Ext.Haskell.Syntax: assertionClass :: TTerm ClassAssertion -> TTerm Assertion
+ Hydra.Dsl.Ext.Haskell.Syntax: assertionTuple :: TTerm [Assertion] -> TTerm Assertion
+ Hydra.Dsl.Ext.Haskell.Syntax: caseExpression :: TTerm Expression -> TTerm [Alternative] -> TTerm CaseExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: caseExpressionAlternatives :: TTerm CaseExpression -> TTerm [Alternative]
+ Hydra.Dsl.Ext.Haskell.Syntax: caseExpressionCase :: TTerm CaseExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: caseExpressionWithAlternatives :: TTerm CaseExpression -> TTerm [Alternative] -> TTerm CaseExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: caseExpressionWithCase :: TTerm CaseExpression -> TTerm Expression -> TTerm CaseExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: caseRhs :: TTerm Expression -> TTerm CaseRhs
+ Hydra.Dsl.Ext.Haskell.Syntax: classAssertion :: TTerm Name -> TTerm [Type] -> TTerm ClassAssertion
+ Hydra.Dsl.Ext.Haskell.Syntax: classAssertionName :: TTerm ClassAssertion -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: classAssertionTypes :: TTerm ClassAssertion -> TTerm [Type]
+ Hydra.Dsl.Ext.Haskell.Syntax: classAssertionWithName :: TTerm ClassAssertion -> TTerm Name -> TTerm ClassAssertion
+ Hydra.Dsl.Ext.Haskell.Syntax: classAssertionWithTypes :: TTerm ClassAssertion -> TTerm [Type] -> TTerm ClassAssertion
+ Hydra.Dsl.Ext.Haskell.Syntax: constructRecordExpression :: TTerm Name -> TTerm [FieldUpdate] -> TTerm ConstructRecordExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: constructRecordExpressionFields :: TTerm ConstructRecordExpression -> TTerm [FieldUpdate]
+ Hydra.Dsl.Ext.Haskell.Syntax: constructRecordExpressionName :: TTerm ConstructRecordExpression -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: constructRecordExpressionWithFields :: TTerm ConstructRecordExpression -> TTerm [FieldUpdate] -> TTerm ConstructRecordExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: constructRecordExpressionWithName :: TTerm ConstructRecordExpression -> TTerm Name -> TTerm ConstructRecordExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: constructorOrdinary :: TTerm OrdinaryConstructor -> TTerm Constructor
+ Hydra.Dsl.Ext.Haskell.Syntax: constructorRecord :: TTerm RecordConstructor -> TTerm Constructor
+ Hydra.Dsl.Ext.Haskell.Syntax: constructorWithComments :: TTerm Constructor -> TTerm (Maybe String) -> TTerm ConstructorWithComments
+ Hydra.Dsl.Ext.Haskell.Syntax: constructorWithCommentsBody :: TTerm ConstructorWithComments -> TTerm Constructor
+ Hydra.Dsl.Ext.Haskell.Syntax: constructorWithCommentsComments :: TTerm ConstructorWithComments -> TTerm (Maybe String)
+ Hydra.Dsl.Ext.Haskell.Syntax: constructorWithCommentsWithBody :: TTerm ConstructorWithComments -> TTerm Constructor -> TTerm ConstructorWithComments
+ Hydra.Dsl.Ext.Haskell.Syntax: constructorWithCommentsWithComments :: TTerm ConstructorWithComments -> TTerm (Maybe String) -> TTerm ConstructorWithComments
+ Hydra.Dsl.Ext.Haskell.Syntax: contextType :: TTerm Assertion -> TTerm Type -> TTerm ContextType
+ Hydra.Dsl.Ext.Haskell.Syntax: contextTypeCtx :: TTerm ContextType -> TTerm Assertion
+ Hydra.Dsl.Ext.Haskell.Syntax: contextTypeType :: TTerm ContextType -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: contextTypeWithCtx :: TTerm ContextType -> TTerm Assertion -> TTerm ContextType
+ Hydra.Dsl.Ext.Haskell.Syntax: contextTypeWithType :: TTerm ContextType -> TTerm Type -> TTerm ContextType
+ Hydra.Dsl.Ext.Haskell.Syntax: dataDeclaration :: TTerm DataOrNewtype -> TTerm [Assertion] -> TTerm DeclarationHead -> TTerm [ConstructorWithComments] -> TTerm [Deriving] -> TTerm DataDeclaration
+ Hydra.Dsl.Ext.Haskell.Syntax: dataDeclarationConstructors :: TTerm DataDeclaration -> TTerm [ConstructorWithComments]
+ Hydra.Dsl.Ext.Haskell.Syntax: dataDeclarationContext :: TTerm DataDeclaration -> TTerm [Assertion]
+ Hydra.Dsl.Ext.Haskell.Syntax: dataDeclarationDeriving :: TTerm DataDeclaration -> TTerm [Deriving]
+ Hydra.Dsl.Ext.Haskell.Syntax: dataDeclarationHead :: TTerm DataDeclaration -> TTerm DeclarationHead
+ Hydra.Dsl.Ext.Haskell.Syntax: dataDeclarationKeyword :: TTerm DataDeclaration -> TTerm DataOrNewtype
+ Hydra.Dsl.Ext.Haskell.Syntax: dataDeclarationWithConstructors :: TTerm DataDeclaration -> TTerm [ConstructorWithComments] -> TTerm DataDeclaration
+ Hydra.Dsl.Ext.Haskell.Syntax: dataDeclarationWithContext :: TTerm DataDeclaration -> TTerm [Assertion] -> TTerm DataDeclaration
+ Hydra.Dsl.Ext.Haskell.Syntax: dataDeclarationWithDeriving :: TTerm DataDeclaration -> TTerm [Deriving] -> TTerm DataDeclaration
+ Hydra.Dsl.Ext.Haskell.Syntax: dataDeclarationWithHead :: TTerm DataDeclaration -> TTerm DeclarationHead -> TTerm DataDeclaration
+ Hydra.Dsl.Ext.Haskell.Syntax: dataDeclarationWithKeyword :: TTerm DataDeclaration -> TTerm DataOrNewtype -> TTerm DataDeclaration
+ Hydra.Dsl.Ext.Haskell.Syntax: dataOrNewtypeData :: TTerm DataOrNewtype
+ Hydra.Dsl.Ext.Haskell.Syntax: dataOrNewtypeNewtype :: TTerm DataOrNewtype
+ Hydra.Dsl.Ext.Haskell.Syntax: declarationData :: TTerm DataDeclaration -> TTerm Declaration
+ Hydra.Dsl.Ext.Haskell.Syntax: declarationHeadApplication :: TTerm ApplicationDeclarationHead -> TTerm DeclarationHead
+ Hydra.Dsl.Ext.Haskell.Syntax: declarationHeadParens :: TTerm DeclarationHead -> TTerm DeclarationHead
+ Hydra.Dsl.Ext.Haskell.Syntax: declarationHeadSimple :: TTerm Name -> TTerm DeclarationHead
+ Hydra.Dsl.Ext.Haskell.Syntax: declarationType :: TTerm TypeDeclaration -> TTerm Declaration
+ Hydra.Dsl.Ext.Haskell.Syntax: declarationTypedBinding :: TTerm TypedBinding -> TTerm Declaration
+ Hydra.Dsl.Ext.Haskell.Syntax: declarationValueBinding :: TTerm ValueBinding -> TTerm Declaration
+ Hydra.Dsl.Ext.Haskell.Syntax: declarationWithComments :: TTerm Declaration -> TTerm (Maybe String) -> TTerm DeclarationWithComments
+ Hydra.Dsl.Ext.Haskell.Syntax: declarationWithCommentsBody :: TTerm DeclarationWithComments -> TTerm Declaration
+ Hydra.Dsl.Ext.Haskell.Syntax: declarationWithCommentsComments :: TTerm DeclarationWithComments -> TTerm (Maybe String)
+ Hydra.Dsl.Ext.Haskell.Syntax: declarationWithCommentsWithBody :: TTerm DeclarationWithComments -> TTerm Declaration -> TTerm DeclarationWithComments
+ Hydra.Dsl.Ext.Haskell.Syntax: declarationWithCommentsWithComments :: TTerm DeclarationWithComments -> TTerm (Maybe String) -> TTerm DeclarationWithComments
+ Hydra.Dsl.Ext.Haskell.Syntax: deriving_ :: TTerm [Name] -> TTerm Deriving
+ Hydra.Dsl.Ext.Haskell.Syntax: exportDeclaration :: TTerm ImportExportSpec -> TTerm Export
+ Hydra.Dsl.Ext.Haskell.Syntax: exportModule :: TTerm ModuleName -> TTerm Export
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionApplication :: TTerm ApplicationExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionCase :: TTerm CaseExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionConstructRecord :: TTerm ConstructRecordExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionDo :: TTerm [Statement] -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionIf :: TTerm IfExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionInfixApplication :: TTerm InfixApplicationExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionLambda :: TTerm LambdaExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionLeftSection :: TTerm SectionExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionLet :: TTerm LetExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionList :: TTerm [Expression] -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionLiteral :: TTerm Literal -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionParens :: TTerm Expression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionPrefixApplication :: TTerm PrefixApplicationExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionRightSection :: TTerm SectionExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionTuple :: TTerm [Expression] -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionTypeSignature :: TTerm TypeSignatureExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionUpdateRecord :: TTerm UpdateRecordExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: expressionVariable :: TTerm Name -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: field :: TTerm Name -> TTerm Type -> TTerm Field
+ Hydra.Dsl.Ext.Haskell.Syntax: fieldName :: TTerm Field -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: fieldType :: TTerm Field -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: fieldUpdate :: TTerm Name -> TTerm Expression -> TTerm FieldUpdate
+ Hydra.Dsl.Ext.Haskell.Syntax: fieldUpdateName :: TTerm FieldUpdate -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: fieldUpdateValue :: TTerm FieldUpdate -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: fieldUpdateWithName :: TTerm FieldUpdate -> TTerm Name -> TTerm FieldUpdate
+ Hydra.Dsl.Ext.Haskell.Syntax: fieldUpdateWithValue :: TTerm FieldUpdate -> TTerm Expression -> TTerm FieldUpdate
+ Hydra.Dsl.Ext.Haskell.Syntax: fieldWithComments :: TTerm Field -> TTerm (Maybe String) -> TTerm FieldWithComments
+ Hydra.Dsl.Ext.Haskell.Syntax: fieldWithCommentsComments :: TTerm FieldWithComments -> TTerm (Maybe String)
+ Hydra.Dsl.Ext.Haskell.Syntax: fieldWithCommentsField :: TTerm FieldWithComments -> TTerm Field
+ Hydra.Dsl.Ext.Haskell.Syntax: fieldWithCommentsWithComments :: TTerm FieldWithComments -> TTerm (Maybe String) -> TTerm FieldWithComments
+ Hydra.Dsl.Ext.Haskell.Syntax: fieldWithCommentsWithField :: TTerm FieldWithComments -> TTerm Field -> TTerm FieldWithComments
+ Hydra.Dsl.Ext.Haskell.Syntax: fieldWithName :: TTerm Field -> TTerm Name -> TTerm Field
+ Hydra.Dsl.Ext.Haskell.Syntax: fieldWithType :: TTerm Field -> TTerm Type -> TTerm Field
+ Hydra.Dsl.Ext.Haskell.Syntax: functionType :: TTerm Type -> TTerm Type -> TTerm FunctionType
+ Hydra.Dsl.Ext.Haskell.Syntax: functionTypeCodomain :: TTerm FunctionType -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: functionTypeDomain :: TTerm FunctionType -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: functionTypeWithCodomain :: TTerm FunctionType -> TTerm Type -> TTerm FunctionType
+ Hydra.Dsl.Ext.Haskell.Syntax: functionTypeWithDomain :: TTerm FunctionType -> TTerm Type -> TTerm FunctionType
+ Hydra.Dsl.Ext.Haskell.Syntax: ifExpression :: TTerm Expression -> TTerm Expression -> TTerm Expression -> TTerm IfExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: ifExpressionCondition :: TTerm IfExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: ifExpressionElse :: TTerm IfExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: ifExpressionThen :: TTerm IfExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: ifExpressionWithCondition :: TTerm IfExpression -> TTerm Expression -> TTerm IfExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: ifExpressionWithElse :: TTerm IfExpression -> TTerm Expression -> TTerm IfExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: ifExpressionWithThen :: TTerm IfExpression -> TTerm Expression -> TTerm IfExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: importAs :: TTerm Import -> TTerm (Maybe ModuleName)
+ Hydra.Dsl.Ext.Haskell.Syntax: importExportSpec :: TTerm (Maybe ImportModifier) -> TTerm Name -> TTerm (Maybe SubspecImportExportSpec) -> TTerm ImportExportSpec
+ Hydra.Dsl.Ext.Haskell.Syntax: importExportSpecModifier :: TTerm ImportExportSpec -> TTerm (Maybe ImportModifier)
+ Hydra.Dsl.Ext.Haskell.Syntax: importExportSpecName :: TTerm ImportExportSpec -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: importExportSpecSubspec :: TTerm ImportExportSpec -> TTerm (Maybe SubspecImportExportSpec)
+ Hydra.Dsl.Ext.Haskell.Syntax: importExportSpecWithModifier :: TTerm ImportExportSpec -> TTerm (Maybe ImportModifier) -> TTerm ImportExportSpec
+ Hydra.Dsl.Ext.Haskell.Syntax: importExportSpecWithName :: TTerm ImportExportSpec -> TTerm Name -> TTerm ImportExportSpec
+ Hydra.Dsl.Ext.Haskell.Syntax: importExportSpecWithSubspec :: TTerm ImportExportSpec -> TTerm (Maybe SubspecImportExportSpec) -> TTerm ImportExportSpec
+ Hydra.Dsl.Ext.Haskell.Syntax: importModifierPattern :: TTerm ImportModifier
+ Hydra.Dsl.Ext.Haskell.Syntax: importModifierType :: TTerm ImportModifier
+ Hydra.Dsl.Ext.Haskell.Syntax: importModule :: TTerm Import -> TTerm ModuleName
+ Hydra.Dsl.Ext.Haskell.Syntax: importQualified :: TTerm Import -> TTerm Bool
+ Hydra.Dsl.Ext.Haskell.Syntax: importSpec :: TTerm Import -> TTerm (Maybe SpecImport)
+ Hydra.Dsl.Ext.Haskell.Syntax: importWithAs :: TTerm Import -> TTerm (Maybe ModuleName) -> TTerm Import
+ Hydra.Dsl.Ext.Haskell.Syntax: importWithModule :: TTerm Import -> TTerm ModuleName -> TTerm Import
+ Hydra.Dsl.Ext.Haskell.Syntax: importWithQualified :: TTerm Import -> TTerm Bool -> TTerm Import
+ Hydra.Dsl.Ext.Haskell.Syntax: importWithSpec :: TTerm Import -> TTerm (Maybe SpecImport) -> TTerm Import
+ Hydra.Dsl.Ext.Haskell.Syntax: import_ :: TTerm Bool -> TTerm ModuleName -> TTerm (Maybe ModuleName) -> TTerm (Maybe SpecImport) -> TTerm Import
+ Hydra.Dsl.Ext.Haskell.Syntax: infixApplicationExpression :: TTerm Expression -> TTerm Operator -> TTerm Expression -> TTerm InfixApplicationExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: infixApplicationExpressionLhs :: TTerm InfixApplicationExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: infixApplicationExpressionOperator :: TTerm InfixApplicationExpression -> TTerm Operator
+ Hydra.Dsl.Ext.Haskell.Syntax: infixApplicationExpressionRhs :: TTerm InfixApplicationExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: infixApplicationExpressionWithLhs :: TTerm InfixApplicationExpression -> TTerm Expression -> TTerm InfixApplicationExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: infixApplicationExpressionWithOperator :: TTerm InfixApplicationExpression -> TTerm Operator -> TTerm InfixApplicationExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: infixApplicationExpressionWithRhs :: TTerm InfixApplicationExpression -> TTerm Expression -> TTerm InfixApplicationExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: infixType :: TTerm Type -> TTerm Operator -> TTerm Operator -> TTerm InfixType
+ Hydra.Dsl.Ext.Haskell.Syntax: infixTypeLhs :: TTerm InfixType -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: infixTypeOperator :: TTerm InfixType -> TTerm Operator
+ Hydra.Dsl.Ext.Haskell.Syntax: infixTypeRhs :: TTerm InfixType -> TTerm Operator
+ Hydra.Dsl.Ext.Haskell.Syntax: infixTypeWithLhs :: TTerm InfixType -> TTerm Type -> TTerm InfixType
+ Hydra.Dsl.Ext.Haskell.Syntax: infixTypeWithOperator :: TTerm InfixType -> TTerm Operator -> TTerm InfixType
+ Hydra.Dsl.Ext.Haskell.Syntax: infixTypeWithRhs :: TTerm InfixType -> TTerm Operator -> TTerm InfixType
+ Hydra.Dsl.Ext.Haskell.Syntax: lambdaExpression :: TTerm [Pattern] -> TTerm Expression -> TTerm LambdaExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: lambdaExpressionBindings :: TTerm LambdaExpression -> TTerm [Pattern]
+ Hydra.Dsl.Ext.Haskell.Syntax: lambdaExpressionInner :: TTerm LambdaExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: lambdaExpressionWithBindings :: TTerm LambdaExpression -> TTerm [Pattern] -> TTerm LambdaExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: lambdaExpressionWithInner :: TTerm LambdaExpression -> TTerm Expression -> TTerm LambdaExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: letExpression :: TTerm [LocalBinding] -> TTerm Expression -> TTerm LetExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: letExpressionBindings :: TTerm LetExpression -> TTerm [LocalBinding]
+ Hydra.Dsl.Ext.Haskell.Syntax: letExpressionInner :: TTerm LetExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: letExpressionWithBindings :: TTerm LetExpression -> TTerm [LocalBinding] -> TTerm LetExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: letExpressionWithInner :: TTerm LetExpression -> TTerm Expression -> TTerm LetExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: literalChar :: TTerm Int -> TTerm Literal
+ Hydra.Dsl.Ext.Haskell.Syntax: literalDouble :: TTerm Double -> TTerm Literal
+ Hydra.Dsl.Ext.Haskell.Syntax: literalFloat :: TTerm Float -> TTerm Literal
+ Hydra.Dsl.Ext.Haskell.Syntax: literalInt :: TTerm Int -> TTerm Literal
+ Hydra.Dsl.Ext.Haskell.Syntax: literalInteger :: TTerm Integer -> TTerm Literal
+ Hydra.Dsl.Ext.Haskell.Syntax: literalString :: TTerm String -> TTerm Literal
+ Hydra.Dsl.Ext.Haskell.Syntax: localBindingSignature :: TTerm TypeSignature -> TTerm LocalBinding
+ Hydra.Dsl.Ext.Haskell.Syntax: localBindingValue :: TTerm ValueBinding -> TTerm LocalBinding
+ Hydra.Dsl.Ext.Haskell.Syntax: localBindings :: TTerm [LocalBinding] -> TTerm LocalBindings
+ Hydra.Dsl.Ext.Haskell.Syntax: moduleDeclarations :: TTerm Module -> TTerm [DeclarationWithComments]
+ Hydra.Dsl.Ext.Haskell.Syntax: moduleHead :: TTerm Module -> TTerm (Maybe ModuleHead)
+ Hydra.Dsl.Ext.Haskell.Syntax: moduleHeadComments :: TTerm ModuleHead -> TTerm (Maybe String)
+ Hydra.Dsl.Ext.Haskell.Syntax: moduleHeadExports :: TTerm ModuleHead -> TTerm [Export]
+ Hydra.Dsl.Ext.Haskell.Syntax: moduleHeadName :: TTerm ModuleHead -> TTerm ModuleName
+ Hydra.Dsl.Ext.Haskell.Syntax: moduleHeadWithComments :: TTerm ModuleHead -> TTerm (Maybe String) -> TTerm ModuleHead
+ Hydra.Dsl.Ext.Haskell.Syntax: moduleHeadWithExports :: TTerm ModuleHead -> TTerm [Export] -> TTerm ModuleHead
+ Hydra.Dsl.Ext.Haskell.Syntax: moduleHeadWithName :: TTerm ModuleHead -> TTerm ModuleName -> TTerm ModuleHead
+ Hydra.Dsl.Ext.Haskell.Syntax: moduleHead_ :: TTerm (Maybe String) -> TTerm ModuleName -> TTerm [Export] -> TTerm ModuleHead
+ Hydra.Dsl.Ext.Haskell.Syntax: moduleImports :: TTerm Module -> TTerm [Import]
+ Hydra.Dsl.Ext.Haskell.Syntax: moduleName :: TTerm String -> TTerm ModuleName
+ Hydra.Dsl.Ext.Haskell.Syntax: moduleWithDeclarations :: TTerm Module -> TTerm [DeclarationWithComments] -> TTerm Module
+ Hydra.Dsl.Ext.Haskell.Syntax: moduleWithHead :: TTerm Module -> TTerm (Maybe ModuleHead) -> TTerm Module
+ Hydra.Dsl.Ext.Haskell.Syntax: moduleWithImports :: TTerm Module -> TTerm [Import] -> TTerm Module
+ Hydra.Dsl.Ext.Haskell.Syntax: module_ :: TTerm (Maybe ModuleHead) -> TTerm [Import] -> TTerm [DeclarationWithComments] -> TTerm Module
+ Hydra.Dsl.Ext.Haskell.Syntax: nameImplicit :: TTerm QualifiedName -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: nameNormal :: TTerm QualifiedName -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: nameParens :: TTerm QualifiedName -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: namePart :: TTerm String -> TTerm NamePart
+ Hydra.Dsl.Ext.Haskell.Syntax: operatorBacktick :: TTerm QualifiedName -> TTerm Operator
+ Hydra.Dsl.Ext.Haskell.Syntax: operatorNormal :: TTerm QualifiedName -> TTerm Operator
+ Hydra.Dsl.Ext.Haskell.Syntax: ordinaryConstructor :: TTerm Name -> TTerm [Type] -> TTerm OrdinaryConstructor
+ Hydra.Dsl.Ext.Haskell.Syntax: ordinaryConstructorFields :: TTerm OrdinaryConstructor -> TTerm [Type]
+ Hydra.Dsl.Ext.Haskell.Syntax: ordinaryConstructorName :: TTerm OrdinaryConstructor -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: ordinaryConstructorWithFields :: TTerm OrdinaryConstructor -> TTerm [Type] -> TTerm OrdinaryConstructor
+ Hydra.Dsl.Ext.Haskell.Syntax: ordinaryConstructorWithName :: TTerm OrdinaryConstructor -> TTerm Name -> TTerm OrdinaryConstructor
+ Hydra.Dsl.Ext.Haskell.Syntax: patternApplication :: TTerm ApplicationPattern -> TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: patternAs :: TTerm AsPattern -> TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: patternField :: TTerm Name -> TTerm Pattern -> TTerm PatternField
+ Hydra.Dsl.Ext.Haskell.Syntax: patternFieldName :: TTerm PatternField -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: patternFieldPattern :: TTerm PatternField -> TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: patternFieldWithName :: TTerm PatternField -> TTerm Name -> TTerm PatternField
+ Hydra.Dsl.Ext.Haskell.Syntax: patternFieldWithPattern :: TTerm PatternField -> TTerm Pattern -> TTerm PatternField
+ Hydra.Dsl.Ext.Haskell.Syntax: patternList :: TTerm [Pattern] -> TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: patternLiteral :: TTerm Literal -> TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: patternName :: TTerm Name -> TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: patternParens :: TTerm Pattern -> TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: patternRecord :: TTerm RecordPattern -> TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: patternTuple :: TTerm [Pattern] -> TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: patternTyped :: TTerm TypedPattern -> TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: patternWildcard :: TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: prefixApplicationExpression :: TTerm Operator -> TTerm Expression -> TTerm PrefixApplicationExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: prefixApplicationExpressionOperator :: TTerm PrefixApplicationExpression -> TTerm Operator
+ Hydra.Dsl.Ext.Haskell.Syntax: prefixApplicationExpressionRhs :: TTerm PrefixApplicationExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: prefixApplicationExpressionWithOperator :: TTerm PrefixApplicationExpression -> TTerm Operator -> TTerm PrefixApplicationExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: prefixApplicationExpressionWithRhs :: TTerm PrefixApplicationExpression -> TTerm Expression -> TTerm PrefixApplicationExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: qualifiedName :: TTerm [NamePart] -> TTerm NamePart -> TTerm QualifiedName
+ Hydra.Dsl.Ext.Haskell.Syntax: qualifiedNameQualifiers :: TTerm QualifiedName -> TTerm [NamePart]
+ Hydra.Dsl.Ext.Haskell.Syntax: qualifiedNameUnqualified :: TTerm QualifiedName -> TTerm NamePart
+ Hydra.Dsl.Ext.Haskell.Syntax: qualifiedNameWithQualifiers :: TTerm QualifiedName -> TTerm [NamePart] -> TTerm QualifiedName
+ Hydra.Dsl.Ext.Haskell.Syntax: qualifiedNameWithUnqualified :: TTerm QualifiedName -> TTerm NamePart -> TTerm QualifiedName
+ Hydra.Dsl.Ext.Haskell.Syntax: recordConstructor :: TTerm Name -> TTerm [FieldWithComments] -> TTerm RecordConstructor
+ Hydra.Dsl.Ext.Haskell.Syntax: recordConstructorFields :: TTerm RecordConstructor -> TTerm [FieldWithComments]
+ Hydra.Dsl.Ext.Haskell.Syntax: recordConstructorName :: TTerm RecordConstructor -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: recordConstructorWithFields :: TTerm RecordConstructor -> TTerm [FieldWithComments] -> TTerm RecordConstructor
+ Hydra.Dsl.Ext.Haskell.Syntax: recordConstructorWithName :: TTerm RecordConstructor -> TTerm Name -> TTerm RecordConstructor
+ Hydra.Dsl.Ext.Haskell.Syntax: recordPattern :: TTerm Name -> TTerm [PatternField] -> TTerm RecordPattern
+ Hydra.Dsl.Ext.Haskell.Syntax: recordPatternFields :: TTerm RecordPattern -> TTerm [PatternField]
+ Hydra.Dsl.Ext.Haskell.Syntax: recordPatternName :: TTerm RecordPattern -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: recordPatternWithFields :: TTerm RecordPattern -> TTerm [PatternField] -> TTerm RecordPattern
+ Hydra.Dsl.Ext.Haskell.Syntax: recordPatternWithName :: TTerm RecordPattern -> TTerm Name -> TTerm RecordPattern
+ Hydra.Dsl.Ext.Haskell.Syntax: rightHandSide :: TTerm Expression -> TTerm RightHandSide
+ Hydra.Dsl.Ext.Haskell.Syntax: sectionExpression :: TTerm Operator -> TTerm Expression -> TTerm SectionExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: sectionExpressionExpression :: TTerm SectionExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: sectionExpressionOperator :: TTerm SectionExpression -> TTerm Operator
+ Hydra.Dsl.Ext.Haskell.Syntax: sectionExpressionWithExpression :: TTerm SectionExpression -> TTerm Expression -> TTerm SectionExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: sectionExpressionWithOperator :: TTerm SectionExpression -> TTerm Operator -> TTerm SectionExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: simpleValueBinding :: TTerm Pattern -> TTerm RightHandSide -> TTerm (Maybe LocalBindings) -> TTerm SimpleValueBinding
+ Hydra.Dsl.Ext.Haskell.Syntax: simpleValueBindingLocalBindings :: TTerm SimpleValueBinding -> TTerm (Maybe LocalBindings)
+ Hydra.Dsl.Ext.Haskell.Syntax: simpleValueBindingPattern :: TTerm SimpleValueBinding -> TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: simpleValueBindingRhs :: TTerm SimpleValueBinding -> TTerm RightHandSide
+ Hydra.Dsl.Ext.Haskell.Syntax: simpleValueBindingWithLocalBindings :: TTerm SimpleValueBinding -> TTerm (Maybe LocalBindings) -> TTerm SimpleValueBinding
+ Hydra.Dsl.Ext.Haskell.Syntax: simpleValueBindingWithPattern :: TTerm SimpleValueBinding -> TTerm Pattern -> TTerm SimpleValueBinding
+ Hydra.Dsl.Ext.Haskell.Syntax: simpleValueBindingWithRhs :: TTerm SimpleValueBinding -> TTerm RightHandSide -> TTerm SimpleValueBinding
+ Hydra.Dsl.Ext.Haskell.Syntax: specImportHiding :: TTerm [ImportExportSpec] -> TTerm SpecImport
+ Hydra.Dsl.Ext.Haskell.Syntax: specImportList :: TTerm [ImportExportSpec] -> TTerm SpecImport
+ Hydra.Dsl.Ext.Haskell.Syntax: statement :: TTerm Expression -> TTerm Statement
+ Hydra.Dsl.Ext.Haskell.Syntax: subspecImportExportSpecAll :: TTerm SubspecImportExportSpec
+ Hydra.Dsl.Ext.Haskell.Syntax: subspecImportExportSpecList :: TTerm [Name] -> TTerm SubspecImportExportSpec
+ Hydra.Dsl.Ext.Haskell.Syntax: typeApplication :: TTerm ApplicationType -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: typeCtx :: TTerm ContextType -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: typeDeclaration :: TTerm DeclarationHead -> TTerm Type -> TTerm TypeDeclaration
+ Hydra.Dsl.Ext.Haskell.Syntax: typeDeclarationName :: TTerm TypeDeclaration -> TTerm DeclarationHead
+ Hydra.Dsl.Ext.Haskell.Syntax: typeDeclarationType :: TTerm TypeDeclaration -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: typeDeclarationWithName :: TTerm TypeDeclaration -> TTerm DeclarationHead -> TTerm TypeDeclaration
+ Hydra.Dsl.Ext.Haskell.Syntax: typeDeclarationWithType :: TTerm TypeDeclaration -> TTerm Type -> TTerm TypeDeclaration
+ Hydra.Dsl.Ext.Haskell.Syntax: typeFunction :: TTerm FunctionType -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: typeInfix :: TTerm InfixType -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: typeList :: TTerm Type -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: typeParens :: TTerm Type -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: typeSignature :: TTerm Name -> TTerm Type -> TTerm TypeSignature
+ Hydra.Dsl.Ext.Haskell.Syntax: typeSignatureExpression :: TTerm Expression -> TTerm Type -> TTerm TypeSignatureExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: typeSignatureExpressionInner :: TTerm TypeSignatureExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: typeSignatureExpressionType :: TTerm TypeSignatureExpression -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: typeSignatureExpressionWithInner :: TTerm TypeSignatureExpression -> TTerm Expression -> TTerm TypeSignatureExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: typeSignatureExpressionWithType :: TTerm TypeSignatureExpression -> TTerm Type -> TTerm TypeSignatureExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: typeSignatureName :: TTerm TypeSignature -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: typeSignatureType :: TTerm TypeSignature -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: typeSignatureWithName :: TTerm TypeSignature -> TTerm Name -> TTerm TypeSignature
+ Hydra.Dsl.Ext.Haskell.Syntax: typeSignatureWithType :: TTerm TypeSignature -> TTerm Type -> TTerm TypeSignature
+ Hydra.Dsl.Ext.Haskell.Syntax: typeTuple :: TTerm [Type] -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: typeVariable :: TTerm Name -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: typedBinding :: TTerm TypeSignature -> TTerm ValueBinding -> TTerm TypedBinding
+ Hydra.Dsl.Ext.Haskell.Syntax: typedBindingTypeSignature :: TTerm TypedBinding -> TTerm TypeSignature
+ Hydra.Dsl.Ext.Haskell.Syntax: typedBindingValueBinding :: TTerm TypedBinding -> TTerm ValueBinding
+ Hydra.Dsl.Ext.Haskell.Syntax: typedBindingWithTypeSignature :: TTerm TypedBinding -> TTerm TypeSignature -> TTerm TypedBinding
+ Hydra.Dsl.Ext.Haskell.Syntax: typedBindingWithValueBinding :: TTerm TypedBinding -> TTerm ValueBinding -> TTerm TypedBinding
+ Hydra.Dsl.Ext.Haskell.Syntax: typedPattern :: TTerm Pattern -> TTerm Type -> TTerm TypedPattern
+ Hydra.Dsl.Ext.Haskell.Syntax: typedPatternInner :: TTerm TypedPattern -> TTerm Pattern
+ Hydra.Dsl.Ext.Haskell.Syntax: typedPatternType :: TTerm TypedPattern -> TTerm Type
+ Hydra.Dsl.Ext.Haskell.Syntax: typedPatternWithInner :: TTerm TypedPattern -> TTerm Pattern -> TTerm TypedPattern
+ Hydra.Dsl.Ext.Haskell.Syntax: typedPatternWithType :: TTerm TypedPattern -> TTerm Type -> TTerm TypedPattern
+ Hydra.Dsl.Ext.Haskell.Syntax: unCaseRhs :: TTerm CaseRhs -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: unDeriving :: TTerm Deriving -> TTerm [Name]
+ Hydra.Dsl.Ext.Haskell.Syntax: unLocalBindings :: TTerm LocalBindings -> TTerm [LocalBinding]
+ Hydra.Dsl.Ext.Haskell.Syntax: unModuleName :: TTerm ModuleName -> TTerm String
+ Hydra.Dsl.Ext.Haskell.Syntax: unNamePart :: TTerm NamePart -> TTerm String
+ Hydra.Dsl.Ext.Haskell.Syntax: unRightHandSide :: TTerm RightHandSide -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: unStatement :: TTerm Statement -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: unVariable :: TTerm Variable -> TTerm Name
+ Hydra.Dsl.Ext.Haskell.Syntax: updateRecordExpression :: TTerm Expression -> TTerm [FieldUpdate] -> TTerm UpdateRecordExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: updateRecordExpressionFields :: TTerm UpdateRecordExpression -> TTerm [FieldUpdate]
+ Hydra.Dsl.Ext.Haskell.Syntax: updateRecordExpressionInner :: TTerm UpdateRecordExpression -> TTerm Expression
+ Hydra.Dsl.Ext.Haskell.Syntax: updateRecordExpressionWithFields :: TTerm UpdateRecordExpression -> TTerm [FieldUpdate] -> TTerm UpdateRecordExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: updateRecordExpressionWithInner :: TTerm UpdateRecordExpression -> TTerm Expression -> TTerm UpdateRecordExpression
+ Hydra.Dsl.Ext.Haskell.Syntax: valueBindingSimple :: TTerm SimpleValueBinding -> TTerm ValueBinding
+ Hydra.Dsl.Ext.Haskell.Syntax: variable :: TTerm Name -> TTerm Variable
+ Hydra.Dsl.Ext.Org.Yaml.Model: nodeMapping :: TTerm (Map Node Node) -> TTerm Node
+ Hydra.Dsl.Ext.Org.Yaml.Model: nodeScalar :: TTerm Scalar -> TTerm Node
+ Hydra.Dsl.Ext.Org.Yaml.Model: nodeSequence :: TTerm [Node] -> TTerm Node
+ Hydra.Dsl.Ext.Org.Yaml.Model: scalarBool :: TTerm Bool -> TTerm Scalar
+ Hydra.Dsl.Ext.Org.Yaml.Model: scalarFloat :: TTerm Double -> TTerm Scalar
+ Hydra.Dsl.Ext.Org.Yaml.Model: scalarInt :: TTerm Integer -> TTerm Scalar
+ Hydra.Dsl.Ext.Org.Yaml.Model: scalarNull :: TTerm Scalar
+ Hydra.Dsl.Ext.Org.Yaml.Model: scalarStr :: TTerm String -> TTerm Scalar
+ Hydra.Dsl.Graph: graph :: TTerm (Map Name Term) -> TTerm (Map Name TypeScheme) -> TTerm (Map Name TypeVariableMetadata) -> TTerm (Set Name) -> TTerm (Map Name Term) -> TTerm (Map Name Primitive) -> TTerm (Map Name TypeScheme) -> TTerm (Set Name) -> TTerm Graph
+ Hydra.Dsl.Graph: graphBoundTerms :: TTerm Graph -> TTerm (Map Name Term)
+ Hydra.Dsl.Graph: graphBoundTypes :: TTerm Graph -> TTerm (Map Name TypeScheme)
+ Hydra.Dsl.Graph: graphClassConstraints :: TTerm Graph -> TTerm (Map Name TypeVariableMetadata)
+ Hydra.Dsl.Graph: graphLambdaVariables :: TTerm Graph -> TTerm (Set Name)
+ Hydra.Dsl.Graph: graphMetadata :: TTerm Graph -> TTerm (Map Name Term)
+ Hydra.Dsl.Graph: graphPrimitives :: TTerm Graph -> TTerm (Map Name Primitive)
+ Hydra.Dsl.Graph: graphSchemaTypes :: TTerm Graph -> TTerm (Map Name TypeScheme)
+ Hydra.Dsl.Graph: graphTypeVariables :: TTerm Graph -> TTerm (Set Name)
+ Hydra.Dsl.Graph: graphWithBoundTerms :: TTerm Graph -> TTerm (Map Name Term) -> TTerm Graph
+ Hydra.Dsl.Graph: graphWithBoundTypes :: TTerm Graph -> TTerm (Map Name TypeScheme) -> TTerm Graph
+ Hydra.Dsl.Graph: graphWithClassConstraints :: TTerm Graph -> TTerm (Map Name TypeVariableMetadata) -> TTerm Graph
+ Hydra.Dsl.Graph: graphWithLambdaVariables :: TTerm Graph -> TTerm (Set Name) -> TTerm Graph
+ Hydra.Dsl.Graph: graphWithMetadata :: TTerm Graph -> TTerm (Map Name Term) -> TTerm Graph
+ Hydra.Dsl.Graph: graphWithPrimitives :: TTerm Graph -> TTerm (Map Name Primitive) -> TTerm Graph
+ Hydra.Dsl.Graph: graphWithSchemaTypes :: TTerm Graph -> TTerm (Map Name TypeScheme) -> TTerm Graph
+ Hydra.Dsl.Graph: graphWithTypeVariables :: TTerm Graph -> TTerm (Set Name) -> TTerm Graph
+ Hydra.Dsl.Graph: primitive :: TTerm Name -> TTerm TypeScheme -> TTerm (Context -> Graph -> [Term] -> Either (InContext Error) Term) -> TTerm Primitive
+ Hydra.Dsl.Graph: primitiveImplementation :: TTerm Primitive -> TTerm (Context -> Graph -> [Term] -> Either (InContext Error) Term)
+ Hydra.Dsl.Graph: primitiveName :: TTerm Primitive -> TTerm Name
+ Hydra.Dsl.Graph: primitiveType :: TTerm Primitive -> TTerm TypeScheme
+ Hydra.Dsl.Graph: primitiveWithImplementation :: TTerm Primitive -> TTerm (Context -> Graph -> [Term] -> Either (InContext Error) Term) -> TTerm Primitive
+ Hydra.Dsl.Graph: primitiveWithName :: TTerm Primitive -> TTerm Name -> TTerm Primitive
+ Hydra.Dsl.Graph: primitiveWithType :: TTerm Primitive -> TTerm TypeScheme -> TTerm Primitive
+ Hydra.Dsl.Graph: termCoder :: TTerm Type -> TTerm (Context -> Graph -> Term -> Either (InContext Error) a) -> TTerm (Context -> a -> Either (InContext Error) Term) -> TTerm (TermCoder a)
+ Hydra.Dsl.Graph: termCoderDecode :: TTerm (TermCoder a) -> TTerm (Context -> a -> Either (InContext Error) Term)
+ Hydra.Dsl.Graph: termCoderEncode :: TTerm (TermCoder a) -> TTerm (Context -> Graph -> Term -> Either (InContext Error) a)
+ Hydra.Dsl.Graph: termCoderType :: TTerm (TermCoder a) -> TTerm Type
+ Hydra.Dsl.Graph: termCoderWithDecode :: TTerm (TermCoder a) -> TTerm (Context -> a -> Either (InContext Error) Term) -> TTerm (TermCoder a)
+ Hydra.Dsl.Graph: termCoderWithEncode :: TTerm (TermCoder a) -> TTerm (Context -> Graph -> Term -> Either (InContext Error) a) -> TTerm (TermCoder a)
+ Hydra.Dsl.Graph: termCoderWithType :: TTerm (TermCoder a) -> TTerm Type -> TTerm (TermCoder a)
+ Hydra.Dsl.Json.Model: valueArray :: TTerm [Value] -> TTerm Value
+ Hydra.Dsl.Json.Model: valueBoolean :: TTerm Bool -> TTerm Value
+ Hydra.Dsl.Json.Model: valueNull :: TTerm Value
+ Hydra.Dsl.Json.Model: valueNumber :: TTerm Double -> TTerm Value
+ Hydra.Dsl.Json.Model: valueObject :: TTerm (Map String Value) -> TTerm Value
+ Hydra.Dsl.Json.Model: valueString :: TTerm String -> TTerm Value
+ Hydra.Dsl.Meta.Context: context :: TTerm [String] -> TTerm [String] -> TTerm (Map Name Term) -> TTerm Context
+ Hydra.Dsl.Meta.Context: contextMessages :: TTerm Context -> TTerm [String]
+ Hydra.Dsl.Meta.Context: contextOther :: TTerm Context -> TTerm (Map Name Term)
+ Hydra.Dsl.Meta.Context: contextTrace :: TTerm Context -> TTerm [String]
+ Hydra.Dsl.Meta.Context: contextWithMessages :: TTerm Context -> TTerm [String] -> TTerm Context
+ Hydra.Dsl.Meta.Context: contextWithOther :: TTerm Context -> TTerm (Map Name Term) -> TTerm Context
+ Hydra.Dsl.Meta.Context: contextWithTrace :: TTerm Context -> TTerm [String] -> TTerm Context
+ Hydra.Dsl.Meta.Context: failInContext :: TTerm e -> TTerm Context -> TTerm (Either (InContext e) a)
+ Hydra.Dsl.Meta.Context: inContext :: TTerm e -> TTerm Context -> TTerm (InContext e)
+ Hydra.Dsl.Meta.Context: inContextContext :: TTerm (InContext e) -> TTerm Context
+ Hydra.Dsl.Meta.Context: inContextObject :: TTerm (InContext e) -> TTerm e
+ Hydra.Dsl.Meta.Context: inContextWithContext :: TTerm (InContext e) -> TTerm Context -> TTerm (InContext e)
+ Hydra.Dsl.Meta.Context: inContextWithObject :: TTerm (InContext e) -> TTerm e -> TTerm (InContext e)
+ Hydra.Dsl.Meta.Context: pushTrace :: TTerm String -> TTerm Context -> TTerm Context
+ Hydra.Dsl.Meta.Context: withContext :: TTerm Context -> TTerm (Either e a) -> TTerm (Either (InContext e) a)
+ Hydra.Dsl.Meta.Core: annotatedTermWithAnnotation :: TTerm AnnotatedTerm -> TTerm (Map Name Term) -> TTerm AnnotatedTerm
+ Hydra.Dsl.Meta.Core: annotatedTypeWithAnnotation :: TTerm AnnotatedType -> TTerm (Map Name Term) -> TTerm AnnotatedType
+ Hydra.Dsl.Meta.Core: annotatedTypeWithBody :: TTerm AnnotatedType -> TTerm Type -> TTerm AnnotatedType
+ Hydra.Dsl.Meta.Core: applicationTypeWithArgument :: TTerm ApplicationType -> TTerm Type -> TTerm ApplicationType
+ Hydra.Dsl.Meta.Core: applicationTypeWithFunction :: TTerm ApplicationType -> TTerm Type -> TTerm ApplicationType
+ Hydra.Dsl.Meta.Core: applicationWithArgument :: TTerm Application -> TTerm Term -> TTerm Application
+ Hydra.Dsl.Meta.Core: applicationWithFunction :: TTerm Application -> TTerm Term -> TTerm Application
+ Hydra.Dsl.Meta.Core: bindingWithName :: TTerm Binding -> TTerm Name -> TTerm Binding
+ Hydra.Dsl.Meta.Core: bindingWithType :: TTerm Binding -> TTerm (Maybe TypeScheme) -> TTerm Binding
+ Hydra.Dsl.Meta.Core: caseStatementWithCases :: TTerm CaseStatement -> TTerm [Field] -> TTerm CaseStatement
+ Hydra.Dsl.Meta.Core: caseStatementWithDefault :: TTerm CaseStatement -> TTerm (Maybe Term) -> TTerm CaseStatement
+ Hydra.Dsl.Meta.Core: caseStatementWithTypeName :: TTerm CaseStatement -> TTerm Name -> TTerm CaseStatement
+ Hydra.Dsl.Meta.Core: eitherTypeWithLeft :: TTerm EitherType -> TTerm Type -> TTerm EitherType
+ Hydra.Dsl.Meta.Core: eitherTypeWithRight :: TTerm EitherType -> TTerm Type -> TTerm EitherType
+ Hydra.Dsl.Meta.Core: fieldTypeWithName :: TTerm FieldType -> TTerm Name -> TTerm FieldType
+ Hydra.Dsl.Meta.Core: fieldWithName :: TTerm Field -> TTerm Name -> TTerm Field
+ Hydra.Dsl.Meta.Core: forallTypeWithBody :: TTerm ForallType -> TTerm Type -> TTerm ForallType
+ Hydra.Dsl.Meta.Core: forallTypeWithParameter :: TTerm ForallType -> TTerm Name -> TTerm ForallType
+ Hydra.Dsl.Meta.Core: functionTypeWithCodomain :: TTerm FunctionType -> TTerm Type -> TTerm FunctionType
+ Hydra.Dsl.Meta.Core: functionTypeWithDomain :: TTerm FunctionType -> TTerm Type -> TTerm FunctionType
+ Hydra.Dsl.Meta.Core: injectionWithField :: TTerm Injection -> TTerm Field -> TTerm Injection
+ Hydra.Dsl.Meta.Core: injectionWithTypeName :: TTerm Injection -> TTerm Name -> TTerm Injection
+ Hydra.Dsl.Meta.Core: lambdaWithDomain :: TTerm Lambda -> TTerm (Maybe Type) -> TTerm Lambda
+ Hydra.Dsl.Meta.Core: lambdaWithParameter :: TTerm Lambda -> TTerm Name -> TTerm Lambda
+ Hydra.Dsl.Meta.Core: letWithBindings :: TTerm Let -> TTerm [Binding] -> TTerm Let
+ Hydra.Dsl.Meta.Core: mapTypeWithKeys :: TTerm MapType -> TTerm Type -> TTerm MapType
+ Hydra.Dsl.Meta.Core: mapTypeWithValues :: TTerm MapType -> TTerm Type -> TTerm MapType
+ Hydra.Dsl.Meta.Core: pairTypeWithFirst :: TTerm PairType -> TTerm Type -> TTerm PairType
+ Hydra.Dsl.Meta.Core: pairTypeWithSecond :: TTerm PairType -> TTerm Type -> TTerm PairType
+ Hydra.Dsl.Meta.Core: projectionWithField :: TTerm Projection -> TTerm Name -> TTerm Projection
+ Hydra.Dsl.Meta.Core: projectionWithTypeName :: TTerm Projection -> TTerm Name -> TTerm Projection
+ Hydra.Dsl.Meta.Core: recordWithFields :: TTerm Record -> TTerm [Field] -> TTerm Record
+ Hydra.Dsl.Meta.Core: recordWithTypeName :: TTerm Record -> TTerm Name -> TTerm Record
+ Hydra.Dsl.Meta.Core: typeApplicationTermWithBody :: TTerm TypeApplicationTerm -> TTerm Term -> TTerm TypeApplicationTerm
+ Hydra.Dsl.Meta.Core: typeApplicationTermWithType :: TTerm TypeApplicationTerm -> TTerm Type -> TTerm TypeApplicationTerm
+ Hydra.Dsl.Meta.Core: typeLambdaWithParameter :: TTerm TypeLambda -> TTerm Name -> TTerm TypeLambda
+ Hydra.Dsl.Meta.Core: typeSchemeWithConstraints :: TTerm TypeScheme -> TTerm (Maybe (Map Name TypeVariableMetadata)) -> TTerm TypeScheme
+ Hydra.Dsl.Meta.Core: typeSchemeWithType :: TTerm TypeScheme -> TTerm Type -> TTerm TypeScheme
+ Hydra.Dsl.Meta.Core: typeSchemeWithVariables :: TTerm TypeScheme -> TTerm [Name] -> TTerm TypeScheme
+ Hydra.Dsl.Meta.Core: typeVariableMetadataWithClasses :: TTerm TypeVariableMetadata -> TTerm (Set Name) -> TTerm TypeVariableMetadata
+ Hydra.Dsl.Meta.Core: typeVoid :: TTerm Type
+ Hydra.Dsl.Meta.Core: wrappedTermWithBody :: TTerm WrappedTerm -> TTerm Term -> TTerm WrappedTerm
+ Hydra.Dsl.Meta.Core: wrappedTermWithTypeName :: TTerm WrappedTerm -> TTerm Name -> TTerm WrappedTerm
+ Hydra.Dsl.Meta.Graph: emptyGraph :: TTerm Graph
+ Hydra.Dsl.Meta.Graph: graphBoundTerms :: TTerm Graph -> TTerm (Map Name Term)
+ Hydra.Dsl.Meta.Graph: graphBoundTypes :: TTerm Graph -> TTerm (Map Name TypeScheme)
+ Hydra.Dsl.Meta.Graph: graphClassConstraints :: TTerm Graph -> TTerm (Map Name TypeVariableMetadata)
+ Hydra.Dsl.Meta.Graph: graphLambdaVariables :: TTerm Graph -> TTerm (Set Name)
+ Hydra.Dsl.Meta.Graph: graphMetadata :: TTerm Graph -> TTerm (Map Name Term)
+ Hydra.Dsl.Meta.Graph: graphPrimitiveTypes :: TTerm Graph -> TTerm (Map Name TypeScheme)
+ Hydra.Dsl.Meta.Graph: graphSchemaTypes :: TTerm Graph -> TTerm (Map Name TypeScheme)
+ Hydra.Dsl.Meta.Graph: graphTypeVariables :: TTerm Graph -> TTerm (Set Name)
+ Hydra.Dsl.Meta.Graph: graphWithBoundTerms :: TTerm Graph -> TTerm (Map Name Term) -> TTerm Graph
+ Hydra.Dsl.Meta.Graph: graphWithBoundTypes :: TTerm Graph -> TTerm (Map Name TypeScheme) -> TTerm Graph
+ Hydra.Dsl.Meta.Graph: graphWithClassConstraints :: TTerm Graph -> TTerm (Map Name TypeVariableMetadata) -> TTerm Graph
+ Hydra.Dsl.Meta.Graph: graphWithLambdaVariables :: TTerm Graph -> TTerm (Set Name) -> TTerm Graph
+ Hydra.Dsl.Meta.Graph: graphWithMetadata :: TTerm Graph -> TTerm (Map Name Term) -> TTerm Graph
+ Hydra.Dsl.Meta.Graph: graphWithSchemaTypes :: TTerm Graph -> TTerm (Map Name TypeScheme) -> TTerm Graph
+ Hydra.Dsl.Meta.Graph: graphWithTypeVariables :: TTerm Graph -> TTerm (Set Name) -> TTerm Graph
+ Hydra.Dsl.Meta.Graph: primitiveWithImplementation :: TTerm Primitive -> TTerm (Context -> Graph -> [Term] -> Either (InContext Error) Term) -> TTerm Primitive
+ Hydra.Dsl.Meta.Graph: primitiveWithName :: TTerm Primitive -> TTerm Name -> TTerm Primitive
+ Hydra.Dsl.Meta.Graph: termCoder :: TTerm Type -> TTerm (Context -> Graph -> Term -> Either (InContext Error) a) -> TTerm (Context -> a -> Either (InContext Error) Term) -> TTerm (TermCoder a)
+ Hydra.Dsl.Meta.Graph: termCoderDecode :: TTerm (TermCoder a) -> TTerm (Context -> a -> Either (InContext Error) Term)
+ Hydra.Dsl.Meta.Graph: termCoderEncode :: TTerm (TermCoder a) -> TTerm (Context -> Graph -> Term -> Either (InContext Error) a)
+ Hydra.Dsl.Meta.Graph: termCoderType :: TTerm (TermCoder a) -> TTerm Type
+ Hydra.Dsl.Meta.Graph: termCoderWithDecode :: TTerm (TermCoder a) -> TTerm (Context -> a -> Either (InContext Error) Term) -> TTerm (TermCoder a)
+ Hydra.Dsl.Meta.Graph: termCoderWithEncode :: TTerm (TermCoder a) -> TTerm (Context -> Graph -> Term -> Either (InContext Error) a) -> TTerm (TermCoder a)
+ Hydra.Dsl.Meta.Graph: termCoderWithType :: TTerm (TermCoder a) -> TTerm Type -> TTerm (TermCoder a)
+ Hydra.Dsl.Meta.Lib.Eithers: foldl :: TTerm (a -> b -> Either c a) -> TTerm a -> TTerm [b] -> TTerm (Either c a)
+ Hydra.Dsl.Meta.Lib.Eithers: mapSet :: TTerm (a -> Either c b) -> TTerm (Set a) -> TTerm (Either c (Set b))
+ Hydra.Dsl.Meta.Lib.Lists: foldr :: AsTerm f (a -> b -> b) => f -> TTerm b -> TTerm [a] -> TTerm b
+ Hydra.Dsl.Meta.Lib.Math: roundBigfloat :: TTerm Int -> TTerm Double -> TTerm Double
+ Hydra.Dsl.Meta.Lib.Math: roundFloat32 :: TTerm Int -> TTerm Float -> TTerm Float
+ Hydra.Dsl.Meta.Lib.Math: roundFloat64 :: TTerm Int -> TTerm Double -> TTerm Double
+ Hydra.Dsl.Meta.Lib.Maybes: toList :: TTerm (Maybe a) -> TTerm [a]
+ Hydra.Dsl.Meta.Lib.Regex: find :: TTerm String -> TTerm String -> TTerm (Maybe String)
+ Hydra.Dsl.Meta.Lib.Regex: findAll :: TTerm String -> TTerm String -> TTerm [String]
+ Hydra.Dsl.Meta.Lib.Regex: matches :: TTerm String -> TTerm String -> TTerm Bool
+ Hydra.Dsl.Meta.Lib.Regex: replace :: TTerm String -> TTerm String -> TTerm String -> TTerm String
+ Hydra.Dsl.Meta.Lib.Regex: replaceAll :: TTerm String -> TTerm String -> TTerm String -> TTerm String
+ Hydra.Dsl.Meta.Lib.Regex: split :: TTerm String -> TTerm String -> TTerm [String]
+ Hydra.Dsl.Meta.Phantoms: eitherBind :: AsTerm t (Either e a) => String -> t -> TTerm (Either e b) -> TTerm (Either e b)
+ Hydra.Dsl.Meta.Phantoms: nameLift :: Name -> TTerm Name
+ Hydra.Dsl.Meta.Phantoms: toTermDefinition :: TBinding a -> Definition
+ Hydra.Dsl.Meta.Phantoms: unsafeCast :: TTerm a -> TTerm b
+ Hydra.Dsl.Meta.Tabular: columnType :: String -> Type -> ColumnType
+ Hydra.Dsl.Meta.Tabular: tableType :: String -> [ColumnType] -> TableType
+ Hydra.Dsl.Meta.Testing: alphaConversionTestCaseNewVariable :: TTerm AlphaConversionTestCase -> TTerm Name
+ Hydra.Dsl.Meta.Testing: alphaConversionTestCaseOldVariable :: TTerm AlphaConversionTestCase -> TTerm Name
+ Hydra.Dsl.Meta.Testing: alphaConversionTestCaseResult :: TTerm AlphaConversionTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: alphaConversionTestCaseTerm :: TTerm AlphaConversionTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: alphaConversionTestCaseWithNewVariable :: TTerm AlphaConversionTestCase -> TTerm Name -> TTerm AlphaConversionTestCase
+ Hydra.Dsl.Meta.Testing: alphaConversionTestCaseWithOldVariable :: TTerm AlphaConversionTestCase -> TTerm Name -> TTerm AlphaConversionTestCase
+ Hydra.Dsl.Meta.Testing: alphaConversionTestCaseWithResult :: TTerm AlphaConversionTestCase -> TTerm Term -> TTerm AlphaConversionTestCase
+ Hydra.Dsl.Meta.Testing: alphaConversionTestCaseWithTerm :: TTerm AlphaConversionTestCase -> TTerm Term -> TTerm AlphaConversionTestCase
+ Hydra.Dsl.Meta.Testing: caseConversionTestCaseFromConvention :: TTerm CaseConversionTestCase -> TTerm CaseConvention
+ Hydra.Dsl.Meta.Testing: caseConversionTestCaseFromString :: TTerm CaseConversionTestCase -> TTerm String
+ Hydra.Dsl.Meta.Testing: caseConversionTestCaseToConvention :: TTerm CaseConversionTestCase -> TTerm CaseConvention
+ Hydra.Dsl.Meta.Testing: caseConversionTestCaseToString :: TTerm CaseConversionTestCase -> TTerm String
+ Hydra.Dsl.Meta.Testing: caseConversionTestCaseWithFromConvention :: TTerm CaseConversionTestCase -> TTerm CaseConvention -> TTerm CaseConversionTestCase
+ Hydra.Dsl.Meta.Testing: caseConversionTestCaseWithFromString :: TTerm CaseConversionTestCase -> TTerm String -> TTerm CaseConversionTestCase
+ Hydra.Dsl.Meta.Testing: caseConversionTestCaseWithToConvention :: TTerm CaseConversionTestCase -> TTerm CaseConvention -> TTerm CaseConversionTestCase
+ Hydra.Dsl.Meta.Testing: caseConversionTestCaseWithToString :: TTerm CaseConversionTestCase -> TTerm String -> TTerm CaseConversionTestCase
+ Hydra.Dsl.Meta.Testing: deannotateTermTestCaseInput :: TTerm DeannotateTermTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: deannotateTermTestCaseOutput :: TTerm DeannotateTermTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: deannotateTermTestCaseWithInput :: TTerm DeannotateTermTestCase -> TTerm Term -> TTerm DeannotateTermTestCase
+ Hydra.Dsl.Meta.Testing: deannotateTermTestCaseWithOutput :: TTerm DeannotateTermTestCase -> TTerm Term -> TTerm DeannotateTermTestCase
+ Hydra.Dsl.Meta.Testing: deannotateTypeTestCaseInput :: TTerm DeannotateTypeTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: deannotateTypeTestCaseOutput :: TTerm DeannotateTypeTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: deannotateTypeTestCaseWithInput :: TTerm DeannotateTypeTestCase -> TTerm Type -> TTerm DeannotateTypeTestCase
+ Hydra.Dsl.Meta.Testing: deannotateTypeTestCaseWithOutput :: TTerm DeannotateTypeTestCase -> TTerm Type -> TTerm DeannotateTypeTestCase
+ Hydra.Dsl.Meta.Testing: delegatedEvaluationTestCaseInput :: TTerm DelegatedEvaluationTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: delegatedEvaluationTestCaseOutput :: TTerm DelegatedEvaluationTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: delegatedEvaluationTestCaseWithInput :: TTerm DelegatedEvaluationTestCase -> TTerm Term -> TTerm DelegatedEvaluationTestCase
+ Hydra.Dsl.Meta.Testing: delegatedEvaluationTestCaseWithOutput :: TTerm DelegatedEvaluationTestCase -> TTerm Term -> TTerm DelegatedEvaluationTestCase
+ Hydra.Dsl.Meta.Testing: etaExpansionTestCaseInput :: TTerm EtaExpansionTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: etaExpansionTestCaseOutput :: TTerm EtaExpansionTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: etaExpansionTestCaseWithInput :: TTerm EtaExpansionTestCase -> TTerm Term -> TTerm EtaExpansionTestCase
+ Hydra.Dsl.Meta.Testing: etaExpansionTestCaseWithOutput :: TTerm EtaExpansionTestCase -> TTerm Term -> TTerm EtaExpansionTestCase
+ Hydra.Dsl.Meta.Testing: evaluationTestCaseEvaluationStyle :: TTerm EvaluationTestCase -> TTerm EvaluationStyle
+ Hydra.Dsl.Meta.Testing: evaluationTestCaseInput :: TTerm EvaluationTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: evaluationTestCaseOutput :: TTerm EvaluationTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: evaluationTestCaseWithEvaluationStyle :: TTerm EvaluationTestCase -> TTerm EvaluationStyle -> TTerm EvaluationTestCase
+ Hydra.Dsl.Meta.Testing: evaluationTestCaseWithInput :: TTerm EvaluationTestCase -> TTerm Term -> TTerm EvaluationTestCase
+ Hydra.Dsl.Meta.Testing: evaluationTestCaseWithOutput :: TTerm EvaluationTestCase -> TTerm Term -> TTerm EvaluationTestCase
+ Hydra.Dsl.Meta.Testing: expectPolyConstrained :: AsTerm t Term => Int -> [Tag] -> t -> [String] -> [(String, [String])] -> TTerm Type -> TTerm TestCaseWithMetadata
+ Hydra.Dsl.Meta.Testing: flattenLetTermsTestCaseInput :: TTerm FlattenLetTermsTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: flattenLetTermsTestCaseOutput :: TTerm FlattenLetTermsTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: flattenLetTermsTestCaseWithInput :: TTerm FlattenLetTermsTestCase -> TTerm Term -> TTerm FlattenLetTermsTestCase
+ Hydra.Dsl.Meta.Testing: flattenLetTermsTestCaseWithOutput :: TTerm FlattenLetTermsTestCase -> TTerm Term -> TTerm FlattenLetTermsTestCase
+ Hydra.Dsl.Meta.Testing: foldOperationCollectLabels :: TTerm FoldOperation
+ Hydra.Dsl.Meta.Testing: foldOperationCollectListLengths :: TTerm FoldOperation
+ Hydra.Dsl.Meta.Testing: foldOperationSumInt32Literals :: TTerm FoldOperation
+ Hydra.Dsl.Meta.Testing: foldOverTermTestCaseInput :: TTerm FoldOverTermTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: foldOverTermTestCaseOperation :: TTerm FoldOverTermTestCase -> TTerm FoldOperation
+ Hydra.Dsl.Meta.Testing: foldOverTermTestCaseOutput :: TTerm FoldOverTermTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: foldOverTermTestCaseTraversalOrder :: TTerm FoldOverTermTestCase -> TTerm TraversalOrder
+ Hydra.Dsl.Meta.Testing: foldOverTermTestCaseWithInput :: TTerm FoldOverTermTestCase -> TTerm Term -> TTerm FoldOverTermTestCase
+ Hydra.Dsl.Meta.Testing: foldOverTermTestCaseWithOperation :: TTerm FoldOverTermTestCase -> TTerm FoldOperation -> TTerm FoldOverTermTestCase
+ Hydra.Dsl.Meta.Testing: foldOverTermTestCaseWithOutput :: TTerm FoldOverTermTestCase -> TTerm Term -> TTerm FoldOverTermTestCase
+ Hydra.Dsl.Meta.Testing: foldOverTermTestCaseWithTraversalOrder :: TTerm FoldOverTermTestCase -> TTerm TraversalOrder -> TTerm FoldOverTermTestCase
+ Hydra.Dsl.Meta.Testing: freeVariablesTestCaseInput :: TTerm FreeVariablesTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: freeVariablesTestCaseOutput :: TTerm FreeVariablesTestCase -> TTerm (Set Name)
+ Hydra.Dsl.Meta.Testing: freeVariablesTestCaseWithInput :: TTerm FreeVariablesTestCase -> TTerm Term -> TTerm FreeVariablesTestCase
+ Hydra.Dsl.Meta.Testing: freeVariablesTestCaseWithOutput :: TTerm FreeVariablesTestCase -> TTerm (Set Name) -> TTerm FreeVariablesTestCase
+ Hydra.Dsl.Meta.Testing: hoistCaseStatementsTestCaseInput :: TTerm HoistCaseStatementsTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: hoistCaseStatementsTestCaseOutput :: TTerm HoistCaseStatementsTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: hoistCaseStatementsTestCaseWithInput :: TTerm HoistCaseStatementsTestCase -> TTerm Term -> TTerm HoistCaseStatementsTestCase
+ Hydra.Dsl.Meta.Testing: hoistCaseStatementsTestCaseWithOutput :: TTerm HoistCaseStatementsTestCase -> TTerm Term -> TTerm HoistCaseStatementsTestCase
+ Hydra.Dsl.Meta.Testing: hoistLetBindingsTestCaseInput :: TTerm HoistLetBindingsTestCase -> TTerm Let
+ Hydra.Dsl.Meta.Testing: hoistLetBindingsTestCaseOutput :: TTerm HoistLetBindingsTestCase -> TTerm Let
+ Hydra.Dsl.Meta.Testing: hoistLetBindingsTestCaseWithInput :: TTerm HoistLetBindingsTestCase -> TTerm Let -> TTerm HoistLetBindingsTestCase
+ Hydra.Dsl.Meta.Testing: hoistLetBindingsTestCaseWithOutput :: TTerm HoistLetBindingsTestCase -> TTerm Let -> TTerm HoistLetBindingsTestCase
+ Hydra.Dsl.Meta.Testing: hoistPolymorphicLetBindingsTestCaseInput :: TTerm HoistPolymorphicLetBindingsTestCase -> TTerm Let
+ Hydra.Dsl.Meta.Testing: hoistPolymorphicLetBindingsTestCaseOutput :: TTerm HoistPolymorphicLetBindingsTestCase -> TTerm Let
+ Hydra.Dsl.Meta.Testing: hoistPolymorphicLetBindingsTestCaseWithInput :: TTerm HoistPolymorphicLetBindingsTestCase -> TTerm Let -> TTerm HoistPolymorphicLetBindingsTestCase
+ Hydra.Dsl.Meta.Testing: hoistPolymorphicLetBindingsTestCaseWithOutput :: TTerm HoistPolymorphicLetBindingsTestCase -> TTerm Let -> TTerm HoistPolymorphicLetBindingsTestCase
+ Hydra.Dsl.Meta.Testing: hoistSubtermsTestCaseInput :: TTerm HoistSubtermsTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: hoistSubtermsTestCaseOutput :: TTerm HoistSubtermsTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: hoistSubtermsTestCasePredicate :: TTerm HoistSubtermsTestCase -> TTerm HoistPredicate
+ Hydra.Dsl.Meta.Testing: hoistSubtermsTestCaseWithInput :: TTerm HoistSubtermsTestCase -> TTerm Term -> TTerm HoistSubtermsTestCase
+ Hydra.Dsl.Meta.Testing: hoistSubtermsTestCaseWithOutput :: TTerm HoistSubtermsTestCase -> TTerm Term -> TTerm HoistSubtermsTestCase
+ Hydra.Dsl.Meta.Testing: hoistSubtermsTestCaseWithPredicate :: TTerm HoistSubtermsTestCase -> TTerm HoistPredicate -> TTerm HoistSubtermsTestCase
+ Hydra.Dsl.Meta.Testing: inferenceFailureTestCaseInput :: TTerm InferenceFailureTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: inferenceFailureTestCaseWithInput :: TTerm InferenceFailureTestCase -> TTerm Term -> TTerm InferenceFailureTestCase
+ Hydra.Dsl.Meta.Testing: inferenceTestCaseInput :: TTerm InferenceTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: inferenceTestCaseOutput :: TTerm InferenceTestCase -> TTerm TypeScheme
+ Hydra.Dsl.Meta.Testing: inferenceTestCaseWithInput :: TTerm InferenceTestCase -> TTerm Term -> TTerm InferenceTestCase
+ Hydra.Dsl.Meta.Testing: inferenceTestCaseWithOutput :: TTerm InferenceTestCase -> TTerm TypeScheme -> TTerm InferenceTestCase
+ Hydra.Dsl.Meta.Testing: joinTypesTestCaseExpected :: TTerm JoinTypesTestCase -> TTerm (Either () [TypeConstraint])
+ Hydra.Dsl.Meta.Testing: joinTypesTestCaseLeft :: TTerm JoinTypesTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: joinTypesTestCaseRight :: TTerm JoinTypesTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: joinTypesTestCaseWithExpected :: TTerm JoinTypesTestCase -> TTerm (Either () [TypeConstraint]) -> TTerm JoinTypesTestCase
+ Hydra.Dsl.Meta.Testing: joinTypesTestCaseWithLeft :: TTerm JoinTypesTestCase -> TTerm Type -> TTerm JoinTypesTestCase
+ Hydra.Dsl.Meta.Testing: joinTypesTestCaseWithRight :: TTerm JoinTypesTestCase -> TTerm Type -> TTerm JoinTypesTestCase
+ Hydra.Dsl.Meta.Testing: jsonDecodeTestCaseExpected :: TTerm JsonDecodeTestCase -> TTerm (Either String Term)
+ Hydra.Dsl.Meta.Testing: jsonDecodeTestCaseJson :: TTerm JsonDecodeTestCase -> TTerm Value
+ Hydra.Dsl.Meta.Testing: jsonDecodeTestCaseType :: TTerm JsonDecodeTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: jsonDecodeTestCaseWithExpected :: TTerm JsonDecodeTestCase -> TTerm (Either String Term) -> TTerm JsonDecodeTestCase
+ Hydra.Dsl.Meta.Testing: jsonDecodeTestCaseWithJson :: TTerm JsonDecodeTestCase -> TTerm Value -> TTerm JsonDecodeTestCase
+ Hydra.Dsl.Meta.Testing: jsonDecodeTestCaseWithType :: TTerm JsonDecodeTestCase -> TTerm Type -> TTerm JsonDecodeTestCase
+ Hydra.Dsl.Meta.Testing: jsonEncodeTestCaseExpected :: TTerm JsonEncodeTestCase -> TTerm (Either String Value)
+ Hydra.Dsl.Meta.Testing: jsonEncodeTestCaseTerm :: TTerm JsonEncodeTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: jsonEncodeTestCaseWithExpected :: TTerm JsonEncodeTestCase -> TTerm (Either String Value) -> TTerm JsonEncodeTestCase
+ Hydra.Dsl.Meta.Testing: jsonEncodeTestCaseWithTerm :: TTerm JsonEncodeTestCase -> TTerm Term -> TTerm JsonEncodeTestCase
+ Hydra.Dsl.Meta.Testing: jsonRoundtripTestCaseTerm :: TTerm JsonRoundtripTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: jsonRoundtripTestCaseType :: TTerm JsonRoundtripTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: jsonRoundtripTestCaseWithTerm :: TTerm JsonRoundtripTestCase -> TTerm Term -> TTerm JsonRoundtripTestCase
+ Hydra.Dsl.Meta.Testing: jsonRoundtripTestCaseWithType :: TTerm JsonRoundtripTestCase -> TTerm Type -> TTerm JsonRoundtripTestCase
+ Hydra.Dsl.Meta.Testing: liftLambdaAboveLetTestCaseInput :: TTerm LiftLambdaAboveLetTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: liftLambdaAboveLetTestCaseOutput :: TTerm LiftLambdaAboveLetTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: liftLambdaAboveLetTestCaseWithInput :: TTerm LiftLambdaAboveLetTestCase -> TTerm Term -> TTerm LiftLambdaAboveLetTestCase
+ Hydra.Dsl.Meta.Testing: liftLambdaAboveLetTestCaseWithOutput :: TTerm LiftLambdaAboveLetTestCase -> TTerm Term -> TTerm LiftLambdaAboveLetTestCase
+ Hydra.Dsl.Meta.Testing: normalizeTypeVariablesTestCaseInput :: TTerm NormalizeTypeVariablesTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: normalizeTypeVariablesTestCaseOutput :: TTerm NormalizeTypeVariablesTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: normalizeTypeVariablesTestCaseWithInput :: TTerm NormalizeTypeVariablesTestCase -> TTerm Term -> TTerm NormalizeTypeVariablesTestCase
+ Hydra.Dsl.Meta.Testing: normalizeTypeVariablesTestCaseWithOutput :: TTerm NormalizeTypeVariablesTestCase -> TTerm Term -> TTerm NormalizeTypeVariablesTestCase
+ Hydra.Dsl.Meta.Testing: parserTestCaseInput :: TTerm (ParserTestCase a) -> TTerm String
+ Hydra.Dsl.Meta.Testing: parserTestCaseOutput :: TTerm (ParserTestCase a) -> TTerm (ParseResult a)
+ Hydra.Dsl.Meta.Testing: parserTestCaseWithInput :: TTerm (ParserTestCase a) -> TTerm String -> TTerm (ParserTestCase a)
+ Hydra.Dsl.Meta.Testing: parserTestCaseWithOutput :: TTerm (ParserTestCase a) -> TTerm (ParseResult a) -> TTerm (ParserTestCase a)
+ Hydra.Dsl.Meta.Testing: rewriteTermTestCaseInput :: TTerm RewriteTermTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: rewriteTermTestCaseOutput :: TTerm RewriteTermTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: rewriteTermTestCaseRewriter :: TTerm RewriteTermTestCase -> TTerm TermRewriter
+ Hydra.Dsl.Meta.Testing: rewriteTermTestCaseWithInput :: TTerm RewriteTermTestCase -> TTerm Term -> TTerm RewriteTermTestCase
+ Hydra.Dsl.Meta.Testing: rewriteTermTestCaseWithOutput :: TTerm RewriteTermTestCase -> TTerm Term -> TTerm RewriteTermTestCase
+ Hydra.Dsl.Meta.Testing: rewriteTermTestCaseWithRewriter :: TTerm RewriteTermTestCase -> TTerm TermRewriter -> TTerm RewriteTermTestCase
+ Hydra.Dsl.Meta.Testing: rewriteTypeTestCaseInput :: TTerm RewriteTypeTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: rewriteTypeTestCaseOutput :: TTerm RewriteTypeTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: rewriteTypeTestCaseRewriter :: TTerm RewriteTypeTestCase -> TTerm TypeRewriter
+ Hydra.Dsl.Meta.Testing: rewriteTypeTestCaseWithInput :: TTerm RewriteTypeTestCase -> TTerm Type -> TTerm RewriteTypeTestCase
+ Hydra.Dsl.Meta.Testing: rewriteTypeTestCaseWithOutput :: TTerm RewriteTypeTestCase -> TTerm Type -> TTerm RewriteTypeTestCase
+ Hydra.Dsl.Meta.Testing: rewriteTypeTestCaseWithRewriter :: TTerm RewriteTypeTestCase -> TTerm TypeRewriter -> TTerm RewriteTypeTestCase
+ Hydra.Dsl.Meta.Testing: serializationTestCaseInput :: TTerm SerializationTestCase -> TTerm Expr
+ Hydra.Dsl.Meta.Testing: serializationTestCaseOutput :: TTerm SerializationTestCase -> TTerm String
+ Hydra.Dsl.Meta.Testing: serializationTestCaseWithInput :: TTerm SerializationTestCase -> TTerm Expr -> TTerm SerializationTestCase
+ Hydra.Dsl.Meta.Testing: serializationTestCaseWithOutput :: TTerm SerializationTestCase -> TTerm String -> TTerm SerializationTestCase
+ Hydra.Dsl.Meta.Testing: simplifyTermTestCaseInput :: TTerm SimplifyTermTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: simplifyTermTestCaseOutput :: TTerm SimplifyTermTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: simplifyTermTestCaseWithInput :: TTerm SimplifyTermTestCase -> TTerm Term -> TTerm SimplifyTermTestCase
+ Hydra.Dsl.Meta.Testing: simplifyTermTestCaseWithOutput :: TTerm SimplifyTermTestCase -> TTerm Term -> TTerm SimplifyTermTestCase
+ Hydra.Dsl.Meta.Testing: substInTypeTestCaseInput :: TTerm SubstInTypeTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: substInTypeTestCaseOutput :: TTerm SubstInTypeTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: substInTypeTestCaseSubstitution :: TTerm SubstInTypeTestCase -> TTerm [(Name, Type)]
+ Hydra.Dsl.Meta.Testing: substInTypeTestCaseWithInput :: TTerm SubstInTypeTestCase -> TTerm Type -> TTerm SubstInTypeTestCase
+ Hydra.Dsl.Meta.Testing: substInTypeTestCaseWithOutput :: TTerm SubstInTypeTestCase -> TTerm Type -> TTerm SubstInTypeTestCase
+ Hydra.Dsl.Meta.Testing: substInTypeTestCaseWithSubstitution :: TTerm SubstInTypeTestCase -> TTerm [(Name, Type)] -> TTerm SubstInTypeTestCase
+ Hydra.Dsl.Meta.Testing: testCaseTypeCheckingFailure :: TTerm TypeCheckingFailureTestCase -> TTerm TestCase
+ Hydra.Dsl.Meta.Testing: testCaseValidateCoreTerm :: TTerm ValidateCoreTermTestCase -> TTerm TestCase
+ Hydra.Dsl.Meta.Testing: testCaseWithMetadataWithCase :: TTerm TestCaseWithMetadata -> TTerm TestCase -> TTerm TestCaseWithMetadata
+ Hydra.Dsl.Meta.Testing: testCaseWithMetadataWithDescription :: TTerm TestCaseWithMetadata -> TTerm (Maybe String) -> TTerm TestCaseWithMetadata
+ Hydra.Dsl.Meta.Testing: testCaseWithMetadataWithName :: TTerm TestCaseWithMetadata -> TTerm String -> TTerm TestCaseWithMetadata
+ Hydra.Dsl.Meta.Testing: testCaseWithMetadataWithTags :: TTerm TestCaseWithMetadata -> TTerm [Tag] -> TTerm TestCaseWithMetadata
+ Hydra.Dsl.Meta.Testing: testCodec :: TTerm LanguageName -> TTerm FileExtension -> TTerm (Term -> Graph -> Either String String) -> TTerm (Type -> Graph -> Either String String) -> TTerm (String -> String) -> TTerm (Namespace -> String) -> TTerm String -> TTerm String -> TTerm String -> TTerm String -> TTerm (Set Name -> [String]) -> TTerm TestCodec
+ Hydra.Dsl.Meta.Testing: testCodecEncodeTerm :: TTerm TestCodec -> TTerm (Term -> Graph -> Either String String)
+ Hydra.Dsl.Meta.Testing: testCodecEncodeType :: TTerm TestCodec -> TTerm (Type -> Graph -> Either String String)
+ Hydra.Dsl.Meta.Testing: testCodecFileExtension :: TTerm TestCodec -> TTerm FileExtension
+ Hydra.Dsl.Meta.Testing: testCodecFindImports :: TTerm TestCodec -> TTerm (Set Name -> [String])
+ Hydra.Dsl.Meta.Testing: testCodecFormatModuleName :: TTerm TestCodec -> TTerm (Namespace -> String)
+ Hydra.Dsl.Meta.Testing: testCodecFormatTestName :: TTerm TestCodec -> TTerm (String -> String)
+ Hydra.Dsl.Meta.Testing: testCodecImportTemplate :: TTerm TestCodec -> TTerm String
+ Hydra.Dsl.Meta.Testing: testCodecLanguage :: TTerm TestCodec -> TTerm LanguageName
+ Hydra.Dsl.Meta.Testing: testCodecModuleTemplate :: TTerm TestCodec -> TTerm String
+ Hydra.Dsl.Meta.Testing: testCodecTestCaseTemplate :: TTerm TestCodec -> TTerm String
+ Hydra.Dsl.Meta.Testing: testCodecTestGroupTemplate :: TTerm TestCodec -> TTerm String
+ Hydra.Dsl.Meta.Testing: testCodecWithEncodeTerm :: TTerm TestCodec -> TTerm (Term -> Graph -> Either String String) -> TTerm TestCodec
+ Hydra.Dsl.Meta.Testing: testCodecWithEncodeType :: TTerm TestCodec -> TTerm (Type -> Graph -> Either String String) -> TTerm TestCodec
+ Hydra.Dsl.Meta.Testing: testCodecWithFileExtension :: TTerm TestCodec -> TTerm FileExtension -> TTerm TestCodec
+ Hydra.Dsl.Meta.Testing: testCodecWithFindImports :: TTerm TestCodec -> TTerm (Set Name -> [String]) -> TTerm TestCodec
+ Hydra.Dsl.Meta.Testing: testCodecWithFormatModuleName :: TTerm TestCodec -> TTerm (Namespace -> String) -> TTerm TestCodec
+ Hydra.Dsl.Meta.Testing: testCodecWithFormatTestName :: TTerm TestCodec -> TTerm (String -> String) -> TTerm TestCodec
+ Hydra.Dsl.Meta.Testing: testCodecWithImportTemplate :: TTerm TestCodec -> TTerm String -> TTerm TestCodec
+ Hydra.Dsl.Meta.Testing: testCodecWithLanguage :: TTerm TestCodec -> TTerm LanguageName -> TTerm TestCodec
+ Hydra.Dsl.Meta.Testing: testCodecWithModuleTemplate :: TTerm TestCodec -> TTerm String -> TTerm TestCodec
+ Hydra.Dsl.Meta.Testing: testCodecWithTestCaseTemplate :: TTerm TestCodec -> TTerm String -> TTerm TestCodec
+ Hydra.Dsl.Meta.Testing: testCodecWithTestGroupTemplate :: TTerm TestCodec -> TTerm String -> TTerm TestCodec
+ Hydra.Dsl.Meta.Testing: testGenerator :: TTerm (Module -> Graph -> Either String (Namespaces a)) -> TTerm (Namespaces a -> TestCodec) -> TTerm (Module -> TestGroup -> Graph -> Either String (String, String)) -> TTerm (Maybe (String -> [Module] -> (String, String))) -> TTerm (TestGenerator a)
+ Hydra.Dsl.Meta.Testing: testGeneratorAggregatorFile :: TTerm (TestGenerator a) -> TTerm (Maybe (String -> [Module] -> (String, String)))
+ Hydra.Dsl.Meta.Testing: testGeneratorCreateCodec :: TTerm (TestGenerator a) -> TTerm (Namespaces a -> TestCodec)
+ Hydra.Dsl.Meta.Testing: testGeneratorGenerateTestFile :: TTerm (TestGenerator a) -> TTerm (Module -> TestGroup -> Graph -> Either String (String, String))
+ Hydra.Dsl.Meta.Testing: testGeneratorNamespacesForModule :: TTerm (TestGenerator a) -> TTerm (Module -> Graph -> Either String (Namespaces a))
+ Hydra.Dsl.Meta.Testing: testGeneratorWithAggregatorFile :: TTerm (TestGenerator a) -> TTerm (Maybe (String -> [Module] -> (String, String))) -> TTerm (TestGenerator a)
+ Hydra.Dsl.Meta.Testing: testGeneratorWithCreateCodec :: TTerm (TestGenerator a) -> TTerm (Namespaces a -> TestCodec) -> TTerm (TestGenerator a)
+ Hydra.Dsl.Meta.Testing: testGeneratorWithGenerateTestFile :: TTerm (TestGenerator a) -> TTerm (Module -> TestGroup -> Graph -> Either String (String, String)) -> TTerm (TestGenerator a)
+ Hydra.Dsl.Meta.Testing: testGeneratorWithNamespacesForModule :: TTerm (TestGenerator a) -> TTerm (Module -> Graph -> Either String (Namespaces a)) -> TTerm (TestGenerator a)
+ Hydra.Dsl.Meta.Testing: testGroupCases :: TTerm TestGroup -> TTerm [TestCaseWithMetadata]
+ Hydra.Dsl.Meta.Testing: testGroupDescription :: TTerm TestGroup -> TTerm (Maybe String)
+ Hydra.Dsl.Meta.Testing: testGroupName :: TTerm TestGroup -> TTerm String
+ Hydra.Dsl.Meta.Testing: testGroupSubgroups :: TTerm TestGroup -> TTerm [TestGroup]
+ Hydra.Dsl.Meta.Testing: testGroupWithCases :: TTerm TestGroup -> TTerm [TestCaseWithMetadata] -> TTerm TestGroup
+ Hydra.Dsl.Meta.Testing: testGroupWithDescription :: TTerm TestGroup -> TTerm (Maybe String) -> TTerm TestGroup
+ Hydra.Dsl.Meta.Testing: testGroupWithName :: TTerm TestGroup -> TTerm String -> TTerm TestGroup
+ Hydra.Dsl.Meta.Testing: testGroupWithSubgroups :: TTerm TestGroup -> TTerm [TestGroup] -> TTerm TestGroup
+ Hydra.Dsl.Meta.Testing: topologicalSortBindingsTestCaseBindings :: TTerm TopologicalSortBindingsTestCase -> TTerm [(Name, Term)]
+ Hydra.Dsl.Meta.Testing: topologicalSortBindingsTestCaseExpected :: TTerm TopologicalSortBindingsTestCase -> TTerm [[(Name, Term)]]
+ Hydra.Dsl.Meta.Testing: topologicalSortBindingsTestCaseWithBindings :: TTerm TopologicalSortBindingsTestCase -> TTerm [(Name, Term)] -> TTerm TopologicalSortBindingsTestCase
+ Hydra.Dsl.Meta.Testing: topologicalSortBindingsTestCaseWithExpected :: TTerm TopologicalSortBindingsTestCase -> TTerm [[(Name, Term)]] -> TTerm TopologicalSortBindingsTestCase
+ Hydra.Dsl.Meta.Testing: topologicalSortSCCTestCaseAdjacencyList :: TTerm TopologicalSortSCCTestCase -> TTerm [(Int, [Int])]
+ Hydra.Dsl.Meta.Testing: topologicalSortSCCTestCaseExpected :: TTerm TopologicalSortSCCTestCase -> TTerm [[Int]]
+ Hydra.Dsl.Meta.Testing: topologicalSortSCCTestCaseWithAdjacencyList :: TTerm TopologicalSortSCCTestCase -> TTerm [(Int, [Int])] -> TTerm TopologicalSortSCCTestCase
+ Hydra.Dsl.Meta.Testing: topologicalSortSCCTestCaseWithExpected :: TTerm TopologicalSortSCCTestCase -> TTerm [[Int]] -> TTerm TopologicalSortSCCTestCase
+ Hydra.Dsl.Meta.Testing: topologicalSortTestCaseAdjacencyList :: TTerm TopologicalSortTestCase -> TTerm [(Int, [Int])]
+ Hydra.Dsl.Meta.Testing: topologicalSortTestCaseExpected :: TTerm TopologicalSortTestCase -> TTerm (Either [[Int]] [Int])
+ Hydra.Dsl.Meta.Testing: topologicalSortTestCaseWithAdjacencyList :: TTerm TopologicalSortTestCase -> TTerm [(Int, [Int])] -> TTerm TopologicalSortTestCase
+ Hydra.Dsl.Meta.Testing: topologicalSortTestCaseWithExpected :: TTerm TopologicalSortTestCase -> TTerm (Either [[Int]] [Int]) -> TTerm TopologicalSortTestCase
+ Hydra.Dsl.Meta.Testing: typeCheckingFailureTestCase :: TTerm Term -> TTerm TypeCheckingFailureTestCase
+ Hydra.Dsl.Meta.Testing: typeCheckingFailureTestCaseInput :: TTerm TypeCheckingFailureTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: typeCheckingFailureTestCaseWithInput :: TTerm TypeCheckingFailureTestCase -> TTerm Term -> TTerm TypeCheckingFailureTestCase
+ Hydra.Dsl.Meta.Testing: typeCheckingTestCaseInput :: TTerm TypeCheckingTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: typeCheckingTestCaseOutputTerm :: TTerm TypeCheckingTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: typeCheckingTestCaseOutputType :: TTerm TypeCheckingTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: typeCheckingTestCaseWithInput :: TTerm TypeCheckingTestCase -> TTerm Term -> TTerm TypeCheckingTestCase
+ Hydra.Dsl.Meta.Testing: typeCheckingTestCaseWithOutputTerm :: TTerm TypeCheckingTestCase -> TTerm Term -> TTerm TypeCheckingTestCase
+ Hydra.Dsl.Meta.Testing: typeCheckingTestCaseWithOutputType :: TTerm TypeCheckingTestCase -> TTerm Type -> TTerm TypeCheckingTestCase
+ Hydra.Dsl.Meta.Testing: typeReductionTestCaseInput :: TTerm TypeReductionTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: typeReductionTestCaseOutput :: TTerm TypeReductionTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: typeReductionTestCaseWithInput :: TTerm TypeReductionTestCase -> TTerm Type -> TTerm TypeReductionTestCase
+ Hydra.Dsl.Meta.Testing: typeReductionTestCaseWithOutput :: TTerm TypeReductionTestCase -> TTerm Type -> TTerm TypeReductionTestCase
+ Hydra.Dsl.Meta.Testing: unifyTypesTestCaseExpected :: TTerm UnifyTypesTestCase -> TTerm (Either String TypeSubst)
+ Hydra.Dsl.Meta.Testing: unifyTypesTestCaseLeft :: TTerm UnifyTypesTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: unifyTypesTestCaseRight :: TTerm UnifyTypesTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: unifyTypesTestCaseSchemaTypes :: TTerm UnifyTypesTestCase -> TTerm [Name]
+ Hydra.Dsl.Meta.Testing: unifyTypesTestCaseWithExpected :: TTerm UnifyTypesTestCase -> TTerm (Either String TypeSubst) -> TTerm UnifyTypesTestCase
+ Hydra.Dsl.Meta.Testing: unifyTypesTestCaseWithLeft :: TTerm UnifyTypesTestCase -> TTerm Type -> TTerm UnifyTypesTestCase
+ Hydra.Dsl.Meta.Testing: unifyTypesTestCaseWithRight :: TTerm UnifyTypesTestCase -> TTerm Type -> TTerm UnifyTypesTestCase
+ Hydra.Dsl.Meta.Testing: unifyTypesTestCaseWithSchemaTypes :: TTerm UnifyTypesTestCase -> TTerm [Name] -> TTerm UnifyTypesTestCase
+ Hydra.Dsl.Meta.Testing: unshadowVariablesTestCaseInput :: TTerm UnshadowVariablesTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: unshadowVariablesTestCaseOutput :: TTerm UnshadowVariablesTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: unshadowVariablesTestCaseWithInput :: TTerm UnshadowVariablesTestCase -> TTerm Term -> TTerm UnshadowVariablesTestCase
+ Hydra.Dsl.Meta.Testing: unshadowVariablesTestCaseWithOutput :: TTerm UnshadowVariablesTestCase -> TTerm Term -> TTerm UnshadowVariablesTestCase
+ Hydra.Dsl.Meta.Testing: validateCoreTermCase :: String -> TTerm Bool -> TTerm Term -> TTerm (Maybe InvalidTermError) -> TTerm TestCaseWithMetadata
+ Hydra.Dsl.Meta.Testing: validateCoreTermTestCase :: TTerm Bool -> TTerm Term -> TTerm (Maybe InvalidTermError) -> TTerm ValidateCoreTermTestCase
+ Hydra.Dsl.Meta.Testing: validateCoreTermTestCaseInput :: TTerm ValidateCoreTermTestCase -> TTerm Term
+ Hydra.Dsl.Meta.Testing: validateCoreTermTestCaseOutput :: TTerm ValidateCoreTermTestCase -> TTerm (Maybe InvalidTermError)
+ Hydra.Dsl.Meta.Testing: validateCoreTermTestCaseTyped :: TTerm ValidateCoreTermTestCase -> TTerm Bool
+ Hydra.Dsl.Meta.Testing: validateCoreTermTestCaseWithInput :: TTerm ValidateCoreTermTestCase -> TTerm Term -> TTerm ValidateCoreTermTestCase
+ Hydra.Dsl.Meta.Testing: validateCoreTermTestCaseWithOutput :: TTerm ValidateCoreTermTestCase -> TTerm (Maybe InvalidTermError) -> TTerm ValidateCoreTermTestCase
+ Hydra.Dsl.Meta.Testing: validateCoreTermTestCaseWithTyped :: TTerm ValidateCoreTermTestCase -> TTerm Bool -> TTerm ValidateCoreTermTestCase
+ Hydra.Dsl.Meta.Testing: variableOccursInTypeTestCaseExpected :: TTerm VariableOccursInTypeTestCase -> TTerm Bool
+ Hydra.Dsl.Meta.Testing: variableOccursInTypeTestCaseType :: TTerm VariableOccursInTypeTestCase -> TTerm Type
+ Hydra.Dsl.Meta.Testing: variableOccursInTypeTestCaseVariable :: TTerm VariableOccursInTypeTestCase -> TTerm Name
+ Hydra.Dsl.Meta.Testing: variableOccursInTypeTestCaseWithExpected :: TTerm VariableOccursInTypeTestCase -> TTerm Bool -> TTerm VariableOccursInTypeTestCase
+ Hydra.Dsl.Meta.Testing: variableOccursInTypeTestCaseWithType :: TTerm VariableOccursInTypeTestCase -> TTerm Type -> TTerm VariableOccursInTypeTestCase
+ Hydra.Dsl.Meta.Testing: variableOccursInTypeTestCaseWithVariable :: TTerm VariableOccursInTypeTestCase -> TTerm Name -> TTerm VariableOccursInTypeTestCase
+ Hydra.Dsl.Meta.Testing: writerTestCaseInput :: TTerm (WriterTestCase a) -> TTerm a
+ Hydra.Dsl.Meta.Testing: writerTestCaseOutput :: TTerm (WriterTestCase a) -> TTerm String
+ Hydra.Dsl.Meta.Testing: writerTestCaseWithInput :: TTerm (WriterTestCase a) -> TTerm a -> TTerm (WriterTestCase a)
+ Hydra.Dsl.Meta.Testing: writerTestCaseWithOutput :: TTerm (WriterTestCase a) -> TTerm String -> TTerm (WriterTestCase a)
+ Hydra.Dsl.Meta.Types: polyConstrained :: [String] -> [(String, [String])] -> TTerm Type -> TTerm TypeScheme
+ Hydra.Dsl.Meta.Types: void :: TTerm Type
+ Hydra.Dsl.Module: definitionTerm :: TTerm TermDefinition -> TTerm Definition
+ Hydra.Dsl.Module: definitionType :: TTerm TypeDefinition -> TTerm Definition
+ Hydra.Dsl.Module: fileExtension :: TTerm String -> TTerm FileExtension
+ Hydra.Dsl.Module: library :: TTerm Namespace -> TTerm String -> TTerm [Primitive] -> TTerm Library
+ Hydra.Dsl.Module: libraryNamespace :: TTerm Library -> TTerm Namespace
+ Hydra.Dsl.Module: libraryPrefix :: TTerm Library -> TTerm String
+ Hydra.Dsl.Module: libraryPrimitives :: TTerm Library -> TTerm [Primitive]
+ Hydra.Dsl.Module: libraryWithNamespace :: TTerm Library -> TTerm Namespace -> TTerm Library
+ Hydra.Dsl.Module: libraryWithPrefix :: TTerm Library -> TTerm String -> TTerm Library
+ Hydra.Dsl.Module: libraryWithPrimitives :: TTerm Library -> TTerm [Primitive] -> TTerm Library
+ Hydra.Dsl.Module: moduleDefinitions :: TTerm Module -> TTerm [Definition]
+ Hydra.Dsl.Module: moduleDescription :: TTerm Module -> TTerm (Maybe String)
+ Hydra.Dsl.Module: moduleNamespace :: TTerm Module -> TTerm Namespace
+ Hydra.Dsl.Module: moduleTermDependencies :: TTerm Module -> TTerm [Namespace]
+ Hydra.Dsl.Module: moduleTypeDependencies :: TTerm Module -> TTerm [Namespace]
+ Hydra.Dsl.Module: moduleWithDefinitions :: TTerm Module -> TTerm [Definition] -> TTerm Module
+ Hydra.Dsl.Module: moduleWithDescription :: TTerm Module -> TTerm (Maybe String) -> TTerm Module
+ Hydra.Dsl.Module: moduleWithNamespace :: TTerm Module -> TTerm Namespace -> TTerm Module
+ Hydra.Dsl.Module: moduleWithTermDependencies :: TTerm Module -> TTerm [Namespace] -> TTerm Module
+ Hydra.Dsl.Module: moduleWithTypeDependencies :: TTerm Module -> TTerm [Namespace] -> TTerm Module
+ Hydra.Dsl.Module: module_ :: TTerm Namespace -> TTerm [Definition] -> TTerm [Namespace] -> TTerm [Namespace] -> TTerm (Maybe String) -> TTerm Module
+ Hydra.Dsl.Module: namespace :: TTerm String -> TTerm Namespace
+ Hydra.Dsl.Module: namespaces :: TTerm (Namespace, n) -> TTerm (Map Namespace n) -> TTerm (Namespaces n)
+ Hydra.Dsl.Module: namespacesFocus :: TTerm (Namespaces n) -> TTerm (Namespace, n)
+ Hydra.Dsl.Module: namespacesMapping :: TTerm (Namespaces n) -> TTerm (Map Namespace n)
+ Hydra.Dsl.Module: namespacesWithFocus :: TTerm (Namespaces n) -> TTerm (Namespace, n) -> TTerm (Namespaces n)
+ Hydra.Dsl.Module: namespacesWithMapping :: TTerm (Namespaces n) -> TTerm (Map Namespace n) -> TTerm (Namespaces n)
+ Hydra.Dsl.Module: qualifiedName :: TTerm (Maybe Namespace) -> TTerm String -> TTerm QualifiedName
+ Hydra.Dsl.Module: qualifiedNameLocal :: TTerm QualifiedName -> TTerm String
+ Hydra.Dsl.Module: qualifiedNameNamespace :: TTerm QualifiedName -> TTerm (Maybe Namespace)
+ Hydra.Dsl.Module: qualifiedNameWithLocal :: TTerm QualifiedName -> TTerm String -> TTerm QualifiedName
+ Hydra.Dsl.Module: qualifiedNameWithNamespace :: TTerm QualifiedName -> TTerm (Maybe Namespace) -> TTerm QualifiedName
+ Hydra.Dsl.Module: termDefinition :: TTerm Name -> TTerm Term -> TTerm (Maybe TypeScheme) -> TTerm TermDefinition
+ Hydra.Dsl.Module: termDefinitionName :: TTerm TermDefinition -> TTerm Name
+ Hydra.Dsl.Module: termDefinitionTerm :: TTerm TermDefinition -> TTerm Term
+ Hydra.Dsl.Module: termDefinitionType :: TTerm TermDefinition -> TTerm (Maybe TypeScheme)
+ Hydra.Dsl.Module: termDefinitionWithName :: TTerm TermDefinition -> TTerm Name -> TTerm TermDefinition
+ Hydra.Dsl.Module: termDefinitionWithTerm :: TTerm TermDefinition -> TTerm Term -> TTerm TermDefinition
+ Hydra.Dsl.Module: termDefinitionWithType :: TTerm TermDefinition -> TTerm (Maybe TypeScheme) -> TTerm TermDefinition
+ Hydra.Dsl.Module: typeDefinition :: TTerm Name -> TTerm Type -> TTerm TypeDefinition
+ Hydra.Dsl.Module: typeDefinitionName :: TTerm TypeDefinition -> TTerm Name
+ Hydra.Dsl.Module: typeDefinitionType :: TTerm TypeDefinition -> TTerm Type
+ Hydra.Dsl.Module: typeDefinitionWithName :: TTerm TypeDefinition -> TTerm Name -> TTerm TypeDefinition
+ Hydra.Dsl.Module: typeDefinitionWithType :: TTerm TypeDefinition -> TTerm Type -> TTerm TypeDefinition
+ Hydra.Dsl.Module: unFileExtension :: TTerm FileExtension -> TTerm String
+ Hydra.Dsl.Module: unNamespace :: TTerm Namespace -> TTerm String
+ Hydra.Dsl.Packaging: package :: TTerm PackageName -> TTerm [Module] -> TTerm [PackageName] -> TTerm (Maybe String) -> TTerm Package
+ Hydra.Dsl.Packaging: packageDependencies :: TTerm Package -> TTerm [PackageName]
+ Hydra.Dsl.Packaging: packageDescription :: TTerm Package -> TTerm (Maybe String)
+ Hydra.Dsl.Packaging: packageModules :: TTerm Package -> TTerm [Module]
+ Hydra.Dsl.Packaging: packageName :: TTerm Package -> TTerm PackageName
+ Hydra.Dsl.Packaging: packageName_ :: TTerm String -> TTerm PackageName
+ Hydra.Dsl.Packaging: packageWithDependencies :: TTerm Package -> TTerm [PackageName] -> TTerm Package
+ Hydra.Dsl.Packaging: packageWithDescription :: TTerm Package -> TTerm (Maybe String) -> TTerm Package
+ Hydra.Dsl.Packaging: packageWithModules :: TTerm Package -> TTerm [Module] -> TTerm Package
+ Hydra.Dsl.Packaging: packageWithName :: TTerm Package -> TTerm PackageName -> TTerm Package
+ Hydra.Dsl.Packaging: unPackageName :: TTerm PackageName -> TTerm String
+ Hydra.Dsl.Parsing: parseError :: TTerm String -> TTerm String -> TTerm ParseError
+ Hydra.Dsl.Parsing: parseErrorMessage :: TTerm ParseError -> TTerm String
+ Hydra.Dsl.Parsing: parseErrorRemainder :: TTerm ParseError -> TTerm String
+ Hydra.Dsl.Parsing: parseErrorWithMessage :: TTerm ParseError -> TTerm String -> TTerm ParseError
+ Hydra.Dsl.Parsing: parseErrorWithRemainder :: TTerm ParseError -> TTerm String -> TTerm ParseError
+ Hydra.Dsl.Parsing: parseResultFailure :: TTerm ParseError -> TTerm (ParseResult a)
+ Hydra.Dsl.Parsing: parseResultSuccess :: TTerm (ParseSuccess a) -> TTerm (ParseResult a)
+ Hydra.Dsl.Parsing: parseSuccess :: TTerm a -> TTerm String -> TTerm (ParseSuccess a)
+ Hydra.Dsl.Parsing: parseSuccessRemainder :: TTerm (ParseSuccess a) -> TTerm String
+ Hydra.Dsl.Parsing: parseSuccessValue :: TTerm (ParseSuccess a) -> TTerm a
+ Hydra.Dsl.Parsing: parseSuccessWithRemainder :: TTerm (ParseSuccess a) -> TTerm String -> TTerm (ParseSuccess a)
+ Hydra.Dsl.Parsing: parseSuccessWithValue :: TTerm (ParseSuccess a) -> TTerm a -> TTerm (ParseSuccess a)
+ Hydra.Dsl.Parsing: parser :: TTerm (String -> ParseResult a) -> TTerm (Parser a)
+ Hydra.Dsl.Parsing: unParser :: TTerm (Parser a) -> TTerm (String -> ParseResult a)
+ Hydra.Dsl.Paths: subtermEdge :: TTerm SubtermNode -> TTerm SubtermPath -> TTerm SubtermNode -> TTerm SubtermEdge
+ Hydra.Dsl.Paths: subtermEdgePath :: TTerm SubtermEdge -> TTerm SubtermPath
+ Hydra.Dsl.Paths: subtermEdgeSource :: TTerm SubtermEdge -> TTerm SubtermNode
+ Hydra.Dsl.Paths: subtermEdgeTarget :: TTerm SubtermEdge -> TTerm SubtermNode
+ Hydra.Dsl.Paths: subtermEdgeWithPath :: TTerm SubtermEdge -> TTerm SubtermPath -> TTerm SubtermEdge
+ Hydra.Dsl.Paths: subtermEdgeWithSource :: TTerm SubtermEdge -> TTerm SubtermNode -> TTerm SubtermEdge
+ Hydra.Dsl.Paths: subtermEdgeWithTarget :: TTerm SubtermEdge -> TTerm SubtermNode -> TTerm SubtermEdge
+ Hydra.Dsl.Paths: subtermGraph :: TTerm [SubtermNode] -> TTerm [SubtermEdge] -> TTerm SubtermGraph
+ Hydra.Dsl.Paths: subtermGraphEdges :: TTerm SubtermGraph -> TTerm [SubtermEdge]
+ Hydra.Dsl.Paths: subtermGraphNodes :: TTerm SubtermGraph -> TTerm [SubtermNode]
+ Hydra.Dsl.Paths: subtermGraphWithEdges :: TTerm SubtermGraph -> TTerm [SubtermEdge] -> TTerm SubtermGraph
+ Hydra.Dsl.Paths: subtermGraphWithNodes :: TTerm SubtermGraph -> TTerm [SubtermNode] -> TTerm SubtermGraph
+ Hydra.Dsl.Paths: subtermNode :: TTerm Name -> TTerm String -> TTerm String -> TTerm SubtermNode
+ Hydra.Dsl.Paths: subtermNodeId :: TTerm SubtermNode -> TTerm String
+ Hydra.Dsl.Paths: subtermNodeLabel :: TTerm SubtermNode -> TTerm String
+ Hydra.Dsl.Paths: subtermNodeName :: TTerm SubtermNode -> TTerm Name
+ Hydra.Dsl.Paths: subtermNodeWithId :: TTerm SubtermNode -> TTerm String -> TTerm SubtermNode
+ Hydra.Dsl.Paths: subtermNodeWithLabel :: TTerm SubtermNode -> TTerm String -> TTerm SubtermNode
+ Hydra.Dsl.Paths: subtermNodeWithName :: TTerm SubtermNode -> TTerm Name -> TTerm SubtermNode
+ Hydra.Dsl.Paths: subtermPath :: TTerm [SubtermStep] -> TTerm SubtermPath
+ Hydra.Dsl.Paths: subtermStepAnnotatedBody :: TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepApplicationArgument :: TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepApplicationFunction :: TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepInjectionTerm :: TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepLambdaBody :: TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepLetBinding :: TTerm Name -> TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepLetBody :: TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepListElement :: TTerm Int -> TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepMapKey :: TTerm Int -> TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepMapValue :: TTerm Int -> TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepMaybeTerm :: TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepProductTerm :: TTerm Int -> TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepRecordField :: TTerm Name -> TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepSetElement :: TTerm Int -> TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepSumTerm :: TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepTypeApplicationTerm :: TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepTypeLambdaBody :: TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepUnionCasesBranch :: TTerm Name -> TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepUnionCasesDefault :: TTerm SubtermStep
+ Hydra.Dsl.Paths: subtermStepWrappedTerm :: TTerm SubtermStep
+ Hydra.Dsl.Paths: subtypeEdge :: TTerm SubtypeNode -> TTerm SubtypePath -> TTerm SubtypeNode -> TTerm SubtypeEdge
+ Hydra.Dsl.Paths: subtypeEdgePath :: TTerm SubtypeEdge -> TTerm SubtypePath
+ Hydra.Dsl.Paths: subtypeEdgeSource :: TTerm SubtypeEdge -> TTerm SubtypeNode
+ Hydra.Dsl.Paths: subtypeEdgeTarget :: TTerm SubtypeEdge -> TTerm SubtypeNode
+ Hydra.Dsl.Paths: subtypeEdgeWithPath :: TTerm SubtypeEdge -> TTerm SubtypePath -> TTerm SubtypeEdge
+ Hydra.Dsl.Paths: subtypeEdgeWithSource :: TTerm SubtypeEdge -> TTerm SubtypeNode -> TTerm SubtypeEdge
+ Hydra.Dsl.Paths: subtypeEdgeWithTarget :: TTerm SubtypeEdge -> TTerm SubtypeNode -> TTerm SubtypeEdge
+ Hydra.Dsl.Paths: subtypeGraph :: TTerm [SubtypeNode] -> TTerm [SubtypeEdge] -> TTerm SubtypeGraph
+ Hydra.Dsl.Paths: subtypeGraphEdges :: TTerm SubtypeGraph -> TTerm [SubtypeEdge]
+ Hydra.Dsl.Paths: subtypeGraphNodes :: TTerm SubtypeGraph -> TTerm [SubtypeNode]
+ Hydra.Dsl.Paths: subtypeGraphWithEdges :: TTerm SubtypeGraph -> TTerm [SubtypeEdge] -> TTerm SubtypeGraph
+ Hydra.Dsl.Paths: subtypeGraphWithNodes :: TTerm SubtypeGraph -> TTerm [SubtypeNode] -> TTerm SubtypeGraph
+ Hydra.Dsl.Paths: subtypeNode :: TTerm Name -> TTerm String -> TTerm String -> TTerm SubtypeNode
+ Hydra.Dsl.Paths: subtypeNodeId :: TTerm SubtypeNode -> TTerm String
+ Hydra.Dsl.Paths: subtypeNodeLabel :: TTerm SubtypeNode -> TTerm String
+ Hydra.Dsl.Paths: subtypeNodeName :: TTerm SubtypeNode -> TTerm Name
+ Hydra.Dsl.Paths: subtypeNodeWithId :: TTerm SubtypeNode -> TTerm String -> TTerm SubtypeNode
+ Hydra.Dsl.Paths: subtypeNodeWithLabel :: TTerm SubtypeNode -> TTerm String -> TTerm SubtypeNode
+ Hydra.Dsl.Paths: subtypeNodeWithName :: TTerm SubtypeNode -> TTerm Name -> TTerm SubtypeNode
+ Hydra.Dsl.Paths: subtypePath :: TTerm [SubtypeStep] -> TTerm SubtypePath
+ Hydra.Dsl.Paths: subtypeStepAnnotatedBody :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepApplicationArgument :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepApplicationFunction :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepEitherLeft :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepEitherRight :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepForallBody :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepFunctionCodomain :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepFunctionDomain :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepListElement :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepMapKeys :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepMapValues :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepMaybeElement :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepPairFirst :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepPairSecond :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepRecordField :: TTerm Name -> TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepSetElement :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepUnionField :: TTerm Name -> TTerm SubtypeStep
+ Hydra.Dsl.Paths: subtypeStepWrappedType :: TTerm SubtypeStep
+ Hydra.Dsl.Paths: unSubtermPath :: TTerm SubtermPath -> TTerm [SubtermStep]
+ Hydra.Dsl.Paths: unSubtypePath :: TTerm SubtypePath -> TTerm [SubtypeStep]
+ Hydra.Dsl.Prims: otherErr :: Context -> String -> InContext Error
+ Hydra.Dsl.Query: comparisonConstraintEqual :: TTerm ComparisonConstraint
+ Hydra.Dsl.Query: comparisonConstraintGreaterThan :: TTerm ComparisonConstraint
+ Hydra.Dsl.Query: comparisonConstraintGreaterThanOrEqual :: TTerm ComparisonConstraint
+ Hydra.Dsl.Query: comparisonConstraintLessThan :: TTerm ComparisonConstraint
+ Hydra.Dsl.Query: comparisonConstraintLessThanOrEqual :: TTerm ComparisonConstraint
+ Hydra.Dsl.Query: comparisonConstraintNotEqual :: TTerm ComparisonConstraint
+ Hydra.Dsl.Query: edge :: TTerm Name -> TTerm (Maybe Name) -> TTerm (Maybe Name) -> TTerm Edge
+ Hydra.Dsl.Query: edgeIn :: TTerm Edge -> TTerm (Maybe Name)
+ Hydra.Dsl.Query: edgeOut :: TTerm Edge -> TTerm (Maybe Name)
+ Hydra.Dsl.Query: edgeType :: TTerm Edge -> TTerm Name
+ Hydra.Dsl.Query: edgeWithIn :: TTerm Edge -> TTerm (Maybe Name) -> TTerm Edge
+ Hydra.Dsl.Query: edgeWithOut :: TTerm Edge -> TTerm (Maybe Name) -> TTerm Edge
+ Hydra.Dsl.Query: edgeWithType :: TTerm Edge -> TTerm Name -> TTerm Edge
+ Hydra.Dsl.Query: graphPattern :: TTerm Name -> TTerm [Pattern] -> TTerm GraphPattern
+ Hydra.Dsl.Query: graphPatternGraph :: TTerm GraphPattern -> TTerm Name
+ Hydra.Dsl.Query: graphPatternPatterns :: TTerm GraphPattern -> TTerm [Pattern]
+ Hydra.Dsl.Query: graphPatternWithGraph :: TTerm GraphPattern -> TTerm Name -> TTerm GraphPattern
+ Hydra.Dsl.Query: graphPatternWithPatterns :: TTerm GraphPattern -> TTerm [Pattern] -> TTerm GraphPattern
+ Hydra.Dsl.Query: nodeTerm :: TTerm Term -> TTerm Node
+ Hydra.Dsl.Query: nodeVariable :: TTerm Variable -> TTerm Node
+ Hydra.Dsl.Query: nodeWildcard :: TTerm Node
+ Hydra.Dsl.Query: pathEquation :: TTerm Path -> TTerm Path -> TTerm PathEquation
+ Hydra.Dsl.Query: pathEquationLeft :: TTerm PathEquation -> TTerm Path
+ Hydra.Dsl.Query: pathEquationRight :: TTerm PathEquation -> TTerm Path
+ Hydra.Dsl.Query: pathEquationWithLeft :: TTerm PathEquation -> TTerm Path -> TTerm PathEquation
+ Hydra.Dsl.Query: pathEquationWithRight :: TTerm PathEquation -> TTerm Path -> TTerm PathEquation
+ Hydra.Dsl.Query: pathInverse :: TTerm Path -> TTerm Path
+ Hydra.Dsl.Query: pathRegex :: TTerm RegexSequence -> TTerm Path
+ Hydra.Dsl.Query: pathStep :: TTerm Step -> TTerm Path
+ Hydra.Dsl.Query: patternConjunction :: TTerm [Pattern] -> TTerm Pattern
+ Hydra.Dsl.Query: patternDisjunction :: TTerm [Pattern] -> TTerm Pattern
+ Hydra.Dsl.Query: patternGraph :: TTerm GraphPattern -> TTerm Pattern
+ Hydra.Dsl.Query: patternImplication :: TTerm Pattern -> TTerm Pattern -> TTerm PatternImplication
+ Hydra.Dsl.Query: patternImplicationAntecedent :: TTerm PatternImplication -> TTerm Pattern
+ Hydra.Dsl.Query: patternImplicationConsequent :: TTerm PatternImplication -> TTerm Pattern
+ Hydra.Dsl.Query: patternImplicationWithAntecedent :: TTerm PatternImplication -> TTerm Pattern -> TTerm PatternImplication
+ Hydra.Dsl.Query: patternImplicationWithConsequent :: TTerm PatternImplication -> TTerm Pattern -> TTerm PatternImplication
+ Hydra.Dsl.Query: patternNegation :: TTerm Pattern -> TTerm Pattern
+ Hydra.Dsl.Query: patternTriple :: TTerm TriplePattern -> TTerm Pattern
+ Hydra.Dsl.Query: query :: TTerm [Variable] -> TTerm [Pattern] -> TTerm Query
+ Hydra.Dsl.Query: queryPatterns :: TTerm Query -> TTerm [Pattern]
+ Hydra.Dsl.Query: queryVariables :: TTerm Query -> TTerm [Variable]
+ Hydra.Dsl.Query: queryWithPatterns :: TTerm Query -> TTerm [Pattern] -> TTerm Query
+ Hydra.Dsl.Query: queryWithVariables :: TTerm Query -> TTerm [Variable] -> TTerm Query
+ Hydra.Dsl.Query: range :: TTerm Int -> TTerm Int -> TTerm Range
+ Hydra.Dsl.Query: rangeMax :: TTerm Range -> TTerm Int
+ Hydra.Dsl.Query: rangeMin :: TTerm Range -> TTerm Int
+ Hydra.Dsl.Query: rangeWithMax :: TTerm Range -> TTerm Int -> TTerm Range
+ Hydra.Dsl.Query: rangeWithMin :: TTerm Range -> TTerm Int -> TTerm Range
+ Hydra.Dsl.Query: regexQuantifierAtLeast :: TTerm Int -> TTerm RegexQuantifier
+ Hydra.Dsl.Query: regexQuantifierExactly :: TTerm Int -> TTerm RegexQuantifier
+ Hydra.Dsl.Query: regexQuantifierOne :: TTerm RegexQuantifier
+ Hydra.Dsl.Query: regexQuantifierOneOrMore :: TTerm RegexQuantifier
+ Hydra.Dsl.Query: regexQuantifierRange :: TTerm Range -> TTerm RegexQuantifier
+ Hydra.Dsl.Query: regexQuantifierZeroOrMore :: TTerm RegexQuantifier
+ Hydra.Dsl.Query: regexQuantifierZeroOrOne :: TTerm RegexQuantifier
+ Hydra.Dsl.Query: regexSequence :: TTerm Path -> TTerm RegexQuantifier -> TTerm RegexSequence
+ Hydra.Dsl.Query: regexSequencePath :: TTerm RegexSequence -> TTerm Path
+ Hydra.Dsl.Query: regexSequenceQuantifier :: TTerm RegexSequence -> TTerm RegexQuantifier
+ Hydra.Dsl.Query: regexSequenceWithPath :: TTerm RegexSequence -> TTerm Path -> TTerm RegexSequence
+ Hydra.Dsl.Query: regexSequenceWithQuantifier :: TTerm RegexSequence -> TTerm RegexQuantifier -> TTerm RegexSequence
+ Hydra.Dsl.Query: stepCompare :: TTerm ComparisonConstraint -> TTerm Step
+ Hydra.Dsl.Query: stepEdge :: TTerm Edge -> TTerm Step
+ Hydra.Dsl.Query: stepProject :: TTerm Projection -> TTerm Step
+ Hydra.Dsl.Query: triplePattern :: TTerm Node -> TTerm Path -> TTerm Node -> TTerm TriplePattern
+ Hydra.Dsl.Query: triplePatternObject :: TTerm TriplePattern -> TTerm Node
+ Hydra.Dsl.Query: triplePatternPredicate :: TTerm TriplePattern -> TTerm Path
+ Hydra.Dsl.Query: triplePatternSubject :: TTerm TriplePattern -> TTerm Node
+ Hydra.Dsl.Query: triplePatternWithObject :: TTerm TriplePattern -> TTerm Node -> TTerm TriplePattern
+ Hydra.Dsl.Query: triplePatternWithPredicate :: TTerm TriplePattern -> TTerm Path -> TTerm TriplePattern
+ Hydra.Dsl.Query: triplePatternWithSubject :: TTerm TriplePattern -> TTerm Node -> TTerm TriplePattern
+ Hydra.Dsl.Query: unVariable :: TTerm Variable -> TTerm String
+ Hydra.Dsl.Query: variable :: TTerm String -> TTerm Variable
+ Hydra.Dsl.Relational: columnName :: TTerm String -> TTerm ColumnName
+ Hydra.Dsl.Relational: columnSchema :: TTerm ColumnName -> TTerm t -> TTerm (ColumnSchema t)
+ Hydra.Dsl.Relational: columnSchemaDomain :: TTerm (ColumnSchema t) -> TTerm t
+ Hydra.Dsl.Relational: columnSchemaName :: TTerm (ColumnSchema t) -> TTerm ColumnName
+ Hydra.Dsl.Relational: columnSchemaWithDomain :: TTerm (ColumnSchema t) -> TTerm t -> TTerm (ColumnSchema t)
+ Hydra.Dsl.Relational: columnSchemaWithName :: TTerm (ColumnSchema t) -> TTerm ColumnName -> TTerm (ColumnSchema t)
+ Hydra.Dsl.Relational: foreignKey :: TTerm RelationName -> TTerm (Map ColumnName ColumnName) -> TTerm ForeignKey
+ Hydra.Dsl.Relational: foreignKeyForeignRelation :: TTerm ForeignKey -> TTerm RelationName
+ Hydra.Dsl.Relational: foreignKeyKeys :: TTerm ForeignKey -> TTerm (Map ColumnName ColumnName)
+ Hydra.Dsl.Relational: foreignKeyWithForeignRelation :: TTerm ForeignKey -> TTerm RelationName -> TTerm ForeignKey
+ Hydra.Dsl.Relational: foreignKeyWithKeys :: TTerm ForeignKey -> TTerm (Map ColumnName ColumnName) -> TTerm ForeignKey
+ Hydra.Dsl.Relational: primaryKey :: TTerm [ColumnName] -> TTerm PrimaryKey
+ Hydra.Dsl.Relational: relation :: TTerm [Row v] -> TTerm (Relation v)
+ Hydra.Dsl.Relational: relationName :: TTerm String -> TTerm RelationName
+ Hydra.Dsl.Relational: relationSchema :: TTerm RelationName -> TTerm [ColumnSchema t] -> TTerm [PrimaryKey] -> TTerm [ForeignKey] -> TTerm (RelationSchema t)
+ Hydra.Dsl.Relational: relationSchemaColumns :: TTerm (RelationSchema t) -> TTerm [ColumnSchema t]
+ Hydra.Dsl.Relational: relationSchemaForeignKeys :: TTerm (RelationSchema t) -> TTerm [ForeignKey]
+ Hydra.Dsl.Relational: relationSchemaName :: TTerm (RelationSchema t) -> TTerm RelationName
+ Hydra.Dsl.Relational: relationSchemaPrimaryKeys :: TTerm (RelationSchema t) -> TTerm [PrimaryKey]
+ Hydra.Dsl.Relational: relationSchemaWithColumns :: TTerm (RelationSchema t) -> TTerm [ColumnSchema t] -> TTerm (RelationSchema t)
+ Hydra.Dsl.Relational: relationSchemaWithForeignKeys :: TTerm (RelationSchema t) -> TTerm [ForeignKey] -> TTerm (RelationSchema t)
+ Hydra.Dsl.Relational: relationSchemaWithName :: TTerm (RelationSchema t) -> TTerm RelationName -> TTerm (RelationSchema t)
+ Hydra.Dsl.Relational: relationSchemaWithPrimaryKeys :: TTerm (RelationSchema t) -> TTerm [PrimaryKey] -> TTerm (RelationSchema t)
+ Hydra.Dsl.Relational: relationship :: TTerm (Set (Map ColumnName v)) -> TTerm (Relationship v)
+ Hydra.Dsl.Relational: row :: TTerm [v] -> TTerm (Row v)
+ Hydra.Dsl.Relational: unColumnName :: TTerm ColumnName -> TTerm String
+ Hydra.Dsl.Relational: unPrimaryKey :: TTerm PrimaryKey -> TTerm [ColumnName]
+ Hydra.Dsl.Relational: unRelation :: TTerm (Relation v) -> TTerm [Row v]
+ Hydra.Dsl.Relational: unRelationName :: TTerm RelationName -> TTerm String
+ Hydra.Dsl.Relational: unRelationship :: TTerm (Relationship v) -> TTerm (Set (Map ColumnName v))
+ Hydra.Dsl.Relational: unRow :: TTerm (Row v) -> TTerm [v]
+ Hydra.Dsl.Tabular: columnTypeName :: TTerm ColumnType -> TTerm ColumnName
+ Hydra.Dsl.Tabular: columnTypeType :: TTerm ColumnType -> TTerm Type
+ Hydra.Dsl.Tabular: columnTypeWithName :: TTerm ColumnType -> TTerm ColumnName -> TTerm ColumnType
+ Hydra.Dsl.Tabular: columnTypeWithType :: TTerm ColumnType -> TTerm Type -> TTerm ColumnType
+ Hydra.Dsl.Tabular: dataRow :: TTerm [Maybe v] -> TTerm (DataRow v)
+ Hydra.Dsl.Tabular: headerRow :: TTerm [String] -> TTerm HeaderRow
+ Hydra.Dsl.Tabular: table :: TTerm (Maybe HeaderRow) -> TTerm [DataRow v] -> TTerm (Table v)
+ Hydra.Dsl.Tabular: tableData :: TTerm (Table v) -> TTerm [DataRow v]
+ Hydra.Dsl.Tabular: tableHeader :: TTerm (Table v) -> TTerm (Maybe HeaderRow)
+ Hydra.Dsl.Tabular: tableTypeColumns :: TTerm TableType -> TTerm [ColumnType]
+ Hydra.Dsl.Tabular: tableTypeName :: TTerm TableType -> TTerm RelationName
+ Hydra.Dsl.Tabular: tableTypeWithColumns :: TTerm TableType -> TTerm [ColumnType] -> TTerm TableType
+ Hydra.Dsl.Tabular: tableTypeWithName :: TTerm TableType -> TTerm RelationName -> TTerm TableType
+ Hydra.Dsl.Tabular: tableWithData :: TTerm (Table v) -> TTerm [DataRow v] -> TTerm (Table v)
+ Hydra.Dsl.Tabular: tableWithHeader :: TTerm (Table v) -> TTerm (Maybe HeaderRow) -> TTerm (Table v)
+ Hydra.Dsl.Tabular: unDataRow :: TTerm (DataRow v) -> TTerm [Maybe v]
+ Hydra.Dsl.Tabular: unHeaderRow :: TTerm HeaderRow -> TTerm [String]
+ Hydra.Dsl.Testing: alphaConversionTestCase :: TTerm Term -> TTerm Name -> TTerm Name -> TTerm Term -> TTerm AlphaConversionTestCase
+ Hydra.Dsl.Testing: alphaConversionTestCaseNewVariable :: TTerm AlphaConversionTestCase -> TTerm Name
+ Hydra.Dsl.Testing: alphaConversionTestCaseOldVariable :: TTerm AlphaConversionTestCase -> TTerm Name
+ Hydra.Dsl.Testing: alphaConversionTestCaseResult :: TTerm AlphaConversionTestCase -> TTerm Term
+ Hydra.Dsl.Testing: alphaConversionTestCaseTerm :: TTerm AlphaConversionTestCase -> TTerm Term
+ Hydra.Dsl.Testing: alphaConversionTestCaseWithNewVariable :: TTerm AlphaConversionTestCase -> TTerm Name -> TTerm AlphaConversionTestCase
+ Hydra.Dsl.Testing: alphaConversionTestCaseWithOldVariable :: TTerm AlphaConversionTestCase -> TTerm Name -> TTerm AlphaConversionTestCase
+ Hydra.Dsl.Testing: alphaConversionTestCaseWithResult :: TTerm AlphaConversionTestCase -> TTerm Term -> TTerm AlphaConversionTestCase
+ Hydra.Dsl.Testing: alphaConversionTestCaseWithTerm :: TTerm AlphaConversionTestCase -> TTerm Term -> TTerm AlphaConversionTestCase
+ Hydra.Dsl.Testing: caseConversionTestCase :: TTerm CaseConvention -> TTerm CaseConvention -> TTerm String -> TTerm String -> TTerm CaseConversionTestCase
+ Hydra.Dsl.Testing: caseConversionTestCaseFromConvention :: TTerm CaseConversionTestCase -> TTerm CaseConvention
+ Hydra.Dsl.Testing: caseConversionTestCaseFromString :: TTerm CaseConversionTestCase -> TTerm String
+ Hydra.Dsl.Testing: caseConversionTestCaseToConvention :: TTerm CaseConversionTestCase -> TTerm CaseConvention
+ Hydra.Dsl.Testing: caseConversionTestCaseToString :: TTerm CaseConversionTestCase -> TTerm String
+ Hydra.Dsl.Testing: caseConversionTestCaseWithFromConvention :: TTerm CaseConversionTestCase -> TTerm CaseConvention -> TTerm CaseConversionTestCase
+ Hydra.Dsl.Testing: caseConversionTestCaseWithFromString :: TTerm CaseConversionTestCase -> TTerm String -> TTerm CaseConversionTestCase
+ Hydra.Dsl.Testing: caseConversionTestCaseWithToConvention :: TTerm CaseConversionTestCase -> TTerm CaseConvention -> TTerm CaseConversionTestCase
+ Hydra.Dsl.Testing: caseConversionTestCaseWithToString :: TTerm CaseConversionTestCase -> TTerm String -> TTerm CaseConversionTestCase
+ Hydra.Dsl.Testing: deannotateTermTestCase :: TTerm Term -> TTerm Term -> TTerm DeannotateTermTestCase
+ Hydra.Dsl.Testing: deannotateTermTestCaseInput :: TTerm DeannotateTermTestCase -> TTerm Term
+ Hydra.Dsl.Testing: deannotateTermTestCaseOutput :: TTerm DeannotateTermTestCase -> TTerm Term
+ Hydra.Dsl.Testing: deannotateTermTestCaseWithInput :: TTerm DeannotateTermTestCase -> TTerm Term -> TTerm DeannotateTermTestCase
+ Hydra.Dsl.Testing: deannotateTermTestCaseWithOutput :: TTerm DeannotateTermTestCase -> TTerm Term -> TTerm DeannotateTermTestCase
+ Hydra.Dsl.Testing: deannotateTypeTestCase :: TTerm Type -> TTerm Type -> TTerm DeannotateTypeTestCase
+ Hydra.Dsl.Testing: deannotateTypeTestCaseInput :: TTerm DeannotateTypeTestCase -> TTerm Type
+ Hydra.Dsl.Testing: deannotateTypeTestCaseOutput :: TTerm DeannotateTypeTestCase -> TTerm Type
+ Hydra.Dsl.Testing: deannotateTypeTestCaseWithInput :: TTerm DeannotateTypeTestCase -> TTerm Type -> TTerm DeannotateTypeTestCase
+ Hydra.Dsl.Testing: deannotateTypeTestCaseWithOutput :: TTerm DeannotateTypeTestCase -> TTerm Type -> TTerm DeannotateTypeTestCase
+ Hydra.Dsl.Testing: delegatedEvaluationTestCase :: TTerm Term -> TTerm Term -> TTerm DelegatedEvaluationTestCase
+ Hydra.Dsl.Testing: delegatedEvaluationTestCaseInput :: TTerm DelegatedEvaluationTestCase -> TTerm Term
+ Hydra.Dsl.Testing: delegatedEvaluationTestCaseOutput :: TTerm DelegatedEvaluationTestCase -> TTerm Term
+ Hydra.Dsl.Testing: delegatedEvaluationTestCaseWithInput :: TTerm DelegatedEvaluationTestCase -> TTerm Term -> TTerm DelegatedEvaluationTestCase
+ Hydra.Dsl.Testing: delegatedEvaluationTestCaseWithOutput :: TTerm DelegatedEvaluationTestCase -> TTerm Term -> TTerm DelegatedEvaluationTestCase
+ Hydra.Dsl.Testing: etaExpansionTestCase :: TTerm Term -> TTerm Term -> TTerm EtaExpansionTestCase
+ Hydra.Dsl.Testing: etaExpansionTestCaseInput :: TTerm EtaExpansionTestCase -> TTerm Term
+ Hydra.Dsl.Testing: etaExpansionTestCaseOutput :: TTerm EtaExpansionTestCase -> TTerm Term
+ Hydra.Dsl.Testing: etaExpansionTestCaseWithInput :: TTerm EtaExpansionTestCase -> TTerm Term -> TTerm EtaExpansionTestCase
+ Hydra.Dsl.Testing: etaExpansionTestCaseWithOutput :: TTerm EtaExpansionTestCase -> TTerm Term -> TTerm EtaExpansionTestCase
+ Hydra.Dsl.Testing: evaluationStyleEager :: TTerm EvaluationStyle
+ Hydra.Dsl.Testing: evaluationStyleLazy :: TTerm EvaluationStyle
+ Hydra.Dsl.Testing: evaluationTestCase :: TTerm EvaluationStyle -> TTerm Term -> TTerm Term -> TTerm EvaluationTestCase
+ Hydra.Dsl.Testing: evaluationTestCaseEvaluationStyle :: TTerm EvaluationTestCase -> TTerm EvaluationStyle
+ Hydra.Dsl.Testing: evaluationTestCaseInput :: TTerm EvaluationTestCase -> TTerm Term
+ Hydra.Dsl.Testing: evaluationTestCaseOutput :: TTerm EvaluationTestCase -> TTerm Term
+ Hydra.Dsl.Testing: evaluationTestCaseWithEvaluationStyle :: TTerm EvaluationTestCase -> TTerm EvaluationStyle -> TTerm EvaluationTestCase
+ Hydra.Dsl.Testing: evaluationTestCaseWithInput :: TTerm EvaluationTestCase -> TTerm Term -> TTerm EvaluationTestCase
+ Hydra.Dsl.Testing: evaluationTestCaseWithOutput :: TTerm EvaluationTestCase -> TTerm Term -> TTerm EvaluationTestCase
+ Hydra.Dsl.Testing: flattenLetTermsTestCase :: TTerm Term -> TTerm Term -> TTerm FlattenLetTermsTestCase
+ Hydra.Dsl.Testing: flattenLetTermsTestCaseInput :: TTerm FlattenLetTermsTestCase -> TTerm Term
+ Hydra.Dsl.Testing: flattenLetTermsTestCaseOutput :: TTerm FlattenLetTermsTestCase -> TTerm Term
+ Hydra.Dsl.Testing: flattenLetTermsTestCaseWithInput :: TTerm FlattenLetTermsTestCase -> TTerm Term -> TTerm FlattenLetTermsTestCase
+ Hydra.Dsl.Testing: flattenLetTermsTestCaseWithOutput :: TTerm FlattenLetTermsTestCase -> TTerm Term -> TTerm FlattenLetTermsTestCase
+ Hydra.Dsl.Testing: foldOperationCollectLabels :: TTerm FoldOperation
+ Hydra.Dsl.Testing: foldOperationCollectListLengths :: TTerm FoldOperation
+ Hydra.Dsl.Testing: foldOperationSumInt32Literals :: TTerm FoldOperation
+ Hydra.Dsl.Testing: foldOverTermTestCase :: TTerm Term -> TTerm TraversalOrder -> TTerm FoldOperation -> TTerm Term -> TTerm FoldOverTermTestCase
+ Hydra.Dsl.Testing: foldOverTermTestCaseInput :: TTerm FoldOverTermTestCase -> TTerm Term
+ Hydra.Dsl.Testing: foldOverTermTestCaseOperation :: TTerm FoldOverTermTestCase -> TTerm FoldOperation
+ Hydra.Dsl.Testing: foldOverTermTestCaseOutput :: TTerm FoldOverTermTestCase -> TTerm Term
+ Hydra.Dsl.Testing: foldOverTermTestCaseTraversalOrder :: TTerm FoldOverTermTestCase -> TTerm TraversalOrder
+ Hydra.Dsl.Testing: foldOverTermTestCaseWithInput :: TTerm FoldOverTermTestCase -> TTerm Term -> TTerm FoldOverTermTestCase
+ Hydra.Dsl.Testing: foldOverTermTestCaseWithOperation :: TTerm FoldOverTermTestCase -> TTerm FoldOperation -> TTerm FoldOverTermTestCase
+ Hydra.Dsl.Testing: foldOverTermTestCaseWithOutput :: TTerm FoldOverTermTestCase -> TTerm Term -> TTerm FoldOverTermTestCase
+ Hydra.Dsl.Testing: foldOverTermTestCaseWithTraversalOrder :: TTerm FoldOverTermTestCase -> TTerm TraversalOrder -> TTerm FoldOverTermTestCase
+ Hydra.Dsl.Testing: freeVariablesTestCase :: TTerm Term -> TTerm (Set Name) -> TTerm FreeVariablesTestCase
+ Hydra.Dsl.Testing: freeVariablesTestCaseInput :: TTerm FreeVariablesTestCase -> TTerm Term
+ Hydra.Dsl.Testing: freeVariablesTestCaseOutput :: TTerm FreeVariablesTestCase -> TTerm (Set Name)
+ Hydra.Dsl.Testing: freeVariablesTestCaseWithInput :: TTerm FreeVariablesTestCase -> TTerm Term -> TTerm FreeVariablesTestCase
+ Hydra.Dsl.Testing: freeVariablesTestCaseWithOutput :: TTerm FreeVariablesTestCase -> TTerm (Set Name) -> TTerm FreeVariablesTestCase
+ Hydra.Dsl.Testing: hoistCaseStatementsTestCase :: TTerm Term -> TTerm Term -> TTerm HoistCaseStatementsTestCase
+ Hydra.Dsl.Testing: hoistCaseStatementsTestCaseInput :: TTerm HoistCaseStatementsTestCase -> TTerm Term
+ Hydra.Dsl.Testing: hoistCaseStatementsTestCaseOutput :: TTerm HoistCaseStatementsTestCase -> TTerm Term
+ Hydra.Dsl.Testing: hoistCaseStatementsTestCaseWithInput :: TTerm HoistCaseStatementsTestCase -> TTerm Term -> TTerm HoistCaseStatementsTestCase
+ Hydra.Dsl.Testing: hoistCaseStatementsTestCaseWithOutput :: TTerm HoistCaseStatementsTestCase -> TTerm Term -> TTerm HoistCaseStatementsTestCase
+ Hydra.Dsl.Testing: hoistLetBindingsTestCase :: TTerm Let -> TTerm Let -> TTerm HoistLetBindingsTestCase
+ Hydra.Dsl.Testing: hoistLetBindingsTestCaseInput :: TTerm HoistLetBindingsTestCase -> TTerm Let
+ Hydra.Dsl.Testing: hoistLetBindingsTestCaseOutput :: TTerm HoistLetBindingsTestCase -> TTerm Let
+ Hydra.Dsl.Testing: hoistLetBindingsTestCaseWithInput :: TTerm HoistLetBindingsTestCase -> TTerm Let -> TTerm HoistLetBindingsTestCase
+ Hydra.Dsl.Testing: hoistLetBindingsTestCaseWithOutput :: TTerm HoistLetBindingsTestCase -> TTerm Let -> TTerm HoistLetBindingsTestCase
+ Hydra.Dsl.Testing: hoistPolymorphicLetBindingsTestCase :: TTerm Let -> TTerm Let -> TTerm HoistPolymorphicLetBindingsTestCase
+ Hydra.Dsl.Testing: hoistPolymorphicLetBindingsTestCaseInput :: TTerm HoistPolymorphicLetBindingsTestCase -> TTerm Let
+ Hydra.Dsl.Testing: hoistPolymorphicLetBindingsTestCaseOutput :: TTerm HoistPolymorphicLetBindingsTestCase -> TTerm Let
+ Hydra.Dsl.Testing: hoistPolymorphicLetBindingsTestCaseWithInput :: TTerm HoistPolymorphicLetBindingsTestCase -> TTerm Let -> TTerm HoistPolymorphicLetBindingsTestCase
+ Hydra.Dsl.Testing: hoistPolymorphicLetBindingsTestCaseWithOutput :: TTerm HoistPolymorphicLetBindingsTestCase -> TTerm Let -> TTerm HoistPolymorphicLetBindingsTestCase
+ Hydra.Dsl.Testing: hoistPredicateApplications :: TTerm HoistPredicate
+ Hydra.Dsl.Testing: hoistPredicateCaseStatements :: TTerm HoistPredicate
+ Hydra.Dsl.Testing: hoistPredicateLists :: TTerm HoistPredicate
+ Hydra.Dsl.Testing: hoistPredicateNothing :: TTerm HoistPredicate
+ Hydra.Dsl.Testing: hoistSubtermsTestCase :: TTerm HoistPredicate -> TTerm Term -> TTerm Term -> TTerm HoistSubtermsTestCase
+ Hydra.Dsl.Testing: hoistSubtermsTestCaseInput :: TTerm HoistSubtermsTestCase -> TTerm Term
+ Hydra.Dsl.Testing: hoistSubtermsTestCaseOutput :: TTerm HoistSubtermsTestCase -> TTerm Term
+ Hydra.Dsl.Testing: hoistSubtermsTestCasePredicate :: TTerm HoistSubtermsTestCase -> TTerm HoistPredicate
+ Hydra.Dsl.Testing: hoistSubtermsTestCaseWithInput :: TTerm HoistSubtermsTestCase -> TTerm Term -> TTerm HoistSubtermsTestCase
+ Hydra.Dsl.Testing: hoistSubtermsTestCaseWithOutput :: TTerm HoistSubtermsTestCase -> TTerm Term -> TTerm HoistSubtermsTestCase
+ Hydra.Dsl.Testing: hoistSubtermsTestCaseWithPredicate :: TTerm HoistSubtermsTestCase -> TTerm HoistPredicate -> TTerm HoistSubtermsTestCase
+ Hydra.Dsl.Testing: inferenceFailureTestCase :: TTerm Term -> TTerm InferenceFailureTestCase
+ Hydra.Dsl.Testing: inferenceFailureTestCaseInput :: TTerm InferenceFailureTestCase -> TTerm Term
+ Hydra.Dsl.Testing: inferenceFailureTestCaseWithInput :: TTerm InferenceFailureTestCase -> TTerm Term -> TTerm InferenceFailureTestCase
+ Hydra.Dsl.Testing: inferenceTestCase :: TTerm Term -> TTerm TypeScheme -> TTerm InferenceTestCase
+ Hydra.Dsl.Testing: inferenceTestCaseInput :: TTerm InferenceTestCase -> TTerm Term
+ Hydra.Dsl.Testing: inferenceTestCaseOutput :: TTerm InferenceTestCase -> TTerm TypeScheme
+ Hydra.Dsl.Testing: inferenceTestCaseWithInput :: TTerm InferenceTestCase -> TTerm Term -> TTerm InferenceTestCase
+ Hydra.Dsl.Testing: inferenceTestCaseWithOutput :: TTerm InferenceTestCase -> TTerm TypeScheme -> TTerm InferenceTestCase
+ Hydra.Dsl.Testing: joinTypesTestCase :: TTerm Type -> TTerm Type -> TTerm (Either () [TypeConstraint]) -> TTerm JoinTypesTestCase
+ Hydra.Dsl.Testing: joinTypesTestCaseExpected :: TTerm JoinTypesTestCase -> TTerm (Either () [TypeConstraint])
+ Hydra.Dsl.Testing: joinTypesTestCaseLeft :: TTerm JoinTypesTestCase -> TTerm Type
+ Hydra.Dsl.Testing: joinTypesTestCaseRight :: TTerm JoinTypesTestCase -> TTerm Type
+ Hydra.Dsl.Testing: joinTypesTestCaseWithExpected :: TTerm JoinTypesTestCase -> TTerm (Either () [TypeConstraint]) -> TTerm JoinTypesTestCase
+ Hydra.Dsl.Testing: joinTypesTestCaseWithLeft :: TTerm JoinTypesTestCase -> TTerm Type -> TTerm JoinTypesTestCase
+ Hydra.Dsl.Testing: joinTypesTestCaseWithRight :: TTerm JoinTypesTestCase -> TTerm Type -> TTerm JoinTypesTestCase
+ Hydra.Dsl.Testing: jsonDecodeTestCase :: TTerm Type -> TTerm Value -> TTerm (Either String Term) -> TTerm JsonDecodeTestCase
+ Hydra.Dsl.Testing: jsonDecodeTestCaseExpected :: TTerm JsonDecodeTestCase -> TTerm (Either String Term)
+ Hydra.Dsl.Testing: jsonDecodeTestCaseJson :: TTerm JsonDecodeTestCase -> TTerm Value
+ Hydra.Dsl.Testing: jsonDecodeTestCaseType :: TTerm JsonDecodeTestCase -> TTerm Type
+ Hydra.Dsl.Testing: jsonDecodeTestCaseWithExpected :: TTerm JsonDecodeTestCase -> TTerm (Either String Term) -> TTerm JsonDecodeTestCase
+ Hydra.Dsl.Testing: jsonDecodeTestCaseWithJson :: TTerm JsonDecodeTestCase -> TTerm Value -> TTerm JsonDecodeTestCase
+ Hydra.Dsl.Testing: jsonDecodeTestCaseWithType :: TTerm JsonDecodeTestCase -> TTerm Type -> TTerm JsonDecodeTestCase
+ Hydra.Dsl.Testing: jsonEncodeTestCase :: TTerm Term -> TTerm (Either String Value) -> TTerm JsonEncodeTestCase
+ Hydra.Dsl.Testing: jsonEncodeTestCaseExpected :: TTerm JsonEncodeTestCase -> TTerm (Either String Value)
+ Hydra.Dsl.Testing: jsonEncodeTestCaseTerm :: TTerm JsonEncodeTestCase -> TTerm Term
+ Hydra.Dsl.Testing: jsonEncodeTestCaseWithExpected :: TTerm JsonEncodeTestCase -> TTerm (Either String Value) -> TTerm JsonEncodeTestCase
+ Hydra.Dsl.Testing: jsonEncodeTestCaseWithTerm :: TTerm JsonEncodeTestCase -> TTerm Term -> TTerm JsonEncodeTestCase
+ Hydra.Dsl.Testing: jsonRoundtripTestCase :: TTerm Type -> TTerm Term -> TTerm JsonRoundtripTestCase
+ Hydra.Dsl.Testing: jsonRoundtripTestCaseTerm :: TTerm JsonRoundtripTestCase -> TTerm Term
+ Hydra.Dsl.Testing: jsonRoundtripTestCaseType :: TTerm JsonRoundtripTestCase -> TTerm Type
+ Hydra.Dsl.Testing: jsonRoundtripTestCaseWithTerm :: TTerm JsonRoundtripTestCase -> TTerm Term -> TTerm JsonRoundtripTestCase
+ Hydra.Dsl.Testing: jsonRoundtripTestCaseWithType :: TTerm JsonRoundtripTestCase -> TTerm Type -> TTerm JsonRoundtripTestCase
+ Hydra.Dsl.Testing: liftLambdaAboveLetTestCase :: TTerm Term -> TTerm Term -> TTerm LiftLambdaAboveLetTestCase
+ Hydra.Dsl.Testing: liftLambdaAboveLetTestCaseInput :: TTerm LiftLambdaAboveLetTestCase -> TTerm Term
+ Hydra.Dsl.Testing: liftLambdaAboveLetTestCaseOutput :: TTerm LiftLambdaAboveLetTestCase -> TTerm Term
+ Hydra.Dsl.Testing: liftLambdaAboveLetTestCaseWithInput :: TTerm LiftLambdaAboveLetTestCase -> TTerm Term -> TTerm LiftLambdaAboveLetTestCase
+ Hydra.Dsl.Testing: liftLambdaAboveLetTestCaseWithOutput :: TTerm LiftLambdaAboveLetTestCase -> TTerm Term -> TTerm LiftLambdaAboveLetTestCase
+ Hydra.Dsl.Testing: normalizeTypeVariablesTestCase :: TTerm Term -> TTerm Term -> TTerm NormalizeTypeVariablesTestCase
+ Hydra.Dsl.Testing: normalizeTypeVariablesTestCaseInput :: TTerm NormalizeTypeVariablesTestCase -> TTerm Term
+ Hydra.Dsl.Testing: normalizeTypeVariablesTestCaseOutput :: TTerm NormalizeTypeVariablesTestCase -> TTerm Term
+ Hydra.Dsl.Testing: normalizeTypeVariablesTestCaseWithInput :: TTerm NormalizeTypeVariablesTestCase -> TTerm Term -> TTerm NormalizeTypeVariablesTestCase
+ Hydra.Dsl.Testing: normalizeTypeVariablesTestCaseWithOutput :: TTerm NormalizeTypeVariablesTestCase -> TTerm Term -> TTerm NormalizeTypeVariablesTestCase
+ Hydra.Dsl.Testing: parserTestCase :: TTerm String -> TTerm (ParseResult a) -> TTerm (ParserTestCase a)
+ Hydra.Dsl.Testing: parserTestCaseInput :: TTerm (ParserTestCase a) -> TTerm String
+ Hydra.Dsl.Testing: parserTestCaseOutput :: TTerm (ParserTestCase a) -> TTerm (ParseResult a)
+ Hydra.Dsl.Testing: parserTestCaseWithInput :: TTerm (ParserTestCase a) -> TTerm String -> TTerm (ParserTestCase a)
+ Hydra.Dsl.Testing: parserTestCaseWithOutput :: TTerm (ParserTestCase a) -> TTerm (ParseResult a) -> TTerm (ParserTestCase a)
+ Hydra.Dsl.Testing: rewriteTermTestCase :: TTerm Term -> TTerm TermRewriter -> TTerm Term -> TTerm RewriteTermTestCase
+ Hydra.Dsl.Testing: rewriteTermTestCaseInput :: TTerm RewriteTermTestCase -> TTerm Term
+ Hydra.Dsl.Testing: rewriteTermTestCaseOutput :: TTerm RewriteTermTestCase -> TTerm Term
+ Hydra.Dsl.Testing: rewriteTermTestCaseRewriter :: TTerm RewriteTermTestCase -> TTerm TermRewriter
+ Hydra.Dsl.Testing: rewriteTermTestCaseWithInput :: TTerm RewriteTermTestCase -> TTerm Term -> TTerm RewriteTermTestCase
+ Hydra.Dsl.Testing: rewriteTermTestCaseWithOutput :: TTerm RewriteTermTestCase -> TTerm Term -> TTerm RewriteTermTestCase
+ Hydra.Dsl.Testing: rewriteTermTestCaseWithRewriter :: TTerm RewriteTermTestCase -> TTerm TermRewriter -> TTerm RewriteTermTestCase
+ Hydra.Dsl.Testing: rewriteTypeTestCase :: TTerm Type -> TTerm TypeRewriter -> TTerm Type -> TTerm RewriteTypeTestCase
+ Hydra.Dsl.Testing: rewriteTypeTestCaseInput :: TTerm RewriteTypeTestCase -> TTerm Type
+ Hydra.Dsl.Testing: rewriteTypeTestCaseOutput :: TTerm RewriteTypeTestCase -> TTerm Type
+ Hydra.Dsl.Testing: rewriteTypeTestCaseRewriter :: TTerm RewriteTypeTestCase -> TTerm TypeRewriter
+ Hydra.Dsl.Testing: rewriteTypeTestCaseWithInput :: TTerm RewriteTypeTestCase -> TTerm Type -> TTerm RewriteTypeTestCase
+ Hydra.Dsl.Testing: rewriteTypeTestCaseWithOutput :: TTerm RewriteTypeTestCase -> TTerm Type -> TTerm RewriteTypeTestCase
+ Hydra.Dsl.Testing: rewriteTypeTestCaseWithRewriter :: TTerm RewriteTypeTestCase -> TTerm TypeRewriter -> TTerm RewriteTypeTestCase
+ Hydra.Dsl.Testing: serializationTestCase :: TTerm Expr -> TTerm String -> TTerm SerializationTestCase
+ Hydra.Dsl.Testing: serializationTestCaseInput :: TTerm SerializationTestCase -> TTerm Expr
+ Hydra.Dsl.Testing: serializationTestCaseOutput :: TTerm SerializationTestCase -> TTerm String
+ Hydra.Dsl.Testing: serializationTestCaseWithInput :: TTerm SerializationTestCase -> TTerm Expr -> TTerm SerializationTestCase
+ Hydra.Dsl.Testing: serializationTestCaseWithOutput :: TTerm SerializationTestCase -> TTerm String -> TTerm SerializationTestCase
+ Hydra.Dsl.Testing: simplifyTermTestCase :: TTerm Term -> TTerm Term -> TTerm SimplifyTermTestCase
+ Hydra.Dsl.Testing: simplifyTermTestCaseInput :: TTerm SimplifyTermTestCase -> TTerm Term
+ Hydra.Dsl.Testing: simplifyTermTestCaseOutput :: TTerm SimplifyTermTestCase -> TTerm Term
+ Hydra.Dsl.Testing: simplifyTermTestCaseWithInput :: TTerm SimplifyTermTestCase -> TTerm Term -> TTerm SimplifyTermTestCase
+ Hydra.Dsl.Testing: simplifyTermTestCaseWithOutput :: TTerm SimplifyTermTestCase -> TTerm Term -> TTerm SimplifyTermTestCase
+ Hydra.Dsl.Testing: substInTypeTestCase :: TTerm [(Name, Type)] -> TTerm Type -> TTerm Type -> TTerm SubstInTypeTestCase
+ Hydra.Dsl.Testing: substInTypeTestCaseInput :: TTerm SubstInTypeTestCase -> TTerm Type
+ Hydra.Dsl.Testing: substInTypeTestCaseOutput :: TTerm SubstInTypeTestCase -> TTerm Type
+ Hydra.Dsl.Testing: substInTypeTestCaseSubstitution :: TTerm SubstInTypeTestCase -> TTerm [(Name, Type)]
+ Hydra.Dsl.Testing: substInTypeTestCaseWithInput :: TTerm SubstInTypeTestCase -> TTerm Type -> TTerm SubstInTypeTestCase
+ Hydra.Dsl.Testing: substInTypeTestCaseWithOutput :: TTerm SubstInTypeTestCase -> TTerm Type -> TTerm SubstInTypeTestCase
+ Hydra.Dsl.Testing: substInTypeTestCaseWithSubstitution :: TTerm SubstInTypeTestCase -> TTerm [(Name, Type)] -> TTerm SubstInTypeTestCase
+ Hydra.Dsl.Testing: tag :: TTerm String -> TTerm Tag
+ Hydra.Dsl.Testing: termRewriterReplaceFooWithBar :: TTerm TermRewriter
+ Hydra.Dsl.Testing: termRewriterReplaceInt32WithInt64 :: TTerm TermRewriter
+ Hydra.Dsl.Testing: testCaseAlphaConversion :: TTerm AlphaConversionTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseCaseConversion :: TTerm CaseConversionTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseDeannotateTerm :: TTerm DeannotateTermTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseDeannotateType :: TTerm DeannotateTypeTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseDelegatedEvaluation :: TTerm DelegatedEvaluationTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseEtaExpansion :: TTerm EtaExpansionTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseEvaluation :: TTerm EvaluationTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseFlattenLetTerms :: TTerm FlattenLetTermsTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseFoldOverTerm :: TTerm FoldOverTermTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseFreeVariables :: TTerm FreeVariablesTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseHoistCaseStatements :: TTerm HoistCaseStatementsTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseHoistLetBindings :: TTerm HoistLetBindingsTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseHoistPolymorphicLetBindings :: TTerm HoistPolymorphicLetBindingsTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseHoistSubterms :: TTerm HoistSubtermsTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseInference :: TTerm InferenceTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseInferenceFailure :: TTerm InferenceFailureTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseJoinTypes :: TTerm JoinTypesTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseJsonDecode :: TTerm JsonDecodeTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseJsonEncode :: TTerm JsonEncodeTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseJsonParser :: TTerm JsonParserTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseJsonRoundtrip :: TTerm JsonRoundtripTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseJsonWriter :: TTerm JsonWriterTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseLiftLambdaAboveLet :: TTerm LiftLambdaAboveLetTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseNormalizeTypeVariables :: TTerm NormalizeTypeVariablesTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseRewriteTerm :: TTerm RewriteTermTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseRewriteType :: TTerm RewriteTypeTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseSerialization :: TTerm SerializationTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseSimplifyTerm :: TTerm SimplifyTermTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseSubstInType :: TTerm SubstInTypeTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseTopologicalSort :: TTerm TopologicalSortTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseTopologicalSortBindings :: TTerm TopologicalSortBindingsTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseTopologicalSortSCC :: TTerm TopologicalSortSCCTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseTypeChecking :: TTerm TypeCheckingTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseTypeCheckingFailure :: TTerm TypeCheckingFailureTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseTypeReduction :: TTerm TypeReductionTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseUnifyTypes :: TTerm UnifyTypesTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseUnshadowVariables :: TTerm UnshadowVariablesTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseValidateCoreTerm :: TTerm ValidateCoreTermTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseVariableOccursInType :: TTerm VariableOccursInTypeTestCase -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseWithMetadata :: TTerm String -> TTerm TestCase -> TTerm (Maybe String) -> TTerm [Tag] -> TTerm TestCaseWithMetadata
+ Hydra.Dsl.Testing: testCaseWithMetadataCase :: TTerm TestCaseWithMetadata -> TTerm TestCase
+ Hydra.Dsl.Testing: testCaseWithMetadataDescription :: TTerm TestCaseWithMetadata -> TTerm (Maybe String)
+ Hydra.Dsl.Testing: testCaseWithMetadataName :: TTerm TestCaseWithMetadata -> TTerm String
+ Hydra.Dsl.Testing: testCaseWithMetadataTags :: TTerm TestCaseWithMetadata -> TTerm [Tag]
+ Hydra.Dsl.Testing: testCaseWithMetadataWithCase :: TTerm TestCaseWithMetadata -> TTerm TestCase -> TTerm TestCaseWithMetadata
+ Hydra.Dsl.Testing: testCaseWithMetadataWithDescription :: TTerm TestCaseWithMetadata -> TTerm (Maybe String) -> TTerm TestCaseWithMetadata
+ Hydra.Dsl.Testing: testCaseWithMetadataWithName :: TTerm TestCaseWithMetadata -> TTerm String -> TTerm TestCaseWithMetadata
+ Hydra.Dsl.Testing: testCaseWithMetadataWithTags :: TTerm TestCaseWithMetadata -> TTerm [Tag] -> TTerm TestCaseWithMetadata
+ Hydra.Dsl.Testing: testCodec :: TTerm LanguageName -> TTerm FileExtension -> TTerm (Term -> Graph -> Either String String) -> TTerm (Type -> Graph -> Either String String) -> TTerm (String -> String) -> TTerm (Namespace -> String) -> TTerm String -> TTerm String -> TTerm String -> TTerm String -> TTerm (Set Name -> [String]) -> TTerm TestCodec
+ Hydra.Dsl.Testing: testCodecEncodeTerm :: TTerm TestCodec -> TTerm (Term -> Graph -> Either String String)
+ Hydra.Dsl.Testing: testCodecEncodeType :: TTerm TestCodec -> TTerm (Type -> Graph -> Either String String)
+ Hydra.Dsl.Testing: testCodecFileExtension :: TTerm TestCodec -> TTerm FileExtension
+ Hydra.Dsl.Testing: testCodecFindImports :: TTerm TestCodec -> TTerm (Set Name -> [String])
+ Hydra.Dsl.Testing: testCodecFormatModuleName :: TTerm TestCodec -> TTerm (Namespace -> String)
+ Hydra.Dsl.Testing: testCodecFormatTestName :: TTerm TestCodec -> TTerm (String -> String)
+ Hydra.Dsl.Testing: testCodecImportTemplate :: TTerm TestCodec -> TTerm String
+ Hydra.Dsl.Testing: testCodecLanguage :: TTerm TestCodec -> TTerm LanguageName
+ Hydra.Dsl.Testing: testCodecModuleTemplate :: TTerm TestCodec -> TTerm String
+ Hydra.Dsl.Testing: testCodecTestCaseTemplate :: TTerm TestCodec -> TTerm String
+ Hydra.Dsl.Testing: testCodecTestGroupTemplate :: TTerm TestCodec -> TTerm String
+ Hydra.Dsl.Testing: testCodecWithEncodeTerm :: TTerm TestCodec -> TTerm (Term -> Graph -> Either String String) -> TTerm TestCodec
+ Hydra.Dsl.Testing: testCodecWithEncodeType :: TTerm TestCodec -> TTerm (Type -> Graph -> Either String String) -> TTerm TestCodec
+ Hydra.Dsl.Testing: testCodecWithFileExtension :: TTerm TestCodec -> TTerm FileExtension -> TTerm TestCodec
+ Hydra.Dsl.Testing: testCodecWithFindImports :: TTerm TestCodec -> TTerm (Set Name -> [String]) -> TTerm TestCodec
+ Hydra.Dsl.Testing: testCodecWithFormatModuleName :: TTerm TestCodec -> TTerm (Namespace -> String) -> TTerm TestCodec
+ Hydra.Dsl.Testing: testCodecWithFormatTestName :: TTerm TestCodec -> TTerm (String -> String) -> TTerm TestCodec
+ Hydra.Dsl.Testing: testCodecWithImportTemplate :: TTerm TestCodec -> TTerm String -> TTerm TestCodec
+ Hydra.Dsl.Testing: testCodecWithLanguage :: TTerm TestCodec -> TTerm LanguageName -> TTerm TestCodec
+ Hydra.Dsl.Testing: testCodecWithModuleTemplate :: TTerm TestCodec -> TTerm String -> TTerm TestCodec
+ Hydra.Dsl.Testing: testCodecWithTestCaseTemplate :: TTerm TestCodec -> TTerm String -> TTerm TestCodec
+ Hydra.Dsl.Testing: testCodecWithTestGroupTemplate :: TTerm TestCodec -> TTerm String -> TTerm TestCodec
+ Hydra.Dsl.Testing: testGenerator :: TTerm (Module -> Graph -> Either String (Namespaces a)) -> TTerm (Namespaces a -> TestCodec) -> TTerm (Module -> TestGroup -> Graph -> Either String (String, String)) -> TTerm (Maybe (String -> [Module] -> (String, String))) -> TTerm (TestGenerator a)
+ Hydra.Dsl.Testing: testGeneratorAggregatorFile :: TTerm (TestGenerator a) -> TTerm (Maybe (String -> [Module] -> (String, String)))
+ Hydra.Dsl.Testing: testGeneratorCreateCodec :: TTerm (TestGenerator a) -> TTerm (Namespaces a -> TestCodec)
+ Hydra.Dsl.Testing: testGeneratorGenerateTestFile :: TTerm (TestGenerator a) -> TTerm (Module -> TestGroup -> Graph -> Either String (String, String))
+ Hydra.Dsl.Testing: testGeneratorNamespacesForModule :: TTerm (TestGenerator a) -> TTerm (Module -> Graph -> Either String (Namespaces a))
+ Hydra.Dsl.Testing: testGeneratorWithAggregatorFile :: TTerm (TestGenerator a) -> TTerm (Maybe (String -> [Module] -> (String, String))) -> TTerm (TestGenerator a)
+ Hydra.Dsl.Testing: testGeneratorWithCreateCodec :: TTerm (TestGenerator a) -> TTerm (Namespaces a -> TestCodec) -> TTerm (TestGenerator a)
+ Hydra.Dsl.Testing: testGeneratorWithGenerateTestFile :: TTerm (TestGenerator a) -> TTerm (Module -> TestGroup -> Graph -> Either String (String, String)) -> TTerm (TestGenerator a)
+ Hydra.Dsl.Testing: testGeneratorWithNamespacesForModule :: TTerm (TestGenerator a) -> TTerm (Module -> Graph -> Either String (Namespaces a)) -> TTerm (TestGenerator a)
+ Hydra.Dsl.Testing: testGroup :: TTerm String -> TTerm (Maybe String) -> TTerm [TestGroup] -> TTerm [TestCaseWithMetadata] -> TTerm TestGroup
+ Hydra.Dsl.Testing: testGroupCases :: TTerm TestGroup -> TTerm [TestCaseWithMetadata]
+ Hydra.Dsl.Testing: testGroupDescription :: TTerm TestGroup -> TTerm (Maybe String)
+ Hydra.Dsl.Testing: testGroupName :: TTerm TestGroup -> TTerm String
+ Hydra.Dsl.Testing: testGroupSubgroups :: TTerm TestGroup -> TTerm [TestGroup]
+ Hydra.Dsl.Testing: testGroupWithCases :: TTerm TestGroup -> TTerm [TestCaseWithMetadata] -> TTerm TestGroup
+ Hydra.Dsl.Testing: testGroupWithDescription :: TTerm TestGroup -> TTerm (Maybe String) -> TTerm TestGroup
+ Hydra.Dsl.Testing: testGroupWithName :: TTerm TestGroup -> TTerm String -> TTerm TestGroup
+ Hydra.Dsl.Testing: testGroupWithSubgroups :: TTerm TestGroup -> TTerm [TestGroup] -> TTerm TestGroup
+ Hydra.Dsl.Testing: topologicalSortBindingsTestCase :: TTerm [(Name, Term)] -> TTerm [[(Name, Term)]] -> TTerm TopologicalSortBindingsTestCase
+ Hydra.Dsl.Testing: topologicalSortBindingsTestCaseBindings :: TTerm TopologicalSortBindingsTestCase -> TTerm [(Name, Term)]
+ Hydra.Dsl.Testing: topologicalSortBindingsTestCaseExpected :: TTerm TopologicalSortBindingsTestCase -> TTerm [[(Name, Term)]]
+ Hydra.Dsl.Testing: topologicalSortBindingsTestCaseWithBindings :: TTerm TopologicalSortBindingsTestCase -> TTerm [(Name, Term)] -> TTerm TopologicalSortBindingsTestCase
+ Hydra.Dsl.Testing: topologicalSortBindingsTestCaseWithExpected :: TTerm TopologicalSortBindingsTestCase -> TTerm [[(Name, Term)]] -> TTerm TopologicalSortBindingsTestCase
+ Hydra.Dsl.Testing: topologicalSortSCCTestCase :: TTerm [(Int, [Int])] -> TTerm [[Int]] -> TTerm TopologicalSortSCCTestCase
+ Hydra.Dsl.Testing: topologicalSortSCCTestCaseAdjacencyList :: TTerm TopologicalSortSCCTestCase -> TTerm [(Int, [Int])]
+ Hydra.Dsl.Testing: topologicalSortSCCTestCaseExpected :: TTerm TopologicalSortSCCTestCase -> TTerm [[Int]]
+ Hydra.Dsl.Testing: topologicalSortSCCTestCaseWithAdjacencyList :: TTerm TopologicalSortSCCTestCase -> TTerm [(Int, [Int])] -> TTerm TopologicalSortSCCTestCase
+ Hydra.Dsl.Testing: topologicalSortSCCTestCaseWithExpected :: TTerm TopologicalSortSCCTestCase -> TTerm [[Int]] -> TTerm TopologicalSortSCCTestCase
+ Hydra.Dsl.Testing: topologicalSortTestCase :: TTerm [(Int, [Int])] -> TTerm (Either [[Int]] [Int]) -> TTerm TopologicalSortTestCase
+ Hydra.Dsl.Testing: topologicalSortTestCaseAdjacencyList :: TTerm TopologicalSortTestCase -> TTerm [(Int, [Int])]
+ Hydra.Dsl.Testing: topologicalSortTestCaseExpected :: TTerm TopologicalSortTestCase -> TTerm (Either [[Int]] [Int])
+ Hydra.Dsl.Testing: topologicalSortTestCaseWithAdjacencyList :: TTerm TopologicalSortTestCase -> TTerm [(Int, [Int])] -> TTerm TopologicalSortTestCase
+ Hydra.Dsl.Testing: topologicalSortTestCaseWithExpected :: TTerm TopologicalSortTestCase -> TTerm (Either [[Int]] [Int]) -> TTerm TopologicalSortTestCase
+ Hydra.Dsl.Testing: typeCheckingFailureTestCase :: TTerm Term -> TTerm TypeCheckingFailureTestCase
+ Hydra.Dsl.Testing: typeCheckingFailureTestCaseInput :: TTerm TypeCheckingFailureTestCase -> TTerm Term
+ Hydra.Dsl.Testing: typeCheckingFailureTestCaseWithInput :: TTerm TypeCheckingFailureTestCase -> TTerm Term -> TTerm TypeCheckingFailureTestCase
+ Hydra.Dsl.Testing: typeCheckingTestCase :: TTerm Term -> TTerm Term -> TTerm Type -> TTerm TypeCheckingTestCase
+ Hydra.Dsl.Testing: typeCheckingTestCaseInput :: TTerm TypeCheckingTestCase -> TTerm Term
+ Hydra.Dsl.Testing: typeCheckingTestCaseOutputTerm :: TTerm TypeCheckingTestCase -> TTerm Term
+ Hydra.Dsl.Testing: typeCheckingTestCaseOutputType :: TTerm TypeCheckingTestCase -> TTerm Type
+ Hydra.Dsl.Testing: typeCheckingTestCaseWithInput :: TTerm TypeCheckingTestCase -> TTerm Term -> TTerm TypeCheckingTestCase
+ Hydra.Dsl.Testing: typeCheckingTestCaseWithOutputTerm :: TTerm TypeCheckingTestCase -> TTerm Term -> TTerm TypeCheckingTestCase
+ Hydra.Dsl.Testing: typeCheckingTestCaseWithOutputType :: TTerm TypeCheckingTestCase -> TTerm Type -> TTerm TypeCheckingTestCase
+ Hydra.Dsl.Testing: typeReductionTestCase :: TTerm Type -> TTerm Type -> TTerm TypeReductionTestCase
+ Hydra.Dsl.Testing: typeReductionTestCaseInput :: TTerm TypeReductionTestCase -> TTerm Type
+ Hydra.Dsl.Testing: typeReductionTestCaseOutput :: TTerm TypeReductionTestCase -> TTerm Type
+ Hydra.Dsl.Testing: typeReductionTestCaseWithInput :: TTerm TypeReductionTestCase -> TTerm Type -> TTerm TypeReductionTestCase
+ Hydra.Dsl.Testing: typeReductionTestCaseWithOutput :: TTerm TypeReductionTestCase -> TTerm Type -> TTerm TypeReductionTestCase
+ Hydra.Dsl.Testing: typeRewriterReplaceStringWithInt32 :: TTerm TypeRewriter
+ Hydra.Dsl.Testing: unTag :: TTerm Tag -> TTerm String
+ Hydra.Dsl.Testing: unifyTypesTestCase :: TTerm [Name] -> TTerm Type -> TTerm Type -> TTerm (Either String TypeSubst) -> TTerm UnifyTypesTestCase
+ Hydra.Dsl.Testing: unifyTypesTestCaseExpected :: TTerm UnifyTypesTestCase -> TTerm (Either String TypeSubst)
+ Hydra.Dsl.Testing: unifyTypesTestCaseLeft :: TTerm UnifyTypesTestCase -> TTerm Type
+ Hydra.Dsl.Testing: unifyTypesTestCaseRight :: TTerm UnifyTypesTestCase -> TTerm Type
+ Hydra.Dsl.Testing: unifyTypesTestCaseSchemaTypes :: TTerm UnifyTypesTestCase -> TTerm [Name]
+ Hydra.Dsl.Testing: unifyTypesTestCaseWithExpected :: TTerm UnifyTypesTestCase -> TTerm (Either String TypeSubst) -> TTerm UnifyTypesTestCase
+ Hydra.Dsl.Testing: unifyTypesTestCaseWithLeft :: TTerm UnifyTypesTestCase -> TTerm Type -> TTerm UnifyTypesTestCase
+ Hydra.Dsl.Testing: unifyTypesTestCaseWithRight :: TTerm UnifyTypesTestCase -> TTerm Type -> TTerm UnifyTypesTestCase
+ Hydra.Dsl.Testing: unifyTypesTestCaseWithSchemaTypes :: TTerm UnifyTypesTestCase -> TTerm [Name] -> TTerm UnifyTypesTestCase
+ Hydra.Dsl.Testing: unshadowVariablesTestCase :: TTerm Term -> TTerm Term -> TTerm UnshadowVariablesTestCase
+ Hydra.Dsl.Testing: unshadowVariablesTestCaseInput :: TTerm UnshadowVariablesTestCase -> TTerm Term
+ Hydra.Dsl.Testing: unshadowVariablesTestCaseOutput :: TTerm UnshadowVariablesTestCase -> TTerm Term
+ Hydra.Dsl.Testing: unshadowVariablesTestCaseWithInput :: TTerm UnshadowVariablesTestCase -> TTerm Term -> TTerm UnshadowVariablesTestCase
+ Hydra.Dsl.Testing: unshadowVariablesTestCaseWithOutput :: TTerm UnshadowVariablesTestCase -> TTerm Term -> TTerm UnshadowVariablesTestCase
+ Hydra.Dsl.Testing: validateCoreTermTestCase :: TTerm Bool -> TTerm Term -> TTerm (Maybe InvalidTermError) -> TTerm ValidateCoreTermTestCase
+ Hydra.Dsl.Testing: validateCoreTermTestCaseInput :: TTerm ValidateCoreTermTestCase -> TTerm Term
+ Hydra.Dsl.Testing: validateCoreTermTestCaseOutput :: TTerm ValidateCoreTermTestCase -> TTerm (Maybe InvalidTermError)
+ Hydra.Dsl.Testing: validateCoreTermTestCaseTyped :: TTerm ValidateCoreTermTestCase -> TTerm Bool
+ Hydra.Dsl.Testing: validateCoreTermTestCaseWithInput :: TTerm ValidateCoreTermTestCase -> TTerm Term -> TTerm ValidateCoreTermTestCase
+ Hydra.Dsl.Testing: validateCoreTermTestCaseWithOutput :: TTerm ValidateCoreTermTestCase -> TTerm (Maybe InvalidTermError) -> TTerm ValidateCoreTermTestCase
+ Hydra.Dsl.Testing: validateCoreTermTestCaseWithTyped :: TTerm ValidateCoreTermTestCase -> TTerm Bool -> TTerm ValidateCoreTermTestCase
+ Hydra.Dsl.Testing: variableOccursInTypeTestCase :: TTerm Name -> TTerm Type -> TTerm Bool -> TTerm VariableOccursInTypeTestCase
+ Hydra.Dsl.Testing: variableOccursInTypeTestCaseExpected :: TTerm VariableOccursInTypeTestCase -> TTerm Bool
+ Hydra.Dsl.Testing: variableOccursInTypeTestCaseType :: TTerm VariableOccursInTypeTestCase -> TTerm Type
+ Hydra.Dsl.Testing: variableOccursInTypeTestCaseVariable :: TTerm VariableOccursInTypeTestCase -> TTerm Name
+ Hydra.Dsl.Testing: variableOccursInTypeTestCaseWithExpected :: TTerm VariableOccursInTypeTestCase -> TTerm Bool -> TTerm VariableOccursInTypeTestCase
+ Hydra.Dsl.Testing: variableOccursInTypeTestCaseWithType :: TTerm VariableOccursInTypeTestCase -> TTerm Type -> TTerm VariableOccursInTypeTestCase
+ Hydra.Dsl.Testing: variableOccursInTypeTestCaseWithVariable :: TTerm VariableOccursInTypeTestCase -> TTerm Name -> TTerm VariableOccursInTypeTestCase
+ Hydra.Dsl.Testing: writerTestCase :: TTerm a -> TTerm String -> TTerm (WriterTestCase a)
+ Hydra.Dsl.Testing: writerTestCaseInput :: TTerm (WriterTestCase a) -> TTerm a
+ Hydra.Dsl.Testing: writerTestCaseOutput :: TTerm (WriterTestCase a) -> TTerm String
+ Hydra.Dsl.Testing: writerTestCaseWithInput :: TTerm (WriterTestCase a) -> TTerm a -> TTerm (WriterTestCase a)
+ Hydra.Dsl.Testing: writerTestCaseWithOutput :: TTerm (WriterTestCase a) -> TTerm String -> TTerm (WriterTestCase a)
+ Hydra.Dsl.Topology: orderingIsomorphism :: TTerm ([a] -> [a]) -> TTerm ([a] -> [a]) -> TTerm (OrderingIsomorphism a)
+ Hydra.Dsl.Topology: orderingIsomorphismDecode :: TTerm (OrderingIsomorphism a) -> TTerm ([a] -> [a])
+ Hydra.Dsl.Topology: orderingIsomorphismEncode :: TTerm (OrderingIsomorphism a) -> TTerm ([a] -> [a])
+ Hydra.Dsl.Topology: orderingIsomorphismWithDecode :: TTerm (OrderingIsomorphism a) -> TTerm ([a] -> [a]) -> TTerm (OrderingIsomorphism a)
+ Hydra.Dsl.Topology: orderingIsomorphismWithEncode :: TTerm (OrderingIsomorphism a) -> TTerm ([a] -> [a]) -> TTerm (OrderingIsomorphism a)
+ Hydra.Dsl.Topology: tarjanState :: TTerm Int -> TTerm (Map Vertex Int) -> TTerm (Map Vertex Int) -> TTerm [Vertex] -> TTerm (Set Vertex) -> TTerm [[Vertex]] -> TTerm TarjanState
+ Hydra.Dsl.Topology: tarjanStateCounter :: TTerm TarjanState -> TTerm Int
+ Hydra.Dsl.Topology: tarjanStateIndices :: TTerm TarjanState -> TTerm (Map Vertex Int)
+ Hydra.Dsl.Topology: tarjanStateLowLinks :: TTerm TarjanState -> TTerm (Map Vertex Int)
+ Hydra.Dsl.Topology: tarjanStateOnStack :: TTerm TarjanState -> TTerm (Set Vertex)
+ Hydra.Dsl.Topology: tarjanStateSccs :: TTerm TarjanState -> TTerm [[Vertex]]
+ Hydra.Dsl.Topology: tarjanStateStack :: TTerm TarjanState -> TTerm [Vertex]
+ Hydra.Dsl.Topology: tarjanStateWithCounter :: TTerm TarjanState -> TTerm Int -> TTerm TarjanState
+ Hydra.Dsl.Topology: tarjanStateWithIndices :: TTerm TarjanState -> TTerm (Map Vertex Int) -> TTerm TarjanState
+ Hydra.Dsl.Topology: tarjanStateWithLowLinks :: TTerm TarjanState -> TTerm (Map Vertex Int) -> TTerm TarjanState
+ Hydra.Dsl.Topology: tarjanStateWithOnStack :: TTerm TarjanState -> TTerm (Set Vertex) -> TTerm TarjanState
+ Hydra.Dsl.Topology: tarjanStateWithSccs :: TTerm TarjanState -> TTerm [[Vertex]] -> TTerm TarjanState
+ Hydra.Dsl.Topology: tarjanStateWithStack :: TTerm TarjanState -> TTerm [Vertex] -> TTerm TarjanState
+ Hydra.Dsl.Types: void :: Type
+ Hydra.Dsl.Typing: functionStructure :: TTerm [Name] -> TTerm [Name] -> TTerm [Binding] -> TTerm Term -> TTerm [Type] -> TTerm (Maybe Type) -> TTerm env -> TTerm (FunctionStructure env)
+ Hydra.Dsl.Typing: functionStructureBindings :: TTerm (FunctionStructure env) -> TTerm [Binding]
+ Hydra.Dsl.Typing: functionStructureBody :: TTerm (FunctionStructure env) -> TTerm Term
+ Hydra.Dsl.Typing: functionStructureCodomain :: TTerm (FunctionStructure env) -> TTerm (Maybe Type)
+ Hydra.Dsl.Typing: functionStructureDomains :: TTerm (FunctionStructure env) -> TTerm [Type]
+ Hydra.Dsl.Typing: functionStructureEnvironment :: TTerm (FunctionStructure env) -> TTerm env
+ Hydra.Dsl.Typing: functionStructureParams :: TTerm (FunctionStructure env) -> TTerm [Name]
+ Hydra.Dsl.Typing: functionStructureTypeParams :: TTerm (FunctionStructure env) -> TTerm [Name]
+ Hydra.Dsl.Typing: functionStructureWithBindings :: TTerm (FunctionStructure env) -> TTerm [Binding] -> TTerm (FunctionStructure env)
+ Hydra.Dsl.Typing: functionStructureWithBody :: TTerm (FunctionStructure env) -> TTerm Term -> TTerm (FunctionStructure env)
+ Hydra.Dsl.Typing: functionStructureWithCodomain :: TTerm (FunctionStructure env) -> TTerm (Maybe Type) -> TTerm (FunctionStructure env)
+ Hydra.Dsl.Typing: functionStructureWithDomains :: TTerm (FunctionStructure env) -> TTerm [Type] -> TTerm (FunctionStructure env)
+ Hydra.Dsl.Typing: functionStructureWithEnvironment :: TTerm (FunctionStructure env) -> TTerm env -> TTerm (FunctionStructure env)
+ Hydra.Dsl.Typing: functionStructureWithParams :: TTerm (FunctionStructure env) -> TTerm [Name] -> TTerm (FunctionStructure env)
+ Hydra.Dsl.Typing: functionStructureWithTypeParams :: TTerm (FunctionStructure env) -> TTerm [Name] -> TTerm (FunctionStructure env)
+ Hydra.Dsl.Typing: inferenceResult :: TTerm Term -> TTerm Type -> TTerm TypeSubst -> TTerm (Map Name TypeVariableMetadata) -> TTerm Context -> TTerm InferenceResult
+ Hydra.Dsl.Typing: inferenceResultClassConstraints :: TTerm InferenceResult -> TTerm (Map Name TypeVariableMetadata)
+ Hydra.Dsl.Typing: inferenceResultContext :: TTerm InferenceResult -> TTerm Context
+ Hydra.Dsl.Typing: inferenceResultSubst :: TTerm InferenceResult -> TTerm TypeSubst
+ Hydra.Dsl.Typing: inferenceResultTerm :: TTerm InferenceResult -> TTerm Term
+ Hydra.Dsl.Typing: inferenceResultType :: TTerm InferenceResult -> TTerm Type
+ Hydra.Dsl.Typing: inferenceResultWithClassConstraints :: TTerm InferenceResult -> TTerm (Map Name TypeVariableMetadata) -> TTerm InferenceResult
+ Hydra.Dsl.Typing: inferenceResultWithContext :: TTerm InferenceResult -> TTerm Context -> TTerm InferenceResult
+ Hydra.Dsl.Typing: inferenceResultWithSubst :: TTerm InferenceResult -> TTerm TypeSubst -> TTerm InferenceResult
+ Hydra.Dsl.Typing: inferenceResultWithTerm :: TTerm InferenceResult -> TTerm Term -> TTerm InferenceResult
+ Hydra.Dsl.Typing: inferenceResultWithType :: TTerm InferenceResult -> TTerm Type -> TTerm InferenceResult
+ Hydra.Dsl.Typing: termSubst :: TTerm (Map Name Term) -> TTerm TermSubst
+ Hydra.Dsl.Typing: typeConstraint :: TTerm Type -> TTerm Type -> TTerm String -> TTerm TypeConstraint
+ Hydra.Dsl.Typing: typeConstraintComment :: TTerm TypeConstraint -> TTerm String
+ Hydra.Dsl.Typing: typeConstraintLeft :: TTerm TypeConstraint -> TTerm Type
+ Hydra.Dsl.Typing: typeConstraintRight :: TTerm TypeConstraint -> TTerm Type
+ Hydra.Dsl.Typing: typeConstraintWithComment :: TTerm TypeConstraint -> TTerm String -> TTerm TypeConstraint
+ Hydra.Dsl.Typing: typeConstraintWithLeft :: TTerm TypeConstraint -> TTerm Type -> TTerm TypeConstraint
+ Hydra.Dsl.Typing: typeConstraintWithRight :: TTerm TypeConstraint -> TTerm Type -> TTerm TypeConstraint
+ Hydra.Dsl.Typing: typeSubst :: TTerm (Map Name Type) -> TTerm TypeSubst
+ Hydra.Dsl.Typing: unTermSubst :: TTerm TermSubst -> TTerm (Map Name Term)
+ Hydra.Dsl.Typing: unTypeSubst :: TTerm TypeSubst -> TTerm (Map Name Type)
+ Hydra.Dsl.Util: adapter :: TTerm Bool -> TTerm t1 -> TTerm t2 -> TTerm (Coder v1 v2) -> TTerm (Adapter t1 t2 v1 v2)
+ Hydra.Dsl.Util: adapterCoder :: TTerm (Adapter t1 t2 v1 v2) -> TTerm (Coder v1 v2)
+ Hydra.Dsl.Util: adapterIsLossy :: TTerm (Adapter t1 t2 v1 v2) -> TTerm Bool
+ Hydra.Dsl.Util: adapterSource :: TTerm (Adapter t1 t2 v1 v2) -> TTerm t1
+ Hydra.Dsl.Util: adapterTarget :: TTerm (Adapter t1 t2 v1 v2) -> TTerm t2
+ Hydra.Dsl.Util: adapterWithCoder :: TTerm (Adapter t1 t2 v1 v2) -> TTerm (Coder v1 v2) -> TTerm (Adapter t1 t2 v1 v2)
+ Hydra.Dsl.Util: adapterWithIsLossy :: TTerm (Adapter t1 t2 v1 v2) -> TTerm Bool -> TTerm (Adapter t1 t2 v1 v2)
+ Hydra.Dsl.Util: adapterWithSource :: TTerm (Adapter t1 t2 v1 v2) -> TTerm t1 -> TTerm (Adapter t1 t2 v1 v2)
+ Hydra.Dsl.Util: adapterWithTarget :: TTerm (Adapter t1 t2 v1 v2) -> TTerm t2 -> TTerm (Adapter t1 t2 v1 v2)
+ Hydra.Dsl.Util: bicoder :: TTerm (t1 -> Adapter t1 t2 v1 v2) -> TTerm (t2 -> Adapter t2 t1 v2 v1) -> TTerm (Bicoder t1 t2 v1 v2)
+ Hydra.Dsl.Util: bicoderDecode :: TTerm (Bicoder t1 t2 v1 v2) -> TTerm (t2 -> Adapter t2 t1 v2 v1)
+ Hydra.Dsl.Util: bicoderEncode :: TTerm (Bicoder t1 t2 v1 v2) -> TTerm (t1 -> Adapter t1 t2 v1 v2)
+ Hydra.Dsl.Util: bicoderWithDecode :: TTerm (Bicoder t1 t2 v1 v2) -> TTerm (t2 -> Adapter t2 t1 v2 v1) -> TTerm (Bicoder t1 t2 v1 v2)
+ Hydra.Dsl.Util: bicoderWithEncode :: TTerm (Bicoder t1 t2 v1 v2) -> TTerm (t1 -> Adapter t1 t2 v1 v2) -> TTerm (Bicoder t1 t2 v1 v2)
+ Hydra.Dsl.Util: caseConventionCamel :: TTerm CaseConvention
+ Hydra.Dsl.Util: caseConventionLowerSnake :: TTerm CaseConvention
+ Hydra.Dsl.Util: caseConventionPascal :: TTerm CaseConvention
+ Hydra.Dsl.Util: caseConventionUpperSnake :: TTerm CaseConvention
+ Hydra.Dsl.Util: coder :: TTerm (Context -> v1 -> Either (InContext Error) v2) -> TTerm (Context -> v2 -> Either (InContext Error) v1) -> TTerm (Coder v1 v2)
+ Hydra.Dsl.Util: coderDecode :: TTerm (Coder v1 v2) -> TTerm (Context -> v2 -> Either (InContext Error) v1)
+ Hydra.Dsl.Util: coderEncode :: TTerm (Coder v1 v2) -> TTerm (Context -> v1 -> Either (InContext Error) v2)
+ Hydra.Dsl.Util: coderWithDecode :: TTerm (Coder v1 v2) -> TTerm (Context -> v2 -> Either (InContext Error) v1) -> TTerm (Coder v1 v2)
+ Hydra.Dsl.Util: coderWithEncode :: TTerm (Coder v1 v2) -> TTerm (Context -> v1 -> Either (InContext Error) v2) -> TTerm (Coder v1 v2)
+ Hydra.Dsl.Util: comparisonEqualTo :: TTerm Comparison
+ Hydra.Dsl.Util: comparisonGreaterThan :: TTerm Comparison
+ Hydra.Dsl.Util: comparisonLessThan :: TTerm Comparison
+ Hydra.Dsl.Util: precisionArbitrary :: TTerm Precision
+ Hydra.Dsl.Util: precisionBits :: TTerm Int -> TTerm Precision
+ Hydra.Dsl.Variants: eliminationVariantRecord :: TTerm EliminationVariant
+ Hydra.Dsl.Variants: eliminationVariantUnion :: TTerm EliminationVariant
+ Hydra.Dsl.Variants: eliminationVariantWrap :: TTerm EliminationVariant
+ Hydra.Dsl.Variants: functionVariantElimination :: TTerm FunctionVariant
+ Hydra.Dsl.Variants: functionVariantLambda :: TTerm FunctionVariant
+ Hydra.Dsl.Variants: functionVariantPrimitive :: TTerm FunctionVariant
+ Hydra.Dsl.Variants: literalVariantBinary :: TTerm LiteralVariant
+ Hydra.Dsl.Variants: literalVariantBoolean :: TTerm LiteralVariant
+ Hydra.Dsl.Variants: literalVariantFloat :: TTerm LiteralVariant
+ Hydra.Dsl.Variants: literalVariantInteger :: TTerm LiteralVariant
+ Hydra.Dsl.Variants: literalVariantString :: TTerm LiteralVariant
+ Hydra.Dsl.Variants: termVariantAnnotated :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantApplication :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantEither :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantFunction :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantLet :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantList :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantLiteral :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantMap :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantMaybe :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantPair :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantRecord :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantSet :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantTypeApplication :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantTypeLambda :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantUnion :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantUnit :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantVariable :: TTerm TermVariant
+ Hydra.Dsl.Variants: termVariantWrap :: TTerm TermVariant
+ Hydra.Dsl.Variants: typeVariantAnnotated :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantApplication :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantEither :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantForall :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantFunction :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantList :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantLiteral :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantMap :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantMaybe :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantPair :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantRecord :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantSet :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantUnion :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantUnit :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantVariable :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantVoid :: TTerm TypeVariant
+ Hydra.Dsl.Variants: typeVariantWrap :: TTerm TypeVariant
+ Hydra.Dsls: collectForallVars :: Type -> [Name]
+ Hydra.Dsls: deduplicateBindings :: [Binding] -> [Binding]
+ Hydra.Dsls: dslBindingName :: Name -> Name
+ Hydra.Dsls: dslElementName :: Name -> String -> Name
+ Hydra.Dsls: dslModule :: Context -> Graph -> Module -> Either (InContext Error) (Maybe Module)
+ Hydra.Dsls: dslNamespace :: Namespace -> Namespace
+ Hydra.Dsls: dslTypeScheme :: Type -> [Type] -> Type -> TypeScheme
+ Hydra.Dsls: filterTypeBindings :: t0 -> t1 -> [Binding] -> Either t2 [Binding]
+ Hydra.Dsls: findUniqueName :: String -> [String] -> String
+ Hydra.Dsls: generateBindingsForType :: Context -> Graph -> Binding -> Either (InContext DecodingError) [Binding]
+ Hydra.Dsls: generateRecordAccessor :: Type -> Name -> FieldType -> Binding
+ Hydra.Dsls: generateRecordConstructor :: Type -> Name -> [FieldType] -> [Binding]
+ Hydra.Dsls: generateRecordWithUpdater :: Type -> Name -> [FieldType] -> FieldType -> Binding
+ Hydra.Dsls: generateUnionInjector :: Type -> Name -> FieldType -> Binding
+ Hydra.Dsls: generateWrappedTypeAccessors :: Type -> Name -> Type -> [Binding]
+ Hydra.Dsls: isDslEligibleBinding :: t0 -> t1 -> Binding -> Either t2 (Maybe Binding)
+ Hydra.Dsls: nominalResultType :: Name -> Type -> Type
+ Hydra.Encode.Ast: seqExpr :: SeqExpr -> Term
+ Hydra.Encode.Context: context :: Context -> Term
+ Hydra.Encode.Context: inContext :: (t0 -> Term) -> InContext t0 -> Term
+ Hydra.Encode.Error.Checking: checkingError :: CheckingError -> Term
+ Hydra.Encode.Error.Checking: incorrectUnificationError :: IncorrectUnificationError -> Term
+ Hydra.Encode.Error.Checking: notAForallTypeError :: NotAForallTypeError -> Term
+ Hydra.Encode.Error.Checking: notAFunctionTypeError :: NotAFunctionTypeError -> Term
+ Hydra.Encode.Error.Checking: typeArityMismatchError :: TypeArityMismatchError -> Term
+ Hydra.Encode.Error.Checking: typeMismatchError :: TypeMismatchError -> Term
+ Hydra.Encode.Error.Checking: unboundTypeVariablesError :: UnboundTypeVariablesError -> Term
+ Hydra.Encode.Error.Checking: unequalTypesError :: UnequalTypesError -> Term
+ Hydra.Encode.Error.Checking: unsupportedTermVariantError :: UnsupportedTermVariantError -> Term
+ Hydra.Encode.Error.Checking: untypedLambdaError :: t0 -> Term
+ Hydra.Encode.Error.Checking: untypedLetBindingError :: UntypedLetBindingError -> Term
+ Hydra.Encode.Error.Core: constantConditionError :: ConstantConditionError -> Term
+ Hydra.Encode.Error.Core: duplicateBindingError :: DuplicateBindingError -> Term
+ Hydra.Encode.Error.Core: duplicateFieldError :: DuplicateFieldError -> Term
+ Hydra.Encode.Error.Core: duplicateRecordTypeFieldNamesError :: DuplicateRecordTypeFieldNamesError -> Term
+ Hydra.Encode.Error.Core: duplicateUnionTypeFieldNamesError :: DuplicateUnionTypeFieldNamesError -> Term
+ Hydra.Encode.Error.Core: emptyCaseStatementError :: EmptyCaseStatementError -> Term
+ Hydra.Encode.Error.Core: emptyLetBindingsError :: EmptyLetBindingsError -> Term
+ Hydra.Encode.Error.Core: emptyRecordTypeError :: EmptyRecordTypeError -> Term
+ Hydra.Encode.Error.Core: emptyTermAnnotationError :: EmptyTermAnnotationError -> Term
+ Hydra.Encode.Error.Core: emptyTypeAnnotationError :: EmptyTypeAnnotationError -> Term
+ Hydra.Encode.Error.Core: emptyTypeNameInTermError :: EmptyTypeNameInTermError -> Term
+ Hydra.Encode.Error.Core: emptyUnionTypeError :: EmptyUnionTypeError -> Term
+ Hydra.Encode.Error.Core: invalidForallParameterNameError :: InvalidForallParameterNameError -> Term
+ Hydra.Encode.Error.Core: invalidLambdaParameterNameError :: InvalidLambdaParameterNameError -> Term
+ Hydra.Encode.Error.Core: invalidLetBindingNameError :: InvalidLetBindingNameError -> Term
+ Hydra.Encode.Error.Core: invalidTermError :: InvalidTermError -> Term
+ Hydra.Encode.Error.Core: invalidTypeError :: InvalidTypeError -> Term
+ Hydra.Encode.Error.Core: invalidTypeLambdaParameterNameError :: InvalidTypeLambdaParameterNameError -> Term
+ Hydra.Encode.Error.Core: invalidTypeSchemeVariableNameError :: InvalidTypeSchemeVariableNameError -> Term
+ Hydra.Encode.Error.Core: nestedTermAnnotationError :: NestedTermAnnotationError -> Term
+ Hydra.Encode.Error.Core: nestedTypeAnnotationError :: NestedTypeAnnotationError -> Term
+ Hydra.Encode.Error.Core: nonComparableMapKeyTypeError :: NonComparableMapKeyTypeError -> Term
+ Hydra.Encode.Error.Core: nonComparableSetElementTypeError :: NonComparableSetElementTypeError -> Term
+ Hydra.Encode.Error.Core: redundantWrapUnwrapError :: RedundantWrapUnwrapError -> Term
+ Hydra.Encode.Error.Core: selfApplicationError :: SelfApplicationError -> Term
+ Hydra.Encode.Error.Core: singleVariantUnionError :: SingleVariantUnionError -> Term
+ Hydra.Encode.Error.Core: termVariableShadowingError :: TermVariableShadowingError -> Term
+ Hydra.Encode.Error.Core: typeVariableShadowingInForallError :: TypeVariableShadowingInForallError -> Term
+ Hydra.Encode.Error.Core: typeVariableShadowingInTypeLambdaError :: TypeVariableShadowingInTypeLambdaError -> Term
+ Hydra.Encode.Error.Core: undefinedFieldError :: UndefinedFieldError -> Term
+ Hydra.Encode.Error.Core: undefinedTermVariableError :: UndefinedTermVariableError -> Term
+ Hydra.Encode.Error.Core: undefinedTypeVariableError :: UndefinedTypeVariableError -> Term
+ Hydra.Encode.Error.Core: undefinedTypeVariableInBindingTypeError :: UndefinedTypeVariableInBindingTypeError -> Term
+ Hydra.Encode.Error.Core: undefinedTypeVariableInLambdaDomainError :: UndefinedTypeVariableInLambdaDomainError -> Term
+ Hydra.Encode.Error.Core: undefinedTypeVariableInTypeApplicationError :: UndefinedTypeVariableInTypeApplicationError -> Term
+ Hydra.Encode.Error.Core: unexpectedTermVariantError :: UnexpectedTermVariantError -> Term
+ Hydra.Encode.Error.Core: unexpectedTypeVariantError :: UnexpectedTypeVariantError -> Term
+ Hydra.Encode.Error.Core: unknownPrimitiveNameError :: UnknownPrimitiveNameError -> Term
+ Hydra.Encode.Error.Core: unnecessaryIdentityApplicationError :: UnnecessaryIdentityApplicationError -> Term
+ Hydra.Encode.Error.Core: untypedTermVariableError :: UntypedTermVariableError -> Term
+ Hydra.Encode.Error.Core: voidInNonBottomPositionError :: VoidInNonBottomPositionError -> Term
+ Hydra.Encode.Errors: decodingError :: DecodingError -> Term
+ Hydra.Encode.Errors: error :: Error -> Term
+ Hydra.Encode.Errors: otherError :: OtherError -> Term
+ Hydra.Encode.Errors: unificationError :: UnificationError -> Term
+ Hydra.Encode.Paths: subtermEdge :: SubtermEdge -> Term
+ Hydra.Encode.Paths: subtermGraph :: SubtermGraph -> Term
+ Hydra.Encode.Paths: subtermNode :: SubtermNode -> Term
+ Hydra.Encode.Paths: subtermPath :: SubtermPath -> Term
+ Hydra.Encode.Paths: subtermStep :: SubtermStep -> Term
+ Hydra.Encode.Paths: subtypeEdge :: SubtypeEdge -> Term
+ Hydra.Encode.Paths: subtypeGraph :: SubtypeGraph -> Term
+ Hydra.Encode.Paths: subtypeNode :: SubtypeNode -> Term
+ Hydra.Encode.Paths: subtypePath :: SubtypePath -> Term
+ Hydra.Encode.Paths: subtypeStep :: SubtypeStep -> Term
+ Hydra.Encode.Query: pathEquation :: PathEquation -> Term
+ Hydra.Encode.Query: patternImplication :: PatternImplication -> Term
+ Hydra.Encode.Testing: validateCoreTermTestCase :: ValidateCoreTermTestCase -> Term
+ Hydra.Encoding: encodeRecordTypeNamed :: Name -> [FieldType] -> Term
+ Hydra.Encoding: encodeTypeNamed :: Name -> Type -> Term
+ Hydra.Encoding: encodeUnionTypeNamed :: Name -> [FieldType] -> Term
+ Hydra.Encoding: encodeWrappedTypeNamed :: Name -> Type -> Term
+ Hydra.Encoding: encoderCollectForallVariables :: Type -> [Name]
+ Hydra.Encoding: encoderCollectOrdVars :: Type -> [Name]
+ Hydra.Encoding: encoderCollectTypeVarsFromType :: Type -> [Name]
+ Hydra.Encoding: encoderFullResultType :: Type -> Type
+ Hydra.Encoding: encoderFullResultTypeNamed :: Name -> Type -> Type
+ Hydra.Encoding: encoderType :: Type -> Type
+ Hydra.Encoding: encoderTypeNamed :: Name -> Type -> Type
+ Hydra.Encoding: encoderTypeScheme :: Type -> TypeScheme
+ Hydra.Encoding: encoderTypeSchemeNamed :: Name -> Type -> TypeScheme
+ Hydra.Encoding: prependForallEncoders :: Type -> Type -> Type
+ Hydra.Error.Checking: CheckingErrorIncorrectUnification :: IncorrectUnificationError -> CheckingError
+ Hydra.Error.Checking: CheckingErrorNotAForallType :: NotAForallTypeError -> CheckingError
+ Hydra.Error.Checking: CheckingErrorNotAFunctionType :: NotAFunctionTypeError -> CheckingError
+ Hydra.Error.Checking: CheckingErrorTypeArityMismatch :: TypeArityMismatchError -> CheckingError
+ Hydra.Error.Checking: CheckingErrorTypeMismatch :: TypeMismatchError -> CheckingError
+ Hydra.Error.Checking: CheckingErrorUnboundTypeVariables :: UnboundTypeVariablesError -> CheckingError
+ Hydra.Error.Checking: CheckingErrorUnequalTypes :: UnequalTypesError -> CheckingError
+ Hydra.Error.Checking: CheckingErrorUnsupportedTermVariant :: UnsupportedTermVariantError -> CheckingError
+ Hydra.Error.Checking: CheckingErrorUntypedLambda :: UntypedLambdaError -> CheckingError
+ Hydra.Error.Checking: CheckingErrorUntypedLetBinding :: UntypedLetBindingError -> CheckingError
+ Hydra.Error.Checking: IncorrectUnificationError :: TypeSubst -> IncorrectUnificationError
+ Hydra.Error.Checking: NotAForallTypeError :: Type -> [Type] -> NotAForallTypeError
+ Hydra.Error.Checking: NotAFunctionTypeError :: Type -> NotAFunctionTypeError
+ Hydra.Error.Checking: TypeArityMismatchError :: Type -> Int -> Int -> [Type] -> TypeArityMismatchError
+ Hydra.Error.Checking: TypeMismatchError :: Type -> Type -> TypeMismatchError
+ Hydra.Error.Checking: UnboundTypeVariablesError :: Set Name -> Type -> UnboundTypeVariablesError
+ Hydra.Error.Checking: UnequalTypesError :: [Type] -> String -> UnequalTypesError
+ Hydra.Error.Checking: UnsupportedTermVariantError :: TermVariant -> UnsupportedTermVariantError
+ Hydra.Error.Checking: UntypedLambdaError :: UntypedLambdaError
+ Hydra.Error.Checking: UntypedLetBindingError :: Binding -> UntypedLetBindingError
+ Hydra.Error.Checking: [incorrectUnificationErrorSubstitution] :: IncorrectUnificationError -> TypeSubst
+ Hydra.Error.Checking: [notAForallTypeErrorTypeArguments] :: NotAForallTypeError -> [Type]
+ Hydra.Error.Checking: [notAForallTypeErrorType] :: NotAForallTypeError -> Type
+ Hydra.Error.Checking: [notAFunctionTypeErrorType] :: NotAFunctionTypeError -> Type
+ Hydra.Error.Checking: [typeArityMismatchErrorActualArity] :: TypeArityMismatchError -> Int
+ Hydra.Error.Checking: [typeArityMismatchErrorExpectedArity] :: TypeArityMismatchError -> Int
+ Hydra.Error.Checking: [typeArityMismatchErrorTypeArguments] :: TypeArityMismatchError -> [Type]
+ Hydra.Error.Checking: [typeArityMismatchErrorType] :: TypeArityMismatchError -> Type
+ Hydra.Error.Checking: [typeMismatchErrorActualType] :: TypeMismatchError -> Type
+ Hydra.Error.Checking: [typeMismatchErrorExpectedType] :: TypeMismatchError -> Type
+ Hydra.Error.Checking: [unboundTypeVariablesErrorType] :: UnboundTypeVariablesError -> Type
+ Hydra.Error.Checking: [unboundTypeVariablesErrorVariables] :: UnboundTypeVariablesError -> Set Name
+ Hydra.Error.Checking: [unequalTypesErrorDescription] :: UnequalTypesError -> String
+ Hydra.Error.Checking: [unequalTypesErrorTypes] :: UnequalTypesError -> [Type]
+ Hydra.Error.Checking: [unsupportedTermVariantErrorTermVariant] :: UnsupportedTermVariantError -> TermVariant
+ Hydra.Error.Checking: [untypedLetBindingErrorBinding] :: UntypedLetBindingError -> Binding
+ Hydra.Error.Checking: _CheckingError :: Name
+ Hydra.Error.Checking: _CheckingError_incorrectUnification :: Name
+ Hydra.Error.Checking: _CheckingError_notAForallType :: Name
+ Hydra.Error.Checking: _CheckingError_notAFunctionType :: Name
+ Hydra.Error.Checking: _CheckingError_typeArityMismatch :: Name
+ Hydra.Error.Checking: _CheckingError_typeMismatch :: Name
+ Hydra.Error.Checking: _CheckingError_unboundTypeVariables :: Name
+ Hydra.Error.Checking: _CheckingError_unequalTypes :: Name
+ Hydra.Error.Checking: _CheckingError_unsupportedTermVariant :: Name
+ Hydra.Error.Checking: _CheckingError_untypedLambda :: Name
+ Hydra.Error.Checking: _CheckingError_untypedLetBinding :: Name
+ Hydra.Error.Checking: _IncorrectUnificationError :: Name
+ Hydra.Error.Checking: _IncorrectUnificationError_substitution :: Name
+ Hydra.Error.Checking: _NotAForallTypeError :: Name
+ Hydra.Error.Checking: _NotAForallTypeError_type :: Name
+ Hydra.Error.Checking: _NotAForallTypeError_typeArguments :: Name
+ Hydra.Error.Checking: _NotAFunctionTypeError :: Name
+ Hydra.Error.Checking: _NotAFunctionTypeError_type :: Name
+ Hydra.Error.Checking: _TypeArityMismatchError :: Name
+ Hydra.Error.Checking: _TypeArityMismatchError_actualArity :: Name
+ Hydra.Error.Checking: _TypeArityMismatchError_expectedArity :: Name
+ Hydra.Error.Checking: _TypeArityMismatchError_type :: Name
+ Hydra.Error.Checking: _TypeArityMismatchError_typeArguments :: Name
+ Hydra.Error.Checking: _TypeMismatchError :: Name
+ Hydra.Error.Checking: _TypeMismatchError_actualType :: Name
+ Hydra.Error.Checking: _TypeMismatchError_expectedType :: Name
+ Hydra.Error.Checking: _UnboundTypeVariablesError :: Name
+ Hydra.Error.Checking: _UnboundTypeVariablesError_type :: Name
+ Hydra.Error.Checking: _UnboundTypeVariablesError_variables :: Name
+ Hydra.Error.Checking: _UnequalTypesError :: Name
+ Hydra.Error.Checking: _UnequalTypesError_description :: Name
+ Hydra.Error.Checking: _UnequalTypesError_types :: Name
+ Hydra.Error.Checking: _UnsupportedTermVariantError :: Name
+ Hydra.Error.Checking: _UnsupportedTermVariantError_termVariant :: Name
+ Hydra.Error.Checking: _UntypedLambdaError :: Name
+ Hydra.Error.Checking: _UntypedLetBindingError :: Name
+ Hydra.Error.Checking: _UntypedLetBindingError_binding :: Name
+ Hydra.Error.Checking: data CheckingError
+ Hydra.Error.Checking: data IncorrectUnificationError
+ Hydra.Error.Checking: data NotAForallTypeError
+ Hydra.Error.Checking: data NotAFunctionTypeError
+ Hydra.Error.Checking: data TypeArityMismatchError
+ Hydra.Error.Checking: data TypeMismatchError
+ Hydra.Error.Checking: data UnboundTypeVariablesError
+ Hydra.Error.Checking: data UnequalTypesError
+ Hydra.Error.Checking: data UnsupportedTermVariantError
+ Hydra.Error.Checking: data UntypedLambdaError
+ Hydra.Error.Checking: data UntypedLetBindingError
+ Hydra.Error.Checking: instance GHC.Classes.Eq Hydra.Error.Checking.CheckingError
+ Hydra.Error.Checking: instance GHC.Classes.Eq Hydra.Error.Checking.IncorrectUnificationError
+ Hydra.Error.Checking: instance GHC.Classes.Eq Hydra.Error.Checking.NotAForallTypeError
+ Hydra.Error.Checking: instance GHC.Classes.Eq Hydra.Error.Checking.NotAFunctionTypeError
+ Hydra.Error.Checking: instance GHC.Classes.Eq Hydra.Error.Checking.TypeArityMismatchError
+ Hydra.Error.Checking: instance GHC.Classes.Eq Hydra.Error.Checking.TypeMismatchError
+ Hydra.Error.Checking: instance GHC.Classes.Eq Hydra.Error.Checking.UnboundTypeVariablesError
+ Hydra.Error.Checking: instance GHC.Classes.Eq Hydra.Error.Checking.UnequalTypesError
+ Hydra.Error.Checking: instance GHC.Classes.Eq Hydra.Error.Checking.UnsupportedTermVariantError
+ Hydra.Error.Checking: instance GHC.Classes.Eq Hydra.Error.Checking.UntypedLambdaError
+ Hydra.Error.Checking: instance GHC.Classes.Eq Hydra.Error.Checking.UntypedLetBindingError
+ Hydra.Error.Checking: instance GHC.Classes.Ord Hydra.Error.Checking.CheckingError
+ Hydra.Error.Checking: instance GHC.Classes.Ord Hydra.Error.Checking.IncorrectUnificationError
+ Hydra.Error.Checking: instance GHC.Classes.Ord Hydra.Error.Checking.NotAForallTypeError
+ Hydra.Error.Checking: instance GHC.Classes.Ord Hydra.Error.Checking.NotAFunctionTypeError
+ Hydra.Error.Checking: instance GHC.Classes.Ord Hydra.Error.Checking.TypeArityMismatchError
+ Hydra.Error.Checking: instance GHC.Classes.Ord Hydra.Error.Checking.TypeMismatchError
+ Hydra.Error.Checking: instance GHC.Classes.Ord Hydra.Error.Checking.UnboundTypeVariablesError
+ Hydra.Error.Checking: instance GHC.Classes.Ord Hydra.Error.Checking.UnequalTypesError
+ Hydra.Error.Checking: instance GHC.Classes.Ord Hydra.Error.Checking.UnsupportedTermVariantError
+ Hydra.Error.Checking: instance GHC.Classes.Ord Hydra.Error.Checking.UntypedLambdaError
+ Hydra.Error.Checking: instance GHC.Classes.Ord Hydra.Error.Checking.UntypedLetBindingError
+ Hydra.Error.Checking: instance GHC.Read.Read Hydra.Error.Checking.CheckingError
+ Hydra.Error.Checking: instance GHC.Read.Read Hydra.Error.Checking.IncorrectUnificationError
+ Hydra.Error.Checking: instance GHC.Read.Read Hydra.Error.Checking.NotAForallTypeError
+ Hydra.Error.Checking: instance GHC.Read.Read Hydra.Error.Checking.NotAFunctionTypeError
+ Hydra.Error.Checking: instance GHC.Read.Read Hydra.Error.Checking.TypeArityMismatchError
+ Hydra.Error.Checking: instance GHC.Read.Read Hydra.Error.Checking.TypeMismatchError
+ Hydra.Error.Checking: instance GHC.Read.Read Hydra.Error.Checking.UnboundTypeVariablesError
+ Hydra.Error.Checking: instance GHC.Read.Read Hydra.Error.Checking.UnequalTypesError
+ Hydra.Error.Checking: instance GHC.Read.Read Hydra.Error.Checking.UnsupportedTermVariantError
+ Hydra.Error.Checking: instance GHC.Read.Read Hydra.Error.Checking.UntypedLambdaError
+ Hydra.Error.Checking: instance GHC.Read.Read Hydra.Error.Checking.UntypedLetBindingError
+ Hydra.Error.Checking: instance GHC.Show.Show Hydra.Error.Checking.CheckingError
+ Hydra.Error.Checking: instance GHC.Show.Show Hydra.Error.Checking.IncorrectUnificationError
+ Hydra.Error.Checking: instance GHC.Show.Show Hydra.Error.Checking.NotAForallTypeError
+ Hydra.Error.Checking: instance GHC.Show.Show Hydra.Error.Checking.NotAFunctionTypeError
+ Hydra.Error.Checking: instance GHC.Show.Show Hydra.Error.Checking.TypeArityMismatchError
+ Hydra.Error.Checking: instance GHC.Show.Show Hydra.Error.Checking.TypeMismatchError
+ Hydra.Error.Checking: instance GHC.Show.Show Hydra.Error.Checking.UnboundTypeVariablesError
+ Hydra.Error.Checking: instance GHC.Show.Show Hydra.Error.Checking.UnequalTypesError
+ Hydra.Error.Checking: instance GHC.Show.Show Hydra.Error.Checking.UnsupportedTermVariantError
+ Hydra.Error.Checking: instance GHC.Show.Show Hydra.Error.Checking.UntypedLambdaError
+ Hydra.Error.Checking: instance GHC.Show.Show Hydra.Error.Checking.UntypedLetBindingError
+ Hydra.Error.Core: ConstantConditionError :: SubtermPath -> Bool -> ConstantConditionError
+ Hydra.Error.Core: DuplicateBindingError :: SubtermPath -> Name -> DuplicateBindingError
+ Hydra.Error.Core: DuplicateFieldError :: SubtermPath -> Name -> DuplicateFieldError
+ Hydra.Error.Core: DuplicateRecordTypeFieldNamesError :: SubtermPath -> Name -> DuplicateRecordTypeFieldNamesError
+ Hydra.Error.Core: DuplicateUnionTypeFieldNamesError :: SubtermPath -> Name -> DuplicateUnionTypeFieldNamesError
+ Hydra.Error.Core: EmptyCaseStatementError :: SubtermPath -> Name -> EmptyCaseStatementError
+ Hydra.Error.Core: EmptyLetBindingsError :: SubtermPath -> EmptyLetBindingsError
+ Hydra.Error.Core: EmptyRecordTypeError :: SubtermPath -> EmptyRecordTypeError
+ Hydra.Error.Core: EmptyTermAnnotationError :: SubtermPath -> EmptyTermAnnotationError
+ Hydra.Error.Core: EmptyTypeAnnotationError :: SubtermPath -> EmptyTypeAnnotationError
+ Hydra.Error.Core: EmptyTypeNameInTermError :: SubtermPath -> EmptyTypeNameInTermError
+ Hydra.Error.Core: EmptyUnionTypeError :: SubtermPath -> EmptyUnionTypeError
+ Hydra.Error.Core: InvalidForallParameterNameError :: SubtermPath -> Name -> InvalidForallParameterNameError
+ Hydra.Error.Core: InvalidLambdaParameterNameError :: SubtermPath -> Name -> InvalidLambdaParameterNameError
+ Hydra.Error.Core: InvalidLetBindingNameError :: SubtermPath -> Name -> InvalidLetBindingNameError
+ Hydra.Error.Core: InvalidTermErrorConstantCondition :: ConstantConditionError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorDuplicateBinding :: DuplicateBindingError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorDuplicateField :: DuplicateFieldError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorEmptyCaseStatement :: EmptyCaseStatementError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorEmptyLetBindings :: EmptyLetBindingsError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorEmptyTermAnnotation :: EmptyTermAnnotationError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorEmptyTypeNameInTerm :: EmptyTypeNameInTermError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorInvalidLambdaParameterName :: InvalidLambdaParameterNameError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorInvalidLetBindingName :: InvalidLetBindingNameError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorInvalidTypeLambdaParameterName :: InvalidTypeLambdaParameterNameError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorNestedTermAnnotation :: NestedTermAnnotationError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorRedundantWrapUnwrap :: RedundantWrapUnwrapError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorSelfApplication :: SelfApplicationError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorTermVariableShadowing :: TermVariableShadowingError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorTypeVariableShadowingInTypeLambda :: TypeVariableShadowingInTypeLambdaError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorUndefinedTermVariable :: UndefinedTermVariableError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorUndefinedTypeVariableInBindingType :: UndefinedTypeVariableInBindingTypeError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorUndefinedTypeVariableInLambdaDomain :: UndefinedTypeVariableInLambdaDomainError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorUndefinedTypeVariableInTypeApplication :: UndefinedTypeVariableInTypeApplicationError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorUnknownPrimitiveName :: UnknownPrimitiveNameError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorUnnecessaryIdentityApplication :: UnnecessaryIdentityApplicationError -> InvalidTermError
+ Hydra.Error.Core: InvalidTermErrorUntypedTermVariable :: UntypedTermVariableError -> InvalidTermError
+ Hydra.Error.Core: InvalidTypeErrorDuplicateRecordTypeFieldNames :: DuplicateRecordTypeFieldNamesError -> InvalidTypeError
+ Hydra.Error.Core: InvalidTypeErrorDuplicateUnionTypeFieldNames :: DuplicateUnionTypeFieldNamesError -> InvalidTypeError
+ Hydra.Error.Core: InvalidTypeErrorEmptyRecordType :: EmptyRecordTypeError -> InvalidTypeError
+ Hydra.Error.Core: InvalidTypeErrorEmptyTypeAnnotation :: EmptyTypeAnnotationError -> InvalidTypeError
+ Hydra.Error.Core: InvalidTypeErrorEmptyUnionType :: EmptyUnionTypeError -> InvalidTypeError
+ Hydra.Error.Core: InvalidTypeErrorInvalidForallParameterName :: InvalidForallParameterNameError -> InvalidTypeError
+ Hydra.Error.Core: InvalidTypeErrorInvalidTypeSchemeVariableName :: InvalidTypeSchemeVariableNameError -> InvalidTypeError
+ Hydra.Error.Core: InvalidTypeErrorNestedTypeAnnotation :: NestedTypeAnnotationError -> InvalidTypeError
+ Hydra.Error.Core: InvalidTypeErrorNonComparableMapKeyType :: NonComparableMapKeyTypeError -> InvalidTypeError
+ Hydra.Error.Core: InvalidTypeErrorNonComparableSetElementType :: NonComparableSetElementTypeError -> InvalidTypeError
+ Hydra.Error.Core: InvalidTypeErrorSingleVariantUnion :: SingleVariantUnionError -> InvalidTypeError
+ Hydra.Error.Core: InvalidTypeErrorTypeVariableShadowingInForall :: TypeVariableShadowingInForallError -> InvalidTypeError
+ Hydra.Error.Core: InvalidTypeErrorUndefinedTypeVariable :: UndefinedTypeVariableError -> InvalidTypeError
+ Hydra.Error.Core: InvalidTypeErrorVoidInNonBottomPosition :: VoidInNonBottomPositionError -> InvalidTypeError
+ Hydra.Error.Core: InvalidTypeLambdaParameterNameError :: SubtermPath -> Name -> InvalidTypeLambdaParameterNameError
+ Hydra.Error.Core: InvalidTypeSchemeVariableNameError :: SubtermPath -> Name -> InvalidTypeSchemeVariableNameError
+ Hydra.Error.Core: NestedTermAnnotationError :: SubtermPath -> NestedTermAnnotationError
+ Hydra.Error.Core: NestedTypeAnnotationError :: SubtermPath -> NestedTypeAnnotationError
+ Hydra.Error.Core: NonComparableMapKeyTypeError :: SubtermPath -> Type -> NonComparableMapKeyTypeError
+ Hydra.Error.Core: NonComparableSetElementTypeError :: SubtermPath -> Type -> NonComparableSetElementTypeError
+ Hydra.Error.Core: RedundantWrapUnwrapError :: SubtermPath -> Name -> RedundantWrapUnwrapError
+ Hydra.Error.Core: SelfApplicationError :: SubtermPath -> Name -> SelfApplicationError
+ Hydra.Error.Core: SingleVariantUnionError :: SubtermPath -> Name -> SingleVariantUnionError
+ Hydra.Error.Core: TermVariableShadowingError :: SubtermPath -> Name -> TermVariableShadowingError
+ Hydra.Error.Core: TypeVariableShadowingInForallError :: SubtermPath -> Name -> TypeVariableShadowingInForallError
+ Hydra.Error.Core: TypeVariableShadowingInTypeLambdaError :: SubtermPath -> Name -> TypeVariableShadowingInTypeLambdaError
+ Hydra.Error.Core: UndefinedFieldError :: Name -> Name -> UndefinedFieldError
+ Hydra.Error.Core: UndefinedTermVariableError :: SubtermPath -> Name -> UndefinedTermVariableError
+ Hydra.Error.Core: UndefinedTypeVariableError :: SubtermPath -> Name -> UndefinedTypeVariableError
+ Hydra.Error.Core: UndefinedTypeVariableInBindingTypeError :: SubtermPath -> Name -> UndefinedTypeVariableInBindingTypeError
+ Hydra.Error.Core: UndefinedTypeVariableInLambdaDomainError :: SubtermPath -> Name -> UndefinedTypeVariableInLambdaDomainError
+ Hydra.Error.Core: UndefinedTypeVariableInTypeApplicationError :: SubtermPath -> Name -> UndefinedTypeVariableInTypeApplicationError
+ Hydra.Error.Core: UnexpectedTermVariantError :: TermVariant -> Term -> UnexpectedTermVariantError
+ Hydra.Error.Core: UnexpectedTypeVariantError :: TypeVariant -> Type -> UnexpectedTypeVariantError
+ Hydra.Error.Core: UnknownPrimitiveNameError :: SubtermPath -> Name -> UnknownPrimitiveNameError
+ Hydra.Error.Core: UnnecessaryIdentityApplicationError :: SubtermPath -> UnnecessaryIdentityApplicationError
+ Hydra.Error.Core: UntypedTermVariableError :: SubtermPath -> Name -> UntypedTermVariableError
+ Hydra.Error.Core: VoidInNonBottomPositionError :: SubtermPath -> VoidInNonBottomPositionError
+ Hydra.Error.Core: [constantConditionErrorLocation] :: ConstantConditionError -> SubtermPath
+ Hydra.Error.Core: [constantConditionErrorValue] :: ConstantConditionError -> Bool
+ Hydra.Error.Core: [duplicateBindingErrorLocation] :: DuplicateBindingError -> SubtermPath
+ Hydra.Error.Core: [duplicateBindingErrorName] :: DuplicateBindingError -> Name
+ Hydra.Error.Core: [duplicateFieldErrorLocation] :: DuplicateFieldError -> SubtermPath
+ Hydra.Error.Core: [duplicateFieldErrorName] :: DuplicateFieldError -> Name
+ Hydra.Error.Core: [duplicateRecordTypeFieldNamesErrorLocation] :: DuplicateRecordTypeFieldNamesError -> SubtermPath
+ Hydra.Error.Core: [duplicateRecordTypeFieldNamesErrorName] :: DuplicateRecordTypeFieldNamesError -> Name
+ Hydra.Error.Core: [duplicateUnionTypeFieldNamesErrorLocation] :: DuplicateUnionTypeFieldNamesError -> SubtermPath
+ Hydra.Error.Core: [duplicateUnionTypeFieldNamesErrorName] :: DuplicateUnionTypeFieldNamesError -> Name
+ Hydra.Error.Core: [emptyCaseStatementErrorLocation] :: EmptyCaseStatementError -> SubtermPath
+ Hydra.Error.Core: [emptyCaseStatementErrorTypeName] :: EmptyCaseStatementError -> Name
+ Hydra.Error.Core: [emptyLetBindingsErrorLocation] :: EmptyLetBindingsError -> SubtermPath
+ Hydra.Error.Core: [emptyRecordTypeErrorLocation] :: EmptyRecordTypeError -> SubtermPath
+ Hydra.Error.Core: [emptyTermAnnotationErrorLocation] :: EmptyTermAnnotationError -> SubtermPath
+ Hydra.Error.Core: [emptyTypeAnnotationErrorLocation] :: EmptyTypeAnnotationError -> SubtermPath
+ Hydra.Error.Core: [emptyTypeNameInTermErrorLocation] :: EmptyTypeNameInTermError -> SubtermPath
+ Hydra.Error.Core: [emptyUnionTypeErrorLocation] :: EmptyUnionTypeError -> SubtermPath
+ Hydra.Error.Core: [invalidForallParameterNameErrorLocation] :: InvalidForallParameterNameError -> SubtermPath
+ Hydra.Error.Core: [invalidForallParameterNameErrorName] :: InvalidForallParameterNameError -> Name
+ Hydra.Error.Core: [invalidLambdaParameterNameErrorLocation] :: InvalidLambdaParameterNameError -> SubtermPath
+ Hydra.Error.Core: [invalidLambdaParameterNameErrorName] :: InvalidLambdaParameterNameError -> Name
+ Hydra.Error.Core: [invalidLetBindingNameErrorLocation] :: InvalidLetBindingNameError -> SubtermPath
+ Hydra.Error.Core: [invalidLetBindingNameErrorName] :: InvalidLetBindingNameError -> Name
+ Hydra.Error.Core: [invalidTypeLambdaParameterNameErrorLocation] :: InvalidTypeLambdaParameterNameError -> SubtermPath
+ Hydra.Error.Core: [invalidTypeLambdaParameterNameErrorName] :: InvalidTypeLambdaParameterNameError -> Name
+ Hydra.Error.Core: [invalidTypeSchemeVariableNameErrorLocation] :: InvalidTypeSchemeVariableNameError -> SubtermPath
+ Hydra.Error.Core: [invalidTypeSchemeVariableNameErrorName] :: InvalidTypeSchemeVariableNameError -> Name
+ Hydra.Error.Core: [nestedTermAnnotationErrorLocation] :: NestedTermAnnotationError -> SubtermPath
+ Hydra.Error.Core: [nestedTypeAnnotationErrorLocation] :: NestedTypeAnnotationError -> SubtermPath
+ Hydra.Error.Core: [nonComparableMapKeyTypeErrorKeyType] :: NonComparableMapKeyTypeError -> Type
+ Hydra.Error.Core: [nonComparableMapKeyTypeErrorLocation] :: NonComparableMapKeyTypeError -> SubtermPath
+ Hydra.Error.Core: [nonComparableSetElementTypeErrorElementType] :: NonComparableSetElementTypeError -> Type
+ Hydra.Error.Core: [nonComparableSetElementTypeErrorLocation] :: NonComparableSetElementTypeError -> SubtermPath
+ Hydra.Error.Core: [redundantWrapUnwrapErrorLocation] :: RedundantWrapUnwrapError -> SubtermPath
+ Hydra.Error.Core: [redundantWrapUnwrapErrorTypeName] :: RedundantWrapUnwrapError -> Name
+ Hydra.Error.Core: [selfApplicationErrorLocation] :: SelfApplicationError -> SubtermPath
+ Hydra.Error.Core: [selfApplicationErrorName] :: SelfApplicationError -> Name
+ Hydra.Error.Core: [singleVariantUnionErrorFieldName] :: SingleVariantUnionError -> Name
+ Hydra.Error.Core: [singleVariantUnionErrorLocation] :: SingleVariantUnionError -> SubtermPath
+ Hydra.Error.Core: [termVariableShadowingErrorLocation] :: TermVariableShadowingError -> SubtermPath
+ Hydra.Error.Core: [termVariableShadowingErrorName] :: TermVariableShadowingError -> Name
+ Hydra.Error.Core: [typeVariableShadowingInForallErrorLocation] :: TypeVariableShadowingInForallError -> SubtermPath
+ Hydra.Error.Core: [typeVariableShadowingInForallErrorName] :: TypeVariableShadowingInForallError -> Name
+ Hydra.Error.Core: [typeVariableShadowingInTypeLambdaErrorLocation] :: TypeVariableShadowingInTypeLambdaError -> SubtermPath
+ Hydra.Error.Core: [typeVariableShadowingInTypeLambdaErrorName] :: TypeVariableShadowingInTypeLambdaError -> Name
+ Hydra.Error.Core: [undefinedFieldErrorFieldName] :: UndefinedFieldError -> Name
+ Hydra.Error.Core: [undefinedFieldErrorTypeName] :: UndefinedFieldError -> Name
+ Hydra.Error.Core: [undefinedTermVariableErrorLocation] :: UndefinedTermVariableError -> SubtermPath
+ Hydra.Error.Core: [undefinedTermVariableErrorName] :: UndefinedTermVariableError -> Name
+ Hydra.Error.Core: [undefinedTypeVariableErrorLocation] :: UndefinedTypeVariableError -> SubtermPath
+ Hydra.Error.Core: [undefinedTypeVariableErrorName] :: UndefinedTypeVariableError -> Name
+ Hydra.Error.Core: [undefinedTypeVariableInBindingTypeErrorLocation] :: UndefinedTypeVariableInBindingTypeError -> SubtermPath
+ Hydra.Error.Core: [undefinedTypeVariableInBindingTypeErrorName] :: UndefinedTypeVariableInBindingTypeError -> Name
+ Hydra.Error.Core: [undefinedTypeVariableInLambdaDomainErrorLocation] :: UndefinedTypeVariableInLambdaDomainError -> SubtermPath
+ Hydra.Error.Core: [undefinedTypeVariableInLambdaDomainErrorName] :: UndefinedTypeVariableInLambdaDomainError -> Name
+ Hydra.Error.Core: [undefinedTypeVariableInTypeApplicationErrorLocation] :: UndefinedTypeVariableInTypeApplicationError -> SubtermPath
+ Hydra.Error.Core: [undefinedTypeVariableInTypeApplicationErrorName] :: UndefinedTypeVariableInTypeApplicationError -> Name
+ Hydra.Error.Core: [unexpectedTermVariantErrorActualTerm] :: UnexpectedTermVariantError -> Term
+ Hydra.Error.Core: [unexpectedTermVariantErrorExpectedVariant] :: UnexpectedTermVariantError -> TermVariant
+ Hydra.Error.Core: [unexpectedTypeVariantErrorActualType] :: UnexpectedTypeVariantError -> Type
+ Hydra.Error.Core: [unexpectedTypeVariantErrorExpectedVariant] :: UnexpectedTypeVariantError -> TypeVariant
+ Hydra.Error.Core: [unknownPrimitiveNameErrorLocation] :: UnknownPrimitiveNameError -> SubtermPath
+ Hydra.Error.Core: [unknownPrimitiveNameErrorName] :: UnknownPrimitiveNameError -> Name
+ Hydra.Error.Core: [unnecessaryIdentityApplicationErrorLocation] :: UnnecessaryIdentityApplicationError -> SubtermPath
+ Hydra.Error.Core: [untypedTermVariableErrorLocation] :: UntypedTermVariableError -> SubtermPath
+ Hydra.Error.Core: [untypedTermVariableErrorName] :: UntypedTermVariableError -> Name
+ Hydra.Error.Core: [voidInNonBottomPositionErrorLocation] :: VoidInNonBottomPositionError -> SubtermPath
+ Hydra.Error.Core: _ConstantConditionError :: Name
+ Hydra.Error.Core: _ConstantConditionError_location :: Name
+ Hydra.Error.Core: _ConstantConditionError_value :: Name
+ Hydra.Error.Core: _DuplicateBindingError :: Name
+ Hydra.Error.Core: _DuplicateBindingError_location :: Name
+ Hydra.Error.Core: _DuplicateBindingError_name :: Name
+ Hydra.Error.Core: _DuplicateFieldError :: Name
+ Hydra.Error.Core: _DuplicateFieldError_location :: Name
+ Hydra.Error.Core: _DuplicateFieldError_name :: Name
+ Hydra.Error.Core: _DuplicateRecordTypeFieldNamesError :: Name
+ Hydra.Error.Core: _DuplicateRecordTypeFieldNamesError_location :: Name
+ Hydra.Error.Core: _DuplicateRecordTypeFieldNamesError_name :: Name
+ Hydra.Error.Core: _DuplicateUnionTypeFieldNamesError :: Name
+ Hydra.Error.Core: _DuplicateUnionTypeFieldNamesError_location :: Name
+ Hydra.Error.Core: _DuplicateUnionTypeFieldNamesError_name :: Name
+ Hydra.Error.Core: _EmptyCaseStatementError :: Name
+ Hydra.Error.Core: _EmptyCaseStatementError_location :: Name
+ Hydra.Error.Core: _EmptyCaseStatementError_typeName :: Name
+ Hydra.Error.Core: _EmptyLetBindingsError :: Name
+ Hydra.Error.Core: _EmptyLetBindingsError_location :: Name
+ Hydra.Error.Core: _EmptyRecordTypeError :: Name
+ Hydra.Error.Core: _EmptyRecordTypeError_location :: Name
+ Hydra.Error.Core: _EmptyTermAnnotationError :: Name
+ Hydra.Error.Core: _EmptyTermAnnotationError_location :: Name
+ Hydra.Error.Core: _EmptyTypeAnnotationError :: Name
+ Hydra.Error.Core: _EmptyTypeAnnotationError_location :: Name
+ Hydra.Error.Core: _EmptyTypeNameInTermError :: Name
+ Hydra.Error.Core: _EmptyTypeNameInTermError_location :: Name
+ Hydra.Error.Core: _EmptyUnionTypeError :: Name
+ Hydra.Error.Core: _EmptyUnionTypeError_location :: Name
+ Hydra.Error.Core: _InvalidForallParameterNameError :: Name
+ Hydra.Error.Core: _InvalidForallParameterNameError_location :: Name
+ Hydra.Error.Core: _InvalidForallParameterNameError_name :: Name
+ Hydra.Error.Core: _InvalidLambdaParameterNameError :: Name
+ Hydra.Error.Core: _InvalidLambdaParameterNameError_location :: Name
+ Hydra.Error.Core: _InvalidLambdaParameterNameError_name :: Name
+ Hydra.Error.Core: _InvalidLetBindingNameError :: Name
+ Hydra.Error.Core: _InvalidLetBindingNameError_location :: Name
+ Hydra.Error.Core: _InvalidLetBindingNameError_name :: Name
+ Hydra.Error.Core: _InvalidTermError :: Name
+ Hydra.Error.Core: _InvalidTermError_constantCondition :: Name
+ Hydra.Error.Core: _InvalidTermError_duplicateBinding :: Name
+ Hydra.Error.Core: _InvalidTermError_duplicateField :: Name
+ Hydra.Error.Core: _InvalidTermError_emptyCaseStatement :: Name
+ Hydra.Error.Core: _InvalidTermError_emptyLetBindings :: Name
+ Hydra.Error.Core: _InvalidTermError_emptyTermAnnotation :: Name
+ Hydra.Error.Core: _InvalidTermError_emptyTypeNameInTerm :: Name
+ Hydra.Error.Core: _InvalidTermError_invalidLambdaParameterName :: Name
+ Hydra.Error.Core: _InvalidTermError_invalidLetBindingName :: Name
+ Hydra.Error.Core: _InvalidTermError_invalidTypeLambdaParameterName :: Name
+ Hydra.Error.Core: _InvalidTermError_nestedTermAnnotation :: Name
+ Hydra.Error.Core: _InvalidTermError_redundantWrapUnwrap :: Name
+ Hydra.Error.Core: _InvalidTermError_selfApplication :: Name
+ Hydra.Error.Core: _InvalidTermError_termVariableShadowing :: Name
+ Hydra.Error.Core: _InvalidTermError_typeVariableShadowingInTypeLambda :: Name
+ Hydra.Error.Core: _InvalidTermError_undefinedTermVariable :: Name
+ Hydra.Error.Core: _InvalidTermError_undefinedTypeVariableInBindingType :: Name
+ Hydra.Error.Core: _InvalidTermError_undefinedTypeVariableInLambdaDomain :: Name
+ Hydra.Error.Core: _InvalidTermError_undefinedTypeVariableInTypeApplication :: Name
+ Hydra.Error.Core: _InvalidTermError_unknownPrimitiveName :: Name
+ Hydra.Error.Core: _InvalidTermError_unnecessaryIdentityApplication :: Name
+ Hydra.Error.Core: _InvalidTermError_untypedTermVariable :: Name
+ Hydra.Error.Core: _InvalidTypeError :: Name
+ Hydra.Error.Core: _InvalidTypeError_duplicateRecordTypeFieldNames :: Name
+ Hydra.Error.Core: _InvalidTypeError_duplicateUnionTypeFieldNames :: Name
+ Hydra.Error.Core: _InvalidTypeError_emptyRecordType :: Name
+ Hydra.Error.Core: _InvalidTypeError_emptyTypeAnnotation :: Name
+ Hydra.Error.Core: _InvalidTypeError_emptyUnionType :: Name
+ Hydra.Error.Core: _InvalidTypeError_invalidForallParameterName :: Name
+ Hydra.Error.Core: _InvalidTypeError_invalidTypeSchemeVariableName :: Name
+ Hydra.Error.Core: _InvalidTypeError_nestedTypeAnnotation :: Name
+ Hydra.Error.Core: _InvalidTypeError_nonComparableMapKeyType :: Name
+ Hydra.Error.Core: _InvalidTypeError_nonComparableSetElementType :: Name
+ Hydra.Error.Core: _InvalidTypeError_singleVariantUnion :: Name
+ Hydra.Error.Core: _InvalidTypeError_typeVariableShadowingInForall :: Name
+ Hydra.Error.Core: _InvalidTypeError_undefinedTypeVariable :: Name
+ Hydra.Error.Core: _InvalidTypeError_voidInNonBottomPosition :: Name
+ Hydra.Error.Core: _InvalidTypeLambdaParameterNameError :: Name
+ Hydra.Error.Core: _InvalidTypeLambdaParameterNameError_location :: Name
+ Hydra.Error.Core: _InvalidTypeLambdaParameterNameError_name :: Name
+ Hydra.Error.Core: _InvalidTypeSchemeVariableNameError :: Name
+ Hydra.Error.Core: _InvalidTypeSchemeVariableNameError_location :: Name
+ Hydra.Error.Core: _InvalidTypeSchemeVariableNameError_name :: Name
+ Hydra.Error.Core: _NestedTermAnnotationError :: Name
+ Hydra.Error.Core: _NestedTermAnnotationError_location :: Name
+ Hydra.Error.Core: _NestedTypeAnnotationError :: Name
+ Hydra.Error.Core: _NestedTypeAnnotationError_location :: Name
+ Hydra.Error.Core: _NonComparableMapKeyTypeError :: Name
+ Hydra.Error.Core: _NonComparableMapKeyTypeError_keyType :: Name
+ Hydra.Error.Core: _NonComparableMapKeyTypeError_location :: Name
+ Hydra.Error.Core: _NonComparableSetElementTypeError :: Name
+ Hydra.Error.Core: _NonComparableSetElementTypeError_elementType :: Name
+ Hydra.Error.Core: _NonComparableSetElementTypeError_location :: Name
+ Hydra.Error.Core: _RedundantWrapUnwrapError :: Name
+ Hydra.Error.Core: _RedundantWrapUnwrapError_location :: Name
+ Hydra.Error.Core: _RedundantWrapUnwrapError_typeName :: Name
+ Hydra.Error.Core: _SelfApplicationError :: Name
+ Hydra.Error.Core: _SelfApplicationError_location :: Name
+ Hydra.Error.Core: _SelfApplicationError_name :: Name
+ Hydra.Error.Core: _SingleVariantUnionError :: Name
+ Hydra.Error.Core: _SingleVariantUnionError_fieldName :: Name
+ Hydra.Error.Core: _SingleVariantUnionError_location :: Name
+ Hydra.Error.Core: _TermVariableShadowingError :: Name
+ Hydra.Error.Core: _TermVariableShadowingError_location :: Name
+ Hydra.Error.Core: _TermVariableShadowingError_name :: Name
+ Hydra.Error.Core: _TypeVariableShadowingInForallError :: Name
+ Hydra.Error.Core: _TypeVariableShadowingInForallError_location :: Name
+ Hydra.Error.Core: _TypeVariableShadowingInForallError_name :: Name
+ Hydra.Error.Core: _TypeVariableShadowingInTypeLambdaError :: Name
+ Hydra.Error.Core: _TypeVariableShadowingInTypeLambdaError_location :: Name
+ Hydra.Error.Core: _TypeVariableShadowingInTypeLambdaError_name :: Name
+ Hydra.Error.Core: _UndefinedFieldError :: Name
+ Hydra.Error.Core: _UndefinedFieldError_fieldName :: Name
+ Hydra.Error.Core: _UndefinedFieldError_typeName :: Name
+ Hydra.Error.Core: _UndefinedTermVariableError :: Name
+ Hydra.Error.Core: _UndefinedTermVariableError_location :: Name
+ Hydra.Error.Core: _UndefinedTermVariableError_name :: Name
+ Hydra.Error.Core: _UndefinedTypeVariableError :: Name
+ Hydra.Error.Core: _UndefinedTypeVariableError_location :: Name
+ Hydra.Error.Core: _UndefinedTypeVariableError_name :: Name
+ Hydra.Error.Core: _UndefinedTypeVariableInBindingTypeError :: Name
+ Hydra.Error.Core: _UndefinedTypeVariableInBindingTypeError_location :: Name
+ Hydra.Error.Core: _UndefinedTypeVariableInBindingTypeError_name :: Name
+ Hydra.Error.Core: _UndefinedTypeVariableInLambdaDomainError :: Name
+ Hydra.Error.Core: _UndefinedTypeVariableInLambdaDomainError_location :: Name
+ Hydra.Error.Core: _UndefinedTypeVariableInLambdaDomainError_name :: Name
+ Hydra.Error.Core: _UndefinedTypeVariableInTypeApplicationError :: Name
+ Hydra.Error.Core: _UndefinedTypeVariableInTypeApplicationError_location :: Name
+ Hydra.Error.Core: _UndefinedTypeVariableInTypeApplicationError_name :: Name
+ Hydra.Error.Core: _UnexpectedTermVariantError :: Name
+ Hydra.Error.Core: _UnexpectedTermVariantError_actualTerm :: Name
+ Hydra.Error.Core: _UnexpectedTermVariantError_expectedVariant :: Name
+ Hydra.Error.Core: _UnexpectedTypeVariantError :: Name
+ Hydra.Error.Core: _UnexpectedTypeVariantError_actualType :: Name
+ Hydra.Error.Core: _UnexpectedTypeVariantError_expectedVariant :: Name
+ Hydra.Error.Core: _UnknownPrimitiveNameError :: Name
+ Hydra.Error.Core: _UnknownPrimitiveNameError_location :: Name
+ Hydra.Error.Core: _UnknownPrimitiveNameError_name :: Name
+ Hydra.Error.Core: _UnnecessaryIdentityApplicationError :: Name
+ Hydra.Error.Core: _UnnecessaryIdentityApplicationError_location :: Name
+ Hydra.Error.Core: _UntypedTermVariableError :: Name
+ Hydra.Error.Core: _UntypedTermVariableError_location :: Name
+ Hydra.Error.Core: _UntypedTermVariableError_name :: Name
+ Hydra.Error.Core: _VoidInNonBottomPositionError :: Name
+ Hydra.Error.Core: _VoidInNonBottomPositionError_location :: Name
+ Hydra.Error.Core: data ConstantConditionError
+ Hydra.Error.Core: data DuplicateBindingError
+ Hydra.Error.Core: data DuplicateFieldError
+ Hydra.Error.Core: data DuplicateRecordTypeFieldNamesError
+ Hydra.Error.Core: data DuplicateUnionTypeFieldNamesError
+ Hydra.Error.Core: data EmptyCaseStatementError
+ Hydra.Error.Core: data EmptyLetBindingsError
+ Hydra.Error.Core: data EmptyRecordTypeError
+ Hydra.Error.Core: data EmptyTermAnnotationError
+ Hydra.Error.Core: data EmptyTypeAnnotationError
+ Hydra.Error.Core: data EmptyTypeNameInTermError
+ Hydra.Error.Core: data EmptyUnionTypeError
+ Hydra.Error.Core: data InvalidForallParameterNameError
+ Hydra.Error.Core: data InvalidLambdaParameterNameError
+ Hydra.Error.Core: data InvalidLetBindingNameError
+ Hydra.Error.Core: data InvalidTermError
+ Hydra.Error.Core: data InvalidTypeError
+ Hydra.Error.Core: data InvalidTypeLambdaParameterNameError
+ Hydra.Error.Core: data InvalidTypeSchemeVariableNameError
+ Hydra.Error.Core: data NestedTermAnnotationError
+ Hydra.Error.Core: data NestedTypeAnnotationError
+ Hydra.Error.Core: data NonComparableMapKeyTypeError
+ Hydra.Error.Core: data NonComparableSetElementTypeError
+ Hydra.Error.Core: data RedundantWrapUnwrapError
+ Hydra.Error.Core: data SelfApplicationError
+ Hydra.Error.Core: data SingleVariantUnionError
+ Hydra.Error.Core: data TermVariableShadowingError
+ Hydra.Error.Core: data TypeVariableShadowingInForallError
+ Hydra.Error.Core: data TypeVariableShadowingInTypeLambdaError
+ Hydra.Error.Core: data UndefinedFieldError
+ Hydra.Error.Core: data UndefinedTermVariableError
+ Hydra.Error.Core: data UndefinedTypeVariableError
+ Hydra.Error.Core: data UndefinedTypeVariableInBindingTypeError
+ Hydra.Error.Core: data UndefinedTypeVariableInLambdaDomainError
+ Hydra.Error.Core: data UndefinedTypeVariableInTypeApplicationError
+ Hydra.Error.Core: data UnexpectedTermVariantError
+ Hydra.Error.Core: data UnexpectedTypeVariantError
+ Hydra.Error.Core: data UnknownPrimitiveNameError
+ Hydra.Error.Core: data UnnecessaryIdentityApplicationError
+ Hydra.Error.Core: data UntypedTermVariableError
+ Hydra.Error.Core: data VoidInNonBottomPositionError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.ConstantConditionError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.DuplicateBindingError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.DuplicateFieldError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.DuplicateRecordTypeFieldNamesError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.DuplicateUnionTypeFieldNamesError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.EmptyCaseStatementError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.EmptyLetBindingsError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.EmptyRecordTypeError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.EmptyTermAnnotationError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.EmptyTypeAnnotationError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.EmptyTypeNameInTermError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.EmptyUnionTypeError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.InvalidForallParameterNameError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.InvalidLambdaParameterNameError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.InvalidLetBindingNameError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.InvalidTermError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.InvalidTypeError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.InvalidTypeLambdaParameterNameError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.InvalidTypeSchemeVariableNameError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.NestedTermAnnotationError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.NestedTypeAnnotationError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.NonComparableMapKeyTypeError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.NonComparableSetElementTypeError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.RedundantWrapUnwrapError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.SelfApplicationError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.SingleVariantUnionError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.TermVariableShadowingError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.TypeVariableShadowingInForallError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.TypeVariableShadowingInTypeLambdaError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.UndefinedFieldError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.UndefinedTermVariableError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.UndefinedTypeVariableError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.UndefinedTypeVariableInBindingTypeError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.UndefinedTypeVariableInLambdaDomainError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.UndefinedTypeVariableInTypeApplicationError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.UnexpectedTermVariantError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.UnexpectedTypeVariantError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.UnknownPrimitiveNameError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.UnnecessaryIdentityApplicationError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.UntypedTermVariableError
+ Hydra.Error.Core: instance GHC.Classes.Eq Hydra.Error.Core.VoidInNonBottomPositionError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.ConstantConditionError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.DuplicateBindingError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.DuplicateFieldError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.DuplicateRecordTypeFieldNamesError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.DuplicateUnionTypeFieldNamesError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.EmptyCaseStatementError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.EmptyLetBindingsError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.EmptyRecordTypeError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.EmptyTermAnnotationError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.EmptyTypeAnnotationError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.EmptyTypeNameInTermError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.EmptyUnionTypeError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.InvalidForallParameterNameError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.InvalidLambdaParameterNameError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.InvalidLetBindingNameError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.InvalidTermError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.InvalidTypeError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.InvalidTypeLambdaParameterNameError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.InvalidTypeSchemeVariableNameError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.NestedTermAnnotationError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.NestedTypeAnnotationError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.NonComparableMapKeyTypeError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.NonComparableSetElementTypeError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.RedundantWrapUnwrapError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.SelfApplicationError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.SingleVariantUnionError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.TermVariableShadowingError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.TypeVariableShadowingInForallError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.TypeVariableShadowingInTypeLambdaError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.UndefinedFieldError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.UndefinedTermVariableError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.UndefinedTypeVariableError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.UndefinedTypeVariableInBindingTypeError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.UndefinedTypeVariableInLambdaDomainError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.UndefinedTypeVariableInTypeApplicationError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.UnexpectedTermVariantError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.UnexpectedTypeVariantError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.UnknownPrimitiveNameError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.UnnecessaryIdentityApplicationError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.UntypedTermVariableError
+ Hydra.Error.Core: instance GHC.Classes.Ord Hydra.Error.Core.VoidInNonBottomPositionError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.ConstantConditionError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.DuplicateBindingError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.DuplicateFieldError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.DuplicateRecordTypeFieldNamesError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.DuplicateUnionTypeFieldNamesError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.EmptyCaseStatementError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.EmptyLetBindingsError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.EmptyRecordTypeError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.EmptyTermAnnotationError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.EmptyTypeAnnotationError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.EmptyTypeNameInTermError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.EmptyUnionTypeError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.InvalidForallParameterNameError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.InvalidLambdaParameterNameError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.InvalidLetBindingNameError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.InvalidTermError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.InvalidTypeError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.InvalidTypeLambdaParameterNameError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.InvalidTypeSchemeVariableNameError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.NestedTermAnnotationError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.NestedTypeAnnotationError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.NonComparableMapKeyTypeError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.NonComparableSetElementTypeError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.RedundantWrapUnwrapError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.SelfApplicationError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.SingleVariantUnionError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.TermVariableShadowingError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.TypeVariableShadowingInForallError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.TypeVariableShadowingInTypeLambdaError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.UndefinedFieldError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.UndefinedTermVariableError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.UndefinedTypeVariableError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.UndefinedTypeVariableInBindingTypeError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.UndefinedTypeVariableInLambdaDomainError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.UndefinedTypeVariableInTypeApplicationError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.UnexpectedTermVariantError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.UnexpectedTypeVariantError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.UnknownPrimitiveNameError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.UnnecessaryIdentityApplicationError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.UntypedTermVariableError
+ Hydra.Error.Core: instance GHC.Read.Read Hydra.Error.Core.VoidInNonBottomPositionError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.ConstantConditionError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.DuplicateBindingError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.DuplicateFieldError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.DuplicateRecordTypeFieldNamesError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.DuplicateUnionTypeFieldNamesError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.EmptyCaseStatementError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.EmptyLetBindingsError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.EmptyRecordTypeError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.EmptyTermAnnotationError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.EmptyTypeAnnotationError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.EmptyTypeNameInTermError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.EmptyUnionTypeError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.InvalidForallParameterNameError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.InvalidLambdaParameterNameError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.InvalidLetBindingNameError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.InvalidTermError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.InvalidTypeError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.InvalidTypeLambdaParameterNameError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.InvalidTypeSchemeVariableNameError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.NestedTermAnnotationError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.NestedTypeAnnotationError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.NonComparableMapKeyTypeError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.NonComparableSetElementTypeError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.RedundantWrapUnwrapError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.SelfApplicationError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.SingleVariantUnionError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.TermVariableShadowingError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.TypeVariableShadowingInForallError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.TypeVariableShadowingInTypeLambdaError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.UndefinedFieldError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.UndefinedTermVariableError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.UndefinedTypeVariableError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.UndefinedTypeVariableInBindingTypeError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.UndefinedTypeVariableInLambdaDomainError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.UndefinedTypeVariableInTypeApplicationError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.UnexpectedTermVariantError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.UnexpectedTypeVariantError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.UnknownPrimitiveNameError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.UnnecessaryIdentityApplicationError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.UntypedTermVariableError
+ Hydra.Error.Core: instance GHC.Show.Show Hydra.Error.Core.VoidInNonBottomPositionError
+ Hydra.Error.Packaging: ConflictingModuleNamespaceError :: Namespace -> Namespace -> ConflictingModuleNamespaceError
+ Hydra.Error.Packaging: ConflictingVariantNameError :: Namespace -> Name -> Name -> Name -> ConflictingVariantNameError
+ Hydra.Error.Packaging: DefinitionNotInModuleNamespaceError :: Namespace -> Name -> DefinitionNotInModuleNamespaceError
+ Hydra.Error.Packaging: DuplicateDefinitionNameError :: Namespace -> Name -> DuplicateDefinitionNameError
+ Hydra.Error.Packaging: DuplicateModuleNamespaceError :: Namespace -> DuplicateModuleNamespaceError
+ Hydra.Error.Packaging: InvalidModuleErrorConflictingVariantName :: ConflictingVariantNameError -> InvalidModuleError
+ Hydra.Error.Packaging: InvalidModuleErrorDefinitionNotInModuleNamespace :: DefinitionNotInModuleNamespaceError -> InvalidModuleError
+ Hydra.Error.Packaging: InvalidModuleErrorDuplicateDefinitionName :: DuplicateDefinitionNameError -> InvalidModuleError
+ Hydra.Error.Packaging: InvalidPackageErrorConflictingModuleNamespace :: ConflictingModuleNamespaceError -> InvalidPackageError
+ Hydra.Error.Packaging: InvalidPackageErrorDuplicateModuleNamespace :: DuplicateModuleNamespaceError -> InvalidPackageError
+ Hydra.Error.Packaging: InvalidPackageErrorInvalidModule :: InvalidModuleError -> InvalidPackageError
+ Hydra.Error.Packaging: [conflictingModuleNamespaceErrorFirst] :: ConflictingModuleNamespaceError -> Namespace
+ Hydra.Error.Packaging: [conflictingModuleNamespaceErrorSecond] :: ConflictingModuleNamespaceError -> Namespace
+ Hydra.Error.Packaging: [conflictingVariantNameErrorConflictingName] :: ConflictingVariantNameError -> Name
+ Hydra.Error.Packaging: [conflictingVariantNameErrorNamespace] :: ConflictingVariantNameError -> Namespace
+ Hydra.Error.Packaging: [conflictingVariantNameErrorTypeName] :: ConflictingVariantNameError -> Name
+ Hydra.Error.Packaging: [conflictingVariantNameErrorVariantName] :: ConflictingVariantNameError -> Name
+ Hydra.Error.Packaging: [definitionNotInModuleNamespaceErrorName] :: DefinitionNotInModuleNamespaceError -> Name
+ Hydra.Error.Packaging: [definitionNotInModuleNamespaceErrorNamespace] :: DefinitionNotInModuleNamespaceError -> Namespace
+ Hydra.Error.Packaging: [duplicateDefinitionNameErrorName] :: DuplicateDefinitionNameError -> Name
+ Hydra.Error.Packaging: [duplicateDefinitionNameErrorNamespace] :: DuplicateDefinitionNameError -> Namespace
+ Hydra.Error.Packaging: [duplicateModuleNamespaceErrorNamespace] :: DuplicateModuleNamespaceError -> Namespace
+ Hydra.Error.Packaging: _ConflictingModuleNamespaceError :: Name
+ Hydra.Error.Packaging: _ConflictingModuleNamespaceError_first :: Name
+ Hydra.Error.Packaging: _ConflictingModuleNamespaceError_second :: Name
+ Hydra.Error.Packaging: _ConflictingVariantNameError :: Name
+ Hydra.Error.Packaging: _ConflictingVariantNameError_conflictingName :: Name
+ Hydra.Error.Packaging: _ConflictingVariantNameError_namespace :: Name
+ Hydra.Error.Packaging: _ConflictingVariantNameError_typeName :: Name
+ Hydra.Error.Packaging: _ConflictingVariantNameError_variantName :: Name
+ Hydra.Error.Packaging: _DefinitionNotInModuleNamespaceError :: Name
+ Hydra.Error.Packaging: _DefinitionNotInModuleNamespaceError_name :: Name
+ Hydra.Error.Packaging: _DefinitionNotInModuleNamespaceError_namespace :: Name
+ Hydra.Error.Packaging: _DuplicateDefinitionNameError :: Name
+ Hydra.Error.Packaging: _DuplicateDefinitionNameError_name :: Name
+ Hydra.Error.Packaging: _DuplicateDefinitionNameError_namespace :: Name
+ Hydra.Error.Packaging: _DuplicateModuleNamespaceError :: Name
+ Hydra.Error.Packaging: _DuplicateModuleNamespaceError_namespace :: Name
+ Hydra.Error.Packaging: _InvalidModuleError :: Name
+ Hydra.Error.Packaging: _InvalidModuleError_conflictingVariantName :: Name
+ Hydra.Error.Packaging: _InvalidModuleError_definitionNotInModuleNamespace :: Name
+ Hydra.Error.Packaging: _InvalidModuleError_duplicateDefinitionName :: Name
+ Hydra.Error.Packaging: _InvalidPackageError :: Name
+ Hydra.Error.Packaging: _InvalidPackageError_conflictingModuleNamespace :: Name
+ Hydra.Error.Packaging: _InvalidPackageError_duplicateModuleNamespace :: Name
+ Hydra.Error.Packaging: _InvalidPackageError_invalidModule :: Name
+ Hydra.Error.Packaging: data ConflictingModuleNamespaceError
+ Hydra.Error.Packaging: data ConflictingVariantNameError
+ Hydra.Error.Packaging: data DefinitionNotInModuleNamespaceError
+ Hydra.Error.Packaging: data DuplicateDefinitionNameError
+ Hydra.Error.Packaging: data DuplicateModuleNamespaceError
+ Hydra.Error.Packaging: data InvalidModuleError
+ Hydra.Error.Packaging: data InvalidPackageError
+ Hydra.Error.Packaging: instance GHC.Classes.Eq Hydra.Error.Packaging.ConflictingModuleNamespaceError
+ Hydra.Error.Packaging: instance GHC.Classes.Eq Hydra.Error.Packaging.ConflictingVariantNameError
+ Hydra.Error.Packaging: instance GHC.Classes.Eq Hydra.Error.Packaging.DefinitionNotInModuleNamespaceError
+ Hydra.Error.Packaging: instance GHC.Classes.Eq Hydra.Error.Packaging.DuplicateDefinitionNameError
+ Hydra.Error.Packaging: instance GHC.Classes.Eq Hydra.Error.Packaging.DuplicateModuleNamespaceError
+ Hydra.Error.Packaging: instance GHC.Classes.Eq Hydra.Error.Packaging.InvalidModuleError
+ Hydra.Error.Packaging: instance GHC.Classes.Eq Hydra.Error.Packaging.InvalidPackageError
+ Hydra.Error.Packaging: instance GHC.Classes.Ord Hydra.Error.Packaging.ConflictingModuleNamespaceError
+ Hydra.Error.Packaging: instance GHC.Classes.Ord Hydra.Error.Packaging.ConflictingVariantNameError
+ Hydra.Error.Packaging: instance GHC.Classes.Ord Hydra.Error.Packaging.DefinitionNotInModuleNamespaceError
+ Hydra.Error.Packaging: instance GHC.Classes.Ord Hydra.Error.Packaging.DuplicateDefinitionNameError
+ Hydra.Error.Packaging: instance GHC.Classes.Ord Hydra.Error.Packaging.DuplicateModuleNamespaceError
+ Hydra.Error.Packaging: instance GHC.Classes.Ord Hydra.Error.Packaging.InvalidModuleError
+ Hydra.Error.Packaging: instance GHC.Classes.Ord Hydra.Error.Packaging.InvalidPackageError
+ Hydra.Error.Packaging: instance GHC.Read.Read Hydra.Error.Packaging.ConflictingModuleNamespaceError
+ Hydra.Error.Packaging: instance GHC.Read.Read Hydra.Error.Packaging.ConflictingVariantNameError
+ Hydra.Error.Packaging: instance GHC.Read.Read Hydra.Error.Packaging.DefinitionNotInModuleNamespaceError
+ Hydra.Error.Packaging: instance GHC.Read.Read Hydra.Error.Packaging.DuplicateDefinitionNameError
+ Hydra.Error.Packaging: instance GHC.Read.Read Hydra.Error.Packaging.DuplicateModuleNamespaceError
+ Hydra.Error.Packaging: instance GHC.Read.Read Hydra.Error.Packaging.InvalidModuleError
+ Hydra.Error.Packaging: instance GHC.Read.Read Hydra.Error.Packaging.InvalidPackageError
+ Hydra.Error.Packaging: instance GHC.Show.Show Hydra.Error.Packaging.ConflictingModuleNamespaceError
+ Hydra.Error.Packaging: instance GHC.Show.Show Hydra.Error.Packaging.ConflictingVariantNameError
+ Hydra.Error.Packaging: instance GHC.Show.Show Hydra.Error.Packaging.DefinitionNotInModuleNamespaceError
+ Hydra.Error.Packaging: instance GHC.Show.Show Hydra.Error.Packaging.DuplicateDefinitionNameError
+ Hydra.Error.Packaging: instance GHC.Show.Show Hydra.Error.Packaging.DuplicateModuleNamespaceError
+ Hydra.Error.Packaging: instance GHC.Show.Show Hydra.Error.Packaging.InvalidModuleError
+ Hydra.Error.Packaging: instance GHC.Show.Show Hydra.Error.Packaging.InvalidPackageError
+ Hydra.Errors: DecodingError :: String -> DecodingError
+ Hydra.Errors: ErrorChecking :: CheckingError -> Error
+ Hydra.Errors: ErrorDecoding :: DecodingError -> Error
+ Hydra.Errors: ErrorDuplicateBinding :: DuplicateBindingError -> Error
+ Hydra.Errors: ErrorDuplicateField :: DuplicateFieldError -> Error
+ Hydra.Errors: ErrorOther :: OtherError -> Error
+ Hydra.Errors: ErrorUndefinedField :: UndefinedFieldError -> Error
+ Hydra.Errors: ErrorUndefinedTermVariable :: UndefinedTermVariableError -> Error
+ Hydra.Errors: ErrorUnexpectedTermVariant :: UnexpectedTermVariantError -> Error
+ Hydra.Errors: ErrorUnexpectedTypeVariant :: UnexpectedTypeVariantError -> Error
+ Hydra.Errors: ErrorUnification :: UnificationError -> Error
+ Hydra.Errors: ErrorUntypedTermVariable :: UntypedTermVariableError -> Error
+ Hydra.Errors: OtherError :: String -> OtherError
+ Hydra.Errors: UnificationError :: Type -> Type -> String -> UnificationError
+ Hydra.Errors: [unDecodingError] :: DecodingError -> String
+ Hydra.Errors: [unOtherError] :: OtherError -> String
+ Hydra.Errors: [unificationErrorLeftType] :: UnificationError -> Type
+ Hydra.Errors: [unificationErrorMessage] :: UnificationError -> String
+ Hydra.Errors: [unificationErrorRightType] :: UnificationError -> Type
+ Hydra.Errors: _DecodingError :: Name
+ Hydra.Errors: _Error :: Name
+ Hydra.Errors: _Error_checking :: Name
+ Hydra.Errors: _Error_decoding :: Name
+ Hydra.Errors: _Error_duplicateBinding :: Name
+ Hydra.Errors: _Error_duplicateField :: Name
+ Hydra.Errors: _Error_other :: Name
+ Hydra.Errors: _Error_undefinedField :: Name
+ Hydra.Errors: _Error_undefinedTermVariable :: Name
+ Hydra.Errors: _Error_unexpectedTermVariant :: Name
+ Hydra.Errors: _Error_unexpectedTypeVariant :: Name
+ Hydra.Errors: _Error_unification :: Name
+ Hydra.Errors: _Error_untypedTermVariable :: Name
+ Hydra.Errors: _OtherError :: Name
+ Hydra.Errors: _UnificationError :: Name
+ Hydra.Errors: _UnificationError_leftType :: Name
+ Hydra.Errors: _UnificationError_message :: Name
+ Hydra.Errors: _UnificationError_rightType :: Name
+ Hydra.Errors: data Error
+ Hydra.Errors: data UnificationError
+ Hydra.Errors: instance GHC.Classes.Eq Hydra.Errors.DecodingError
+ Hydra.Errors: instance GHC.Classes.Eq Hydra.Errors.Error
+ Hydra.Errors: instance GHC.Classes.Eq Hydra.Errors.OtherError
+ Hydra.Errors: instance GHC.Classes.Eq Hydra.Errors.UnificationError
+ Hydra.Errors: instance GHC.Classes.Ord Hydra.Errors.DecodingError
+ Hydra.Errors: instance GHC.Classes.Ord Hydra.Errors.Error
+ Hydra.Errors: instance GHC.Classes.Ord Hydra.Errors.OtherError
+ Hydra.Errors: instance GHC.Classes.Ord Hydra.Errors.UnificationError
+ Hydra.Errors: instance GHC.Read.Read Hydra.Errors.DecodingError
+ Hydra.Errors: instance GHC.Read.Read Hydra.Errors.Error
+ Hydra.Errors: instance GHC.Read.Read Hydra.Errors.OtherError
+ Hydra.Errors: instance GHC.Read.Read Hydra.Errors.UnificationError
+ Hydra.Errors: instance GHC.Show.Show Hydra.Errors.DecodingError
+ Hydra.Errors: instance GHC.Show.Show Hydra.Errors.Error
+ Hydra.Errors: instance GHC.Show.Show Hydra.Errors.OtherError
+ Hydra.Errors: instance GHC.Show.Show Hydra.Errors.UnificationError
+ Hydra.Errors: newtype DecodingError
+ Hydra.Errors: newtype OtherError
+ Hydra.Eval.Lib.Eithers: foldl :: Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Eithers: fromLeft :: Context -> t0 -> Term -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Eithers: fromRight :: Context -> t0 -> Term -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Eithers: isLeft :: Context -> t0 -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Eithers: isRight :: Context -> t0 -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Eithers: lefts :: Context -> Graph -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Eithers: mapSet :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Eithers: partitionEithers :: Context -> Graph -> Term -> Either (InContext Error) ([Term], [Term])
+ Hydra.Eval.Lib.Eithers: rights :: Context -> Graph -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Equality: identity :: t0 -> t1 -> t2 -> Either t3 t2
+ Hydra.Eval.Lib.Equality: max :: t0 -> t1 -> Term -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Equality: min :: t0 -> t1 -> Term -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Lists: concat2 :: t0 -> t1 -> Term -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Lists: elem :: t0 -> t1 -> Term -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Lists: foldr :: Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Lists: group :: t0 -> t1 -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Lists: intercalate :: t0 -> t1 -> Term -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Lists: intersperse :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Lists: nub :: Context -> Graph -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Lists: pure :: t0 -> t1 -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Lists: replicate :: t0 -> t1 -> Term -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Lists: safeHead :: Context -> Graph -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Lists: singleton :: t0 -> t1 -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Lists: sort :: t0 -> t1 -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Logic: and :: t0 -> t1 -> Term -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Logic: not :: t0 -> t1 -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Logic: or :: t0 -> t1 -> Term -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Maps: findWithDefault :: t0 -> t1 -> Term -> Term -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Math: even :: t0 -> t1 -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Math: odd :: t0 -> t1 -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Math: pred :: t0 -> t1 -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Math: succ :: t0 -> t1 -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Maybes: cat :: Context -> Graph -> Term -> Either (InContext Error) [Term]
+ Hydra.Eval.Lib.Maybes: fromJust :: Context -> t0 -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Maybes: fromMaybe :: Context -> t0 -> Term -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Maybes: isJust :: Context -> t0 -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Maybes: isNothing :: Context -> t0 -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Maybes: pure :: t0 -> t1 -> Term -> Either t2 Term
+ Hydra.Eval.Lib.Maybes: toList :: Context -> t0 -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Pairs: first :: Context -> t0 -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Pairs: second :: Context -> t0 -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Sets: difference :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Sets: intersection :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Sets: union :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
+ Hydra.Eval.Lib.Sets: unions :: Context -> Graph -> Term -> Either (InContext Error) Term
+ Hydra.Ext.Haskell.Coder: encodeCaseExpression :: Int -> Namespaces ModuleName -> CaseStatement -> Expression -> Context -> Graph -> Either (InContext Error) Expression
+ Hydra.Ext.Haskell.Syntax: Alternative :: Pattern -> CaseRhs -> Maybe LocalBindings -> Alternative
+ Hydra.Ext.Haskell.Syntax: ApplicationDeclarationHead :: DeclarationHead -> Variable -> ApplicationDeclarationHead
+ Hydra.Ext.Haskell.Syntax: ApplicationExpression :: Expression -> Expression -> ApplicationExpression
+ Hydra.Ext.Haskell.Syntax: ApplicationPattern :: Name -> [Pattern] -> ApplicationPattern
+ Hydra.Ext.Haskell.Syntax: ApplicationType :: Type -> Type -> ApplicationType
+ Hydra.Ext.Haskell.Syntax: AsPattern :: Name -> Pattern -> AsPattern
+ Hydra.Ext.Haskell.Syntax: AssertionClass :: ClassAssertion -> Assertion
+ Hydra.Ext.Haskell.Syntax: AssertionTuple :: [Assertion] -> Assertion
+ Hydra.Ext.Haskell.Syntax: CaseExpression :: Expression -> [Alternative] -> CaseExpression
+ Hydra.Ext.Haskell.Syntax: CaseRhs :: Expression -> CaseRhs
+ Hydra.Ext.Haskell.Syntax: ClassAssertion :: Name -> [Type] -> ClassAssertion
+ Hydra.Ext.Haskell.Syntax: ConstructRecordExpression :: Name -> [FieldUpdate] -> ConstructRecordExpression
+ Hydra.Ext.Haskell.Syntax: ConstructorOrdinary :: OrdinaryConstructor -> Constructor
+ Hydra.Ext.Haskell.Syntax: ConstructorRecord :: RecordConstructor -> Constructor
+ Hydra.Ext.Haskell.Syntax: ConstructorWithComments :: Constructor -> Maybe String -> ConstructorWithComments
+ Hydra.Ext.Haskell.Syntax: ContextType :: Assertion -> Type -> ContextType
+ Hydra.Ext.Haskell.Syntax: DataDeclaration :: DataOrNewtype -> [Assertion] -> DeclarationHead -> [ConstructorWithComments] -> [Deriving] -> DataDeclaration
+ Hydra.Ext.Haskell.Syntax: DataOrNewtypeData :: DataOrNewtype
+ Hydra.Ext.Haskell.Syntax: DataOrNewtypeNewtype :: DataOrNewtype
+ Hydra.Ext.Haskell.Syntax: DeclarationData :: DataDeclaration -> Declaration
+ Hydra.Ext.Haskell.Syntax: DeclarationHeadApplication :: ApplicationDeclarationHead -> DeclarationHead
+ Hydra.Ext.Haskell.Syntax: DeclarationHeadParens :: DeclarationHead -> DeclarationHead
+ Hydra.Ext.Haskell.Syntax: DeclarationHeadSimple :: Name -> DeclarationHead
+ Hydra.Ext.Haskell.Syntax: DeclarationType :: TypeDeclaration -> Declaration
+ Hydra.Ext.Haskell.Syntax: DeclarationTypedBinding :: TypedBinding -> Declaration
+ Hydra.Ext.Haskell.Syntax: DeclarationValueBinding :: ValueBinding -> Declaration
+ Hydra.Ext.Haskell.Syntax: DeclarationWithComments :: Declaration -> Maybe String -> DeclarationWithComments
+ Hydra.Ext.Haskell.Syntax: Deriving :: [Name] -> Deriving
+ Hydra.Ext.Haskell.Syntax: ExportDeclaration :: ImportExportSpec -> Export
+ Hydra.Ext.Haskell.Syntax: ExportModule :: ModuleName -> Export
+ Hydra.Ext.Haskell.Syntax: ExpressionApplication :: ApplicationExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionCase :: CaseExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionConstructRecord :: ConstructRecordExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionDo :: [Statement] -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionIf :: IfExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionInfixApplication :: InfixApplicationExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionLambda :: LambdaExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionLeftSection :: SectionExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionLet :: LetExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionList :: [Expression] -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionLiteral :: Literal -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionParens :: Expression -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionPrefixApplication :: PrefixApplicationExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionRightSection :: SectionExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionTuple :: [Expression] -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionTypeSignature :: TypeSignatureExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionUpdateRecord :: UpdateRecordExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: ExpressionVariable :: Name -> Expression
+ Hydra.Ext.Haskell.Syntax: Field :: Name -> Type -> Field
+ Hydra.Ext.Haskell.Syntax: FieldUpdate :: Name -> Expression -> FieldUpdate
+ Hydra.Ext.Haskell.Syntax: FieldWithComments :: Field -> Maybe String -> FieldWithComments
+ Hydra.Ext.Haskell.Syntax: FunctionType :: Type -> Type -> FunctionType
+ Hydra.Ext.Haskell.Syntax: IfExpression :: Expression -> Expression -> Expression -> IfExpression
+ Hydra.Ext.Haskell.Syntax: Import :: Bool -> ModuleName -> Maybe ModuleName -> Maybe SpecImport -> Import
+ Hydra.Ext.Haskell.Syntax: ImportExportSpec :: Maybe ImportModifier -> Name -> Maybe SubspecImportExportSpec -> ImportExportSpec
+ Hydra.Ext.Haskell.Syntax: ImportModifierPattern :: ImportModifier
+ Hydra.Ext.Haskell.Syntax: ImportModifierType :: ImportModifier
+ Hydra.Ext.Haskell.Syntax: InfixApplicationExpression :: Expression -> Operator -> Expression -> InfixApplicationExpression
+ Hydra.Ext.Haskell.Syntax: InfixType :: Type -> Operator -> Operator -> InfixType
+ Hydra.Ext.Haskell.Syntax: LambdaExpression :: [Pattern] -> Expression -> LambdaExpression
+ Hydra.Ext.Haskell.Syntax: LetExpression :: [LocalBinding] -> Expression -> LetExpression
+ Hydra.Ext.Haskell.Syntax: LiteralChar :: Int -> Literal
+ Hydra.Ext.Haskell.Syntax: LiteralDouble :: Double -> Literal
+ Hydra.Ext.Haskell.Syntax: LiteralFloat :: Float -> Literal
+ Hydra.Ext.Haskell.Syntax: LiteralInt :: Int -> Literal
+ Hydra.Ext.Haskell.Syntax: LiteralInteger :: Integer -> Literal
+ Hydra.Ext.Haskell.Syntax: LiteralString :: String -> Literal
+ Hydra.Ext.Haskell.Syntax: LocalBindingSignature :: TypeSignature -> LocalBinding
+ Hydra.Ext.Haskell.Syntax: LocalBindingValue :: ValueBinding -> LocalBinding
+ Hydra.Ext.Haskell.Syntax: LocalBindings :: [LocalBinding] -> LocalBindings
+ Hydra.Ext.Haskell.Syntax: Module :: Maybe ModuleHead -> [Import] -> [DeclarationWithComments] -> Module
+ Hydra.Ext.Haskell.Syntax: ModuleHead :: Maybe String -> ModuleName -> [Export] -> ModuleHead
+ Hydra.Ext.Haskell.Syntax: ModuleName :: String -> ModuleName
+ Hydra.Ext.Haskell.Syntax: NameImplicit :: QualifiedName -> Name
+ Hydra.Ext.Haskell.Syntax: NameNormal :: QualifiedName -> Name
+ Hydra.Ext.Haskell.Syntax: NameParens :: QualifiedName -> Name
+ Hydra.Ext.Haskell.Syntax: NamePart :: String -> NamePart
+ Hydra.Ext.Haskell.Syntax: OperatorBacktick :: QualifiedName -> Operator
+ Hydra.Ext.Haskell.Syntax: OperatorNormal :: QualifiedName -> Operator
+ Hydra.Ext.Haskell.Syntax: OrdinaryConstructor :: Name -> [Type] -> OrdinaryConstructor
+ Hydra.Ext.Haskell.Syntax: PatternApplication :: ApplicationPattern -> Pattern
+ Hydra.Ext.Haskell.Syntax: PatternAs :: AsPattern -> Pattern
+ Hydra.Ext.Haskell.Syntax: PatternField :: Name -> Pattern -> PatternField
+ Hydra.Ext.Haskell.Syntax: PatternList :: [Pattern] -> Pattern
+ Hydra.Ext.Haskell.Syntax: PatternLiteral :: Literal -> Pattern
+ Hydra.Ext.Haskell.Syntax: PatternName :: Name -> Pattern
+ Hydra.Ext.Haskell.Syntax: PatternParens :: Pattern -> Pattern
+ Hydra.Ext.Haskell.Syntax: PatternRecord :: RecordPattern -> Pattern
+ Hydra.Ext.Haskell.Syntax: PatternTuple :: [Pattern] -> Pattern
+ Hydra.Ext.Haskell.Syntax: PatternTyped :: TypedPattern -> Pattern
+ Hydra.Ext.Haskell.Syntax: PatternWildcard :: Pattern
+ Hydra.Ext.Haskell.Syntax: PrefixApplicationExpression :: Operator -> Expression -> PrefixApplicationExpression
+ Hydra.Ext.Haskell.Syntax: QualifiedName :: [NamePart] -> NamePart -> QualifiedName
+ Hydra.Ext.Haskell.Syntax: RecordConstructor :: Name -> [FieldWithComments] -> RecordConstructor
+ Hydra.Ext.Haskell.Syntax: RecordPattern :: Name -> [PatternField] -> RecordPattern
+ Hydra.Ext.Haskell.Syntax: RightHandSide :: Expression -> RightHandSide
+ Hydra.Ext.Haskell.Syntax: SectionExpression :: Operator -> Expression -> SectionExpression
+ Hydra.Ext.Haskell.Syntax: SimpleValueBinding :: Pattern -> RightHandSide -> Maybe LocalBindings -> SimpleValueBinding
+ Hydra.Ext.Haskell.Syntax: SpecImportHiding :: [ImportExportSpec] -> SpecImport
+ Hydra.Ext.Haskell.Syntax: SpecImportList :: [ImportExportSpec] -> SpecImport
+ Hydra.Ext.Haskell.Syntax: Statement :: Expression -> Statement
+ Hydra.Ext.Haskell.Syntax: SubspecImportExportSpecAll :: SubspecImportExportSpec
+ Hydra.Ext.Haskell.Syntax: SubspecImportExportSpecList :: [Name] -> SubspecImportExportSpec
+ Hydra.Ext.Haskell.Syntax: TypeApplication :: ApplicationType -> Type
+ Hydra.Ext.Haskell.Syntax: TypeCtx :: ContextType -> Type
+ Hydra.Ext.Haskell.Syntax: TypeDeclaration :: DeclarationHead -> Type -> TypeDeclaration
+ Hydra.Ext.Haskell.Syntax: TypeFunction :: FunctionType -> Type
+ Hydra.Ext.Haskell.Syntax: TypeInfix :: InfixType -> Type
+ Hydra.Ext.Haskell.Syntax: TypeList :: Type -> Type
+ Hydra.Ext.Haskell.Syntax: TypeParens :: Type -> Type
+ Hydra.Ext.Haskell.Syntax: TypeSignature :: Name -> Type -> TypeSignature
+ Hydra.Ext.Haskell.Syntax: TypeSignatureExpression :: Expression -> Type -> TypeSignatureExpression
+ Hydra.Ext.Haskell.Syntax: TypeTuple :: [Type] -> Type
+ Hydra.Ext.Haskell.Syntax: TypeVariable :: Name -> Type
+ Hydra.Ext.Haskell.Syntax: TypedBinding :: TypeSignature -> ValueBinding -> TypedBinding
+ Hydra.Ext.Haskell.Syntax: TypedPattern :: Pattern -> Type -> TypedPattern
+ Hydra.Ext.Haskell.Syntax: UpdateRecordExpression :: Expression -> [FieldUpdate] -> UpdateRecordExpression
+ Hydra.Ext.Haskell.Syntax: ValueBindingSimple :: SimpleValueBinding -> ValueBinding
+ Hydra.Ext.Haskell.Syntax: Variable :: Name -> Variable
+ Hydra.Ext.Haskell.Syntax: [alternativeBinds] :: Alternative -> Maybe LocalBindings
+ Hydra.Ext.Haskell.Syntax: [alternativePattern] :: Alternative -> Pattern
+ Hydra.Ext.Haskell.Syntax: [alternativeRhs] :: Alternative -> CaseRhs
+ Hydra.Ext.Haskell.Syntax: [applicationDeclarationHeadFunction] :: ApplicationDeclarationHead -> DeclarationHead
+ Hydra.Ext.Haskell.Syntax: [applicationDeclarationHeadOperand] :: ApplicationDeclarationHead -> Variable
+ Hydra.Ext.Haskell.Syntax: [applicationExpressionArgument] :: ApplicationExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: [applicationExpressionFunction] :: ApplicationExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: [applicationPatternArgs] :: ApplicationPattern -> [Pattern]
+ Hydra.Ext.Haskell.Syntax: [applicationPatternName] :: ApplicationPattern -> Name
+ Hydra.Ext.Haskell.Syntax: [applicationTypeArgument] :: ApplicationType -> Type
+ Hydra.Ext.Haskell.Syntax: [applicationTypeContext] :: ApplicationType -> Type
+ Hydra.Ext.Haskell.Syntax: [asPatternInner] :: AsPattern -> Pattern
+ Hydra.Ext.Haskell.Syntax: [asPatternName] :: AsPattern -> Name
+ Hydra.Ext.Haskell.Syntax: [caseExpressionAlternatives] :: CaseExpression -> [Alternative]
+ Hydra.Ext.Haskell.Syntax: [caseExpressionCase] :: CaseExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: [classAssertionName] :: ClassAssertion -> Name
+ Hydra.Ext.Haskell.Syntax: [classAssertionTypes] :: ClassAssertion -> [Type]
+ Hydra.Ext.Haskell.Syntax: [constructRecordExpressionFields] :: ConstructRecordExpression -> [FieldUpdate]
+ Hydra.Ext.Haskell.Syntax: [constructRecordExpressionName] :: ConstructRecordExpression -> Name
+ Hydra.Ext.Haskell.Syntax: [constructorWithCommentsBody] :: ConstructorWithComments -> Constructor
+ Hydra.Ext.Haskell.Syntax: [constructorWithCommentsComments] :: ConstructorWithComments -> Maybe String
+ Hydra.Ext.Haskell.Syntax: [contextTypeCtx] :: ContextType -> Assertion
+ Hydra.Ext.Haskell.Syntax: [contextTypeType] :: ContextType -> Type
+ Hydra.Ext.Haskell.Syntax: [dataDeclarationConstructors] :: DataDeclaration -> [ConstructorWithComments]
+ Hydra.Ext.Haskell.Syntax: [dataDeclarationContext] :: DataDeclaration -> [Assertion]
+ Hydra.Ext.Haskell.Syntax: [dataDeclarationDeriving] :: DataDeclaration -> [Deriving]
+ Hydra.Ext.Haskell.Syntax: [dataDeclarationHead] :: DataDeclaration -> DeclarationHead
+ Hydra.Ext.Haskell.Syntax: [dataDeclarationKeyword] :: DataDeclaration -> DataOrNewtype
+ Hydra.Ext.Haskell.Syntax: [declarationWithCommentsBody] :: DeclarationWithComments -> Declaration
+ Hydra.Ext.Haskell.Syntax: [declarationWithCommentsComments] :: DeclarationWithComments -> Maybe String
+ Hydra.Ext.Haskell.Syntax: [fieldName] :: Field -> Name
+ Hydra.Ext.Haskell.Syntax: [fieldType] :: Field -> Type
+ Hydra.Ext.Haskell.Syntax: [fieldUpdateName] :: FieldUpdate -> Name
+ Hydra.Ext.Haskell.Syntax: [fieldUpdateValue] :: FieldUpdate -> Expression
+ Hydra.Ext.Haskell.Syntax: [fieldWithCommentsComments] :: FieldWithComments -> Maybe String
+ Hydra.Ext.Haskell.Syntax: [fieldWithCommentsField] :: FieldWithComments -> Field
+ Hydra.Ext.Haskell.Syntax: [functionTypeCodomain] :: FunctionType -> Type
+ Hydra.Ext.Haskell.Syntax: [functionTypeDomain] :: FunctionType -> Type
+ Hydra.Ext.Haskell.Syntax: [ifExpressionCondition] :: IfExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: [ifExpressionElse] :: IfExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: [ifExpressionThen] :: IfExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: [importAs] :: Import -> Maybe ModuleName
+ Hydra.Ext.Haskell.Syntax: [importExportSpecModifier] :: ImportExportSpec -> Maybe ImportModifier
+ Hydra.Ext.Haskell.Syntax: [importExportSpecName] :: ImportExportSpec -> Name
+ Hydra.Ext.Haskell.Syntax: [importExportSpecSubspec] :: ImportExportSpec -> Maybe SubspecImportExportSpec
+ Hydra.Ext.Haskell.Syntax: [importModule] :: Import -> ModuleName
+ Hydra.Ext.Haskell.Syntax: [importQualified] :: Import -> Bool
+ Hydra.Ext.Haskell.Syntax: [importSpec] :: Import -> Maybe SpecImport
+ Hydra.Ext.Haskell.Syntax: [infixApplicationExpressionLhs] :: InfixApplicationExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: [infixApplicationExpressionOperator] :: InfixApplicationExpression -> Operator
+ Hydra.Ext.Haskell.Syntax: [infixApplicationExpressionRhs] :: InfixApplicationExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: [infixTypeLhs] :: InfixType -> Type
+ Hydra.Ext.Haskell.Syntax: [infixTypeOperator] :: InfixType -> Operator
+ Hydra.Ext.Haskell.Syntax: [infixTypeRhs] :: InfixType -> Operator
+ Hydra.Ext.Haskell.Syntax: [lambdaExpressionBindings] :: LambdaExpression -> [Pattern]
+ Hydra.Ext.Haskell.Syntax: [lambdaExpressionInner] :: LambdaExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: [letExpressionBindings] :: LetExpression -> [LocalBinding]
+ Hydra.Ext.Haskell.Syntax: [letExpressionInner] :: LetExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: [moduleDeclarations] :: Module -> [DeclarationWithComments]
+ Hydra.Ext.Haskell.Syntax: [moduleHeadComments] :: ModuleHead -> Maybe String
+ Hydra.Ext.Haskell.Syntax: [moduleHeadExports] :: ModuleHead -> [Export]
+ Hydra.Ext.Haskell.Syntax: [moduleHeadName] :: ModuleHead -> ModuleName
+ Hydra.Ext.Haskell.Syntax: [moduleHead] :: Module -> Maybe ModuleHead
+ Hydra.Ext.Haskell.Syntax: [moduleImports] :: Module -> [Import]
+ Hydra.Ext.Haskell.Syntax: [ordinaryConstructorFields] :: OrdinaryConstructor -> [Type]
+ Hydra.Ext.Haskell.Syntax: [ordinaryConstructorName] :: OrdinaryConstructor -> Name
+ Hydra.Ext.Haskell.Syntax: [patternFieldName] :: PatternField -> Name
+ Hydra.Ext.Haskell.Syntax: [patternFieldPattern] :: PatternField -> Pattern
+ Hydra.Ext.Haskell.Syntax: [prefixApplicationExpressionOperator] :: PrefixApplicationExpression -> Operator
+ Hydra.Ext.Haskell.Syntax: [prefixApplicationExpressionRhs] :: PrefixApplicationExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: [qualifiedNameQualifiers] :: QualifiedName -> [NamePart]
+ Hydra.Ext.Haskell.Syntax: [qualifiedNameUnqualified] :: QualifiedName -> NamePart
+ Hydra.Ext.Haskell.Syntax: [recordConstructorFields] :: RecordConstructor -> [FieldWithComments]
+ Hydra.Ext.Haskell.Syntax: [recordConstructorName] :: RecordConstructor -> Name
+ Hydra.Ext.Haskell.Syntax: [recordPatternFields] :: RecordPattern -> [PatternField]
+ Hydra.Ext.Haskell.Syntax: [recordPatternName] :: RecordPattern -> Name
+ Hydra.Ext.Haskell.Syntax: [sectionExpressionExpression] :: SectionExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: [sectionExpressionOperator] :: SectionExpression -> Operator
+ Hydra.Ext.Haskell.Syntax: [simpleValueBindingLocalBindings] :: SimpleValueBinding -> Maybe LocalBindings
+ Hydra.Ext.Haskell.Syntax: [simpleValueBindingPattern] :: SimpleValueBinding -> Pattern
+ Hydra.Ext.Haskell.Syntax: [simpleValueBindingRhs] :: SimpleValueBinding -> RightHandSide
+ Hydra.Ext.Haskell.Syntax: [typeDeclarationName] :: TypeDeclaration -> DeclarationHead
+ Hydra.Ext.Haskell.Syntax: [typeDeclarationType] :: TypeDeclaration -> Type
+ Hydra.Ext.Haskell.Syntax: [typeSignatureExpressionInner] :: TypeSignatureExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: [typeSignatureExpressionType] :: TypeSignatureExpression -> Type
+ Hydra.Ext.Haskell.Syntax: [typeSignatureName] :: TypeSignature -> Name
+ Hydra.Ext.Haskell.Syntax: [typeSignatureType] :: TypeSignature -> Type
+ Hydra.Ext.Haskell.Syntax: [typedBindingTypeSignature] :: TypedBinding -> TypeSignature
+ Hydra.Ext.Haskell.Syntax: [typedBindingValueBinding] :: TypedBinding -> ValueBinding
+ Hydra.Ext.Haskell.Syntax: [typedPatternInner] :: TypedPattern -> Pattern
+ Hydra.Ext.Haskell.Syntax: [typedPatternType] :: TypedPattern -> Type
+ Hydra.Ext.Haskell.Syntax: [unCaseRhs] :: CaseRhs -> Expression
+ Hydra.Ext.Haskell.Syntax: [unDeriving] :: Deriving -> [Name]
+ Hydra.Ext.Haskell.Syntax: [unLocalBindings] :: LocalBindings -> [LocalBinding]
+ Hydra.Ext.Haskell.Syntax: [unModuleName] :: ModuleName -> String
+ Hydra.Ext.Haskell.Syntax: [unNamePart] :: NamePart -> String
+ Hydra.Ext.Haskell.Syntax: [unRightHandSide] :: RightHandSide -> Expression
+ Hydra.Ext.Haskell.Syntax: [unStatement] :: Statement -> Expression
+ Hydra.Ext.Haskell.Syntax: [unVariable] :: Variable -> Name
+ Hydra.Ext.Haskell.Syntax: [updateRecordExpressionFields] :: UpdateRecordExpression -> [FieldUpdate]
+ Hydra.Ext.Haskell.Syntax: [updateRecordExpressionInner] :: UpdateRecordExpression -> Expression
+ Hydra.Ext.Haskell.Syntax: _Alternative :: Name
+ Hydra.Ext.Haskell.Syntax: _Alternative_binds :: Name
+ Hydra.Ext.Haskell.Syntax: _Alternative_pattern :: Name
+ Hydra.Ext.Haskell.Syntax: _Alternative_rhs :: Name
+ Hydra.Ext.Haskell.Syntax: _ApplicationDeclarationHead :: Name
+ Hydra.Ext.Haskell.Syntax: _ApplicationDeclarationHead_function :: Name
+ Hydra.Ext.Haskell.Syntax: _ApplicationDeclarationHead_operand :: Name
+ Hydra.Ext.Haskell.Syntax: _ApplicationExpression :: Name
+ Hydra.Ext.Haskell.Syntax: _ApplicationExpression_argument :: Name
+ Hydra.Ext.Haskell.Syntax: _ApplicationExpression_function :: Name
+ Hydra.Ext.Haskell.Syntax: _ApplicationPattern :: Name
+ Hydra.Ext.Haskell.Syntax: _ApplicationPattern_args :: Name
+ Hydra.Ext.Haskell.Syntax: _ApplicationPattern_name :: Name
+ Hydra.Ext.Haskell.Syntax: _ApplicationType :: Name
+ Hydra.Ext.Haskell.Syntax: _ApplicationType_argument :: Name
+ Hydra.Ext.Haskell.Syntax: _ApplicationType_context :: Name
+ Hydra.Ext.Haskell.Syntax: _AsPattern :: Name
+ Hydra.Ext.Haskell.Syntax: _AsPattern_inner :: Name
+ Hydra.Ext.Haskell.Syntax: _AsPattern_name :: Name
+ Hydra.Ext.Haskell.Syntax: _Assertion :: Name
+ Hydra.Ext.Haskell.Syntax: _Assertion_class :: Name
+ Hydra.Ext.Haskell.Syntax: _Assertion_tuple :: Name
+ Hydra.Ext.Haskell.Syntax: _CaseExpression :: Name
+ Hydra.Ext.Haskell.Syntax: _CaseExpression_alternatives :: Name
+ Hydra.Ext.Haskell.Syntax: _CaseExpression_case :: Name
+ Hydra.Ext.Haskell.Syntax: _CaseRhs :: Name
+ Hydra.Ext.Haskell.Syntax: _ClassAssertion :: Name
+ Hydra.Ext.Haskell.Syntax: _ClassAssertion_name :: Name
+ Hydra.Ext.Haskell.Syntax: _ClassAssertion_types :: Name
+ Hydra.Ext.Haskell.Syntax: _ConstructRecordExpression :: Name
+ Hydra.Ext.Haskell.Syntax: _ConstructRecordExpression_fields :: Name
+ Hydra.Ext.Haskell.Syntax: _ConstructRecordExpression_name :: Name
+ Hydra.Ext.Haskell.Syntax: _Constructor :: Name
+ Hydra.Ext.Haskell.Syntax: _ConstructorWithComments :: Name
+ Hydra.Ext.Haskell.Syntax: _ConstructorWithComments_body :: Name
+ Hydra.Ext.Haskell.Syntax: _ConstructorWithComments_comments :: Name
+ Hydra.Ext.Haskell.Syntax: _Constructor_ordinary :: Name
+ Hydra.Ext.Haskell.Syntax: _Constructor_record :: Name
+ Hydra.Ext.Haskell.Syntax: _ContextType :: Name
+ Hydra.Ext.Haskell.Syntax: _ContextType_ctx :: Name
+ Hydra.Ext.Haskell.Syntax: _ContextType_type :: Name
+ Hydra.Ext.Haskell.Syntax: _DataDeclaration :: Name
+ Hydra.Ext.Haskell.Syntax: _DataDeclaration_constructors :: Name
+ Hydra.Ext.Haskell.Syntax: _DataDeclaration_context :: Name
+ Hydra.Ext.Haskell.Syntax: _DataDeclaration_deriving :: Name
+ Hydra.Ext.Haskell.Syntax: _DataDeclaration_head :: Name
+ Hydra.Ext.Haskell.Syntax: _DataDeclaration_keyword :: Name
+ Hydra.Ext.Haskell.Syntax: _DataOrNewtype :: Name
+ Hydra.Ext.Haskell.Syntax: _DataOrNewtype_data :: Name
+ Hydra.Ext.Haskell.Syntax: _DataOrNewtype_newtype :: Name
+ Hydra.Ext.Haskell.Syntax: _Declaration :: Name
+ Hydra.Ext.Haskell.Syntax: _DeclarationHead :: Name
+ Hydra.Ext.Haskell.Syntax: _DeclarationHead_application :: Name
+ Hydra.Ext.Haskell.Syntax: _DeclarationHead_parens :: Name
+ Hydra.Ext.Haskell.Syntax: _DeclarationHead_simple :: Name
+ Hydra.Ext.Haskell.Syntax: _DeclarationWithComments :: Name
+ Hydra.Ext.Haskell.Syntax: _DeclarationWithComments_body :: Name
+ Hydra.Ext.Haskell.Syntax: _DeclarationWithComments_comments :: Name
+ Hydra.Ext.Haskell.Syntax: _Declaration_data :: Name
+ Hydra.Ext.Haskell.Syntax: _Declaration_type :: Name
+ Hydra.Ext.Haskell.Syntax: _Declaration_typedBinding :: Name
+ Hydra.Ext.Haskell.Syntax: _Declaration_valueBinding :: Name
+ Hydra.Ext.Haskell.Syntax: _Deriving :: Name
+ Hydra.Ext.Haskell.Syntax: _Export :: Name
+ Hydra.Ext.Haskell.Syntax: _Export_declaration :: Name
+ Hydra.Ext.Haskell.Syntax: _Export_module :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_application :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_case :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_constructRecord :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_do :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_if :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_infixApplication :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_lambda :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_leftSection :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_let :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_list :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_literal :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_parens :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_prefixApplication :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_rightSection :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_tuple :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_typeSignature :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_updateRecord :: Name
+ Hydra.Ext.Haskell.Syntax: _Expression_variable :: Name
+ Hydra.Ext.Haskell.Syntax: _Field :: Name
+ Hydra.Ext.Haskell.Syntax: _FieldUpdate :: Name
+ Hydra.Ext.Haskell.Syntax: _FieldUpdate_name :: Name
+ Hydra.Ext.Haskell.Syntax: _FieldUpdate_value :: Name
+ Hydra.Ext.Haskell.Syntax: _FieldWithComments :: Name
+ Hydra.Ext.Haskell.Syntax: _FieldWithComments_comments :: Name
+ Hydra.Ext.Haskell.Syntax: _FieldWithComments_field :: Name
+ Hydra.Ext.Haskell.Syntax: _Field_name :: Name
+ Hydra.Ext.Haskell.Syntax: _Field_type :: Name
+ Hydra.Ext.Haskell.Syntax: _FunctionType :: Name
+ Hydra.Ext.Haskell.Syntax: _FunctionType_codomain :: Name
+ Hydra.Ext.Haskell.Syntax: _FunctionType_domain :: Name
+ Hydra.Ext.Haskell.Syntax: _IfExpression :: Name
+ Hydra.Ext.Haskell.Syntax: _IfExpression_condition :: Name
+ Hydra.Ext.Haskell.Syntax: _IfExpression_else :: Name
+ Hydra.Ext.Haskell.Syntax: _IfExpression_then :: Name
+ Hydra.Ext.Haskell.Syntax: _Import :: Name
+ Hydra.Ext.Haskell.Syntax: _ImportExportSpec :: Name
+ Hydra.Ext.Haskell.Syntax: _ImportExportSpec_modifier :: Name
+ Hydra.Ext.Haskell.Syntax: _ImportExportSpec_name :: Name
+ Hydra.Ext.Haskell.Syntax: _ImportExportSpec_subspec :: Name
+ Hydra.Ext.Haskell.Syntax: _ImportModifier :: Name
+ Hydra.Ext.Haskell.Syntax: _ImportModifier_pattern :: Name
+ Hydra.Ext.Haskell.Syntax: _ImportModifier_type :: Name
+ Hydra.Ext.Haskell.Syntax: _Import_as :: Name
+ Hydra.Ext.Haskell.Syntax: _Import_module :: Name
+ Hydra.Ext.Haskell.Syntax: _Import_qualified :: Name
+ Hydra.Ext.Haskell.Syntax: _Import_spec :: Name
+ Hydra.Ext.Haskell.Syntax: _InfixApplicationExpression :: Name
+ Hydra.Ext.Haskell.Syntax: _InfixApplicationExpression_lhs :: Name
+ Hydra.Ext.Haskell.Syntax: _InfixApplicationExpression_operator :: Name
+ Hydra.Ext.Haskell.Syntax: _InfixApplicationExpression_rhs :: Name
+ Hydra.Ext.Haskell.Syntax: _InfixType :: Name
+ Hydra.Ext.Haskell.Syntax: _InfixType_lhs :: Name
+ Hydra.Ext.Haskell.Syntax: _InfixType_operator :: Name
+ Hydra.Ext.Haskell.Syntax: _InfixType_rhs :: Name
+ Hydra.Ext.Haskell.Syntax: _LambdaExpression :: Name
+ Hydra.Ext.Haskell.Syntax: _LambdaExpression_bindings :: Name
+ Hydra.Ext.Haskell.Syntax: _LambdaExpression_inner :: Name
+ Hydra.Ext.Haskell.Syntax: _LetExpression :: Name
+ Hydra.Ext.Haskell.Syntax: _LetExpression_bindings :: Name
+ Hydra.Ext.Haskell.Syntax: _LetExpression_inner :: Name
+ Hydra.Ext.Haskell.Syntax: _Literal :: Name
+ Hydra.Ext.Haskell.Syntax: _Literal_char :: Name
+ Hydra.Ext.Haskell.Syntax: _Literal_double :: Name
+ Hydra.Ext.Haskell.Syntax: _Literal_float :: Name
+ Hydra.Ext.Haskell.Syntax: _Literal_int :: Name
+ Hydra.Ext.Haskell.Syntax: _Literal_integer :: Name
+ Hydra.Ext.Haskell.Syntax: _Literal_string :: Name
+ Hydra.Ext.Haskell.Syntax: _LocalBinding :: Name
+ Hydra.Ext.Haskell.Syntax: _LocalBinding_signature :: Name
+ Hydra.Ext.Haskell.Syntax: _LocalBinding_value :: Name
+ Hydra.Ext.Haskell.Syntax: _LocalBindings :: Name
+ Hydra.Ext.Haskell.Syntax: _Module :: Name
+ Hydra.Ext.Haskell.Syntax: _ModuleHead :: Name
+ Hydra.Ext.Haskell.Syntax: _ModuleHead_comments :: Name
+ Hydra.Ext.Haskell.Syntax: _ModuleHead_exports :: Name
+ Hydra.Ext.Haskell.Syntax: _ModuleHead_name :: Name
+ Hydra.Ext.Haskell.Syntax: _ModuleName :: Name
+ Hydra.Ext.Haskell.Syntax: _Module_declarations :: Name
+ Hydra.Ext.Haskell.Syntax: _Module_head :: Name
+ Hydra.Ext.Haskell.Syntax: _Module_imports :: Name
+ Hydra.Ext.Haskell.Syntax: _Name :: Name
+ Hydra.Ext.Haskell.Syntax: _NamePart :: Name
+ Hydra.Ext.Haskell.Syntax: _Name_implicit :: Name
+ Hydra.Ext.Haskell.Syntax: _Name_normal :: Name
+ Hydra.Ext.Haskell.Syntax: _Name_parens :: Name
+ Hydra.Ext.Haskell.Syntax: _Operator :: Name
+ Hydra.Ext.Haskell.Syntax: _Operator_backtick :: Name
+ Hydra.Ext.Haskell.Syntax: _Operator_normal :: Name
+ Hydra.Ext.Haskell.Syntax: _OrdinaryConstructor :: Name
+ Hydra.Ext.Haskell.Syntax: _OrdinaryConstructor_fields :: Name
+ Hydra.Ext.Haskell.Syntax: _OrdinaryConstructor_name :: Name
+ Hydra.Ext.Haskell.Syntax: _Pattern :: Name
+ Hydra.Ext.Haskell.Syntax: _PatternField :: Name
+ Hydra.Ext.Haskell.Syntax: _PatternField_name :: Name
+ Hydra.Ext.Haskell.Syntax: _PatternField_pattern :: Name
+ Hydra.Ext.Haskell.Syntax: _Pattern_application :: Name
+ Hydra.Ext.Haskell.Syntax: _Pattern_as :: Name
+ Hydra.Ext.Haskell.Syntax: _Pattern_list :: Name
+ Hydra.Ext.Haskell.Syntax: _Pattern_literal :: Name
+ Hydra.Ext.Haskell.Syntax: _Pattern_name :: Name
+ Hydra.Ext.Haskell.Syntax: _Pattern_parens :: Name
+ Hydra.Ext.Haskell.Syntax: _Pattern_record :: Name
+ Hydra.Ext.Haskell.Syntax: _Pattern_tuple :: Name
+ Hydra.Ext.Haskell.Syntax: _Pattern_typed :: Name
+ Hydra.Ext.Haskell.Syntax: _Pattern_wildcard :: Name
+ Hydra.Ext.Haskell.Syntax: _PrefixApplicationExpression :: Name
+ Hydra.Ext.Haskell.Syntax: _PrefixApplicationExpression_operator :: Name
+ Hydra.Ext.Haskell.Syntax: _PrefixApplicationExpression_rhs :: Name
+ Hydra.Ext.Haskell.Syntax: _QualifiedName :: Name
+ Hydra.Ext.Haskell.Syntax: _QualifiedName_qualifiers :: Name
+ Hydra.Ext.Haskell.Syntax: _QualifiedName_unqualified :: Name
+ Hydra.Ext.Haskell.Syntax: _RecordConstructor :: Name
+ Hydra.Ext.Haskell.Syntax: _RecordConstructor_fields :: Name
+ Hydra.Ext.Haskell.Syntax: _RecordConstructor_name :: Name
+ Hydra.Ext.Haskell.Syntax: _RecordPattern :: Name
+ Hydra.Ext.Haskell.Syntax: _RecordPattern_fields :: Name
+ Hydra.Ext.Haskell.Syntax: _RecordPattern_name :: Name
+ Hydra.Ext.Haskell.Syntax: _RightHandSide :: Name
+ Hydra.Ext.Haskell.Syntax: _SectionExpression :: Name
+ Hydra.Ext.Haskell.Syntax: _SectionExpression_expression :: Name
+ Hydra.Ext.Haskell.Syntax: _SectionExpression_operator :: Name
+ Hydra.Ext.Haskell.Syntax: _SimpleValueBinding :: Name
+ Hydra.Ext.Haskell.Syntax: _SimpleValueBinding_localBindings :: Name
+ Hydra.Ext.Haskell.Syntax: _SimpleValueBinding_pattern :: Name
+ Hydra.Ext.Haskell.Syntax: _SimpleValueBinding_rhs :: Name
+ Hydra.Ext.Haskell.Syntax: _SpecImport :: Name
+ Hydra.Ext.Haskell.Syntax: _SpecImport_hiding :: Name
+ Hydra.Ext.Haskell.Syntax: _SpecImport_list :: Name
+ Hydra.Ext.Haskell.Syntax: _Statement :: Name
+ Hydra.Ext.Haskell.Syntax: _SubspecImportExportSpec :: Name
+ Hydra.Ext.Haskell.Syntax: _SubspecImportExportSpec_all :: Name
+ Hydra.Ext.Haskell.Syntax: _SubspecImportExportSpec_list :: Name
+ Hydra.Ext.Haskell.Syntax: _Type :: Name
+ Hydra.Ext.Haskell.Syntax: _TypeDeclaration :: Name
+ Hydra.Ext.Haskell.Syntax: _TypeDeclaration_name :: Name
+ Hydra.Ext.Haskell.Syntax: _TypeDeclaration_type :: Name
+ Hydra.Ext.Haskell.Syntax: _TypeSignature :: Name
+ Hydra.Ext.Haskell.Syntax: _TypeSignatureExpression :: Name
+ Hydra.Ext.Haskell.Syntax: _TypeSignatureExpression_inner :: Name
+ Hydra.Ext.Haskell.Syntax: _TypeSignatureExpression_type :: Name
+ Hydra.Ext.Haskell.Syntax: _TypeSignature_name :: Name
+ Hydra.Ext.Haskell.Syntax: _TypeSignature_type :: Name
+ Hydra.Ext.Haskell.Syntax: _Type_application :: Name
+ Hydra.Ext.Haskell.Syntax: _Type_ctx :: Name
+ Hydra.Ext.Haskell.Syntax: _Type_function :: Name
+ Hydra.Ext.Haskell.Syntax: _Type_infix :: Name
+ Hydra.Ext.Haskell.Syntax: _Type_list :: Name
+ Hydra.Ext.Haskell.Syntax: _Type_parens :: Name
+ Hydra.Ext.Haskell.Syntax: _Type_tuple :: Name
+ Hydra.Ext.Haskell.Syntax: _Type_variable :: Name
+ Hydra.Ext.Haskell.Syntax: _TypedBinding :: Name
+ Hydra.Ext.Haskell.Syntax: _TypedBinding_typeSignature :: Name
+ Hydra.Ext.Haskell.Syntax: _TypedBinding_valueBinding :: Name
+ Hydra.Ext.Haskell.Syntax: _TypedPattern :: Name
+ Hydra.Ext.Haskell.Syntax: _TypedPattern_inner :: Name
+ Hydra.Ext.Haskell.Syntax: _TypedPattern_type :: Name
+ Hydra.Ext.Haskell.Syntax: _UpdateRecordExpression :: Name
+ Hydra.Ext.Haskell.Syntax: _UpdateRecordExpression_fields :: Name
+ Hydra.Ext.Haskell.Syntax: _UpdateRecordExpression_inner :: Name
+ Hydra.Ext.Haskell.Syntax: _ValueBinding :: Name
+ Hydra.Ext.Haskell.Syntax: _ValueBinding_simple :: Name
+ Hydra.Ext.Haskell.Syntax: _Variable :: Name
+ Hydra.Ext.Haskell.Syntax: data Alternative
+ Hydra.Ext.Haskell.Syntax: data ApplicationDeclarationHead
+ Hydra.Ext.Haskell.Syntax: data ApplicationExpression
+ Hydra.Ext.Haskell.Syntax: data ApplicationPattern
+ Hydra.Ext.Haskell.Syntax: data ApplicationType
+ Hydra.Ext.Haskell.Syntax: data AsPattern
+ Hydra.Ext.Haskell.Syntax: data Assertion
+ Hydra.Ext.Haskell.Syntax: data CaseExpression
+ Hydra.Ext.Haskell.Syntax: data ClassAssertion
+ Hydra.Ext.Haskell.Syntax: data ConstructRecordExpression
+ Hydra.Ext.Haskell.Syntax: data Constructor
+ Hydra.Ext.Haskell.Syntax: data ConstructorWithComments
+ Hydra.Ext.Haskell.Syntax: data ContextType
+ Hydra.Ext.Haskell.Syntax: data DataDeclaration
+ Hydra.Ext.Haskell.Syntax: data DataOrNewtype
+ Hydra.Ext.Haskell.Syntax: data Declaration
+ Hydra.Ext.Haskell.Syntax: data DeclarationHead
+ Hydra.Ext.Haskell.Syntax: data DeclarationWithComments
+ Hydra.Ext.Haskell.Syntax: data Export
+ Hydra.Ext.Haskell.Syntax: data Expression
+ Hydra.Ext.Haskell.Syntax: data Field
+ Hydra.Ext.Haskell.Syntax: data FieldUpdate
+ Hydra.Ext.Haskell.Syntax: data FieldWithComments
+ Hydra.Ext.Haskell.Syntax: data FunctionType
+ Hydra.Ext.Haskell.Syntax: data IfExpression
+ Hydra.Ext.Haskell.Syntax: data Import
+ Hydra.Ext.Haskell.Syntax: data ImportExportSpec
+ Hydra.Ext.Haskell.Syntax: data ImportModifier
+ Hydra.Ext.Haskell.Syntax: data InfixApplicationExpression
+ Hydra.Ext.Haskell.Syntax: data InfixType
+ Hydra.Ext.Haskell.Syntax: data LambdaExpression
+ Hydra.Ext.Haskell.Syntax: data LetExpression
+ Hydra.Ext.Haskell.Syntax: data Literal
+ Hydra.Ext.Haskell.Syntax: data LocalBinding
+ Hydra.Ext.Haskell.Syntax: data Module
+ Hydra.Ext.Haskell.Syntax: data ModuleHead
+ Hydra.Ext.Haskell.Syntax: data Name
+ Hydra.Ext.Haskell.Syntax: data Operator
+ Hydra.Ext.Haskell.Syntax: data OrdinaryConstructor
+ Hydra.Ext.Haskell.Syntax: data Pattern
+ Hydra.Ext.Haskell.Syntax: data PatternField
+ Hydra.Ext.Haskell.Syntax: data PrefixApplicationExpression
+ Hydra.Ext.Haskell.Syntax: data QualifiedName
+ Hydra.Ext.Haskell.Syntax: data RecordConstructor
+ Hydra.Ext.Haskell.Syntax: data RecordPattern
+ Hydra.Ext.Haskell.Syntax: data SectionExpression
+ Hydra.Ext.Haskell.Syntax: data SimpleValueBinding
+ Hydra.Ext.Haskell.Syntax: data SpecImport
+ Hydra.Ext.Haskell.Syntax: data SubspecImportExportSpec
+ Hydra.Ext.Haskell.Syntax: data Type
+ Hydra.Ext.Haskell.Syntax: data TypeDeclaration
+ Hydra.Ext.Haskell.Syntax: data TypeSignature
+ Hydra.Ext.Haskell.Syntax: data TypeSignatureExpression
+ Hydra.Ext.Haskell.Syntax: data TypedBinding
+ Hydra.Ext.Haskell.Syntax: data TypedPattern
+ Hydra.Ext.Haskell.Syntax: data UpdateRecordExpression
+ Hydra.Ext.Haskell.Syntax: data ValueBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Alternative
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.ApplicationDeclarationHead
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.ApplicationExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.ApplicationPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.ApplicationType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.AsPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Assertion
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.CaseExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.CaseRhs
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.ClassAssertion
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.ConstructRecordExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Constructor
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.ConstructorWithComments
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.ContextType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.DataDeclaration
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.DataOrNewtype
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Declaration
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.DeclarationHead
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.DeclarationWithComments
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Deriving
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Export
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Expression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Field
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.FieldUpdate
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.FieldWithComments
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.FunctionType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.IfExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Import
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.ImportExportSpec
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.ImportModifier
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.InfixApplicationExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.InfixType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.LambdaExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.LetExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Literal
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.LocalBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.LocalBindings
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Module
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.ModuleHead
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.ModuleName
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Name
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.NamePart
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Operator
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.OrdinaryConstructor
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Pattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.PatternField
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.PrefixApplicationExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.QualifiedName
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.RecordConstructor
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.RecordPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.RightHandSide
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.SectionExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.SimpleValueBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.SpecImport
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Statement
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.SubspecImportExportSpec
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Type
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.TypeDeclaration
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.TypeSignature
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.TypeSignatureExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.TypedBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.TypedPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.UpdateRecordExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.ValueBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Eq Hydra.Ext.Haskell.Syntax.Variable
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Alternative
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.ApplicationDeclarationHead
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.ApplicationExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.ApplicationPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.ApplicationType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.AsPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Assertion
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.CaseExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.CaseRhs
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.ClassAssertion
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.ConstructRecordExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Constructor
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.ConstructorWithComments
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.ContextType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.DataDeclaration
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.DataOrNewtype
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Declaration
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.DeclarationHead
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.DeclarationWithComments
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Deriving
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Export
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Expression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Field
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.FieldUpdate
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.FieldWithComments
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.FunctionType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.IfExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Import
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.ImportExportSpec
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.ImportModifier
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.InfixApplicationExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.InfixType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.LambdaExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.LetExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Literal
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.LocalBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.LocalBindings
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Module
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.ModuleHead
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.ModuleName
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Name
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.NamePart
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Operator
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.OrdinaryConstructor
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Pattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.PatternField
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.PrefixApplicationExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.QualifiedName
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.RecordConstructor
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.RecordPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.RightHandSide
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.SectionExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.SimpleValueBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.SpecImport
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Statement
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.SubspecImportExportSpec
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Type
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.TypeDeclaration
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.TypeSignature
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.TypeSignatureExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.TypedBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.TypedPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.UpdateRecordExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.ValueBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Classes.Ord Hydra.Ext.Haskell.Syntax.Variable
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Alternative
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.ApplicationDeclarationHead
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.ApplicationExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.ApplicationPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.ApplicationType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.AsPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Assertion
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.CaseExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.CaseRhs
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.ClassAssertion
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.ConstructRecordExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Constructor
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.ConstructorWithComments
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.ContextType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.DataDeclaration
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.DataOrNewtype
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Declaration
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.DeclarationHead
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.DeclarationWithComments
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Deriving
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Export
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Expression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Field
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.FieldUpdate
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.FieldWithComments
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.FunctionType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.IfExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Import
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.ImportExportSpec
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.ImportModifier
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.InfixApplicationExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.InfixType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.LambdaExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.LetExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Literal
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.LocalBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.LocalBindings
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Module
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.ModuleHead
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.ModuleName
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Name
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.NamePart
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Operator
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.OrdinaryConstructor
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Pattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.PatternField
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.PrefixApplicationExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.QualifiedName
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.RecordConstructor
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.RecordPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.RightHandSide
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.SectionExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.SimpleValueBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.SpecImport
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Statement
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.SubspecImportExportSpec
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Type
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.TypeDeclaration
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.TypeSignature
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.TypeSignatureExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.TypedBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.TypedPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.UpdateRecordExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.ValueBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Read.Read Hydra.Ext.Haskell.Syntax.Variable
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Alternative
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.ApplicationDeclarationHead
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.ApplicationExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.ApplicationPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.ApplicationType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.AsPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Assertion
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.CaseExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.CaseRhs
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.ClassAssertion
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.ConstructRecordExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Constructor
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.ConstructorWithComments
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.ContextType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.DataDeclaration
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.DataOrNewtype
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Declaration
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.DeclarationHead
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.DeclarationWithComments
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Deriving
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Export
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Expression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Field
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.FieldUpdate
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.FieldWithComments
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.FunctionType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.IfExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Import
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.ImportExportSpec
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.ImportModifier
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.InfixApplicationExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.InfixType
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.LambdaExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.LetExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Literal
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.LocalBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.LocalBindings
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Module
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.ModuleHead
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.ModuleName
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Name
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.NamePart
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Operator
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.OrdinaryConstructor
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Pattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.PatternField
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.PrefixApplicationExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.QualifiedName
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.RecordConstructor
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.RecordPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.RightHandSide
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.SectionExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.SimpleValueBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.SpecImport
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Statement
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.SubspecImportExportSpec
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Type
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.TypeDeclaration
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.TypeSignature
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.TypeSignatureExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.TypedBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.TypedPattern
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.UpdateRecordExpression
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.ValueBinding
+ Hydra.Ext.Haskell.Syntax: instance GHC.Show.Show Hydra.Ext.Haskell.Syntax.Variable
+ Hydra.Ext.Haskell.Syntax: newtype CaseRhs
+ Hydra.Ext.Haskell.Syntax: newtype Deriving
+ Hydra.Ext.Haskell.Syntax: newtype LocalBindings
+ Hydra.Ext.Haskell.Syntax: newtype ModuleName
+ Hydra.Ext.Haskell.Syntax: newtype NamePart
+ Hydra.Ext.Haskell.Syntax: newtype RightHandSide
+ Hydra.Ext.Haskell.Syntax: newtype Statement
+ Hydra.Ext.Haskell.Syntax: newtype Variable
+ Hydra.Ext.Haskell.Testing: addNamespacesToNamespaces :: Namespaces ModuleName -> Set Name -> Namespaces ModuleName
+ Hydra.Ext.Haskell.Testing: buildNamespacesForTestGroup :: Module -> TestGroup -> Graph -> Either String (Namespaces ModuleName)
+ Hydra.Ext.Haskell.Testing: buildTestModuleWithCodec :: TestCodec -> Module -> TestGroup -> String -> t0 -> String
+ Hydra.Ext.Haskell.Testing: collectNames :: Graph -> Set Name -> Term -> Set Name
+ Hydra.Ext.Haskell.Testing: collectTestCases :: TestGroup -> [TestCaseWithMetadata]
+ Hydra.Ext.Haskell.Testing: containsTriviallyPolymorphic :: Term -> Bool
+ Hydra.Ext.Haskell.Testing: extractEncodedTermVariableNames :: Graph -> Term -> Set Name
+ Hydra.Ext.Haskell.Testing: extractTestTerms :: TestCaseWithMetadata -> [Term]
+ Hydra.Ext.Haskell.Testing: findHaskellImports :: Namespaces ModuleName -> t0 -> [String]
+ Hydra.Ext.Haskell.Testing: generateHaskellTestFile :: Module -> TestGroup -> Graph -> Either String (String, String)
+ Hydra.Ext.Haskell.Testing: generateTestCaseWithCodec :: Graph -> Namespaces ModuleName -> TestCodec -> Int -> TestCaseWithMetadata -> Either String [String]
+ Hydra.Ext.Haskell.Testing: generateTestFileWithCodec :: TestCodec -> Module -> TestGroup -> Namespaces ModuleName -> Graph -> Either String (String, String)
+ Hydra.Ext.Haskell.Testing: generateTestGroupHierarchy :: Graph -> Namespaces ModuleName -> TestCodec -> Int -> TestGroup -> Either String String
+ Hydra.Ext.Haskell.Testing: generateTypeAnnotationFor :: Graph -> Namespaces ModuleName -> Term -> Term -> Either String (Maybe String)
+ Hydra.Ext.Haskell.Testing: haskellImportTemplate :: String
+ Hydra.Ext.Haskell.Testing: haskellModuleTemplate :: String
+ Hydra.Ext.Haskell.Testing: haskellTestCaseTemplate :: String
+ Hydra.Ext.Haskell.Testing: haskellTestCodec :: Namespaces ModuleName -> TestCodec
+ Hydra.Ext.Haskell.Testing: haskellTestGroupTemplate :: String
+ Hydra.Ext.Haskell.Testing: indentContinuationLines :: Int -> String -> String
+ Hydra.Ext.Haskell.Testing: namespaceToModuleName :: Namespace -> String
+ Hydra.Ext.Haskell.Testing: termToHaskell :: Namespaces ModuleName -> Term -> Graph -> Either String String
+ Hydra.Ext.Haskell.Testing: tryInferTypeOf :: Graph -> Term -> Maybe (Term, TypeScheme)
+ Hydra.Ext.Haskell.Testing: typeToHaskell :: Namespaces ModuleName -> Type -> t0 -> Either String String
+ Hydra.Ext.Haskell.TestingIo: generateHaskellAggregatorSpec :: FilePath -> [Module] -> (FilePath, String)
+ Hydra.Ext.Haskell.TestingIo: generateHaskellGenerationTests :: FilePath -> [Module] -> (Namespace -> Maybe TestGroup) -> IO Bool
+ Hydra.Ext.Haskell.TestingIo: haskellTestGenerator :: TestGenerator ModuleName
+ Hydra.Formatting: convertCaseCamelOrUnderscoreToLowerSnake :: String -> String
+ Hydra.Generation: TestGenerator :: (Module -> Graph -> Either String (Namespaces a)) -> (Namespaces a -> TestCodec) -> (Module -> TestGroup -> Graph -> Either String (String, String)) -> Maybe (String -> [Module] -> (String, String)) -> TestGenerator a
+ Hydra.Generation: [testGeneratorAggregatorFile] :: TestGenerator a -> Maybe (String -> [Module] -> (String, String))
+ Hydra.Generation: [testGeneratorCreateCodec] :: TestGenerator a -> Namespaces a -> TestCodec
+ Hydra.Generation: [testGeneratorGenerateTestFile] :: TestGenerator a -> Module -> TestGroup -> Graph -> Either String (String, String)
+ Hydra.Generation: [testGeneratorNamespacesForModule] :: TestGenerator a -> Module -> Graph -> Either String (Namespaces a)
+ Hydra.Generation: buildNamespacesForTestGroup :: TestGenerator a -> Module -> TestGroup -> Graph -> Either String (Namespaces a)
+ Hydra.Generation: buildTestGroupMap :: [Namespace] -> TestGroup -> Map Namespace TestGroup
+ Hydra.Generation: createTestGroupLookup :: [Namespace] -> TestGroup -> Namespace -> Maybe TestGroup
+ Hydra.Generation: data TestGenerator a
+ Hydra.Generation: formatError :: InContext Error -> String
+ Hydra.Generation: generateAllFiles :: TestGenerator a -> Graph -> FilePath -> [(Module, TestGroup)] -> ((FilePath, String) -> IO ()) -> IO (Either String Int)
+ Hydra.Generation: generateDslModules :: [Module] -> [Module] -> IO [Module]
+ Hydra.Generation: generateGenerationTestSuite :: TestGenerator a -> FilePath -> [Module] -> (Namespace -> Maybe TestGroup) -> IO Bool
+ Hydra.Generation: readManifestFieldWithFallback :: FilePath -> String -> String -> IO [Namespace]
+ Hydra.Generation: showError :: Error -> String
+ Hydra.Generation: writeDslHaskell :: FilePath -> [Module] -> [Module] -> IO ()
+ Hydra.Generation: writeDslJson :: FilePath -> [Module] -> [Module] -> IO ()
+ Hydra.Generation: writeDslSourceHaskell :: FilePath -> IO ()
+ Hydra.Graph: [graphBoundTerms] :: Graph -> Map Name Term
+ Hydra.Graph: [graphBoundTypes] :: Graph -> Map Name TypeScheme
+ Hydra.Graph: [graphClassConstraints] :: Graph -> Map Name TypeVariableMetadata
+ Hydra.Graph: [graphLambdaVariables] :: Graph -> Set Name
+ Hydra.Graph: [graphMetadata] :: Graph -> Map Name Term
+ Hydra.Graph: [graphSchemaTypes] :: Graph -> Map Name TypeScheme
+ Hydra.Graph: [graphTypeVariables] :: Graph -> Set Name
+ Hydra.Graph: [termCoderDecode] :: TermCoder a -> Context -> a -> Either (InContext Error) Term
+ Hydra.Graph: [termCoderEncode] :: TermCoder a -> Context -> Graph -> Term -> Either (InContext Error) a
+ Hydra.Graph: _Graph_boundTerms :: Name
+ Hydra.Graph: _Graph_boundTypes :: Name
+ Hydra.Graph: _Graph_classConstraints :: Name
+ Hydra.Graph: _Graph_lambdaVariables :: Name
+ Hydra.Graph: _Graph_metadata :: Name
+ Hydra.Graph: _Graph_schemaTypes :: Name
+ Hydra.Graph: _Graph_typeVariables :: Name
+ Hydra.Graph: _TermCoder_decode :: Name
+ Hydra.Graph: _TermCoder_encode :: Name
+ Hydra.Json.Yaml.Decode: fromYaml :: Map Name Type -> Name -> Type -> Node -> Either String Term
+ Hydra.Json.Yaml.Decode: yamlToJson :: Node -> Either String Value
+ Hydra.Json.Yaml.Encode: jsonToYaml :: Value -> Node
+ Hydra.Json.Yaml.Encode: toYaml :: Term -> Either String Node
+ Hydra.Lexical: buildGraph :: [Binding] -> Map Name (Maybe Term) -> Map Name Primitive -> Graph
+ Hydra.Lexical: emptyContext :: Context
+ Hydra.Lexical: graphToBindings :: Graph -> [Binding]
+ Hydra.Lexical: lookupTerm :: Graph -> Name -> Maybe Term
+ Hydra.Lib.Eithers: foldl :: (a -> b -> Either c a) -> a -> [b] -> Either c a
+ Hydra.Lib.Eithers: mapSet :: Ord b => (a -> Either c b) -> Set a -> Either c (Set b)
+ Hydra.Lib.Lists: foldr :: (a -> b -> b) -> b -> [a] -> b
+ Hydra.Lib.Math: roundBigfloat :: Int -> Double -> Double
+ Hydra.Lib.Math: roundFloat32 :: Int -> Float -> Float
+ Hydra.Lib.Math: roundFloat64 :: Int -> Double -> Double
+ Hydra.Lib.Maybes: toList :: Maybe a -> [a]
+ Hydra.Lib.Names: chars :: Namespace
+ Hydra.Lib.Names: charsIsAlphaNum :: Name
+ Hydra.Lib.Names: charsIsLower :: Name
+ Hydra.Lib.Names: charsIsSpace :: Name
+ Hydra.Lib.Names: charsIsUpper :: Name
+ Hydra.Lib.Names: charsToLower :: Name
+ Hydra.Lib.Names: charsToUpper :: Name
+ Hydra.Lib.Names: eithers :: Namespace
+ Hydra.Lib.Names: eithersBimap :: Name
+ Hydra.Lib.Names: eithersBind :: Name
+ Hydra.Lib.Names: eithersEither :: Name
+ Hydra.Lib.Names: eithersFoldl :: Name
+ Hydra.Lib.Names: eithersFromLeft :: Name
+ Hydra.Lib.Names: eithersFromRight :: Name
+ Hydra.Lib.Names: eithersIsLeft :: Name
+ Hydra.Lib.Names: eithersIsRight :: Name
+ Hydra.Lib.Names: eithersLefts :: Name
+ Hydra.Lib.Names: eithersMap :: Name
+ Hydra.Lib.Names: eithersMapList :: Name
+ Hydra.Lib.Names: eithersMapMaybe :: Name
+ Hydra.Lib.Names: eithersMapSet :: Name
+ Hydra.Lib.Names: eithersPartitionEithers :: Name
+ Hydra.Lib.Names: eithersRights :: Name
+ Hydra.Lib.Names: equality :: Namespace
+ Hydra.Lib.Names: equalityCompare :: Name
+ Hydra.Lib.Names: equalityEqual :: Name
+ Hydra.Lib.Names: equalityGt :: Name
+ Hydra.Lib.Names: equalityGte :: Name
+ Hydra.Lib.Names: equalityIdentity :: Name
+ Hydra.Lib.Names: equalityLt :: Name
+ Hydra.Lib.Names: equalityLte :: Name
+ Hydra.Lib.Names: equalityMax :: Name
+ Hydra.Lib.Names: equalityMin :: Name
+ Hydra.Lib.Names: lists :: Namespace
+ Hydra.Lib.Names: listsApply :: Name
+ Hydra.Lib.Names: listsAt :: Name
+ Hydra.Lib.Names: listsBind :: Name
+ Hydra.Lib.Names: listsConcat :: Name
+ Hydra.Lib.Names: listsConcat2 :: Name
+ Hydra.Lib.Names: listsCons :: Name
+ Hydra.Lib.Names: listsDrop :: Name
+ Hydra.Lib.Names: listsDropWhile :: Name
+ Hydra.Lib.Names: listsElem :: Name
+ Hydra.Lib.Names: listsFilter :: Name
+ Hydra.Lib.Names: listsFind :: Name
+ Hydra.Lib.Names: listsFoldl :: Name
+ Hydra.Lib.Names: listsFoldr :: Name
+ Hydra.Lib.Names: listsGroup :: Name
+ Hydra.Lib.Names: listsHead :: Name
+ Hydra.Lib.Names: listsInit :: Name
+ Hydra.Lib.Names: listsIntercalate :: Name
+ Hydra.Lib.Names: listsIntersperse :: Name
+ Hydra.Lib.Names: listsLast :: Name
+ Hydra.Lib.Names: listsLength :: Name
+ Hydra.Lib.Names: listsMap :: Name
+ Hydra.Lib.Names: listsNub :: Name
+ Hydra.Lib.Names: listsNull :: Name
+ Hydra.Lib.Names: listsPartition :: Name
+ Hydra.Lib.Names: listsPure :: Name
+ Hydra.Lib.Names: listsReplicate :: Name
+ Hydra.Lib.Names: listsReverse :: Name
+ Hydra.Lib.Names: listsSafeHead :: Name
+ Hydra.Lib.Names: listsSingleton :: Name
+ Hydra.Lib.Names: listsSort :: Name
+ Hydra.Lib.Names: listsSortOn :: Name
+ Hydra.Lib.Names: listsSpan :: Name
+ Hydra.Lib.Names: listsTail :: Name
+ Hydra.Lib.Names: listsTake :: Name
+ Hydra.Lib.Names: listsTranspose :: Name
+ Hydra.Lib.Names: listsZip :: Name
+ Hydra.Lib.Names: listsZipWith :: Name
+ Hydra.Lib.Names: literals :: Namespace
+ Hydra.Lib.Names: literalsBigfloatToBigint :: Name
+ Hydra.Lib.Names: literalsBigfloatToFloat32 :: Name
+ Hydra.Lib.Names: literalsBigfloatToFloat64 :: Name
+ Hydra.Lib.Names: literalsBigintToBigfloat :: Name
+ Hydra.Lib.Names: literalsBigintToInt16 :: Name
+ Hydra.Lib.Names: literalsBigintToInt32 :: Name
+ Hydra.Lib.Names: literalsBigintToInt64 :: Name
+ Hydra.Lib.Names: literalsBigintToInt8 :: Name
+ Hydra.Lib.Names: literalsBigintToUint16 :: Name
+ Hydra.Lib.Names: literalsBigintToUint32 :: Name
+ Hydra.Lib.Names: literalsBigintToUint64 :: Name
+ Hydra.Lib.Names: literalsBigintToUint8 :: Name
+ Hydra.Lib.Names: literalsBinaryToBytes :: Name
+ Hydra.Lib.Names: literalsBinaryToString :: Name
+ Hydra.Lib.Names: literalsFloat32ToBigfloat :: Name
+ Hydra.Lib.Names: literalsFloat64ToBigfloat :: Name
+ Hydra.Lib.Names: literalsInt16ToBigint :: Name
+ Hydra.Lib.Names: literalsInt32ToBigint :: Name
+ Hydra.Lib.Names: literalsInt64ToBigint :: Name
+ Hydra.Lib.Names: literalsInt8ToBigint :: Name
+ Hydra.Lib.Names: literalsReadBigfloat :: Name
+ Hydra.Lib.Names: literalsReadBigint :: Name
+ Hydra.Lib.Names: literalsReadBoolean :: Name
+ Hydra.Lib.Names: literalsReadFloat32 :: Name
+ Hydra.Lib.Names: literalsReadFloat64 :: Name
+ Hydra.Lib.Names: literalsReadInt16 :: Name
+ Hydra.Lib.Names: literalsReadInt32 :: Name
+ Hydra.Lib.Names: literalsReadInt64 :: Name
+ Hydra.Lib.Names: literalsReadInt8 :: Name
+ Hydra.Lib.Names: literalsReadString :: Name
+ Hydra.Lib.Names: literalsReadUint16 :: Name
+ Hydra.Lib.Names: literalsReadUint32 :: Name
+ Hydra.Lib.Names: literalsReadUint64 :: Name
+ Hydra.Lib.Names: literalsReadUint8 :: Name
+ Hydra.Lib.Names: literalsShowBigfloat :: Name
+ Hydra.Lib.Names: literalsShowBigint :: Name
+ Hydra.Lib.Names: literalsShowBoolean :: Name
+ Hydra.Lib.Names: literalsShowFloat32 :: Name
+ Hydra.Lib.Names: literalsShowFloat64 :: Name
+ Hydra.Lib.Names: literalsShowInt16 :: Name
+ Hydra.Lib.Names: literalsShowInt32 :: Name
+ Hydra.Lib.Names: literalsShowInt64 :: Name
+ Hydra.Lib.Names: literalsShowInt8 :: Name
+ Hydra.Lib.Names: literalsShowString :: Name
+ Hydra.Lib.Names: literalsShowUint16 :: Name
+ Hydra.Lib.Names: literalsShowUint32 :: Name
+ Hydra.Lib.Names: literalsShowUint64 :: Name
+ Hydra.Lib.Names: literalsShowUint8 :: Name
+ Hydra.Lib.Names: literalsStringToBinary :: Name
+ Hydra.Lib.Names: literalsUint16ToBigint :: Name
+ Hydra.Lib.Names: literalsUint32ToBigint :: Name
+ Hydra.Lib.Names: literalsUint64ToBigint :: Name
+ Hydra.Lib.Names: literalsUint8ToBigint :: Name
+ Hydra.Lib.Names: logic :: Namespace
+ Hydra.Lib.Names: logicAnd :: Name
+ Hydra.Lib.Names: logicIfElse :: Name
+ Hydra.Lib.Names: logicNot :: Name
+ Hydra.Lib.Names: logicOr :: Name
+ Hydra.Lib.Names: maps :: Namespace
+ Hydra.Lib.Names: mapsAlter :: Name
+ Hydra.Lib.Names: mapsBimap :: Name
+ Hydra.Lib.Names: mapsDelete :: Name
+ Hydra.Lib.Names: mapsElems :: Name
+ Hydra.Lib.Names: mapsEmpty :: Name
+ Hydra.Lib.Names: mapsFilter :: Name
+ Hydra.Lib.Names: mapsFilterWithKey :: Name
+ Hydra.Lib.Names: mapsFindWithDefault :: Name
+ Hydra.Lib.Names: mapsFromList :: Name
+ Hydra.Lib.Names: mapsInsert :: Name
+ Hydra.Lib.Names: mapsKeys :: Name
+ Hydra.Lib.Names: mapsLookup :: Name
+ Hydra.Lib.Names: mapsMap :: Name
+ Hydra.Lib.Names: mapsMapKeys :: Name
+ Hydra.Lib.Names: mapsMember :: Name
+ Hydra.Lib.Names: mapsNull :: Name
+ Hydra.Lib.Names: mapsSingleton :: Name
+ Hydra.Lib.Names: mapsSize :: Name
+ Hydra.Lib.Names: mapsToList :: Name
+ Hydra.Lib.Names: mapsUnion :: Name
+ Hydra.Lib.Names: math :: Namespace
+ Hydra.Lib.Names: mathAbs :: Name
+ Hydra.Lib.Names: mathAcos :: Name
+ Hydra.Lib.Names: mathAcosh :: Name
+ Hydra.Lib.Names: mathAdd :: Name
+ Hydra.Lib.Names: mathAsin :: Name
+ Hydra.Lib.Names: mathAsinh :: Name
+ Hydra.Lib.Names: mathAtan :: Name
+ Hydra.Lib.Names: mathAtan2 :: Name
+ Hydra.Lib.Names: mathAtanh :: Name
+ Hydra.Lib.Names: mathCeiling :: Name
+ Hydra.Lib.Names: mathCos :: Name
+ Hydra.Lib.Names: mathCosh :: Name
+ Hydra.Lib.Names: mathDiv :: Name
+ Hydra.Lib.Names: mathE :: Name
+ Hydra.Lib.Names: mathEven :: Name
+ Hydra.Lib.Names: mathExp :: Name
+ Hydra.Lib.Names: mathFloor :: Name
+ Hydra.Lib.Names: mathLog :: Name
+ Hydra.Lib.Names: mathLogBase :: Name
+ Hydra.Lib.Names: mathMax :: Name
+ Hydra.Lib.Names: mathMin :: Name
+ Hydra.Lib.Names: mathMod :: Name
+ Hydra.Lib.Names: mathMul :: Name
+ Hydra.Lib.Names: mathNegate :: Name
+ Hydra.Lib.Names: mathOdd :: Name
+ Hydra.Lib.Names: mathPi :: Name
+ Hydra.Lib.Names: mathPow :: Name
+ Hydra.Lib.Names: mathPred :: Name
+ Hydra.Lib.Names: mathRange :: Name
+ Hydra.Lib.Names: mathRem :: Name
+ Hydra.Lib.Names: mathRound :: Name
+ Hydra.Lib.Names: mathRoundBigfloat :: Name
+ Hydra.Lib.Names: mathRoundFloat32 :: Name
+ Hydra.Lib.Names: mathRoundFloat64 :: Name
+ Hydra.Lib.Names: mathSignum :: Name
+ Hydra.Lib.Names: mathSin :: Name
+ Hydra.Lib.Names: mathSinh :: Name
+ Hydra.Lib.Names: mathSqrt :: Name
+ Hydra.Lib.Names: mathSub :: Name
+ Hydra.Lib.Names: mathSucc :: Name
+ Hydra.Lib.Names: mathTan :: Name
+ Hydra.Lib.Names: mathTanh :: Name
+ Hydra.Lib.Names: mathTruncate :: Name
+ Hydra.Lib.Names: maybes :: Namespace
+ Hydra.Lib.Names: maybesApply :: Name
+ Hydra.Lib.Names: maybesBind :: Name
+ Hydra.Lib.Names: maybesCases :: Name
+ Hydra.Lib.Names: maybesCat :: Name
+ Hydra.Lib.Names: maybesCompose :: Name
+ Hydra.Lib.Names: maybesFromJust :: Name
+ Hydra.Lib.Names: maybesFromMaybe :: Name
+ Hydra.Lib.Names: maybesIsJust :: Name
+ Hydra.Lib.Names: maybesIsNothing :: Name
+ Hydra.Lib.Names: maybesMap :: Name
+ Hydra.Lib.Names: maybesMapMaybe :: Name
+ Hydra.Lib.Names: maybesMaybe :: Name
+ Hydra.Lib.Names: maybesPure :: Name
+ Hydra.Lib.Names: maybesToList :: Name
+ Hydra.Lib.Names: pairs :: Namespace
+ Hydra.Lib.Names: pairsBimap :: Name
+ Hydra.Lib.Names: pairsFirst :: Name
+ Hydra.Lib.Names: pairsSecond :: Name
+ Hydra.Lib.Names: regex :: Namespace
+ Hydra.Lib.Names: regexFind :: Name
+ Hydra.Lib.Names: regexFindAll :: Name
+ Hydra.Lib.Names: regexMatches :: Name
+ Hydra.Lib.Names: regexReplace :: Name
+ Hydra.Lib.Names: regexReplaceAll :: Name
+ Hydra.Lib.Names: regexSplit :: Name
+ Hydra.Lib.Names: sets :: Namespace
+ Hydra.Lib.Names: setsDelete :: Name
+ Hydra.Lib.Names: setsDifference :: Name
+ Hydra.Lib.Names: setsEmpty :: Name
+ Hydra.Lib.Names: setsFromList :: Name
+ Hydra.Lib.Names: setsInsert :: Name
+ Hydra.Lib.Names: setsIntersection :: Name
+ Hydra.Lib.Names: setsMap :: Name
+ Hydra.Lib.Names: setsMember :: Name
+ Hydra.Lib.Names: setsNull :: Name
+ Hydra.Lib.Names: setsSingleton :: Name
+ Hydra.Lib.Names: setsSize :: Name
+ Hydra.Lib.Names: setsToList :: Name
+ Hydra.Lib.Names: setsUnion :: Name
+ Hydra.Lib.Names: setsUnions :: Name
+ Hydra.Lib.Names: strings :: Namespace
+ Hydra.Lib.Names: stringsCat :: Name
+ Hydra.Lib.Names: stringsCat2 :: Name
+ Hydra.Lib.Names: stringsCharAt :: Name
+ Hydra.Lib.Names: stringsFromList :: Name
+ Hydra.Lib.Names: stringsIntercalate :: Name
+ Hydra.Lib.Names: stringsLength :: Name
+ Hydra.Lib.Names: stringsLines :: Name
+ Hydra.Lib.Names: stringsNull :: Name
+ Hydra.Lib.Names: stringsSplitOn :: Name
+ Hydra.Lib.Names: stringsToList :: Name
+ Hydra.Lib.Names: stringsToLower :: Name
+ Hydra.Lib.Names: stringsToUpper :: Name
+ Hydra.Lib.Names: stringsUnlines :: Name
+ Hydra.Lib.Names: typeclass :: Namespace
+ Hydra.Lib.Names: typeclassEq :: Name
+ Hydra.Lib.Names: typeclassOrd :: Name
+ Hydra.Lib.Regex: find :: String -> String -> Maybe String
+ Hydra.Lib.Regex: findAll :: String -> String -> [String]
+ Hydra.Lib.Regex: matches :: String -> String -> Bool
+ Hydra.Lib.Regex: replace :: String -> String -> String -> String
+ Hydra.Lib.Regex: replaceAll :: String -> String -> String -> String
+ Hydra.Lib.Regex: split :: String -> String -> [String]
+ Hydra.Module: [moduleDefinitions] :: Module -> [Definition]
+ Hydra.Module: _Module_definitions :: Name
+ Hydra.Module.Compat: bindingToDefinition :: Binding -> Definition
+ Hydra.Module.Compat: definitionToBinding :: Definition -> Binding
+ Hydra.Module.Compat: moduleBindings :: Module -> [Binding]
+ Hydra.Packaging: Package :: PackageName -> [Module] -> [PackageName] -> Maybe String -> Package
+ Hydra.Packaging: PackageName :: String -> PackageName
+ Hydra.Packaging: [packageDependencies] :: Package -> [PackageName]
+ Hydra.Packaging: [packageDescription] :: Package -> Maybe String
+ Hydra.Packaging: [packageModules] :: Package -> [Module]
+ Hydra.Packaging: [packageName] :: Package -> PackageName
+ Hydra.Packaging: [unPackageName] :: PackageName -> String
+ Hydra.Packaging: _Package :: Name
+ Hydra.Packaging: _PackageName :: Name
+ Hydra.Packaging: _Package_dependencies :: Name
+ Hydra.Packaging: _Package_description :: Name
+ Hydra.Packaging: _Package_modules :: Name
+ Hydra.Packaging: _Package_name :: Name
+ Hydra.Packaging: data Package
+ Hydra.Packaging: instance GHC.Classes.Eq Hydra.Packaging.Package
+ Hydra.Packaging: instance GHC.Classes.Eq Hydra.Packaging.PackageName
+ Hydra.Packaging: instance GHC.Classes.Ord Hydra.Packaging.Package
+ Hydra.Packaging: instance GHC.Classes.Ord Hydra.Packaging.PackageName
+ Hydra.Packaging: instance GHC.Read.Read Hydra.Packaging.Package
+ Hydra.Packaging: instance GHC.Read.Read Hydra.Packaging.PackageName
+ Hydra.Packaging: instance GHC.Show.Show Hydra.Packaging.Package
+ Hydra.Packaging: instance GHC.Show.Show Hydra.Packaging.PackageName
+ Hydra.Packaging: newtype PackageName
+ Hydra.Paths: SubtermEdge :: SubtermNode -> SubtermPath -> SubtermNode -> SubtermEdge
+ Hydra.Paths: SubtermGraph :: [SubtermNode] -> [SubtermEdge] -> SubtermGraph
+ Hydra.Paths: SubtermNode :: Name -> String -> String -> SubtermNode
+ Hydra.Paths: SubtermPath :: [SubtermStep] -> SubtermPath
+ Hydra.Paths: SubtermStepAnnotatedBody :: SubtermStep
+ Hydra.Paths: SubtermStepApplicationArgument :: SubtermStep
+ Hydra.Paths: SubtermStepApplicationFunction :: SubtermStep
+ Hydra.Paths: SubtermStepInjectionTerm :: SubtermStep
+ Hydra.Paths: SubtermStepLambdaBody :: SubtermStep
+ Hydra.Paths: SubtermStepLetBinding :: Name -> SubtermStep
+ Hydra.Paths: SubtermStepLetBody :: SubtermStep
+ Hydra.Paths: SubtermStepListElement :: Int -> SubtermStep
+ Hydra.Paths: SubtermStepMapKey :: Int -> SubtermStep
+ Hydra.Paths: SubtermStepMapValue :: Int -> SubtermStep
+ Hydra.Paths: SubtermStepMaybeTerm :: SubtermStep
+ Hydra.Paths: SubtermStepProductTerm :: Int -> SubtermStep
+ Hydra.Paths: SubtermStepRecordField :: Name -> SubtermStep
+ Hydra.Paths: SubtermStepSetElement :: Int -> SubtermStep
+ Hydra.Paths: SubtermStepSumTerm :: SubtermStep
+ Hydra.Paths: SubtermStepTypeApplicationTerm :: SubtermStep
+ Hydra.Paths: SubtermStepTypeLambdaBody :: SubtermStep
+ Hydra.Paths: SubtermStepUnionCasesBranch :: Name -> SubtermStep
+ Hydra.Paths: SubtermStepUnionCasesDefault :: SubtermStep
+ Hydra.Paths: SubtermStepWrappedTerm :: SubtermStep
+ Hydra.Paths: SubtypeEdge :: SubtypeNode -> SubtypePath -> SubtypeNode -> SubtypeEdge
+ Hydra.Paths: SubtypeGraph :: [SubtypeNode] -> [SubtypeEdge] -> SubtypeGraph
+ Hydra.Paths: SubtypeNode :: Name -> String -> String -> SubtypeNode
+ Hydra.Paths: SubtypePath :: [SubtypeStep] -> SubtypePath
+ Hydra.Paths: SubtypeStepAnnotatedBody :: SubtypeStep
+ Hydra.Paths: SubtypeStepApplicationArgument :: SubtypeStep
+ Hydra.Paths: SubtypeStepApplicationFunction :: SubtypeStep
+ Hydra.Paths: SubtypeStepEitherLeft :: SubtypeStep
+ Hydra.Paths: SubtypeStepEitherRight :: SubtypeStep
+ Hydra.Paths: SubtypeStepForallBody :: SubtypeStep
+ Hydra.Paths: SubtypeStepFunctionCodomain :: SubtypeStep
+ Hydra.Paths: SubtypeStepFunctionDomain :: SubtypeStep
+ Hydra.Paths: SubtypeStepListElement :: SubtypeStep
+ Hydra.Paths: SubtypeStepMapKeys :: SubtypeStep
+ Hydra.Paths: SubtypeStepMapValues :: SubtypeStep
+ Hydra.Paths: SubtypeStepMaybeElement :: SubtypeStep
+ Hydra.Paths: SubtypeStepPairFirst :: SubtypeStep
+ Hydra.Paths: SubtypeStepPairSecond :: SubtypeStep
+ Hydra.Paths: SubtypeStepRecordField :: Name -> SubtypeStep
+ Hydra.Paths: SubtypeStepSetElement :: SubtypeStep
+ Hydra.Paths: SubtypeStepUnionField :: Name -> SubtypeStep
+ Hydra.Paths: SubtypeStepWrappedType :: SubtypeStep
+ Hydra.Paths: [subtermEdgePath] :: SubtermEdge -> SubtermPath
+ Hydra.Paths: [subtermEdgeSource] :: SubtermEdge -> SubtermNode
+ Hydra.Paths: [subtermEdgeTarget] :: SubtermEdge -> SubtermNode
+ Hydra.Paths: [subtermGraphEdges] :: SubtermGraph -> [SubtermEdge]
+ Hydra.Paths: [subtermGraphNodes] :: SubtermGraph -> [SubtermNode]
+ Hydra.Paths: [subtermNodeId] :: SubtermNode -> String
+ Hydra.Paths: [subtermNodeLabel] :: SubtermNode -> String
+ Hydra.Paths: [subtermNodeName] :: SubtermNode -> Name
+ Hydra.Paths: [subtypeEdgePath] :: SubtypeEdge -> SubtypePath
+ Hydra.Paths: [subtypeEdgeSource] :: SubtypeEdge -> SubtypeNode
+ Hydra.Paths: [subtypeEdgeTarget] :: SubtypeEdge -> SubtypeNode
+ Hydra.Paths: [subtypeGraphEdges] :: SubtypeGraph -> [SubtypeEdge]
+ Hydra.Paths: [subtypeGraphNodes] :: SubtypeGraph -> [SubtypeNode]
+ Hydra.Paths: [subtypeNodeId] :: SubtypeNode -> String
+ Hydra.Paths: [subtypeNodeLabel] :: SubtypeNode -> String
+ Hydra.Paths: [subtypeNodeName] :: SubtypeNode -> Name
+ Hydra.Paths: [unSubtermPath] :: SubtermPath -> [SubtermStep]
+ Hydra.Paths: [unSubtypePath] :: SubtypePath -> [SubtypeStep]
+ Hydra.Paths: _SubtermEdge :: Name
+ Hydra.Paths: _SubtermEdge_path :: Name
+ Hydra.Paths: _SubtermEdge_source :: Name
+ Hydra.Paths: _SubtermEdge_target :: Name
+ Hydra.Paths: _SubtermGraph :: Name
+ Hydra.Paths: _SubtermGraph_edges :: Name
+ Hydra.Paths: _SubtermGraph_nodes :: Name
+ Hydra.Paths: _SubtermNode :: Name
+ Hydra.Paths: _SubtermNode_id :: Name
+ Hydra.Paths: _SubtermNode_label :: Name
+ Hydra.Paths: _SubtermNode_name :: Name
+ Hydra.Paths: _SubtermPath :: Name
+ Hydra.Paths: _SubtermStep :: Name
+ Hydra.Paths: _SubtermStep_annotatedBody :: Name
+ Hydra.Paths: _SubtermStep_applicationArgument :: Name
+ Hydra.Paths: _SubtermStep_applicationFunction :: Name
+ Hydra.Paths: _SubtermStep_injectionTerm :: Name
+ Hydra.Paths: _SubtermStep_lambdaBody :: Name
+ Hydra.Paths: _SubtermStep_letBinding :: Name
+ Hydra.Paths: _SubtermStep_letBody :: Name
+ Hydra.Paths: _SubtermStep_listElement :: Name
+ Hydra.Paths: _SubtermStep_mapKey :: Name
+ Hydra.Paths: _SubtermStep_mapValue :: Name
+ Hydra.Paths: _SubtermStep_maybeTerm :: Name
+ Hydra.Paths: _SubtermStep_productTerm :: Name
+ Hydra.Paths: _SubtermStep_recordField :: Name
+ Hydra.Paths: _SubtermStep_setElement :: Name
+ Hydra.Paths: _SubtermStep_sumTerm :: Name
+ Hydra.Paths: _SubtermStep_typeApplicationTerm :: Name
+ Hydra.Paths: _SubtermStep_typeLambdaBody :: Name
+ Hydra.Paths: _SubtermStep_unionCasesBranch :: Name
+ Hydra.Paths: _SubtermStep_unionCasesDefault :: Name
+ Hydra.Paths: _SubtermStep_wrappedTerm :: Name
+ Hydra.Paths: _SubtypeEdge :: Name
+ Hydra.Paths: _SubtypeEdge_path :: Name
+ Hydra.Paths: _SubtypeEdge_source :: Name
+ Hydra.Paths: _SubtypeEdge_target :: Name
+ Hydra.Paths: _SubtypeGraph :: Name
+ Hydra.Paths: _SubtypeGraph_edges :: Name
+ Hydra.Paths: _SubtypeGraph_nodes :: Name
+ Hydra.Paths: _SubtypeNode :: Name
+ Hydra.Paths: _SubtypeNode_id :: Name
+ Hydra.Paths: _SubtypeNode_label :: Name
+ Hydra.Paths: _SubtypeNode_name :: Name
+ Hydra.Paths: _SubtypePath :: Name
+ Hydra.Paths: _SubtypeStep :: Name
+ Hydra.Paths: _SubtypeStep_annotatedBody :: Name
+ Hydra.Paths: _SubtypeStep_applicationArgument :: Name
+ Hydra.Paths: _SubtypeStep_applicationFunction :: Name
+ Hydra.Paths: _SubtypeStep_eitherLeft :: Name
+ Hydra.Paths: _SubtypeStep_eitherRight :: Name
+ Hydra.Paths: _SubtypeStep_forallBody :: Name
+ Hydra.Paths: _SubtypeStep_functionCodomain :: Name
+ Hydra.Paths: _SubtypeStep_functionDomain :: Name
+ Hydra.Paths: _SubtypeStep_listElement :: Name
+ Hydra.Paths: _SubtypeStep_mapKeys :: Name
+ Hydra.Paths: _SubtypeStep_mapValues :: Name
+ Hydra.Paths: _SubtypeStep_maybeElement :: Name
+ Hydra.Paths: _SubtypeStep_pairFirst :: Name
+ Hydra.Paths: _SubtypeStep_pairSecond :: Name
+ Hydra.Paths: _SubtypeStep_recordField :: Name
+ Hydra.Paths: _SubtypeStep_setElement :: Name
+ Hydra.Paths: _SubtypeStep_unionField :: Name
+ Hydra.Paths: _SubtypeStep_wrappedType :: Name
+ Hydra.Paths: data SubtermEdge
+ Hydra.Paths: data SubtermGraph
+ Hydra.Paths: data SubtermNode
+ Hydra.Paths: data SubtermStep
+ Hydra.Paths: data SubtypeEdge
+ Hydra.Paths: data SubtypeGraph
+ Hydra.Paths: data SubtypeNode
+ Hydra.Paths: data SubtypeStep
+ Hydra.Paths: instance GHC.Classes.Eq Hydra.Paths.SubtermEdge
+ Hydra.Paths: instance GHC.Classes.Eq Hydra.Paths.SubtermGraph
+ Hydra.Paths: instance GHC.Classes.Eq Hydra.Paths.SubtermNode
+ Hydra.Paths: instance GHC.Classes.Eq Hydra.Paths.SubtermPath
+ Hydra.Paths: instance GHC.Classes.Eq Hydra.Paths.SubtermStep
+ Hydra.Paths: instance GHC.Classes.Eq Hydra.Paths.SubtypeEdge
+ Hydra.Paths: instance GHC.Classes.Eq Hydra.Paths.SubtypeGraph
+ Hydra.Paths: instance GHC.Classes.Eq Hydra.Paths.SubtypeNode
+ Hydra.Paths: instance GHC.Classes.Eq Hydra.Paths.SubtypePath
+ Hydra.Paths: instance GHC.Classes.Eq Hydra.Paths.SubtypeStep
+ Hydra.Paths: instance GHC.Classes.Ord Hydra.Paths.SubtermEdge
+ Hydra.Paths: instance GHC.Classes.Ord Hydra.Paths.SubtermGraph
+ Hydra.Paths: instance GHC.Classes.Ord Hydra.Paths.SubtermNode
+ Hydra.Paths: instance GHC.Classes.Ord Hydra.Paths.SubtermPath
+ Hydra.Paths: instance GHC.Classes.Ord Hydra.Paths.SubtermStep
+ Hydra.Paths: instance GHC.Classes.Ord Hydra.Paths.SubtypeEdge
+ Hydra.Paths: instance GHC.Classes.Ord Hydra.Paths.SubtypeGraph
+ Hydra.Paths: instance GHC.Classes.Ord Hydra.Paths.SubtypeNode
+ Hydra.Paths: instance GHC.Classes.Ord Hydra.Paths.SubtypePath
+ Hydra.Paths: instance GHC.Classes.Ord Hydra.Paths.SubtypeStep
+ Hydra.Paths: instance GHC.Read.Read Hydra.Paths.SubtermEdge
+ Hydra.Paths: instance GHC.Read.Read Hydra.Paths.SubtermGraph
+ Hydra.Paths: instance GHC.Read.Read Hydra.Paths.SubtermNode
+ Hydra.Paths: instance GHC.Read.Read Hydra.Paths.SubtermPath
+ Hydra.Paths: instance GHC.Read.Read Hydra.Paths.SubtermStep
+ Hydra.Paths: instance GHC.Read.Read Hydra.Paths.SubtypeEdge
+ Hydra.Paths: instance GHC.Read.Read Hydra.Paths.SubtypeGraph
+ Hydra.Paths: instance GHC.Read.Read Hydra.Paths.SubtypeNode
+ Hydra.Paths: instance GHC.Read.Read Hydra.Paths.SubtypePath
+ Hydra.Paths: instance GHC.Read.Read Hydra.Paths.SubtypeStep
+ Hydra.Paths: instance GHC.Show.Show Hydra.Paths.SubtermEdge
+ Hydra.Paths: instance GHC.Show.Show Hydra.Paths.SubtermGraph
+ Hydra.Paths: instance GHC.Show.Show Hydra.Paths.SubtermNode
+ Hydra.Paths: instance GHC.Show.Show Hydra.Paths.SubtermPath
+ Hydra.Paths: instance GHC.Show.Show Hydra.Paths.SubtermStep
+ Hydra.Paths: instance GHC.Show.Show Hydra.Paths.SubtypeEdge
+ Hydra.Paths: instance GHC.Show.Show Hydra.Paths.SubtypeGraph
+ Hydra.Paths: instance GHC.Show.Show Hydra.Paths.SubtypeNode
+ Hydra.Paths: instance GHC.Show.Show Hydra.Paths.SubtypePath
+ Hydra.Paths: instance GHC.Show.Show Hydra.Paths.SubtypeStep
+ Hydra.Paths: newtype SubtermPath
+ Hydra.Paths: newtype SubtypePath
+ Hydra.Query: PathEquation :: Path -> Path -> PathEquation
+ Hydra.Query: PatternImplication :: Pattern -> Pattern -> PatternImplication
+ Hydra.Query: [pathEquationLeft] :: PathEquation -> Path
+ Hydra.Query: [pathEquationRight] :: PathEquation -> Path
+ Hydra.Query: [patternImplicationAntecedent] :: PatternImplication -> Pattern
+ Hydra.Query: [patternImplicationConsequent] :: PatternImplication -> Pattern
+ Hydra.Query: _PathEquation :: Name
+ Hydra.Query: _PathEquation_left :: Name
+ Hydra.Query: _PathEquation_right :: Name
+ Hydra.Query: _PatternImplication :: Name
+ Hydra.Query: _PatternImplication_antecedent :: Name
+ Hydra.Query: _PatternImplication_consequent :: Name
+ Hydra.Query: data PathEquation
+ Hydra.Query: data PatternImplication
+ Hydra.Query: instance GHC.Classes.Eq Hydra.Query.PathEquation
+ Hydra.Query: instance GHC.Classes.Eq Hydra.Query.PatternImplication
+ Hydra.Query: instance GHC.Classes.Ord Hydra.Query.PathEquation
+ Hydra.Query: instance GHC.Classes.Ord Hydra.Query.PatternImplication
+ Hydra.Query: instance GHC.Read.Read Hydra.Query.PathEquation
+ Hydra.Query: instance GHC.Read.Read Hydra.Query.PatternImplication
+ Hydra.Query: instance GHC.Show.Show Hydra.Query.PathEquation
+ Hydra.Query: instance GHC.Show.Show Hydra.Query.PatternImplication
+ Hydra.Rewriting: extendGraphForLambda :: Graph -> Lambda -> Graph
+ Hydra.Rewriting: extendGraphForLet :: (Graph -> Binding -> Maybe Term) -> Graph -> Let -> Graph
+ Hydra.Rewriting: extendGraphForTypeLambda :: Graph -> TypeLambda -> Graph
+ Hydra.Rewriting: extendGraphWithBindings :: [Binding] -> Graph -> Graph
+ Hydra.Rewriting: fTypeToTypeScheme :: Type -> TypeScheme
+ Hydra.Rewriting: foldTermWithGraphAndPath :: ((t0 -> Term -> t0) -> [SubtermStep] -> Graph -> t0 -> Term -> t0) -> Graph -> t0 -> Term -> t0
+ Hydra.Rewriting: rewriteAndFoldTermWithGraph :: ((t0 -> Term -> (t0, Term)) -> Graph -> t0 -> Term -> (t0, Term)) -> Graph -> t0 -> Term -> (t0, Term)
+ Hydra.Rewriting: rewriteAndFoldTermWithGraphAndPath :: ((t0 -> Term -> (t0, Term)) -> [SubtermStep] -> Graph -> t0 -> Term -> (t0, Term)) -> Graph -> t0 -> Term -> (t0, Term)
+ Hydra.Rewriting: rewriteTermWithGraph :: ((Term -> t0) -> Graph -> Term -> t0) -> Graph -> Term -> t0
+ Hydra.Rewriting: substituteTypeVariablesInTerm :: Map Name Name -> Term -> Term
+ Hydra.Rewriting: subtermsWithSteps :: Term -> [(SubtermStep, Term)]
+ Hydra.Rewriting: typeSchemeToFType :: TypeScheme -> Type
+ Hydra.Schemas: isNominalType :: Type -> Bool
+ Hydra.Schemas: termAsBindings :: Term -> [Binding]
+ Hydra.Serialization: structuralSep :: Op -> [Expr] -> Expr
+ Hydra.Serialization: structuralSpaceSep :: [Expr] -> Expr
+ Hydra.Show.Error.Core: constantConditionError :: ConstantConditionError -> String
+ Hydra.Show.Error.Core: duplicateBindingError :: DuplicateBindingError -> String
+ Hydra.Show.Error.Core: duplicateFieldError :: DuplicateFieldError -> String
+ Hydra.Show.Error.Core: duplicateRecordTypeFieldNamesError :: DuplicateRecordTypeFieldNamesError -> String
+ Hydra.Show.Error.Core: duplicateUnionTypeFieldNamesError :: DuplicateUnionTypeFieldNamesError -> String
+ Hydra.Show.Error.Core: emptyCaseStatementError :: EmptyCaseStatementError -> String
+ Hydra.Show.Error.Core: emptyLetBindingsError :: t0 -> String
+ Hydra.Show.Error.Core: emptyRecordTypeError :: t0 -> String
+ Hydra.Show.Error.Core: emptyTermAnnotationError :: t0 -> String
+ Hydra.Show.Error.Core: emptyTypeAnnotationError :: t0 -> String
+ Hydra.Show.Error.Core: emptyTypeNameInTermError :: t0 -> String
+ Hydra.Show.Error.Core: emptyUnionTypeError :: t0 -> String
+ Hydra.Show.Error.Core: invalidForallParameterNameError :: InvalidForallParameterNameError -> String
+ Hydra.Show.Error.Core: invalidLambdaParameterNameError :: InvalidLambdaParameterNameError -> String
+ Hydra.Show.Error.Core: invalidLetBindingNameError :: InvalidLetBindingNameError -> String
+ Hydra.Show.Error.Core: invalidTermError :: InvalidTermError -> String
+ Hydra.Show.Error.Core: invalidTypeError :: InvalidTypeError -> String
+ Hydra.Show.Error.Core: invalidTypeLambdaParameterNameError :: InvalidTypeLambdaParameterNameError -> String
+ Hydra.Show.Error.Core: invalidTypeSchemeVariableNameError :: InvalidTypeSchemeVariableNameError -> String
+ Hydra.Show.Error.Core: nestedTermAnnotationError :: t0 -> String
+ Hydra.Show.Error.Core: nestedTypeAnnotationError :: t0 -> String
+ Hydra.Show.Error.Core: nonComparableMapKeyTypeError :: NonComparableMapKeyTypeError -> String
+ Hydra.Show.Error.Core: nonComparableSetElementTypeError :: NonComparableSetElementTypeError -> String
+ Hydra.Show.Error.Core: redundantWrapUnwrapError :: RedundantWrapUnwrapError -> String
+ Hydra.Show.Error.Core: selfApplicationError :: SelfApplicationError -> String
+ Hydra.Show.Error.Core: singleVariantUnionError :: SingleVariantUnionError -> String
+ Hydra.Show.Error.Core: termVariableShadowingError :: TermVariableShadowingError -> String
+ Hydra.Show.Error.Core: typeVariableShadowingInForallError :: TypeVariableShadowingInForallError -> String
+ Hydra.Show.Error.Core: typeVariableShadowingInTypeLambdaError :: TypeVariableShadowingInTypeLambdaError -> String
+ Hydra.Show.Error.Core: undefinedFieldError :: UndefinedFieldError -> String
+ Hydra.Show.Error.Core: undefinedTermVariableError :: UndefinedTermVariableError -> String
+ Hydra.Show.Error.Core: undefinedTypeVariableError :: UndefinedTypeVariableError -> String
+ Hydra.Show.Error.Core: undefinedTypeVariableInBindingTypeError :: UndefinedTypeVariableInBindingTypeError -> String
+ Hydra.Show.Error.Core: undefinedTypeVariableInLambdaDomainError :: UndefinedTypeVariableInLambdaDomainError -> String
+ Hydra.Show.Error.Core: undefinedTypeVariableInTypeApplicationError :: UndefinedTypeVariableInTypeApplicationError -> String
+ Hydra.Show.Error.Core: unexpectedTermVariantError :: UnexpectedTermVariantError -> String
+ Hydra.Show.Error.Core: unexpectedTypeVariantError :: UnexpectedTypeVariantError -> String
+ Hydra.Show.Error.Core: unknownPrimitiveNameError :: UnknownPrimitiveNameError -> String
+ Hydra.Show.Error.Core: unnecessaryIdentityApplicationError :: t0 -> String
+ Hydra.Show.Error.Core: untypedTermVariableError :: UntypedTermVariableError -> String
+ Hydra.Show.Error.Core: voidInNonBottomPositionError :: t0 -> String
+ Hydra.Show.Errors: checkingError :: CheckingError -> String
+ Hydra.Show.Errors: decodingError :: DecodingError -> String
+ Hydra.Show.Errors: error :: Error -> String
+ Hydra.Show.Errors: incorrectUnificationError :: IncorrectUnificationError -> String
+ Hydra.Show.Errors: notAForallTypeError :: NotAForallTypeError -> String
+ Hydra.Show.Errors: notAFunctionTypeError :: NotAFunctionTypeError -> String
+ Hydra.Show.Errors: otherError :: OtherError -> String
+ Hydra.Show.Errors: typeArityMismatchError :: TypeArityMismatchError -> String
+ Hydra.Show.Errors: typeMismatchError :: TypeMismatchError -> String
+ Hydra.Show.Errors: unboundTypeVariablesError :: UnboundTypeVariablesError -> String
+ Hydra.Show.Errors: unequalTypesError :: UnequalTypesError -> String
+ Hydra.Show.Errors: unificationError :: UnificationError -> String
+ Hydra.Show.Errors: unsupportedTermVariantError :: UnsupportedTermVariantError -> String
+ Hydra.Show.Errors: untypedLambdaError :: t0 -> String
+ Hydra.Show.Errors: untypedLetBindingError :: UntypedLetBindingError -> String
+ Hydra.Show.Paths: subtermStep :: SubtermStep -> Maybe String
+ Hydra.Show.Paths: termToSubtermGraph :: Map Namespace String -> Term -> SubtermGraph
+ Hydra.Sorting: adjacencyListsToGraph :: Ord t0 => [(t0, [t0])] -> (Map Int [Int], Int -> t0)
+ Hydra.Sorting: initialState :: TarjanState
+ Hydra.Sorting: popStackUntil :: Int -> TarjanState -> ([Int], TarjanState)
+ Hydra.Sorting: strongConnect :: Map Int [Int] -> Int -> TarjanState -> TarjanState
+ Hydra.Sorting: stronglyConnectedComponents :: Map Int [Int] -> [[Int]]
+ Hydra.Sources.All: dslSourceModules :: [Module]
+ Hydra.Sources.CoderUtils: commentsFromBinding :: TBinding (Context -> Graph -> Binding -> Either (InContext Error) (Maybe String))
+ Hydra.Sources.CoderUtils: nameToFilePath :: TBinding (CaseConvention -> CaseConvention -> FileExtension -> Name -> FilePath)
+ Hydra.Sources.CoderUtils: reorderDefs :: TBinding ([Definition] -> [Definition])
+ Hydra.Sources.CoderUtils: typeOfTerm :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Type)
+ Hydra.Sources.Decode.Context: module_ :: Module
+ Hydra.Sources.Decode.Error.Checking: module_ :: Module
+ Hydra.Sources.Decode.Error.Core: module_ :: Module
+ Hydra.Sources.Decode.Error.Packaging: module_ :: Module
+ Hydra.Sources.Decode.Errors: module_ :: Module
+ Hydra.Sources.Decode.Packaging: module_ :: Module
+ Hydra.Sources.Decode.Paths: module_ :: Module
+ Hydra.Sources.Encode.Context: module_ :: Module
+ Hydra.Sources.Encode.Error.Checking: module_ :: Module
+ Hydra.Sources.Encode.Error.Core: module_ :: Module
+ Hydra.Sources.Encode.Error.Packaging: module_ :: Module
+ Hydra.Sources.Encode.Errors: module_ :: Module
+ Hydra.Sources.Encode.Packaging: module_ :: Module
+ Hydra.Sources.Encode.Paths: module_ :: Module
+ Hydra.Sources.Eval.Lib.Eithers: foldl_ :: TBinding (Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Eithers: fromLeft_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Eithers: fromRight_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Eithers: isLeft_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Eithers: isRight_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Eithers: lefts_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Eithers: mapSet_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Eithers: partitionEithers_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Eithers: rights_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Equality: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Eval.Lib.Equality: identity_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Equality: max_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Equality: min_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Equality: module_ :: Module
+ Hydra.Sources.Eval.Lib.Equality: ns :: Namespace
+ Hydra.Sources.Eval.Lib.Lists: concat2_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Lists: elem_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Lists: foldr_ :: TBinding (Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Lists: group_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Lists: intercalate_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Lists: intersperse_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Lists: nub_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Lists: pure_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Lists: replicate_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Lists: safeHead_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Lists: singleton_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Lists: sort_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Logic: and_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Logic: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Eval.Lib.Logic: module_ :: Module
+ Hydra.Sources.Eval.Lib.Logic: not_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Logic: ns :: Namespace
+ Hydra.Sources.Eval.Lib.Logic: or_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Maps: findWithDefault_ :: TBinding (Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Math: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Eval.Lib.Math: even_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Math: module_ :: Module
+ Hydra.Sources.Eval.Lib.Math: ns :: Namespace
+ Hydra.Sources.Eval.Lib.Math: odd_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Math: pred_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Math: succ_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Maybes: cat_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Maybes: fromJust_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Maybes: fromMaybe_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Maybes: isJust_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Maybes: isNothing_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Maybes: pure_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Maybes: toList_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Pairs: first_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Pairs: second_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Sets: difference_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Sets: intersection_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Sets: union_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Eval.Lib.Sets: unions_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
+ Hydra.Sources.Haskell.Coder: encodeCaseExpression :: TBinding (Int -> HaskellNamespaces -> CaseStatement -> Expression -> Context -> Graph -> Either (InContext Error) Expression)
+ Hydra.Sources.Haskell.Coder: formatError :: TTerm (InContext Error -> String)
+ Hydra.Sources.Haskell.Coder: liftStringError :: TTerm Context -> TTerm (Either String a) -> TTerm (Either (InContext Error) a)
+ Hydra.Sources.Haskell.Syntax: alternative :: Binding
+ Hydra.Sources.Haskell.Syntax: applicationDeclarationHead :: Binding
+ Hydra.Sources.Haskell.Syntax: applicationExpression :: Binding
+ Hydra.Sources.Haskell.Syntax: applicationPattern :: Binding
+ Hydra.Sources.Haskell.Syntax: applicationType :: Binding
+ Hydra.Sources.Haskell.Syntax: asPattern :: Binding
+ Hydra.Sources.Haskell.Syntax: assertion :: Binding
+ Hydra.Sources.Haskell.Syntax: caseExpression :: Binding
+ Hydra.Sources.Haskell.Syntax: caseRhs :: Binding
+ Hydra.Sources.Haskell.Syntax: classAssertion :: Binding
+ Hydra.Sources.Haskell.Syntax: constructRecordExpression :: Binding
+ Hydra.Sources.Haskell.Syntax: constructor :: Binding
+ Hydra.Sources.Haskell.Syntax: constructorWithComments :: Binding
+ Hydra.Sources.Haskell.Syntax: contextType :: Binding
+ Hydra.Sources.Haskell.Syntax: dataDeclaration :: Binding
+ Hydra.Sources.Haskell.Syntax: dataOrNewtype :: Binding
+ Hydra.Sources.Haskell.Syntax: declaration :: Binding
+ Hydra.Sources.Haskell.Syntax: declarationHead :: Binding
+ Hydra.Sources.Haskell.Syntax: declarationWithComments :: Binding
+ Hydra.Sources.Haskell.Syntax: define :: String -> Type -> Binding
+ Hydra.Sources.Haskell.Syntax: deriving_ :: Binding
+ Hydra.Sources.Haskell.Syntax: export :: Binding
+ Hydra.Sources.Haskell.Syntax: expression :: Binding
+ Hydra.Sources.Haskell.Syntax: field :: Binding
+ Hydra.Sources.Haskell.Syntax: fieldUpdate :: Binding
+ Hydra.Sources.Haskell.Syntax: fieldWithComments :: Binding
+ Hydra.Sources.Haskell.Syntax: functionType :: Binding
+ Hydra.Sources.Haskell.Syntax: ifExpression :: Binding
+ Hydra.Sources.Haskell.Syntax: importExportSpec :: Binding
+ Hydra.Sources.Haskell.Syntax: importModifier :: Binding
+ Hydra.Sources.Haskell.Syntax: import_ :: Binding
+ Hydra.Sources.Haskell.Syntax: infixApplicationExpression :: Binding
+ Hydra.Sources.Haskell.Syntax: infixType :: Binding
+ Hydra.Sources.Haskell.Syntax: lambdaExpression :: Binding
+ Hydra.Sources.Haskell.Syntax: letExpression :: Binding
+ Hydra.Sources.Haskell.Syntax: literal :: Binding
+ Hydra.Sources.Haskell.Syntax: localBinding :: Binding
+ Hydra.Sources.Haskell.Syntax: localBindings :: Binding
+ Hydra.Sources.Haskell.Syntax: module' :: Binding
+ Hydra.Sources.Haskell.Syntax: moduleHead :: Binding
+ Hydra.Sources.Haskell.Syntax: moduleName :: Binding
+ Hydra.Sources.Haskell.Syntax: module_ :: Module
+ Hydra.Sources.Haskell.Syntax: name :: Binding
+ Hydra.Sources.Haskell.Syntax: namePart :: Binding
+ Hydra.Sources.Haskell.Syntax: ns :: Namespace
+ Hydra.Sources.Haskell.Syntax: operator :: Binding
+ Hydra.Sources.Haskell.Syntax: ordinaryConstructor :: Binding
+ Hydra.Sources.Haskell.Syntax: pattern :: Binding
+ Hydra.Sources.Haskell.Syntax: patternField :: Binding
+ Hydra.Sources.Haskell.Syntax: prefixApplicationExpression :: Binding
+ Hydra.Sources.Haskell.Syntax: qualifiedName :: Binding
+ Hydra.Sources.Haskell.Syntax: recordConstructor :: Binding
+ Hydra.Sources.Haskell.Syntax: recordPattern :: Binding
+ Hydra.Sources.Haskell.Syntax: rightHandSide :: Binding
+ Hydra.Sources.Haskell.Syntax: sectionExpression :: Binding
+ Hydra.Sources.Haskell.Syntax: simpleValueBinding :: Binding
+ Hydra.Sources.Haskell.Syntax: specImport :: Binding
+ Hydra.Sources.Haskell.Syntax: statement :: Binding
+ Hydra.Sources.Haskell.Syntax: subspecImportExportSpec :: Binding
+ Hydra.Sources.Haskell.Syntax: typeDeclaration :: Binding
+ Hydra.Sources.Haskell.Syntax: typeSignature :: Binding
+ Hydra.Sources.Haskell.Syntax: typeSignatureExpression :: Binding
+ Hydra.Sources.Haskell.Syntax: type_ :: Binding
+ Hydra.Sources.Haskell.Syntax: typedBinding :: Binding
+ Hydra.Sources.Haskell.Syntax: typedPattern :: Binding
+ Hydra.Sources.Haskell.Syntax: updateRecordExpression :: Binding
+ Hydra.Sources.Haskell.Syntax: valueBinding :: Binding
+ Hydra.Sources.Haskell.Syntax: variable :: Binding
+ Hydra.Sources.Haskell.Testing: addNamespacesToNamespaces :: TBinding (Namespaces ModuleName -> Set Name -> Namespaces ModuleName)
+ Hydra.Sources.Haskell.Testing: buildNamespacesForTestGroup :: TBinding (Module -> TestGroup -> Graph -> Either String (Namespaces ModuleName))
+ Hydra.Sources.Haskell.Testing: buildTestModuleWithCodec :: TBinding (TestCodec -> Module -> TestGroup -> String -> Namespaces ModuleName -> String)
+ Hydra.Sources.Haskell.Testing: collectNames :: TBinding (Graph -> Set Name -> Term -> Set Name)
+ Hydra.Sources.Haskell.Testing: collectTestCases :: TBinding (TestGroup -> [TestCaseWithMetadata])
+ Hydra.Sources.Haskell.Testing: containsTriviallyPolymorphic :: TBinding (Term -> Bool)
+ Hydra.Sources.Haskell.Testing: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Haskell.Testing: extractEncodedTermVariableNames :: TBinding (Graph -> Term -> Set Name)
+ Hydra.Sources.Haskell.Testing: extractTestTerms :: TBinding (TestCaseWithMetadata -> [Term])
+ Hydra.Sources.Haskell.Testing: findHaskellImports :: TBinding (Namespaces ModuleName -> Set Name -> [String])
+ Hydra.Sources.Haskell.Testing: generateHaskellTestFile :: TBinding (Module -> TestGroup -> Graph -> Either String (String, String))
+ Hydra.Sources.Haskell.Testing: generateTestCaseWithCodec :: TBinding (Graph -> Namespaces ModuleName -> TestCodec -> Int -> TestCaseWithMetadata -> Either String [String])
+ Hydra.Sources.Haskell.Testing: generateTestFileWithCodec :: TBinding (TestCodec -> Module -> TestGroup -> Namespaces ModuleName -> Graph -> Either String (String, String))
+ Hydra.Sources.Haskell.Testing: generateTestGroupHierarchy :: TBinding (Graph -> Namespaces ModuleName -> TestCodec -> Int -> TestGroup -> Either String String)
+ Hydra.Sources.Haskell.Testing: generateTypeAnnotationFor :: TBinding (Graph -> Namespaces ModuleName -> Term -> Term -> Either String (Maybe String))
+ Hydra.Sources.Haskell.Testing: haskellImportTemplate :: TBinding String
+ Hydra.Sources.Haskell.Testing: haskellModuleTemplate :: TBinding String
+ Hydra.Sources.Haskell.Testing: haskellTestCaseTemplate :: TBinding String
+ Hydra.Sources.Haskell.Testing: haskellTestCodec :: TBinding (Namespaces ModuleName -> TestCodec)
+ Hydra.Sources.Haskell.Testing: haskellTestGroupTemplate :: TBinding String
+ Hydra.Sources.Haskell.Testing: indentContinuationLines :: TBinding (Int -> String -> String)
+ Hydra.Sources.Haskell.Testing: module_ :: Module
+ Hydra.Sources.Haskell.Testing: namespaceToModuleName :: TBinding (Namespace -> String)
+ Hydra.Sources.Haskell.Testing: ns :: Namespace
+ Hydra.Sources.Haskell.Testing: termToHaskell :: TBinding (Namespaces ModuleName -> Term -> Graph -> Either String String)
+ Hydra.Sources.Haskell.Testing: tryInferTypeOf :: TBinding (Graph -> Term -> Maybe (Term, TypeScheme))
+ Hydra.Sources.Haskell.Testing: typeToHaskell :: TBinding (Namespaces ModuleName -> Type -> Graph -> Either String String)
+ Hydra.Sources.Json.Yaml.Decode: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Json.Yaml.Decode: fromYaml :: TBinding (Map Name Type -> Name -> Type -> Node -> Either String Term)
+ Hydra.Sources.Json.Yaml.Decode: module_ :: Module
+ Hydra.Sources.Json.Yaml.Decode: ns :: Namespace
+ Hydra.Sources.Json.Yaml.Decode: yamlToJson :: TBinding (Node -> Either String Value)
+ Hydra.Sources.Json.Yaml.Encode: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Json.Yaml.Encode: jsonToYaml :: TBinding (Value -> Node)
+ Hydra.Sources.Json.Yaml.Encode: module_ :: Module
+ Hydra.Sources.Json.Yaml.Encode: ns :: Namespace
+ Hydra.Sources.Json.Yaml.Encode: toYaml :: TBinding (Term -> Either String Node)
+ Hydra.Sources.Kernel.Lib.Names: chars :: TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: charsIsAlphaNum :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: charsIsLower :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: charsIsSpace :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: charsIsUpper :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: charsToLower :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: charsToUpper :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Kernel.Lib.Names: defineName :: String -> String -> String -> TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: defineNs :: String -> String -> TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: eithers :: TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: eithersBimap :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: eithersBind :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: eithersEither :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: eithersFoldl :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: eithersFromLeft :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: eithersFromRight :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: eithersIsLeft :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: eithersIsRight :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: eithersLefts :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: eithersMap :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: eithersMapList :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: eithersMapMaybe :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: eithersMapSet :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: eithersPartitionEithers :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: eithersRights :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: equality :: TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: equalityCompare :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: equalityEqual :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: equalityGt :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: equalityGte :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: equalityIdentity :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: equalityLt :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: equalityLte :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: equalityMax :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: equalityMin :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: lists :: TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: listsApply :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsAt :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsBind :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsConcat :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsConcat2 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsCons :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsDrop :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsDropWhile :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsElem :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsFilter :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsFind :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsFoldl :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsFoldr :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsGroup :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsHead :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsInit :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsIntercalate :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsIntersperse :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsLast :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsLength :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsMap :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsNub :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsNull :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsPartition :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsPure :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsReplicate :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsReverse :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsSafeHead :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsSingleton :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsSort :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsSortOn :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsSpan :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsTail :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsTake :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsTranspose :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsZip :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: listsZipWith :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literals :: TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: literalsBigfloatToBigint :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsBigfloatToFloat32 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsBigfloatToFloat64 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsBigintToBigfloat :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsBigintToInt16 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsBigintToInt32 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsBigintToInt64 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsBigintToInt8 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsBigintToUint16 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsBigintToUint32 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsBigintToUint64 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsBigintToUint8 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsBinaryToBytes :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsBinaryToString :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsFloat32ToBigfloat :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsFloat64ToBigfloat :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsInt16ToBigint :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsInt32ToBigint :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsInt64ToBigint :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsInt8ToBigint :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsReadBigfloat :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsReadBigint :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsReadBoolean :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsReadFloat32 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsReadFloat64 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsReadInt16 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsReadInt32 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsReadInt64 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsReadInt8 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsReadString :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsReadUint16 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsReadUint32 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsReadUint64 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsReadUint8 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsShowBigfloat :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsShowBigint :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsShowBoolean :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsShowFloat32 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsShowFloat64 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsShowInt16 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsShowInt32 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsShowInt64 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsShowInt8 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsShowString :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsShowUint16 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsShowUint32 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsShowUint64 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsShowUint8 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsStringToBinary :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsUint16ToBigint :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsUint32ToBigint :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsUint64ToBigint :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: literalsUint8ToBigint :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: logic :: TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: logicAnd :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: logicIfElse :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: logicNot :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: logicOr :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maps :: TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: mapsAlter :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsBimap :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsDelete :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsElems :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsEmpty :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsFilter :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsFilterWithKey :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsFindWithDefault :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsFromList :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsInsert :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsKeys :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsLookup :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsMap :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsMapKeys :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsMember :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsNull :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsSingleton :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsSize :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsToList :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mapsUnion :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: math :: TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: mathAbs :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathAcos :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathAcosh :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathAdd :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathAsin :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathAsinh :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathAtan :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathAtan2 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathAtanh :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathCeiling :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathCos :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathCosh :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathDiv :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathE :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathEven :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathExp :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathFloor :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathLog :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathLogBase :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathMax :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathMin :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathMod :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathMul :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathNegate :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathOdd :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathPi :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathPow :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathPred :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathRange :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathRem :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathRound :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathRoundBigfloat :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathRoundFloat32 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathRoundFloat64 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathSignum :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathSin :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathSinh :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathSqrt :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathSub :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathSucc :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathTan :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathTanh :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: mathTruncate :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maybes :: TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: maybesApply :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maybesBind :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maybesCases :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maybesCat :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maybesCompose :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maybesFromJust :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maybesFromMaybe :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maybesIsJust :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maybesIsNothing :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maybesMap :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maybesMapMaybe :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maybesMaybe :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maybesPure :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: maybesToList :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: module_ :: Module
+ Hydra.Sources.Kernel.Lib.Names: ns :: Namespace
+ Hydra.Sources.Kernel.Lib.Names: pairs :: TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: pairsBimap :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: pairsFirst :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: pairsSecond :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: regex :: TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: regexFind :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: regexFindAll :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: regexMatches :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: regexReplace :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: regexReplaceAll :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: regexSplit :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: sets :: TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: setsDelete :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: setsDifference :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: setsEmpty :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: setsFromList :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: setsInsert :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: setsIntersection :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: setsMap :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: setsMember :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: setsNull :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: setsSingleton :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: setsSize :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: setsToList :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: setsUnion :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: setsUnions :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: strings :: TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: stringsCat :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: stringsCat2 :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: stringsCharAt :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: stringsFromList :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: stringsIntercalate :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: stringsLength :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: stringsLines :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: stringsNull :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: stringsSplitOn :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: stringsToList :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: stringsToLower :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: stringsToUpper :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: stringsUnlines :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: typeclass :: TBinding Namespace
+ Hydra.Sources.Kernel.Lib.Names: typeclassEq :: TBinding Name
+ Hydra.Sources.Kernel.Lib.Names: typeclassOrd :: TBinding Name
+ Hydra.Sources.Kernel.Terms.Adapt: adaptDataGraph :: TBinding (LanguageConstraints -> Bool -> [Binding] -> Context -> Graph -> Either String (Graph, [Binding]))
+ Hydra.Sources.Kernel.Terms.Adapt: adaptFloatType :: TBinding (LanguageConstraints -> FloatType -> Maybe FloatType)
+ Hydra.Sources.Kernel.Terms.Adapt: adaptGraphSchema :: TBinding (LanguageConstraints -> Map LiteralType LiteralType -> Map Name Type -> Either String (Map Name Type))
+ Hydra.Sources.Kernel.Terms.Adapt: adaptIntegerType :: TBinding (LanguageConstraints -> IntegerType -> Maybe IntegerType)
+ Hydra.Sources.Kernel.Terms.Adapt: adaptLambdaDomains :: TBinding (LanguageConstraints -> Map LiteralType LiteralType -> (Term -> Either String Term) -> Term -> Either String Term)
+ Hydra.Sources.Kernel.Terms.Adapt: adaptLiteral :: TBinding (LiteralType -> Literal -> Literal)
+ Hydra.Sources.Kernel.Terms.Adapt: adaptLiteralType :: TBinding (LanguageConstraints -> LiteralType -> Maybe LiteralType)
+ Hydra.Sources.Kernel.Terms.Adapt: adaptLiteralTypesMap :: TBinding (LanguageConstraints -> Map LiteralType LiteralType)
+ Hydra.Sources.Kernel.Terms.Adapt: adaptLiteralValue :: TBinding (Map LiteralType LiteralType -> LiteralType -> Literal -> Literal)
+ Hydra.Sources.Kernel.Terms.Adapt: adaptNestedTypes :: TBinding (LanguageConstraints -> Map LiteralType LiteralType -> (Term -> Either String Term) -> Term -> Either String Term)
+ Hydra.Sources.Kernel.Terms.Adapt: adaptPrimitive :: TBinding (LanguageConstraints -> Map LiteralType LiteralType -> Primitive -> Either String Primitive)
+ Hydra.Sources.Kernel.Terms.Adapt: adaptTerm :: TBinding (LanguageConstraints -> Map LiteralType LiteralType -> Context -> Graph -> Term -> Either String Term)
+ Hydra.Sources.Kernel.Terms.Adapt: adaptTermForLanguage :: TBinding (Language -> Context -> Graph -> Term -> Either String Term)
+ Hydra.Sources.Kernel.Terms.Adapt: adaptType :: TBinding (LanguageConstraints -> Map LiteralType LiteralType -> Type -> Either String Type)
+ Hydra.Sources.Kernel.Terms.Adapt: adaptTypeForLanguage :: TBinding (Language -> Type -> Either String Type)
+ Hydra.Sources.Kernel.Terms.Adapt: adaptTypeScheme :: TBinding (LanguageConstraints -> Map LiteralType LiteralType -> TypeScheme -> Either String TypeScheme)
+ Hydra.Sources.Kernel.Terms.Adapt: composeCoders :: TBinding (Coder a b -> Coder b c -> Coder a c)
+ Hydra.Sources.Kernel.Terms.Adapt: dataGraphToDefinitions :: TBinding (LanguageConstraints -> Bool -> Bool -> Bool -> Bool -> [Binding] -> Graph -> [Namespace] -> Context -> Either String (Graph, [[TermDefinition]]))
+ Hydra.Sources.Kernel.Terms.Adapt: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Kernel.Terms.Adapt: formatDecodingError :: TTerm (InContext DecodingError -> String)
+ Hydra.Sources.Kernel.Terms.Adapt: formatError :: TTerm (InContext Error -> String)
+ Hydra.Sources.Kernel.Terms.Adapt: literalTypeSupported :: TBinding (LanguageConstraints -> LiteralType -> Bool)
+ Hydra.Sources.Kernel.Terms.Adapt: module_ :: Module
+ Hydra.Sources.Kernel.Terms.Adapt: ns :: Namespace
+ Hydra.Sources.Kernel.Terms.Adapt: prepareFloatType :: TBinding (FloatType -> (FloatType, FloatValue -> FloatValue, Set String))
+ Hydra.Sources.Kernel.Terms.Adapt: prepareIntegerType :: TBinding (IntegerType -> (IntegerType, IntegerValue -> IntegerValue, Set String))
+ Hydra.Sources.Kernel.Terms.Adapt: prepareLiteralType :: TBinding (LiteralType -> (LiteralType, Literal -> Literal, Set String))
+ Hydra.Sources.Kernel.Terms.Adapt: prepareSame :: TBinding (a -> (a, b -> b, Set c))
+ Hydra.Sources.Kernel.Terms.Adapt: prepareType :: TBinding (Graph -> Type -> (Type, Term -> Term, Set String))
+ Hydra.Sources.Kernel.Terms.Adapt: pushTypeAppsInward :: TBinding (Term -> Term)
+ Hydra.Sources.Kernel.Terms.Adapt: schemaGraphToDefinitions :: TBinding (LanguageConstraints -> Graph -> [[Name]] -> Context -> Either String (Map Name Type, [[TypeDefinition]]))
+ Hydra.Sources.Kernel.Terms.Adapt: simpleLanguageAdapter :: TBinding (Language -> Context -> Graph -> Type -> Either String (Adapter Type Type Term Term))
+ Hydra.Sources.Kernel.Terms.Adapt: termAlternatives :: TBinding (Context -> Graph -> Term -> Either String [Term])
+ Hydra.Sources.Kernel.Terms.Adapt: typeAlternatives :: TBinding (Type -> [Type])
+ Hydra.Sources.Kernel.Terms.Annotations: formatError :: TTerm (InContext Error -> String)
+ Hydra.Sources.Kernel.Terms.Checking: formatError :: TTerm (InContext Error -> String)
+ Hydra.Sources.Kernel.Terms.CodeGeneration: hasTermDefinitions :: TTerm Module -> TTerm Bool
+ Hydra.Sources.Kernel.Terms.CodeGeneration: hasTypeDefinitions :: TTerm Module -> TTerm Bool
+ Hydra.Sources.Kernel.Terms.CodeGeneration: moduleAllBindings :: TTerm Module -> TTerm [Binding]
+ Hydra.Sources.Kernel.Terms.CodeGeneration: moduleTermBindings :: TTerm Module -> TTerm [Binding]
+ Hydra.Sources.Kernel.Terms.CodeGeneration: moduleTypeBindings :: TTerm Module -> TTerm [Binding]
+ Hydra.Sources.Kernel.Terms.CodeGeneration: moduleTypeNames :: TTerm Module -> TTerm [Name]
+ Hydra.Sources.Kernel.Terms.Decoding: decodeRecordTypeImpl :: TBinding (Name -> [FieldType] -> Term)
+ Hydra.Sources.Kernel.Terms.Decoding: decodeRecordTypeNamed :: TBinding (Name -> [FieldType] -> Term)
+ Hydra.Sources.Kernel.Terms.Decoding: decodeTypeNamed :: TBinding (Name -> Type -> Term)
+ Hydra.Sources.Kernel.Terms.Decoding: decodeUnionTypeNamed :: TBinding (Name -> [FieldType] -> Term)
+ Hydra.Sources.Kernel.Terms.Decoding: decodeWrappedTypeNamed :: TBinding (Name -> Type -> Term)
+ Hydra.Sources.Kernel.Terms.Decoding: decoderFullResultTypeNamed :: TBinding (Name -> Type -> Type)
+ Hydra.Sources.Kernel.Terms.Decoding: decoderTypeNamed :: TBinding (Name -> Type -> Type)
+ Hydra.Sources.Kernel.Terms.Decoding: decoderTypeSchemeNamed :: TBinding (Name -> Type -> TypeScheme)
+ Hydra.Sources.Kernel.Terms.Decoding: formatDecodingError :: TTerm (InContext DecodingError -> String)
+ Hydra.Sources.Kernel.Terms.Dsls: collectForallVars :: TBinding (Type -> [Name])
+ Hydra.Sources.Kernel.Terms.Dsls: deduplicateBindings :: TBinding ([Binding] -> [Binding])
+ Hydra.Sources.Kernel.Terms.Dsls: deepApplication :: TTerm Term -> TTerm Term -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: deepField :: TTerm Name -> TTerm Term -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: deepInjection :: TTerm Name -> TTerm Term -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: deepName :: TTerm String -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: deepProjection :: TTerm Name -> TTerm Name -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: deepRecord :: TTerm Name -> TTerm [Term] -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: deepUnwrap :: TTerm Name -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: deepWrap :: TTerm Name -> TTerm Term -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: define :: String -> TTerm x -> TBinding x
+ Hydra.Sources.Kernel.Terms.Dsls: dslBindingName :: TBinding (Name -> Name)
+ Hydra.Sources.Kernel.Terms.Dsls: dslElementName :: TBinding (Name -> String -> Name)
+ Hydra.Sources.Kernel.Terms.Dsls: dslModule :: TBinding (Context -> Graph -> Module -> Either (InContext Error) (Maybe Module))
+ Hydra.Sources.Kernel.Terms.Dsls: dslNamespace :: TBinding (Namespace -> Namespace)
+ Hydra.Sources.Kernel.Terms.Dsls: dslTypeScheme :: TBinding (Type -> [Type] -> Type -> TypeScheme)
+ Hydra.Sources.Kernel.Terms.Dsls: filterTypeBindings :: TBinding (Context -> Graph -> [Binding] -> Either (InContext Error) [Binding])
+ Hydra.Sources.Kernel.Terms.Dsls: findUniqueName :: TBinding (String -> [String] -> String)
+ Hydra.Sources.Kernel.Terms.Dsls: generateBindingsForType :: TBinding (Context -> Graph -> Binding -> Either (InContext DecodingError) [Binding])
+ Hydra.Sources.Kernel.Terms.Dsls: generateRecordAccessor :: TBinding (Type -> Name -> FieldType -> Binding)
+ Hydra.Sources.Kernel.Terms.Dsls: generateRecordConstructor :: TBinding (Type -> Name -> [FieldType] -> [Binding])
+ Hydra.Sources.Kernel.Terms.Dsls: generateRecordWithUpdater :: TBinding (Type -> Name -> [FieldType] -> FieldType -> Binding)
+ Hydra.Sources.Kernel.Terms.Dsls: generateUnionInjector :: TBinding (Type -> Name -> FieldType -> Binding)
+ Hydra.Sources.Kernel.Terms.Dsls: generateWrappedTypeAccessors :: TBinding (Type -> Name -> Type -> [Binding])
+ Hydra.Sources.Kernel.Terms.Dsls: injectEliminationRecord :: TTerm Term -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: injectEliminationWrap :: TTerm Term -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: injectFunctionElimination :: TTerm Term -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: injectTermApplication :: TTerm Term -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: injectTermFunction :: TTerm Term -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: injectTermRecord :: TTerm Term -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: injectTermUnion :: TTerm Term -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: injectTermWrap :: TTerm Term -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: isDslEligibleBinding :: TBinding (Context -> Graph -> Binding -> Either (InContext Error) (Maybe Binding))
+ Hydra.Sources.Kernel.Terms.Dsls: isUnitType_ :: TTerm (Type -> Bool)
+ Hydra.Sources.Kernel.Terms.Dsls: module_ :: Module
+ Hydra.Sources.Kernel.Terms.Dsls: nominalResultType :: TBinding (Name -> Type -> Type)
+ Hydra.Sources.Kernel.Terms.Dsls: ns :: Namespace
+ Hydra.Sources.Kernel.Terms.Dsls: unwrapTTerm :: TTerm Term -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Dsls: wrapInTTerm :: TTerm Type -> TTerm Type
+ Hydra.Sources.Kernel.Terms.Dsls: wrapTermInTTerm :: TTerm Term -> TTerm Term
+ Hydra.Sources.Kernel.Terms.Encoding: encodeRecordTypeNamed :: TBinding (Name -> [FieldType] -> Term)
+ Hydra.Sources.Kernel.Terms.Encoding: encodeTypeNamed :: TBinding (Name -> Type -> Term)
+ Hydra.Sources.Kernel.Terms.Encoding: encodeUnionTypeNamed :: TBinding (Name -> [FieldType] -> Term)
+ Hydra.Sources.Kernel.Terms.Encoding: encodeWrappedTypeNamed :: TBinding (Name -> Type -> Term)
+ Hydra.Sources.Kernel.Terms.Encoding: encoderCollectForallVariables :: TBinding (Type -> [Name])
+ Hydra.Sources.Kernel.Terms.Encoding: encoderCollectOrdVars :: TBinding (Type -> [Name])
+ Hydra.Sources.Kernel.Terms.Encoding: encoderCollectTypeVarsFromType :: TBinding (Type -> [Name])
+ Hydra.Sources.Kernel.Terms.Encoding: encoderFullResultType :: TBinding (Type -> Type)
+ Hydra.Sources.Kernel.Terms.Encoding: encoderFullResultTypeNamed :: TBinding (Name -> Type -> Type)
+ Hydra.Sources.Kernel.Terms.Encoding: encoderType :: TBinding (Type -> Type)
+ Hydra.Sources.Kernel.Terms.Encoding: encoderTypeNamed :: TBinding (Name -> Type -> Type)
+ Hydra.Sources.Kernel.Terms.Encoding: encoderTypeScheme :: TBinding (Type -> TypeScheme)
+ Hydra.Sources.Kernel.Terms.Encoding: encoderTypeSchemeNamed :: TBinding (Name -> Type -> TypeScheme)
+ Hydra.Sources.Kernel.Terms.Encoding: formatDecodingError :: TTerm (InContext DecodingError -> String)
+ Hydra.Sources.Kernel.Terms.Encoding: prependForallEncoders :: TBinding (Type -> Type -> Type)
+ Hydra.Sources.Kernel.Terms.Extract.Core: formatError :: TTerm (InContext Error -> String)
+ Hydra.Sources.Kernel.Terms.Extract.Core: unexpected :: TTerm Context -> TTerm String -> TTerm String -> TTerm (Either (InContext Error) a)
+ Hydra.Sources.Kernel.Terms.Extract.Util: formatError :: TTerm (InContext Error -> String)
+ Hydra.Sources.Kernel.Terms.Formatting: convertCaseCamelOrUnderscoreToLowerSnake :: TBinding (String -> String)
+ Hydra.Sources.Kernel.Terms.Inference: formatError :: TTerm (InContext Error -> String)
+ Hydra.Sources.Kernel.Terms.Inference: formatUnifError :: TTerm (InContext UnificationError -> String)
+ Hydra.Sources.Kernel.Terms.Lexical: buildGraph :: TBinding ([Binding] -> Map Name (Maybe Term) -> Map Name Primitive -> Graph)
+ Hydra.Sources.Kernel.Terms.Lexical: emptyContext :: TBinding Context
+ Hydra.Sources.Kernel.Terms.Lexical: formatError :: TTerm (InContext Error -> String)
+ Hydra.Sources.Kernel.Terms.Lexical: graphToBindings :: TBinding (Graph -> [Binding])
+ Hydra.Sources.Kernel.Terms.Lexical: lookupTerm :: TBinding (Graph -> Name -> Maybe Term)
+ Hydra.Sources.Kernel.Terms.Reduction: formatError :: TTerm (InContext Error -> String)
+ Hydra.Sources.Kernel.Terms.Rewriting: extendGraphForLambda :: TBinding (Graph -> Lambda -> Graph)
+ Hydra.Sources.Kernel.Terms.Rewriting: extendGraphForLet :: TBinding ((Graph -> Binding -> Maybe Term) -> Graph -> Let -> Graph)
+ Hydra.Sources.Kernel.Terms.Rewriting: extendGraphForTypeLambda :: TBinding (Graph -> TypeLambda -> Graph)
+ Hydra.Sources.Kernel.Terms.Rewriting: extendGraphWithBindings :: TBinding ([Binding] -> Graph -> Graph)
+ Hydra.Sources.Kernel.Terms.Rewriting: fTypeToTypeScheme :: TBinding (Type -> TypeScheme)
+ Hydra.Sources.Kernel.Terms.Rewriting: foldTermWithGraphAndPath :: TBinding (((a -> Term -> a) -> [SubtermStep] -> Graph -> a -> Term -> a) -> Graph -> a -> Term -> a)
+ Hydra.Sources.Kernel.Terms.Rewriting: rewriteAndFoldTermWithGraph :: TBinding (((a -> Term -> (a, Term)) -> Graph -> a -> Term -> (a, Term)) -> Graph -> a -> Term -> (a, Term))
+ Hydra.Sources.Kernel.Terms.Rewriting: rewriteAndFoldTermWithGraphAndPath :: TBinding (((a -> Term -> (a, Term)) -> [SubtermStep] -> Graph -> a -> Term -> (a, Term)) -> Graph -> a -> Term -> (a, Term))
+ Hydra.Sources.Kernel.Terms.Rewriting: rewriteTermWithGraph :: TBinding (((Term -> Term) -> Graph -> Term -> Term) -> Graph -> Term -> Term)
+ Hydra.Sources.Kernel.Terms.Rewriting: substituteTypeVariablesInTerm :: TBinding (Map Name Name -> Term -> Term)
+ Hydra.Sources.Kernel.Terms.Rewriting: subtermsWithSteps :: TBinding (Term -> [(SubtermStep, Term)])
+ Hydra.Sources.Kernel.Terms.Rewriting: typeSchemeToFType :: TBinding (TypeScheme -> Type)
+ Hydra.Sources.Kernel.Terms.Schemas: formatError :: TTerm (InContext Error -> String)
+ Hydra.Sources.Kernel.Terms.Schemas: isNominalType :: TBinding (Type -> Bool)
+ Hydra.Sources.Kernel.Terms.Schemas: termAsBindings :: TBinding (Term -> [Binding])
+ Hydra.Sources.Kernel.Terms.Serialization: structuralSep :: TBinding (Op -> [Expr] -> Expr)
+ Hydra.Sources.Kernel.Terms.Serialization: structuralSpaceSep :: TBinding ([Expr] -> Expr)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: constantConditionError :: TBinding (ConstantConditionError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: duplicateBindingError :: TBinding (DuplicateBindingError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: duplicateFieldError :: TBinding (DuplicateFieldError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: duplicateRecordTypeFieldNamesError :: TBinding (DuplicateRecordTypeFieldNamesError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: duplicateUnionTypeFieldNamesError :: TBinding (DuplicateUnionTypeFieldNamesError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: emptyCaseStatementError :: TBinding (EmptyCaseStatementError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: emptyLetBindingsError :: TBinding (EmptyLetBindingsError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: emptyRecordTypeError :: TBinding (EmptyRecordTypeError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: emptyTermAnnotationError :: TBinding (EmptyTermAnnotationError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: emptyTypeAnnotationError :: TBinding (EmptyTypeAnnotationError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: emptyTypeNameInTermError :: TBinding (EmptyTypeNameInTermError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: emptyUnionTypeError :: TBinding (EmptyUnionTypeError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: invalidForallParameterNameError :: TBinding (InvalidForallParameterNameError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: invalidLambdaParameterNameError :: TBinding (InvalidLambdaParameterNameError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: invalidLetBindingNameError :: TBinding (InvalidLetBindingNameError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: invalidTermError :: TBinding (InvalidTermError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: invalidTypeError :: TBinding (InvalidTypeError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: invalidTypeLambdaParameterNameError :: TBinding (InvalidTypeLambdaParameterNameError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: invalidTypeSchemeVariableNameError :: TBinding (InvalidTypeSchemeVariableNameError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: module_ :: Module
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: nestedTermAnnotationError :: TBinding (NestedTermAnnotationError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: nestedTypeAnnotationError :: TBinding (NestedTypeAnnotationError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: nonComparableMapKeyTypeError :: TBinding (NonComparableMapKeyTypeError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: nonComparableSetElementTypeError :: TBinding (NonComparableSetElementTypeError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: ns :: Namespace
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: redundantWrapUnwrapError :: TBinding (RedundantWrapUnwrapError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: selfApplicationError :: TBinding (SelfApplicationError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: singleVariantUnionError :: TBinding (SingleVariantUnionError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: termVariableShadowingError :: TBinding (TermVariableShadowingError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: typeVariableShadowingInForallError :: TBinding (TypeVariableShadowingInForallError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: typeVariableShadowingInTypeLambdaError :: TBinding (TypeVariableShadowingInTypeLambdaError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: undefinedFieldError :: TBinding (UndefinedFieldError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: undefinedTermVariableError :: TBinding (UndefinedTermVariableError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: undefinedTypeVariableError :: TBinding (UndefinedTypeVariableError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: undefinedTypeVariableInBindingTypeError :: TBinding (UndefinedTypeVariableInBindingTypeError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: undefinedTypeVariableInLambdaDomainError :: TBinding (UndefinedTypeVariableInLambdaDomainError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: undefinedTypeVariableInTypeApplicationError :: TBinding (UndefinedTypeVariableInTypeApplicationError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: unexpectedTermVariantError :: TBinding (UnexpectedTermVariantError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: unexpectedTypeVariantError :: TBinding (UnexpectedTypeVariantError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: unknownPrimitiveNameError :: TBinding (UnknownPrimitiveNameError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: unnecessaryIdentityApplicationError :: TBinding (UnnecessaryIdentityApplicationError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: untypedTermVariableError :: TBinding (UntypedTermVariableError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Error.Core: voidInNonBottomPositionError :: TBinding (VoidInNonBottomPositionError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: checkingError :: TBinding (CheckingError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: decodingError :: TBinding (DecodingError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Kernel.Terms.Show.Errors: error_ :: TBinding (Error -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: incorrectUnificationError :: TBinding (IncorrectUnificationError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: module_ :: Module
+ Hydra.Sources.Kernel.Terms.Show.Errors: notAForallTypeError :: TBinding (NotAForallTypeError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: notAFunctionTypeError :: TBinding (NotAFunctionTypeError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: ns :: Namespace
+ Hydra.Sources.Kernel.Terms.Show.Errors: otherError :: TBinding (OtherError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: typeArityMismatchError :: TBinding (TypeArityMismatchError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: typeMismatchError :: TBinding (TypeMismatchError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: unboundTypeVariablesError :: TBinding (UnboundTypeVariablesError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: unequalTypesError :: TBinding (UnequalTypesError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: unificationError :: TBinding (UnificationError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: unsupportedTermVariantError :: TBinding (UnsupportedTermVariantError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: untypedLambdaError :: TBinding (UntypedLambdaError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Errors: untypedLetBindingError :: TBinding (UntypedLetBindingError -> String)
+ Hydra.Sources.Kernel.Terms.Show.Paths: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Kernel.Terms.Show.Paths: module_ :: Module
+ Hydra.Sources.Kernel.Terms.Show.Paths: ns :: Namespace
+ Hydra.Sources.Kernel.Terms.Show.Paths: subtermStep :: TBinding (SubtermStep -> Maybe String)
+ Hydra.Sources.Kernel.Terms.Show.Paths: termToSubtermGraph :: TBinding (Map Namespace String -> Term -> SubtermGraph)
+ Hydra.Sources.Kernel.Terms.Sorting: adjacencyListsToGraph :: TBinding ([(key, [key])] -> (Graph, Vertex -> key))
+ Hydra.Sources.Kernel.Terms.Sorting: initialState :: TBinding TarjanState
+ Hydra.Sources.Kernel.Terms.Sorting: popStackUntil :: TBinding (Vertex -> TarjanState -> ([Vertex], TarjanState))
+ Hydra.Sources.Kernel.Terms.Sorting: strongConnect :: TBinding (Graph -> Vertex -> TarjanState -> TarjanState)
+ Hydra.Sources.Kernel.Terms.Sorting: stronglyConnectedComponents :: TBinding (Graph -> [[Vertex]])
+ Hydra.Sources.Kernel.Terms.Validate.Core: checkDuplicateBindings :: TBinding (SubtermPath -> [Binding] -> Maybe InvalidTermError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: checkDuplicateFieldTypes :: TBinding ([FieldType] -> (Name -> Maybe InvalidTypeError) -> Maybe InvalidTypeError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: checkDuplicateFields :: TBinding (SubtermPath -> [Name] -> Maybe InvalidTermError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: checkShadowing :: TBinding (SubtermPath -> Graph -> [Name] -> Maybe InvalidTermError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: checkTerm :: TBinding (Bool -> SubtermPath -> Graph -> Term -> Maybe InvalidTermError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: checkUndefinedTypeVariablesInType :: TBinding (SubtermPath -> Graph -> Type -> (Name -> Maybe InvalidTermError) -> Maybe InvalidTermError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: checkUndefinedTypeVariablesInTypeScheme :: TBinding (SubtermPath -> Graph -> TypeScheme -> (Name -> Maybe InvalidTermError) -> Maybe InvalidTermError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: checkVoid :: TBinding (Type -> Maybe InvalidTypeError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Kernel.Terms.Validate.Core: findDuplicate :: TBinding ([Name] -> Maybe Name)
+ Hydra.Sources.Kernel.Terms.Validate.Core: findDuplicateFieldType :: TBinding ([Name] -> Maybe Name)
+ Hydra.Sources.Kernel.Terms.Validate.Core: firstError :: TBinding ([Maybe InvalidTermError] -> Maybe InvalidTermError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: firstTypeError :: TBinding ([Maybe InvalidTypeError] -> Maybe InvalidTypeError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: isValidName :: TBinding (Name -> Bool)
+ Hydra.Sources.Kernel.Terms.Validate.Core: justError :: TTerm InvalidTermError -> TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: mkJust :: TTerm InvalidTermError -> TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: mkJustType :: TTerm InvalidTypeError -> TTerm (Maybe InvalidTypeError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: module_ :: Module
+ Hydra.Sources.Kernel.Terms.Validate.Core: noError :: TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: noTypeError :: TTerm (Maybe InvalidTypeError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: ns :: Namespace
+ Hydra.Sources.Kernel.Terms.Validate.Core: term :: TBinding (Bool -> Graph -> Term -> Maybe InvalidTermError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: type_ :: TBinding (Set Name -> Type -> Maybe InvalidTypeError)
+ Hydra.Sources.Kernel.Terms.Validate.Core: validateTypeNode :: TBinding (Set Name -> Type -> Maybe InvalidTypeError)
+ Hydra.Sources.Kernel.Terms.Validate.Packaging: checkConflictingModuleNamespaces :: TBinding (Package -> Maybe InvalidPackageError)
+ Hydra.Sources.Kernel.Terms.Validate.Packaging: checkConflictingVariantNames :: TBinding (Module -> Maybe InvalidModuleError)
+ Hydra.Sources.Kernel.Terms.Validate.Packaging: checkDefinitionNamespaces :: TBinding (Module -> Maybe InvalidModuleError)
+ Hydra.Sources.Kernel.Terms.Validate.Packaging: checkDuplicateDefinitionNames :: TBinding (Module -> Maybe InvalidModuleError)
+ Hydra.Sources.Kernel.Terms.Validate.Packaging: checkDuplicateModuleNamespaces :: TBinding (Package -> Maybe InvalidPackageError)
+ Hydra.Sources.Kernel.Terms.Validate.Packaging: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Kernel.Terms.Validate.Packaging: definitionName :: TBinding (Definition -> Name)
+ Hydra.Sources.Kernel.Terms.Validate.Packaging: module' :: TBinding (Module -> Maybe InvalidModuleError)
+ Hydra.Sources.Kernel.Terms.Validate.Packaging: module_ :: Module
+ Hydra.Sources.Kernel.Terms.Validate.Packaging: ns :: Namespace
+ Hydra.Sources.Kernel.Terms.Validate.Packaging: package :: TBinding (Package -> Maybe InvalidPackageError)
+ Hydra.Sources.Kernel.Types.Ast: seqExpr :: Binding
+ Hydra.Sources.Kernel.Types.Context: context :: Binding
+ Hydra.Sources.Kernel.Types.Context: define :: String -> Type -> Binding
+ Hydra.Sources.Kernel.Types.Context: inContext :: Binding
+ Hydra.Sources.Kernel.Types.Context: module_ :: Module
+ Hydra.Sources.Kernel.Types.Context: ns :: Namespace
+ Hydra.Sources.Kernel.Types.Error.Checking: checkingError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Checking: define :: String -> Type -> Binding
+ Hydra.Sources.Kernel.Types.Error.Checking: incorrectUnificationError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Checking: module_ :: Module
+ Hydra.Sources.Kernel.Types.Error.Checking: notAForallTypeError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Checking: notAFunctionTypeError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Checking: ns :: Namespace
+ Hydra.Sources.Kernel.Types.Error.Checking: typeArityMismatchError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Checking: typeMismatchError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Checking: unboundTypeVariablesError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Checking: unequalTypesError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Checking: unsupportedTermVariantError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Checking: untypedLambdaError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Checking: untypedLetBindingError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: constantConditionError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: define :: String -> Type -> Binding
+ Hydra.Sources.Kernel.Types.Error.Core: duplicateBindingError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: duplicateFieldError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: duplicateRecordTypeFieldNamesError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: duplicateUnionTypeFieldNamesError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: emptyCaseStatementError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: emptyLetBindingsError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: emptyRecordTypeError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: emptyTermAnnotationError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: emptyTypeAnnotationError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: emptyTypeNameInTermError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: emptyUnionTypeError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: invalidForallParameterNameError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: invalidLambdaParameterNameError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: invalidLetBindingNameError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: invalidTermError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: invalidTypeError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: invalidTypeLambdaParameterNameError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: invalidTypeSchemeVariableNameError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: module_ :: Module
+ Hydra.Sources.Kernel.Types.Error.Core: nestedTermAnnotationError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: nestedTypeAnnotationError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: nonComparableMapKeyTypeError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: nonComparableSetElementTypeError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: ns :: Namespace
+ Hydra.Sources.Kernel.Types.Error.Core: redundantWrapUnwrapError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: selfApplicationError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: singleVariantUnionError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: termVariableShadowingError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: typeVariableShadowingInForallError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: typeVariableShadowingInTypeLambdaError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: undefinedFieldError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: undefinedTermVariableError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: undefinedTypeVariableError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: undefinedTypeVariableInBindingTypeError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: undefinedTypeVariableInLambdaDomainError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: undefinedTypeVariableInTypeApplicationError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: unexpectedTermVariantError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: unexpectedTypeVariantError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: unknownPrimitiveNameError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: unnecessaryIdentityApplicationError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: untypedTermVariableError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Core: voidInNonBottomPositionError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Packaging: conflictingModuleNamespaceError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Packaging: conflictingVariantNameError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Packaging: define :: String -> Type -> Binding
+ Hydra.Sources.Kernel.Types.Error.Packaging: definitionNotInModuleNamespaceError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Packaging: duplicateDefinitionNameError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Packaging: duplicateModuleNamespaceError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Packaging: invalidModuleError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Packaging: invalidPackageError :: Binding
+ Hydra.Sources.Kernel.Types.Error.Packaging: module_ :: Module
+ Hydra.Sources.Kernel.Types.Error.Packaging: ns :: Namespace
+ Hydra.Sources.Kernel.Types.Errors: decodingError :: Binding
+ Hydra.Sources.Kernel.Types.Errors: define :: String -> Type -> Binding
+ Hydra.Sources.Kernel.Types.Errors: error_ :: Binding
+ Hydra.Sources.Kernel.Types.Errors: module_ :: Module
+ Hydra.Sources.Kernel.Types.Errors: ns :: Namespace
+ Hydra.Sources.Kernel.Types.Errors: otherError :: Binding
+ Hydra.Sources.Kernel.Types.Errors: unificationError :: Binding
+ Hydra.Sources.Kernel.Types.Packaging: define :: String -> Type -> Binding
+ Hydra.Sources.Kernel.Types.Packaging: module_ :: Module
+ Hydra.Sources.Kernel.Types.Packaging: ns :: Namespace
+ Hydra.Sources.Kernel.Types.Packaging: package :: Binding
+ Hydra.Sources.Kernel.Types.Packaging: packageName :: Binding
+ Hydra.Sources.Kernel.Types.Paths: define :: String -> Type -> Binding
+ Hydra.Sources.Kernel.Types.Paths: module_ :: Module
+ Hydra.Sources.Kernel.Types.Paths: ns :: Namespace
+ Hydra.Sources.Kernel.Types.Paths: subtermEdge :: Binding
+ Hydra.Sources.Kernel.Types.Paths: subtermGraph :: Binding
+ Hydra.Sources.Kernel.Types.Paths: subtermNode :: Binding
+ Hydra.Sources.Kernel.Types.Paths: subtermPath :: Binding
+ Hydra.Sources.Kernel.Types.Paths: subtermStep :: Binding
+ Hydra.Sources.Kernel.Types.Paths: subtypeEdge :: Binding
+ Hydra.Sources.Kernel.Types.Paths: subtypeGraph :: Binding
+ Hydra.Sources.Kernel.Types.Paths: subtypeNode :: Binding
+ Hydra.Sources.Kernel.Types.Paths: subtypePath :: Binding
+ Hydra.Sources.Kernel.Types.Paths: subtypeStep :: Binding
+ Hydra.Sources.Kernel.Types.Query: pathEquation :: Binding
+ Hydra.Sources.Kernel.Types.Query: patternImplication :: Binding
+ Hydra.Sources.Kernel.Types.Testing: testGenerator :: Binding
+ Hydra.Sources.Kernel.Types.Testing: validateCoreTermTestCase :: Binding
+ Hydra.Sources.Kernel.Types.Util: adapter :: Binding
+ Hydra.Sources.Kernel.Types.Util: bicoder :: Binding
+ Hydra.Sources.Kernel.Types.Util: coder :: Binding
+ Hydra.Sources.Kernel.Types.Util: either_ :: Binding
+ Hydra.Sources.Kernel.Types.Util: pair :: Binding
+ Hydra.Sources.Libraries: _chars_isAlphaNum :: Name
+ Hydra.Sources.Libraries: _chars_isLower :: Name
+ Hydra.Sources.Libraries: _chars_isSpace :: Name
+ Hydra.Sources.Libraries: _chars_isUpper :: Name
+ Hydra.Sources.Libraries: _chars_toLower :: Name
+ Hydra.Sources.Libraries: _chars_toUpper :: Name
+ Hydra.Sources.Libraries: _eithers_bimap :: Name
+ Hydra.Sources.Libraries: _eithers_bind :: Name
+ Hydra.Sources.Libraries: _eithers_either :: Name
+ Hydra.Sources.Libraries: _eithers_foldl :: Name
+ Hydra.Sources.Libraries: _eithers_fromLeft :: Name
+ Hydra.Sources.Libraries: _eithers_fromRight :: Name
+ Hydra.Sources.Libraries: _eithers_isLeft :: Name
+ Hydra.Sources.Libraries: _eithers_isRight :: Name
+ Hydra.Sources.Libraries: _eithers_lefts :: Name
+ Hydra.Sources.Libraries: _eithers_map :: Name
+ Hydra.Sources.Libraries: _eithers_mapList :: Name
+ Hydra.Sources.Libraries: _eithers_mapMaybe :: Name
+ Hydra.Sources.Libraries: _eithers_mapSet :: Name
+ Hydra.Sources.Libraries: _eithers_partitionEithers :: Name
+ Hydra.Sources.Libraries: _eithers_rights :: Name
+ Hydra.Sources.Libraries: _equality_compare :: Name
+ Hydra.Sources.Libraries: _equality_equal :: Name
+ Hydra.Sources.Libraries: _equality_gt :: Name
+ Hydra.Sources.Libraries: _equality_gte :: Name
+ Hydra.Sources.Libraries: _equality_identity :: Name
+ Hydra.Sources.Libraries: _equality_lt :: Name
+ Hydra.Sources.Libraries: _equality_lte :: Name
+ Hydra.Sources.Libraries: _equality_max :: Name
+ Hydra.Sources.Libraries: _equality_min :: Name
+ Hydra.Sources.Libraries: _hydra_lib_chars :: Namespace
+ Hydra.Sources.Libraries: _hydra_lib_eithers :: Namespace
+ Hydra.Sources.Libraries: _hydra_lib_equality :: Namespace
+ Hydra.Sources.Libraries: _hydra_lib_lists :: Namespace
+ Hydra.Sources.Libraries: _hydra_lib_literals :: Namespace
+ Hydra.Sources.Libraries: _hydra_lib_logic :: Namespace
+ Hydra.Sources.Libraries: _hydra_lib_maps :: Namespace
+ Hydra.Sources.Libraries: _hydra_lib_math :: Namespace
+ Hydra.Sources.Libraries: _hydra_lib_maybes :: Namespace
+ Hydra.Sources.Libraries: _hydra_lib_pairs :: Namespace
+ Hydra.Sources.Libraries: _hydra_lib_regex :: Namespace
+ Hydra.Sources.Libraries: _hydra_lib_sets :: Namespace
+ Hydra.Sources.Libraries: _hydra_lib_strings :: Namespace
+ Hydra.Sources.Libraries: _hydra_typeclass :: Namespace
+ Hydra.Sources.Libraries: _lists_apply :: Name
+ Hydra.Sources.Libraries: _lists_at :: Name
+ Hydra.Sources.Libraries: _lists_bind :: Name
+ Hydra.Sources.Libraries: _lists_concat :: Name
+ Hydra.Sources.Libraries: _lists_concat2 :: Name
+ Hydra.Sources.Libraries: _lists_cons :: Name
+ Hydra.Sources.Libraries: _lists_drop :: Name
+ Hydra.Sources.Libraries: _lists_dropWhile :: Name
+ Hydra.Sources.Libraries: _lists_elem :: Name
+ Hydra.Sources.Libraries: _lists_filter :: Name
+ Hydra.Sources.Libraries: _lists_find :: Name
+ Hydra.Sources.Libraries: _lists_foldl :: Name
+ Hydra.Sources.Libraries: _lists_foldr :: Name
+ Hydra.Sources.Libraries: _lists_group :: Name
+ Hydra.Sources.Libraries: _lists_head :: Name
+ Hydra.Sources.Libraries: _lists_init :: Name
+ Hydra.Sources.Libraries: _lists_intercalate :: Name
+ Hydra.Sources.Libraries: _lists_intersperse :: Name
+ Hydra.Sources.Libraries: _lists_last :: Name
+ Hydra.Sources.Libraries: _lists_length :: Name
+ Hydra.Sources.Libraries: _lists_map :: Name
+ Hydra.Sources.Libraries: _lists_nub :: Name
+ Hydra.Sources.Libraries: _lists_null :: Name
+ Hydra.Sources.Libraries: _lists_partition :: Name
+ Hydra.Sources.Libraries: _lists_pure :: Name
+ Hydra.Sources.Libraries: _lists_replicate :: Name
+ Hydra.Sources.Libraries: _lists_reverse :: Name
+ Hydra.Sources.Libraries: _lists_safeHead :: Name
+ Hydra.Sources.Libraries: _lists_singleton :: Name
+ Hydra.Sources.Libraries: _lists_sort :: Name
+ Hydra.Sources.Libraries: _lists_sortOn :: Name
+ Hydra.Sources.Libraries: _lists_span :: Name
+ Hydra.Sources.Libraries: _lists_tail :: Name
+ Hydra.Sources.Libraries: _lists_take :: Name
+ Hydra.Sources.Libraries: _lists_transpose :: Name
+ Hydra.Sources.Libraries: _lists_zip :: Name
+ Hydra.Sources.Libraries: _lists_zipWith :: Name
+ Hydra.Sources.Libraries: _literals_bigfloatToBigint :: Name
+ Hydra.Sources.Libraries: _literals_bigfloatToFloat32 :: Name
+ Hydra.Sources.Libraries: _literals_bigfloatToFloat64 :: Name
+ Hydra.Sources.Libraries: _literals_bigintToBigfloat :: Name
+ Hydra.Sources.Libraries: _literals_bigintToInt16 :: Name
+ Hydra.Sources.Libraries: _literals_bigintToInt32 :: Name
+ Hydra.Sources.Libraries: _literals_bigintToInt64 :: Name
+ Hydra.Sources.Libraries: _literals_bigintToInt8 :: Name
+ Hydra.Sources.Libraries: _literals_bigintToUint16 :: Name
+ Hydra.Sources.Libraries: _literals_bigintToUint32 :: Name
+ Hydra.Sources.Libraries: _literals_bigintToUint64 :: Name
+ Hydra.Sources.Libraries: _literals_bigintToUint8 :: Name
+ Hydra.Sources.Libraries: _literals_binaryToBytes :: Name
+ Hydra.Sources.Libraries: _literals_binaryToString :: Name
+ Hydra.Sources.Libraries: _literals_float32ToBigfloat :: Name
+ Hydra.Sources.Libraries: _literals_float64ToBigfloat :: Name
+ Hydra.Sources.Libraries: _literals_int16ToBigint :: Name
+ Hydra.Sources.Libraries: _literals_int32ToBigint :: Name
+ Hydra.Sources.Libraries: _literals_int64ToBigint :: Name
+ Hydra.Sources.Libraries: _literals_int8ToBigint :: Name
+ Hydra.Sources.Libraries: _literals_readBigfloat :: Name
+ Hydra.Sources.Libraries: _literals_readBigint :: Name
+ Hydra.Sources.Libraries: _literals_readBoolean :: Name
+ Hydra.Sources.Libraries: _literals_readFloat32 :: Name
+ Hydra.Sources.Libraries: _literals_readFloat64 :: Name
+ Hydra.Sources.Libraries: _literals_readInt16 :: Name
+ Hydra.Sources.Libraries: _literals_readInt32 :: Name
+ Hydra.Sources.Libraries: _literals_readInt64 :: Name
+ Hydra.Sources.Libraries: _literals_readInt8 :: Name
+ Hydra.Sources.Libraries: _literals_readString :: Name
+ Hydra.Sources.Libraries: _literals_readUint16 :: Name
+ Hydra.Sources.Libraries: _literals_readUint32 :: Name
+ Hydra.Sources.Libraries: _literals_readUint64 :: Name
+ Hydra.Sources.Libraries: _literals_readUint8 :: Name
+ Hydra.Sources.Libraries: _literals_showBigfloat :: Name
+ Hydra.Sources.Libraries: _literals_showBigint :: Name
+ Hydra.Sources.Libraries: _literals_showBoolean :: Name
+ Hydra.Sources.Libraries: _literals_showFloat32 :: Name
+ Hydra.Sources.Libraries: _literals_showFloat64 :: Name
+ Hydra.Sources.Libraries: _literals_showInt16 :: Name
+ Hydra.Sources.Libraries: _literals_showInt32 :: Name
+ Hydra.Sources.Libraries: _literals_showInt64 :: Name
+ Hydra.Sources.Libraries: _literals_showInt8 :: Name
+ Hydra.Sources.Libraries: _literals_showString :: Name
+ Hydra.Sources.Libraries: _literals_showUint16 :: Name
+ Hydra.Sources.Libraries: _literals_showUint32 :: Name
+ Hydra.Sources.Libraries: _literals_showUint64 :: Name
+ Hydra.Sources.Libraries: _literals_showUint8 :: Name
+ Hydra.Sources.Libraries: _literals_stringToBinary :: Name
+ Hydra.Sources.Libraries: _literals_uint16ToBigint :: Name
+ Hydra.Sources.Libraries: _literals_uint32ToBigint :: Name
+ Hydra.Sources.Libraries: _literals_uint64ToBigint :: Name
+ Hydra.Sources.Libraries: _literals_uint8ToBigint :: Name
+ Hydra.Sources.Libraries: _logic_and :: Name
+ Hydra.Sources.Libraries: _logic_ifElse :: Name
+ Hydra.Sources.Libraries: _logic_not :: Name
+ Hydra.Sources.Libraries: _logic_or :: Name
+ Hydra.Sources.Libraries: _maps_alter :: Name
+ Hydra.Sources.Libraries: _maps_bimap :: Name
+ Hydra.Sources.Libraries: _maps_delete :: Name
+ Hydra.Sources.Libraries: _maps_elems :: Name
+ Hydra.Sources.Libraries: _maps_empty :: Name
+ Hydra.Sources.Libraries: _maps_filter :: Name
+ Hydra.Sources.Libraries: _maps_filterWithKey :: Name
+ Hydra.Sources.Libraries: _maps_findWithDefault :: Name
+ Hydra.Sources.Libraries: _maps_fromList :: Name
+ Hydra.Sources.Libraries: _maps_insert :: Name
+ Hydra.Sources.Libraries: _maps_keys :: Name
+ Hydra.Sources.Libraries: _maps_lookup :: Name
+ Hydra.Sources.Libraries: _maps_map :: Name
+ Hydra.Sources.Libraries: _maps_mapKeys :: Name
+ Hydra.Sources.Libraries: _maps_member :: Name
+ Hydra.Sources.Libraries: _maps_null :: Name
+ Hydra.Sources.Libraries: _maps_singleton :: Name
+ Hydra.Sources.Libraries: _maps_size :: Name
+ Hydra.Sources.Libraries: _maps_toList :: Name
+ Hydra.Sources.Libraries: _maps_union :: Name
+ Hydra.Sources.Libraries: _math_abs :: Name
+ Hydra.Sources.Libraries: _math_acos :: Name
+ Hydra.Sources.Libraries: _math_acosh :: Name
+ Hydra.Sources.Libraries: _math_add :: Name
+ Hydra.Sources.Libraries: _math_asin :: Name
+ Hydra.Sources.Libraries: _math_asinh :: Name
+ Hydra.Sources.Libraries: _math_atan :: Name
+ Hydra.Sources.Libraries: _math_atan2 :: Name
+ Hydra.Sources.Libraries: _math_atanh :: Name
+ Hydra.Sources.Libraries: _math_ceiling :: Name
+ Hydra.Sources.Libraries: _math_cos :: Name
+ Hydra.Sources.Libraries: _math_cosh :: Name
+ Hydra.Sources.Libraries: _math_div :: Name
+ Hydra.Sources.Libraries: _math_e :: Name
+ Hydra.Sources.Libraries: _math_even :: Name
+ Hydra.Sources.Libraries: _math_exp :: Name
+ Hydra.Sources.Libraries: _math_floor :: Name
+ Hydra.Sources.Libraries: _math_log :: Name
+ Hydra.Sources.Libraries: _math_logBase :: Name
+ Hydra.Sources.Libraries: _math_max :: Name
+ Hydra.Sources.Libraries: _math_min :: Name
+ Hydra.Sources.Libraries: _math_mod :: Name
+ Hydra.Sources.Libraries: _math_mul :: Name
+ Hydra.Sources.Libraries: _math_negate :: Name
+ Hydra.Sources.Libraries: _math_odd :: Name
+ Hydra.Sources.Libraries: _math_pi :: Name
+ Hydra.Sources.Libraries: _math_pow :: Name
+ Hydra.Sources.Libraries: _math_pred :: Name
+ Hydra.Sources.Libraries: _math_range :: Name
+ Hydra.Sources.Libraries: _math_rem :: Name
+ Hydra.Sources.Libraries: _math_round :: Name
+ Hydra.Sources.Libraries: _math_roundBigfloat :: Name
+ Hydra.Sources.Libraries: _math_roundFloat32 :: Name
+ Hydra.Sources.Libraries: _math_roundFloat64 :: Name
+ Hydra.Sources.Libraries: _math_signum :: Name
+ Hydra.Sources.Libraries: _math_sin :: Name
+ Hydra.Sources.Libraries: _math_sinh :: Name
+ Hydra.Sources.Libraries: _math_sqrt :: Name
+ Hydra.Sources.Libraries: _math_sub :: Name
+ Hydra.Sources.Libraries: _math_succ :: Name
+ Hydra.Sources.Libraries: _math_tan :: Name
+ Hydra.Sources.Libraries: _math_tanh :: Name
+ Hydra.Sources.Libraries: _math_truncate :: Name
+ Hydra.Sources.Libraries: _maybes_apply :: Name
+ Hydra.Sources.Libraries: _maybes_bind :: Name
+ Hydra.Sources.Libraries: _maybes_cases :: Name
+ Hydra.Sources.Libraries: _maybes_cat :: Name
+ Hydra.Sources.Libraries: _maybes_compose :: Name
+ Hydra.Sources.Libraries: _maybes_fromJust :: Name
+ Hydra.Sources.Libraries: _maybes_fromMaybe :: Name
+ Hydra.Sources.Libraries: _maybes_isJust :: Name
+ Hydra.Sources.Libraries: _maybes_isNothing :: Name
+ Hydra.Sources.Libraries: _maybes_map :: Name
+ Hydra.Sources.Libraries: _maybes_mapMaybe :: Name
+ Hydra.Sources.Libraries: _maybes_maybe :: Name
+ Hydra.Sources.Libraries: _maybes_pure :: Name
+ Hydra.Sources.Libraries: _maybes_toList :: Name
+ Hydra.Sources.Libraries: _pairs_bimap :: Name
+ Hydra.Sources.Libraries: _pairs_first :: Name
+ Hydra.Sources.Libraries: _pairs_second :: Name
+ Hydra.Sources.Libraries: _regex_find :: Name
+ Hydra.Sources.Libraries: _regex_findAll :: Name
+ Hydra.Sources.Libraries: _regex_matches :: Name
+ Hydra.Sources.Libraries: _regex_replace :: Name
+ Hydra.Sources.Libraries: _regex_replaceAll :: Name
+ Hydra.Sources.Libraries: _regex_split :: Name
+ Hydra.Sources.Libraries: _sets_delete :: Name
+ Hydra.Sources.Libraries: _sets_difference :: Name
+ Hydra.Sources.Libraries: _sets_empty :: Name
+ Hydra.Sources.Libraries: _sets_fromList :: Name
+ Hydra.Sources.Libraries: _sets_insert :: Name
+ Hydra.Sources.Libraries: _sets_intersection :: Name
+ Hydra.Sources.Libraries: _sets_map :: Name
+ Hydra.Sources.Libraries: _sets_member :: Name
+ Hydra.Sources.Libraries: _sets_null :: Name
+ Hydra.Sources.Libraries: _sets_singleton :: Name
+ Hydra.Sources.Libraries: _sets_size :: Name
+ Hydra.Sources.Libraries: _sets_toList :: Name
+ Hydra.Sources.Libraries: _sets_union :: Name
+ Hydra.Sources.Libraries: _sets_unions :: Name
+ Hydra.Sources.Libraries: _strings_cat :: Name
+ Hydra.Sources.Libraries: _strings_cat2 :: Name
+ Hydra.Sources.Libraries: _strings_charAt :: Name
+ Hydra.Sources.Libraries: _strings_fromList :: Name
+ Hydra.Sources.Libraries: _strings_intercalate :: Name
+ Hydra.Sources.Libraries: _strings_length :: Name
+ Hydra.Sources.Libraries: _strings_lines :: Name
+ Hydra.Sources.Libraries: _strings_null :: Name
+ Hydra.Sources.Libraries: _strings_splitOn :: Name
+ Hydra.Sources.Libraries: _strings_toList :: Name
+ Hydra.Sources.Libraries: _strings_toLower :: Name
+ Hydra.Sources.Libraries: _strings_toUpper :: Name
+ Hydra.Sources.Libraries: _strings_unlines :: Name
+ Hydra.Sources.Libraries: _typeclass_Eq :: Name
+ Hydra.Sources.Libraries: _typeclass_Ord :: Name
+ Hydra.Sources.Libraries: hydraLibRegex :: Library
+ Hydra.Sources.Test.Annotations: testContext :: TTerm Term
+ Hydra.Sources.Test.Hoisting.All: allTests :: TBinding TestGroup
+ Hydra.Sources.Test.Hoisting.All: module_ :: Module
+ Hydra.Sources.Test.Hoisting.All: ns :: Namespace
+ Hydra.Sources.Test.Hoisting.Cases: allTests :: TBinding TestGroup
+ Hydra.Sources.Test.Hoisting.Cases: emptyAnnMap :: TTerm (Map Name Term)
+ Hydra.Sources.Test.Hoisting.Cases: hoistCaseStatementsGroup :: TTerm TestGroup
+ Hydra.Sources.Test.Hoisting.Cases: hoistSubtermsGroup :: TTerm TestGroup
+ Hydra.Sources.Test.Hoisting.Cases: letExpr :: String -> TTerm Term -> TTerm Term -> TTerm Term
+ Hydra.Sources.Test.Hoisting.Cases: module_ :: Module
+ Hydra.Sources.Test.Hoisting.Cases: multiLet :: [(String, TTerm Term)] -> TTerm Term -> TTerm Term
+ Hydra.Sources.Test.Hoisting.Cases: nm :: String -> TTerm Name
+ Hydra.Sources.Test.Hoisting.Cases: ns :: Namespace
+ Hydra.Sources.Test.Hoisting.Let: allTests :: TBinding TestGroup
+ Hydra.Sources.Test.Hoisting.Let: hoistAllCase :: String -> TTerm Let -> TTerm Let -> TTerm TestCaseWithMetadata
+ Hydra.Sources.Test.Hoisting.Let: hoistLetBindingsGroup :: TTerm TestGroup
+ Hydra.Sources.Test.Hoisting.Let: hoistPolyCase :: String -> TTerm Let -> TTerm Let -> TTerm TestCaseWithMetadata
+ Hydra.Sources.Test.Hoisting.Let: hoistPolymorphicLetBindingsGroup :: TTerm TestGroup
+ Hydra.Sources.Test.Hoisting.Let: hoistPolymorphicTypeParametersGroup :: TTerm TestGroup
+ Hydra.Sources.Test.Hoisting.Let: letExpr :: String -> TTerm Term -> TTerm Term -> TTerm Term
+ Hydra.Sources.Test.Hoisting.Let: mkLet :: [(TTerm Name, TTerm Term, TTerm (Maybe TypeScheme))] -> TTerm Term -> TTerm Let
+ Hydra.Sources.Test.Hoisting.Let: mkLetUntyped :: [(TTerm Name, TTerm Term)] -> TTerm Term -> TTerm Let
+ Hydra.Sources.Test.Hoisting.Let: module_ :: Module
+ Hydra.Sources.Test.Hoisting.Let: monoType :: TTerm Type -> TTerm (Maybe TypeScheme)
+ Hydra.Sources.Test.Hoisting.Let: multiLet :: [(String, TTerm Term)] -> TTerm Term -> TTerm Term
+ Hydra.Sources.Test.Hoisting.Let: nm :: String -> TTerm Name
+ Hydra.Sources.Test.Hoisting.Let: ns :: Namespace
+ Hydra.Sources.Test.Hoisting.Let: polyType :: [String] -> TTerm Type -> TTerm (Maybe TypeScheme)
+ Hydra.Sources.Test.Inference.Classes: allTests :: TBinding TestGroup
+ Hydra.Sources.Test.Inference.Classes: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Test.Inference.Classes: module_ :: Module
+ Hydra.Sources.Test.Inference.Classes: ns :: Namespace
+ Hydra.Sources.Test.Inference.Classes: testGroupForCollectionTerms :: TBinding TestGroup
+ Hydra.Sources.Test.Inference.Classes: testGroupForComposition :: TBinding TestGroup
+ Hydra.Sources.Test.Inference.Classes: testGroupForLetBindings :: TBinding TestGroup
+ Hydra.Sources.Test.Inference.Classes: testGroupForMonomorphicConstraints :: TBinding TestGroup
+ Hydra.Sources.Test.Inference.Classes: testGroupForNestedContainers :: TBinding TestGroup
+ Hydra.Sources.Test.Inference.Classes: testGroupForPartialApplication :: TBinding TestGroup
+ Hydra.Sources.Test.Inference.Classes: testGroupForPrimitiveReferences :: TBinding TestGroup
+ Hydra.Sources.Test.Lib.Math: mathRoundBigfloat :: TTerm TestGroup
+ Hydra.Sources.Test.Lib.Math: mathRoundFloat32 :: TTerm TestGroup
+ Hydra.Sources.Test.Lib.Math: mathRoundFloat64 :: TTerm TestGroup
+ Hydra.Sources.Test.Lib.Math: roundDigits :: Int
+ Hydra.Sources.Test.Lib.Math: roundedPrimCase1 :: String -> Name -> Double -> Double -> TTerm TestCaseWithMetadata
+ Hydra.Sources.Test.Lib.Math: roundedPrimCase2 :: String -> Name -> Double -> Double -> Double -> TTerm TestCaseWithMetadata
+ Hydra.Sources.Test.Lib.Maybes: maybesToList :: TTerm TestGroup
+ Hydra.Sources.Test.Lib.Regex: allTests :: TBinding TestGroup
+ Hydra.Sources.Test.Lib.Regex: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Test.Lib.Regex: module_ :: Module
+ Hydra.Sources.Test.Lib.Regex: ns :: Namespace
+ Hydra.Sources.Test.Transform: addGenerationPrefix :: TBinding (Namespace -> Namespace)
+ Hydra.Sources.Test.Transform: buildConvertCaseCall :: TBinding (CaseConvention -> CaseConvention -> String -> Term)
+ Hydra.Sources.Test.Transform: buildTopologicalSortCall :: TBinding ([(Int, [Int])] -> Term)
+ Hydra.Sources.Test.Transform: buildTopologicalSortSCCCall :: TBinding ([(Int, [Int])] -> Term)
+ Hydra.Sources.Test.Transform: collectTestCases :: TBinding (TestGroup -> [TestCaseWithMetadata])
+ Hydra.Sources.Test.Transform: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Test.Transform: encodeAdjacencyList :: TBinding ([(Int, [Int])] -> Term)
+ Hydra.Sources.Test.Transform: encodeCaseConvention :: TBinding (CaseConvention -> Term)
+ Hydra.Sources.Test.Transform: encodeEitherListList :: TBinding (Either [[Int]] [Int] -> Term)
+ Hydra.Sources.Test.Transform: encodeInt :: TBinding (Int -> Term)
+ Hydra.Sources.Test.Transform: encodeIntList :: TBinding ([Int] -> Term)
+ Hydra.Sources.Test.Transform: encodeListList :: TBinding ([[Int]] -> Term)
+ Hydra.Sources.Test.Transform: module_ :: Module
+ Hydra.Sources.Test.Transform: ns :: Namespace
+ Hydra.Sources.Test.Transform: transformModule :: TBinding (Module -> Module)
+ Hydra.Sources.Test.Transform: transformTestCase :: TBinding (TestCaseWithMetadata -> Maybe TestCaseWithMetadata)
+ Hydra.Sources.Test.Transform: transformToCompiledTests :: TBinding (TestGroup -> Maybe TestGroup)
+ Hydra.Sources.Test.Utils: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Test.Utils: inferTerm :: TBinding (Graph -> Term -> Either String Term)
+ Hydra.Sources.Test.Utils: inferTestCase :: TBinding (Graph -> TestCaseWithMetadata -> Either String TestCaseWithMetadata)
+ Hydra.Sources.Test.Utils: inferTestGroupTerms :: TBinding (Graph -> TestGroup -> Either String TestGroup)
+ Hydra.Sources.Test.Utils: module_ :: Module
+ Hydra.Sources.Test.Utils: ns :: Namespace
+ Hydra.Sources.Test.Validate.All: allTests :: TBinding TestGroup
+ Hydra.Sources.Test.Validate.All: module_ :: Module
+ Hydra.Sources.Test.Validate.All: ns :: Namespace
+ Hydra.Sources.Test.Validate.Core: accLambdaBody :: TTerm SubtermStep
+ Hydra.Sources.Test.Validate.Core: accLetBinding :: String -> TTerm SubtermStep
+ Hydra.Sources.Test.Validate.Core: accLetBody :: TTerm SubtermStep
+ Hydra.Sources.Test.Validate.Core: allTests :: TBinding TestGroup
+ Hydra.Sources.Test.Validate.Core: annotateTerm :: TTerm Term -> String -> TTerm Term -> TTerm Term
+ Hydra.Sources.Test.Validate.Core: define :: String -> TTerm a -> TBinding a
+ Hydra.Sources.Test.Validate.Core: dupBinding :: [TTerm SubtermStep] -> String -> TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: dupField :: [TTerm SubtermStep] -> String -> TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: duplicateBindingsTests :: TBinding TestGroup
+ Hydra.Sources.Test.Validate.Core: duplicateFieldsTests :: TBinding TestGroup
+ Hydra.Sources.Test.Validate.Core: emptyAnnotErr :: TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: emptyCaseErr :: String -> TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: emptyLetBindingsTests :: TBinding TestGroup
+ Hydra.Sources.Test.Validate.Core: emptyLetErr :: TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: emptyPath :: TTerm SubtermPath
+ Hydra.Sources.Test.Validate.Core: emptyTypeNameErr :: TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: identityAppErr :: TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: identityApplicationTests :: TBinding TestGroup
+ Hydra.Sources.Test.Validate.Core: invalidLetNameErr :: String -> TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: invalidNameErr :: String -> TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: justError :: TTerm InvalidTermError -> TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: module_ :: Module
+ Hydra.Sources.Test.Validate.Core: nestedAnnotErr :: TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: nm :: String -> TTerm Name
+ Hydra.Sources.Test.Validate.Core: noError :: TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: ns :: Namespace
+ Hydra.Sources.Test.Validate.Core: primRef :: String -> TTerm Term
+ Hydra.Sources.Test.Validate.Core: projTerm :: String -> String -> TTerm Term
+ Hydra.Sources.Test.Validate.Core: redundantWrapErr :: String -> TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: redundantWrapUnwrapTests :: TBinding TestGroup
+ Hydra.Sources.Test.Validate.Core: selfAppErr :: String -> TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: shadowErr :: String -> TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: toTermTerm :: TTerm a -> TTerm Term
+ Hydra.Sources.Test.Validate.Core: unknownPrimErr :: String -> TTerm (Maybe InvalidTermError)
+ Hydra.Sources.Test.Validate.Core: unknownPrimitiveTests :: TBinding TestGroup
+ Hydra.Sources.Test.Validate.Core: untypedCase :: String -> TTerm Term -> TTerm (Maybe InvalidTermError) -> TTerm TestCaseWithMetadata
+ Hydra.Sources.Test.Validate.Core: unwrapApply :: String -> TTerm Term -> TTerm Term
+ Hydra.Sources.Test.Validate.Core: variableShadowingTests :: TBinding TestGroup
+ Hydra.Sources.Test.Validate.Core: wrapTerm :: String -> TTerm Term -> TTerm Term
+ Hydra.Test.Transform: addGenerationPrefix :: Namespace -> Namespace
+ Hydra.Test.Transform: buildConvertCaseCall :: CaseConvention -> CaseConvention -> String -> Term
+ Hydra.Test.Transform: buildTopologicalSortCall :: [(Int, [Int])] -> Term
+ Hydra.Test.Transform: buildTopologicalSortSCCCall :: [(Int, [Int])] -> Term
+ Hydra.Test.Transform: collectTestCases :: TestGroup -> [TestCaseWithMetadata]
+ Hydra.Test.Transform: encodeAdjacencyList :: [(Int, [Int])] -> Term
+ Hydra.Test.Transform: encodeCaseConvention :: CaseConvention -> Term
+ Hydra.Test.Transform: encodeEitherListList :: Either [[Int]] [Int] -> Term
+ Hydra.Test.Transform: encodeInt :: Int -> Term
+ Hydra.Test.Transform: encodeIntList :: [Int] -> Term
+ Hydra.Test.Transform: encodeListList :: [[Int]] -> Term
+ Hydra.Test.Transform: transformModule :: Module -> Module
+ Hydra.Test.Transform: transformTestCase :: TestCaseWithMetadata -> Maybe TestCaseWithMetadata
+ Hydra.Test.Transform: transformToCompiledTests :: TestGroup -> Maybe TestGroup
+ Hydra.Test.Utils: inferTerm :: Graph -> Term -> Either String Term
+ Hydra.Test.Utils: inferTestCase :: Graph -> TestCaseWithMetadata -> Either String TestCaseWithMetadata
+ Hydra.Test.Utils: inferTestGroupTerms :: Graph -> TestGroup -> Either String TestGroup
+ Hydra.Testing: TestCaseValidateCoreTerm :: ValidateCoreTermTestCase -> TestCase
+ Hydra.Testing: TestGenerator :: (Module -> Graph -> Either String (Namespaces a)) -> (Namespaces a -> TestCodec) -> (Module -> TestGroup -> Graph -> Either String (String, String)) -> Maybe (String -> [Module] -> (String, String)) -> TestGenerator a
+ Hydra.Testing: ValidateCoreTermTestCase :: Bool -> Term -> Maybe InvalidTermError -> ValidateCoreTermTestCase
+ Hydra.Testing: [testGeneratorAggregatorFile] :: TestGenerator a -> Maybe (String -> [Module] -> (String, String))
+ Hydra.Testing: [testGeneratorCreateCodec] :: TestGenerator a -> Namespaces a -> TestCodec
+ Hydra.Testing: [testGeneratorGenerateTestFile] :: TestGenerator a -> Module -> TestGroup -> Graph -> Either String (String, String)
+ Hydra.Testing: [testGeneratorNamespacesForModule] :: TestGenerator a -> Module -> Graph -> Either String (Namespaces a)
+ Hydra.Testing: [validateCoreTermTestCaseInput] :: ValidateCoreTermTestCase -> Term
+ Hydra.Testing: [validateCoreTermTestCaseOutput] :: ValidateCoreTermTestCase -> Maybe InvalidTermError
+ Hydra.Testing: [validateCoreTermTestCaseTyped] :: ValidateCoreTermTestCase -> Bool
+ Hydra.Testing: _TestCase_validateCoreTerm :: Name
+ Hydra.Testing: _TestGenerator :: Name
+ Hydra.Testing: _TestGenerator_aggregatorFile :: Name
+ Hydra.Testing: _TestGenerator_createCodec :: Name
+ Hydra.Testing: _TestGenerator_generateTestFile :: Name
+ Hydra.Testing: _TestGenerator_namespacesForModule :: Name
+ Hydra.Testing: _ValidateCoreTermTestCase :: Name
+ Hydra.Testing: _ValidateCoreTermTestCase_input :: Name
+ Hydra.Testing: _ValidateCoreTermTestCase_output :: Name
+ Hydra.Testing: _ValidateCoreTermTestCase_typed :: Name
+ Hydra.Testing: data TestGenerator a
+ Hydra.Testing: data ValidateCoreTermTestCase
+ Hydra.Testing: instance GHC.Classes.Eq Hydra.Testing.ValidateCoreTermTestCase
+ Hydra.Testing: instance GHC.Classes.Ord Hydra.Testing.ValidateCoreTermTestCase
+ Hydra.Testing: instance GHC.Read.Read Hydra.Testing.ValidateCoreTermTestCase
+ Hydra.Testing: instance GHC.Show.Show Hydra.Testing.ValidateCoreTermTestCase
+ Hydra.Typing: [inferenceResultContext] :: InferenceResult -> Context
+ Hydra.Typing: _InferenceResult_context :: Name
+ Hydra.Util: Adapter :: Bool -> t1 -> t2 -> Coder v1 v2 -> Adapter t1 t2 v1 v2
+ Hydra.Util: Bicoder :: (t1 -> Adapter t1 t2 v1 v2) -> (t2 -> Adapter t2 t1 v2 v1) -> Bicoder t1 t2 v1 v2
+ Hydra.Util: Coder :: (Context -> v1 -> Either (InContext Error) v2) -> (Context -> v2 -> Either (InContext Error) v1) -> Coder v1 v2
+ Hydra.Util: [adapterCoder] :: Adapter t1 t2 v1 v2 -> Coder v1 v2
+ Hydra.Util: [adapterIsLossy] :: Adapter t1 t2 v1 v2 -> Bool
+ Hydra.Util: [adapterSource] :: Adapter t1 t2 v1 v2 -> t1
+ Hydra.Util: [adapterTarget] :: Adapter t1 t2 v1 v2 -> t2
+ Hydra.Util: [bicoderDecode] :: Bicoder t1 t2 v1 v2 -> t2 -> Adapter t2 t1 v2 v1
+ Hydra.Util: [bicoderEncode] :: Bicoder t1 t2 v1 v2 -> t1 -> Adapter t1 t2 v1 v2
+ Hydra.Util: [coderDecode] :: Coder v1 v2 -> Context -> v2 -> Either (InContext Error) v1
+ Hydra.Util: [coderEncode] :: Coder v1 v2 -> Context -> v1 -> Either (InContext Error) v2
+ Hydra.Util: _Adapter :: Name
+ Hydra.Util: _Adapter_coder :: Name
+ Hydra.Util: _Adapter_isLossy :: Name
+ Hydra.Util: _Adapter_source :: Name
+ Hydra.Util: _Adapter_target :: Name
+ Hydra.Util: _Bicoder :: Name
+ Hydra.Util: _Bicoder_decode :: Name
+ Hydra.Util: _Bicoder_encode :: Name
+ Hydra.Util: _Coder :: Name
+ Hydra.Util: _Coder_decode :: Name
+ Hydra.Util: _Coder_encode :: Name
+ Hydra.Util: data Adapter t1 t2 v1 v2
+ Hydra.Util: data Bicoder t1 t2 v1 v2
+ Hydra.Util: data Coder v1 v2
+ Hydra.Validate.Core: checkDuplicateBindings :: SubtermPath -> [Binding] -> Maybe InvalidTermError
+ Hydra.Validate.Core: checkDuplicateFieldTypes :: [FieldType] -> (Name -> Maybe t0) -> Maybe t0
+ Hydra.Validate.Core: checkDuplicateFields :: SubtermPath -> [Name] -> Maybe InvalidTermError
+ Hydra.Validate.Core: checkShadowing :: SubtermPath -> Graph -> [Name] -> Maybe InvalidTermError
+ Hydra.Validate.Core: checkTerm :: Bool -> SubtermPath -> Graph -> Term -> Maybe InvalidTermError
+ Hydra.Validate.Core: checkUndefinedTypeVariablesInType :: t0 -> Graph -> Type -> (Name -> Maybe t1) -> Maybe t1
+ Hydra.Validate.Core: checkUndefinedTypeVariablesInTypeScheme :: t0 -> Graph -> TypeScheme -> (Name -> Maybe t1) -> Maybe t1
+ Hydra.Validate.Core: checkVoid :: Type -> Maybe InvalidTypeError
+ Hydra.Validate.Core: findDuplicate :: Ord t0 => [t0] -> Maybe t0
+ Hydra.Validate.Core: findDuplicateFieldType :: Ord t0 => [t0] -> Maybe t0
+ Hydra.Validate.Core: firstError :: [Maybe t0] -> Maybe t0
+ Hydra.Validate.Core: firstTypeError :: [Maybe t0] -> Maybe t0
+ Hydra.Validate.Core: isValidName :: Name -> Bool
+ Hydra.Validate.Core: term :: Bool -> Graph -> Term -> Maybe InvalidTermError
+ Hydra.Validate.Core: type_ :: Set Name -> Type -> Maybe InvalidTypeError
+ Hydra.Validate.Core: validateTypeNode :: Set Name -> Type -> Maybe InvalidTypeError
+ Hydra.Validate.Packaging: checkConflictingModuleNamespaces :: Package -> Maybe InvalidPackageError
+ Hydra.Validate.Packaging: checkConflictingVariantNames :: Module -> Maybe InvalidModuleError
+ Hydra.Validate.Packaging: checkDefinitionNamespaces :: Module -> Maybe InvalidModuleError
+ Hydra.Validate.Packaging: checkDuplicateDefinitionNames :: Module -> Maybe InvalidModuleError
+ Hydra.Validate.Packaging: checkDuplicateModuleNamespaces :: Package -> Maybe InvalidPackageError
+ Hydra.Validate.Packaging: definitionName :: Definition -> Name
+ Hydra.Validate.Packaging: module_ :: Module -> Maybe InvalidModuleError
+ Hydra.Validate.Packaging: package :: Package -> Maybe InvalidPackageError
+ Hydra.Variants: TypeVariantVoid :: TypeVariant
+ Hydra.Variants: _TypeVariant_void :: Name
- Hydra.Annotations: debugIf :: t0 -> String -> Flow t1 ()
+ Hydra.Annotations: debugIf :: Context -> String -> String -> Either (InContext Error) ()
- Hydra.Annotations: failOnFlag :: Name -> String -> Flow t0 ()
+ Hydra.Annotations: failOnFlag :: Context -> Name -> String -> Either (InContext Error) ()
- Hydra.Annotations: getAttr :: Name -> Flow t0 (Maybe Term)
+ Hydra.Annotations: getAttr :: Name -> Context -> Maybe Term
- Hydra.Annotations: getAttrWithDefault :: Name -> Term -> Flow t0 Term
+ Hydra.Annotations: getAttrWithDefault :: Name -> Term -> Context -> Term
- Hydra.Annotations: getCount :: Name -> Flow t0 Int
+ Hydra.Annotations: getCount :: Name -> Context -> Int
- Hydra.Annotations: getDebugId :: Flow t0 (Maybe String)
+ Hydra.Annotations: getDebugId :: Context -> Either (InContext Error) (Maybe String)
- Hydra.Annotations: getDescription :: Map Name Term -> Flow Graph (Maybe String)
+ Hydra.Annotations: getDescription :: Context -> Graph -> Map Name Term -> Either (InContext Error) (Maybe String)
- Hydra.Annotations: getTermDescription :: Term -> Flow Graph (Maybe String)
+ Hydra.Annotations: getTermDescription :: Context -> Graph -> Term -> Either (InContext Error) (Maybe String)
- Hydra.Annotations: getType :: Map Name Term -> Flow Graph (Maybe Type)
+ Hydra.Annotations: getType :: Graph -> Map Name Term -> Either DecodingError (Maybe Type)
- Hydra.Annotations: getTypeClasses :: Term -> Flow Graph (Map Name (Set TypeClass))
+ Hydra.Annotations: getTypeClasses :: Context -> Graph -> Term -> Either (InContext Error) (Map Name (Set TypeClass))
- Hydra.Annotations: getTypeDescription :: Type -> Flow Graph (Maybe String)
+ Hydra.Annotations: getTypeDescription :: Context -> Graph -> Type -> Either (InContext Error) (Maybe String)
- Hydra.Annotations: hasFlag :: Name -> Flow t0 Bool
+ Hydra.Annotations: hasFlag :: Context -> Name -> Either (InContext Error) Bool
- Hydra.Annotations: nextCount :: Name -> Flow t0 Int
+ Hydra.Annotations: nextCount :: Name -> Context -> (Int, Context)
- Hydra.Annotations: putAttr :: Name -> Term -> Flow t0 ()
+ Hydra.Annotations: putAttr :: Name -> Term -> Context -> Context
- Hydra.Annotations: putCount :: Name -> Int -> Flow t0 ()
+ Hydra.Annotations: putCount :: Name -> Int -> Context -> Context
- Hydra.Annotations: resetCount :: Name -> Flow t0 ()
+ Hydra.Annotations: resetCount :: Name -> Context -> Context
- Hydra.Annotations: whenFlag :: Name -> Flow t0 t1 -> Flow t0 t1 -> Flow t0 t1
+ Hydra.Annotations: whenFlag :: Context -> Name -> Either (InContext Error) t0 -> Either (InContext Error) t0 -> Either (InContext Error) t0
- Hydra.Checking: applyTypeArgumentsToType :: TypeContext -> [Type] -> Type -> Flow t0 Type
+ Hydra.Checking: applyTypeArgumentsToType :: Context -> Graph -> [Type] -> Type -> Either (InContext Error) Type
- Hydra.Checking: checkForUnboundTypeVariables :: InferenceContext -> Term -> Flow t0 ()
+ Hydra.Checking: checkForUnboundTypeVariables :: Context -> Graph -> Term -> Either (InContext Error) ()
- Hydra.Checking: checkNominalApplication :: TypeContext -> Name -> [Type] -> Flow t0 ()
+ Hydra.Checking: checkNominalApplication :: Context -> Graph -> Name -> [Type] -> Either (InContext Error) ((), Context)
- Hydra.Checking: checkSameType :: TypeContext -> String -> [Type] -> Flow t0 Type
+ Hydra.Checking: checkSameType :: Context -> Graph -> String -> [Type] -> Either (InContext Error) Type
- Hydra.Checking: checkType :: TypeContext -> Term -> Type -> Flow t0 ()
+ Hydra.Checking: checkType :: Context -> Graph -> Term -> Type -> Either (InContext Error) ()
- Hydra.Checking: checkTypeSubst :: InferenceContext -> TypeSubst -> Flow t0 TypeSubst
+ Hydra.Checking: checkTypeSubst :: Context -> Graph -> TypeSubst -> Either (InContext Error) TypeSubst
- Hydra.Checking: checkTypeVariables :: t0 -> t1 -> Flow t2 ()
+ Hydra.Checking: checkTypeVariables :: t0 -> t1 -> ()
- Hydra.Checking: containsInScopeTypeVars :: TypeContext -> Type -> Bool
+ Hydra.Checking: containsInScopeTypeVars :: Graph -> Type -> Bool
- Hydra.Checking: toFContext :: InferenceContext -> Map Name Type
+ Hydra.Checking: toFContext :: Graph -> Map Name Type
- Hydra.Checking: typeListsEffectivelyEqual :: TypeContext -> [Type] -> [Type] -> Bool
+ Hydra.Checking: typeListsEffectivelyEqual :: Graph -> [Type] -> [Type] -> Bool
- Hydra.Checking: typeOf :: TypeContext -> [Type] -> Term -> Flow t0 Type
+ Hydra.Checking: typeOf :: Context -> Graph -> [Type] -> Term -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfAnnotatedTerm :: TypeContext -> [Type] -> AnnotatedTerm -> Flow t0 Type
+ Hydra.Checking: typeOfAnnotatedTerm :: Context -> Graph -> [Type] -> AnnotatedTerm -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfApplication :: TypeContext -> [Type] -> Application -> Flow t0 Type
+ Hydra.Checking: typeOfApplication :: Context -> Graph -> [Type] -> Application -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfCaseStatement :: TypeContext -> [Type] -> CaseStatement -> Flow t0 Type
+ Hydra.Checking: typeOfCaseStatement :: Context -> Graph -> [Type] -> CaseStatement -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfEither :: TypeContext -> [Type] -> Either Term Term -> Flow t0 Type
+ Hydra.Checking: typeOfEither :: Context -> Graph -> [Type] -> Either Term Term -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfInjection :: TypeContext -> [Type] -> Injection -> Flow t0 Type
+ Hydra.Checking: typeOfInjection :: Context -> Graph -> [Type] -> Injection -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfLambda :: TypeContext -> [Type] -> Lambda -> Flow t0 Type
+ Hydra.Checking: typeOfLambda :: Context -> Graph -> [Type] -> Lambda -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfLet :: TypeContext -> [Type] -> Let -> Flow t0 Type
+ Hydra.Checking: typeOfLet :: Context -> Graph -> [Type] -> Let -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfList :: TypeContext -> [Type] -> [Term] -> Flow t0 Type
+ Hydra.Checking: typeOfList :: Context -> Graph -> [Type] -> [Term] -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfLiteral :: TypeContext -> [Type] -> Literal -> Flow t0 Type
+ Hydra.Checking: typeOfLiteral :: Context -> Graph -> [Type] -> Literal -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfMap :: TypeContext -> [Type] -> Map Term Term -> Flow t0 Type
+ Hydra.Checking: typeOfMap :: Context -> Graph -> [Type] -> Map Term Term -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfMaybe :: TypeContext -> [Type] -> Maybe Term -> Flow t0 Type
+ Hydra.Checking: typeOfMaybe :: Context -> Graph -> [Type] -> Maybe Term -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfPair :: TypeContext -> [Type] -> (Term, Term) -> Flow t0 Type
+ Hydra.Checking: typeOfPair :: Context -> Graph -> [Type] -> (Term, Term) -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfPrimitive :: TypeContext -> [Type] -> Name -> Flow t0 Type
+ Hydra.Checking: typeOfPrimitive :: Context -> Graph -> [Type] -> Name -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfProjection :: TypeContext -> [Type] -> Projection -> Flow t0 Type
+ Hydra.Checking: typeOfProjection :: Context -> Graph -> [Type] -> Projection -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfRecord :: TypeContext -> [Type] -> Record -> Flow t0 Type
+ Hydra.Checking: typeOfRecord :: Context -> Graph -> [Type] -> Record -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfSet :: TypeContext -> [Type] -> Set Term -> Flow t0 Type
+ Hydra.Checking: typeOfSet :: Context -> Graph -> [Type] -> Set Term -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfTypeApplication :: TypeContext -> [Type] -> TypeApplicationTerm -> Flow t0 Type
+ Hydra.Checking: typeOfTypeApplication :: Context -> Graph -> [Type] -> TypeApplicationTerm -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfTypeLambda :: TypeContext -> [Type] -> TypeLambda -> Flow t0 Type
+ Hydra.Checking: typeOfTypeLambda :: Context -> Graph -> [Type] -> TypeLambda -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfUnit :: TypeContext -> [Type] -> Flow t0 Type
+ Hydra.Checking: typeOfUnit :: Context -> Graph -> [Type] -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfUnwrap :: TypeContext -> [Type] -> Name -> Flow t0 Type
+ Hydra.Checking: typeOfUnwrap :: Context -> Graph -> [Type] -> Name -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfVariable :: TypeContext -> [Type] -> Name -> Flow t0 Type
+ Hydra.Checking: typeOfVariable :: Context -> Graph -> [Type] -> Name -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typeOfWrappedTerm :: TypeContext -> [Type] -> WrappedTerm -> Flow t0 Type
+ Hydra.Checking: typeOfWrappedTerm :: Context -> Graph -> [Type] -> WrappedTerm -> Either (InContext Error) (Type, Context)
- Hydra.Checking: typesAllEffectivelyEqual :: TypeContext -> [Type] -> Bool
+ Hydra.Checking: typesAllEffectivelyEqual :: Graph -> [Type] -> Bool
- Hydra.Checking: typesEffectivelyEqual :: TypeContext -> Type -> Type -> Bool
+ Hydra.Checking: typesEffectivelyEqual :: Graph -> Type -> Type -> Bool
- Hydra.CodeGeneration: formatTypeBinding :: Binding -> Flow Graph String
+ Hydra.CodeGeneration: formatTypeBinding :: Graph -> Binding -> Either DecodingError String
- Hydra.CodeGeneration: generateCoderModules :: (t0 -> Flow Graph (Maybe t1)) -> Graph -> [Module] -> [t0] -> Flow t2 [t1]
+ Hydra.CodeGeneration: generateCoderModules :: (t0 -> Graph -> t1 -> Either t2 (Maybe t3)) -> Graph -> [Module] -> [t1] -> t0 -> Either t2 [t3]
- Hydra.CodeGeneration: generateLexicon :: Graph -> Flow Graph String
+ Hydra.CodeGeneration: generateLexicon :: Graph -> Either DecodingError String
- Hydra.CodeGeneration: generateSourceFiles :: Ord t0 => (Module -> [Definition] -> Flow Graph (Map t0 t1)) -> Language -> Bool -> Bool -> Bool -> Bool -> Graph -> [Module] -> [Module] -> Flow Graph [(t0, t1)]
+ Hydra.CodeGeneration: generateSourceFiles :: Ord t0 => (Module -> [Definition] -> Context -> Graph -> Either (InContext Error) (Map t0 t1)) -> Language -> Bool -> Bool -> Bool -> Bool -> Graph -> [Module] -> [Module] -> Context -> Either (InContext Error) [(t0, t1)]
- Hydra.CodeGeneration: inferAndGenerateLexicon :: Graph -> [Module] -> Flow t0 String
+ Hydra.CodeGeneration: inferAndGenerateLexicon :: Context -> Graph -> [Module] -> Either String String
- Hydra.CodeGeneration: inferModules :: Graph -> [Module] -> [Module] -> Flow t0 [Module]
+ Hydra.CodeGeneration: inferModules :: Context -> Graph -> [Module] -> [Module] -> Either (InContext Error) [Module]
- Hydra.CoderUtils: analyzeFunctionTerm :: (t0 -> TypeContext) -> (TypeContext -> t0 -> t0) -> t0 -> Term -> Flow t1 (FunctionStructure t0)
+ Hydra.CoderUtils: analyzeFunctionTerm :: Context -> (t0 -> Graph) -> (Graph -> t0 -> t0) -> t0 -> Term -> Either t1 (FunctionStructure t0)
- Hydra.CoderUtils: analyzeFunctionTermWith :: (TypeContext -> Binding -> Maybe Term) -> (t0 -> TypeContext) -> (TypeContext -> t0 -> t0) -> t0 -> Term -> Flow t1 (FunctionStructure t0)
+ Hydra.CoderUtils: analyzeFunctionTermWith :: Context -> (Graph -> Binding -> Maybe Term) -> (t0 -> Graph) -> (Graph -> t0 -> t0) -> t0 -> Term -> Either t1 (FunctionStructure t0)
- Hydra.CoderUtils: analyzeFunctionTermWith_finish :: (t0 -> TypeContext) -> t0 -> [Name] -> [Name] -> [Binding] -> [Type] -> [Type] -> Term -> Flow t1 (FunctionStructure t0)
+ Hydra.CoderUtils: analyzeFunctionTermWith_finish :: Context -> (t0 -> Graph) -> t0 -> [Name] -> [Name] -> [Binding] -> [Type] -> [Type] -> Term -> Either t1 (FunctionStructure t0)
- Hydra.CoderUtils: analyzeFunctionTermWith_gather :: (TypeContext -> Binding -> Maybe Term) -> (t0 -> TypeContext) -> (TypeContext -> t0 -> t0) -> Bool -> t0 -> [Name] -> [Name] -> [Binding] -> [Type] -> [Type] -> Term -> Flow t1 (FunctionStructure t0)
+ Hydra.CoderUtils: analyzeFunctionTermWith_gather :: Context -> (Graph -> Binding -> Maybe Term) -> (t0 -> Graph) -> (Graph -> t0 -> t0) -> Bool -> t0 -> [Name] -> [Name] -> [Binding] -> [Type] -> [Type] -> Term -> Either t1 (FunctionStructure t0)
- Hydra.CoderUtils: bindingMetadata :: TypeContext -> Binding -> Maybe Term
+ Hydra.CoderUtils: bindingMetadata :: Graph -> Binding -> Maybe Term
- Hydra.CoderUtils: commentsFromFieldType :: FieldType -> Flow Graph (Maybe String)
+ Hydra.CoderUtils: commentsFromFieldType :: Context -> Graph -> FieldType -> Either (InContext Error) (Maybe String)
- Hydra.CoderUtils: isComplexBinding :: TypeContext -> Binding -> Bool
+ Hydra.CoderUtils: isComplexBinding :: Graph -> Binding -> Bool
- Hydra.CoderUtils: isComplexTerm :: TypeContext -> Term -> Bool
+ Hydra.CoderUtils: isComplexTerm :: Graph -> Term -> Bool
- Hydra.CoderUtils: isComplexVariable :: TypeContext -> Name -> Bool
+ Hydra.CoderUtils: isComplexVariable :: Graph -> Name -> Bool
- Hydra.Coders: AdapterContext :: Graph -> Language -> Map Name (Adapter AdapterContext AdapterContext Type Type Term Term) -> AdapterContext
+ Hydra.Coders: AdapterContext :: Graph -> Language -> Map Name (Adapter Type Type Term Term) -> AdapterContext
- Hydra.Coders: [adapterContextAdapters] :: AdapterContext -> Map Name (Adapter AdapterContext AdapterContext Type Type Term Term)
+ Hydra.Coders: [adapterContextAdapters] :: AdapterContext -> Map Name (Adapter Type Type Term Term)
- Hydra.Coders: type SymmetricAdapter s t v = Adapter s s t t v v
+ Hydra.Coders: type SymmetricAdapter t v = Adapter t t v v
- Hydra.Coders: type TypeAdapter = Type -> Flow AdapterContext SymmetricAdapter AdapterContext Type Term
+ Hydra.Coders: type TypeAdapter = AdapterContext -> Type -> Either String SymmetricAdapter Type Term
- Hydra.Core: TypeRecord :: RowType -> Type
+ Hydra.Core: TypeRecord :: [FieldType] -> Type
- Hydra.Core: TypeUnion :: RowType -> Type
+ Hydra.Core: TypeUnion :: [FieldType] -> Type
- Hydra.Core: TypeWrap :: WrappedType -> Type
+ Hydra.Core: TypeWrap :: Type -> Type
- Hydra.Decoding: decodeBinding :: Binding -> Flow Graph Binding
+ Hydra.Decoding: decodeBinding :: Context -> Graph -> Binding -> Either (InContext DecodingError) Binding
- Hydra.Decoding: decodeModule :: Module -> Flow Graph (Maybe Module)
+ Hydra.Decoding: decodeModule :: Context -> Graph -> Module -> Either (InContext Error) (Maybe Module)
- Hydra.Decoding: decodeRecordType :: RowType -> Term
+ Hydra.Decoding: decodeRecordType :: [FieldType] -> Term
- Hydra.Decoding: decodeUnionType :: RowType -> Term
+ Hydra.Decoding: decodeUnionType :: [FieldType] -> Term
- Hydra.Decoding: decodeWrappedType :: WrappedType -> Term
+ Hydra.Decoding: decodeWrappedType :: Type -> Term
- Hydra.Decoding: filterTypeBindings :: [Binding] -> Flow Graph [Binding]
+ Hydra.Decoding: filterTypeBindings :: Context -> Graph -> [Binding] -> Either (InContext Error) [Binding]
- Hydra.Decoding: isDecodableBinding :: Binding -> Flow Graph (Maybe Binding)
+ Hydra.Decoding: isDecodableBinding :: Context -> Graph -> Binding -> Either (InContext Error) (Maybe Binding)
- Hydra.Dsl.Meta.Core: fieldWithTerm :: TTerm Term -> TTerm Field -> TTerm Field
+ Hydra.Dsl.Meta.Core: fieldWithTerm :: TTerm Field -> TTerm Term -> TTerm Field
- Hydra.Dsl.Meta.Core: typeRecord :: TTerm RowType -> TTerm Type
+ Hydra.Dsl.Meta.Core: typeRecord :: TTerm [FieldType] -> TTerm Type
- Hydra.Dsl.Meta.Core: typeUnion :: TTerm RowType -> TTerm Type
+ Hydra.Dsl.Meta.Core: typeUnion :: TTerm [FieldType] -> TTerm Type
- Hydra.Dsl.Meta.Core: typeWrap :: TTerm WrappedType -> TTerm Type
+ Hydra.Dsl.Meta.Core: typeWrap :: TTerm Type -> TTerm Type
- Hydra.Dsl.Meta.Graph: graph :: TTerm [Binding] -> TTerm (Map Name (Maybe Term)) -> TTerm (Map Name TypeScheme) -> TTerm Term -> TTerm (Map Name Primitive) -> TTerm (Maybe Graph) -> TTerm Graph
+ Hydra.Dsl.Meta.Graph: graph :: TTerm (Map Name Term) -> TTerm (Map Name TypeScheme) -> TTerm (Map Name TypeVariableMetadata) -> TTerm (Set Name) -> TTerm (Map Name Term) -> TTerm (Map Name Primitive) -> TTerm (Map Name TypeScheme) -> TTerm (Set Name) -> TTerm Graph
- Hydra.Dsl.Meta.Graph: primitive :: TTerm Name -> TTerm TypeScheme -> TTerm ([Term] -> Flow Graph Term) -> TTerm Primitive
+ Hydra.Dsl.Meta.Graph: primitive :: TTerm Name -> TTerm TypeScheme -> TTerm (Context -> Graph -> [Term] -> Either (InContext Error) Term) -> TTerm Primitive
- Hydra.Dsl.Meta.Graph: primitiveImplementation :: TTerm Primitive -> TTerm ([Term] -> Flow Graph Term)
+ Hydra.Dsl.Meta.Graph: primitiveImplementation :: TTerm Primitive -> TTerm (Context -> Graph -> [Term] -> Either (InContext Error) Term)
- Hydra.Dsl.Meta.Phantoms: (<<~) :: AsTerm t (Flow s a) => String -> t -> TTerm (Flow s b) -> TTerm (Flow s b)
+ Hydra.Dsl.Meta.Phantoms: (<<~) :: AsTerm t (Either e a) => String -> t -> TTerm (Either e b) -> TTerm (Either e b)
- Hydra.Dsl.Prims: functionWithReduce :: (Term -> Flow Graph Term) -> TermCoder x -> TermCoder y -> TermCoder (x -> y)
+ Hydra.Dsl.Prims: functionWithReduce :: (Context -> Graph -> Term -> Either (InContext Error) Term) -> TermCoder x -> TermCoder y -> TermCoder (x -> y)
- Hydra.Dsl.Tabular: columnType :: String -> Type -> ColumnType
+ Hydra.Dsl.Tabular: columnType :: TTerm ColumnName -> TTerm Type -> TTerm ColumnType
- Hydra.Dsl.Tabular: tableType :: String -> [ColumnType] -> TableType
+ Hydra.Dsl.Tabular: tableType :: TTerm RelationName -> TTerm [ColumnType] -> TTerm TableType
- Hydra.Encode.Relational: relationship :: (t0 -> Term) -> Relationship t0 -> Term
+ Hydra.Encode.Relational: relationship :: Ord t0 => (t0 -> Term) -> Relationship t0 -> Term
- Hydra.Encoding: encodeBinding :: Binding -> Flow Graph Binding
+ Hydra.Encoding: encodeBinding :: Context -> Graph -> Binding -> Either (InContext DecodingError) Binding
- Hydra.Encoding: encodeModule :: Module -> Flow Graph (Maybe Module)
+ Hydra.Encoding: encodeModule :: Context -> Graph -> Module -> Either (InContext Error) (Maybe Module)
- Hydra.Encoding: encodeRecordType :: RowType -> Term
+ Hydra.Encoding: encodeRecordType :: [FieldType] -> Term
- Hydra.Encoding: encodeUnionType :: RowType -> Term
+ Hydra.Encoding: encodeUnionType :: [FieldType] -> Term
- Hydra.Encoding: encodeWrappedType :: WrappedType -> Term
+ Hydra.Encoding: encodeWrappedType :: Type -> Term
- Hydra.Encoding: filterTypeBindings :: [Binding] -> Flow Graph [Binding]
+ Hydra.Encoding: filterTypeBindings :: Context -> Graph -> [Binding] -> Either (InContext Error) [Binding]
- Hydra.Encoding: isEncodableBinding :: Binding -> Flow Graph (Maybe Binding)
+ Hydra.Encoding: isEncodableBinding :: Context -> Graph -> Binding -> Either (InContext Error) (Maybe Binding)
- Hydra.Eval.Lib.Eithers: bimap :: Term -> Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Eithers: bimap :: Context -> t0 -> Term -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Eithers: bind :: Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Eithers: bind :: Context -> t0 -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Eithers: either :: Term -> Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Eithers: either :: Context -> t0 -> Term -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Eithers: map :: Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Eithers: map :: Context -> t0 -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Eithers: mapList :: Term -> Term -> Flow Graph Term
+ Hydra.Eval.Lib.Eithers: mapList :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Eithers: mapMaybe :: Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Eithers: mapMaybe :: Context -> t0 -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Lists: apply :: Term -> Term -> Flow Graph Term
+ Hydra.Eval.Lib.Lists: apply :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Lists: bind :: Term -> Term -> Flow Graph Term
+ Hydra.Eval.Lib.Lists: bind :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Lists: dropWhile :: Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Lists: dropWhile :: t0 -> t1 -> Term -> Term -> Either t2 Term
- Hydra.Eval.Lib.Lists: filter :: Term -> Term -> Flow Graph Term
+ Hydra.Eval.Lib.Lists: filter :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Lists: find :: Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Lists: find :: t0 -> t1 -> Term -> Term -> Either t2 Term
- Hydra.Eval.Lib.Lists: foldl :: Term -> Term -> Term -> Flow Graph Term
+ Hydra.Eval.Lib.Lists: foldl :: Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Lists: map :: Term -> Term -> Flow Graph Term
+ Hydra.Eval.Lib.Lists: map :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Lists: partition :: Term -> Term -> Flow Graph Term
+ Hydra.Eval.Lib.Lists: partition :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Lists: sortOn :: Term -> Term -> Flow Graph Term
+ Hydra.Eval.Lib.Lists: sortOn :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Lists: span :: Term -> Term -> Flow Graph Term
+ Hydra.Eval.Lib.Lists: span :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Lists: zipWith :: Term -> Term -> Term -> Flow Graph Term
+ Hydra.Eval.Lib.Lists: zipWith :: Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Maps: alter :: Term -> Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Maps: alter :: Context -> t0 -> Term -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Maps: bimap :: Term -> Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Maps: bimap :: Context -> t0 -> Term -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Maps: filter :: Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Maps: filter :: Context -> t0 -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Maps: filterWithKey :: Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Maps: filterWithKey :: Context -> t0 -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Maps: map :: Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Maps: map :: Context -> t0 -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Maps: mapKeys :: Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Maps: mapKeys :: Context -> t0 -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Maybes: apply :: Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Maybes: apply :: Context -> t0 -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Maybes: bind :: Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Maybes: bind :: Context -> t0 -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Maybes: cases :: Term -> Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Maybes: cases :: Context -> t0 -> Term -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Maybes: compose :: Term -> Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Maybes: compose :: t0 -> t1 -> Term -> Term -> Term -> Either t2 Term
- Hydra.Eval.Lib.Maybes: map :: Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Maybes: map :: Context -> t0 -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Maybes: mapMaybe :: Term -> Term -> Flow Graph Term
+ Hydra.Eval.Lib.Maybes: mapMaybe :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Maybes: maybe :: Term -> Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Maybes: maybe :: Context -> t0 -> Term -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Pairs: bimap :: Term -> Term -> Term -> Flow t0 Term
+ Hydra.Eval.Lib.Pairs: bimap :: Context -> t0 -> Term -> Term -> Term -> Either (InContext Error) Term
- Hydra.Eval.Lib.Sets: map :: Term -> Term -> Flow Graph Term
+ Hydra.Eval.Lib.Sets: map :: Context -> Graph -> Term -> Term -> Either (InContext Error) Term
- Hydra.Ext.Haskell.Coder: adaptTypeToHaskellAndEncode :: Namespaces ModuleName -> Type -> Flow Graph Type
+ Hydra.Ext.Haskell.Coder: adaptTypeToHaskellAndEncode :: Namespaces ModuleName -> Type -> Context -> t0 -> Either (InContext Error) Type
- Hydra.Ext.Haskell.Coder: constructModule :: Namespaces ModuleName -> Module -> [Definition] -> Flow Graph Module
+ Hydra.Ext.Haskell.Coder: constructModule :: Namespaces ModuleName -> Module -> [Definition] -> Context -> Graph -> Either (InContext Error) Module
- Hydra.Ext.Haskell.Coder: encodeFunction :: Namespaces ModuleName -> Function -> Flow Graph Expression
+ Hydra.Ext.Haskell.Coder: encodeFunction :: Int -> Namespaces ModuleName -> Function -> Context -> Graph -> Either (InContext Error) Expression
- Hydra.Ext.Haskell.Coder: encodeLiteral :: Literal -> Flow t0 Expression
+ Hydra.Ext.Haskell.Coder: encodeLiteral :: Literal -> Context -> Either (InContext Error) Expression
- Hydra.Ext.Haskell.Coder: encodeTerm :: Namespaces ModuleName -> Term -> Flow Graph Expression
+ Hydra.Ext.Haskell.Coder: encodeTerm :: Int -> Namespaces ModuleName -> Term -> Context -> Graph -> Either (InContext Error) Expression
- Hydra.Ext.Haskell.Coder: encodeType :: Namespaces ModuleName -> Type -> Flow t0 Type
+ Hydra.Ext.Haskell.Coder: encodeType :: Namespaces ModuleName -> Type -> Context -> t0 -> Either (InContext Error) Type
- Hydra.Ext.Haskell.Coder: encodeTypeWithClassAssertions :: Namespaces ModuleName -> Map Name (Set TypeClass) -> Type -> Flow Graph Type
+ Hydra.Ext.Haskell.Coder: encodeTypeWithClassAssertions :: Namespaces ModuleName -> Map Name (Set TypeClass) -> Type -> Context -> t0 -> Either (InContext Error) Type
- Hydra.Ext.Haskell.Coder: moduleToHaskell :: Module -> [Definition] -> Flow Graph (Map String String)
+ Hydra.Ext.Haskell.Coder: moduleToHaskell :: Module -> [Definition] -> Context -> Graph -> Either (InContext Error) (Map String String)
- Hydra.Ext.Haskell.Coder: moduleToHaskellModule :: Module -> [Definition] -> Flow Graph Module
+ Hydra.Ext.Haskell.Coder: moduleToHaskellModule :: Module -> [Definition] -> Context -> Graph -> Either (InContext Error) Module
- Hydra.Ext.Haskell.Coder: nameDecls :: t0 -> Namespaces ModuleName -> Name -> Type -> [DeclarationWithComments]
+ Hydra.Ext.Haskell.Coder: nameDecls :: Namespaces ModuleName -> Name -> Type -> [DeclarationWithComments]
- Hydra.Ext.Haskell.Coder: toDataDeclaration :: Namespaces ModuleName -> TermDefinition -> Flow Graph DeclarationWithComments
+ Hydra.Ext.Haskell.Coder: toDataDeclaration :: Namespaces ModuleName -> TermDefinition -> Context -> Graph -> Either (InContext Error) DeclarationWithComments
- Hydra.Ext.Haskell.Coder: toTypeDeclarationsFrom :: Namespaces ModuleName -> Name -> Type -> Flow Graph [DeclarationWithComments]
+ Hydra.Ext.Haskell.Coder: toTypeDeclarationsFrom :: Namespaces ModuleName -> Name -> Type -> Context -> Graph -> Either (InContext Error) [DeclarationWithComments]
- Hydra.Ext.Haskell.Coder: typeDecl :: Namespaces ModuleName -> Name -> Type -> Flow Graph DeclarationWithComments
+ Hydra.Ext.Haskell.Coder: typeDecl :: Namespaces ModuleName -> Name -> Type -> Context -> Graph -> Either (InContext Error) DeclarationWithComments
- Hydra.Ext.Haskell.Utils: namespacesForModule :: Module -> Flow Graph (Namespaces ModuleName)
+ Hydra.Ext.Haskell.Utils: namespacesForModule :: Module -> Context -> Graph -> Either (InContext Error) (Namespaces ModuleName)
- Hydra.Ext.Haskell.Utils: unionFieldReference :: Graph -> Namespaces ModuleName -> Name -> Name -> Name
+ Hydra.Ext.Haskell.Utils: unionFieldReference :: Set Name -> Namespaces ModuleName -> Name -> Name -> Name
- Hydra.Ext.Haskell.Utils: unpackForallType :: t0 -> Type -> ([Name], Type)
+ Hydra.Ext.Haskell.Utils: unpackForallType :: Type -> ([Name], Type)
- Hydra.Ext.Org.Json.Decoding: decodeArray :: (Value -> Flow t0 t1) -> Value -> Flow t0 [t1]
+ Hydra.Ext.Org.Json.Decoding: decodeArray :: (Value -> Either String t0) -> Value -> Either String [t0]
- Hydra.Ext.Org.Json.Decoding: decodeBoolean :: Value -> Flow t0 Bool
+ Hydra.Ext.Org.Json.Decoding: decodeBoolean :: Value -> Either String Bool
- Hydra.Ext.Org.Json.Decoding: decodeField :: (t0 -> Flow t1 t2) -> String -> Map String t0 -> Flow t1 t2
+ Hydra.Ext.Org.Json.Decoding: decodeField :: (t0 -> Either String t1) -> String -> Map String t0 -> Either String t1
- Hydra.Ext.Org.Json.Decoding: decodeObject :: Value -> Flow t0 (Map String Value)
+ Hydra.Ext.Org.Json.Decoding: decodeObject :: Value -> Either String (Map String Value)
- Hydra.Ext.Org.Json.Decoding: decodeOptionalField :: Ord t3 => (t0 -> Flow t1 t2) -> t3 -> Map t3 t0 -> Flow t1 (Maybe t2)
+ Hydra.Ext.Org.Json.Decoding: decodeOptionalField :: Ord t3 => (t0 -> Either t1 t2) -> t3 -> Map t3 t0 -> Either t1 (Maybe t2)
- Hydra.Ext.Org.Json.Decoding: decodeString :: Value -> Flow t0 String
+ Hydra.Ext.Org.Json.Decoding: decodeString :: Value -> Either String String
- Hydra.Extract.Core: bigfloat :: Term -> Flow Graph Double
+ Hydra.Extract.Core: bigfloat :: Context -> Graph -> Term -> Either (InContext Error) Double
- Hydra.Extract.Core: bigfloatValue :: FloatValue -> Flow t0 Double
+ Hydra.Extract.Core: bigfloatValue :: Context -> FloatValue -> Either (InContext Error) Double
- Hydra.Extract.Core: bigint :: Term -> Flow Graph Integer
+ Hydra.Extract.Core: bigint :: Context -> Graph -> Term -> Either (InContext Error) Integer
- Hydra.Extract.Core: bigintValue :: IntegerValue -> Flow t0 Integer
+ Hydra.Extract.Core: bigintValue :: Context -> IntegerValue -> Either (InContext Error) Integer
- Hydra.Extract.Core: binary :: Term -> Flow Graph ByteString
+ Hydra.Extract.Core: binary :: Context -> Graph -> Term -> Either (InContext Error) ByteString
- Hydra.Extract.Core: binaryLiteral :: Literal -> Flow t0 ByteString
+ Hydra.Extract.Core: binaryLiteral :: Context -> Literal -> Either (InContext Error) ByteString
- Hydra.Extract.Core: boolean :: Term -> Flow Graph Bool
+ Hydra.Extract.Core: boolean :: Context -> Graph -> Term -> Either (InContext Error) Bool
- Hydra.Extract.Core: booleanLiteral :: Literal -> Flow t0 Bool
+ Hydra.Extract.Core: booleanLiteral :: Context -> Literal -> Either (InContext Error) Bool
- Hydra.Extract.Core: caseField :: Name -> String -> Term -> Flow Graph Field
+ Hydra.Extract.Core: caseField :: Context -> Name -> String -> Graph -> Term -> Either (InContext Error) Field
- Hydra.Extract.Core: cases :: Name -> Term -> Flow Graph CaseStatement
+ Hydra.Extract.Core: cases :: Context -> Name -> Graph -> Term -> Either (InContext Error) CaseStatement
- Hydra.Extract.Core: eitherTerm :: (Term -> Flow Graph t0) -> (Term -> Flow Graph t1) -> Term -> Flow Graph (Either t0 t1)
+ Hydra.Extract.Core: eitherTerm :: Context -> (Term -> Either (InContext Error) t0) -> (Term -> Either (InContext Error) t1) -> Graph -> Term -> Either (InContext Error) (Either t0 t1)
- Hydra.Extract.Core: eitherType :: Type -> Flow t0 EitherType
+ Hydra.Extract.Core: eitherType :: Context -> Type -> Either (InContext Error) EitherType
- Hydra.Extract.Core: field :: Name -> (Term -> Flow Graph t0) -> [Field] -> Flow Graph t0
+ Hydra.Extract.Core: field :: Context -> Name -> (Term -> Either (InContext Error) t0) -> Graph -> [Field] -> Either (InContext Error) t0
- Hydra.Extract.Core: float32 :: Term -> Flow Graph Float
+ Hydra.Extract.Core: float32 :: Context -> Graph -> Term -> Either (InContext Error) Float
- Hydra.Extract.Core: float32Value :: FloatValue -> Flow t0 Float
+ Hydra.Extract.Core: float32Value :: Context -> FloatValue -> Either (InContext Error) Float
- Hydra.Extract.Core: float64 :: Term -> Flow Graph Double
+ Hydra.Extract.Core: float64 :: Context -> Graph -> Term -> Either (InContext Error) Double
- Hydra.Extract.Core: float64Value :: FloatValue -> Flow t0 Double
+ Hydra.Extract.Core: float64Value :: Context -> FloatValue -> Either (InContext Error) Double
- Hydra.Extract.Core: floatLiteral :: Literal -> Flow t0 FloatValue
+ Hydra.Extract.Core: floatLiteral :: Context -> Literal -> Either (InContext Error) FloatValue
- Hydra.Extract.Core: floatValue :: Term -> Flow Graph FloatValue
+ Hydra.Extract.Core: floatValue :: Context -> Graph -> Term -> Either (InContext Error) FloatValue
- Hydra.Extract.Core: functionType :: Type -> Flow t0 FunctionType
+ Hydra.Extract.Core: functionType :: Context -> Type -> Either (InContext Error) FunctionType
- Hydra.Extract.Core: injection :: Name -> Term -> Flow Graph Field
+ Hydra.Extract.Core: injection :: Context -> Name -> Graph -> Term -> Either (InContext Error) Field
- Hydra.Extract.Core: int16 :: Term -> Flow Graph Int16
+ Hydra.Extract.Core: int16 :: Context -> Graph -> Term -> Either (InContext Error) Int16
- Hydra.Extract.Core: int16Value :: IntegerValue -> Flow t0 Int16
+ Hydra.Extract.Core: int16Value :: Context -> IntegerValue -> Either (InContext Error) Int16
- Hydra.Extract.Core: int32 :: Term -> Flow Graph Int
+ Hydra.Extract.Core: int32 :: Context -> Graph -> Term -> Either (InContext Error) Int
- Hydra.Extract.Core: int32Value :: IntegerValue -> Flow t0 Int
+ Hydra.Extract.Core: int32Value :: Context -> IntegerValue -> Either (InContext Error) Int
- Hydra.Extract.Core: int64 :: Term -> Flow Graph Int64
+ Hydra.Extract.Core: int64 :: Context -> Graph -> Term -> Either (InContext Error) Int64
- Hydra.Extract.Core: int64Value :: IntegerValue -> Flow t0 Int64
+ Hydra.Extract.Core: int64Value :: Context -> IntegerValue -> Either (InContext Error) Int64
- Hydra.Extract.Core: int8 :: Term -> Flow Graph Int8
+ Hydra.Extract.Core: int8 :: Context -> Graph -> Term -> Either (InContext Error) Int8
- Hydra.Extract.Core: int8Value :: IntegerValue -> Flow t0 Int8
+ Hydra.Extract.Core: int8Value :: Context -> IntegerValue -> Either (InContext Error) Int8
- Hydra.Extract.Core: integerLiteral :: Literal -> Flow t0 IntegerValue
+ Hydra.Extract.Core: integerLiteral :: Context -> Literal -> Either (InContext Error) IntegerValue
- Hydra.Extract.Core: integerValue :: Term -> Flow Graph IntegerValue
+ Hydra.Extract.Core: integerValue :: Context -> Graph -> Term -> Either (InContext Error) IntegerValue
- Hydra.Extract.Core: lambda :: Term -> Flow Graph Lambda
+ Hydra.Extract.Core: lambda :: Context -> Graph -> Term -> Either (InContext Error) Lambda
- Hydra.Extract.Core: lambdaBody :: Term -> Flow Graph Term
+ Hydra.Extract.Core: lambdaBody :: Context -> Graph -> Term -> Either (InContext Error) Term
- Hydra.Extract.Core: letBinding :: String -> Term -> Flow Graph Term
+ Hydra.Extract.Core: letBinding :: Context -> String -> Graph -> Term -> Either (InContext Error) Term
- Hydra.Extract.Core: let_ :: Term -> Flow Graph Let
+ Hydra.Extract.Core: let_ :: Context -> Graph -> Term -> Either (InContext Error) Let
- Hydra.Extract.Core: list :: Term -> Flow Graph [Term]
+ Hydra.Extract.Core: list :: Context -> Graph -> Term -> Either (InContext Error) [Term]
- Hydra.Extract.Core: listHead :: Term -> Flow Graph Term
+ Hydra.Extract.Core: listHead :: Context -> Graph -> Term -> Either (InContext Error) Term
- Hydra.Extract.Core: listOf :: (Term -> Flow Graph t0) -> Term -> Flow Graph [t0]
+ Hydra.Extract.Core: listOf :: Context -> (Term -> Either (InContext Error) t0) -> Graph -> Term -> Either (InContext Error) [t0]
- Hydra.Extract.Core: listType :: Type -> Flow t0 Type
+ Hydra.Extract.Core: listType :: Context -> Type -> Either (InContext Error) Type
- Hydra.Extract.Core: literal :: Term -> Flow Graph Literal
+ Hydra.Extract.Core: literal :: Context -> Graph -> Term -> Either (InContext Error) Literal
- Hydra.Extract.Core: map :: Ord t0 => (Term -> Flow Graph t0) -> (Term -> Flow Graph t1) -> Term -> Flow Graph (Map t0 t1)
+ Hydra.Extract.Core: map :: Ord t0 => Context -> (Term -> Either (InContext Error) t0) -> (Term -> Either (InContext Error) t1) -> Graph -> Term -> Either (InContext Error) (Map t0 t1)
- Hydra.Extract.Core: mapType :: Type -> Flow t0 MapType
+ Hydra.Extract.Core: mapType :: Context -> Type -> Either (InContext Error) MapType
- Hydra.Extract.Core: maybeTerm :: (Term -> Flow Graph t0) -> Term -> Flow Graph (Maybe t0)
+ Hydra.Extract.Core: maybeTerm :: Context -> (Term -> Either (InContext Error) t0) -> Graph -> Term -> Either (InContext Error) (Maybe t0)
- Hydra.Extract.Core: maybeType :: Type -> Flow t0 Type
+ Hydra.Extract.Core: maybeType :: Context -> Type -> Either (InContext Error) Type
- Hydra.Extract.Core: nArgs :: Name -> Int -> [t0] -> Flow t1 ()
+ Hydra.Extract.Core: nArgs :: Context -> Name -> Int -> [t0] -> Either (InContext Error) ()
- Hydra.Extract.Core: pair :: (Term -> Flow Graph t0) -> (Term -> Flow Graph t1) -> Term -> Flow Graph (t0, t1)
+ Hydra.Extract.Core: pair :: Context -> (Term -> Either (InContext Error) t0) -> (Term -> Either (InContext Error) t1) -> Graph -> Term -> Either (InContext Error) (t0, t1)
- Hydra.Extract.Core: record :: Name -> Term -> Flow Graph [Field]
+ Hydra.Extract.Core: record :: Context -> Name -> Graph -> Term -> Either (InContext Error) [Field]
- Hydra.Extract.Core: recordType :: Name -> Type -> Flow t0 [FieldType]
+ Hydra.Extract.Core: recordType :: Context -> t0 -> Type -> Either (InContext Error) [FieldType]
- Hydra.Extract.Core: set :: Term -> Flow Graph (Set Term)
+ Hydra.Extract.Core: set :: Context -> Graph -> Term -> Either (InContext Error) (Set Term)
- Hydra.Extract.Core: setOf :: Ord t0 => (Term -> Flow Graph t0) -> Term -> Flow Graph (Set t0)
+ Hydra.Extract.Core: setOf :: Ord t0 => Context -> (Term -> Either (InContext Error) t0) -> Graph -> Term -> Either (InContext Error) (Set t0)
- Hydra.Extract.Core: setType :: Type -> Flow t0 Type
+ Hydra.Extract.Core: setType :: Context -> Type -> Either (InContext Error) Type
- Hydra.Extract.Core: string :: Term -> Flow Graph String
+ Hydra.Extract.Core: string :: Context -> Graph -> Term -> Either (InContext Error) String
- Hydra.Extract.Core: stringLiteral :: Literal -> Flow t0 String
+ Hydra.Extract.Core: stringLiteral :: Context -> Literal -> Either (InContext Error) String
- Hydra.Extract.Core: termRecord :: Term -> Flow Graph Record
+ Hydra.Extract.Core: termRecord :: Context -> Graph -> Term -> Either (InContext Error) Record
- Hydra.Extract.Core: uint16 :: Term -> Flow Graph Int
+ Hydra.Extract.Core: uint16 :: Context -> Graph -> Term -> Either (InContext Error) Int
- Hydra.Extract.Core: uint16Value :: IntegerValue -> Flow t0 Int
+ Hydra.Extract.Core: uint16Value :: Context -> IntegerValue -> Either (InContext Error) Int
- Hydra.Extract.Core: uint32 :: Term -> Flow Graph Int64
+ Hydra.Extract.Core: uint32 :: Context -> Graph -> Term -> Either (InContext Error) Int64
- Hydra.Extract.Core: uint32Value :: IntegerValue -> Flow t0 Int64
+ Hydra.Extract.Core: uint32Value :: Context -> IntegerValue -> Either (InContext Error) Int64
- Hydra.Extract.Core: uint64 :: Term -> Flow Graph Integer
+ Hydra.Extract.Core: uint64 :: Context -> Graph -> Term -> Either (InContext Error) Integer
- Hydra.Extract.Core: uint64Value :: IntegerValue -> Flow t0 Integer
+ Hydra.Extract.Core: uint64Value :: Context -> IntegerValue -> Either (InContext Error) Integer
- Hydra.Extract.Core: uint8 :: Term -> Flow Graph Int16
+ Hydra.Extract.Core: uint8 :: Context -> Graph -> Term -> Either (InContext Error) Int16
- Hydra.Extract.Core: uint8Value :: IntegerValue -> Flow t0 Int16
+ Hydra.Extract.Core: uint8Value :: Context -> IntegerValue -> Either (InContext Error) Int16
- Hydra.Extract.Core: unionType :: Name -> Type -> Flow t0 [FieldType]
+ Hydra.Extract.Core: unionType :: Context -> t0 -> Type -> Either (InContext Error) [FieldType]
- Hydra.Extract.Core: unit :: Term -> Flow t0 ()
+ Hydra.Extract.Core: unit :: Context -> Term -> Either (InContext Error) ()
- Hydra.Extract.Core: unitVariant :: Name -> Term -> Flow Graph Name
+ Hydra.Extract.Core: unitVariant :: Context -> Name -> Graph -> Term -> Either (InContext Error) Name
- Hydra.Extract.Core: wrap :: Name -> Term -> Flow Graph Term
+ Hydra.Extract.Core: wrap :: Context -> Name -> Graph -> Term -> Either (InContext Error) Term
- Hydra.Extract.Core: wrappedType :: Name -> Type -> Flow t0 Type
+ Hydra.Extract.Core: wrappedType :: Context -> t0 -> Type -> Either (InContext Error) Type
- Hydra.Extract.Json: expectArray :: Value -> Flow t0 [Value]
+ Hydra.Extract.Json: expectArray :: Value -> Either String [Value]
- Hydra.Extract.Json: expectNumber :: Value -> Flow t0 Double
+ Hydra.Extract.Json: expectNumber :: Value -> Either String Double
- Hydra.Extract.Json: expectObject :: Value -> Flow t0 (Map String Value)
+ Hydra.Extract.Json: expectObject :: Value -> Either String (Map String Value)
- Hydra.Extract.Json: expectString :: Value -> Flow t0 String
+ Hydra.Extract.Json: expectString :: Value -> Either String String
- Hydra.Extract.Json: optArray :: Ord t0 => t0 -> Map t0 Value -> Flow t1 (Maybe [Value])
+ Hydra.Extract.Json: optArray :: Ord t0 => t0 -> Map t0 Value -> Either String (Maybe [Value])
- Hydra.Extract.Json: optString :: Ord t0 => t0 -> Map t0 Value -> Flow t1 (Maybe String)
+ Hydra.Extract.Json: optString :: Ord t0 => t0 -> Map t0 Value -> Either String (Maybe String)
- Hydra.Extract.Json: require :: Ord t0 => t0 -> Map t0 t1 -> Flow t2 t1
+ Hydra.Extract.Json: require :: Ord t0 => t0 -> Map t0 t1 -> Either String t1
- Hydra.Extract.Json: requireArray :: Ord t0 => t0 -> Map t0 Value -> Flow t1 [Value]
+ Hydra.Extract.Json: requireArray :: Ord t0 => t0 -> Map t0 Value -> Either String [Value]
- Hydra.Extract.Json: requireNumber :: Ord t0 => t0 -> Map t0 Value -> Flow t1 Double
+ Hydra.Extract.Json: requireNumber :: Ord t0 => t0 -> Map t0 Value -> Either String Double
- Hydra.Extract.Json: requireString :: Ord t0 => t0 -> Map t0 Value -> Flow t1 String
+ Hydra.Extract.Json: requireString :: Ord t0 => t0 -> Map t0 Value -> Either String String
- Hydra.Extract.Util: comparison :: Term -> Flow Graph Comparison
+ Hydra.Extract.Util: comparison :: Context -> Graph -> Term -> Either (InContext Error) Comparison
- Hydra.Generation: generateCoderModulesIO :: (Module -> Flow Graph (Maybe Module)) -> String -> [Module] -> [Module] -> IO [Module]
+ Hydra.Generation: generateCoderModulesIO :: (Context -> Graph -> Module -> Either (InContext Error) (Maybe Module)) -> String -> [Module] -> [Module] -> IO [Module]
- Hydra.Generation: generateSources :: (Module -> [Definition] -> Flow Graph (Map FilePath String)) -> Language -> Bool -> Bool -> Bool -> Bool -> FilePath -> [Module] -> [Module] -> IO ()
+ Hydra.Generation: generateSources :: (Module -> [Definition] -> Context -> Graph -> Either (InContext Error) (Map FilePath String)) -> Language -> Bool -> Bool -> Bool -> Bool -> FilePath -> [Module] -> [Module] -> IO Int
- Hydra.Generation: writeHaskell :: FilePath -> [Module] -> [Module] -> IO ()
+ Hydra.Generation: writeHaskell :: FilePath -> [Module] -> [Module] -> IO Int
- Hydra.Graph: Graph :: [Binding] -> Map Name (Maybe Term) -> Map Name TypeScheme -> Term -> Map Name Primitive -> Maybe Graph -> Graph
+ Hydra.Graph: Graph :: Map Name Term -> Map Name TypeScheme -> Map Name TypeVariableMetadata -> Set Name -> Map Name Term -> Map Name Primitive -> Map Name TypeScheme -> Set Name -> Graph
- Hydra.Graph: Primitive :: Name -> TypeScheme -> ([Term] -> Flow Graph Term) -> Primitive
+ Hydra.Graph: Primitive :: Name -> TypeScheme -> (Context -> Graph -> [Term] -> Either (InContext Error) Term) -> Primitive
- Hydra.Graph: TermCoder :: Type -> Coder Graph Graph Term a -> TermCoder a
+ Hydra.Graph: TermCoder :: Type -> (Context -> Graph -> Term -> Either (InContext Error) a) -> (Context -> a -> Either (InContext Error) Term) -> TermCoder a
- Hydra.Graph: [primitiveImplementation] :: Primitive -> [Term] -> Flow Graph Term
+ Hydra.Graph: [primitiveImplementation] :: Primitive -> Context -> Graph -> [Term] -> Either (InContext Error) Term
- Hydra.Hoisting: augmentBindingsWithNewFreeVars :: TypeContext -> Set Name -> [Binding] -> ([Binding], TermSubst)
+ Hydra.Hoisting: augmentBindingsWithNewFreeVars :: Graph -> Set Name -> [Binding] -> ([Binding], TermSubst)
- Hydra.Hoisting: bindingUsesContextTypeVars :: TypeContext -> Binding -> Bool
+ Hydra.Hoisting: bindingUsesContextTypeVars :: Graph -> Binding -> Bool
- Hydra.Hoisting: hoistCaseStatements :: TypeContext -> Term -> Term
+ Hydra.Hoisting: hoistCaseStatements :: Graph -> Term -> Term
- Hydra.Hoisting: hoistCaseStatementsInGraph :: Graph -> Flow t0 Graph
+ Hydra.Hoisting: hoistCaseStatementsInGraph :: [Binding] -> [Binding]
- Hydra.Hoisting: hoistLetBindingsWithContext :: (Binding -> Bool) -> TypeContext -> Let -> Let
+ Hydra.Hoisting: hoistLetBindingsWithContext :: (Binding -> Bool) -> Graph -> Let -> Let
- Hydra.Hoisting: hoistLetBindingsWithPredicate :: (Binding -> Bool) -> (TypeContext -> Binding -> Bool) -> TypeContext -> Let -> Let
+ Hydra.Hoisting: hoistLetBindingsWithPredicate :: (Binding -> Bool) -> (Graph -> Binding -> Bool) -> Graph -> Let -> Let
- Hydra.Hoisting: hoistSubterms :: (([TermAccessor], Term) -> Bool) -> TypeContext -> Term -> Term
+ Hydra.Hoisting: hoistSubterms :: (([SubtermStep], Term) -> Bool) -> Graph -> Term -> Term
- Hydra.Hoisting: isApplicationFunction :: TermAccessor -> Bool
+ Hydra.Hoisting: isApplicationFunction :: SubtermStep -> Bool
- Hydra.Hoisting: isLambdaBody :: TermAccessor -> Bool
+ Hydra.Hoisting: isLambdaBody :: SubtermStep -> Bool
- Hydra.Hoisting: normalizePathForHoisting :: [TermAccessor] -> [TermAccessor]
+ Hydra.Hoisting: normalizePathForHoisting :: [SubtermStep] -> [SubtermStep]
- Hydra.Hoisting: shouldHoistCaseStatement :: ([TermAccessor], Term) -> Bool
+ Hydra.Hoisting: shouldHoistCaseStatement :: ([SubtermStep], Term) -> Bool
- Hydra.Hoisting: shouldHoistPolymorphic :: TypeContext -> Binding -> Bool
+ Hydra.Hoisting: shouldHoistPolymorphic :: Graph -> Binding -> Bool
- Hydra.Hoisting: updateHoistState :: TermAccessor -> (Bool, Bool) -> (Bool, Bool)
+ Hydra.Hoisting: updateHoistState :: SubtermStep -> (Bool, Bool) -> (Bool, Bool)
- Hydra.Inference: bindConstraints :: InferenceContext -> (TypeSubst -> Flow t0 t1) -> [TypeConstraint] -> Flow t0 t1
+ Hydra.Inference: bindConstraints :: Context -> Graph -> [TypeConstraint] -> Either (InContext Error) TypeSubst
- Hydra.Inference: bindUnboundTypeVariables :: InferenceContext -> Term -> Term
+ Hydra.Inference: bindUnboundTypeVariables :: Graph -> Term -> Term
- Hydra.Inference: extendContext :: [(Name, TypeScheme)] -> InferenceContext -> InferenceContext
+ Hydra.Inference: extendContext :: [(Name, TypeScheme)] -> Graph -> Graph
- Hydra.Inference: finalizeInferredTerm :: InferenceContext -> Term -> Flow t0 Term
+ Hydra.Inference: finalizeInferredTerm :: Context -> Graph -> Term -> Either (InContext Error) Term
- Hydra.Inference: forInferredTerm :: InferenceContext -> Term -> String -> (InferenceResult -> t0) -> Flow t1 t0
+ Hydra.Inference: forInferredTerm :: Context -> Graph -> Term -> String -> (InferenceResult -> t0) -> Either (InContext Error) (t0, Context)
- Hydra.Inference: freeVariablesInContext :: InferenceContext -> Set Name
+ Hydra.Inference: freeVariablesInContext :: Graph -> Set Name
- Hydra.Inference: freshVariableType :: Flow t0 Type
+ Hydra.Inference: freshVariableType :: Context -> (Type, Context)
- Hydra.Inference: generalize :: InferenceContext -> Type -> TypeScheme
+ Hydra.Inference: generalize :: Graph -> Type -> TypeScheme
- Hydra.Inference: inferGraphTypes :: Graph -> Flow t0 Graph
+ Hydra.Inference: inferGraphTypes :: Context -> [Binding] -> Graph -> Either (InContext Error) ((Graph, [Binding]), Context)
- Hydra.Inference: inferInGraphContext :: Term -> Flow Graph InferenceResult
+ Hydra.Inference: inferInGraphContext :: Context -> Graph -> Term -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferMany :: InferenceContext -> [(Term, String)] -> Flow t0 ([Term], ([Type], TypeSubst))
+ Hydra.Inference: inferMany :: Context -> Graph -> [(Term, String)] -> Either (InContext Error) (([Term], ([Type], (TypeSubst, Map Name TypeVariableMetadata))), Context)
- Hydra.Inference: inferTypeOf :: InferenceContext -> Term -> Flow t0 (Term, TypeScheme)
+ Hydra.Inference: inferTypeOf :: Context -> Graph -> Term -> Either (InContext Error) ((Term, TypeScheme), Context)
- Hydra.Inference: inferTypeOfAnnotatedTerm :: InferenceContext -> AnnotatedTerm -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfAnnotatedTerm :: Context -> Graph -> AnnotatedTerm -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfApplication :: InferenceContext -> Application -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfApplication :: Context -> Graph -> Application -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfCaseStatement :: InferenceContext -> CaseStatement -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfCaseStatement :: Context -> Graph -> CaseStatement -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfCollection :: InferenceContext -> (Type -> Type) -> ([Term] -> Term) -> String -> [Term] -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfCollection :: Context -> Graph -> (Type -> Type) -> ([Term] -> Term) -> String -> Set Name -> [Term] -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfEither :: InferenceContext -> Either Term Term -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfEither :: Context -> Graph -> Either Term Term -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfElimination :: InferenceContext -> Elimination -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfElimination :: Context -> Graph -> Elimination -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfFunction :: InferenceContext -> Function -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfFunction :: Context -> Graph -> Function -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfInjection :: InferenceContext -> Injection -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfInjection :: Context -> Graph -> Injection -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfLambda :: InferenceContext -> Lambda -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfLambda :: Context -> Graph -> Lambda -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfLet :: InferenceContext -> Let -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfLet :: Context -> Graph -> Let -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfLetNormalized :: InferenceContext -> Let -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfLetNormalized :: Context -> Graph -> Let -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfList :: InferenceContext -> [Term] -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfList :: Context -> Graph -> [Term] -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfLiteral :: t0 -> Literal -> Flow t1 InferenceResult
+ Hydra.Inference: inferTypeOfLiteral :: Context -> Literal -> InferenceResult
- Hydra.Inference: inferTypeOfMap :: InferenceContext -> Map Term Term -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfMap :: Context -> Graph -> Map Term Term -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfOptional :: InferenceContext -> Maybe Term -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfOptional :: Context -> Graph -> Maybe Term -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfPair :: InferenceContext -> (Term, Term) -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfPair :: Context -> Graph -> (Term, Term) -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfPrimitive :: InferenceContext -> Name -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfPrimitive :: Context -> Graph -> Name -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfProjection :: InferenceContext -> Projection -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfProjection :: Context -> Graph -> Projection -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfRecord :: InferenceContext -> Record -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfRecord :: Context -> Graph -> Record -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfSet :: InferenceContext -> Set Term -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfSet :: Context -> Graph -> Set Term -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfTerm :: InferenceContext -> Term -> String -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfTerm :: Context -> Graph -> Term -> String -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfTypeApplication :: InferenceContext -> TypeApplicationTerm -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfTypeApplication :: Context -> Graph -> TypeApplicationTerm -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfTypeLambda :: InferenceContext -> TypeLambda -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfTypeLambda :: Context -> Graph -> TypeLambda -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfUnit :: InferenceResult
+ Hydra.Inference: inferTypeOfUnit :: Context -> InferenceResult
- Hydra.Inference: inferTypeOfUnwrap :: InferenceContext -> Name -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfUnwrap :: Context -> Graph -> Name -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfVariable :: InferenceContext -> Name -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfVariable :: Context -> Graph -> Name -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypeOfWrappedTerm :: InferenceContext -> WrappedTerm -> Flow t0 InferenceResult
+ Hydra.Inference: inferTypeOfWrappedTerm :: Context -> Graph -> WrappedTerm -> Either (InContext Error) InferenceResult
- Hydra.Inference: inferTypesOfTemporaryBindings :: InferenceContext -> [Binding] -> Flow t0 ([Term], ([Type], (TypeSubst, Map Name TypeVariableMetadata)))
+ Hydra.Inference: inferTypesOfTemporaryBindings :: Context -> Graph -> [Binding] -> Either (InContext Error) (([Term], ([Type], (TypeSubst, Map Name TypeVariableMetadata))), Context)
- Hydra.Inference: isUnbound :: InferenceContext -> Name -> Bool
+ Hydra.Inference: isUnbound :: Graph -> Name -> Bool
- Hydra.Inference: mapConstraints :: InferenceContext -> (TypeSubst -> t0) -> [TypeConstraint] -> Flow t1 t0
+ Hydra.Inference: mapConstraints :: Context -> Graph -> (TypeSubst -> t0) -> [TypeConstraint] -> Either (InContext Error) t0
- Hydra.Inference: yield :: Term -> Type -> TypeSubst -> InferenceResult
+ Hydra.Inference: yield :: Context -> Term -> Type -> TypeSubst -> InferenceResult
- Hydra.Inference: yieldChecked :: Term -> Type -> TypeSubst -> Flow t0 InferenceResult
+ Hydra.Inference: yieldChecked :: Context -> Term -> Type -> TypeSubst -> InferenceResult
- Hydra.Inference: yieldCheckedWithConstraints :: Term -> Type -> TypeSubst -> Map Name TypeVariableMetadata -> Flow t0 InferenceResult
+ Hydra.Inference: yieldCheckedWithConstraints :: Context -> Term -> Type -> TypeSubst -> Map Name TypeVariableMetadata -> InferenceResult
- Hydra.Inference: yieldDebug :: t0 -> t1 -> Term -> Type -> TypeSubst -> Flow t2 InferenceResult
+ Hydra.Inference: yieldDebug :: Context -> t0 -> String -> Term -> Type -> TypeSubst -> Either (InContext Error) InferenceResult
- Hydra.Inference: yieldWithConstraints :: Term -> Type -> TypeSubst -> Map Name TypeVariableMetadata -> InferenceResult
+ Hydra.Inference: yieldWithConstraints :: Context -> Term -> Type -> TypeSubst -> Map Name TypeVariableMetadata -> InferenceResult
- Hydra.Json.Decode: fromJson :: Map Name Type -> Type -> Value -> Either String Term
+ Hydra.Json.Decode: fromJson :: Map Name Type -> Name -> Type -> Value -> Either String Term
- Hydra.Lexical: dereferenceElement :: Name -> Flow Graph (Maybe Binding)
+ Hydra.Lexical: dereferenceElement :: Graph -> Name -> Maybe Binding
- Hydra.Lexical: elementsToGraph :: Graph -> Maybe Graph -> [Binding] -> Graph
+ Hydra.Lexical: elementsToGraph :: Graph -> Map Name TypeScheme -> [Binding] -> Graph
- Hydra.Lexical: getField :: Map Name t0 -> Name -> (t0 -> Flow t1 t2) -> Flow t1 t2
+ Hydra.Lexical: getField :: Context -> Map Name t0 -> Name -> (t0 -> Either (InContext Error) t1) -> Either (InContext Error) t1
- Hydra.Lexical: matchEnum :: Name -> [(Name, t0)] -> Term -> Flow Graph t0
+ Hydra.Lexical: matchEnum :: Context -> Graph -> Name -> [(Name, t0)] -> Term -> Either (InContext Error) t0
- Hydra.Lexical: matchRecord :: (Map Name Term -> Flow t0 t1) -> Term -> Flow t0 t1
+ Hydra.Lexical: matchRecord :: Context -> t0 -> (Map Name Term -> Either (InContext Error) t1) -> Term -> Either (InContext Error) t1
- Hydra.Lexical: matchUnion :: Name -> [(Name, Term -> Flow Graph t0)] -> Term -> Flow Graph t0
+ Hydra.Lexical: matchUnion :: Context -> Graph -> Name -> [(Name, Term -> Either (InContext Error) t0)] -> Term -> Either (InContext Error) t0
- Hydra.Lexical: matchUnitField :: t0 -> t1 -> (t0, t2 -> Flow t3 t1)
+ Hydra.Lexical: matchUnitField :: t0 -> t1 -> (t0, t2 -> Either t3 t1)
- Hydra.Lexical: requireElement :: Name -> Flow Graph Binding
+ Hydra.Lexical: requireElement :: Context -> Graph -> Name -> Either (InContext Error) Binding
- Hydra.Lexical: requirePrimitive :: Name -> Flow Graph Primitive
+ Hydra.Lexical: requirePrimitive :: Context -> Graph -> Name -> Either (InContext Error) Primitive
- Hydra.Lexical: requirePrimitiveType :: TypeContext -> Name -> Flow t0 TypeScheme
+ Hydra.Lexical: requirePrimitiveType :: Context -> Graph -> Name -> Either (InContext Error) TypeScheme
- Hydra.Lexical: requireTerm :: Name -> Flow Graph Term
+ Hydra.Lexical: requireTerm :: Context -> Graph -> Name -> Either (InContext Error) Term
- Hydra.Lexical: resolveTerm :: Name -> Flow Graph (Maybe Term)
+ Hydra.Lexical: resolveTerm :: Graph -> Name -> Maybe Term
- Hydra.Lexical: stripAndDereferenceTerm :: Term -> Flow Graph Term
+ Hydra.Lexical: stripAndDereferenceTerm :: Context -> Graph -> Term -> Either (InContext Error) Term
- Hydra.Module: Module :: Namespace -> [Binding] -> [Namespace] -> [Namespace] -> Maybe String -> Module
+ Hydra.Module: Module :: Namespace -> [Definition] -> [Namespace] -> [Namespace] -> Maybe String -> Module
- Hydra.Module: TermDefinition :: Name -> Term -> TypeScheme -> TermDefinition
+ Hydra.Module: TermDefinition :: Name -> Term -> Maybe TypeScheme -> TermDefinition
- Hydra.Module: [termDefinitionType] :: TermDefinition -> TypeScheme
+ Hydra.Module: [termDefinitionType] :: TermDefinition -> Maybe TypeScheme
- Hydra.Reduction: betaReduceType :: Type -> Flow Graph Type
+ Hydra.Reduction: betaReduceType :: Context -> Graph -> Type -> Either (InContext Error) Type
- Hydra.Reduction: etaExpandTermNew :: TypeContext -> Term -> Term
+ Hydra.Reduction: etaExpandTermNew :: Graph -> Term -> Term
- Hydra.Reduction: etaExpandTypedTerm :: TypeContext -> Term -> Flow t0 Term
+ Hydra.Reduction: etaExpandTypedTerm :: Context -> Graph -> Term -> Either (InContext Error) Term
- Hydra.Reduction: reduceTerm :: Bool -> Term -> Flow Graph Term
+ Hydra.Reduction: reduceTerm :: Context -> Graph -> Bool -> Term -> Either (InContext Error) Term
- Hydra.Reduction: termIsValue :: t0 -> Term -> Bool
+ Hydra.Reduction: termIsValue :: Term -> Bool
- Hydra.Rewriting: inlineType :: Map Name Type -> Type -> Flow t0 Type
+ Hydra.Rewriting: inlineType :: Map Name Type -> Type -> Either String Type
- Hydra.Rewriting: rewriteAndFoldTermWithPath :: (([TermAccessor] -> t0 -> Term -> (t0, Term)) -> [TermAccessor] -> t0 -> Term -> (t0, Term)) -> t0 -> Term -> (t0, Term)
+ Hydra.Rewriting: rewriteAndFoldTermWithPath :: (([SubtermStep] -> t0 -> Term -> (t0, Term)) -> [SubtermStep] -> t0 -> Term -> (t0, Term)) -> t0 -> Term -> (t0, Term)
- Hydra.Rewriting: rewriteTermM :: ((Term -> Flow t0 Term) -> Term -> Flow t0 Term) -> Term -> Flow t0 Term
+ Hydra.Rewriting: rewriteTermM :: ((Term -> Either t0 Term) -> Term -> Either t0 Term) -> Term -> Either t0 Term
- Hydra.Rewriting: rewriteTermWithContextM :: ((t0 -> Term -> Flow t1 Term) -> t0 -> Term -> Flow t1 Term) -> t0 -> Term -> Flow t1 Term
+ Hydra.Rewriting: rewriteTermWithContextM :: ((t0 -> Term -> Either t1 Term) -> t0 -> Term -> Either t1 Term) -> t0 -> Term -> Either t1 Term
- Hydra.Rewriting: rewriteTypeM :: ((Type -> Flow t0 Type) -> Type -> Flow t0 Type) -> Type -> Flow t0 Type
+ Hydra.Rewriting: rewriteTypeM :: ((Type -> Either t0 Type) -> Type -> Either t0 Type) -> Type -> Either t0 Type
- Hydra.Rewriting: typeNamesInType :: Type -> Set Name
+ Hydra.Rewriting: typeNamesInType :: Ord t0 => Type -> Set t0
- Hydra.Schemas: dependencyNamespaces :: Bool -> Bool -> Bool -> Bool -> [Binding] -> Flow Graph (Set Namespace)
+ Hydra.Schemas: dependencyNamespaces :: Context -> Graph -> Bool -> Bool -> Bool -> Bool -> [Binding] -> Either (InContext Error) (Set Namespace)
- Hydra.Schemas: dereferenceType :: Name -> Flow Graph (Maybe Type)
+ Hydra.Schemas: dereferenceType :: Context -> Graph -> Name -> Either (InContext Error) (Maybe Type)
- Hydra.Schemas: elementAsTypeApplicationTerm :: Binding -> Flow t0 TypeApplicationTerm
+ Hydra.Schemas: elementAsTypeApplicationTerm :: Context -> Binding -> Either (InContext Error) TypeApplicationTerm
- Hydra.Schemas: elementsWithDependencies :: [Binding] -> Flow Graph [Binding]
+ Hydra.Schemas: elementsWithDependencies :: Context -> Graph -> [Binding] -> Either (InContext Error) [Binding]
- Hydra.Schemas: fieldTypes :: Type -> Flow Graph (Map Name Type)
+ Hydra.Schemas: fieldTypes :: Context -> Graph -> Type -> Either (InContext Error) (Map Name Type)
- Hydra.Schemas: findFieldType :: Name -> [FieldType] -> Flow t0 Type
+ Hydra.Schemas: findFieldType :: Context -> Name -> [FieldType] -> Either (InContext Error) Type
- Hydra.Schemas: freshName :: Flow t0 Name
+ Hydra.Schemas: freshName :: Context -> (Name, Context)
- Hydra.Schemas: freshNames :: Int -> Flow t0 [Name]
+ Hydra.Schemas: freshNames :: Int -> Context -> ([Name], Context)
- Hydra.Schemas: graphAsLet :: Graph -> Let
+ Hydra.Schemas: graphAsLet :: [Binding] -> Term -> Let
- Hydra.Schemas: graphAsTerm :: Graph -> Term
+ Hydra.Schemas: graphAsTerm :: [Binding] -> Term -> Term
- Hydra.Schemas: graphAsTypes :: Graph -> Flow Graph (Map Name Type)
+ Hydra.Schemas: graphAsTypes :: Context -> Graph -> [Binding] -> Either (InContext DecodingError) (Map Name Type)
- Hydra.Schemas: instantiateType :: Type -> Flow t0 Type
+ Hydra.Schemas: instantiateType :: Context -> Type -> (Type, Context)
- Hydra.Schemas: instantiateTypeScheme :: TypeScheme -> Flow t0 TypeScheme
+ Hydra.Schemas: instantiateTypeScheme :: Context -> TypeScheme -> (TypeScheme, Context)
- Hydra.Schemas: isEnumRowType :: RowType -> Bool
+ Hydra.Schemas: isEnumRowType :: [FieldType] -> Bool
- Hydra.Schemas: isSerializable :: Binding -> Flow Graph Bool
+ Hydra.Schemas: isSerializable :: Context -> Graph -> Binding -> Either (InContext Error) Bool
- Hydra.Schemas: isSerializableByName :: Name -> Flow Graph Bool
+ Hydra.Schemas: isSerializableByName :: Context -> Graph -> Name -> Either (InContext Error) Bool
- Hydra.Schemas: moduleDependencyNamespaces :: Bool -> Bool -> Bool -> Bool -> Module -> Flow Graph (Set Namespace)
+ Hydra.Schemas: moduleDependencyNamespaces :: Context -> Graph -> Bool -> Bool -> Bool -> Bool -> Module -> Either (InContext Error) (Set Namespace)
- Hydra.Schemas: requireRecordType :: Name -> Flow Graph RowType
+ Hydra.Schemas: requireRecordType :: Context -> Graph -> Name -> Either (InContext Error) [FieldType]
- Hydra.Schemas: requireRowType :: String -> (Type -> Maybe t0) -> Name -> Flow Graph t0
+ Hydra.Schemas: requireRowType :: Context -> String -> (Type -> Maybe t0) -> Graph -> Name -> Either (InContext Error) t0
- Hydra.Schemas: requireSchemaType :: InferenceContext -> Name -> Flow t0 TypeScheme
+ Hydra.Schemas: requireSchemaType :: Context -> Map Name TypeScheme -> Name -> Either (InContext Error) (TypeScheme, Context)
- Hydra.Schemas: requireType :: Name -> Flow Graph Type
+ Hydra.Schemas: requireType :: Context -> Graph -> Name -> Either (InContext Error) Type
- Hydra.Schemas: requireUnionField :: Name -> Name -> Flow Graph Type
+ Hydra.Schemas: requireUnionField :: Context -> Graph -> Name -> Name -> Either (InContext Error) Type
- Hydra.Schemas: requireUnionType :: Name -> Flow Graph RowType
+ Hydra.Schemas: requireUnionType :: Context -> Graph -> Name -> Either (InContext Error) [FieldType]
- Hydra.Schemas: resolveType :: Type -> Flow Graph (Maybe Type)
+ Hydra.Schemas: resolveType :: Graph -> Type -> Maybe Type
- Hydra.Schemas: schemaGraphToTypingEnvironment :: Graph -> Flow t0 (Map Name TypeScheme)
+ Hydra.Schemas: schemaGraphToTypingEnvironment :: Context -> Graph -> Either (InContext Error) (Map Name TypeScheme)
- Hydra.Schemas: typeDependencies :: Bool -> (Type -> Type) -> Name -> Flow Graph (Map Name Type)
+ Hydra.Schemas: typeDependencies :: Context -> Graph -> Bool -> (Type -> Type) -> Name -> Either (InContext Error) (Map Name Type)
- Hydra.Schemas: withLambdaContext :: (t0 -> TypeContext) -> (TypeContext -> t0 -> t1) -> t0 -> Lambda -> (t1 -> t2) -> t2
+ Hydra.Schemas: withLambdaContext :: (t0 -> Graph) -> (Graph -> t0 -> t1) -> t0 -> Lambda -> (t1 -> t2) -> t2
- Hydra.Schemas: withLetContext :: (t0 -> TypeContext) -> (TypeContext -> t0 -> t1) -> (TypeContext -> Binding -> Maybe Term) -> t0 -> Let -> (t1 -> t2) -> t2
+ Hydra.Schemas: withLetContext :: (t0 -> Graph) -> (Graph -> t0 -> t1) -> (Graph -> Binding -> Maybe Term) -> t0 -> Let -> (t1 -> t2) -> t2
- Hydra.Schemas: withTypeLambdaContext :: (t0 -> TypeContext) -> (TypeContext -> t0 -> t1) -> t0 -> TypeLambda -> (t1 -> t2) -> t2
+ Hydra.Schemas: withTypeLambdaContext :: (t0 -> Graph) -> (Graph -> t0 -> t1) -> t0 -> TypeLambda -> (t1 -> t2) -> t2
- Hydra.Show.Graph: graph :: Graph -> String
+ Hydra.Show.Graph: graph :: [Binding] -> String
- Hydra.Sources.CoderUtils: analyzeFunctionTerm :: TBinding ((env -> TypeContext) -> (TypeContext -> env -> env) -> env -> Term -> Flow s (FunctionStructure env))
+ Hydra.Sources.CoderUtils: analyzeFunctionTerm :: TBinding (Context -> (env -> Graph) -> (Graph -> env -> env) -> env -> Term -> Either (InContext Error) (FunctionStructure env))
- Hydra.Sources.CoderUtils: analyzeFunctionTermWith :: TBinding ((TypeContext -> Binding -> Maybe Term) -> (env -> TypeContext) -> (TypeContext -> env -> env) -> env -> Term -> Flow s (FunctionStructure env))
+ Hydra.Sources.CoderUtils: analyzeFunctionTermWith :: TBinding (Context -> (Graph -> Binding -> Maybe Term) -> (env -> Graph) -> (Graph -> env -> env) -> env -> Term -> Either (InContext Error) (FunctionStructure env))
- Hydra.Sources.CoderUtils: analyzeFunctionTermWith_finish :: TBinding ((env -> TypeContext) -> env -> [Name] -> [Name] -> [Binding] -> [Type] -> [Type] -> Term -> Flow s (FunctionStructure env))
+ Hydra.Sources.CoderUtils: analyzeFunctionTermWith_finish :: TBinding (Context -> (env -> Graph) -> env -> [Name] -> [Name] -> [Binding] -> [Type] -> [Type] -> Term -> Either (InContext Error) (FunctionStructure env))
- Hydra.Sources.CoderUtils: analyzeFunctionTermWith_gather :: TBinding ((TypeContext -> Binding -> Maybe Term) -> (env -> TypeContext) -> (TypeContext -> env -> env) -> Bool -> env -> [Name] -> [Name] -> [Binding] -> [Type] -> [Type] -> Term -> Flow s (FunctionStructure env))
+ Hydra.Sources.CoderUtils: analyzeFunctionTermWith_gather :: TBinding (Context -> (Graph -> Binding -> Maybe Term) -> (env -> Graph) -> (Graph -> env -> env) -> Bool -> env -> [Name] -> [Name] -> [Binding] -> [Type] -> [Type] -> Term -> Either (InContext Error) (FunctionStructure env))
- Hydra.Sources.CoderUtils: bindingMetadata :: TBinding (TypeContext -> Binding -> Maybe Term)
+ Hydra.Sources.CoderUtils: bindingMetadata :: TBinding (Graph -> Binding -> Maybe Term)
- Hydra.Sources.CoderUtils: commentsFromFieldType :: TBinding (FieldType -> Flow Graph (Maybe String))
+ Hydra.Sources.CoderUtils: commentsFromFieldType :: TBinding (Context -> Graph -> FieldType -> Either (InContext Error) (Maybe String))
- Hydra.Sources.CoderUtils: isComplexBinding :: TBinding (TypeContext -> Binding -> Bool)
+ Hydra.Sources.CoderUtils: isComplexBinding :: TBinding (Graph -> Binding -> Bool)
- Hydra.Sources.CoderUtils: isComplexTerm :: TBinding (TypeContext -> Term -> Bool)
+ Hydra.Sources.CoderUtils: isComplexTerm :: TBinding (Graph -> Term -> Bool)
- Hydra.Sources.CoderUtils: isComplexVariable :: TBinding (TypeContext -> Name -> Bool)
+ Hydra.Sources.CoderUtils: isComplexVariable :: TBinding (Graph -> Name -> Bool)
- Hydra.Sources.Eval.Lib.Eithers: bimap_ :: TBinding (Term -> Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Eithers: bimap_ :: TBinding (Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Eithers: bind_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Eithers: bind_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Eithers: either_ :: TBinding (Term -> Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Eithers: either_ :: TBinding (Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Eithers: mapList_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Eithers: mapList_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Eithers: mapMaybe_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Eithers: mapMaybe_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Eithers: map_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Eithers: map_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Lists: apply_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Lists: apply_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Lists: bind_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Lists: bind_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Lists: dropWhile_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Lists: dropWhile_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Lists: filter_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Lists: filter_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Lists: find_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Lists: find_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Lists: foldl_ :: TBinding (Term -> Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Lists: foldl_ :: TBinding (Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Lists: map_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Lists: map_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Lists: partition_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Lists: partition_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Lists: sortOn_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Lists: sortOn_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Lists: span_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Lists: span_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Lists: zipWith_ :: TBinding (Term -> Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Lists: zipWith_ :: TBinding (Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Maps: alter_ :: TBinding (Term -> Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Maps: alter_ :: TBinding (Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Maps: bimap_ :: TBinding (Term -> Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Maps: bimap_ :: TBinding (Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Maps: filterWithKey_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Maps: filterWithKey_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Maps: filter_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Maps: filter_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Maps: mapKeys_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Maps: mapKeys_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Maps: map_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Maps: map_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Maybes: apply_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Maybes: apply_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Maybes: bind_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Maybes: bind_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Maybes: cases_ :: TBinding (Term -> Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Maybes: cases_ :: TBinding (Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Maybes: compose_ :: TBinding (Term -> Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Maybes: compose_ :: TBinding (Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Maybes: mapMaybe_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Maybes: mapMaybe_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Maybes: map_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Maybes: map_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Maybes: maybe_ :: TBinding (Term -> Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Maybes: maybe_ :: TBinding (Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Pairs: bimap_ :: TBinding (Term -> Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Pairs: bimap_ :: TBinding (Context -> Graph -> Term -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Eval.Lib.Sets: map_ :: TBinding (Term -> Term -> Flow s Term)
+ Hydra.Sources.Eval.Lib.Sets: map_ :: TBinding (Context -> Graph -> Term -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Haskell.Coder: adaptTypeToHaskellAndEncode :: TBinding (HaskellNamespaces -> Type -> Flow Graph Type)
+ Hydra.Sources.Haskell.Coder: adaptTypeToHaskellAndEncode :: TBinding (HaskellNamespaces -> Type -> Context -> Graph -> Either (InContext Error) Type)
- Hydra.Sources.Haskell.Coder: constructModule :: TBinding (HaskellNamespaces -> Module -> [Definition] -> Flow Graph Module)
+ Hydra.Sources.Haskell.Coder: constructModule :: TBinding (HaskellNamespaces -> Module -> [Definition] -> Context -> Graph -> Either (InContext Error) Module)
- Hydra.Sources.Haskell.Coder: encodeFunction :: TBinding (HaskellNamespaces -> Function -> Flow Graph Expression)
+ Hydra.Sources.Haskell.Coder: encodeFunction :: TBinding (Int -> HaskellNamespaces -> Function -> Context -> Graph -> Either (InContext Error) Expression)
- Hydra.Sources.Haskell.Coder: encodeLiteral :: TBinding (Literal -> Flow Graph Expression)
+ Hydra.Sources.Haskell.Coder: encodeLiteral :: TBinding (Literal -> Context -> Either (InContext Error) Expression)
- Hydra.Sources.Haskell.Coder: encodeTerm :: TBinding (HaskellNamespaces -> Term -> Flow Graph Expression)
+ Hydra.Sources.Haskell.Coder: encodeTerm :: TBinding (Int -> HaskellNamespaces -> Term -> Context -> Graph -> Either (InContext Error) Expression)
- Hydra.Sources.Haskell.Coder: encodeType :: TBinding (HaskellNamespaces -> Type -> Flow Graph Type)
+ Hydra.Sources.Haskell.Coder: encodeType :: TBinding (HaskellNamespaces -> Type -> Context -> Graph -> Either (InContext Error) Type)
- Hydra.Sources.Haskell.Coder: encodeTypeWithClassAssertions :: TBinding (HaskellNamespaces -> Map Name (Set TypeClass) -> Type -> Flow Graph Type)
+ Hydra.Sources.Haskell.Coder: encodeTypeWithClassAssertions :: TBinding (HaskellNamespaces -> Map Name (Set TypeClass) -> Type -> Context -> Graph -> Either (InContext Error) Type)
- Hydra.Sources.Haskell.Coder: moduleToHaskell :: TBinding (Module -> [Definition] -> Flow Graph (Map String String))
+ Hydra.Sources.Haskell.Coder: moduleToHaskell :: TBinding (Module -> [Definition] -> Context -> Graph -> Either (InContext Error) (Map String String))
- Hydra.Sources.Haskell.Coder: moduleToHaskellModule :: TBinding (Module -> [Definition] -> Flow Graph Module)
+ Hydra.Sources.Haskell.Coder: moduleToHaskellModule :: TBinding (Module -> [Definition] -> Context -> Graph -> Either (InContext Error) Module)
- Hydra.Sources.Haskell.Coder: nameDecls :: TBinding (Graph -> HaskellNamespaces -> Name -> Type -> [DeclarationWithComments])
+ Hydra.Sources.Haskell.Coder: nameDecls :: TBinding (HaskellNamespaces -> Name -> Type -> [DeclarationWithComments])
- Hydra.Sources.Haskell.Coder: toDataDeclaration :: TBinding (HaskellNamespaces -> TermDefinition -> Flow Graph DeclarationWithComments)
+ Hydra.Sources.Haskell.Coder: toDataDeclaration :: TBinding (HaskellNamespaces -> TermDefinition -> Context -> Graph -> Either (InContext Error) DeclarationWithComments)
- Hydra.Sources.Haskell.Coder: toTypeDeclarationsFrom :: TBinding (HaskellNamespaces -> Name -> Type -> Flow Graph [DeclarationWithComments])
+ Hydra.Sources.Haskell.Coder: toTypeDeclarationsFrom :: TBinding (HaskellNamespaces -> Name -> Type -> Context -> Graph -> Either (InContext Error) [DeclarationWithComments])
- Hydra.Sources.Haskell.Coder: typeDecl :: TBinding (HaskellNamespaces -> Name -> Type -> Flow Graph DeclarationWithComments)
+ Hydra.Sources.Haskell.Coder: typeDecl :: TBinding (HaskellNamespaces -> Name -> Type -> Context -> Graph -> Either (InContext Error) DeclarationWithComments)
- Hydra.Sources.Haskell.Utils: namespacesForModule :: TBinding (Module -> Flow Graph HaskellNamespaces)
+ Hydra.Sources.Haskell.Utils: namespacesForModule :: TBinding (Module -> Context -> Graph -> Either (InContext Error) HaskellNamespaces)
- Hydra.Sources.Haskell.Utils: unionFieldReference :: TBinding (Graph -> HaskellNamespaces -> Name -> Name -> Name)
+ Hydra.Sources.Haskell.Utils: unionFieldReference :: TBinding (Set Name -> HaskellNamespaces -> Name -> Name -> Name)
- Hydra.Sources.Haskell.Utils: unpackForallType :: TBinding (Graph -> Type -> ([Name], Type))
+ Hydra.Sources.Haskell.Utils: unpackForallType :: TBinding (Type -> ([Name], Type))
- Hydra.Sources.Json.Decode: fromJson :: TBinding (Map Name Type -> Type -> Value -> Either String Term)
+ Hydra.Sources.Json.Decode: fromJson :: TBinding (Map Name Type -> Name -> Type -> Value -> Either String Term)
- Hydra.Sources.Json.Decoding: decodeArray :: TBinding ((Value -> Flow s a) -> Value -> Flow s [a])
+ Hydra.Sources.Json.Decoding: decodeArray :: TBinding ((Value -> Either String a) -> Value -> Either String [a])
- Hydra.Sources.Json.Decoding: decodeBoolean :: TBinding (Value -> Flow s Bool)
+ Hydra.Sources.Json.Decoding: decodeBoolean :: TBinding (Value -> Either String Bool)
- Hydra.Sources.Json.Decoding: decodeField :: TBinding ((Value -> Flow s a) -> String -> Map String Value -> Flow s a)
+ Hydra.Sources.Json.Decoding: decodeField :: TBinding ((Value -> Either String a) -> String -> Map String Value -> Either String a)
- Hydra.Sources.Json.Decoding: decodeNumber :: TBinding (Value -> Flow s Double)
+ Hydra.Sources.Json.Decoding: decodeNumber :: TBinding (Value -> Either String Double)
- Hydra.Sources.Json.Decoding: decodeObject :: TBinding (Value -> Flow s (Map String Value))
+ Hydra.Sources.Json.Decoding: decodeObject :: TBinding (Value -> Either String (Map String Value))
- Hydra.Sources.Json.Decoding: decodeOptionalField :: TBinding ((Value -> Flow s a) -> String -> Map String Value -> Flow s (Maybe a))
+ Hydra.Sources.Json.Decoding: decodeOptionalField :: TBinding ((Value -> Either String a) -> String -> Map String Value -> Either String (Maybe a))
- Hydra.Sources.Json.Decoding: decodeString :: TBinding (Value -> Flow s String)
+ Hydra.Sources.Json.Decoding: decodeString :: TBinding (Value -> Either String String)
- Hydra.Sources.Json.Extract: expectArray :: TBinding (Value -> Flow s [Value])
+ Hydra.Sources.Json.Extract: expectArray :: TBinding (Value -> Either String [Value])
- Hydra.Sources.Json.Extract: expectNumber :: TBinding (Value -> Flow s Double)
+ Hydra.Sources.Json.Extract: expectNumber :: TBinding (Value -> Either String Double)
- Hydra.Sources.Json.Extract: expectObject :: TBinding (Value -> Flow s (Map String Value))
+ Hydra.Sources.Json.Extract: expectObject :: TBinding (Value -> Either String (Map String Value))
- Hydra.Sources.Json.Extract: expectString :: TBinding (Value -> Flow s String)
+ Hydra.Sources.Json.Extract: expectString :: TBinding (Value -> Either String String)
- Hydra.Sources.Json.Extract: optArray :: TBinding (String -> Map String Value -> Flow s (Maybe [Value]))
+ Hydra.Sources.Json.Extract: optArray :: TBinding (String -> Map String Value -> Either String (Maybe [Value]))
- Hydra.Sources.Json.Extract: optString :: TBinding (String -> Map String Value -> Flow s (Maybe String))
+ Hydra.Sources.Json.Extract: optString :: TBinding (String -> Map String Value -> Either String (Maybe String))
- Hydra.Sources.Json.Extract: require :: TBinding (String -> Map String Value -> Flow s Value)
+ Hydra.Sources.Json.Extract: require :: TBinding (String -> Map String Value -> Either String Value)
- Hydra.Sources.Json.Extract: requireArray :: TBinding (String -> Map String Value -> Flow s [Value])
+ Hydra.Sources.Json.Extract: requireArray :: TBinding (String -> Map String Value -> Either String [Value])
- Hydra.Sources.Json.Extract: requireNumber :: TBinding (String -> Map String Value -> Flow s Double)
+ Hydra.Sources.Json.Extract: requireNumber :: TBinding (String -> Map String Value -> Either String Double)
- Hydra.Sources.Json.Extract: requireString :: TBinding (String -> Map String Value -> Flow s String)
+ Hydra.Sources.Json.Extract: requireString :: TBinding (String -> Map String Value -> Either String String)
- Hydra.Sources.Kernel.Terms.Annotations: debugIf :: TBinding (String -> String -> Flow s ())
+ Hydra.Sources.Kernel.Terms.Annotations: debugIf :: TBinding (Context -> String -> String -> Either (InContext Error) ())
- Hydra.Sources.Kernel.Terms.Annotations: failOnFlag :: TBinding (Name -> String -> Flow s ())
+ Hydra.Sources.Kernel.Terms.Annotations: failOnFlag :: TBinding (Context -> Name -> String -> Either (InContext Error) ())
- Hydra.Sources.Kernel.Terms.Annotations: getAttr :: TBinding (Name -> Flow s (Maybe Term))
+ Hydra.Sources.Kernel.Terms.Annotations: getAttr :: TBinding (Name -> Context -> Maybe Term)
- Hydra.Sources.Kernel.Terms.Annotations: getAttrWithDefault :: TBinding (Name -> Term -> Flow s Term)
+ Hydra.Sources.Kernel.Terms.Annotations: getAttrWithDefault :: TBinding (Name -> Term -> Context -> Term)
- Hydra.Sources.Kernel.Terms.Annotations: getCount :: TBinding (Name -> Flow s Int)
+ Hydra.Sources.Kernel.Terms.Annotations: getCount :: TBinding (Name -> Context -> Int)
- Hydra.Sources.Kernel.Terms.Annotations: getDebugId :: TBinding (Flow s (Maybe String))
+ Hydra.Sources.Kernel.Terms.Annotations: getDebugId :: TBinding (Context -> Either (InContext Error) (Maybe String))
- Hydra.Sources.Kernel.Terms.Annotations: getDescription :: TBinding (Map Name Term -> Flow Graph (Maybe String))
+ Hydra.Sources.Kernel.Terms.Annotations: getDescription :: TBinding (Context -> Graph -> Map Name Term -> Either (InContext Error) (Maybe String))
- Hydra.Sources.Kernel.Terms.Annotations: getTermDescription :: TBinding (Term -> Flow Graph (Maybe String))
+ Hydra.Sources.Kernel.Terms.Annotations: getTermDescription :: TBinding (Context -> Graph -> Term -> Either (InContext Error) (Maybe String))
- Hydra.Sources.Kernel.Terms.Annotations: getType :: TBinding (Map Name Term -> Flow Graph (Maybe Type))
+ Hydra.Sources.Kernel.Terms.Annotations: getType :: TBinding (Graph -> Map Name Term -> Either DecodingError (Maybe Type))
- Hydra.Sources.Kernel.Terms.Annotations: getTypeClasses :: TBinding (Term -> Flow Graph (Map Name (Set TypeClass)))
+ Hydra.Sources.Kernel.Terms.Annotations: getTypeClasses :: TBinding (Context -> Graph -> Term -> Either (InContext Error) (Map Name (Set TypeClass)))
- Hydra.Sources.Kernel.Terms.Annotations: getTypeDescription :: TBinding (Type -> Flow Graph (Maybe String))
+ Hydra.Sources.Kernel.Terms.Annotations: getTypeDescription :: TBinding (Context -> Graph -> Type -> Either (InContext Error) (Maybe String))
- Hydra.Sources.Kernel.Terms.Annotations: hasFlag :: TBinding (Name -> Flow s Bool)
+ Hydra.Sources.Kernel.Terms.Annotations: hasFlag :: TBinding (Context -> Name -> Either (InContext Error) Bool)
- Hydra.Sources.Kernel.Terms.Annotations: nextCount :: TBinding (Name -> Flow s Int)
+ Hydra.Sources.Kernel.Terms.Annotations: nextCount :: TBinding (Name -> Context -> (Int, Context))
- Hydra.Sources.Kernel.Terms.Annotations: putAttr :: TBinding (Name -> Term -> Flow s ())
+ Hydra.Sources.Kernel.Terms.Annotations: putAttr :: TBinding (Name -> Term -> Context -> Context)
- Hydra.Sources.Kernel.Terms.Annotations: putCount :: TBinding (Name -> Int -> Flow s ())
+ Hydra.Sources.Kernel.Terms.Annotations: putCount :: TBinding (Name -> Int -> Context -> Context)
- Hydra.Sources.Kernel.Terms.Annotations: resetCount :: TBinding (Name -> Flow s ())
+ Hydra.Sources.Kernel.Terms.Annotations: resetCount :: TBinding (Name -> Context -> Context)
- Hydra.Sources.Kernel.Terms.Annotations: whenFlag :: TBinding (Name -> Flow s a -> Flow s a -> Flow s a)
+ Hydra.Sources.Kernel.Terms.Annotations: whenFlag :: TBinding (Context -> Name -> Either (InContext Error) a -> Either (InContext Error) a -> Either (InContext Error) a)
- Hydra.Sources.Kernel.Terms.Checking: applyTypeArgumentsToType :: TBinding (TypeContext -> [Type] -> Type -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: applyTypeArgumentsToType :: TBinding (Context -> Graph -> [Type] -> Type -> Either (InContext Error) Type)
- Hydra.Sources.Kernel.Terms.Checking: checkForUnboundTypeVariables :: TBinding (InferenceContext -> Term -> Flow s ())
+ Hydra.Sources.Kernel.Terms.Checking: checkForUnboundTypeVariables :: TBinding (Context -> Graph -> Term -> Either (InContext Error) ())
- Hydra.Sources.Kernel.Terms.Checking: checkNominalApplication :: TBinding (TypeContext -> Name -> [Type] -> Flow s ())
+ Hydra.Sources.Kernel.Terms.Checking: checkNominalApplication :: TBinding (Context -> Graph -> Name -> [Type] -> Either (InContext Error) ((), Context))
- Hydra.Sources.Kernel.Terms.Checking: checkSameType :: TBinding (TypeContext -> String -> [Type] -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: checkSameType :: TBinding (Context -> Graph -> String -> [Type] -> Either (InContext Error) Type)
- Hydra.Sources.Kernel.Terms.Checking: checkType :: TBinding (TypeContext -> Term -> Type -> Flow s ())
+ Hydra.Sources.Kernel.Terms.Checking: checkType :: TBinding (Context -> Graph -> Term -> Type -> Either (InContext Error) ())
- Hydra.Sources.Kernel.Terms.Checking: checkTypeSubst :: TBinding (InferenceContext -> TypeSubst -> Flow s TypeSubst)
+ Hydra.Sources.Kernel.Terms.Checking: checkTypeSubst :: TBinding (Context -> Graph -> TypeSubst -> Either (InContext Error) TypeSubst)
- Hydra.Sources.Kernel.Terms.Checking: checkTypeVariables :: TBinding (TypeContext -> Type -> Flow s ())
+ Hydra.Sources.Kernel.Terms.Checking: checkTypeVariables :: TBinding (Graph -> Type -> ())
- Hydra.Sources.Kernel.Terms.Checking: containsInScopeTypeVars :: TBinding (TypeContext -> Type -> Bool)
+ Hydra.Sources.Kernel.Terms.Checking: containsInScopeTypeVars :: TBinding (Graph -> Type -> Bool)
- Hydra.Sources.Kernel.Terms.Checking: toFContext :: TBinding (InferenceContext -> Map Name Type)
+ Hydra.Sources.Kernel.Terms.Checking: toFContext :: TBinding (Graph -> Map Name Type)
- Hydra.Sources.Kernel.Terms.Checking: typeListsEffectivelyEqual :: TBinding (TypeContext -> [Type] -> [Type] -> Bool)
+ Hydra.Sources.Kernel.Terms.Checking: typeListsEffectivelyEqual :: TBinding (Graph -> [Type] -> [Type] -> Bool)
- Hydra.Sources.Kernel.Terms.Checking: typeOf :: TBinding (TypeContext -> [Type] -> Term -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOf :: TBinding (Context -> Graph -> [Type] -> Term -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfAnnotatedTerm :: TBinding (TypeContext -> [Type] -> AnnotatedTerm -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfAnnotatedTerm :: TBinding (Context -> Graph -> [Type] -> AnnotatedTerm -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfApplication :: TBinding (TypeContext -> [Type] -> Application -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfApplication :: TBinding (Context -> Graph -> [Type] -> Application -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfCaseStatement :: TBinding (TypeContext -> [Type] -> CaseStatement -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfCaseStatement :: TBinding (Context -> Graph -> [Type] -> CaseStatement -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfEither :: TBinding (TypeContext -> [Type] -> Either Term Term -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfEither :: TBinding (Context -> Graph -> [Type] -> Either Term Term -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfInjection :: TBinding (TypeContext -> [Type] -> Injection -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfInjection :: TBinding (Context -> Graph -> [Type] -> Injection -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfLambda :: TBinding (TypeContext -> [Type] -> Lambda -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfLambda :: TBinding (Context -> Graph -> [Type] -> Lambda -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfLet :: TBinding (TypeContext -> [Type] -> Let -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfLet :: TBinding (Context -> Graph -> [Type] -> Let -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfList :: TBinding (TypeContext -> [Type] -> [Term] -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfList :: TBinding (Context -> Graph -> [Type] -> [Term] -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfLiteral :: TBinding (TypeContext -> [Type] -> Literal -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfLiteral :: TBinding (Context -> Graph -> [Type] -> Literal -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfMap :: TBinding (TypeContext -> [Type] -> Map Term Term -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfMap :: TBinding (Context -> Graph -> [Type] -> Map Term Term -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfMaybe :: TBinding (TypeContext -> [Type] -> Maybe Term -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfMaybe :: TBinding (Context -> Graph -> [Type] -> Maybe Term -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfPair :: TBinding (TypeContext -> [Type] -> (Term, Term) -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfPair :: TBinding (Context -> Graph -> [Type] -> (Term, Term) -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfPrimitive :: TBinding (TypeContext -> [Type] -> Name -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfPrimitive :: TBinding (Context -> Graph -> [Type] -> Name -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfProjection :: TBinding (TypeContext -> [Type] -> Projection -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfProjection :: TBinding (Context -> Graph -> [Type] -> Projection -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfRecord :: TBinding (TypeContext -> [Type] -> Record -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfRecord :: TBinding (Context -> Graph -> [Type] -> Record -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfSet :: TBinding (TypeContext -> [Type] -> Set Term -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfSet :: TBinding (Context -> Graph -> [Type] -> Set Term -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfTypeApplication :: TBinding (TypeContext -> [Type] -> TypeApplicationTerm -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfTypeApplication :: TBinding (Context -> Graph -> [Type] -> TypeApplicationTerm -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfTypeLambda :: TBinding (TypeContext -> [Type] -> TypeLambda -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfTypeLambda :: TBinding (Context -> Graph -> [Type] -> TypeLambda -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfUnit :: TBinding (TypeContext -> [Type] -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfUnit :: TBinding (Context -> Graph -> [Type] -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfUnwrap :: TBinding (TypeContext -> [Type] -> Name -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfUnwrap :: TBinding (Context -> Graph -> [Type] -> Name -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfVariable :: TBinding (TypeContext -> [Type] -> Name -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfVariable :: TBinding (Context -> Graph -> [Type] -> Name -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typeOfWrappedTerm :: TBinding (TypeContext -> [Type] -> WrappedTerm -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Checking: typeOfWrappedTerm :: TBinding (Context -> Graph -> [Type] -> WrappedTerm -> Either (InContext Error) (Type, Context))
- Hydra.Sources.Kernel.Terms.Checking: typesAllEffectivelyEqual :: TBinding (TypeContext -> [Type] -> Bool)
+ Hydra.Sources.Kernel.Terms.Checking: typesAllEffectivelyEqual :: TBinding (Graph -> [Type] -> Bool)
- Hydra.Sources.Kernel.Terms.Checking: typesEffectivelyEqual :: TBinding (TypeContext -> Type -> Type -> Bool)
+ Hydra.Sources.Kernel.Terms.Checking: typesEffectivelyEqual :: TBinding (Graph -> Type -> Type -> Bool)
- Hydra.Sources.Kernel.Terms.CodeGeneration: formatTypeBinding :: TBinding (Binding -> Flow Graph String)
+ Hydra.Sources.Kernel.Terms.CodeGeneration: formatTypeBinding :: TBinding (Graph -> Binding -> Either DecodingError String)
- Hydra.Sources.Kernel.Terms.CodeGeneration: generateCoderModules :: TBinding ((Module -> Flow Graph (Maybe Module)) -> Graph -> [Module] -> [Module] -> Flow Graph [Module])
+ Hydra.Sources.Kernel.Terms.CodeGeneration: generateCoderModules :: TBinding ((Context -> Graph -> Module -> Either (InContext Error) (Maybe Module)) -> Graph -> [Module] -> [Module] -> Context -> Either (InContext Error) [Module])
- Hydra.Sources.Kernel.Terms.CodeGeneration: generateLexicon :: TBinding (Graph -> Flow Graph String)
+ Hydra.Sources.Kernel.Terms.CodeGeneration: generateLexicon :: TBinding (Graph -> Either DecodingError String)
- Hydra.Sources.Kernel.Terms.CodeGeneration: generateSourceFiles :: TBinding ((Module -> [Definition] -> Flow Graph (Map String String)) -> Language -> Bool -> Bool -> Bool -> Bool -> Graph -> [Module] -> [Module] -> Flow Graph [(String, String)])
+ Hydra.Sources.Kernel.Terms.CodeGeneration: generateSourceFiles :: TBinding ((Module -> [Definition] -> Context -> Graph -> Either (InContext Error) (Map String String)) -> Language -> Bool -> Bool -> Bool -> Bool -> Graph -> [Module] -> [Module] -> Context -> Either (InContext Error) [(String, String)])
- Hydra.Sources.Kernel.Terms.CodeGeneration: inferAndGenerateLexicon :: TBinding (Graph -> [Module] -> Flow Graph String)
+ Hydra.Sources.Kernel.Terms.CodeGeneration: inferAndGenerateLexicon :: TBinding (Context -> Graph -> [Module] -> Either String String)
- Hydra.Sources.Kernel.Terms.CodeGeneration: inferModules :: TBinding (Graph -> [Module] -> [Module] -> Flow Graph [Module])
+ Hydra.Sources.Kernel.Terms.CodeGeneration: inferModules :: TBinding (Context -> Graph -> [Module] -> [Module] -> Either (InContext Error) [Module])
- Hydra.Sources.Kernel.Terms.Decoding: decodeBinding :: TBinding (Binding -> Flow Graph Binding)
+ Hydra.Sources.Kernel.Terms.Decoding: decodeBinding :: TBinding (Context -> Graph -> Binding -> Either (InContext DecodingError) Binding)
- Hydra.Sources.Kernel.Terms.Decoding: decodeModule :: TBinding (Module -> Flow Graph (Maybe Module))
+ Hydra.Sources.Kernel.Terms.Decoding: decodeModule :: TBinding (Context -> Graph -> Module -> Either (InContext Error) (Maybe Module))
- Hydra.Sources.Kernel.Terms.Decoding: decodeRecordType :: TBinding (RowType -> Term)
+ Hydra.Sources.Kernel.Terms.Decoding: decodeRecordType :: TBinding ([FieldType] -> Term)
- Hydra.Sources.Kernel.Terms.Decoding: decodeUnionType :: TBinding (RowType -> Term)
+ Hydra.Sources.Kernel.Terms.Decoding: decodeUnionType :: TBinding ([FieldType] -> Term)
- Hydra.Sources.Kernel.Terms.Decoding: decodeWrappedType :: TBinding (WrappedType -> Term)
+ Hydra.Sources.Kernel.Terms.Decoding: decodeWrappedType :: TBinding (Type -> Term)
- Hydra.Sources.Kernel.Terms.Decoding: filterTypeBindings :: TBinding ([Binding] -> Flow Graph [Binding])
+ Hydra.Sources.Kernel.Terms.Decoding: filterTypeBindings :: TBinding (Context -> Graph -> [Binding] -> Either (InContext Error) [Binding])
- Hydra.Sources.Kernel.Terms.Decoding: isDecodableBinding :: TBinding (Binding -> Flow Graph (Maybe Binding))
+ Hydra.Sources.Kernel.Terms.Decoding: isDecodableBinding :: TBinding (Context -> Graph -> Binding -> Either (InContext Error) (Maybe Binding))
- Hydra.Sources.Kernel.Terms.Encoding: encodeBinding :: TBinding (Binding -> Flow Graph Binding)
+ Hydra.Sources.Kernel.Terms.Encoding: encodeBinding :: TBinding (Context -> Graph -> Binding -> Either (InContext DecodingError) Binding)
- Hydra.Sources.Kernel.Terms.Encoding: encodeModule :: TBinding (Module -> Flow Graph (Maybe Module))
+ Hydra.Sources.Kernel.Terms.Encoding: encodeModule :: TBinding (Context -> Graph -> Module -> Either (InContext Error) (Maybe Module))
- Hydra.Sources.Kernel.Terms.Encoding: encodeRecordType :: TBinding (RowType -> Term)
+ Hydra.Sources.Kernel.Terms.Encoding: encodeRecordType :: TBinding ([FieldType] -> Term)
- Hydra.Sources.Kernel.Terms.Encoding: encodeUnionType :: TBinding (RowType -> Term)
+ Hydra.Sources.Kernel.Terms.Encoding: encodeUnionType :: TBinding ([FieldType] -> Term)
- Hydra.Sources.Kernel.Terms.Encoding: encodeWrappedType :: TBinding (WrappedType -> Term)
+ Hydra.Sources.Kernel.Terms.Encoding: encodeWrappedType :: TBinding (Type -> Term)
- Hydra.Sources.Kernel.Terms.Encoding: filterTypeBindings :: TBinding ([Binding] -> Flow Graph [Binding])
+ Hydra.Sources.Kernel.Terms.Encoding: filterTypeBindings :: TBinding (Context -> Graph -> [Binding] -> Either (InContext Error) [Binding])
- Hydra.Sources.Kernel.Terms.Encoding: isEncodableBinding :: TBinding (Binding -> Flow Graph (Maybe Binding))
+ Hydra.Sources.Kernel.Terms.Encoding: isEncodableBinding :: TBinding (Context -> Graph -> Binding -> Either (InContext Error) (Maybe Binding))
- Hydra.Sources.Kernel.Terms.Extract.Core: bigfloat :: TBinding (Term -> Flow Graph Double)
+ Hydra.Sources.Kernel.Terms.Extract.Core: bigfloat :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Double)
- Hydra.Sources.Kernel.Terms.Extract.Core: bigfloatValue :: TBinding (FloatValue -> Flow Graph Double)
+ Hydra.Sources.Kernel.Terms.Extract.Core: bigfloatValue :: TBinding (Context -> FloatValue -> Either (InContext Error) Double)
- Hydra.Sources.Kernel.Terms.Extract.Core: bigint :: TBinding (Term -> Flow Graph Integer)
+ Hydra.Sources.Kernel.Terms.Extract.Core: bigint :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Integer)
- Hydra.Sources.Kernel.Terms.Extract.Core: bigintValue :: TBinding (IntegerValue -> Flow Graph Integer)
+ Hydra.Sources.Kernel.Terms.Extract.Core: bigintValue :: TBinding (Context -> IntegerValue -> Either (InContext Error) Integer)
- Hydra.Sources.Kernel.Terms.Extract.Core: binary :: TBinding (Term -> Flow Graph String)
+ Hydra.Sources.Kernel.Terms.Extract.Core: binary :: TBinding (Context -> Graph -> Term -> Either (InContext Error) String)
- Hydra.Sources.Kernel.Terms.Extract.Core: binaryLiteral :: TBinding (Literal -> Flow Graph String)
+ Hydra.Sources.Kernel.Terms.Extract.Core: binaryLiteral :: TBinding (Context -> Literal -> Either (InContext Error) String)
- Hydra.Sources.Kernel.Terms.Extract.Core: boolean :: TBinding (Term -> Flow Graph Bool)
+ Hydra.Sources.Kernel.Terms.Extract.Core: boolean :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Bool)
- Hydra.Sources.Kernel.Terms.Extract.Core: booleanLiteral :: TBinding (Literal -> Flow Graph Bool)
+ Hydra.Sources.Kernel.Terms.Extract.Core: booleanLiteral :: TBinding (Context -> Literal -> Either (InContext Error) Bool)
- Hydra.Sources.Kernel.Terms.Extract.Core: caseField :: TBinding (Name -> String -> Term -> Flow Graph Field)
+ Hydra.Sources.Kernel.Terms.Extract.Core: caseField :: TBinding (Context -> Name -> String -> Graph -> Term -> Either (InContext Error) Field)
- Hydra.Sources.Kernel.Terms.Extract.Core: cases :: TBinding (Name -> Term -> Flow Graph CaseStatement)
+ Hydra.Sources.Kernel.Terms.Extract.Core: cases :: TBinding (Context -> Name -> Graph -> Term -> Either (InContext Error) CaseStatement)
- Hydra.Sources.Kernel.Terms.Extract.Core: eitherTerm :: TBinding ((Term -> Flow Graph x) -> (Term -> Flow Graph y) -> Term -> Flow Graph (Either x y))
+ Hydra.Sources.Kernel.Terms.Extract.Core: eitherTerm :: TBinding (Context -> (Term -> Either (InContext Error) x) -> (Term -> Either (InContext Error) y) -> Graph -> Term -> Either (InContext Error) (Either x y))
- Hydra.Sources.Kernel.Terms.Extract.Core: eitherType :: TBinding (Type -> Flow s EitherType)
+ Hydra.Sources.Kernel.Terms.Extract.Core: eitherType :: TBinding (Context -> Type -> Either (InContext Error) EitherType)
- Hydra.Sources.Kernel.Terms.Extract.Core: field :: TBinding (Name -> (Term -> Flow Graph x) -> [Field] -> Flow Graph x)
+ Hydra.Sources.Kernel.Terms.Extract.Core: field :: TBinding (Context -> Name -> (Term -> Either (InContext Error) x) -> Graph -> [Field] -> Either (InContext Error) x)
- Hydra.Sources.Kernel.Terms.Extract.Core: float32 :: TBinding (Term -> Flow Graph Float)
+ Hydra.Sources.Kernel.Terms.Extract.Core: float32 :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Float)
- Hydra.Sources.Kernel.Terms.Extract.Core: float32Value :: TBinding (FloatValue -> Flow Graph Float)
+ Hydra.Sources.Kernel.Terms.Extract.Core: float32Value :: TBinding (Context -> FloatValue -> Either (InContext Error) Float)
- Hydra.Sources.Kernel.Terms.Extract.Core: float64 :: TBinding (Term -> Flow Graph Double)
+ Hydra.Sources.Kernel.Terms.Extract.Core: float64 :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Double)
- Hydra.Sources.Kernel.Terms.Extract.Core: float64Value :: TBinding (FloatValue -> Flow Graph Double)
+ Hydra.Sources.Kernel.Terms.Extract.Core: float64Value :: TBinding (Context -> FloatValue -> Either (InContext Error) Double)
- Hydra.Sources.Kernel.Terms.Extract.Core: floatLiteral :: TBinding (Literal -> Flow Graph FloatValue)
+ Hydra.Sources.Kernel.Terms.Extract.Core: floatLiteral :: TBinding (Context -> Literal -> Either (InContext Error) FloatValue)
- Hydra.Sources.Kernel.Terms.Extract.Core: floatValue :: TBinding (Term -> Flow Graph FloatValue)
+ Hydra.Sources.Kernel.Terms.Extract.Core: floatValue :: TBinding (Context -> Graph -> Term -> Either (InContext Error) FloatValue)
- Hydra.Sources.Kernel.Terms.Extract.Core: functionType :: TBinding (Type -> Flow s FunctionType)
+ Hydra.Sources.Kernel.Terms.Extract.Core: functionType :: TBinding (Context -> Type -> Either (InContext Error) FunctionType)
- Hydra.Sources.Kernel.Terms.Extract.Core: injection :: TBinding (Name -> Term -> Flow Graph Field)
+ Hydra.Sources.Kernel.Terms.Extract.Core: injection :: TBinding (Context -> Name -> Graph -> Term -> Either (InContext Error) Field)
- Hydra.Sources.Kernel.Terms.Extract.Core: int16 :: TBinding (Term -> Flow Graph Int16)
+ Hydra.Sources.Kernel.Terms.Extract.Core: int16 :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Int16)
- Hydra.Sources.Kernel.Terms.Extract.Core: int16Value :: TBinding (IntegerValue -> Flow Graph Int16)
+ Hydra.Sources.Kernel.Terms.Extract.Core: int16Value :: TBinding (Context -> IntegerValue -> Either (InContext Error) Int16)
- Hydra.Sources.Kernel.Terms.Extract.Core: int32 :: TBinding (Term -> Flow Graph Int)
+ Hydra.Sources.Kernel.Terms.Extract.Core: int32 :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Int)
- Hydra.Sources.Kernel.Terms.Extract.Core: int32Value :: TBinding (IntegerValue -> Flow Graph Int)
+ Hydra.Sources.Kernel.Terms.Extract.Core: int32Value :: TBinding (Context -> IntegerValue -> Either (InContext Error) Int)
- Hydra.Sources.Kernel.Terms.Extract.Core: int64 :: TBinding (Term -> Flow Graph Int64)
+ Hydra.Sources.Kernel.Terms.Extract.Core: int64 :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Int64)
- Hydra.Sources.Kernel.Terms.Extract.Core: int64Value :: TBinding (IntegerValue -> Flow Graph Int64)
+ Hydra.Sources.Kernel.Terms.Extract.Core: int64Value :: TBinding (Context -> IntegerValue -> Either (InContext Error) Int64)
- Hydra.Sources.Kernel.Terms.Extract.Core: int8 :: TBinding (Term -> Flow Graph Int8)
+ Hydra.Sources.Kernel.Terms.Extract.Core: int8 :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Int8)
- Hydra.Sources.Kernel.Terms.Extract.Core: int8Value :: TBinding (IntegerValue -> Flow Graph Int8)
+ Hydra.Sources.Kernel.Terms.Extract.Core: int8Value :: TBinding (Context -> IntegerValue -> Either (InContext Error) Int8)
- Hydra.Sources.Kernel.Terms.Extract.Core: integerLiteral :: TBinding (Literal -> Flow Graph IntegerValue)
+ Hydra.Sources.Kernel.Terms.Extract.Core: integerLiteral :: TBinding (Context -> Literal -> Either (InContext Error) IntegerValue)
- Hydra.Sources.Kernel.Terms.Extract.Core: integerValue :: TBinding (Term -> Flow Graph IntegerValue)
+ Hydra.Sources.Kernel.Terms.Extract.Core: integerValue :: TBinding (Context -> Graph -> Term -> Either (InContext Error) IntegerValue)
- Hydra.Sources.Kernel.Terms.Extract.Core: lambda :: TBinding (Term -> Flow Graph Lambda)
+ Hydra.Sources.Kernel.Terms.Extract.Core: lambda :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Lambda)
- Hydra.Sources.Kernel.Terms.Extract.Core: lambdaBody :: TBinding (Term -> Flow Graph Term)
+ Hydra.Sources.Kernel.Terms.Extract.Core: lambdaBody :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Kernel.Terms.Extract.Core: letBinding :: TBinding (String -> Term -> Flow Graph Term)
+ Hydra.Sources.Kernel.Terms.Extract.Core: letBinding :: TBinding (Context -> String -> Graph -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Kernel.Terms.Extract.Core: let_ :: TBinding (Term -> Flow Graph Let)
+ Hydra.Sources.Kernel.Terms.Extract.Core: let_ :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Let)
- Hydra.Sources.Kernel.Terms.Extract.Core: list :: TBinding (Term -> Flow Graph [Term])
+ Hydra.Sources.Kernel.Terms.Extract.Core: list :: TBinding (Context -> Graph -> Term -> Either (InContext Error) [Term])
- Hydra.Sources.Kernel.Terms.Extract.Core: listHead :: TBinding (Term -> Flow Graph Term)
+ Hydra.Sources.Kernel.Terms.Extract.Core: listHead :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Kernel.Terms.Extract.Core: listOf :: TBinding ((Term -> Flow Graph x) -> Term -> Flow Graph [x])
+ Hydra.Sources.Kernel.Terms.Extract.Core: listOf :: TBinding (Context -> (Term -> Either (InContext Error) x) -> Graph -> Term -> Either (InContext Error) [x])
- Hydra.Sources.Kernel.Terms.Extract.Core: listType :: TBinding (Type -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Extract.Core: listType :: TBinding (Context -> Type -> Either (InContext Error) Type)
- Hydra.Sources.Kernel.Terms.Extract.Core: literal :: TBinding (Term -> Flow Graph Literal)
+ Hydra.Sources.Kernel.Terms.Extract.Core: literal :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Literal)
- Hydra.Sources.Kernel.Terms.Extract.Core: map :: TBinding ((Term -> Flow Graph k) -> (Term -> Flow Graph v) -> Term -> Flow Graph (Map k v))
+ Hydra.Sources.Kernel.Terms.Extract.Core: map :: TBinding (Context -> (Term -> Either (InContext Error) k) -> (Term -> Either (InContext Error) v) -> Graph -> Term -> Either (InContext Error) (Map k v))
- Hydra.Sources.Kernel.Terms.Extract.Core: mapType :: TBinding (Type -> Flow s MapType)
+ Hydra.Sources.Kernel.Terms.Extract.Core: mapType :: TBinding (Context -> Type -> Either (InContext Error) MapType)
- Hydra.Sources.Kernel.Terms.Extract.Core: maybeTerm :: TBinding ((Term -> Flow Graph x) -> Term -> Flow Graph (Maybe x))
+ Hydra.Sources.Kernel.Terms.Extract.Core: maybeTerm :: TBinding (Context -> (Term -> Either (InContext Error) x) -> Graph -> Term -> Either (InContext Error) (Maybe x))
- Hydra.Sources.Kernel.Terms.Extract.Core: maybeType :: TBinding (Type -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Extract.Core: maybeType :: TBinding (Context -> Type -> Either (InContext Error) Type)
- Hydra.Sources.Kernel.Terms.Extract.Core: nArgs :: TBinding (Name -> Int -> [a] -> Flow s ())
+ Hydra.Sources.Kernel.Terms.Extract.Core: nArgs :: TBinding (Context -> Name -> Int -> [a] -> Either (InContext Error) ())
- Hydra.Sources.Kernel.Terms.Extract.Core: pair :: TBinding ((Term -> Flow Graph k) -> (Term -> Flow Graph v) -> Term -> Flow Graph (k, v))
+ Hydra.Sources.Kernel.Terms.Extract.Core: pair :: TBinding (Context -> (Term -> Either (InContext Error) k) -> (Term -> Either (InContext Error) v) -> Graph -> Term -> Either (InContext Error) (k, v))
- Hydra.Sources.Kernel.Terms.Extract.Core: record :: TBinding (Name -> Term -> Flow Graph [Field])
+ Hydra.Sources.Kernel.Terms.Extract.Core: record :: TBinding (Context -> Name -> Graph -> Term -> Either (InContext Error) [Field])
- Hydra.Sources.Kernel.Terms.Extract.Core: recordType :: TBinding (Name -> Type -> Flow s [FieldType])
+ Hydra.Sources.Kernel.Terms.Extract.Core: recordType :: TBinding (Context -> Name -> Type -> Either (InContext Error) [FieldType])
- Hydra.Sources.Kernel.Terms.Extract.Core: set :: TBinding (Term -> Flow Graph (Set Term))
+ Hydra.Sources.Kernel.Terms.Extract.Core: set :: TBinding (Context -> Graph -> Term -> Either (InContext Error) (Set Term))
- Hydra.Sources.Kernel.Terms.Extract.Core: setOf :: TBinding ((Term -> Flow Graph x) -> Term -> Flow Graph (Set x))
+ Hydra.Sources.Kernel.Terms.Extract.Core: setOf :: TBinding (Context -> (Term -> Either (InContext Error) x) -> Graph -> Term -> Either (InContext Error) (Set x))
- Hydra.Sources.Kernel.Terms.Extract.Core: setType :: TBinding (Type -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Extract.Core: setType :: TBinding (Context -> Type -> Either (InContext Error) Type)
- Hydra.Sources.Kernel.Terms.Extract.Core: string :: TBinding (Term -> Flow Graph String)
+ Hydra.Sources.Kernel.Terms.Extract.Core: string :: TBinding (Context -> Graph -> Term -> Either (InContext Error) String)
- Hydra.Sources.Kernel.Terms.Extract.Core: stringLiteral :: TBinding (Literal -> Flow Graph String)
+ Hydra.Sources.Kernel.Terms.Extract.Core: stringLiteral :: TBinding (Context -> Literal -> Either (InContext Error) String)
- Hydra.Sources.Kernel.Terms.Extract.Core: termRecord :: TBinding (Term -> Flow Graph Record)
+ Hydra.Sources.Kernel.Terms.Extract.Core: termRecord :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Record)
- Hydra.Sources.Kernel.Terms.Extract.Core: uint16 :: TBinding (Term -> Flow Graph Int)
+ Hydra.Sources.Kernel.Terms.Extract.Core: uint16 :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Int)
- Hydra.Sources.Kernel.Terms.Extract.Core: uint16Value :: TBinding (IntegerValue -> Flow Graph Int)
+ Hydra.Sources.Kernel.Terms.Extract.Core: uint16Value :: TBinding (Context -> IntegerValue -> Either (InContext Error) Int)
- Hydra.Sources.Kernel.Terms.Extract.Core: uint32 :: TBinding (Term -> Flow Graph Int64)
+ Hydra.Sources.Kernel.Terms.Extract.Core: uint32 :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Int64)
- Hydra.Sources.Kernel.Terms.Extract.Core: uint32Value :: TBinding (IntegerValue -> Flow Graph Int64)
+ Hydra.Sources.Kernel.Terms.Extract.Core: uint32Value :: TBinding (Context -> IntegerValue -> Either (InContext Error) Int64)
- Hydra.Sources.Kernel.Terms.Extract.Core: uint64 :: TBinding (Term -> Flow Graph Integer)
+ Hydra.Sources.Kernel.Terms.Extract.Core: uint64 :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Integer)
- Hydra.Sources.Kernel.Terms.Extract.Core: uint64Value :: TBinding (IntegerValue -> Flow Graph Integer)
+ Hydra.Sources.Kernel.Terms.Extract.Core: uint64Value :: TBinding (Context -> IntegerValue -> Either (InContext Error) Integer)
- Hydra.Sources.Kernel.Terms.Extract.Core: uint8 :: TBinding (Term -> Flow Graph Int16)
+ Hydra.Sources.Kernel.Terms.Extract.Core: uint8 :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Int16)
- Hydra.Sources.Kernel.Terms.Extract.Core: uint8Value :: TBinding (IntegerValue -> Flow Graph Int16)
+ Hydra.Sources.Kernel.Terms.Extract.Core: uint8Value :: TBinding (Context -> IntegerValue -> Either (InContext Error) Int16)
- Hydra.Sources.Kernel.Terms.Extract.Core: unionType :: TBinding (Name -> Type -> Flow s [FieldType])
+ Hydra.Sources.Kernel.Terms.Extract.Core: unionType :: TBinding (Context -> Name -> Type -> Either (InContext Error) [FieldType])
- Hydra.Sources.Kernel.Terms.Extract.Core: unit :: TBinding (Term -> Flow Graph ())
+ Hydra.Sources.Kernel.Terms.Extract.Core: unit :: TBinding (Context -> Term -> Either (InContext Error) ())
- Hydra.Sources.Kernel.Terms.Extract.Core: unitVariant :: TBinding (Name -> Term -> Flow Graph Name)
+ Hydra.Sources.Kernel.Terms.Extract.Core: unitVariant :: TBinding (Context -> Name -> Graph -> Term -> Either (InContext Error) Name)
- Hydra.Sources.Kernel.Terms.Extract.Core: wrap :: TBinding (Name -> Term -> Flow Graph Term)
+ Hydra.Sources.Kernel.Terms.Extract.Core: wrap :: TBinding (Context -> Name -> Graph -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Kernel.Terms.Extract.Core: wrappedType :: TBinding (Name -> Type -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Extract.Core: wrappedType :: TBinding (Context -> Name -> Type -> Either (InContext Error) Type)
- Hydra.Sources.Kernel.Terms.Extract.Util: comparison :: TBinding (Term -> Flow Graph Comparison)
+ Hydra.Sources.Kernel.Terms.Extract.Util: comparison :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Comparison)
- Hydra.Sources.Kernel.Terms.Hoisting: augmentBindingsWithNewFreeVars :: TBinding (TypeContext -> Set Name -> [Binding] -> ([Binding], TermSubst))
+ Hydra.Sources.Kernel.Terms.Hoisting: augmentBindingsWithNewFreeVars :: TBinding (Graph -> Set Name -> [Binding] -> ([Binding], TermSubst))
- Hydra.Sources.Kernel.Terms.Hoisting: bindingUsesContextTypeVars :: TBinding (TypeContext -> Binding -> Bool)
+ Hydra.Sources.Kernel.Terms.Hoisting: bindingUsesContextTypeVars :: TBinding (Graph -> Binding -> Bool)
- Hydra.Sources.Kernel.Terms.Hoisting: hoistCaseStatements :: TBinding (TypeContext -> Term -> Term)
+ Hydra.Sources.Kernel.Terms.Hoisting: hoistCaseStatements :: TBinding (Graph -> Term -> Term)
- Hydra.Sources.Kernel.Terms.Hoisting: hoistCaseStatementsInGraph :: TBinding (Graph -> Flow Graph Graph)
+ Hydra.Sources.Kernel.Terms.Hoisting: hoistCaseStatementsInGraph :: TBinding ([Binding] -> [Binding])
- Hydra.Sources.Kernel.Terms.Hoisting: hoistLetBindingsWithContext :: TBinding ((Binding -> Bool) -> TypeContext -> Let -> Let)
+ Hydra.Sources.Kernel.Terms.Hoisting: hoistLetBindingsWithContext :: TBinding ((Binding -> Bool) -> Graph -> Let -> Let)
- Hydra.Sources.Kernel.Terms.Hoisting: hoistLetBindingsWithPredicate :: TBinding ((Binding -> Bool) -> (TypeContext -> Binding -> Bool) -> TypeContext -> Let -> Let)
+ Hydra.Sources.Kernel.Terms.Hoisting: hoistLetBindingsWithPredicate :: TBinding ((Binding -> Bool) -> (Graph -> Binding -> Bool) -> Graph -> Let -> Let)
- Hydra.Sources.Kernel.Terms.Hoisting: hoistSubterms :: TBinding ((([TermAccessor], Term) -> Bool) -> TypeContext -> Term -> Term)
+ Hydra.Sources.Kernel.Terms.Hoisting: hoistSubterms :: TBinding ((([SubtermStep], Term) -> Bool) -> Graph -> Term -> Term)
- Hydra.Sources.Kernel.Terms.Hoisting: isApplicationFunction :: TBinding (TermAccessor -> Bool)
+ Hydra.Sources.Kernel.Terms.Hoisting: isApplicationFunction :: TBinding (SubtermStep -> Bool)
- Hydra.Sources.Kernel.Terms.Hoisting: isLambdaBody :: TBinding (TermAccessor -> Bool)
+ Hydra.Sources.Kernel.Terms.Hoisting: isLambdaBody :: TBinding (SubtermStep -> Bool)
- Hydra.Sources.Kernel.Terms.Hoisting: normalizePathForHoisting :: TBinding ([TermAccessor] -> [TermAccessor])
+ Hydra.Sources.Kernel.Terms.Hoisting: normalizePathForHoisting :: TBinding ([SubtermStep] -> [SubtermStep])
- Hydra.Sources.Kernel.Terms.Hoisting: shouldHoistAll :: TBinding (TypeContext -> Binding -> Bool)
+ Hydra.Sources.Kernel.Terms.Hoisting: shouldHoistAll :: TBinding (Graph -> Binding -> Bool)
- Hydra.Sources.Kernel.Terms.Hoisting: shouldHoistCaseStatement :: TBinding (([TermAccessor], Term) -> Bool)
+ Hydra.Sources.Kernel.Terms.Hoisting: shouldHoistCaseStatement :: TBinding (([SubtermStep], Term) -> Bool)
- Hydra.Sources.Kernel.Terms.Hoisting: shouldHoistPolymorphic :: TBinding (TypeContext -> Binding -> Bool)
+ Hydra.Sources.Kernel.Terms.Hoisting: shouldHoistPolymorphic :: TBinding (Graph -> Binding -> Bool)
- Hydra.Sources.Kernel.Terms.Hoisting: updateHoistState :: TBinding (TermAccessor -> (Bool, Bool) -> (Bool, Bool))
+ Hydra.Sources.Kernel.Terms.Hoisting: updateHoistState :: TBinding (SubtermStep -> (Bool, Bool) -> (Bool, Bool))
- Hydra.Sources.Kernel.Terms.Inference: bindConstraints :: TBinding (InferenceContext -> (TypeSubst -> Flow s a) -> [TypeConstraint] -> Flow s a)
+ Hydra.Sources.Kernel.Terms.Inference: bindConstraints :: TBinding (Context -> Graph -> [TypeConstraint] -> Either (InContext Error) TypeSubst)
- Hydra.Sources.Kernel.Terms.Inference: bindUnboundTypeVariables :: TBinding (InferenceContext -> Term -> Term)
+ Hydra.Sources.Kernel.Terms.Inference: bindUnboundTypeVariables :: TBinding (Graph -> Term -> Term)
- Hydra.Sources.Kernel.Terms.Inference: extendContext :: TBinding ([(Name, TypeScheme)] -> InferenceContext -> InferenceContext)
+ Hydra.Sources.Kernel.Terms.Inference: extendContext :: TBinding ([(Name, TypeScheme)] -> Graph -> Graph)
- Hydra.Sources.Kernel.Terms.Inference: finalizeInferredTerm :: TBinding (InferenceContext -> Term -> Flow s Term)
+ Hydra.Sources.Kernel.Terms.Inference: finalizeInferredTerm :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Kernel.Terms.Inference: forInferredTerm :: TBinding (InferenceContext -> Term -> String -> (InferenceResult -> a) -> Flow s a)
+ Hydra.Sources.Kernel.Terms.Inference: forInferredTerm :: TBinding (Context -> Graph -> Term -> String -> (InferenceResult -> a) -> Either (InContext Error) (a, Context))
- Hydra.Sources.Kernel.Terms.Inference: freeVariablesInContext :: TBinding (InferenceContext -> Set Name)
+ Hydra.Sources.Kernel.Terms.Inference: freeVariablesInContext :: TBinding (Graph -> Set Name)
- Hydra.Sources.Kernel.Terms.Inference: freshVariableType :: TBinding (Flow s Type)
+ Hydra.Sources.Kernel.Terms.Inference: freshVariableType :: TBinding (Context -> (Type, Context))
- Hydra.Sources.Kernel.Terms.Inference: generalize :: TBinding (InferenceContext -> Type -> TypeScheme)
+ Hydra.Sources.Kernel.Terms.Inference: generalize :: TBinding (Graph -> Type -> TypeScheme)
- Hydra.Sources.Kernel.Terms.Inference: inferGraphTypes :: TBinding (Graph -> Flow s Graph)
+ Hydra.Sources.Kernel.Terms.Inference: inferGraphTypes :: TBinding (Context -> [Binding] -> Graph -> Either (InContext Error) ((Graph, [Binding]), Context))
- Hydra.Sources.Kernel.Terms.Inference: inferInGraphContext :: TBinding (Term -> Flow Graph InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferInGraphContext :: TBinding (Context -> Graph -> Term -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferMany :: TBinding (InferenceContext -> [(Term, String)] -> Flow s ([Term], [Type], TypeSubst))
+ Hydra.Sources.Kernel.Terms.Inference: inferMany :: TBinding (Context -> Graph -> [(Term, String)] -> Either (InContext Error) (([Term], ([Type], (TypeSubst, Map Name TypeVariableMetadata))), Context))
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOf :: TBinding (InferenceContext -> Term -> Flow s (Term, TypeScheme))
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOf :: TBinding (Context -> Graph -> Term -> Either (InContext Error) ((Term, TypeScheme), Context))
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfAnnotatedTerm :: TBinding (InferenceContext -> AnnotatedTerm -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfAnnotatedTerm :: TBinding (Context -> Graph -> AnnotatedTerm -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfApplication :: TBinding (InferenceContext -> Application -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfApplication :: TBinding (Context -> Graph -> Application -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfCaseStatement :: TBinding (InferenceContext -> CaseStatement -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfCaseStatement :: TBinding (Context -> Graph -> CaseStatement -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfCollection :: TBinding (InferenceContext -> (Type -> Type) -> ([Term] -> Term) -> String -> [Term] -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfCollection :: TBinding (Context -> Graph -> (Type -> Type) -> ([Term] -> Term) -> String -> Set Name -> [Term] -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfEither :: TBinding (InferenceContext -> Either Term Term -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfEither :: TBinding (Context -> Graph -> Either Term Term -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfElimination :: TBinding (InferenceContext -> Elimination -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfElimination :: TBinding (Context -> Graph -> Elimination -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfFunction :: TBinding (InferenceContext -> Function -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfFunction :: TBinding (Context -> Graph -> Function -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfInjection :: TBinding (InferenceContext -> Injection -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfInjection :: TBinding (Context -> Graph -> Injection -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfLambda :: TBinding (InferenceContext -> Lambda -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfLambda :: TBinding (Context -> Graph -> Lambda -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfLet :: TBinding (InferenceContext -> Let -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfLet :: TBinding (Context -> Graph -> Let -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfLetNormalized :: TBinding (InferenceContext -> Let -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfLetNormalized :: TBinding (Context -> Graph -> Let -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfList :: TBinding (InferenceContext -> [Term] -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfList :: TBinding (Context -> Graph -> [Term] -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfLiteral :: TBinding (InferenceContext -> Literal -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfLiteral :: TBinding (Context -> Literal -> InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfMap :: TBinding (InferenceContext -> Map Term Term -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfMap :: TBinding (Context -> Graph -> Map Term Term -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfOptional :: TBinding (InferenceContext -> Maybe Term -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfOptional :: TBinding (Context -> Graph -> Maybe Term -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfPair :: TBinding (InferenceContext -> (Term, Term) -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfPair :: TBinding (Context -> Graph -> (Term, Term) -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfPrimitive :: TBinding (InferenceContext -> Name -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfPrimitive :: TBinding (Context -> Graph -> Name -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfProjection :: TBinding (InferenceContext -> Projection -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfProjection :: TBinding (Context -> Graph -> Projection -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfRecord :: TBinding (InferenceContext -> Record -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfRecord :: TBinding (Context -> Graph -> Record -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfSet :: TBinding (InferenceContext -> Set Term -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfSet :: TBinding (Context -> Graph -> Set Term -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfTerm :: TBinding (InferenceContext -> Term -> String -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfTerm :: TBinding (Context -> Graph -> Term -> String -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfTypeApplication :: TBinding (InferenceContext -> TypeApplicationTerm -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfTypeApplication :: TBinding (Context -> Graph -> TypeApplicationTerm -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfTypeLambda :: TBinding (InferenceContext -> TypeLambda -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfTypeLambda :: TBinding (Context -> Graph -> TypeLambda -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfUnit :: TBinding InferenceResult
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfUnit :: TBinding (Context -> InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfUnwrap :: TBinding (InferenceContext -> Name -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfUnwrap :: TBinding (Context -> Graph -> Name -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfVariable :: TBinding (InferenceContext -> Name -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfVariable :: TBinding (Context -> Graph -> Name -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypeOfWrappedTerm :: TBinding (InferenceContext -> WrappedTerm -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: inferTypeOfWrappedTerm :: TBinding (Context -> Graph -> WrappedTerm -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: inferTypesOfTemporaryBindings :: TBinding (InferenceContext -> [Binding] -> Flow s ([Term], ([Type], (TypeSubst, Map Name TypeVariableMetadata))))
+ Hydra.Sources.Kernel.Terms.Inference: inferTypesOfTemporaryBindings :: TBinding (Context -> Graph -> [Binding] -> Either (InContext Error) (([Term], ([Type], (TypeSubst, Map Name TypeVariableMetadata))), Context))
- Hydra.Sources.Kernel.Terms.Inference: isUnbound :: TBinding (InferenceContext -> Name -> Bool)
+ Hydra.Sources.Kernel.Terms.Inference: isUnbound :: TBinding (Graph -> Name -> Bool)
- Hydra.Sources.Kernel.Terms.Inference: mapConstraints :: TBinding (InferenceContext -> (TypeSubst -> a) -> [TypeConstraint] -> Flow s a)
+ Hydra.Sources.Kernel.Terms.Inference: mapConstraints :: TBinding (Context -> Graph -> (TypeSubst -> a) -> [TypeConstraint] -> Either (InContext Error) a)
- Hydra.Sources.Kernel.Terms.Inference: yield :: TBinding (Term -> Type -> TypeSubst -> InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: yield :: TBinding (Context -> Term -> Type -> TypeSubst -> InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: yieldChecked :: TBinding (Term -> Type -> TypeSubst -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: yieldChecked :: TBinding (Context -> Term -> Type -> TypeSubst -> InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: yieldCheckedWithConstraints :: TBinding (Term -> Type -> TypeSubst -> Map Name TypeVariableMetadata -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: yieldCheckedWithConstraints :: TBinding (Context -> Term -> Type -> TypeSubst -> Map Name TypeVariableMetadata -> InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: yieldDebug :: TBinding (InferenceContext -> String -> Term -> Type -> TypeSubst -> Flow s InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: yieldDebug :: TBinding (Context -> Graph -> String -> Term -> Type -> TypeSubst -> Either (InContext Error) InferenceResult)
- Hydra.Sources.Kernel.Terms.Inference: yieldWithConstraints :: TBinding (Term -> Type -> TypeSubst -> Map Name TypeVariableMetadata -> InferenceResult)
+ Hydra.Sources.Kernel.Terms.Inference: yieldWithConstraints :: TBinding (Context -> Term -> Type -> TypeSubst -> Map Name TypeVariableMetadata -> InferenceResult)
- Hydra.Sources.Kernel.Terms.Lexical: dereferenceElement :: TBinding (Name -> Flow Graph (Maybe Binding))
+ Hydra.Sources.Kernel.Terms.Lexical: dereferenceElement :: TBinding (Graph -> Name -> Maybe Binding)
- Hydra.Sources.Kernel.Terms.Lexical: elementsToGraph :: TBinding (Graph -> Maybe Graph -> [Binding] -> Graph)
+ Hydra.Sources.Kernel.Terms.Lexical: elementsToGraph :: TBinding (Graph -> Map Name TypeScheme -> [Binding] -> Graph)
- Hydra.Sources.Kernel.Terms.Lexical: getField :: TBinding (Map Name Term -> Name -> (Term -> Flow Graph b) -> Flow Graph b)
+ Hydra.Sources.Kernel.Terms.Lexical: getField :: TBinding (Context -> Map Name Term -> Name -> (Term -> Either (InContext Error) b) -> Either (InContext Error) b)
- Hydra.Sources.Kernel.Terms.Lexical: matchEnum :: TBinding (Name -> [(Name, b)] -> Term -> Flow Graph b)
+ Hydra.Sources.Kernel.Terms.Lexical: matchEnum :: TBinding (Context -> Graph -> Name -> [(Name, b)] -> Term -> Either (InContext Error) b)
- Hydra.Sources.Kernel.Terms.Lexical: matchRecord :: TBinding ((Map Name Term -> Flow Graph b) -> Term -> Flow Graph b)
+ Hydra.Sources.Kernel.Terms.Lexical: matchRecord :: TBinding (Context -> Graph -> (Map Name Term -> Either (InContext Error) b) -> Term -> Either (InContext Error) b)
- Hydra.Sources.Kernel.Terms.Lexical: matchUnion :: TBinding (Name -> [(Name, Term -> Flow Graph b)] -> Term -> Flow Graph b)
+ Hydra.Sources.Kernel.Terms.Lexical: matchUnion :: TBinding (Context -> Graph -> Name -> [(Name, Term -> Either (InContext Error) b)] -> Term -> Either (InContext Error) b)
- Hydra.Sources.Kernel.Terms.Lexical: matchUnitField :: TBinding (Name -> y -> (Name, x -> Flow Graph y))
+ Hydra.Sources.Kernel.Terms.Lexical: matchUnitField :: TBinding (Name -> y -> (Name, x -> Either (InContext Error) y))
- Hydra.Sources.Kernel.Terms.Lexical: requireElement :: TBinding (Name -> Flow Graph Binding)
+ Hydra.Sources.Kernel.Terms.Lexical: requireElement :: TBinding (Context -> Graph -> Name -> Either (InContext Error) Binding)
- Hydra.Sources.Kernel.Terms.Lexical: requirePrimitive :: TBinding (Name -> Flow Graph Primitive)
+ Hydra.Sources.Kernel.Terms.Lexical: requirePrimitive :: TBinding (Context -> Graph -> Name -> Either (InContext Error) Primitive)
- Hydra.Sources.Kernel.Terms.Lexical: requirePrimitiveType :: TBinding (TypeContext -> Name -> Flow s TypeScheme)
+ Hydra.Sources.Kernel.Terms.Lexical: requirePrimitiveType :: TBinding (Context -> Graph -> Name -> Either (InContext Error) TypeScheme)
- Hydra.Sources.Kernel.Terms.Lexical: requireTerm :: TBinding (Name -> Flow Graph Term)
+ Hydra.Sources.Kernel.Terms.Lexical: requireTerm :: TBinding (Context -> Graph -> Name -> Either (InContext Error) Term)
- Hydra.Sources.Kernel.Terms.Lexical: resolveTerm :: TBinding (Name -> Flow Graph (Maybe Term))
+ Hydra.Sources.Kernel.Terms.Lexical: resolveTerm :: TBinding (Graph -> Name -> Maybe Term)
- Hydra.Sources.Kernel.Terms.Lexical: stripAndDereferenceTerm :: TBinding (Term -> Flow Graph Term)
+ Hydra.Sources.Kernel.Terms.Lexical: stripAndDereferenceTerm :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Kernel.Terms.Reduction: betaReduceType :: TBinding (Type -> Flow Graph Type)
+ Hydra.Sources.Kernel.Terms.Reduction: betaReduceType :: TBinding (Context -> Graph -> Type -> Either (InContext Error) Type)
- Hydra.Sources.Kernel.Terms.Reduction: etaExpandTermNew :: TBinding (TypeContext -> Term -> Term)
+ Hydra.Sources.Kernel.Terms.Reduction: etaExpandTermNew :: TBinding (Graph -> Term -> Term)
- Hydra.Sources.Kernel.Terms.Reduction: etaExpandTypedTerm :: TBinding (TypeContext -> Term -> Flow s Term)
+ Hydra.Sources.Kernel.Terms.Reduction: etaExpandTypedTerm :: TBinding (Context -> Graph -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Kernel.Terms.Reduction: reduceTerm :: TBinding (Bool -> Term -> Flow Graph Term)
+ Hydra.Sources.Kernel.Terms.Reduction: reduceTerm :: TBinding (Context -> Graph -> Bool -> Term -> Either (InContext Error) Term)
- Hydra.Sources.Kernel.Terms.Reduction: termIsValue :: TBinding (Graph -> Term -> Bool)
+ Hydra.Sources.Kernel.Terms.Reduction: termIsValue :: TBinding (Term -> Bool)
- Hydra.Sources.Kernel.Terms.Rewriting: inlineType :: TBinding (Map Name Type -> Type -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Rewriting: inlineType :: TBinding (Map Name Type -> Type -> Either String Type)
- Hydra.Sources.Kernel.Terms.Rewriting: rewriteAndFoldTermWithPath :: TBinding ((([TermAccessor] -> a -> Term -> (a, Term)) -> [TermAccessor] -> a -> Term -> (a, Term)) -> a -> Term -> (a, Term))
+ Hydra.Sources.Kernel.Terms.Rewriting: rewriteAndFoldTermWithPath :: TBinding ((([SubtermStep] -> a -> Term -> (a, Term)) -> [SubtermStep] -> a -> Term -> (a, Term)) -> a -> Term -> (a, Term))
- Hydra.Sources.Kernel.Terms.Rewriting: rewriteTermM :: TBinding (((Term -> Flow s Term) -> Term -> Flow s Term) -> Term -> Flow s Term)
+ Hydra.Sources.Kernel.Terms.Rewriting: rewriteTermM :: TBinding (((Term -> Either e Term) -> Term -> Either e Term) -> Term -> Either e Term)
- Hydra.Sources.Kernel.Terms.Rewriting: rewriteTermWithContextM :: TBinding (((a -> Term -> Flow s Term) -> a -> Term -> Flow s Term) -> a -> Term -> Flow s Term)
+ Hydra.Sources.Kernel.Terms.Rewriting: rewriteTermWithContextM :: TBinding (((a -> Term -> Either e Term) -> a -> Term -> Either e Term) -> a -> Term -> Either e Term)
- Hydra.Sources.Kernel.Terms.Rewriting: rewriteTypeM :: TBinding (((Type -> Flow s Type) -> Type -> Flow s Type) -> Type -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Rewriting: rewriteTypeM :: TBinding (((Type -> Either e Type) -> Type -> Either e Type) -> Type -> Either e Type)
- Hydra.Sources.Kernel.Terms.Schemas: dependencyNamespaces :: TBinding (Bool -> Bool -> Bool -> Bool -> [Binding] -> Flow Graph (Set Namespace))
+ Hydra.Sources.Kernel.Terms.Schemas: dependencyNamespaces :: TBinding (Context -> Graph -> Bool -> Bool -> Bool -> Bool -> [Binding] -> Either (InContext Error) (Set Namespace))
- Hydra.Sources.Kernel.Terms.Schemas: dereferenceType :: TBinding (Name -> Flow Graph (Maybe Type))
+ Hydra.Sources.Kernel.Terms.Schemas: dereferenceType :: TBinding (Context -> Graph -> Name -> Either (InContext Error) (Maybe Type))
- Hydra.Sources.Kernel.Terms.Schemas: elementAsTypeApplicationTerm :: TBinding (Binding -> Flow Graph TypeApplicationTerm)
+ Hydra.Sources.Kernel.Terms.Schemas: elementAsTypeApplicationTerm :: TBinding (Context -> Binding -> Either (InContext Error) TypeApplicationTerm)
- Hydra.Sources.Kernel.Terms.Schemas: elementsWithDependencies :: TBinding ([Binding] -> Flow Graph [Binding])
+ Hydra.Sources.Kernel.Terms.Schemas: elementsWithDependencies :: TBinding (Context -> Graph -> [Binding] -> Either (InContext Error) [Binding])
- Hydra.Sources.Kernel.Terms.Schemas: fieldTypes :: TBinding (Type -> Flow Graph (Map Name Type))
+ Hydra.Sources.Kernel.Terms.Schemas: fieldTypes :: TBinding (Context -> Graph -> Type -> Either (InContext Error) (Map Name Type))
- Hydra.Sources.Kernel.Terms.Schemas: findFieldType :: TBinding (Name -> [FieldType] -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Schemas: findFieldType :: TBinding (Context -> Name -> [FieldType] -> Either (InContext Error) Type)
- Hydra.Sources.Kernel.Terms.Schemas: freshName :: TBinding (Flow s Name)
+ Hydra.Sources.Kernel.Terms.Schemas: freshName :: TBinding (Context -> (Name, Context))
- Hydra.Sources.Kernel.Terms.Schemas: freshNames :: TBinding (Int -> Flow s [Name])
+ Hydra.Sources.Kernel.Terms.Schemas: freshNames :: TBinding (Int -> Context -> ([Name], Context))
- Hydra.Sources.Kernel.Terms.Schemas: graphAsLet :: TBinding (Graph -> Let)
+ Hydra.Sources.Kernel.Terms.Schemas: graphAsLet :: TBinding ([Binding] -> Term -> Let)
- Hydra.Sources.Kernel.Terms.Schemas: graphAsTerm :: TBinding (Graph -> Term)
+ Hydra.Sources.Kernel.Terms.Schemas: graphAsTerm :: TBinding ([Binding] -> Term -> Term)
- Hydra.Sources.Kernel.Terms.Schemas: graphAsTypes :: TBinding (Graph -> Flow s (Map Name Type))
+ Hydra.Sources.Kernel.Terms.Schemas: graphAsTypes :: TBinding (Context -> Graph -> [Binding] -> Either (InContext DecodingError) (Map Name Type))
- Hydra.Sources.Kernel.Terms.Schemas: instantiateType :: TBinding (Type -> Flow s Type)
+ Hydra.Sources.Kernel.Terms.Schemas: instantiateType :: TBinding (Context -> Type -> (Type, Context))
- Hydra.Sources.Kernel.Terms.Schemas: instantiateTypeScheme :: TBinding (TypeScheme -> Flow s TypeScheme)
+ Hydra.Sources.Kernel.Terms.Schemas: instantiateTypeScheme :: TBinding (Context -> TypeScheme -> (TypeScheme, Context))
- Hydra.Sources.Kernel.Terms.Schemas: isEnumRowType :: TBinding (RowType -> Bool)
+ Hydra.Sources.Kernel.Terms.Schemas: isEnumRowType :: TBinding ([FieldType] -> Bool)
- Hydra.Sources.Kernel.Terms.Schemas: isSerializable :: TBinding (Binding -> Flow Graph Bool)
+ Hydra.Sources.Kernel.Terms.Schemas: isSerializable :: TBinding (Context -> Graph -> Binding -> Either (InContext Error) Bool)
- Hydra.Sources.Kernel.Terms.Schemas: isSerializableByName :: TBinding (Name -> Flow Graph Bool)
+ Hydra.Sources.Kernel.Terms.Schemas: isSerializableByName :: TBinding (Context -> Graph -> Name -> Either (InContext Error) Bool)
- Hydra.Sources.Kernel.Terms.Schemas: moduleDependencyNamespaces :: TBinding (Bool -> Bool -> Bool -> Bool -> Module -> Flow Graph (Set Namespace))
+ Hydra.Sources.Kernel.Terms.Schemas: moduleDependencyNamespaces :: TBinding (Context -> Graph -> Bool -> Bool -> Bool -> Bool -> Module -> Either (InContext Error) (Set Namespace))
- Hydra.Sources.Kernel.Terms.Schemas: requireRecordType :: TBinding (Name -> Flow Graph RowType)
+ Hydra.Sources.Kernel.Terms.Schemas: requireRecordType :: TBinding (Context -> Graph -> Name -> Either (InContext Error) [FieldType])
- Hydra.Sources.Kernel.Terms.Schemas: requireRowType :: TBinding (String -> (Type -> Maybe RowType) -> Name -> Flow Graph RowType)
+ Hydra.Sources.Kernel.Terms.Schemas: requireRowType :: TBinding (Context -> String -> (Type -> Maybe [FieldType]) -> Graph -> Name -> Either (InContext Error) [FieldType])
- Hydra.Sources.Kernel.Terms.Schemas: requireSchemaType :: TBinding (InferenceContext -> Name -> Flow s TypeScheme)
+ Hydra.Sources.Kernel.Terms.Schemas: requireSchemaType :: TBinding (Context -> Map Name TypeScheme -> Name -> Either (InContext Error) (TypeScheme, Context))
- Hydra.Sources.Kernel.Terms.Schemas: requireType :: TBinding (Name -> Flow Graph Type)
+ Hydra.Sources.Kernel.Terms.Schemas: requireType :: TBinding (Context -> Graph -> Name -> Either (InContext Error) Type)
- Hydra.Sources.Kernel.Terms.Schemas: requireUnionField_ :: TBinding (Name -> Name -> Flow Graph Type)
+ Hydra.Sources.Kernel.Terms.Schemas: requireUnionField_ :: TBinding (Context -> Graph -> Name -> Name -> Either (InContext Error) Type)
- Hydra.Sources.Kernel.Terms.Schemas: requireUnionType :: TBinding (Name -> Flow Graph RowType)
+ Hydra.Sources.Kernel.Terms.Schemas: requireUnionType :: TBinding (Context -> Graph -> Name -> Either (InContext Error) [FieldType])
- Hydra.Sources.Kernel.Terms.Schemas: resolveType :: TBinding (Type -> Flow Graph (Maybe Type))
+ Hydra.Sources.Kernel.Terms.Schemas: resolveType :: TBinding (Graph -> Type -> Maybe Type)
- Hydra.Sources.Kernel.Terms.Schemas: schemaGraphToTypingEnvironment :: TBinding (Graph -> Flow s (Map Name TypeScheme))
+ Hydra.Sources.Kernel.Terms.Schemas: schemaGraphToTypingEnvironment :: TBinding (Context -> Graph -> Either (InContext Error) (Map Name TypeScheme))
- Hydra.Sources.Kernel.Terms.Schemas: typeDependencies :: TBinding (Bool -> (Type -> Type) -> Name -> Flow Graph (Map Name Type))
+ Hydra.Sources.Kernel.Terms.Schemas: typeDependencies :: TBinding (Context -> Graph -> Bool -> (Type -> Type) -> Name -> Either (InContext Error) (Map Name Type))
- Hydra.Sources.Kernel.Terms.Schemas: withLambdaContext :: TBinding ((e -> TypeContext) -> (TypeContext -> e -> e) -> e -> Lambda -> (e -> Flow s a) -> Flow s a)
+ Hydra.Sources.Kernel.Terms.Schemas: withLambdaContext :: TBinding ((e -> Graph) -> (Graph -> e -> f) -> e -> Lambda -> (f -> a) -> a)
- Hydra.Sources.Kernel.Terms.Schemas: withLetContext :: TBinding ((e -> TypeContext) -> (TypeContext -> e -> e) -> (TypeContext -> Binding -> Maybe Term) -> e -> Let -> (e -> Flow s a) -> Flow s a)
+ Hydra.Sources.Kernel.Terms.Schemas: withLetContext :: TBinding ((e -> Graph) -> (Graph -> e -> f) -> (Graph -> Binding -> Maybe Term) -> e -> Let -> (f -> a) -> a)
- Hydra.Sources.Kernel.Terms.Schemas: withTypeLambdaContext :: TBinding ((e -> TypeContext) -> (TypeContext -> e -> e) -> e -> TypeLambda -> (e -> Flow s a) -> Flow s a)
+ Hydra.Sources.Kernel.Terms.Schemas: withTypeLambdaContext :: TBinding ((e -> Graph) -> (Graph -> e -> f) -> e -> TypeLambda -> (f -> a) -> a)
- Hydra.Sources.Kernel.Terms.Show.Graph: graph :: TBinding (Graph -> String)
+ Hydra.Sources.Kernel.Terms.Show.Graph: graph :: TBinding ([Binding] -> String)
- Hydra.Sources.Kernel.Terms.Substitution: substInContext :: TBinding (TypeSubst -> InferenceContext -> InferenceContext)
+ Hydra.Sources.Kernel.Terms.Substitution: substInContext :: TBinding (TypeSubst -> Graph -> Graph)
- Hydra.Sources.Kernel.Terms.Templates: graphToSchema :: TBinding (Graph -> Flow Graph (Map Name Type))
+ Hydra.Sources.Kernel.Terms.Templates: graphToSchema :: TBinding (Context -> Graph -> [Binding] -> Either (InContext DecodingError) (Map Name Type))
- Hydra.Sources.Kernel.Terms.Templates: instantiateTemplate :: TBinding (Bool -> Map Name Type -> Type -> Flow s Term)
+ Hydra.Sources.Kernel.Terms.Templates: instantiateTemplate :: TBinding (Context -> Bool -> Map Name Type -> Name -> Type -> Either (InContext Error) Term)
- Hydra.Sources.Kernel.Terms.Unification: joinTypes :: TBinding (Type -> Type -> String -> Flow s [TypeConstraint])
+ Hydra.Sources.Kernel.Terms.Unification: joinTypes :: TBinding (Context -> Type -> Type -> String -> Either (InContext UnificationError) [TypeConstraint])
- Hydra.Sources.Kernel.Terms.Unification: unifyTypeConstraints :: TBinding (Map Name TypeScheme -> [TypeConstraint] -> Flow s TypeSubst)
+ Hydra.Sources.Kernel.Terms.Unification: unifyTypeConstraints :: TBinding (Context -> Map Name TypeScheme -> [TypeConstraint] -> Either (InContext UnificationError) TypeSubst)
- Hydra.Sources.Kernel.Terms.Unification: unifyTypeLists :: TBinding (Map Name TypeScheme -> [Type] -> [Type] -> String -> Flow s TypeSubst)
+ Hydra.Sources.Kernel.Terms.Unification: unifyTypeLists :: TBinding (Context -> Map Name TypeScheme -> [Type] -> [Type] -> String -> Either (InContext UnificationError) TypeSubst)
- Hydra.Sources.Kernel.Terms.Unification: unifyTypes :: TBinding (Map Name TypeScheme -> Type -> Type -> String -> Flow s TypeSubst)
+ Hydra.Sources.Kernel.Terms.Unification: unifyTypes :: TBinding (Context -> Map Name TypeScheme -> Type -> Type -> String -> Either (InContext UnificationError) TypeSubst)
- Hydra.Substitution: substInContext :: TypeSubst -> InferenceContext -> InferenceContext
+ Hydra.Substitution: substInContext :: TypeSubst -> Graph -> Graph
- Hydra.Templates: graphToSchema :: Graph -> Flow Graph (Map Name Type)
+ Hydra.Templates: graphToSchema :: Context -> Graph -> [Binding] -> Either (InContext DecodingError) (Map Name Type)
- Hydra.Templates: instantiateTemplate :: Bool -> Map Name Type -> Type -> Flow t0 Term
+ Hydra.Templates: instantiateTemplate :: Context -> Bool -> Map Name Type -> Name -> Type -> Either (InContext Error) Term
- Hydra.Testing: TestCodec :: LanguageName -> FileExtension -> (Term -> Flow Graph String) -> (Type -> Flow Graph String) -> (String -> String) -> (Namespace -> String) -> String -> String -> String -> String -> (Set Name -> [String]) -> TestCodec
+ Hydra.Testing: TestCodec :: LanguageName -> FileExtension -> (Term -> Graph -> Either String String) -> (Type -> Graph -> Either String String) -> (String -> String) -> (Namespace -> String) -> String -> String -> String -> String -> (Set Name -> [String]) -> TestCodec
- Hydra.Testing: [testCodecEncodeTerm] :: TestCodec -> Term -> Flow Graph String
+ Hydra.Testing: [testCodecEncodeTerm] :: TestCodec -> Term -> Graph -> Either String String
- Hydra.Testing: [testCodecEncodeType] :: TestCodec -> Type -> Flow Graph String
+ Hydra.Testing: [testCodecEncodeType] :: TestCodec -> Type -> Graph -> Either String String
- Hydra.Typing: InferenceResult :: Term -> Type -> TypeSubst -> Map Name TypeVariableMetadata -> InferenceResult
+ Hydra.Typing: InferenceResult :: Term -> Type -> TypeSubst -> Map Name TypeVariableMetadata -> Context -> InferenceResult
- Hydra.Unification: joinTypes :: Type -> Type -> String -> Flow t0 [TypeConstraint]
+ Hydra.Unification: joinTypes :: Context -> Type -> Type -> String -> Either (InContext UnificationError) [TypeConstraint]
- Hydra.Unification: unifyTypeConstraints :: Map Name t0 -> [TypeConstraint] -> Flow t1 TypeSubst
+ Hydra.Unification: unifyTypeConstraints :: Context -> Map Name t0 -> [TypeConstraint] -> Either (InContext UnificationError) TypeSubst
- Hydra.Unification: unifyTypeLists :: Map Name t0 -> [Type] -> [Type] -> String -> Flow t1 TypeSubst
+ Hydra.Unification: unifyTypeLists :: Context -> Map Name t0 -> [Type] -> [Type] -> String -> Either (InContext UnificationError) TypeSubst
- Hydra.Unification: unifyTypes :: Map Name t0 -> Type -> Type -> String -> Flow t1 TypeSubst
+ Hydra.Unification: unifyTypes :: Context -> Map Name t0 -> Type -> Type -> String -> Either (InContext UnificationError) TypeSubst

This diff is very large; some files are shown as “too large to diff”. Download the raw patch for the complete diff.

Files

README.md view
@@ -4,12 +4,14 @@ exploring an isomorphism between typed lambda calculus and labeled hypergraphs. See the main Hydra [README](https://github.com/CategoricalData/hydra) for project overview and use cases. -This package contains Hydra's **Haskell implementation**, which serves as the bootstrapping implementation for the entire Hydra project.+This package contains Hydra's **Haskell implementation**,+which serves as the bootstrapping implementation for the entire Hydra project. Releases are available [on Hackage](https://hackage.haskell.org/package/hydra).  ## Code Organization -Hydra-Haskell uses the **src/main vs src/gen-main** separation pattern (see [Code organization wiki page](https://github.com/CategoricalData/hydra/wiki/Code-organization) for details).+Hydra-Haskell uses the **src/main vs src/gen-main** separation pattern+(see [Code organization wiki page](https://github.com/CategoricalData/hydra/wiki/Code-organization) for details).  - **`src/main/haskell/`** - Hand-written source code   - `Hydra/Dsl/` - DSL syntax definitions@@ -26,30 +28,50 @@   - Generation tests created using language-specific test generators   - See [Testing](#test) section for details -Haskell serves as the **bootstrapping implementation** - the DSL sources here generate code for Java, Python, and other languages.+Haskell serves as the **bootstrapping implementation** -+the DSL sources here generate code for Java, Python, Scala, Lisp, and other languages.  ## Documentation -For comprehensive documentation about Hydra's architecture, type system, and implementation details, see:+For comprehensive documentation about Hydra's architecture, type system,+and implementation details, see: -- **[Concepts](https://github.com/CategoricalData/hydra/wiki/Concepts)** - Core concepts: Type, Term, Graph, Flow monad, primitives, coders-- **[Implementation](https://github.com/CategoricalData/hydra/blob/main/docs/src/implementation.md)** - Detailed guide covering type modules, DSLs, primitives, coders, and the bootstrap process-- **[DSL Guide](https://github.com/CategoricalData/hydra/blob/main/docs/src/dsl-guide.md)** - Comprehensive guide to Hydra's domain-specific languages-- **[Code Organization](https://github.com/CategoricalData/hydra/wiki/Code-organization)** - The src/main vs src/gen-main pattern-- **[Testing](https://github.com/CategoricalData/hydra/wiki/Testing)** - Common test suite and language-specific testing-- **[Developer Recipes](https://github.com/CategoricalData/hydra/blob/main/docs/src/recipes/index.md)** - Step-by-step guides for extending Hydra+- **[Concepts](https://github.com/CategoricalData/hydra/wiki/Concepts)** -+  Core concepts: Type, Term, Graph, Flow monad, primitives, coders+- **[Implementation](https://github.com/CategoricalData/hydra/blob/main/docs/implementation.md)** -+  Detailed guide covering type modules, DSLs, primitives, coders, and the bootstrap process+- **[DSL Guide](https://github.com/CategoricalData/hydra/blob/main/docs/dsl-guide.md)** -+  Comprehensive guide to Hydra's domain-specific languages+- **[Code Organization](https://github.com/CategoricalData/hydra/wiki/Code-organization)** -+  The src/main vs src/gen-main pattern+- **[Testing](https://github.com/CategoricalData/hydra/wiki/Testing)** -+  Common test suite and language-specific testing+- **[Developer Recipes](https://github.com/CategoricalData/hydra/blob/main/docs/recipes/index.md)** -+  Step-by-step guides for extending Hydra  This README focuses on practical instructions for building, testing, and generating code with Hydra-Haskell.  ## Build -Haskell is Hydra's **bootstrapping language**. The entire Hydra kernel is written using Haskell-based domain-specific languages (DSLs):-- **DSL syntax**: [src/main/haskell/Hydra/Dsl](https://github.com/CategoricalData/hydra/tree/main/hydra-haskell/src/main/haskell/Hydra/Dsl) - Specify the syntax for Hydra programs written in Haskell-- **DSL-based sources**: [src/main/haskell/Hydra/Sources](https://github.com/CategoricalData/hydra/tree/main/hydra-haskell/src/main/haskell/Hydra/Sources) - Type definitions and core logic written in Haskell DSL-- **Generated code**: [src/gen-main/haskell](https://github.com/CategoricalData/hydra/tree/main/hydra-haskell/src/gen-main/haskell) - Haskell code generated from DSL sources-- **Primitives**: [src/main/haskell/Hydra/Lib](https://github.com/CategoricalData/hydra/tree/main/hydra-haskell/src/main/haskell/Hydra/Lib) - Hydra's standard libraries of primitive functions and constants, implemented in Haskell. These libraries are registered in [Libraries.hs](https://github.com/CategoricalData/hydra/tree/main/hydra-haskell/src/main/haskell/Hydra/Sources/Libraries.hs).+Haskell is Hydra's **bootstrapping language**.+The entire Hydra kernel is written using Haskell-based domain-specific languages (DSLs):+- **DSL syntax**:+  [src/main/haskell/Hydra/Dsl](https://github.com/CategoricalData/hydra/tree/main/hydra-haskell/src/main/haskell/Hydra/Dsl) -+  Specify the syntax for Hydra programs written in Haskell+- **DSL-based sources**:+  [src/main/haskell/Hydra/Sources](https://github.com/CategoricalData/hydra/tree/main/hydra-haskell/src/main/haskell/Hydra/Sources) -+  Type definitions and core logic written in Haskell DSL+- **Generated code**:+  [src/gen-main/haskell](https://github.com/CategoricalData/hydra/tree/main/hydra-haskell/src/gen-main/haskell) -+  Haskell code generated from DSL sources+- **Primitives**:+  [src/main/haskell/Hydra/Lib](https://github.com/CategoricalData/hydra/tree/main/hydra-haskell/src/main/haskell/Hydra/Lib) -+  Hydra's standard libraries of primitive functions and constants, implemented in Haskell.+  These libraries are registered in+  [Libraries.hs](https://github.com/CategoricalData/hydra/tree/main/hydra-haskell/src/main/haskell/Hydra/Sources/Libraries.hs). -The DSL sources are also used to generate Java and Python implementations, ensuring parity across each Hydra language variant.+The DSL sources are also used to generate Java and Python implementations,+ensuring parity across each Hydra language variant.  ### Build and REPL @@ -68,7 +90,9 @@ stack ghci hydra:lib ``` -Note: The `hydra:lib` target is required to avoid loading test modules. Running `stack ghci` without a target will load all components including test dependencies, which you may not need.+Note: The `hydra:lib` target is required to avoid loading test modules.+Running `stack ghci` without a target will load all components including test dependencies,+which you may not need.  ## Test @@ -90,7 +114,8 @@ Test.Hspec.hspec Hydra.TestSuiteSpec.spec ``` -See the [Testing wiki page](https://github.com/CategoricalData/hydra/wiki/Testing) for details on Hydra's common test suite, which ensures parity across all Hydra language variants.+See the [Testing wiki page](https://github.com/CategoricalData/hydra/wiki/Testing)+for details on Hydra's common test suite, which ensures parity across all Hydra language variants.  ## Code generation @@ -155,7 +180,8 @@  ### Generate code for other languages -Java and Python code generation is handled by the [Hydra-Ext](https://github.com/CategoricalData/hydra/tree/main/hydra-ext) package.+Java and Python code generation is handled by the+[Hydra-Ext](https://github.com/CategoricalData/hydra/tree/main/hydra-ext) package. From the `hydra-ext` directory:  ```bash@@ -177,7 +203,8 @@ ```  And similar for test artifacts. See the Hydra-Ext README for more details.-Hydra-Ext also includes coders for many other languages and formats: Avro, Protobuf, C++, C#, Scala, GraphQL, JSON Schema, RDF, and more.+Hydra-Ext also includes coders for many other languages and formats:+Avro, Protobuf, C++, C#, Scala, GraphQL, JSON Schema, RDF, and more.  ## Working with Hydra @@ -191,38 +218,30 @@ - **`Graph`** - A collection of elements with an environment, types, primitives, and schema graph - **`Module`** - A namespace containing elements with dependencies on other modules -These are defined in [Hydra/Sources/Kernel/Types](https://github.com/CategoricalData/hydra/tree/main/hydra-haskell/src/main/haskell/Hydra/Sources/Kernel/Types)-and code-generated into [Hydra.Core](https://github.com/CategoricalData/hydra/blob/main/hydra-haskell/src/gen-main/haskell/Hydra/Core.hs),+These are defined in+[Hydra/Sources/Kernel/Types](https://github.com/CategoricalData/hydra/tree/main/hydra-haskell/src/main/haskell/Hydra/Sources/Kernel/Types)+and code-generated into+[Hydra.Core](https://github.com/CategoricalData/hydra/blob/main/hydra-haskell/src/gen-main/haskell/Hydra/Core.hs), [Hydra.Graph](https://github.com/CategoricalData/hydra/blob/main/hydra-haskell/src/gen-main/haskell/Hydra/Graph.hs), and [Hydra.Module](https://github.com/CategoricalData/hydra/blob/main/hydra-haskell/src/gen-main/haskell/Hydra/Module.hs).  See [Concepts](https://github.com/CategoricalData/hydra/wiki/Concepts) for detailed explanations. -### The Flow monad--Transformations in Hydra use the `Flow` monad for:-- State management (graph context)-- Error handling-- Logging and tracing--```haskell-type Flow s a = s -> Trace -> FlowState s a-```+### Error handling and Context -Common usage pattern:+Hydra uses `Either (InContext OtherError) a` for computations that can fail,+where `InContext` pairs an error with a `Context` carrying debug traces and metadata.+Graph and Context are passed as explicit parameters.  ```haskell-import Hydra.Compute (Flow, FlowState, unFlow, emptyTrace)---- Create a Flow-myComputation :: Flow Graph String-myComputation = pure "result"+-- A function that may fail+myComputation :: Context -> Graph -> Either (InContext OtherError) String+myComputation cx g = Right "result"  -- Execute it-let state = unFlow myComputation graph emptyTrace-case flowStateValue state of-  Just result -> putStrLn result-  Nothing -> print (flowStateMessages $ flowStateTrace state)+case myComputation emptyContext myGraph of+  Right result -> putStrLn result+  Left ic -> print (unOtherError (inContextObject ic)) ```  ### Coders and adapters@@ -230,21 +249,24 @@ **Coders** are bidirectional transformations:  ```haskell-data Coder s1 s2 v1 v2 = Coder {-  coderEncode :: v1 -> Flow s2 v2,-  coderDecode :: v2 -> Flow s1 v1+data Coder v1 v2 = Coder {+  coderEncode :: v1 -> Context -> Graph -> Either (InContext OtherError) v2,+  coderDecode :: v2 -> Context -> Graph -> Either (InContext OtherError) v1 } ```  **Adapters** also transform types, enabling schema evolution and language mapping. -See the [Implementation wiki](https://github.com/CategoricalData/hydra/blob/main/docs/src/implementation.md#cross-language-compilation-coders) for details.+See the+[Implementation wiki](https://github.com/CategoricalData/hydra/blob/main/docs/implementation.md#cross-language-compilation-coders)+for details.  ### DSLs  Hydra provides multiple domain-specific languages for constructing types and terms: -**Untyped DSLs** ([Hydra/Dsl/Types.hs](https://github.com/CategoricalData/hydra/blob/main/hydra-haskell/src/main/haskell/Hydra/Dsl/Types.hs),+**Untyped DSLs**+([Hydra/Dsl/Types.hs](https://github.com/CategoricalData/hydra/blob/main/hydra-haskell/src/main/haskell/Hydra/Dsl/Types.hs), [Hydra/Dsl/Terms.hs](https://github.com/CategoricalData/hydra/blob/main/hydra-haskell/src/main/haskell/Hydra/Dsl/Terms.hs)): ```haskell import qualified Hydra.Dsl.Types as Types@@ -259,7 +281,9 @@   "age" >: Terms.int32 30] ``` -**Phantom-typed DSLs** ([Hydra/Dsl/Meta/Phantoms.hs](https://github.com/CategoricalData/hydra/blob/main/hydra-haskell/src/main/haskell/Hydra/Dsl/Meta/Phantoms.hs)) - Compile-time type safety:+**Phantom-typed DSLs**+([Hydra/Dsl/Meta/Phantoms.hs](https://github.com/CategoricalData/hydra/blob/main/hydra-haskell/src/main/haskell/Hydra/Dsl/Meta/Phantoms.hs)) -+Compile-time type safety: ```haskell import Hydra.Dsl.Meta.Phantoms @@ -267,7 +291,9 @@ safeFn = lambda "x" (Strings.toUpper (var "x"))  -- Type-checked at compile time ``` -**Library DSLs** ([Hydra/Dsl/Meta/Lib](https://github.com/CategoricalData/hydra/tree/main/hydra-haskell/src/main/haskell/Hydra/Dsl/Meta/Lib)) - Wrappers for primitive functions:+**Library DSLs**+([Hydra/Dsl/Meta/Lib](https://github.com/CategoricalData/hydra/tree/main/hydra-haskell/src/main/haskell/Hydra/Dsl/Meta/Lib)) -+Wrappers for primitive functions: ```haskell import Hydra.Dsl.Meta.Lib.Lists as Lists import Hydra.Dsl.Meta.Lib.Strings as Strings@@ -275,7 +301,8 @@ example = Lists.map (Strings.toUpper) (list ["hello", "world"]) ``` -See the [DSL system section](https://github.com/CategoricalData/hydra/blob/main/docs/src/implementation.md#dsl-system) in the Implementation wiki for comprehensive coverage.+See the [DSL system section](https://github.com/CategoricalData/hydra/blob/main/docs/implementation.md#dsl-system)+in the Implementation wiki for comprehensive coverage.  ### JSON and YAML serialization @@ -307,7 +334,8 @@  ## Self-hosting demonstration -Hydra-Haskell is a [self-hosting compiler](https://en.wikipedia.org/wiki/Self-hosting_(compilers)) - it can generate its own source code.+Hydra-Haskell is a [self-hosting compiler](https://en.wikipedia.org/wiki/Self-hosting_(compilers)) -+it can generate its own source code.  Complete self-hosting cycle: @@ -356,10 +384,12 @@ - `Hydra.Generation` - I/O and generation utilities - Test runners -See the [Bootstrap process](https://github.com/CategoricalData/hydra/blob/main/docs/src/implementation.md#the-bootstrap-process) section for details on extending Hydra.+See the+[Bootstrap process](https://github.com/CategoricalData/hydra/blob/main/docs/implementation.md#the-bootstrap-process)+section for details on extending Hydra. For example:-- [Adding new primitive functions](https://github.com/CategoricalData/hydra/blob/main/docs/src/recipes/adding-primitives.md)-- [Extending Hydra Core](https://github.com/CategoricalData/hydra/blob/main/docs/src/recipes/extending-hydra-core.md)+- [Adding new primitive functions](https://github.com/CategoricalData/hydra/blob/main/docs/recipes/adding-primitives.md)+- [Extending Hydra Core](https://github.com/CategoricalData/hydra/blob/main/docs/recipes/extending-hydra-core.md)  ## Troubleshooting @@ -378,4 +408,7 @@ brew upgrade stack ``` -**Explanation:** These are compatibility warnings that appear when using newer GHC/Cabal versions. If your builds complete successfully, the warnings are harmless - Stack works fine with newer versions even before official testing. Upgrading Stack eliminates the warnings.+**Explanation:** These are compatibility warnings that appear when using newer GHC/Cabal versions.+If your builds complete successfully, the warnings are harmless -+Stack works fine with newer versions even before official testing.+Upgrading Stack eliminates the warnings.
hydra.cabal view
@@ -5,9 +5,9 @@ -- see: https://github.com/sol/hpack  name:           hydra-version:        0.13.0+version:        0.14.0 synopsis:       Graph programming language-description:    Hydra is an implementation of the LambdaGraph data model, which takes advantage of an isomorphism between labeled hypergraphs and typed lambda calculus: in Hydra, "graphs are programs, and programs are graphs". The language is designed to be embedded in other programming languages -- currently Haskell, Java, and Python. Hydra transforms data, schemas, and functional programs into multiple other languages in a way which maintains type safety. It is self-hosting in Haskell -- it generates its own executable source code from Hydra sources -- and it is designed to become self-hosting in its other implementation languages, as well.+description:    Hydra is an implementation of the LambdaGraph data model, which takes advantage of an isomorphism between labeled hypergraphs and typed lambda calculus: in Hydra, "graphs are programs, and programs are graphs". The language is designed to be embedded in other programming languages -- currently Haskell, Java, and Python. Hydra transforms data, schemas, and functional programs into multiple other languages in a way which maintains type safety. It is mutually self-hosting in Haskell, Java, and Python; i.e. each Hydra compiler can generate each other Hydra compiler as well as itself. category:       Data homepage:       https://github.com/CategoricalData/hydra#readme bug-reports:    https://github.com/CategoricalData/hydra/issues@@ -31,24 +31,17 @@       Hydra.Dsl.AsTerm       Hydra.Dsl.AsType       Hydra.Dsl.Bootstrap-      Hydra.Dsl.Grammars       Hydra.Dsl.Literals       Hydra.Dsl.LiteralTypes-      Hydra.Dsl.Meta.Accessors-      Hydra.Dsl.Meta.Ast       Hydra.Dsl.Meta.Base-      Hydra.Dsl.Meta.Coders       Hydra.Dsl.Meta.Common-      Hydra.Dsl.Meta.Compute+      Hydra.Dsl.Meta.Context       Hydra.Dsl.Meta.Core       Hydra.Dsl.Meta.DeepCore-      Hydra.Dsl.Meta.Grammar       Hydra.Dsl.Meta.Graph-      Hydra.Dsl.Meta.Json       Hydra.Dsl.Meta.Lib.Chars       Hydra.Dsl.Meta.Lib.Eithers       Hydra.Dsl.Meta.Lib.Equality-      Hydra.Dsl.Meta.Lib.Flows       Hydra.Dsl.Meta.Lib.Lists       Hydra.Dsl.Meta.Lib.Literals       Hydra.Dsl.Meta.Lib.Logic@@ -56,30 +49,26 @@       Hydra.Dsl.Meta.Lib.Math       Hydra.Dsl.Meta.Lib.Maybes       Hydra.Dsl.Meta.Lib.Pairs+      Hydra.Dsl.Meta.Lib.Regex       Hydra.Dsl.Meta.Lib.Sets       Hydra.Dsl.Meta.Lib.Strings       Hydra.Dsl.Meta.Literals-      Hydra.Dsl.Meta.Module-      Hydra.Dsl.Meta.Parsing       Hydra.Dsl.Meta.Phantoms+      Hydra.Dsl.Meta.Tabular       Hydra.Dsl.Meta.Terms       Hydra.Dsl.Meta.Testing-      Hydra.Dsl.Meta.Topology       Hydra.Dsl.Meta.Types-      Hydra.Dsl.Meta.Typing-      Hydra.Dsl.Meta.Util       Hydra.Dsl.Meta.Variants       Hydra.Dsl.Prims-      Hydra.Dsl.Tabular       Hydra.Dsl.Terms       Hydra.Dsl.Tests       Hydra.Dsl.Types+      Hydra.Ext.Haskell.TestingIo       Hydra.Generation       Hydra.Kernel       Hydra.Lib.Chars       Hydra.Lib.Eithers       Hydra.Lib.Equality-      Hydra.Lib.Flows       Hydra.Lib.Lists       Hydra.Lib.Literals       Hydra.Lib.Logic@@ -87,41 +76,43 @@       Hydra.Lib.Math       Hydra.Lib.Maybes       Hydra.Lib.Pairs+      Hydra.Lib.Regex       Hydra.Lib.Sets       Hydra.Lib.Strings       Hydra.Minimal+      Hydra.Module.Compat       Hydra.Settings       Hydra.Sources.All       Hydra.Sources.CoderUtils       Hydra.Sources.Eval.Lib.All       Hydra.Sources.Eval.Lib.Eithers-      Hydra.Sources.Eval.Lib.Flows+      Hydra.Sources.Eval.Lib.Equality       Hydra.Sources.Eval.Lib.Lists+      Hydra.Sources.Eval.Lib.Logic       Hydra.Sources.Eval.Lib.Maps+      Hydra.Sources.Eval.Lib.Math       Hydra.Sources.Eval.Lib.Maybes       Hydra.Sources.Eval.Lib.Pairs       Hydra.Sources.Eval.Lib.Sets-      Hydra.Sources.Haskell.Ast       Hydra.Sources.Haskell.Coder       Hydra.Sources.Haskell.Language       Hydra.Sources.Haskell.Operators       Hydra.Sources.Haskell.Serde+      Hydra.Sources.Haskell.Syntax+      Hydra.Sources.Haskell.Testing       Hydra.Sources.Haskell.Utils       Hydra.Sources.Json.Bootstrap-      Hydra.Sources.Json.Coder       Hydra.Sources.Json.Decode       Hydra.Sources.Json.Decoding       Hydra.Sources.Json.Encode       Hydra.Sources.Json.Extract-      Hydra.Sources.Json.Language       Hydra.Sources.Json.Model       Hydra.Sources.Json.Parser       Hydra.Sources.Json.Writer-      Hydra.Sources.Kernel.Terms.Adapt.Literals-      Hydra.Sources.Kernel.Terms.Adapt.Modules-      Hydra.Sources.Kernel.Terms.Adapt.Simple-      Hydra.Sources.Kernel.Terms.Adapt.Terms-      Hydra.Sources.Kernel.Terms.Adapt.Utils+      Hydra.Sources.Json.Yaml.Decode+      Hydra.Sources.Json.Yaml.Encode+      Hydra.Sources.Kernel.Lib.Names+      Hydra.Sources.Kernel.Terms.Adapt       Hydra.Sources.Kernel.Terms.All       Hydra.Sources.Kernel.Terms.Annotations       Hydra.Sources.Kernel.Terms.Arity@@ -129,18 +120,17 @@       Hydra.Sources.Kernel.Terms.CodeGeneration       Hydra.Sources.Kernel.Terms.Constants       Hydra.Sources.Kernel.Terms.Decoding+      Hydra.Sources.Kernel.Terms.Dsls       Hydra.Sources.Kernel.Terms.Encoding       Hydra.Sources.Kernel.Terms.Extract.Core       Hydra.Sources.Kernel.Terms.Extract.Helpers       Hydra.Sources.Kernel.Terms.Extract.Util       Hydra.Sources.Kernel.Terms.Formatting-      Hydra.Sources.Kernel.Terms.Grammars       Hydra.Sources.Kernel.Terms.Hoisting       Hydra.Sources.Kernel.Terms.Inference       Hydra.Sources.Kernel.Terms.Languages       Hydra.Sources.Kernel.Terms.Lexical       Hydra.Sources.Kernel.Terms.Literals-      Hydra.Sources.Kernel.Terms.Monads       Hydra.Sources.Kernel.Terms.Names       Hydra.Sources.Kernel.Terms.Parsers       Hydra.Sources.Kernel.Terms.Reduction@@ -148,29 +138,35 @@       Hydra.Sources.Kernel.Terms.Rewriting       Hydra.Sources.Kernel.Terms.Schemas       Hydra.Sources.Kernel.Terms.Serialization-      Hydra.Sources.Kernel.Terms.Show.Accessors       Hydra.Sources.Kernel.Terms.Show.Core+      Hydra.Sources.Kernel.Terms.Show.Error.Core+      Hydra.Sources.Kernel.Terms.Show.Errors       Hydra.Sources.Kernel.Terms.Show.Graph       Hydra.Sources.Kernel.Terms.Show.Meta+      Hydra.Sources.Kernel.Terms.Show.Paths       Hydra.Sources.Kernel.Terms.Show.Typing       Hydra.Sources.Kernel.Terms.Show.Util       Hydra.Sources.Kernel.Terms.Sorting       Hydra.Sources.Kernel.Terms.Substitution-      Hydra.Sources.Kernel.Terms.Tarjan       Hydra.Sources.Kernel.Terms.Templates       Hydra.Sources.Kernel.Terms.Unification-      Hydra.Sources.Kernel.Types.Accessors+      Hydra.Sources.Kernel.Terms.Validate.Core+      Hydra.Sources.Kernel.Terms.Validate.Packaging       Hydra.Sources.Kernel.Types.All       Hydra.Sources.Kernel.Types.Ast       Hydra.Sources.Kernel.Types.Classes       Hydra.Sources.Kernel.Types.Coders-      Hydra.Sources.Kernel.Types.Compute-      Hydra.Sources.Kernel.Types.Constraints+      Hydra.Sources.Kernel.Types.Context       Hydra.Sources.Kernel.Types.Core-      Hydra.Sources.Kernel.Types.Grammar+      Hydra.Sources.Kernel.Types.Error.Checking+      Hydra.Sources.Kernel.Types.Error.Core+      Hydra.Sources.Kernel.Types.Error.Packaging+      Hydra.Sources.Kernel.Types.Errors       Hydra.Sources.Kernel.Types.Graph       Hydra.Sources.Kernel.Types.Module+      Hydra.Sources.Kernel.Types.Packaging       Hydra.Sources.Kernel.Types.Parsing+      Hydra.Sources.Kernel.Types.Paths       Hydra.Sources.Kernel.Types.Phantoms       Hydra.Sources.Kernel.Types.Query       Hydra.Sources.Kernel.Types.Relational@@ -180,7 +176,6 @@       Hydra.Sources.Kernel.Types.Typing       Hydra.Sources.Kernel.Types.Util       Hydra.Sources.Kernel.Types.Variants-      Hydra.Sources.Kernel.Types.Workflow       Hydra.Sources.Libraries       Hydra.Sources.Test.All       Hydra.Sources.Test.Annotations@@ -193,22 +188,23 @@       Hydra.Sources.Test.Checking.NominalTypes       Hydra.Sources.Test.EtaExpansion       Hydra.Sources.Test.Formatting-      Hydra.Sources.Test.Hoisting+      Hydra.Sources.Test.Hoisting.All+      Hydra.Sources.Test.Hoisting.Cases+      Hydra.Sources.Test.Hoisting.Let       Hydra.Sources.Test.Inference.AlgebraicTypes       Hydra.Sources.Test.Inference.AlgorithmW       Hydra.Sources.Test.Inference.All+      Hydra.Sources.Test.Inference.Classes       Hydra.Sources.Test.Inference.Failures       Hydra.Sources.Test.Inference.Fundamentals       Hydra.Sources.Test.Inference.KernelExamples       Hydra.Sources.Test.Inference.NominalTypes-      Hydra.Sources.Test.Json.Coder       Hydra.Sources.Test.Json.Parser       Hydra.Sources.Test.Json.Roundtrip       Hydra.Sources.Test.Json.Writer       Hydra.Sources.Test.Lib.Chars       Hydra.Sources.Test.Lib.Eithers       Hydra.Sources.Test.Lib.Equality-      Hydra.Sources.Test.Lib.Flows       Hydra.Sources.Test.Lib.Lists       Hydra.Sources.Test.Lib.Literals       Hydra.Sources.Test.Lib.Logic@@ -216,9 +212,9 @@       Hydra.Sources.Test.Lib.Math       Hydra.Sources.Test.Lib.Maybes       Hydra.Sources.Test.Lib.Pairs+      Hydra.Sources.Test.Lib.Regex       Hydra.Sources.Test.Lib.Sets       Hydra.Sources.Test.Lib.Strings-      Hydra.Sources.Test.Monads       Hydra.Sources.Test.Ordering       Hydra.Sources.Test.Reduction       Hydra.Sources.Test.Rewriting@@ -229,26 +225,16 @@       Hydra.Sources.Test.TestSuite       Hydra.Sources.Test.TestTerms       Hydra.Sources.Test.TestTypes+      Hydra.Sources.Test.Transform       Hydra.Sources.Test.Unification+      Hydra.Sources.Test.Utils+      Hydra.Sources.Test.Validate.All+      Hydra.Sources.Test.Validate.Core       Hydra.Sources.Yaml.Model-      Hydra.Staging.Lib.Names-      Hydra.Staging.Testing.Generation.Generate-      Hydra.Staging.Testing.Generation.HaskellCodec-      Hydra.Staging.Testing.Generation.Transform-      Hydra.Staging.Yaml.Coder-      Hydra.Staging.Yaml.Language-      Hydra.Staging.Yaml.Modules-      Hydra.Staging.Yaml.Serde       Hydra.Tools.Bytestrings       Hydra.Tools.Debug-      Hydra.Tools.Monads       Org.Example.Lispy-      Hydra.Accessors-      Hydra.Adapt.Literals-      Hydra.Adapt.Modules-      Hydra.Adapt.Simple-      Hydra.Adapt.Terms-      Hydra.Adapt.Utils+      Hydra.Adapt       Hydra.Annotations       Hydra.Arity       Hydra.Ast@@ -257,22 +243,22 @@       Hydra.CodeGeneration       Hydra.Coders       Hydra.CoderUtils-      Hydra.Compute       Hydra.Constants-      Hydra.Constraints+      Hydra.Context       Hydra.Core-      Hydra.Decode.Accessors       Hydra.Decode.Ast       Hydra.Decode.Classes       Hydra.Decode.Coders-      Hydra.Decode.Compute-      Hydra.Decode.Constraints+      Hydra.Decode.Context       Hydra.Decode.Core-      Hydra.Decode.Grammar+      Hydra.Decode.Error.Checking+      Hydra.Decode.Error.Core+      Hydra.Decode.Errors       Hydra.Decode.Json       Hydra.Decode.Json.Model       Hydra.Decode.Module       Hydra.Decode.Parsing+      Hydra.Decode.Paths       Hydra.Decode.Phantoms       Hydra.Decode.Query       Hydra.Decode.Relational@@ -282,20 +268,46 @@       Hydra.Decode.Typing       Hydra.Decode.Util       Hydra.Decode.Variants-      Hydra.Decode.Workflow       Hydra.Decoding-      Hydra.Encode.Accessors+      Hydra.Dsl.Ast+      Hydra.Dsl.Classes+      Hydra.Dsl.Coders+      Hydra.Dsl.Context+      Hydra.Dsl.Core+      Hydra.Dsl.Error.Checking+      Hydra.Dsl.Error.Core+      Hydra.Dsl.Error.Packaging+      Hydra.Dsl.Errors+      Hydra.Dsl.Ext.Haskell.Syntax+      Hydra.Dsl.Ext.Org.Yaml.Model+      Hydra.Dsl.Graph+      Hydra.Dsl.Json.Model+      Hydra.Dsl.Module+      Hydra.Dsl.Packaging+      Hydra.Dsl.Parsing+      Hydra.Dsl.Paths+      Hydra.Dsl.Query+      Hydra.Dsl.Relational+      Hydra.Dsl.Tabular+      Hydra.Dsl.Testing+      Hydra.Dsl.Topology+      Hydra.Dsl.Typing+      Hydra.Dsl.Util+      Hydra.Dsl.Variants+      Hydra.Dsls       Hydra.Encode.Ast       Hydra.Encode.Classes       Hydra.Encode.Coders-      Hydra.Encode.Compute-      Hydra.Encode.Constraints+      Hydra.Encode.Context       Hydra.Encode.Core-      Hydra.Encode.Grammar+      Hydra.Encode.Error.Checking+      Hydra.Encode.Error.Core+      Hydra.Encode.Errors       Hydra.Encode.Json       Hydra.Encode.Json.Model       Hydra.Encode.Module       Hydra.Encode.Parsing+      Hydra.Encode.Paths       Hydra.Encode.Phantoms       Hydra.Encode.Query       Hydra.Encode.Relational@@ -305,32 +317,34 @@       Hydra.Encode.Typing       Hydra.Encode.Util       Hydra.Encode.Variants-      Hydra.Encode.Workflow       Hydra.Encoding+      Hydra.Error.Checking+      Hydra.Error.Core+      Hydra.Error.Packaging+      Hydra.Errors       Hydra.Eval.Lib.Eithers-      Hydra.Eval.Lib.Flows+      Hydra.Eval.Lib.Equality       Hydra.Eval.Lib.Lists+      Hydra.Eval.Lib.Logic       Hydra.Eval.Lib.Maps+      Hydra.Eval.Lib.Math       Hydra.Eval.Lib.Maybes       Hydra.Eval.Lib.Pairs       Hydra.Eval.Lib.Sets-      Hydra.Ext.Haskell.Ast       Hydra.Ext.Haskell.Coder       Hydra.Ext.Haskell.Language       Hydra.Ext.Haskell.Operators       Hydra.Ext.Haskell.Serde+      Hydra.Ext.Haskell.Syntax+      Hydra.Ext.Haskell.Testing       Hydra.Ext.Haskell.Utils-      Hydra.Ext.Org.Json.Coder       Hydra.Ext.Org.Json.Decoding-      Hydra.Ext.Org.Json.Language       Hydra.Ext.Org.Yaml.Model       Hydra.Extract.Core       Hydra.Extract.Helpers       Hydra.Extract.Json       Hydra.Extract.Util       Hydra.Formatting-      Hydra.Grammar-      Hydra.Grammars       Hydra.Graph       Hydra.Hoisting       Hydra.Inference@@ -340,14 +354,18 @@       Hydra.Json.Model       Hydra.Json.Parser       Hydra.Json.Writer+      Hydra.Json.Yaml.Decode+      Hydra.Json.Yaml.Encode       Hydra.Languages       Hydra.Lexical+      Hydra.Lib.Names       Hydra.Literals       Hydra.Module-      Hydra.Monads       Hydra.Names+      Hydra.Packaging       Hydra.Parsers       Hydra.Parsing+      Hydra.Paths       Hydra.Phantoms       Hydra.Query       Hydra.Reduction@@ -356,24 +374,29 @@       Hydra.Rewriting       Hydra.Schemas       Hydra.Serialization-      Hydra.Show.Accessors       Hydra.Show.Core+      Hydra.Show.Error.Core+      Hydra.Show.Errors       Hydra.Show.Graph       Hydra.Show.Meta+      Hydra.Show.Paths       Hydra.Show.Typing       Hydra.Show.Util       Hydra.Sorting-      Hydra.Sources.Decode.Accessors       Hydra.Sources.Decode.Ast       Hydra.Sources.Decode.Classes       Hydra.Sources.Decode.Coders-      Hydra.Sources.Decode.Compute-      Hydra.Sources.Decode.Constraints+      Hydra.Sources.Decode.Context       Hydra.Sources.Decode.Core-      Hydra.Sources.Decode.Grammar+      Hydra.Sources.Decode.Error.Checking+      Hydra.Sources.Decode.Error.Core+      Hydra.Sources.Decode.Error.Packaging+      Hydra.Sources.Decode.Errors       Hydra.Sources.Decode.Json.Model       Hydra.Sources.Decode.Module+      Hydra.Sources.Decode.Packaging       Hydra.Sources.Decode.Parsing+      Hydra.Sources.Decode.Paths       Hydra.Sources.Decode.Phantoms       Hydra.Sources.Decode.Query       Hydra.Sources.Decode.Relational@@ -383,18 +406,20 @@       Hydra.Sources.Decode.Typing       Hydra.Sources.Decode.Util       Hydra.Sources.Decode.Variants-      Hydra.Sources.Decode.Workflow-      Hydra.Sources.Encode.Accessors       Hydra.Sources.Encode.Ast       Hydra.Sources.Encode.Classes       Hydra.Sources.Encode.Coders-      Hydra.Sources.Encode.Compute-      Hydra.Sources.Encode.Constraints+      Hydra.Sources.Encode.Context       Hydra.Sources.Encode.Core-      Hydra.Sources.Encode.Grammar+      Hydra.Sources.Encode.Error.Checking+      Hydra.Sources.Encode.Error.Core+      Hydra.Sources.Encode.Error.Packaging+      Hydra.Sources.Encode.Errors       Hydra.Sources.Encode.Json.Model       Hydra.Sources.Encode.Module+      Hydra.Sources.Encode.Packaging       Hydra.Sources.Encode.Parsing+      Hydra.Sources.Encode.Paths       Hydra.Sources.Encode.Phantoms       Hydra.Sources.Encode.Query       Hydra.Sources.Encode.Relational@@ -404,32 +429,33 @@       Hydra.Sources.Encode.Typing       Hydra.Sources.Encode.Util       Hydra.Sources.Encode.Variants-      Hydra.Sources.Encode.Workflow       Hydra.Substitution       Hydra.Tabular-      Hydra.Tarjan       Hydra.Templates+      Hydra.Test.Transform+      Hydra.Test.Utils       Hydra.Testing       Hydra.Topology       Hydra.Typing       Hydra.Unification       Hydra.Util+      Hydra.Validate.Core+      Hydra.Validate.Packaging       Hydra.Variants-      Hydra.Workflow   other-modules:       Paths_hydra   hs-source-dirs:       src/main/haskell       src/gen-main/haskell   build-depends:-      HsYAML >=0.2.1 && <0.3-    , aeson >=2.1.0 && <2.3+      aeson >=2.1.0 && <2.3     , base >=4.19.0 && <4.22     , base64-bytestring >=1.2.1 && <1.3     , bytestring >=0.11.5 && <0.13     , containers >=0.6.7 && <0.8     , directory >=1.3.6 && <1.4     , filepath >=1.4.200 && <1.6+    , regex-tdfa >=1.3.2 && <1.4     , scientific >=0.3.7 && <0.4     , split >=0.2.3 && <0.3     , text >=2.0.2 && <2.2@@ -444,7 +470,6 @@       Generation.Hydra.Test.Lib.CharsSpec       Generation.Hydra.Test.Lib.EithersSpec       Generation.Hydra.Test.Lib.EqualitySpec-      Generation.Hydra.Test.Lib.FlowsSpec       Generation.Hydra.Test.Lib.ListsSpec       Generation.Hydra.Test.Lib.LiteralsSpec       Generation.Hydra.Test.Lib.LogicSpec@@ -452,9 +477,9 @@       Generation.Hydra.Test.Lib.MathSpec       Generation.Hydra.Test.Lib.MaybesSpec       Generation.Hydra.Test.Lib.PairsSpec+      Generation.Hydra.Test.Lib.RegexSpec       Generation.Hydra.Test.Lib.SetsSpec       Generation.Hydra.Test.Lib.StringsSpec-      Generation.Hydra.Test.MonadsSpec       Generation.Hydra.Test.ReductionSpec       Generation.Hydra.Test.SortingSpec       Generation.Spec@@ -468,22 +493,23 @@       Hydra.Test.Checking.NominalTypes       Hydra.Test.EtaExpansion       Hydra.Test.Formatting-      Hydra.Test.Hoisting+      Hydra.Test.Hoisting.All+      Hydra.Test.Hoisting.Cases+      Hydra.Test.Hoisting.Let       Hydra.Test.Inference.AlgebraicTypes       Hydra.Test.Inference.AlgorithmW       Hydra.Test.Inference.All+      Hydra.Test.Inference.Classes       Hydra.Test.Inference.Failures       Hydra.Test.Inference.Fundamentals       Hydra.Test.Inference.KernelExamples       Hydra.Test.Inference.NominalTypes-      Hydra.Test.Json.Coder       Hydra.Test.Json.Parser       Hydra.Test.Json.Roundtrip       Hydra.Test.Json.Writer       Hydra.Test.Lib.Chars       Hydra.Test.Lib.Eithers       Hydra.Test.Lib.Equality-      Hydra.Test.Lib.Flows       Hydra.Test.Lib.Lists       Hydra.Test.Lib.Literals       Hydra.Test.Lib.Logic@@ -491,9 +517,9 @@       Hydra.Test.Lib.Math       Hydra.Test.Lib.Maybes       Hydra.Test.Lib.Pairs+      Hydra.Test.Lib.Regex       Hydra.Test.Lib.Sets       Hydra.Test.Lib.Strings-      Hydra.Test.Monads       Hydra.Test.Ordering       Hydra.Test.Reduction       Hydra.Test.Rewriting@@ -505,14 +531,15 @@       Hydra.Test.TestTerms       Hydra.Test.TestTypes       Hydra.Test.Unification+      Hydra.Test.Validate.All+      Hydra.Test.Validate.Core       Paths_hydra   hs-source-dirs:       src/exec/update-generation-tests       src/gen-test/haskell   ghc-options: -rtsopts   build-depends:-      HsYAML >=0.2.1 && <0.3-    , aeson >=2.1.0 && <2.3+      aeson >=2.1.0 && <2.3     , base >=4.19.0 && <4.22     , base64-bytestring >=1.2.1 && <1.3     , bytestring >=0.11.5 && <0.13@@ -521,6 +548,7 @@     , filepath >=1.4.200 && <1.6     , hspec >=2.11.0 && <2.12     , hydra+    , regex-tdfa >=1.3.2 && <1.4     , scientific >=0.3.7 && <0.4     , split >=0.2.3 && <0.3     , text >=2.0.2 && <2.2@@ -535,8 +563,7 @@       src/exec/update-haskell-eval-lib   ghc-options: -rtsopts   build-depends:-      HsYAML >=0.2.1 && <0.3-    , aeson >=2.1.0 && <2.3+      aeson >=2.1.0 && <2.3     , base >=4.19.0 && <4.22     , base64-bytestring >=1.2.1 && <1.3     , bytestring >=0.11.5 && <0.13@@ -544,6 +571,7 @@     , directory >=1.3.6 && <1.4     , filepath >=1.4.200 && <1.6     , hydra+    , regex-tdfa >=1.3.2 && <1.4     , scientific >=0.3.7 && <0.4     , split >=0.2.3 && <0.3     , text >=2.0.2 && <2.2@@ -558,8 +586,7 @@       src/exec/update-haskell-kernel   ghc-options: -rtsopts   build-depends:-      HsYAML >=0.2.1 && <0.3-    , aeson >=2.1.0 && <2.3+      aeson >=2.1.0 && <2.3     , base >=4.19.0 && <4.22     , base64-bytestring >=1.2.1 && <1.3     , bytestring >=0.11.5 && <0.13@@ -567,6 +594,7 @@     , directory >=1.3.6 && <1.4     , filepath >=1.4.200 && <1.6     , hydra+    , regex-tdfa >=1.3.2 && <1.4     , scientific >=0.3.7 && <0.4     , split >=0.2.3 && <0.3     , text >=2.0.2 && <2.2@@ -581,8 +609,7 @@       src/exec/update-haskell-sources   ghc-options: -rtsopts   build-depends:-      HsYAML >=0.2.1 && <0.3-    , aeson >=2.1.0 && <2.3+      aeson >=2.1.0 && <2.3     , base >=4.19.0 && <4.22     , base64-bytestring >=1.2.1 && <1.3     , bytestring >=0.11.5 && <0.13@@ -590,6 +617,7 @@     , directory >=1.3.6 && <1.4     , filepath >=1.4.200 && <1.6     , hydra+    , regex-tdfa >=1.3.2 && <1.4     , scientific >=0.3.7 && <0.4     , split >=0.2.3 && <0.3     , text >=2.0.2 && <2.2@@ -604,8 +632,7 @@       src/exec/update-json-kernel   ghc-options: -rtsopts   build-depends:-      HsYAML >=0.2.1 && <0.3-    , aeson >=2.1.0 && <2.3+      aeson >=2.1.0 && <2.3     , base >=4.19.0 && <4.22     , base64-bytestring >=1.2.1 && <1.3     , bytestring >=0.11.5 && <0.13@@ -613,6 +640,7 @@     , directory >=1.3.6 && <1.4     , filepath >=1.4.200 && <1.6     , hydra+    , regex-tdfa >=1.3.2 && <1.4     , scientific >=0.3.7 && <0.4     , split >=0.2.3 && <0.3     , text >=2.0.2 && <2.2@@ -627,8 +655,7 @@       src/exec/update-json-main   ghc-options: -rtsopts   build-depends:-      HsYAML >=0.2.1 && <0.3-    , aeson >=2.1.0 && <2.3+      aeson >=2.1.0 && <2.3     , base >=4.19.0 && <4.22     , base64-bytestring >=1.2.1 && <1.3     , bytestring >=0.11.5 && <0.13@@ -636,6 +663,7 @@     , directory >=1.3.6 && <1.4     , filepath >=1.4.200 && <1.6     , hydra+    , regex-tdfa >=1.3.2 && <1.4     , scientific >=0.3.7 && <0.4     , split >=0.2.3 && <0.3     , text >=2.0.2 && <2.2@@ -650,8 +678,7 @@       src/exec/update-json-manifest   ghc-options: -rtsopts   build-depends:-      HsYAML >=0.2.1 && <0.3-    , aeson >=2.1.0 && <2.3+      aeson >=2.1.0 && <2.3     , base >=4.19.0 && <4.22     , base64-bytestring >=1.2.1 && <1.3     , bytestring >=0.11.5 && <0.13@@ -659,6 +686,7 @@     , directory >=1.3.6 && <1.4     , filepath >=1.4.200 && <1.6     , hydra+    , regex-tdfa >=1.3.2 && <1.4     , scientific >=0.3.7 && <0.4     , split >=0.2.3 && <0.3     , text >=2.0.2 && <2.2@@ -673,8 +701,7 @@       src/exec/update-json-test   ghc-options: -rtsopts   build-depends:-      HsYAML >=0.2.1 && <0.3-    , aeson >=2.1.0 && <2.3+      aeson >=2.1.0 && <2.3     , base >=4.19.0 && <4.22     , base64-bytestring >=1.2.1 && <1.3     , bytestring >=0.11.5 && <0.13@@ -682,6 +709,7 @@     , directory >=1.3.6 && <1.4     , filepath >=1.4.200 && <1.6     , hydra+    , regex-tdfa >=1.3.2 && <1.4     , scientific >=0.3.7 && <0.4     , split >=0.2.3 && <0.3     , text >=2.0.2 && <2.2@@ -696,7 +724,6 @@       Generation.Hydra.Test.Lib.CharsSpec       Generation.Hydra.Test.Lib.EithersSpec       Generation.Hydra.Test.Lib.EqualitySpec-      Generation.Hydra.Test.Lib.FlowsSpec       Generation.Hydra.Test.Lib.ListsSpec       Generation.Hydra.Test.Lib.LiteralsSpec       Generation.Hydra.Test.Lib.LogicSpec@@ -704,9 +731,9 @@       Generation.Hydra.Test.Lib.MathSpec       Generation.Hydra.Test.Lib.MaybesSpec       Generation.Hydra.Test.Lib.PairsSpec+      Generation.Hydra.Test.Lib.RegexSpec       Generation.Hydra.Test.Lib.SetsSpec       Generation.Hydra.Test.Lib.StringsSpec-      Generation.Hydra.Test.MonadsSpec       Generation.Hydra.Test.ReductionSpec       Generation.Hydra.Test.SortingSpec       Generation.Spec@@ -720,22 +747,23 @@       Hydra.Test.Checking.NominalTypes       Hydra.Test.EtaExpansion       Hydra.Test.Formatting-      Hydra.Test.Hoisting+      Hydra.Test.Hoisting.All+      Hydra.Test.Hoisting.Cases+      Hydra.Test.Hoisting.Let       Hydra.Test.Inference.AlgebraicTypes       Hydra.Test.Inference.AlgorithmW       Hydra.Test.Inference.All+      Hydra.Test.Inference.Classes       Hydra.Test.Inference.Failures       Hydra.Test.Inference.Fundamentals       Hydra.Test.Inference.KernelExamples       Hydra.Test.Inference.NominalTypes-      Hydra.Test.Json.Coder       Hydra.Test.Json.Parser       Hydra.Test.Json.Roundtrip       Hydra.Test.Json.Writer       Hydra.Test.Lib.Chars       Hydra.Test.Lib.Eithers       Hydra.Test.Lib.Equality-      Hydra.Test.Lib.Flows       Hydra.Test.Lib.Lists       Hydra.Test.Lib.Literals       Hydra.Test.Lib.Logic@@ -743,9 +771,9 @@       Hydra.Test.Lib.Math       Hydra.Test.Lib.Maybes       Hydra.Test.Lib.Pairs+      Hydra.Test.Lib.Regex       Hydra.Test.Lib.Sets       Hydra.Test.Lib.Strings-      Hydra.Test.Monads       Hydra.Test.Ordering       Hydra.Test.Reduction       Hydra.Test.Rewriting@@ -757,14 +785,15 @@       Hydra.Test.TestTerms       Hydra.Test.TestTypes       Hydra.Test.Unification+      Hydra.Test.Validate.All+      Hydra.Test.Validate.Core       Paths_hydra   hs-source-dirs:       src/exec/update-kernel-tests       src/gen-test/haskell   ghc-options: -rtsopts   build-depends:-      HsYAML >=0.2.1 && <0.3-    , aeson >=2.1.0 && <2.3+      aeson >=2.1.0 && <2.3     , base >=4.19.0 && <4.22     , base64-bytestring >=1.2.1 && <1.3     , bytestring >=0.11.5 && <0.13@@ -773,6 +802,7 @@     , filepath >=1.4.200 && <1.6     , hspec >=2.11.0 && <2.12     , hydra+    , regex-tdfa >=1.3.2 && <1.4     , scientific >=0.3.7 && <0.4     , split >=0.2.3 && <0.3     , text >=2.0.2 && <2.2@@ -787,8 +817,7 @@       src/exec/verify-json-kernel   ghc-options: -rtsopts   build-depends:-      HsYAML >=0.2.1 && <0.3-    , aeson >=2.1.0 && <2.3+      aeson >=2.1.0 && <2.3     , base >=4.19.0 && <4.22     , base64-bytestring >=1.2.1 && <1.3     , bytestring >=0.11.5 && <0.13@@ -796,6 +825,7 @@     , directory >=1.3.6 && <1.4     , filepath >=1.4.200 && <1.6     , hydra+    , regex-tdfa >=1.3.2 && <1.4     , scientific >=0.3.7 && <0.4     , split >=0.2.3 && <0.3     , text >=2.0.2 && <2.2@@ -807,19 +837,13 @@   main-is: Spec.hs   other-modules:       GenerationSpec-      Hydra.Adapt.LiteralsSpec-      Hydra.Adapt.TermsSpec       Hydra.ArbitraryCore       Hydra.CoreCodersSpec       Hydra.Dsl.TypesSpec-      Hydra.Json.AesonSpec-      Hydra.MonadsSpec+      Hydra.EvalPrimitives       Hydra.Reference.AlgorithmW       Hydra.Reference.AlgorithmWBridge       Hydra.Reference.AlgorithmWSpec-      Hydra.Staging.Json.Serde-      Hydra.Staging.Yaml.CoderSpec-      Hydra.Staging.Yaml.SerdeSpec       Hydra.TestData       Hydra.TestSuiteSpec       Hydra.TestUtils@@ -829,7 +853,6 @@       Generation.Hydra.Test.Lib.CharsSpec       Generation.Hydra.Test.Lib.EithersSpec       Generation.Hydra.Test.Lib.EqualitySpec-      Generation.Hydra.Test.Lib.FlowsSpec       Generation.Hydra.Test.Lib.ListsSpec       Generation.Hydra.Test.Lib.LiteralsSpec       Generation.Hydra.Test.Lib.LogicSpec@@ -837,9 +860,9 @@       Generation.Hydra.Test.Lib.MathSpec       Generation.Hydra.Test.Lib.MaybesSpec       Generation.Hydra.Test.Lib.PairsSpec+      Generation.Hydra.Test.Lib.RegexSpec       Generation.Hydra.Test.Lib.SetsSpec       Generation.Hydra.Test.Lib.StringsSpec-      Generation.Hydra.Test.MonadsSpec       Generation.Hydra.Test.ReductionSpec       Generation.Hydra.Test.SortingSpec       Generation.Spec@@ -853,22 +876,23 @@       Hydra.Test.Checking.NominalTypes       Hydra.Test.EtaExpansion       Hydra.Test.Formatting-      Hydra.Test.Hoisting+      Hydra.Test.Hoisting.All+      Hydra.Test.Hoisting.Cases+      Hydra.Test.Hoisting.Let       Hydra.Test.Inference.AlgebraicTypes       Hydra.Test.Inference.AlgorithmW       Hydra.Test.Inference.All+      Hydra.Test.Inference.Classes       Hydra.Test.Inference.Failures       Hydra.Test.Inference.Fundamentals       Hydra.Test.Inference.KernelExamples       Hydra.Test.Inference.NominalTypes-      Hydra.Test.Json.Coder       Hydra.Test.Json.Parser       Hydra.Test.Json.Roundtrip       Hydra.Test.Json.Writer       Hydra.Test.Lib.Chars       Hydra.Test.Lib.Eithers       Hydra.Test.Lib.Equality-      Hydra.Test.Lib.Flows       Hydra.Test.Lib.Lists       Hydra.Test.Lib.Literals       Hydra.Test.Lib.Logic@@ -876,9 +900,9 @@       Hydra.Test.Lib.Math       Hydra.Test.Lib.Maybes       Hydra.Test.Lib.Pairs+      Hydra.Test.Lib.Regex       Hydra.Test.Lib.Sets       Hydra.Test.Lib.Strings-      Hydra.Test.Monads       Hydra.Test.Ordering       Hydra.Test.Reduction       Hydra.Test.Rewriting@@ -890,13 +914,14 @@       Hydra.Test.TestTerms       Hydra.Test.TestTypes       Hydra.Test.Unification+      Hydra.Test.Validate.All+      Hydra.Test.Validate.Core       Paths_hydra   hs-source-dirs:       src/test/haskell       src/gen-test/haskell   build-depends:       HUnit-    , HsYAML >=0.2.1 && <0.3     , QuickCheck     , aeson >=2.1.0 && <2.3     , base >=4.19.0 && <4.22@@ -910,6 +935,7 @@     , hydra     , mtl     , process+    , regex-tdfa >=1.3.2 && <1.4     , scientific >=0.3.7 && <0.4     , split >=0.2.3 && <0.3     , text >=2.0.2 && <2.2
src/exec/update-generation-tests/Main.hs view
@@ -7,8 +7,8 @@ module Main where  import Hydra.Kernel-import Hydra.Staging.Testing.Generation.Generate-import Hydra.Staging.Testing.Generation.HaskellCodec (haskellTestGenerator)+import Hydra.Generation (createTestGroupLookup, generateGenerationTestSuite)+import Hydra.Ext.Haskell.TestingIo (haskellTestGenerator) import qualified Hydra.Sources.Test.TestSuite as TestSuite import qualified Hydra.Test.TestSuite as GenTests 
src/exec/update-haskell-kernel/Main.hs view
@@ -13,4 +13,10 @@   writeHaskell "src/gen-main/haskell" mainModules mainModules    putStrLn ""+  putStrLn "Generating DSL source module (hydra.dsls) to src/gen-main/haskell..."+  putStrLn ""++  writeDslSourceHaskell "src/gen-main/haskell"++  putStrLn ""   putStrLn "=== Done! ==="
src/exec/update-haskell-sources/Main.hs view
@@ -31,4 +31,8 @@       writeEncoderSourceHaskell "src/gen-main/haskell" mainModules kernelTypesModules        putStrLn ""+      putStrLn "Generating DSL modules to src/gen-main/haskell..."+      writeDslHaskell "src/gen-main/haskell" mainModules mainModules++      putStrLn ""       putStrLn "=== Done! ==="
src/exec/update-json-kernel/Main.hs view
@@ -3,19 +3,21 @@ import Hydra.Generation (writeModulesJson) import Hydra.Sources.All (kernelModules) import Hydra.Sources.Eval.Lib.All (evalLibModules)+import System.Environment (getArgs) import System.Exit (exitFailure) import Control.Exception (catch, SomeException)   main :: IO () main = do+  outputDir <- parseOutputDir "src/gen-main/json"   let allMods = kernelModules ++ evalLibModules   putStrLn "=== Generate Hydra kernel JSON ==="   putStrLn ""   putStrLn $ "Generating " ++ show (length allMods) ++ " kernel + eval lib modules to JSON..."   putStrLn "" -  result <- catch (writeModulesJson True "src/gen-main/json" allMods allMods >> return True)+  result <- catch (writeModulesJson True outputDir allMods allMods >> return True)                   (\e -> do                     putStrLn $ "Error: " ++ show (e :: SomeException)                     return False)@@ -25,8 +27,17 @@       putStrLn ""       putStrLn "=== Done! ==="       putStrLn ""-      putStrLn "Generated files are in: src/gen-main/json/"+      putStrLn $ "Generated files are in: " ++ outputDir ++ "/"     else do       putStrLn ""       putStrLn "=== FAILED ==="       exitFailure++parseOutputDir :: String -> IO String+parseOutputDir defaultDir = do+  args <- getArgs+  return $ go args+  where+    go ("--output-dir" : dir : _) = dir+    go (_ : rest) = go rest+    go [] = defaultDir
src/exec/update-json-main/Main.hs view
@@ -1,32 +1,50 @@ module Main where -import Hydra.Generation (writeModulesJson)-import Hydra.Sources.All (mainModules)+import Hydra.Generation (writeModulesJson, writeDslJson)+import Hydra.Sources.All (mainModules, kernelTypesModules) import Hydra.Sources.Eval.Lib.All (evalLibModules)+import System.Environment (getArgs) import System.Exit (exitFailure) import Control.Exception (catch, SomeException)   main :: IO () main = do+  outputDir <- parseOutputDir "src/gen-main/json"   let allMods = mainModules ++ evalLibModules   putStrLn "=== Generate Hydra main modules JSON ==="   putStrLn ""   putStrLn $ "Generating " ++ show (length allMods) ++ " main + eval lib modules to JSON..."   putStrLn "" -  result <- catch (writeModulesJson True "src/gen-main/json" allMods allMods >> return True)+  result <- catch (writeModulesJson True outputDir allMods allMods >> return True)                   (\e -> do                     putStrLn $ "Error: " ++ show (e :: SomeException)                     return False) -  if result+  putStrLn ""+  putStrLn "Generating DSL modules to JSON..."+  dslResult <- catch (writeDslJson outputDir mainModules kernelTypesModules >> return True)+                     (\e -> do+                       putStrLn $ "Error generating DSL JSON: " ++ show (e :: SomeException)+                       return False)++  if result && dslResult     then do       putStrLn ""       putStrLn "=== Done! ==="       putStrLn ""-      putStrLn "Generated files are in: src/gen-main/json/"+      putStrLn $ "Generated files are in: " ++ outputDir ++ "/"     else do       putStrLn ""       putStrLn "=== FAILED ==="       exitFailure++parseOutputDir :: String -> IO String+parseOutputDir defaultDir = do+  args <- getArgs+  return $ go args+  where+    go ("--output-dir" : dir : _) = dir+    go (_ : rest) = go rest+    go [] = defaultDir
src/exec/update-json-test/Main.hs view
@@ -3,19 +3,21 @@ import Hydra.Generation (writeModulesJson) import Hydra.Sources.All (mainModules) import Hydra.Sources.Test.All (testModules)+import System.Environment (getArgs) import System.Exit (exitFailure) import Control.Exception (catch, SomeException)   main :: IO () main = do+  outputDir <- parseOutputDir "src/gen-test/json"   putStrLn "=== Generate Hydra test modules JSON ==="   putStrLn ""   putStrLn $ "Generating " ++ show (length testModules) ++ " test modules to JSON..."   putStrLn ""    let universeModules = mainModules ++ testModules-  result <- catch (writeModulesJson True "src/gen-test/json" universeModules testModules >> return True)+  result <- catch (writeModulesJson True outputDir universeModules testModules >> return True)                   (\e -> do                     putStrLn $ "Error: " ++ show (e :: SomeException)                     return False)@@ -25,8 +27,17 @@       putStrLn ""       putStrLn "=== Done! ==="       putStrLn ""-      putStrLn "Generated files are in: src/gen-test/json/"+      putStrLn $ "Generated files are in: " ++ outputDir ++ "/"     else do       putStrLn ""       putStrLn "=== FAILED ==="       exitFailure++parseOutputDir :: String -> IO String+parseOutputDir defaultDir = do+  args <- getArgs+  return $ go args+  where+    go ("--output-dir" : dir : _) = dir+    go (_ : rest) = go rest+    go [] = defaultDir
src/exec/verify-json-kernel/Main.hs view
@@ -51,22 +51,13 @@   content <- BS.readFile fp   return $ aesonToHydra <$> A.eitherDecode content --- | Extract a Type from a term that represents a type definition-termToType :: Graph -> Term -> Maybe Type-termToType g term = case DecodeCore.type_ g term of-  Left _ -> Nothing-  Right typ -> Just typ---- | Build a schema map (Name -> Type) from a graph's schema.+-- | Build a schema map (Name -> Type) from a graph's schema types. -- This is used by the JSON decoder to resolve type variables.+-- Uses graphSchemaTypes (which contains TypeScheme values) and extracts the underlying Type. buildSchemaMap :: Graph -> M.Map Name Type-buildSchemaMap g = case graphSchema g of-  Nothing -> M.empty-  Just schemaGraph -> M.fromList $ concatMap (extractType schemaGraph) $ graphElements schemaGraph+buildSchemaMap g = M.map extractType (graphSchemaTypes g)   where-    extractType sg binding = case termToType sg (bindingTerm binding) of-      Just typ -> [(bindingName binding, stripTypeAnnotationsTop typ)]-      Nothing -> []+    extractType (TypeScheme _ t _) = stripTypeAnnotationsTop t      -- Strip only top-level annotations     stripTypeAnnotationsTop (TypeAnnotated (AnnotatedType t _)) = stripTypeAnnotationsTop t@@ -122,7 +113,7 @@              -- Decode JSON to Term using type-directed decoder with Module type             -- The schemaMap is used to resolve type variables-            case JsonDecode.fromJson schemaMap modType jsonVal of+            case JsonDecode.fromJson schemaMap (Name "hydra.module.Module") modType jsonVal of               Left err -> do                 flushPut $ "  ✗ " ++ nsStr ++ " (JSON decode error)"                 flushPut $ "    " ++ err@@ -168,26 +159,27 @@  -- | Check whether a module contains only native type definitions (no term definitions). isTypeModule :: Module -> Bool-isTypeModule m = all isNativeType (moduleElements m)+isTypeModule m = all isNativeType (moduleBindings m)  -- | Strip type annotations from a module for comparison with raw (pre-inference) modules. -- Removes TypeLambda, TypeApplication, binding TypeSchemes, and lambda domain types from terms, -- but preserves user annotations. stripTypeAnnotations :: Module -> Module stripTypeAnnotations m = m {-  moduleElements = fmap stripBinding (moduleElements m) }+  moduleDefinitions = fmap stripDef (moduleDefinitions m) }   where-    stripBinding b = b {-      bindingTerm = Rewriting.removeTypesFromTerm (bindingTerm b),-      bindingType = Nothing }+    stripDef (DefinitionTerm td) = DefinitionTerm td {+      termDefinitionTerm = Rewriting.removeTypesFromTerm (termDefinitionTerm td),+      termDefinitionType = Just $ TypeScheme [] (TypeVariable $ Name "hydra.core.Unit") Nothing }+    stripDef d = d  -- | Find the first difference between two modules findDifference :: Module -> Module -> String findDifference orig decoded   | moduleNamespace orig /= moduleNamespace decoded =       "namespace differs: " ++ unNamespace (moduleNamespace orig) ++ " vs " ++ unNamespace (moduleNamespace decoded)-  | length (moduleElements orig) /= length (moduleElements decoded) =-      "element count differs: " ++ show (length (moduleElements orig)) ++ " vs " ++ show (length (moduleElements decoded))+  | length (moduleDefinitions orig) /= length (moduleDefinitions decoded) =+      "element count differs: " ++ show (length (moduleDefinitions orig)) ++ " vs " ++ show (length (moduleDefinitions decoded))   | moduleTermDependencies orig /= moduleTermDependencies decoded =       "termDependencies differ"   | moduleTypeDependencies orig /= moduleTypeDependencies decoded =@@ -195,13 +187,14 @@   | moduleDescription orig /= moduleDescription decoded =       "description differs"   | otherwise =-      "elements differ (checking first mismatch...)" ++ findElementDiff (moduleElements orig) (moduleElements decoded)+      "elements differ (checking first mismatch...)" ++ findElementDiff (moduleDefinitions orig) (moduleDefinitions decoded) -findElementDiff :: [Binding] -> [Binding] -> String+findElementDiff :: [Definition] -> [Definition] -> String findElementDiff [] [] = "" findElementDiff (o:os) (d:ds)   | o == d = findElementDiff os ds-  | bindingName o /= bindingName d = " - name: " ++ unName (bindingName o) ++ " vs " ++ unName (bindingName d)-  | bindingType o /= bindingType d = " - type differs for " ++ unName (bindingName o)-  | otherwise = " - term differs for " ++ unName (bindingName o)+  | otherwise = " - definition differs at " ++ show (defName o) ++ " vs " ++ show (defName d)+  where+    defName (DefinitionTerm td) = termDefinitionName td+    defName (DefinitionType td) = typeDefinitionName td findElementDiff _ _ = " - different element counts"
− src/gen-main/haskell/Hydra/Accessors.hs
@@ -1,160 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | A model for term access patterns--module Hydra.Accessors where--import qualified Hydra.Core as Core-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S---- | An edge in an accessor graph, connecting two nodes via a path-data AccessorEdge = -  AccessorEdge {-    -- | The source node of the edge-    accessorEdgeSource :: AccessorNode,-    -- | The accessor path connecting source to target-    accessorEdgePath :: AccessorPath,-    -- | The target node of the edge-    accessorEdgeTarget :: AccessorNode}-  deriving (Eq, Ord, Read, Show)--_AccessorEdge = (Core.Name "hydra.accessors.AccessorEdge")--_AccessorEdge_source = (Core.Name "source")--_AccessorEdge_path = (Core.Name "path")--_AccessorEdge_target = (Core.Name "target")---- | A graph of accessor nodes and edges, representing term access patterns-data AccessorGraph = -  AccessorGraph {-    -- | All nodes in the graph-    accessorGraphNodes :: [AccessorNode],-    -- | All edges in the graph-    accessorGraphEdges :: [AccessorEdge]}-  deriving (Eq, Ord, Read, Show)--_AccessorGraph = (Core.Name "hydra.accessors.AccessorGraph")--_AccessorGraph_nodes = (Core.Name "nodes")--_AccessorGraph_edges = (Core.Name "edges")---- | A node in an accessor graph, representing a term or subterm-data AccessorNode = -  AccessorNode {-    -- | The qualified name of the term-    accessorNodeName :: Core.Name,-    -- | A human-readable label for the node-    accessorNodeLabel :: String,-    -- | A unique identifier for the node-    accessorNodeId :: String}-  deriving (Eq, Ord, Read, Show)--_AccessorNode = (Core.Name "hydra.accessors.AccessorNode")--_AccessorNode_name = (Core.Name "name")--_AccessorNode_label = (Core.Name "label")--_AccessorNode_id = (Core.Name "id")---- | A sequence of term accessors forming a path through a term-newtype AccessorPath = -  AccessorPath {-    unAccessorPath :: [TermAccessor]}-  deriving (Eq, Ord, Read, Show)--_AccessorPath = (Core.Name "hydra.accessors.AccessorPath")---- | A function which maps from a term to a particular immediate subterm-data TermAccessor = -  -- | Access the body of an annotated term-  TermAccessorAnnotatedBody  |-  -- | Access the function of an application term-  TermAccessorApplicationFunction  |-  -- | Access the argument of an application term-  TermAccessorApplicationArgument  |-  -- | Access the body of a lambda term-  TermAccessorLambdaBody  |-  -- | Access the default case of a union elimination-  TermAccessorUnionCasesDefault  |-  -- | Access a specific branch of a union elimination by field name-  TermAccessorUnionCasesBranch Core.Name |-  -- | Access the body of a let term-  TermAccessorLetBody  |-  -- | Access a specific binding in a let term by variable name-  TermAccessorLetBinding Core.Name |-  -- | Access an element of a list by index-  TermAccessorListElement Int |-  -- | Access a key in a map by index-  TermAccessorMapKey Int |-  -- | Access a value in a map by index-  TermAccessorMapValue Int |-  -- | Access the term inside a Just value-  TermAccessorMaybeTerm  |-  -- | Access an element of a product (tuple) by index-  TermAccessorProductTerm Int |-  -- | Access a field of a record by field name-  TermAccessorRecordField Core.Name |-  -- | Access an element of a set by index-  TermAccessorSetElement Int |-  -- | Access the term inside a sum variant-  TermAccessorSumTerm  |-  -- | Access the body of a type lambda term-  TermAccessorTypeLambdaBody  |-  -- | Access the term being applied to a type-  TermAccessorTypeApplicationTerm  |-  -- | Access the term inside a union injection-  TermAccessorInjectionTerm  |-  -- | Access the term inside a wrapped term-  TermAccessorWrappedTerm -  deriving (Eq, Ord, Read, Show)--_TermAccessor = (Core.Name "hydra.accessors.TermAccessor")--_TermAccessor_annotatedBody = (Core.Name "annotatedBody")--_TermAccessor_applicationFunction = (Core.Name "applicationFunction")--_TermAccessor_applicationArgument = (Core.Name "applicationArgument")--_TermAccessor_lambdaBody = (Core.Name "lambdaBody")--_TermAccessor_unionCasesDefault = (Core.Name "unionCasesDefault")--_TermAccessor_unionCasesBranch = (Core.Name "unionCasesBranch")--_TermAccessor_letBody = (Core.Name "letBody")--_TermAccessor_letBinding = (Core.Name "letBinding")--_TermAccessor_listElement = (Core.Name "listElement")--_TermAccessor_mapKey = (Core.Name "mapKey")--_TermAccessor_mapValue = (Core.Name "mapValue")--_TermAccessor_maybeTerm = (Core.Name "maybeTerm")--_TermAccessor_productTerm = (Core.Name "productTerm")--_TermAccessor_recordField = (Core.Name "recordField")--_TermAccessor_setElement = (Core.Name "setElement")--_TermAccessor_sumTerm = (Core.Name "sumTerm")--_TermAccessor_typeLambdaBody = (Core.Name "typeLambdaBody")--_TermAccessor_typeApplicationTerm = (Core.Name "typeApplicationTerm")--_TermAccessor_injectionTerm = (Core.Name "injectionTerm")--_TermAccessor_wrappedTerm = (Core.Name "wrappedTerm")
+ src/gen-main/haskell/Hydra/Adapt.hs view
@@ -0,0 +1,662 @@+-- Note: this is an automatically generated file. Do not edit.++-- | Simple, one-way adapters for types and terms++module Hydra.Adapt where++import qualified Hydra.Coders as Coders+import qualified Hydra.Context as Context+import qualified Hydra.Core as Core+import qualified Hydra.Errors as Errors+import qualified Hydra.Graph as Graph+import qualified Hydra.Hoisting as Hoisting+import qualified Hydra.Inference as Inference+import qualified Hydra.Lexical as Lexical+import qualified Hydra.Lib.Eithers as Eithers+import qualified Hydra.Lib.Equality as Equality+import qualified Hydra.Lib.Lists as Lists+import qualified Hydra.Lib.Literals as Literals+import qualified Hydra.Lib.Logic as Logic+import qualified Hydra.Lib.Maps as Maps+import qualified Hydra.Lib.Maybes as Maybes+import qualified Hydra.Lib.Pairs as Pairs+import qualified Hydra.Lib.Sets as Sets+import qualified Hydra.Lib.Strings as Strings+import qualified Hydra.Literals as Literals_+import qualified Hydra.Module as Module+import qualified Hydra.Names as Names+import qualified Hydra.Reduction as Reduction+import qualified Hydra.Reflect as Reflect+import qualified Hydra.Rewriting as Rewriting+import qualified Hydra.Schemas as Schemas+import qualified Hydra.Show.Core as Core_+import qualified Hydra.Show.Errors as Errors_+import qualified Hydra.Util as Util+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++-- | Adapt a graph and its schema to the given language constraints. The doExpand flag controls eta expansion of partial applications. Adaptation is type-preserving: binding-level TypeSchemes are adapted (not stripped). Note: case statement hoisting is done separately, prior to adaptation. The els0 parameter provides the original ordered bindings. Returns both the adapted graph and the ordered adapted bindings.+adaptDataGraph :: Coders.LanguageConstraints -> Bool -> [Core.Binding] -> Context.Context -> Graph.Graph -> Either String (Graph.Graph, [Core.Binding])+adaptDataGraph constraints doExpand els0 cx graph0 =++      let transform =+              \g -> \gterm ->+                let tx = g+                    gterm1 = Rewriting.unshadowVariables (pushTypeAppsInward gterm)+                    gterm2 =+                            Rewriting.unshadowVariables (Logic.ifElse doExpand (pushTypeAppsInward (Reduction.etaExpandTermNew tx gterm1)) gterm1)+                in (Rewriting.liftLambdaAboveLet gterm2)+          litmap = adaptLiteralTypesMap constraints+          prims0 = Graph.graphPrimitives graph0+          schemaTypes0 = Graph.graphSchemaTypes graph0+          schemaBindings = Schemas.typesToElements (Maps.map (\ts -> Rewriting.typeSchemeToFType ts) schemaTypes0)+      in (Eithers.bind (Logic.ifElse (Maps.null schemaTypes0) (Right Maps.empty) (Eithers.bind (Eithers.bimap (\ic -> Errors.unDecodingError (Context.inContextObject ic)) (\x -> x) (Schemas.graphAsTypes cx graph0 schemaBindings)) (\tmap0 -> Eithers.bind (adaptGraphSchema constraints litmap tmap0) (\tmap1 -> Right (Maps.map (\t -> Schemas.typeToTypeScheme t) tmap1))))) (\schemaResult ->+        let adaptedSchemaTypes = schemaResult+            gterm0 =+                    Core.TermLet (Core.Let {+                      Core.letBindings = els0,+                      Core.letBody = Core.TermUnit})+            gterm1 = Logic.ifElse doExpand (transform graph0 gterm0) gterm0+        in (Eithers.bind (adaptTerm constraints litmap cx graph0 gterm1) (\gterm2 -> Eithers.bind (Rewriting.rewriteTermM (adaptLambdaDomains constraints litmap) gterm2) (\gterm3 ->+          let els1Raw = Schemas.termAsBindings gterm3+              processBinding =+                      \el -> Eithers.bind (Rewriting.rewriteTermM (adaptNestedTypes constraints litmap) (Core.bindingTerm el)) (\newTerm -> Eithers.bind (Maybes.maybe (Right Nothing) (\ts -> Eithers.bind (adaptTypeScheme constraints litmap ts) (\ts1 -> Right (Just ts1))) (Core.bindingType el)) (\adaptedType -> Right (Core.Binding {+                        Core.bindingName = (Core.bindingName el),+                        Core.bindingTerm = newTerm,+                        Core.bindingType = adaptedType})))+          in (Eithers.bind (Eithers.mapList processBinding els1Raw) (\els1 -> Eithers.bind (Eithers.mapList (\kv -> Eithers.bind (adaptPrimitive constraints litmap (Pairs.second kv)) (\prim1 -> Right (Pairs.first kv, prim1))) (Maps.toList prims0)) (\primPairs ->+            let prims1 = Maps.fromList primPairs+                adaptedGraphRaw = Lexical.buildGraph els1 Maps.empty prims1+                adaptedGraph =+                        Graph.Graph {+                          Graph.graphBoundTerms = (Graph.graphBoundTerms adaptedGraphRaw),+                          Graph.graphBoundTypes = (Graph.graphBoundTypes adaptedGraphRaw),+                          Graph.graphClassConstraints = (Graph.graphClassConstraints adaptedGraphRaw),+                          Graph.graphLambdaVariables = (Graph.graphLambdaVariables adaptedGraphRaw),+                          Graph.graphMetadata = (Graph.graphMetadata adaptedGraphRaw),+                          Graph.graphPrimitives = (Graph.graphPrimitives adaptedGraphRaw),+                          Graph.graphSchemaTypes = adaptedSchemaTypes,+                          Graph.graphTypeVariables = (Graph.graphTypeVariables adaptedGraphRaw)}+            in (Right (adaptedGraph, els1))))))))))++-- | Attempt to adapt a floating-point type using the given language constraints+adaptFloatType :: Coders.LanguageConstraints -> Core.FloatType -> Maybe Core.FloatType+adaptFloatType constraints ft =++      let supported = Sets.member ft (Coders.languageConstraintsFloatTypes constraints)+          alt = adaptFloatType constraints+          forUnsupported =+                  \ft -> case ft of+                    Core.FloatTypeBigfloat -> alt Core.FloatTypeFloat64+                    Core.FloatTypeFloat32 -> alt Core.FloatTypeFloat64+                    Core.FloatTypeFloat64 -> alt Core.FloatTypeBigfloat+      in (Logic.ifElse supported (Just ft) (forUnsupported ft))++-- | Adapt a schema graph to the given language constraints+adaptGraphSchema :: Ord t0 => (Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> M.Map t0 Core.Type -> Either String (M.Map t0 Core.Type))+adaptGraphSchema constraints litmap types0 =++      let mapPair =+              \pair ->+                let name = Pairs.first pair+                    typ = Pairs.second pair+                in (Eithers.bind (adaptType constraints litmap typ) (\typ1 -> Right (name, typ1)))+      in (Eithers.bind (Eithers.mapList mapPair (Maps.toList types0)) (\pairs -> Right (Maps.fromList pairs)))++-- | Attempt to adapt an integer type using the given language constraints+adaptIntegerType :: Coders.LanguageConstraints -> Core.IntegerType -> Maybe Core.IntegerType+adaptIntegerType constraints it =++      let supported = Sets.member it (Coders.languageConstraintsIntegerTypes constraints)+          alt = adaptIntegerType constraints+          forUnsupported =+                  \it -> case it of+                    Core.IntegerTypeBigint -> Nothing+                    Core.IntegerTypeInt8 -> alt Core.IntegerTypeUint16+                    Core.IntegerTypeInt16 -> alt Core.IntegerTypeUint32+                    Core.IntegerTypeInt32 -> alt Core.IntegerTypeUint64+                    Core.IntegerTypeInt64 -> alt Core.IntegerTypeBigint+                    Core.IntegerTypeUint8 -> alt Core.IntegerTypeInt16+                    Core.IntegerTypeUint16 -> alt Core.IntegerTypeInt32+                    Core.IntegerTypeUint32 -> alt Core.IntegerTypeInt64+                    Core.IntegerTypeUint64 -> alt Core.IntegerTypeBigint+      in (Logic.ifElse supported (Just it) (forUnsupported it))++-- | Rewrite callback for adapting lambda domain types in a term+adaptLambdaDomains :: Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> (t0 -> Either String Core.Term) -> t0 -> Either String Core.Term+adaptLambdaDomains constraints litmap recurse term =+    Eithers.bind (recurse term) (\rewritten -> case rewritten of+      Core.TermFunction v0 -> case v0 of+        Core.FunctionLambda v1 -> Eithers.bind (Maybes.maybe (Right Nothing) (\dom -> Eithers.bind (adaptType constraints litmap dom) (\dom1 -> Right (Just dom1))) (Core.lambdaDomain v1)) (\adaptedDomain -> Right (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.lambdaParameter v1),+          Core.lambdaDomain = adaptedDomain,+          Core.lambdaBody = (Core.lambdaBody v1)}))))+        _ -> Right (Core.TermFunction v0)+      _ -> Right rewritten)++-- | Convert a literal to a different type+adaptLiteral :: Core.LiteralType -> Core.Literal -> Core.Literal+adaptLiteral lt l =+    case l of+      Core.LiteralBinary v0 -> case lt of+        Core.LiteralTypeString -> Core.LiteralString (Literals.binaryToString v0)+      Core.LiteralBoolean v0 -> case lt of+        Core.LiteralTypeInteger v1 -> Core.LiteralInteger (Literals_.bigintToIntegerValue v1 (Logic.ifElse v0 1 0))+      Core.LiteralFloat v0 -> case lt of+        Core.LiteralTypeFloat v1 -> Core.LiteralFloat (Literals_.bigfloatToFloatValue v1 (Literals_.floatValueToBigfloat v0))+      Core.LiteralInteger v0 -> case lt of+        Core.LiteralTypeInteger v1 -> Core.LiteralInteger (Literals_.bigintToIntegerValue v1 (Literals_.integerValueToBigint v0))++-- | Attempt to adapt a literal type using the given language constraints+adaptLiteralType :: Coders.LanguageConstraints -> Core.LiteralType -> Maybe Core.LiteralType+adaptLiteralType constraints lt =++      let forUnsupported =+              \lt -> case lt of+                Core.LiteralTypeBinary -> Just Core.LiteralTypeString+                Core.LiteralTypeBoolean -> Maybes.map (\x -> Core.LiteralTypeInteger x) (adaptIntegerType constraints Core.IntegerTypeInt8)+                Core.LiteralTypeFloat v0 -> Maybes.map (\x -> Core.LiteralTypeFloat x) (adaptFloatType constraints v0)+                Core.LiteralTypeInteger v0 -> Maybes.map (\x -> Core.LiteralTypeInteger x) (adaptIntegerType constraints v0)+                _ -> Nothing+      in (Logic.ifElse (literalTypeSupported constraints lt) Nothing (forUnsupported lt))++-- | Derive a map of adapted literal types for the given language constraints+adaptLiteralTypesMap :: Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType+adaptLiteralTypesMap constraints =++      let tryType = \lt -> Maybes.maybe Nothing (\lt2 -> Just (lt, lt2)) (adaptLiteralType constraints lt)+      in (Maps.fromList (Maybes.cat (Lists.map tryType Reflect.literalTypes)))++-- | Adapt a literal value using the given language constraints+adaptLiteralValue :: Ord t0 => (M.Map t0 Core.LiteralType -> t0 -> Core.Literal -> Core.Literal)+adaptLiteralValue litmap lt l =+    Maybes.maybe (Core.LiteralString (Core_.literal l)) (\lt2 -> adaptLiteral lt2 l) (Maps.lookup lt litmap)++-- | Rewrite callback for adapting nested let binding TypeSchemes in a term+adaptNestedTypes :: Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> (t0 -> Either String Core.Term) -> t0 -> Either String Core.Term+adaptNestedTypes constraints litmap recurse term =+    Eithers.bind (recurse term) (\rewritten -> case rewritten of+      Core.TermLet v0 ->+        let adaptB =+                \b -> Eithers.bind (Maybes.maybe (Right Nothing) (\ts -> Eithers.bind (adaptTypeScheme constraints litmap ts) (\ts1 -> Right (Just ts1))) (Core.bindingType b)) (\adaptedBType -> Right (Core.Binding {+                  Core.bindingName = (Core.bindingName b),+                  Core.bindingTerm = (Core.bindingTerm b),+                  Core.bindingType = adaptedBType}))+        in (Eithers.bind (Eithers.mapList adaptB (Core.letBindings v0)) (\adaptedBindings -> Right (Core.TermLet (Core.Let {+          Core.letBindings = adaptedBindings,+          Core.letBody = (Core.letBody v0)}))))+      _ -> Right rewritten)++-- | Adapt a primitive to the given language constraints, prior to inference+adaptPrimitive :: Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> Graph.Primitive -> Either String Graph.Primitive+adaptPrimitive constraints litmap prim0 =++      let ts0 = Graph.primitiveType prim0+      in (Eithers.bind (adaptTypeScheme constraints litmap ts0) (\ts1 -> Right (Graph.Primitive {+        Graph.primitiveName = (Graph.primitiveName prim0),+        Graph.primitiveType = ts1,+        Graph.primitiveImplementation = (Graph.primitiveImplementation prim0)})))++-- | Adapt a term using the given language constraints+adaptTerm :: Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> Context.Context -> Graph.Graph -> Core.Term -> Either String Core.Term+adaptTerm constraints litmap cx graph term0 =++      let rewrite =+              \recurse -> \term0 ->+                let forSupported =+                        \term -> case term of+                          Core.TermLiteral v0 ->+                            let lt = Reflect.literalType v0+                            in (Right (Just (Logic.ifElse (literalTypeSupported constraints lt) term (Core.TermLiteral (adaptLiteralValue litmap lt v0)))))+                          _ -> Right (Just term)+                    forUnsupported =+                            \term ->+                              let forNonNull =+                                      \alts -> Eithers.bind (tryTerm (Lists.head alts)) (\mterm -> Maybes.maybe (tryAlts (Lists.tail alts)) (\t -> Right (Just t)) mterm)+                                  tryAlts = \alts -> Logic.ifElse (Lists.null alts) (Right Nothing) (forNonNull alts)+                              in (Eithers.bind (termAlternatives cx graph term) (\alts0 -> tryAlts alts0))+                    tryTerm =+                            \term ->+                              let supportedVariant = Sets.member (Reflect.termVariant term) (Coders.languageConstraintsTermVariants constraints)+                              in (Logic.ifElse supportedVariant (forSupported term) (forUnsupported term))+                in (Eithers.bind (recurse term0) (\term1 -> case term1 of+                  Core.TermTypeApplication v0 -> Eithers.bind (adaptType constraints litmap (Core.typeApplicationTermType v0)) (\atyp -> Right (Core.TermTypeApplication (Core.TypeApplicationTerm {+                    Core.typeApplicationTermBody = (Core.typeApplicationTermBody v0),+                    Core.typeApplicationTermType = atyp})))+                  Core.TermTypeLambda _ -> Right term1+                  _ -> Eithers.bind (tryTerm term1) (\mterm -> Maybes.maybe (Left (Strings.cat2 "no alternatives for term: " (Core_.term term1))) (\term2 -> Right term2) mterm)))+      in (Rewriting.rewriteTermM rewrite term0)++-- | Adapt a term using the constraints of a given language+adaptTermForLanguage :: Coders.Language -> Context.Context -> Graph.Graph -> Core.Term -> Either String Core.Term+adaptTermForLanguage lang cx g term =++      let constraints = Coders.languageConstraints lang+          litmap = adaptLiteralTypesMap constraints+      in (adaptTerm constraints litmap cx g term)++-- | Adapt a type using the given language constraints+adaptType :: Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> Core.Type -> Either String Core.Type+adaptType constraints litmap type0 =++      let forSupported =+              \typ -> case typ of+                Core.TypeLiteral v0 -> Logic.ifElse (literalTypeSupported constraints v0) (Just typ) (Maybes.maybe (Just (Core.TypeLiteral Core.LiteralTypeString)) (\lt2 -> Just (Core.TypeLiteral lt2)) (Maps.lookup v0 litmap))+                _ -> Just typ+          forUnsupported =+                  \typ ->+                    let tryAlts =+                            \alts -> Logic.ifElse (Lists.null alts) Nothing (Maybes.maybe (tryAlts (Lists.tail alts)) (\t -> Just t) (tryType (Lists.head alts)))+                        alts0 = typeAlternatives typ+                    in (tryAlts alts0)+          tryType =+                  \typ ->+                    let supportedVariant = Sets.member (Reflect.typeVariant typ) (Coders.languageConstraintsTypeVariants constraints)+                    in (Logic.ifElse supportedVariant (forSupported typ) (forUnsupported typ))+          rewrite =+                  \recurse -> \typ -> Eithers.bind (recurse typ) (\type1 -> Maybes.maybe (Left (Strings.cat2 "no alternatives for type: " (Core_.type_ typ))) (\type2 -> Right type2) (tryType type1))+      in (Rewriting.rewriteTypeM rewrite type0)++-- | Adapt a type using the constraints of a given language+adaptTypeForLanguage :: Coders.Language -> Core.Type -> Either String Core.Type+adaptTypeForLanguage lang typ =++      let constraints = Coders.languageConstraints lang+          litmap = adaptLiteralTypesMap constraints+      in (adaptType constraints litmap typ)++-- | Adapt a type scheme to the given language constraints, prior to inference+adaptTypeScheme :: Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> Core.TypeScheme -> Either String Core.TypeScheme+adaptTypeScheme constraints litmap ts0 =++      let vars0 = Core.typeSchemeVariables ts0+          t0 = Core.typeSchemeType ts0+      in (Eithers.bind (adaptType constraints litmap t0) (\t1 -> Right (Core.TypeScheme {+        Core.typeSchemeVariables = vars0,+        Core.typeSchemeType = t1,+        Core.typeSchemeConstraints = (Core.typeSchemeConstraints ts0)})))++-- | Compose two coders into a single coder+composeCoders :: Util.Coder t0 t1 -> Util.Coder t1 t2 -> Util.Coder t0 t2+composeCoders c1 c2 =+    Util.Coder {+      Util.coderEncode = (\cx -> \a -> Eithers.bind (Util.coderEncode c1 cx a) (\b1 -> Util.coderEncode c2 cx b1)),+      Util.coderDecode = (\cx -> \c -> Eithers.bind (Util.coderDecode c2 cx c) (\b2 -> Util.coderDecode c1 cx b2))}++-- | Given a data graph along with language constraints, original ordered bindings, and a designated list of namespaces, adapt the graph to the language constraints, then return the processed graph along with term definitions grouped by namespace (in the order of the input namespaces). Inference is performed before adaptation if bindings lack type annotations. Hoisting must preserve type schemes; if any binding loses its type scheme after hoisting, the pipeline fails. Adaptation preserves type application/lambda wrappers and adapts embedded types. Post-adaptation inference is performed to ensure binding TypeSchemes are fully consistent. The doExpand flag controls eta expansion. The doHoistCaseStatements flag controls case statement hoisting (needed for Python). The doHoistPolymorphicLetBindings flag controls polymorphic let binding hoisting (needed for Java). The originalBindings parameter provides the original ordered bindings (from module elements).+dataGraphToDefinitions :: Coders.LanguageConstraints -> Bool -> Bool -> Bool -> Bool -> [Core.Binding] -> Graph.Graph -> [Module.Namespace] -> Context.Context -> Either String (Graph.Graph, [[Module.TermDefinition]])+dataGraphToDefinitions constraints doInfer doExpand doHoistCaseStatements doHoistPolymorphicLetBindings originalBindings graph0 namespaces cx =++      let namespacesSet = Sets.fromList namespaces+          isParentBinding =+                  \b -> Maybes.maybe False (\ns -> Sets.member ns namespacesSet) (Names.namespaceOf (Core.bindingName b))+          hoistCases =+                  \bindings ->+                    let stripped =+                            Lists.map (\b -> Core.Binding {+                              Core.bindingName = (Core.bindingName b),+                              Core.bindingTerm = (Rewriting.stripTypeLambdas (Core.bindingTerm b)),+                              Core.bindingType = (Core.bindingType b)}) bindings+                        term0 =+                                Core.TermLet (Core.Let {+                                  Core.letBindings = stripped,+                                  Core.letBody = Core.TermUnit})+                        unshadowed0 = Schemas.termAsBindings (Rewriting.unshadowVariables term0)+                        hoisted = Hoisting.hoistCaseStatementsInGraph unshadowed0+                        term1 =+                                Core.TermLet (Core.Let {+                                  Core.letBindings = hoisted,+                                  Core.letBody = Core.TermUnit})+                    in (Schemas.termAsBindings (Rewriting.unshadowVariables term1))+          hoistPoly =+                  \bindings ->+                    let letBefore =+                            Core.Let {+                              Core.letBindings = bindings,+                              Core.letBody = Core.TermUnit}+                        letAfter = Hoisting.hoistPolymorphicLetBindings isParentBinding letBefore+                    in (Core.letBindings letAfter)+          checkBindingsTyped =+                  \debugLabel -> \bindings ->+                    let untypedBindings =+                            Lists.map (\b -> Core.unName (Core.bindingName b)) (Lists.filter (\b -> Logic.not (Maybes.isJust (Core.bindingType b))) bindings)+                    in (Logic.ifElse (Lists.null untypedBindings) (Right bindings) (Left (Strings.cat [+                      "Found untyped bindings (",+                      debugLabel,+                      "): ",+                      (Strings.intercalate ", " untypedBindings)])))+          normalizeBindings =+                  \bindings -> Lists.map (\b -> Core.Binding {+                    Core.bindingName = (Core.bindingName b),+                    Core.bindingTerm = (pushTypeAppsInward (Core.bindingTerm b)),+                    Core.bindingType = (Core.bindingType b)}) bindings+          rebuildGraph =+                  \bindings ->+                    let g = Lexical.buildGraph bindings Maps.empty (Graph.graphPrimitives graph0)+                    in Graph.Graph {+                      Graph.graphBoundTerms = (Graph.graphBoundTerms g),+                      Graph.graphBoundTypes = (Graph.graphBoundTypes g),+                      Graph.graphClassConstraints = (Graph.graphClassConstraints g),+                      Graph.graphLambdaVariables = (Graph.graphLambdaVariables g),+                      Graph.graphMetadata = (Graph.graphMetadata g),+                      Graph.graphPrimitives = (Graph.graphPrimitives g),+                      Graph.graphSchemaTypes = (Graph.graphSchemaTypes graph0),+                      Graph.graphTypeVariables = (Graph.graphTypeVariables g)}+          bins0 = originalBindings+          bins1 = Logic.ifElse doHoistCaseStatements (hoistCases bins0) bins0+      in (Eithers.bind (Logic.ifElse doInfer (Eithers.map (\result -> Pairs.second (Pairs.first result)) (Eithers.bimap (\ic -> Errors_.error (Context.inContextObject ic)) (\x -> x) (Inference.inferGraphTypes cx bins1 (rebuildGraph bins1)))) (checkBindingsTyped "after case hoisting" bins1)) (\bins2 -> Eithers.bind (Logic.ifElse doHoistPolymorphicLetBindings (checkBindingsTyped "after let hoisting" (hoistPoly bins2)) (Right bins2)) (\bins3 -> Eithers.bind (adaptDataGraph constraints doExpand bins3 cx (rebuildGraph bins3)) (\adaptResult ->+        let adapted = Pairs.first adaptResult+            adaptedBindings = Pairs.second adaptResult+        in (Eithers.bind (checkBindingsTyped "after adaptation" adaptedBindings) (\bins4 ->+          let bins5 = normalizeBindings bins4+              toDef =+                      \el -> Maybes.map (\ts -> Module.TermDefinition {+                        Module.termDefinitionName = (Core.bindingName el),+                        Module.termDefinitionTerm = (Core.bindingTerm el),+                        Module.termDefinitionType = (Just ts)}) (Core.bindingType el)+              selectedElements =+                      Lists.filter (\el -> Maybes.maybe False (\ns -> Sets.member ns namespacesSet) (Names.namespaceOf (Core.bindingName el))) bins5+              elementsByNamespace =+                      Lists.foldl (\acc -> \el -> Maybes.maybe acc (\ns ->+                        let existing = Maybes.maybe [] Equality.identity (Maps.lookup ns acc)+                        in (Maps.insert ns (Lists.concat2 existing [+                          el]) acc)) (Names.namespaceOf (Core.bindingName el))) Maps.empty selectedElements+              defsGrouped =+                      Lists.map (\ns ->+                        let elsForNs = Maybes.maybe [] Equality.identity (Maps.lookup ns elementsByNamespace)+                        in (Maybes.cat (Lists.map toDef elsForNs))) namespaces+              g = Lexical.buildGraph bins5 Maps.empty (Graph.graphPrimitives adapted)+          in (Right (Graph.Graph {+            Graph.graphBoundTerms = (Graph.graphBoundTerms g),+            Graph.graphBoundTypes = (Graph.graphBoundTypes g),+            Graph.graphClassConstraints = (Graph.graphClassConstraints g),+            Graph.graphLambdaVariables = (Graph.graphLambdaVariables g),+            Graph.graphMetadata = (Graph.graphMetadata g),+            Graph.graphPrimitives = (Graph.graphPrimitives g),+            Graph.graphSchemaTypes = (Graph.graphSchemaTypes adapted),+            Graph.graphTypeVariables = (Graph.graphTypeVariables g)}, defsGrouped))))))))++-- | Check if a literal type is supported by the given language constraints+literalTypeSupported :: Coders.LanguageConstraints -> Core.LiteralType -> Bool+literalTypeSupported constraints lt =++      let forType =+              \lt -> case lt of+                Core.LiteralTypeFloat v0 -> Sets.member v0 (Coders.languageConstraintsFloatTypes constraints)+                Core.LiteralTypeInteger v0 -> Sets.member v0 (Coders.languageConstraintsIntegerTypes constraints)+                _ -> True+      in (Logic.ifElse (Sets.member (Reflect.literalTypeVariant lt) (Coders.languageConstraintsLiteralVariants constraints)) (forType lt) False)++-- | Prepare a float type, substituting unsupported types+prepareFloatType :: Core.FloatType -> (Core.FloatType, ((Core.FloatValue -> Core.FloatValue), (S.Set String)))+prepareFloatType ft =+    case ft of+      Core.FloatTypeBigfloat -> (Core.FloatTypeFloat64, ((\v -> case v of+        Core.FloatValueBigfloat v1 -> Core.FloatValueFloat64 (Literals.bigfloatToFloat64 v1)+        _ -> v), (Sets.fromList [+        "replace arbitrary-precision floating-point numbers with 64-bit floating-point numbers (doubles)"])))+      _ -> prepareSame ft++-- | Prepare an integer type, substituting unsupported types+prepareIntegerType :: Core.IntegerType -> (Core.IntegerType, ((Core.IntegerValue -> Core.IntegerValue), (S.Set String)))+prepareIntegerType it =+    case it of+      Core.IntegerTypeBigint -> (Core.IntegerTypeInt64, ((\v -> case v of+        Core.IntegerValueBigint v1 -> Core.IntegerValueInt64 (Literals.bigintToInt64 v1)+        _ -> v), (Sets.fromList [+        "replace arbitrary-precision integers with 64-bit integers"])))+      Core.IntegerTypeUint8 -> (Core.IntegerTypeInt8, ((\v -> case v of+        Core.IntegerValueUint8 v1 -> Core.IntegerValueInt8 (Literals.bigintToInt8 (Literals.uint8ToBigint v1))+        _ -> v), (Sets.fromList [+        "replace unsigned 8-bit integers with signed 8-bit integers"])))+      Core.IntegerTypeUint32 -> (Core.IntegerTypeInt32, ((\v -> case v of+        Core.IntegerValueUint32 v1 -> Core.IntegerValueInt32 (Literals.bigintToInt32 (Literals.uint32ToBigint v1))+        _ -> v), (Sets.fromList [+        "replace unsigned 32-bit integers with signed 32-bit integers"])))+      Core.IntegerTypeUint64 -> (Core.IntegerTypeInt64, ((\v -> case v of+        Core.IntegerValueUint64 v1 -> Core.IntegerValueInt64 (Literals.bigintToInt64 (Literals.uint64ToBigint v1))+        _ -> v), (Sets.fromList [+        "replace unsigned 64-bit integers with signed 64-bit integers"])))+      _ -> prepareSame it++-- | Prepare a literal type, substituting unsupported types+prepareLiteralType :: Core.LiteralType -> (Core.LiteralType, ((Core.Literal -> Core.Literal), (S.Set String)))+prepareLiteralType at =+    case at of+      Core.LiteralTypeBinary -> (Core.LiteralTypeString, ((\v -> case v of+        Core.LiteralBinary v1 -> Core.LiteralString (Literals.binaryToString v1)+        _ -> v), (Sets.fromList [+        "replace binary strings with character strings"])))+      Core.LiteralTypeFloat v0 ->+        let result = prepareFloatType v0+            rtyp = Pairs.first result+            rep = Pairs.first (Pairs.second result)+            msgs = Pairs.second (Pairs.second result)+        in (Core.LiteralTypeFloat rtyp, ((\v -> case v of+          Core.LiteralFloat v1 -> Core.LiteralFloat (rep v1)+          _ -> v), msgs))+      Core.LiteralTypeInteger v0 ->+        let result = prepareIntegerType v0+            rtyp = Pairs.first result+            rep = Pairs.first (Pairs.second result)+            msgs = Pairs.second (Pairs.second result)+        in (Core.LiteralTypeInteger rtyp, ((\v -> case v of+          Core.LiteralInteger v1 -> Core.LiteralInteger (rep v1)+          _ -> v), msgs))+      _ -> prepareSame at++-- | Return a value unchanged with identity transform and no messages+prepareSame :: Ord t2 => (t0 -> (t0, ((t1 -> t1), (S.Set t2))))+prepareSame x = (x, ((\y -> y), Sets.empty))++-- | Prepare a type, substituting unsupported literal types+prepareType :: t0 -> Core.Type -> (Core.Type, ((Core.Term -> Core.Term), (S.Set String)))+prepareType cx typ =+    case (Rewriting.deannotateType typ) of+      Core.TypeLiteral v0 ->+        let result = prepareLiteralType v0+            rtyp = Pairs.first result+            rep = Pairs.first (Pairs.second result)+            msgs = Pairs.second (Pairs.second result)+        in (Core.TypeLiteral rtyp, ((\v -> case v of+          Core.TermLiteral v1 -> Core.TermLiteral (rep v1)+          _ -> v), msgs))+      _ -> prepareSame typ++-- | Normalize a term by pushing TermTypeApplication inward past TermApplication and TermFunction (Lambda). This corrects structures produced by poly-let hoisting and eta expansion, where type applications from inference end up wrapping term applications or lambda abstractions instead of being directly on the polymorphic variable.+pushTypeAppsInward :: Core.Term -> Core.Term+pushTypeAppsInward term =++      let push =+              \body -> \typ -> case body of+                Core.TermApplication v0 -> go (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {+                    Core.typeApplicationTermBody = (Core.applicationFunction v0),+                    Core.typeApplicationTermType = typ})),+                  Core.applicationArgument = (Core.applicationArgument v0)}))+                Core.TermFunction v0 -> case v0 of+                  Core.FunctionLambda v1 -> go (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.lambdaParameter v1),+                    Core.lambdaDomain = (Core.lambdaDomain v1),+                    Core.lambdaBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {+                      Core.typeApplicationTermBody = (Core.lambdaBody v1),+                      Core.typeApplicationTermType = typ}))})))+                  _ -> Core.TermTypeApplication (Core.TypeApplicationTerm {+                    Core.typeApplicationTermBody = (Core.TermFunction v0),+                    Core.typeApplicationTermType = typ})+                Core.TermLet v0 -> go (Core.TermLet (Core.Let {+                  Core.letBindings = (Core.letBindings v0),+                  Core.letBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {+                    Core.typeApplicationTermBody = (Core.letBody v0),+                    Core.typeApplicationTermType = typ}))}))+                _ -> Core.TermTypeApplication (Core.TypeApplicationTerm {+                  Core.typeApplicationTermBody = body,+                  Core.typeApplicationTermType = typ})+          go =+                  \t ->+                    let forField =+                            \fld -> Core.Field {+                              Core.fieldName = (Core.fieldName fld),+                              Core.fieldTerm = (go (Core.fieldTerm fld))}+                        forElimination =+                                \elm -> case elm of+                                  Core.EliminationRecord v0 -> Core.EliminationRecord v0+                                  Core.EliminationUnion v0 -> Core.EliminationUnion (Core.CaseStatement {+                                    Core.caseStatementTypeName = (Core.caseStatementTypeName v0),+                                    Core.caseStatementDefault = (Maybes.map go (Core.caseStatementDefault v0)),+                                    Core.caseStatementCases = (Lists.map forField (Core.caseStatementCases v0))})+                                  Core.EliminationWrap v0 -> Core.EliminationWrap v0+                        forFunction =+                                \fun -> case fun of+                                  Core.FunctionElimination v0 -> Core.FunctionElimination (forElimination v0)+                                  Core.FunctionLambda v0 -> Core.FunctionLambda (Core.Lambda {+                                    Core.lambdaParameter = (Core.lambdaParameter v0),+                                    Core.lambdaDomain = (Core.lambdaDomain v0),+                                    Core.lambdaBody = (go (Core.lambdaBody v0))})+                                  Core.FunctionPrimitive v0 -> Core.FunctionPrimitive v0+                        forLet =+                                \lt ->+                                  let mapBinding =+                                          \b -> Core.Binding {+                                            Core.bindingName = (Core.bindingName b),+                                            Core.bindingTerm = (go (Core.bindingTerm b)),+                                            Core.bindingType = (Core.bindingType b)}+                                  in Core.Let {+                                    Core.letBindings = (Lists.map mapBinding (Core.letBindings lt)),+                                    Core.letBody = (go (Core.letBody lt))}+                        forMap =+                                \m ->+                                  let forPair = \p -> (go (Pairs.first p), (go (Pairs.second p)))+                                  in (Maps.fromList (Lists.map forPair (Maps.toList m)))+                    in case t of+                      Core.TermAnnotated v0 -> Core.TermAnnotated (Core.AnnotatedTerm {+                        Core.annotatedTermBody = (go (Core.annotatedTermBody v0)),+                        Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v0)})+                      Core.TermApplication v0 -> Core.TermApplication (Core.Application {+                        Core.applicationFunction = (go (Core.applicationFunction v0)),+                        Core.applicationArgument = (go (Core.applicationArgument v0))})+                      Core.TermEither v0 -> Core.TermEither (Eithers.either (\l -> Left (go l)) (\r -> Right (go r)) v0)+                      Core.TermFunction v0 -> Core.TermFunction (forFunction v0)+                      Core.TermLet v0 -> Core.TermLet (forLet v0)+                      Core.TermList v0 -> Core.TermList (Lists.map go v0)+                      Core.TermLiteral v0 -> Core.TermLiteral v0+                      Core.TermMap v0 -> Core.TermMap (forMap v0)+                      Core.TermMaybe v0 -> Core.TermMaybe (Maybes.map go v0)+                      Core.TermPair v0 -> Core.TermPair (go (Pairs.first v0), (go (Pairs.second v0)))+                      Core.TermRecord v0 -> Core.TermRecord (Core.Record {+                        Core.recordTypeName = (Core.recordTypeName v0),+                        Core.recordFields = (Lists.map forField (Core.recordFields v0))})+                      Core.TermSet v0 -> Core.TermSet (Sets.fromList (Lists.map go (Sets.toList v0)))+                      Core.TermTypeApplication v0 ->+                        let body1 = go (Core.typeApplicationTermBody v0)+                        in (push body1 (Core.typeApplicationTermType v0))+                      Core.TermTypeLambda v0 -> Core.TermTypeLambda (Core.TypeLambda {+                        Core.typeLambdaParameter = (Core.typeLambdaParameter v0),+                        Core.typeLambdaBody = (go (Core.typeLambdaBody v0))})+                      Core.TermUnion v0 -> Core.TermUnion (Core.Injection {+                        Core.injectionTypeName = (Core.injectionTypeName v0),+                        Core.injectionField = (forField (Core.injectionField v0))})+                      Core.TermUnit -> Core.TermUnit+                      Core.TermVariable v0 -> Core.TermVariable v0+                      Core.TermWrap v0 -> Core.TermWrap (Core.WrappedTerm {+                        Core.wrappedTermTypeName = (Core.wrappedTermTypeName v0),+                        Core.wrappedTermBody = (go (Core.wrappedTermBody v0))})+      in (go term)++-- | Given a schema graph along with language constraints and a designated list of element names, adapt the graph to the language constraints, then return a corresponding type definition for each element name.+schemaGraphToDefinitions :: Coders.LanguageConstraints -> Graph.Graph -> [[Core.Name]] -> Context.Context -> Either String (M.Map Core.Name Core.Type, [[Module.TypeDefinition]])+schemaGraphToDefinitions constraints graph nameLists cx =++      let litmap = adaptLiteralTypesMap constraints+      in (Eithers.bind (Eithers.bimap (\ic -> Errors.unDecodingError (Context.inContextObject ic)) (\x -> x) (Schemas.graphAsTypes cx graph (Lexical.graphToBindings graph))) (\tmap0 -> Eithers.bind (adaptGraphSchema constraints litmap tmap0) (\tmap1 ->+        let toDef =+                \pair -> Module.TypeDefinition {+                  Module.typeDefinitionName = (Pairs.first pair),+                  Module.typeDefinitionType = (Pairs.second pair)}+        in (Right (tmap1, (Lists.map (\names -> Lists.map toDef (Lists.map (\n -> (n, (Maybes.fromJust (Maps.lookup n tmap1)))) names)) nameLists))))))++-- | Given a target language and a source type, produce an adapter which rewrites the type and its terms according to the language's constraints. The encode direction adapts terms; the decode direction is identity.+simpleLanguageAdapter :: Coders.Language -> t0 -> Graph.Graph -> Core.Type -> Either String (Util.Adapter Core.Type Core.Type Core.Term Core.Term)+simpleLanguageAdapter lang cx g typ =++      let constraints = Coders.languageConstraints lang+          litmap = adaptLiteralTypesMap constraints+      in (Eithers.bind (adaptType constraints litmap typ) (\adaptedType -> Right (Util.Adapter {+        Util.adapterIsLossy = False,+        Util.adapterSource = typ,+        Util.adapterTarget = adaptedType,+        Util.adapterCoder = Util.Coder {+          Util.coderEncode = (\cx -> \term -> Eithers.bimap (\_s -> Context.InContext {+            Context.inContextObject = (Errors.ErrorOther (Errors.OtherError _s)),+            Context.inContextContext = cx}) (\_x -> _x) (adaptTerm constraints litmap cx g term)),+          Util.coderDecode = (\cx -> \term -> Right term)}})))++-- | Find a list of alternatives for a given term, if any+termAlternatives :: Context.Context -> Graph.Graph -> Core.Term -> Either String [Core.Term]+termAlternatives cx graph term =+    case term of+      Core.TermAnnotated v0 ->+        let term2 = Core.annotatedTermBody v0+        in (Right [+          term2])+      Core.TermMaybe v0 -> Right [+        Core.TermList (Maybes.maybe [] (\term2 -> [+          term2]) v0)]+      Core.TermTypeLambda v0 ->+        let term2 = Core.typeLambdaBody v0+        in (Right [+          term2])+      Core.TermTypeApplication v0 ->+        let term2 = Core.typeApplicationTermBody v0+        in (Right [+          term2])+      Core.TermUnion v0 ->+        let tname = Core.injectionTypeName v0+            field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            forFieldType =+                    \ft ->+                      let ftname = Core.fieldTypeName ft+                      in Core.Field {+                        Core.fieldName = fname,+                        Core.fieldTerm = (Core.TermMaybe (Logic.ifElse (Equality.equal ftname fname) (Just fterm) Nothing))}+        in (Eithers.bind (Eithers.bimap (\ic -> Errors_.error (Context.inContextObject ic)) (\x -> x) (Schemas.requireUnionType cx graph tname)) (\rt -> Right [+          Core.TermRecord (Core.Record {+            Core.recordTypeName = tname,+            Core.recordFields = (Lists.map forFieldType rt)})]))+      Core.TermUnit -> Right [+        Core.TermLiteral (Core.LiteralBoolean True)]+      Core.TermWrap v0 ->+        let term2 = Core.wrappedTermBody v0+        in (Right [+          term2])+      _ -> Right []++-- | Find a list of alternatives for a given type, if any+typeAlternatives :: Core.Type -> [Core.Type]+typeAlternatives type_ =+    case type_ of+      Core.TypeAnnotated v0 ->+        let type2 = Core.annotatedTypeBody v0+        in [+          type2]+      Core.TypeMaybe v0 -> [+        Core.TypeList v0]+      Core.TypeUnion v0 ->+        let toOptField =+                \f -> Core.FieldType {+                  Core.fieldTypeName = (Core.fieldTypeName f),+                  Core.fieldTypeType = (Core.TypeMaybe (Core.fieldTypeType f))}+            optFields = Lists.map toOptField v0+        in [+          Core.TypeRecord optFields]+      Core.TypeUnit -> [+        Core.TypeLiteral Core.LiteralTypeBoolean]+      Core.TypeVoid -> [+        Core.TypeUnit]+      _ -> []
− src/gen-main/haskell/Hydra/Adapt/Literals.hs
@@ -1,296 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Adapter framework for literal types and terms--module Hydra.Adapt.Literals where--import qualified Hydra.Adapt.Utils as Utils-import qualified Hydra.Coders as Coders-import qualified Hydra.Compute as Compute-import qualified Hydra.Core as Core-import qualified Hydra.Extract.Core as Core_-import qualified Hydra.Lib.Equality as Equality-import qualified Hydra.Lib.Flows as Flows-import qualified Hydra.Lib.Lists as Lists-import qualified Hydra.Lib.Literals as Literals-import qualified Hydra.Lib.Logic as Logic-import qualified Hydra.Lib.Math as Math-import qualified Hydra.Lib.Sets as Sets-import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Monads as Monads-import qualified Hydra.Reflect as Reflect-import qualified Hydra.Show.Core as Core__-import qualified Hydra.Util as Util-import qualified Hydra.Variants as Variants-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S---- | Compare two precision values-comparePrecision :: (Util.Precision -> Util.Precision -> Util.Comparison)-comparePrecision p1 p2 = ((\x -> case x of-  Util.PrecisionArbitrary -> ((\x -> case x of-    Util.PrecisionArbitrary -> Util.ComparisonEqualTo-    Util.PrecisionBits _ -> Util.ComparisonGreaterThan) p2)-  Util.PrecisionBits v1 -> ((\x -> case x of-    Util.PrecisionArbitrary -> Util.ComparisonLessThan-    Util.PrecisionBits v2 -> (Logic.ifElse (Equality.lt v1 v2) Util.ComparisonLessThan Util.ComparisonGreaterThan)) p2)) p1)---- | Convert a float value to a different float type-convertFloatValue :: (Core.FloatType -> Core.FloatValue -> Core.FloatValue)-convertFloatValue target fv =  -  let decoder = (\fv -> (\x -> case x of-          Core.FloatValueBigfloat v1 -> v1-          Core.FloatValueFloat32 v1 -> (Literals.float32ToBigfloat v1)-          Core.FloatValueFloat64 v1 -> (Literals.float64ToBigfloat v1)) fv)-  in  -    let encoder = (\d -> (\x -> case x of-            Core.FloatTypeBigfloat -> (Core.FloatValueBigfloat d)-            Core.FloatTypeFloat32 -> (Core.FloatValueFloat32 (Literals.bigfloatToFloat32 d))-            Core.FloatTypeFloat64 -> (Core.FloatValueFloat64 (Literals.bigfloatToFloat64 d))) target)-    in (encoder (decoder fv))---- | Convert an integer value to a different integer type-convertIntegerValue :: (Core.IntegerType -> Core.IntegerValue -> Core.IntegerValue)-convertIntegerValue target iv =  -  let decoder = (\iv -> (\x -> case x of-          Core.IntegerValueBigint v1 -> v1-          Core.IntegerValueInt8 v1 -> (Literals.int8ToBigint v1)-          Core.IntegerValueInt16 v1 -> (Literals.int16ToBigint v1)-          Core.IntegerValueInt32 v1 -> (Literals.int32ToBigint v1)-          Core.IntegerValueInt64 v1 -> (Literals.int64ToBigint v1)-          Core.IntegerValueUint8 v1 -> (Literals.uint8ToBigint v1)-          Core.IntegerValueUint16 v1 -> (Literals.uint16ToBigint v1)-          Core.IntegerValueUint32 v1 -> (Literals.uint32ToBigint v1)-          Core.IntegerValueUint64 v1 -> (Literals.uint64ToBigint v1)) iv)-  in  -    let encoder = (\d -> (\x -> case x of-            Core.IntegerTypeBigint -> (Core.IntegerValueBigint d)-            Core.IntegerTypeInt8 -> (Core.IntegerValueInt8 (Literals.bigintToInt8 d))-            Core.IntegerTypeInt16 -> (Core.IntegerValueInt16 (Literals.bigintToInt16 d))-            Core.IntegerTypeInt32 -> (Core.IntegerValueInt32 (Literals.bigintToInt32 d))-            Core.IntegerTypeInt64 -> (Core.IntegerValueInt64 (Literals.bigintToInt64 d))-            Core.IntegerTypeUint8 -> (Core.IntegerValueUint8 (Literals.bigintToUint8 d))-            Core.IntegerTypeUint16 -> (Core.IntegerValueUint16 (Literals.bigintToUint16 d))-            Core.IntegerTypeUint32 -> (Core.IntegerValueUint32 (Literals.bigintToUint32 d))-            Core.IntegerTypeUint64 -> (Core.IntegerValueUint64 (Literals.bigintToUint64 d))) target)-    in (encoder (decoder iv))---- | Generate a disclaimer message for type conversions-disclaimer :: (Bool -> String -> String -> String)-disclaimer lossy source target = (Strings.cat [-  "replace ",-  source,-  " with ",-  target,-  (Logic.ifElse lossy " (lossy)" "")])---- | Create an adapter for literal types-literalAdapter :: (Core.LiteralType -> Compute.Flow Coders.AdapterContext (Compute.Adapter t0 t0 Core.LiteralType Core.LiteralType Core.Literal Core.Literal))-literalAdapter lt =  -  let forBinary = (\t ->  -          let matchBinary = (\lit -> (\x -> case x of-                  Core.LiteralBinary v1 -> (Flows.pure (Core.LiteralString (Literals.binaryToString v1)))) lit)-          in  -            let matchString = (\lit -> (\x -> case x of-                    Core.LiteralString v1 -> (Flows.pure (Core.LiteralBinary (Literals.stringToBinary v1)))) lit)-            in  -              let step = Compute.Coder {-                      Compute.coderEncode = matchBinary,-                      Compute.coderDecode = matchString}-              in (Flows.pure [-                Compute.Adapter {-                  Compute.adapterIsLossy = False,-                  Compute.adapterSource = t,-                  Compute.adapterTarget = Core.LiteralTypeString,-                  Compute.adapterCoder = step}]))-  in  -    let forBoolean = (\t ->  -            let matchBoolean = (\step_ -> \lit -> (\x -> case x of-                    Core.LiteralBoolean v1 -> (Flows.bind (Compute.coderEncode step_ (Core.IntegerValueUint8 (Logic.ifElse v1 1 0))) (\iv -> Flows.pure (Core.LiteralInteger iv)))) lit)-            in  -              let matchInteger = (\step_ -> \lit ->  -                      let forValue = (\val -> (\x -> case x of-                              Core.IntegerValueUint8 v1 -> (Core.LiteralBoolean (Equality.equal v1 1))) val)-                      in ((\x -> case x of-                        Core.LiteralInteger v1 -> (Flows.bind (Compute.coderDecode step_ v1) (\val -> Flows.pure (forValue val)))) lit))-              in (Flows.bind Monads.getState (\cx ->  -                let constraints = (Coders.languageConstraints (Coders.adapterContextLanguage cx))-                in  -                  let hasIntegers = (Logic.not (Sets.null (Coders.languageConstraintsIntegerTypes constraints)))-                  in  -                    let hasStrings = (Sets.member Variants.LiteralVariantString (Coders.languageConstraintsLiteralVariants constraints))-                    in  -                      let withIntegers =  -                              let withAdapter = (\adapter ->  -                                      let step_ = (Compute.adapterCoder adapter)-                                      in  -                                        let step = Compute.Coder {-                                                Compute.coderEncode = (matchBoolean step_),-                                                Compute.coderDecode = (matchInteger step_)}-                                        in (Flows.pure [-                                          Compute.Adapter {-                                            Compute.adapterIsLossy = False,-                                            Compute.adapterSource = t,-                                            Compute.adapterTarget = (Core.LiteralTypeInteger (Compute.adapterTarget adapter)),-                                            Compute.adapterCoder = step}]))-                              in (Flows.bind (integerAdapter Core.IntegerTypeUint8) (\adapter -> withAdapter adapter))-                      in  -                        let withStrings =  -                                let encode = (\lit -> Flows.bind (Core_.booleanLiteral lit) (\b -> Flows.pure (Core.LiteralString (Logic.ifElse b "true" "false"))))-                                in  -                                  let decode = (\lit -> Flows.bind (Core_.stringLiteral lit) (\s -> Logic.ifElse (Equality.equal s "true") (Flows.pure (Core.LiteralBoolean True)) (Logic.ifElse (Equality.equal s "false") (Flows.pure (Core.LiteralBoolean False)) (Monads.unexpected "boolean literal" s))))-                                  in [-                                    Compute.Adapter {-                                      Compute.adapterIsLossy = False,-                                      Compute.adapterSource = t,-                                      Compute.adapterTarget = Core.LiteralTypeString,-                                      Compute.adapterCoder = Compute.Coder {-                                        Compute.coderEncode = encode,-                                        Compute.coderDecode = decode}}]-                        in (Logic.ifElse hasIntegers withIntegers (Logic.ifElse hasStrings (Flows.pure withStrings) (Flows.fail "no alternatives available for boolean encoding"))))))-    in  -      let forFloat = (\t -> \ft ->  -              let withFloats =  -                      let adapt = (\adapter -> \dir -> \l -> (\x -> case x of-                              Core.LiteralFloat v1 -> (Flows.map (\x -> Core.LiteralFloat x) (Utils.encodeDecode dir (Compute.adapterCoder adapter) v1))-                              _ -> (Monads.unexpected "floating-point literal" (Core__.literal l))) l)-                      in (Flows.bind (floatAdapter ft) (\adapter ->  -                        let step = (Utils.bidirectional (adapt adapter))-                        in (Flows.pure [-                          Compute.Adapter {-                            Compute.adapterIsLossy = (Compute.adapterIsLossy adapter),-                            Compute.adapterSource = t,-                            Compute.adapterTarget = (Core.LiteralTypeFloat (Compute.adapterTarget adapter)),-                            Compute.adapterCoder = step}])))-              in (Flows.bind Monads.getState (\cx ->  -                let constraints = (Coders.languageConstraints (Coders.adapterContextLanguage cx))-                in  -                  let hasFloats = (Logic.not (Sets.null (Coders.languageConstraintsFloatTypes constraints)))-                  in (Logic.ifElse hasFloats withFloats (Flows.fail "no float types available")))))-      in  -        let forInteger = (\t -> \it ->  -                let withIntegers =  -                        let adapt = (\adapter -> \dir -> \lit -> (\x -> case x of-                                Core.LiteralInteger v1 -> (Flows.map (\x -> Core.LiteralInteger x) (Utils.encodeDecode dir (Compute.adapterCoder adapter) v1))-                                _ -> (Monads.unexpected "integer literal" (Core__.literal lit))) lit)-                        in (Flows.bind (integerAdapter it) (\adapter ->  -                          let step = (Utils.bidirectional (adapt adapter))-                          in (Flows.pure [-                            Compute.Adapter {-                              Compute.adapterIsLossy = (Compute.adapterIsLossy adapter),-                              Compute.adapterSource = t,-                              Compute.adapterTarget = (Core.LiteralTypeInteger (Compute.adapterTarget adapter)),-                              Compute.adapterCoder = step}])))-                in (Flows.bind Monads.getState (\cx ->  -                  let constraints = (Coders.languageConstraints (Coders.adapterContextLanguage cx))-                  in  -                    let hasIntegers = (Logic.not (Sets.null (Coders.languageConstraintsIntegerTypes constraints)))-                    in (Logic.ifElse hasIntegers withIntegers (Flows.fail "no integer types available")))))-        in  -          let alts = (\t -> (\x -> case x of-                  Core.LiteralTypeBinary -> (forBinary t)-                  Core.LiteralTypeBoolean -> (forBoolean t)-                  Core.LiteralTypeFloat v1 -> (forFloat t v1)-                  Core.LiteralTypeInteger v1 -> (forInteger t v1)-                  Core.LiteralTypeString -> (Flows.fail "no substitute for the literal string type")) t)-          in (Flows.bind Monads.getState (\cx ->  -            let supported = (Utils.literalTypeIsSupported (Coders.languageConstraints (Coders.adapterContextLanguage cx)))-            in (Utils.chooseAdapter alts supported Core__.literalType Core__.literalType lt)))---- | Create an adapter for float types-floatAdapter :: (Core.FloatType -> Compute.Flow Coders.AdapterContext (Compute.Adapter t0 t1 Core.FloatType Core.FloatType Core.FloatValue Core.FloatValue))-floatAdapter ft =  -  let makeAdapter = (\source -> \target ->  -          let lossy = (Equality.equal (comparePrecision (Reflect.floatTypePrecision source) (Reflect.floatTypePrecision target)) Util.ComparisonGreaterThan)-          in  -            let step = Compute.Coder {-                    Compute.coderEncode = (\fv -> Flows.pure (convertFloatValue target fv)),-                    Compute.coderDecode = (\fv -> Flows.pure (convertFloatValue source fv))}-            in  -              let msg = (disclaimer lossy (Core__.floatType source) (Core__.floatType target))-              in (Monads.warn msg (Flows.pure (Compute.Adapter {-                Compute.adapterIsLossy = lossy,-                Compute.adapterSource = source,-                Compute.adapterTarget = target,-                Compute.adapterCoder = step}))))-  in  -    let altTypes = (\t -> (\x -> case x of-            Core.FloatTypeBigfloat -> [-              Core.FloatTypeFloat64,-              Core.FloatTypeFloat32]-            Core.FloatTypeFloat32 -> [-              Core.FloatTypeFloat64,-              Core.FloatTypeBigfloat]-            Core.FloatTypeFloat64 -> [-              Core.FloatTypeBigfloat,-              Core.FloatTypeFloat32]) t)-    in  -      let alts = (\t -> Flows.mapList (makeAdapter t) (altTypes t))-      in (Flows.bind Monads.getState (\cx ->  -        let supported = (Utils.floatTypeIsSupported (Coders.languageConstraints (Coders.adapterContextLanguage cx)))-        in (Utils.chooseAdapter alts supported Core__.floatType Core__.floatType ft)))---- | Create an adapter for integer types-integerAdapter :: (Core.IntegerType -> Compute.Flow Coders.AdapterContext (Compute.Adapter t0 t1 Core.IntegerType Core.IntegerType Core.IntegerValue Core.IntegerValue))-integerAdapter it =  -  let interleave = (\xs -> \ys -> Lists.concat (Lists.transpose [-          xs,-          ys]))-  in  -    let signedOrdered = (Lists.filter (\v -> Logic.and (Reflect.integerTypeIsSigned v) (Logic.not (Equality.equal (Reflect.integerTypePrecision v) Util.PrecisionArbitrary))) Reflect.integerTypes)-    in  -      let unsignedOrdered = (Lists.filter (\v -> Logic.and (Logic.not (Reflect.integerTypeIsSigned v)) (Logic.not (Equality.equal (Reflect.integerTypePrecision v) Util.PrecisionArbitrary))) Reflect.integerTypes)-      in  -        let signedPref = (interleave signedOrdered unsignedOrdered)-        in  -          let unsignedPref = (interleave unsignedOrdered signedOrdered)-          in  -            let signedNonPref = (Lists.reverse unsignedPref)-            in  -              let unsignedNonPref = (Lists.reverse signedPref)-              in  -                let signed = (\i -> Lists.concat [-                        Lists.drop (Math.mul i 2) signedPref,-                        [-                          Core.IntegerTypeBigint],-                        (Lists.drop (Math.add (Math.sub 8 (Math.mul i 2)) 1) signedNonPref)])-                in  -                  let unsigned = (\i -> Lists.concat [-                          Lists.drop (Math.mul i 2) unsignedPref,-                          [-                            Core.IntegerTypeBigint],-                          (Lists.drop (Math.add (Math.sub 8 (Math.mul i 2)) 1) unsignedNonPref)])-                  in  -                    let makeAdapter = (\source -> \target ->  -                            let lossy = (Logic.not (Equality.equal (comparePrecision (Reflect.integerTypePrecision source) (Reflect.integerTypePrecision target)) Util.ComparisonLessThan))-                            in  -                              let step = Compute.Coder {-                                      Compute.coderEncode = (\iv -> Flows.pure (convertIntegerValue target iv)),-                                      Compute.coderDecode = (\iv -> Flows.pure (convertIntegerValue source iv))}-                              in  -                                let msg = (disclaimer lossy (Core__.integerType source) (Core__.integerType target))-                                in (Monads.warn msg (Flows.pure (Compute.Adapter {-                                  Compute.adapterIsLossy = lossy,-                                  Compute.adapterSource = source,-                                  Compute.adapterTarget = target,-                                  Compute.adapterCoder = step}))))-                    in  -                      let altTypes = (\t -> (\x -> case x of-                              Core.IntegerTypeBigint -> (Lists.reverse unsignedPref)-                              Core.IntegerTypeInt8 -> (signed 1)-                              Core.IntegerTypeInt16 -> (signed 2)-                              Core.IntegerTypeInt32 -> (signed 3)-                              Core.IntegerTypeInt64 -> (signed 4)-                              Core.IntegerTypeUint8 -> (unsigned 1)-                              Core.IntegerTypeUint16 -> (unsigned 2)-                              Core.IntegerTypeUint32 -> (unsigned 3)-                              Core.IntegerTypeUint64 -> (unsigned 4)) t)-                      in  -                        let alts = (\t -> Flows.mapList (makeAdapter t) (altTypes t))-                        in (Flows.bind Monads.getState (\cx ->  -                          let supported = (Utils.integerTypeIsSupported (Coders.languageConstraints (Coders.adapterContextLanguage cx)))-                          in (Utils.chooseAdapter alts supported Core__.integerType Core__.integerType it)))
− src/gen-main/haskell/Hydra/Adapt/Modules.hs
@@ -1,115 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Entry point for Hydra's adapter (type/term rewriting) framework--module Hydra.Adapt.Modules where--import qualified Hydra.Adapt.Terms as Terms-import qualified Hydra.Adapt.Utils as Utils-import qualified Hydra.Annotations as Annotations-import qualified Hydra.Coders as Coders-import qualified Hydra.Compute as Compute-import qualified Hydra.Core as Core-import qualified Hydra.Decode.Core as Core_-import qualified Hydra.Graph as Graph-import qualified Hydra.Lexical as Lexical-import qualified Hydra.Lib.Flows as Flows-import qualified Hydra.Lib.Lists as Lists-import qualified Hydra.Lib.Logic as Logic-import qualified Hydra.Lib.Maps as Maps-import qualified Hydra.Lib.Maybes as Maybes-import qualified Hydra.Lib.Pairs as Pairs-import qualified Hydra.Lib.Sets as Sets-import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Module as Module-import qualified Hydra.Monads as Monads-import qualified Hydra.Rewriting as Rewriting-import qualified Hydra.Schemas as Schemas-import qualified Hydra.Show.Core as Core__-import qualified Hydra.Util as Util-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S---- | Given a target language, an encoding function, and a type, adapt and encode the type-adaptTypeToLanguageAndEncode :: (Coders.Language -> (Core.Type -> Compute.Flow Graph.Graph t0) -> Core.Type -> Compute.Flow Graph.Graph t0)-adaptTypeToLanguageAndEncode lang enc typ =  -  let dflt = (Flows.bind (adaptTypeToLanguage lang typ) (\adaptedType -> enc adaptedType))-  in ((\x -> case x of-    Core.TypeVariable _ -> (enc typ)-    _ -> dflt) (Rewriting.deannotateType typ))---- | Given a target language and a source type, find the target type to which the latter will be adapted-adaptTypeToLanguage :: (Coders.Language -> Core.Type -> Compute.Flow Graph.Graph Core.Type)-adaptTypeToLanguage lang typ = (Flows.bind (languageAdapter lang typ) (\adapter -> Flows.pure (Compute.adapterTarget adapter)))---- | Map a Hydra module to a list of type and/or term definitions which have been adapted to the target language-adaptedModuleDefinitions :: (Coders.Language -> Module.Module -> Compute.Flow Graph.Graph [Module.Definition])-adaptedModuleDefinitions lang mod = (Flows.bind Monads.getState (\cx ->  -  let els = (Module.moduleElements mod)-  in  -    let adaptersFor = (\types -> Flows.bind (Flows.mapList (languageAdapter lang) types) (\adapters -> Flows.pure (Maps.fromList (Lists.zip types adapters))))-    in  -      let classify = (\adapters -> \pair ->  -              let el = (Pairs.first pair)-              in  -                let tt = (Pairs.second pair)-                in  -                  let term = (Core.typeApplicationTermBody tt)-                  in  -                    let typ = (Core.typeApplicationTermType tt)-                    in  -                      let name = (Core.bindingName el)-                      in (Logic.ifElse (Annotations.isNativeType el) (Flows.bind (Flows.bind (Monads.withTrace "adapt module definitions" (Monads.eitherToFlow Util.unDecodingError (Core_.type_ cx term))) (\coreTyp -> adaptTypeToLanguage lang coreTyp)) (\adaptedTyp -> Flows.pure (Module.DefinitionType (Module.TypeDefinition {-                        Module.typeDefinitionName = name,-                        Module.typeDefinitionType = adaptedTyp})))) (Maybes.maybe (Flows.fail (Strings.cat2 "no adapter for element " (Core.unName name))) (\adapter -> Flows.bind (Compute.coderEncode (Compute.adapterCoder adapter) term) (\adapted -> Flows.pure (Module.DefinitionTerm (Module.TermDefinition {-                        Module.termDefinitionName = name,-                        Module.termDefinitionTerm = adapted,-                        Module.termDefinitionType = (Schemas.typeToTypeScheme (Compute.adapterTarget adapter))})))) (Maps.lookup typ adapters))))-      in (Flows.bind (Lexical.withSchemaContext (Flows.mapList Schemas.elementAsTypeApplicationTerm els)) (\tterms ->  -        let types = (Sets.toList (Sets.fromList (Lists.map (\arg_ -> Rewriting.deannotateType (Core.typeApplicationTermType arg_)) tterms)))-        in (Flows.bind (adaptersFor types) (\adapters -> Flows.mapList (classify adapters) (Lists.zip els tterms)))))))---- | Given a target language, a unidirectional last-mile encoding, and a source type, construct a unidirectional adapting coder for terms of that type-constructCoder :: (Coders.Language -> (Core.Term -> Compute.Flow t0 t1) -> Core.Type -> Compute.Flow Graph.Graph (Compute.Coder t0 t2 Core.Term t1))-constructCoder lang encodeTerm typ = (Monads.withTrace (Strings.cat2 "coder for " (Core__.type_ typ)) (Flows.bind (languageAdapter lang typ) (\adapter -> Flows.pure (Utils.composeCoders (Compute.adapterCoder adapter) (Utils.unidirectionalCoder encodeTerm)))))---- | Given a target language and a source type, produce an adapter, which rewrites the type and its terms according to the language's constraints-languageAdapter :: (Coders.Language -> Core.Type -> Compute.Flow Graph.Graph (Compute.Adapter t0 t1 Core.Type Core.Type Core.Term Core.Term))-languageAdapter lang typ =  -  let getPair = (\typ -> Flows.bind (Terms.termAdapter typ) (\ad -> Flows.bind Monads.getState (\cx -> Flows.pure (ad, cx))))-  in (Flows.bind Monads.getState (\g ->  -    let cx0 = Coders.AdapterContext {-            Coders.adapterContextGraph = g,-            Coders.adapterContextLanguage = lang,-            Coders.adapterContextAdapters = Maps.empty}-    in (Flows.bind (Monads.withState cx0 (getPair typ)) (\result ->  -      let adapter = (Pairs.first result)-      in  -        let cx = (Pairs.second result)-        in  -          let encode = (\term -> Monads.withState cx (Compute.coderEncode (Compute.adapterCoder adapter) term))-          in  -            let decode = (\term -> Monads.withState cx (Compute.coderDecode (Compute.adapterCoder adapter) term))-            in (Flows.pure (Compute.Adapter {-              Compute.adapterIsLossy = (Compute.adapterIsLossy adapter),-              Compute.adapterSource = (Compute.adapterSource adapter),-              Compute.adapterTarget = (Compute.adapterTarget adapter),-              Compute.adapterCoder = Compute.Coder {-                Compute.coderEncode = encode,-                Compute.coderDecode = decode}}))))))---- | Given a target language, a unidirectional last mile encoding, and an intermediate helper function, transform a given module into a target representation-transformModule :: (Coders.Language -> (Core.Term -> Compute.Flow t0 t1) -> (Module.Module -> M.Map Core.Type (Compute.Coder t0 t2 Core.Term t1) -> [(Core.Binding, Core.TypeApplicationTerm)] -> Compute.Flow Graph.Graph t3) -> Module.Module -> Compute.Flow Graph.Graph t3)-transformModule lang encodeTerm createModule mod =  -  let els = (Module.moduleElements mod)-  in  -    let transform = (Flows.bind (Lexical.withSchemaContext (Flows.mapList Schemas.elementAsTypeApplicationTerm els)) (\tterms ->  -            let types = (Lists.nub (Lists.map Core.typeApplicationTermType tterms))-            in (Flows.bind (Flows.mapList (constructCoder lang encodeTerm) types) (\cdrs ->  -              let coders = (Maps.fromList (Lists.zip types cdrs))-              in (createModule mod coders (Lists.zip els tterms))))))-    in (Monads.withTrace (Strings.cat2 "transform module " (Module.unNamespace (Module.moduleNamespace mod))) transform)
− src/gen-main/haskell/Hydra/Adapt/Simple.hs
@@ -1,524 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Simple, one-way adapters for types and terms--module Hydra.Adapt.Simple where--import qualified Hydra.Coders as Coders-import qualified Hydra.Compute as Compute-import qualified Hydra.Core as Core-import qualified Hydra.Graph as Graph-import qualified Hydra.Hoisting as Hoisting-import qualified Hydra.Inference as Inference-import qualified Hydra.Lib.Eithers as Eithers-import qualified Hydra.Lib.Equality as Equality-import qualified Hydra.Lib.Flows as Flows-import qualified Hydra.Lib.Lists as Lists-import qualified Hydra.Lib.Literals as Literals-import qualified Hydra.Lib.Logic as Logic-import qualified Hydra.Lib.Maps as Maps-import qualified Hydra.Lib.Maybes as Maybes-import qualified Hydra.Lib.Pairs as Pairs-import qualified Hydra.Lib.Sets as Sets-import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Literals as Literals_-import qualified Hydra.Module as Module-import qualified Hydra.Names as Names-import qualified Hydra.Reduction as Reduction-import qualified Hydra.Reflect as Reflect-import qualified Hydra.Rewriting as Rewriting-import qualified Hydra.Schemas as Schemas-import qualified Hydra.Show.Core as Core_-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S---- | Attempt to adapt a floating-point type using the given language constraints-adaptFloatType :: (Coders.LanguageConstraints -> Core.FloatType -> Maybe Core.FloatType)-adaptFloatType constraints ft =  -  let supported = (Sets.member ft (Coders.languageConstraintsFloatTypes constraints))-  in  -    let alt = (adaptFloatType constraints)-    in  -      let forUnsupported = (\ft -> (\x -> case x of-              Core.FloatTypeBigfloat -> (alt Core.FloatTypeFloat64)-              Core.FloatTypeFloat32 -> (alt Core.FloatTypeFloat64)-              Core.FloatTypeFloat64 -> (alt Core.FloatTypeBigfloat)) ft)-      in (Logic.ifElse supported (Just ft) (forUnsupported ft))---- | Adapt a graph and its schema to the given language constraints. The doExpand flag controls eta expansion of partial applications. Adaptation is type-preserving: binding-level TypeSchemes are adapted (not stripped). Note: case statement hoisting is done separately, prior to adaptation.-adaptDataGraph :: (Coders.LanguageConstraints -> Bool -> Graph.Graph -> Compute.Flow Graph.Graph Graph.Graph)-adaptDataGraph constraints doExpand graph0 =  -  let transform = (\graph -> \gterm -> Flows.bind (Schemas.graphToTypeContext graph) (\tx ->  -          let gterm1 = (Rewriting.unshadowVariables (pushTypeAppsInward gterm))-          in  -            let gterm2 = (Rewriting.unshadowVariables (Logic.ifElse doExpand (pushTypeAppsInward (Reduction.etaExpandTermNew tx gterm1)) gterm1))-            in (Flows.pure (Rewriting.liftLambdaAboveLet gterm2))))-  in  -    let litmap = (adaptLiteralTypesMap constraints)-    in  -      let els0 = (Graph.graphElements graph0)-      in  -        let env0 = (Graph.graphEnvironment graph0)-        in  -          let body0 = (Graph.graphBody graph0)-          in  -            let prims0 = (Graph.graphPrimitives graph0)-            in  -              let schema0 = (Graph.graphSchema graph0)-              in (Flows.bind (Maybes.maybe (Flows.pure Nothing) (\sg -> Flows.bind (Schemas.graphAsTypes sg) (\tmap0 -> Flows.bind (adaptGraphSchema constraints litmap tmap0) (\tmap1 ->  -                let emap = (Schemas.typesToElements tmap1)-                in (Flows.pure (Just (Graph.Graph {-                  Graph.graphElements = emap,-                  Graph.graphEnvironment = (Graph.graphEnvironment sg),-                  Graph.graphTypes = (Graph.graphTypes sg),-                  Graph.graphBody = (Graph.graphBody sg),-                  Graph.graphPrimitives = (Graph.graphPrimitives sg),-                  Graph.graphSchema = (Graph.graphSchema sg)})))))) schema0) (\schema1 ->  -                let gterm0 = (Schemas.graphAsTerm graph0)-                in (Flows.bind (Logic.ifElse doExpand (transform graph0 gterm0) (Flows.pure gterm0)) (\gterm1 -> Flows.bind (adaptTerm constraints litmap gterm1) (\gterm2 -> Flows.bind (Rewriting.rewriteTermM (adaptLambdaDomains constraints litmap) gterm2) (\gterm3 ->  -                  let els1Raw = (Schemas.termAsGraph gterm3)-                  in  -                    let processBinding = (\el -> Flows.bind (Rewriting.rewriteTermM (adaptNestedTypes constraints litmap) (Core.bindingTerm el)) (\newTerm -> Flows.bind (Maybes.maybe (Flows.pure Nothing) (\ts -> Flows.bind (adaptTypeScheme constraints litmap ts) (\ts1 -> Flows.pure (Just ts1))) (Core.bindingType el)) (\adaptedType -> Flows.pure (Core.Binding {-                            Core.bindingName = (Core.bindingName el),-                            Core.bindingTerm = newTerm,-                            Core.bindingType = adaptedType}))))-                    in (Flows.bind (Flows.mapList processBinding els1Raw) (\els1 -> Flows.bind (Flows.mapElems (adaptPrimitive constraints litmap) prims0) (\prims1 -> Flows.pure (Graph.Graph {-                      Graph.graphElements = els1,-                      Graph.graphEnvironment = env0,-                      Graph.graphTypes = Maps.empty,-                      Graph.graphBody = Core.TermUnit,-                      Graph.graphPrimitives = prims1,-                      Graph.graphSchema = schema1}))))))))))---- | Adapt a schema graph to the given language constraints-adaptGraphSchema :: Ord t0 => (Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> M.Map t0 Core.Type -> Compute.Flow t1 (M.Map t0 Core.Type))-adaptGraphSchema constraints litmap types0 =  -  let mapPair = (\pair ->  -          let name = (Pairs.first pair)-          in  -            let typ = (Pairs.second pair)-            in (Flows.bind (adaptType constraints litmap typ) (\typ1 -> Flows.pure (name, typ1))))-  in (Flows.bind (Flows.mapList mapPair (Maps.toList types0)) (\pairs -> Flows.pure (Maps.fromList pairs)))---- | Attempt to adapt an integer type using the given language constraints-adaptIntegerType :: (Coders.LanguageConstraints -> Core.IntegerType -> Maybe Core.IntegerType)-adaptIntegerType constraints it =  -  let supported = (Sets.member it (Coders.languageConstraintsIntegerTypes constraints))-  in  -    let alt = (adaptIntegerType constraints)-    in  -      let forUnsupported = (\it -> (\x -> case x of-              Core.IntegerTypeBigint -> Nothing-              Core.IntegerTypeInt8 -> (alt Core.IntegerTypeUint16)-              Core.IntegerTypeInt16 -> (alt Core.IntegerTypeUint32)-              Core.IntegerTypeInt32 -> (alt Core.IntegerTypeUint64)-              Core.IntegerTypeInt64 -> (alt Core.IntegerTypeBigint)-              Core.IntegerTypeUint8 -> (alt Core.IntegerTypeInt16)-              Core.IntegerTypeUint16 -> (alt Core.IntegerTypeInt32)-              Core.IntegerTypeUint32 -> (alt Core.IntegerTypeInt64)-              Core.IntegerTypeUint64 -> (alt Core.IntegerTypeBigint)) it)-      in (Logic.ifElse supported (Just it) (forUnsupported it))---- | Rewrite callback for adapting lambda domain types in a term-adaptLambdaDomains :: (Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> (t0 -> Compute.Flow t1 Core.Term) -> t0 -> Compute.Flow t1 Core.Term)-adaptLambdaDomains constraints litmap recurse term = (Flows.bind (recurse term) (\rewritten -> (\x -> case x of-  Core.TermFunction v1 -> ((\x -> case x of-    Core.FunctionLambda v2 -> (Flows.bind (Maybes.maybe (Flows.pure Nothing) (\dom -> Flows.bind (adaptType constraints litmap dom) (\dom1 -> Flows.pure (Just dom1))) (Core.lambdaDomain v2)) (\adaptedDomain -> Flows.pure (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.lambdaParameter v2),-      Core.lambdaDomain = adaptedDomain,-      Core.lambdaBody = (Core.lambdaBody v2)})))))-    _ -> (Flows.pure (Core.TermFunction v1))) v1)-  _ -> (Flows.pure rewritten)) rewritten))---- | Convert a literal to a different type-adaptLiteral :: (Core.LiteralType -> Core.Literal -> Core.Literal)-adaptLiteral lt l = ((\x -> case x of-  Core.LiteralBinary v1 -> ((\x -> case x of-    Core.LiteralTypeString -> (Core.LiteralString (Literals.binaryToString v1))) lt)-  Core.LiteralBoolean v1 -> ((\x -> case x of-    Core.LiteralTypeInteger v2 -> (Core.LiteralInteger (Literals_.bigintToIntegerValue v2 (Logic.ifElse v1 1 0)))) lt)-  Core.LiteralFloat v1 -> ((\x -> case x of-    Core.LiteralTypeFloat v2 -> (Core.LiteralFloat (Literals_.bigfloatToFloatValue v2 (Literals_.floatValueToBigfloat v1)))) lt)-  Core.LiteralInteger v1 -> ((\x -> case x of-    Core.LiteralTypeInteger v2 -> (Core.LiteralInteger (Literals_.bigintToIntegerValue v2 (Literals_.integerValueToBigint v1)))) lt)) l)---- | Attempt to adapt a literal type using the given language constraints-adaptLiteralType :: (Coders.LanguageConstraints -> Core.LiteralType -> Maybe Core.LiteralType)-adaptLiteralType constraints lt =  -  let forUnsupported = (\lt -> (\x -> case x of-          Core.LiteralTypeBinary -> (Just Core.LiteralTypeString)-          Core.LiteralTypeBoolean -> (Maybes.map (\x -> Core.LiteralTypeInteger x) (adaptIntegerType constraints Core.IntegerTypeInt8))-          Core.LiteralTypeFloat v1 -> (Maybes.map (\x -> Core.LiteralTypeFloat x) (adaptFloatType constraints v1))-          Core.LiteralTypeInteger v1 -> (Maybes.map (\x -> Core.LiteralTypeInteger x) (adaptIntegerType constraints v1))-          _ -> Nothing) lt)-  in (Logic.ifElse (literalTypeSupported constraints lt) Nothing (forUnsupported lt))---- | Derive a map of adapted literal types for the given language constraints-adaptLiteralTypesMap :: (Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType)-adaptLiteralTypesMap constraints =  -  let tryType = (\lt -> Maybes.maybe Nothing (\lt2 -> Just (lt, lt2)) (adaptLiteralType constraints lt))-  in (Maps.fromList (Maybes.cat (Lists.map tryType Reflect.literalTypes)))---- | Adapt a literal value using the given language constraints-adaptLiteralValue :: Ord t0 => (M.Map t0 Core.LiteralType -> t0 -> Core.Literal -> Core.Literal)-adaptLiteralValue litmap lt l = (Maybes.maybe (Core.LiteralString (Core_.literal l)) (\lt2 -> adaptLiteral lt2 l) (Maps.lookup lt litmap))---- | Rewrite callback for adapting nested let binding TypeSchemes in a term-adaptNestedTypes :: (Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> (t0 -> Compute.Flow t1 Core.Term) -> t0 -> Compute.Flow t1 Core.Term)-adaptNestedTypes constraints litmap recurse term = (Flows.bind (recurse term) (\rewritten -> (\x -> case x of-  Core.TermLet v1 ->  -    let adaptB = (\b -> Flows.bind (Maybes.maybe (Flows.pure Nothing) (\ts -> Flows.bind (adaptTypeScheme constraints litmap ts) (\ts1 -> Flows.pure (Just ts1))) (Core.bindingType b)) (\adaptedBType -> Flows.pure (Core.Binding {-            Core.bindingName = (Core.bindingName b),-            Core.bindingTerm = (Core.bindingTerm b),-            Core.bindingType = adaptedBType})))-    in (Flows.bind (Flows.mapList adaptB (Core.letBindings v1)) (\adaptedBindings -> Flows.pure (Core.TermLet (Core.Let {-      Core.letBindings = adaptedBindings,-      Core.letBody = (Core.letBody v1)}))))-  _ -> (Flows.pure rewritten)) rewritten))---- | Adapt a primitive to the given language constraints, prior to inference-adaptPrimitive :: (Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> Graph.Primitive -> Compute.Flow t0 Graph.Primitive)-adaptPrimitive constraints litmap prim0 =  -  let ts0 = (Graph.primitiveType prim0)-  in (Flows.bind (adaptTypeScheme constraints litmap ts0) (\ts1 -> Flows.pure (Graph.Primitive {-    Graph.primitiveName = (Graph.primitiveName prim0),-    Graph.primitiveType = ts1,-    Graph.primitiveImplementation = (Graph.primitiveImplementation prim0)})))---- | Adapt a term using the given language constraints-adaptTerm :: (Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> Core.Term -> Compute.Flow Graph.Graph Core.Term)-adaptTerm constraints litmap term0 =  -  let rewrite = (\recurse -> \term0 ->  -          let forSupported = (\term -> (\x -> case x of-                  Core.TermLiteral v1 ->  -                    let lt = (Reflect.literalType v1)-                    in (Flows.pure (Just (Logic.ifElse (literalTypeSupported constraints lt) term (Core.TermLiteral (adaptLiteralValue litmap lt v1)))))-                  _ -> (Flows.pure (Just term))) term) -              forUnsupported = (\term ->  -                      let forNonNull = (\alts -> Flows.bind (tryTerm (Lists.head alts)) (\mterm -> Maybes.maybe (tryAlts (Lists.tail alts)) (\t -> Flows.pure (Just t)) mterm)) -                          tryAlts = (\alts -> Logic.ifElse (Lists.null alts) (Flows.pure Nothing) (forNonNull alts))-                      in (Flows.bind (termAlternatives term) (\alts0 -> tryAlts alts0)))-              tryTerm = (\term ->  -                      let supportedVariant = (Sets.member (Reflect.termVariant term) (Coders.languageConstraintsTermVariants constraints))-                      in (Logic.ifElse supportedVariant (forSupported term) (forUnsupported term)))-          in (Flows.bind (recurse term0) (\term1 -> (\x -> case x of-            Core.TermTypeApplication v1 -> (Flows.bind (adaptType constraints litmap (Core.typeApplicationTermType v1)) (\atyp -> Flows.pure (Core.TermTypeApplication (Core.TypeApplicationTerm {-              Core.typeApplicationTermBody = (Core.typeApplicationTermBody v1),-              Core.typeApplicationTermType = atyp}))))-            Core.TermTypeLambda _ -> (Flows.pure term1)-            _ -> (Flows.bind (tryTerm term1) (\mterm -> Maybes.maybe (Flows.fail (Strings.cat2 "no alternatives for term: " (Core_.term term1))) (\term2 -> Flows.pure term2) mterm))) term1)))-  in (Rewriting.rewriteTermM rewrite term0)---- | Adapt a type using the given language constraints-adaptType :: (Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> Core.Type -> Compute.Flow t0 Core.Type)-adaptType constraints litmap type0 =  -  let forSupported = (\typ -> (\x -> case x of-          Core.TypeLiteral v1 -> (Logic.ifElse (literalTypeSupported constraints v1) (Just typ) (Maybes.maybe (Just (Core.TypeLiteral Core.LiteralTypeString)) (\lt2 -> Just (Core.TypeLiteral lt2)) (Maps.lookup v1 litmap)))-          _ -> (Just typ)) typ) -      forUnsupported = (\typ ->  -              let tryAlts = (\alts -> Logic.ifElse (Lists.null alts) Nothing (Maybes.maybe (tryAlts (Lists.tail alts)) (\t -> Just t) (tryType (Lists.head alts))))-              in  -                let alts0 = (typeAlternatives typ)-                in (tryAlts alts0))-      tryType = (\typ ->  -              let supportedVariant = (Sets.member (Reflect.typeVariant typ) (Coders.languageConstraintsTypeVariants constraints))-              in (Logic.ifElse supportedVariant (forSupported typ) (forUnsupported typ)))-  in  -    let rewrite = (\recurse -> \typ -> Flows.bind (recurse typ) (\type1 -> Maybes.maybe (Flows.fail (Strings.cat2 "no alternatives for type: " (Core_.type_ typ))) (\type2 -> Flows.pure type2) (tryType type1)))-    in (Rewriting.rewriteTypeM rewrite type0)---- | Adapt a type scheme to the given language constraints, prior to inference-adaptTypeScheme :: (Coders.LanguageConstraints -> M.Map Core.LiteralType Core.LiteralType -> Core.TypeScheme -> Compute.Flow t0 Core.TypeScheme)-adaptTypeScheme constraints litmap ts0 =  -  let vars0 = (Core.typeSchemeVariables ts0)-  in  -    let t0 = (Core.typeSchemeType ts0)-    in (Flows.bind (adaptType constraints litmap t0) (\t1 -> Flows.pure (Core.TypeScheme {-      Core.typeSchemeVariables = vars0,-      Core.typeSchemeType = t1,-      Core.typeSchemeConstraints = (Core.typeSchemeConstraints ts0)})))---- | Given a data graph along with language constraints and a designated list of namespaces, adapt the graph to the language constraints, then return the processed graph along with term definitions grouped by namespace (in the order of the input namespaces). Inference is performed before adaptation if bindings lack type annotations. Hoisting must preserve type schemes; if any binding loses its type scheme after hoisting, the pipeline fails. Adaptation preserves type application/lambda wrappers and adapts embedded types. Post-adaptation inference is performed to ensure binding TypeSchemes are fully consistent. The doExpand flag controls eta expansion. The doHoistCaseStatements flag controls case statement hoisting (needed for Python). The doHoistPolymorphicLetBindings flag controls polymorphic let binding hoisting (needed for Java).-dataGraphToDefinitions :: (Coders.LanguageConstraints -> Bool -> Bool -> Bool -> Bool -> Graph.Graph -> [Module.Namespace] -> Compute.Flow Graph.Graph (Graph.Graph, [[Module.TermDefinition]]))-dataGraphToDefinitions constraints doInfer doExpand doHoistCaseStatements doHoistPolymorphicLetBindings graph0 namespaces =  -  let namespacesSet = (Sets.fromList namespaces)-  in  -    let isParentBinding = (\b -> Maybes.maybe False (\ns -> Sets.member ns namespacesSet) (Names.namespaceOf (Core.bindingName b)))-    in  -      let hoistCases = (\g ->  -              let graphDetyped = Graph.Graph {-                      Graph.graphElements = (Lists.map (\b -> Core.Binding {-                        Core.bindingName = (Core.bindingName b),-                        Core.bindingTerm = (Rewriting.stripTypeLambdas (Core.bindingTerm b)),-                        Core.bindingType = (Core.bindingType b)}) (Graph.graphElements g)),-                      Graph.graphEnvironment = (Graph.graphEnvironment g),-                      Graph.graphTypes = (Graph.graphTypes g),-                      Graph.graphBody = (Graph.graphBody g),-                      Graph.graphPrimitives = (Graph.graphPrimitives g),-                      Graph.graphSchema = (Graph.graphSchema g)}-              in  -                let gterm0 = (Schemas.graphAsTerm graphDetyped)-                in  -                  let gterm1 = (Rewriting.unshadowVariables gterm0)-                  in  -                    let newElements = (Schemas.termAsGraph gterm1)-                    in  -                      let graphu0 = Graph.Graph {-                              Graph.graphElements = newElements,-                              Graph.graphEnvironment = (Graph.graphEnvironment graphDetyped),-                              Graph.graphTypes = (Graph.graphTypes graphDetyped),-                              Graph.graphBody = (Graph.graphBody graphDetyped),-                              Graph.graphPrimitives = (Graph.graphPrimitives graphDetyped),-                              Graph.graphSchema = (Graph.graphSchema graphDetyped)}-                      in (Flows.bind (Hoisting.hoistCaseStatementsInGraph graphu0) (\graphh1 ->  -                        let gterm2 = (Schemas.graphAsTerm graphh1)-                        in  -                          let gterm3 = (Rewriting.unshadowVariables gterm2)-                          in  -                            let newElements2 = (Schemas.termAsGraph gterm3)-                            in (Flows.pure (Graph.Graph {-                              Graph.graphElements = newElements2,-                              Graph.graphEnvironment = (Graph.graphEnvironment graphh1),-                              Graph.graphTypes = (Graph.graphTypes graphh1),-                              Graph.graphBody = (Graph.graphBody graphh1),-                              Graph.graphPrimitives = (Graph.graphPrimitives graphh1),-                              Graph.graphSchema = (Graph.graphSchema graphh1)})))))-      in  -        let hoistPoly = (\graphBefore ->  -                let letBefore = (Schemas.graphAsLet graphBefore)-                in  -                  let letAfter = (Hoisting.hoistPolymorphicLetBindings isParentBinding letBefore)-                  in Graph.Graph {-                    Graph.graphElements = (Core.letBindings letAfter),-                    Graph.graphEnvironment = (Graph.graphEnvironment graphBefore),-                    Graph.graphTypes = (Graph.graphTypes graphBefore),-                    Graph.graphBody = (Graph.graphBody graphBefore),-                    Graph.graphPrimitives = (Graph.graphPrimitives graphBefore),-                    Graph.graphSchema = (Graph.graphSchema graphBefore)})-        in  -          let checkTyped = (\debugLabel -> \g ->  -                  let untypedBindings = (Lists.map (\b -> Core.unName (Core.bindingName b)) (Lists.filter (\b -> Logic.not (Maybes.isJust (Core.bindingType b))) (Graph.graphElements g)))-                  in (Logic.ifElse (Lists.null untypedBindings) (Flows.pure g) (Flows.fail (Strings.cat [-                    "Found untyped bindings (",-                    debugLabel,-                    "): ",-                    (Strings.intercalate ", " untypedBindings)]))))-          in  -            let normalizeGraph = (\g -> Graph.Graph {-                    Graph.graphElements = (Lists.map (\b -> Core.Binding {-                      Core.bindingName = (Core.bindingName b),-                      Core.bindingTerm = (pushTypeAppsInward (Core.bindingTerm b)),-                      Core.bindingType = (Core.bindingType b)}) (Graph.graphElements g)),-                    Graph.graphEnvironment = (Graph.graphEnvironment g),-                    Graph.graphTypes = (Graph.graphTypes g),-                    Graph.graphBody = (Graph.graphBody g),-                    Graph.graphPrimitives = (Graph.graphPrimitives g),-                    Graph.graphSchema = (Graph.graphSchema g)})-            in (Flows.bind (Logic.ifElse doHoistCaseStatements (hoistCases graph0) (Flows.pure graph0)) (\graph1 -> Flows.bind (Logic.ifElse doInfer (Inference.inferGraphTypes graph1) (checkTyped "after case hoisting" graph1)) (\graph2 -> Flows.bind (Logic.ifElse doHoistPolymorphicLetBindings (checkTyped "after let hoisting" (hoistPoly graph2)) (Flows.pure graph2)) (\graph3 -> Flows.bind (Flows.bind (adaptDataGraph constraints doExpand graph3) (checkTyped "after adaptation")) (\graph4 ->  -              let graph5 = (normalizeGraph graph4)-              in  -                let toDef = (\el -> Maybes.map (\ts -> Module.TermDefinition {-                        Module.termDefinitionName = (Core.bindingName el),-                        Module.termDefinitionTerm = (Core.bindingTerm el),-                        Module.termDefinitionType = ts}) (Core.bindingType el))-                in  -                  let selectedElements = (Lists.filter (\el -> Maybes.maybe False (\ns -> Sets.member ns namespacesSet) (Names.namespaceOf (Core.bindingName el))) (Graph.graphElements graph5))-                  in  -                    let elementsByNamespace = (Lists.foldl (\acc -> \el -> Maybes.maybe acc (\ns ->  -                            let existing = (Maybes.maybe [] Equality.identity (Maps.lookup ns acc))-                            in (Maps.insert ns (Lists.concat2 existing [-                              el]) acc)) (Names.namespaceOf (Core.bindingName el))) Maps.empty selectedElements)-                    in  -                      let defsGrouped = (Lists.map (\ns ->  -                              let elsForNs = (Maybes.maybe [] Equality.identity (Maps.lookup ns elementsByNamespace))-                              in (Maybes.cat (Lists.map toDef elsForNs))) namespaces)-                      in (Flows.pure (graph5, defsGrouped)))))))---- | Check if a literal type is supported by the given language constraints-literalTypeSupported :: (Coders.LanguageConstraints -> Core.LiteralType -> Bool)-literalTypeSupported constraints lt =  -  let forType = (\lt -> (\x -> case x of-          Core.LiteralTypeFloat v1 -> (Sets.member v1 (Coders.languageConstraintsFloatTypes constraints))-          Core.LiteralTypeInteger v1 -> (Sets.member v1 (Coders.languageConstraintsIntegerTypes constraints))-          _ -> True) lt)-  in (Logic.ifElse (Sets.member (Reflect.literalTypeVariant lt) (Coders.languageConstraintsLiteralVariants constraints)) (forType lt) False)---- | Normalize a term by pushing TermTypeApplication inward past TermApplication and TermFunction (Lambda). This corrects structures produced by poly-let hoisting and eta expansion, where type applications from inference end up wrapping term applications or lambda abstractions instead of being directly on the polymorphic variable.-pushTypeAppsInward :: (Core.Term -> Core.Term)-pushTypeAppsInward term =  -  let push = (\body -> \typ -> (\x -> case x of-          Core.TermApplication v1 -> (go (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermTypeApplication (Core.TypeApplicationTerm {-              Core.typeApplicationTermBody = (Core.applicationFunction v1),-              Core.typeApplicationTermType = typ})),-            Core.applicationArgument = (Core.applicationArgument v1)})))-          Core.TermFunction v1 -> ((\x -> case x of-            Core.FunctionLambda v2 -> (go (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.lambdaParameter v2),-              Core.lambdaDomain = (Core.lambdaDomain v2),-              Core.lambdaBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {-                Core.typeApplicationTermBody = (Core.lambdaBody v2),-                Core.typeApplicationTermType = typ}))}))))-            _ -> (Core.TermTypeApplication (Core.TypeApplicationTerm {-              Core.typeApplicationTermBody = (Core.TermFunction v1),-              Core.typeApplicationTermType = typ}))) v1)-          Core.TermLet v1 -> (go (Core.TermLet (Core.Let {-            Core.letBindings = (Core.letBindings v1),-            Core.letBody = (Core.TermTypeApplication (Core.TypeApplicationTerm {-              Core.typeApplicationTermBody = (Core.letBody v1),-              Core.typeApplicationTermType = typ}))})))-          _ -> (Core.TermTypeApplication (Core.TypeApplicationTerm {-            Core.typeApplicationTermBody = body,-            Core.typeApplicationTermType = typ}))) body) -      go = (\t ->  -              let forField = (\fld -> Core.Field {-                      Core.fieldName = (Core.fieldName fld),-                      Core.fieldTerm = (go (Core.fieldTerm fld))})-              in  -                let forElimination = (\elm -> (\x -> case x of-                        Core.EliminationRecord v1 -> (Core.EliminationRecord v1)-                        Core.EliminationUnion v1 -> (Core.EliminationUnion (Core.CaseStatement {-                          Core.caseStatementTypeName = (Core.caseStatementTypeName v1),-                          Core.caseStatementDefault = (Maybes.map go (Core.caseStatementDefault v1)),-                          Core.caseStatementCases = (Lists.map forField (Core.caseStatementCases v1))}))-                        Core.EliminationWrap v1 -> (Core.EliminationWrap v1)) elm)-                in  -                  let forFunction = (\fun -> (\x -> case x of-                          Core.FunctionElimination v1 -> (Core.FunctionElimination (forElimination v1))-                          Core.FunctionLambda v1 -> (Core.FunctionLambda (Core.Lambda {-                            Core.lambdaParameter = (Core.lambdaParameter v1),-                            Core.lambdaDomain = (Core.lambdaDomain v1),-                            Core.lambdaBody = (go (Core.lambdaBody v1))}))-                          Core.FunctionPrimitive v1 -> (Core.FunctionPrimitive v1)) fun)-                  in  -                    let forLet = (\lt ->  -                            let mapBinding = (\b -> Core.Binding {-                                    Core.bindingName = (Core.bindingName b),-                                    Core.bindingTerm = (go (Core.bindingTerm b)),-                                    Core.bindingType = (Core.bindingType b)})-                            in Core.Let {-                              Core.letBindings = (Lists.map mapBinding (Core.letBindings lt)),-                              Core.letBody = (go (Core.letBody lt))})-                    in  -                      let forMap = (\m ->  -                              let forPair = (\p -> (go (Pairs.first p), (go (Pairs.second p))))-                              in (Maps.fromList (Lists.map forPair (Maps.toList m))))-                      in ((\x -> case x of-                        Core.TermAnnotated v1 -> (Core.TermAnnotated (Core.AnnotatedTerm {-                          Core.annotatedTermBody = (go (Core.annotatedTermBody v1)),-                          Core.annotatedTermAnnotation = (Core.annotatedTermAnnotation v1)}))-                        Core.TermApplication v1 -> (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (go (Core.applicationFunction v1)),-                          Core.applicationArgument = (go (Core.applicationArgument v1))}))-                        Core.TermEither v1 -> (Core.TermEither (Eithers.either (\l -> Left (go l)) (\r -> Right (go r)) v1))-                        Core.TermFunction v1 -> (Core.TermFunction (forFunction v1))-                        Core.TermLet v1 -> (Core.TermLet (forLet v1))-                        Core.TermList v1 -> (Core.TermList (Lists.map go v1))-                        Core.TermLiteral v1 -> (Core.TermLiteral v1)-                        Core.TermMap v1 -> (Core.TermMap (forMap v1))-                        Core.TermMaybe v1 -> (Core.TermMaybe (Maybes.map go v1))-                        Core.TermPair v1 -> (Core.TermPair (go (Pairs.first v1), (go (Pairs.second v1))))-                        Core.TermRecord v1 -> (Core.TermRecord (Core.Record {-                          Core.recordTypeName = (Core.recordTypeName v1),-                          Core.recordFields = (Lists.map forField (Core.recordFields v1))}))-                        Core.TermSet v1 -> (Core.TermSet (Sets.fromList (Lists.map go (Sets.toList v1))))-                        Core.TermTypeApplication v1 ->  -                          let body1 = (go (Core.typeApplicationTermBody v1))-                          in (push body1 (Core.typeApplicationTermType v1))-                        Core.TermTypeLambda v1 -> (Core.TermTypeLambda (Core.TypeLambda {-                          Core.typeLambdaParameter = (Core.typeLambdaParameter v1),-                          Core.typeLambdaBody = (go (Core.typeLambdaBody v1))}))-                        Core.TermUnion v1 -> (Core.TermUnion (Core.Injection {-                          Core.injectionTypeName = (Core.injectionTypeName v1),-                          Core.injectionField = (forField (Core.injectionField v1))}))-                        Core.TermUnit -> Core.TermUnit-                        Core.TermVariable v1 -> (Core.TermVariable v1)-                        Core.TermWrap v1 -> (Core.TermWrap (Core.WrappedTerm {-                          Core.wrappedTermTypeName = (Core.wrappedTermTypeName v1),-                          Core.wrappedTermBody = (go (Core.wrappedTermBody v1))}))) t))-  in (go term)---- | Given a schema graph along with language constraints and a designated list of element names, adapt the graph to the language constraints, then return a corresponding type definition for each element name.-schemaGraphToDefinitions :: (Coders.LanguageConstraints -> Graph.Graph -> [[Core.Name]] -> Compute.Flow Graph.Graph (M.Map Core.Name Core.Type, [[Module.TypeDefinition]]))-schemaGraphToDefinitions constraints graph nameLists =  -  let litmap = (adaptLiteralTypesMap constraints)-  in (Flows.bind (Schemas.graphAsTypes graph) (\tmap0 -> Flows.bind (adaptGraphSchema constraints litmap tmap0) (\tmap1 ->  -    let toDef = (\pair -> Module.TypeDefinition {-            Module.typeDefinitionName = (Pairs.first pair),-            Module.typeDefinitionType = (Pairs.second pair)})-    in (Flows.pure (tmap1, (Lists.map (\names -> Lists.map toDef (Lists.map (\n -> (n, (Maybes.fromJust (Maps.lookup n tmap1)))) names)) nameLists))))))---- | Find a list of alternatives for a given term, if any-termAlternatives :: (Core.Term -> Compute.Flow Graph.Graph [Core.Term])-termAlternatives term = ((\x -> case x of-  Core.TermAnnotated v1 ->  -    let term2 = (Core.annotatedTermBody v1)-    in (Flows.pure [-      term2])-  Core.TermMaybe v1 -> (Flows.pure [-    Core.TermList (Maybes.maybe [] (\term2 -> [-      term2]) v1)])-  Core.TermTypeLambda v1 ->  -    let term2 = (Core.typeLambdaBody v1)-    in (Flows.pure [-      term2])-  Core.TermTypeApplication v1 ->  -    let term2 = (Core.typeApplicationTermBody v1)-    in (Flows.pure [-      term2])-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1)-    in  -      let field = (Core.injectionField v1)-      in  -        let fname = (Core.fieldName field)-        in  -          let fterm = (Core.fieldTerm field)-          in  -            let forFieldType = (\ft ->  -                    let ftname = (Core.fieldTypeName ft)-                    in Core.Field {-                      Core.fieldName = fname,-                      Core.fieldTerm = (Core.TermMaybe (Logic.ifElse (Equality.equal ftname fname) (Just fterm) Nothing))})-            in (Flows.bind (Schemas.requireUnionType tname) (\rt -> Flows.pure [-              Core.TermRecord (Core.Record {-                Core.recordTypeName = tname,-                Core.recordFields = (Lists.map forFieldType (Core.rowTypeFields rt))})]))-  Core.TermUnit -> (Flows.pure [-    Core.TermLiteral (Core.LiteralBoolean True)])-  Core.TermWrap v1 ->  -    let term2 = (Core.wrappedTermBody v1)-    in (Flows.pure [-      term2])-  _ -> (Flows.pure [])) term)---- | Find a list of alternatives for a given type, if any-typeAlternatives :: (Core.Type -> [Core.Type])-typeAlternatives type_ = ((\x -> case x of-  Core.TypeAnnotated v1 ->  -    let type2 = (Core.annotatedTypeBody v1)-    in [-      type2]-  Core.TypeMaybe v1 -> [-    Core.TypeList v1]-  Core.TypeUnion v1 ->  -    let tname = (Core.rowTypeTypeName v1)-    in  -      let fields = (Core.rowTypeFields v1)-      in  -        let toOptField = (\f -> Core.FieldType {-                Core.fieldTypeName = (Core.fieldTypeName f),-                Core.fieldTypeType = (Core.TypeMaybe (Core.fieldTypeType f))})-        in  -          let optFields = (Lists.map toOptField fields)-          in [-            Core.TypeRecord (Core.RowType {-              Core.rowTypeTypeName = tname,-              Core.rowTypeFields = optFields})]-  Core.TypeUnit -> [-    Core.TypeLiteral Core.LiteralTypeBoolean]-  _ -> []) type_)
− src/gen-main/haskell/Hydra/Adapt/Terms.hs
@@ -1,753 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Adapter framework for types and terms--module Hydra.Adapt.Terms where--import qualified Hydra.Adapt.Literals as Literals-import qualified Hydra.Adapt.Utils as Utils-import qualified Hydra.Coders as Coders-import qualified Hydra.Compute as Compute-import qualified Hydra.Core as Core-import qualified Hydra.Extract.Core as Core_-import qualified Hydra.Graph as Graph-import qualified Hydra.Lib.Equality as Equality-import qualified Hydra.Lib.Flows as Flows-import qualified Hydra.Lib.Lists as Lists-import qualified Hydra.Lib.Logic as Logic-import qualified Hydra.Lib.Maps as Maps-import qualified Hydra.Lib.Maybes as Maybes-import qualified Hydra.Lib.Pairs as Pairs-import qualified Hydra.Lib.Sets as Sets-import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Monads as Monads-import qualified Hydra.Reflect as Reflect-import qualified Hydra.Rewriting as Rewriting-import qualified Hydra.Schemas as Schemas-import qualified Hydra.Show.Core as Core__-import qualified Hydra.Variants as Variants-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S---- | Create an adapter for field types-fieldAdapter :: (Core.FieldType -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.FieldType Core.FieldType Core.Field Core.Field))-fieldAdapter ftyp =  -  let encdec = (\ad -> \dir -> \field ->  -          let name = (Core.fieldName field)-          in  -            let term = (Core.fieldTerm field)-            in (Flows.bind (Utils.encodeDecode dir (Compute.adapterCoder ad) term) (\newTerm -> Flows.pure (Core.Field {-              Core.fieldName = name,-              Core.fieldTerm = newTerm}))))-  in (Flows.bind (termAdapter (Core.fieldTypeType ftyp)) (\ad -> Flows.pure (Compute.Adapter {-    Compute.adapterIsLossy = (Compute.adapterIsLossy ad),-    Compute.adapterSource = ftyp,-    Compute.adapterTarget = Core.FieldType {-      Core.fieldTypeName = (Core.fieldTypeName ftyp),-      Core.fieldTypeType = (Compute.adapterTarget ad)},-    Compute.adapterCoder = (Utils.bidirectional (encdec ad))})))---- | This function accounts for recursive type definitions-forTypeReference :: (Core.Name -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-forTypeReference name =  -  let encdec = (\name -> \dir -> \term -> Flows.bind Monads.getState (\cx ->  -          let adapters = (Coders.adapterContextAdapters cx)-          in (Maybes.maybe (Flows.fail (Strings.cat2 "no adapter for reference type " (Core.unName name))) (\ad -> Utils.encodeDecode dir (Compute.adapterCoder ad) term) (Maps.lookup name adapters))))-  in  -    let forType = (\cx -> \adapters -> \t -> Flows.bind (termAdapter t) (\actual ->  -            let finalAdapters = (Maps.insert name actual adapters)-            in  -              let finalCx = Coders.AdapterContext {-                      Coders.adapterContextGraph = (Coders.adapterContextGraph cx),-                      Coders.adapterContextLanguage = (Coders.adapterContextLanguage cx),-                      Coders.adapterContextAdapters = finalAdapters}-              in (Flows.bind (Monads.putState finalCx) (\ignored2 -> Flows.pure actual))))-    in  -      let forMissingAdapter = (\cx -> \lossy -> \adapters -> \placeholder ->  -              let newAdapters = (Maps.insert name placeholder adapters)-              in  -                let newCx = Coders.AdapterContext {-                        Coders.adapterContextGraph = (Coders.adapterContextGraph cx),-                        Coders.adapterContextLanguage = (Coders.adapterContextLanguage cx),-                        Coders.adapterContextAdapters = newAdapters}-                in (Flows.bind (Monads.putState newCx) (\ignored -> Flows.bind (withGraphContext (Schemas.resolveType (Core.TypeVariable name))) (\mt -> Maybes.maybe (Flows.pure (Compute.Adapter {-                  Compute.adapterIsLossy = lossy,-                  Compute.adapterSource = (Core.TypeVariable name),-                  Compute.adapterTarget = (Core.TypeVariable name),-                  Compute.adapterCoder = (Utils.bidirectional (\dir -> \term -> Flows.pure term))})) (forType cx adapters) mt))))-      in  -        let flow =  -                let lossy = False-                in  -                  let placeholder = Compute.Adapter {-                          Compute.adapterIsLossy = lossy,-                          Compute.adapterSource = (Core.TypeVariable name),-                          Compute.adapterTarget = (Core.TypeVariable name),-                          Compute.adapterCoder = (Utils.bidirectional (encdec name))}-                  in (Flows.bind Monads.getState (\cx ->  -                    let adapters = (Coders.adapterContextAdapters cx)-                    in (Maybes.maybe (forMissingAdapter cx lossy adapters placeholder) Flows.pure (Maps.lookup name adapters))))-        in (Monads.withTrace (Strings.cat2 "adapt named type " (Core.unName name)) flow)--functionProxyName :: Core.Name-functionProxyName = (Core.Name "hydra.core.FunctionProxy")---- | Generate a function proxy type for a given domain type-functionProxyType :: (t0 -> Core.Type)-functionProxyType _ = (Core.TypeUnion (Core.RowType {-  Core.rowTypeTypeName = functionProxyName,-  Core.rowTypeFields = [-    Core.FieldType {-      Core.fieldTypeName = (Core.Name "wrap"),-      Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},-    Core.FieldType {-      Core.fieldTypeName = (Core.Name "record"),-      Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},-    Core.FieldType {-      Core.fieldTypeName = (Core.Name "union"),-      Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},-    Core.FieldType {-      Core.fieldTypeName = (Core.Name "lambda"),-      Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},-    Core.FieldType {-      Core.fieldTypeName = (Core.Name "primitive"),-      Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},-    Core.FieldType {-      Core.fieldTypeName = (Core.Name "variable"),-      Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)}]}))---- | Convert function types to union types-functionToUnion :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-functionToUnion t =  -  let encTerm = (\term -> \strippedTerm -> (\x -> case x of-          Core.TermFunction v1 -> ((\x -> case x of-            Core.FunctionElimination v2 -> ((\x -> case x of-              Core.EliminationWrap v3 -> (Core.TermUnion (Core.Injection {-                Core.injectionTypeName = functionProxyName,-                Core.injectionField = Core.Field {-                  Core.fieldName = (Core.Name "wrap"),-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString (Core.unName v3)))}}))-              Core.EliminationRecord _ -> (Core.TermUnion (Core.Injection {-                Core.injectionTypeName = functionProxyName,-                Core.injectionField = Core.Field {-                  Core.fieldName = (Core.Name "record"),-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString (Core__.term term)))}}))-              Core.EliminationUnion _ -> (Core.TermUnion (Core.Injection {-                Core.injectionTypeName = functionProxyName,-                Core.injectionField = Core.Field {-                  Core.fieldName = (Core.Name "union"),-                  Core.fieldTerm = (Core.TermLiteral (Core.LiteralString (Core__.term term)))}}))) v2)-            Core.FunctionLambda _ -> (Core.TermUnion (Core.Injection {-              Core.injectionTypeName = functionProxyName,-              Core.injectionField = Core.Field {-                Core.fieldName = (Core.Name "lambda"),-                Core.fieldTerm = (Core.TermLiteral (Core.LiteralString (Core__.term term)))}}))-            Core.FunctionPrimitive v2 -> (Core.TermUnion (Core.Injection {-              Core.injectionTypeName = functionProxyName,-              Core.injectionField = Core.Field {-                Core.fieldName = (Core.Name "primitive"),-                Core.fieldTerm = (Core.TermLiteral (Core.LiteralString (Core.unName v2)))}}))) v1)-          Core.TermVariable v1 -> (Core.TermUnion (Core.Injection {-            Core.injectionTypeName = functionProxyName,-            Core.injectionField = Core.Field {-              Core.fieldName = (Core.Name "variable"),-              Core.fieldTerm = (Core.TermLiteral (Core.LiteralString (Core.unName v1)))}}))) strippedTerm)-  in  -    let encode = (\ad -> \term ->  -            let strippedTerm = (Rewriting.deannotateTerm term)-            in (Compute.coderEncode (Compute.adapterCoder ad) (encTerm term strippedTerm)))-    in  -      let readFromString = (\term -> Flows.bind (Core_.string term) (\s -> Maybes.maybe (Flows.fail (Strings.cat2 "failed to parse term: " s)) Flows.pure (Core__.readTerm s)))-      in  -        let decode = (\ad -> \term ->  -                let notFound = (\fname -> Flows.fail (Strings.cat2 "unexpected field: " (Core.unName fname)))-                in  -                  let forCases = (\fterm -> withGraphContext (readFromString fterm))-                  in  -                    let forLambda = (\fterm -> withGraphContext (readFromString fterm))-                    in  -                      let forWrapped = (\fterm -> withGraphContext (Flows.map (\s -> Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name s)))) (Core_.string fterm)))-                      in  -                        let forPrimitive = (\fterm -> withGraphContext (Flows.map (\s -> Core.TermFunction (Core.FunctionPrimitive (Core.Name s))) (Core_.string fterm)))-                        in  -                          let forProjection = (\fterm -> withGraphContext (readFromString fterm))-                          in  -                            let forVariable = (\fterm -> withGraphContext (Flows.map (\s -> Core.TermVariable (Core.Name s)) (Core_.string fterm)))-                            in (Flows.bind (Compute.coderDecode (Compute.adapterCoder ad) term) (\injTerm -> Flows.bind (withGraphContext (Core_.injection functionProxyName injTerm)) (\field ->  -                              let fname = (Core.fieldName field)-                              in  -                                let fterm = (Core.fieldTerm field)-                                in (Maybes.fromMaybe (notFound fname) (Maps.lookup fname (Maps.fromList [-                                  (Core.Name "wrap", (forWrapped fterm)),-                                  (Core.Name "record", (forProjection fterm)),-                                  (Core.Name "union", (forCases fterm)),-                                  (Core.Name "lambda", (forLambda fterm)),-                                  (Core.Name "primitive", (forPrimitive fterm)),-                                  (Core.Name "variable", (forVariable fterm))])))))))-        in ((\x -> case x of-          Core.TypeFunction v1 ->  -            let dom = (Core.functionTypeDomain v1)-            in  -              let cod = (Core.functionTypeCodomain v1)-              in  -                let unionType = (Flows.bind (termAdapter dom) (\domAd -> Flows.pure (Core.TypeUnion (Core.RowType {-                        Core.rowTypeTypeName = functionProxyName,-                        Core.rowTypeFields = [-                          Core.FieldType {-                            Core.fieldTypeName = (Core.Name "wrap"),-                            Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},-                          Core.FieldType {-                            Core.fieldTypeName = (Core.Name "record"),-                            Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},-                          Core.FieldType {-                            Core.fieldTypeName = (Core.Name "union"),-                            Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},-                          Core.FieldType {-                            Core.fieldTypeName = (Core.Name "lambda"),-                            Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},-                          Core.FieldType {-                            Core.fieldTypeName = (Core.Name "primitive"),-                            Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)},-                          Core.FieldType {-                            Core.fieldTypeName = (Core.Name "variable"),-                            Core.fieldTypeType = (Core.TypeLiteral Core.LiteralTypeString)}]}))))-                in (Flows.bind unionType (\ut -> Flows.bind (termAdapter ut) (\ad -> Flows.pure (Compute.Adapter {-                  Compute.adapterIsLossy = (Compute.adapterIsLossy ad),-                  Compute.adapterSource = t,-                  Compute.adapterTarget = (Compute.adapterTarget ad),-                  Compute.adapterCoder = Compute.Coder {-                    Compute.coderEncode = (encode ad),-                    Compute.coderDecode = (decode ad)}}))))) t)---- | Convert forall types to monotypes-lambdaToMonotype :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-lambdaToMonotype t = ((\x -> case x of-  Core.TypeForall v1 ->  -    let body = (Core.forallTypeBody v1)-    in (Flows.bind (termAdapter body) (\ad -> Flows.pure (Compute.Adapter {-      Compute.adapterIsLossy = (Compute.adapterIsLossy ad),-      Compute.adapterSource = t,-      Compute.adapterTarget = (Compute.adapterTarget ad),-      Compute.adapterCoder = (Compute.adapterCoder ad)})))) t)---- | Convert optional types to list types-maybeToList :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-maybeToList t =  -  let encode = (\ad -> \term -> (\x -> case x of-          Core.TermMaybe v1 -> (Maybes.maybe (Flows.pure (Core.TermList [])) (\r -> Flows.bind (Compute.coderEncode (Compute.adapterCoder ad) r) (\encoded -> Flows.pure (Core.TermList [-            encoded]))) v1)) term)-  in  -    let decode = (\ad -> \term -> (\x -> case x of-            Core.TermList v1 -> (Flows.map (\x -> Core.TermMaybe x) (Logic.ifElse (Lists.null v1) (Flows.pure Nothing) (Flows.bind (Compute.coderDecode (Compute.adapterCoder ad) (Lists.head v1)) (\decoded -> Flows.pure (Just decoded)))))) term)-    in ((\x -> case x of-      Core.TypeMaybe v1 -> (Flows.bind (termAdapter v1) (\ad -> Flows.pure (Compute.Adapter {-        Compute.adapterIsLossy = False,-        Compute.adapterSource = t,-        Compute.adapterTarget = (Core.TypeList (Compute.adapterTarget ad)),-        Compute.adapterCoder = Compute.Coder {-          Compute.coderEncode = (encode ad),-          Compute.coderDecode = (decode ad)}})))) t)---- | Pass through application types-passApplication :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-passApplication t =  -  let forApplicationType = (\at ->  -          let lhs = (Core.applicationTypeFunction at)-          in  -            let rhs = (Core.applicationTypeArgument at)-            in (Flows.bind (termAdapter lhs) (\lhsAd -> Flows.bind (termAdapter rhs) (\rhsAd -> Flows.pure (Compute.Adapter {-              Compute.adapterIsLossy = (Logic.or (Compute.adapterIsLossy lhsAd) (Compute.adapterIsLossy rhsAd)),-              Compute.adapterSource = t,-              Compute.adapterTarget = (Core.TypeApplication (Core.ApplicationType {-                Core.applicationTypeFunction = (Compute.adapterTarget lhsAd),-                Core.applicationTypeArgument = (Compute.adapterTarget rhsAd)})),-              Compute.adapterCoder = (Utils.bidirectional (\dir -> \term -> Utils.encodeDecode dir (Compute.adapterCoder lhsAd) term))})))))-  in ((\x -> case x of-    Core.TypeApplication v1 -> (forApplicationType v1)) t)---- | Pass through either types-passEither :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-passEither t =  -  let forEitherType = (\et ->  -          let left = (Core.eitherTypeLeft et)-          in  -            let right = (Core.eitherTypeRight et)-            in (Flows.bind (termAdapter left) (\leftAd -> Flows.bind (termAdapter right) (\rightAd -> Flows.pure (Compute.Adapter {-              Compute.adapterIsLossy = (Logic.or (Compute.adapterIsLossy leftAd) (Compute.adapterIsLossy rightAd)),-              Compute.adapterSource = t,-              Compute.adapterTarget = (Core.TypeEither (Core.EitherType {-                Core.eitherTypeLeft = (Compute.adapterTarget leftAd),-                Core.eitherTypeRight = (Compute.adapterTarget rightAd)})),-              Compute.adapterCoder = (Utils.bidirectional (\dir -> \term -> Utils.encodeDecode dir (Compute.adapterCoder leftAd) term))})))))-  in ((\x -> case x of-    Core.TypeEither v1 -> (forEitherType v1)) t)---- | Pass through function types with adaptation-passFunction :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-passFunction t =  -  let toCaseAds = (\dom -> \cod -> (\x -> case x of-          Core.TypeUnion v1 -> (Flows.bind (Flows.mapList (\f -> Flows.bind (fieldAdapter (Core.FieldType {-            Core.fieldTypeName = (Core.fieldTypeName f),-            Core.fieldTypeType = (Core.TypeFunction (Core.FunctionType {-              Core.functionTypeDomain = (Core.fieldTypeType f),-              Core.functionTypeCodomain = cod}))})) (\ad -> Flows.pure (Core.fieldTypeName f, ad))) (Core.rowTypeFields v1)) (\pairs -> Flows.pure (Maps.fromList pairs)))-          _ -> (Flows.pure Maps.empty)) (Rewriting.deannotateType dom))-  in  -    let toOptionAd = (\dom -> \cod -> (\x -> case x of-            Core.TypeMaybe v1 -> (Flows.map Maybes.pure (termAdapter (Core.TypeFunction (Core.FunctionType {-              Core.functionTypeDomain = v1,-              Core.functionTypeCodomain = cod}))))-            _ -> (Flows.pure Nothing)) (Rewriting.deannotateType dom))-    in  -      let getCoder = (\caseAds -> \fname -> Maybes.maybe Utils.idCoder Compute.adapterCoder (Maps.lookup fname caseAds))-      in  -        let forElimination = (\dir -> \codAd -> \caseAds -> \e -> (\x -> case x of-                Core.EliminationUnion v1 ->  -                  let n = (Core.caseStatementTypeName v1)-                  in  -                    let def = (Core.caseStatementDefault v1)-                    in  -                      let cases = (Core.caseStatementCases v1)-                      in (Flows.bind (Flows.mapList (\f -> Utils.encodeDecode dir (getCoder caseAds (Core.fieldName f)) f) cases) (\rcases -> Flows.bind (Maybes.maybe (Flows.pure Nothing) (\d -> Flows.map Maybes.pure (Utils.encodeDecode dir (Compute.adapterCoder codAd) d)) def) (\rdef -> Flows.pure (Core.EliminationUnion (Core.CaseStatement {-                        Core.caseStatementTypeName = n,-                        Core.caseStatementDefault = rdef,-                        Core.caseStatementCases = rcases})))))) e)-        in  -          let forFunction = (\dir -> \codAd -> \caseAds -> \f -> (\x -> case x of-                  Core.FunctionElimination v1 -> (Flows.map (\x -> Core.FunctionElimination x) (forElimination dir codAd caseAds v1))-                  Core.FunctionLambda v1 ->  -                    let var = (Core.lambdaParameter v1)-                    in  -                      let d = (Core.lambdaDomain v1)-                      in  -                        let body = (Core.lambdaBody v1)-                        in (Flows.bind (Utils.encodeDecode dir (Compute.adapterCoder codAd) body) (\newBody -> Flows.pure (Core.FunctionLambda (Core.Lambda {-                          Core.lambdaParameter = var,-                          Core.lambdaDomain = d,-                          Core.lambdaBody = newBody}))))-                  Core.FunctionPrimitive v1 -> (Flows.pure (Core.FunctionPrimitive v1))) f)-          in  -            let encdec = (\codAd -> \caseAds -> \dir -> \term -> (\x -> case x of-                    Core.TermFunction v1 -> (Flows.map (\x -> Core.TermFunction x) (forFunction dir codAd caseAds v1))-                    _ -> (Flows.pure term)) (Rewriting.deannotateTerm term))-            in  -              let forFunctionType = (\ft ->  -                      let dom = (Core.functionTypeDomain ft)-                      in  -                        let cod = (Core.functionTypeCodomain ft)-                        in (Flows.bind (termAdapter dom) (\domAd -> Flows.bind (termAdapter cod) (\codAd -> Flows.bind (toCaseAds dom cod) (\caseAds -> Flows.bind (toOptionAd dom cod) (\optionAd ->  -                          let lossy = (Logic.or (Compute.adapterIsLossy codAd) (Lists.foldl Logic.or False (Lists.map (\pair -> Compute.adapterIsLossy (Pairs.second pair)) (Maps.toList caseAds))))-                          in  -                            let target = (Core.TypeFunction (Core.FunctionType {-                                    Core.functionTypeDomain = (Compute.adapterTarget domAd),-                                    Core.functionTypeCodomain = (Compute.adapterTarget codAd)}))-                            in (Flows.pure (Compute.Adapter {-                              Compute.adapterIsLossy = lossy,-                              Compute.adapterSource = t,-                              Compute.adapterTarget = target,-                              Compute.adapterCoder = (Utils.bidirectional (encdec codAd caseAds))}))))))))-              in ((\x -> case x of-                Core.TypeFunction v1 -> (forFunctionType v1)) t)---- | Pass through forall types-passForall :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-passForall t =  -  let forForallType = (\ft ->  -          let v = (Core.forallTypeParameter ft)-          in  -            let body = (Core.forallTypeBody ft)-            in (Flows.bind (termAdapter body) (\ad -> Flows.pure (Compute.Adapter {-              Compute.adapterIsLossy = (Compute.adapterIsLossy ad),-              Compute.adapterSource = t,-              Compute.adapterTarget = (Core.TypeForall (Core.ForallType {-                Core.forallTypeParameter = v,-                Core.forallTypeBody = (Compute.adapterTarget ad)})),-              Compute.adapterCoder = (Utils.bidirectional (\dir -> \term -> Utils.encodeDecode dir (Compute.adapterCoder ad) term))}))))-  in ((\x -> case x of-    Core.TypeForall v1 -> (forForallType v1)) t)---- | Pass through literal types with literal adaptation-passLiteral :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-passLiteral t =  -  let encdec = (\ad -> \dir -> \term -> Flows.bind (withGraphContext (Core_.literal term)) (\l -> Flows.bind (Utils.encodeDecode dir (Compute.adapterCoder ad) l) (\l2 -> Flows.pure (Core.TermLiteral l2))))-  in  -    let forLiteral = (\lt -> Flows.bind (Literals.literalAdapter lt) (\ad ->  -            let step = (Utils.bidirectional (encdec ad))-            in (Flows.pure (Compute.Adapter {-              Compute.adapterIsLossy = (Compute.adapterIsLossy ad),-              Compute.adapterSource = (Core.TypeLiteral (Compute.adapterSource ad)),-              Compute.adapterTarget = (Core.TypeLiteral (Compute.adapterTarget ad)),-              Compute.adapterCoder = step}))))-    in ((\x -> case x of-      Core.TypeLiteral v1 -> (forLiteral v1)) t)---- | Pass through list types-passList :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-passList t =  -  let encdec = (\ad -> \dir -> \term -> (\x -> case x of-          Core.TermList v1 -> (Flows.bind (Flows.mapList (Utils.encodeDecode dir (Compute.adapterCoder ad)) v1) (\newTerms -> Flows.pure (Core.TermList newTerms)))) term)-  in  -    let forListType = (\lt -> Flows.bind (termAdapter lt) (\ad -> Flows.pure (Compute.Adapter {-            Compute.adapterIsLossy = (Compute.adapterIsLossy ad),-            Compute.adapterSource = t,-            Compute.adapterTarget = (Core.TypeList (Compute.adapterTarget ad)),-            Compute.adapterCoder = (Utils.bidirectional (encdec ad))})))-    in ((\x -> case x of-      Core.TypeList v1 -> (forListType v1)) t)---- | Pass through map types-passMap :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-passMap t =  -  let encdec = (\kad -> \vad -> \dir -> \term -> (\x -> case x of-          Core.TermMap v1 -> (Flows.bind (Flows.mapList (\pair ->  -            let k = (Pairs.first pair)-            in  -              let v = (Pairs.second pair)-              in (Flows.bind (Utils.encodeDecode dir (Compute.adapterCoder kad) k) (\newK -> Flows.bind (Utils.encodeDecode dir (Compute.adapterCoder vad) v) (\newV -> Flows.pure (newK, newV))))) (Maps.toList v1)) (\newPairs -> Flows.pure (Core.TermMap (Maps.fromList newPairs))))) term)-  in  -    let forMapType = (\mt ->  -            let kt = (Core.mapTypeKeys mt)-            in  -              let vt = (Core.mapTypeValues mt)-              in (Flows.bind (termAdapter kt) (\kad -> Flows.bind (termAdapter vt) (\vad -> Flows.pure (Compute.Adapter {-                Compute.adapterIsLossy = (Logic.or (Compute.adapterIsLossy kad) (Compute.adapterIsLossy vad)),-                Compute.adapterSource = t,-                Compute.adapterTarget = (Core.TypeMap (Core.MapType {-                  Core.mapTypeKeys = (Compute.adapterTarget kad),-                  Core.mapTypeValues = (Compute.adapterTarget vad)})),-                Compute.adapterCoder = (Utils.bidirectional (encdec kad vad))})))))-    in ((\x -> case x of-      Core.TypeMap v1 -> (forMapType v1)) t)---- | Pass through optional types-passOptional :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-passOptional t =  -  let mapTerm = (\coder -> \dir -> \term -> Flows.bind (withGraphContext (Core_.maybeTerm Flows.pure term)) (\opt -> Flows.bind (Flows.mapMaybe (Utils.encodeDecode dir coder) opt) (\newOpt -> Flows.pure (Core.TermMaybe newOpt))))-  in ((\x -> case x of-    Core.TypeMaybe v1 -> (Flows.bind (termAdapter v1) (\adapter -> Flows.pure (Compute.Adapter {-      Compute.adapterIsLossy = (Compute.adapterIsLossy adapter),-      Compute.adapterSource = t,-      Compute.adapterTarget = (Core.TypeMaybe (Compute.adapterTarget adapter)),-      Compute.adapterCoder = (Utils.bidirectional (mapTerm (Compute.adapterCoder adapter)))})))) t)---- | Pass through record types-passRecord :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-passRecord t =  -  let encdec = (\rt -> \adapters -> \dir -> \term -> (\x -> case x of-          Core.TermRecord v1 ->  -            let dfields = (Core.recordFields v1)-            in (Flows.bind (Flows.sequence (Lists.zipWith (\ad -> \f -> Utils.encodeDecode dir (Compute.adapterCoder ad) f) adapters dfields)) (\newFields -> Flows.pure (Core.TermRecord (Core.Record {-              Core.recordTypeName = (Core.rowTypeTypeName rt),-              Core.recordFields = newFields}))))) term)-  in  -    let forRecordType = (\rt -> Flows.bind (Flows.mapList fieldAdapter (Core.rowTypeFields rt)) (\adapters ->  -            let lossy = (Lists.foldl Logic.or False (Lists.map Compute.adapterIsLossy adapters))-            in  -              let sfields_ = (Lists.map Compute.adapterTarget adapters)-              in (Flows.pure (Compute.Adapter {-                Compute.adapterIsLossy = lossy,-                Compute.adapterSource = t,-                Compute.adapterTarget = (Core.TypeRecord (Core.RowType {-                  Core.rowTypeTypeName = (Core.rowTypeTypeName rt),-                  Core.rowTypeFields = sfields_})),-                Compute.adapterCoder = (Utils.bidirectional (encdec rt adapters))}))))-    in ((\x -> case x of-      Core.TypeRecord v1 -> (forRecordType v1)) t)---- | Pass through set types-passSet :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-passSet t =  -  let encdec = (\ad -> \dir -> \term -> (\x -> case x of-          Core.TermSet v1 -> (Flows.bind (Flows.mapList (Utils.encodeDecode dir (Compute.adapterCoder ad)) (Sets.toList v1)) (\newTerms -> Flows.pure (Core.TermSet (Sets.fromList newTerms))))) term)-  in ((\x -> case x of-    Core.TypeSet v1 -> (Flows.bind (termAdapter v1) (\ad -> Flows.pure (Compute.Adapter {-      Compute.adapterIsLossy = (Compute.adapterIsLossy ad),-      Compute.adapterSource = t,-      Compute.adapterTarget = (Core.TypeSet (Compute.adapterTarget ad)),-      Compute.adapterCoder = (Utils.bidirectional (encdec ad))})))) t)---- | Pass through union types-passUnion :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-passUnion t = ((\x -> case x of-  Core.TypeUnion v1 ->  -    let sfields = (Core.rowTypeFields v1)-    in  -      let tname = (Core.rowTypeTypeName v1)-      in  -        let getAdapter = (\adaptersMap -> \f -> Maybes.maybe (Flows.fail (Strings.cat2 "no such field: " (Core.unName (Core.fieldName f)))) Flows.pure (Maps.lookup (Core.fieldName f) adaptersMap))-        in (Flows.bind (Flows.mapList (\f -> Flows.bind (fieldAdapter f) (\ad -> Flows.pure (Core.fieldTypeName f, ad))) sfields) (\adapters ->  -          let adaptersMap = (Maps.fromList adapters)-          in  -            let lossy = (Lists.foldl Logic.or False (Lists.map (\pair -> Compute.adapterIsLossy (Pairs.second pair)) adapters))-            in  -              let sfields_ = (Lists.map (\pair -> Compute.adapterTarget (Pairs.second pair)) adapters)-              in (Flows.pure (Compute.Adapter {-                Compute.adapterIsLossy = lossy,-                Compute.adapterSource = t,-                Compute.adapterTarget = (Core.TypeUnion (Core.RowType {-                  Core.rowTypeTypeName = tname,-                  Core.rowTypeFields = sfields_})),-                Compute.adapterCoder = (Utils.bidirectional (\dir -> \term -> Flows.pure term))}))))) t)---- | Pass through unit types-passUnit :: (t0 -> Compute.Flow t1 (Compute.Adapter t2 t3 Core.Type Core.Type Core.Term Core.Term))-passUnit _ = (Flows.pure (Compute.Adapter {-  Compute.adapterIsLossy = False,-  Compute.adapterSource = Core.TypeUnit,-  Compute.adapterTarget = Core.TypeUnit,-  Compute.adapterCoder = Compute.Coder {-    Compute.coderEncode = (\_ -> Flows.pure Core.TermUnit),-    Compute.coderDecode = (\_ -> Flows.pure Core.TermUnit)}}))---- | Pass through wrapped types-passWrapped :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-passWrapped t = ((\x -> case x of-  Core.TypeWrap v1 ->  -    let tname = (Core.wrappedTypeTypeName v1)-    in  -      let ot = (Core.wrappedTypeBody v1)-      in  -        let mapTerm = (\coder -> \dir -> \term -> Flows.bind (withGraphContext (Core_.wrap tname term)) (\unwrapped -> Flows.bind (Utils.encodeDecode dir coder unwrapped) (\newTerm -> Flows.pure (Core.TermWrap (Core.WrappedTerm {-                Core.wrappedTermTypeName = tname,-                Core.wrappedTermBody = newTerm})))))-        in (Flows.bind (termAdapter ot) (\adapter -> Flows.pure (Compute.Adapter {-          Compute.adapterIsLossy = (Compute.adapterIsLossy adapter),-          Compute.adapterSource = t,-          Compute.adapterTarget = (Core.TypeWrap (Core.WrappedType {-            Core.wrappedTypeTypeName = tname,-            Core.wrappedTypeBody = (Compute.adapterTarget adapter)})),-          Compute.adapterCoder = (Utils.bidirectional (mapTerm (Compute.adapterCoder adapter)))})))) t)---- | Convert set types to list types-setToList :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-setToList t =  -  let encode = (\ad -> \term -> (\x -> case x of-          Core.TermSet v1 -> (Compute.coderEncode (Compute.adapterCoder ad) (Core.TermList (Sets.toList v1)))) term)-  in  -    let forListTerm = (\t -> (\x -> case x of-            Core.TermList v1 -> (Flows.pure (Core.TermSet (Sets.fromList v1)))) t)-    in  -      let decode = (\ad -> \term -> Flows.bind (Compute.coderDecode (Compute.adapterCoder ad) term) (\listTerm -> forListTerm listTerm))-      in  -        let forSetType = (\st -> Flows.bind (termAdapter (Core.TypeList st)) (\ad -> Flows.pure (Compute.Adapter {-                Compute.adapterIsLossy = (Compute.adapterIsLossy ad),-                Compute.adapterSource = t,-                Compute.adapterTarget = (Compute.adapterTarget ad),-                Compute.adapterCoder = Compute.Coder {-                  Compute.coderEncode = (encode ad),-                  Compute.coderDecode = (decode ad)}})))-        in ((\x -> case x of-          Core.TypeSet v1 -> (forSetType v1)) t)---- | Simplify application types-simplifyApplication :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-simplifyApplication t =  -  let encdec = (\ad -> \dir -> \term -> Utils.encodeDecode dir (Compute.adapterCoder ad) term)-  in  -    let forApplicationType = (\at ->  -            let lhs = (Core.applicationTypeFunction at)-            in (Flows.bind (termAdapter lhs) (\ad -> Flows.pure (Compute.Adapter {-              Compute.adapterIsLossy = False,-              Compute.adapterSource = t,-              Compute.adapterTarget = (Compute.adapterTarget ad),-              Compute.adapterCoder = (Utils.bidirectional (encdec ad))}))))-    in ((\x -> case x of-      Core.TypeApplication v1 -> (forApplicationType v1)) t)---- | Create an adapter for any type-termAdapter :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-termAdapter typ =  -  let constraints = (\cx -> Coders.languageConstraints (Coders.adapterContextLanguage cx))-  in  -    let supported = (\cx -> Utils.typeIsSupported (constraints cx))-    in  -      let variantIsSupported = (\cx -> \t -> Sets.member (Reflect.typeVariant t) (Coders.languageConstraintsTypeVariants (constraints cx)))-      in  -        let supportedAtTopLevel = (\cx -> \t -> Logic.and (variantIsSupported cx t) (Coders.languageConstraintsTypes (constraints cx) t))-        in  -          let pass = (\t -> (\x -> case x of-                  Variants.TypeVariantAnnotated -> []-                  Variants.TypeVariantApplication -> [-                    passApplication]-                  Variants.TypeVariantEither -> [-                    passEither]-                  Variants.TypeVariantForall -> [-                    passForall]-                  Variants.TypeVariantFunction -> [-                    passFunction]-                  Variants.TypeVariantList -> [-                    passList]-                  Variants.TypeVariantLiteral -> [-                    passLiteral]-                  Variants.TypeVariantMap -> [-                    passMap]-                  Variants.TypeVariantMaybe -> [-                    passOptional,-                    maybeToList]-                  Variants.TypeVariantPair -> []-                  Variants.TypeVariantRecord -> [-                    passRecord]-                  Variants.TypeVariantSet -> [-                    passSet]-                  Variants.TypeVariantUnion -> [-                    passUnion]-                  Variants.TypeVariantUnit -> [-                    passUnit]-                  Variants.TypeVariantVariable -> []-                  Variants.TypeVariantWrap -> [-                    passWrapped]) (Reflect.typeVariant (Rewriting.deannotateType t)))-          in  -            let trySubstitution = (\t -> (\x -> case x of-                    Variants.TypeVariantAnnotated -> []-                    Variants.TypeVariantApplication -> [-                      simplifyApplication]-                    Variants.TypeVariantEither -> []-                    Variants.TypeVariantForall -> [-                      lambdaToMonotype]-                    Variants.TypeVariantFunction -> [-                      functionToUnion]-                    Variants.TypeVariantList -> []-                    Variants.TypeVariantLiteral -> []-                    Variants.TypeVariantMap -> []-                    Variants.TypeVariantMaybe -> [-                      maybeToList]-                    Variants.TypeVariantPair -> []-                    Variants.TypeVariantRecord -> []-                    Variants.TypeVariantSet -> [-                      setToList]-                    Variants.TypeVariantUnion -> [-                      unionToRecord]-                    Variants.TypeVariantUnit -> [-                      unitToRecord]-                    Variants.TypeVariantVariable -> []-                    Variants.TypeVariantWrap -> [-                      wrapToUnwrapped]) (Reflect.typeVariant t))-            in  -              let alts = (\cx -> \t -> Flows.mapList (\c -> c t) (Logic.ifElse (supportedAtTopLevel cx t) (pass t) (trySubstitution t)))-              in  -                let dflt = ((\x -> case x of-                        Core.TypeVariable v1 -> (forTypeReference v1)-                        _ -> (Flows.bind Monads.getState (\cx -> Utils.chooseAdapter (alts cx) (supported cx) Core__.type_ Core__.type_ typ))) typ)-                in ((\x -> case x of-                  Core.TypeAnnotated v1 -> (Flows.bind (termAdapter (Core.annotatedTypeBody v1)) (\ad -> Flows.pure (Compute.Adapter {-                    Compute.adapterIsLossy = (Compute.adapterIsLossy ad),-                    Compute.adapterSource = (Compute.adapterSource ad),-                    Compute.adapterTarget = (Core.TypeAnnotated (Core.AnnotatedType {-                      Core.annotatedTypeBody = (Compute.adapterTarget ad),-                      Core.annotatedTypeAnnotation = (Core.annotatedTypeAnnotation v1)})),-                    Compute.adapterCoder = (Compute.adapterCoder ad)})))-                  _ -> (Monads.withTrace (Strings.cat2 "adapter for " (Core__.type_ typ)) dflt)) typ)---- | Convert union types to record types-unionToRecord :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-unionToRecord t =  -  let forField = (\field ->  -          let fn = (Core.fieldName field)-          in  -            let fterm = (Core.fieldTerm field)-            in ((\x -> case x of-              Core.TermMaybe v1 -> (Maybes.bind v1 (\t -> Just (Core.Field {-                Core.fieldName = fn,-                Core.fieldTerm = t})))) fterm))-  in  -    let fromRecordFields = (\term -> \term_ -> \t_ -> \fields ->  -            let matches = (Maybes.mapMaybe forField fields)-            in (Logic.ifElse (Lists.null matches) (Flows.fail (Strings.cat [-              "cannot convert term back to union: ",-              (Core__.term term),-              " where type = ",-              (Core__.type_ t),-              "    and target type = ",-              (Core__.type_ t_)])) (Flows.pure (Lists.head matches))))-    in  -      let forRecTerm = (\nm -> \ad -> \term -> \recTerm -> (\x -> case x of-              Core.TermRecord v1 ->  -                let fields = (Core.recordFields v1)-                in (Flows.bind (fromRecordFields term (Core.TermRecord (Core.Record {-                  Core.recordTypeName = nm,-                  Core.recordFields = fields})) (Compute.adapterTarget ad) fields) (\resultField -> Flows.pure (Core.TermUnion (Core.Injection {-                  Core.injectionTypeName = nm,-                  Core.injectionField = resultField}))))) recTerm)-      in ((\x -> case x of-        Core.TypeUnion v1 ->  -          let nm = (Core.rowTypeTypeName v1)-          in  -            let sfields = (Core.rowTypeFields v1)-            in  -              let target = (Core.TypeRecord (unionTypeToRecordType v1))-              in  -                let toRecordField = (\term -> \fn -> \f ->  -                        let fn_ = (Core.fieldTypeName f)-                        in Core.Field {-                          Core.fieldName = fn_,-                          Core.fieldTerm = (Core.TermMaybe (Logic.ifElse (Equality.equal fn_ fn) (Just term) Nothing))})-                in (Flows.bind (termAdapter target) (\ad -> Flows.pure (Compute.Adapter {-                  Compute.adapterIsLossy = (Compute.adapterIsLossy ad),-                  Compute.adapterSource = t,-                  Compute.adapterTarget = (Compute.adapterTarget ad),-                  Compute.adapterCoder = Compute.Coder {-                    Compute.coderEncode = (\term_ -> Flows.bind (withGraphContext (Core_.injection (Core.rowTypeTypeName v1) term_)) (\field ->  -                      let fn = (Core.fieldName field)-                      in  -                        let term = (Core.fieldTerm field)-                        in (Compute.coderEncode (Compute.adapterCoder ad) (Core.TermRecord (Core.Record {-                          Core.recordTypeName = nm,-                          Core.recordFields = (Lists.map (toRecordField term fn) sfields)}))))),-                    Compute.coderDecode = (\term -> Flows.bind (Compute.coderDecode (Compute.adapterCoder ad) term) (\recTerm -> forRecTerm nm ad term recTerm))}})))) t)---- | Convert a union row type to a record row type-unionTypeToRecordType :: (Core.RowType -> Core.RowType)-unionTypeToRecordType rt =  -  let makeOptional = (\f ->  -          let fn = (Core.fieldTypeName f)-          in  -            let ft = (Core.fieldTypeType f)-            in Core.FieldType {-              Core.fieldTypeName = fn,-              Core.fieldTypeType = (Rewriting.mapBeneathTypeAnnotations (\x -> Core.TypeMaybe x) ft)})-  in Core.RowType {-    Core.rowTypeTypeName = (Core.rowTypeTypeName rt),-    Core.rowTypeFields = (Lists.map makeOptional (Core.rowTypeFields rt))}---- | Convert unit terms to records-unitToRecord :: (t0 -> Compute.Flow t1 (Compute.Adapter t2 t3 Core.Type Core.Type Core.Term Core.Term))-unitToRecord _ = (Flows.pure (Compute.Adapter {-  Compute.adapterIsLossy = False,-  Compute.adapterSource = Core.TypeUnit,-  Compute.adapterTarget = (Core.TypeRecord (Core.RowType {-    Core.rowTypeTypeName = (Core.Name "_Unit"),-    Core.rowTypeFields = []})),-  Compute.adapterCoder = Compute.Coder {-    Compute.coderEncode = (\_ -> Flows.pure (Core.TermRecord (Core.Record {-      Core.recordTypeName = (Core.Name "_Unit"),-      Core.recordFields = []}))),-    Compute.coderDecode = (\_ -> Flows.pure Core.TermUnit)}}))---- | Convert wrapped types to unwrapped types-wrapToUnwrapped :: (Core.Type -> Compute.Flow Coders.AdapterContext (Compute.Adapter Coders.AdapterContext Coders.AdapterContext Core.Type Core.Type Core.Term Core.Term))-wrapToUnwrapped t = ((\x -> case x of-  Core.TypeWrap v1 ->  -    let tname = (Core.wrappedTypeTypeName v1)-    in  -      let typ = (Core.wrappedTypeBody v1)-      in  -        let encode = (\ad -> \term -> Flows.bind (withGraphContext (Core_.wrap tname term)) (\unwrapped -> Compute.coderEncode (Compute.adapterCoder ad) unwrapped))-        in  -          let decode = (\ad -> \term -> Flows.bind (Compute.coderDecode (Compute.adapterCoder ad) term) (\decoded -> Flows.pure (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = tname,-                  Core.wrappedTermBody = decoded}))))-          in (Flows.bind (termAdapter typ) (\ad -> Flows.pure (Compute.Adapter {-            Compute.adapterIsLossy = False,-            Compute.adapterSource = t,-            Compute.adapterTarget = (Compute.adapterTarget ad),-            Compute.adapterCoder = Compute.Coder {-              Compute.coderEncode = (encode ad),-              Compute.coderDecode = (decode ad)}})))) t)---- | Execute a flow with graph context-withGraphContext :: (Compute.Flow Graph.Graph t0 -> Compute.Flow Coders.AdapterContext t0)-withGraphContext f = (Flows.bind Monads.getState (\cx -> Monads.withState (Coders.adapterContextGraph cx) f))
− src/gen-main/haskell/Hydra/Adapt/Utils.hs
@@ -1,155 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Additional adapter utilities, above and beyond the generated ones.--module Hydra.Adapt.Utils where--import qualified Hydra.Coders as Coders-import qualified Hydra.Compute as Compute-import qualified Hydra.Core as Core-import qualified Hydra.Formatting as Formatting-import qualified Hydra.Lib.Flows as Flows-import qualified Hydra.Lib.Lists as Lists-import qualified Hydra.Lib.Literals as Literals-import qualified Hydra.Lib.Logic as Logic-import qualified Hydra.Lib.Maybes as Maybes-import qualified Hydra.Lib.Sets as Sets-import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Module as Module-import qualified Hydra.Names as Names-import qualified Hydra.Reflect as Reflect-import qualified Hydra.Rewriting as Rewriting-import qualified Hydra.Show.Core as Core_-import qualified Hydra.Util as Util-import qualified Hydra.Variants as Variants-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S---- | Create a bidirectional coder from a direction-aware function-bidirectional :: ((Coders.CoderDirection -> t0 -> Compute.Flow t1 t0) -> Compute.Coder t1 t1 t0 t0)-bidirectional f = Compute.Coder {-  Compute.coderEncode = (f Coders.CoderDirectionEncode),-  Compute.coderDecode = (f Coders.CoderDirectionDecode)}---- | Choose an appropriate adapter for a type-chooseAdapter :: ((t0 -> Compute.Flow t1 [Compute.Adapter t2 t3 t0 t0 t4 t4]) -> (t0 -> Bool) -> (t0 -> String) -> (t0 -> String) -> t0 -> Compute.Flow t1 (Compute.Adapter t2 t3 t0 t0 t4 t4))-chooseAdapter alts supported show describe typ = (Logic.ifElse (supported typ) (Flows.pure (Compute.Adapter {-  Compute.adapterIsLossy = False,-  Compute.adapterSource = typ,-  Compute.adapterTarget = typ,-  Compute.adapterCoder = idCoder})) (Flows.bind (alts typ) (\raw ->  -  let candidates = (Lists.filter (\adapter -> supported (Compute.adapterTarget adapter)) raw)-  in (Logic.ifElse (Lists.null candidates) (Flows.fail (Strings.cat [-    "no adapters found for ",-    (describe typ),-    (Logic.ifElse (Lists.null raw) "" (Strings.cat [-      " (discarded ",-      (Literals.showInt32 (Lists.length raw)),-      " unsupported candidate types: ",-      (Core_.list show (Lists.map Compute.adapterTarget raw)),-      ")"])),-    ". Original type: ",-    (show typ)])) (Flows.pure (Lists.head candidates))))))---- | Compose two coders-composeCoders :: (Compute.Coder t0 t1 t2 t3 -> Compute.Coder t0 t1 t3 t4 -> Compute.Coder t0 t1 t2 t4)-composeCoders c1 c2 = Compute.Coder {-  Compute.coderEncode = (\a -> Flows.bind (Compute.coderEncode c1 a) (\b1 -> Compute.coderEncode c2 b1)),-  Compute.coderDecode = (\c -> Flows.bind (Compute.coderDecode c2 c) (\b2 -> Compute.coderDecode c1 b2))}---- | Apply coder in the specified direction-encodeDecode :: (Coders.CoderDirection -> Compute.Coder t0 t0 t1 t1 -> t1 -> Compute.Flow t0 t1)-encodeDecode dir coder term = ((\x -> case x of-  Coders.CoderDirectionEncode -> (Compute.coderEncode coder term)-  Coders.CoderDirectionDecode -> (Compute.coderDecode coder term)) dir)---- | Check if float type is supported by language constraints-floatTypeIsSupported :: (Coders.LanguageConstraints -> Core.FloatType -> Bool)-floatTypeIsSupported constraints ft = (Sets.member ft (Coders.languageConstraintsFloatTypes constraints))---- | Identity adapter-idAdapter :: (t0 -> Compute.Adapter t1 t2 t0 t0 t3 t3)-idAdapter t = Compute.Adapter {-  Compute.adapterIsLossy = False,-  Compute.adapterSource = t,-  Compute.adapterTarget = t,-  Compute.adapterCoder = idCoder}---- | Identity coder-idCoder :: (Compute.Coder t0 t1 t2 t2)-idCoder = Compute.Coder {-  Compute.coderEncode = Flows.pure,-  Compute.coderDecode = Flows.pure}---- | Check if integer type is supported by language constraints-integerTypeIsSupported :: (Coders.LanguageConstraints -> Core.IntegerType -> Bool)-integerTypeIsSupported constraints it = (Sets.member it (Coders.languageConstraintsIntegerTypes constraints))---- | Check if literal type is supported by language constraints-literalTypeIsSupported :: (Coders.LanguageConstraints -> Core.LiteralType -> Bool)-literalTypeIsSupported constraints lt =  -  let isSupported = (\lt -> (\x -> case x of-          Core.LiteralTypeFloat v1 -> (floatTypeIsSupported constraints v1)-          Core.LiteralTypeInteger v1 -> (integerTypeIsSupported constraints v1)-          _ -> True) lt)-  in (Logic.and (Sets.member (Reflect.literalTypeVariant lt) (Coders.languageConstraintsLiteralVariants constraints)) (isSupported lt))---- | Convert a name to file path, given case conventions for namespaces and local names, and assuming '/' as the file path separator-nameToFilePath :: (Util.CaseConvention -> Util.CaseConvention -> Module.FileExtension -> Core.Name -> String)-nameToFilePath nsConv localConv ext name =  -  let qualName = (Names.qualifyName name)-  in  -    let ns = (Module.qualifiedNameNamespace qualName)-    in  -      let local = (Module.qualifiedNameLocal qualName)-      in  -        let nsToFilePath = (\ns -> Strings.intercalate "/" (Lists.map (\part -> Formatting.convertCase Util.CaseConventionCamel nsConv part) (Strings.splitOn "." (Module.unNamespace ns))))-        in  -          let prefix = (Maybes.maybe "" (\n -> Strings.cat2 (nsToFilePath n) "/") ns)-          in  -            let suffix = (Formatting.convertCase Util.CaseConventionPascal localConv local)-            in (Strings.cat [-              prefix,-              suffix,-              ".",-              (Module.unFileExtension ext)])---- | Check if type is supported by language constraints-typeIsSupported :: (Coders.LanguageConstraints -> Core.Type -> Bool)-typeIsSupported constraints t =  -  let base = (Rewriting.deannotateType t)-  in  -    let isVariable = (\v -> (\x -> case x of-            Variants.TypeVariantVariable -> True-            _ -> False) v)-    in  -      let isSupportedVariant = (\v -> Logic.or (isVariable v) (Sets.member v (Coders.languageConstraintsTypeVariants constraints)))-      in  -        let isSupported = (\base -> (\x -> case x of-                Core.TypeAnnotated v1 -> (typeIsSupported constraints (Core.annotatedTypeBody v1))-                Core.TypeApplication v1 -> (Logic.and (typeIsSupported constraints (Core.applicationTypeFunction v1)) (typeIsSupported constraints (Core.applicationTypeArgument v1)))-                Core.TypeEither v1 -> (Logic.and (typeIsSupported constraints (Core.eitherTypeLeft v1)) (typeIsSupported constraints (Core.eitherTypeRight v1)))-                Core.TypeForall v1 -> (typeIsSupported constraints (Core.forallTypeBody v1))-                Core.TypeFunction v1 -> (Logic.and (typeIsSupported constraints (Core.functionTypeDomain v1)) (typeIsSupported constraints (Core.functionTypeCodomain v1)))-                Core.TypeList v1 -> (typeIsSupported constraints v1)-                Core.TypeLiteral v1 -> (literalTypeIsSupported constraints v1)-                Core.TypeMap v1 -> (Logic.and (typeIsSupported constraints (Core.mapTypeKeys v1)) (typeIsSupported constraints (Core.mapTypeValues v1)))-                Core.TypeMaybe v1 -> (typeIsSupported constraints v1)-                Core.TypePair v1 -> (Logic.and (typeIsSupported constraints (Core.pairTypeFirst v1)) (typeIsSupported constraints (Core.pairTypeSecond v1)))-                Core.TypeRecord v1 -> (Lists.foldl Logic.and True (Lists.map (\field -> typeIsSupported constraints (Core.fieldTypeType field)) (Core.rowTypeFields v1)))-                Core.TypeSet v1 -> (typeIsSupported constraints v1)-                Core.TypeUnion v1 -> (Lists.foldl Logic.and True (Lists.map (\field -> typeIsSupported constraints (Core.fieldTypeType field)) (Core.rowTypeFields v1)))-                Core.TypeUnit -> True-                Core.TypeWrap v1 -> (typeIsSupported constraints (Core.wrappedTypeBody v1))-                Core.TypeVariable _ -> True) base)-        in (Logic.and (Coders.languageConstraintsTypes constraints base) (Logic.and (isSupportedVariant (Reflect.typeVariant base)) (isSupported base)))---- | Create a unidirectional coder-unidirectionalCoder :: ((t0 -> Compute.Flow t1 t2) -> Compute.Coder t1 t3 t0 t2)-unidirectionalCoder m = Compute.Coder {-  Compute.coderEncode = m,-  Compute.coderDecode = (\_ -> Flows.fail "inbound mapping is unsupported")}
src/gen-main/haskell/Hydra/Annotations.hs view
@@ -5,16 +5,16 @@ module Hydra.Annotations where  import qualified Hydra.Classes as Classes-import qualified Hydra.Compute as Compute import qualified Hydra.Constants as Constants+import qualified Hydra.Context as Context import qualified Hydra.Core as Core import qualified Hydra.Decode.Core as Core_ import qualified Hydra.Encode.Core as Core__+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Core as Core___ import qualified Hydra.Graph as Graph-import qualified Hydra.Lexical as Lexical+import qualified Hydra.Lib.Eithers as Eithers import qualified Hydra.Lib.Equality as Equality-import qualified Hydra.Lib.Flows as Flows import qualified Hydra.Lib.Lists as Lists import qualified Hydra.Lib.Logic as Logic import qualified Hydra.Lib.Maps as Maps@@ -22,10 +22,9 @@ import qualified Hydra.Lib.Maybes as Maybes import qualified Hydra.Lib.Pairs as Pairs import qualified Hydra.Lib.Sets as Sets-import qualified Hydra.Monads as Monads+import qualified Hydra.Lib.Strings as Strings import qualified Hydra.Rewriting as Rewriting import qualified Hydra.Show.Core as Core____-import qualified Hydra.Util as Util import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -35,244 +34,290 @@  -- | Aggregate annotations from nested structures aggregateAnnotations :: Ord t2 => ((t0 -> Maybe t1) -> (t1 -> t0) -> (t1 -> M.Map t2 t3) -> t0 -> M.Map t2 t3)-aggregateAnnotations getValue getX getAnns t =  -  let toPairs = (\rest -> \t -> Maybes.maybe rest (\yy -> toPairs (Lists.cons (Maps.toList (getAnns yy)) rest) (getX yy)) (getValue t))-  in (Maps.fromList (Lists.concat (toPairs [] t)))+aggregateAnnotations getValue getX getAnns t = --- | Debug if the debug ID matches-debugIf :: (t0 -> String -> Compute.Flow t1 ())-debugIf debugId message =  -  let checkAndFail = (\desc -> Logic.ifElse (Equality.equal desc (Just "debugId")) (Flows.fail message) (Flows.pure ()))-  in (Flows.bind getDebugId checkAndFail)+      let toPairs =+              \rest -> \t -> Maybes.maybe rest (\yy -> toPairs (Lists.cons (Maps.toList (getAnns yy)) rest) (getX yy)) (getValue t)+      in (Maps.fromList (Lists.concat (toPairs [] t))) --- | Fail if the given flag is set-failOnFlag :: (Core.Name -> String -> Compute.Flow t0 ())-failOnFlag flag msg = (Flows.bind (hasFlag flag) (\val -> Logic.ifElse val (Flows.fail msg) (Flows.pure ())))+-- | Debug if the debug ID matches (Either version)+debugIf :: Context.Context -> String -> String -> Either (Context.InContext Errors.Error) ()+debugIf cx debugId message =+    Eithers.bind (getDebugId cx) (\mid -> Logic.ifElse (Equality.equal mid (Just debugId)) (Left (Context.InContext {+      Context.inContextObject = (Errors.ErrorOther (Errors.OtherError message)),+      Context.inContextContext = cx})) (Right ())) --- | Get the debug ID from flow state-getDebugId :: (Compute.Flow t0 (Maybe String))-getDebugId = (Lexical.withEmptyGraph (Flows.bind (getAttr Constants.key_debugId) (\desc -> Flows.mapMaybe Core___.string desc)))+-- | Fail if the given flag is set (Either version)+failOnFlag :: Context.Context -> Core.Name -> String -> Either (Context.InContext Errors.Error) ()+failOnFlag cx flag msg =+    Eithers.bind (hasFlag cx flag) (\val -> Logic.ifElse val (Left (Context.InContext {+      Context.inContextObject = (Errors.ErrorOther (Errors.OtherError msg)),+      Context.inContextContext = cx})) (Right ())) --- | Get an attribute from the trace-getAttr :: (Core.Name -> Compute.Flow t0 (Maybe Core.Term))-getAttr key = (Compute.Flow (\s0 -> \t0 -> Compute.FlowState {-  Compute.flowStateValue = (Just (Maps.lookup key (Compute.traceOther t0))),-  Compute.flowStateState = s0,-  Compute.flowStateTrace = t0}))+-- | Get an attribute from a context (pure version)+getAttr :: Core.Name -> Context.Context -> Maybe Core.Term+getAttr key cx = Maps.lookup key (Context.contextOther cx) --- | Get an attribute with a default value-getAttrWithDefault :: (Core.Name -> Core.Term -> Compute.Flow t0 Core.Term)-getAttrWithDefault key def = (Flows.map (\mval -> Maybes.fromMaybe def mval) (getAttr key))+-- | Get an attribute with a default value from context (pure version)+getAttrWithDefault :: Core.Name -> Core.Term -> Context.Context -> Core.Term+getAttrWithDefault key def cx = Maybes.fromMaybe def (getAttr key cx) --- | Get a counter value-getCount :: (Core.Name -> Compute.Flow t0 Int)-getCount key = (Lexical.withEmptyGraph (Flows.bind (getAttrWithDefault key (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0)))) Core___.int32))+-- | Get a counter value from context (pure version)+getCount :: Core.Name -> Context.Context -> Int+getCount key cx =+    Maybes.maybe 0 (\term -> case term of+      Core.TermLiteral v0 -> case v0 of+        Core.LiteralInteger v1 -> case v1 of+          Core.IntegerValueInt32 v2 -> v2+          _ -> 0+        _ -> 0+      _ -> 0) (Maps.lookup key (Context.contextOther cx)) --- | Get description from annotations map-getDescription :: (M.Map Core.Name Core.Term -> Compute.Flow Graph.Graph (Maybe String))-getDescription anns = (Maybes.maybe (Flows.pure Nothing) (\term -> Flows.map Maybes.pure (Core___.string term)) (Maps.lookup (Core.Name "description") anns))+-- | Get the debug ID from context (Either version)+getDebugId :: Context.Context -> Either (Context.InContext Errors.Error) (Maybe String)+getDebugId cx =+    Maybes.maybe (Right Nothing) (\term -> Eithers.map Maybes.pure (Core___.string cx (Graph.Graph {+      Graph.graphBoundTerms = Maps.empty,+      Graph.graphBoundTypes = Maps.empty,+      Graph.graphClassConstraints = Maps.empty,+      Graph.graphLambdaVariables = Sets.empty,+      Graph.graphMetadata = Maps.empty,+      Graph.graphPrimitives = Maps.empty,+      Graph.graphSchemaTypes = Maps.empty,+      Graph.graphTypeVariables = Sets.empty}) term)) (getAttr Constants.key_debugId cx) +-- | Get description from annotations map (Either version)+getDescription :: Context.Context -> Graph.Graph -> M.Map Core.Name Core.Term -> Either (Context.InContext Errors.Error) (Maybe String)+getDescription cx graph anns =+    Maybes.maybe (Right Nothing) (\term -> Eithers.map Maybes.pure (Core___.string cx graph term)) (Maps.lookup (Core.Name "description") anns)+ -- | Get a term annotation-getTermAnnotation :: (Core.Name -> Core.Term -> Maybe Core.Term)-getTermAnnotation key term = (Maps.lookup key (termAnnotationInternal term))+getTermAnnotation :: Core.Name -> Core.Term -> Maybe Core.Term+getTermAnnotation key term = Maps.lookup key (termAnnotationInternal term) --- | Get term description. Peels through TermTypeLambda and TermTypeApplication wrappers (added by inference for polymorphic bindings) to find the description annotation underneath.-getTermDescription :: (Core.Term -> Compute.Flow Graph.Graph (Maybe String))-getTermDescription term =  -  let peel = (\t -> (\x -> case x of-          Core.TermTypeLambda v1 -> (peel (Core.typeLambdaBody v1))-          Core.TermTypeApplication v1 -> (peel (Core.typeApplicationTermBody v1))-          _ -> t) t)-  in (getDescription (termAnnotationInternal (peel term)))+-- | Get term description (Either version)+getTermDescription :: Context.Context -> Graph.Graph -> Core.Term -> Either (Context.InContext Errors.Error) (Maybe String)+getTermDescription cx graph term = +      let peel =+              \t -> case t of+                Core.TermTypeLambda v0 -> peel (Core.typeLambdaBody v0)+                Core.TermTypeApplication v0 -> peel (Core.typeApplicationTermBody v0)+                _ -> t+      in (getDescription cx graph (termAnnotationInternal (peel term)))+ -- | Get type from annotations-getType :: (M.Map Core.Name Core.Term -> Compute.Flow Graph.Graph (Maybe Core.Type))-getType anns = (Flows.bind Monads.getState (\cx -> Maybes.maybe (Flows.pure Nothing) (\dat -> Flows.map Maybes.pure (Monads.withTrace "get type" (Monads.eitherToFlow Util.unDecodingError (Core_.type_ cx dat)))) (Maps.lookup Constants.key_type anns)))+getType :: Graph.Graph -> M.Map Core.Name Core.Term -> Either Errors.DecodingError (Maybe Core.Type)+getType graph anns =+    Maybes.maybe (Right Nothing) (\dat -> Eithers.map Maybes.pure (Core_.type_ graph dat)) (Maps.lookup Constants.key_type anns)  -- | Get a type annotation-getTypeAnnotation :: (Core.Name -> Core.Type -> Maybe Core.Term)-getTypeAnnotation key typ = (Maps.lookup key (typeAnnotationInternal typ))+getTypeAnnotation :: Core.Name -> Core.Type -> Maybe Core.Term+getTypeAnnotation key typ = Maps.lookup key (typeAnnotationInternal typ)  -- | Get type classes from term-getTypeClasses :: (Core.Term -> Compute.Flow Graph.Graph (M.Map Core.Name (S.Set Classes.TypeClass)))-getTypeClasses term = (Flows.bind Monads.getState (\cx ->  -  let decodeClass = (\term ->  -          let byName = (Maps.fromList [-                  (Core.Name "equality", Classes.TypeClassEquality),-                  (Core.Name "ordering", Classes.TypeClassOrdering)])-          in (Flows.bind (Core___.unitVariant (Core.Name "hydra.classes.TypeClass") term) (\fn -> Maybes.maybe (Monads.unexpected "type class" (Core____.term term)) Flows.pure (Maps.lookup fn byName))))-  in (Maybes.maybe (Flows.pure Maps.empty) (\term -> Core___.map (\t -> Monads.eitherToFlow Util.unDecodingError (Core_.name cx t)) (Core___.setOf decodeClass) term) (getTermAnnotation Constants.key_classes term))))+getTypeClasses :: Context.Context -> Graph.Graph -> Core.Term -> Either (Context.InContext Errors.Error) (M.Map Core.Name (S.Set Classes.TypeClass))+getTypeClasses cx graph term = --- | Get type description-getTypeDescription :: (Core.Type -> Compute.Flow Graph.Graph (Maybe String))-getTypeDescription typ = (getDescription (typeAnnotationInternal typ))+      let decodeClass =+              \term ->+                let byName =+                        Maps.fromList [+                          (Core.Name "equality", Classes.TypeClassEquality),+                          (Core.Name "ordering", Classes.TypeClassOrdering)]+                in (Eithers.bind (Core___.unitVariant cx (Core.Name "hydra.classes.TypeClass") graph term) (\fn -> Maybes.maybe (Left (Context.InContext {+                  Context.inContextObject = (Errors.ErrorOther (Errors.OtherError (Strings.cat2 "unexpected: expected type class, got " (Core____.term term)))),+                  Context.inContextContext = cx})) (\x -> Right x) (Maps.lookup fn byName)))+      in (Maybes.maybe (Right Maps.empty) (\term -> Core___.map cx (\t -> Eithers.bimap (\de -> Context.InContext {+        Context.inContextObject = (Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError de))),+        Context.inContextContext = cx}) (\x -> x) (Core_.name graph t)) (Core___.setOf cx decodeClass graph) graph term) (getTermAnnotation Constants.key_classes term)) --- | For a typed term, decide whether a coder should encode it as a native type expression, or as a Hydra type expression.-isNativeType :: (Core.Binding -> Bool)-isNativeType el =  -  let isFlaggedAsFirstClassType = (Maybes.fromMaybe False (Maybes.map (\_ -> True) (getTermAnnotation Constants.key_firstClassType (Core.bindingTerm el))))-  in (Maybes.maybe False (\ts -> Logic.and (Equality.equal ts (Core.TypeScheme {-    Core.typeSchemeVariables = [],-    Core.typeSchemeType = (Core.TypeVariable (Core.Name "hydra.core.Type")),-    Core.typeSchemeConstraints = Nothing})) (Logic.not isFlaggedAsFirstClassType)) (Core.bindingType el))+-- | Get type description (Either version)+getTypeDescription :: Context.Context -> Graph.Graph -> Core.Type -> Either (Context.InContext Errors.Error) (Maybe String)+getTypeDescription cx graph typ = getDescription cx graph (typeAnnotationInternal typ)  -- | Check if annotations contain description-hasDescription :: (M.Map Core.Name t0 -> Bool)-hasDescription anns = (Maybes.isJust (Maps.lookup Constants.key_description anns))+hasDescription :: M.Map Core.Name t0 -> Bool+hasDescription anns = Maybes.isJust (Maps.lookup Constants.key_description anns) --- | Check if flag is set-hasFlag :: (Core.Name -> Compute.Flow t0 Bool)-hasFlag flag = (Lexical.withEmptyGraph (Flows.bind (getAttrWithDefault flag (Core.TermLiteral (Core.LiteralBoolean False))) (\term -> Core___.boolean term)))+-- | Check if flag is set (Either version)+hasFlag :: Context.Context -> Core.Name -> Either (Context.InContext Errors.Error) Bool+hasFlag cx flag = +      let term = getAttrWithDefault flag (Core.TermLiteral (Core.LiteralBoolean False)) cx+      in (Core___.boolean cx (Graph.Graph {+        Graph.graphBoundTerms = Maps.empty,+        Graph.graphBoundTypes = Maps.empty,+        Graph.graphClassConstraints = Maps.empty,+        Graph.graphLambdaVariables = Sets.empty,+        Graph.graphMetadata = Maps.empty,+        Graph.graphPrimitives = Maps.empty,+        Graph.graphSchemaTypes = Maps.empty,+        Graph.graphTypeVariables = Sets.empty}) term)+ -- | Check if type has description-hasTypeDescription :: (Core.Type -> Bool)-hasTypeDescription typ = (hasDescription (typeAnnotationInternal typ))+hasTypeDescription :: Core.Type -> Bool+hasTypeDescription typ = hasDescription (typeAnnotationInternal typ) --- | Return a zero-indexed counter for the given key: 0, 1, 2, ...-nextCount :: (Core.Name -> Compute.Flow t0 Int)-nextCount key = (Flows.bind (getCount key) (\count -> Flows.map (\_ -> count) (putCount key (Math.add count 1))))+-- | For a typed term, decide whether a coder should encode it as a native type expression, or as a Hydra type expression.+isNativeType :: Core.Binding -> Bool+isNativeType el = +      let isFlaggedAsFirstClassType =+              Maybes.fromMaybe False (Maybes.map (\_ -> True) (getTermAnnotation Constants.key_firstClassType (Core.bindingTerm el)))+      in (Maybes.maybe False (\ts -> Logic.and (Equality.equal ts (Core.TypeScheme {+        Core.typeSchemeVariables = [],+        Core.typeSchemeType = (Core.TypeVariable (Core.Name "hydra.core.Type")),+        Core.typeSchemeConstraints = Nothing})) (Logic.not isFlaggedAsFirstClassType)) (Core.bindingType el))++-- | Return a zero-indexed counter for the given key and updated context (pure version)+nextCount :: Core.Name -> Context.Context -> (Int, Context.Context)+nextCount key cx =++      let count = getCount key cx+      in (count, (putCount key (Math.add count 1) cx))+ -- | Normalize term annotations-normalizeTermAnnotations :: (Core.Term -> Core.Term)-normalizeTermAnnotations term =  -  let anns = (termAnnotationInternal term)-  in  -    let stripped = (Rewriting.deannotateTerm term)-    in (Logic.ifElse (Maps.null anns) stripped (Core.TermAnnotated (Core.AnnotatedTerm {-      Core.annotatedTermBody = stripped,-      Core.annotatedTermAnnotation = anns})))+normalizeTermAnnotations :: Core.Term -> Core.Term+normalizeTermAnnotations term = +      let anns = termAnnotationInternal term+          stripped = Rewriting.deannotateTerm term+      in (Logic.ifElse (Maps.null anns) stripped (Core.TermAnnotated (Core.AnnotatedTerm {+        Core.annotatedTermBody = stripped,+        Core.annotatedTermAnnotation = anns})))+ -- | Normalize type annotations-normalizeTypeAnnotations :: (Core.Type -> Core.Type)-normalizeTypeAnnotations typ =  -  let anns = (typeAnnotationInternal typ)-  in  -    let stripped = (Rewriting.deannotateType typ)-    in (Logic.ifElse (Maps.null anns) stripped (Core.TypeAnnotated (Core.AnnotatedType {-      Core.annotatedTypeBody = stripped,-      Core.annotatedTypeAnnotation = anns})))+normalizeTypeAnnotations :: Core.Type -> Core.Type+normalizeTypeAnnotations typ = --- | Set an attribute in the trace-putAttr :: (Core.Name -> Core.Term -> Compute.Flow t0 ())-putAttr key val = (Compute.Flow (\s0 -> \t0 -> Compute.FlowState {-  Compute.flowStateValue = (Just ()),-  Compute.flowStateState = s0,-  Compute.flowStateTrace = Compute.Trace {-    Compute.traceStack = (Compute.traceStack t0),-    Compute.traceMessages = (Compute.traceMessages t0),-    Compute.traceOther = (Maps.insert key val (Compute.traceOther t0))}}))+      let anns = typeAnnotationInternal typ+          stripped = Rewriting.deannotateType typ+      in (Logic.ifElse (Maps.null anns) stripped (Core.TypeAnnotated (Core.AnnotatedType {+        Core.annotatedTypeBody = stripped,+        Core.annotatedTypeAnnotation = anns}))) --- | Set counter value-putCount :: (Core.Name -> Int -> Compute.Flow t0 ())-putCount key count = (putAttr key (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 count))))+-- | Set an attribute in a context+putAttr :: Core.Name -> Core.Term -> Context.Context -> Context.Context+putAttr key val cx =+    Context.Context {+      Context.contextTrace = (Context.contextTrace cx),+      Context.contextMessages = (Context.contextMessages cx),+      Context.contextOther = (Maps.insert key val (Context.contextOther cx))} --- | Reset counter to zero-resetCount :: (Core.Name -> Compute.Flow t0 ())-resetCount key = (putAttr key (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))))+-- | Set counter value in context+putCount :: Core.Name -> Int -> Context.Context -> Context.Context+putCount key count cx = putAttr key (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 count))) cx +-- | Reset counter to zero in context+resetCount :: Core.Name -> Context.Context -> Context.Context+resetCount key cx = putAttr key (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 0))) cx+ -- | Set annotation in map setAnnotation :: Ord t0 => (t0 -> Maybe t1 -> M.Map t0 t1 -> M.Map t0 t1)-setAnnotation key val m = (Maps.alter (\_ -> val) key m)+setAnnotation key val m = Maps.alter (\_ -> val) key m  -- | Set description in annotations-setDescription :: (Maybe String -> M.Map Core.Name Core.Term -> M.Map Core.Name Core.Term)-setDescription d = (setAnnotation Constants.key_description (Maybes.map (\arg_ -> (\x -> Core.TermLiteral x) ((\x -> Core.LiteralString x) arg_)) d))+setDescription :: Maybe String -> M.Map Core.Name Core.Term -> M.Map Core.Name Core.Term+setDescription d =+    setAnnotation Constants.key_description (Maybes.map (\arg_ -> (\x -> Core.TermLiteral x) ((\x -> Core.LiteralString x) arg_)) d)  -- | Set term annotation-setTermAnnotation :: (Core.Name -> Maybe Core.Term -> Core.Term -> Core.Term)-setTermAnnotation key val term =  -  let term_ = (Rewriting.deannotateTerm term)-  in  -    let anns = (setAnnotation key val (termAnnotationInternal term))-    in (Logic.ifElse (Maps.null anns) term_ (Core.TermAnnotated (Core.AnnotatedTerm {-      Core.annotatedTermBody = term_,-      Core.annotatedTermAnnotation = anns})))+setTermAnnotation :: Core.Name -> Maybe Core.Term -> Core.Term -> Core.Term+setTermAnnotation key val term = +      let term_ = Rewriting.deannotateTerm term+          anns = setAnnotation key val (termAnnotationInternal term)+      in (Logic.ifElse (Maps.null anns) term_ (Core.TermAnnotated (Core.AnnotatedTerm {+        Core.annotatedTermBody = term_,+        Core.annotatedTermAnnotation = anns})))+ -- | Set term description-setTermDescription :: (Maybe String -> Core.Term -> Core.Term)-setTermDescription d = (setTermAnnotation Constants.key_description (Maybes.map (\s -> Core.TermLiteral (Core.LiteralString s)) d))+setTermDescription :: Maybe String -> Core.Term -> Core.Term+setTermDescription d =+    setTermAnnotation Constants.key_description (Maybes.map (\s -> Core.TermLiteral (Core.LiteralString s)) d)  -- | Set type in annotations-setType :: (Maybe Core.Type -> M.Map Core.Name Core.Term -> M.Map Core.Name Core.Term)-setType mt = (setAnnotation Constants.key_type (Maybes.map Core__.type_ mt))+setType :: Maybe Core.Type -> M.Map Core.Name Core.Term -> M.Map Core.Name Core.Term+setType mt = setAnnotation Constants.key_type (Maybes.map Core__.type_ mt)  -- | Set type annotation-setTypeAnnotation :: (Core.Name -> Maybe Core.Term -> Core.Type -> Core.Type)-setTypeAnnotation key val typ =  -  let typ_ = (Rewriting.deannotateType typ)-  in  -    let anns = (setAnnotation key val (typeAnnotationInternal typ))-    in (Logic.ifElse (Maps.null anns) typ_ (Core.TypeAnnotated (Core.AnnotatedType {-      Core.annotatedTypeBody = typ_,-      Core.annotatedTypeAnnotation = anns})))+setTypeAnnotation :: Core.Name -> Maybe Core.Term -> Core.Type -> Core.Type+setTypeAnnotation key val typ = +      let typ_ = Rewriting.deannotateType typ+          anns = setAnnotation key val (typeAnnotationInternal typ)+      in (Logic.ifElse (Maps.null anns) typ_ (Core.TypeAnnotated (Core.AnnotatedType {+        Core.annotatedTypeBody = typ_,+        Core.annotatedTypeAnnotation = anns})))+ -- | Set type classes on term-setTypeClasses :: (M.Map Core.Name (S.Set Classes.TypeClass) -> Core.Term -> Core.Term)-setTypeClasses m term =  -  let encodeClass = (\tc -> (\x -> case x of-          Classes.TypeClassEquality -> (Core.TermUnion (Core.Injection {-            Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),-            Core.injectionField = Core.Field {-              Core.fieldName = (Core.Name "equality"),-              Core.fieldTerm = Core.TermUnit}}))-          Classes.TypeClassOrdering -> (Core.TermUnion (Core.Injection {-            Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),-            Core.injectionField = Core.Field {-              Core.fieldName = (Core.Name "ordering"),-              Core.fieldTerm = Core.TermUnit}}))) tc)-  in  -    let encodePair = (\nameClasses ->  -            let name = (Pairs.first nameClasses)-            in  -              let classes = (Pairs.second nameClasses)-              in (Core__.name name, (Core.TermSet (Sets.fromList (Lists.map encodeClass (Sets.toList classes))))))-    in  -      let encoded = (Logic.ifElse (Maps.null m) Nothing (Just (Core.TermMap (Maps.fromList (Lists.map encodePair (Maps.toList m))))))+setTypeClasses :: M.Map Core.Name (S.Set Classes.TypeClass) -> Core.Term -> Core.Term+setTypeClasses m term =++      let encodeClass =+              \tc -> case tc of+                Classes.TypeClassEquality -> Core.TermUnion (Core.Injection {+                  Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),+                  Core.injectionField = Core.Field {+                    Core.fieldName = (Core.Name "equality"),+                    Core.fieldTerm = Core.TermUnit}})+                Classes.TypeClassOrdering -> Core.TermUnion (Core.Injection {+                  Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),+                  Core.injectionField = Core.Field {+                    Core.fieldName = (Core.Name "ordering"),+                    Core.fieldTerm = Core.TermUnit}})+          encodePair =+                  \nameClasses ->+                    let name = Pairs.first nameClasses+                        classes = Pairs.second nameClasses+                    in (Core__.name name, (Core.TermSet (Sets.fromList (Lists.map encodeClass (Sets.toList classes)))))+          encoded = Logic.ifElse (Maps.null m) Nothing (Just (Core.TermMap (Maps.fromList (Lists.map encodePair (Maps.toList m)))))       in (setTermAnnotation Constants.key_classes encoded term)  -- | Set type description-setTypeDescription :: (Maybe String -> Core.Type -> Core.Type)-setTypeDescription d = (setTypeAnnotation Constants.key_description (Maybes.map (\arg_ -> (\x -> Core.TermLiteral x) ((\x -> Core.LiteralString x) arg_)) d))+setTypeDescription :: Maybe String -> Core.Type -> Core.Type+setTypeDescription d =+    setTypeAnnotation Constants.key_description (Maybes.map (\arg_ -> (\x -> Core.TermLiteral x) ((\x -> Core.LiteralString x) arg_)) d)  -- | Get internal term annotations-termAnnotationInternal :: (Core.Term -> M.Map Core.Name Core.Term)-termAnnotationInternal term =  -  let getAnn = (\t -> (\x -> case x of-          Core.TermAnnotated v1 -> (Just v1)-          _ -> Nothing) t)-  in (aggregateAnnotations getAnn (\at -> Core.annotatedTermBody at) (\at -> Core.annotatedTermAnnotation at) term)+termAnnotationInternal :: Core.Term -> M.Map Core.Name Core.Term+termAnnotationInternal term = +      let getAnn =+              \t -> case t of+                Core.TermAnnotated v0 -> Just v0+                _ -> Nothing+      in (aggregateAnnotations getAnn (\at -> Core.annotatedTermBody at) (\at -> Core.annotatedTermAnnotation at) term)+ -- | Get internal type annotations-typeAnnotationInternal :: (Core.Type -> M.Map Core.Name Core.Term)-typeAnnotationInternal typ =  -  let getAnn = (\t -> (\x -> case x of-          Core.TypeAnnotated v1 -> (Just v1)-          _ -> Nothing) t)-  in (aggregateAnnotations getAnn (\at -> Core.annotatedTypeBody at) (\at -> Core.annotatedTypeAnnotation at) typ)+typeAnnotationInternal :: Core.Type -> M.Map Core.Name Core.Term+typeAnnotationInternal typ = +      let getAnn =+              \t -> case t of+                Core.TypeAnnotated v0 -> Just v0+                _ -> Nothing+      in (aggregateAnnotations getAnn (\at -> Core.annotatedTypeBody at) (\at -> Core.annotatedTypeAnnotation at) typ)+ -- | Create a type element with proper annotations-typeElement :: (Core.Name -> Core.Type -> Core.Binding)-typeElement name typ =  -  let schemaTerm = (Core.TermVariable (Core.Name "hydra.core.Type"))-  in  -    let dataTerm = (normalizeTermAnnotations (Core.TermAnnotated (Core.AnnotatedTerm {-            Core.annotatedTermBody = (Core__.type_ typ),-            Core.annotatedTermAnnotation = (Maps.fromList [-              (Constants.key_type, schemaTerm)])})))-    in Core.Binding {-      Core.bindingName = name,-      Core.bindingTerm = dataTerm,-      Core.bindingType = (Just (Core.TypeScheme {-        Core.typeSchemeVariables = [],-        Core.typeSchemeType = (Core.TypeVariable (Core.Name "hydra.core.Type")),-        Core.typeSchemeConstraints = Nothing}))}+typeElement :: Core.Name -> Core.Type -> Core.Binding+typeElement name typ = --- | Execute different flows based on flag-whenFlag :: (Core.Name -> Compute.Flow t0 t1 -> Compute.Flow t0 t1 -> Compute.Flow t0 t1)-whenFlag flag fthen felse = (Flows.bind (hasFlag flag) (\b -> Logic.ifElse b fthen felse))+      let schemaTerm = Core.TermVariable (Core.Name "hydra.core.Type")+          dataTerm =+                  normalizeTermAnnotations (Core.TermAnnotated (Core.AnnotatedTerm {+                    Core.annotatedTermBody = (Core__.type_ typ),+                    Core.annotatedTermAnnotation = (Maps.fromList [+                      (Constants.key_type, schemaTerm)])}))+      in Core.Binding {+        Core.bindingName = name,+        Core.bindingTerm = dataTerm,+        Core.bindingType = (Just (Core.TypeScheme {+          Core.typeSchemeVariables = [],+          Core.typeSchemeType = (Core.TypeVariable (Core.Name "hydra.core.Type")),+          Core.typeSchemeConstraints = Nothing}))} --- | Provide an one-indexed, integer-valued 'depth' to a flow, where the depth is the number of nested calls. This is useful for generating variable names while avoiding conflicts between the variables of parents and children. E.g. a variable in an outer case/match statement might be "v1", whereas the variable of another case/match statement inside of the first one becomes "v2". See also nextCount.-withDepth :: (Core.Name -> (Int -> Compute.Flow t0 t1) -> Compute.Flow t0 t1)-withDepth key f = (Flows.bind (getCount key) (\count ->  -  let inc = (Math.add count 1)-  in (Flows.bind (putCount key inc) (\_ -> Flows.bind (f inc) (\r -> Flows.bind (putCount key count) (\_ -> Flows.pure r))))))+-- | Execute different branches based on flag (Either version)+whenFlag :: Context.Context -> Core.Name -> Either (Context.InContext Errors.Error) t0 -> Either (Context.InContext Errors.Error) t0 -> Either (Context.InContext Errors.Error) t0+whenFlag cx flag ethen eelse = Eithers.bind (hasFlag cx flag) (\b -> Logic.ifElse b ethen eelse)
src/gen-main/haskell/Hydra/Arity.hs view
@@ -16,42 +16,46 @@ import qualified Data.Set as S  -- | Find the arity (expected number of arguments) of a function-functionArity :: (Core.Function -> Int)-functionArity x = case x of-  Core.FunctionElimination _ -> 1-  Core.FunctionLambda v1 -> ((\i -> Math.add 1 i) (termArity (Core.lambdaBody v1)))-  Core.FunctionPrimitive _ -> 42+functionArity :: Core.Function -> Int+functionArity x =+    case x of+      Core.FunctionElimination _ -> 1+      Core.FunctionLambda v0 -> (\i -> Math.add 1 i) (termArity (Core.lambdaBody v0))+      Core.FunctionPrimitive _ -> 42  -- | Find the arity (expected number of arguments) of a primitive constant or function-primitiveArity :: (Graph.Primitive -> Int)-primitiveArity arg_ = ((\arg_ -> typeArity (Core.typeSchemeType arg_)) (Graph.primitiveType arg_))+primitiveArity :: Graph.Primitive -> Int+primitiveArity arg_ = (\arg_ -> typeArity (Core.typeSchemeType arg_)) (Graph.primitiveType arg_)  -- | Find the arity (expected number of arguments) of a term-termArity :: (Core.Term -> Int)-termArity x = case x of-  Core.TermApplication v1 -> ((\arg_ -> (\xapp -> Math.sub xapp 1) (termArity arg_)) (Core.applicationFunction v1))-  Core.TermFunction v1 -> (functionArity v1)-  _ -> 0+termArity :: Core.Term -> Int+termArity x =+    case x of+      Core.TermApplication v0 -> (\arg_ -> (\xapp -> Math.sub xapp 1) (termArity arg_)) (Core.applicationFunction v0)+      Core.TermFunction v0 -> functionArity v0+      _ -> 0  -- | Find the arity (expected number of arguments) of a type-typeArity :: (Core.Type -> Int)-typeArity x = case x of-  Core.TypeAnnotated v1 -> (typeArity (Core.annotatedTypeBody v1))-  Core.TypeApplication v1 -> (typeArity (Core.applicationTypeFunction v1))-  Core.TypeForall v1 -> (typeArity (Core.forallTypeBody v1))-  Core.TypeFunction v1 -> (Math.add 1 (typeArity (Core.functionTypeCodomain v1)))-  _ -> 0+typeArity :: Core.Type -> Int+typeArity x =+    case x of+      Core.TypeAnnotated v0 -> typeArity (Core.annotatedTypeBody v0)+      Core.TypeApplication v0 -> typeArity (Core.applicationTypeFunction v0)+      Core.TypeForall v0 -> typeArity (Core.forallTypeBody v0)+      Core.TypeFunction v0 -> Math.add 1 (typeArity (Core.functionTypeCodomain v0))+      _ -> 0  -- | Find the arity (expected number of arguments) of a type scheme-typeSchemeArity :: (Core.TypeScheme -> Int)-typeSchemeArity arg_ = (typeArity (Core.typeSchemeType arg_))+typeSchemeArity :: Core.TypeScheme -> Int+typeSchemeArity arg_ = typeArity (Core.typeSchemeType arg_)  -- | Uncurry a type expression into a list of types, turning a function type a -> b into cons a (uncurryType b)-uncurryType :: (Core.Type -> [Core.Type])-uncurryType t = ((\x -> case x of-  Core.TypeAnnotated v1 -> (uncurryType (Core.annotatedTypeBody v1))-  Core.TypeApplication v1 -> (uncurryType (Core.applicationTypeFunction v1))-  Core.TypeForall v1 -> (uncurryType (Core.forallTypeBody v1))-  Core.TypeFunction v1 -> (Lists.cons (Core.functionTypeDomain v1) (uncurryType (Core.functionTypeCodomain v1)))-  _ -> [-    t]) t)+uncurryType :: Core.Type -> [Core.Type]+uncurryType t =+    case t of+      Core.TypeAnnotated v0 -> uncurryType (Core.annotatedTypeBody v0)+      Core.TypeApplication v0 -> uncurryType (Core.applicationTypeFunction v0)+      Core.TypeForall v0 -> uncurryType (Core.forallTypeBody v0)+      Core.TypeFunction v0 -> Lists.cons (Core.functionTypeDomain v0) (uncurryType (Core.functionTypeCodomain v0))+      _ -> [+        t]
src/gen-main/haskell/Hydra/Ast.hs view
@@ -13,25 +13,25 @@ import qualified Data.Set as S  -- | Operator associativity-data Associativity = +data Associativity =   AssociativityNone  |   AssociativityLeft  |   AssociativityRight  |-  AssociativityBoth +  AssociativityBoth   deriving (Eq, Ord, Read, Show) -_Associativity = (Core.Name "hydra.ast.Associativity")+_Associativity = Core.Name "hydra.ast.Associativity" -_Associativity_none = (Core.Name "none")+_Associativity_none = Core.Name "none" -_Associativity_left = (Core.Name "left")+_Associativity_left = Core.Name "left" -_Associativity_right = (Core.Name "right")+_Associativity_right = Core.Name "right" -_Associativity_both = (Core.Name "both")+_Associativity_both = Core.Name "both"  -- | Formatting option for code blocks-data BlockStyle = +data BlockStyle =   BlockStyle {     -- | An optional indentation string     blockStyleIndent :: (Maybe String),@@ -41,16 +41,16 @@     blockStyleNewlineAfterContent :: Bool}   deriving (Eq, Ord, Read, Show) -_BlockStyle = (Core.Name "hydra.ast.BlockStyle")+_BlockStyle = Core.Name "hydra.ast.BlockStyle" -_BlockStyle_indent = (Core.Name "indent")+_BlockStyle_indent = Core.Name "indent" -_BlockStyle_newlineBeforeContent = (Core.Name "newlineBeforeContent")+_BlockStyle_newlineBeforeContent = Core.Name "newlineBeforeContent" -_BlockStyle_newlineAfterContent = (Core.Name "newlineAfterContent")+_BlockStyle_newlineAfterContent = Core.Name "newlineAfterContent"  -- | An expression enclosed by brackets-data BracketExpr = +data BracketExpr =   BracketExpr {     -- | The bracket pair enclosing the expression     bracketExprBrackets :: Brackets,@@ -60,16 +60,16 @@     bracketExprStyle :: BlockStyle}   deriving (Eq, Ord, Read, Show) -_BracketExpr = (Core.Name "hydra.ast.BracketExpr")+_BracketExpr = Core.Name "hydra.ast.BracketExpr" -_BracketExpr_brackets = (Core.Name "brackets")+_BracketExpr_brackets = Core.Name "brackets" -_BracketExpr_enclosed = (Core.Name "enclosed")+_BracketExpr_enclosed = Core.Name "enclosed" -_BracketExpr_style = (Core.Name "style")+_BracketExpr_style = Core.Name "style"  -- | Matching open and close bracket symbols-data Brackets = +data Brackets =   Brackets {     -- | The opening bracket symbol     bracketsOpen :: Symbol,@@ -77,14 +77,14 @@     bracketsClose :: Symbol}   deriving (Eq, Ord, Read, Show) -_Brackets = (Core.Name "hydra.ast.Brackets")+_Brackets = Core.Name "hydra.ast.Brackets" -_Brackets_open = (Core.Name "open")+_Brackets_open = Core.Name "open" -_Brackets_close = (Core.Name "close")+_Brackets_close = Core.Name "close"  -- | An abstract expression-data Expr = +data Expr =   -- | A constant symbol   ExprConst Symbol |   -- | An indented expression@@ -92,21 +92,25 @@   -- | An operator expression   ExprOp OpExpr |   -- | A bracketed expression-  ExprBrackets BracketExpr+  ExprBrackets BracketExpr |+  -- | A sequence of expressions joined by a separator, treated as structural layout (not subject to parenthesization)+  ExprSeq SeqExpr   deriving (Eq, Ord, Read, Show) -_Expr = (Core.Name "hydra.ast.Expr")+_Expr = Core.Name "hydra.ast.Expr" -_Expr_const = (Core.Name "const")+_Expr_const = Core.Name "const" -_Expr_indent = (Core.Name "indent")+_Expr_indent = Core.Name "indent" -_Expr_op = (Core.Name "op")+_Expr_op = Core.Name "op" -_Expr_brackets = (Core.Name "brackets")+_Expr_brackets = Core.Name "brackets" +_Expr_seq = Core.Name "seq"+ -- | An expression indented in a certain style-data IndentedExpression = +data IndentedExpression =   IndentedExpression {     -- | The indentation style     indentedExpressionStyle :: IndentStyle,@@ -114,28 +118,28 @@     indentedExpressionExpr :: Expr}   deriving (Eq, Ord, Read, Show) -_IndentedExpression = (Core.Name "hydra.ast.IndentedExpression")+_IndentedExpression = Core.Name "hydra.ast.IndentedExpression" -_IndentedExpression_style = (Core.Name "style")+_IndentedExpression_style = Core.Name "style" -_IndentedExpression_expr = (Core.Name "expr")+_IndentedExpression_expr = Core.Name "expr"  -- | Any of several indentation styles-data IndentStyle = +data IndentStyle =   -- | Indent all lines with the given string   IndentStyleAllLines String |   -- | Indent only lines after the first with the given string   IndentStyleSubsequentLines String   deriving (Eq, Ord, Read, Show) -_IndentStyle = (Core.Name "hydra.ast.IndentStyle")+_IndentStyle = Core.Name "hydra.ast.IndentStyle" -_IndentStyle_allLines = (Core.Name "allLines")+_IndentStyle_allLines = Core.Name "allLines" -_IndentStyle_subsequentLines = (Core.Name "subsequentLines")+_IndentStyle_subsequentLines = Core.Name "subsequentLines"  -- | An operator symbol-data Op = +data Op =   Op {     -- | The operator symbol     opSymbol :: Symbol,@@ -147,18 +151,18 @@     opAssociativity :: Associativity}   deriving (Eq, Ord, Read, Show) -_Op = (Core.Name "hydra.ast.Op")+_Op = Core.Name "hydra.ast.Op" -_Op_symbol = (Core.Name "symbol")+_Op_symbol = Core.Name "symbol" -_Op_padding = (Core.Name "padding")+_Op_padding = Core.Name "padding" -_Op_precedence = (Core.Name "precedence")+_Op_precedence = Core.Name "precedence" -_Op_associativity = (Core.Name "associativity")+_Op_associativity = Core.Name "associativity"  -- | An operator expression-data OpExpr = +data OpExpr =   OpExpr {     -- | The operator     opExprOp :: Op,@@ -168,16 +172,16 @@     opExprRhs :: Expr}   deriving (Eq, Ord, Read, Show) -_OpExpr = (Core.Name "hydra.ast.OpExpr")+_OpExpr = Core.Name "hydra.ast.OpExpr" -_OpExpr_op = (Core.Name "op")+_OpExpr_op = Core.Name "op" -_OpExpr_lhs = (Core.Name "lhs")+_OpExpr_lhs = Core.Name "lhs" -_OpExpr_rhs = (Core.Name "rhs")+_OpExpr_rhs = Core.Name "rhs"  -- | Left and right padding for an operator-data Padding = +data Padding =   Padding {     -- | Padding to the left of the operator     paddingLeft :: Ws,@@ -185,30 +189,45 @@     paddingRight :: Ws}   deriving (Eq, Ord, Read, Show) -_Padding = (Core.Name "hydra.ast.Padding")+_Padding = Core.Name "hydra.ast.Padding" -_Padding_left = (Core.Name "left")+_Padding_left = Core.Name "left" -_Padding_right = (Core.Name "right")+_Padding_right = Core.Name "right"  -- | Operator precedence-newtype Precedence = +newtype Precedence =   Precedence {     unPrecedence :: Int}   deriving (Eq, Ord, Read, Show) -_Precedence = (Core.Name "hydra.ast.Precedence")+_Precedence = Core.Name "hydra.ast.Precedence" +-- | A sequence of expressions joined by a separator operator. Unlike OpExpr, parenthesize ignores SeqExpr boundaries.+data SeqExpr =+  SeqExpr {+    -- | The separator operator+    seqExprOp :: Op,+    -- | The expressions to join+    seqExprElements :: [Expr]}+  deriving (Eq, Ord, Read, Show)++_SeqExpr = Core.Name "hydra.ast.SeqExpr"++_SeqExpr_op = Core.Name "op"++_SeqExpr_elements = Core.Name "elements"+ -- | Any symbol-newtype Symbol = +newtype Symbol =   Symbol {     unSymbol :: String}   deriving (Eq, Ord, Read, Show) -_Symbol = (Core.Name "hydra.ast.Symbol")+_Symbol = Core.Name "hydra.ast.Symbol"  -- | One of several classes of whitespace-data Ws = +data Ws =   -- | No whitespace   WsNone  |   -- | A single space@@ -218,17 +237,17 @@   -- | A line break followed by indentation   WsBreakAndIndent String |   -- | Two line breaks-  WsDoubleBreak +  WsDoubleBreak   deriving (Eq, Ord, Read, Show) -_Ws = (Core.Name "hydra.ast.Ws")+_Ws = Core.Name "hydra.ast.Ws" -_Ws_none = (Core.Name "none")+_Ws_none = Core.Name "none" -_Ws_space = (Core.Name "space")+_Ws_space = Core.Name "space" -_Ws_break = (Core.Name "break")+_Ws_break = Core.Name "break" -_Ws_breakAndIndent = (Core.Name "breakAndIndent")+_Ws_breakAndIndent = Core.Name "breakAndIndent" -_Ws_doubleBreak = (Core.Name "doubleBreak")+_Ws_doubleBreak = Core.Name "doubleBreak"
src/gen-main/haskell/Hydra/Checking.hs view
@@ -5,509 +5,702 @@ module Hydra.Checking where  import qualified Hydra.Coders as Coders-import qualified Hydra.Compute as Compute-import qualified Hydra.Constants as Constants-import qualified Hydra.Core as Core-import qualified Hydra.Extract.Core as Core_-import qualified Hydra.Formatting as Formatting-import qualified Hydra.Lexical as Lexical-import qualified Hydra.Lib.Eithers as Eithers-import qualified Hydra.Lib.Equality as Equality-import qualified Hydra.Lib.Flows as Flows-import qualified Hydra.Lib.Lists as Lists-import qualified Hydra.Lib.Literals as Literals-import qualified Hydra.Lib.Logic as Logic-import qualified Hydra.Lib.Maps as Maps-import qualified Hydra.Lib.Maybes as Maybes-import qualified Hydra.Lib.Pairs as Pairs-import qualified Hydra.Lib.Sets as Sets-import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Monads as Monads-import qualified Hydra.Reflect as Reflect-import qualified Hydra.Rewriting as Rewriting-import qualified Hydra.Schemas as Schemas-import qualified Hydra.Show.Core as Core__-import qualified Hydra.Show.Meta as Meta-import qualified Hydra.Substitution as Substitution-import qualified Hydra.Typing as Typing-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S--allEqual :: Eq t0 => ([t0] -> Bool)-allEqual els = (Logic.ifElse (Lists.null els) True (Lists.foldl (\b -> \t -> Logic.and b (Equality.equal t (Lists.head els))) True (Lists.tail els)))---- | Apply type arguments to a type, substituting forall-bound variables-applyTypeArgumentsToType :: (Typing.TypeContext -> [Core.Type] -> Core.Type -> Compute.Flow t0 Core.Type)-applyTypeArgumentsToType tx typeArgs t =  -  let nonnull = ((\x -> case x of-          Core.TypeForall v1 ->  -            let v = (Core.forallTypeParameter v1)-            in  -              let tbody = (Core.forallTypeBody v1)-              in (applyTypeArgumentsToType tx (Lists.tail typeArgs) (Substitution.substInType (Typing.TypeSubst (Maps.singleton v (Lists.head typeArgs))) tbody))-          _ -> (Flows.fail (Strings.cat [-            "not a forall type: ",-            (Core__.type_ t),-            ". Trying to apply ",-            (Literals.showInt32 (Lists.length typeArgs)),-            " type args: ",-            (Formatting.showList Core__.type_ typeArgs),-            ". Context has vars: {",-            (Strings.intercalate ", " (Lists.map Core.unName (Maps.keys (Typing.typeContextTypes tx)))),-            "}"]))) t)-  in (Logic.ifElse (Lists.null typeArgs) (Flows.bind (checkTypeVariables tx t) (\_ -> Flows.pure t)) nonnull)---- | Check that a term has no unbound type variables-checkForUnboundTypeVariables :: (Typing.InferenceContext -> Core.Term -> Compute.Flow t0 ())-checkForUnboundTypeVariables cx term0 =  -  let svars = (Sets.fromList (Maps.keys (Typing.inferenceContextSchemaTypes cx)))-  in  -    let checkRecursive = (\vars -> \trace -> \lbinding -> \term ->  -            let recurse = (checkRecursive vars trace lbinding)-            in  -              let dflt = (Flows.bind (Flows.mapList recurse (Rewriting.subterms term)) (\_ -> Flows.pure ()))-              in  -                let check = (\typ ->  -                        let freevars = (Rewriting.freeVariablesInType typ)-                        in  -                          let badvars = (Sets.difference (Sets.difference freevars vars) svars)-                          in (Logic.ifElse (Sets.null badvars) (Flows.pure ()) (Flows.fail (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 "unbound type variables: {" (Strings.intercalate ", " (Lists.map Core.unName (Sets.toList badvars)))) "} in type ") (Core__.type_ typ)) " at path: ") (Strings.intercalate " >> " (Lists.reverse trace))) (Maybes.maybe "none" (\binding -> Strings.cat2 (Strings.cat2 (Strings.cat2 ". bound term = " (Core__.term (Core.bindingTerm binding))) ". bound type = ") (Maybes.maybe "none" Core__.typeScheme (Core.bindingType binding))) lbinding)))))-                in  -                  let checkOptional = (\m -> Flows.bind (Flows.mapMaybe check m) (\_ -> Flows.pure ()))-                  in  -                    let checkOptionalList = (\ml -> Flows.bind (Flows.mapMaybe (\l -> Flows.mapList check l) ml) (\_ -> Flows.pure ()))-                    in ((\x -> case x of-                      Core.TermFunction v1 -> ((\x -> case x of-                        Core.FunctionElimination _ -> dflt-                        Core.FunctionLambda v2 -> (Flows.bind (checkOptional (Core.lambdaDomain v2)) (\_ -> recurse (Core.lambdaBody v2)))-                        _ -> dflt) v1)-                      Core.TermLet v1 ->  -                        let forBinding = (\b ->  -                                let bterm = (Core.bindingTerm b)-                                in  -                                  let newVars = (Maybes.maybe vars (\ts -> Sets.union vars (Sets.fromList (Core.typeSchemeVariables ts))) (Core.bindingType b))-                                  in  -                                    let newTrace = (Lists.cons (Core.unName (Core.bindingName b)) trace)-                                    in (checkRecursive newVars newTrace (Just b) bterm))-                        in (Flows.bind (Flows.mapList forBinding (Core.letBindings v1)) (\_ -> recurse (Core.letBody v1)))-                      Core.TermTypeApplication v1 -> (Flows.bind (check (Core.typeApplicationTermType v1)) (\_ -> recurse (Core.typeApplicationTermBody v1)))-                      Core.TermTypeLambda v1 -> (Flows.bind (check (Core.TypeVariable (Core.typeLambdaParameter v1))) (\_ -> recurse (Core.typeLambdaBody v1)))-                      _ -> dflt) term))-    in (checkRecursive Sets.empty [-      "top level"] Nothing term0)---- | Check that a nominal type is applied to the correct number of type arguments-checkNominalApplication :: (Typing.TypeContext -> Core.Name -> [Core.Type] -> Compute.Flow t0 ())-checkNominalApplication tx tname typeArgs = (Flows.bind (Schemas.requireSchemaType (Typing.typeContextInferenceContext tx) tname) (\schemaType ->  -  let vars = (Core.typeSchemeVariables schemaType)-  in  -    let body = (Core.typeSchemeType schemaType)-    in  -      let varslen = (Lists.length vars)-      in  -        let argslen = (Lists.length typeArgs)-        in (Logic.ifElse (Equality.equal varslen argslen) (Flows.pure ()) (Flows.fail (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 "nominal type " (Core.unName tname)) " applied to the wrong number of type arguments: ") "(expected ") (Literals.showInt32 varslen)) " arguments, got ") (Literals.showInt32 argslen)) "): ") (Formatting.showList Core__.type_ typeArgs))))))---- | Ensure all types in a list are equal and return the common type-checkSameType :: (Typing.TypeContext -> String -> [Core.Type] -> Compute.Flow t0 Core.Type)-checkSameType tx desc types = (Logic.ifElse (typesAllEffectivelyEqual tx types) (Flows.pure (Lists.head types)) (Flows.fail (Strings.cat [-  "unequal types ",-  (Formatting.showList Core__.type_ types),-  " in ",-  desc])))---- | Check that a term has the expected type-checkType :: (Typing.TypeContext -> Core.Term -> Core.Type -> Compute.Flow t0 ())-checkType tx term typ =  -  let cx = (Typing.typeContextInferenceContext tx)-  in  -    let vars = (Typing.typeContextTypeVariables tx)-    in (Logic.ifElse Constants.debugInference (Flows.bind (typeOf tx [] term) (\t0 -> Logic.ifElse (typesEffectivelyEqual tx t0 typ) (Flows.pure ()) (Flows.fail (Strings.cat [-      "type checking failed: expected ",-      (Core__.type_ typ),-      " but found ",-      (Core__.type_ t0)])))) (Flows.pure ()))---- | Sanity-check a type substitution arising from unification. Specifically, check that schema types have not been inappropriately unified with type variables inferred from terms.-checkTypeSubst :: (Typing.InferenceContext -> Typing.TypeSubst -> Compute.Flow t0 Typing.TypeSubst)-checkTypeSubst cx subst =  -  let s = (Typing.unTypeSubst subst)-  in  -    let vars = (Sets.fromList (Maps.keys s))-    in  -      let suspectVars = (Sets.intersection vars (Sets.fromList (Maps.keys (Typing.inferenceContextSchemaTypes cx))))-      in  -        let isNominal = (\ts -> (\x -> case x of-                Core.TypeRecord _ -> True-                Core.TypeUnion _ -> True-                Core.TypeWrap _ -> True-                _ -> False) (Rewriting.deannotateType (Core.typeSchemeType ts)))-        in  -          let badVars = (Sets.fromList (Lists.filter (\v -> Maybes.maybe False isNominal (Lexical.dereferenceSchemaType v (Typing.inferenceContextSchemaTypes cx))) (Sets.toList suspectVars)))-          in  -            let badPairs = (Lists.filter (\p -> Sets.member (Pairs.first p) badVars) (Maps.toList s))-            in  -              let printPair = (\p -> Strings.cat2 (Strings.cat2 (Core.unName (Pairs.first p)) " --> ") (Core__.type_ (Pairs.second p)))-              in (Logic.ifElse (Sets.null badVars) (Flows.pure subst) (Flows.fail (Strings.cat2 (Strings.cat2 "Schema type(s) incorrectly unified: {" (Strings.intercalate ", " (Lists.map printPair badPairs))) "}")))---- | Check that all type variables in a type are bound. NOTE: This check is currently disabled to allow phantom type variables from polymorphic instantiation to pass through. The proper fix is to ensure `typeOf` doesn't create fresh variables for post-inference code.-checkTypeVariables :: (t0 -> t1 -> Compute.Flow t2 ())-checkTypeVariables _tx _typ = (Flows.pure ())---- | Convert an inference context to a type environment by converting type schemes to System F types-toFContext :: (Typing.InferenceContext -> M.Map Core.Name Core.Type)-toFContext cx = (Maps.map Schemas.typeSchemeToFType (Typing.inferenceContextDataTypes cx))---- | Check whether two lists of types are effectively equal, disregarding type aliases-typeListsEffectivelyEqual :: (Typing.TypeContext -> [Core.Type] -> [Core.Type] -> Bool)-typeListsEffectivelyEqual tx tlist1 tlist2 = (Logic.ifElse (Equality.equal (Lists.length tlist1) (Lists.length tlist2)) (Lists.foldl Logic.and True (Lists.zipWith (typesEffectivelyEqual tx) tlist1 tlist2)) False)---- | Given a type context, reconstruct the type of a System F term-typeOf :: (Typing.TypeContext -> [Core.Type] -> Core.Term -> Compute.Flow t0 Core.Type)-typeOf tx typeArgs term =  -  let check = ((\x -> case x of-          Core.TermAnnotated v1 -> (typeOfAnnotatedTerm tx typeArgs v1)-          Core.TermApplication v1 -> (typeOfApplication tx typeArgs v1)-          Core.TermEither v1 -> (typeOfEither tx typeArgs v1)-          Core.TermFunction v1 -> ((\x -> case x of-            Core.FunctionElimination v2 -> ((\x -> case x of-              Core.EliminationRecord v3 -> (typeOfProjection tx typeArgs v3)-              Core.EliminationUnion v3 -> (typeOfCaseStatement tx typeArgs v3)-              Core.EliminationWrap v3 -> (typeOfUnwrap tx typeArgs v3)) v2)-            Core.FunctionLambda v2 -> (typeOfLambda tx typeArgs v2)-            Core.FunctionPrimitive v2 -> (typeOfPrimitive tx typeArgs v2)) v1)-          Core.TermLet v1 -> (typeOfLet tx typeArgs v1)-          Core.TermList v1 -> (typeOfList tx typeArgs v1)-          Core.TermLiteral v1 -> (typeOfLiteral tx typeArgs v1)-          Core.TermMap v1 -> (typeOfMap tx typeArgs v1)-          Core.TermMaybe v1 -> (typeOfMaybe tx typeArgs v1)-          Core.TermPair v1 -> (typeOfPair tx typeArgs v1)-          Core.TermRecord v1 -> (typeOfRecord tx typeArgs v1)-          Core.TermSet v1 -> (typeOfSet tx typeArgs v1)-          Core.TermTypeApplication v1 -> (typeOfTypeApplication tx typeArgs v1)-          Core.TermTypeLambda v1 -> (typeOfTypeLambda tx typeArgs v1)-          Core.TermUnion v1 -> (typeOfInjection tx typeArgs v1)-          Core.TermUnit -> (typeOfUnit tx typeArgs)-          Core.TermVariable v1 -> (typeOfVariable tx typeArgs v1)-          Core.TermWrap v1 -> (typeOfWrappedTerm tx typeArgs v1)-          _ -> (Flows.fail (Strings.cat [-            "unsupported term variant in typeOf: ",-            (Meta.termVariant (Reflect.termVariant term))]))) term)-  in (Monads.withTrace "typeOf" check)---- | Reconstruct the type of an annotated term-typeOfAnnotatedTerm :: (Typing.TypeContext -> [Core.Type] -> Core.AnnotatedTerm -> Compute.Flow t0 Core.Type)-typeOfAnnotatedTerm tx typeArgs at = (typeOf tx typeArgs (Core.annotatedTermBody at))---- | Reconstruct the type of an application term-typeOfApplication :: (Typing.TypeContext -> [Core.Type] -> Core.Application -> Compute.Flow t0 Core.Type)-typeOfApplication tx typeArgs app =  -  let fun = (Core.applicationFunction app)-  in  -    let arg = (Core.applicationArgument app)-    in  -      let tryType = (\tfun -> \targ -> (\x -> case x of-              Core.TypeForall v1 -> (tryType (Core.forallTypeBody v1) targ)-              Core.TypeFunction v1 ->  -                let dom = (Core.functionTypeDomain v1)-                in  -                  let cod = (Core.functionTypeCodomain v1)-                  in (Logic.ifElse (typesEffectivelyEqual tx dom targ) (Flows.pure cod) (Flows.fail (Strings.cat [-                    "in application, expected ",-                    (Core__.type_ dom),-                    " but found ",-                    (Core__.type_ targ)])))-              Core.TypeVariable _ -> (Flows.map (\x -> Core.TypeVariable x) Schemas.freshName)-              _ -> (Flows.fail (Strings.cat [-                "left hand side of application (",-                (Core__.term fun),-                ") is not function-typed (",-                (Core__.type_ tfun),-                ")",-                ". types: ",-                (Strings.intercalate ", " (Lists.map (\p -> Strings.cat [-                  Core.unName (Pairs.first p),-                  ": ",-                  (Core__.type_ (Pairs.second p))]) (Maps.toList (Typing.typeContextTypes tx))))]))) tfun)-      in (Flows.bind (typeOf tx [] fun) (\tfun -> Flows.bind (typeOf tx [] arg) (\targ -> Flows.bind (tryType tfun targ) (\t -> applyTypeArgumentsToType tx typeArgs t))))---- | Reconstruct the type of a case statement-typeOfCaseStatement :: (Typing.TypeContext -> [Core.Type] -> Core.CaseStatement -> Compute.Flow t0 Core.Type)-typeOfCaseStatement tx typeArgs cs =  -  let tname = (Core.caseStatementTypeName cs)-  in  -    let dflt = (Core.caseStatementDefault cs)-    in  -      let cases = (Core.caseStatementCases cs)-      in  -        let cterms = (Lists.map Core.fieldTerm cases)-        in (Flows.bind (Flows.mapMaybe (\e -> typeOf tx [] e) dflt) (\tdflt -> Flows.bind (Flows.mapList (\e -> typeOf tx [] e) cterms) (\tcterms -> Flows.bind (Flows.mapList (\t -> Flows.map Core.functionTypeCodomain (Core_.functionType t)) tcterms) (\fcods ->  -          let cods = (Maybes.cat (Lists.cons tdflt (Lists.map Maybes.pure fcods)))-          in (Flows.bind (checkSameType tx "case branches" cods) (\cod -> Flows.pure (Core.TypeFunction (Core.FunctionType {-            Core.functionTypeDomain = (Schemas.nominalApplication tname typeArgs),-            Core.functionTypeCodomain = cod}))))))))---- | Reconstruct the type of an either value-typeOfEither :: (Typing.TypeContext -> [Core.Type] -> Either Core.Term Core.Term -> Compute.Flow t0 Core.Type)-typeOfEither tx typeArgs et =  -  let checkLength =  -          let n = (Lists.length typeArgs)-          in (Logic.ifElse (Equality.equal n 2) (Flows.pure ()) (Flows.fail (Strings.cat2 "either type requires 2 type arguments, got " (Literals.showInt32 n))))-  in (Flows.bind checkLength (\_ -> Eithers.either (\leftTerm -> Flows.bind (typeOf tx [] leftTerm) (\leftType -> Flows.bind (checkTypeVariables tx leftType) (\_ -> Flows.pure (Core.TypeEither (Core.EitherType {-    Core.eitherTypeLeft = leftType,-    Core.eitherTypeRight = (Lists.at 1 typeArgs)}))))) (\rightTerm -> Flows.bind (typeOf tx [] rightTerm) (\rightType -> Flows.bind (checkTypeVariables tx rightType) (\_ -> Flows.pure (Core.TypeEither (Core.EitherType {-    Core.eitherTypeLeft = (Lists.at 0 typeArgs),-    Core.eitherTypeRight = rightType}))))) et))---- | Reconstruct the type of a union injection-typeOfInjection :: (Typing.TypeContext -> [Core.Type] -> Core.Injection -> Compute.Flow t0 Core.Type)-typeOfInjection tx typeArgs injection =  -  let tname = (Core.injectionTypeName injection)-  in  -    let field = (Core.injectionField injection)-    in  -      let fname = (Core.fieldName field)-      in  -        let fterm = (Core.fieldTerm field)-        in (Flows.bind (Schemas.requireSchemaType (Typing.typeContextInferenceContext tx) tname) (\schemaType ->  -          let svars = (Core.typeSchemeVariables schemaType)-          in  -            let sbody = (Core.typeSchemeType schemaType)-            in (Flows.bind (Core_.unionType tname sbody) (\sfields -> Flows.bind (Schemas.findFieldType fname sfields) (\ftyp -> Flows.pure (Schemas.nominalApplication tname typeArgs))))))---- | Reconstruct the type of a lambda function-typeOfLambda :: (Typing.TypeContext -> [Core.Type] -> Core.Lambda -> Compute.Flow t0 Core.Type)-typeOfLambda tx typeArgs l =  -  let v = (Core.lambdaParameter l)-  in  -    let mdom = (Core.lambdaDomain l)-    in  -      let body = (Core.lambdaBody l)-      in (Flows.bind (Maybes.maybe (Flows.fail "untyped lambda") (\dom -> Flows.bind (checkTypeVariables tx dom) (\_ ->  -        let types2 = (Maps.insert v dom (Typing.typeContextTypes tx))-        in (Flows.bind (typeOf (Typing.TypeContext {-          Typing.typeContextTypes = types2,-          Typing.typeContextMetadata = (Typing.typeContextMetadata tx),-          Typing.typeContextTypeVariables = (Typing.typeContextTypeVariables tx),-          Typing.typeContextLambdaVariables = (Typing.typeContextLambdaVariables tx),-          Typing.typeContextLetVariables = (Typing.typeContextLetVariables tx),-          Typing.typeContextInferenceContext = (Typing.typeContextInferenceContext tx)}) [] body) (\cod -> Flows.bind (checkTypeVariables tx cod) (\_ -> Flows.pure (Core.TypeFunction (Core.FunctionType {-          Core.functionTypeDomain = dom,-          Core.functionTypeCodomain = cod}))))))) mdom) (\tbody -> applyTypeArgumentsToType tx typeArgs tbody))---- | Reconstruct the type of a let binding-typeOfLet :: (Typing.TypeContext -> [Core.Type] -> Core.Let -> Compute.Flow t0 Core.Type)-typeOfLet tx typeArgs letTerm =  -  let bs = (Core.letBindings letTerm)-  in  -    let body = (Core.letBody letTerm)-    in  -      let bnames = (Lists.map Core.bindingName bs)-      in  -        let bterms = (Lists.map Core.bindingTerm bs)-        in  -          let bindingType = (\b -> Maybes.maybe (Flows.fail (Strings.cat [-                  "untyped let binding: ",-                  (Core__.binding b)])) (\ts -> Flows.pure (Schemas.typeSchemeToFType ts)) (Core.bindingType b))-          in (Flows.bind (Flows.mapList bindingType bs) (\btypes ->  -            let tx2 = Typing.TypeContext {-                    Typing.typeContextTypes = (Maps.union (Maps.fromList (Lists.zip bnames btypes)) (Typing.typeContextTypes tx)),-                    Typing.typeContextMetadata = (Typing.typeContextMetadata tx),-                    Typing.typeContextTypeVariables = (Typing.typeContextTypeVariables tx),-                    Typing.typeContextLambdaVariables = (Typing.typeContextLambdaVariables tx),-                    Typing.typeContextLetVariables = (Typing.typeContextLetVariables tx),-                    Typing.typeContextInferenceContext = (Typing.typeContextInferenceContext tx)}-            in (Flows.bind (typeOf tx2 [] body) (\t -> applyTypeArgumentsToType tx typeArgs t))))---- | Reconstruct the type of a list-typeOfList :: (Typing.TypeContext -> [Core.Type] -> [Core.Term] -> Compute.Flow t0 Core.Type)-typeOfList tx typeArgs els = (Logic.ifElse (Lists.null els) (Logic.ifElse (Equality.equal (Lists.length typeArgs) 1) (Flows.pure (Core.TypeList (Lists.head typeArgs))) (Flows.fail "list type applied to more or less than one argument")) (Flows.bind (Flows.mapList (typeOf tx []) els) (\eltypes -> Flows.bind (checkSameType tx "list elements" eltypes) (\unifiedType -> Flows.bind (checkTypeVariables tx unifiedType) (\_ -> Flows.pure (Core.TypeList unifiedType))))))---- | Reconstruct the type of a literal-typeOfLiteral :: (Typing.TypeContext -> [Core.Type] -> Core.Literal -> Compute.Flow t0 Core.Type)-typeOfLiteral tx typeArgs lit =  -  let t = (Core.TypeLiteral (Reflect.literalType lit))-  in (applyTypeArgumentsToType tx typeArgs t)---- | Reconstruct the type of a map-typeOfMap :: (Typing.TypeContext -> [Core.Type] -> M.Map Core.Term Core.Term -> Compute.Flow t0 Core.Type)-typeOfMap tx typeArgs m =  -  let nonnull =  -          let pairs = (Maps.toList m)-          in (Flows.bind (Flows.bind (Flows.mapList (typeOf tx []) (Lists.map Pairs.first pairs)) (checkSameType tx "map keys")) (\kt -> Flows.bind (Flows.bind (Flows.mapList (typeOf tx []) (Lists.map Pairs.second pairs)) (checkSameType tx "map values")) (\vt -> Flows.bind (checkTypeVariables tx kt) (\_ -> Flows.bind (checkTypeVariables tx vt) (\_ -> applyTypeArgumentsToType tx typeArgs (Core.TypeMap (Core.MapType {-            Core.mapTypeKeys = kt,-            Core.mapTypeValues = vt})))))))-  in (Logic.ifElse (Maps.null m) (Logic.ifElse (Equality.equal (Lists.length typeArgs) 2) (Flows.pure (Core.TypeMap (Core.MapType {-    Core.mapTypeKeys = (Lists.at 0 typeArgs),-    Core.mapTypeValues = (Lists.at 1 typeArgs)}))) (Flows.fail "map type applied to more or less than two arguments")) nonnull)---- | Reconstruct the type of an optional value-typeOfMaybe :: (Typing.TypeContext -> [Core.Type] -> Maybe Core.Term -> Compute.Flow t0 Core.Type)-typeOfMaybe tx typeArgs mt =  -  let forNothing =  -          let n = (Lists.length typeArgs)-          in (Logic.ifElse (Equality.equal n 1) (Flows.pure (Core.TypeMaybe (Lists.head typeArgs))) (Flows.fail (Strings.cat2 (Strings.cat2 "optional type applied to " (Literals.showInt32 n)) " argument(s). Expected 1.")))-  in  -    let forJust = (\term -> Flows.bind (Flows.bind (typeOf tx [] term) (\termType -> Flows.bind (checkTypeVariables tx termType) (\_ -> Flows.pure (Core.TypeMaybe termType)))) (\t -> applyTypeArgumentsToType tx typeArgs t))-    in (Maybes.maybe forNothing forJust mt)---- | Reconstruct the type of a pair-typeOfPair :: (Typing.TypeContext -> [Core.Type] -> (Core.Term, Core.Term) -> Compute.Flow t0 Core.Type)-typeOfPair tx typeArgs p =  -  let checkLength =  -          let n = (Lists.length typeArgs)-          in (Logic.ifElse (Equality.equal n 2) (Flows.pure ()) (Flows.fail (Strings.cat2 "pair type requires 2 type arguments, got " (Literals.showInt32 n))))-  in (Flows.bind checkLength (\_ ->  -    let pairFst = (Pairs.first p)-    in  -      let pairSnd = (Pairs.second p)-      in (Flows.bind (typeOf tx [] pairFst) (\firstType -> Flows.bind (checkTypeVariables tx firstType) (\_ -> Flows.bind (typeOf tx [] pairSnd) (\secondType -> Flows.bind (checkTypeVariables tx secondType) (\_ -> Flows.pure (Core.TypePair (Core.PairType {-        Core.pairTypeFirst = firstType,-        Core.pairTypeSecond = secondType})))))))))---- | Reconstruct the type of a primitive function-typeOfPrimitive :: (Typing.TypeContext -> [Core.Type] -> Core.Name -> Compute.Flow t0 Core.Type)-typeOfPrimitive tx typeArgs name = (Flows.bind (Maybes.maybe (Flows.fail (Strings.cat [-  "no such primitive: ",-  (Core.unName name)])) Schemas.instantiateTypeScheme (Maps.lookup name (Typing.inferenceContextPrimitiveTypes (Typing.typeContextInferenceContext tx)))) (\ts ->  -  let t = (Schemas.typeSchemeToFType ts)-  in (applyTypeArgumentsToType tx typeArgs t)))---- | Reconstruct the type of a record projection-typeOfProjection :: (Typing.TypeContext -> [Core.Type] -> Core.Projection -> Compute.Flow t0 Core.Type)-typeOfProjection tx typeArgs p =  -  let tname = (Core.projectionTypeName p)-  in  -    let fname = (Core.projectionField p)-    in (Flows.bind (Schemas.requireSchemaType (Typing.typeContextInferenceContext tx) tname) (\schemaType ->  -      let svars = (Core.typeSchemeVariables schemaType)-      in  -        let sbody = (Core.typeSchemeType schemaType)-        in (Flows.bind (Core_.recordType tname sbody) (\sfields -> Flows.bind (Schemas.findFieldType fname sfields) (\ftyp ->  -          let subst = (Typing.TypeSubst (Maps.fromList (Lists.zip svars typeArgs)))-          in  -            let sftyp = (Substitution.substInType subst ftyp)-            in (Flows.pure (Core.TypeFunction (Core.FunctionType {-              Core.functionTypeDomain = (Schemas.nominalApplication tname typeArgs),-              Core.functionTypeCodomain = sftyp}))))))))---- | Reconstruct the type of a record-typeOfRecord :: (Typing.TypeContext -> [Core.Type] -> Core.Record -> Compute.Flow t0 Core.Type)-typeOfRecord tx typeArgs record =  -  let tname = (Core.recordTypeName record)-  in  -    let fields = (Core.recordFields record)-    in (Flows.bind (Flows.mapList (typeOf tx []) (Lists.map Core.fieldTerm fields)) (\ftypes -> Flows.bind (Flows.mapList (checkTypeVariables tx) ftypes) (\_ -> Flows.pure (Schemas.nominalApplication tname typeArgs))))---- | Reconstruct the type of a set-typeOfSet :: (Typing.TypeContext -> [Core.Type] -> S.Set Core.Term -> Compute.Flow t0 Core.Type)-typeOfSet tx typeArgs els = (Logic.ifElse (Sets.null els) (Logic.ifElse (Equality.equal (Lists.length typeArgs) 1) (Flows.pure (Core.TypeSet (Lists.head typeArgs))) (Flows.fail "set type applied to more or less than one argument")) (Flows.bind (Flows.mapList (typeOf tx []) (Sets.toList els)) (\eltypes -> Flows.bind (checkSameType tx "set elements" eltypes) (\unifiedType -> Flows.bind (checkTypeVariables tx unifiedType) (\_ -> Flows.pure (Core.TypeSet unifiedType))))))---- | Reconstruct the type of a type application term-typeOfTypeApplication :: (Typing.TypeContext -> [Core.Type] -> Core.TypeApplicationTerm -> Compute.Flow t0 Core.Type)-typeOfTypeApplication tx typeArgs tyapp =  -  let body = (Core.typeApplicationTermBody tyapp)-  in  -    let t = (Core.typeApplicationTermType tyapp)-    in (typeOf tx (Lists.cons t typeArgs) body)---- | Reconstruct the type of a type lambda (type abstraction) term-typeOfTypeLambda :: (Typing.TypeContext -> [Core.Type] -> Core.TypeLambda -> Compute.Flow t0 Core.Type)-typeOfTypeLambda tx typeArgs tl =  -  let v = (Core.typeLambdaParameter tl)-  in  -    let body = (Core.typeLambdaBody tl)-    in  -      let vars = (Typing.typeContextTypeVariables tx)-      in  -        let tx2 = Typing.TypeContext {-                Typing.typeContextTypes = (Typing.typeContextTypes tx),-                Typing.typeContextMetadata = (Typing.typeContextMetadata tx),-                Typing.typeContextTypeVariables = (Sets.insert v vars),-                Typing.typeContextLambdaVariables = (Typing.typeContextLambdaVariables tx),-                Typing.typeContextLetVariables = (Typing.typeContextLetVariables tx),-                Typing.typeContextInferenceContext = (Typing.typeContextInferenceContext tx)}-        in (Flows.bind (typeOf tx2 [] body) (\t1 -> Flows.bind (checkTypeVariables tx2 t1) (\_ -> applyTypeArgumentsToType tx typeArgs (Core.TypeForall (Core.ForallType {-          Core.forallTypeParameter = v,-          Core.forallTypeBody = t1})))))---- | Reconstruct the type of the unit term-typeOfUnit :: (Typing.TypeContext -> [Core.Type] -> Compute.Flow t0 Core.Type)-typeOfUnit tx typeArgs = (applyTypeArgumentsToType tx typeArgs Core.TypeUnit)---- | Reconstruct the type of an unwrap operation-typeOfUnwrap :: (Typing.TypeContext -> [Core.Type] -> Core.Name -> Compute.Flow t0 Core.Type)-typeOfUnwrap tx typeArgs tname = (Flows.bind (Schemas.requireSchemaType (Typing.typeContextInferenceContext tx) tname) (\schemaType ->  -  let svars = (Core.typeSchemeVariables schemaType)-  in  -    let sbody = (Core.typeSchemeType schemaType)-    in (Flows.bind (Core_.wrappedType tname sbody) (\wrapped ->  -      let subst = (Typing.TypeSubst (Maps.fromList (Lists.zip svars typeArgs)))-      in  -        let swrapped = (Substitution.substInType subst wrapped)-        in (Flows.pure (Core.TypeFunction (Core.FunctionType {-          Core.functionTypeDomain = (Schemas.nominalApplication tname typeArgs),-          Core.functionTypeCodomain = swrapped})))))))---- | Reconstruct the type of a variable-typeOfVariable :: (Typing.TypeContext -> [Core.Type] -> Core.Name -> Compute.Flow t0 Core.Type)-typeOfVariable tx typeArgs name =  -  let rawType = (Maps.lookup name (Typing.typeContextTypes tx))-  in  -    let failMsg = (Flows.fail (Strings.cat [-            "unbound variable: ",-            (Core.unName name),-            ". Variables: {",-            (Strings.intercalate ", " (Lists.map Core.unName (Maps.keys (Typing.typeContextTypes tx)))),-            "}"]))-    in (Flows.bind (Maybes.maybe failMsg (\t -> Logic.ifElse (Lists.null typeArgs) (Schemas.instantiateType t) (Flows.pure t)) rawType) (\t -> applyTypeArgumentsToType tx typeArgs t))---- | Reconstruct the type of a wrapped term-typeOfWrappedTerm :: (Typing.TypeContext -> [Core.Type] -> Core.WrappedTerm -> Compute.Flow t0 Core.Type)-typeOfWrappedTerm tx typeArgs wt =  -  let tname = (Core.wrappedTermTypeName wt)-  in  -    let body = (Core.wrappedTermBody wt)-    in (Flows.bind (typeOf tx [] body) (\btype -> Flows.bind (checkTypeVariables tx btype) (\_ -> Flows.pure (Schemas.nominalApplication tname typeArgs))))---- | Check if a type contains any type variable from the current scope-containsInScopeTypeVars :: (Typing.TypeContext -> Core.Type -> Bool)-containsInScopeTypeVars tx t =  -  let vars = (Typing.typeContextTypeVariables tx)-  in  -    let freeVars = (Rewriting.freeVariablesInTypeSimple t)-    in (Logic.not (Sets.null (Sets.intersection vars freeVars)))---- | Normalize free type variables in a type to canonical names based on order of first occurrence. This allows comparing types that differ only in the naming of free type variables.-normalizeTypeFreeVars :: (Core.Type -> Core.Type)-normalizeTypeFreeVars typ =  -  let collectVars = (\acc -> \t -> (\x -> case x of-          Core.TypeVariable v1 -> (Logic.ifElse (Maps.member v1 acc) acc (Maps.insert v1 (Core.Name (Strings.cat2 "_tv" (Literals.showInt32 (Maps.size acc)))) acc))-          _ -> acc) t)-  in  -    let subst = (Rewriting.foldOverType Coders.TraversalOrderPre collectVars Maps.empty typ)-    in (Rewriting.substituteTypeVariables subst typ)---- | Check whether a list of types are effectively equal, disregarding type aliases and free type variable naming. Also treats free type variables (not in schema) as wildcards, since inference has already verified consistency.-typesAllEffectivelyEqual :: (Typing.TypeContext -> [Core.Type] -> Bool)-typesAllEffectivelyEqual tx tlist =  -  let types = (Typing.inferenceContextSchemaTypes (Typing.typeContextInferenceContext tx))-  in  -    let containsFreeVar = (\t ->  -            let allVars = (Rewriting.freeVariablesInTypeSimple t)-            in  -              let schemaNames = (Sets.fromList (Maps.keys types))-              in (Logic.not (Sets.null (Sets.difference allVars schemaNames))))-    in  -      let anyContainsFreeVar = (Lists.foldl (\acc -> \t -> Logic.or acc (containsFreeVar t)) False tlist)-      in (Logic.ifElse anyContainsFreeVar True (Logic.ifElse (allEqual (Lists.map (\t -> normalizeTypeFreeVars t) tlist)) True (allEqual (Lists.map (\t -> normalizeTypeFreeVars (Rewriting.deannotateTypeRecursive (Rewriting.replaceTypedefs types t))) tlist))))---- | Check whether two types are effectively equal, disregarding type aliases, forall quantifiers, and treating in-scope type variables as wildcards-typesEffectivelyEqual :: (Typing.TypeContext -> Core.Type -> Core.Type -> Bool)-typesEffectivelyEqual tx t1 t2 = (Logic.or (containsInScopeTypeVars tx t1) (Logic.or (containsInScopeTypeVars tx t2) (typesAllEffectivelyEqual tx [-  Schemas.fullyStripAndNormalizeType t1,-  (Schemas.fullyStripAndNormalizeType t2)])))+import qualified Hydra.Constants as Constants+import qualified Hydra.Context as Context+import qualified Hydra.Core as Core+import qualified Hydra.Error.Checking as Checking+import qualified Hydra.Error.Core as Core_+import qualified Hydra.Errors as Errors+import qualified Hydra.Extract.Core as Core__+import qualified Hydra.Formatting as Formatting+import qualified Hydra.Graph as Graph+import qualified Hydra.Lexical as Lexical+import qualified Hydra.Lib.Eithers as Eithers+import qualified Hydra.Lib.Equality as Equality+import qualified Hydra.Lib.Lists as Lists+import qualified Hydra.Lib.Literals as Literals+import qualified Hydra.Lib.Logic as Logic+import qualified Hydra.Lib.Maps as Maps+import qualified Hydra.Lib.Maybes as Maybes+import qualified Hydra.Lib.Pairs as Pairs+import qualified Hydra.Lib.Sets as Sets+import qualified Hydra.Lib.Strings as Strings+import qualified Hydra.Paths as Paths+import qualified Hydra.Reflect as Reflect+import qualified Hydra.Rewriting as Rewriting+import qualified Hydra.Schemas as Schemas+import qualified Hydra.Show.Core as Core___+import qualified Hydra.Substitution as Substitution+import qualified Hydra.Typing as Typing+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++allEqual :: Eq t0 => ([t0] -> Bool)+allEqual els =+    Logic.ifElse (Lists.null els) True (Lists.foldl (\b -> \t -> Logic.and b (Equality.equal t (Lists.head els))) True (Lists.tail els))++-- | Apply type arguments to a type, substituting forall-bound variables+applyTypeArgumentsToType :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Type -> Either (Context.InContext Errors.Error) Core.Type+applyTypeArgumentsToType cx tx typeArgs t =+    Logic.ifElse (Lists.null typeArgs) (Right t) (+      let nonnull =+              case t of+                Core.TypeForall v0 ->+                  let v = Core.forallTypeParameter v0+                      tbody = Core.forallTypeBody v0+                  in (applyTypeArgumentsToType cx tx (Lists.tail typeArgs) (Substitution.substInType (Typing.TypeSubst (Maps.singleton v (Lists.head typeArgs))) tbody))+                _ -> Left (Context.InContext {+                  Context.inContextObject = (Errors.ErrorOther (Errors.OtherError (Strings.cat [+                    "not a forall type: ",+                    (Core___.type_ t),+                    ". Trying to apply ",+                    (Literals.showInt32 (Lists.length typeArgs)),+                    " type args: ",+                    (Formatting.showList Core___.type_ typeArgs),+                    ". Context has vars: {",+                    (Strings.intercalate ", " (Lists.map Core.unName (Maps.keys (Graph.graphBoundTypes tx)))),+                    "}"]))),+                  Context.inContextContext = cx})+      in nonnull)++-- | Check that a term has no unbound type variables (Either version)+checkForUnboundTypeVariables :: Context.Context -> Graph.Graph -> Core.Term -> Either (Context.InContext Errors.Error) ()+checkForUnboundTypeVariables cx tx term0 =++      let svars = Sets.fromList (Maps.keys (Graph.graphSchemaTypes tx))+          checkRecursive =+                  \vars -> \trace -> \lbinding -> \term ->+                    let recurse = checkRecursive vars trace lbinding+                        dflt = Eithers.bind (Eithers.mapList recurse (Rewriting.subterms term)) (\_ -> Right ())+                        check =+                                \typ ->+                                  let freevars = Rewriting.freeVariablesInType typ+                                      badvars = Sets.difference (Sets.difference freevars vars) svars+                                  in (Logic.ifElse (Sets.null badvars) (Right ()) (Left (Context.InContext {+                                    Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorUnboundTypeVariables (Checking.UnboundTypeVariablesError {+                                      Checking.unboundTypeVariablesErrorVariables = badvars,+                                      Checking.unboundTypeVariablesErrorType = typ}))),+                                    Context.inContextContext = cx})))+                        checkOptional = \m -> Eithers.bind (Eithers.mapMaybe check m) (\_ -> Right ())+                    in case term of+                      Core.TermFunction v0 -> case v0 of+                        Core.FunctionElimination _ -> dflt+                        Core.FunctionLambda v1 -> Eithers.bind (checkOptional (Core.lambdaDomain v1)) (\_ -> recurse (Core.lambdaBody v1))+                        _ -> dflt+                      Core.TermLet v0 ->+                        let forBinding =+                                \b ->+                                  let bterm = Core.bindingTerm b+                                      newVars = Maybes.maybe vars (\ts -> Sets.union vars (Sets.fromList (Core.typeSchemeVariables ts))) (Core.bindingType b)+                                      newTrace = Lists.cons (Core.unName (Core.bindingName b)) trace+                                  in (checkRecursive newVars newTrace (Just b) bterm)+                        in (Eithers.bind (Eithers.mapList forBinding (Core.letBindings v0)) (\_ -> recurse (Core.letBody v0)))+                      Core.TermTypeApplication v0 -> Eithers.bind (check (Core.typeApplicationTermType v0)) (\_ -> recurse (Core.typeApplicationTermBody v0))+                      Core.TermTypeLambda v0 -> Eithers.bind (check (Core.TypeVariable (Core.typeLambdaParameter v0))) (\_ -> recurse (Core.typeLambdaBody v0))+                      _ -> dflt+      in (checkRecursive Sets.empty [+        "top level"] Nothing term0)++-- | Check that a nominal type is applied to the correct number of type arguments (Either version)+checkNominalApplication :: Context.Context -> Graph.Graph -> Core.Name -> [Core.Type] -> Either (Context.InContext Errors.Error) ((), Context.Context)+checkNominalApplication cx tx tname typeArgs =+    Eithers.bind (Schemas.requireSchemaType cx (Graph.graphSchemaTypes tx) tname) (\result ->+      let schemaType = Pairs.first result+          cx2 = Pairs.second result+          vars = Core.typeSchemeVariables schemaType+          varslen = Lists.length vars+          argslen = Lists.length typeArgs+      in (Logic.ifElse (Equality.equal varslen argslen) (Right ((), cx2)) (Left (Context.InContext {+        Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorTypeArityMismatch (Checking.TypeArityMismatchError {+          Checking.typeArityMismatchErrorType = (Core.TypeVariable tname),+          Checking.typeArityMismatchErrorExpectedArity = varslen,+          Checking.typeArityMismatchErrorActualArity = argslen,+          Checking.typeArityMismatchErrorTypeArguments = typeArgs}))),+        Context.inContextContext = cx2}))))++-- | Ensure all types in a list are equal and return the common type+checkSameType :: Context.Context -> Graph.Graph -> String -> [Core.Type] -> Either (Context.InContext Errors.Error) Core.Type+checkSameType cx tx desc types =+    Logic.ifElse (typesAllEffectivelyEqual tx types) (Right (Lists.head types)) (Left (Context.InContext {+      Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorUnequalTypes (Checking.UnequalTypesError {+        Checking.unequalTypesErrorTypes = types,+        Checking.unequalTypesErrorDescription = desc}))),+      Context.inContextContext = cx}))++-- | Check that a term has the expected type+checkType :: Context.Context -> Graph.Graph -> Core.Term -> Core.Type -> Either (Context.InContext Errors.Error) ()+checkType cx tx term typ =++      let vars = Graph.graphTypeVariables tx+      in (Logic.ifElse Constants.debugInference (Eithers.bind (Eithers.map (\_p -> Pairs.first _p) (typeOf cx tx [] term)) (\t0 -> Logic.ifElse (typesEffectivelyEqual tx t0 typ) (Right ()) (Left (Context.InContext {+        Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorTypeMismatch (Checking.TypeMismatchError {+          Checking.typeMismatchErrorExpectedType = typ,+          Checking.typeMismatchErrorActualType = t0}))),+        Context.inContextContext = cx})))) (Right ()))++-- | Sanity-check a type substitution arising from unification. Specifically, check that schema types have not been inappropriately unified with type variables inferred from terms.+checkTypeSubst :: Context.Context -> Graph.Graph -> Typing.TypeSubst -> Either (Context.InContext Errors.Error) Typing.TypeSubst+checkTypeSubst cx tx subst =++      let s = Typing.unTypeSubst subst+          vars = Sets.fromList (Maps.keys s)+          suspectVars = Sets.intersection vars (Sets.fromList (Maps.keys (Graph.graphSchemaTypes tx)))+          isNominal =+                  \ts -> case (Rewriting.deannotateType (Core.typeSchemeType ts)) of+                    Core.TypeRecord _ -> True+                    Core.TypeUnion _ -> True+                    Core.TypeWrap _ -> True+                    _ -> False+          badVars =+                  Sets.fromList (Lists.filter (\v -> Maybes.maybe False isNominal (Lexical.dereferenceSchemaType v (Graph.graphSchemaTypes tx))) (Sets.toList suspectVars))+          badPairs = Lists.filter (\p -> Sets.member (Pairs.first p) badVars) (Maps.toList s)+          printPair = \p -> Strings.cat2 (Strings.cat2 (Core.unName (Pairs.first p)) " --> ") (Core___.type_ (Pairs.second p))+      in (Logic.ifElse (Sets.null badVars) (Right subst) (Left (Context.InContext {+        Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorIncorrectUnification (Checking.IncorrectUnificationError {+          Checking.incorrectUnificationErrorSubstitution = subst}))),+        Context.inContextContext = cx})))++-- | Check that all type variables in a type are bound. NOTE: This check is currently disabled to allow phantom type variables from polymorphic instantiation to pass through. The proper fix is to ensure `typeOf` doesn't create fresh variables for post-inference code.+checkTypeVariables :: t0 -> t1 -> ()+checkTypeVariables _tx _typ = ()++-- | Check if a type contains any type variable from the current scope+containsInScopeTypeVars :: Graph.Graph -> Core.Type -> Bool+containsInScopeTypeVars tx t =++      let vars = Graph.graphTypeVariables tx+          freeVars = Rewriting.freeVariablesInTypeSimple t+      in (Logic.not (Sets.null (Sets.intersection vars freeVars)))++-- | Normalize free type variables in a type to canonical names based on order of first occurrence. This allows comparing types that differ only in the naming of free type variables.+normalizeTypeFreeVars :: Core.Type -> Core.Type+normalizeTypeFreeVars typ =++      let collectVars =+              \acc -> \t -> case t of+                Core.TypeVariable v0 -> Logic.ifElse (Maps.member v0 acc) acc (Maps.insert v0 (Core.Name (Strings.cat2 "_tv" (Literals.showInt32 (Maps.size acc)))) acc)+                _ -> acc+          subst = Rewriting.foldOverType Coders.TraversalOrderPre collectVars Maps.empty typ+      in (Rewriting.substituteTypeVariables subst typ)++-- | Get the bound types from a graph as a type environment+toFContext :: Graph.Graph -> M.Map Core.Name Core.Type+toFContext cx = Maps.map Rewriting.typeSchemeToFType (Graph.graphBoundTypes cx)++-- | Check whether two lists of types are effectively equal, disregarding type aliases+typeListsEffectivelyEqual :: Graph.Graph -> [Core.Type] -> [Core.Type] -> Bool+typeListsEffectivelyEqual tx tlist1 tlist2 =+    Logic.ifElse (Equality.equal (Lists.length tlist1) (Lists.length tlist2)) (Lists.foldl Logic.and True (Lists.zipWith (typesEffectivelyEqual tx) tlist1 tlist2)) False++-- | Given a type context, reconstruct the type of a System F term+typeOf :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Term -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOf cx tx typeArgs term =++      let cx1 =+              Context.Context {+                Context.contextTrace = (Lists.cons "typeOf" (Context.contextTrace cx)),+                Context.contextMessages = (Context.contextMessages cx),+                Context.contextOther = (Context.contextOther cx)}+      in case term of+        Core.TermAnnotated v0 -> typeOfAnnotatedTerm cx1 tx typeArgs v0+        Core.TermApplication v0 -> typeOfApplication cx1 tx typeArgs v0+        Core.TermEither v0 -> typeOfEither cx1 tx typeArgs v0+        Core.TermFunction v0 -> case v0 of+          Core.FunctionElimination v1 -> case v1 of+            Core.EliminationRecord v2 -> typeOfProjection cx1 tx typeArgs v2+            Core.EliminationUnion v2 -> typeOfCaseStatement cx1 tx typeArgs v2+            Core.EliminationWrap v2 -> typeOfUnwrap cx1 tx typeArgs v2+          Core.FunctionLambda v1 -> typeOfLambda cx1 tx typeArgs v1+          Core.FunctionPrimitive v1 -> typeOfPrimitive cx1 tx typeArgs v1+        Core.TermLet v0 -> typeOfLet cx1 tx typeArgs v0+        Core.TermList v0 -> typeOfList cx1 tx typeArgs v0+        Core.TermLiteral v0 -> typeOfLiteral cx1 tx typeArgs v0+        Core.TermMap v0 -> typeOfMap cx1 tx typeArgs v0+        Core.TermMaybe v0 -> typeOfMaybe cx1 tx typeArgs v0+        Core.TermPair v0 -> typeOfPair cx1 tx typeArgs v0+        Core.TermRecord v0 -> typeOfRecord cx1 tx typeArgs v0+        Core.TermSet v0 -> typeOfSet cx1 tx typeArgs v0+        Core.TermTypeApplication v0 -> typeOfTypeApplication cx1 tx typeArgs v0+        Core.TermTypeLambda v0 -> typeOfTypeLambda cx1 tx typeArgs v0+        Core.TermUnion v0 -> typeOfInjection cx1 tx typeArgs v0+        Core.TermUnit -> typeOfUnit cx1 tx typeArgs+        Core.TermVariable v0 -> typeOfVariable cx1 tx typeArgs v0+        Core.TermWrap v0 -> typeOfWrappedTerm cx1 tx typeArgs v0+        _ -> Left (Context.InContext {+          Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorUnsupportedTermVariant (Checking.UnsupportedTermVariantError {+            Checking.unsupportedTermVariantErrorTermVariant = (Reflect.termVariant term)}))),+          Context.inContextContext = cx1})++-- | Reconstruct the type of an annotated term (Either/Context version)+typeOfAnnotatedTerm :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.AnnotatedTerm -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfAnnotatedTerm cx tx typeArgs at = typeOf cx tx typeArgs (Core.annotatedTermBody at)++-- | Reconstruct the type of an application term (Either/Context version)+typeOfApplication :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Application -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfApplication cx tx typeArgs app =++      let fun = Core.applicationFunction app+          arg = Core.applicationArgument app+          tryType =+                  \cx0 -> \tfun -> \targ -> case tfun of+                    Core.TypeForall v0 -> tryType cx0 (Core.forallTypeBody v0) targ+                    Core.TypeFunction v0 ->+                      let dom = Core.functionTypeDomain v0+                          cod = Core.functionTypeCodomain v0+                      in (Logic.ifElse (typesEffectivelyEqual tx dom targ) (Right (cod, cx0)) (Left (Context.InContext {+                        Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorTypeMismatch (Checking.TypeMismatchError {+                          Checking.typeMismatchErrorExpectedType = dom,+                          Checking.typeMismatchErrorActualType = targ}))),+                        Context.inContextContext = cx0})))+                    Core.TypeVariable _ ->+                      let nameResult = Schemas.freshName cx0+                          freshN = Pairs.first nameResult+                          cx1 = Pairs.second nameResult+                      in (Right (Core.TypeVariable freshN, cx1))+                    _ -> Left (Context.InContext {+                      Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorNotAFunctionType (Checking.NotAFunctionTypeError {+                        Checking.notAFunctionTypeErrorType = tfun}))),+                      Context.inContextContext = cx0})+      in (Eithers.bind (typeOf cx tx [] fun) (\result1 ->+        let tfun = Pairs.first result1+            cx2 = Pairs.second result1+        in (Eithers.bind (typeOf cx2 tx [] arg) (\result2 ->+          let targ = Pairs.first result2+              cx3 = Pairs.second result2+          in (Eithers.bind (tryType cx3 tfun targ) (\result3 ->+            let t = Pairs.first result3+                cx4 = Pairs.second result3+            in (Eithers.bind (applyTypeArgumentsToType cx4 tx typeArgs t) (\applied -> Right (applied, cx4)))))))))++-- | Reconstruct the type of a case statement (Either/Context version)+typeOfCaseStatement :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.CaseStatement -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfCaseStatement cx tx typeArgs cs =++      let tname = Core.caseStatementTypeName cs+          dflt = Core.caseStatementDefault cs+          cases = Core.caseStatementCases cs+          cterms = Lists.map Core.fieldTerm cases+      in (Eithers.bind (Eithers.mapMaybe (\e -> typeOf cx tx [] e) dflt) (\dfltResult ->+        let tdflt = Maybes.map Pairs.first dfltResult+            cx2 = Maybes.maybe cx Pairs.second dfltResult+            foldResult =+                    Lists.foldl (\acc -> \term -> Eithers.bind acc (\accR ->+                      let types = Pairs.first accR+                          cxA = Pairs.second accR+                      in (Eithers.bind (typeOf cxA tx [] term) (\tResult ->+                        let t = Pairs.first tResult+                            cxB = Pairs.second tResult+                        in (Right (Lists.concat2 types (Lists.pure t), cxB)))))) (Right ([], cx2)) cterms+        in (Eithers.bind foldResult (\foldR ->+          let tcterms = Pairs.first foldR+              cx3 = Pairs.second foldR+              fcodsResult =+                      Lists.foldl (\acc -> \t -> Eithers.bind acc (\accR ->+                        let cods = Pairs.first accR+                        in (Eithers.bind (Core__.functionType cx3 t) (\ft -> Right (Lists.concat2 cods (Lists.pure (Core.functionTypeCodomain ft)), cx3))))) (Right ([], cx3)) tcterms+          in (Eithers.bind fcodsResult (\fcodsR ->+            let fcods = Pairs.first fcodsR+                cods = Maybes.cat (Lists.cons tdflt (Lists.map Maybes.pure fcods))+            in (Eithers.bind (checkSameType cx3 tx "case branches" cods) (\cod -> Right (Core.TypeFunction (Core.FunctionType {+              Core.functionTypeDomain = (Schemas.nominalApplication tname typeArgs),+              Core.functionTypeCodomain = cod}), cx3)))))))))++-- | Reconstruct the type of an either value (Either/Context version)+typeOfEither :: Context.Context -> Graph.Graph -> [Core.Type] -> Either Core.Term Core.Term -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfEither cx tx typeArgs et =++      let n = Lists.length typeArgs+      in (Logic.ifElse (Equality.equal n 2) (Eithers.either (\leftTerm -> Eithers.bind (typeOf cx tx [] leftTerm) (\result ->+        let leftType = Pairs.first result+            cx2 = Pairs.second result+        in (Right (Core.TypeEither (Core.EitherType {+          Core.eitherTypeLeft = leftType,+          Core.eitherTypeRight = (Lists.at 1 typeArgs)}), cx2)))) (\rightTerm -> Eithers.bind (typeOf cx tx [] rightTerm) (\result ->+        let rightType = Pairs.first result+            cx2 = Pairs.second result+        in (Right (Core.TypeEither (Core.EitherType {+          Core.eitherTypeLeft = (Lists.at 0 typeArgs),+          Core.eitherTypeRight = rightType}), cx2)))) et) (Left (Context.InContext {+        Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorTypeArityMismatch (Checking.TypeArityMismatchError {+          Checking.typeArityMismatchErrorType = (Core.TypeEither (Core.EitherType {+            Core.eitherTypeLeft = Core.TypeUnit,+            Core.eitherTypeRight = Core.TypeUnit})),+          Checking.typeArityMismatchErrorExpectedArity = 2,+          Checking.typeArityMismatchErrorActualArity = n,+          Checking.typeArityMismatchErrorTypeArguments = typeArgs}))),+        Context.inContextContext = cx})))++-- | Reconstruct the type of a union injection (Either/Context version)+typeOfInjection :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Injection -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfInjection cx tx typeArgs injection =++      let tname = Core.injectionTypeName injection+          field = Core.injectionField injection+          fname = Core.fieldName field+          fterm = Core.fieldTerm field+      in (Eithers.bind (Schemas.requireSchemaType cx (Graph.graphSchemaTypes tx) tname) (\schemaResult ->+        let schemaType = Pairs.first schemaResult+            cx2 = Pairs.second schemaResult+            svars = Core.typeSchemeVariables schemaType+            sbody = Core.typeSchemeType schemaType+        in (Eithers.bind (Core__.unionType cx2 tname sbody) (\sfields -> Eithers.bind (Schemas.findFieldType cx2 fname sfields) (\ftyp -> Right (Schemas.nominalApplication tname typeArgs, cx2))))))++-- | Reconstruct the type of a lambda function (Either/Context version)+typeOfLambda :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Lambda -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfLambda cx tx typeArgs l =++      let v = Core.lambdaParameter l+          mdom = Core.lambdaDomain l+          body = Core.lambdaBody l+      in (Eithers.bind (Maybes.maybe (Left (Context.InContext {+        Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorUntypedLambda (Checking.UntypedLambdaError {+        }))),+        Context.inContextContext = cx})) (\dom ->+        let types2 = Maps.insert v (Rewriting.fTypeToTypeScheme dom) (Graph.graphBoundTypes tx)+        in (Eithers.bind (typeOf cx (Graph.Graph {+          Graph.graphBoundTerms = (Graph.graphBoundTerms tx),+          Graph.graphBoundTypes = types2,+          Graph.graphClassConstraints = (Graph.graphClassConstraints tx),+          Graph.graphLambdaVariables = (Graph.graphLambdaVariables tx),+          Graph.graphMetadata = (Graph.graphMetadata tx),+          Graph.graphPrimitives = (Graph.graphPrimitives tx),+          Graph.graphSchemaTypes = (Graph.graphSchemaTypes tx),+          Graph.graphTypeVariables = (Graph.graphTypeVariables tx)}) [] body) (\codResult ->+          let cod = Pairs.first codResult+              cx2 = Pairs.second codResult+          in (Right (Core.TypeFunction (Core.FunctionType {+            Core.functionTypeDomain = dom,+            Core.functionTypeCodomain = cod}), cx2))))) mdom) (\tbodyResult ->+        let tbody = Pairs.first tbodyResult+            cx3 = Pairs.second tbodyResult+        in (Eithers.bind (applyTypeArgumentsToType cx3 tx typeArgs tbody) (\applied -> Right (applied, cx3)))))++-- | Reconstruct the type of a let binding (Either/Context version)+typeOfLet :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Let -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfLet cx tx typeArgs letTerm =++      let bs = Core.letBindings letTerm+          body = Core.letBody letTerm+          bnames = Lists.map Core.bindingName bs+          bindingType =+                  \b -> Maybes.maybe (Left (Context.InContext {+                    Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorUntypedLetBinding (Checking.UntypedLetBindingError {+                      Checking.untypedLetBindingErrorBinding = b}))),+                    Context.inContextContext = cx})) (\ts -> Right (Rewriting.typeSchemeToFType ts)) (Core.bindingType b)+          btypesResult =+                  Lists.foldl (\acc -> \b -> Eithers.bind acc (\accR ->+                    let types = Pairs.first accR+                    in (Eithers.bind (bindingType b) (\btype -> Right (Lists.concat2 types (Lists.pure btype), ()))))) (Right ([], ())) bs+      in (Eithers.bind btypesResult (\btypesR ->+        let btypes = Pairs.first btypesR+            tx2 =+                    Graph.Graph {+                      Graph.graphBoundTerms = (Graph.graphBoundTerms tx),+                      Graph.graphBoundTypes = (Maps.union (Maps.fromList (Lists.zip bnames (Lists.map Rewriting.fTypeToTypeScheme btypes))) (Graph.graphBoundTypes tx)),+                      Graph.graphClassConstraints = (Graph.graphClassConstraints tx),+                      Graph.graphLambdaVariables = (Graph.graphLambdaVariables tx),+                      Graph.graphMetadata = (Graph.graphMetadata tx),+                      Graph.graphPrimitives = (Graph.graphPrimitives tx),+                      Graph.graphSchemaTypes = (Graph.graphSchemaTypes tx),+                      Graph.graphTypeVariables = (Graph.graphTypeVariables tx)}+        in (Eithers.bind (typeOf cx tx2 [] body) (\tResult ->+          let t = Pairs.first tResult+              cx2 = Pairs.second tResult+          in (Eithers.bind (applyTypeArgumentsToType cx2 tx typeArgs t) (\applied -> Right (applied, cx2)))))))++-- | Reconstruct the type of a list (Either/Context version)+typeOfList :: Context.Context -> Graph.Graph -> [Core.Type] -> [Core.Term] -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfList cx tx typeArgs els =+    Logic.ifElse (Lists.null els) (Logic.ifElse (Equality.equal (Lists.length typeArgs) 1) (Right (Core.TypeList (Lists.head typeArgs), cx)) (Left (Context.InContext {+      Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorTypeArityMismatch (Checking.TypeArityMismatchError {+        Checking.typeArityMismatchErrorType = (Core.TypeList Core.TypeUnit),+        Checking.typeArityMismatchErrorExpectedArity = 1,+        Checking.typeArityMismatchErrorActualArity = (Lists.length typeArgs),+        Checking.typeArityMismatchErrorTypeArguments = typeArgs}))),+      Context.inContextContext = cx}))) (+      let foldResult =+              Lists.foldl (\acc -> \term -> Eithers.bind acc (\accR ->+                let types = Pairs.first accR+                    cxA = Pairs.second accR+                in (Eithers.bind (typeOf cxA tx [] term) (\tResult ->+                  let t = Pairs.first tResult+                      cxB = Pairs.second tResult+                  in (Right (Lists.concat2 types (Lists.pure t), cxB)))))) (Right ([], cx)) els+      in (Eithers.bind foldResult (\foldR ->+        let eltypes = Pairs.first foldR+            cx2 = Pairs.second foldR+        in (Eithers.bind (checkSameType cx2 tx "list elements" eltypes) (\unifiedType -> Right (Core.TypeList unifiedType, cx2))))))++-- | Reconstruct the type of a literal (Either/Context version)+typeOfLiteral :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Literal -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfLiteral cx tx typeArgs lit =++      let t = Core.TypeLiteral (Reflect.literalType lit)+      in (Eithers.bind (applyTypeArgumentsToType cx tx typeArgs t) (\applied -> Right (applied, cx)))++-- | Reconstruct the type of a map (Either/Context version)+typeOfMap :: Context.Context -> Graph.Graph -> [Core.Type] -> M.Map Core.Term Core.Term -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfMap cx tx typeArgs m =+    Logic.ifElse (Maps.null m) (Logic.ifElse (Equality.equal (Lists.length typeArgs) 2) (Right (Core.TypeMap (Core.MapType {+      Core.mapTypeKeys = (Lists.at 0 typeArgs),+      Core.mapTypeValues = (Lists.at 1 typeArgs)}), cx)) (Left (Context.InContext {+      Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorTypeArityMismatch (Checking.TypeArityMismatchError {+        Checking.typeArityMismatchErrorType = (Core.TypeMap (Core.MapType {+          Core.mapTypeKeys = Core.TypeUnit,+          Core.mapTypeValues = Core.TypeUnit})),+        Checking.typeArityMismatchErrorExpectedArity = 2,+        Checking.typeArityMismatchErrorActualArity = (Lists.length typeArgs),+        Checking.typeArityMismatchErrorTypeArguments = typeArgs}))),+      Context.inContextContext = cx}))) (+      let pairs = Maps.toList m+          keyFoldResult =+                  Lists.foldl (\acc -> \p -> Eithers.bind acc (\accR ->+                    let types = Pairs.first accR+                        cxA = Pairs.second accR+                    in (Eithers.bind (typeOf cxA tx [] (Pairs.first p)) (\tResult ->+                      let t = Pairs.first tResult+                          cxB = Pairs.second tResult+                      in (Right (Lists.concat2 types (Lists.pure t), cxB)))))) (Right ([], cx)) pairs+      in (Eithers.bind keyFoldResult (\keyFoldR ->+        let keyTypes = Pairs.first keyFoldR+            cx2 = Pairs.second keyFoldR+        in (Eithers.bind (checkSameType cx2 tx "map keys" keyTypes) (\kt ->+          let valFoldResult =+                  Lists.foldl (\acc -> \p -> Eithers.bind acc (\accR ->+                    let types = Pairs.first accR+                        cxA = Pairs.second accR+                    in (Eithers.bind (typeOf cxA tx [] (Pairs.second p)) (\tResult ->+                      let t = Pairs.first tResult+                          cxB = Pairs.second tResult+                      in (Right (Lists.concat2 types (Lists.pure t), cxB)))))) (Right ([], cx2)) pairs+          in (Eithers.bind valFoldResult (\valFoldR ->+            let valTypes = Pairs.first valFoldR+                cx3 = Pairs.second valFoldR+            in (Eithers.bind (checkSameType cx3 tx "map values" valTypes) (\vt -> Eithers.bind (applyTypeArgumentsToType cx3 tx typeArgs (Core.TypeMap (Core.MapType {+              Core.mapTypeKeys = kt,+              Core.mapTypeValues = vt}))) (\applied -> Right (applied, cx3)))))))))))++-- | Reconstruct the type of an optional value (Either/Context version)+typeOfMaybe :: Context.Context -> Graph.Graph -> [Core.Type] -> Maybe Core.Term -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfMaybe cx tx typeArgs mt =++      let forNothing =++                let n = Lists.length typeArgs+                in (Logic.ifElse (Equality.equal n 1) (Right (Core.TypeMaybe (Lists.head typeArgs), cx)) (Left (Context.InContext {+                  Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorTypeArityMismatch (Checking.TypeArityMismatchError {+                    Checking.typeArityMismatchErrorType = (Core.TypeMaybe Core.TypeUnit),+                    Checking.typeArityMismatchErrorExpectedArity = 1,+                    Checking.typeArityMismatchErrorActualArity = n,+                    Checking.typeArityMismatchErrorTypeArguments = typeArgs}))),+                  Context.inContextContext = cx})))+          forJust =+                  \term -> Eithers.bind (typeOf cx tx [] term) (\tResult ->+                    let termType = Pairs.first tResult+                        cx2 = Pairs.second tResult+                        t = Core.TypeMaybe termType+                    in (Eithers.bind (applyTypeArgumentsToType cx2 tx typeArgs t) (\applied -> Right (applied, cx2))))+      in (Maybes.maybe forNothing forJust mt)++-- | Reconstruct the type of a pair (Either/Context version)+typeOfPair :: Context.Context -> Graph.Graph -> [Core.Type] -> (Core.Term, Core.Term) -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfPair cx tx typeArgs p =++      let n = Lists.length typeArgs+      in (Logic.ifElse (Equality.equal n 2) (+        let pairFst = Pairs.first p+            pairSnd = Pairs.second p+        in (Eithers.bind (typeOf cx tx [] pairFst) (\result1 ->+          let firstType = Pairs.first result1+              cx2 = Pairs.second result1+          in (Eithers.bind (typeOf cx2 tx [] pairSnd) (\result2 ->+            let secondType = Pairs.first result2+                cx3 = Pairs.second result2+            in (Right (Core.TypePair (Core.PairType {+              Core.pairTypeFirst = firstType,+              Core.pairTypeSecond = secondType}), cx3))))))) (Left (Context.InContext {+        Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorTypeArityMismatch (Checking.TypeArityMismatchError {+          Checking.typeArityMismatchErrorType = (Core.TypePair (Core.PairType {+            Core.pairTypeFirst = Core.TypeUnit,+            Core.pairTypeSecond = Core.TypeUnit})),+          Checking.typeArityMismatchErrorExpectedArity = 2,+          Checking.typeArityMismatchErrorActualArity = n,+          Checking.typeArityMismatchErrorTypeArguments = typeArgs}))),+        Context.inContextContext = cx})))++-- | Reconstruct the type of a primitive function (Either/Context version)+typeOfPrimitive :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Name -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfPrimitive cx tx typeArgs name =++      let rawTs = Maybes.map (\_p -> Graph.primitiveType _p) (Maps.lookup name (Graph.graphPrimitives tx))+      in (Maybes.maybe (Left (Context.InContext {+        Context.inContextObject = (Errors.ErrorUndefinedTermVariable (Core_.UndefinedTermVariableError {+          Core_.undefinedTermVariableErrorLocation = (Paths.SubtermPath []),+          Core_.undefinedTermVariableErrorName = name})),+        Context.inContextContext = cx})) (\tsRaw ->+        let instResult = Schemas.instantiateTypeScheme cx tsRaw+            ts = Pairs.first instResult+            cx2 = Pairs.second instResult+            t = Rewriting.typeSchemeToFType ts+        in (Eithers.bind (applyTypeArgumentsToType cx2 tx typeArgs t) (\applied -> Right (applied, cx2)))) rawTs)++-- | Reconstruct the type of a record projection (Either/Context version)+typeOfProjection :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Projection -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfProjection cx tx typeArgs p =++      let tname = Core.projectionTypeName p+          fname = Core.projectionField p+      in (Eithers.bind (Schemas.requireSchemaType cx (Graph.graphSchemaTypes tx) tname) (\schemaResult ->+        let schemaType = Pairs.first schemaResult+            cx2 = Pairs.second schemaResult+            svars = Core.typeSchemeVariables schemaType+            sbody = Core.typeSchemeType schemaType+        in (Eithers.bind (Core__.recordType cx2 tname sbody) (\sfields -> Eithers.bind (Schemas.findFieldType cx2 fname sfields) (\ftyp ->+          let subst = Typing.TypeSubst (Maps.fromList (Lists.zip svars typeArgs))+              sftyp = Substitution.substInType subst ftyp+          in (Right (Core.TypeFunction (Core.FunctionType {+            Core.functionTypeDomain = (Schemas.nominalApplication tname typeArgs),+            Core.functionTypeCodomain = sftyp}), cx2)))))))++-- | Reconstruct the type of a record (Either/Context version)+typeOfRecord :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Record -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfRecord cx tx typeArgs record =++      let tname = Core.recordTypeName record+          fields = Core.recordFields record+          foldResult =+                  Lists.foldl (\acc -> \term -> Eithers.bind acc (\accR ->+                    let types = Pairs.first accR+                        cxA = Pairs.second accR+                    in (Eithers.bind (typeOf cxA tx [] term) (\tResult ->+                      let t = Pairs.first tResult+                          cxB = Pairs.second tResult+                      in (Right (Lists.concat2 types (Lists.pure t), cxB)))))) (Right ([], cx)) (Lists.map Core.fieldTerm fields)+      in (Eithers.bind foldResult (\foldR ->+        let cx2 = Pairs.second foldR+        in (Right (Schemas.nominalApplication tname typeArgs, cx2))))++-- | Reconstruct the type of a set (Either/Context version)+typeOfSet :: Context.Context -> Graph.Graph -> [Core.Type] -> S.Set Core.Term -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfSet cx tx typeArgs els =+    Logic.ifElse (Sets.null els) (Logic.ifElse (Equality.equal (Lists.length typeArgs) 1) (Right (Core.TypeSet (Lists.head typeArgs), cx)) (Left (Context.InContext {+      Context.inContextObject = (Errors.ErrorChecking (Checking.CheckingErrorTypeArityMismatch (Checking.TypeArityMismatchError {+        Checking.typeArityMismatchErrorType = (Core.TypeSet Core.TypeUnit),+        Checking.typeArityMismatchErrorExpectedArity = 1,+        Checking.typeArityMismatchErrorActualArity = (Lists.length typeArgs),+        Checking.typeArityMismatchErrorTypeArguments = typeArgs}))),+      Context.inContextContext = cx}))) (+      let foldResult =+              Lists.foldl (\acc -> \term -> Eithers.bind acc (\accR ->+                let types = Pairs.first accR+                    cxA = Pairs.second accR+                in (Eithers.bind (typeOf cxA tx [] term) (\tResult ->+                  let t = Pairs.first tResult+                      cxB = Pairs.second tResult+                  in (Right (Lists.concat2 types (Lists.pure t), cxB)))))) (Right ([], cx)) (Sets.toList els)+      in (Eithers.bind foldResult (\foldR ->+        let eltypes = Pairs.first foldR+            cx2 = Pairs.second foldR+        in (Eithers.bind (checkSameType cx2 tx "set elements" eltypes) (\unifiedType -> Right (Core.TypeSet unifiedType, cx2))))))++-- | Reconstruct the type of a type application term (Either/Context version)+typeOfTypeApplication :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.TypeApplicationTerm -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfTypeApplication cx tx typeArgs tyapp =++      let body = Core.typeApplicationTermBody tyapp+          t = Core.typeApplicationTermType tyapp+      in (typeOf cx tx (Lists.cons t typeArgs) body)++-- | Reconstruct the type of a type lambda (type abstraction) term (Either/Context version)+typeOfTypeLambda :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.TypeLambda -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfTypeLambda cx tx typeArgs tl =++      let v = Core.typeLambdaParameter tl+          body = Core.typeLambdaBody tl+          vars = Graph.graphTypeVariables tx+          tx2 =+                  Graph.Graph {+                    Graph.graphBoundTerms = (Graph.graphBoundTerms tx),+                    Graph.graphBoundTypes = (Graph.graphBoundTypes tx),+                    Graph.graphClassConstraints = (Graph.graphClassConstraints tx),+                    Graph.graphLambdaVariables = (Graph.graphLambdaVariables tx),+                    Graph.graphMetadata = (Graph.graphMetadata tx),+                    Graph.graphPrimitives = (Graph.graphPrimitives tx),+                    Graph.graphSchemaTypes = (Graph.graphSchemaTypes tx),+                    Graph.graphTypeVariables = (Sets.insert v vars)}+      in (Eithers.bind (typeOf cx tx2 [] body) (\result1 ->+        let t1 = Pairs.first result1+            cx2 = Pairs.second result1+        in (Eithers.bind (applyTypeArgumentsToType cx2 tx typeArgs (Core.TypeForall (Core.ForallType {+          Core.forallTypeParameter = v,+          Core.forallTypeBody = t1}))) (\applied -> Right (applied, cx2)))))++-- | Reconstruct the type of the unit term (Either/Context version)+typeOfUnit :: Context.Context -> Graph.Graph -> [Core.Type] -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfUnit cx tx typeArgs =+    Eithers.bind (applyTypeArgumentsToType cx tx typeArgs Core.TypeUnit) (\applied -> Right (applied, cx))++-- | Reconstruct the type of an unwrap operation (Either/Context version)+typeOfUnwrap :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Name -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfUnwrap cx tx typeArgs tname =+    Eithers.bind (Schemas.requireSchemaType cx (Graph.graphSchemaTypes tx) tname) (\schemaResult ->+      let schemaType = Pairs.first schemaResult+          cx2 = Pairs.second schemaResult+          svars = Core.typeSchemeVariables schemaType+          sbody = Core.typeSchemeType schemaType+      in (Eithers.bind (Core__.wrappedType cx2 tname sbody) (\wrapped ->+        let subst = Typing.TypeSubst (Maps.fromList (Lists.zip svars typeArgs))+            swrapped = Substitution.substInType subst wrapped+        in (Right (Core.TypeFunction (Core.FunctionType {+          Core.functionTypeDomain = (Schemas.nominalApplication tname typeArgs),+          Core.functionTypeCodomain = swrapped}), cx2)))))++-- | Reconstruct the type of a variable (Either/Context version)+typeOfVariable :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.Name -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfVariable cx tx typeArgs name =++      let rawTypeScheme = Maps.lookup name (Graph.graphBoundTypes tx)+      in (Maybes.maybe (Left (Context.InContext {+        Context.inContextObject = (Errors.ErrorUntypedTermVariable (Core_.UntypedTermVariableError {+          Core_.untypedTermVariableErrorLocation = (Paths.SubtermPath []),+          Core_.untypedTermVariableErrorName = name})),+        Context.inContextContext = cx})) (\ts ->+        let tResult =+                Logic.ifElse (Lists.null typeArgs) (Schemas.instantiateType cx (Rewriting.typeSchemeToFType ts)) (Rewriting.typeSchemeToFType ts, cx)+            t = Pairs.first tResult+            cx2 = Pairs.second tResult+        in (Eithers.bind (applyTypeArgumentsToType cx2 tx typeArgs t) (\applied -> Right (applied, cx2)))) rawTypeScheme)++-- | Reconstruct the type of a wrapped term (Either/Context version)+typeOfWrappedTerm :: Context.Context -> Graph.Graph -> [Core.Type] -> Core.WrappedTerm -> Either (Context.InContext Errors.Error) (Core.Type, Context.Context)+typeOfWrappedTerm cx tx typeArgs wt =++      let tname = Core.wrappedTermTypeName wt+          body = Core.wrappedTermBody wt+      in (Eithers.bind (typeOf cx tx [] body) (\result ->+        let cx2 = Pairs.second result+        in (Right (Schemas.nominalApplication tname typeArgs, cx2))))++-- | Check whether a list of types are effectively equal, disregarding type aliases and free type variable naming. Also treats free type variables (not in schema) as wildcards, since inference has already verified consistency.+typesAllEffectivelyEqual :: Graph.Graph -> [Core.Type] -> Bool+typesAllEffectivelyEqual tx tlist =++      let types = Graph.graphSchemaTypes tx+          containsFreeVar =+                  \t ->+                    let allVars = Rewriting.freeVariablesInTypeSimple t+                        schemaNames = Sets.fromList (Maps.keys types)+                    in (Logic.not (Sets.null (Sets.difference allVars schemaNames)))+          anyContainsFreeVar = Lists.foldl (\acc -> \t -> Logic.or acc (containsFreeVar t)) False tlist+      in (Logic.ifElse anyContainsFreeVar True (Logic.ifElse (allEqual (Lists.map (\t -> normalizeTypeFreeVars t) tlist)) True (allEqual (Lists.map (\t -> normalizeTypeFreeVars (Rewriting.deannotateTypeRecursive (Rewriting.replaceTypedefs types t))) tlist))))++-- | Check whether two types are effectively equal, disregarding type aliases, forall quantifiers, and treating in-scope type variables as wildcards+typesEffectivelyEqual :: Graph.Graph -> Core.Type -> Core.Type -> Bool+typesEffectivelyEqual tx t1 t2 =+    Logic.or (containsInScopeTypeVars tx t1) (Logic.or (containsInScopeTypeVars tx t2) (typesAllEffectivelyEqual tx [+      Schemas.fullyStripAndNormalizeType t1,+      (Schemas.fullyStripAndNormalizeType t2)]))
src/gen-main/haskell/Hydra/Classes.hs view
@@ -13,13 +13,13 @@ import qualified Data.Set as S  -- | Any of a small number of built-in type classes-data TypeClass = +data TypeClass =   TypeClassEquality  |-  TypeClassOrdering +  TypeClassOrdering   deriving (Eq, Ord, Read, Show) -_TypeClass = (Core.Name "hydra.classes.TypeClass")+_TypeClass = Core.Name "hydra.classes.TypeClass" -_TypeClass_equality = (Core.Name "equality")+_TypeClass_equality = Core.Name "equality" -_TypeClass_ordering = (Core.Name "ordering")+_TypeClass_ordering = Core.Name "ordering"
src/gen-main/haskell/Hydra/CodeGeneration.hs view
@@ -4,14 +4,15 @@  module Hydra.CodeGeneration where -import qualified Hydra.Adapt.Simple as Simple+import qualified Hydra.Adapt as Adapt import qualified Hydra.Annotations as Annotations import qualified Hydra.Coders as Coders-import qualified Hydra.Compute as Compute+import qualified Hydra.Context as Context import qualified Hydra.Core as Core import qualified Hydra.Decode.Core as Core_ import qualified Hydra.Decode.Module as Module import qualified Hydra.Encode.Module as Module_+import qualified Hydra.Errors as Errors import qualified Hydra.Graph as Graph import qualified Hydra.Inference as Inference import qualified Hydra.Json.Decode as Decode@@ -21,7 +22,6 @@ import qualified Hydra.Lexical as Lexical import qualified Hydra.Lib.Eithers as Eithers import qualified Hydra.Lib.Equality as Equality-import qualified Hydra.Lib.Flows as Flows import qualified Hydra.Lib.Lists as Lists import qualified Hydra.Lib.Logic as Logic import qualified Hydra.Lib.Maps as Maps@@ -31,10 +31,10 @@ import qualified Hydra.Lib.Sets as Sets import qualified Hydra.Lib.Strings as Strings import qualified Hydra.Module as Module__-import qualified Hydra.Monads as Monads import qualified Hydra.Rewriting as Rewriting+import qualified Hydra.Schemas as Schemas import qualified Hydra.Show.Core as Core__-import qualified Hydra.Util as Util+import qualified Hydra.Show.Errors as Errors_ import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -42,255 +42,349 @@ import qualified Data.Map as M import qualified Data.Set as S --- | Convert a namespace to a file path (e.g., hydra.core -> hydra/core)-namespaceToPath :: (Module__.Namespace -> String)-namespaceToPath ns = (Strings.intercalate "/" (Strings.splitOn "." (Module__.unNamespace ns)))+-- | Build a schema map (Name -> Type) from a graph's schema types+buildSchemaMap :: Graph.Graph -> M.Map Core.Name Core.Type+buildSchemaMap g = Maps.map (\ts -> Rewriting.deannotateType (Core.typeSchemeType ts)) (Graph.graphSchemaTypes g) --- | Strip TypeSchemes from term bindings in a module, preserving type binding TypeSchemes. JSON-loaded modules carry inferred TypeSchemes from the original compilation. After adaptation (e.g., bigfloat -> float64), these TypeSchemes become stale and can cause inference errors. Stripping them allows the inference engine to reconstruct correct TypeSchemes from scratch.-stripModuleTypeSchemes :: (Module__.Module -> Module__.Module)-stripModuleTypeSchemes m =  -  let stripIfTerm = (\b -> Logic.ifElse (Annotations.isNativeType b) b (Core.Binding {-          Core.bindingName = (Core.bindingName b),-          Core.bindingTerm = (Core.bindingTerm b),-          Core.bindingType = Nothing}))-  in Module__.Module {-    Module__.moduleNamespace = (Module__.moduleNamespace m),-    Module__.moduleElements = (Lists.map stripIfTerm (Module__.moduleElements m)),-    Module__.moduleTermDependencies = (Module__.moduleTermDependencies m),-    Module__.moduleTypeDependencies = (Module__.moduleTypeDependencies m),-    Module__.moduleDescription = (Module__.moduleDescription m)}+-- | Decode a single module from a JSON value+decodeModuleFromJson :: Graph.Graph -> [Module__.Module] -> Bool -> Model.Value -> Either String Module__.Module+decodeModuleFromJson bsGraph universeModules doStripTypeSchemes jsonVal = --- | Compute transitive closure of module dependencies-transitiveDeps :: ((Module__.Module -> [Module__.Namespace]) -> M.Map Module__.Namespace Module__.Module -> [Module__.Module] -> S.Set Module__.Namespace)-transitiveDeps getDeps nsMap startMods =  -  let initialDeps = (Sets.fromList (Lists.concat (Lists.map (\m -> Lists.filter (\dep -> Logic.not (Equality.equal dep (Module__.moduleNamespace m))) (getDeps m)) startMods)))-  in  -    let go = (\pending -> \visited -> Logic.ifElse (Sets.null pending) visited ( -            let newVisited = (Sets.union visited pending)-            in  -              let nextDeps = (Sets.fromList (Lists.concat (Lists.map (\nsv -> Maybes.maybe [] (\depMod -> getDeps depMod) (Maps.lookup nsv nsMap)) (Sets.toList pending))))-              in  -                let newPending = (Sets.difference nextDeps newVisited)-                in (go newPending newVisited)))-    in (go initialDeps Sets.empty)+      let graph = modulesToGraph bsGraph universeModules universeModules+          schemaMap = buildSchemaMap graph+          modType = Core.TypeVariable (Core.Name "hydra.module.Module")+      in (Eithers.either (\err -> Left err) (\term -> Eithers.either (\decErr -> Left (Errors.unDecodingError decErr)) (\mod -> Right (Logic.ifElse doStripTypeSchemes (stripModuleTypeSchemes mod) mod)) (Module.module_ graph term)) (Decode.fromJson schemaMap (Core.Name "hydra.module.Module") modType jsonVal)) --- | Compute transitive closure of term dependencies for a set of modules-moduleTermDepsTransitive :: (M.Map Module__.Namespace Module__.Module -> [Module__.Module] -> [Module__.Module])-moduleTermDepsTransitive nsMap modules =  -  let closure = (Sets.union (transitiveDeps (\m -> Module__.moduleTermDependencies m) nsMap modules) (Sets.fromList (Lists.map (\m -> Module__.moduleNamespace m) modules)))-  in (Maybes.cat (Lists.map (\n -> Maps.lookup n nsMap) (Sets.toList closure)))+-- | Escape unescaped control characters inside JSON string literals+escapeControlCharsInJson :: [Int] -> [Int]+escapeControlCharsInJson input = --- | Compute transitive closure of type dependencies for a set of modules-moduleTypeDepsTransitive :: (M.Map Module__.Namespace Module__.Module -> [Module__.Module] -> [Module__.Module])-moduleTypeDepsTransitive nsMap modules =  -  let termMods = (moduleTermDepsTransitive nsMap modules)-  in  -    let typeNamespaces = (Sets.toList (transitiveDeps (\m -> Module__.moduleTypeDependencies m) nsMap termMods))-    in (Maybes.cat (Lists.map (\n -> Maps.lookup n nsMap) typeNamespaces))+      let hexDigit = \n -> Logic.ifElse (Equality.lt n 10) (Math.add 48 n) (Math.add 97 (Math.sub n 10))+          escapeToUnicode =+                  \b -> [+                    92,+                    117,+                    48,+                    48,+                    (hexDigit (Math.div b 16)),+                    (hexDigit (Math.mod b 16))]+          go =+                  \inStr -> \esc -> \bytes -> Logic.ifElse (Lists.null bytes) [] (+                    let b = Lists.head bytes+                        bs = Lists.tail bytes+                    in (Logic.ifElse esc (Lists.cons b (go inStr False bs)) (Logic.ifElse (Logic.and (Equality.equal b 92) inStr) (Lists.cons b (go inStr True bs)) (Logic.ifElse (Equality.equal b 34) (Lists.cons b (go (Logic.not inStr) False bs)) (Logic.ifElse (Logic.and inStr (Equality.lt b 32)) (Lists.concat2 (escapeToUnicode b) (go inStr False bs)) (Lists.cons b (go inStr False bs)))))))+      in (go False False input) --- | Build a graph from universe modules and working modules, using an explicit bootstrap graph-modulesToGraph :: (Graph.Graph -> [Module__.Module] -> [Module__.Module] -> Graph.Graph)-modulesToGraph bsGraph universeModules modules =  -  let universe = (Maps.fromList (Lists.map (\m -> (Module__.moduleNamespace m, m)) (Lists.concat2 universeModules modules)))-  in  -    let schemaModules = (moduleTypeDepsTransitive universe modules)-    in  -      let dataModules = (moduleTermDepsTransitive universe modules)-      in  -        let schemaElements = (Lists.filter (\e -> Annotations.isNativeType e) (Lists.concat (Lists.map (\m -> Module__.moduleElements m) (Lists.concat2 schemaModules modules))))-        in  -          let dataElements = (Lists.filter (\e -> Logic.not (Annotations.isNativeType e)) (Lists.concat (Lists.map (\m -> Module__.moduleElements m) dataModules)))-          in  -            let schemaGraph = (Lexical.elementsToGraph bsGraph Nothing schemaElements)-            in (Lexical.elementsToGraph bsGraph (Just schemaGraph) dataElements)+-- | Format a primitive for the lexicon+formatPrimitive :: Graph.Primitive -> String+formatPrimitive prim = --- | Pure core of code generation: given a coder, language, flags, bootstrap graph, universe, and modules to generate, produce a list of (filePath, content) pairs.-generateSourceFiles :: Ord t0 => ((Module__.Module -> [Module__.Definition] -> Compute.Flow Graph.Graph (M.Map t0 t1)) -> Coders.Language -> Bool -> Bool -> Bool -> Bool -> Graph.Graph -> [Module__.Module] -> [Module__.Module] -> Compute.Flow Graph.Graph [(t0, t1)])-generateSourceFiles printDefinitions lang doInfer doExpand doHoistCaseStatements doHoistPolymorphicLetBindings bsGraph universeModules modsToGenerate =  -  let namespaceMap = (Maps.fromList (Lists.map (\m -> (Module__.moduleNamespace m, m)) (Lists.concat2 universeModules modsToGenerate)))-  in  -    let constraints = (Coders.languageConstraints lang)-    in  -      let isTypeModule = (\mod -> Logic.not (Lists.null (Lists.filter (\e -> Annotations.isNativeType e) (Module__.moduleElements mod))))-      in  -        let partitioned = (Lists.partition isTypeModule modsToGenerate)-        in  -          let typeModulesToGenerate = (Pairs.first partitioned)-          in  -            let termModulesToGenerate = (Pairs.second partitioned)-            in  -              let schemaMods = (moduleTypeDepsTransitive namespaceMap modsToGenerate)-              in  -                let schemaElements = (Lists.filter (\e -> Annotations.isNativeType e) (Lists.concat (Lists.map (\m -> Module__.moduleElements m) (Lists.concat2 schemaMods typeModulesToGenerate))))-                in  -                  let dataMods = (moduleTermDepsTransitive namespaceMap modsToGenerate)-                  in  -                    let dataElements = (Lists.concat (Lists.map (\m -> Module__.moduleElements m) dataMods))-                    in  -                      let schemaGraph = (Lexical.elementsToGraph bsGraph Nothing schemaElements)-                      in  -                        let dataGraph = (Lexical.elementsToGraph bsGraph (Just schemaGraph) dataElements)-                        in (Flows.bind (Logic.ifElse (Lists.null typeModulesToGenerate) (Flows.pure []) (Monads.withTrace "generate type modules" ( -                          let nameLists = (Lists.map (\m -> Lists.map (\e -> Core.bindingName e) (Lists.filter (\e -> Annotations.isNativeType e) (Module__.moduleElements m))) typeModulesToGenerate)-                          in (Flows.bind (Simple.schemaGraphToDefinitions constraints schemaGraph nameLists) (\schemaResult ->  -                            let defLists = (Pairs.second schemaResult)-                            in (Monads.withState schemaGraph (Flows.map (\xs -> Lists.concat xs) (Flows.mapList (\p ->  -                              let mod = (Pairs.first p)-                              in  -                                let defs = (Pairs.second p)-                                in (Monads.withTrace (Strings.cat2 "type module " (Module__.unNamespace (Module__.moduleNamespace mod))) (Flows.map (\m -> Maps.toList m) (printDefinitions mod (Lists.map (\d -> Module__.DefinitionType d) defs))))) (Lists.zip typeModulesToGenerate defLists))))))))) (\schemaFiles -> Flows.bind (Logic.ifElse (Lists.null termModulesToGenerate) (Flows.pure []) (Monads.withTrace "generate term modules" ( -                          let namespaces = (Lists.map (\m -> Module__.moduleNamespace m) termModulesToGenerate)-                          in (Flows.bind (Simple.dataGraphToDefinitions constraints doInfer doExpand doHoistCaseStatements doHoistPolymorphicLetBindings dataGraph namespaces) (\dataResult ->  -                            let g1 = (Pairs.first dataResult)-                            in  -                              let defLists = (Pairs.second dataResult)-                              in  -                                let refreshModule = (\els -> \m -> Module__.Module {-                                        Module__.moduleNamespace = (Module__.moduleNamespace m),-                                        Module__.moduleElements = (Maybes.cat (Lists.map (\e -> Lists.find (\b -> Equality.equal (Core.bindingName b) (Core.bindingName e)) els) (Module__.moduleElements m))),-                                        Module__.moduleTermDependencies = (Module__.moduleTermDependencies m),-                                        Module__.moduleTypeDependencies = (Module__.moduleTypeDependencies m),-                                        Module__.moduleDescription = (Module__.moduleDescription m)})-                                in  -                                  let refreshedMods = (Lists.map (\m -> refreshModule (Graph.graphElements g1) m) termModulesToGenerate)-                                  in (Monads.withState g1 (Flows.map (\xs -> Lists.concat xs) (Flows.mapList (\p ->  -                                    let mod = (Pairs.first p)-                                    in  -                                      let defs = (Pairs.second p)-                                      in (Monads.withTrace (Strings.cat2 "term module " (Module__.unNamespace (Module__.moduleNamespace mod))) (Flows.map (\m -> Maps.toList m) (printDefinitions mod (Lists.map (\d -> Module__.DefinitionTerm d) defs))))) (Lists.zip refreshedMods defLists))))))))) (\termFiles -> Flows.pure (Lists.concat2 schemaFiles termFiles))))+      let name = Core.unName (Graph.primitiveName prim)+          typeStr = Core__.typeScheme (Graph.primitiveType prim)+      in (Strings.cat2 (Strings.cat2 (Strings.cat2 "  " name) " : ") typeStr)  -- | Format a term binding for the lexicon-formatTermBinding :: (Core.Binding -> String)-formatTermBinding binding =  -  let name = (Core.unName (Core.bindingName binding))-  in  -    let typeStr = (Maybes.maybe "?" (\scheme -> Core__.typeScheme scheme) (Core.bindingType binding))-    in (Strings.cat2 (Strings.cat2 (Strings.cat2 "  " name) " : ") typeStr)+formatTermBinding :: Core.Binding -> String+formatTermBinding binding = --- | Format a primitive for the lexicon-formatPrimitive :: (Graph.Primitive -> String)-formatPrimitive prim =  -  let name = (Core.unName (Graph.primitiveName prim))-  in  -    let typeStr = (Core__.typeScheme (Graph.primitiveType prim))-    in (Strings.cat2 (Strings.cat2 (Strings.cat2 "  " name) " : ") typeStr)+      let name = Core.unName (Core.bindingName binding)+          typeStr = Maybes.maybe "?" (\scheme -> Core__.typeScheme scheme) (Core.bindingType binding)+      in (Strings.cat2 (Strings.cat2 (Strings.cat2 "  " name) " : ") typeStr)  -- | Format a type binding for the lexicon-formatTypeBinding :: (Core.Binding -> Compute.Flow Graph.Graph String)-formatTypeBinding binding = (Flows.bind Monads.getState (\g -> Flows.bind (Monads.eitherToFlow Util.unDecodingError (Core_.type_ g (Core.bindingTerm binding))) (\typ -> Flows.pure (Strings.cat2 (Strings.cat2 (Strings.cat2 "  " (Core.unName (Core.bindingName binding))) " = ") (Core__.type_ typ)))))+formatTypeBinding :: Graph.Graph -> Core.Binding -> Either Errors.DecodingError String+formatTypeBinding graph binding =+    Eithers.bind (Core_.type_ graph (Core.bindingTerm binding)) (\typ -> Right (Strings.cat2 (Strings.cat2 (Strings.cat2 "  " (Core.unName (Core.bindingName binding))) " = ") (Core__.type_ typ))) --- | Build a schema map (Name -> Type) from a graph's schema-buildSchemaMap :: (Graph.Graph -> M.Map Core.Name Core.Type)-buildSchemaMap g = (Maybes.maybe Maps.empty (\schemaGraph -> Maps.fromList (Maybes.cat (Lists.map (\binding ->  -  let result = (Core_.type_ schemaGraph (Core.bindingTerm binding))-  in (Eithers.either (\_err -> Nothing) (\typ -> Just (Core.bindingName binding, (Rewriting.deannotateType typ))) result)) (Graph.graphElements schemaGraph)))) (Graph.graphSchema g))+-- | Generate encoder or decoder modules for a list of type modules+generateCoderModules :: (t0 -> Graph.Graph -> t1 -> Either t2 (Maybe t3)) -> Graph.Graph -> [Module__.Module] -> [t1] -> t0 -> Either t2 [t3]+generateCoderModules codec bsGraph universeModules typeModules cx = +      let universe = Maps.fromList (Lists.map (\m -> (Module__.moduleNamespace m, m)) (Lists.concat2 universeModules universeModules))+          schemaModules = moduleTypeDepsTransitive universe universeModules+          dataModules = moduleTermDepsTransitive universe universeModules+          schemaElements =+                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of+                    Module__.DefinitionType v0 -> Just (Annotations.typeElement (Module__.typeDefinitionName v0) (Module__.typeDefinitionType v0))+                    _ -> Nothing) (Module__.moduleDefinitions m))) (Lists.concat2 schemaModules universeModules))+          dataElements =+                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of+                    Module__.DefinitionTerm v0 -> Just (Core.Binding {+                      Core.bindingName = (Module__.termDefinitionName v0),+                      Core.bindingTerm = (Module__.termDefinitionTerm v0),+                      Core.bindingType = (Module__.termDefinitionType v0)})+                    _ -> Nothing) (Module__.moduleDefinitions m))) dataModules)+          schemaGraph = Lexical.elementsToGraph bsGraph Maps.empty schemaElements+          schemaTypes =+                  Eithers.either (\_ -> Maps.empty) (\_r -> _r) (Schemas.schemaGraphToTypingEnvironment Lexical.emptyContext schemaGraph)+          allElements = Lists.concat2 schemaElements dataElements+          graph = Lexical.elementsToGraph bsGraph schemaTypes allElements+      in (Eithers.map (\results -> Maybes.cat results) (Eithers.mapList (\m -> codec cx graph m) typeModules))++-- | Generate the lexicon content from a graph+generateLexicon :: Graph.Graph -> Either Errors.DecodingError String+generateLexicon graph =++      let bindings = Lexical.graphToBindings graph+          primitives = Maps.elems (Graph.graphPrimitives graph)+          partitioned = Lists.partition (\b -> Annotations.isNativeType b) bindings+          typeBindings = Pairs.first partitioned+          termBindings = Pairs.second partitioned+          sortedPrimitives = Lists.sortOn (\p -> Graph.primitiveName p) primitives+          sortedTypes = Lists.sortOn (\b -> Core.bindingName b) typeBindings+          sortedTerms = Lists.sortOn (\b -> Core.bindingName b) termBindings+      in (Eithers.bind (Eithers.mapList (\b -> formatTypeBinding graph b) sortedTypes) (\typeLines ->+        let termLines = Lists.map (\b -> formatTermBinding b) sortedTerms+            primitiveLines = Lists.map (\p -> formatPrimitive p) sortedPrimitives+        in (Right (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 "Primitives:\n" (Strings.unlines primitiveLines)) "\nTypes:\n") (Strings.unlines typeLines)) "\nTerms:\n") (Strings.unlines termLines)))))++-- | Pure core of code generation: given a coder, language, flags, bootstrap graph, universe, and modules to generate, produce a list of (filePath, content) pairs.+generateSourceFiles :: Ord t0 => ((Module__.Module -> [Module__.Definition] -> Context.Context -> Graph.Graph -> Either (Context.InContext Errors.Error) (M.Map t0 t1)) -> Coders.Language -> Bool -> Bool -> Bool -> Bool -> Graph.Graph -> [Module__.Module] -> [Module__.Module] -> Context.Context -> Either (Context.InContext Errors.Error) [(t0, t1)])+generateSourceFiles printDefinitions lang doInfer doExpand doHoistCaseStatements doHoistPolymorphicLetBindings bsGraph universeModules modsToGenerate cx =++      let namespaceMap =+              Maps.fromList (Lists.map (\m -> (Module__.moduleNamespace m, m)) (Lists.concat2 universeModules modsToGenerate))+          constraints = Coders.languageConstraints lang+          typeModulesToGenerate =+                  Lists.filter (\mod -> Logic.not (Lists.null (Maybes.cat (Lists.map (\d -> case d of+                    Module__.DefinitionType v0 -> Just (Annotations.typeElement (Module__.typeDefinitionName v0) (Module__.typeDefinitionType v0))+                    _ -> Nothing) (Module__.moduleDefinitions mod))))) modsToGenerate+          termModulesToGenerate =+                  Lists.filter (\mod -> Logic.not (Lists.null (Maybes.cat (Lists.map (\d -> case d of+                    Module__.DefinitionTerm v0 -> Just (Core.Binding {+                      Core.bindingName = (Module__.termDefinitionName v0),+                      Core.bindingTerm = (Module__.termDefinitionTerm v0),+                      Core.bindingType = (Module__.termDefinitionType v0)})+                    _ -> Nothing) (Module__.moduleDefinitions mod))))) modsToGenerate+          schemaMods = moduleTypeDepsTransitive namespaceMap modsToGenerate+          schemaElements =+                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of+                    Module__.DefinitionType v0 -> Just (Annotations.typeElement (Module__.typeDefinitionName v0) (Module__.typeDefinitionType v0))+                    _ -> Nothing) (Module__.moduleDefinitions m))) (Lists.concat2 schemaMods typeModulesToGenerate))+          dataMods = moduleTermDepsTransitive namespaceMap modsToGenerate+          dataElements =+                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of+                    Module__.DefinitionTerm v0 -> Just (Core.Binding {+                      Core.bindingName = (Module__.termDefinitionName v0),+                      Core.bindingTerm = (Module__.termDefinitionTerm v0),+                      Core.bindingType = (Module__.termDefinitionType v0)})+                    _ -> Nothing) (Module__.moduleDefinitions m))) dataMods)+          schemaGraph = Lexical.elementsToGraph bsGraph Maps.empty schemaElements+          schemaTypes2 =+                  Eithers.either (\_ -> Maps.empty) (\_r -> _r) (Schemas.schemaGraphToTypingEnvironment Lexical.emptyContext schemaGraph)+          dataGraph = Lexical.elementsToGraph bsGraph schemaTypes2 dataElements+      in (Eithers.bind (Logic.ifElse (Lists.null typeModulesToGenerate) (Right []) (+        let nameLists =+                Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of+                  Module__.DefinitionType v0 -> Just (Module__.typeDefinitionName v0)+                  _ -> Nothing) (Module__.moduleDefinitions m))) typeModulesToGenerate+        in (Eithers.bind (Eithers.bimap (\s -> Context.InContext {+          Context.inContextObject = (Errors.ErrorOther (Errors.OtherError s)),+          Context.inContextContext = cx}) (\r -> r) (Adapt.schemaGraphToDefinitions constraints schemaGraph nameLists cx)) (\schemaResult ->+          let defLists = Pairs.second schemaResult+              schemaGraphWithTypes =+                      Graph.Graph {+                        Graph.graphBoundTerms = (Graph.graphBoundTerms schemaGraph),+                        Graph.graphBoundTypes = (Graph.graphBoundTypes schemaGraph),+                        Graph.graphClassConstraints = (Graph.graphClassConstraints schemaGraph),+                        Graph.graphLambdaVariables = (Graph.graphLambdaVariables schemaGraph),+                        Graph.graphMetadata = (Graph.graphMetadata schemaGraph),+                        Graph.graphPrimitives = (Graph.graphPrimitives schemaGraph),+                        Graph.graphSchemaTypes = schemaTypes2,+                        Graph.graphTypeVariables = (Graph.graphTypeVariables schemaGraph)}+          in (Eithers.map (\xs -> Lists.concat xs) (Eithers.mapList (\p ->+            let mod = Pairs.first p+                defs = Pairs.second p+            in (Eithers.map (\m -> Maps.toList m) (printDefinitions mod (Lists.map (\d -> Module__.DefinitionType d) defs) cx schemaGraphWithTypes))) (Lists.zip typeModulesToGenerate defLists))))))) (\schemaFiles -> Eithers.bind (Logic.ifElse (Lists.null termModulesToGenerate) (Right []) (+        let namespaces = Lists.map (\m -> Module__.moduleNamespace m) termModulesToGenerate+        in (Eithers.bind (Eithers.bimap (\s -> Context.InContext {+          Context.inContextObject = (Errors.ErrorOther (Errors.OtherError s)),+          Context.inContextContext = cx}) (\r -> r) (Adapt.dataGraphToDefinitions constraints doInfer doExpand doHoistCaseStatements doHoistPolymorphicLetBindings dataElements dataGraph namespaces cx)) (\dataResult ->+          let g1 = Pairs.first dataResult+              defLists = Pairs.second dataResult+              defName =+                      \d -> case d of+                        Module__.DefinitionTerm v0 -> Module__.termDefinitionName v0+                        Module__.DefinitionType v0 -> Module__.typeDefinitionName v0+              refreshModule =+                      \els -> \m -> Module__.Module {+                        Module__.moduleNamespace = (Module__.moduleNamespace m),+                        Module__.moduleDefinitions = (Maybes.cat (Lists.map (\d -> case d of+                          Module__.DefinitionType v0 -> Just (Module__.DefinitionType v0)+                          Module__.DefinitionTerm v0 -> Maybes.map (\b -> Module__.DefinitionTerm (Module__.TermDefinition {+                            Module__.termDefinitionName = (Core.bindingName b),+                            Module__.termDefinitionTerm = (Core.bindingTerm b),+                            Module__.termDefinitionType = (Core.bindingType b)})) (Lists.find (\b -> Equality.equal (Core.bindingName b) (Module__.termDefinitionName v0)) els)) (Module__.moduleDefinitions m))),+                        Module__.moduleTermDependencies = (Module__.moduleTermDependencies m),+                        Module__.moduleTypeDependencies = (Module__.moduleTypeDependencies m),+                        Module__.moduleDescription = (Module__.moduleDescription m)}+              allBindings = Lexical.graphToBindings g1+              refreshedMods = Lists.map (\m -> refreshModule allBindings m) termModulesToGenerate+              dedupDefs = \defs -> Maps.elems (Maps.fromList (Lists.map (\d -> (Module__.termDefinitionName d, d)) defs))+              dedupedDefLists = Lists.map dedupDefs defLists+          in (Eithers.map (\xs -> Lists.concat xs) (Eithers.mapList (\p ->+            let mod = Pairs.first p+                defs = Pairs.second p+            in (Eithers.map (\m -> Maps.toList m) (printDefinitions mod (Lists.map (\d -> Module__.DefinitionTerm d) defs) cx g1))) (Lists.zip refreshedMods dedupedDefLists))))))) (\termFiles -> Right (Lists.concat2 schemaFiles termFiles))))++-- | Perform type inference and generate the lexicon for a set of modules+inferAndGenerateLexicon :: Context.Context -> Graph.Graph -> [Module__.Module] -> Either String String+inferAndGenerateLexicon cx bsGraph kernelModules =++      let g0 = modulesToGraph bsGraph kernelModules kernelModules+          dataElements =+                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of+                    Module__.DefinitionTerm v0 -> Just (Core.Binding {+                      Core.bindingName = (Module__.termDefinitionName v0),+                      Core.bindingTerm = (Module__.termDefinitionTerm v0),+                      Core.bindingType = (Module__.termDefinitionType v0)})+                    _ -> Nothing) (Module__.moduleDefinitions m))) kernelModules)+      in (Eithers.bind (Eithers.bimap (\ic -> Errors_.error (Context.inContextObject ic)) (\x -> x) (Inference.inferGraphTypes cx dataElements g0)) (\inferResultWithCx ->+        let g1 = Pairs.first (Pairs.first inferResultWithCx)+        in (Eithers.bimap Errors.unDecodingError (\x -> x) (generateLexicon g1))))++-- | Perform type inference on modules and reconstruct with inferred types+inferModules :: Context.Context -> Graph.Graph -> [Module__.Module] -> [Module__.Module] -> Either (Context.InContext Errors.Error) [Module__.Module]+inferModules cx bsGraph universeMods targetMods =++      let g0 = modulesToGraph bsGraph universeMods universeMods+          dataElements =+                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of+                    Module__.DefinitionTerm v0 -> Just (Core.Binding {+                      Core.bindingName = (Module__.termDefinitionName v0),+                      Core.bindingTerm = (Module__.termDefinitionTerm v0),+                      Core.bindingType = (Module__.termDefinitionType v0)})+                    _ -> Nothing) (Module__.moduleDefinitions m))) universeMods)+      in (Eithers.bind (Inference.inferGraphTypes cx dataElements g0) (\inferResultWithCx ->+        let inferResult = Pairs.first inferResultWithCx+            g1 = Pairs.first inferResult+            inferredElements = Pairs.second inferResult+            isTypeOnlyModule =+                    \mod -> Logic.not (Logic.not (Lists.null (Maybes.cat (Lists.map (\d -> case d of+                      Module__.DefinitionTerm v0 -> Just (Core.Binding {+                        Core.bindingName = (Module__.termDefinitionName v0),+                        Core.bindingTerm = (Module__.termDefinitionTerm v0),+                        Core.bindingType = (Module__.termDefinitionType v0)})+                      _ -> Nothing) (Module__.moduleDefinitions mod)))))+            defName =+                    \d -> case d of+                      Module__.DefinitionTerm v0 -> Module__.termDefinitionName v0+                      Module__.DefinitionType v0 -> Module__.typeDefinitionName v0+            refreshModule =+                    \m -> Logic.ifElse (isTypeOnlyModule m) m (Module__.Module {+                      Module__.moduleNamespace = (Module__.moduleNamespace m),+                      Module__.moduleDefinitions = (Maybes.cat (Lists.map (\d -> case d of+                        Module__.DefinitionType v0 -> Just (Module__.DefinitionType v0)+                        Module__.DefinitionTerm v0 -> Maybes.map (\b -> Module__.DefinitionTerm (Module__.TermDefinition {+                          Module__.termDefinitionName = (Core.bindingName b),+                          Module__.termDefinitionTerm = (Core.bindingTerm b),+                          Module__.termDefinitionType = (Core.bindingType b)})) (Lists.find (\b -> Equality.equal (Core.bindingName b) (Module__.termDefinitionName v0)) inferredElements)) (Module__.moduleDefinitions m))),+                      Module__.moduleTermDependencies = (Module__.moduleTermDependencies m),+                      Module__.moduleTypeDependencies = (Module__.moduleTypeDependencies m),+                      Module__.moduleDescription = (Module__.moduleDescription m)})+        in (Right (Lists.map refreshModule targetMods))))++-- | Compute transitive closure of term dependencies for a set of modules+moduleTermDepsTransitive :: M.Map Module__.Namespace Module__.Module -> [Module__.Module] -> [Module__.Module]+moduleTermDepsTransitive nsMap modules =++      let closure =+              Sets.union (transitiveDeps (\m -> Module__.moduleTermDependencies m) nsMap modules) (Sets.fromList (Lists.map (\m -> Module__.moduleNamespace m) modules))+      in (Maybes.cat (Lists.map (\n -> Maps.lookup n nsMap) (Sets.toList closure)))++-- | Convert a Module to a JSON string+moduleToJson :: Module__.Module -> Either String String+moduleToJson m =++      let term = Module_.module_ m+      in (Eithers.map (\json -> Writer.printJson json) (Encode.toJson term))+ -- | Convert a generated Module into a Source module-moduleToSourceModule :: (Module__.Module -> Module__.Module)-moduleToSourceModule m =  -  let sourceNs = (Module__.Namespace (Strings.cat2 "hydra.sources." (Strings.intercalate "." (Lists.drop 1 (Strings.splitOn "." (Module__.unNamespace (Module__.moduleNamespace m)))))))-  in  -    let modTypeNs = (Module__.Namespace "hydra.module")-    in  -      let moduleBinding = Core.Binding {-              Core.bindingName = (Core.Name (Strings.cat2 (Module__.unNamespace sourceNs) ".module_")),-              Core.bindingTerm = (Module_.module_ m),-              Core.bindingType = Nothing}+moduleToSourceModule :: Module__.Module -> Module__.Module+moduleToSourceModule m =++      let sourceNs =+              Module__.Namespace (Strings.cat2 "hydra.sources." (Strings.intercalate "." (Lists.drop 1 (Strings.splitOn "." (Module__.unNamespace (Module__.moduleNamespace m))))))+          modTypeNs = Module__.Namespace "hydra.module"+          moduleDef =+                  Module__.DefinitionTerm (Module__.TermDefinition {+                    Module__.termDefinitionName = (Core.Name (Strings.cat2 (Module__.unNamespace sourceNs) ".module_")),+                    Module__.termDefinitionTerm = (Module_.module_ m),+                    Module__.termDefinitionType = Nothing})       in Module__.Module {         Module__.moduleNamespace = sourceNs,-        Module__.moduleElements = [-          moduleBinding],+        Module__.moduleDefinitions = [+          moduleDef],         Module__.moduleTermDependencies = [           modTypeNs],         Module__.moduleTypeDependencies = [           modTypeNs],         Module__.moduleDescription = (Just (Strings.cat2 "Source module for " (Module__.unNamespace (Module__.moduleNamespace m))))} --- | Generate the lexicon content from a graph-generateLexicon :: (Graph.Graph -> Compute.Flow Graph.Graph String)-generateLexicon graph =  -  let bindings = (Graph.graphElements graph)-  in  -    let primitives = (Maps.elems (Graph.graphPrimitives graph))-    in  -      let partitioned = (Lists.partition (\b -> Annotations.isNativeType b) bindings)-      in  -        let typeBindings = (Pairs.first partitioned)-        in  -          let termBindings = (Pairs.second partitioned)-          in  -            let sortedPrimitives = (Lists.sortOn (\p -> Graph.primitiveName p) primitives)-            in  -              let sortedTypes = (Lists.sortOn (\b -> Core.bindingName b) typeBindings)-              in  -                let sortedTerms = (Lists.sortOn (\b -> Core.bindingName b) termBindings)-                in (Flows.bind (Flows.mapList (\b -> formatTypeBinding b) sortedTypes) (\typeLines ->  -                  let termLines = (Lists.map (\b -> formatTermBinding b) sortedTerms)-                  in  -                    let primitiveLines = (Lists.map (\p -> formatPrimitive p) sortedPrimitives)-                    in (Flows.pure (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 (Strings.cat2 "Primitives:\n" (Strings.unlines primitiveLines)) "\nTypes:\n") (Strings.unlines typeLines)) "\nTerms:\n") (Strings.unlines termLines)))))+-- | Compute transitive closure of type dependencies for a set of modules+moduleTypeDepsTransitive :: M.Map Module__.Namespace Module__.Module -> [Module__.Module] -> [Module__.Module]+moduleTypeDepsTransitive nsMap modules = --- | Convert a Module to a JSON string-moduleToJson :: (Module__.Module -> Either String String)-moduleToJson m =  -  let term = (Module_.module_ m)-  in (Eithers.map (\json -> Writer.printJson json) (Encode.toJson term))+      let termMods = moduleTermDepsTransitive nsMap modules+          typeNamespaces = Sets.toList (transitiveDeps (\m -> Module__.moduleTypeDependencies m) nsMap termMods)+      in (Maybes.cat (Lists.map (\n -> Maps.lookup n nsMap) typeNamespaces)) --- | Perform type inference on modules and reconstruct with inferred types-inferModules :: (Graph.Graph -> [Module__.Module] -> [Module__.Module] -> Compute.Flow t0 [Module__.Module])-inferModules bsGraph universeMods targetMods =  -  let g0 = (modulesToGraph bsGraph universeMods universeMods)-  in (Flows.bind (Inference.inferGraphTypes g0) (\g1 ->  -    let inferredElements = (Graph.graphElements g1)-    in  -      let isTypeModule = (\mod -> Lists.null (Lists.filter (\e -> Logic.not (Annotations.isNativeType e)) (Module__.moduleElements mod)))-      in  -        let refreshModule = (\m -> Logic.ifElse (isTypeModule m) m (Module__.Module {-                Module__.moduleNamespace = (Module__.moduleNamespace m),-                Module__.moduleElements = (Maybes.cat (Lists.map (\e -> Lists.find (\b -> Equality.equal (Core.bindingName b) (Core.bindingName e)) inferredElements) (Module__.moduleElements m))),-                Module__.moduleTermDependencies = (Module__.moduleTermDependencies m),-                Module__.moduleTypeDependencies = (Module__.moduleTypeDependencies m),-                Module__.moduleDescription = (Module__.moduleDescription m)}))-        in (Flows.pure (Lists.map refreshModule targetMods))))+-- | Build a graph from universe modules and working modules, using an explicit bootstrap graph+modulesToGraph :: Graph.Graph -> [Module__.Module] -> [Module__.Module] -> Graph.Graph+modulesToGraph bsGraph universeModules modules = --- | Generate encoder or decoder modules for a list of type modules-generateCoderModules :: ((t0 -> Compute.Flow Graph.Graph (Maybe t1)) -> Graph.Graph -> [Module__.Module] -> [t0] -> Compute.Flow t2 [t1])-generateCoderModules codec bsGraph universeModules typeModules =  -  let graph = (modulesToGraph bsGraph universeModules universeModules)-  in (Maybes.maybe (Flows.fail "No schema graph available") (\schemaGraph -> Monads.withState schemaGraph (Flows.map (\results -> Maybes.cat results) (Flows.mapList codec typeModules))) (Graph.graphSchema graph))+      let universe = Maps.fromList (Lists.map (\m -> (Module__.moduleNamespace m, m)) (Lists.concat2 universeModules modules))+          schemaModules = moduleTypeDepsTransitive universe modules+          dataModules = moduleTermDepsTransitive universe modules+          schemaElements =+                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of+                    Module__.DefinitionType v0 -> Just (Annotations.typeElement (Module__.typeDefinitionName v0) (Module__.typeDefinitionType v0))+                    _ -> Nothing) (Module__.moduleDefinitions m))) (Lists.concat2 schemaModules modules))+          dataElements =+                  Lists.concat (Lists.map (\m -> Maybes.cat (Lists.map (\d -> case d of+                    Module__.DefinitionTerm v0 -> Just (Core.Binding {+                      Core.bindingName = (Module__.termDefinitionName v0),+                      Core.bindingTerm = (Module__.termDefinitionTerm v0),+                      Core.bindingType = (Module__.termDefinitionType v0)})+                    _ -> Nothing) (Module__.moduleDefinitions m))) dataModules)+          schemaGraph = Lexical.elementsToGraph bsGraph Maps.empty schemaElements+          schemaTypes =+                  Eithers.either (\_ -> Maps.empty) (\_r -> _r) (Schemas.schemaGraphToTypingEnvironment Lexical.emptyContext schemaGraph)+      in (Lexical.elementsToGraph bsGraph schemaTypes dataElements) --- | Perform type inference and generate the lexicon for a set of modules-inferAndGenerateLexicon :: (Graph.Graph -> [Module__.Module] -> Compute.Flow t0 String)-inferAndGenerateLexicon bsGraph kernelModules =  -  let g0 = (modulesToGraph bsGraph kernelModules kernelModules)-  in (Flows.bind (Inference.inferGraphTypes g0) (\g1 -> Monads.withState g1 (generateLexicon g1)))+-- | Convert a namespace to a file path (e.g., hydra.core -> hydra/core)+namespaceToPath :: Module__.Namespace -> String+namespaceToPath ns = Strings.intercalate "/" (Strings.splitOn "." (Module__.unNamespace ns)) --- | Escape unescaped control characters inside JSON string literals-escapeControlCharsInJson :: ([Int] -> [Int])-escapeControlCharsInJson input =  -  let hexDigit = (\n -> Logic.ifElse (Equality.lt n 10) (Math.add 48 n) (Math.add 97 (Math.sub n 10)))-  in  -    let escapeToUnicode = (\b -> [-            92,-            117,-            48,-            48,-            (hexDigit (Math.div b 16)),-            (hexDigit (Math.mod b 16))])-    in  -      let go = (\inStr -> \esc -> \bytes -> Logic.ifElse (Lists.null bytes) [] ( -              let b = (Lists.head bytes)-              in  -                let bs = (Lists.tail bytes)-                in (Logic.ifElse esc (Lists.cons b (go inStr False bs)) (Logic.ifElse (Logic.and (Equality.equal b 92) inStr) (Lists.cons b (go inStr True bs)) (Logic.ifElse (Equality.equal b 34) (Lists.cons b (go (Logic.not inStr) False bs)) (Logic.ifElse (Logic.and inStr (Equality.lt b 32)) (Lists.concat2 (escapeToUnicode b) (go inStr False bs)) (Lists.cons b (go inStr False bs))))))))-      in (go False False input)+-- | Strip TypeSchemes from term definitions in a module, preserving type definitions. JSON-loaded modules carry inferred TypeSchemes from the original compilation. After adaptation (e.g., bigfloat -> float64), these TypeSchemes become stale and can cause inference errors. Stripping them allows the inference engine to reconstruct correct TypeSchemes from scratch.+stripModuleTypeSchemes :: Module__.Module -> Module__.Module+stripModuleTypeSchemes m = --- | Decode a single module from a JSON value-decodeModuleFromJson :: (Graph.Graph -> [Module__.Module] -> Bool -> Model.Value -> Either String Module__.Module)-decodeModuleFromJson bsGraph universeModules doStripTypeSchemes jsonVal =  -  let graph = (modulesToGraph bsGraph universeModules universeModules)-  in  -    let schemaMap = (buildSchemaMap graph)-    in  -      let modType = (Core.TypeVariable (Core.Name "hydra.module.Module"))-      in (Eithers.either (\err -> Left err) (\term -> Eithers.either (\decErr -> Left (Util.unDecodingError decErr)) (\mod -> Right (Logic.ifElse doStripTypeSchemes (stripModuleTypeSchemes mod) mod)) (Module.module_ graph term)) (Decode.fromJson schemaMap modType jsonVal))+      let stripDef =+              \d -> case d of+                Module__.DefinitionTerm v0 -> Module__.DefinitionTerm (Module__.TermDefinition {+                  Module__.termDefinitionName = (Module__.termDefinitionName v0),+                  Module__.termDefinitionTerm = (Module__.termDefinitionTerm v0),+                  Module__.termDefinitionType = Nothing})+                _ -> d+      in Module__.Module {+        Module__.moduleNamespace = (Module__.moduleNamespace m),+        Module__.moduleDefinitions = (Lists.map stripDef (Module__.moduleDefinitions m)),+        Module__.moduleTermDependencies = (Module__.moduleTermDependencies m),+        Module__.moduleTypeDependencies = (Module__.moduleTypeDependencies m),+        Module__.moduleDescription = (Module__.moduleDescription m)}++-- | Compute transitive closure of module dependencies+transitiveDeps :: (Module__.Module -> [Module__.Namespace]) -> M.Map Module__.Namespace Module__.Module -> [Module__.Module] -> S.Set Module__.Namespace+transitiveDeps getDeps nsMap startMods =++      let initialDeps =+              Sets.fromList (Lists.concat (Lists.map (\m -> Lists.filter (\dep -> Logic.not (Equality.equal dep (Module__.moduleNamespace m))) (getDeps m)) startMods))+          go =+                  \pending -> \visited -> Logic.ifElse (Sets.null pending) visited (+                    let newVisited = Sets.union visited pending+                        nextDeps =+                                Sets.fromList (Lists.concat (Lists.map (\nsv -> Maybes.maybe [] (\depMod -> getDeps depMod) (Maps.lookup nsv nsMap)) (Sets.toList pending)))+                        newPending = Sets.difference nextDeps newVisited+                    in (go newPending newVisited))+      in (go initialDeps Sets.empty)
src/gen-main/haskell/Hydra/CoderUtils.hs view
@@ -8,13 +8,13 @@ import qualified Hydra.Arity as Arity import qualified Hydra.Checking as Checking import qualified Hydra.Coders as Coders-import qualified Hydra.Compute as Compute+import qualified Hydra.Context as Context import qualified Hydra.Core as Core+import qualified Hydra.Errors as Errors import qualified Hydra.Formatting as Formatting import qualified Hydra.Graph as Graph-import qualified Hydra.Lexical as Lexical+import qualified Hydra.Lib.Eithers as Eithers import qualified Hydra.Lib.Equality as Equality-import qualified Hydra.Lib.Flows as Flows import qualified Hydra.Lib.Lists as Lists import qualified Hydra.Lib.Logic as Logic import qualified Hydra.Lib.Maps as Maps@@ -23,10 +23,13 @@ import qualified Hydra.Lib.Pairs as Pairs import qualified Hydra.Lib.Sets as Sets import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Monads as Monads+import qualified Hydra.Module as Module+import qualified Hydra.Names as Names import qualified Hydra.Rewriting as Rewriting import qualified Hydra.Schemas as Schemas+import qualified Hydra.Sorting as Sorting import qualified Hydra.Typing as Typing+import qualified Hydra.Util as Util import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -34,334 +37,296 @@ import qualified Data.Map as M import qualified Data.Set as S --- | Normalize a comment string for consistent output across coders-normalizeComment :: (String -> String)-normalizeComment s =  -  let stripped = (Formatting.stripLeadingAndTrailingWhitespace s)-  in (Logic.ifElse (Strings.null stripped) "" ( -    let lastIdx = (Math.sub (Strings.length stripped) 1)-    in  -      let lastChar = (Strings.charAt lastIdx stripped)-      in (Logic.ifElse (Equality.equal lastChar 46) stripped (Strings.cat2 stripped "."))))+-- | Analyze a function term, collecting lambdas, type lambdas, lets, and type applications+analyzeFunctionTerm :: Context.Context -> (t0 -> Graph.Graph) -> (Graph.Graph -> t0 -> t0) -> t0 -> Core.Term -> Either t1 (Typing.FunctionStructure t0)+analyzeFunctionTerm cx getTC setTC env term = analyzeFunctionTermWith cx bindingMetadata getTC setTC env term --- | Gather applications from a term, returning (args, baseTerm)-gatherApplications :: (Core.Term -> ([Core.Term], Core.Term))-gatherApplications term =  -  let go = (\args -> \t -> (\x -> case x of-          Core.TermApplication v1 ->  -            let lhs = (Core.applicationFunction v1)-            in  -              let rhs = (Core.applicationArgument v1)-              in (go (Lists.cons rhs args) lhs)-          _ -> (args, t)) (Rewriting.deannotateTerm t))-  in (go [] term)+-- | Analyze a function term with configurable binding metadata+analyzeFunctionTermWith :: Context.Context -> (Graph.Graph -> Core.Binding -> Maybe Core.Term) -> (t0 -> Graph.Graph) -> (Graph.Graph -> t0 -> t0) -> t0 -> Core.Term -> Either t1 (Typing.FunctionStructure t0)+analyzeFunctionTermWith cx forBinding getTC setTC env term =+    analyzeFunctionTermWith_gather cx forBinding getTC setTC True env [] [] [] [] [] term --- | Gather term arguments, stripping type-level constructs-gatherArgs :: (Core.Term -> [Core.Term] -> (Core.Term, [Core.Term]))-gatherArgs term args = ((\x -> case x of-  Core.TermApplication v1 ->  -    let lhs = (Core.applicationFunction v1)-    in  -      let rhs = (Core.applicationArgument v1)-      in (gatherArgs lhs (Lists.cons rhs args))-  Core.TermTypeLambda v1 ->  -    let body = (Core.typeLambdaBody v1)-    in (gatherArgs body args)-  Core.TermTypeApplication v1 ->  -    let body = (Core.typeApplicationTermBody v1)-    in (gatherArgs body args)-  _ -> (term, args)) (Rewriting.deannotateTerm term))+analyzeFunctionTermWith_finish :: Context.Context -> (t0 -> Graph.Graph) -> t0 -> [Core.Name] -> [Core.Name] -> [Core.Binding] -> [Core.Type] -> [Core.Type] -> Core.Term -> Either t1 (Typing.FunctionStructure t0)+analyzeFunctionTermWith_finish cx getTC fEnv tparams args bindings doms tapps body = --- | Gather term and type arguments from a term-gatherArgsWithTypeApps :: (Core.Term -> [Core.Term] -> [Core.Type] -> (Core.Term, ([Core.Term], [Core.Type])))-gatherArgsWithTypeApps term args tyArgs = ((\x -> case x of-  Core.TermApplication v1 ->  -    let lhs = (Core.applicationFunction v1)-    in  -      let rhs = (Core.applicationArgument v1)-      in (gatherArgsWithTypeApps lhs (Lists.cons rhs args) tyArgs)-  Core.TermTypeLambda v1 ->  -    let body = (Core.typeLambdaBody v1)-    in (gatherArgsWithTypeApps body args tyArgs)-  Core.TermTypeApplication v1 ->  -    let body = (Core.typeApplicationTermBody v1)-    in  -      let typ = (Core.typeApplicationTermType v1)-      in (gatherArgsWithTypeApps body args (Lists.cons typ tyArgs))-  _ -> (term, (args, tyArgs))) (Rewriting.deannotateTerm term))+      let bodyWithTapps =+              Lists.foldl (\trm -> \typ -> Core.TermTypeApplication (Core.TypeApplicationTerm {+                Core.typeApplicationTermBody = trm,+                Core.typeApplicationTermType = typ})) body tapps+          mcod = Eithers.either (\_ -> Nothing) (\c -> Just c) (typeOfTerm cx (getTC fEnv) bodyWithTapps)+      in (Right (Typing.FunctionStructure {+        Typing.functionStructureTypeParams = (Lists.reverse tparams),+        Typing.functionStructureParams = (Lists.reverse args),+        Typing.functionStructureBindings = bindings,+        Typing.functionStructureBody = bodyWithTapps,+        Typing.functionStructureDomains = (Lists.reverse doms),+        Typing.functionStructureCodomain = mcod,+        Typing.functionStructureEnvironment = fEnv})) --- | Check if a term can be encoded as a simple assignment-isSimpleAssignment :: (Core.Term -> Bool)-isSimpleAssignment term = ((\x -> case x of-  Core.TermAnnotated v1 -> (isSimpleAssignment (Core.annotatedTermBody v1))-  Core.TermFunction v1 -> ((\x -> case x of-    Core.FunctionLambda _ -> False-    _ -> True) v1)-  Core.TermLet _ -> False-  Core.TermTypeLambda _ -> False-  Core.TermTypeApplication v1 -> (isSimpleAssignment (Core.typeApplicationTermBody v1))-  _ ->  -    let baseTerm = (Pairs.first (gatherArgs term []))-    in ((\x -> case x of-      Core.TermFunction v1 -> ((\x -> case x of-        Core.FunctionElimination v2 -> ((\x -> case x of-          Core.EliminationUnion _ -> False-          _ -> True) v2)-        _ -> True) v1)-      _ -> True) baseTerm)) term)+analyzeFunctionTermWith_gather :: Context.Context -> (Graph.Graph -> Core.Binding -> Maybe Core.Term) -> (t0 -> Graph.Graph) -> (Graph.Graph -> t0 -> t0) -> Bool -> t0 -> [Core.Name] -> [Core.Name] -> [Core.Binding] -> [Core.Type] -> [Core.Type] -> Core.Term -> Either t1 (Typing.FunctionStructure t0)+analyzeFunctionTermWith_gather cx forBinding getTC setTC argMode gEnv tparams args bindings doms tapps t =+    case (Rewriting.deannotateTerm t) of+      Core.TermFunction v0 -> case v0 of+        Core.FunctionLambda v1 -> Logic.ifElse argMode (+          let v = Core.lambdaParameter v1+              dom = Maybes.maybe (Core.TypeVariable (Core.Name "_")) (\x_ -> x_) (Core.lambdaDomain v1)+              body = Core.lambdaBody v1+              newEnv = setTC (Rewriting.extendGraphForLambda (getTC gEnv) v1) gEnv+          in (analyzeFunctionTermWith_gather cx forBinding getTC setTC argMode newEnv tparams (Lists.cons v args) bindings (Lists.cons dom doms) tapps body)) (analyzeFunctionTermWith_finish cx getTC gEnv tparams args bindings doms tapps t)+        _ -> analyzeFunctionTermWith_finish cx getTC gEnv tparams args bindings doms tapps t+      Core.TermLet v0 ->+        let newBindings = Core.letBindings v0+            body = Core.letBody v0+            newEnv = setTC (Rewriting.extendGraphForLet forBinding (getTC gEnv) v0) gEnv+        in (analyzeFunctionTermWith_gather cx forBinding getTC setTC False newEnv tparams args (Lists.concat2 bindings newBindings) doms tapps body)+      Core.TermTypeApplication v0 ->+        let taBody = Core.typeApplicationTermBody v0+            typ = Core.typeApplicationTermType v0+        in (analyzeFunctionTermWith_gather cx forBinding getTC setTC argMode gEnv tparams args bindings doms (Lists.cons typ tapps) taBody)+      Core.TermTypeLambda v0 ->+        let tvar = Core.typeLambdaParameter v0+            tlBody = Core.typeLambdaBody v0+            newEnv = setTC (Rewriting.extendGraphForTypeLambda (getTC gEnv) v0) gEnv+        in (analyzeFunctionTermWith_gather cx forBinding getTC setTC argMode newEnv (Lists.cons tvar tparams) args bindings doms tapps tlBody)+      _ -> analyzeFunctionTermWith_finish cx getTC gEnv tparams args bindings doms tapps t --- | Check if a term needs to be treated as a function rather than a simple value-isComplexTerm :: (Typing.TypeContext -> Core.Term -> Bool)-isComplexTerm tc t = ((\x -> case x of-  Core.TermLet _ -> True-  Core.TermTypeApplication _ -> True-  Core.TermTypeLambda _ -> True-  Core.TermVariable v1 -> (isComplexVariable tc v1)-  _ -> (Lists.foldl (\b -> \sub -> Logic.or b (isComplexTerm tc sub)) False (Rewriting.subterms t))) t)+-- | Produces metadata for a binding if it is complex+bindingMetadata :: Graph.Graph -> Core.Binding -> Maybe Core.Term+bindingMetadata tc b = Logic.ifElse (isComplexBinding tc b) (Just (Core.TermLiteral (Core.LiteralBoolean True))) Nothing --- | Check if a variable is bound to a complex term-isComplexVariable :: (Typing.TypeContext -> Core.Name -> Bool)-isComplexVariable tc name =  -  let metaLookup = (Maps.lookup name (Typing.typeContextMetadata tc))-  in (Logic.ifElse (Maybes.isJust metaLookup) True (Logic.ifElse (Sets.member name (Typing.typeContextLambdaVariables tc)) True ( -    let typeLookup = (Maps.lookup name (Typing.typeContextTypes tc))-    in (Logic.not (Maybes.isJust typeLookup)))))+-- | Extract comments/description from a Binding+commentsFromBinding :: Context.Context -> Graph.Graph -> Core.Binding -> Either (Context.InContext Errors.Error) (Maybe String)+commentsFromBinding cx g b = Annotations.getTermDescription cx g (Core.bindingTerm b) --- | Check if a binding needs to be treated as a function-isComplexBinding :: (Typing.TypeContext -> Core.Binding -> Bool)-isComplexBinding tc b =  -  let term = (Core.bindingTerm b)-  in  -    let mts = (Core.bindingType b)-    in (Maybes.cases mts (isComplexTerm tc term) (\ts ->  -      let isPolymorphic = (Logic.not (Lists.null (Core.typeSchemeVariables ts)))-      in  -        let isNonNullary = (Equality.gt (Arity.typeArity (Core.typeSchemeType ts)) 0)-        in  -          let isComplex = (isComplexTerm tc term)-          in (Logic.or (Logic.or isPolymorphic isNonNullary) isComplex)))+-- | Extract comments/description from a FieldType+commentsFromFieldType :: Context.Context -> Graph.Graph -> Core.FieldType -> Either (Context.InContext Errors.Error) (Maybe String)+commentsFromFieldType cx g ft = Annotations.getTypeDescription cx g (Core.fieldTypeType ft) --- | Check if a term is trivially cheap (no thunking needed)-isTrivialTerm :: (Core.Term -> Bool)-isTrivialTerm t = ((\x -> case x of-  Core.TermLiteral _ -> True-  Core.TermVariable _ -> True-  Core.TermUnit -> True-  Core.TermApplication v1 ->  -    let fun = (Core.applicationFunction v1)-    in  -      let arg = (Core.applicationArgument v1)-      in ((\x -> case x of-        Core.TermFunction v2 -> ((\x -> case x of-          Core.FunctionElimination v3 -> ((\x -> case x of-            Core.EliminationRecord _ -> (isTrivialTerm arg)-            _ -> False) v3)-          _ -> False) v2)-        _ -> False) fun)-  Core.TermMaybe v1 -> (Maybes.maybe True (\inner -> isTrivialTerm inner) v1)-  Core.TermTypeApplication v1 -> (isTrivialTerm (Core.typeApplicationTermBody v1))-  Core.TermTypeLambda v1 -> (isTrivialTerm (Core.typeLambdaBody v1))-  _ -> False) (Rewriting.deannotateTerm t))+-- | Gather applications from a term, returning (args, baseTerm)+gatherApplications :: Core.Term -> ([Core.Term], Core.Term)+gatherApplications term = --- | Check if a term body is self-tail-recursive with respect to a function name-isSelfTailRecursive :: (Core.Name -> Core.Term -> Bool)-isSelfTailRecursive funcName body =  -  let callsSelf = (Logic.not (Rewriting.isFreeVariableInTerm funcName body))-  in (Logic.ifElse callsSelf (isTailRecursiveInTailPosition funcName body) False)+      let go =+              \args -> \t -> case (Rewriting.deannotateTerm t) of+                Core.TermApplication v0 ->+                  let lhs = Core.applicationFunction v0+                      rhs = Core.applicationArgument v0+                  in (go (Lists.cons rhs args) lhs)+                _ -> (args, t)+      in (go [] term) --- | Check that all self-references are in tail position-isTailRecursiveInTailPosition :: (Core.Name -> Core.Term -> Bool)-isTailRecursiveInTailPosition funcName term =  -  let stripped = (Rewriting.deannotateAndDetypeTerm term)-  in ((\x -> case x of-    Core.TermApplication _ ->  -      let gathered = (gatherApplications stripped)-      in  -        let gatherArgs = (Pairs.first gathered)-        in  -          let gatherFun = (Pairs.second gathered)-          in  -            let strippedFun = (Rewriting.deannotateAndDetypeTerm gatherFun)-            in ((\x -> case x of-              Core.TermVariable v2 -> (Logic.ifElse (Equality.equal v2 funcName) ( -                let argsNoFunc = (Lists.foldl (\ok -> \arg -> Logic.and ok (Rewriting.isFreeVariableInTerm funcName arg)) True gatherArgs)-                in  -                  let argsNoLambda = (Lists.foldl (\ok -> \arg -> Logic.and ok (Logic.not (Rewriting.foldOverTerm Coders.TraversalOrderPre (\found -> \t -> Logic.or found ((\x -> case x of-                          Core.TermFunction v3 -> ((\x -> case x of-                            Core.FunctionLambda v4 ->  -                              let ignore = (Core.lambdaBody v4)-                              in True-                            _ -> False) v3)-                          _ -> False) t)) False arg))) True gatherArgs)-                  in (Logic.and argsNoFunc argsNoLambda)) (Rewriting.isFreeVariableInTerm funcName term))-              Core.TermFunction v2 -> ((\x -> case x of-                Core.FunctionElimination v3 -> ((\x -> case x of-                  Core.EliminationUnion v4 ->  -                    let cases_ = (Core.caseStatementCases v4)-                    in  -                      let dflt = (Core.caseStatementDefault v4)-                      in  -                        let branchesOk = (Lists.foldl (\ok -> \field -> Logic.and ok (isTailRecursiveInTailPosition funcName (Core.fieldTerm field))) True cases_)-                        in  -                          let dfltOk = (Maybes.maybe True (\d -> isTailRecursiveInTailPosition funcName d) dflt)-                          in  -                            let argsOk = (Lists.foldl (\ok -> \arg -> Logic.and ok (Rewriting.isFreeVariableInTerm funcName arg)) True gatherArgs)-                            in (Logic.and (Logic.and branchesOk dfltOk) argsOk)-                  _ -> (Rewriting.isFreeVariableInTerm funcName term)) v3)-                _ -> (Rewriting.isFreeVariableInTerm funcName term)) v2)-              _ -> (Rewriting.isFreeVariableInTerm funcName term)) strippedFun)-    Core.TermFunction v1 -> ((\x -> case x of-      Core.FunctionLambda v2 -> (isTailRecursiveInTailPosition funcName (Core.lambdaBody v2))-      _ -> (Rewriting.isFreeVariableInTerm funcName term)) v1)-    Core.TermLet v1 ->  -      let bindingsOk = (Lists.foldl (\ok -> \b -> Logic.and ok (Rewriting.isFreeVariableInTerm funcName (Core.bindingTerm b))) True (Core.letBindings v1))-      in (Logic.and bindingsOk (isTailRecursiveInTailPosition funcName (Core.letBody v1)))-    _ -> (Rewriting.isFreeVariableInTerm funcName term)) stripped)+-- | Gather term arguments, stripping type-level constructs+gatherArgs :: Core.Term -> [Core.Term] -> (Core.Term, [Core.Term])+gatherArgs term args =+    case (Rewriting.deannotateTerm term) of+      Core.TermApplication v0 ->+        let lhs = Core.applicationFunction v0+            rhs = Core.applicationArgument v0+        in (gatherArgs lhs (Lists.cons rhs args))+      Core.TermTypeLambda v0 ->+        let body = Core.typeLambdaBody v0+        in (gatherArgs body args)+      Core.TermTypeApplication v0 ->+        let body = Core.typeApplicationTermBody v0+        in (gatherArgs body args)+      _ -> (term, args) --- | Extract comments/description from a Binding-commentsFromElement :: (Core.Binding -> Compute.Flow Graph.Graph (Maybe String))-commentsFromElement b = (Annotations.getTermDescription (Core.bindingTerm b))+-- | Gather term and type arguments from a term+gatherArgsWithTypeApps :: Core.Term -> [Core.Term] -> [Core.Type] -> (Core.Term, ([Core.Term], [Core.Type]))+gatherArgsWithTypeApps term args tyArgs =+    case (Rewriting.deannotateTerm term) of+      Core.TermApplication v0 ->+        let lhs = Core.applicationFunction v0+            rhs = Core.applicationArgument v0+        in (gatherArgsWithTypeApps lhs (Lists.cons rhs args) tyArgs)+      Core.TermTypeLambda v0 ->+        let body = Core.typeLambdaBody v0+        in (gatherArgsWithTypeApps body args tyArgs)+      Core.TermTypeApplication v0 ->+        let body = Core.typeApplicationTermBody v0+            typ = Core.typeApplicationTermType v0+        in (gatherArgsWithTypeApps body args (Lists.cons typ tyArgs))+      _ -> (term, (args, tyArgs)) --- | Extract comments/description from a FieldType-commentsFromFieldType :: (Core.FieldType -> Compute.Flow Graph.Graph (Maybe String))-commentsFromFieldType ft = (Annotations.getTypeDescription (Core.fieldTypeType ft))+-- | Check if a binding needs to be treated as a function+isComplexBinding :: Graph.Graph -> Core.Binding -> Bool+isComplexBinding tc b = --- | Infer the type of a term with tracing-tryTypeOf :: (String -> Typing.TypeContext -> Core.Term -> Compute.Flow t0 Core.Type)-tryTypeOf msg tc term = (Monads.withTrace msg (Checking.typeOf tc [] term))+      let term = Core.bindingTerm b+          mts = Core.bindingType b+      in (Maybes.cases mts (isComplexTerm tc term) (\ts ->+        let isPolymorphic = Logic.not (Lists.null (Core.typeSchemeVariables ts))+            isNonNullary = Equality.gt (Arity.typeArity (Core.typeSchemeType ts)) 0+            isComplex = isComplexTerm tc term+        in (Logic.or (Logic.or isPolymorphic isNonNullary) isComplex))) --- | Produces metadata for a binding if it is complex-bindingMetadata :: (Typing.TypeContext -> Core.Binding -> Maybe Core.Term)-bindingMetadata tc b = (Logic.ifElse (isComplexBinding tc b) (Just (Core.TermLiteral (Core.LiteralBoolean True))) Nothing)+-- | Check if a term needs to be treated as a function rather than a simple value+isComplexTerm :: Graph.Graph -> Core.Term -> Bool+isComplexTerm tc t =+    case t of+      Core.TermLet _ -> True+      Core.TermTypeApplication _ -> True+      Core.TermTypeLambda _ -> True+      Core.TermVariable v0 -> isComplexVariable tc v0+      _ -> Lists.foldl (\b -> \sub -> Logic.or b (isComplexTerm tc sub)) False (Rewriting.subterms t) -analyzeFunctionTermWith_finish :: ((t0 -> Typing.TypeContext) -> t0 -> [Core.Name] -> [Core.Name] -> [Core.Binding] -> [Core.Type] -> [Core.Type] -> Core.Term -> Compute.Flow t1 (Typing.FunctionStructure t0))-analyzeFunctionTermWith_finish getTC fEnv tparams args bindings doms tapps body =  -  let bodyWithTapps = (Lists.foldl (\trm -> \typ -> Core.TermTypeApplication (Core.TypeApplicationTerm {-          Core.typeApplicationTermBody = trm,-          Core.typeApplicationTermType = typ})) body tapps)-  in (Flows.bind (Flows.withDefault Nothing (Flows.map Maybes.pure (tryTypeOf "analyzeFunctionTermWith" (getTC fEnv) bodyWithTapps))) (\mcod -> Flows.pure (Typing.FunctionStructure {-    Typing.functionStructureTypeParams = (Lists.reverse tparams),-    Typing.functionStructureParams = (Lists.reverse args),-    Typing.functionStructureBindings = bindings,-    Typing.functionStructureBody = bodyWithTapps,-    Typing.functionStructureDomains = (Lists.reverse doms),-    Typing.functionStructureCodomain = mcod,-    Typing.functionStructureEnvironment = fEnv})))+-- | Check if a variable is bound to a complex term+isComplexVariable :: Graph.Graph -> Core.Name -> Bool+isComplexVariable tc name = -analyzeFunctionTermWith_gather :: ((Typing.TypeContext -> Core.Binding -> Maybe Core.Term) -> (t0 -> Typing.TypeContext) -> (Typing.TypeContext -> t0 -> t0) -> Bool -> t0 -> [Core.Name] -> [Core.Name] -> [Core.Binding] -> [Core.Type] -> [Core.Type] -> Core.Term -> Compute.Flow t1 (Typing.FunctionStructure t0))-analyzeFunctionTermWith_gather forBinding getTC setTC argMode gEnv tparams args bindings doms tapps t = ((\x -> case x of-  Core.TermFunction v1 -> ((\x -> case x of-    Core.FunctionLambda v2 -> (Logic.ifElse argMode ( -      let v = (Core.lambdaParameter v2)-      in  -        let dom = (Maybes.maybe (Core.TypeVariable (Core.Name "_")) (\x_ -> x_) (Core.lambdaDomain v2))-        in  -          let body = (Core.lambdaBody v2)-          in  -            let newEnv = (setTC (Schemas.extendTypeContextForLambda (getTC gEnv) v2) gEnv)-            in (analyzeFunctionTermWith_gather forBinding getTC setTC argMode newEnv tparams (Lists.cons v args) bindings (Lists.cons dom doms) tapps body)) (analyzeFunctionTermWith_finish getTC gEnv tparams args bindings doms tapps t))-    _ -> (analyzeFunctionTermWith_finish getTC gEnv tparams args bindings doms tapps t)) v1)-  Core.TermLet v1 ->  -    let newBindings = (Core.letBindings v1)-    in  -      let body = (Core.letBody v1)-      in  -        let newEnv = (setTC (Schemas.extendTypeContextForLet forBinding (getTC gEnv) v1) gEnv)-        in (analyzeFunctionTermWith_gather forBinding getTC setTC False newEnv tparams args (Lists.concat2 bindings newBindings) doms tapps body)-  Core.TermTypeApplication v1 ->  -    let taBody = (Core.typeApplicationTermBody v1)-    in  -      let typ = (Core.typeApplicationTermType v1)-      in (analyzeFunctionTermWith_gather forBinding getTC setTC argMode gEnv tparams args bindings doms (Lists.cons typ tapps) taBody)-  Core.TermTypeLambda v1 ->  -    let tvar = (Core.typeLambdaParameter v1)-    in  -      let tlBody = (Core.typeLambdaBody v1)-      in  -        let newEnv = (setTC (Schemas.extendTypeContextForTypeLambda (getTC gEnv) v1) gEnv)-        in (analyzeFunctionTermWith_gather forBinding getTC setTC argMode newEnv (Lists.cons tvar tparams) args bindings doms tapps tlBody)-  _ -> (analyzeFunctionTermWith_finish getTC gEnv tparams args bindings doms tapps t)) (Rewriting.deannotateTerm t))+      let metaLookup = Maps.lookup name (Graph.graphMetadata tc)+      in (Logic.ifElse (Maybes.isJust metaLookup) True (Logic.ifElse (Sets.member name (Graph.graphLambdaVariables tc)) True (+        let typeLookup = Maps.lookup name (Graph.graphBoundTypes tc)+        in (Maybes.maybe True (\ts -> Equality.gt (Arity.typeSchemeArity ts) 0) typeLookup)))) --- | Analyze a function term with configurable binding metadata-analyzeFunctionTermWith :: ((Typing.TypeContext -> Core.Binding -> Maybe Core.Term) -> (t0 -> Typing.TypeContext) -> (Typing.TypeContext -> t0 -> t0) -> t0 -> Core.Term -> Compute.Flow t1 (Typing.FunctionStructure t0))-analyzeFunctionTermWith forBinding getTC setTC env term = (analyzeFunctionTermWith_gather forBinding getTC setTC True env [] [] [] [] [] term)+-- | Check if a term body is self-tail-recursive with respect to a function name+isSelfTailRecursive :: Core.Name -> Core.Term -> Bool+isSelfTailRecursive funcName body = -analyzeFunctionTermNoInferWith_finish :: (t0 -> [Core.Name] -> [Core.Name] -> [Core.Binding] -> [Core.Type] -> [Core.Type] -> Core.Term -> Compute.Flow t1 (Typing.FunctionStructure t0))-analyzeFunctionTermNoInferWith_finish fEnv tparams args bindings doms tapps body =  -  let bodyWithTapps = (Lists.foldl (\trm -> \typ -> Core.TermTypeApplication (Core.TypeApplicationTerm {-          Core.typeApplicationTermBody = trm,-          Core.typeApplicationTermType = typ})) body tapps)-  in (Flows.pure (Typing.FunctionStructure {-    Typing.functionStructureTypeParams = (Lists.reverse tparams),-    Typing.functionStructureParams = (Lists.reverse args),-    Typing.functionStructureBindings = bindings,-    Typing.functionStructureBody = bodyWithTapps,-    Typing.functionStructureDomains = (Lists.reverse doms),-    Typing.functionStructureCodomain = Nothing,-    Typing.functionStructureEnvironment = fEnv}))+      let callsSelf = Logic.not (Rewriting.isFreeVariableInTerm funcName body)+      in (Logic.ifElse callsSelf (isTailRecursiveInTailPosition funcName body) False) -analyzeFunctionTermNoInferWith_gather :: ((Typing.TypeContext -> Core.Binding -> Maybe Core.Term) -> (t0 -> Typing.TypeContext) -> (Typing.TypeContext -> t0 -> t0) -> Bool -> t0 -> [Core.Name] -> [Core.Name] -> [Core.Binding] -> [Core.Type] -> [Core.Type] -> Core.Term -> Compute.Flow t1 (Typing.FunctionStructure t0))-analyzeFunctionTermNoInferWith_gather forBinding getTC setTC argMode gEnv tparams args bindings doms tapps t = ((\x -> case x of-  Core.TermFunction v1 -> ((\x -> case x of-    Core.FunctionLambda v2 -> (Logic.ifElse argMode ( -      let v = (Core.lambdaParameter v2)-      in  -        let dom = (Maybes.maybe (Core.TypeVariable (Core.Name "_")) (\x_ -> x_) (Core.lambdaDomain v2))-        in  -          let body = (Core.lambdaBody v2)-          in  -            let newEnv = (setTC (Schemas.extendTypeContextForLambda (getTC gEnv) v2) gEnv)-            in (analyzeFunctionTermNoInferWith_gather forBinding getTC setTC argMode newEnv tparams (Lists.cons v args) bindings (Lists.cons dom doms) tapps body)) (analyzeFunctionTermNoInferWith_finish gEnv tparams args bindings doms tapps t))-    _ -> (analyzeFunctionTermNoInferWith_finish gEnv tparams args bindings doms tapps t)) v1)-  Core.TermLet v1 ->  -    let newBindings = (Core.letBindings v1)-    in  -      let body = (Core.letBody v1)-      in  -        let newEnv = (setTC (Schemas.extendTypeContextForLet forBinding (getTC gEnv) v1) gEnv)-        in (analyzeFunctionTermNoInferWith_gather forBinding getTC setTC False newEnv tparams args (Lists.concat2 bindings newBindings) doms tapps body)-  Core.TermTypeApplication v1 ->  -    let taBody = (Core.typeApplicationTermBody v1)-    in  -      let typ = (Core.typeApplicationTermType v1)-      in (analyzeFunctionTermNoInferWith_gather forBinding getTC setTC argMode gEnv tparams args bindings doms (Lists.cons typ tapps) taBody)-  Core.TermTypeLambda v1 ->  -    let tvar = (Core.typeLambdaParameter v1)-    in  -      let tlBody = (Core.typeLambdaBody v1)-      in  -        let newEnv = (setTC (Schemas.extendTypeContextForTypeLambda (getTC gEnv) v1) gEnv)-        in (analyzeFunctionTermNoInferWith_gather forBinding getTC setTC argMode newEnv (Lists.cons tvar tparams) args bindings doms tapps tlBody)-  _ -> (analyzeFunctionTermNoInferWith_finish gEnv tparams args bindings doms tapps t)) (Rewriting.deannotateTerm t))+-- | Check if a term can be encoded as a simple assignment+isSimpleAssignment :: Core.Term -> Bool+isSimpleAssignment term =+    case term of+      Core.TermAnnotated v0 -> isSimpleAssignment (Core.annotatedTermBody v0)+      Core.TermFunction v0 -> case v0 of+        Core.FunctionLambda _ -> False+        _ -> True+      Core.TermLet _ -> False+      Core.TermTypeLambda _ -> False+      Core.TermTypeApplication v0 -> isSimpleAssignment (Core.typeApplicationTermBody v0)+      _ ->+        let baseTerm = Pairs.first (gatherArgs term [])+        in case baseTerm of+          Core.TermFunction v0 -> case v0 of+            Core.FunctionElimination v1 -> case v1 of+              Core.EliminationUnion _ -> False+              _ -> True+            _ -> True+          _ -> True --- | Analyze a function term without type inference, with configurable binding metadata-analyzeFunctionTermNoInferWith :: ((Typing.TypeContext -> Core.Binding -> Maybe Core.Term) -> (t0 -> Typing.TypeContext) -> (Typing.TypeContext -> t0 -> t0) -> t0 -> Core.Term -> Compute.Flow t1 (Typing.FunctionStructure t0))-analyzeFunctionTermNoInferWith forBinding getTC setTC env term = (analyzeFunctionTermNoInferWith_gather forBinding getTC setTC True env [] [] [] [] [] term)+-- | Check that all self-references are in tail position+isTailRecursiveInTailPosition :: Core.Name -> Core.Term -> Bool+isTailRecursiveInTailPosition funcName term = --- | Analyze a function term, collecting lambdas, type lambdas, lets, and type applications-analyzeFunctionTerm :: ((t0 -> Typing.TypeContext) -> (Typing.TypeContext -> t0 -> t0) -> t0 -> Core.Term -> Compute.Flow t1 (Typing.FunctionStructure t0))-analyzeFunctionTerm getTC setTC env term = (analyzeFunctionTermWith bindingMetadata getTC setTC env term)+      let stripped = Rewriting.deannotateAndDetypeTerm term+      in case stripped of+        Core.TermApplication _ ->+          let gathered = gatherApplications stripped+              gatherArgs = Pairs.first gathered+              gatherFun = Pairs.second gathered+              strippedFun = Rewriting.deannotateAndDetypeTerm gatherFun+          in case strippedFun of+            Core.TermVariable v1 -> Logic.ifElse (Equality.equal v1 funcName) (+              let argsNoFunc = Lists.foldl (\ok -> \arg -> Logic.and ok (Rewriting.isFreeVariableInTerm funcName arg)) True gatherArgs+                  argsNoLambda =+                          Lists.foldl (\ok -> \arg -> Logic.and ok (Logic.not (Rewriting.foldOverTerm Coders.TraversalOrderPre (\found -> \t -> Logic.or found (case t of+                            Core.TermFunction v2 -> case v2 of+                              Core.FunctionLambda v3 ->+                                let ignore = Core.lambdaBody v3+                                in True+                              _ -> False+                            _ -> False)) False arg))) True gatherArgs+              in (Logic.and argsNoFunc argsNoLambda)) (Rewriting.isFreeVariableInTerm funcName term)+            Core.TermFunction v1 -> case v1 of+              Core.FunctionElimination v2 -> case v2 of+                Core.EliminationUnion v3 ->+                  let cases_ = Core.caseStatementCases v3+                      dflt = Core.caseStatementDefault v3+                      branchesOk =+                              Lists.foldl (\ok -> \field -> Logic.and ok (isTailRecursiveInTailPosition funcName (Core.fieldTerm field))) True cases_+                      dfltOk = Maybes.maybe True (\d -> isTailRecursiveInTailPosition funcName d) dflt+                      argsOk = Lists.foldl (\ok -> \arg -> Logic.and ok (Rewriting.isFreeVariableInTerm funcName arg)) True gatherArgs+                  in (Logic.and (Logic.and branchesOk dfltOk) argsOk)+                _ -> Rewriting.isFreeVariableInTerm funcName term+              _ -> Rewriting.isFreeVariableInTerm funcName term+            _ -> Rewriting.isFreeVariableInTerm funcName term+        Core.TermFunction v0 -> case v0 of+          Core.FunctionLambda v1 -> isTailRecursiveInTailPosition funcName (Core.lambdaBody v1)+          _ -> Rewriting.isFreeVariableInTerm funcName term+        Core.TermLet v0 ->+          let bindingsOk =+                  Lists.foldl (\ok -> \b -> Logic.and ok (Rewriting.isFreeVariableInTerm funcName (Core.bindingTerm b))) True (Core.letBindings v0)+          in (Logic.and bindingsOk (isTailRecursiveInTailPosition funcName (Core.letBody v0)))+        _ -> Rewriting.isFreeVariableInTerm funcName term --- | Analyze a function term without recording binding metadata-analyzeFunctionTermInline :: ((t0 -> Typing.TypeContext) -> (Typing.TypeContext -> t0 -> t0) -> t0 -> Core.Term -> Compute.Flow t1 (Typing.FunctionStructure t0))-analyzeFunctionTermInline getTC setTC env term = (analyzeFunctionTermWith (\_ -> \_ -> Nothing) getTC setTC env term)+-- | Check if a term is trivially cheap (no thunking needed)+isTrivialTerm :: Core.Term -> Bool+isTrivialTerm t =+    case (Rewriting.deannotateTerm t) of+      Core.TermLiteral _ -> True+      Core.TermVariable _ -> True+      Core.TermUnit -> True+      Core.TermApplication v0 ->+        let fun = Core.applicationFunction v0+            arg = Core.applicationArgument v0+        in case fun of+          Core.TermFunction v1 -> case v1 of+            Core.FunctionElimination v2 -> case v2 of+              Core.EliminationRecord _ -> isTrivialTerm arg+              Core.EliminationWrap _ -> isTrivialTerm arg+              _ -> False+            _ -> False+          _ -> False+      Core.TermMaybe v0 -> Maybes.maybe True (\inner -> isTrivialTerm inner) v0+      Core.TermRecord v0 -> Lists.foldl (\acc -> \fld -> Logic.and acc (isTrivialTerm (Core.fieldTerm fld))) True (Core.recordFields v0)+      Core.TermWrap v0 -> isTrivialTerm (Core.wrappedTermBody v0)+      Core.TermTypeApplication v0 -> isTrivialTerm (Core.typeApplicationTermBody v0)+      Core.TermTypeLambda v0 -> isTrivialTerm (Core.typeLambdaBody v0)+      _ -> False --- | Analyze a function term without type inference (performance optimization)-analyzeFunctionTermNoInfer :: ((t0 -> Typing.TypeContext) -> (Typing.TypeContext -> t0 -> t0) -> t0 -> Core.Term -> Compute.Flow t1 (Typing.FunctionStructure t0))-analyzeFunctionTermNoInfer getTC setTC env term = (analyzeFunctionTermNoInferWith bindingMetadata getTC setTC env term)+-- | Convert a name to file path, given case conventions for namespaces and local names, and assuming '/' as the file path separator+nameToFilePath :: Util.CaseConvention -> Util.CaseConvention -> Module.FileExtension -> Core.Name -> String+nameToFilePath nsConv localConv ext name = --- | Update the metadata portion of a coder state-updateCoderMetadata :: ((t0 -> t1) -> (t2 -> t3 -> t0) -> (t0 -> t2) -> (t1 -> t3) -> Compute.Flow t0 ())-updateCoderMetadata getMeta makeCoder getGraph f = (Flows.bind Monads.getState (\st -> Monads.putState (makeCoder (getGraph st) (f (getMeta st)))))+      let qualName = Names.qualifyName name+          ns = Module.qualifiedNameNamespace qualName+          local = Module.qualifiedNameLocal qualName+          nsToFilePath =+                  \ns -> Strings.intercalate "/" (Lists.map (\part -> Formatting.convertCase Util.CaseConventionCamel nsConv part) (Strings.splitOn "." (Module.unNamespace ns)))+          prefix = Maybes.maybe "" (\n -> Strings.cat2 (nsToFilePath n) "/") ns+          suffix = Formatting.convertCase Util.CaseConventionPascal localConv local+      in (Strings.cat [+        prefix,+        suffix,+        ".",+        (Module.unFileExtension ext)]) --- | Temporarily update the graph for a computation, then restore it-withUpdatedCoderGraph :: ((t0 -> t1) -> (t0 -> t2) -> (t1 -> t2 -> t0) -> (t1 -> t1) -> Compute.Flow t0 t3 -> Compute.Flow t0 t3)-withUpdatedCoderGraph getGraph getMeta makeCoder f flow = (Flows.bind Monads.getState (\st -> Flows.bind (Monads.putState (makeCoder (f (getGraph st)) (getMeta st))) (\_ -> Flows.bind flow (\r -> Flows.bind Monads.getState (\st2 -> Flows.bind (Monads.putState (makeCoder (getGraph st) (getMeta st2))) (\_ -> Flows.pure r))))))+-- | Normalize a comment string for consistent output across coders+normalizeComment :: String -> String+normalizeComment s = --- | Temporarily extend the graph with additional bindings for a computation-withGraphBindings :: ((t0 -> Graph.Graph) -> (Graph.Graph -> t1 -> t0) -> (t0 -> t1) -> [Core.Binding] -> Compute.Flow t0 t2 -> Compute.Flow t0 t2)-withGraphBindings getGraph makeCoder getMeta bindings flow = (withUpdatedCoderGraph getGraph getMeta makeCoder (Lexical.extendGraphWithBindings bindings) flow)+      let stripped = Formatting.stripLeadingAndTrailingWhitespace s+      in (Logic.ifElse (Strings.null stripped) "" (+        let lastIdx = Math.sub (Strings.length stripped) 1+            lastChar = Strings.charAt lastIdx stripped+        in (Logic.ifElse (Equality.equal lastChar 46) stripped (Strings.cat2 stripped ".")))) --- | Run a Flow Graph computation within a Flow state computation-inCoderGraphContext :: ((t0 -> t1) -> (t0 -> t2) -> (t1 -> t2 -> t0) -> Compute.Flow t1 t3 -> Compute.Flow t0 t3)-inCoderGraphContext getGraph getMeta makeCoder graphFlow = (Flows.bind Monads.getState (\st -> Flows.bind (Monads.withState (getGraph st) (Flows.bind graphFlow (\ret -> Flows.bind Monads.getState (\g2 -> Flows.pure (ret, g2))))) (\result -> Flows.bind (Monads.putState (makeCoder (Pairs.second result) (getMeta st))) (\_ -> Flows.pure (Pairs.first result)))))+-- | Reorder definitions: types first (with hydra.core.Name first among types), then topologically sorted terms+reorderDefs :: [Module.Definition] -> [Module.Definition]+reorderDefs defs =++      let partitioned = Schemas.partitionDefinitions defs+          typeDefsRaw = Pairs.first partitioned+          nameFirst = Lists.filter (\td -> Equality.equal (Module.typeDefinitionName td) (Core.Name "hydra.core.Name")) typeDefsRaw+          nameRest =+                  Lists.filter (\td -> Logic.not (Equality.equal (Module.typeDefinitionName td) (Core.Name "hydra.core.Name"))) typeDefsRaw+          typeDefs =+                  Lists.concat [+                    Lists.map (\td -> Module.DefinitionType td) nameFirst,+                    (Lists.map (\td -> Module.DefinitionType td) nameRest)]+          termDefsWrapped = Lists.map (\td -> Module.DefinitionTerm td) (Pairs.second partitioned)+          sortedTermDefs =+                  Lists.concat (Sorting.topologicalSortNodes (\d -> case d of+                    Module.DefinitionTerm v0 -> Module.termDefinitionName v0) (\d -> case d of+                    Module.DefinitionTerm v0 -> Sets.toList (Rewriting.freeVariablesInTerm (Module.termDefinitionTerm v0))+                    _ -> []) termDefsWrapped)+      in (Lists.concat [+        typeDefs,+        sortedTermDefs])++-- | Check the type of a term+typeOfTerm :: Context.Context -> Graph.Graph -> Core.Term -> Either (Context.InContext Errors.Error) Core.Type+typeOfTerm cx g term = Eithers.map Pairs.first (Checking.typeOf cx g [] term)
src/gen-main/haskell/Hydra/Coders.hs view
@@ -4,9 +4,9 @@  module Hydra.Coders where -import qualified Hydra.Compute as Compute import qualified Hydra.Core as Core import qualified Hydra.Graph as Graph+import qualified Hydra.Util as Util import qualified Hydra.Variants as Variants import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B@@ -16,51 +16,51 @@ import qualified Data.Set as S  -- | An evaluation context together with a source language and a target language-data AdapterContext = +data AdapterContext =   AdapterContext {     -- | The underlying graph of elements and primitives     adapterContextGraph :: Graph.Graph,     -- | The language being encoded or decoded     adapterContextLanguage :: Language,     -- | A map of type names to adapters for those types-    adapterContextAdapters :: (M.Map Core.Name (Compute.Adapter AdapterContext AdapterContext Core.Type Core.Type Core.Term Core.Term))}+    adapterContextAdapters :: (M.Map Core.Name (Util.Adapter Core.Type Core.Type Core.Term Core.Term))} -_AdapterContext = (Core.Name "hydra.coders.AdapterContext")+_AdapterContext = Core.Name "hydra.coders.AdapterContext" -_AdapterContext_graph = (Core.Name "graph")+_AdapterContext_graph = Core.Name "graph" -_AdapterContext_language = (Core.Name "language")+_AdapterContext_language = Core.Name "language" -_AdapterContext_adapters = (Core.Name "adapters")+_AdapterContext_adapters = Core.Name "adapters"  -- | Indicates either the 'out' or the 'in' direction of a coder-data CoderDirection = +data CoderDirection =   CoderDirectionEncode  |-  CoderDirectionDecode +  CoderDirectionDecode   deriving (Eq, Ord, Read, Show) -_CoderDirection = (Core.Name "hydra.coders.CoderDirection")+_CoderDirection = Core.Name "hydra.coders.CoderDirection" -_CoderDirection_encode = (Core.Name "encode")+_CoderDirection_encode = Core.Name "encode" -_CoderDirection_decode = (Core.Name "decode")+_CoderDirection_decode = Core.Name "decode"  -- | A named language together with language-specific constraints-data Language = +data Language =   Language {     -- | The unique name of the language     languageName :: LanguageName,     -- | The constraints which characterize the language     languageConstraints :: LanguageConstraints} -_Language = (Core.Name "hydra.coders.Language")+_Language = Core.Name "hydra.coders.Language" -_Language_name = (Core.Name "name")+_Language_name = Core.Name "name" -_Language_constraints = (Core.Name "constraints")+_Language_constraints = Core.Name "constraints"  -- | A set of constraints on valid type and term expressions, characterizing a language-data LanguageConstraints = +data LanguageConstraints =   LanguageConstraints {     -- | All supported elimination variants     languageConstraintsEliminationVariants :: (S.Set Variants.EliminationVariant),@@ -79,52 +79,52 @@     -- | A logical set of types, as a predicate which tests a type for inclusion     languageConstraintsTypes :: (Core.Type -> Bool)} -_LanguageConstraints = (Core.Name "hydra.coders.LanguageConstraints")+_LanguageConstraints = Core.Name "hydra.coders.LanguageConstraints" -_LanguageConstraints_eliminationVariants = (Core.Name "eliminationVariants")+_LanguageConstraints_eliminationVariants = Core.Name "eliminationVariants" -_LanguageConstraints_literalVariants = (Core.Name "literalVariants")+_LanguageConstraints_literalVariants = Core.Name "literalVariants" -_LanguageConstraints_floatTypes = (Core.Name "floatTypes")+_LanguageConstraints_floatTypes = Core.Name "floatTypes" -_LanguageConstraints_functionVariants = (Core.Name "functionVariants")+_LanguageConstraints_functionVariants = Core.Name "functionVariants" -_LanguageConstraints_integerTypes = (Core.Name "integerTypes")+_LanguageConstraints_integerTypes = Core.Name "integerTypes" -_LanguageConstraints_termVariants = (Core.Name "termVariants")+_LanguageConstraints_termVariants = Core.Name "termVariants" -_LanguageConstraints_typeVariants = (Core.Name "typeVariants")+_LanguageConstraints_typeVariants = Core.Name "typeVariants" -_LanguageConstraints_types = (Core.Name "types")+_LanguageConstraints_types = Core.Name "types"  -- | The unique name of a language-newtype LanguageName = +newtype LanguageName =   LanguageName {     unLanguageName :: String}   deriving (Eq, Ord, Read, Show) -_LanguageName = (Core.Name "hydra.coders.LanguageName")+_LanguageName = Core.Name "hydra.coders.LanguageName"  -- | A bidirectional encoder which maps between the same type and term languages on either side-type SymmetricAdapter s t v = (Compute.Adapter s s t t v v)+type SymmetricAdapter t v = (Util.Adapter t t v v) -_SymmetricAdapter = (Core.Name "hydra.coders.SymmetricAdapter")+_SymmetricAdapter = Core.Name "hydra.coders.SymmetricAdapter"  -- | Specifies either a pre-order or post-order traversal-data TraversalOrder = +data TraversalOrder =   -- | Pre-order traversal   TraversalOrderPre  |   -- | Post-order traversal-  TraversalOrderPost +  TraversalOrderPost   deriving (Eq, Ord, Read, Show) -_TraversalOrder = (Core.Name "hydra.coders.TraversalOrder")+_TraversalOrder = Core.Name "hydra.coders.TraversalOrder" -_TraversalOrder_pre = (Core.Name "pre")+_TraversalOrder_pre = Core.Name "pre" -_TraversalOrder_post = (Core.Name "post")+_TraversalOrder_post = Core.Name "post"  -- | A function which maps a Hydra type to a symmetric adapter between types and terms-type TypeAdapter = (Core.Type -> Compute.Flow AdapterContext (SymmetricAdapter AdapterContext Core.Type Core.Term))+type TypeAdapter = (AdapterContext -> Core.Type -> Either String (SymmetricAdapter Core.Type Core.Term)) -_TypeAdapter = (Core.Name "hydra.coders.TypeAdapter")+_TypeAdapter = Core.Name "hydra.coders.TypeAdapter"
− src/gen-main/haskell/Hydra/Compute.hs
@@ -1,108 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Abstractions for single- and bidirectional transformations--module Hydra.Compute where--import qualified Hydra.Core as Core-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S---- | A two-level bidirectional encoder which adapts types to types and terms to terms-data Adapter s1 s2 t1 t2 v1 v2 = -  Adapter {-    -- | Whether information may be lost in the course of this adaptation-    adapterIsLossy :: Bool,-    -- | The source type-    adapterSource :: t1,-    -- | The target type-    adapterTarget :: t2,-    -- | The coder for transforming instances of the source type to instances of the target type-    adapterCoder :: (Coder s1 s2 v1 v2)}--_Adapter = (Core.Name "hydra.compute.Adapter")--_Adapter_isLossy = (Core.Name "isLossy")--_Adapter_source = (Core.Name "source")--_Adapter_target = (Core.Name "target")--_Adapter_coder = (Core.Name "coder")---- | A two-level encoder and decoder, operating both at a type level and an instance (data) level-data Bicoder s1 s2 t1 t2 v1 v2 = -  Bicoder {-    -- | A function from source types to adapters-    bicoderEncode :: (t1 -> Adapter s1 s2 t1 t2 v1 v2),-    -- | A function from target types to adapters-    bicoderDecode :: (t2 -> Adapter s2 s1 t2 t1 v2 v1)}--_Bicoder = (Core.Name "hydra.compute.Bicoder")--_Bicoder_encode = (Core.Name "encode")--_Bicoder_decode = (Core.Name "decode")---- | An encoder and decoder; a bidirectional flow between two types-data Coder s1 s2 v1 v2 = -  Coder {-    -- | A function from source values to a flow of target values-    coderEncode :: (v1 -> Flow s1 v2),-    -- | A function from target values to a flow of source values-    coderDecode :: (v2 -> Flow s2 v1)}--_Coder = (Core.Name "hydra.compute.Coder")--_Coder_encode = (Core.Name "encode")--_Coder_decode = (Core.Name "decode")---- | A variant of the State monad with built-in logging and error handling-newtype Flow s v = -  Flow {-    unFlow :: (s -> Trace -> FlowState s v)}--_Flow = (Core.Name "hydra.compute.Flow")---- | The result of evaluating a Flow-data FlowState s v = -  FlowState {-    -- | The resulting value, or nothing in the case of failure-    flowStateValue :: (Maybe v),-    -- | The final state-    flowStateState :: s,-    -- | The trace (log) produced during evaluation-    flowStateTrace :: Trace}-  deriving (Eq, Ord, Read, Show)--_FlowState = (Core.Name "hydra.compute.FlowState")--_FlowState_value = (Core.Name "value")--_FlowState_state = (Core.Name "state")--_FlowState_trace = (Core.Name "trace")---- | A container for logging and error information-data Trace = -  Trace {-    -- | A stack of context labels-    traceStack :: [String],-    -- | A log of warnings and/or info messages-    traceMessages :: [String],-    -- | A map of string keys to arbitrary terms as values, for application-specific use-    traceOther :: (M.Map Core.Name Core.Term)}-  deriving (Eq, Ord, Read, Show)--_Trace = (Core.Name "hydra.compute.Trace")--_Trace_stack = (Core.Name "stack")--_Trace_messages = (Core.Name "messages")--_Trace_other = (Core.Name "other")
src/gen-main/haskell/Hydra/Constants.hs view
@@ -22,57 +22,53 @@  -- | Annotation key for type classes key_classes :: Core.Name-key_classes = (Core.Name "classes")+key_classes = Core.Name "classes"  -- | Annotation key for debug identifiers key_debugId :: Core.Name-key_debugId = (Core.Name "debugId")+key_debugId = Core.Name "debugId"  -- | Annotation key for deprecated markers key_deprecated :: Core.Name-key_deprecated = (Core.Name "deprecated")+key_deprecated = Core.Name "deprecated"  -- | Annotation key for descriptions key_description :: Core.Name-key_description = (Core.Name "description")+key_description = Core.Name "description"  -- | Annotation key for exclusions key_exclude :: Core.Name-key_exclude = (Core.Name "exclude")+key_exclude = Core.Name "exclude"  -- | A flag which tells the language coders to encode a given encoded type as a term rather than a native type key_firstClassType :: Core.Name-key_firstClassType = (Core.Name "firstClassType")+key_firstClassType = Core.Name "firstClassType" +-- | A counter for generating fresh type variable names+key_freshTypeVariableCount :: Core.Name+key_freshTypeVariableCount = Core.Name "freshTypeVariableCount"+ -- | Annotation key for maximum length constraints key_maxLength :: Core.Name-key_maxLength = (Core.Name "maxLength")+key_maxLength = Core.Name "maxLength"  -- | Annotation key for minimum length constraints key_minLength :: Core.Name-key_minLength = (Core.Name "minLength")+key_minLength = Core.Name "minLength"  -- | Annotation key for preserving field names during code generation key_preserveFieldName :: Core.Name-key_preserveFieldName = (Core.Name "preserveFieldName")+key_preserveFieldName = Core.Name "preserveFieldName"  -- | Annotation key for type information key_type :: Core.Name-key_type = (Core.Name "type")---- | A counter for generating fresh type variable names-key_freshTypeVariableCount :: Core.Name-key_freshTypeVariableCount = (Core.Name "freshTypeVariableCount")+key_type = Core.Name "type"  -- | The maximum value of a 32-bit integer maxInt32 :: Int maxInt32 = 2147483647 --- | A placeholder name for row types as they are being constructed-placeholderName :: Core.Name-placeholderName = (Core.Name "Placeholder")---- | A maximum depth for nested flows. Currently, this is set very high because deep flows are common in type inference over the Hydra kernel.+-- | A maximum depth for nested computations. Currently, this is set very high because deep recursion is common in type inference over the Hydra kernel. maxTraceDepth :: Int maxTraceDepth = 5000 
− src/gen-main/haskell/Hydra/Constraints.hs
@@ -1,44 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | A model for path- and pattern-based graph constraints, which may be considered as part of the schema of a graph--module Hydra.Constraints where--import qualified Hydra.Core as Core-import qualified Hydra.Query as Query-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S---- | A declared equivalence between two abstract paths in a graph-data PathEquation = -  PathEquation {-    -- | The left-hand side of the equation-    pathEquationLeft :: Query.Path,-    -- | The right-hand side of the equation-    pathEquationRight :: Query.Path}-  deriving (Eq, Ord, Read, Show)--_PathEquation = (Core.Name "hydra.constraints.PathEquation")--_PathEquation_left = (Core.Name "left")--_PathEquation_right = (Core.Name "right")---- | A pattern which, if it matches in a given graph, implies that another pattern must also match. Query variables are shared between the two patterns.-data PatternImplication = -  PatternImplication {-    -- | The pattern which, if it matches, triggers the constraint-    patternImplicationAntecedent :: Query.Pattern,-    -- | The pattern which must also match when the antecedent matches-    patternImplicationConsequent :: Query.Pattern}-  deriving (Eq, Ord, Read, Show)--_PatternImplication = (Core.Name "hydra.constraints.PatternImplication")--_PatternImplication_antecedent = (Core.Name "antecedent")--_PatternImplication_consequent = (Core.Name "consequent")
+ src/gen-main/haskell/Hydra/Context.hs view
@@ -0,0 +1,47 @@+-- Note: this is an automatically generated file. Do not edit.++-- | Execution context for tracing and diagnostics++module Hydra.Context where++import qualified Hydra.Core as Core+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++-- | An execution context for tracing and diagnostics, threaded through function calls+data Context =+  Context {+    -- | A stack of context labels describing the current execution path+    contextTrace :: [String],+    -- | A log of warnings and/or info messages+    contextMessages :: [String],+    -- | A map of string keys to arbitrary terms as values, for application-specific use+    contextOther :: (M.Map Core.Name Core.Term)}+  deriving (Eq, Ord, Read, Show)++_Context = Core.Name "hydra.context.Context"++_Context_trace = Core.Name "trace"++_Context_messages = Core.Name "messages"++_Context_other = Core.Name "other"++-- | A particular domain object (such as an error) together with an execution context+data InContext e =+  InContext {+    -- | A domain object; typically an error+    inContextObject :: e,+    -- | The execution context at the point of capture+    inContextContext :: Context}+  deriving (Eq, Ord, Read, Show)++_InContext = Core.Name "hydra.context.InContext"++_InContext_object = Core.Name "object"++_InContext_context = Core.Name "context"
src/gen-main/haskell/Hydra/Core.hs view
@@ -12,7 +12,7 @@ import qualified Data.Set as S  -- | A term together with an annotation-data AnnotatedTerm = +data AnnotatedTerm =   AnnotatedTerm {     -- | The term being annotated     annotatedTermBody :: Term,@@ -20,14 +20,14 @@     annotatedTermAnnotation :: (M.Map Name Term)}   deriving (Eq, Ord, Read, Show) -_AnnotatedTerm = (Name "hydra.core.AnnotatedTerm")+_AnnotatedTerm = Name "hydra.core.AnnotatedTerm" -_AnnotatedTerm_body = (Name "body")+_AnnotatedTerm_body = Name "body" -_AnnotatedTerm_annotation = (Name "annotation")+_AnnotatedTerm_annotation = Name "annotation"  -- | A type together with an annotation-data AnnotatedType = +data AnnotatedType =   AnnotatedType {     -- | The type being annotated     annotatedTypeBody :: Type,@@ -35,14 +35,14 @@     annotatedTypeAnnotation :: (M.Map Name Term)}   deriving (Eq, Ord, Read, Show) -_AnnotatedType = (Name "hydra.core.AnnotatedType")+_AnnotatedType = Name "hydra.core.AnnotatedType" -_AnnotatedType_body = (Name "body")+_AnnotatedType_body = Name "body" -_AnnotatedType_annotation = (Name "annotation")+_AnnotatedType_annotation = Name "annotation"  -- | A term which applies a function to an argument-data Application = +data Application =   Application {     -- | The left-hand side of the application     applicationFunction :: Term,@@ -50,14 +50,14 @@     applicationArgument :: Term}   deriving (Eq, Ord, Read, Show) -_Application = (Name "hydra.core.Application")+_Application = Name "hydra.core.Application" -_Application_function = (Name "function")+_Application_function = Name "function" -_Application_argument = (Name "argument")+_Application_argument = Name "argument"  -- | The type-level analog of an application term-data ApplicationType = +data ApplicationType =   ApplicationType {     -- | The left-hand side of the application     applicationTypeFunction :: Type,@@ -65,14 +65,14 @@     applicationTypeArgument :: Type}   deriving (Eq, Ord, Read, Show) -_ApplicationType = (Name "hydra.core.ApplicationType")+_ApplicationType = Name "hydra.core.ApplicationType" -_ApplicationType_function = (Name "function")+_ApplicationType_function = Name "function" -_ApplicationType_argument = (Name "argument")+_ApplicationType_argument = Name "argument"  -- | A field with an optional type scheme, used to bind variables to terms in a 'let' expression-data Binding = +data Binding =   Binding {     -- | The name of the bound variable     bindingName :: Name,@@ -82,16 +82,16 @@     bindingType :: (Maybe TypeScheme)}   deriving (Eq, Ord, Read, Show) -_Binding = (Name "hydra.core.Binding")+_Binding = Name "hydra.core.Binding" -_Binding_name = (Name "name")+_Binding_name = Name "name" -_Binding_term = (Name "term")+_Binding_term = Name "term" -_Binding_type = (Name "type")+_Binding_type = Name "type"  -- | A union elimination; a case statement-data CaseStatement = +data CaseStatement =   CaseStatement {     -- | The name of the union type     caseStatementTypeName :: Name,@@ -101,16 +101,16 @@     caseStatementCases :: [Field]}   deriving (Eq, Ord, Read, Show) -_CaseStatement = (Name "hydra.core.CaseStatement")+_CaseStatement = Name "hydra.core.CaseStatement" -_CaseStatement_typeName = (Name "typeName")+_CaseStatement_typeName = Name "typeName" -_CaseStatement_default = (Name "default")+_CaseStatement_default = Name "default" -_CaseStatement_cases = (Name "cases")+_CaseStatement_cases = Name "cases"  -- | A type which provides a choice between a 'left' type and a 'right' type-data EitherType = +data EitherType =   EitherType {     -- | The 'left' alternative     eitherTypeLeft :: Type,@@ -118,14 +118,14 @@     eitherTypeRight :: Type}   deriving (Eq, Ord, Read, Show) -_EitherType = (Name "hydra.core.EitherType")+_EitherType = Name "hydra.core.EitherType" -_EitherType_left = (Name "left")+_EitherType_left = Name "left" -_EitherType_right = (Name "right")+_EitherType_right = Name "right"  -- | A type which pairs a 'first' type and a 'second' type-data PairType = +data PairType =   PairType {     -- | The first component of the pair     pairTypeFirst :: Type,@@ -133,14 +133,14 @@     pairTypeSecond :: Type}   deriving (Eq, Ord, Read, Show) -_PairType = (Name "hydra.core.PairType")+_PairType = Name "hydra.core.PairType" -_PairType_first = (Name "first")+_PairType_first = Name "first" -_PairType_second = (Name "second")+_PairType_second = Name "second"  -- | A corresponding elimination for an introduction term-data Elimination = +data Elimination =   -- | Eliminates a record by projecting a given field   EliminationRecord Projection |   -- | Eliminates a union term by matching over the fields of the union. This is a case statement.@@ -149,16 +149,16 @@   EliminationWrap Name   deriving (Eq, Ord, Read, Show) -_Elimination = (Name "hydra.core.Elimination")+_Elimination = Name "hydra.core.Elimination" -_Elimination_record = (Name "record")+_Elimination_record = Name "record" -_Elimination_union = (Name "union")+_Elimination_union = Name "union" -_Elimination_wrap = (Name "wrap")+_Elimination_wrap = Name "wrap"  -- | A name/term pair-data Field = +data Field =   Field {     -- | The name of the field     fieldName :: Name,@@ -166,14 +166,14 @@     fieldTerm :: Term}   deriving (Eq, Ord, Read, Show) -_Field = (Name "hydra.core.Field")+_Field = Name "hydra.core.Field" -_Field_name = (Name "name")+_Field_name = Name "name" -_Field_term = (Name "term")+_Field_term = Name "term"  -- | A name/type pair-data FieldType = +data FieldType =   FieldType {     -- | The name of the field     fieldTypeName :: Name,@@ -181,32 +181,32 @@     fieldTypeType :: Type}   deriving (Eq, Ord, Read, Show) -_FieldType = (Name "hydra.core.FieldType")+_FieldType = Name "hydra.core.FieldType" -_FieldType_name = (Name "name")+_FieldType_name = Name "name" -_FieldType_type = (Name "type")+_FieldType_type = Name "type"  -- | A floating-point type-data FloatType = +data FloatType =   -- | An arbitrary-precision floating-point type   FloatTypeBigfloat  |   -- | A 32-bit floating-point type   FloatTypeFloat32  |   -- | A 64-bit floating-point type-  FloatTypeFloat64 +  FloatTypeFloat64   deriving (Eq, Ord, Read, Show) -_FloatType = (Name "hydra.core.FloatType")+_FloatType = Name "hydra.core.FloatType" -_FloatType_bigfloat = (Name "bigfloat")+_FloatType_bigfloat = Name "bigfloat" -_FloatType_float32 = (Name "float32")+_FloatType_float32 = Name "float32" -_FloatType_float64 = (Name "float64")+_FloatType_float64 = Name "float64"  -- | A floating-point literal value-data FloatValue = +data FloatValue =   -- | An arbitrary-precision floating-point value   FloatValueBigfloat Double |   -- | A 32-bit floating-point value@@ -215,16 +215,16 @@   FloatValueFloat64 Double   deriving (Eq, Ord, Read, Show) -_FloatValue = (Name "hydra.core.FloatValue")+_FloatValue = Name "hydra.core.FloatValue" -_FloatValue_bigfloat = (Name "bigfloat")+_FloatValue_bigfloat = Name "bigfloat" -_FloatValue_float32 = (Name "float32")+_FloatValue_float32 = Name "float32" -_FloatValue_float64 = (Name "float64")+_FloatValue_float64 = Name "float64"  -- | A universally quantified type; the System F equivalent of a type scheme, and the type-level equivalent of a lambda term.-data ForallType = +data ForallType =   ForallType {     -- | The variable which is bound by the lambda     forallTypeParameter :: Name,@@ -232,14 +232,14 @@     forallTypeBody :: Type}   deriving (Eq, Ord, Read, Show) -_ForallType = (Name "hydra.core.ForallType")+_ForallType = Name "hydra.core.ForallType" -_ForallType_parameter = (Name "parameter")+_ForallType_parameter = Name "parameter" -_ForallType_body = (Name "body")+_ForallType_body = Name "body"  -- | A function-data Function = +data Function =   -- | An elimination for any of a few term variants   FunctionElimination Elimination |   -- | A function abstraction (lambda)@@ -248,16 +248,16 @@   FunctionPrimitive Name   deriving (Eq, Ord, Read, Show) -_Function = (Name "hydra.core.Function")+_Function = Name "hydra.core.Function" -_Function_elimination = (Name "elimination")+_Function_elimination = Name "elimination" -_Function_lambda = (Name "lambda")+_Function_lambda = Name "lambda" -_Function_primitive = (Name "primitive")+_Function_primitive = Name "primitive"  -- | A function type, also known as an arrow type-data FunctionType = +data FunctionType =   FunctionType {     -- | The domain (input) type of the function     functionTypeDomain :: Type,@@ -265,14 +265,14 @@     functionTypeCodomain :: Type}   deriving (Eq, Ord, Read, Show) -_FunctionType = (Name "hydra.core.FunctionType")+_FunctionType = Name "hydra.core.FunctionType" -_FunctionType_domain = (Name "domain")+_FunctionType_domain = Name "domain" -_FunctionType_codomain = (Name "codomain")+_FunctionType_codomain = Name "codomain"  -- | An instance of a union type; i.e. a string-indexed generalization of inl() or inr()-data Injection = +data Injection =   Injection {     -- | The name of the union type     injectionTypeName :: Name,@@ -280,14 +280,14 @@     injectionField :: Field}   deriving (Eq, Ord, Read, Show) -_Injection = (Name "hydra.core.Injection")+_Injection = Name "hydra.core.Injection" -_Injection_typeName = (Name "typeName")+_Injection_typeName = Name "typeName" -_Injection_field = (Name "field")+_Injection_field = Name "field"  -- | An integer type-data IntegerType = +data IntegerType =   -- | An arbitrary-precision integer type   IntegerTypeBigint  |   -- | An 8-bit signed integer type@@ -305,31 +305,31 @@   -- | A 32-bit unsigned integer type   IntegerTypeUint32  |   -- | A 64-bit unsigned integer type-  IntegerTypeUint64 +  IntegerTypeUint64   deriving (Eq, Ord, Read, Show) -_IntegerType = (Name "hydra.core.IntegerType")+_IntegerType = Name "hydra.core.IntegerType" -_IntegerType_bigint = (Name "bigint")+_IntegerType_bigint = Name "bigint" -_IntegerType_int8 = (Name "int8")+_IntegerType_int8 = Name "int8" -_IntegerType_int16 = (Name "int16")+_IntegerType_int16 = Name "int16" -_IntegerType_int32 = (Name "int32")+_IntegerType_int32 = Name "int32" -_IntegerType_int64 = (Name "int64")+_IntegerType_int64 = Name "int64" -_IntegerType_uint8 = (Name "uint8")+_IntegerType_uint8 = Name "uint8" -_IntegerType_uint16 = (Name "uint16")+_IntegerType_uint16 = Name "uint16" -_IntegerType_uint32 = (Name "uint32")+_IntegerType_uint32 = Name "uint32" -_IntegerType_uint64 = (Name "uint64")+_IntegerType_uint64 = Name "uint64"  -- | An integer literal value-data IntegerValue = +data IntegerValue =   -- | An arbitrary-precision integer value   IntegerValueBigint Integer |   -- | An 8-bit signed integer value@@ -350,28 +350,28 @@   IntegerValueUint64 Integer   deriving (Eq, Ord, Read, Show) -_IntegerValue = (Name "hydra.core.IntegerValue")+_IntegerValue = Name "hydra.core.IntegerValue" -_IntegerValue_bigint = (Name "bigint")+_IntegerValue_bigint = Name "bigint" -_IntegerValue_int8 = (Name "int8")+_IntegerValue_int8 = Name "int8" -_IntegerValue_int16 = (Name "int16")+_IntegerValue_int16 = Name "int16" -_IntegerValue_int32 = (Name "int32")+_IntegerValue_int32 = Name "int32" -_IntegerValue_int64 = (Name "int64")+_IntegerValue_int64 = Name "int64" -_IntegerValue_uint8 = (Name "uint8")+_IntegerValue_uint8 = Name "uint8" -_IntegerValue_uint16 = (Name "uint16")+_IntegerValue_uint16 = Name "uint16" -_IntegerValue_uint32 = (Name "uint32")+_IntegerValue_uint32 = Name "uint32" -_IntegerValue_uint64 = (Name "uint64")+_IntegerValue_uint64 = Name "uint64"  -- | A function abstraction (lambda)-data Lambda = +data Lambda =   Lambda {     -- | The parameter of the lambda     lambdaParameter :: Name,@@ -381,16 +381,16 @@     lambdaBody :: Term}   deriving (Eq, Ord, Read, Show) -_Lambda = (Name "hydra.core.Lambda")+_Lambda = Name "hydra.core.Lambda" -_Lambda_parameter = (Name "parameter")+_Lambda_parameter = Name "parameter" -_Lambda_domain = (Name "domain")+_Lambda_domain = Name "domain" -_Lambda_body = (Name "body")+_Lambda_body = Name "body"  -- | A set of (possibly recursive) 'let' bindings together with a body in which they are bound-data Let = +data Let =   Let {     -- | The list of variable bindings     letBindings :: [Binding],@@ -398,14 +398,14 @@     letBody :: Term}   deriving (Eq, Ord, Read, Show) -_Let = (Name "hydra.core.Let")+_Let = Name "hydra.core.Let" -_Let_bindings = (Name "bindings")+_Let_bindings = Name "bindings" -_Let_body = (Name "body")+_Let_body = Name "body"  -- | A term constant; an instance of a literal type-data Literal = +data Literal =   -- | A binary literal   LiteralBinary B.ByteString |   -- | A boolean literal@@ -418,20 +418,20 @@   LiteralString String   deriving (Eq, Ord, Read, Show) -_Literal = (Name "hydra.core.Literal")+_Literal = Name "hydra.core.Literal" -_Literal_binary = (Name "binary")+_Literal_binary = Name "binary" -_Literal_boolean = (Name "boolean")+_Literal_boolean = Name "boolean" -_Literal_float = (Name "float")+_Literal_float = Name "float" -_Literal_integer = (Name "integer")+_Literal_integer = Name "integer" -_Literal_string = (Name "string")+_Literal_string = Name "string"  -- | Any of a fixed set of literal types, also called atomic types, base types, primitive types, or type constants-data LiteralType = +data LiteralType =   -- | The type of a binary (byte string) value   LiteralTypeBinary  |   -- | The type of a boolean (true/false) value@@ -441,23 +441,23 @@   -- | The type of an integer value   LiteralTypeInteger IntegerType |   -- | The type of a string value-  LiteralTypeString +  LiteralTypeString   deriving (Eq, Ord, Read, Show) -_LiteralType = (Name "hydra.core.LiteralType")+_LiteralType = Name "hydra.core.LiteralType" -_LiteralType_binary = (Name "binary")+_LiteralType_binary = Name "binary" -_LiteralType_boolean = (Name "boolean")+_LiteralType_boolean = Name "boolean" -_LiteralType_float = (Name "float")+_LiteralType_float = Name "float" -_LiteralType_integer = (Name "integer")+_LiteralType_integer = Name "integer" -_LiteralType_string = (Name "string")+_LiteralType_string = Name "string"  -- | A map type-data MapType = +data MapType =   MapType {     -- | The type of keys in the map     mapTypeKeys :: Type,@@ -465,22 +465,22 @@     mapTypeValues :: Type}   deriving (Eq, Ord, Read, Show) -_MapType = (Name "hydra.core.MapType")+_MapType = Name "hydra.core.MapType" -_MapType_keys = (Name "keys")+_MapType_keys = Name "keys" -_MapType_values = (Name "values")+_MapType_values = Name "values"  -- | A unique identifier in some context; a string-valued key-newtype Name = +newtype Name =   Name {     unName :: String}   deriving (Eq, Ord, Read, Show) -_Name = (Name "hydra.core.Name")+_Name = Name "hydra.core.Name"  -- | A record elimination; a projection-data Projection = +data Projection =   Projection {     -- | The name of the record type     projectionTypeName :: Name,@@ -488,14 +488,14 @@     projectionField :: Name}   deriving (Eq, Ord, Read, Show) -_Projection = (Name "hydra.core.Projection")+_Projection = Name "hydra.core.Projection" -_Projection_typeName = (Name "typeName")+_Projection_typeName = Name "typeName" -_Projection_field = (Name "field")+_Projection_field = Name "field"  -- | A record, or labeled tuple; a map of field names to terms-data Record = +data Record =   Record {     -- | The name of the record type     recordTypeName :: Name,@@ -503,29 +503,14 @@     recordFields :: [Field]}   deriving (Eq, Ord, Read, Show) -_Record = (Name "hydra.core.Record")--_Record_typeName = (Name "typeName")--_Record_fields = (Name "fields")---- | A labeled record or union type-data RowType = -  RowType {-    -- | The name of the row type, which must correspond to the name of a Type element-    rowTypeTypeName :: Name,-    -- | The fields of this row type, excluding any inherited fields-    rowTypeFields :: [FieldType]}-  deriving (Eq, Ord, Read, Show)--_RowType = (Name "hydra.core.RowType")+_Record = Name "hydra.core.Record" -_RowType_typeName = (Name "typeName")+_Record_typeName = Name "typeName" -_RowType_fields = (Name "fields")+_Record_fields = Name "fields"  -- | A data term-data Term = +data Term =   -- | A term annotated with metadata   TermAnnotated AnnotatedTerm |   -- | A function application@@ -564,46 +549,46 @@   TermWrap WrappedTerm   deriving (Eq, Ord, Read, Show) -_Term = (Name "hydra.core.Term")+_Term = Name "hydra.core.Term" -_Term_annotated = (Name "annotated")+_Term_annotated = Name "annotated" -_Term_application = (Name "application")+_Term_application = Name "application" -_Term_either = (Name "either")+_Term_either = Name "either" -_Term_function = (Name "function")+_Term_function = Name "function" -_Term_let = (Name "let")+_Term_let = Name "let" -_Term_list = (Name "list")+_Term_list = Name "list" -_Term_literal = (Name "literal")+_Term_literal = Name "literal" -_Term_map = (Name "map")+_Term_map = Name "map" -_Term_maybe = (Name "maybe")+_Term_maybe = Name "maybe" -_Term_pair = (Name "pair")+_Term_pair = Name "pair" -_Term_record = (Name "record")+_Term_record = Name "record" -_Term_set = (Name "set")+_Term_set = Name "set" -_Term_typeApplication = (Name "typeApplication")+_Term_typeApplication = Name "typeApplication" -_Term_typeLambda = (Name "typeLambda")+_Term_typeLambda = Name "typeLambda" -_Term_union = (Name "union")+_Term_union = Name "union" -_Term_unit = (Name "unit")+_Term_unit = Name "unit" -_Term_variable = (Name "variable")+_Term_variable = Name "variable" -_Term_wrap = (Name "wrap")+_Term_wrap = Name "wrap"  -- | A data type-data Type = +data Type =   -- | An annotated type   TypeAnnotated AnnotatedType |   -- | A type application@@ -625,55 +610,59 @@   -- | A pair (2-tuple) type   TypePair PairType |   -- | A record type-  TypeRecord RowType |+  TypeRecord [FieldType] |   -- | A set type   TypeSet Type |   -- | A union type with field names-  TypeUnion RowType |+  TypeUnion [FieldType] |   -- | The unit type   TypeUnit  |   -- | A type variable   TypeVariable Name |+  -- | The void (uninhabited, or bottom) type+  TypeVoid  |   -- | A wrapped type (newtype)-  TypeWrap WrappedType+  TypeWrap Type   deriving (Eq, Ord, Read, Show) -_Type = (Name "hydra.core.Type")+_Type = Name "hydra.core.Type" -_Type_annotated = (Name "annotated")+_Type_annotated = Name "annotated" -_Type_application = (Name "application")+_Type_application = Name "application" -_Type_either = (Name "either")+_Type_either = Name "either" -_Type_forall = (Name "forall")+_Type_forall = Name "forall" -_Type_function = (Name "function")+_Type_function = Name "function" -_Type_list = (Name "list")+_Type_list = Name "list" -_Type_literal = (Name "literal")+_Type_literal = Name "literal" -_Type_map = (Name "map")+_Type_map = Name "map" -_Type_maybe = (Name "maybe")+_Type_maybe = Name "maybe" -_Type_pair = (Name "pair")+_Type_pair = Name "pair" -_Type_record = (Name "record")+_Type_record = Name "record" -_Type_set = (Name "set")+_Type_set = Name "set" -_Type_union = (Name "union")+_Type_union = Name "union" -_Type_unit = (Name "unit")+_Type_unit = Name "unit" -_Type_variable = (Name "variable")+_Type_variable = Name "variable" -_Type_wrap = (Name "wrap")+_Type_void = Name "void" +_Type_wrap = Name "wrap"+ -- | A term applied to a type; a type application-data TypeApplicationTerm = +data TypeApplicationTerm =   TypeApplicationTerm {     -- | The term being applied to a type     typeApplicationTermBody :: Term,@@ -681,14 +670,14 @@     typeApplicationTermType :: Type}   deriving (Eq, Ord, Read, Show) -_TypeApplicationTerm = (Name "hydra.core.TypeApplicationTerm")+_TypeApplicationTerm = Name "hydra.core.TypeApplicationTerm" -_TypeApplicationTerm_body = (Name "body")+_TypeApplicationTerm_body = Name "body" -_TypeApplicationTerm_type = (Name "type")+_TypeApplicationTerm_type = Name "type"  -- | A System F type abstraction term-data TypeLambda = +data TypeLambda =   TypeLambda {     -- | The type variable introduced by the abstraction     typeLambdaParameter :: Name,@@ -696,14 +685,14 @@     typeLambdaBody :: Term}   deriving (Eq, Ord, Read, Show) -_TypeLambda = (Name "hydra.core.TypeLambda")+_TypeLambda = Name "hydra.core.TypeLambda" -_TypeLambda_parameter = (Name "parameter")+_TypeLambda_parameter = Name "parameter" -_TypeLambda_body = (Name "body")+_TypeLambda_body = Name "body"  -- | A type expression together with free type variables occurring in the expression-data TypeScheme = +data TypeScheme =   TypeScheme {     -- | The free type variables     typeSchemeVariables :: [Name],@@ -713,27 +702,27 @@     typeSchemeConstraints :: (Maybe (M.Map Name TypeVariableMetadata))}   deriving (Eq, Ord, Read, Show) -_TypeScheme = (Name "hydra.core.TypeScheme")+_TypeScheme = Name "hydra.core.TypeScheme" -_TypeScheme_variables = (Name "variables")+_TypeScheme_variables = Name "variables" -_TypeScheme_type = (Name "type")+_TypeScheme_type = Name "type" -_TypeScheme_constraints = (Name "constraints")+_TypeScheme_constraints = Name "constraints"  -- | Metadata associated with a type variable, including typeclass constraints-data TypeVariableMetadata = +data TypeVariableMetadata =   TypeVariableMetadata {     -- | The set of typeclass constraints on this type variable     typeVariableMetadataClasses :: (S.Set Name)}   deriving (Eq, Ord, Read, Show) -_TypeVariableMetadata = (Name "hydra.core.TypeVariableMetadata")+_TypeVariableMetadata = Name "hydra.core.TypeVariableMetadata" -_TypeVariableMetadata_classes = (Name "classes")+_TypeVariableMetadata_classes = Name "classes"  -- | A term wrapped in a type name-data WrappedTerm = +data WrappedTerm =   WrappedTerm {     -- | The name of the wrapper type     wrappedTermTypeName :: Name,@@ -741,23 +730,8 @@     wrappedTermBody :: Term}   deriving (Eq, Ord, Read, Show) -_WrappedTerm = (Name "hydra.core.WrappedTerm")--_WrappedTerm_typeName = (Name "typeName")--_WrappedTerm_body = (Name "body")---- | A type wrapped in a type name; a newtype-data WrappedType = -  WrappedType {-    -- | The name of the wrapper (newtype)-    wrappedTypeTypeName :: Name,-    -- | The wrapped type-    wrappedTypeBody :: Type}-  deriving (Eq, Ord, Read, Show)--_WrappedType = (Name "hydra.core.WrappedType")+_WrappedTerm = Name "hydra.core.WrappedTerm" -_WrappedType_typeName = (Name "typeName")+_WrappedTerm_typeName = Name "typeName" -_WrappedType_body = (Name "body")+_WrappedTerm_body = Name "body"
− src/gen-main/haskell/Hydra/Decode/Accessors.hs
@@ -1,130 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Term decoders for hydra.accessors--module Hydra.Decode.Accessors where--import qualified Hydra.Accessors as Accessors-import qualified Hydra.Core as Core-import qualified Hydra.Decode.Core as Core_-import qualified Hydra.Extract.Helpers as Helpers-import qualified Hydra.Graph as Graph-import qualified Hydra.Lexical as Lexical-import qualified Hydra.Lib.Eithers as Eithers-import qualified Hydra.Lib.Maps as Maps-import qualified Hydra.Lib.Maybes as Maybes-import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Util as Util-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S--accessorEdge :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Accessors.AccessorEdge)-accessorEdge cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "source" accessorNode fieldMap cx) (\field_source -> Eithers.bind (Helpers.requireField "path" accessorPath fieldMap cx) (\field_path -> Eithers.bind (Helpers.requireField "target" accessorNode fieldMap cx) (\field_target -> Right (Accessors.AccessorEdge {-      Accessors.accessorEdgeSource = field_source,-      Accessors.accessorEdgePath = field_path,-      Accessors.accessorEdgeTarget = field_target})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.accessors.AccessorEdge"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--accessorGraph :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Accessors.AccessorGraph)-accessorGraph cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "nodes" (Helpers.decodeList accessorNode) fieldMap cx) (\field_nodes -> Eithers.bind (Helpers.requireField "edges" (Helpers.decodeList accessorEdge) fieldMap cx) (\field_edges -> Right (Accessors.AccessorGraph {-      Accessors.accessorGraphNodes = field_nodes,-      Accessors.accessorGraphEdges = field_edges}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.accessors.AccessorGraph"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--accessorNode :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Accessors.AccessorNode)-accessorNode cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "label" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_label -> Eithers.bind (Helpers.requireField "id" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_id -> Right (Accessors.AccessorNode {-      Accessors.accessorNodeName = field_name,-      Accessors.accessorNodeLabel = field_label,-      Accessors.accessorNodeId = field_id})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.accessors.AccessorNode"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--accessorPath :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Accessors.AccessorPath)-accessorPath cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Accessors.AccessorPath b) (Helpers.decodeList termAccessor cx (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.accessors.AccessorPath"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--termAccessor :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Accessors.TermAccessor)-termAccessor cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "annotatedBody", (\input -> Eithers.map (\t -> Accessors.TermAccessorAnnotatedBody) (Helpers.decodeUnit cx input))),-                (Core.Name "applicationFunction", (\input -> Eithers.map (\t -> Accessors.TermAccessorApplicationFunction) (Helpers.decodeUnit cx input))),-                (Core.Name "applicationArgument", (\input -> Eithers.map (\t -> Accessors.TermAccessorApplicationArgument) (Helpers.decodeUnit cx input))),-                (Core.Name "lambdaBody", (\input -> Eithers.map (\t -> Accessors.TermAccessorLambdaBody) (Helpers.decodeUnit cx input))),-                (Core.Name "unionCasesDefault", (\input -> Eithers.map (\t -> Accessors.TermAccessorUnionCasesDefault) (Helpers.decodeUnit cx input))),-                (Core.Name "unionCasesBranch", (\input -> Eithers.map (\t -> Accessors.TermAccessorUnionCasesBranch t) (Core_.name cx input))),-                (Core.Name "letBody", (\input -> Eithers.map (\t -> Accessors.TermAccessorLetBody) (Helpers.decodeUnit cx input))),-                (Core.Name "letBinding", (\input -> Eithers.map (\t -> Accessors.TermAccessorLetBinding t) (Core_.name cx input))),-                (Core.Name "listElement", (\input -> Eithers.map (\t -> Accessors.TermAccessorListElement t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueInt32 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "mapKey", (\input -> Eithers.map (\t -> Accessors.TermAccessorMapKey t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueInt32 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "mapValue", (\input -> Eithers.map (\t -> Accessors.TermAccessorMapValue t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueInt32 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "maybeTerm", (\input -> Eithers.map (\t -> Accessors.TermAccessorMaybeTerm) (Helpers.decodeUnit cx input))),-                (Core.Name "productTerm", (\input -> Eithers.map (\t -> Accessors.TermAccessorProductTerm t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueInt32 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "recordField", (\input -> Eithers.map (\t -> Accessors.TermAccessorRecordField t) (Core_.name cx input))),-                (Core.Name "setElement", (\input -> Eithers.map (\t -> Accessors.TermAccessorSetElement t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueInt32 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "sumTerm", (\input -> Eithers.map (\t -> Accessors.TermAccessorSumTerm) (Helpers.decodeUnit cx input))),-                (Core.Name "typeLambdaBody", (\input -> Eithers.map (\t -> Accessors.TermAccessorTypeLambdaBody) (Helpers.decodeUnit cx input))),-                (Core.Name "typeApplicationTerm", (\input -> Eithers.map (\t -> Accessors.TermAccessorTypeApplicationTerm) (Helpers.decodeUnit cx input))),-                (Core.Name "injectionTerm", (\input -> Eithers.map (\t -> Accessors.TermAccessorInjectionTerm) (Helpers.decodeUnit cx input))),-                (Core.Name "wrappedTerm", (\input -> Eithers.map (\t -> Accessors.TermAccessorWrappedTerm) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.accessors.TermAccessor"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))
src/gen-main/haskell/Hydra/Decode/Ast.hs view
@@ -6,6 +6,7 @@  import qualified Hydra.Ast as Ast import qualified Hydra.Core as Core+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Helpers as Helpers import qualified Hydra.Graph as Graph import qualified Hydra.Lexical as Lexical@@ -13,7 +14,6 @@ import qualified Hydra.Lib.Maps as Maps import qualified Hydra.Lib.Maybes as Maybes import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Util as Util import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -21,189 +21,209 @@ import qualified Data.Map as M import qualified Data.Set as S -associativity :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Ast.Associativity)-associativity cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "none", (\input -> Eithers.map (\t -> Ast.AssociativityNone) (Helpers.decodeUnit cx input))),-                (Core.Name "left", (\input -> Eithers.map (\t -> Ast.AssociativityLeft) (Helpers.decodeUnit cx input))),-                (Core.Name "right", (\input -> Eithers.map (\t -> Ast.AssociativityRight) (Helpers.decodeUnit cx input))),-                (Core.Name "both", (\input -> Eithers.map (\t -> Ast.AssociativityBoth) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.ast.Associativity"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+associativity :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Associativity+associativity cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "none", (\input -> Eithers.map (\t -> Ast.AssociativityNone) (Helpers.decodeUnit cx input))),+                      (Core.Name "left", (\input -> Eithers.map (\t -> Ast.AssociativityLeft) (Helpers.decodeUnit cx input))),+                      (Core.Name "right", (\input -> Eithers.map (\t -> Ast.AssociativityRight) (Helpers.decodeUnit cx input))),+                      (Core.Name "both", (\input -> Eithers.map (\t -> Ast.AssociativityBoth) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -blockStyle :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Ast.BlockStyle)-blockStyle cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "indent" (Helpers.decodeMaybe (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_indent -> Eithers.bind (Helpers.requireField "newlineBeforeContent" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralBoolean v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected boolean literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_newlineBeforeContent -> Eithers.bind (Helpers.requireField "newlineAfterContent" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralBoolean v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected boolean literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_newlineAfterContent -> Right (Ast.BlockStyle {-      Ast.blockStyleIndent = field_indent,-      Ast.blockStyleNewlineBeforeContent = field_newlineBeforeContent,-      Ast.blockStyleNewlineAfterContent = field_newlineAfterContent})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.ast.BlockStyle"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+blockStyle :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.BlockStyle+blockStyle cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "indent" (Helpers.decodeMaybe (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_indent -> Eithers.bind (Helpers.requireField "newlineBeforeContent" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralBoolean v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected boolean literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_newlineBeforeContent -> Eithers.bind (Helpers.requireField "newlineAfterContent" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralBoolean v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected boolean literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_newlineAfterContent -> Right (Ast.BlockStyle {+          Ast.blockStyleIndent = field_indent,+          Ast.blockStyleNewlineBeforeContent = field_newlineBeforeContent,+          Ast.blockStyleNewlineAfterContent = field_newlineAfterContent})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -bracketExpr :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Ast.BracketExpr)-bracketExpr cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "brackets" brackets fieldMap cx) (\field_brackets -> Eithers.bind (Helpers.requireField "enclosed" expr fieldMap cx) (\field_enclosed -> Eithers.bind (Helpers.requireField "style" blockStyle fieldMap cx) (\field_style -> Right (Ast.BracketExpr {-      Ast.bracketExprBrackets = field_brackets,-      Ast.bracketExprEnclosed = field_enclosed,-      Ast.bracketExprStyle = field_style})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.ast.BracketExpr"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+bracketExpr :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.BracketExpr+bracketExpr cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "brackets" brackets fieldMap cx) (\field_brackets -> Eithers.bind (Helpers.requireField "enclosed" expr fieldMap cx) (\field_enclosed -> Eithers.bind (Helpers.requireField "style" blockStyle fieldMap cx) (\field_style -> Right (Ast.BracketExpr {+          Ast.bracketExprBrackets = field_brackets,+          Ast.bracketExprEnclosed = field_enclosed,+          Ast.bracketExprStyle = field_style})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -brackets :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Ast.Brackets)-brackets cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "open" symbol fieldMap cx) (\field_open -> Eithers.bind (Helpers.requireField "close" symbol fieldMap cx) (\field_close -> Right (Ast.Brackets {-      Ast.bracketsOpen = field_open,-      Ast.bracketsClose = field_close}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.ast.Brackets"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+brackets :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Brackets+brackets cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "open" symbol fieldMap cx) (\field_open -> Eithers.bind (Helpers.requireField "close" symbol fieldMap cx) (\field_close -> Right (Ast.Brackets {+          Ast.bracketsOpen = field_open,+          Ast.bracketsClose = field_close}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -expr :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Ast.Expr)-expr cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "const", (\input -> Eithers.map (\t -> Ast.ExprConst t) (symbol cx input))),-                (Core.Name "indent", (\input -> Eithers.map (\t -> Ast.ExprIndent t) (indentedExpression cx input))),-                (Core.Name "op", (\input -> Eithers.map (\t -> Ast.ExprOp t) (opExpr cx input))),-                (Core.Name "brackets", (\input -> Eithers.map (\t -> Ast.ExprBrackets t) (bracketExpr cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.ast.Expr"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+expr :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Expr+expr cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "const", (\input -> Eithers.map (\t -> Ast.ExprConst t) (symbol cx input))),+                      (Core.Name "indent", (\input -> Eithers.map (\t -> Ast.ExprIndent t) (indentedExpression cx input))),+                      (Core.Name "op", (\input -> Eithers.map (\t -> Ast.ExprOp t) (opExpr cx input))),+                      (Core.Name "brackets", (\input -> Eithers.map (\t -> Ast.ExprBrackets t) (bracketExpr cx input))),+                      (Core.Name "seq", (\input -> Eithers.map (\t -> Ast.ExprSeq t) (seqExpr cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -indentedExpression :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Ast.IndentedExpression)-indentedExpression cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "style" indentStyle fieldMap cx) (\field_style -> Eithers.bind (Helpers.requireField "expr" expr fieldMap cx) (\field_expr -> Right (Ast.IndentedExpression {-      Ast.indentedExpressionStyle = field_style,-      Ast.indentedExpressionExpr = field_expr}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.ast.IndentedExpression"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+indentStyle :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.IndentStyle+indentStyle cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "allLines", (\input -> Eithers.map (\t -> Ast.IndentStyleAllLines t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralString v2 -> Right v2+                          _ -> Left (Errors.DecodingError "expected string literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "subsequentLines", (\input -> Eithers.map (\t -> Ast.IndentStyleSubsequentLines t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralString v2 -> Right v2+                          _ -> Left (Errors.DecodingError "expected string literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input))))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -indentStyle :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Ast.IndentStyle)-indentStyle cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "allLines", (\input -> Eithers.map (\t -> Ast.IndentStyleAllLines t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralString v3 -> (Right v3)-                    _ -> (Left (Util.DecodingError "expected string literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "subsequentLines", (\input -> Eithers.map (\t -> Ast.IndentStyleSubsequentLines t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralString v3 -> (Right v3)-                    _ -> (Left (Util.DecodingError "expected string literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input))))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.ast.IndentStyle"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+indentedExpression :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.IndentedExpression+indentedExpression cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "style" indentStyle fieldMap cx) (\field_style -> Eithers.bind (Helpers.requireField "expr" expr fieldMap cx) (\field_expr -> Right (Ast.IndentedExpression {+          Ast.indentedExpressionStyle = field_style,+          Ast.indentedExpressionExpr = field_expr}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -op :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Ast.Op)-op cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "symbol" symbol fieldMap cx) (\field_symbol -> Eithers.bind (Helpers.requireField "padding" padding fieldMap cx) (\field_padding -> Eithers.bind (Helpers.requireField "precedence" precedence fieldMap cx) (\field_precedence -> Eithers.bind (Helpers.requireField "associativity" associativity fieldMap cx) (\field_associativity -> Right (Ast.Op {-      Ast.opSymbol = field_symbol,-      Ast.opPadding = field_padding,-      Ast.opPrecedence = field_precedence,-      Ast.opAssociativity = field_associativity}))))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.ast.Op"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+op :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Op+op cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "symbol" symbol fieldMap cx) (\field_symbol -> Eithers.bind (Helpers.requireField "padding" padding fieldMap cx) (\field_padding -> Eithers.bind (Helpers.requireField "precedence" precedence fieldMap cx) (\field_precedence -> Eithers.bind (Helpers.requireField "associativity" associativity fieldMap cx) (\field_associativity -> Right (Ast.Op {+          Ast.opSymbol = field_symbol,+          Ast.opPadding = field_padding,+          Ast.opPrecedence = field_precedence,+          Ast.opAssociativity = field_associativity}))))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -opExpr :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Ast.OpExpr)-opExpr cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "op" op fieldMap cx) (\field_op -> Eithers.bind (Helpers.requireField "lhs" expr fieldMap cx) (\field_lhs -> Eithers.bind (Helpers.requireField "rhs" expr fieldMap cx) (\field_rhs -> Right (Ast.OpExpr {-      Ast.opExprOp = field_op,-      Ast.opExprLhs = field_lhs,-      Ast.opExprRhs = field_rhs})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.ast.OpExpr"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+opExpr :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.OpExpr+opExpr cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "op" op fieldMap cx) (\field_op -> Eithers.bind (Helpers.requireField "lhs" expr fieldMap cx) (\field_lhs -> Eithers.bind (Helpers.requireField "rhs" expr fieldMap cx) (\field_rhs -> Right (Ast.OpExpr {+          Ast.opExprOp = field_op,+          Ast.opExprLhs = field_lhs,+          Ast.opExprRhs = field_rhs})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -padding :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Ast.Padding)-padding cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "left" ws fieldMap cx) (\field_left -> Eithers.bind (Helpers.requireField "right" ws fieldMap cx) (\field_right -> Right (Ast.Padding {-      Ast.paddingLeft = field_left,-      Ast.paddingRight = field_right}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.ast.Padding"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+padding :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Padding+padding cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "left" ws fieldMap cx) (\field_left -> Eithers.bind (Helpers.requireField "right" ws fieldMap cx) (\field_right -> Right (Ast.Padding {+          Ast.paddingLeft = field_left,+          Ast.paddingRight = field_right}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -precedence :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Ast.Precedence)-precedence cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Ast.Precedence b) ((\raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralInteger v3 -> ((\x -> case x of-        Core.IntegerValueInt32 v4 -> (Right v4)-        _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-      _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.ast.Precedence"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+precedence :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Precedence+precedence cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Ast.Precedence b) ((\raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+        Core.TermLiteral v1 -> case v1 of+          Core.LiteralInteger v2 -> case v2 of+            Core.IntegerValueInt32 v3 -> Right v3+            _ -> Left (Errors.DecodingError "expected int32 value")+          _ -> Left (Errors.DecodingError "expected int32 literal")+        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw) -symbol :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Ast.Symbol)-symbol cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Ast.Symbol b) ((\raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.ast.Symbol"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+seqExpr :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.SeqExpr+seqExpr cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "op" op fieldMap cx) (\field_op -> Eithers.bind (Helpers.requireField "elements" (Helpers.decodeList expr) fieldMap cx) (\field_elements -> Right (Ast.SeqExpr {+          Ast.seqExprOp = field_op,+          Ast.seqExprElements = field_elements}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -ws :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Ast.Ws)-ws cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "none", (\input -> Eithers.map (\t -> Ast.WsNone) (Helpers.decodeUnit cx input))),-                (Core.Name "space", (\input -> Eithers.map (\t -> Ast.WsSpace) (Helpers.decodeUnit cx input))),-                (Core.Name "break", (\input -> Eithers.map (\t -> Ast.WsBreak) (Helpers.decodeUnit cx input))),-                (Core.Name "breakAndIndent", (\input -> Eithers.map (\t -> Ast.WsBreakAndIndent t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralString v3 -> (Right v3)-                    _ -> (Left (Util.DecodingError "expected string literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "doubleBreak", (\input -> Eithers.map (\t -> Ast.WsDoubleBreak) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.ast.Ws"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+symbol :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Symbol+symbol cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Ast.Symbol b) ((\raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+        Core.TermLiteral v1 -> case v1 of+          Core.LiteralString v2 -> Right v2+          _ -> Left (Errors.DecodingError "expected string literal")+        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw)++ws :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Ast.Ws+ws cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "none", (\input -> Eithers.map (\t -> Ast.WsNone) (Helpers.decodeUnit cx input))),+                      (Core.Name "space", (\input -> Eithers.map (\t -> Ast.WsSpace) (Helpers.decodeUnit cx input))),+                      (Core.Name "break", (\input -> Eithers.map (\t -> Ast.WsBreak) (Helpers.decodeUnit cx input))),+                      (Core.Name "breakAndIndent", (\input -> Eithers.map (\t -> Ast.WsBreakAndIndent t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralString v2 -> Right v2+                          _ -> Left (Errors.DecodingError "expected string literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "doubleBreak", (\input -> Eithers.map (\t -> Ast.WsDoubleBreak) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)
src/gen-main/haskell/Hydra/Decode/Classes.hs view
@@ -6,6 +6,7 @@  import qualified Hydra.Classes as Classes import qualified Hydra.Core as Core+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Helpers as Helpers import qualified Hydra.Graph as Graph import qualified Hydra.Lexical as Lexical@@ -13,7 +14,6 @@ import qualified Hydra.Lib.Maps as Maps import qualified Hydra.Lib.Maybes as Maybes import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Util as Util import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -21,19 +21,19 @@ import qualified Data.Map as M import qualified Data.Set as S -typeClass :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Classes.TypeClass)-typeClass cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "equality", (\input -> Eithers.map (\t -> Classes.TypeClassEquality) (Helpers.decodeUnit cx input))),-                (Core.Name "ordering", (\input -> Eithers.map (\t -> Classes.TypeClassOrdering) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.classes.TypeClass"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+typeClass :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Classes.TypeClass+typeClass cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "equality", (\input -> Eithers.map (\t -> Classes.TypeClassEquality) (Helpers.decodeUnit cx input))),+                      (Core.Name "ordering", (\input -> Eithers.map (\t -> Classes.TypeClassOrdering) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)
src/gen-main/haskell/Hydra/Decode/Coders.hs view
@@ -6,6 +6,7 @@  import qualified Hydra.Coders as Coders import qualified Hydra.Core as Core+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Helpers as Helpers import qualified Hydra.Graph as Graph import qualified Hydra.Lexical as Lexical@@ -13,7 +14,6 @@ import qualified Hydra.Lib.Maps as Maps import qualified Hydra.Lib.Maybes as Maybes import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Util as Util import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -21,45 +21,46 @@ import qualified Data.Map as M import qualified Data.Set as S -coderDirection :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Coders.CoderDirection)-coderDirection cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "encode", (\input -> Eithers.map (\t -> Coders.CoderDirectionEncode) (Helpers.decodeUnit cx input))),-                (Core.Name "decode", (\input -> Eithers.map (\t -> Coders.CoderDirectionDecode) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.coders.CoderDirection"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+coderDirection :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Coders.CoderDirection+coderDirection cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "encode", (\input -> Eithers.map (\t -> Coders.CoderDirectionEncode) (Helpers.decodeUnit cx input))),+                      (Core.Name "decode", (\input -> Eithers.map (\t -> Coders.CoderDirectionDecode) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -languageName :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Coders.LanguageName)-languageName cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Coders.LanguageName b) ((\raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.coders.LanguageName"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+languageName :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Coders.LanguageName+languageName cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Coders.LanguageName b) ((\raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+        Core.TermLiteral v1 -> case v1 of+          Core.LiteralString v2 -> Right v2+          _ -> Left (Errors.DecodingError "expected string literal")+        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw) -traversalOrder :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Coders.TraversalOrder)-traversalOrder cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "pre", (\input -> Eithers.map (\t -> Coders.TraversalOrderPre) (Helpers.decodeUnit cx input))),-                (Core.Name "post", (\input -> Eithers.map (\t -> Coders.TraversalOrderPost) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.coders.TraversalOrder"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+traversalOrder :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Coders.TraversalOrder+traversalOrder cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "pre", (\input -> Eithers.map (\t -> Coders.TraversalOrderPre) (Helpers.decodeUnit cx input))),+                      (Core.Name "post", (\input -> Eithers.map (\t -> Coders.TraversalOrderPost) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)
− src/gen-main/haskell/Hydra/Decode/Compute.hs
@@ -1,48 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Term decoders for hydra.compute--module Hydra.Decode.Compute where--import qualified Hydra.Compute as Compute-import qualified Hydra.Core as Core-import qualified Hydra.Decode.Core as Core_-import qualified Hydra.Extract.Helpers as Helpers-import qualified Hydra.Graph as Graph-import qualified Hydra.Lexical as Lexical-import qualified Hydra.Lib.Eithers as Eithers-import qualified Hydra.Util as Util-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S--flowState :: ((Graph.Graph -> Core.Term -> Either Util.DecodingError t0) -> (Graph.Graph -> Core.Term -> Either Util.DecodingError t1) -> Graph.Graph -> Core.Term -> Either Util.DecodingError (Compute.FlowState t0 t1))-flowState s v cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "value" (Helpers.decodeMaybe v) fieldMap cx) (\field_value -> Eithers.bind (Helpers.requireField "state" s fieldMap cx) (\field_state -> Eithers.bind (Helpers.requireField "trace" trace fieldMap cx) (\field_trace -> Right (Compute.FlowState {-      Compute.flowStateValue = field_value,-      Compute.flowStateState = field_state,-      Compute.flowStateTrace = field_trace})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.compute.FlowState"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--trace :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Compute.Trace)-trace cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "stack" (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_stack -> Eithers.bind (Helpers.requireField "messages" (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_messages -> Eithers.bind (Helpers.requireField "other" (Helpers.decodeMap Core_.name Core_.term) fieldMap cx) (\field_other -> Right (Compute.Trace {-      Compute.traceStack = field_stack,-      Compute.traceMessages = field_messages,-      Compute.traceOther = field_other})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.compute.Trace"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))
− src/gen-main/haskell/Hydra/Decode/Constraints.hs
@@ -1,38 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Term decoders for hydra.constraints--module Hydra.Decode.Constraints where--import qualified Hydra.Constraints as Constraints-import qualified Hydra.Core as Core-import qualified Hydra.Decode.Query as Query-import qualified Hydra.Extract.Helpers as Helpers-import qualified Hydra.Graph as Graph-import qualified Hydra.Lexical as Lexical-import qualified Hydra.Lib.Eithers as Eithers-import qualified Hydra.Util as Util-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S--pathEquation :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Constraints.PathEquation)-pathEquation cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "left" Query.path fieldMap cx) (\field_left -> Eithers.bind (Helpers.requireField "right" Query.path fieldMap cx) (\field_right -> Right (Constraints.PathEquation {-      Constraints.pathEquationLeft = field_left,-      Constraints.pathEquationRight = field_right}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.constraints.PathEquation"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--patternImplication :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Constraints.PatternImplication)-patternImplication cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "antecedent" Query.pattern fieldMap cx) (\field_antecedent -> Eithers.bind (Helpers.requireField "consequent" Query.pattern fieldMap cx) (\field_consequent -> Right (Constraints.PatternImplication {-      Constraints.patternImplicationAntecedent = field_antecedent,-      Constraints.patternImplicationConsequent = field_consequent}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.constraints.PatternImplication"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))
+ src/gen-main/haskell/Hydra/Decode/Context.hs view
@@ -0,0 +1,49 @@+-- Note: this is an automatically generated file. Do not edit.++-- | Term decoders for hydra.context++module Hydra.Decode.Context where++import qualified Hydra.Context as Context+import qualified Hydra.Core as Core+import qualified Hydra.Decode.Core as Core_+import qualified Hydra.Errors as Errors+import qualified Hydra.Extract.Helpers as Helpers+import qualified Hydra.Graph as Graph+import qualified Hydra.Lexical as Lexical+import qualified Hydra.Lib.Eithers as Eithers+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++context :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Context.Context+context cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "trace" (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_trace -> Eithers.bind (Helpers.requireField "messages" (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_messages -> Eithers.bind (Helpers.requireField "other" (Helpers.decodeMap Core_.name Core_.term) fieldMap cx) (\field_other -> Right (Context.Context {+          Context.contextTrace = field_trace,+          Context.contextMessages = field_messages,+          Context.contextOther = field_other})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++inContext :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Context.InContext t0)+inContext e cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "object" e fieldMap cx) (\field_object -> Eithers.bind (Helpers.requireField "context" context fieldMap cx) (\field_context -> Right (Context.InContext {+          Context.inContextObject = field_object,+          Context.inContextContext = field_context}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)
src/gen-main/haskell/Hydra/Decode/Core.hs view
@@ -5,562 +5,569 @@ module Hydra.Decode.Core where  import qualified Hydra.Core as Core-import qualified Hydra.Extract.Helpers as Helpers-import qualified Hydra.Graph as Graph-import qualified Hydra.Lexical as Lexical-import qualified Hydra.Lib.Eithers as Eithers-import qualified Hydra.Lib.Maps as Maps-import qualified Hydra.Lib.Maybes as Maybes-import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Util as Util-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S--annotatedTerm :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.AnnotatedTerm)-annotatedTerm cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "body" term fieldMap cx) (\field_body -> Eithers.bind (Helpers.requireField "annotation" (Helpers.decodeMap name term) fieldMap cx) (\field_annotation -> Right (Core.AnnotatedTerm {-      Core.annotatedTermBody = field_body,-      Core.annotatedTermAnnotation = field_annotation}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.AnnotatedTerm"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--annotatedType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.AnnotatedType)-annotatedType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "body" type_ fieldMap cx) (\field_body -> Eithers.bind (Helpers.requireField "annotation" (Helpers.decodeMap name term) fieldMap cx) (\field_annotation -> Right (Core.AnnotatedType {-      Core.annotatedTypeBody = field_body,-      Core.annotatedTypeAnnotation = field_annotation}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.AnnotatedType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--application :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.Application)-application cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "function" term fieldMap cx) (\field_function -> Eithers.bind (Helpers.requireField "argument" term fieldMap cx) (\field_argument -> Right (Core.Application {-      Core.applicationFunction = field_function,-      Core.applicationArgument = field_argument}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.Application"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--applicationType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.ApplicationType)-applicationType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "function" type_ fieldMap cx) (\field_function -> Eithers.bind (Helpers.requireField "argument" type_ fieldMap cx) (\field_argument -> Right (Core.ApplicationType {-      Core.applicationTypeFunction = field_function,-      Core.applicationTypeArgument = field_argument}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.ApplicationType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--binding :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.Binding)-binding cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "name" name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "term" term fieldMap cx) (\field_term -> Eithers.bind (Helpers.requireField "type" (Helpers.decodeMaybe typeScheme) fieldMap cx) (\field_type -> Right (Core.Binding {-      Core.bindingName = field_name,-      Core.bindingTerm = field_term,-      Core.bindingType = field_type})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.Binding"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--caseStatement :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.CaseStatement)-caseStatement cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (Helpers.requireField "default" (Helpers.decodeMaybe term) fieldMap cx) (\field_default -> Eithers.bind (Helpers.requireField "cases" (Helpers.decodeList field) fieldMap cx) (\field_cases -> Right (Core.CaseStatement {-      Core.caseStatementTypeName = field_typeName,-      Core.caseStatementDefault = field_default,-      Core.caseStatementCases = field_cases})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.CaseStatement"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--eitherType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.EitherType)-eitherType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "left" type_ fieldMap cx) (\field_left -> Eithers.bind (Helpers.requireField "right" type_ fieldMap cx) (\field_right -> Right (Core.EitherType {-      Core.eitherTypeLeft = field_left,-      Core.eitherTypeRight = field_right}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.EitherType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--pairType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.PairType)-pairType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "first" type_ fieldMap cx) (\field_first -> Eithers.bind (Helpers.requireField "second" type_ fieldMap cx) (\field_second -> Right (Core.PairType {-      Core.pairTypeFirst = field_first,-      Core.pairTypeSecond = field_second}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.PairType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--elimination :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.Elimination)-elimination cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "record", (\input -> Eithers.map (\t -> Core.EliminationRecord t) (projection cx input))),-                (Core.Name "union", (\input -> Eithers.map (\t -> Core.EliminationUnion t) (caseStatement cx input))),-                (Core.Name "wrap", (\input -> Eithers.map (\t -> Core.EliminationWrap t) (name cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.core.Elimination"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--field :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.Field)-field cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "name" name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "term" term fieldMap cx) (\field_term -> Right (Core.Field {-      Core.fieldName = field_name,-      Core.fieldTerm = field_term}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.Field"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--fieldType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.FieldType)-fieldType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "name" name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "type" type_ fieldMap cx) (\field_type -> Right (Core.FieldType {-      Core.fieldTypeName = field_name,-      Core.fieldTypeType = field_type}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.FieldType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--floatType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.FloatType)-floatType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "bigfloat", (\input -> Eithers.map (\t -> Core.FloatTypeBigfloat) (Helpers.decodeUnit cx input))),-                (Core.Name "float32", (\input -> Eithers.map (\t -> Core.FloatTypeFloat32) (Helpers.decodeUnit cx input))),-                (Core.Name "float64", (\input -> Eithers.map (\t -> Core.FloatTypeFloat64) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.core.FloatType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--floatValue :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.FloatValue)-floatValue cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "bigfloat", (\input -> Eithers.map (\t -> Core.FloatValueBigfloat t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralFloat v3 -> ((\x -> case x of-                      Core.FloatValueBigfloat v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected bigfloat value"))) v3)-                    _ -> (Left (Util.DecodingError "expected bigfloat literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "float32", (\input -> Eithers.map (\t -> Core.FloatValueFloat32 t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralFloat v3 -> ((\x -> case x of-                      Core.FloatValueFloat32 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected float32 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected float32 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "float64", (\input -> Eithers.map (\t -> Core.FloatValueFloat64 t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralFloat v3 -> ((\x -> case x of-                      Core.FloatValueFloat64 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected float64 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected float64 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input))))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.core.FloatValue"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--forallType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.ForallType)-forallType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "parameter" name fieldMap cx) (\field_parameter -> Eithers.bind (Helpers.requireField "body" type_ fieldMap cx) (\field_body -> Right (Core.ForallType {-      Core.forallTypeParameter = field_parameter,-      Core.forallTypeBody = field_body}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.ForallType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--function :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.Function)-function cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "elimination", (\input -> Eithers.map (\t -> Core.FunctionElimination t) (elimination cx input))),-                (Core.Name "lambda", (\input -> Eithers.map (\t -> Core.FunctionLambda t) (lambda cx input))),-                (Core.Name "primitive", (\input -> Eithers.map (\t -> Core.FunctionPrimitive t) (name cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.core.Function"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--functionType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.FunctionType)-functionType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "domain" type_ fieldMap cx) (\field_domain -> Eithers.bind (Helpers.requireField "codomain" type_ fieldMap cx) (\field_codomain -> Right (Core.FunctionType {-      Core.functionTypeDomain = field_domain,-      Core.functionTypeCodomain = field_codomain}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.FunctionType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--injection :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.Injection)-injection cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (Helpers.requireField "field" field fieldMap cx) (\field_field -> Right (Core.Injection {-      Core.injectionTypeName = field_typeName,-      Core.injectionField = field_field}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.Injection"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--integerType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.IntegerType)-integerType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "bigint", (\input -> Eithers.map (\t -> Core.IntegerTypeBigint) (Helpers.decodeUnit cx input))),-                (Core.Name "int8", (\input -> Eithers.map (\t -> Core.IntegerTypeInt8) (Helpers.decodeUnit cx input))),-                (Core.Name "int16", (\input -> Eithers.map (\t -> Core.IntegerTypeInt16) (Helpers.decodeUnit cx input))),-                (Core.Name "int32", (\input -> Eithers.map (\t -> Core.IntegerTypeInt32) (Helpers.decodeUnit cx input))),-                (Core.Name "int64", (\input -> Eithers.map (\t -> Core.IntegerTypeInt64) (Helpers.decodeUnit cx input))),-                (Core.Name "uint8", (\input -> Eithers.map (\t -> Core.IntegerTypeUint8) (Helpers.decodeUnit cx input))),-                (Core.Name "uint16", (\input -> Eithers.map (\t -> Core.IntegerTypeUint16) (Helpers.decodeUnit cx input))),-                (Core.Name "uint32", (\input -> Eithers.map (\t -> Core.IntegerTypeUint32) (Helpers.decodeUnit cx input))),-                (Core.Name "uint64", (\input -> Eithers.map (\t -> Core.IntegerTypeUint64) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.core.IntegerType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--integerValue :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.IntegerValue)-integerValue cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "bigint", (\input -> Eithers.map (\t -> Core.IntegerValueBigint t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueBigint v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected bigint value"))) v3)-                    _ -> (Left (Util.DecodingError "expected bigint literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "int8", (\input -> Eithers.map (\t -> Core.IntegerValueInt8 t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueInt8 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected int8 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected int8 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "int16", (\input -> Eithers.map (\t -> Core.IntegerValueInt16 t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueInt16 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected int16 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected int16 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "int32", (\input -> Eithers.map (\t -> Core.IntegerValueInt32 t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueInt32 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "int64", (\input -> Eithers.map (\t -> Core.IntegerValueInt64 t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueInt64 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected int64 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected int64 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "uint8", (\input -> Eithers.map (\t -> Core.IntegerValueUint8 t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueUint8 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected uint8 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected uint8 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "uint16", (\input -> Eithers.map (\t -> Core.IntegerValueUint16 t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueUint16 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected uint16 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected uint16 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "uint32", (\input -> Eithers.map (\t -> Core.IntegerValueUint32 t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueUint32 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected uint32 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected uint32 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "uint64", (\input -> Eithers.map (\t -> Core.IntegerValueUint64 t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueUint64 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected uint64 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected uint64 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input))))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.core.IntegerValue"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--lambda :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.Lambda)-lambda cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "parameter" name fieldMap cx) (\field_parameter -> Eithers.bind (Helpers.requireField "domain" (Helpers.decodeMaybe type_) fieldMap cx) (\field_domain -> Eithers.bind (Helpers.requireField "body" term fieldMap cx) (\field_body -> Right (Core.Lambda {-      Core.lambdaParameter = field_parameter,-      Core.lambdaDomain = field_domain,-      Core.lambdaBody = field_body})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.Lambda"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--let_ :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.Let)-let_ cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "bindings" (Helpers.decodeList binding) fieldMap cx) (\field_bindings -> Eithers.bind (Helpers.requireField "body" term fieldMap cx) (\field_body -> Right (Core.Let {-      Core.letBindings = field_bindings,-      Core.letBody = field_body}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.Let"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--literal :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.Literal)-literal cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "binary", (\input -> Eithers.map (\t -> Core.LiteralBinary t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralBinary v3 -> (Right v3)-                    _ -> (Left (Util.DecodingError "expected binary literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "boolean", (\input -> Eithers.map (\t -> Core.LiteralBoolean t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralBoolean v3 -> (Right v3)-                    _ -> (Left (Util.DecodingError "expected boolean literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "float", (\input -> Eithers.map (\t -> Core.LiteralFloat t) (floatValue cx input))),-                (Core.Name "integer", (\input -> Eithers.map (\t -> Core.LiteralInteger t) (integerValue cx input))),-                (Core.Name "string", (\input -> Eithers.map (\t -> Core.LiteralString t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralString v3 -> (Right v3)-                    _ -> (Left (Util.DecodingError "expected string literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input))))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.core.Literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--literalType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.LiteralType)-literalType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "binary", (\input -> Eithers.map (\t -> Core.LiteralTypeBinary) (Helpers.decodeUnit cx input))),-                (Core.Name "boolean", (\input -> Eithers.map (\t -> Core.LiteralTypeBoolean) (Helpers.decodeUnit cx input))),-                (Core.Name "float", (\input -> Eithers.map (\t -> Core.LiteralTypeFloat t) (floatType cx input))),-                (Core.Name "integer", (\input -> Eithers.map (\t -> Core.LiteralTypeInteger t) (integerType cx input))),-                (Core.Name "string", (\input -> Eithers.map (\t -> Core.LiteralTypeString) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.core.LiteralType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--mapType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.MapType)-mapType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "keys" type_ fieldMap cx) (\field_keys -> Eithers.bind (Helpers.requireField "values" type_ fieldMap cx) (\field_values -> Right (Core.MapType {-      Core.mapTypeKeys = field_keys,-      Core.mapTypeValues = field_values}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.MapType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--name :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.Name)-name cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Core.Name b) ((\raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.core.Name"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--projection :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.Projection)-projection cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (Helpers.requireField "field" name fieldMap cx) (\field_field -> Right (Core.Projection {-      Core.projectionTypeName = field_typeName,-      Core.projectionField = field_field}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.Projection"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--record :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.Record)-record cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (Helpers.requireField "fields" (Helpers.decodeList field) fieldMap cx) (\field_fields -> Right (Core.Record {-      Core.recordTypeName = field_typeName,-      Core.recordFields = field_fields}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.Record"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--rowType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.RowType)-rowType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (Helpers.requireField "fields" (Helpers.decodeList fieldType) fieldMap cx) (\field_fields -> Right (Core.RowType {-      Core.rowTypeTypeName = field_typeName,-      Core.rowTypeFields = field_fields}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.RowType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--term :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.Term)-term cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "annotated", (\input -> Eithers.map (\t -> Core.TermAnnotated t) (annotatedTerm cx input))),-                (Core.Name "application", (\input -> Eithers.map (\t -> Core.TermApplication t) (application cx input))),-                (Core.Name "either", (\input -> Eithers.map (\t -> Core.TermEither t) (Helpers.decodeEither term term cx input))),-                (Core.Name "function", (\input -> Eithers.map (\t -> Core.TermFunction t) (function cx input))),-                (Core.Name "let", (\input -> Eithers.map (\t -> Core.TermLet t) (let_ cx input))),-                (Core.Name "list", (\input -> Eithers.map (\t -> Core.TermList t) (Helpers.decodeList term cx input))),-                (Core.Name "literal", (\input -> Eithers.map (\t -> Core.TermLiteral t) (literal cx input))),-                (Core.Name "map", (\input -> Eithers.map (\t -> Core.TermMap t) (Helpers.decodeMap term term cx input))),-                (Core.Name "maybe", (\input -> Eithers.map (\t -> Core.TermMaybe t) (Helpers.decodeMaybe term cx input))),-                (Core.Name "pair", (\input -> Eithers.map (\t -> Core.TermPair t) (Helpers.decodePair term term cx input))),-                (Core.Name "record", (\input -> Eithers.map (\t -> Core.TermRecord t) (record cx input))),-                (Core.Name "set", (\input -> Eithers.map (\t -> Core.TermSet t) (Helpers.decodeSet term cx input))),-                (Core.Name "typeApplication", (\input -> Eithers.map (\t -> Core.TermTypeApplication t) (typeApplicationTerm cx input))),-                (Core.Name "typeLambda", (\input -> Eithers.map (\t -> Core.TermTypeLambda t) (typeLambda cx input))),-                (Core.Name "union", (\input -> Eithers.map (\t -> Core.TermUnion t) (injection cx input))),-                (Core.Name "unit", (\input -> Eithers.map (\t -> Core.TermUnit) (Helpers.decodeUnit cx input))),-                (Core.Name "variable", (\input -> Eithers.map (\t -> Core.TermVariable t) (name cx input))),-                (Core.Name "wrap", (\input -> Eithers.map (\t -> Core.TermWrap t) (wrappedTerm cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.core.Term"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--type_ :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.Type)-type_ cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "annotated", (\input -> Eithers.map (\t -> Core.TypeAnnotated t) (annotatedType cx input))),-                (Core.Name "application", (\input -> Eithers.map (\t -> Core.TypeApplication t) (applicationType cx input))),-                (Core.Name "either", (\input -> Eithers.map (\t -> Core.TypeEither t) (eitherType cx input))),-                (Core.Name "forall", (\input -> Eithers.map (\t -> Core.TypeForall t) (forallType cx input))),-                (Core.Name "function", (\input -> Eithers.map (\t -> Core.TypeFunction t) (functionType cx input))),-                (Core.Name "list", (\input -> Eithers.map (\t -> Core.TypeList t) (type_ cx input))),-                (Core.Name "literal", (\input -> Eithers.map (\t -> Core.TypeLiteral t) (literalType cx input))),-                (Core.Name "map", (\input -> Eithers.map (\t -> Core.TypeMap t) (mapType cx input))),-                (Core.Name "maybe", (\input -> Eithers.map (\t -> Core.TypeMaybe t) (type_ cx input))),-                (Core.Name "pair", (\input -> Eithers.map (\t -> Core.TypePair t) (pairType cx input))),-                (Core.Name "record", (\input -> Eithers.map (\t -> Core.TypeRecord t) (rowType cx input))),-                (Core.Name "set", (\input -> Eithers.map (\t -> Core.TypeSet t) (type_ cx input))),-                (Core.Name "union", (\input -> Eithers.map (\t -> Core.TypeUnion t) (rowType cx input))),-                (Core.Name "unit", (\input -> Eithers.map (\t -> Core.TypeUnit) (Helpers.decodeUnit cx input))),-                (Core.Name "variable", (\input -> Eithers.map (\t -> Core.TypeVariable t) (name cx input))),-                (Core.Name "wrap", (\input -> Eithers.map (\t -> Core.TypeWrap t) (wrappedType cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.core.Type"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--typeApplicationTerm :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.TypeApplicationTerm)-typeApplicationTerm cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "body" term fieldMap cx) (\field_body -> Eithers.bind (Helpers.requireField "type" type_ fieldMap cx) (\field_type -> Right (Core.TypeApplicationTerm {-      Core.typeApplicationTermBody = field_body,-      Core.typeApplicationTermType = field_type}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.TypeApplicationTerm"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--typeLambda :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.TypeLambda)-typeLambda cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "parameter" name fieldMap cx) (\field_parameter -> Eithers.bind (Helpers.requireField "body" term fieldMap cx) (\field_body -> Right (Core.TypeLambda {-      Core.typeLambdaParameter = field_parameter,-      Core.typeLambdaBody = field_body}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.TypeLambda"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--typeScheme :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.TypeScheme)-typeScheme cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "variables" (Helpers.decodeList name) fieldMap cx) (\field_variables -> Eithers.bind (Helpers.requireField "type" type_ fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "constraints" (Helpers.decodeMaybe (Helpers.decodeMap name typeVariableMetadata)) fieldMap cx) (\field_constraints -> Right (Core.TypeScheme {-      Core.typeSchemeVariables = field_variables,-      Core.typeSchemeType = field_type,-      Core.typeSchemeConstraints = field_constraints})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.TypeScheme"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--typeVariableMetadata :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.TypeVariableMetadata)-typeVariableMetadata cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "classes" (Helpers.decodeSet name) fieldMap cx) (\field_classes -> Right (Core.TypeVariableMetadata {-      Core.typeVariableMetadataClasses = field_classes})))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.TypeVariableMetadata"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--wrappedTerm :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.WrappedTerm)-wrappedTerm cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (Helpers.requireField "body" term fieldMap cx) (\field_body -> Right (Core.WrappedTerm {-      Core.wrappedTermTypeName = field_typeName,-      Core.wrappedTermBody = field_body}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.WrappedTerm"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--wrappedType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Core.WrappedType)-wrappedType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (Helpers.requireField "body" type_ fieldMap cx) (\field_body -> Right (Core.WrappedType {-      Core.wrappedTypeTypeName = field_typeName,-      Core.wrappedTypeBody = field_body}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.core.WrappedType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+import qualified Hydra.Errors as Errors+import qualified Hydra.Extract.Helpers as Helpers+import qualified Hydra.Graph as Graph+import qualified Hydra.Lexical as Lexical+import qualified Hydra.Lib.Eithers as Eithers+import qualified Hydra.Lib.Maps as Maps+import qualified Hydra.Lib.Maybes as Maybes+import qualified Hydra.Lib.Strings as Strings+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++annotatedTerm :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.AnnotatedTerm+annotatedTerm cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "body" term fieldMap cx) (\field_body -> Eithers.bind (Helpers.requireField "annotation" (Helpers.decodeMap name term) fieldMap cx) (\field_annotation -> Right (Core.AnnotatedTerm {+          Core.annotatedTermBody = field_body,+          Core.annotatedTermAnnotation = field_annotation}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++annotatedType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.AnnotatedType+annotatedType cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "body" type_ fieldMap cx) (\field_body -> Eithers.bind (Helpers.requireField "annotation" (Helpers.decodeMap name term) fieldMap cx) (\field_annotation -> Right (Core.AnnotatedType {+          Core.annotatedTypeBody = field_body,+          Core.annotatedTypeAnnotation = field_annotation}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++application :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Application+application cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "function" term fieldMap cx) (\field_function -> Eithers.bind (Helpers.requireField "argument" term fieldMap cx) (\field_argument -> Right (Core.Application {+          Core.applicationFunction = field_function,+          Core.applicationArgument = field_argument}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++applicationType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.ApplicationType+applicationType cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "function" type_ fieldMap cx) (\field_function -> Eithers.bind (Helpers.requireField "argument" type_ fieldMap cx) (\field_argument -> Right (Core.ApplicationType {+          Core.applicationTypeFunction = field_function,+          Core.applicationTypeArgument = field_argument}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++binding :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Binding+binding cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "name" name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "term" term fieldMap cx) (\field_term -> Eithers.bind (Helpers.requireField "type" (Helpers.decodeMaybe typeScheme) fieldMap cx) (\field_type -> Right (Core.Binding {+          Core.bindingName = field_name,+          Core.bindingTerm = field_term,+          Core.bindingType = field_type})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++caseStatement :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.CaseStatement+caseStatement cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (Helpers.requireField "default" (Helpers.decodeMaybe term) fieldMap cx) (\field_default -> Eithers.bind (Helpers.requireField "cases" (Helpers.decodeList field) fieldMap cx) (\field_cases -> Right (Core.CaseStatement {+          Core.caseStatementTypeName = field_typeName,+          Core.caseStatementDefault = field_default,+          Core.caseStatementCases = field_cases})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++eitherType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.EitherType+eitherType cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "left" type_ fieldMap cx) (\field_left -> Eithers.bind (Helpers.requireField "right" type_ fieldMap cx) (\field_right -> Right (Core.EitherType {+          Core.eitherTypeLeft = field_left,+          Core.eitherTypeRight = field_right}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++elimination :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Elimination+elimination cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "record", (\input -> Eithers.map (\t -> Core.EliminationRecord t) (projection cx input))),+                      (Core.Name "union", (\input -> Eithers.map (\t -> Core.EliminationUnion t) (caseStatement cx input))),+                      (Core.Name "wrap", (\input -> Eithers.map (\t -> Core.EliminationWrap t) (name cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++field :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Field+field cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "name" name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "term" term fieldMap cx) (\field_term -> Right (Core.Field {+          Core.fieldName = field_name,+          Core.fieldTerm = field_term}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++fieldType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.FieldType+fieldType cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "name" name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "type" type_ fieldMap cx) (\field_type -> Right (Core.FieldType {+          Core.fieldTypeName = field_name,+          Core.fieldTypeType = field_type}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++floatType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.FloatType+floatType cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "bigfloat", (\input -> Eithers.map (\t -> Core.FloatTypeBigfloat) (Helpers.decodeUnit cx input))),+                      (Core.Name "float32", (\input -> Eithers.map (\t -> Core.FloatTypeFloat32) (Helpers.decodeUnit cx input))),+                      (Core.Name "float64", (\input -> Eithers.map (\t -> Core.FloatTypeFloat64) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++floatValue :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.FloatValue+floatValue cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "bigfloat", (\input -> Eithers.map (\t -> Core.FloatValueBigfloat t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralFloat v2 -> case v2 of+                            Core.FloatValueBigfloat v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected bigfloat value")+                          _ -> Left (Errors.DecodingError "expected bigfloat literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "float32", (\input -> Eithers.map (\t -> Core.FloatValueFloat32 t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralFloat v2 -> case v2 of+                            Core.FloatValueFloat32 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected float32 value")+                          _ -> Left (Errors.DecodingError "expected float32 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "float64", (\input -> Eithers.map (\t -> Core.FloatValueFloat64 t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralFloat v2 -> case v2 of+                            Core.FloatValueFloat64 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected float64 value")+                          _ -> Left (Errors.DecodingError "expected float64 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input))))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++forallType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.ForallType+forallType cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "parameter" name fieldMap cx) (\field_parameter -> Eithers.bind (Helpers.requireField "body" type_ fieldMap cx) (\field_body -> Right (Core.ForallType {+          Core.forallTypeParameter = field_parameter,+          Core.forallTypeBody = field_body}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++function :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Function+function cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "elimination", (\input -> Eithers.map (\t -> Core.FunctionElimination t) (elimination cx input))),+                      (Core.Name "lambda", (\input -> Eithers.map (\t -> Core.FunctionLambda t) (lambda cx input))),+                      (Core.Name "primitive", (\input -> Eithers.map (\t -> Core.FunctionPrimitive t) (name cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++functionType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.FunctionType+functionType cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "domain" type_ fieldMap cx) (\field_domain -> Eithers.bind (Helpers.requireField "codomain" type_ fieldMap cx) (\field_codomain -> Right (Core.FunctionType {+          Core.functionTypeDomain = field_domain,+          Core.functionTypeCodomain = field_codomain}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++injection :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Injection+injection cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (Helpers.requireField "field" field fieldMap cx) (\field_field -> Right (Core.Injection {+          Core.injectionTypeName = field_typeName,+          Core.injectionField = field_field}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++integerType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.IntegerType+integerType cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "bigint", (\input -> Eithers.map (\t -> Core.IntegerTypeBigint) (Helpers.decodeUnit cx input))),+                      (Core.Name "int8", (\input -> Eithers.map (\t -> Core.IntegerTypeInt8) (Helpers.decodeUnit cx input))),+                      (Core.Name "int16", (\input -> Eithers.map (\t -> Core.IntegerTypeInt16) (Helpers.decodeUnit cx input))),+                      (Core.Name "int32", (\input -> Eithers.map (\t -> Core.IntegerTypeInt32) (Helpers.decodeUnit cx input))),+                      (Core.Name "int64", (\input -> Eithers.map (\t -> Core.IntegerTypeInt64) (Helpers.decodeUnit cx input))),+                      (Core.Name "uint8", (\input -> Eithers.map (\t -> Core.IntegerTypeUint8) (Helpers.decodeUnit cx input))),+                      (Core.Name "uint16", (\input -> Eithers.map (\t -> Core.IntegerTypeUint16) (Helpers.decodeUnit cx input))),+                      (Core.Name "uint32", (\input -> Eithers.map (\t -> Core.IntegerTypeUint32) (Helpers.decodeUnit cx input))),+                      (Core.Name "uint64", (\input -> Eithers.map (\t -> Core.IntegerTypeUint64) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++integerValue :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.IntegerValue+integerValue cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "bigint", (\input -> Eithers.map (\t -> Core.IntegerValueBigint t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueBigint v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected bigint value")+                          _ -> Left (Errors.DecodingError "expected bigint literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "int8", (\input -> Eithers.map (\t -> Core.IntegerValueInt8 t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueInt8 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected int8 value")+                          _ -> Left (Errors.DecodingError "expected int8 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "int16", (\input -> Eithers.map (\t -> Core.IntegerValueInt16 t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueInt16 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected int16 value")+                          _ -> Left (Errors.DecodingError "expected int16 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "int32", (\input -> Eithers.map (\t -> Core.IntegerValueInt32 t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueInt32 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected int32 value")+                          _ -> Left (Errors.DecodingError "expected int32 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "int64", (\input -> Eithers.map (\t -> Core.IntegerValueInt64 t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueInt64 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected int64 value")+                          _ -> Left (Errors.DecodingError "expected int64 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "uint8", (\input -> Eithers.map (\t -> Core.IntegerValueUint8 t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueUint8 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected uint8 value")+                          _ -> Left (Errors.DecodingError "expected uint8 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "uint16", (\input -> Eithers.map (\t -> Core.IntegerValueUint16 t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueUint16 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected uint16 value")+                          _ -> Left (Errors.DecodingError "expected uint16 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "uint32", (\input -> Eithers.map (\t -> Core.IntegerValueUint32 t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueUint32 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected uint32 value")+                          _ -> Left (Errors.DecodingError "expected uint32 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "uint64", (\input -> Eithers.map (\t -> Core.IntegerValueUint64 t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueUint64 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected uint64 value")+                          _ -> Left (Errors.DecodingError "expected uint64 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input))))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++lambda :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Lambda+lambda cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "parameter" name fieldMap cx) (\field_parameter -> Eithers.bind (Helpers.requireField "domain" (Helpers.decodeMaybe type_) fieldMap cx) (\field_domain -> Eithers.bind (Helpers.requireField "body" term fieldMap cx) (\field_body -> Right (Core.Lambda {+          Core.lambdaParameter = field_parameter,+          Core.lambdaDomain = field_domain,+          Core.lambdaBody = field_body})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++let_ :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Let+let_ cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "bindings" (Helpers.decodeList binding) fieldMap cx) (\field_bindings -> Eithers.bind (Helpers.requireField "body" term fieldMap cx) (\field_body -> Right (Core.Let {+          Core.letBindings = field_bindings,+          Core.letBody = field_body}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++literal :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Literal+literal cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "binary", (\input -> Eithers.map (\t -> Core.LiteralBinary t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralBinary v2 -> Right v2+                          _ -> Left (Errors.DecodingError "expected binary literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "boolean", (\input -> Eithers.map (\t -> Core.LiteralBoolean t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralBoolean v2 -> Right v2+                          _ -> Left (Errors.DecodingError "expected boolean literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "float", (\input -> Eithers.map (\t -> Core.LiteralFloat t) (floatValue cx input))),+                      (Core.Name "integer", (\input -> Eithers.map (\t -> Core.LiteralInteger t) (integerValue cx input))),+                      (Core.Name "string", (\input -> Eithers.map (\t -> Core.LiteralString t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralString v2 -> Right v2+                          _ -> Left (Errors.DecodingError "expected string literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input))))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++literalType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.LiteralType+literalType cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "binary", (\input -> Eithers.map (\t -> Core.LiteralTypeBinary) (Helpers.decodeUnit cx input))),+                      (Core.Name "boolean", (\input -> Eithers.map (\t -> Core.LiteralTypeBoolean) (Helpers.decodeUnit cx input))),+                      (Core.Name "float", (\input -> Eithers.map (\t -> Core.LiteralTypeFloat t) (floatType cx input))),+                      (Core.Name "integer", (\input -> Eithers.map (\t -> Core.LiteralTypeInteger t) (integerType cx input))),+                      (Core.Name "string", (\input -> Eithers.map (\t -> Core.LiteralTypeString) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++mapType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.MapType+mapType cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "keys" type_ fieldMap cx) (\field_keys -> Eithers.bind (Helpers.requireField "values" type_ fieldMap cx) (\field_values -> Right (Core.MapType {+          Core.mapTypeKeys = field_keys,+          Core.mapTypeValues = field_values}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++name :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Name+name cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Core.Name b) ((\raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+        Core.TermLiteral v1 -> case v1 of+          Core.LiteralString v2 -> Right v2+          _ -> Left (Errors.DecodingError "expected string literal")+        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw)++pairType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.PairType+pairType cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "first" type_ fieldMap cx) (\field_first -> Eithers.bind (Helpers.requireField "second" type_ fieldMap cx) (\field_second -> Right (Core.PairType {+          Core.pairTypeFirst = field_first,+          Core.pairTypeSecond = field_second}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++projection :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Projection+projection cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (Helpers.requireField "field" name fieldMap cx) (\field_field -> Right (Core.Projection {+          Core.projectionTypeName = field_typeName,+          Core.projectionField = field_field}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++record :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Record+record cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (Helpers.requireField "fields" (Helpers.decodeList field) fieldMap cx) (\field_fields -> Right (Core.Record {+          Core.recordTypeName = field_typeName,+          Core.recordFields = field_fields}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++term :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Term+term cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "annotated", (\input -> Eithers.map (\t -> Core.TermAnnotated t) (annotatedTerm cx input))),+                      (Core.Name "application", (\input -> Eithers.map (\t -> Core.TermApplication t) (application cx input))),+                      (Core.Name "either", (\input -> Eithers.map (\t -> Core.TermEither t) (Helpers.decodeEither term term cx input))),+                      (Core.Name "function", (\input -> Eithers.map (\t -> Core.TermFunction t) (function cx input))),+                      (Core.Name "let", (\input -> Eithers.map (\t -> Core.TermLet t) (let_ cx input))),+                      (Core.Name "list", (\input -> Eithers.map (\t -> Core.TermList t) (Helpers.decodeList term cx input))),+                      (Core.Name "literal", (\input -> Eithers.map (\t -> Core.TermLiteral t) (literal cx input))),+                      (Core.Name "map", (\input -> Eithers.map (\t -> Core.TermMap t) (Helpers.decodeMap term term cx input))),+                      (Core.Name "maybe", (\input -> Eithers.map (\t -> Core.TermMaybe t) (Helpers.decodeMaybe term cx input))),+                      (Core.Name "pair", (\input -> Eithers.map (\t -> Core.TermPair t) (Helpers.decodePair term term cx input))),+                      (Core.Name "record", (\input -> Eithers.map (\t -> Core.TermRecord t) (record cx input))),+                      (Core.Name "set", (\input -> Eithers.map (\t -> Core.TermSet t) (Helpers.decodeSet term cx input))),+                      (Core.Name "typeApplication", (\input -> Eithers.map (\t -> Core.TermTypeApplication t) (typeApplicationTerm cx input))),+                      (Core.Name "typeLambda", (\input -> Eithers.map (\t -> Core.TermTypeLambda t) (typeLambda cx input))),+                      (Core.Name "union", (\input -> Eithers.map (\t -> Core.TermUnion t) (injection cx input))),+                      (Core.Name "unit", (\input -> Eithers.map (\t -> Core.TermUnit) (Helpers.decodeUnit cx input))),+                      (Core.Name "variable", (\input -> Eithers.map (\t -> Core.TermVariable t) (name cx input))),+                      (Core.Name "wrap", (\input -> Eithers.map (\t -> Core.TermWrap t) (wrappedTerm cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++type_ :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.Type+type_ cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "annotated", (\input -> Eithers.map (\t -> Core.TypeAnnotated t) (annotatedType cx input))),+                      (Core.Name "application", (\input -> Eithers.map (\t -> Core.TypeApplication t) (applicationType cx input))),+                      (Core.Name "either", (\input -> Eithers.map (\t -> Core.TypeEither t) (eitherType cx input))),+                      (Core.Name "forall", (\input -> Eithers.map (\t -> Core.TypeForall t) (forallType cx input))),+                      (Core.Name "function", (\input -> Eithers.map (\t -> Core.TypeFunction t) (functionType cx input))),+                      (Core.Name "list", (\input -> Eithers.map (\t -> Core.TypeList t) (type_ cx input))),+                      (Core.Name "literal", (\input -> Eithers.map (\t -> Core.TypeLiteral t) (literalType cx input))),+                      (Core.Name "map", (\input -> Eithers.map (\t -> Core.TypeMap t) (mapType cx input))),+                      (Core.Name "maybe", (\input -> Eithers.map (\t -> Core.TypeMaybe t) (type_ cx input))),+                      (Core.Name "pair", (\input -> Eithers.map (\t -> Core.TypePair t) (pairType cx input))),+                      (Core.Name "record", (\input -> Eithers.map (\t -> Core.TypeRecord t) (Helpers.decodeList fieldType cx input))),+                      (Core.Name "set", (\input -> Eithers.map (\t -> Core.TypeSet t) (type_ cx input))),+                      (Core.Name "union", (\input -> Eithers.map (\t -> Core.TypeUnion t) (Helpers.decodeList fieldType cx input))),+                      (Core.Name "unit", (\input -> Eithers.map (\t -> Core.TypeUnit) (Helpers.decodeUnit cx input))),+                      (Core.Name "variable", (\input -> Eithers.map (\t -> Core.TypeVariable t) (name cx input))),+                      (Core.Name "void", (\input -> Eithers.map (\t -> Core.TypeVoid) (Helpers.decodeUnit cx input))),+                      (Core.Name "wrap", (\input -> Eithers.map (\t -> Core.TypeWrap t) (type_ cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++typeApplicationTerm :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.TypeApplicationTerm+typeApplicationTerm cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "body" term fieldMap cx) (\field_body -> Eithers.bind (Helpers.requireField "type" type_ fieldMap cx) (\field_type -> Right (Core.TypeApplicationTerm {+          Core.typeApplicationTermBody = field_body,+          Core.typeApplicationTermType = field_type}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++typeLambda :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.TypeLambda+typeLambda cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "parameter" name fieldMap cx) (\field_parameter -> Eithers.bind (Helpers.requireField "body" term fieldMap cx) (\field_body -> Right (Core.TypeLambda {+          Core.typeLambdaParameter = field_parameter,+          Core.typeLambdaBody = field_body}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++typeScheme :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.TypeScheme+typeScheme cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "variables" (Helpers.decodeList name) fieldMap cx) (\field_variables -> Eithers.bind (Helpers.requireField "type" type_ fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "constraints" (Helpers.decodeMaybe (Helpers.decodeMap name typeVariableMetadata)) fieldMap cx) (\field_constraints -> Right (Core.TypeScheme {+          Core.typeSchemeVariables = field_variables,+          Core.typeSchemeType = field_type,+          Core.typeSchemeConstraints = field_constraints})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++typeVariableMetadata :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.TypeVariableMetadata+typeVariableMetadata cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "classes" (Helpers.decodeSet name) fieldMap cx) (\field_classes -> Right (Core.TypeVariableMetadata {+          Core.typeVariableMetadataClasses = field_classes})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++wrappedTerm :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core.WrappedTerm+wrappedTerm cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "typeName" name fieldMap cx) (\field_typeName -> Eithers.bind (Helpers.requireField "body" term fieldMap cx) (\field_body -> Right (Core.WrappedTerm {+          Core.wrappedTermTypeName = field_typeName,+          Core.wrappedTermBody = field_body}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)
+ src/gen-main/haskell/Hydra/Decode/Error/Checking.hs view
@@ -0,0 +1,163 @@+-- Note: this is an automatically generated file. Do not edit.++-- | Term decoders for hydra.error.checking++module Hydra.Decode.Error.Checking where++import qualified Hydra.Core as Core+import qualified Hydra.Decode.Core as Core_+import qualified Hydra.Decode.Typing as Typing+import qualified Hydra.Decode.Variants as Variants+import qualified Hydra.Error.Checking as Checking+import qualified Hydra.Errors as Errors+import qualified Hydra.Extract.Helpers as Helpers+import qualified Hydra.Graph as Graph+import qualified Hydra.Lexical as Lexical+import qualified Hydra.Lib.Eithers as Eithers+import qualified Hydra.Lib.Maps as Maps+import qualified Hydra.Lib.Maybes as Maybes+import qualified Hydra.Lib.Strings as Strings+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++checkingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.CheckingError+checkingError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "incorrectUnification", (\input -> Eithers.map (\t -> Checking.CheckingErrorIncorrectUnification t) (incorrectUnificationError cx input))),+                      (Core.Name "notAForallType", (\input -> Eithers.map (\t -> Checking.CheckingErrorNotAForallType t) (notAForallTypeError cx input))),+                      (Core.Name "notAFunctionType", (\input -> Eithers.map (\t -> Checking.CheckingErrorNotAFunctionType t) (notAFunctionTypeError cx input))),+                      (Core.Name "typeArityMismatch", (\input -> Eithers.map (\t -> Checking.CheckingErrorTypeArityMismatch t) (typeArityMismatchError cx input))),+                      (Core.Name "typeMismatch", (\input -> Eithers.map (\t -> Checking.CheckingErrorTypeMismatch t) (typeMismatchError cx input))),+                      (Core.Name "unboundTypeVariables", (\input -> Eithers.map (\t -> Checking.CheckingErrorUnboundTypeVariables t) (unboundTypeVariablesError cx input))),+                      (Core.Name "unequalTypes", (\input -> Eithers.map (\t -> Checking.CheckingErrorUnequalTypes t) (unequalTypesError cx input))),+                      (Core.Name "unsupportedTermVariant", (\input -> Eithers.map (\t -> Checking.CheckingErrorUnsupportedTermVariant t) (unsupportedTermVariantError cx input))),+                      (Core.Name "untypedLambda", (\input -> Eithers.map (\t -> Checking.CheckingErrorUntypedLambda t) (untypedLambdaError cx input))),+                      (Core.Name "untypedLetBinding", (\input -> Eithers.map (\t -> Checking.CheckingErrorUntypedLetBinding t) (untypedLetBindingError cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++incorrectUnificationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.IncorrectUnificationError+incorrectUnificationError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "substitution" Typing.typeSubst fieldMap cx) (\field_substitution -> Right (Checking.IncorrectUnificationError {+          Checking.incorrectUnificationErrorSubstitution = field_substitution})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++notAForallTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.NotAForallTypeError+notAForallTypeError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "typeArguments" (Helpers.decodeList Core_.type_) fieldMap cx) (\field_typeArguments -> Right (Checking.NotAForallTypeError {+          Checking.notAForallTypeErrorType = field_type,+          Checking.notAForallTypeErrorTypeArguments = field_typeArguments}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++notAFunctionTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.NotAFunctionTypeError+notAFunctionTypeError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Right (Checking.NotAFunctionTypeError {+          Checking.notAFunctionTypeErrorType = field_type})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++typeArityMismatchError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.TypeArityMismatchError+typeArityMismatchError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "expectedArity" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralInteger v2 -> case v2 of+              Core.IntegerValueInt32 v3 -> Right v3+              _ -> Left (Errors.DecodingError "expected int32 value")+            _ -> Left (Errors.DecodingError "expected int32 literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_expectedArity -> Eithers.bind (Helpers.requireField "actualArity" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralInteger v2 -> case v2 of+              Core.IntegerValueInt32 v3 -> Right v3+              _ -> Left (Errors.DecodingError "expected int32 value")+            _ -> Left (Errors.DecodingError "expected int32 literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_actualArity -> Eithers.bind (Helpers.requireField "typeArguments" (Helpers.decodeList Core_.type_) fieldMap cx) (\field_typeArguments -> Right (Checking.TypeArityMismatchError {+          Checking.typeArityMismatchErrorType = field_type,+          Checking.typeArityMismatchErrorExpectedArity = field_expectedArity,+          Checking.typeArityMismatchErrorActualArity = field_actualArity,+          Checking.typeArityMismatchErrorTypeArguments = field_typeArguments}))))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++typeMismatchError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.TypeMismatchError+typeMismatchError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "expectedType" Core_.type_ fieldMap cx) (\field_expectedType -> Eithers.bind (Helpers.requireField "actualType" Core_.type_ fieldMap cx) (\field_actualType -> Right (Checking.TypeMismatchError {+          Checking.typeMismatchErrorExpectedType = field_expectedType,+          Checking.typeMismatchErrorActualType = field_actualType}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++unboundTypeVariablesError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.UnboundTypeVariablesError+unboundTypeVariablesError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "variables" (Helpers.decodeSet Core_.name) fieldMap cx) (\field_variables -> Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Right (Checking.UnboundTypeVariablesError {+          Checking.unboundTypeVariablesErrorVariables = field_variables,+          Checking.unboundTypeVariablesErrorType = field_type}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++unequalTypesError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.UnequalTypesError+unequalTypesError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "types" (Helpers.decodeList Core_.type_) fieldMap cx) (\field_types -> Eithers.bind (Helpers.requireField "description" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_description -> Right (Checking.UnequalTypesError {+          Checking.unequalTypesErrorTypes = field_types,+          Checking.unequalTypesErrorDescription = field_description}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++unsupportedTermVariantError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.UnsupportedTermVariantError+unsupportedTermVariantError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "termVariant" Variants.termVariant fieldMap cx) (\field_termVariant -> Right (Checking.UnsupportedTermVariantError {+          Checking.unsupportedTermVariantErrorTermVariant = field_termVariant})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++untypedLambdaError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.UntypedLambdaError+untypedLambdaError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Right (Checking.UntypedLambdaError {+        }))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++untypedLetBindingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Checking.UntypedLetBindingError+untypedLetBindingError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "binding" Core_.binding fieldMap cx) (\field_binding -> Right (Checking.UntypedLetBindingError {+          Checking.untypedLetBindingErrorBinding = field_binding})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)
+ src/gen-main/haskell/Hydra/Decode/Error/Core.hs view
@@ -0,0 +1,475 @@+-- Note: this is an automatically generated file. Do not edit.++-- | Term decoders for hydra.error.core++module Hydra.Decode.Error.Core where++import qualified Hydra.Core as Core+import qualified Hydra.Decode.Core as Core_+import qualified Hydra.Decode.Paths as Paths+import qualified Hydra.Decode.Variants as Variants+import qualified Hydra.Error.Core as Core__+import qualified Hydra.Errors as Errors+import qualified Hydra.Extract.Helpers as Helpers+import qualified Hydra.Graph as Graph+import qualified Hydra.Lexical as Lexical+import qualified Hydra.Lib.Eithers as Eithers+import qualified Hydra.Lib.Maps as Maps+import qualified Hydra.Lib.Maybes as Maybes+import qualified Hydra.Lib.Strings as Strings+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++constantConditionError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.ConstantConditionError+constantConditionError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "value" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralBoolean v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected boolean literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_value -> Right (Core__.ConstantConditionError {+          Core__.constantConditionErrorLocation = field_location,+          Core__.constantConditionErrorValue = field_value}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++duplicateBindingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.DuplicateBindingError+duplicateBindingError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.DuplicateBindingError {+          Core__.duplicateBindingErrorLocation = field_location,+          Core__.duplicateBindingErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++duplicateFieldError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.DuplicateFieldError+duplicateFieldError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.DuplicateFieldError {+          Core__.duplicateFieldErrorLocation = field_location,+          Core__.duplicateFieldErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++duplicateRecordTypeFieldNamesError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.DuplicateRecordTypeFieldNamesError+duplicateRecordTypeFieldNamesError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.DuplicateRecordTypeFieldNamesError {+          Core__.duplicateRecordTypeFieldNamesErrorLocation = field_location,+          Core__.duplicateRecordTypeFieldNamesErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++duplicateUnionTypeFieldNamesError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.DuplicateUnionTypeFieldNamesError+duplicateUnionTypeFieldNamesError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.DuplicateUnionTypeFieldNamesError {+          Core__.duplicateUnionTypeFieldNamesErrorLocation = field_location,+          Core__.duplicateUnionTypeFieldNamesErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++emptyCaseStatementError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.EmptyCaseStatementError+emptyCaseStatementError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "typeName" Core_.name fieldMap cx) (\field_typeName -> Right (Core__.EmptyCaseStatementError {+          Core__.emptyCaseStatementErrorLocation = field_location,+          Core__.emptyCaseStatementErrorTypeName = field_typeName}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++emptyLetBindingsError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.EmptyLetBindingsError+emptyLetBindingsError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (Core__.EmptyLetBindingsError {+          Core__.emptyLetBindingsErrorLocation = field_location})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++emptyRecordTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.EmptyRecordTypeError+emptyRecordTypeError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (Core__.EmptyRecordTypeError {+          Core__.emptyRecordTypeErrorLocation = field_location})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++emptyTermAnnotationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.EmptyTermAnnotationError+emptyTermAnnotationError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (Core__.EmptyTermAnnotationError {+          Core__.emptyTermAnnotationErrorLocation = field_location})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++emptyTypeAnnotationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.EmptyTypeAnnotationError+emptyTypeAnnotationError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (Core__.EmptyTypeAnnotationError {+          Core__.emptyTypeAnnotationErrorLocation = field_location})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++emptyTypeNameInTermError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.EmptyTypeNameInTermError+emptyTypeNameInTermError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (Core__.EmptyTypeNameInTermError {+          Core__.emptyTypeNameInTermErrorLocation = field_location})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++emptyUnionTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.EmptyUnionTypeError+emptyUnionTypeError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (Core__.EmptyUnionTypeError {+          Core__.emptyUnionTypeErrorLocation = field_location})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++invalidForallParameterNameError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.InvalidForallParameterNameError+invalidForallParameterNameError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.InvalidForallParameterNameError {+          Core__.invalidForallParameterNameErrorLocation = field_location,+          Core__.invalidForallParameterNameErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++invalidLambdaParameterNameError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.InvalidLambdaParameterNameError+invalidLambdaParameterNameError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.InvalidLambdaParameterNameError {+          Core__.invalidLambdaParameterNameErrorLocation = field_location,+          Core__.invalidLambdaParameterNameErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++invalidLetBindingNameError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.InvalidLetBindingNameError+invalidLetBindingNameError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.InvalidLetBindingNameError {+          Core__.invalidLetBindingNameErrorLocation = field_location,+          Core__.invalidLetBindingNameErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++invalidTermError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.InvalidTermError+invalidTermError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "constantCondition", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorConstantCondition t) (constantConditionError cx input))),+                      (Core.Name "duplicateBinding", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorDuplicateBinding t) (duplicateBindingError cx input))),+                      (Core.Name "duplicateField", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorDuplicateField t) (duplicateFieldError cx input))),+                      (Core.Name "emptyCaseStatement", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorEmptyCaseStatement t) (emptyCaseStatementError cx input))),+                      (Core.Name "emptyLetBindings", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorEmptyLetBindings t) (emptyLetBindingsError cx input))),+                      (Core.Name "emptyTermAnnotation", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorEmptyTermAnnotation t) (emptyTermAnnotationError cx input))),+                      (Core.Name "emptyTypeNameInTerm", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorEmptyTypeNameInTerm t) (emptyTypeNameInTermError cx input))),+                      (Core.Name "invalidLambdaParameterName", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorInvalidLambdaParameterName t) (invalidLambdaParameterNameError cx input))),+                      (Core.Name "invalidLetBindingName", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorInvalidLetBindingName t) (invalidLetBindingNameError cx input))),+                      (Core.Name "invalidTypeLambdaParameterName", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorInvalidTypeLambdaParameterName t) (invalidTypeLambdaParameterNameError cx input))),+                      (Core.Name "nestedTermAnnotation", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorNestedTermAnnotation t) (nestedTermAnnotationError cx input))),+                      (Core.Name "redundantWrapUnwrap", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorRedundantWrapUnwrap t) (redundantWrapUnwrapError cx input))),+                      (Core.Name "selfApplication", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorSelfApplication t) (selfApplicationError cx input))),+                      (Core.Name "termVariableShadowing", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorTermVariableShadowing t) (termVariableShadowingError cx input))),+                      (Core.Name "typeVariableShadowingInTypeLambda", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorTypeVariableShadowingInTypeLambda t) (typeVariableShadowingInTypeLambdaError cx input))),+                      (Core.Name "undefinedTermVariable", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorUndefinedTermVariable t) (undefinedTermVariableError cx input))),+                      (Core.Name "undefinedTypeVariableInBindingType", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorUndefinedTypeVariableInBindingType t) (undefinedTypeVariableInBindingTypeError cx input))),+                      (Core.Name "undefinedTypeVariableInLambdaDomain", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorUndefinedTypeVariableInLambdaDomain t) (undefinedTypeVariableInLambdaDomainError cx input))),+                      (Core.Name "undefinedTypeVariableInTypeApplication", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorUndefinedTypeVariableInTypeApplication t) (undefinedTypeVariableInTypeApplicationError cx input))),+                      (Core.Name "unknownPrimitiveName", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorUnknownPrimitiveName t) (unknownPrimitiveNameError cx input))),+                      (Core.Name "unnecessaryIdentityApplication", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorUnnecessaryIdentityApplication t) (unnecessaryIdentityApplicationError cx input))),+                      (Core.Name "untypedTermVariable", (\input -> Eithers.map (\t -> Core__.InvalidTermErrorUntypedTermVariable t) (untypedTermVariableError cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++invalidTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.InvalidTypeError+invalidTypeError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "duplicateRecordTypeFieldNames", (\input -> Eithers.map (\t -> Core__.InvalidTypeErrorDuplicateRecordTypeFieldNames t) (duplicateRecordTypeFieldNamesError cx input))),+                      (Core.Name "duplicateUnionTypeFieldNames", (\input -> Eithers.map (\t -> Core__.InvalidTypeErrorDuplicateUnionTypeFieldNames t) (duplicateUnionTypeFieldNamesError cx input))),+                      (Core.Name "emptyRecordType", (\input -> Eithers.map (\t -> Core__.InvalidTypeErrorEmptyRecordType t) (emptyRecordTypeError cx input))),+                      (Core.Name "emptyTypeAnnotation", (\input -> Eithers.map (\t -> Core__.InvalidTypeErrorEmptyTypeAnnotation t) (emptyTypeAnnotationError cx input))),+                      (Core.Name "emptyUnionType", (\input -> Eithers.map (\t -> Core__.InvalidTypeErrorEmptyUnionType t) (emptyUnionTypeError cx input))),+                      (Core.Name "invalidForallParameterName", (\input -> Eithers.map (\t -> Core__.InvalidTypeErrorInvalidForallParameterName t) (invalidForallParameterNameError cx input))),+                      (Core.Name "invalidTypeSchemeVariableName", (\input -> Eithers.map (\t -> Core__.InvalidTypeErrorInvalidTypeSchemeVariableName t) (invalidTypeSchemeVariableNameError cx input))),+                      (Core.Name "nestedTypeAnnotation", (\input -> Eithers.map (\t -> Core__.InvalidTypeErrorNestedTypeAnnotation t) (nestedTypeAnnotationError cx input))),+                      (Core.Name "nonComparableMapKeyType", (\input -> Eithers.map (\t -> Core__.InvalidTypeErrorNonComparableMapKeyType t) (nonComparableMapKeyTypeError cx input))),+                      (Core.Name "nonComparableSetElementType", (\input -> Eithers.map (\t -> Core__.InvalidTypeErrorNonComparableSetElementType t) (nonComparableSetElementTypeError cx input))),+                      (Core.Name "singleVariantUnion", (\input -> Eithers.map (\t -> Core__.InvalidTypeErrorSingleVariantUnion t) (singleVariantUnionError cx input))),+                      (Core.Name "typeVariableShadowingInForall", (\input -> Eithers.map (\t -> Core__.InvalidTypeErrorTypeVariableShadowingInForall t) (typeVariableShadowingInForallError cx input))),+                      (Core.Name "undefinedTypeVariable", (\input -> Eithers.map (\t -> Core__.InvalidTypeErrorUndefinedTypeVariable t) (undefinedTypeVariableError cx input))),+                      (Core.Name "voidInNonBottomPosition", (\input -> Eithers.map (\t -> Core__.InvalidTypeErrorVoidInNonBottomPosition t) (voidInNonBottomPositionError cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++invalidTypeLambdaParameterNameError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.InvalidTypeLambdaParameterNameError+invalidTypeLambdaParameterNameError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.InvalidTypeLambdaParameterNameError {+          Core__.invalidTypeLambdaParameterNameErrorLocation = field_location,+          Core__.invalidTypeLambdaParameterNameErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++invalidTypeSchemeVariableNameError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.InvalidTypeSchemeVariableNameError+invalidTypeSchemeVariableNameError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.InvalidTypeSchemeVariableNameError {+          Core__.invalidTypeSchemeVariableNameErrorLocation = field_location,+          Core__.invalidTypeSchemeVariableNameErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++nestedTermAnnotationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.NestedTermAnnotationError+nestedTermAnnotationError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (Core__.NestedTermAnnotationError {+          Core__.nestedTermAnnotationErrorLocation = field_location})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++nestedTypeAnnotationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.NestedTypeAnnotationError+nestedTypeAnnotationError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (Core__.NestedTypeAnnotationError {+          Core__.nestedTypeAnnotationErrorLocation = field_location})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++nonComparableMapKeyTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.NonComparableMapKeyTypeError+nonComparableMapKeyTypeError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "keyType" Core_.type_ fieldMap cx) (\field_keyType -> Right (Core__.NonComparableMapKeyTypeError {+          Core__.nonComparableMapKeyTypeErrorLocation = field_location,+          Core__.nonComparableMapKeyTypeErrorKeyType = field_keyType}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++nonComparableSetElementTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.NonComparableSetElementTypeError+nonComparableSetElementTypeError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "elementType" Core_.type_ fieldMap cx) (\field_elementType -> Right (Core__.NonComparableSetElementTypeError {+          Core__.nonComparableSetElementTypeErrorLocation = field_location,+          Core__.nonComparableSetElementTypeErrorElementType = field_elementType}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++redundantWrapUnwrapError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.RedundantWrapUnwrapError+redundantWrapUnwrapError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "typeName" Core_.name fieldMap cx) (\field_typeName -> Right (Core__.RedundantWrapUnwrapError {+          Core__.redundantWrapUnwrapErrorLocation = field_location,+          Core__.redundantWrapUnwrapErrorTypeName = field_typeName}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++selfApplicationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.SelfApplicationError+selfApplicationError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.SelfApplicationError {+          Core__.selfApplicationErrorLocation = field_location,+          Core__.selfApplicationErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++singleVariantUnionError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.SingleVariantUnionError+singleVariantUnionError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "fieldName" Core_.name fieldMap cx) (\field_fieldName -> Right (Core__.SingleVariantUnionError {+          Core__.singleVariantUnionErrorLocation = field_location,+          Core__.singleVariantUnionErrorFieldName = field_fieldName}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++termVariableShadowingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.TermVariableShadowingError+termVariableShadowingError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.TermVariableShadowingError {+          Core__.termVariableShadowingErrorLocation = field_location,+          Core__.termVariableShadowingErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++typeVariableShadowingInForallError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.TypeVariableShadowingInForallError+typeVariableShadowingInForallError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.TypeVariableShadowingInForallError {+          Core__.typeVariableShadowingInForallErrorLocation = field_location,+          Core__.typeVariableShadowingInForallErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++typeVariableShadowingInTypeLambdaError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.TypeVariableShadowingInTypeLambdaError+typeVariableShadowingInTypeLambdaError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.TypeVariableShadowingInTypeLambdaError {+          Core__.typeVariableShadowingInTypeLambdaErrorLocation = field_location,+          Core__.typeVariableShadowingInTypeLambdaErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++undefinedFieldError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.UndefinedFieldError+undefinedFieldError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "fieldName" Core_.name fieldMap cx) (\field_fieldName -> Eithers.bind (Helpers.requireField "typeName" Core_.name fieldMap cx) (\field_typeName -> Right (Core__.UndefinedFieldError {+          Core__.undefinedFieldErrorFieldName = field_fieldName,+          Core__.undefinedFieldErrorTypeName = field_typeName}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++undefinedTermVariableError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.UndefinedTermVariableError+undefinedTermVariableError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.UndefinedTermVariableError {+          Core__.undefinedTermVariableErrorLocation = field_location,+          Core__.undefinedTermVariableErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++undefinedTypeVariableError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.UndefinedTypeVariableError+undefinedTypeVariableError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.UndefinedTypeVariableError {+          Core__.undefinedTypeVariableErrorLocation = field_location,+          Core__.undefinedTypeVariableErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++undefinedTypeVariableInBindingTypeError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.UndefinedTypeVariableInBindingTypeError+undefinedTypeVariableInBindingTypeError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.UndefinedTypeVariableInBindingTypeError {+          Core__.undefinedTypeVariableInBindingTypeErrorLocation = field_location,+          Core__.undefinedTypeVariableInBindingTypeErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++undefinedTypeVariableInLambdaDomainError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.UndefinedTypeVariableInLambdaDomainError+undefinedTypeVariableInLambdaDomainError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.UndefinedTypeVariableInLambdaDomainError {+          Core__.undefinedTypeVariableInLambdaDomainErrorLocation = field_location,+          Core__.undefinedTypeVariableInLambdaDomainErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++undefinedTypeVariableInTypeApplicationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.UndefinedTypeVariableInTypeApplicationError+undefinedTypeVariableInTypeApplicationError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.UndefinedTypeVariableInTypeApplicationError {+          Core__.undefinedTypeVariableInTypeApplicationErrorLocation = field_location,+          Core__.undefinedTypeVariableInTypeApplicationErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++unexpectedTermVariantError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.UnexpectedTermVariantError+unexpectedTermVariantError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "expectedVariant" Variants.termVariant fieldMap cx) (\field_expectedVariant -> Eithers.bind (Helpers.requireField "actualTerm" Core_.term fieldMap cx) (\field_actualTerm -> Right (Core__.UnexpectedTermVariantError {+          Core__.unexpectedTermVariantErrorExpectedVariant = field_expectedVariant,+          Core__.unexpectedTermVariantErrorActualTerm = field_actualTerm}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++unexpectedTypeVariantError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.UnexpectedTypeVariantError+unexpectedTypeVariantError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "expectedVariant" Variants.typeVariant fieldMap cx) (\field_expectedVariant -> Eithers.bind (Helpers.requireField "actualType" Core_.type_ fieldMap cx) (\field_actualType -> Right (Core__.UnexpectedTypeVariantError {+          Core__.unexpectedTypeVariantErrorExpectedVariant = field_expectedVariant,+          Core__.unexpectedTypeVariantErrorActualType = field_actualType}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++unknownPrimitiveNameError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.UnknownPrimitiveNameError+unknownPrimitiveNameError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.UnknownPrimitiveNameError {+          Core__.unknownPrimitiveNameErrorLocation = field_location,+          Core__.unknownPrimitiveNameErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++unnecessaryIdentityApplicationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.UnnecessaryIdentityApplicationError+unnecessaryIdentityApplicationError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (Core__.UnnecessaryIdentityApplicationError {+          Core__.unnecessaryIdentityApplicationErrorLocation = field_location})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++untypedTermVariableError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.UntypedTermVariableError+untypedTermVariableError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Right (Core__.UntypedTermVariableError {+          Core__.untypedTermVariableErrorLocation = field_location,+          Core__.untypedTermVariableErrorName = field_name}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++voidInNonBottomPositionError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Core__.VoidInNonBottomPositionError+voidInNonBottomPositionError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "location" Paths.subtermPath fieldMap cx) (\field_location -> Right (Core__.VoidInNonBottomPositionError {+          Core__.voidInNonBottomPositionErrorLocation = field_location})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)
+ src/gen-main/haskell/Hydra/Decode/Errors.hs view
@@ -0,0 +1,85 @@+-- Note: this is an automatically generated file. Do not edit.++-- | Term decoders for hydra.errors++module Hydra.Decode.Errors where++import qualified Hydra.Core as Core+import qualified Hydra.Decode.Core as Core_+import qualified Hydra.Decode.Error.Checking as Checking+import qualified Hydra.Decode.Error.Core as Core__+import qualified Hydra.Errors as Errors+import qualified Hydra.Extract.Helpers as Helpers+import qualified Hydra.Graph as Graph+import qualified Hydra.Lexical as Lexical+import qualified Hydra.Lib.Eithers as Eithers+import qualified Hydra.Lib.Maps as Maps+import qualified Hydra.Lib.Maybes as Maybes+import qualified Hydra.Lib.Strings as Strings+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++decodingError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.DecodingError+decodingError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Errors.DecodingError b) ((\raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+        Core.TermLiteral v1 -> case v1 of+          Core.LiteralString v2 -> Right v2+          _ -> Left (Errors.DecodingError "expected string literal")+        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw)++error :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.Error+error cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "checking", (\input -> Eithers.map (\t -> Errors.ErrorChecking t) (Checking.checkingError cx input))),+                      (Core.Name "decoding", (\input -> Eithers.map (\t -> Errors.ErrorDecoding t) (decodingError cx input))),+                      (Core.Name "duplicateBinding", (\input -> Eithers.map (\t -> Errors.ErrorDuplicateBinding t) (Core__.duplicateBindingError cx input))),+                      (Core.Name "duplicateField", (\input -> Eithers.map (\t -> Errors.ErrorDuplicateField t) (Core__.duplicateFieldError cx input))),+                      (Core.Name "other", (\input -> Eithers.map (\t -> Errors.ErrorOther t) (otherError cx input))),+                      (Core.Name "undefinedField", (\input -> Eithers.map (\t -> Errors.ErrorUndefinedField t) (Core__.undefinedFieldError cx input))),+                      (Core.Name "undefinedTermVariable", (\input -> Eithers.map (\t -> Errors.ErrorUndefinedTermVariable t) (Core__.undefinedTermVariableError cx input))),+                      (Core.Name "untypedTermVariable", (\input -> Eithers.map (\t -> Errors.ErrorUntypedTermVariable t) (Core__.untypedTermVariableError cx input))),+                      (Core.Name "unexpectedTermVariant", (\input -> Eithers.map (\t -> Errors.ErrorUnexpectedTermVariant t) (Core__.unexpectedTermVariantError cx input))),+                      (Core.Name "unexpectedTypeVariant", (\input -> Eithers.map (\t -> Errors.ErrorUnexpectedTypeVariant t) (Core__.unexpectedTypeVariantError cx input))),+                      (Core.Name "unification", (\input -> Eithers.map (\t -> Errors.ErrorUnification t) (unificationError cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++otherError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.OtherError+otherError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Errors.OtherError b) ((\raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+        Core.TermLiteral v1 -> case v1 of+          Core.LiteralString v2 -> Right v2+          _ -> Left (Errors.DecodingError "expected string literal")+        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw)++unificationError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Errors.UnificationError+unificationError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "leftType" Core_.type_ fieldMap cx) (\field_leftType -> Eithers.bind (Helpers.requireField "rightType" Core_.type_ fieldMap cx) (\field_rightType -> Eithers.bind (Helpers.requireField "message" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_message -> Right (Errors.UnificationError {+          Errors.unificationErrorLeftType = field_leftType,+          Errors.unificationErrorRightType = field_rightType,+          Errors.unificationErrorMessage = field_message})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)
− src/gen-main/haskell/Hydra/Decode/Grammar.hs
@@ -1,107 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Term decoders for hydra.grammar--module Hydra.Decode.Grammar where--import qualified Hydra.Core as Core-import qualified Hydra.Extract.Helpers as Helpers-import qualified Hydra.Grammar as Grammar-import qualified Hydra.Graph as Graph-import qualified Hydra.Lexical as Lexical-import qualified Hydra.Lib.Eithers as Eithers-import qualified Hydra.Lib.Maps as Maps-import qualified Hydra.Lib.Maybes as Maybes-import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Util as Util-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S--constant :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Grammar.Constant)-constant cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Grammar.Constant b) ((\raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.grammar.Constant"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--grammar :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Grammar.Grammar)-grammar cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Grammar.Grammar b) (Helpers.decodeList production cx (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.grammar.Grammar"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--label :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Grammar.Label)-label cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Grammar.Label b) ((\raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.grammar.Label"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--labeledPattern :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Grammar.LabeledPattern)-labeledPattern cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "label" label fieldMap cx) (\field_label -> Eithers.bind (Helpers.requireField "pattern" pattern fieldMap cx) (\field_pattern -> Right (Grammar.LabeledPattern {-      Grammar.labeledPatternLabel = field_label,-      Grammar.labeledPatternPattern = field_pattern}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.grammar.LabeledPattern"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--pattern :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Grammar.Pattern)-pattern cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "alternatives", (\input -> Eithers.map (\t -> Grammar.PatternAlternatives t) (Helpers.decodeList pattern cx input))),-                (Core.Name "constant", (\input -> Eithers.map (\t -> Grammar.PatternConstant t) (constant cx input))),-                (Core.Name "ignored", (\input -> Eithers.map (\t -> Grammar.PatternIgnored t) (pattern cx input))),-                (Core.Name "labeled", (\input -> Eithers.map (\t -> Grammar.PatternLabeled t) (labeledPattern cx input))),-                (Core.Name "nil", (\input -> Eithers.map (\t -> Grammar.PatternNil) (Helpers.decodeUnit cx input))),-                (Core.Name "nonterminal", (\input -> Eithers.map (\t -> Grammar.PatternNonterminal t) (symbol cx input))),-                (Core.Name "option", (\input -> Eithers.map (\t -> Grammar.PatternOption t) (pattern cx input))),-                (Core.Name "plus", (\input -> Eithers.map (\t -> Grammar.PatternPlus t) (pattern cx input))),-                (Core.Name "regex", (\input -> Eithers.map (\t -> Grammar.PatternRegex t) (regex cx input))),-                (Core.Name "sequence", (\input -> Eithers.map (\t -> Grammar.PatternSequence t) (Helpers.decodeList pattern cx input))),-                (Core.Name "star", (\input -> Eithers.map (\t -> Grammar.PatternStar t) (pattern cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.grammar.Pattern"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--production :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Grammar.Production)-production cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "symbol" symbol fieldMap cx) (\field_symbol -> Eithers.bind (Helpers.requireField "pattern" pattern fieldMap cx) (\field_pattern -> Right (Grammar.Production {-      Grammar.productionSymbol = field_symbol,-      Grammar.productionPattern = field_pattern}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.grammar.Production"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--regex :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Grammar.Regex)-regex cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Grammar.Regex b) ((\raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.grammar.Regex"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--symbol :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Grammar.Symbol)-symbol cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Grammar.Symbol b) ((\raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.grammar.Symbol"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))
src/gen-main/haskell/Hydra/Decode/Json.hs view
@@ -13,7 +13,7 @@ import qualified Hydra.Lib.Maps as Maps import qualified Hydra.Lib.Maybes as Maybes import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Util as Util+import qualified Hydra.Errors as Error import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -21,8 +21,8 @@ import qualified Data.Map as M import qualified Data.Set as S -value :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Model.Value)-value cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of+value :: (Graph.Graph -> Core.Term -> Either Error.DecodingError Model.Value)+value cx raw = (Eithers.either (\err -> Left (Error.DecodingError err)) (\stripped -> (\x -> case x of   Core.TermUnion v1 ->       let tname = (Core.injectionTypeName v1)          field = (Core.injectionField v1)@@ -30,32 +30,32 @@         fterm = (Core.fieldTerm field)         variantMap = (Maps.fromList [                 (Core.Name "array", (\input -> Eithers.map (\t -> Model.ValueArray t) (Helpers.decodeList value cx input))),-                (Core.Name "boolean", (\input -> Eithers.map (\t -> Model.ValueBoolean t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of+                (Core.Name "boolean", (\input -> Eithers.map (\t -> Model.ValueBoolean t) (Eithers.either (\err -> Left (Error.DecodingError err)) (\stripped -> (\x -> case x of                   Core.TermLiteral v2 -> ((\x -> case x of                     Core.LiteralBoolean v3 -> (Right v3)-                    _ -> (Left (Util.DecodingError "expected boolean literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),+                    _ -> (Left (Error.DecodingError "expected boolean literal"))) v2)+                  _ -> (Left (Error.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),                 (Core.Name "null", (\input -> Eithers.map (\t -> Model.ValueNull) (Helpers.decodeUnit cx input))),-                (Core.Name "number", (\input -> Eithers.map (\t -> Model.ValueNumber t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of+                (Core.Name "number", (\input -> Eithers.map (\t -> Model.ValueNumber t) (Eithers.either (\err -> Left (Error.DecodingError err)) (\stripped -> (\x -> case x of                   Core.TermLiteral v2 -> ((\x -> case x of                     Core.LiteralFloat v3 -> ((\x -> case x of                       Core.FloatValueBigfloat v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected bigfloat value"))) v3)-                    _ -> (Left (Util.DecodingError "expected bigfloat literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "object", (\input -> Eithers.map (\t -> Model.ValueObject t) (Helpers.decodeMap (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of+                      _ -> (Left (Error.DecodingError "expected bigfloat value"))) v3)+                    _ -> (Left (Error.DecodingError "expected bigfloat literal"))) v2)+                  _ -> (Left (Error.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),+                (Core.Name "object", (\input -> Eithers.map (\t -> Model.ValueObject t) (Helpers.decodeMap (\cx -> \raw -> Eithers.either (\err -> Left (Error.DecodingError err)) (\stripped -> (\x -> case x of                   Core.TermLiteral v2 -> ((\x -> case x of                     Core.LiteralString v3 -> (Right v3)-                    _ -> (Left (Util.DecodingError "expected string literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) value cx input))),-                (Core.Name "string", (\input -> Eithers.map (\t -> Model.ValueString t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of+                    _ -> (Left (Error.DecodingError "expected string literal"))) v2)+                  _ -> (Left (Error.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) value cx input))),+                (Core.Name "string", (\input -> Eithers.map (\t -> Model.ValueString t) (Eithers.either (\err -> Left (Error.DecodingError err)) (\stripped -> (\x -> case x of                   Core.TermLiteral v2 -> ((\x -> case x of                     Core.LiteralString v3 -> (Right v3)-                    _ -> (Left (Util.DecodingError "expected string literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input))))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [+                    _ -> (Left (Error.DecodingError "expected string literal"))) v2)+                  _ -> (Left (Error.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input))))])+    in (Maybes.maybe (Left (Error.DecodingError (Strings.cat [       "no such field ",       (Core.unName fname),       " in union type ",       (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.json.model.Value"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+  _ -> (Left (Error.DecodingError "expected union of type hydra.json.model.Value"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))
src/gen-main/haskell/Hydra/Decode/Json/Model.hs view
@@ -5,6 +5,7 @@ module Hydra.Decode.Json.Model where  import qualified Hydra.Core as Core+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Helpers as Helpers import qualified Hydra.Graph as Graph import qualified Hydra.Json.Model as Model@@ -13,7 +14,6 @@ import qualified Hydra.Lib.Maps as Maps import qualified Hydra.Lib.Maybes as Maybes import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Util as Util import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -21,41 +21,41 @@ import qualified Data.Map as M import qualified Data.Set as S -value :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Model.Value)-value cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "array", (\input -> Eithers.map (\t -> Model.ValueArray t) (Helpers.decodeList value cx input))),-                (Core.Name "boolean", (\input -> Eithers.map (\t -> Model.ValueBoolean t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralBoolean v3 -> (Right v3)-                    _ -> (Left (Util.DecodingError "expected boolean literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "null", (\input -> Eithers.map (\t -> Model.ValueNull) (Helpers.decodeUnit cx input))),-                (Core.Name "number", (\input -> Eithers.map (\t -> Model.ValueNumber t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralFloat v3 -> ((\x -> case x of-                      Core.FloatValueBigfloat v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected bigfloat value"))) v3)-                    _ -> (Left (Util.DecodingError "expected bigfloat literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "object", (\input -> Eithers.map (\t -> Model.ValueObject t) (Helpers.decodeMap (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralString v3 -> (Right v3)-                    _ -> (Left (Util.DecodingError "expected string literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) value cx input))),-                (Core.Name "string", (\input -> Eithers.map (\t -> Model.ValueString t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralString v3 -> (Right v3)-                    _ -> (Left (Util.DecodingError "expected string literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input))))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.json.model.Value"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+value :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Model.Value+value cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "array", (\input -> Eithers.map (\t -> Model.ValueArray t) (Helpers.decodeList value cx input))),+                      (Core.Name "boolean", (\input -> Eithers.map (\t -> Model.ValueBoolean t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralBoolean v2 -> Right v2+                          _ -> Left (Errors.DecodingError "expected boolean literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "null", (\input -> Eithers.map (\t -> Model.ValueNull) (Helpers.decodeUnit cx input))),+                      (Core.Name "number", (\input -> Eithers.map (\t -> Model.ValueNumber t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralFloat v2 -> case v2 of+                            Core.FloatValueBigfloat v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected bigfloat value")+                          _ -> Left (Errors.DecodingError "expected bigfloat literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "object", (\input -> Eithers.map (\t -> Model.ValueObject t) (Helpers.decodeMap (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralString v2 -> Right v2+                          _ -> Left (Errors.DecodingError "expected string literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) value cx input))),+                      (Core.Name "string", (\input -> Eithers.map (\t -> Model.ValueString t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralString v2 -> Right v2+                          _ -> Left (Errors.DecodingError "expected string literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input))))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)
src/gen-main/haskell/Hydra/Decode/Module.hs view
@@ -6,6 +6,7 @@  import qualified Hydra.Core as Core import qualified Hydra.Decode.Core as Core_+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Helpers as Helpers import qualified Hydra.Graph as Graph import qualified Hydra.Lexical as Lexical@@ -14,7 +15,6 @@ import qualified Hydra.Lib.Maybes as Maybes import qualified Hydra.Lib.Strings as Strings import qualified Hydra.Module as Module-import qualified Hydra.Util as Util import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -22,94 +22,101 @@ import qualified Data.Map as M import qualified Data.Set as S -definition :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Module.Definition)-definition cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "term", (\input -> Eithers.map (\t -> Module.DefinitionTerm t) (termDefinition cx input))),-                (Core.Name "type", (\input -> Eithers.map (\t -> Module.DefinitionType t) (typeDefinition cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.module.Definition"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+definition :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Module.Definition+definition cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "term", (\input -> Eithers.map (\t -> Module.DefinitionTerm t) (termDefinition cx input))),+                      (Core.Name "type", (\input -> Eithers.map (\t -> Module.DefinitionType t) (typeDefinition cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -fileExtension :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Module.FileExtension)-fileExtension cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Module.FileExtension b) ((\raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.module.FileExtension"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+fileExtension :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Module.FileExtension+fileExtension cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Module.FileExtension b) ((\raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+        Core.TermLiteral v1 -> case v1 of+          Core.LiteralString v2 -> Right v2+          _ -> Left (Errors.DecodingError "expected string literal")+        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw) -module_ :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Module.Module)-module_ cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "namespace" namespace fieldMap cx) (\field_namespace -> Eithers.bind (Helpers.requireField "elements" (Helpers.decodeList Core_.binding) fieldMap cx) (\field_elements -> Eithers.bind (Helpers.requireField "termDependencies" (Helpers.decodeList namespace) fieldMap cx) (\field_termDependencies -> Eithers.bind (Helpers.requireField "typeDependencies" (Helpers.decodeList namespace) fieldMap cx) (\field_typeDependencies -> Eithers.bind (Helpers.requireField "description" (Helpers.decodeMaybe (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_description -> Right (Module.Module {-      Module.moduleNamespace = field_namespace,-      Module.moduleElements = field_elements,-      Module.moduleTermDependencies = field_termDependencies,-      Module.moduleTypeDependencies = field_typeDependencies,-      Module.moduleDescription = field_description})))))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.module.Module"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+module_ :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Module.Module+module_ cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "namespace" namespace fieldMap cx) (\field_namespace -> Eithers.bind (Helpers.requireField "definitions" (Helpers.decodeList definition) fieldMap cx) (\field_definitions -> Eithers.bind (Helpers.requireField "termDependencies" (Helpers.decodeList namespace) fieldMap cx) (\field_termDependencies -> Eithers.bind (Helpers.requireField "typeDependencies" (Helpers.decodeList namespace) fieldMap cx) (\field_typeDependencies -> Eithers.bind (Helpers.requireField "description" (Helpers.decodeMaybe (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_description -> Right (Module.Module {+          Module.moduleNamespace = field_namespace,+          Module.moduleDefinitions = field_definitions,+          Module.moduleTermDependencies = field_termDependencies,+          Module.moduleTypeDependencies = field_typeDependencies,+          Module.moduleDescription = field_description})))))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -namespace :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Module.Namespace)-namespace cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Module.Namespace b) ((\raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.module.Namespace"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+namespace :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Module.Namespace+namespace cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Module.Namespace b) ((\raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+        Core.TermLiteral v1 -> case v1 of+          Core.LiteralString v2 -> Right v2+          _ -> Left (Errors.DecodingError "expected string literal")+        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw) -namespaces :: ((Graph.Graph -> Core.Term -> Either Util.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Util.DecodingError (Module.Namespaces t0))-namespaces n cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "focus" (Helpers.decodePair namespace n) fieldMap cx) (\field_focus -> Eithers.bind (Helpers.requireField "mapping" (Helpers.decodeMap namespace n) fieldMap cx) (\field_mapping -> Right (Module.Namespaces {-      Module.namespacesFocus = field_focus,-      Module.namespacesMapping = field_mapping}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.module.Namespaces"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+namespaces :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Module.Namespaces t0)+namespaces n cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "focus" (Helpers.decodePair namespace n) fieldMap cx) (\field_focus -> Eithers.bind (Helpers.requireField "mapping" (Helpers.decodeMap namespace n) fieldMap cx) (\field_mapping -> Right (Module.Namespaces {+          Module.namespacesFocus = field_focus,+          Module.namespacesMapping = field_mapping}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -qualifiedName :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Module.QualifiedName)-qualifiedName cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "namespace" (Helpers.decodeMaybe namespace) fieldMap cx) (\field_namespace -> Eithers.bind (Helpers.requireField "local" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_local -> Right (Module.QualifiedName {-      Module.qualifiedNameNamespace = field_namespace,-      Module.qualifiedNameLocal = field_local}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.module.QualifiedName"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+qualifiedName :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Module.QualifiedName+qualifiedName cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "namespace" (Helpers.decodeMaybe namespace) fieldMap cx) (\field_namespace -> Eithers.bind (Helpers.requireField "local" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_local -> Right (Module.QualifiedName {+          Module.qualifiedNameNamespace = field_namespace,+          Module.qualifiedNameLocal = field_local}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -termDefinition :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Module.TermDefinition)-termDefinition cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "term" Core_.term fieldMap cx) (\field_term -> Eithers.bind (Helpers.requireField "type" Core_.typeScheme fieldMap cx) (\field_type -> Right (Module.TermDefinition {-      Module.termDefinitionName = field_name,-      Module.termDefinitionTerm = field_term,-      Module.termDefinitionType = field_type})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.module.TermDefinition"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+termDefinition :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Module.TermDefinition+termDefinition cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "term" Core_.term fieldMap cx) (\field_term -> Eithers.bind (Helpers.requireField "type" (Helpers.decodeMaybe Core_.typeScheme) fieldMap cx) (\field_type -> Right (Module.TermDefinition {+          Module.termDefinitionName = field_name,+          Module.termDefinitionTerm = field_term,+          Module.termDefinitionType = field_type})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -typeDefinition :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Module.TypeDefinition)-typeDefinition cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Right (Module.TypeDefinition {-      Module.typeDefinitionName = field_name,-      Module.typeDefinitionType = field_type}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.module.TypeDefinition"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+typeDefinition :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Module.TypeDefinition+typeDefinition cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Right (Module.TypeDefinition {+          Module.typeDefinitionName = field_name,+          Module.typeDefinitionType = field_type}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)
src/gen-main/haskell/Hydra/Decode/Parsing.hs view
@@ -5,6 +5,7 @@ module Hydra.Decode.Parsing where  import qualified Hydra.Core as Core+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Helpers as Helpers import qualified Hydra.Graph as Graph import qualified Hydra.Lexical as Lexical@@ -13,7 +14,6 @@ import qualified Hydra.Lib.Maybes as Maybes import qualified Hydra.Lib.Strings as Strings import qualified Hydra.Parsing as Parsing-import qualified Hydra.Util as Util import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -21,49 +21,51 @@ import qualified Data.Map as M import qualified Data.Set as S -parseError :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Parsing.ParseError)-parseError cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "message" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_message -> Eithers.bind (Helpers.requireField "remainder" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_remainder -> Right (Parsing.ParseError {-      Parsing.parseErrorMessage = field_message,-      Parsing.parseErrorRemainder = field_remainder}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.parsing.ParseError"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+parseError :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Parsing.ParseError+parseError cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "message" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_message -> Eithers.bind (Helpers.requireField "remainder" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_remainder -> Right (Parsing.ParseError {+          Parsing.parseErrorMessage = field_message,+          Parsing.parseErrorRemainder = field_remainder}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -parseResult :: ((Graph.Graph -> Core.Term -> Either Util.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Util.DecodingError (Parsing.ParseResult t0))-parseResult a cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "success", (\input -> Eithers.map (\t -> Parsing.ParseResultSuccess t) (parseSuccess a cx input))),-                (Core.Name "failure", (\input -> Eithers.map (\t -> Parsing.ParseResultFailure t) (parseError cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.parsing.ParseResult"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+parseResult :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Parsing.ParseResult t0)+parseResult a cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "success", (\input -> Eithers.map (\t -> Parsing.ParseResultSuccess t) (parseSuccess a cx input))),+                      (Core.Name "failure", (\input -> Eithers.map (\t -> Parsing.ParseResultFailure t) (parseError cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -parseSuccess :: ((Graph.Graph -> Core.Term -> Either Util.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Util.DecodingError (Parsing.ParseSuccess t0))-parseSuccess a cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "value" a fieldMap cx) (\field_value -> Eithers.bind (Helpers.requireField "remainder" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_remainder -> Right (Parsing.ParseSuccess {-      Parsing.parseSuccessValue = field_value,-      Parsing.parseSuccessRemainder = field_remainder}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.parsing.ParseSuccess"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+parseSuccess :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Parsing.ParseSuccess t0)+parseSuccess a cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "value" a fieldMap cx) (\field_value -> Eithers.bind (Helpers.requireField "remainder" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_remainder -> Right (Parsing.ParseSuccess {+          Parsing.parseSuccessValue = field_value,+          Parsing.parseSuccessRemainder = field_remainder}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)
+ src/gen-main/haskell/Hydra/Decode/Paths.hs view
@@ -0,0 +1,213 @@+-- Note: this is an automatically generated file. Do not edit.++-- | Term decoders for hydra.paths++module Hydra.Decode.Paths where++import qualified Hydra.Core as Core+import qualified Hydra.Decode.Core as Core_+import qualified Hydra.Errors as Errors+import qualified Hydra.Extract.Helpers as Helpers+import qualified Hydra.Graph as Graph+import qualified Hydra.Lexical as Lexical+import qualified Hydra.Lib.Eithers as Eithers+import qualified Hydra.Lib.Maps as Maps+import qualified Hydra.Lib.Maybes as Maybes+import qualified Hydra.Lib.Strings as Strings+import qualified Hydra.Paths as Paths+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++subtermEdge :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtermEdge+subtermEdge cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "source" subtermNode fieldMap cx) (\field_source -> Eithers.bind (Helpers.requireField "path" subtermPath fieldMap cx) (\field_path -> Eithers.bind (Helpers.requireField "target" subtermNode fieldMap cx) (\field_target -> Right (Paths.SubtermEdge {+          Paths.subtermEdgeSource = field_source,+          Paths.subtermEdgePath = field_path,+          Paths.subtermEdgeTarget = field_target})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++subtermGraph :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtermGraph+subtermGraph cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "nodes" (Helpers.decodeList subtermNode) fieldMap cx) (\field_nodes -> Eithers.bind (Helpers.requireField "edges" (Helpers.decodeList subtermEdge) fieldMap cx) (\field_edges -> Right (Paths.SubtermGraph {+          Paths.subtermGraphNodes = field_nodes,+          Paths.subtermGraphEdges = field_edges}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++subtermNode :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtermNode+subtermNode cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "label" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_label -> Eithers.bind (Helpers.requireField "id" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_id -> Right (Paths.SubtermNode {+          Paths.subtermNodeName = field_name,+          Paths.subtermNodeLabel = field_label,+          Paths.subtermNodeId = field_id})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++subtermPath :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtermPath+subtermPath cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Paths.SubtermPath b) (Helpers.decodeList subtermStep cx (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw)++subtermStep :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtermStep+subtermStep cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "annotatedBody", (\input -> Eithers.map (\t -> Paths.SubtermStepAnnotatedBody) (Helpers.decodeUnit cx input))),+                      (Core.Name "applicationFunction", (\input -> Eithers.map (\t -> Paths.SubtermStepApplicationFunction) (Helpers.decodeUnit cx input))),+                      (Core.Name "applicationArgument", (\input -> Eithers.map (\t -> Paths.SubtermStepApplicationArgument) (Helpers.decodeUnit cx input))),+                      (Core.Name "lambdaBody", (\input -> Eithers.map (\t -> Paths.SubtermStepLambdaBody) (Helpers.decodeUnit cx input))),+                      (Core.Name "unionCasesDefault", (\input -> Eithers.map (\t -> Paths.SubtermStepUnionCasesDefault) (Helpers.decodeUnit cx input))),+                      (Core.Name "unionCasesBranch", (\input -> Eithers.map (\t -> Paths.SubtermStepUnionCasesBranch t) (Core_.name cx input))),+                      (Core.Name "letBody", (\input -> Eithers.map (\t -> Paths.SubtermStepLetBody) (Helpers.decodeUnit cx input))),+                      (Core.Name "letBinding", (\input -> Eithers.map (\t -> Paths.SubtermStepLetBinding t) (Core_.name cx input))),+                      (Core.Name "listElement", (\input -> Eithers.map (\t -> Paths.SubtermStepListElement t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueInt32 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected int32 value")+                          _ -> Left (Errors.DecodingError "expected int32 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "mapKey", (\input -> Eithers.map (\t -> Paths.SubtermStepMapKey t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueInt32 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected int32 value")+                          _ -> Left (Errors.DecodingError "expected int32 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "mapValue", (\input -> Eithers.map (\t -> Paths.SubtermStepMapValue t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueInt32 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected int32 value")+                          _ -> Left (Errors.DecodingError "expected int32 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "maybeTerm", (\input -> Eithers.map (\t -> Paths.SubtermStepMaybeTerm) (Helpers.decodeUnit cx input))),+                      (Core.Name "productTerm", (\input -> Eithers.map (\t -> Paths.SubtermStepProductTerm t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueInt32 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected int32 value")+                          _ -> Left (Errors.DecodingError "expected int32 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "recordField", (\input -> Eithers.map (\t -> Paths.SubtermStepRecordField t) (Core_.name cx input))),+                      (Core.Name "setElement", (\input -> Eithers.map (\t -> Paths.SubtermStepSetElement t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueInt32 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected int32 value")+                          _ -> Left (Errors.DecodingError "expected int32 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "sumTerm", (\input -> Eithers.map (\t -> Paths.SubtermStepSumTerm) (Helpers.decodeUnit cx input))),+                      (Core.Name "typeLambdaBody", (\input -> Eithers.map (\t -> Paths.SubtermStepTypeLambdaBody) (Helpers.decodeUnit cx input))),+                      (Core.Name "typeApplicationTerm", (\input -> Eithers.map (\t -> Paths.SubtermStepTypeApplicationTerm) (Helpers.decodeUnit cx input))),+                      (Core.Name "injectionTerm", (\input -> Eithers.map (\t -> Paths.SubtermStepInjectionTerm) (Helpers.decodeUnit cx input))),+                      (Core.Name "wrappedTerm", (\input -> Eithers.map (\t -> Paths.SubtermStepWrappedTerm) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++subtypeEdge :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtypeEdge+subtypeEdge cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "source" subtypeNode fieldMap cx) (\field_source -> Eithers.bind (Helpers.requireField "path" subtypePath fieldMap cx) (\field_path -> Eithers.bind (Helpers.requireField "target" subtypeNode fieldMap cx) (\field_target -> Right (Paths.SubtypeEdge {+          Paths.subtypeEdgeSource = field_source,+          Paths.subtypeEdgePath = field_path,+          Paths.subtypeEdgeTarget = field_target})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++subtypeGraph :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtypeGraph+subtypeGraph cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "nodes" (Helpers.decodeList subtypeNode) fieldMap cx) (\field_nodes -> Eithers.bind (Helpers.requireField "edges" (Helpers.decodeList subtypeEdge) fieldMap cx) (\field_edges -> Right (Paths.SubtypeGraph {+          Paths.subtypeGraphNodes = field_nodes,+          Paths.subtypeGraphEdges = field_edges}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++subtypeNode :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtypeNode+subtypeNode cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "label" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_label -> Eithers.bind (Helpers.requireField "id" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_id -> Right (Paths.SubtypeNode {+          Paths.subtypeNodeName = field_name,+          Paths.subtypeNodeLabel = field_label,+          Paths.subtypeNodeId = field_id})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++subtypePath :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtypePath+subtypePath cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Paths.SubtypePath b) (Helpers.decodeList subtypeStep cx (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw)++subtypeStep :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Paths.SubtypeStep+subtypeStep cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "annotatedBody", (\input -> Eithers.map (\t -> Paths.SubtypeStepAnnotatedBody) (Helpers.decodeUnit cx input))),+                      (Core.Name "applicationFunction", (\input -> Eithers.map (\t -> Paths.SubtypeStepApplicationFunction) (Helpers.decodeUnit cx input))),+                      (Core.Name "applicationArgument", (\input -> Eithers.map (\t -> Paths.SubtypeStepApplicationArgument) (Helpers.decodeUnit cx input))),+                      (Core.Name "eitherLeft", (\input -> Eithers.map (\t -> Paths.SubtypeStepEitherLeft) (Helpers.decodeUnit cx input))),+                      (Core.Name "eitherRight", (\input -> Eithers.map (\t -> Paths.SubtypeStepEitherRight) (Helpers.decodeUnit cx input))),+                      (Core.Name "forallBody", (\input -> Eithers.map (\t -> Paths.SubtypeStepForallBody) (Helpers.decodeUnit cx input))),+                      (Core.Name "functionDomain", (\input -> Eithers.map (\t -> Paths.SubtypeStepFunctionDomain) (Helpers.decodeUnit cx input))),+                      (Core.Name "functionCodomain", (\input -> Eithers.map (\t -> Paths.SubtypeStepFunctionCodomain) (Helpers.decodeUnit cx input))),+                      (Core.Name "listElement", (\input -> Eithers.map (\t -> Paths.SubtypeStepListElement) (Helpers.decodeUnit cx input))),+                      (Core.Name "mapKeys", (\input -> Eithers.map (\t -> Paths.SubtypeStepMapKeys) (Helpers.decodeUnit cx input))),+                      (Core.Name "mapValues", (\input -> Eithers.map (\t -> Paths.SubtypeStepMapValues) (Helpers.decodeUnit cx input))),+                      (Core.Name "maybeElement", (\input -> Eithers.map (\t -> Paths.SubtypeStepMaybeElement) (Helpers.decodeUnit cx input))),+                      (Core.Name "pairFirst", (\input -> Eithers.map (\t -> Paths.SubtypeStepPairFirst) (Helpers.decodeUnit cx input))),+                      (Core.Name "pairSecond", (\input -> Eithers.map (\t -> Paths.SubtypeStepPairSecond) (Helpers.decodeUnit cx input))),+                      (Core.Name "recordField", (\input -> Eithers.map (\t -> Paths.SubtypeStepRecordField t) (Core_.name cx input))),+                      (Core.Name "setElement", (\input -> Eithers.map (\t -> Paths.SubtypeStepSetElement) (Helpers.decodeUnit cx input))),+                      (Core.Name "unionField", (\input -> Eithers.map (\t -> Paths.SubtypeStepUnionField t) (Core_.name cx input))),+                      (Core.Name "wrappedType", (\input -> Eithers.map (\t -> Paths.SubtypeStepWrappedType) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)
src/gen-main/haskell/Hydra/Decode/Phantoms.hs view
@@ -6,12 +6,12 @@  import qualified Hydra.Core as Core import qualified Hydra.Decode.Core as Core_+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Helpers as Helpers import qualified Hydra.Graph as Graph import qualified Hydra.Lexical as Lexical import qualified Hydra.Lib.Eithers as Eithers import qualified Hydra.Phantoms as Phantoms-import qualified Hydra.Util as Util import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -19,16 +19,18 @@ import qualified Data.Map as M import qualified Data.Set as S -tBinding :: (t0 -> Graph.Graph -> Core.Term -> Either Util.DecodingError (Phantoms.TBinding t1))-tBinding a cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "term" (tTerm a) fieldMap cx) (\field_term -> Right (Phantoms.TBinding {-      Phantoms.tBindingName = field_name,-      Phantoms.tBindingTerm = field_term}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.phantoms.TBinding"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+tBinding :: t0 -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Phantoms.TBinding t1)+tBinding a cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "name" Core_.name fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "term" (tTerm a) fieldMap cx) (\field_term -> Right (Phantoms.TBinding {+          Phantoms.tBindingName = field_name,+          Phantoms.tBindingTerm = field_term}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -tTerm :: (t0 -> Graph.Graph -> Core.Term -> Either Util.DecodingError (Phantoms.TTerm t1))-tTerm a cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Phantoms.TTerm b) (Core_.term cx (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.phantoms.TTerm"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+tTerm :: t0 -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Phantoms.TTerm t1)+tTerm a cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Phantoms.TTerm b) (Core_.term cx (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw)
src/gen-main/haskell/Hydra/Decode/Query.hs view
@@ -6,6 +6,7 @@  import qualified Hydra.Core as Core import qualified Hydra.Decode.Core as Core_+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Helpers as Helpers import qualified Hydra.Graph as Graph import qualified Hydra.Lexical as Lexical@@ -14,7 +15,6 @@ import qualified Hydra.Lib.Maybes as Maybes import qualified Hydra.Lib.Strings as Strings import qualified Hydra.Query as Query-import qualified Hydra.Util as Util import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -22,208 +22,235 @@ import qualified Data.Map as M import qualified Data.Set as S -comparisonConstraint :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Query.ComparisonConstraint)-comparisonConstraint cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "equal", (\input -> Eithers.map (\t -> Query.ComparisonConstraintEqual) (Helpers.decodeUnit cx input))),-                (Core.Name "notEqual", (\input -> Eithers.map (\t -> Query.ComparisonConstraintNotEqual) (Helpers.decodeUnit cx input))),-                (Core.Name "lessThan", (\input -> Eithers.map (\t -> Query.ComparisonConstraintLessThan) (Helpers.decodeUnit cx input))),-                (Core.Name "greaterThan", (\input -> Eithers.map (\t -> Query.ComparisonConstraintGreaterThan) (Helpers.decodeUnit cx input))),-                (Core.Name "lessThanOrEqual", (\input -> Eithers.map (\t -> Query.ComparisonConstraintLessThanOrEqual) (Helpers.decodeUnit cx input))),-                (Core.Name "greaterThanOrEqual", (\input -> Eithers.map (\t -> Query.ComparisonConstraintGreaterThanOrEqual) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.query.ComparisonConstraint"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+comparisonConstraint :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.ComparisonConstraint+comparisonConstraint cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "equal", (\input -> Eithers.map (\t -> Query.ComparisonConstraintEqual) (Helpers.decodeUnit cx input))),+                      (Core.Name "notEqual", (\input -> Eithers.map (\t -> Query.ComparisonConstraintNotEqual) (Helpers.decodeUnit cx input))),+                      (Core.Name "lessThan", (\input -> Eithers.map (\t -> Query.ComparisonConstraintLessThan) (Helpers.decodeUnit cx input))),+                      (Core.Name "greaterThan", (\input -> Eithers.map (\t -> Query.ComparisonConstraintGreaterThan) (Helpers.decodeUnit cx input))),+                      (Core.Name "lessThanOrEqual", (\input -> Eithers.map (\t -> Query.ComparisonConstraintLessThanOrEqual) (Helpers.decodeUnit cx input))),+                      (Core.Name "greaterThanOrEqual", (\input -> Eithers.map (\t -> Query.ComparisonConstraintGreaterThanOrEqual) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -edge :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Query.Edge)-edge cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "type" Core_.name fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "out" (Helpers.decodeMaybe Core_.name) fieldMap cx) (\field_out -> Eithers.bind (Helpers.requireField "in" (Helpers.decodeMaybe Core_.name) fieldMap cx) (\field_in -> Right (Query.Edge {-      Query.edgeType = field_type,-      Query.edgeOut = field_out,-      Query.edgeIn = field_in})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.query.Edge"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+edge :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Edge+edge cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "type" Core_.name fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "out" (Helpers.decodeMaybe Core_.name) fieldMap cx) (\field_out -> Eithers.bind (Helpers.requireField "in" (Helpers.decodeMaybe Core_.name) fieldMap cx) (\field_in -> Right (Query.Edge {+          Query.edgeType = field_type,+          Query.edgeOut = field_out,+          Query.edgeIn = field_in})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -graphPattern :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Query.GraphPattern)-graphPattern cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "graph" Core_.name fieldMap cx) (\field_graph -> Eithers.bind (Helpers.requireField "patterns" (Helpers.decodeList pattern) fieldMap cx) (\field_patterns -> Right (Query.GraphPattern {-      Query.graphPatternGraph = field_graph,-      Query.graphPatternPatterns = field_patterns}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.query.GraphPattern"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+graphPattern :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.GraphPattern+graphPattern cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "graph" Core_.name fieldMap cx) (\field_graph -> Eithers.bind (Helpers.requireField "patterns" (Helpers.decodeList pattern) fieldMap cx) (\field_patterns -> Right (Query.GraphPattern {+          Query.graphPatternGraph = field_graph,+          Query.graphPatternPatterns = field_patterns}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -node :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Query.Node)-node cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "term", (\input -> Eithers.map (\t -> Query.NodeTerm t) (Core_.term cx input))),-                (Core.Name "variable", (\input -> Eithers.map (\t -> Query.NodeVariable t) (variable cx input))),-                (Core.Name "wildcard", (\input -> Eithers.map (\t -> Query.NodeWildcard) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.query.Node"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+node :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Node+node cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "term", (\input -> Eithers.map (\t -> Query.NodeTerm t) (Core_.term cx input))),+                      (Core.Name "variable", (\input -> Eithers.map (\t -> Query.NodeVariable t) (variable cx input))),+                      (Core.Name "wildcard", (\input -> Eithers.map (\t -> Query.NodeWildcard) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -path :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Query.Path)-path cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "step", (\input -> Eithers.map (\t -> Query.PathStep t) (step cx input))),-                (Core.Name "regex", (\input -> Eithers.map (\t -> Query.PathRegex t) (regexSequence cx input))),-                (Core.Name "inverse", (\input -> Eithers.map (\t -> Query.PathInverse t) (path cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.query.Path"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+path :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Path+path cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "step", (\input -> Eithers.map (\t -> Query.PathStep t) (step cx input))),+                      (Core.Name "regex", (\input -> Eithers.map (\t -> Query.PathRegex t) (regexSequence cx input))),+                      (Core.Name "inverse", (\input -> Eithers.map (\t -> Query.PathInverse t) (path cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -pattern :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Query.Pattern)-pattern cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "triple", (\input -> Eithers.map (\t -> Query.PatternTriple t) (triplePattern cx input))),-                (Core.Name "negation", (\input -> Eithers.map (\t -> Query.PatternNegation t) (pattern cx input))),-                (Core.Name "conjunction", (\input -> Eithers.map (\t -> Query.PatternConjunction t) (Helpers.decodeList pattern cx input))),-                (Core.Name "disjunction", (\input -> Eithers.map (\t -> Query.PatternDisjunction t) (Helpers.decodeList pattern cx input))),-                (Core.Name "graph", (\input -> Eithers.map (\t -> Query.PatternGraph t) (graphPattern cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.query.Pattern"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+pathEquation :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.PathEquation+pathEquation cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "left" path fieldMap cx) (\field_left -> Eithers.bind (Helpers.requireField "right" path fieldMap cx) (\field_right -> Right (Query.PathEquation {+          Query.pathEquationLeft = field_left,+          Query.pathEquationRight = field_right}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -query :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Query.Query)-query cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "variables" (Helpers.decodeList variable) fieldMap cx) (\field_variables -> Eithers.bind (Helpers.requireField "patterns" (Helpers.decodeList pattern) fieldMap cx) (\field_patterns -> Right (Query.Query {-      Query.queryVariables = field_variables,-      Query.queryPatterns = field_patterns}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.query.Query"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+pattern :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Pattern+pattern cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "triple", (\input -> Eithers.map (\t -> Query.PatternTriple t) (triplePattern cx input))),+                      (Core.Name "negation", (\input -> Eithers.map (\t -> Query.PatternNegation t) (pattern cx input))),+                      (Core.Name "conjunction", (\input -> Eithers.map (\t -> Query.PatternConjunction t) (Helpers.decodeList pattern cx input))),+                      (Core.Name "disjunction", (\input -> Eithers.map (\t -> Query.PatternDisjunction t) (Helpers.decodeList pattern cx input))),+                      (Core.Name "graph", (\input -> Eithers.map (\t -> Query.PatternGraph t) (graphPattern cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -range :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Query.Range)-range cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "min" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralInteger v3 -> ((\x -> case x of-          Core.IntegerValueInt32 v4 -> (Right v4)-          _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-        _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_min -> Eithers.bind (Helpers.requireField "max" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralInteger v3 -> ((\x -> case x of-          Core.IntegerValueInt32 v4 -> (Right v4)-          _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-        _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_max -> Right (Query.Range {-      Query.rangeMin = field_min,-      Query.rangeMax = field_max}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.query.Range"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+patternImplication :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.PatternImplication+patternImplication cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "antecedent" pattern fieldMap cx) (\field_antecedent -> Eithers.bind (Helpers.requireField "consequent" pattern fieldMap cx) (\field_consequent -> Right (Query.PatternImplication {+          Query.patternImplicationAntecedent = field_antecedent,+          Query.patternImplicationConsequent = field_consequent}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -regexQuantifier :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Query.RegexQuantifier)-regexQuantifier cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "one", (\input -> Eithers.map (\t -> Query.RegexQuantifierOne) (Helpers.decodeUnit cx input))),-                (Core.Name "zeroOrOne", (\input -> Eithers.map (\t -> Query.RegexQuantifierZeroOrOne) (Helpers.decodeUnit cx input))),-                (Core.Name "zeroOrMore", (\input -> Eithers.map (\t -> Query.RegexQuantifierZeroOrMore) (Helpers.decodeUnit cx input))),-                (Core.Name "oneOrMore", (\input -> Eithers.map (\t -> Query.RegexQuantifierOneOrMore) (Helpers.decodeUnit cx input))),-                (Core.Name "exactly", (\input -> Eithers.map (\t -> Query.RegexQuantifierExactly t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueInt32 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "atLeast", (\input -> Eithers.map (\t -> Query.RegexQuantifierAtLeast t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueInt32 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "range", (\input -> Eithers.map (\t -> Query.RegexQuantifierRange t) (range cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.query.RegexQuantifier"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+query :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Query+query cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "variables" (Helpers.decodeList variable) fieldMap cx) (\field_variables -> Eithers.bind (Helpers.requireField "patterns" (Helpers.decodeList pattern) fieldMap cx) (\field_patterns -> Right (Query.Query {+          Query.queryVariables = field_variables,+          Query.queryPatterns = field_patterns}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -regexSequence :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Query.RegexSequence)-regexSequence cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "path" path fieldMap cx) (\field_path -> Eithers.bind (Helpers.requireField "quantifier" regexQuantifier fieldMap cx) (\field_quantifier -> Right (Query.RegexSequence {-      Query.regexSequencePath = field_path,-      Query.regexSequenceQuantifier = field_quantifier}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.query.RegexSequence"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+range :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Range+range cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "min" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralInteger v2 -> case v2 of+              Core.IntegerValueInt32 v3 -> Right v3+              _ -> Left (Errors.DecodingError "expected int32 value")+            _ -> Left (Errors.DecodingError "expected int32 literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_min -> Eithers.bind (Helpers.requireField "max" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralInteger v2 -> case v2 of+              Core.IntegerValueInt32 v3 -> Right v3+              _ -> Left (Errors.DecodingError "expected int32 value")+            _ -> Left (Errors.DecodingError "expected int32 literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_max -> Right (Query.Range {+          Query.rangeMin = field_min,+          Query.rangeMax = field_max}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -step :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Query.Step)-step cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "edge", (\input -> Eithers.map (\t -> Query.StepEdge t) (edge cx input))),-                (Core.Name "project", (\input -> Eithers.map (\t -> Query.StepProject t) (Core_.projection cx input))),-                (Core.Name "compare", (\input -> Eithers.map (\t -> Query.StepCompare t) (comparisonConstraint cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.query.Step"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+regexQuantifier :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.RegexQuantifier+regexQuantifier cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "one", (\input -> Eithers.map (\t -> Query.RegexQuantifierOne) (Helpers.decodeUnit cx input))),+                      (Core.Name "zeroOrOne", (\input -> Eithers.map (\t -> Query.RegexQuantifierZeroOrOne) (Helpers.decodeUnit cx input))),+                      (Core.Name "zeroOrMore", (\input -> Eithers.map (\t -> Query.RegexQuantifierZeroOrMore) (Helpers.decodeUnit cx input))),+                      (Core.Name "oneOrMore", (\input -> Eithers.map (\t -> Query.RegexQuantifierOneOrMore) (Helpers.decodeUnit cx input))),+                      (Core.Name "exactly", (\input -> Eithers.map (\t -> Query.RegexQuantifierExactly t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueInt32 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected int32 value")+                          _ -> Left (Errors.DecodingError "expected int32 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "atLeast", (\input -> Eithers.map (\t -> Query.RegexQuantifierAtLeast t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueInt32 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected int32 value")+                          _ -> Left (Errors.DecodingError "expected int32 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input)))),+                      (Core.Name "range", (\input -> Eithers.map (\t -> Query.RegexQuantifierRange t) (range cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -triplePattern :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Query.TriplePattern)-triplePattern cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "subject" node fieldMap cx) (\field_subject -> Eithers.bind (Helpers.requireField "predicate" path fieldMap cx) (\field_predicate -> Eithers.bind (Helpers.requireField "object" node fieldMap cx) (\field_object -> Right (Query.TriplePattern {-      Query.triplePatternSubject = field_subject,-      Query.triplePatternPredicate = field_predicate,-      Query.triplePatternObject = field_object})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.query.TriplePattern"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+regexSequence :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.RegexSequence+regexSequence cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "path" path fieldMap cx) (\field_path -> Eithers.bind (Helpers.requireField "quantifier" regexQuantifier fieldMap cx) (\field_quantifier -> Right (Query.RegexSequence {+          Query.regexSequencePath = field_path,+          Query.regexSequenceQuantifier = field_quantifier}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -variable :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Query.Variable)-variable cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Query.Variable b) ((\raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.query.Variable"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+step :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Step+step cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "edge", (\input -> Eithers.map (\t -> Query.StepEdge t) (edge cx input))),+                      (Core.Name "project", (\input -> Eithers.map (\t -> Query.StepProject t) (Core_.projection cx input))),+                      (Core.Name "compare", (\input -> Eithers.map (\t -> Query.StepCompare t) (comparisonConstraint cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++triplePattern :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.TriplePattern+triplePattern cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "subject" node fieldMap cx) (\field_subject -> Eithers.bind (Helpers.requireField "predicate" path fieldMap cx) (\field_predicate -> Eithers.bind (Helpers.requireField "object" node fieldMap cx) (\field_object -> Right (Query.TriplePattern {+          Query.triplePatternSubject = field_subject,+          Query.triplePatternPredicate = field_predicate,+          Query.triplePatternObject = field_object})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++variable :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Query.Variable+variable cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Query.Variable b) ((\raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+        Core.TermLiteral v1 -> case v1 of+          Core.LiteralString v2 -> Right v2+          _ -> Left (Errors.DecodingError "expected string literal")+        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw)
src/gen-main/haskell/Hydra/Decode/Relational.hs view
@@ -5,12 +5,12 @@ module Hydra.Decode.Relational where  import qualified Hydra.Core as Core+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Helpers as Helpers import qualified Hydra.Graph as Graph import qualified Hydra.Lexical as Lexical import qualified Hydra.Lib.Eithers as Eithers import qualified Hydra.Relational as Relational-import qualified Hydra.Util as Util import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -18,69 +18,78 @@ import qualified Data.Map as M import qualified Data.Set as S -columnName :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Relational.ColumnName)-columnName cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Relational.ColumnName b) ((\raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.relational.ColumnName"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+columnName :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Relational.ColumnName+columnName cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Relational.ColumnName b) ((\raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+        Core.TermLiteral v1 -> case v1 of+          Core.LiteralString v2 -> Right v2+          _ -> Left (Errors.DecodingError "expected string literal")+        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw) -columnSchema :: ((Graph.Graph -> Core.Term -> Either Util.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Util.DecodingError (Relational.ColumnSchema t0))-columnSchema t cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "name" columnName fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "domain" t fieldMap cx) (\field_domain -> Right (Relational.ColumnSchema {-      Relational.columnSchemaName = field_name,-      Relational.columnSchemaDomain = field_domain}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.relational.ColumnSchema"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+columnSchema :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Relational.ColumnSchema t0)+columnSchema t cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "name" columnName fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "domain" t fieldMap cx) (\field_domain -> Right (Relational.ColumnSchema {+          Relational.columnSchemaName = field_name,+          Relational.columnSchemaDomain = field_domain}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -foreignKey :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Relational.ForeignKey)-foreignKey cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "foreignRelation" relationName fieldMap cx) (\field_foreignRelation -> Eithers.bind (Helpers.requireField "keys" (Helpers.decodeMap columnName columnName) fieldMap cx) (\field_keys -> Right (Relational.ForeignKey {-      Relational.foreignKeyForeignRelation = field_foreignRelation,-      Relational.foreignKeyKeys = field_keys}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.relational.ForeignKey"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+foreignKey :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Relational.ForeignKey+foreignKey cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "foreignRelation" relationName fieldMap cx) (\field_foreignRelation -> Eithers.bind (Helpers.requireField "keys" (Helpers.decodeMap columnName columnName) fieldMap cx) (\field_keys -> Right (Relational.ForeignKey {+          Relational.foreignKeyForeignRelation = field_foreignRelation,+          Relational.foreignKeyKeys = field_keys}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -primaryKey :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Relational.PrimaryKey)-primaryKey cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Relational.PrimaryKey b) (Helpers.decodeList columnName cx (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.relational.PrimaryKey"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+primaryKey :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Relational.PrimaryKey+primaryKey cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Relational.PrimaryKey b) (Helpers.decodeList columnName cx (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw) -relation :: ((Graph.Graph -> Core.Term -> Either Util.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Util.DecodingError (Relational.Relation t0))-relation v cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Relational.Relation b) (Helpers.decodeList (row v) cx (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.relational.Relation"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+relation :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Relational.Relation t0)+relation v cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Relational.Relation b) (Helpers.decodeList (row v) cx (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw) -relationName :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Relational.RelationName)-relationName cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Relational.RelationName b) ((\raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.relational.RelationName"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+relationName :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Relational.RelationName+relationName cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Relational.RelationName b) ((\raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+        Core.TermLiteral v1 -> case v1 of+          Core.LiteralString v2 -> Right v2+          _ -> Left (Errors.DecodingError "expected string literal")+        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw) -relationSchema :: ((Graph.Graph -> Core.Term -> Either Util.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Util.DecodingError (Relational.RelationSchema t0))-relationSchema t cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "name" relationName fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "columns" (Helpers.decodeList (columnSchema t)) fieldMap cx) (\field_columns -> Eithers.bind (Helpers.requireField "primaryKeys" (Helpers.decodeList primaryKey) fieldMap cx) (\field_primaryKeys -> Eithers.bind (Helpers.requireField "foreignKeys" (Helpers.decodeList foreignKey) fieldMap cx) (\field_foreignKeys -> Right (Relational.RelationSchema {-      Relational.relationSchemaName = field_name,-      Relational.relationSchemaColumns = field_columns,-      Relational.relationSchemaPrimaryKeys = field_primaryKeys,-      Relational.relationSchemaForeignKeys = field_foreignKeys}))))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.relational.RelationSchema"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+relationSchema :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Relational.RelationSchema t0)+relationSchema t cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "name" relationName fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "columns" (Helpers.decodeList (columnSchema t)) fieldMap cx) (\field_columns -> Eithers.bind (Helpers.requireField "primaryKeys" (Helpers.decodeList primaryKey) fieldMap cx) (\field_primaryKeys -> Eithers.bind (Helpers.requireField "foreignKeys" (Helpers.decodeList foreignKey) fieldMap cx) (\field_foreignKeys -> Right (Relational.RelationSchema {+          Relational.relationSchemaName = field_name,+          Relational.relationSchemaColumns = field_columns,+          Relational.relationSchemaPrimaryKeys = field_primaryKeys,+          Relational.relationSchemaForeignKeys = field_foreignKeys}))))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -relationship :: Ord t0 => ((Graph.Graph -> Core.Term -> Either Util.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Util.DecodingError (Relational.Relationship t0))-relationship v cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Relational.Relationship b) (Helpers.decodeSet (Helpers.decodeMap columnName v) cx (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.relational.Relationship"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+relationship :: Ord t0 => ((Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Relational.Relationship t0))+relationship v cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Relational.Relationship b) (Helpers.decodeSet (Helpers.decodeMap columnName v) cx (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw) -row :: ((Graph.Graph -> Core.Term -> Either Util.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Util.DecodingError (Relational.Row t0))-row v cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Relational.Row b) (Helpers.decodeList v cx (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.relational.Row"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+row :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Relational.Row t0)+row v cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Relational.Row b) (Helpers.decodeList v cx (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw)
src/gen-main/haskell/Hydra/Decode/Tabular.hs view
@@ -7,12 +7,12 @@ import qualified Hydra.Core as Core import qualified Hydra.Decode.Core as Core_ import qualified Hydra.Decode.Relational as Relational+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Helpers as Helpers import qualified Hydra.Graph as Graph import qualified Hydra.Lexical as Lexical import qualified Hydra.Lib.Eithers as Eithers import qualified Hydra.Tabular as Tabular-import qualified Hydra.Util as Util import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -20,43 +20,48 @@ import qualified Data.Map as M import qualified Data.Set as S -columnType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Tabular.ColumnType)-columnType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "name" Relational.columnName fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Right (Tabular.ColumnType {-      Tabular.columnTypeName = field_name,-      Tabular.columnTypeType = field_type}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.tabular.ColumnType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+columnType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Tabular.ColumnType+columnType cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "name" Relational.columnName fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Right (Tabular.ColumnType {+          Tabular.columnTypeName = field_name,+          Tabular.columnTypeType = field_type}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -dataRow :: ((Graph.Graph -> Core.Term -> Either Util.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Util.DecodingError (Tabular.DataRow t0))-dataRow v cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Tabular.DataRow b) (Helpers.decodeList (Helpers.decodeMaybe v) cx (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.tabular.DataRow"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+dataRow :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Tabular.DataRow t0)+dataRow v cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Tabular.DataRow b) (Helpers.decodeList (Helpers.decodeMaybe v) cx (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw) -headerRow :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Tabular.HeaderRow)-headerRow cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Tabular.HeaderRow b) (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) cx (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.tabular.HeaderRow"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+headerRow :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Tabular.HeaderRow+headerRow cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Tabular.HeaderRow b) (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+        Core.TermLiteral v1 -> case v1 of+          Core.LiteralString v2 -> Right v2+          _ -> Left (Errors.DecodingError "expected string literal")+        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) cx (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw) -table :: ((Graph.Graph -> Core.Term -> Either Util.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Util.DecodingError (Tabular.Table t0))-table v cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "header" (Helpers.decodeMaybe headerRow) fieldMap cx) (\field_header -> Eithers.bind (Helpers.requireField "data" (Helpers.decodeList (dataRow v)) fieldMap cx) (\field_data -> Right (Tabular.Table {-      Tabular.tableHeader = field_header,-      Tabular.tableData = field_data}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.tabular.Table"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+table :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Tabular.Table t0)+table v cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "header" (Helpers.decodeMaybe headerRow) fieldMap cx) (\field_header -> Eithers.bind (Helpers.requireField "data" (Helpers.decodeList (dataRow v)) fieldMap cx) (\field_data -> Right (Tabular.Table {+          Tabular.tableHeader = field_header,+          Tabular.tableData = field_data}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -tableType :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Tabular.TableType)-tableType cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "name" Relational.relationName fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "columns" (Helpers.decodeList columnType) fieldMap cx) (\field_columns -> Right (Tabular.TableType {-      Tabular.tableTypeName = field_name,-      Tabular.tableTypeColumns = field_columns}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.tabular.TableType"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+tableType :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Tabular.TableType+tableType cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "name" Relational.relationName fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "columns" (Helpers.decodeList columnType) fieldMap cx) (\field_columns -> Right (Tabular.TableType {+          Tabular.tableTypeName = field_name,+          Tabular.tableTypeColumns = field_columns}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)
src/gen-main/haskell/Hydra/Decode/Testing.hs view
@@ -8,662 +8,709 @@ import qualified Hydra.Decode.Ast as Ast import qualified Hydra.Decode.Coders as Coders import qualified Hydra.Decode.Core as Core_-import qualified Hydra.Decode.Json.Model as Model-import qualified Hydra.Decode.Parsing as Parsing-import qualified Hydra.Decode.Typing as Typing-import qualified Hydra.Decode.Util as Util-import qualified Hydra.Extract.Helpers as Helpers-import qualified Hydra.Graph as Graph-import qualified Hydra.Json.Model as Model_-import qualified Hydra.Lexical as Lexical-import qualified Hydra.Lib.Eithers as Eithers-import qualified Hydra.Lib.Maps as Maps-import qualified Hydra.Lib.Maybes as Maybes-import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Testing as Testing-import qualified Hydra.Util as Util_-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S--alphaConversionTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.AlphaConversionTestCase)-alphaConversionTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "term" Core_.term fieldMap cx) (\field_term -> Eithers.bind (Helpers.requireField "oldVariable" Core_.name fieldMap cx) (\field_oldVariable -> Eithers.bind (Helpers.requireField "newVariable" Core_.name fieldMap cx) (\field_newVariable -> Eithers.bind (Helpers.requireField "result" Core_.term fieldMap cx) (\field_result -> Right (Testing.AlphaConversionTestCase {-      Testing.alphaConversionTestCaseTerm = field_term,-      Testing.alphaConversionTestCaseOldVariable = field_oldVariable,-      Testing.alphaConversionTestCaseNewVariable = field_newVariable,-      Testing.alphaConversionTestCaseResult = field_result}))))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.AlphaConversionTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--evaluationStyle :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.EvaluationStyle)-evaluationStyle cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "eager", (\input -> Eithers.map (\t -> Testing.EvaluationStyleEager) (Helpers.decodeUnit cx input))),-                (Core.Name "lazy", (\input -> Eithers.map (\t -> Testing.EvaluationStyleLazy) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util_.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util_.DecodingError "expected union of type hydra.testing.EvaluationStyle"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--caseConversionTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.CaseConversionTestCase)-caseConversionTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "fromConvention" Util.caseConvention fieldMap cx) (\field_fromConvention -> Eithers.bind (Helpers.requireField "toConvention" Util.caseConvention fieldMap cx) (\field_toConvention -> Eithers.bind (Helpers.requireField "fromString" (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util_.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_fromString -> Eithers.bind (Helpers.requireField "toString" (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util_.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_toString -> Right (Testing.CaseConversionTestCase {-      Testing.caseConversionTestCaseFromConvention = field_fromConvention,-      Testing.caseConversionTestCaseToConvention = field_toConvention,-      Testing.caseConversionTestCaseFromString = field_fromString,-      Testing.caseConversionTestCaseToString = field_toString}))))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.CaseConversionTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--delegatedEvaluationTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.DelegatedEvaluationTestCase)-delegatedEvaluationTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.DelegatedEvaluationTestCase {-      Testing.delegatedEvaluationTestCaseInput = field_input,-      Testing.delegatedEvaluationTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.DelegatedEvaluationTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--etaExpansionTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.EtaExpansionTestCase)-etaExpansionTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.EtaExpansionTestCase {-      Testing.etaExpansionTestCaseInput = field_input,-      Testing.etaExpansionTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.EtaExpansionTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--deannotateTermTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.DeannotateTermTestCase)-deannotateTermTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.DeannotateTermTestCase {-      Testing.deannotateTermTestCaseInput = field_input,-      Testing.deannotateTermTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.DeannotateTermTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--deannotateTypeTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.DeannotateTypeTestCase)-deannotateTypeTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.type_ fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.type_ fieldMap cx) (\field_output -> Right (Testing.DeannotateTypeTestCase {-      Testing.deannotateTypeTestCaseInput = field_input,-      Testing.deannotateTypeTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.DeannotateTypeTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--flattenLetTermsTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.FlattenLetTermsTestCase)-flattenLetTermsTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.FlattenLetTermsTestCase {-      Testing.flattenLetTermsTestCaseInput = field_input,-      Testing.flattenLetTermsTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.FlattenLetTermsTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--foldOperation :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.FoldOperation)-foldOperation cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "sumInt32Literals", (\input -> Eithers.map (\t -> Testing.FoldOperationSumInt32Literals) (Helpers.decodeUnit cx input))),-                (Core.Name "collectListLengths", (\input -> Eithers.map (\t -> Testing.FoldOperationCollectListLengths) (Helpers.decodeUnit cx input))),-                (Core.Name "collectLabels", (\input -> Eithers.map (\t -> Testing.FoldOperationCollectLabels) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util_.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util_.DecodingError "expected union of type hydra.testing.FoldOperation"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--foldOverTermTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.FoldOverTermTestCase)-foldOverTermTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "traversalOrder" Coders.traversalOrder fieldMap cx) (\field_traversalOrder -> Eithers.bind (Helpers.requireField "operation" foldOperation fieldMap cx) (\field_operation -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.FoldOverTermTestCase {-      Testing.foldOverTermTestCaseInput = field_input,-      Testing.foldOverTermTestCaseTraversalOrder = field_traversalOrder,-      Testing.foldOverTermTestCaseOperation = field_operation,-      Testing.foldOverTermTestCaseOutput = field_output}))))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.FoldOverTermTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--freeVariablesTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.FreeVariablesTestCase)-freeVariablesTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" (Helpers.decodeSet Core_.name) fieldMap cx) (\field_output -> Right (Testing.FreeVariablesTestCase {-      Testing.freeVariablesTestCaseInput = field_input,-      Testing.freeVariablesTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.FreeVariablesTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--hoistPredicate :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.HoistPredicate)-hoistPredicate cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "caseStatements", (\input -> Eithers.map (\t -> Testing.HoistPredicateCaseStatements) (Helpers.decodeUnit cx input))),-                (Core.Name "applications", (\input -> Eithers.map (\t -> Testing.HoistPredicateApplications) (Helpers.decodeUnit cx input))),-                (Core.Name "lists", (\input -> Eithers.map (\t -> Testing.HoistPredicateLists) (Helpers.decodeUnit cx input))),-                (Core.Name "nothing", (\input -> Eithers.map (\t -> Testing.HoistPredicateNothing) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util_.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util_.DecodingError "expected union of type hydra.testing.HoistPredicate"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--hoistLetBindingsTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.HoistLetBindingsTestCase)-hoistLetBindingsTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.let_ fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.let_ fieldMap cx) (\field_output -> Right (Testing.HoistLetBindingsTestCase {-      Testing.hoistLetBindingsTestCaseInput = field_input,-      Testing.hoistLetBindingsTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.HoistLetBindingsTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--hoistPolymorphicLetBindingsTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.HoistPolymorphicLetBindingsTestCase)-hoistPolymorphicLetBindingsTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.let_ fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.let_ fieldMap cx) (\field_output -> Right (Testing.HoistPolymorphicLetBindingsTestCase {-      Testing.hoistPolymorphicLetBindingsTestCaseInput = field_input,-      Testing.hoistPolymorphicLetBindingsTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.HoistPolymorphicLetBindingsTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--hoistSubtermsTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.HoistSubtermsTestCase)-hoistSubtermsTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "predicate" hoistPredicate fieldMap cx) (\field_predicate -> Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.HoistSubtermsTestCase {-      Testing.hoistSubtermsTestCasePredicate = field_predicate,-      Testing.hoistSubtermsTestCaseInput = field_input,-      Testing.hoistSubtermsTestCaseOutput = field_output})))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.HoistSubtermsTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--hoistCaseStatementsTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.HoistCaseStatementsTestCase)-hoistCaseStatementsTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.HoistCaseStatementsTestCase {-      Testing.hoistCaseStatementsTestCaseInput = field_input,-      Testing.hoistCaseStatementsTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.HoistCaseStatementsTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--termRewriter :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.TermRewriter)-termRewriter cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "replaceFooWithBar", (\input -> Eithers.map (\t -> Testing.TermRewriterReplaceFooWithBar) (Helpers.decodeUnit cx input))),-                (Core.Name "replaceInt32WithInt64", (\input -> Eithers.map (\t -> Testing.TermRewriterReplaceInt32WithInt64) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util_.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util_.DecodingError "expected union of type hydra.testing.TermRewriter"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--rewriteTermTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.RewriteTermTestCase)-rewriteTermTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "rewriter" termRewriter fieldMap cx) (\field_rewriter -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.RewriteTermTestCase {-      Testing.rewriteTermTestCaseInput = field_input,-      Testing.rewriteTermTestCaseRewriter = field_rewriter,-      Testing.rewriteTermTestCaseOutput = field_output})))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.RewriteTermTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--typeRewriter :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.TypeRewriter)-typeRewriter cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "replaceStringWithInt32", (\input -> Eithers.map (\t -> Testing.TypeRewriterReplaceStringWithInt32) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util_.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util_.DecodingError "expected union of type hydra.testing.TypeRewriter"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--rewriteTypeTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.RewriteTypeTestCase)-rewriteTypeTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.type_ fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "rewriter" typeRewriter fieldMap cx) (\field_rewriter -> Eithers.bind (Helpers.requireField "output" Core_.type_ fieldMap cx) (\field_output -> Right (Testing.RewriteTypeTestCase {-      Testing.rewriteTypeTestCaseInput = field_input,-      Testing.rewriteTypeTestCaseRewriter = field_rewriter,-      Testing.rewriteTypeTestCaseOutput = field_output})))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.RewriteTypeTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--evaluationTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.EvaluationTestCase)-evaluationTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "evaluationStyle" evaluationStyle fieldMap cx) (\field_evaluationStyle -> Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.EvaluationTestCase {-      Testing.evaluationTestCaseEvaluationStyle = field_evaluationStyle,-      Testing.evaluationTestCaseInput = field_input,-      Testing.evaluationTestCaseOutput = field_output})))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.EvaluationTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--inferenceFailureTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.InferenceFailureTestCase)-inferenceFailureTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Right (Testing.InferenceFailureTestCase {-      Testing.inferenceFailureTestCaseInput = field_input})))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.InferenceFailureTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--inferenceTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.InferenceTestCase)-inferenceTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.typeScheme fieldMap cx) (\field_output -> Right (Testing.InferenceTestCase {-      Testing.inferenceTestCaseInput = field_input,-      Testing.inferenceTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.InferenceTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--jsonCoderTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.JsonCoderTestCase)-jsonCoderTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "term" Core_.term fieldMap cx) (\field_term -> Eithers.bind (Helpers.requireField "json" Model.value fieldMap cx) (\field_json -> Right (Testing.JsonCoderTestCase {-      Testing.jsonCoderTestCaseType = field_type,-      Testing.jsonCoderTestCaseTerm = field_term,-      Testing.jsonCoderTestCaseJson = field_json})))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.JsonCoderTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--jsonDecodeTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.JsonDecodeTestCase)-jsonDecodeTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "json" Model.value fieldMap cx) (\field_json -> Eithers.bind (Helpers.requireField "expected" (Helpers.decodeEither (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util_.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) Core_.term) fieldMap cx) (\field_expected -> Right (Testing.JsonDecodeTestCase {-      Testing.jsonDecodeTestCaseType = field_type,-      Testing.jsonDecodeTestCaseJson = field_json,-      Testing.jsonDecodeTestCaseExpected = field_expected})))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.JsonDecodeTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--jsonEncodeTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.JsonEncodeTestCase)-jsonEncodeTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "term" Core_.term fieldMap cx) (\field_term -> Eithers.bind (Helpers.requireField "expected" (Helpers.decodeEither (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util_.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) Model.value) fieldMap cx) (\field_expected -> Right (Testing.JsonEncodeTestCase {-      Testing.jsonEncodeTestCaseTerm = field_term,-      Testing.jsonEncodeTestCaseExpected = field_expected}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.JsonEncodeTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--jsonParserTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError (Testing.ParserTestCase Model_.Value))-jsonParserTestCase = (parserTestCase Model.value)--jsonRoundtripTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.JsonRoundtripTestCase)-jsonRoundtripTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "term" Core_.term fieldMap cx) (\field_term -> Right (Testing.JsonRoundtripTestCase {-      Testing.jsonRoundtripTestCaseType = field_type,-      Testing.jsonRoundtripTestCaseTerm = field_term}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.JsonRoundtripTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--liftLambdaAboveLetTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.LiftLambdaAboveLetTestCase)-liftLambdaAboveLetTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.LiftLambdaAboveLetTestCase {-      Testing.liftLambdaAboveLetTestCaseInput = field_input,-      Testing.liftLambdaAboveLetTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.LiftLambdaAboveLetTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--jsonWriterTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError (Testing.WriterTestCase Model_.Value))-jsonWriterTestCase = (writerTestCase Model.value)--parserTestCase :: ((Graph.Graph -> Core.Term -> Either Util_.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Util_.DecodingError (Testing.ParserTestCase t0))-parserTestCase a cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util_.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" (Parsing.parseResult a) fieldMap cx) (\field_output -> Right (Testing.ParserTestCase {-      Testing.parserTestCaseInput = field_input,-      Testing.parserTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.ParserTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--tag :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.Tag)-tag cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Testing.Tag b) ((\raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util_.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util_.DecodingError "expected wrapped type hydra.testing.Tag"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--testCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.TestCase)-testCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "alphaConversion", (\input -> Eithers.map (\t -> Testing.TestCaseAlphaConversion t) (alphaConversionTestCase cx input))),-                (Core.Name "caseConversion", (\input -> Eithers.map (\t -> Testing.TestCaseCaseConversion t) (caseConversionTestCase cx input))),-                (Core.Name "deannotateTerm", (\input -> Eithers.map (\t -> Testing.TestCaseDeannotateTerm t) (deannotateTermTestCase cx input))),-                (Core.Name "deannotateType", (\input -> Eithers.map (\t -> Testing.TestCaseDeannotateType t) (deannotateTypeTestCase cx input))),-                (Core.Name "delegatedEvaluation", (\input -> Eithers.map (\t -> Testing.TestCaseDelegatedEvaluation t) (delegatedEvaluationTestCase cx input))),-                (Core.Name "etaExpansion", (\input -> Eithers.map (\t -> Testing.TestCaseEtaExpansion t) (etaExpansionTestCase cx input))),-                (Core.Name "flattenLetTerms", (\input -> Eithers.map (\t -> Testing.TestCaseFlattenLetTerms t) (flattenLetTermsTestCase cx input))),-                (Core.Name "freeVariables", (\input -> Eithers.map (\t -> Testing.TestCaseFreeVariables t) (freeVariablesTestCase cx input))),-                (Core.Name "evaluation", (\input -> Eithers.map (\t -> Testing.TestCaseEvaluation t) (evaluationTestCase cx input))),-                (Core.Name "inference", (\input -> Eithers.map (\t -> Testing.TestCaseInference t) (inferenceTestCase cx input))),-                (Core.Name "inferenceFailure", (\input -> Eithers.map (\t -> Testing.TestCaseInferenceFailure t) (inferenceFailureTestCase cx input))),-                (Core.Name "jsonCoder", (\input -> Eithers.map (\t -> Testing.TestCaseJsonCoder t) (jsonCoderTestCase cx input))),-                (Core.Name "jsonDecode", (\input -> Eithers.map (\t -> Testing.TestCaseJsonDecode t) (jsonDecodeTestCase cx input))),-                (Core.Name "jsonEncode", (\input -> Eithers.map (\t -> Testing.TestCaseJsonEncode t) (jsonEncodeTestCase cx input))),-                (Core.Name "jsonParser", (\input -> Eithers.map (\t -> Testing.TestCaseJsonParser t) (jsonParserTestCase cx input))),-                (Core.Name "jsonRoundtrip", (\input -> Eithers.map (\t -> Testing.TestCaseJsonRoundtrip t) (jsonRoundtripTestCase cx input))),-                (Core.Name "jsonWriter", (\input -> Eithers.map (\t -> Testing.TestCaseJsonWriter t) (jsonWriterTestCase cx input))),-                (Core.Name "liftLambdaAboveLet", (\input -> Eithers.map (\t -> Testing.TestCaseLiftLambdaAboveLet t) (liftLambdaAboveLetTestCase cx input))),-                (Core.Name "serialization", (\input -> Eithers.map (\t -> Testing.TestCaseSerialization t) (serializationTestCase cx input))),-                (Core.Name "simplifyTerm", (\input -> Eithers.map (\t -> Testing.TestCaseSimplifyTerm t) (simplifyTermTestCase cx input))),-                (Core.Name "topologicalSort", (\input -> Eithers.map (\t -> Testing.TestCaseTopologicalSort t) (topologicalSortTestCase cx input))),-                (Core.Name "topologicalSortBindings", (\input -> Eithers.map (\t -> Testing.TestCaseTopologicalSortBindings t) (topologicalSortBindingsTestCase cx input))),-                (Core.Name "topologicalSortSCC", (\input -> Eithers.map (\t -> Testing.TestCaseTopologicalSortSCC t) (topologicalSortSCCTestCase cx input))),-                (Core.Name "typeChecking", (\input -> Eithers.map (\t -> Testing.TestCaseTypeChecking t) (typeCheckingTestCase cx input))),-                (Core.Name "typeCheckingFailure", (\input -> Eithers.map (\t -> Testing.TestCaseTypeCheckingFailure t) (typeCheckingFailureTestCase cx input))),-                (Core.Name "typeReduction", (\input -> Eithers.map (\t -> Testing.TestCaseTypeReduction t) (typeReductionTestCase cx input))),-                (Core.Name "normalizeTypeVariables", (\input -> Eithers.map (\t -> Testing.TestCaseNormalizeTypeVariables t) (normalizeTypeVariablesTestCase cx input))),-                (Core.Name "foldOverTerm", (\input -> Eithers.map (\t -> Testing.TestCaseFoldOverTerm t) (foldOverTermTestCase cx input))),-                (Core.Name "rewriteTerm", (\input -> Eithers.map (\t -> Testing.TestCaseRewriteTerm t) (rewriteTermTestCase cx input))),-                (Core.Name "rewriteType", (\input -> Eithers.map (\t -> Testing.TestCaseRewriteType t) (rewriteTypeTestCase cx input))),-                (Core.Name "hoistSubterms", (\input -> Eithers.map (\t -> Testing.TestCaseHoistSubterms t) (hoistSubtermsTestCase cx input))),-                (Core.Name "hoistCaseStatements", (\input -> Eithers.map (\t -> Testing.TestCaseHoistCaseStatements t) (hoistCaseStatementsTestCase cx input))),-                (Core.Name "hoistLetBindings", (\input -> Eithers.map (\t -> Testing.TestCaseHoistLetBindings t) (hoistLetBindingsTestCase cx input))),-                (Core.Name "hoistPolymorphicLetBindings", (\input -> Eithers.map (\t -> Testing.TestCaseHoistPolymorphicLetBindings t) (hoistPolymorphicLetBindingsTestCase cx input))),-                (Core.Name "substInType", (\input -> Eithers.map (\t -> Testing.TestCaseSubstInType t) (substInTypeTestCase cx input))),-                (Core.Name "variableOccursInType", (\input -> Eithers.map (\t -> Testing.TestCaseVariableOccursInType t) (variableOccursInTypeTestCase cx input))),-                (Core.Name "unifyTypes", (\input -> Eithers.map (\t -> Testing.TestCaseUnifyTypes t) (unifyTypesTestCase cx input))),-                (Core.Name "joinTypes", (\input -> Eithers.map (\t -> Testing.TestCaseJoinTypes t) (joinTypesTestCase cx input))),-                (Core.Name "unshadowVariables", (\input -> Eithers.map (\t -> Testing.TestCaseUnshadowVariables t) (unshadowVariablesTestCase cx input)))])-    in (Maybes.maybe (Left (Util_.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util_.DecodingError "expected union of type hydra.testing.TestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--testCaseWithMetadata :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.TestCaseWithMetadata)-testCaseWithMetadata cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "name" (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util_.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "case" testCase fieldMap cx) (\field_case -> Eithers.bind (Helpers.requireField "description" (Helpers.decodeMaybe (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util_.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_description -> Eithers.bind (Helpers.requireField "tags" (Helpers.decodeList tag) fieldMap cx) (\field_tags -> Right (Testing.TestCaseWithMetadata {-      Testing.testCaseWithMetadataName = field_name,-      Testing.testCaseWithMetadataCase = field_case,-      Testing.testCaseWithMetadataDescription = field_description,-      Testing.testCaseWithMetadataTags = field_tags}))))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.TestCaseWithMetadata"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--testGroup :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.TestGroup)-testGroup cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "name" (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util_.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "description" (Helpers.decodeMaybe (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util_.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_description -> Eithers.bind (Helpers.requireField "subgroups" (Helpers.decodeList testGroup) fieldMap cx) (\field_subgroups -> Eithers.bind (Helpers.requireField "cases" (Helpers.decodeList testCaseWithMetadata) fieldMap cx) (\field_cases -> Right (Testing.TestGroup {-      Testing.testGroupName = field_name,-      Testing.testGroupDescription = field_description,-      Testing.testGroupSubgroups = field_subgroups,-      Testing.testGroupCases = field_cases}))))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.TestGroup"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--typeCheckingTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.TypeCheckingTestCase)-typeCheckingTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "outputTerm" Core_.term fieldMap cx) (\field_outputTerm -> Eithers.bind (Helpers.requireField "outputType" Core_.type_ fieldMap cx) (\field_outputType -> Right (Testing.TypeCheckingTestCase {-      Testing.typeCheckingTestCaseInput = field_input,-      Testing.typeCheckingTestCaseOutputTerm = field_outputTerm,-      Testing.typeCheckingTestCaseOutputType = field_outputType})))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.TypeCheckingTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--typeCheckingFailureTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.TypeCheckingFailureTestCase)-typeCheckingFailureTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Right (Testing.TypeCheckingFailureTestCase {-      Testing.typeCheckingFailureTestCaseInput = field_input})))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.TypeCheckingFailureTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--topologicalSortBindingsTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.TopologicalSortBindingsTestCase)-topologicalSortBindingsTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "bindings" (Helpers.decodeList (Helpers.decodePair Core_.name Core_.term)) fieldMap cx) (\field_bindings -> Eithers.bind (Helpers.requireField "expected" (Helpers.decodeList (Helpers.decodeList (Helpers.decodePair Core_.name Core_.term))) fieldMap cx) (\field_expected -> Right (Testing.TopologicalSortBindingsTestCase {-      Testing.topologicalSortBindingsTestCaseBindings = field_bindings,-      Testing.topologicalSortBindingsTestCaseExpected = field_expected}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.TopologicalSortBindingsTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--topologicalSortTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.TopologicalSortTestCase)-topologicalSortTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "adjacencyList" (Helpers.decodeList (Helpers.decodePair (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralInteger v3 -> ((\x -> case x of-          Core.IntegerValueInt32 v4 -> (Right v4)-          _ -> (Left (Util_.DecodingError "expected int32 value"))) v3)-        _ -> (Left (Util_.DecodingError "expected int32 literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralInteger v3 -> ((\x -> case x of-          Core.IntegerValueInt32 v4 -> (Right v4)-          _ -> (Left (Util_.DecodingError "expected int32 value"))) v3)-        _ -> (Left (Util_.DecodingError "expected int32 literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))))) fieldMap cx) (\field_adjacencyList -> Eithers.bind (Helpers.requireField "expected" (Helpers.decodeEither (Helpers.decodeList (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralInteger v3 -> ((\x -> case x of-          Core.IntegerValueInt32 v4 -> (Right v4)-          _ -> (Left (Util_.DecodingError "expected int32 value"))) v3)-        _ -> (Left (Util_.DecodingError "expected int32 literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)))) (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralInteger v3 -> ((\x -> case x of-          Core.IntegerValueInt32 v4 -> (Right v4)-          _ -> (Left (Util_.DecodingError "expected int32 value"))) v3)-        _ -> (Left (Util_.DecodingError "expected int32 literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)))) fieldMap cx) (\field_expected -> Right (Testing.TopologicalSortTestCase {-      Testing.topologicalSortTestCaseAdjacencyList = field_adjacencyList,-      Testing.topologicalSortTestCaseExpected = field_expected}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.TopologicalSortTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--topologicalSortSCCTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.TopologicalSortSCCTestCase)-topologicalSortSCCTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "adjacencyList" (Helpers.decodeList (Helpers.decodePair (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralInteger v3 -> ((\x -> case x of-          Core.IntegerValueInt32 v4 -> (Right v4)-          _ -> (Left (Util_.DecodingError "expected int32 value"))) v3)-        _ -> (Left (Util_.DecodingError "expected int32 literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralInteger v3 -> ((\x -> case x of-          Core.IntegerValueInt32 v4 -> (Right v4)-          _ -> (Left (Util_.DecodingError "expected int32 value"))) v3)-        _ -> (Left (Util_.DecodingError "expected int32 literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))))) fieldMap cx) (\field_adjacencyList -> Eithers.bind (Helpers.requireField "expected" (Helpers.decodeList (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralInteger v3 -> ((\x -> case x of-          Core.IntegerValueInt32 v4 -> (Right v4)-          _ -> (Left (Util_.DecodingError "expected int32 value"))) v3)-        _ -> (Left (Util_.DecodingError "expected int32 literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)))) fieldMap cx) (\field_expected -> Right (Testing.TopologicalSortSCCTestCase {-      Testing.topologicalSortSCCTestCaseAdjacencyList = field_adjacencyList,-      Testing.topologicalSortSCCTestCaseExpected = field_expected}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.TopologicalSortSCCTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--serializationTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.SerializationTestCase)-serializationTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Ast.expr fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util_.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_output -> Right (Testing.SerializationTestCase {-      Testing.serializationTestCaseInput = field_input,-      Testing.serializationTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.SerializationTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--simplifyTermTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.SimplifyTermTestCase)-simplifyTermTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.SimplifyTermTestCase {-      Testing.simplifyTermTestCaseInput = field_input,-      Testing.simplifyTermTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.SimplifyTermTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--normalizeTypeVariablesTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.NormalizeTypeVariablesTestCase)-normalizeTypeVariablesTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.NormalizeTypeVariablesTestCase {-      Testing.normalizeTypeVariablesTestCaseInput = field_input,-      Testing.normalizeTypeVariablesTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.NormalizeTypeVariablesTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--typeReductionTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.TypeReductionTestCase)-typeReductionTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.type_ fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.type_ fieldMap cx) (\field_output -> Right (Testing.TypeReductionTestCase {-      Testing.typeReductionTestCaseInput = field_input,-      Testing.typeReductionTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.TypeReductionTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--writerTestCase :: ((Graph.Graph -> Core.Term -> Either Util_.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Util_.DecodingError (Testing.WriterTestCase t0))-writerTestCase a cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" a fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util_.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_output -> Right (Testing.WriterTestCase {-      Testing.writerTestCaseInput = field_input,-      Testing.writerTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.WriterTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--substInTypeTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.SubstInTypeTestCase)-substInTypeTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "substitution" (Helpers.decodeList (Helpers.decodePair Core_.name Core_.type_)) fieldMap cx) (\field_substitution -> Eithers.bind (Helpers.requireField "input" Core_.type_ fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.type_ fieldMap cx) (\field_output -> Right (Testing.SubstInTypeTestCase {-      Testing.substInTypeTestCaseSubstitution = field_substitution,-      Testing.substInTypeTestCaseInput = field_input,-      Testing.substInTypeTestCaseOutput = field_output})))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.SubstInTypeTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--variableOccursInTypeTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.VariableOccursInTypeTestCase)-variableOccursInTypeTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "variable" Core_.name fieldMap cx) (\field_variable -> Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "expected" (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralBoolean v3 -> (Right v3)-        _ -> (Left (Util_.DecodingError "expected boolean literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_expected -> Right (Testing.VariableOccursInTypeTestCase {-      Testing.variableOccursInTypeTestCaseVariable = field_variable,-      Testing.variableOccursInTypeTestCaseType = field_type,-      Testing.variableOccursInTypeTestCaseExpected = field_expected})))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.VariableOccursInTypeTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--unshadowVariablesTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.UnshadowVariablesTestCase)-unshadowVariablesTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.UnshadowVariablesTestCase {-      Testing.unshadowVariablesTestCaseInput = field_input,-      Testing.unshadowVariablesTestCaseOutput = field_output}))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.UnshadowVariablesTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--unifyTypesTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.UnifyTypesTestCase)-unifyTypesTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "schemaTypes" (Helpers.decodeList Core_.name) fieldMap cx) (\field_schemaTypes -> Eithers.bind (Helpers.requireField "left" Core_.type_ fieldMap cx) (\field_left -> Eithers.bind (Helpers.requireField "right" Core_.type_ fieldMap cx) (\field_right -> Eithers.bind (Helpers.requireField "expected" (Helpers.decodeEither (\cx -> \raw -> Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util_.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util_.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) Typing.typeSubst) fieldMap cx) (\field_expected -> Right (Testing.UnifyTypesTestCase {-      Testing.unifyTypesTestCaseSchemaTypes = field_schemaTypes,-      Testing.unifyTypesTestCaseLeft = field_left,-      Testing.unifyTypesTestCaseRight = field_right,-      Testing.unifyTypesTestCaseExpected = field_expected}))))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.UnifyTypesTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--joinTypesTestCase :: (Graph.Graph -> Core.Term -> Either Util_.DecodingError Testing.JoinTypesTestCase)-joinTypesTestCase cx raw = (Eithers.either (\err -> Left (Util_.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "left" Core_.type_ fieldMap cx) (\field_left -> Eithers.bind (Helpers.requireField "right" Core_.type_ fieldMap cx) (\field_right -> Eithers.bind (Helpers.requireField "expected" (Helpers.decodeEither Helpers.decodeUnit (Helpers.decodeList Typing.typeConstraint)) fieldMap cx) (\field_expected -> Right (Testing.JoinTypesTestCase {-      Testing.joinTypesTestCaseLeft = field_left,-      Testing.joinTypesTestCaseRight = field_right,-      Testing.joinTypesTestCaseExpected = field_expected})))))-  _ -> (Left (Util_.DecodingError "expected record of type hydra.testing.JoinTypesTestCase"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+import qualified Hydra.Decode.Error.Core as Core__+import qualified Hydra.Decode.Json.Model as Model+import qualified Hydra.Decode.Parsing as Parsing+import qualified Hydra.Decode.Typing as Typing+import qualified Hydra.Decode.Util as Util+import qualified Hydra.Errors as Errors+import qualified Hydra.Extract.Helpers as Helpers+import qualified Hydra.Graph as Graph+import qualified Hydra.Json.Model as Model_+import qualified Hydra.Lexical as Lexical+import qualified Hydra.Lib.Eithers as Eithers+import qualified Hydra.Lib.Maps as Maps+import qualified Hydra.Lib.Maybes as Maybes+import qualified Hydra.Lib.Strings as Strings+import qualified Hydra.Testing as Testing+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++alphaConversionTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.AlphaConversionTestCase+alphaConversionTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "term" Core_.term fieldMap cx) (\field_term -> Eithers.bind (Helpers.requireField "oldVariable" Core_.name fieldMap cx) (\field_oldVariable -> Eithers.bind (Helpers.requireField "newVariable" Core_.name fieldMap cx) (\field_newVariable -> Eithers.bind (Helpers.requireField "result" Core_.term fieldMap cx) (\field_result -> Right (Testing.AlphaConversionTestCase {+          Testing.alphaConversionTestCaseTerm = field_term,+          Testing.alphaConversionTestCaseOldVariable = field_oldVariable,+          Testing.alphaConversionTestCaseNewVariable = field_newVariable,+          Testing.alphaConversionTestCaseResult = field_result}))))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++caseConversionTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.CaseConversionTestCase+caseConversionTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "fromConvention" Util.caseConvention fieldMap cx) (\field_fromConvention -> Eithers.bind (Helpers.requireField "toConvention" Util.caseConvention fieldMap cx) (\field_toConvention -> Eithers.bind (Helpers.requireField "fromString" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_fromString -> Eithers.bind (Helpers.requireField "toString" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_toString -> Right (Testing.CaseConversionTestCase {+          Testing.caseConversionTestCaseFromConvention = field_fromConvention,+          Testing.caseConversionTestCaseToConvention = field_toConvention,+          Testing.caseConversionTestCaseFromString = field_fromString,+          Testing.caseConversionTestCaseToString = field_toString}))))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++deannotateTermTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.DeannotateTermTestCase+deannotateTermTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.DeannotateTermTestCase {+          Testing.deannotateTermTestCaseInput = field_input,+          Testing.deannotateTermTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++deannotateTypeTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.DeannotateTypeTestCase+deannotateTypeTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.type_ fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.type_ fieldMap cx) (\field_output -> Right (Testing.DeannotateTypeTestCase {+          Testing.deannotateTypeTestCaseInput = field_input,+          Testing.deannotateTypeTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++delegatedEvaluationTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.DelegatedEvaluationTestCase+delegatedEvaluationTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.DelegatedEvaluationTestCase {+          Testing.delegatedEvaluationTestCaseInput = field_input,+          Testing.delegatedEvaluationTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++etaExpansionTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.EtaExpansionTestCase+etaExpansionTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.EtaExpansionTestCase {+          Testing.etaExpansionTestCaseInput = field_input,+          Testing.etaExpansionTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++evaluationStyle :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.EvaluationStyle+evaluationStyle cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "eager", (\input -> Eithers.map (\t -> Testing.EvaluationStyleEager) (Helpers.decodeUnit cx input))),+                      (Core.Name "lazy", (\input -> Eithers.map (\t -> Testing.EvaluationStyleLazy) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++evaluationTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.EvaluationTestCase+evaluationTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "evaluationStyle" evaluationStyle fieldMap cx) (\field_evaluationStyle -> Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.EvaluationTestCase {+          Testing.evaluationTestCaseEvaluationStyle = field_evaluationStyle,+          Testing.evaluationTestCaseInput = field_input,+          Testing.evaluationTestCaseOutput = field_output})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++flattenLetTermsTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.FlattenLetTermsTestCase+flattenLetTermsTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.FlattenLetTermsTestCase {+          Testing.flattenLetTermsTestCaseInput = field_input,+          Testing.flattenLetTermsTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++foldOperation :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.FoldOperation+foldOperation cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "sumInt32Literals", (\input -> Eithers.map (\t -> Testing.FoldOperationSumInt32Literals) (Helpers.decodeUnit cx input))),+                      (Core.Name "collectListLengths", (\input -> Eithers.map (\t -> Testing.FoldOperationCollectListLengths) (Helpers.decodeUnit cx input))),+                      (Core.Name "collectLabels", (\input -> Eithers.map (\t -> Testing.FoldOperationCollectLabels) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++foldOverTermTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.FoldOverTermTestCase+foldOverTermTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "traversalOrder" Coders.traversalOrder fieldMap cx) (\field_traversalOrder -> Eithers.bind (Helpers.requireField "operation" foldOperation fieldMap cx) (\field_operation -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.FoldOverTermTestCase {+          Testing.foldOverTermTestCaseInput = field_input,+          Testing.foldOverTermTestCaseTraversalOrder = field_traversalOrder,+          Testing.foldOverTermTestCaseOperation = field_operation,+          Testing.foldOverTermTestCaseOutput = field_output}))))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++freeVariablesTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.FreeVariablesTestCase+freeVariablesTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" (Helpers.decodeSet Core_.name) fieldMap cx) (\field_output -> Right (Testing.FreeVariablesTestCase {+          Testing.freeVariablesTestCaseInput = field_input,+          Testing.freeVariablesTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++hoistCaseStatementsTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.HoistCaseStatementsTestCase+hoistCaseStatementsTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.HoistCaseStatementsTestCase {+          Testing.hoistCaseStatementsTestCaseInput = field_input,+          Testing.hoistCaseStatementsTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++hoistLetBindingsTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.HoistLetBindingsTestCase+hoistLetBindingsTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.let_ fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.let_ fieldMap cx) (\field_output -> Right (Testing.HoistLetBindingsTestCase {+          Testing.hoistLetBindingsTestCaseInput = field_input,+          Testing.hoistLetBindingsTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++hoistPolymorphicLetBindingsTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.HoistPolymorphicLetBindingsTestCase+hoistPolymorphicLetBindingsTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.let_ fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.let_ fieldMap cx) (\field_output -> Right (Testing.HoistPolymorphicLetBindingsTestCase {+          Testing.hoistPolymorphicLetBindingsTestCaseInput = field_input,+          Testing.hoistPolymorphicLetBindingsTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++hoistPredicate :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.HoistPredicate+hoistPredicate cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "caseStatements", (\input -> Eithers.map (\t -> Testing.HoistPredicateCaseStatements) (Helpers.decodeUnit cx input))),+                      (Core.Name "applications", (\input -> Eithers.map (\t -> Testing.HoistPredicateApplications) (Helpers.decodeUnit cx input))),+                      (Core.Name "lists", (\input -> Eithers.map (\t -> Testing.HoistPredicateLists) (Helpers.decodeUnit cx input))),+                      (Core.Name "nothing", (\input -> Eithers.map (\t -> Testing.HoistPredicateNothing) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++hoistSubtermsTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.HoistSubtermsTestCase+hoistSubtermsTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "predicate" hoistPredicate fieldMap cx) (\field_predicate -> Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.HoistSubtermsTestCase {+          Testing.hoistSubtermsTestCasePredicate = field_predicate,+          Testing.hoistSubtermsTestCaseInput = field_input,+          Testing.hoistSubtermsTestCaseOutput = field_output})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++inferenceFailureTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.InferenceFailureTestCase+inferenceFailureTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Right (Testing.InferenceFailureTestCase {+          Testing.inferenceFailureTestCaseInput = field_input})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++inferenceTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.InferenceTestCase+inferenceTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.typeScheme fieldMap cx) (\field_output -> Right (Testing.InferenceTestCase {+          Testing.inferenceTestCaseInput = field_input,+          Testing.inferenceTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++joinTypesTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.JoinTypesTestCase+joinTypesTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "left" Core_.type_ fieldMap cx) (\field_left -> Eithers.bind (Helpers.requireField "right" Core_.type_ fieldMap cx) (\field_right -> Eithers.bind (Helpers.requireField "expected" (Helpers.decodeEither Helpers.decodeUnit (Helpers.decodeList Typing.typeConstraint)) fieldMap cx) (\field_expected -> Right (Testing.JoinTypesTestCase {+          Testing.joinTypesTestCaseLeft = field_left,+          Testing.joinTypesTestCaseRight = field_right,+          Testing.joinTypesTestCaseExpected = field_expected})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++jsonDecodeTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.JsonDecodeTestCase+jsonDecodeTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "json" Model.value fieldMap cx) (\field_json -> Eithers.bind (Helpers.requireField "expected" (Helpers.decodeEither (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) Core_.term) fieldMap cx) (\field_expected -> Right (Testing.JsonDecodeTestCase {+          Testing.jsonDecodeTestCaseType = field_type,+          Testing.jsonDecodeTestCaseJson = field_json,+          Testing.jsonDecodeTestCaseExpected = field_expected})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++jsonEncodeTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.JsonEncodeTestCase+jsonEncodeTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "term" Core_.term fieldMap cx) (\field_term -> Eithers.bind (Helpers.requireField "expected" (Helpers.decodeEither (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) Model.value) fieldMap cx) (\field_expected -> Right (Testing.JsonEncodeTestCase {+          Testing.jsonEncodeTestCaseTerm = field_term,+          Testing.jsonEncodeTestCaseExpected = field_expected}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++jsonParserTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError (Testing.ParserTestCase Model_.Value)+jsonParserTestCase = parserTestCase Model.value++jsonRoundtripTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.JsonRoundtripTestCase+jsonRoundtripTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "term" Core_.term fieldMap cx) (\field_term -> Right (Testing.JsonRoundtripTestCase {+          Testing.jsonRoundtripTestCaseType = field_type,+          Testing.jsonRoundtripTestCaseTerm = field_term}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++jsonWriterTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError (Testing.WriterTestCase Model_.Value)+jsonWriterTestCase = writerTestCase Model.value++liftLambdaAboveLetTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.LiftLambdaAboveLetTestCase+liftLambdaAboveLetTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.LiftLambdaAboveLetTestCase {+          Testing.liftLambdaAboveLetTestCaseInput = field_input,+          Testing.liftLambdaAboveLetTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++normalizeTypeVariablesTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.NormalizeTypeVariablesTestCase+normalizeTypeVariablesTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.NormalizeTypeVariablesTestCase {+          Testing.normalizeTypeVariablesTestCaseInput = field_input,+          Testing.normalizeTypeVariablesTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++parserTestCase :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Testing.ParserTestCase t0)+parserTestCase a cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" (Parsing.parseResult a) fieldMap cx) (\field_output -> Right (Testing.ParserTestCase {+          Testing.parserTestCaseInput = field_input,+          Testing.parserTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++rewriteTermTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.RewriteTermTestCase+rewriteTermTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "rewriter" termRewriter fieldMap cx) (\field_rewriter -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.RewriteTermTestCase {+          Testing.rewriteTermTestCaseInput = field_input,+          Testing.rewriteTermTestCaseRewriter = field_rewriter,+          Testing.rewriteTermTestCaseOutput = field_output})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++rewriteTypeTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.RewriteTypeTestCase+rewriteTypeTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.type_ fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "rewriter" typeRewriter fieldMap cx) (\field_rewriter -> Eithers.bind (Helpers.requireField "output" Core_.type_ fieldMap cx) (\field_output -> Right (Testing.RewriteTypeTestCase {+          Testing.rewriteTypeTestCaseInput = field_input,+          Testing.rewriteTypeTestCaseRewriter = field_rewriter,+          Testing.rewriteTypeTestCaseOutput = field_output})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++serializationTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.SerializationTestCase+serializationTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Ast.expr fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_output -> Right (Testing.SerializationTestCase {+          Testing.serializationTestCaseInput = field_input,+          Testing.serializationTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++simplifyTermTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.SimplifyTermTestCase+simplifyTermTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.SimplifyTermTestCase {+          Testing.simplifyTermTestCaseInput = field_input,+          Testing.simplifyTermTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++substInTypeTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.SubstInTypeTestCase+substInTypeTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "substitution" (Helpers.decodeList (Helpers.decodePair Core_.name Core_.type_)) fieldMap cx) (\field_substitution -> Eithers.bind (Helpers.requireField "input" Core_.type_ fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.type_ fieldMap cx) (\field_output -> Right (Testing.SubstInTypeTestCase {+          Testing.substInTypeTestCaseSubstitution = field_substitution,+          Testing.substInTypeTestCaseInput = field_input,+          Testing.substInTypeTestCaseOutput = field_output})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++tag :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.Tag+tag cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Testing.Tag b) ((\raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+        Core.TermLiteral v1 -> case v1 of+          Core.LiteralString v2 -> Right v2+          _ -> Left (Errors.DecodingError "expected string literal")+        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw)++termRewriter :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.TermRewriter+termRewriter cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "replaceFooWithBar", (\input -> Eithers.map (\t -> Testing.TermRewriterReplaceFooWithBar) (Helpers.decodeUnit cx input))),+                      (Core.Name "replaceInt32WithInt64", (\input -> Eithers.map (\t -> Testing.TermRewriterReplaceInt32WithInt64) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++testCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.TestCase+testCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "alphaConversion", (\input -> Eithers.map (\t -> Testing.TestCaseAlphaConversion t) (alphaConversionTestCase cx input))),+                      (Core.Name "caseConversion", (\input -> Eithers.map (\t -> Testing.TestCaseCaseConversion t) (caseConversionTestCase cx input))),+                      (Core.Name "deannotateTerm", (\input -> Eithers.map (\t -> Testing.TestCaseDeannotateTerm t) (deannotateTermTestCase cx input))),+                      (Core.Name "deannotateType", (\input -> Eithers.map (\t -> Testing.TestCaseDeannotateType t) (deannotateTypeTestCase cx input))),+                      (Core.Name "delegatedEvaluation", (\input -> Eithers.map (\t -> Testing.TestCaseDelegatedEvaluation t) (delegatedEvaluationTestCase cx input))),+                      (Core.Name "etaExpansion", (\input -> Eithers.map (\t -> Testing.TestCaseEtaExpansion t) (etaExpansionTestCase cx input))),+                      (Core.Name "flattenLetTerms", (\input -> Eithers.map (\t -> Testing.TestCaseFlattenLetTerms t) (flattenLetTermsTestCase cx input))),+                      (Core.Name "freeVariables", (\input -> Eithers.map (\t -> Testing.TestCaseFreeVariables t) (freeVariablesTestCase cx input))),+                      (Core.Name "evaluation", (\input -> Eithers.map (\t -> Testing.TestCaseEvaluation t) (evaluationTestCase cx input))),+                      (Core.Name "inference", (\input -> Eithers.map (\t -> Testing.TestCaseInference t) (inferenceTestCase cx input))),+                      (Core.Name "inferenceFailure", (\input -> Eithers.map (\t -> Testing.TestCaseInferenceFailure t) (inferenceFailureTestCase cx input))),+                      (Core.Name "jsonDecode", (\input -> Eithers.map (\t -> Testing.TestCaseJsonDecode t) (jsonDecodeTestCase cx input))),+                      (Core.Name "jsonEncode", (\input -> Eithers.map (\t -> Testing.TestCaseJsonEncode t) (jsonEncodeTestCase cx input))),+                      (Core.Name "jsonParser", (\input -> Eithers.map (\t -> Testing.TestCaseJsonParser t) (jsonParserTestCase cx input))),+                      (Core.Name "jsonRoundtrip", (\input -> Eithers.map (\t -> Testing.TestCaseJsonRoundtrip t) (jsonRoundtripTestCase cx input))),+                      (Core.Name "jsonWriter", (\input -> Eithers.map (\t -> Testing.TestCaseJsonWriter t) (jsonWriterTestCase cx input))),+                      (Core.Name "liftLambdaAboveLet", (\input -> Eithers.map (\t -> Testing.TestCaseLiftLambdaAboveLet t) (liftLambdaAboveLetTestCase cx input))),+                      (Core.Name "serialization", (\input -> Eithers.map (\t -> Testing.TestCaseSerialization t) (serializationTestCase cx input))),+                      (Core.Name "simplifyTerm", (\input -> Eithers.map (\t -> Testing.TestCaseSimplifyTerm t) (simplifyTermTestCase cx input))),+                      (Core.Name "topologicalSort", (\input -> Eithers.map (\t -> Testing.TestCaseTopologicalSort t) (topologicalSortTestCase cx input))),+                      (Core.Name "topologicalSortBindings", (\input -> Eithers.map (\t -> Testing.TestCaseTopologicalSortBindings t) (topologicalSortBindingsTestCase cx input))),+                      (Core.Name "topologicalSortSCC", (\input -> Eithers.map (\t -> Testing.TestCaseTopologicalSortSCC t) (topologicalSortSCCTestCase cx input))),+                      (Core.Name "typeChecking", (\input -> Eithers.map (\t -> Testing.TestCaseTypeChecking t) (typeCheckingTestCase cx input))),+                      (Core.Name "typeCheckingFailure", (\input -> Eithers.map (\t -> Testing.TestCaseTypeCheckingFailure t) (typeCheckingFailureTestCase cx input))),+                      (Core.Name "typeReduction", (\input -> Eithers.map (\t -> Testing.TestCaseTypeReduction t) (typeReductionTestCase cx input))),+                      (Core.Name "normalizeTypeVariables", (\input -> Eithers.map (\t -> Testing.TestCaseNormalizeTypeVariables t) (normalizeTypeVariablesTestCase cx input))),+                      (Core.Name "foldOverTerm", (\input -> Eithers.map (\t -> Testing.TestCaseFoldOverTerm t) (foldOverTermTestCase cx input))),+                      (Core.Name "rewriteTerm", (\input -> Eithers.map (\t -> Testing.TestCaseRewriteTerm t) (rewriteTermTestCase cx input))),+                      (Core.Name "rewriteType", (\input -> Eithers.map (\t -> Testing.TestCaseRewriteType t) (rewriteTypeTestCase cx input))),+                      (Core.Name "hoistSubterms", (\input -> Eithers.map (\t -> Testing.TestCaseHoistSubterms t) (hoistSubtermsTestCase cx input))),+                      (Core.Name "hoistCaseStatements", (\input -> Eithers.map (\t -> Testing.TestCaseHoistCaseStatements t) (hoistCaseStatementsTestCase cx input))),+                      (Core.Name "hoistLetBindings", (\input -> Eithers.map (\t -> Testing.TestCaseHoistLetBindings t) (hoistLetBindingsTestCase cx input))),+                      (Core.Name "hoistPolymorphicLetBindings", (\input -> Eithers.map (\t -> Testing.TestCaseHoistPolymorphicLetBindings t) (hoistPolymorphicLetBindingsTestCase cx input))),+                      (Core.Name "substInType", (\input -> Eithers.map (\t -> Testing.TestCaseSubstInType t) (substInTypeTestCase cx input))),+                      (Core.Name "variableOccursInType", (\input -> Eithers.map (\t -> Testing.TestCaseVariableOccursInType t) (variableOccursInTypeTestCase cx input))),+                      (Core.Name "unifyTypes", (\input -> Eithers.map (\t -> Testing.TestCaseUnifyTypes t) (unifyTypesTestCase cx input))),+                      (Core.Name "joinTypes", (\input -> Eithers.map (\t -> Testing.TestCaseJoinTypes t) (joinTypesTestCase cx input))),+                      (Core.Name "unshadowVariables", (\input -> Eithers.map (\t -> Testing.TestCaseUnshadowVariables t) (unshadowVariablesTestCase cx input))),+                      (Core.Name "validateCoreTerm", (\input -> Eithers.map (\t -> Testing.TestCaseValidateCoreTerm t) (validateCoreTermTestCase cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++testCaseWithMetadata :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.TestCaseWithMetadata+testCaseWithMetadata cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "name" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "case" testCase fieldMap cx) (\field_case -> Eithers.bind (Helpers.requireField "description" (Helpers.decodeMaybe (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_description -> Eithers.bind (Helpers.requireField "tags" (Helpers.decodeList tag) fieldMap cx) (\field_tags -> Right (Testing.TestCaseWithMetadata {+          Testing.testCaseWithMetadataName = field_name,+          Testing.testCaseWithMetadataCase = field_case,+          Testing.testCaseWithMetadataDescription = field_description,+          Testing.testCaseWithMetadataTags = field_tags}))))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++testGroup :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.TestGroup+testGroup cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "name" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "description" (Helpers.decodeMaybe (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_description -> Eithers.bind (Helpers.requireField "subgroups" (Helpers.decodeList testGroup) fieldMap cx) (\field_subgroups -> Eithers.bind (Helpers.requireField "cases" (Helpers.decodeList testCaseWithMetadata) fieldMap cx) (\field_cases -> Right (Testing.TestGroup {+          Testing.testGroupName = field_name,+          Testing.testGroupDescription = field_description,+          Testing.testGroupSubgroups = field_subgroups,+          Testing.testGroupCases = field_cases}))))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++topologicalSortBindingsTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.TopologicalSortBindingsTestCase+topologicalSortBindingsTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "bindings" (Helpers.decodeList (Helpers.decodePair Core_.name Core_.term)) fieldMap cx) (\field_bindings -> Eithers.bind (Helpers.requireField "expected" (Helpers.decodeList (Helpers.decodeList (Helpers.decodePair Core_.name Core_.term))) fieldMap cx) (\field_expected -> Right (Testing.TopologicalSortBindingsTestCase {+          Testing.topologicalSortBindingsTestCaseBindings = field_bindings,+          Testing.topologicalSortBindingsTestCaseExpected = field_expected}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++topologicalSortSCCTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.TopologicalSortSCCTestCase+topologicalSortSCCTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "adjacencyList" (Helpers.decodeList (Helpers.decodePair (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralInteger v2 -> case v2 of+              Core.IntegerValueInt32 v3 -> Right v3+              _ -> Left (Errors.DecodingError "expected int32 value")+            _ -> Left (Errors.DecodingError "expected int32 literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralInteger v2 -> case v2 of+              Core.IntegerValueInt32 v3 -> Right v3+              _ -> Left (Errors.DecodingError "expected int32 value")+            _ -> Left (Errors.DecodingError "expected int32 literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw))))) fieldMap cx) (\field_adjacencyList -> Eithers.bind (Helpers.requireField "expected" (Helpers.decodeList (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralInteger v2 -> case v2 of+              Core.IntegerValueInt32 v3 -> Right v3+              _ -> Left (Errors.DecodingError "expected int32 value")+            _ -> Left (Errors.DecodingError "expected int32 literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)))) fieldMap cx) (\field_expected -> Right (Testing.TopologicalSortSCCTestCase {+          Testing.topologicalSortSCCTestCaseAdjacencyList = field_adjacencyList,+          Testing.topologicalSortSCCTestCaseExpected = field_expected}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++topologicalSortTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.TopologicalSortTestCase+topologicalSortTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "adjacencyList" (Helpers.decodeList (Helpers.decodePair (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralInteger v2 -> case v2 of+              Core.IntegerValueInt32 v3 -> Right v3+              _ -> Left (Errors.DecodingError "expected int32 value")+            _ -> Left (Errors.DecodingError "expected int32 literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralInteger v2 -> case v2 of+              Core.IntegerValueInt32 v3 -> Right v3+              _ -> Left (Errors.DecodingError "expected int32 value")+            _ -> Left (Errors.DecodingError "expected int32 literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw))))) fieldMap cx) (\field_adjacencyList -> Eithers.bind (Helpers.requireField "expected" (Helpers.decodeEither (Helpers.decodeList (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralInteger v2 -> case v2 of+              Core.IntegerValueInt32 v3 -> Right v3+              _ -> Left (Errors.DecodingError "expected int32 value")+            _ -> Left (Errors.DecodingError "expected int32 literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)))) (Helpers.decodeList (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralInteger v2 -> case v2 of+              Core.IntegerValueInt32 v3 -> Right v3+              _ -> Left (Errors.DecodingError "expected int32 value")+            _ -> Left (Errors.DecodingError "expected int32 literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)))) fieldMap cx) (\field_expected -> Right (Testing.TopologicalSortTestCase {+          Testing.topologicalSortTestCaseAdjacencyList = field_adjacencyList,+          Testing.topologicalSortTestCaseExpected = field_expected}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++typeCheckingFailureTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.TypeCheckingFailureTestCase+typeCheckingFailureTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Right (Testing.TypeCheckingFailureTestCase {+          Testing.typeCheckingFailureTestCaseInput = field_input})))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++typeCheckingTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.TypeCheckingTestCase+typeCheckingTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "outputTerm" Core_.term fieldMap cx) (\field_outputTerm -> Eithers.bind (Helpers.requireField "outputType" Core_.type_ fieldMap cx) (\field_outputType -> Right (Testing.TypeCheckingTestCase {+          Testing.typeCheckingTestCaseInput = field_input,+          Testing.typeCheckingTestCaseOutputTerm = field_outputTerm,+          Testing.typeCheckingTestCaseOutputType = field_outputType})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++typeReductionTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.TypeReductionTestCase+typeReductionTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.type_ fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.type_ fieldMap cx) (\field_output -> Right (Testing.TypeReductionTestCase {+          Testing.typeReductionTestCaseInput = field_input,+          Testing.typeReductionTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++typeRewriter :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.TypeRewriter+typeRewriter cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "replaceStringWithInt32", (\input -> Eithers.map (\t -> Testing.TypeRewriterReplaceStringWithInt32) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)++unifyTypesTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.UnifyTypesTestCase+unifyTypesTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "schemaTypes" (Helpers.decodeList Core_.name) fieldMap cx) (\field_schemaTypes -> Eithers.bind (Helpers.requireField "left" Core_.type_ fieldMap cx) (\field_left -> Eithers.bind (Helpers.requireField "right" Core_.type_ fieldMap cx) (\field_right -> Eithers.bind (Helpers.requireField "expected" (Helpers.decodeEither (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) Typing.typeSubst) fieldMap cx) (\field_expected -> Right (Testing.UnifyTypesTestCase {+          Testing.unifyTypesTestCaseSchemaTypes = field_schemaTypes,+          Testing.unifyTypesTestCaseLeft = field_left,+          Testing.unifyTypesTestCaseRight = field_right,+          Testing.unifyTypesTestCaseExpected = field_expected}))))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++unshadowVariablesTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.UnshadowVariablesTestCase+unshadowVariablesTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" Core_.term fieldMap cx) (\field_output -> Right (Testing.UnshadowVariablesTestCase {+          Testing.unshadowVariablesTestCaseInput = field_input,+          Testing.unshadowVariablesTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++validateCoreTermTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.ValidateCoreTermTestCase+validateCoreTermTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "typed" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralBoolean v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected boolean literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_typed -> Eithers.bind (Helpers.requireField "input" Core_.term fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" (Helpers.decodeMaybe Core__.invalidTermError) fieldMap cx) (\field_output -> Right (Testing.ValidateCoreTermTestCase {+          Testing.validateCoreTermTestCaseTyped = field_typed,+          Testing.validateCoreTermTestCaseInput = field_input,+          Testing.validateCoreTermTestCaseOutput = field_output})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++variableOccursInTypeTestCase :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Testing.VariableOccursInTypeTestCase+variableOccursInTypeTestCase cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "variable" Core_.name fieldMap cx) (\field_variable -> Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "expected" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralBoolean v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected boolean literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_expected -> Right (Testing.VariableOccursInTypeTestCase {+          Testing.variableOccursInTypeTestCaseVariable = field_variable,+          Testing.variableOccursInTypeTestCaseType = field_type,+          Testing.variableOccursInTypeTestCaseExpected = field_expected})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)++writerTestCase :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Testing.WriterTestCase t0)+writerTestCase a cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "input" a fieldMap cx) (\field_input -> Eithers.bind (Helpers.requireField "output" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_output -> Right (Testing.WriterTestCase {+          Testing.writerTestCaseInput = field_input,+          Testing.writerTestCaseOutput = field_output}))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw)
src/gen-main/haskell/Hydra/Decode/Topology.hs view
@@ -5,12 +5,12 @@ module Hydra.Decode.Topology where  import qualified Hydra.Core as Core+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Helpers as Helpers import qualified Hydra.Graph as Graph import qualified Hydra.Lexical as Lexical import qualified Hydra.Lib.Eithers as Eithers import qualified Hydra.Topology as Topology-import qualified Hydra.Util as Util import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -18,45 +18,47 @@ import qualified Data.Map as M import qualified Data.Set as S -graph :: (Graph.Graph -> Core.Term -> Either Util.DecodingError (M.Map Int [Int]))-graph = (Helpers.decodeMap vertex (Helpers.decodeList vertex))+graph :: Graph.Graph -> Core.Term -> Either Errors.DecodingError (M.Map Int [Int])+graph = Helpers.decodeMap vertex (Helpers.decodeList vertex) -tarjanState :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Topology.TarjanState)-tarjanState cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "counter" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralInteger v3 -> ((\x -> case x of-          Core.IntegerValueInt32 v4 -> (Right v4)-          _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-        _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_counter -> Eithers.bind (Helpers.requireField "indices" (Helpers.decodeMap vertex (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralInteger v3 -> ((\x -> case x of-          Core.IntegerValueInt32 v4 -> (Right v4)-          _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-        _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_indices -> Eithers.bind (Helpers.requireField "lowLinks" (Helpers.decodeMap vertex (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralInteger v3 -> ((\x -> case x of-          Core.IntegerValueInt32 v4 -> (Right v4)-          _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-        _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_lowLinks -> Eithers.bind (Helpers.requireField "stack" (Helpers.decodeList vertex) fieldMap cx) (\field_stack -> Eithers.bind (Helpers.requireField "onStack" (Helpers.decodeSet vertex) fieldMap cx) (\field_onStack -> Eithers.bind (Helpers.requireField "sccs" (Helpers.decodeList (Helpers.decodeList vertex)) fieldMap cx) (\field_sccs -> Right (Topology.TarjanState {-      Topology.tarjanStateCounter = field_counter,-      Topology.tarjanStateIndices = field_indices,-      Topology.tarjanStateLowLinks = field_lowLinks,-      Topology.tarjanStateStack = field_stack,-      Topology.tarjanStateOnStack = field_onStack,-      Topology.tarjanStateSccs = field_sccs}))))))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.topology.TarjanState"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+tarjanState :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Topology.TarjanState+tarjanState cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "counter" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralInteger v2 -> case v2 of+              Core.IntegerValueInt32 v3 -> Right v3+              _ -> Left (Errors.DecodingError "expected int32 value")+            _ -> Left (Errors.DecodingError "expected int32 literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_counter -> Eithers.bind (Helpers.requireField "indices" (Helpers.decodeMap vertex (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralInteger v2 -> case v2 of+              Core.IntegerValueInt32 v3 -> Right v3+              _ -> Left (Errors.DecodingError "expected int32 value")+            _ -> Left (Errors.DecodingError "expected int32 literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_indices -> Eithers.bind (Helpers.requireField "lowLinks" (Helpers.decodeMap vertex (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralInteger v2 -> case v2 of+              Core.IntegerValueInt32 v3 -> Right v3+              _ -> Left (Errors.DecodingError "expected int32 value")+            _ -> Left (Errors.DecodingError "expected int32 literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw))) fieldMap cx) (\field_lowLinks -> Eithers.bind (Helpers.requireField "stack" (Helpers.decodeList vertex) fieldMap cx) (\field_stack -> Eithers.bind (Helpers.requireField "onStack" (Helpers.decodeSet vertex) fieldMap cx) (\field_onStack -> Eithers.bind (Helpers.requireField "sccs" (Helpers.decodeList (Helpers.decodeList vertex)) fieldMap cx) (\field_sccs -> Right (Topology.TarjanState {+          Topology.tarjanStateCounter = field_counter,+          Topology.tarjanStateIndices = field_indices,+          Topology.tarjanStateLowLinks = field_lowLinks,+          Topology.tarjanStateStack = field_stack,+          Topology.tarjanStateOnStack = field_onStack,+          Topology.tarjanStateSccs = field_sccs}))))))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -vertex :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Int)-vertex cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermLiteral v1 -> ((\x -> case x of-    Core.LiteralInteger v2 -> ((\x -> case x of-      Core.IntegerValueInt32 v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected int32 value"))) v2)-    _ -> (Left (Util.DecodingError "expected int32 literal"))) v1)-  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+vertex :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Int+vertex cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermLiteral v0 -> case v0 of+        Core.LiteralInteger v1 -> case v1 of+          Core.IntegerValueInt32 v2 -> Right v2+          _ -> Left (Errors.DecodingError "expected int32 value")+        _ -> Left (Errors.DecodingError "expected int32 literal")+      _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)
src/gen-main/haskell/Hydra/Decode/Typing.hs view
@@ -5,13 +5,14 @@ module Hydra.Decode.Typing where  import qualified Hydra.Core as Core+import qualified Hydra.Decode.Context as Context import qualified Hydra.Decode.Core as Core_+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Helpers as Helpers import qualified Hydra.Graph as Graph import qualified Hydra.Lexical as Lexical import qualified Hydra.Lib.Eithers as Eithers import qualified Hydra.Typing as Typing-import qualified Hydra.Util as Util import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B import qualified Data.Int as I@@ -19,80 +20,57 @@ import qualified Data.Map as M import qualified Data.Set as S -functionStructure :: ((Graph.Graph -> Core.Term -> Either Util.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Util.DecodingError (Typing.FunctionStructure t0))-functionStructure env cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "typeParams" (Helpers.decodeList Core_.name) fieldMap cx) (\field_typeParams -> Eithers.bind (Helpers.requireField "params" (Helpers.decodeList Core_.name) fieldMap cx) (\field_params -> Eithers.bind (Helpers.requireField "bindings" (Helpers.decodeList Core_.binding) fieldMap cx) (\field_bindings -> Eithers.bind (Helpers.requireField "body" Core_.term fieldMap cx) (\field_body -> Eithers.bind (Helpers.requireField "domains" (Helpers.decodeList Core_.type_) fieldMap cx) (\field_domains -> Eithers.bind (Helpers.requireField "codomain" (Helpers.decodeMaybe Core_.type_) fieldMap cx) (\field_codomain -> Eithers.bind (Helpers.requireField "environment" env fieldMap cx) (\field_environment -> Right (Typing.FunctionStructure {-      Typing.functionStructureTypeParams = field_typeParams,-      Typing.functionStructureParams = field_params,-      Typing.functionStructureBindings = field_bindings,-      Typing.functionStructureBody = field_body,-      Typing.functionStructureDomains = field_domains,-      Typing.functionStructureCodomain = field_codomain,-      Typing.functionStructureEnvironment = field_environment})))))))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.typing.FunctionStructure"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--inferenceContext :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Typing.InferenceContext)-inferenceContext cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "schemaTypes" (Helpers.decodeMap Core_.name Core_.typeScheme) fieldMap cx) (\field_schemaTypes -> Eithers.bind (Helpers.requireField "primitiveTypes" (Helpers.decodeMap Core_.name Core_.typeScheme) fieldMap cx) (\field_primitiveTypes -> Eithers.bind (Helpers.requireField "dataTypes" (Helpers.decodeMap Core_.name Core_.typeScheme) fieldMap cx) (\field_dataTypes -> Eithers.bind (Helpers.requireField "classConstraints" (Helpers.decodeMap Core_.name Core_.typeVariableMetadata) fieldMap cx) (\field_classConstraints -> Eithers.bind (Helpers.requireField "debug" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralBoolean v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected boolean literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_debug -> Right (Typing.InferenceContext {-      Typing.inferenceContextSchemaTypes = field_schemaTypes,-      Typing.inferenceContextPrimitiveTypes = field_primitiveTypes,-      Typing.inferenceContextDataTypes = field_dataTypes,-      Typing.inferenceContextClassConstraints = field_classConstraints,-      Typing.inferenceContextDebug = field_debug})))))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.typing.InferenceContext"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--inferenceResult :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Typing.InferenceResult)-inferenceResult cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "term" Core_.term fieldMap cx) (\field_term -> Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "subst" typeSubst fieldMap cx) (\field_subst -> Eithers.bind (Helpers.requireField "classConstraints" (Helpers.decodeMap Core_.name Core_.typeVariableMetadata) fieldMap cx) (\field_classConstraints -> Right (Typing.InferenceResult {-      Typing.inferenceResultTerm = field_term,-      Typing.inferenceResultType = field_type,-      Typing.inferenceResultSubst = field_subst,-      Typing.inferenceResultClassConstraints = field_classConstraints}))))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.typing.InferenceResult"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+functionStructure :: (Graph.Graph -> Core.Term -> Either Errors.DecodingError t0) -> Graph.Graph -> Core.Term -> Either Errors.DecodingError (Typing.FunctionStructure t0)+functionStructure env cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "typeParams" (Helpers.decodeList Core_.name) fieldMap cx) (\field_typeParams -> Eithers.bind (Helpers.requireField "params" (Helpers.decodeList Core_.name) fieldMap cx) (\field_params -> Eithers.bind (Helpers.requireField "bindings" (Helpers.decodeList Core_.binding) fieldMap cx) (\field_bindings -> Eithers.bind (Helpers.requireField "body" Core_.term fieldMap cx) (\field_body -> Eithers.bind (Helpers.requireField "domains" (Helpers.decodeList Core_.type_) fieldMap cx) (\field_domains -> Eithers.bind (Helpers.requireField "codomain" (Helpers.decodeMaybe Core_.type_) fieldMap cx) (\field_codomain -> Eithers.bind (Helpers.requireField "environment" env fieldMap cx) (\field_environment -> Right (Typing.FunctionStructure {+          Typing.functionStructureTypeParams = field_typeParams,+          Typing.functionStructureParams = field_params,+          Typing.functionStructureBindings = field_bindings,+          Typing.functionStructureBody = field_body,+          Typing.functionStructureDomains = field_domains,+          Typing.functionStructureCodomain = field_codomain,+          Typing.functionStructureEnvironment = field_environment})))))))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -termSubst :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Typing.TermSubst)-termSubst cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Typing.TermSubst b) (Helpers.decodeMap Core_.name Core_.term cx (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.typing.TermSubst"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+inferenceResult :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Typing.InferenceResult+inferenceResult cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "term" Core_.term fieldMap cx) (\field_term -> Eithers.bind (Helpers.requireField "type" Core_.type_ fieldMap cx) (\field_type -> Eithers.bind (Helpers.requireField "subst" typeSubst fieldMap cx) (\field_subst -> Eithers.bind (Helpers.requireField "classConstraints" (Helpers.decodeMap Core_.name Core_.typeVariableMetadata) fieldMap cx) (\field_classConstraints -> Eithers.bind (Helpers.requireField "context" Context.context fieldMap cx) (\field_context -> Right (Typing.InferenceResult {+          Typing.inferenceResultTerm = field_term,+          Typing.inferenceResultType = field_type,+          Typing.inferenceResultSubst = field_subst,+          Typing.inferenceResultClassConstraints = field_classConstraints,+          Typing.inferenceResultContext = field_context})))))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -typeConstraint :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Typing.TypeConstraint)-typeConstraint cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "left" Core_.type_ fieldMap cx) (\field_left -> Eithers.bind (Helpers.requireField "right" Core_.type_ fieldMap cx) (\field_right -> Eithers.bind (Helpers.requireField "comment" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_comment -> Right (Typing.TypeConstraint {-      Typing.typeConstraintLeft = field_left,-      Typing.typeConstraintRight = field_right,-      Typing.typeConstraintComment = field_comment})))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.typing.TypeConstraint"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+termSubst :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Typing.TermSubst+termSubst cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Typing.TermSubst b) (Helpers.decodeMap Core_.name Core_.term cx (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw) -typeContext :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Typing.TypeContext)-typeContext cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "types" (Helpers.decodeMap Core_.name Core_.type_) fieldMap cx) (\field_types -> Eithers.bind (Helpers.requireField "metadata" (Helpers.decodeMap Core_.name Core_.term) fieldMap cx) (\field_metadata -> Eithers.bind (Helpers.requireField "typeVariables" (Helpers.decodeSet Core_.name) fieldMap cx) (\field_typeVariables -> Eithers.bind (Helpers.requireField "lambdaVariables" (Helpers.decodeSet Core_.name) fieldMap cx) (\field_lambdaVariables -> Eithers.bind (Helpers.requireField "letVariables" (Helpers.decodeSet Core_.name) fieldMap cx) (\field_letVariables -> Eithers.bind (Helpers.requireField "inferenceContext" inferenceContext fieldMap cx) (\field_inferenceContext -> Right (Typing.TypeContext {-      Typing.typeContextTypes = field_types,-      Typing.typeContextMetadata = field_metadata,-      Typing.typeContextTypeVariables = field_typeVariables,-      Typing.typeContextLambdaVariables = field_lambdaVariables,-      Typing.typeContextLetVariables = field_letVariables,-      Typing.typeContextInferenceContext = field_inferenceContext}))))))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.typing.TypeContext"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+typeConstraint :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Typing.TypeConstraint+typeConstraint cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermRecord v0 ->+        let fieldMap = Helpers.toFieldMap v0+        in (Eithers.bind (Helpers.requireField "left" Core_.type_ fieldMap cx) (\field_left -> Eithers.bind (Helpers.requireField "right" Core_.type_ fieldMap cx) (\field_right -> Eithers.bind (Helpers.requireField "comment" (\cx -> \raw -> Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+          Core.TermLiteral v1 -> case v1 of+            Core.LiteralString v2 -> Right v2+            _ -> Left (Errors.DecodingError "expected string literal")+          _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_comment -> Right (Typing.TypeConstraint {+          Typing.typeConstraintLeft = field_left,+          Typing.typeConstraintRight = field_right,+          Typing.typeConstraintComment = field_comment})))))+      _ -> Left (Errors.DecodingError "expected record")) (Lexical.stripAndDereferenceTermEither cx raw) -typeSubst :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Typing.TypeSubst)-typeSubst cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Typing.TypeSubst b) (Helpers.decodeMap Core_.name Core_.type_ cx (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.typing.TypeSubst"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+typeSubst :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Typing.TypeSubst+typeSubst cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermWrap v0 -> Eithers.map (\b -> Typing.TypeSubst b) (Helpers.decodeMap Core_.name Core_.type_ cx (Core.wrappedTermBody v0))+      _ -> Left (Errors.DecodingError "expected wrapped type")) (Lexical.stripAndDereferenceTermEither cx raw)
src/gen-main/haskell/Hydra/Decode/Util.hs view
@@ -5,6 +5,7 @@ module Hydra.Decode.Util where  import qualified Hydra.Core as Core+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Helpers as Helpers import qualified Hydra.Graph as Graph import qualified Hydra.Lexical as Lexical@@ -20,71 +21,62 @@ import qualified Data.Map as M import qualified Data.Set as S -caseConvention :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Util.CaseConvention)-caseConvention cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "camel", (\input -> Eithers.map (\t -> Util.CaseConventionCamel) (Helpers.decodeUnit cx input))),-                (Core.Name "pascal", (\input -> Eithers.map (\t -> Util.CaseConventionPascal) (Helpers.decodeUnit cx input))),-                (Core.Name "lowerSnake", (\input -> Eithers.map (\t -> Util.CaseConventionLowerSnake) (Helpers.decodeUnit cx input))),-                (Core.Name "upperSnake", (\input -> Eithers.map (\t -> Util.CaseConventionUpperSnake) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.util.CaseConvention"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--comparison :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Util.Comparison)-comparison cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "lessThan", (\input -> Eithers.map (\t -> Util.ComparisonLessThan) (Helpers.decodeUnit cx input))),-                (Core.Name "equalTo", (\input -> Eithers.map (\t -> Util.ComparisonEqualTo) (Helpers.decodeUnit cx input))),-                (Core.Name "greaterThan", (\input -> Eithers.map (\t -> Util.ComparisonGreaterThan) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.util.Comparison"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+caseConvention :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Util.CaseConvention+caseConvention cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "camel", (\input -> Eithers.map (\t -> Util.CaseConventionCamel) (Helpers.decodeUnit cx input))),+                      (Core.Name "pascal", (\input -> Eithers.map (\t -> Util.CaseConventionPascal) (Helpers.decodeUnit cx input))),+                      (Core.Name "lowerSnake", (\input -> Eithers.map (\t -> Util.CaseConventionLowerSnake) (Helpers.decodeUnit cx input))),+                      (Core.Name "upperSnake", (\input -> Eithers.map (\t -> Util.CaseConventionUpperSnake) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -decodingError :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Util.DecodingError)-decodingError cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermWrap v1 -> (Eithers.map (\b -> Util.DecodingError b) ((\raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-    Core.TermLiteral v2 -> ((\x -> case x of-      Core.LiteralString v3 -> (Right v3)-      _ -> (Left (Util.DecodingError "expected string literal"))) v2)-    _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) (Core.wrappedTermBody v1)))-  _ -> (Left (Util.DecodingError "expected wrapped type hydra.util.DecodingError"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+comparison :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Util.Comparison+comparison cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "lessThan", (\input -> Eithers.map (\t -> Util.ComparisonLessThan) (Helpers.decodeUnit cx input))),+                      (Core.Name "equalTo", (\input -> Eithers.map (\t -> Util.ComparisonEqualTo) (Helpers.decodeUnit cx input))),+                      (Core.Name "greaterThan", (\input -> Eithers.map (\t -> Util.ComparisonGreaterThan) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -precision :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Util.Precision)-precision cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "arbitrary", (\input -> Eithers.map (\t -> Util.PrecisionArbitrary) (Helpers.decodeUnit cx input))),-                (Core.Name "bits", (\input -> Eithers.map (\t -> Util.PrecisionBits t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralInteger v3 -> ((\x -> case x of-                      Core.IntegerValueInt32 v4 -> (Right v4)-                      _ -> (Left (Util.DecodingError "expected int32 value"))) v3)-                    _ -> (Left (Util.DecodingError "expected int32 literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input))))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.util.Precision"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+precision :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Util.Precision+precision cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "arbitrary", (\input -> Eithers.map (\t -> Util.PrecisionArbitrary) (Helpers.decodeUnit cx input))),+                      (Core.Name "bits", (\input -> Eithers.map (\t -> Util.PrecisionBits t) (Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+                        Core.TermLiteral v1 -> case v1 of+                          Core.LiteralInteger v2 -> case v2 of+                            Core.IntegerValueInt32 v3 -> Right v3+                            _ -> Left (Errors.DecodingError "expected int32 value")+                          _ -> Left (Errors.DecodingError "expected int32 literal")+                        _ -> Left (Errors.DecodingError "expected literal")) (Lexical.stripAndDereferenceTermEither cx input))))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)
src/gen-main/haskell/Hydra/Decode/Variants.hs view
@@ -5,6 +5,7 @@ module Hydra.Decode.Variants where  import qualified Hydra.Core as Core+import qualified Hydra.Errors as Errors import qualified Hydra.Extract.Helpers as Helpers import qualified Hydra.Graph as Graph import qualified Hydra.Lexical as Lexical@@ -12,7 +13,6 @@ import qualified Hydra.Lib.Maps as Maps import qualified Hydra.Lib.Maybes as Maybes import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Util as Util import qualified Hydra.Variants as Variants import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B@@ -21,122 +21,123 @@ import qualified Data.Map as M import qualified Data.Set as S -eliminationVariant :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Variants.EliminationVariant)-eliminationVariant cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "record", (\input -> Eithers.map (\t -> Variants.EliminationVariantRecord) (Helpers.decodeUnit cx input))),-                (Core.Name "union", (\input -> Eithers.map (\t -> Variants.EliminationVariantUnion) (Helpers.decodeUnit cx input))),-                (Core.Name "wrap", (\input -> Eithers.map (\t -> Variants.EliminationVariantWrap) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.variants.EliminationVariant"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+eliminationVariant :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Variants.EliminationVariant+eliminationVariant cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "record", (\input -> Eithers.map (\t -> Variants.EliminationVariantRecord) (Helpers.decodeUnit cx input))),+                      (Core.Name "union", (\input -> Eithers.map (\t -> Variants.EliminationVariantUnion) (Helpers.decodeUnit cx input))),+                      (Core.Name "wrap", (\input -> Eithers.map (\t -> Variants.EliminationVariantWrap) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -functionVariant :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Variants.FunctionVariant)-functionVariant cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "elimination", (\input -> Eithers.map (\t -> Variants.FunctionVariantElimination) (Helpers.decodeUnit cx input))),-                (Core.Name "lambda", (\input -> Eithers.map (\t -> Variants.FunctionVariantLambda) (Helpers.decodeUnit cx input))),-                (Core.Name "primitive", (\input -> Eithers.map (\t -> Variants.FunctionVariantPrimitive) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.variants.FunctionVariant"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+functionVariant :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Variants.FunctionVariant+functionVariant cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "elimination", (\input -> Eithers.map (\t -> Variants.FunctionVariantElimination) (Helpers.decodeUnit cx input))),+                      (Core.Name "lambda", (\input -> Eithers.map (\t -> Variants.FunctionVariantLambda) (Helpers.decodeUnit cx input))),+                      (Core.Name "primitive", (\input -> Eithers.map (\t -> Variants.FunctionVariantPrimitive) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -literalVariant :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Variants.LiteralVariant)-literalVariant cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "binary", (\input -> Eithers.map (\t -> Variants.LiteralVariantBinary) (Helpers.decodeUnit cx input))),-                (Core.Name "boolean", (\input -> Eithers.map (\t -> Variants.LiteralVariantBoolean) (Helpers.decodeUnit cx input))),-                (Core.Name "float", (\input -> Eithers.map (\t -> Variants.LiteralVariantFloat) (Helpers.decodeUnit cx input))),-                (Core.Name "integer", (\input -> Eithers.map (\t -> Variants.LiteralVariantInteger) (Helpers.decodeUnit cx input))),-                (Core.Name "string", (\input -> Eithers.map (\t -> Variants.LiteralVariantString) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.variants.LiteralVariant"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+literalVariant :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Variants.LiteralVariant+literalVariant cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "binary", (\input -> Eithers.map (\t -> Variants.LiteralVariantBinary) (Helpers.decodeUnit cx input))),+                      (Core.Name "boolean", (\input -> Eithers.map (\t -> Variants.LiteralVariantBoolean) (Helpers.decodeUnit cx input))),+                      (Core.Name "float", (\input -> Eithers.map (\t -> Variants.LiteralVariantFloat) (Helpers.decodeUnit cx input))),+                      (Core.Name "integer", (\input -> Eithers.map (\t -> Variants.LiteralVariantInteger) (Helpers.decodeUnit cx input))),+                      (Core.Name "string", (\input -> Eithers.map (\t -> Variants.LiteralVariantString) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -termVariant :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Variants.TermVariant)-termVariant cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "annotated", (\input -> Eithers.map (\t -> Variants.TermVariantAnnotated) (Helpers.decodeUnit cx input))),-                (Core.Name "application", (\input -> Eithers.map (\t -> Variants.TermVariantApplication) (Helpers.decodeUnit cx input))),-                (Core.Name "either", (\input -> Eithers.map (\t -> Variants.TermVariantEither) (Helpers.decodeUnit cx input))),-                (Core.Name "function", (\input -> Eithers.map (\t -> Variants.TermVariantFunction) (Helpers.decodeUnit cx input))),-                (Core.Name "let", (\input -> Eithers.map (\t -> Variants.TermVariantLet) (Helpers.decodeUnit cx input))),-                (Core.Name "list", (\input -> Eithers.map (\t -> Variants.TermVariantList) (Helpers.decodeUnit cx input))),-                (Core.Name "literal", (\input -> Eithers.map (\t -> Variants.TermVariantLiteral) (Helpers.decodeUnit cx input))),-                (Core.Name "map", (\input -> Eithers.map (\t -> Variants.TermVariantMap) (Helpers.decodeUnit cx input))),-                (Core.Name "maybe", (\input -> Eithers.map (\t -> Variants.TermVariantMaybe) (Helpers.decodeUnit cx input))),-                (Core.Name "pair", (\input -> Eithers.map (\t -> Variants.TermVariantPair) (Helpers.decodeUnit cx input))),-                (Core.Name "record", (\input -> Eithers.map (\t -> Variants.TermVariantRecord) (Helpers.decodeUnit cx input))),-                (Core.Name "set", (\input -> Eithers.map (\t -> Variants.TermVariantSet) (Helpers.decodeUnit cx input))),-                (Core.Name "typeApplication", (\input -> Eithers.map (\t -> Variants.TermVariantTypeApplication) (Helpers.decodeUnit cx input))),-                (Core.Name "typeLambda", (\input -> Eithers.map (\t -> Variants.TermVariantTypeLambda) (Helpers.decodeUnit cx input))),-                (Core.Name "union", (\input -> Eithers.map (\t -> Variants.TermVariantUnion) (Helpers.decodeUnit cx input))),-                (Core.Name "unit", (\input -> Eithers.map (\t -> Variants.TermVariantUnit) (Helpers.decodeUnit cx input))),-                (Core.Name "variable", (\input -> Eithers.map (\t -> Variants.TermVariantVariable) (Helpers.decodeUnit cx input))),-                (Core.Name "wrap", (\input -> Eithers.map (\t -> Variants.TermVariantWrap) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.variants.TermVariant"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+termVariant :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Variants.TermVariant+termVariant cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "annotated", (\input -> Eithers.map (\t -> Variants.TermVariantAnnotated) (Helpers.decodeUnit cx input))),+                      (Core.Name "application", (\input -> Eithers.map (\t -> Variants.TermVariantApplication) (Helpers.decodeUnit cx input))),+                      (Core.Name "either", (\input -> Eithers.map (\t -> Variants.TermVariantEither) (Helpers.decodeUnit cx input))),+                      (Core.Name "function", (\input -> Eithers.map (\t -> Variants.TermVariantFunction) (Helpers.decodeUnit cx input))),+                      (Core.Name "let", (\input -> Eithers.map (\t -> Variants.TermVariantLet) (Helpers.decodeUnit cx input))),+                      (Core.Name "list", (\input -> Eithers.map (\t -> Variants.TermVariantList) (Helpers.decodeUnit cx input))),+                      (Core.Name "literal", (\input -> Eithers.map (\t -> Variants.TermVariantLiteral) (Helpers.decodeUnit cx input))),+                      (Core.Name "map", (\input -> Eithers.map (\t -> Variants.TermVariantMap) (Helpers.decodeUnit cx input))),+                      (Core.Name "maybe", (\input -> Eithers.map (\t -> Variants.TermVariantMaybe) (Helpers.decodeUnit cx input))),+                      (Core.Name "pair", (\input -> Eithers.map (\t -> Variants.TermVariantPair) (Helpers.decodeUnit cx input))),+                      (Core.Name "record", (\input -> Eithers.map (\t -> Variants.TermVariantRecord) (Helpers.decodeUnit cx input))),+                      (Core.Name "set", (\input -> Eithers.map (\t -> Variants.TermVariantSet) (Helpers.decodeUnit cx input))),+                      (Core.Name "typeApplication", (\input -> Eithers.map (\t -> Variants.TermVariantTypeApplication) (Helpers.decodeUnit cx input))),+                      (Core.Name "typeLambda", (\input -> Eithers.map (\t -> Variants.TermVariantTypeLambda) (Helpers.decodeUnit cx input))),+                      (Core.Name "union", (\input -> Eithers.map (\t -> Variants.TermVariantUnion) (Helpers.decodeUnit cx input))),+                      (Core.Name "unit", (\input -> Eithers.map (\t -> Variants.TermVariantUnit) (Helpers.decodeUnit cx input))),+                      (Core.Name "variable", (\input -> Eithers.map (\t -> Variants.TermVariantVariable) (Helpers.decodeUnit cx input))),+                      (Core.Name "wrap", (\input -> Eithers.map (\t -> Variants.TermVariantWrap) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw) -typeVariant :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Variants.TypeVariant)-typeVariant cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "annotated", (\input -> Eithers.map (\t -> Variants.TypeVariantAnnotated) (Helpers.decodeUnit cx input))),-                (Core.Name "application", (\input -> Eithers.map (\t -> Variants.TypeVariantApplication) (Helpers.decodeUnit cx input))),-                (Core.Name "either", (\input -> Eithers.map (\t -> Variants.TypeVariantEither) (Helpers.decodeUnit cx input))),-                (Core.Name "forall", (\input -> Eithers.map (\t -> Variants.TypeVariantForall) (Helpers.decodeUnit cx input))),-                (Core.Name "function", (\input -> Eithers.map (\t -> Variants.TypeVariantFunction) (Helpers.decodeUnit cx input))),-                (Core.Name "list", (\input -> Eithers.map (\t -> Variants.TypeVariantList) (Helpers.decodeUnit cx input))),-                (Core.Name "literal", (\input -> Eithers.map (\t -> Variants.TypeVariantLiteral) (Helpers.decodeUnit cx input))),-                (Core.Name "map", (\input -> Eithers.map (\t -> Variants.TypeVariantMap) (Helpers.decodeUnit cx input))),-                (Core.Name "maybe", (\input -> Eithers.map (\t -> Variants.TypeVariantMaybe) (Helpers.decodeUnit cx input))),-                (Core.Name "pair", (\input -> Eithers.map (\t -> Variants.TypeVariantPair) (Helpers.decodeUnit cx input))),-                (Core.Name "record", (\input -> Eithers.map (\t -> Variants.TypeVariantRecord) (Helpers.decodeUnit cx input))),-                (Core.Name "set", (\input -> Eithers.map (\t -> Variants.TypeVariantSet) (Helpers.decodeUnit cx input))),-                (Core.Name "union", (\input -> Eithers.map (\t -> Variants.TypeVariantUnion) (Helpers.decodeUnit cx input))),-                (Core.Name "unit", (\input -> Eithers.map (\t -> Variants.TypeVariantUnit) (Helpers.decodeUnit cx input))),-                (Core.Name "variable", (\input -> Eithers.map (\t -> Variants.TypeVariantVariable) (Helpers.decodeUnit cx input))),-                (Core.Name "wrap", (\input -> Eithers.map (\t -> Variants.TypeVariantWrap) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.variants.TypeVariant"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))+typeVariant :: Graph.Graph -> Core.Term -> Either Errors.DecodingError Variants.TypeVariant+typeVariant cx raw =+    Eithers.either (\err -> Left (Errors.DecodingError err)) (\stripped -> case stripped of+      Core.TermUnion v0 ->+        let field = Core.injectionField v0+            fname = Core.fieldName field+            fterm = Core.fieldTerm field+            variantMap =+                    Maps.fromList [+                      (Core.Name "annotated", (\input -> Eithers.map (\t -> Variants.TypeVariantAnnotated) (Helpers.decodeUnit cx input))),+                      (Core.Name "application", (\input -> Eithers.map (\t -> Variants.TypeVariantApplication) (Helpers.decodeUnit cx input))),+                      (Core.Name "either", (\input -> Eithers.map (\t -> Variants.TypeVariantEither) (Helpers.decodeUnit cx input))),+                      (Core.Name "forall", (\input -> Eithers.map (\t -> Variants.TypeVariantForall) (Helpers.decodeUnit cx input))),+                      (Core.Name "function", (\input -> Eithers.map (\t -> Variants.TypeVariantFunction) (Helpers.decodeUnit cx input))),+                      (Core.Name "list", (\input -> Eithers.map (\t -> Variants.TypeVariantList) (Helpers.decodeUnit cx input))),+                      (Core.Name "literal", (\input -> Eithers.map (\t -> Variants.TypeVariantLiteral) (Helpers.decodeUnit cx input))),+                      (Core.Name "map", (\input -> Eithers.map (\t -> Variants.TypeVariantMap) (Helpers.decodeUnit cx input))),+                      (Core.Name "maybe", (\input -> Eithers.map (\t -> Variants.TypeVariantMaybe) (Helpers.decodeUnit cx input))),+                      (Core.Name "pair", (\input -> Eithers.map (\t -> Variants.TypeVariantPair) (Helpers.decodeUnit cx input))),+                      (Core.Name "record", (\input -> Eithers.map (\t -> Variants.TypeVariantRecord) (Helpers.decodeUnit cx input))),+                      (Core.Name "set", (\input -> Eithers.map (\t -> Variants.TypeVariantSet) (Helpers.decodeUnit cx input))),+                      (Core.Name "union", (\input -> Eithers.map (\t -> Variants.TypeVariantUnion) (Helpers.decodeUnit cx input))),+                      (Core.Name "unit", (\input -> Eithers.map (\t -> Variants.TypeVariantUnit) (Helpers.decodeUnit cx input))),+                      (Core.Name "variable", (\input -> Eithers.map (\t -> Variants.TypeVariantVariable) (Helpers.decodeUnit cx input))),+                      (Core.Name "void", (\input -> Eithers.map (\t -> Variants.TypeVariantVoid) (Helpers.decodeUnit cx input))),+                      (Core.Name "wrap", (\input -> Eithers.map (\t -> Variants.TypeVariantWrap) (Helpers.decodeUnit cx input)))]+        in (Maybes.maybe (Left (Errors.DecodingError (Strings.cat [+          "no such field ",+          (Core.unName fname),+          " in union"]))) (\f -> f fterm) (Maps.lookup fname variantMap))+      _ -> Left (Errors.DecodingError "expected union")) (Lexical.stripAndDereferenceTermEither cx raw)
− src/gen-main/haskell/Hydra/Decode/Workflow.hs
@@ -1,78 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Term decoders for hydra.workflow--module Hydra.Decode.Workflow where--import qualified Hydra.Core as Core-import qualified Hydra.Decode.Core as Core_-import qualified Hydra.Decode.Module as Module-import qualified Hydra.Extract.Helpers as Helpers-import qualified Hydra.Graph as Graph-import qualified Hydra.Lexical as Lexical-import qualified Hydra.Lib.Eithers as Eithers-import qualified Hydra.Lib.Maps as Maps-import qualified Hydra.Lib.Maybes as Maybes-import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Util as Util-import qualified Hydra.Workflow as Workflow-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S--hydraSchemaSpec :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Workflow.HydraSchemaSpec)-hydraSchemaSpec cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "modules" (Helpers.decodeList Module.module_) fieldMap cx) (\field_modules -> Eithers.bind (Helpers.requireField "typeName" Core_.name fieldMap cx) (\field_typeName -> Right (Workflow.HydraSchemaSpec {-      Workflow.hydraSchemaSpecModules = field_modules,-      Workflow.hydraSchemaSpecTypeName = field_typeName}))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.workflow.HydraSchemaSpec"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--schemaSpec :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Workflow.SchemaSpec)-schemaSpec cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermUnion v1 ->  -    let tname = (Core.injectionTypeName v1) -        field = (Core.injectionField v1)-        fname = (Core.fieldName field)-        fterm = (Core.fieldTerm field)-        variantMap = (Maps.fromList [-                (Core.Name "hydra", (\input -> Eithers.map (\t -> Workflow.SchemaSpecHydra t) (hydraSchemaSpec cx input))),-                (Core.Name "file", (\input -> Eithers.map (\t -> Workflow.SchemaSpecFile t) (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-                  Core.TermLiteral v2 -> ((\x -> case x of-                    Core.LiteralString v3 -> (Right v3)-                    _ -> (Left (Util.DecodingError "expected string literal"))) v2)-                  _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx input)))),-                (Core.Name "provided", (\input -> Eithers.map (\t -> Workflow.SchemaSpecProvided) (Helpers.decodeUnit cx input)))])-    in (Maybes.maybe (Left (Util.DecodingError (Strings.cat [-      "no such field ",-      (Core.unName fname),-      " in union type ",-      (Core.unName tname)]))) (\f -> f fterm) (Maps.lookup fname variantMap))-  _ -> (Left (Util.DecodingError "expected union of type hydra.workflow.SchemaSpec"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))--transformWorkflow :: (Graph.Graph -> Core.Term -> Either Util.DecodingError Workflow.TransformWorkflow)-transformWorkflow cx raw = (Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-  Core.TermRecord v1 ->  -    let fieldMap = (Helpers.toFieldMap v1)-    in (Eithers.bind (Helpers.requireField "name" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_name -> Eithers.bind (Helpers.requireField "schemaSpec" schemaSpec fieldMap cx) (\field_schemaSpec -> Eithers.bind (Helpers.requireField "srcDir" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_srcDir -> Eithers.bind (Helpers.requireField "destDir" (\cx -> \raw -> Eithers.either (\err -> Left (Util.DecodingError err)) (\stripped -> (\x -> case x of-      Core.TermLiteral v2 -> ((\x -> case x of-        Core.LiteralString v3 -> (Right v3)-        _ -> (Left (Util.DecodingError "expected string literal"))) v2)-      _ -> (Left (Util.DecodingError "expected literal"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw)) fieldMap cx) (\field_destDir -> Right (Workflow.TransformWorkflow {-      Workflow.transformWorkflowName = field_name,-      Workflow.transformWorkflowSchemaSpec = field_schemaSpec,-      Workflow.transformWorkflowSrcDir = field_srcDir,-      Workflow.transformWorkflowDestDir = field_destDir}))))))-  _ -> (Left (Util.DecodingError "expected record of type hydra.workflow.TransformWorkflow"))) stripped) (Lexical.stripAndDereferenceTermEither cx raw))
src/gen-main/haskell/Hydra/Decoding.hs view
@@ -5,1531 +5,1655 @@ module Hydra.Decoding where  import qualified Hydra.Annotations as Annotations-import qualified Hydra.Compute as Compute-import qualified Hydra.Core as Core-import qualified Hydra.Decode.Core as Core_-import qualified Hydra.Extract.Helpers as Helpers-import qualified Hydra.Formatting as Formatting-import qualified Hydra.Graph as Graph-import qualified Hydra.Lib.Flows as Flows-import qualified Hydra.Lib.Lists as Lists-import qualified Hydra.Lib.Logic as Logic-import qualified Hydra.Lib.Maps as Maps-import qualified Hydra.Lib.Maybes as Maybes-import qualified Hydra.Lib.Sets as Sets-import qualified Hydra.Lib.Strings as Strings-import qualified Hydra.Module as Module-import qualified Hydra.Monads as Monads-import qualified Hydra.Names as Names-import qualified Hydra.Schemas as Schemas-import qualified Hydra.Util as Util-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S---- | Collect forall type variable names from a type-collectForallVariables :: (Core.Type -> [Core.Name])-collectForallVariables typ = ((\x -> case x of-  Core.TypeAnnotated v1 -> (collectForallVariables (Core.annotatedTypeBody v1))-  Core.TypeForall v1 -> (Lists.cons (Core.forallTypeParameter v1) (collectForallVariables (Core.forallTypeBody v1)))-  _ -> []) typ)---- | Collect type variables needing Ord constraints (from Set element types)-collectOrdConstrainedVariables :: (Core.Type -> [Core.Name])-collectOrdConstrainedVariables typ = ((\x -> case x of-  Core.TypeAnnotated v1 -> (collectOrdConstrainedVariables (Core.annotatedTypeBody v1))-  Core.TypeApplication v1 -> (Lists.concat2 (collectOrdConstrainedVariables (Core.applicationTypeFunction v1)) (collectOrdConstrainedVariables (Core.applicationTypeArgument v1)))-  Core.TypeEither v1 -> (Lists.concat2 (collectOrdConstrainedVariables (Core.eitherTypeLeft v1)) (collectOrdConstrainedVariables (Core.eitherTypeRight v1)))-  Core.TypeForall v1 -> (collectOrdConstrainedVariables (Core.forallTypeBody v1))-  Core.TypeList v1 -> (collectOrdConstrainedVariables v1)-  Core.TypeMap v1 -> (Lists.concat2 (collectOrdConstrainedVariables (Core.mapTypeKeys v1)) (collectOrdConstrainedVariables (Core.mapTypeValues v1)))-  Core.TypeMaybe v1 -> (collectOrdConstrainedVariables v1)-  Core.TypePair v1 -> (Lists.concat2 (collectOrdConstrainedVariables (Core.pairTypeFirst v1)) (collectOrdConstrainedVariables (Core.pairTypeSecond v1)))-  Core.TypeRecord v1 -> (Lists.concat (Lists.map (\ft -> collectOrdConstrainedVariables (Core.fieldTypeType ft)) (Core.rowTypeFields v1)))-  Core.TypeSet v1 -> (Lists.concat2 (collectTypeVariablesFromType v1) (collectOrdConstrainedVariables v1))-  Core.TypeUnion v1 -> (Lists.concat (Lists.map (\ft -> collectOrdConstrainedVariables (Core.fieldTypeType ft)) (Core.rowTypeFields v1)))-  Core.TypeWrap v1 -> (collectOrdConstrainedVariables (Core.wrappedTypeBody v1))-  _ -> []) typ)---- | Collect type variable names from a type (forall parameters only)-collectTypeVariables :: (Core.Type -> [Core.Name])-collectTypeVariables typ = (collectForallVariables typ)---- | Collect all type variable names from a type expression-collectTypeVariablesFromType :: (Core.Type -> [Core.Name])-collectTypeVariablesFromType typ = ((\x -> case x of-  Core.TypeAnnotated v1 -> (collectTypeVariablesFromType (Core.annotatedTypeBody v1))-  Core.TypeApplication v1 -> (Lists.concat2 (collectTypeVariablesFromType (Core.applicationTypeFunction v1)) (collectTypeVariablesFromType (Core.applicationTypeArgument v1)))-  Core.TypeEither v1 -> (Lists.concat2 (collectTypeVariablesFromType (Core.eitherTypeLeft v1)) (collectTypeVariablesFromType (Core.eitherTypeRight v1)))-  Core.TypeForall v1 -> (collectTypeVariablesFromType (Core.forallTypeBody v1))-  Core.TypeList v1 -> (collectTypeVariablesFromType v1)-  Core.TypeMap v1 -> (Lists.concat2 (collectTypeVariablesFromType (Core.mapTypeKeys v1)) (collectTypeVariablesFromType (Core.mapTypeValues v1)))-  Core.TypeMaybe v1 -> (collectTypeVariablesFromType v1)-  Core.TypePair v1 -> (Lists.concat2 (collectTypeVariablesFromType (Core.pairTypeFirst v1)) (collectTypeVariablesFromType (Core.pairTypeSecond v1)))-  Core.TypeRecord v1 -> (Lists.concat (Lists.map (\ft -> collectTypeVariablesFromType (Core.fieldTypeType ft)) (Core.rowTypeFields v1)))-  Core.TypeSet v1 -> (collectTypeVariablesFromType v1)-  Core.TypeUnion v1 -> (Lists.concat (Lists.map (\ft -> collectTypeVariablesFromType (Core.fieldTypeType ft)) (Core.rowTypeFields v1)))-  Core.TypeVariable v1 -> [-    v1]-  Core.TypeWrap v1 -> (collectTypeVariablesFromType (Core.wrappedTypeBody v1))-  _ -> []) typ)---- | Transform a type binding into a decoder binding-decodeBinding :: (Core.Binding -> Compute.Flow Graph.Graph Core.Binding)-decodeBinding b = (Flows.bind Monads.getState (\cx -> Flows.bind (Monads.eitherToFlow Util.unDecodingError (Core_.type_ cx (Core.bindingTerm b))) (\typ -> Flows.pure (Core.Binding {-  Core.bindingName = (decodeBindingName (Core.bindingName b)),-  Core.bindingTerm = (decodeType typ),-  Core.bindingType = (Just (decoderTypeScheme typ))}))))---- | Generate a binding name for a decoder function from a type name-decodeBindingName :: (Core.Name -> Core.Name)-decodeBindingName n = (Logic.ifElse (Logic.not (Lists.null (Lists.tail (Strings.splitOn "." (Core.unName n))))) (Core.Name (Strings.intercalate "." (Lists.concat2 [-  "hydra",-  "decode"] (Lists.concat2 (Lists.tail (Lists.init (Strings.splitOn "." (Core.unName n)))) [-  Formatting.decapitalize (Names.localNameOf n)])))) (Core.Name (Formatting.decapitalize (Names.localNameOf n))))---- | Generate a decoder for an Either type-decodeEitherType :: (Core.EitherType -> Core.Term)-decodeEitherType et =  -  let leftDecoder = (decodeType (Core.eitherTypeLeft et))-  in  -    let rightDecoder = (decodeType (Core.eitherTypeRight et))-    in (Core.TermApplication (Core.Application {-      Core.applicationFunction = (Core.TermApplication (Core.Application {-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.decodeEither")),-        Core.applicationArgument = leftDecoder})),-      Core.applicationArgument = rightDecoder}))---- | Generate a decoder for a polymorphic (forall) type-decodeForallType :: (Core.ForallType -> Core.Term)-decodeForallType ft = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-  Core.lambdaParameter = (decodeBindingName (Core.forallTypeParameter ft)),-  Core.lambdaDomain = Nothing,-  Core.lambdaBody = (decodeType (Core.forallTypeBody ft))})))---- | Generate a decoder for a list type-decodeListType :: (Core.Type -> Core.Term)-decodeListType elemType =  -  let elemDecoder = (decodeType elemType)-  in (Core.TermApplication (Core.Application {-    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.decodeList")),-    Core.applicationArgument = elemDecoder}))---- | Generate a decoder for a literal type-decodeLiteralType :: (Core.LiteralType -> Core.Term)-decodeLiteralType lt = ((\x -> case x of-  Core.LiteralTypeBinary -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-    Core.lambdaParameter = (Core.Name "cx"),-    Core.lambdaDomain = Nothing,-    Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "raw"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermApplication (Core.Application {-        Core.applicationFunction = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "err"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-          Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-            Core.lambdaParameter = (Core.Name "stripped"),-            Core.lambdaDomain = Nothing,-            Core.lambdaBody = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                Core.caseStatementCases = [-                  Core.Field {-                    Core.fieldName = (Core.Name "literal"),-                    Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                      Core.lambdaParameter = (Core.Name "v"),-                      Core.lambdaDomain = Nothing,-                      Core.lambdaBody = (Core.TermApplication (Core.Application {-                        Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                            Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected binary literal"))}))))),-                          Core.caseStatementCases = [-                            Core.Field {-                              Core.fieldName = (Core.Name "binary"),-                              Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                Core.lambdaParameter = (Core.Name "b"),-                                Core.lambdaDomain = Nothing,-                                Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "b"))))})))}]})))),-                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-              Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-        Core.applicationArgument = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-          Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))-  Core.LiteralTypeBoolean -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-    Core.lambdaParameter = (Core.Name "cx"),-    Core.lambdaDomain = Nothing,-    Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "raw"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermApplication (Core.Application {-        Core.applicationFunction = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "err"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-          Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-            Core.lambdaParameter = (Core.Name "stripped"),-            Core.lambdaDomain = Nothing,-            Core.lambdaBody = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                Core.caseStatementCases = [-                  Core.Field {-                    Core.fieldName = (Core.Name "literal"),-                    Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                      Core.lambdaParameter = (Core.Name "v"),-                      Core.lambdaDomain = Nothing,-                      Core.lambdaBody = (Core.TermApplication (Core.Application {-                        Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                            Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected boolean literal"))}))))),-                          Core.caseStatementCases = [-                            Core.Field {-                              Core.fieldName = (Core.Name "boolean"),-                              Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                Core.lambdaParameter = (Core.Name "b"),-                                Core.lambdaDomain = Nothing,-                                Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "b"))))})))}]})))),-                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-              Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-        Core.applicationArgument = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-          Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))-  Core.LiteralTypeFloat v1 -> ((\x -> case x of-    Core.FloatTypeBigfloat -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "cx"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-        Core.lambdaParameter = (Core.Name "raw"),-        Core.lambdaDomain = Nothing,-        Core.lambdaBody = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                Core.lambdaParameter = (Core.Name "err"),-                Core.lambdaDomain = Nothing,-                Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "stripped"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                  Core.caseStatementCases = [-                    Core.Field {-                      Core.fieldName = (Core.Name "literal"),-                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                        Core.lambdaParameter = (Core.Name "v"),-                        Core.lambdaDomain = Nothing,-                        Core.lambdaBody = (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                              Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                "expected ",-                                "bigfloat",-                                " literal"])))}))))),-                            Core.caseStatementCases = [-                              Core.Field {-                                Core.fieldName = (Core.Name "float"),-                                Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                                  Core.caseStatementTypeName = (Core.Name "hydra.core.FloatValue"),-                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                      "expected ",-                                      "bigfloat",-                                      " value"])))}))))),-                                  Core.caseStatementCases = [-                                    Core.Field {-                                      Core.fieldName = (Core.Name "bigfloat"),-                                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                        Core.lambdaParameter = (Core.Name "f"),-                                        Core.lambdaDomain = Nothing,-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "f"))))})))}]}))))}]})))),-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-          Core.applicationArgument = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))-    Core.FloatTypeFloat32 -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "cx"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-        Core.lambdaParameter = (Core.Name "raw"),-        Core.lambdaDomain = Nothing,-        Core.lambdaBody = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                Core.lambdaParameter = (Core.Name "err"),-                Core.lambdaDomain = Nothing,-                Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "stripped"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                  Core.caseStatementCases = [-                    Core.Field {-                      Core.fieldName = (Core.Name "literal"),-                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                        Core.lambdaParameter = (Core.Name "v"),-                        Core.lambdaDomain = Nothing,-                        Core.lambdaBody = (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                              Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                "expected ",-                                "float32",-                                " literal"])))}))))),-                            Core.caseStatementCases = [-                              Core.Field {-                                Core.fieldName = (Core.Name "float"),-                                Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                                  Core.caseStatementTypeName = (Core.Name "hydra.core.FloatValue"),-                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                      "expected ",-                                      "float32",-                                      " value"])))}))))),-                                  Core.caseStatementCases = [-                                    Core.Field {-                                      Core.fieldName = (Core.Name "float32"),-                                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                        Core.lambdaParameter = (Core.Name "f"),-                                        Core.lambdaDomain = Nothing,-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "f"))))})))}]}))))}]})))),-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-          Core.applicationArgument = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))-    Core.FloatTypeFloat64 -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "cx"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-        Core.lambdaParameter = (Core.Name "raw"),-        Core.lambdaDomain = Nothing,-        Core.lambdaBody = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                Core.lambdaParameter = (Core.Name "err"),-                Core.lambdaDomain = Nothing,-                Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "stripped"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                  Core.caseStatementCases = [-                    Core.Field {-                      Core.fieldName = (Core.Name "literal"),-                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                        Core.lambdaParameter = (Core.Name "v"),-                        Core.lambdaDomain = Nothing,-                        Core.lambdaBody = (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                              Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                "expected ",-                                "float64",-                                " literal"])))}))))),-                            Core.caseStatementCases = [-                              Core.Field {-                                Core.fieldName = (Core.Name "float"),-                                Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                                  Core.caseStatementTypeName = (Core.Name "hydra.core.FloatValue"),-                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                      "expected ",-                                      "float64",-                                      " value"])))}))))),-                                  Core.caseStatementCases = [-                                    Core.Field {-                                      Core.fieldName = (Core.Name "float64"),-                                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                        Core.lambdaParameter = (Core.Name "f"),-                                        Core.lambdaDomain = Nothing,-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "f"))))})))}]}))))}]})))),-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-          Core.applicationArgument = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))) v1)-  Core.LiteralTypeInteger v1 -> ((\x -> case x of-    Core.IntegerTypeBigint -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "cx"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-        Core.lambdaParameter = (Core.Name "raw"),-        Core.lambdaDomain = Nothing,-        Core.lambdaBody = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                Core.lambdaParameter = (Core.Name "err"),-                Core.lambdaDomain = Nothing,-                Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "stripped"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                  Core.caseStatementCases = [-                    Core.Field {-                      Core.fieldName = (Core.Name "literal"),-                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                        Core.lambdaParameter = (Core.Name "v"),-                        Core.lambdaDomain = Nothing,-                        Core.lambdaBody = (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                              Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                "expected ",-                                "bigint",-                                " literal"])))}))))),-                            Core.caseStatementCases = [-                              Core.Field {-                                Core.fieldName = (Core.Name "integer"),-                                Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                                  Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),-                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                      "expected ",-                                      "bigint",-                                      " value"])))}))))),-                                  Core.caseStatementCases = [-                                    Core.Field {-                                      Core.fieldName = (Core.Name "bigint"),-                                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                        Core.lambdaParameter = (Core.Name "i"),-                                        Core.lambdaDomain = Nothing,-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-          Core.applicationArgument = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))-    Core.IntegerTypeInt8 -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "cx"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-        Core.lambdaParameter = (Core.Name "raw"),-        Core.lambdaDomain = Nothing,-        Core.lambdaBody = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                Core.lambdaParameter = (Core.Name "err"),-                Core.lambdaDomain = Nothing,-                Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "stripped"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                  Core.caseStatementCases = [-                    Core.Field {-                      Core.fieldName = (Core.Name "literal"),-                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                        Core.lambdaParameter = (Core.Name "v"),-                        Core.lambdaDomain = Nothing,-                        Core.lambdaBody = (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                              Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                "expected ",-                                "int8",-                                " literal"])))}))))),-                            Core.caseStatementCases = [-                              Core.Field {-                                Core.fieldName = (Core.Name "integer"),-                                Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                                  Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),-                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                      "expected ",-                                      "int8",-                                      " value"])))}))))),-                                  Core.caseStatementCases = [-                                    Core.Field {-                                      Core.fieldName = (Core.Name "int8"),-                                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                        Core.lambdaParameter = (Core.Name "i"),-                                        Core.lambdaDomain = Nothing,-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-          Core.applicationArgument = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))-    Core.IntegerTypeInt16 -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "cx"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-        Core.lambdaParameter = (Core.Name "raw"),-        Core.lambdaDomain = Nothing,-        Core.lambdaBody = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                Core.lambdaParameter = (Core.Name "err"),-                Core.lambdaDomain = Nothing,-                Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "stripped"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                  Core.caseStatementCases = [-                    Core.Field {-                      Core.fieldName = (Core.Name "literal"),-                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                        Core.lambdaParameter = (Core.Name "v"),-                        Core.lambdaDomain = Nothing,-                        Core.lambdaBody = (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                              Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                "expected ",-                                "int16",-                                " literal"])))}))))),-                            Core.caseStatementCases = [-                              Core.Field {-                                Core.fieldName = (Core.Name "integer"),-                                Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                                  Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),-                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                      "expected ",-                                      "int16",-                                      " value"])))}))))),-                                  Core.caseStatementCases = [-                                    Core.Field {-                                      Core.fieldName = (Core.Name "int16"),-                                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                        Core.lambdaParameter = (Core.Name "i"),-                                        Core.lambdaDomain = Nothing,-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-          Core.applicationArgument = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))-    Core.IntegerTypeInt32 -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "cx"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-        Core.lambdaParameter = (Core.Name "raw"),-        Core.lambdaDomain = Nothing,-        Core.lambdaBody = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                Core.lambdaParameter = (Core.Name "err"),-                Core.lambdaDomain = Nothing,-                Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "stripped"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                  Core.caseStatementCases = [-                    Core.Field {-                      Core.fieldName = (Core.Name "literal"),-                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                        Core.lambdaParameter = (Core.Name "v"),-                        Core.lambdaDomain = Nothing,-                        Core.lambdaBody = (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                              Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                "expected ",-                                "int32",-                                " literal"])))}))))),-                            Core.caseStatementCases = [-                              Core.Field {-                                Core.fieldName = (Core.Name "integer"),-                                Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                                  Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),-                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                      "expected ",-                                      "int32",-                                      " value"])))}))))),-                                  Core.caseStatementCases = [-                                    Core.Field {-                                      Core.fieldName = (Core.Name "int32"),-                                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                        Core.lambdaParameter = (Core.Name "i"),-                                        Core.lambdaDomain = Nothing,-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-          Core.applicationArgument = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))-    Core.IntegerTypeInt64 -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "cx"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-        Core.lambdaParameter = (Core.Name "raw"),-        Core.lambdaDomain = Nothing,-        Core.lambdaBody = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                Core.lambdaParameter = (Core.Name "err"),-                Core.lambdaDomain = Nothing,-                Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "stripped"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                  Core.caseStatementCases = [-                    Core.Field {-                      Core.fieldName = (Core.Name "literal"),-                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                        Core.lambdaParameter = (Core.Name "v"),-                        Core.lambdaDomain = Nothing,-                        Core.lambdaBody = (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                              Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                "expected ",-                                "int64",-                                " literal"])))}))))),-                            Core.caseStatementCases = [-                              Core.Field {-                                Core.fieldName = (Core.Name "integer"),-                                Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                                  Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),-                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                      "expected ",-                                      "int64",-                                      " value"])))}))))),-                                  Core.caseStatementCases = [-                                    Core.Field {-                                      Core.fieldName = (Core.Name "int64"),-                                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                        Core.lambdaParameter = (Core.Name "i"),-                                        Core.lambdaDomain = Nothing,-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-          Core.applicationArgument = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))-    Core.IntegerTypeUint8 -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "cx"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-        Core.lambdaParameter = (Core.Name "raw"),-        Core.lambdaDomain = Nothing,-        Core.lambdaBody = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                Core.lambdaParameter = (Core.Name "err"),-                Core.lambdaDomain = Nothing,-                Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "stripped"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                  Core.caseStatementCases = [-                    Core.Field {-                      Core.fieldName = (Core.Name "literal"),-                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                        Core.lambdaParameter = (Core.Name "v"),-                        Core.lambdaDomain = Nothing,-                        Core.lambdaBody = (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                              Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                "expected ",-                                "uint8",-                                " literal"])))}))))),-                            Core.caseStatementCases = [-                              Core.Field {-                                Core.fieldName = (Core.Name "integer"),-                                Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                                  Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),-                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                      "expected ",-                                      "uint8",-                                      " value"])))}))))),-                                  Core.caseStatementCases = [-                                    Core.Field {-                                      Core.fieldName = (Core.Name "uint8"),-                                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                        Core.lambdaParameter = (Core.Name "i"),-                                        Core.lambdaDomain = Nothing,-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-          Core.applicationArgument = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))-    Core.IntegerTypeUint16 -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "cx"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-        Core.lambdaParameter = (Core.Name "raw"),-        Core.lambdaDomain = Nothing,-        Core.lambdaBody = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                Core.lambdaParameter = (Core.Name "err"),-                Core.lambdaDomain = Nothing,-                Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "stripped"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                  Core.caseStatementCases = [-                    Core.Field {-                      Core.fieldName = (Core.Name "literal"),-                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                        Core.lambdaParameter = (Core.Name "v"),-                        Core.lambdaDomain = Nothing,-                        Core.lambdaBody = (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                              Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                "expected ",-                                "uint16",-                                " literal"])))}))))),-                            Core.caseStatementCases = [-                              Core.Field {-                                Core.fieldName = (Core.Name "integer"),-                                Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                                  Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),-                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                      "expected ",-                                      "uint16",-                                      " value"])))}))))),-                                  Core.caseStatementCases = [-                                    Core.Field {-                                      Core.fieldName = (Core.Name "uint16"),-                                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                        Core.lambdaParameter = (Core.Name "i"),-                                        Core.lambdaDomain = Nothing,-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-          Core.applicationArgument = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))-    Core.IntegerTypeUint32 -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "cx"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-        Core.lambdaParameter = (Core.Name "raw"),-        Core.lambdaDomain = Nothing,-        Core.lambdaBody = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                Core.lambdaParameter = (Core.Name "err"),-                Core.lambdaDomain = Nothing,-                Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "stripped"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                  Core.caseStatementCases = [-                    Core.Field {-                      Core.fieldName = (Core.Name "literal"),-                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                        Core.lambdaParameter = (Core.Name "v"),-                        Core.lambdaDomain = Nothing,-                        Core.lambdaBody = (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                              Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                "expected ",-                                "uint32",-                                " literal"])))}))))),-                            Core.caseStatementCases = [-                              Core.Field {-                                Core.fieldName = (Core.Name "integer"),-                                Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                                  Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),-                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                      "expected ",-                                      "uint32",-                                      " value"])))}))))),-                                  Core.caseStatementCases = [-                                    Core.Field {-                                      Core.fieldName = (Core.Name "uint32"),-                                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                        Core.lambdaParameter = (Core.Name "i"),-                                        Core.lambdaDomain = Nothing,-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-          Core.applicationArgument = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))-    Core.IntegerTypeUint64 -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "cx"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-        Core.lambdaParameter = (Core.Name "raw"),-        Core.lambdaDomain = Nothing,-        Core.lambdaBody = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                Core.lambdaParameter = (Core.Name "err"),-                Core.lambdaDomain = Nothing,-                Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "stripped"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                  Core.caseStatementCases = [-                    Core.Field {-                      Core.fieldName = (Core.Name "literal"),-                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                        Core.lambdaParameter = (Core.Name "v"),-                        Core.lambdaDomain = Nothing,-                        Core.lambdaBody = (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                            Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                            Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                              Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                "expected ",-                                "uint64",-                                " literal"])))}))))),-                            Core.caseStatementCases = [-                              Core.Field {-                                Core.fieldName = (Core.Name "integer"),-                                Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                                  Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),-                                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                                      "expected ",-                                      "uint64",-                                      " value"])))}))))),-                                  Core.caseStatementCases = [-                                    Core.Field {-                                      Core.fieldName = (Core.Name "uint64"),-                                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                        Core.lambdaParameter = (Core.Name "i"),-                                        Core.lambdaDomain = Nothing,-                                        Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),-                          Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-          Core.applicationArgument = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))) v1)-  Core.LiteralTypeString -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-    Core.lambdaParameter = (Core.Name "cx"),-    Core.lambdaDomain = Nothing,-    Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "raw"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermApplication (Core.Application {-        Core.applicationFunction = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "err"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-          Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-            Core.lambdaParameter = (Core.Name "stripped"),-            Core.lambdaDomain = Nothing,-            Core.lambdaBody = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),-                Core.caseStatementCases = [-                  Core.Field {-                    Core.fieldName = (Core.Name "literal"),-                    Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                      Core.lambdaParameter = (Core.Name "v"),-                      Core.lambdaDomain = Nothing,-                      Core.lambdaBody = (Core.TermApplication (Core.Application {-                        Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                            Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),-                          Core.caseStatementCases = [-                            Core.Field {-                              Core.fieldName = (Core.Name "string"),-                              Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                Core.lambdaParameter = (Core.Name "s"),-                                Core.lambdaDomain = Nothing,-                                Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))})))}]})))),-                        Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),-              Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-        Core.applicationArgument = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-          Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))) lt)---- | Generate a decoder for a map type-decodeMapType :: (Core.MapType -> Core.Term)-decodeMapType mt =  -  let keyDecoder = (decodeType (Core.mapTypeKeys mt))-  in  -    let valDecoder = (decodeType (Core.mapTypeValues mt))-    in (Core.TermApplication (Core.Application {-      Core.applicationFunction = (Core.TermApplication (Core.Application {-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.decodeMap")),-        Core.applicationArgument = keyDecoder})),-      Core.applicationArgument = valDecoder}))---- | Generate a decoder for an optional type-decodeMaybeType :: (Core.Type -> Core.Term)-decodeMaybeType elemType =  -  let elemDecoder = (decodeType elemType)-  in (Core.TermApplication (Core.Application {-    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.decodeMaybe")),-    Core.applicationArgument = elemDecoder}))---- | Transform a type module into a decoder module-decodeModule :: (Module.Module -> Compute.Flow Graph.Graph (Maybe Module.Module))-decodeModule mod = (Flows.bind (filterTypeBindings (Module.moduleElements mod)) (\typeBindings -> Logic.ifElse (Lists.null typeBindings) (Flows.pure Nothing) (Flows.bind (Flows.mapList decodeBinding typeBindings) (\decodedBindings ->  -  let decodedTypeDeps = (Lists.map decodeNamespace (Module.moduleTypeDependencies mod))-  in  -    let decodedTermDeps = (Lists.map decodeNamespace (Module.moduleTermDependencies mod))-    in  -      let allDecodedDeps = (Lists.nub (Lists.concat2 decodedTypeDeps decodedTermDeps))-      in (Flows.pure (Just (Module.Module {-        Module.moduleNamespace = (decodeNamespace (Module.moduleNamespace mod)),-        Module.moduleElements = decodedBindings,-        Module.moduleTermDependencies = (Lists.concat2 [-          Module.Namespace "hydra.extract.helpers",-          (Module.Namespace "hydra.lexical"),-          (Module.Namespace "hydra.rewriting")] allDecodedDeps),-        Module.moduleTypeDependencies = [-          Module.moduleNamespace mod,-          (Module.Namespace "hydra.util")],-        Module.moduleDescription = (Just (Strings.cat [-          "Term decoders for ",-          (Module.unNamespace (Module.moduleNamespace mod))]))})))))))---- | Generate a decoder module namespace from a source module namespace-decodeNamespace :: (Module.Namespace -> Module.Namespace)-decodeNamespace ns = (Module.Namespace (Strings.cat [-  "hydra.decode.",-  (Strings.intercalate "." (Lists.tail (Strings.splitOn "." (Module.unNamespace ns))))]))---- | Generate a decoder for a pair type-decodePairType :: (Core.PairType -> Core.Term)-decodePairType pt =  -  let firstDecoder = (decodeType (Core.pairTypeFirst pt))-  in  -    let secondDecoder = (decodeType (Core.pairTypeSecond pt))-    in (Core.TermApplication (Core.Application {-      Core.applicationFunction = (Core.TermApplication (Core.Application {-        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.decodePair")),-        Core.applicationArgument = firstDecoder})),-      Core.applicationArgument = secondDecoder}))---- | Generate a decoder for a record type-decodeRecordType :: (Core.RowType -> Core.Term)-decodeRecordType rt =  -  let typeName = (Core.rowTypeTypeName rt)-  in  -    let fieldTypes = (Core.rowTypeFields rt)-    in  -      let decodeFieldTerm = (\ft -> Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermApplication (Core.Application {-                  Core.applicationFunction = (Core.TermApplication (Core.Application {-                    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.requireField")),-                    Core.applicationArgument = (Core.TermLiteral (Core.LiteralString (Core.unName (Core.fieldTypeName ft))))})),-                  Core.applicationArgument = (decodeType (Core.fieldTypeType ft))})),-                Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),-              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))}))-      in  -        let localVarName = (\ft -> Core.Name (Strings.cat [-                "field_",-                (Core.unName (Core.fieldTypeName ft))]))-        in  -          let toFieldLambda = (\ft -> \body -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                  Core.lambdaParameter = (localVarName ft),-                  Core.lambdaDomain = Nothing,-                  Core.lambdaBody = body})))-          in  -            let decodeBody = (Lists.foldl (\acc -> \ft -> Core.TermApplication (Core.Application {-                    Core.applicationFunction = (Core.TermApplication (Core.Application {-                      Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.bind"))),-                      Core.applicationArgument = (decodeFieldTerm ft)})),-                    Core.applicationArgument = (toFieldLambda ft acc)})) (Core.TermEither (Right (Core.TermRecord (Core.Record {-                    Core.recordTypeName = typeName,-                    Core.recordFields = (Lists.map (\ft -> Core.Field {-                      Core.fieldName = (Core.fieldTypeName ft),-                      Core.fieldTerm = (Core.TermVariable (localVarName ft))}) fieldTypes)})))) (Lists.reverse fieldTypes))-            in (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "cx"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                Core.lambdaParameter = (Core.Name "raw"),-                Core.lambdaDomain = Nothing,-                Core.lambdaBody = (Core.TermApplication (Core.Application {-                  Core.applicationFunction = (Core.TermApplication (Core.Application {-                    Core.applicationFunction = (Core.TermApplication (Core.Application {-                      Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-                      Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                        Core.lambdaParameter = (Core.Name "err"),-                        Core.lambdaDomain = Nothing,-                        Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                          Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                          Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-                    Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                      Core.lambdaParameter = (Core.Name "stripped"),-                      Core.lambdaDomain = Nothing,-                      Core.lambdaBody = (Core.TermApplication (Core.Application {-                        Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                          Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                          Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                            Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                              "expected record of type ",-                              (Core.unName typeName)])))}))))),-                          Core.caseStatementCases = [-                            Core.Field {-                              Core.fieldName = (Core.Name "record"),-                              Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                Core.lambdaParameter = (Core.Name "record"),-                                Core.lambdaDomain = Nothing,-                                Core.lambdaBody = (Core.TermLet (Core.Let {-                                  Core.letBindings = [-                                    Core.Binding {-                                      Core.bindingName = (Core.Name "fieldMap"),-                                      Core.bindingTerm = (Core.TermApplication (Core.Application {-                                        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.toFieldMap")),-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),-                                      Core.bindingType = Nothing}],-                                  Core.letBody = decodeBody}))})))}]})))),-                        Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-                  Core.applicationArgument = (Core.TermApplication (Core.Application {-                    Core.applicationFunction = (Core.TermApplication (Core.Application {-                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-                    Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))---- | Generate a decoder for a set type-decodeSetType :: (Core.Type -> Core.Term)-decodeSetType elemType =  -  let elemDecoder = (decodeType elemType)-  in (Core.TermApplication (Core.Application {-    Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.decodeSet")),-    Core.applicationArgument = elemDecoder}))---- | Generate a decoder term for a Type-decodeType :: (Core.Type -> Core.Term)-decodeType typ = ((\x -> case x of-  Core.TypeAnnotated v1 -> (decodeType (Core.annotatedTypeBody v1))-  Core.TypeApplication v1 -> (Core.TermApplication (Core.Application {-    Core.applicationFunction = (decodeType (Core.applicationTypeFunction v1)),-    Core.applicationArgument = (decodeType (Core.applicationTypeArgument v1))}))-  Core.TypeEither v1 -> (decodeEitherType v1)-  Core.TypeForall v1 -> (decodeForallType v1)-  Core.TypeList v1 -> (decodeListType v1)-  Core.TypeLiteral v1 -> (decodeLiteralType v1)-  Core.TypeMap v1 -> (decodeMapType v1)-  Core.TypeMaybe v1 -> (decodeMaybeType v1)-  Core.TypePair v1 -> (decodePairType v1)-  Core.TypeRecord v1 -> (decodeRecordType v1)-  Core.TypeSet v1 -> (decodeSetType v1)-  Core.TypeUnion v1 -> (decodeUnionType v1)-  Core.TypeUnit -> decodeUnitType-  Core.TypeWrap v1 -> (decodeWrappedType v1)-  Core.TypeVariable v1 -> (Core.TermVariable (decodeBindingName v1))-  _ -> (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-    Core.lambdaParameter = (Core.Name "cx"),-    Core.lambdaDomain = Nothing,-    Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "t"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-        Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unsupported type variant"))}))))})))})))) typ)---- | Generate a decoder for the unit type-decodeUnitType :: Core.Term-decodeUnitType = (Core.TermVariable (Core.Name "hydra.extract.helpers.decodeUnit"))---- | Generate a decoder for a union type-decodeUnionType :: (Core.RowType -> Core.Term)-decodeUnionType rt =  -  let typeName = (Core.rowTypeTypeName rt)-  in  -    let toVariantPair = (\ft -> Core.TermPair (Core.TermWrap (Core.WrappedTerm {-            Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),-            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName (Core.fieldTypeName ft))))}), (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-            Core.lambdaParameter = (Core.Name "input"),-            Core.lambdaDomain = Nothing,-            Core.lambdaBody = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.map"))),-                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                  Core.lambdaParameter = (Core.Name "t"),-                  Core.lambdaDomain = Nothing,-                  Core.lambdaBody = (Core.TermUnion (Core.Injection {-                    Core.injectionTypeName = typeName,-                    Core.injectionField = Core.Field {-                      Core.fieldName = (Core.fieldTypeName ft),-                      Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))})))})),-              Core.applicationArgument = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermApplication (Core.Application {-                  Core.applicationFunction = (decodeType (Core.fieldTypeType ft)),-                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-                Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))})))))-    in (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "cx"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-        Core.lambdaParameter = (Core.Name "raw"),-        Core.lambdaDomain = Nothing,-        Core.lambdaBody = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                Core.lambdaParameter = (Core.Name "err"),-                Core.lambdaDomain = Nothing,-                Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "stripped"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermApplication (Core.Application {-                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                  Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                  Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                    Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                      "expected union of type ",-                      (Core.unName typeName)])))}))))),-                  Core.caseStatementCases = [-                    Core.Field {-                      Core.fieldName = (Core.Name "union"),-                      Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                        Core.lambdaParameter = (Core.Name "inj"),-                        Core.lambdaDomain = Nothing,-                        Core.lambdaBody = (Core.TermLet (Core.Let {-                          Core.letBindings = [-                            Core.Binding {-                              Core.bindingName = (Core.Name "tname"),-                              Core.bindingTerm = (Core.TermApplication (Core.Application {-                                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {-                                  Core.projectionTypeName = (Core.Name "hydra.core.Injection"),-                                  Core.projectionField = (Core.Name "typeName")})))),-                                Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),-                              Core.bindingType = Nothing},-                            Core.Binding {-                              Core.bindingName = (Core.Name "field"),-                              Core.bindingTerm = (Core.TermApplication (Core.Application {-                                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {-                                  Core.projectionTypeName = (Core.Name "hydra.core.Injection"),-                                  Core.projectionField = (Core.Name "field")})))),-                                Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),-                              Core.bindingType = Nothing},-                            Core.Binding {-                              Core.bindingName = (Core.Name "fname"),-                              Core.bindingTerm = (Core.TermApplication (Core.Application {-                                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {-                                  Core.projectionTypeName = (Core.Name "hydra.core.Field"),-                                  Core.projectionField = (Core.Name "name")})))),-                                Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),-                              Core.bindingType = Nothing},-                            Core.Binding {-                              Core.bindingName = (Core.Name "fterm"),-                              Core.bindingTerm = (Core.TermApplication (Core.Application {-                                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {-                                  Core.projectionTypeName = (Core.Name "hydra.core.Field"),-                                  Core.projectionField = (Core.Name "term")})))),-                                Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),-                              Core.bindingType = Nothing},-                            Core.Binding {-                              Core.bindingName = (Core.Name "variantMap"),-                              Core.bindingTerm = (Core.TermApplication (Core.Application {-                                Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.maps.fromList"))),-                                Core.applicationArgument = (Core.TermList (Lists.map toVariantPair (Core.rowTypeFields rt)))})),-                              Core.bindingType = Nothing}],-                          Core.letBody = (Core.TermApplication (Core.Application {-                            Core.applicationFunction = (Core.TermApplication (Core.Application {-                              Core.applicationFunction = (Core.TermApplication (Core.Application {-                                Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.maybes.maybe"))),-                                Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                                  Core.wrappedTermBody = (Core.TermApplication (Core.Application {-                                    Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.strings.cat"))),-                                    Core.applicationArgument = (Core.TermList [-                                      Core.TermLiteral (Core.LiteralString "no such field "),-                                      (Core.TermApplication (Core.Application {-                                        Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.core.Name")))),-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),-                                      (Core.TermLiteral (Core.LiteralString " in union type ")),-                                      (Core.TermApplication (Core.Application {-                                        Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.core.Name")))),-                                        Core.applicationArgument = (Core.TermVariable (Core.Name "tname"))}))])}))}))))})),-                              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                                Core.lambdaParameter = (Core.Name "f"),-                                Core.lambdaDomain = Nothing,-                                Core.lambdaBody = (Core.TermApplication (Core.Application {-                                  Core.applicationFunction = (Core.TermVariable (Core.Name "f")),-                                  Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))})))})),-                            Core.applicationArgument = (Core.TermApplication (Core.Application {-                              Core.applicationFunction = (Core.TermApplication (Core.Application {-                                Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.maps.lookup"))),-                                Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),-                              Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))})))}]})))),-                Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-          Core.applicationArgument = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-              Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-            Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))---- | Generate a decoder for a wrapped type-decodeWrappedType :: (Core.WrappedType -> Core.Term)-decodeWrappedType wt =  -  let bodyDecoder = (decodeType (Core.wrappedTypeBody wt))-  in (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-    Core.lambdaParameter = (Core.Name "cx"),-    Core.lambdaDomain = Nothing,-    Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-      Core.lambdaParameter = (Core.Name "raw"),-      Core.lambdaDomain = Nothing,-      Core.lambdaBody = (Core.TermApplication (Core.Application {-        Core.applicationFunction = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),-            Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-              Core.lambdaParameter = (Core.Name "err"),-              Core.lambdaDomain = Nothing,-              Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),-          Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-            Core.lambdaParameter = (Core.Name "stripped"),-            Core.lambdaDomain = Nothing,-            Core.lambdaBody = (Core.TermApplication (Core.Application {-              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {-                Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),-                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {-                  Core.wrappedTermTypeName = (Core.Name "hydra.util.DecodingError"),-                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [-                    "expected wrapped type ",-                    (Core.unName (Core.wrappedTypeTypeName wt))])))}))))),-                Core.caseStatementCases = [-                  Core.Field {-                    Core.fieldName = (Core.Name "wrap"),-                    Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                      Core.lambdaParameter = (Core.Name "wrappedTerm"),-                      Core.lambdaDomain = Nothing,-                      Core.lambdaBody = (Core.TermApplication (Core.Application {-                        Core.applicationFunction = (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.map"))),-                          Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {-                            Core.lambdaParameter = (Core.Name "b"),-                            Core.lambdaDomain = Nothing,-                            Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {-                              Core.wrappedTermTypeName = (Core.wrappedTypeTypeName wt),-                              Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))})))})),-                        Core.applicationArgument = (Core.TermApplication (Core.Application {-                          Core.applicationFunction = (Core.TermApplication (Core.Application {-                            Core.applicationFunction = bodyDecoder,-                            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-                          Core.applicationArgument = (Core.TermApplication (Core.Application {-                            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {-                              Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),-                              Core.projectionField = (Core.Name "body")})))),-                            Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))})))}]})))),-              Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),-        Core.applicationArgument = (Core.TermApplication (Core.Application {-          Core.applicationFunction = (Core.TermApplication (Core.Application {-            Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),-            Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),-          Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))---- | Get full result type for decoder-decoderFullResultType :: (Core.Type -> Core.Type)-decoderFullResultType typ = ((\x -> case x of-  Core.TypeAnnotated v1 -> (decoderFullResultType (Core.annotatedTypeBody v1))-  Core.TypeApplication v1 -> (Core.TypeApplication (Core.ApplicationType {-    Core.applicationTypeFunction = (decoderFullResultType (Core.applicationTypeFunction v1)),-    Core.applicationTypeArgument = (Core.applicationTypeArgument v1)}))-  Core.TypeEither v1 -> (Core.TypeEither (Core.EitherType {-    Core.eitherTypeLeft = (decoderFullResultType (Core.eitherTypeLeft v1)),-    Core.eitherTypeRight = (decoderFullResultType (Core.eitherTypeRight v1))}))-  Core.TypeForall v1 -> (Core.TypeApplication (Core.ApplicationType {-    Core.applicationTypeFunction = (decoderFullResultType (Core.forallTypeBody v1)),-    Core.applicationTypeArgument = (Core.TypeVariable (Core.forallTypeParameter v1))}))-  Core.TypeList v1 -> (Core.TypeList (decoderFullResultType v1))-  Core.TypeLiteral _ -> (Core.TypeVariable (Core.Name "hydra.core.Literal"))-  Core.TypeMap v1 -> (Core.TypeMap (Core.MapType {-    Core.mapTypeKeys = (decoderFullResultType (Core.mapTypeKeys v1)),-    Core.mapTypeValues = (decoderFullResultType (Core.mapTypeValues v1))}))-  Core.TypeMaybe v1 -> (Core.TypeMaybe (decoderFullResultType v1))-  Core.TypePair v1 -> (Core.TypePair (Core.PairType {-    Core.pairTypeFirst = (decoderFullResultType (Core.pairTypeFirst v1)),-    Core.pairTypeSecond = (decoderFullResultType (Core.pairTypeSecond v1))}))-  Core.TypeRecord v1 -> (Core.TypeVariable (Core.rowTypeTypeName v1))-  Core.TypeSet v1 -> (Core.TypeSet (decoderFullResultType v1))-  Core.TypeUnion v1 -> (Core.TypeVariable (Core.rowTypeTypeName v1))-  Core.TypeUnit -> Core.TypeUnit-  Core.TypeVariable v1 -> (Core.TypeVariable v1)-  Core.TypeWrap v1 -> (Core.TypeVariable (Core.wrappedTypeTypeName v1))-  _ -> (Core.TypeVariable (Core.Name "hydra.core.Term"))) typ)---- | Compute the result type name for a decoder-decoderResultType :: (Core.Type -> Core.Name)-decoderResultType typ = ((\x -> case x of-  Core.TypeAnnotated v1 -> (decoderResultType (Core.annotatedTypeBody v1))-  Core.TypeApplication v1 -> (decoderResultType (Core.applicationTypeFunction v1))-  Core.TypeForall v1 -> (decoderResultType (Core.forallTypeBody v1))-  Core.TypeLiteral _ -> (Core.Name "hydra.core.Literal")-  Core.TypeRecord v1 -> (Core.rowTypeTypeName v1)-  Core.TypeUnion v1 -> (Core.rowTypeTypeName v1)-  Core.TypeWrap v1 -> (Core.wrappedTypeTypeName v1)-  _ -> (Core.Name "hydra.core.Term")) typ)---- | Build decoder function type-decoderType :: (Core.Type -> Core.Type)-decoderType typ =  -  let resultType = (decoderFullResultType typ)-  in  -    let baseType = (Core.TypeFunction (Core.FunctionType {-            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),-            Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {-              Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),-              Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {-                Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.util.DecodingError")),-                Core.eitherTypeRight = resultType}))}))}))-    in (prependForallDecoders baseType typ)---- | Build type scheme for a decoder function-decoderTypeScheme :: (Core.Type -> Core.TypeScheme)-decoderTypeScheme typ =  -  let typeVars = (collectTypeVariables typ)-  in  -    let allOrdVars = (collectOrdConstrainedVariables typ)-    in  -      let ordVars = (Lists.filter (\v -> Lists.elem v typeVars) allOrdVars)-      in  -        let constraints = (Logic.ifElse (Lists.null ordVars) Nothing (Just (Maps.fromList (Lists.map (\v -> (v, Core.TypeVariableMetadata {-                Core.typeVariableMetadataClasses = (Sets.singleton (Core.Name "ordering"))})) ordVars))))-        in Core.TypeScheme {-          Core.typeSchemeVariables = typeVars,-          Core.typeSchemeType = (decoderType typ),-          Core.typeSchemeConstraints = constraints}---- | Filter bindings to only decodable type definitions-filterTypeBindings :: ([Core.Binding] -> Compute.Flow Graph.Graph [Core.Binding])-filterTypeBindings bindings = (Flows.map Maybes.cat (Flows.mapList isDecodableBinding (Lists.filter Annotations.isNativeType bindings)))---- | Check if a binding is decodable (serializable type)-isDecodableBinding :: (Core.Binding -> Compute.Flow Graph.Graph (Maybe Core.Binding))-isDecodableBinding b = (Flows.map (\serializable -> Logic.ifElse serializable (Just b) Nothing) (Schemas.isSerializableByName (Core.bindingName b)))---- | Prepend decoder types for forall parameters to base type-prependForallDecoders :: (Core.Type -> Core.Type -> Core.Type)-prependForallDecoders baseType typ = ((\x -> case x of-  Core.TypeAnnotated v1 -> (prependForallDecoders baseType (Core.annotatedTypeBody v1))-  Core.TypeForall v1 -> (Core.TypeFunction (Core.FunctionType {-    Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {-      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),-      Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {-        Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),-        Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {-          Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.util.DecodingError")),-          Core.eitherTypeRight = (Core.TypeVariable (Core.forallTypeParameter v1))}))}))})),-    Core.functionTypeCodomain = (prependForallDecoders baseType (Core.forallTypeBody v1))}))-  _ -> baseType) typ)+import qualified Hydra.Context as Context+import qualified Hydra.Core as Core+import qualified Hydra.Decode.Core as Core_+import qualified Hydra.Errors as Errors+import qualified Hydra.Extract.Helpers as Helpers+import qualified Hydra.Formatting as Formatting+import qualified Hydra.Graph as Graph+import qualified Hydra.Lib.Eithers as Eithers+import qualified Hydra.Lib.Lists as Lists+import qualified Hydra.Lib.Logic as Logic+import qualified Hydra.Lib.Maps as Maps+import qualified Hydra.Lib.Maybes as Maybes+import qualified Hydra.Lib.Sets as Sets+import qualified Hydra.Lib.Strings as Strings+import qualified Hydra.Module as Module+import qualified Hydra.Names as Names+import qualified Hydra.Schemas as Schemas+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++-- | Collect forall type variable names from a type+collectForallVariables :: Core.Type -> [Core.Name]+collectForallVariables typ =+    case typ of+      Core.TypeAnnotated v0 -> collectForallVariables (Core.annotatedTypeBody v0)+      Core.TypeForall v0 -> Lists.cons (Core.forallTypeParameter v0) (collectForallVariables (Core.forallTypeBody v0))+      _ -> []++-- | Collect type variables needing Ord constraints (from Map key and Set element types)+collectOrdConstrainedVariables :: Core.Type -> [Core.Name]+collectOrdConstrainedVariables typ =+    case typ of+      Core.TypeAnnotated v0 -> collectOrdConstrainedVariables (Core.annotatedTypeBody v0)+      Core.TypeApplication v0 -> Lists.concat2 (collectOrdConstrainedVariables (Core.applicationTypeFunction v0)) (collectOrdConstrainedVariables (Core.applicationTypeArgument v0))+      Core.TypeEither v0 -> Lists.concat2 (collectOrdConstrainedVariables (Core.eitherTypeLeft v0)) (collectOrdConstrainedVariables (Core.eitherTypeRight v0))+      Core.TypeForall v0 -> collectOrdConstrainedVariables (Core.forallTypeBody v0)+      Core.TypeList v0 -> collectOrdConstrainedVariables v0+      Core.TypeMap v0 -> Lists.concat [+        collectTypeVariablesFromType (Core.mapTypeKeys v0),+        (collectOrdConstrainedVariables (Core.mapTypeKeys v0)),+        (collectOrdConstrainedVariables (Core.mapTypeValues v0))]+      Core.TypeMaybe v0 -> collectOrdConstrainedVariables v0+      Core.TypePair v0 -> Lists.concat2 (collectOrdConstrainedVariables (Core.pairTypeFirst v0)) (collectOrdConstrainedVariables (Core.pairTypeSecond v0))+      Core.TypeRecord v0 -> Lists.concat (Lists.map (\ft -> collectOrdConstrainedVariables (Core.fieldTypeType ft)) v0)+      Core.TypeSet v0 -> Lists.concat2 (collectTypeVariablesFromType v0) (collectOrdConstrainedVariables v0)+      Core.TypeUnion v0 -> Lists.concat (Lists.map (\ft -> collectOrdConstrainedVariables (Core.fieldTypeType ft)) v0)+      Core.TypeWrap v0 -> collectOrdConstrainedVariables v0+      _ -> []++-- | Collect type variable names from a type (forall parameters only)+collectTypeVariables :: Core.Type -> [Core.Name]+collectTypeVariables typ = collectForallVariables typ++-- | Collect all type variable names from a type expression+collectTypeVariablesFromType :: Core.Type -> [Core.Name]+collectTypeVariablesFromType typ =+    case typ of+      Core.TypeAnnotated v0 -> collectTypeVariablesFromType (Core.annotatedTypeBody v0)+      Core.TypeApplication v0 -> Lists.concat2 (collectTypeVariablesFromType (Core.applicationTypeFunction v0)) (collectTypeVariablesFromType (Core.applicationTypeArgument v0))+      Core.TypeEither v0 -> Lists.concat2 (collectTypeVariablesFromType (Core.eitherTypeLeft v0)) (collectTypeVariablesFromType (Core.eitherTypeRight v0))+      Core.TypeForall v0 -> collectTypeVariablesFromType (Core.forallTypeBody v0)+      Core.TypeList v0 -> collectTypeVariablesFromType v0+      Core.TypeMap v0 -> Lists.concat2 (collectTypeVariablesFromType (Core.mapTypeKeys v0)) (collectTypeVariablesFromType (Core.mapTypeValues v0))+      Core.TypeMaybe v0 -> collectTypeVariablesFromType v0+      Core.TypePair v0 -> Lists.concat2 (collectTypeVariablesFromType (Core.pairTypeFirst v0)) (collectTypeVariablesFromType (Core.pairTypeSecond v0))+      Core.TypeRecord v0 -> Lists.concat (Lists.map (\ft -> collectTypeVariablesFromType (Core.fieldTypeType ft)) v0)+      Core.TypeSet v0 -> collectTypeVariablesFromType v0+      Core.TypeUnion v0 -> Lists.concat (Lists.map (\ft -> collectTypeVariablesFromType (Core.fieldTypeType ft)) v0)+      Core.TypeVariable v0 -> [+        v0]+      Core.TypeWrap v0 -> collectTypeVariablesFromType v0+      _ -> []++-- | Transform a type binding into a decoder binding+decodeBinding :: Context.Context -> Graph.Graph -> Core.Binding -> Either (Context.InContext Errors.DecodingError) Core.Binding+decodeBinding cx graph b =+    Eithers.bind (Eithers.bimap (\_wc_e -> Context.InContext {+      Context.inContextObject = _wc_e,+      Context.inContextContext = cx}) (\_wc_a -> _wc_a) (Core_.type_ graph (Core.bindingTerm b))) (\typ -> Right (Core.Binding {+      Core.bindingName = (decodeBindingName (Core.bindingName b)),+      Core.bindingTerm = (decodeTypeNamed (Core.bindingName b) typ),+      Core.bindingType = (Just (decoderTypeSchemeNamed (Core.bindingName b) typ))}))++-- | Generate a binding name for a decoder function from a type name+decodeBindingName :: Core.Name -> Core.Name+decodeBindingName n =+    Logic.ifElse (Logic.not (Lists.null (Lists.tail (Strings.splitOn "." (Core.unName n))))) (Core.Name (Strings.intercalate "." (Lists.concat2 [+      "hydra",+      "decode"] (Lists.concat2 (Lists.tail (Lists.init (Strings.splitOn "." (Core.unName n)))) [+      Formatting.decapitalize (Names.localNameOf n)])))) (Core.Name (Formatting.decapitalize (Names.localNameOf n)))++-- | Generate a decoder for an Either type+decodeEitherType :: Core.EitherType -> Core.Term+decodeEitherType et =++      let leftDecoder = decodeType (Core.eitherTypeLeft et)+          rightDecoder = decodeType (Core.eitherTypeRight et)+      in (Core.TermApplication (Core.Application {+        Core.applicationFunction = (Core.TermApplication (Core.Application {+          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.decodeEither")),+          Core.applicationArgument = leftDecoder})),+        Core.applicationArgument = rightDecoder}))++-- | Generate a decoder for a polymorphic (forall) type+decodeForallType :: Core.ForallType -> Core.Term+decodeForallType ft =+    Core.TermFunction (Core.FunctionLambda (Core.Lambda {+      Core.lambdaParameter = (decodeBindingName (Core.forallTypeParameter ft)),+      Core.lambdaDomain = Nothing,+      Core.lambdaBody = (decodeType (Core.forallTypeBody ft))}))++-- | Generate a decoder for a list type+decodeListType :: Core.Type -> Core.Term+decodeListType elemType =++      let elemDecoder = decodeType elemType+      in (Core.TermApplication (Core.Application {+        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.decodeList")),+        Core.applicationArgument = elemDecoder}))++-- | Generate a decoder for a literal type+decodeLiteralType :: Core.LiteralType -> Core.Term+decodeLiteralType lt =+    case lt of+      Core.LiteralTypeBinary -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+        Core.lambdaParameter = (Core.Name "cx"),+        Core.lambdaDomain = Nothing,+        Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "raw"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "err"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                    Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                Core.lambdaParameter = (Core.Name "stripped"),+                Core.lambdaDomain = Nothing,+                Core.lambdaBody = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                    Core.caseStatementCases = [+                      Core.Field {+                        Core.fieldName = (Core.Name "literal"),+                        Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                          Core.lambdaParameter = (Core.Name "v"),+                          Core.lambdaDomain = Nothing,+                          Core.lambdaBody = (Core.TermApplication (Core.Application {+                            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                              Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected binary literal"))}))))),+                              Core.caseStatementCases = [+                                Core.Field {+                                  Core.fieldName = (Core.Name "binary"),+                                  Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                    Core.lambdaParameter = (Core.Name "b"),+                                    Core.lambdaDomain = Nothing,+                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "b"))))})))}]})))),+                            Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+            Core.applicationArgument = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))+      Core.LiteralTypeBoolean -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+        Core.lambdaParameter = (Core.Name "cx"),+        Core.lambdaDomain = Nothing,+        Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "raw"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "err"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                    Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                Core.lambdaParameter = (Core.Name "stripped"),+                Core.lambdaDomain = Nothing,+                Core.lambdaBody = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                    Core.caseStatementCases = [+                      Core.Field {+                        Core.fieldName = (Core.Name "literal"),+                        Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                          Core.lambdaParameter = (Core.Name "v"),+                          Core.lambdaDomain = Nothing,+                          Core.lambdaBody = (Core.TermApplication (Core.Application {+                            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                              Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected boolean literal"))}))))),+                              Core.caseStatementCases = [+                                Core.Field {+                                  Core.fieldName = (Core.Name "boolean"),+                                  Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                    Core.lambdaParameter = (Core.Name "b"),+                                    Core.lambdaDomain = Nothing,+                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "b"))))})))}]})))),+                            Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+            Core.applicationArgument = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))+      Core.LiteralTypeFloat v0 -> case v0 of+        Core.FloatTypeBigfloat -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "cx"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+            Core.lambdaParameter = (Core.Name "raw"),+            Core.lambdaDomain = Nothing,+            Core.lambdaBody = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                  Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "err"),+                    Core.lambdaDomain = Nothing,+                    Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "stripped"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                      Core.caseStatementCases = [+                        Core.Field {+                          Core.fieldName = (Core.Name "literal"),+                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                            Core.lambdaParameter = (Core.Name "v"),+                            Core.lambdaDomain = Nothing,+                            Core.lambdaBody = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                    "expected ",+                                    "bigfloat",+                                    " literal"])))}))))),+                                Core.caseStatementCases = [+                                  Core.Field {+                                    Core.fieldName = (Core.Name "float"),+                                    Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                      Core.caseStatementTypeName = (Core.Name "hydra.core.FloatValue"),+                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                          "expected ",+                                          "bigfloat",+                                          " value"])))}))))),+                                      Core.caseStatementCases = [+                                        Core.Field {+                                          Core.fieldName = (Core.Name "bigfloat"),+                                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                            Core.lambdaParameter = (Core.Name "f"),+                                            Core.lambdaDomain = Nothing,+                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "f"))))})))}]}))))}]})))),+                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+              Core.applicationArgument = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))+        Core.FloatTypeFloat32 -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "cx"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+            Core.lambdaParameter = (Core.Name "raw"),+            Core.lambdaDomain = Nothing,+            Core.lambdaBody = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                  Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "err"),+                    Core.lambdaDomain = Nothing,+                    Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "stripped"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                      Core.caseStatementCases = [+                        Core.Field {+                          Core.fieldName = (Core.Name "literal"),+                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                            Core.lambdaParameter = (Core.Name "v"),+                            Core.lambdaDomain = Nothing,+                            Core.lambdaBody = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                    "expected ",+                                    "float32",+                                    " literal"])))}))))),+                                Core.caseStatementCases = [+                                  Core.Field {+                                    Core.fieldName = (Core.Name "float"),+                                    Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                      Core.caseStatementTypeName = (Core.Name "hydra.core.FloatValue"),+                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                          "expected ",+                                          "float32",+                                          " value"])))}))))),+                                      Core.caseStatementCases = [+                                        Core.Field {+                                          Core.fieldName = (Core.Name "float32"),+                                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                            Core.lambdaParameter = (Core.Name "f"),+                                            Core.lambdaDomain = Nothing,+                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "f"))))})))}]}))))}]})))),+                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+              Core.applicationArgument = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))+        Core.FloatTypeFloat64 -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "cx"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+            Core.lambdaParameter = (Core.Name "raw"),+            Core.lambdaDomain = Nothing,+            Core.lambdaBody = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                  Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "err"),+                    Core.lambdaDomain = Nothing,+                    Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "stripped"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                      Core.caseStatementCases = [+                        Core.Field {+                          Core.fieldName = (Core.Name "literal"),+                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                            Core.lambdaParameter = (Core.Name "v"),+                            Core.lambdaDomain = Nothing,+                            Core.lambdaBody = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                    "expected ",+                                    "float64",+                                    " literal"])))}))))),+                                Core.caseStatementCases = [+                                  Core.Field {+                                    Core.fieldName = (Core.Name "float"),+                                    Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                      Core.caseStatementTypeName = (Core.Name "hydra.core.FloatValue"),+                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                          "expected ",+                                          "float64",+                                          " value"])))}))))),+                                      Core.caseStatementCases = [+                                        Core.Field {+                                          Core.fieldName = (Core.Name "float64"),+                                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                            Core.lambdaParameter = (Core.Name "f"),+                                            Core.lambdaDomain = Nothing,+                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "f"))))})))}]}))))}]})))),+                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+              Core.applicationArgument = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))+      Core.LiteralTypeInteger v0 -> case v0 of+        Core.IntegerTypeBigint -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "cx"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+            Core.lambdaParameter = (Core.Name "raw"),+            Core.lambdaDomain = Nothing,+            Core.lambdaBody = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                  Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "err"),+                    Core.lambdaDomain = Nothing,+                    Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "stripped"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                      Core.caseStatementCases = [+                        Core.Field {+                          Core.fieldName = (Core.Name "literal"),+                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                            Core.lambdaParameter = (Core.Name "v"),+                            Core.lambdaDomain = Nothing,+                            Core.lambdaBody = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                    "expected ",+                                    "bigint",+                                    " literal"])))}))))),+                                Core.caseStatementCases = [+                                  Core.Field {+                                    Core.fieldName = (Core.Name "integer"),+                                    Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),+                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                          "expected ",+                                          "bigint",+                                          " value"])))}))))),+                                      Core.caseStatementCases = [+                                        Core.Field {+                                          Core.fieldName = (Core.Name "bigint"),+                                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                            Core.lambdaParameter = (Core.Name "i"),+                                            Core.lambdaDomain = Nothing,+                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),+                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+              Core.applicationArgument = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))+        Core.IntegerTypeInt8 -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "cx"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+            Core.lambdaParameter = (Core.Name "raw"),+            Core.lambdaDomain = Nothing,+            Core.lambdaBody = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                  Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "err"),+                    Core.lambdaDomain = Nothing,+                    Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "stripped"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                      Core.caseStatementCases = [+                        Core.Field {+                          Core.fieldName = (Core.Name "literal"),+                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                            Core.lambdaParameter = (Core.Name "v"),+                            Core.lambdaDomain = Nothing,+                            Core.lambdaBody = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                    "expected ",+                                    "int8",+                                    " literal"])))}))))),+                                Core.caseStatementCases = [+                                  Core.Field {+                                    Core.fieldName = (Core.Name "integer"),+                                    Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),+                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                          "expected ",+                                          "int8",+                                          " value"])))}))))),+                                      Core.caseStatementCases = [+                                        Core.Field {+                                          Core.fieldName = (Core.Name "int8"),+                                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                            Core.lambdaParameter = (Core.Name "i"),+                                            Core.lambdaDomain = Nothing,+                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),+                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+              Core.applicationArgument = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))+        Core.IntegerTypeInt16 -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "cx"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+            Core.lambdaParameter = (Core.Name "raw"),+            Core.lambdaDomain = Nothing,+            Core.lambdaBody = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                  Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "err"),+                    Core.lambdaDomain = Nothing,+                    Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "stripped"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                      Core.caseStatementCases = [+                        Core.Field {+                          Core.fieldName = (Core.Name "literal"),+                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                            Core.lambdaParameter = (Core.Name "v"),+                            Core.lambdaDomain = Nothing,+                            Core.lambdaBody = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                    "expected ",+                                    "int16",+                                    " literal"])))}))))),+                                Core.caseStatementCases = [+                                  Core.Field {+                                    Core.fieldName = (Core.Name "integer"),+                                    Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),+                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                          "expected ",+                                          "int16",+                                          " value"])))}))))),+                                      Core.caseStatementCases = [+                                        Core.Field {+                                          Core.fieldName = (Core.Name "int16"),+                                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                            Core.lambdaParameter = (Core.Name "i"),+                                            Core.lambdaDomain = Nothing,+                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),+                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+              Core.applicationArgument = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))+        Core.IntegerTypeInt32 -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "cx"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+            Core.lambdaParameter = (Core.Name "raw"),+            Core.lambdaDomain = Nothing,+            Core.lambdaBody = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                  Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "err"),+                    Core.lambdaDomain = Nothing,+                    Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "stripped"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                      Core.caseStatementCases = [+                        Core.Field {+                          Core.fieldName = (Core.Name "literal"),+                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                            Core.lambdaParameter = (Core.Name "v"),+                            Core.lambdaDomain = Nothing,+                            Core.lambdaBody = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                    "expected ",+                                    "int32",+                                    " literal"])))}))))),+                                Core.caseStatementCases = [+                                  Core.Field {+                                    Core.fieldName = (Core.Name "integer"),+                                    Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),+                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                          "expected ",+                                          "int32",+                                          " value"])))}))))),+                                      Core.caseStatementCases = [+                                        Core.Field {+                                          Core.fieldName = (Core.Name "int32"),+                                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                            Core.lambdaParameter = (Core.Name "i"),+                                            Core.lambdaDomain = Nothing,+                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),+                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+              Core.applicationArgument = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))+        Core.IntegerTypeInt64 -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "cx"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+            Core.lambdaParameter = (Core.Name "raw"),+            Core.lambdaDomain = Nothing,+            Core.lambdaBody = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                  Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "err"),+                    Core.lambdaDomain = Nothing,+                    Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "stripped"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                      Core.caseStatementCases = [+                        Core.Field {+                          Core.fieldName = (Core.Name "literal"),+                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                            Core.lambdaParameter = (Core.Name "v"),+                            Core.lambdaDomain = Nothing,+                            Core.lambdaBody = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                    "expected ",+                                    "int64",+                                    " literal"])))}))))),+                                Core.caseStatementCases = [+                                  Core.Field {+                                    Core.fieldName = (Core.Name "integer"),+                                    Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),+                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                          "expected ",+                                          "int64",+                                          " value"])))}))))),+                                      Core.caseStatementCases = [+                                        Core.Field {+                                          Core.fieldName = (Core.Name "int64"),+                                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                            Core.lambdaParameter = (Core.Name "i"),+                                            Core.lambdaDomain = Nothing,+                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),+                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+              Core.applicationArgument = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))+        Core.IntegerTypeUint8 -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "cx"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+            Core.lambdaParameter = (Core.Name "raw"),+            Core.lambdaDomain = Nothing,+            Core.lambdaBody = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                  Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "err"),+                    Core.lambdaDomain = Nothing,+                    Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "stripped"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                      Core.caseStatementCases = [+                        Core.Field {+                          Core.fieldName = (Core.Name "literal"),+                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                            Core.lambdaParameter = (Core.Name "v"),+                            Core.lambdaDomain = Nothing,+                            Core.lambdaBody = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                    "expected ",+                                    "uint8",+                                    " literal"])))}))))),+                                Core.caseStatementCases = [+                                  Core.Field {+                                    Core.fieldName = (Core.Name "integer"),+                                    Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),+                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                          "expected ",+                                          "uint8",+                                          " value"])))}))))),+                                      Core.caseStatementCases = [+                                        Core.Field {+                                          Core.fieldName = (Core.Name "uint8"),+                                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                            Core.lambdaParameter = (Core.Name "i"),+                                            Core.lambdaDomain = Nothing,+                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),+                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+              Core.applicationArgument = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))+        Core.IntegerTypeUint16 -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "cx"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+            Core.lambdaParameter = (Core.Name "raw"),+            Core.lambdaDomain = Nothing,+            Core.lambdaBody = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                  Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "err"),+                    Core.lambdaDomain = Nothing,+                    Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "stripped"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                      Core.caseStatementCases = [+                        Core.Field {+                          Core.fieldName = (Core.Name "literal"),+                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                            Core.lambdaParameter = (Core.Name "v"),+                            Core.lambdaDomain = Nothing,+                            Core.lambdaBody = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                    "expected ",+                                    "uint16",+                                    " literal"])))}))))),+                                Core.caseStatementCases = [+                                  Core.Field {+                                    Core.fieldName = (Core.Name "integer"),+                                    Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),+                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                          "expected ",+                                          "uint16",+                                          " value"])))}))))),+                                      Core.caseStatementCases = [+                                        Core.Field {+                                          Core.fieldName = (Core.Name "uint16"),+                                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                            Core.lambdaParameter = (Core.Name "i"),+                                            Core.lambdaDomain = Nothing,+                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),+                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+              Core.applicationArgument = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))+        Core.IntegerTypeUint32 -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "cx"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+            Core.lambdaParameter = (Core.Name "raw"),+            Core.lambdaDomain = Nothing,+            Core.lambdaBody = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                  Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "err"),+                    Core.lambdaDomain = Nothing,+                    Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "stripped"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                      Core.caseStatementCases = [+                        Core.Field {+                          Core.fieldName = (Core.Name "literal"),+                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                            Core.lambdaParameter = (Core.Name "v"),+                            Core.lambdaDomain = Nothing,+                            Core.lambdaBody = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                    "expected ",+                                    "uint32",+                                    " literal"])))}))))),+                                Core.caseStatementCases = [+                                  Core.Field {+                                    Core.fieldName = (Core.Name "integer"),+                                    Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),+                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                          "expected ",+                                          "uint32",+                                          " value"])))}))))),+                                      Core.caseStatementCases = [+                                        Core.Field {+                                          Core.fieldName = (Core.Name "uint32"),+                                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                            Core.lambdaParameter = (Core.Name "i"),+                                            Core.lambdaDomain = Nothing,+                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),+                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+              Core.applicationArgument = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))+        Core.IntegerTypeUint64 -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "cx"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+            Core.lambdaParameter = (Core.Name "raw"),+            Core.lambdaDomain = Nothing,+            Core.lambdaBody = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                  Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "err"),+                    Core.lambdaDomain = Nothing,+                    Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "stripped"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                      Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                      Core.caseStatementCases = [+                        Core.Field {+                          Core.fieldName = (Core.Name "literal"),+                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                            Core.lambdaParameter = (Core.Name "v"),+                            Core.lambdaDomain = Nothing,+                            Core.lambdaBody = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                                Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                  Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                    "expected ",+                                    "uint64",+                                    " literal"])))}))))),+                                Core.caseStatementCases = [+                                  Core.Field {+                                    Core.fieldName = (Core.Name "integer"),+                                    Core.fieldTerm = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                                      Core.caseStatementTypeName = (Core.Name "hydra.core.IntegerValue"),+                                      Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                        Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                        Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Strings.cat [+                                          "expected ",+                                          "uint64",+                                          " value"])))}))))),+                                      Core.caseStatementCases = [+                                        Core.Field {+                                          Core.fieldName = (Core.Name "uint64"),+                                          Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                            Core.lambdaParameter = (Core.Name "i"),+                                            Core.lambdaDomain = Nothing,+                                            Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "i"))))})))}]}))))}]})))),+                              Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                    Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+              Core.applicationArgument = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+                Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))+      Core.LiteralTypeString -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+        Core.lambdaParameter = (Core.Name "cx"),+        Core.lambdaDomain = Nothing,+        Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "raw"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "err"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                    Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                Core.lambdaParameter = (Core.Name "stripped"),+                Core.lambdaDomain = Nothing,+                Core.lambdaBody = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected literal"))}))))),+                    Core.caseStatementCases = [+                      Core.Field {+                        Core.fieldName = (Core.Name "literal"),+                        Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                          Core.lambdaParameter = (Core.Name "v"),+                          Core.lambdaDomain = Nothing,+                          Core.lambdaBody = (Core.TermApplication (Core.Application {+                            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                              Core.caseStatementTypeName = (Core.Name "hydra.core.Literal"),+                              Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected string literal"))}))))),+                              Core.caseStatementCases = [+                                Core.Field {+                                  Core.fieldName = (Core.Name "string"),+                                  Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                    Core.lambdaParameter = (Core.Name "s"),+                                    Core.lambdaDomain = Nothing,+                                    Core.lambdaBody = (Core.TermEither (Right (Core.TermVariable (Core.Name "s"))))})))}]})))),+                            Core.applicationArgument = (Core.TermVariable (Core.Name "v"))}))})))}]})))),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+            Core.applicationArgument = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))}))++-- | Generate a decoder for a map type+decodeMapType :: Core.MapType -> Core.Term+decodeMapType mt =++      let keyDecoder = decodeType (Core.mapTypeKeys mt)+          valDecoder = decodeType (Core.mapTypeValues mt)+      in (Core.TermApplication (Core.Application {+        Core.applicationFunction = (Core.TermApplication (Core.Application {+          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.decodeMap")),+          Core.applicationArgument = keyDecoder})),+        Core.applicationArgument = valDecoder}))++-- | Generate a decoder for an optional type+decodeMaybeType :: Core.Type -> Core.Term+decodeMaybeType elemType =++      let elemDecoder = decodeType elemType+      in (Core.TermApplication (Core.Application {+        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.decodeMaybe")),+        Core.applicationArgument = elemDecoder}))++-- | Transform a type module into a decoder module+decodeModule :: Context.Context -> Graph.Graph -> Module.Module -> Either (Context.InContext Errors.Error) (Maybe Module.Module)+decodeModule cx graph mod =+    Eithers.bind (filterTypeBindings cx graph (Maybes.cat (Lists.map (\d -> case d of+      Module.DefinitionType v0 -> Just (Annotations.typeElement (Module.typeDefinitionName v0) (Module.typeDefinitionType v0))+      _ -> Nothing) (Module.moduleDefinitions mod)))) (\typeBindings -> Logic.ifElse (Lists.null typeBindings) (Right Nothing) (Eithers.bind (Eithers.mapList (\b -> Eithers.bimap (\ic -> Context.InContext {+      Context.inContextObject = (Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError (Context.inContextObject ic)))),+      Context.inContextContext = (Context.inContextContext ic)}) (\x -> x) (decodeBinding cx graph b)) typeBindings) (\decodedBindings ->+      let decodedTypeDeps = Lists.map decodeNamespace (Module.moduleTypeDependencies mod)+          decodedTermDeps = Lists.map decodeNamespace (Module.moduleTermDependencies mod)+          allDecodedDeps = Lists.nub (Lists.concat2 decodedTypeDeps decodedTermDeps)+      in (Right (Just (Module.Module {+        Module.moduleNamespace = (decodeNamespace (Module.moduleNamespace mod)),+        Module.moduleDefinitions = (Lists.map (\b -> Module.DefinitionTerm (Module.TermDefinition {+          Module.termDefinitionName = (Core.bindingName b),+          Module.termDefinitionTerm = (Core.bindingTerm b),+          Module.termDefinitionType = (Core.bindingType b)})) decodedBindings),+        Module.moduleTermDependencies = (Lists.concat2 [+          Module.Namespace "hydra.extract.helpers",+          (Module.Namespace "hydra.lexical"),+          (Module.Namespace "hydra.rewriting")] allDecodedDeps),+        Module.moduleTypeDependencies = [+          Module.moduleNamespace mod,+          (Module.Namespace "hydra.util")],+        Module.moduleDescription = (Just (Strings.cat [+          "Term decoders for ",+          (Module.unNamespace (Module.moduleNamespace mod))]))}))))))++-- | Generate a decoder module namespace from a source module namespace+decodeNamespace :: Module.Namespace -> Module.Namespace+decodeNamespace ns =+    Module.Namespace (Strings.cat [+      "hydra.decode.",+      (Strings.intercalate "." (Lists.tail (Strings.splitOn "." (Module.unNamespace ns))))])++-- | Generate a decoder for a pair type+decodePairType :: Core.PairType -> Core.Term+decodePairType pt =++      let firstDecoder = decodeType (Core.pairTypeFirst pt)+          secondDecoder = decodeType (Core.pairTypeSecond pt)+      in (Core.TermApplication (Core.Application {+        Core.applicationFunction = (Core.TermApplication (Core.Application {+          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.decodePair")),+          Core.applicationArgument = firstDecoder})),+        Core.applicationArgument = secondDecoder}))++-- | Generate a decoder for a record type+decodeRecordType :: [Core.FieldType] -> Core.Term+decodeRecordType rt = decodeRecordTypeImpl (Core.Name "unknown") rt++-- | Generate a decoder for a record type with a type name+decodeRecordTypeImpl :: Core.Name -> [Core.FieldType] -> Core.Term+decodeRecordTypeImpl tname rt =++      let decodeFieldTerm =+              \ft -> Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermApplication (Core.Application {+                      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.requireField")),+                      Core.applicationArgument = (Core.TermLiteral (Core.LiteralString (Core.unName (Core.fieldTypeName ft))))})),+                    Core.applicationArgument = (decodeType (Core.fieldTypeType ft))})),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "fieldMap"))})),+                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})+          localVarName =+                  \ft -> Core.Name (Strings.cat [+                    "field_",+                    (Core.unName (Core.fieldTypeName ft))])+          toFieldLambda =+                  \ft -> \body -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (localVarName ft),+                    Core.lambdaDomain = Nothing,+                    Core.lambdaBody = body}))+          decodeBody =+                  Lists.foldl (\acc -> \ft -> Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermApplication (Core.Application {+                      Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.bind"))),+                      Core.applicationArgument = (decodeFieldTerm ft)})),+                    Core.applicationArgument = (toFieldLambda ft acc)})) (Core.TermEither (Right (Core.TermRecord (Core.Record {+                    Core.recordTypeName = tname,+                    Core.recordFields = (Lists.map (\ft -> Core.Field {+                      Core.fieldName = (Core.fieldTypeName ft),+                      Core.fieldTerm = (Core.TermVariable (localVarName ft))}) rt)})))) (Lists.reverse rt)+      in (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+        Core.lambdaParameter = (Core.Name "cx"),+        Core.lambdaDomain = Nothing,+        Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "raw"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "err"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                    Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                Core.lambdaParameter = (Core.Name "stripped"),+                Core.lambdaDomain = Nothing,+                Core.lambdaBody = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected record"))}))))),+                    Core.caseStatementCases = [+                      Core.Field {+                        Core.fieldName = (Core.Name "record"),+                        Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                          Core.lambdaParameter = (Core.Name "record"),+                          Core.lambdaDomain = Nothing,+                          Core.lambdaBody = (Core.TermLet (Core.Let {+                            Core.letBindings = [+                              Core.Binding {+                                Core.bindingName = (Core.Name "fieldMap"),+                                Core.bindingTerm = (Core.TermApplication (Core.Application {+                                  Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.toFieldMap")),+                                  Core.applicationArgument = (Core.TermVariable (Core.Name "record"))})),+                                Core.bindingType = Nothing}],+                            Core.letBody = decodeBody}))})))}]})))),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+            Core.applicationArgument = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))++-- | Generate a decoder for a record type with element name+decodeRecordTypeNamed :: Core.Name -> [Core.FieldType] -> Core.Term+decodeRecordTypeNamed ename rt = decodeRecordTypeImpl ename rt++-- | Generate a decoder for a set type+decodeSetType :: Core.Type -> Core.Term+decodeSetType elemType =++      let elemDecoder = decodeType elemType+      in (Core.TermApplication (Core.Application {+        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.extract.helpers.decodeSet")),+        Core.applicationArgument = elemDecoder}))++-- | Generate a decoder term for a Type+decodeType :: Core.Type -> Core.Term+decodeType typ =+    case typ of+      Core.TypeAnnotated v0 -> decodeType (Core.annotatedTypeBody v0)+      Core.TypeApplication v0 -> Core.TermApplication (Core.Application {+        Core.applicationFunction = (decodeType (Core.applicationTypeFunction v0)),+        Core.applicationArgument = (decodeType (Core.applicationTypeArgument v0))})+      Core.TypeEither v0 -> decodeEitherType v0+      Core.TypeForall v0 -> decodeForallType v0+      Core.TypeList v0 -> decodeListType v0+      Core.TypeLiteral v0 -> decodeLiteralType v0+      Core.TypeMap v0 -> decodeMapType v0+      Core.TypeMaybe v0 -> decodeMaybeType v0+      Core.TypePair v0 -> decodePairType v0+      Core.TypeRecord v0 -> decodeRecordType v0+      Core.TypeSet v0 -> decodeSetType v0+      Core.TypeUnion v0 -> decodeUnionType v0+      Core.TypeUnit -> decodeUnitType+      Core.TypeVoid -> decodeUnitType+      Core.TypeWrap v0 -> decodeWrappedType v0+      Core.TypeVariable v0 -> Core.TermVariable (decodeBindingName v0)+      _ -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+        Core.lambdaParameter = (Core.Name "cx"),+        Core.lambdaDomain = Nothing,+        Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "t"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unsupported type variant"))}))))})))}))++-- | Generate a decoder term for a Type, with element name for nominal types+decodeTypeNamed :: Core.Name -> Core.Type -> Core.Term+decodeTypeNamed ename typ =+    case typ of+      Core.TypeAnnotated v0 -> decodeTypeNamed ename (Core.annotatedTypeBody v0)+      Core.TypeApplication v0 -> Core.TermApplication (Core.Application {+        Core.applicationFunction = (decodeType (Core.applicationTypeFunction v0)),+        Core.applicationArgument = (decodeType (Core.applicationTypeArgument v0))})+      Core.TypeEither v0 -> decodeEitherType v0+      Core.TypeForall v0 -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+        Core.lambdaParameter = (decodeBindingName (Core.forallTypeParameter v0)),+        Core.lambdaDomain = Nothing,+        Core.lambdaBody = (decodeTypeNamed ename (Core.forallTypeBody v0))}))+      Core.TypeList v0 -> decodeListType v0+      Core.TypeLiteral v0 -> decodeLiteralType v0+      Core.TypeMap v0 -> decodeMapType v0+      Core.TypeMaybe v0 -> decodeMaybeType v0+      Core.TypePair v0 -> decodePairType v0+      Core.TypeRecord v0 -> decodeRecordTypeNamed ename v0+      Core.TypeSet v0 -> decodeSetType v0+      Core.TypeUnion v0 -> decodeUnionTypeNamed ename v0+      Core.TypeUnit -> decodeUnitType+      Core.TypeVoid -> decodeUnitType+      Core.TypeWrap v0 -> decodeWrappedTypeNamed ename v0+      Core.TypeVariable v0 -> Core.TermVariable (decodeBindingName v0)+      _ -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+        Core.lambdaParameter = (Core.Name "cx"),+        Core.lambdaDomain = Nothing,+        Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "t"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+            Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+            Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "unsupported type variant"))}))))})))}))++-- | Generate a decoder for a union type+decodeUnionType :: [Core.FieldType] -> Core.Term+decodeUnionType rt = decodeUnionTypeNamed (Core.Name "unknown") rt++-- | Generate a decoder for a union type with the given element name+decodeUnionTypeNamed :: Core.Name -> [Core.FieldType] -> Core.Term+decodeUnionTypeNamed ename rt =++      let toVariantPair =+              \ft -> Core.TermPair (Core.TermWrap (Core.WrappedTerm {+                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName (Core.fieldTypeName ft))))}), (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                Core.lambdaParameter = (Core.Name "input"),+                Core.lambdaDomain = Nothing,+                Core.lambdaBody = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.map"))),+                    Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                      Core.lambdaParameter = (Core.Name "t"),+                      Core.lambdaDomain = Nothing,+                      Core.lambdaBody = (Core.TermUnion (Core.Injection {+                        Core.injectionTypeName = ename,+                        Core.injectionField = Core.Field {+                          Core.fieldName = (Core.fieldTypeName ft),+                          Core.fieldTerm = (Core.TermVariable (Core.Name "t"))}}))})))})),+                  Core.applicationArgument = (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermApplication (Core.Application {+                      Core.applicationFunction = (decodeType (Core.fieldTypeType ft)),+                      Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+                    Core.applicationArgument = (Core.TermVariable (Core.Name "input"))}))}))}))))+      in (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+        Core.lambdaParameter = (Core.Name "cx"),+        Core.lambdaDomain = Nothing,+        Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "raw"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "err"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                    Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                Core.lambdaParameter = (Core.Name "stripped"),+                Core.lambdaDomain = Nothing,+                Core.lambdaBody = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected union"))}))))),+                    Core.caseStatementCases = [+                      Core.Field {+                        Core.fieldName = (Core.Name "union"),+                        Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                          Core.lambdaParameter = (Core.Name "inj"),+                          Core.lambdaDomain = Nothing,+                          Core.lambdaBody = (Core.TermLet (Core.Let {+                            Core.letBindings = [+                              Core.Binding {+                                Core.bindingName = (Core.Name "field"),+                                Core.bindingTerm = (Core.TermApplication (Core.Application {+                                  Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+                                    Core.projectionTypeName = (Core.Name "hydra.core.Injection"),+                                    Core.projectionField = (Core.Name "field")})))),+                                  Core.applicationArgument = (Core.TermVariable (Core.Name "inj"))})),+                                Core.bindingType = Nothing},+                              Core.Binding {+                                Core.bindingName = (Core.Name "fname"),+                                Core.bindingTerm = (Core.TermApplication (Core.Application {+                                  Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+                                    Core.projectionTypeName = (Core.Name "hydra.core.Field"),+                                    Core.projectionField = (Core.Name "name")})))),+                                  Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),+                                Core.bindingType = Nothing},+                              Core.Binding {+                                Core.bindingName = (Core.Name "fterm"),+                                Core.bindingTerm = (Core.TermApplication (Core.Application {+                                  Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+                                    Core.projectionTypeName = (Core.Name "hydra.core.Field"),+                                    Core.projectionField = (Core.Name "term")})))),+                                  Core.applicationArgument = (Core.TermVariable (Core.Name "field"))})),+                                Core.bindingType = Nothing},+                              Core.Binding {+                                Core.bindingName = (Core.Name "variantMap"),+                                Core.bindingTerm = (Core.TermApplication (Core.Application {+                                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.maps.fromList"))),+                                  Core.applicationArgument = (Core.TermList (Lists.map toVariantPair rt))})),+                                Core.bindingType = Nothing}],+                            Core.letBody = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermApplication (Core.Application {+                                Core.applicationFunction = (Core.TermApplication (Core.Application {+                                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.maybes.maybe"))),+                                  Core.applicationArgument = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                                    Core.wrappedTermBody = (Core.TermApplication (Core.Application {+                                      Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.strings.cat"))),+                                      Core.applicationArgument = (Core.TermList [+                                        Core.TermLiteral (Core.LiteralString "no such field "),+                                        (Core.TermApplication (Core.Application {+                                          Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.core.Name")))),+                                          Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),+                                        (Core.TermLiteral (Core.LiteralString " in union"))])}))}))))})),+                                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                  Core.lambdaParameter = (Core.Name "f"),+                                  Core.lambdaDomain = Nothing,+                                  Core.lambdaBody = (Core.TermApplication (Core.Application {+                                    Core.applicationFunction = (Core.TermVariable (Core.Name "f")),+                                    Core.applicationArgument = (Core.TermVariable (Core.Name "fterm"))}))})))})),+                              Core.applicationArgument = (Core.TermApplication (Core.Application {+                                Core.applicationFunction = (Core.TermApplication (Core.Application {+                                  Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.maps.lookup"))),+                                  Core.applicationArgument = (Core.TermVariable (Core.Name "fname"))})),+                                Core.applicationArgument = (Core.TermVariable (Core.Name "variantMap"))}))}))}))})))}]})))),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+            Core.applicationArgument = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))++-- | Generate a decoder for the unit type+decodeUnitType :: Core.Term+decodeUnitType = Core.TermVariable (Core.Name "hydra.extract.helpers.decodeUnit")++-- | Generate a decoder for a wrapped type+decodeWrappedType :: Core.Type -> Core.Term+decodeWrappedType wt = decodeWrappedTypeNamed (Core.Name "unknown") wt++-- | Generate a decoder for a wrapped type with the given element name+decodeWrappedTypeNamed :: Core.Name -> Core.Type -> Core.Term+decodeWrappedTypeNamed ename wt =++      let bodyDecoder = decodeType wt+      in (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+        Core.lambdaParameter = (Core.Name "cx"),+        Core.lambdaDomain = Nothing,+        Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+          Core.lambdaParameter = (Core.Name "raw"),+          Core.lambdaDomain = Nothing,+          Core.lambdaBody = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.either"))),+                Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                  Core.lambdaParameter = (Core.Name "err"),+                  Core.lambdaDomain = Nothing,+                  Core.lambdaBody = (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                    Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                    Core.wrappedTermBody = (Core.TermVariable (Core.Name "err"))}))))})))})),+              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                Core.lambdaParameter = (Core.Name "stripped"),+                Core.lambdaDomain = Nothing,+                Core.lambdaBody = (Core.TermApplication (Core.Application {+                  Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationUnion (Core.CaseStatement {+                    Core.caseStatementTypeName = (Core.Name "hydra.core.Term"),+                    Core.caseStatementDefault = (Just (Core.TermEither (Left (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString "expected wrapped type"))}))))),+                    Core.caseStatementCases = [+                      Core.Field {+                        Core.fieldName = (Core.Name "wrap"),+                        Core.fieldTerm = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                          Core.lambdaParameter = (Core.Name "wrappedTerm"),+                          Core.lambdaDomain = Nothing,+                          Core.lambdaBody = (Core.TermApplication (Core.Application {+                            Core.applicationFunction = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermFunction (Core.FunctionPrimitive (Core.Name "hydra.lib.eithers.map"))),+                              Core.applicationArgument = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                                Core.lambdaParameter = (Core.Name "b"),+                                Core.lambdaDomain = Nothing,+                                Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {+                                  Core.wrappedTermTypeName = ename,+                                  Core.wrappedTermBody = (Core.TermVariable (Core.Name "b"))}))})))})),+                            Core.applicationArgument = (Core.TermApplication (Core.Application {+                              Core.applicationFunction = (Core.TermApplication (Core.Application {+                                Core.applicationFunction = bodyDecoder,+                                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+                              Core.applicationArgument = (Core.TermApplication (Core.Application {+                                Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+                                  Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),+                                  Core.projectionField = (Core.Name "body")})))),+                                Core.applicationArgument = (Core.TermVariable (Core.Name "wrappedTerm"))}))}))}))})))}]})))),+                  Core.applicationArgument = (Core.TermVariable (Core.Name "stripped"))}))})))})),+            Core.applicationArgument = (Core.TermApplication (Core.Application {+              Core.applicationFunction = (Core.TermApplication (Core.Application {+                Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lexical.stripAndDereferenceTermEither")),+                Core.applicationArgument = (Core.TermVariable (Core.Name "cx"))})),+              Core.applicationArgument = (Core.TermVariable (Core.Name "raw"))}))}))})))})))++-- | Get full result type for decoder+decoderFullResultType :: Core.Type -> Core.Type+decoderFullResultType typ =+    case typ of+      Core.TypeAnnotated v0 -> decoderFullResultType (Core.annotatedTypeBody v0)+      Core.TypeApplication v0 -> Core.TypeApplication (Core.ApplicationType {+        Core.applicationTypeFunction = (decoderFullResultType (Core.applicationTypeFunction v0)),+        Core.applicationTypeArgument = (Core.applicationTypeArgument v0)})+      Core.TypeEither v0 -> Core.TypeEither (Core.EitherType {+        Core.eitherTypeLeft = (decoderFullResultType (Core.eitherTypeLeft v0)),+        Core.eitherTypeRight = (decoderFullResultType (Core.eitherTypeRight v0))})+      Core.TypeForall v0 -> Core.TypeApplication (Core.ApplicationType {+        Core.applicationTypeFunction = (decoderFullResultType (Core.forallTypeBody v0)),+        Core.applicationTypeArgument = (Core.TypeVariable (Core.forallTypeParameter v0))})+      Core.TypeList v0 -> Core.TypeList (decoderFullResultType v0)+      Core.TypeLiteral _ -> Core.TypeVariable (Core.Name "hydra.core.Literal")+      Core.TypeMap v0 -> Core.TypeMap (Core.MapType {+        Core.mapTypeKeys = (decoderFullResultType (Core.mapTypeKeys v0)),+        Core.mapTypeValues = (decoderFullResultType (Core.mapTypeValues v0))})+      Core.TypeMaybe v0 -> Core.TypeMaybe (decoderFullResultType v0)+      Core.TypePair v0 -> Core.TypePair (Core.PairType {+        Core.pairTypeFirst = (decoderFullResultType (Core.pairTypeFirst v0)),+        Core.pairTypeSecond = (decoderFullResultType (Core.pairTypeSecond v0))})+      Core.TypeRecord _ -> Core.TypeVariable (Core.Name "hydra.core.Term")+      Core.TypeSet v0 -> Core.TypeSet (decoderFullResultType v0)+      Core.TypeUnion _ -> Core.TypeVariable (Core.Name "hydra.core.Term")+      Core.TypeUnit -> Core.TypeUnit+      Core.TypeVariable v0 -> Core.TypeVariable v0+      Core.TypeVoid -> Core.TypeVoid+      Core.TypeWrap _ -> Core.TypeVariable (Core.Name "hydra.core.Term")+      _ -> Core.TypeVariable (Core.Name "hydra.core.Term")++-- | Get full result type for decoder with element name+decoderFullResultTypeNamed :: Core.Name -> Core.Type -> Core.Type+decoderFullResultTypeNamed ename typ =+    case typ of+      Core.TypeAnnotated v0 -> decoderFullResultTypeNamed ename (Core.annotatedTypeBody v0)+      Core.TypeForall v0 -> Core.TypeApplication (Core.ApplicationType {+        Core.applicationTypeFunction = (decoderFullResultTypeNamed ename (Core.forallTypeBody v0)),+        Core.applicationTypeArgument = (Core.TypeVariable (Core.forallTypeParameter v0))})+      Core.TypeRecord _ -> Core.TypeVariable ename+      Core.TypeUnion _ -> Core.TypeVariable ename+      Core.TypeWrap _ -> Core.TypeVariable ename+      Core.TypeApplication v0 -> Core.TypeApplication (Core.ApplicationType {+        Core.applicationTypeFunction = (decoderFullResultType (Core.applicationTypeFunction v0)),+        Core.applicationTypeArgument = (Core.applicationTypeArgument v0)})+      Core.TypeEither v0 -> Core.TypeEither (Core.EitherType {+        Core.eitherTypeLeft = (decoderFullResultType (Core.eitherTypeLeft v0)),+        Core.eitherTypeRight = (decoderFullResultType (Core.eitherTypeRight v0))})+      Core.TypeList v0 -> Core.TypeList (decoderFullResultType v0)+      Core.TypeLiteral _ -> Core.TypeVariable (Core.Name "hydra.core.Literal")+      Core.TypeMap v0 -> Core.TypeMap (Core.MapType {+        Core.mapTypeKeys = (decoderFullResultType (Core.mapTypeKeys v0)),+        Core.mapTypeValues = (decoderFullResultType (Core.mapTypeValues v0))})+      Core.TypeMaybe v0 -> Core.TypeMaybe (decoderFullResultType v0)+      Core.TypePair v0 -> Core.TypePair (Core.PairType {+        Core.pairTypeFirst = (decoderFullResultType (Core.pairTypeFirst v0)),+        Core.pairTypeSecond = (decoderFullResultType (Core.pairTypeSecond v0))})+      Core.TypeSet v0 -> Core.TypeSet (decoderFullResultType v0)+      Core.TypeUnit -> Core.TypeUnit+      Core.TypeVariable v0 -> Core.TypeVariable v0+      Core.TypeVoid -> Core.TypeVoid+      _ -> Core.TypeVariable (Core.Name "hydra.core.Term")++-- | Compute the result type name for a decoder+decoderResultType :: Core.Type -> Core.Name+decoderResultType typ =+    case typ of+      Core.TypeAnnotated v0 -> decoderResultType (Core.annotatedTypeBody v0)+      Core.TypeApplication v0 -> decoderResultType (Core.applicationTypeFunction v0)+      Core.TypeForall v0 -> decoderResultType (Core.forallTypeBody v0)+      Core.TypeLiteral _ -> Core.Name "hydra.core.Literal"+      Core.TypeRecord _ -> Core.Name "hydra.core.Term"+      Core.TypeUnion _ -> Core.Name "hydra.core.Term"+      Core.TypeWrap _ -> Core.Name "hydra.core.Term"+      _ -> Core.Name "hydra.core.Term"++-- | Build decoder function type+decoderType :: Core.Type -> Core.Type+decoderType typ =++      let resultType = decoderFullResultType typ+          baseType =+                  Core.TypeFunction (Core.FunctionType {+                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),+                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {+                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),+                      Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {+                        Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),+                        Core.eitherTypeRight = resultType}))}))})+      in (prependForallDecoders baseType typ)++-- | Build decoder function type with element name+decoderTypeNamed :: Core.Name -> Core.Type -> Core.Type+decoderTypeNamed ename typ =++      let resultType = decoderFullResultTypeNamed ename typ+          baseType =+                  Core.TypeFunction (Core.FunctionType {+                    Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),+                    Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {+                      Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),+                      Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {+                        Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),+                        Core.eitherTypeRight = resultType}))}))})+      in (prependForallDecoders baseType typ)++-- | Build type scheme for a decoder function+decoderTypeScheme :: Core.Type -> Core.TypeScheme+decoderTypeScheme typ =++      let typeVars = collectTypeVariables typ+          allOrdVars = collectOrdConstrainedVariables typ+          ordVars = Lists.filter (\v -> Lists.elem v typeVars) allOrdVars+          constraints =+                  Logic.ifElse (Lists.null ordVars) Nothing (Just (Maps.fromList (Lists.map (\v -> (v, Core.TypeVariableMetadata {+                    Core.typeVariableMetadataClasses = (Sets.singleton (Core.Name "ordering"))})) ordVars)))+      in Core.TypeScheme {+        Core.typeSchemeVariables = typeVars,+        Core.typeSchemeType = (decoderType typ),+        Core.typeSchemeConstraints = constraints}++-- | Build type scheme for a decoder function with element name+decoderTypeSchemeNamed :: Core.Name -> Core.Type -> Core.TypeScheme+decoderTypeSchemeNamed ename typ =++      let typeVars = collectTypeVariables typ+          allOrdVars = collectOrdConstrainedVariables typ+          ordVars = Lists.filter (\v -> Lists.elem v typeVars) allOrdVars+          constraints =+                  Logic.ifElse (Lists.null ordVars) Nothing (Just (Maps.fromList (Lists.map (\v -> (v, Core.TypeVariableMetadata {+                    Core.typeVariableMetadataClasses = (Sets.singleton (Core.Name "ordering"))})) ordVars)))+      in Core.TypeScheme {+        Core.typeSchemeVariables = typeVars,+        Core.typeSchemeType = (decoderTypeNamed ename typ),+        Core.typeSchemeConstraints = constraints}++-- | Filter bindings to only decodable type definitions+filterTypeBindings :: Context.Context -> Graph.Graph -> [Core.Binding] -> Either (Context.InContext Errors.Error) [Core.Binding]+filterTypeBindings cx graph bindings =+    Eithers.map Maybes.cat (Eithers.mapList (isDecodableBinding cx graph) (Lists.filter Annotations.isNativeType bindings))++-- | Check if a binding is decodable (serializable type)+isDecodableBinding :: Context.Context -> Graph.Graph -> Core.Binding -> Either (Context.InContext Errors.Error) (Maybe Core.Binding)+isDecodableBinding cx graph b =+    Eithers.bind (Schemas.isSerializableByName cx graph (Core.bindingName b)) (\serializable -> Right (Logic.ifElse serializable (Just b) Nothing))++-- | Prepend decoder types for forall parameters to base type+prependForallDecoders :: Core.Type -> Core.Type -> Core.Type+prependForallDecoders baseType typ =+    case typ of+      Core.TypeAnnotated v0 -> prependForallDecoders baseType (Core.annotatedTypeBody v0)+      Core.TypeForall v0 -> Core.TypeFunction (Core.FunctionType {+        Core.functionTypeDomain = (Core.TypeFunction (Core.FunctionType {+          Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.graph.Graph")),+          Core.functionTypeCodomain = (Core.TypeFunction (Core.FunctionType {+            Core.functionTypeDomain = (Core.TypeVariable (Core.Name "hydra.core.Term")),+            Core.functionTypeCodomain = (Core.TypeEither (Core.EitherType {+              Core.eitherTypeLeft = (Core.TypeVariable (Core.Name "hydra.errors.DecodingError")),+              Core.eitherTypeRight = (Core.TypeVariable (Core.forallTypeParameter v0))}))}))})),+        Core.functionTypeCodomain = (prependForallDecoders baseType (Core.forallTypeBody v0))})+      _ -> baseType
+ src/gen-main/haskell/Hydra/Dsl/Ast.hs view
@@ -0,0 +1,901 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.ast++module Hydra.Dsl.Ast where++import qualified Hydra.Ast as Ast+import qualified Hydra.Core as Core+import qualified Hydra.Phantoms as Phantoms+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++associativityBoth :: Phantoms.TTerm Ast.Associativity+associativityBoth =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "both"),+        Core.fieldTerm = Core.TermUnit}}))++associativityLeft :: Phantoms.TTerm Ast.Associativity+associativityLeft =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "left"),+        Core.fieldTerm = Core.TermUnit}}))++associativityNone :: Phantoms.TTerm Ast.Associativity+associativityNone =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "none"),+        Core.fieldTerm = Core.TermUnit}}))++associativityRight :: Phantoms.TTerm Ast.Associativity+associativityRight =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "right"),+        Core.fieldTerm = Core.TermUnit}}))++blockStyle :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Bool -> Phantoms.TTerm Bool -> Phantoms.TTerm Ast.BlockStyle+blockStyle indent newlineBeforeContent newlineAfterContent =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.BlockStyle"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "indent"),+          Core.fieldTerm = (Phantoms.unTTerm indent)},+        Core.Field {+          Core.fieldName = (Core.Name "newlineBeforeContent"),+          Core.fieldTerm = (Phantoms.unTTerm newlineBeforeContent)},+        Core.Field {+          Core.fieldName = (Core.Name "newlineAfterContent"),+          Core.fieldTerm = (Phantoms.unTTerm newlineAfterContent)}]}))++blockStyleIndent :: Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm (Maybe String)+blockStyleIndent x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),+        Core.projectionField = (Core.Name "indent")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++blockStyleNewlineAfterContent :: Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm Bool+blockStyleNewlineAfterContent x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),+        Core.projectionField = (Core.Name "newlineAfterContent")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++blockStyleNewlineBeforeContent :: Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm Bool+blockStyleNewlineBeforeContent x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),+        Core.projectionField = (Core.Name "newlineBeforeContent")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++blockStyleWithIndent :: Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Ast.BlockStyle+blockStyleWithIndent original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.BlockStyle"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "indent"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "newlineBeforeContent"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),+              Core.projectionField = (Core.Name "newlineBeforeContent")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "newlineAfterContent"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),+              Core.projectionField = (Core.Name "newlineAfterContent")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++blockStyleWithNewlineAfterContent :: Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm Bool -> Phantoms.TTerm Ast.BlockStyle+blockStyleWithNewlineAfterContent original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.BlockStyle"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "indent"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),+              Core.projectionField = (Core.Name "indent")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "newlineBeforeContent"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),+              Core.projectionField = (Core.Name "newlineBeforeContent")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "newlineAfterContent"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++blockStyleWithNewlineBeforeContent :: Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm Bool -> Phantoms.TTerm Ast.BlockStyle+blockStyleWithNewlineBeforeContent original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.BlockStyle"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "indent"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),+              Core.projectionField = (Core.Name "indent")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "newlineBeforeContent"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "newlineAfterContent"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.BlockStyle"),+              Core.projectionField = (Core.Name "newlineAfterContent")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++bracketExpr :: Phantoms.TTerm Ast.Brackets -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm Ast.BracketExpr+bracketExpr brackets enclosed style =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.BracketExpr"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "brackets"),+          Core.fieldTerm = (Phantoms.unTTerm brackets)},+        Core.Field {+          Core.fieldName = (Core.Name "enclosed"),+          Core.fieldTerm = (Phantoms.unTTerm enclosed)},+        Core.Field {+          Core.fieldName = (Core.Name "style"),+          Core.fieldTerm = (Phantoms.unTTerm style)}]}))++bracketExprBrackets :: Phantoms.TTerm Ast.BracketExpr -> Phantoms.TTerm Ast.Brackets+bracketExprBrackets x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),+        Core.projectionField = (Core.Name "brackets")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++bracketExprEnclosed :: Phantoms.TTerm Ast.BracketExpr -> Phantoms.TTerm Ast.Expr+bracketExprEnclosed x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),+        Core.projectionField = (Core.Name "enclosed")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++bracketExprStyle :: Phantoms.TTerm Ast.BracketExpr -> Phantoms.TTerm Ast.BlockStyle+bracketExprStyle x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),+        Core.projectionField = (Core.Name "style")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++bracketExprWithBrackets :: Phantoms.TTerm Ast.BracketExpr -> Phantoms.TTerm Ast.Brackets -> Phantoms.TTerm Ast.BracketExpr+bracketExprWithBrackets original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.BracketExpr"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "brackets"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "enclosed"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),+              Core.projectionField = (Core.Name "enclosed")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "style"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),+              Core.projectionField = (Core.Name "style")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++bracketExprWithEnclosed :: Phantoms.TTerm Ast.BracketExpr -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.BracketExpr+bracketExprWithEnclosed original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.BracketExpr"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "brackets"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),+              Core.projectionField = (Core.Name "brackets")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "enclosed"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "style"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),+              Core.projectionField = (Core.Name "style")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++bracketExprWithStyle :: Phantoms.TTerm Ast.BracketExpr -> Phantoms.TTerm Ast.BlockStyle -> Phantoms.TTerm Ast.BracketExpr+bracketExprWithStyle original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.BracketExpr"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "brackets"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),+              Core.projectionField = (Core.Name "brackets")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "enclosed"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.BracketExpr"),+              Core.projectionField = (Core.Name "enclosed")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "style"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++brackets :: Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm Ast.Brackets+brackets open close =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.Brackets"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "open"),+          Core.fieldTerm = (Phantoms.unTTerm open)},+        Core.Field {+          Core.fieldName = (Core.Name "close"),+          Core.fieldTerm = (Phantoms.unTTerm close)}]}))++bracketsClose :: Phantoms.TTerm Ast.Brackets -> Phantoms.TTerm Ast.Symbol+bracketsClose x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.Brackets"),+        Core.projectionField = (Core.Name "close")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++bracketsOpen :: Phantoms.TTerm Ast.Brackets -> Phantoms.TTerm Ast.Symbol+bracketsOpen x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.Brackets"),+        Core.projectionField = (Core.Name "open")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++bracketsWithClose :: Phantoms.TTerm Ast.Brackets -> Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm Ast.Brackets+bracketsWithClose original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.Brackets"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "open"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Brackets"),+              Core.projectionField = (Core.Name "open")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "close"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++bracketsWithOpen :: Phantoms.TTerm Ast.Brackets -> Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm Ast.Brackets+bracketsWithOpen original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.Brackets"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "open"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "close"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Brackets"),+              Core.projectionField = (Core.Name "close")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++exprBrackets :: Phantoms.TTerm Ast.BracketExpr -> Phantoms.TTerm Ast.Expr+exprBrackets x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "brackets"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++exprConst :: Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm Ast.Expr+exprConst x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "const"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++exprIndent :: Phantoms.TTerm Ast.IndentedExpression -> Phantoms.TTerm Ast.Expr+exprIndent x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "indent"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++exprOp :: Phantoms.TTerm Ast.OpExpr -> Phantoms.TTerm Ast.Expr+exprOp x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "op"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++exprSeq :: Phantoms.TTerm Ast.SeqExpr -> Phantoms.TTerm Ast.Expr+exprSeq x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "seq"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++indentStyleAllLines :: Phantoms.TTerm String -> Phantoms.TTerm Ast.IndentStyle+indentStyleAllLines x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.IndentStyle"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "allLines"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++indentStyleSubsequentLines :: Phantoms.TTerm String -> Phantoms.TTerm Ast.IndentStyle+indentStyleSubsequentLines x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.IndentStyle"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "subsequentLines"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++indentedExpression :: Phantoms.TTerm Ast.IndentStyle -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.IndentedExpression+indentedExpression style expr =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.IndentedExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "style"),+          Core.fieldTerm = (Phantoms.unTTerm style)},+        Core.Field {+          Core.fieldName = (Core.Name "expr"),+          Core.fieldTerm = (Phantoms.unTTerm expr)}]}))++indentedExpressionExpr :: Phantoms.TTerm Ast.IndentedExpression -> Phantoms.TTerm Ast.Expr+indentedExpressionExpr x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.IndentedExpression"),+        Core.projectionField = (Core.Name "expr")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++indentedExpressionStyle :: Phantoms.TTerm Ast.IndentedExpression -> Phantoms.TTerm Ast.IndentStyle+indentedExpressionStyle x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.IndentedExpression"),+        Core.projectionField = (Core.Name "style")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++indentedExpressionWithExpr :: Phantoms.TTerm Ast.IndentedExpression -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.IndentedExpression+indentedExpressionWithExpr original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.IndentedExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "style"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.IndentedExpression"),+              Core.projectionField = (Core.Name "style")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expr"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++indentedExpressionWithStyle :: Phantoms.TTerm Ast.IndentedExpression -> Phantoms.TTerm Ast.IndentStyle -> Phantoms.TTerm Ast.IndentedExpression+indentedExpressionWithStyle original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.IndentedExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "style"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "expr"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.IndentedExpression"),+              Core.projectionField = (Core.Name "expr")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++op :: Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm Ast.Padding -> Phantoms.TTerm Ast.Precedence -> Phantoms.TTerm Ast.Associativity -> Phantoms.TTerm Ast.Op+op symbol padding precedence associativity =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.Op"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "symbol"),+          Core.fieldTerm = (Phantoms.unTTerm symbol)},+        Core.Field {+          Core.fieldName = (Core.Name "padding"),+          Core.fieldTerm = (Phantoms.unTTerm padding)},+        Core.Field {+          Core.fieldName = (Core.Name "precedence"),+          Core.fieldTerm = (Phantoms.unTTerm precedence)},+        Core.Field {+          Core.fieldName = (Core.Name "associativity"),+          Core.fieldTerm = (Phantoms.unTTerm associativity)}]}))++opAssociativity :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Associativity+opAssociativity x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+        Core.projectionField = (Core.Name "associativity")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++opExpr :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.OpExpr+opExpr op lhs rhs =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.OpExpr"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "op"),+          Core.fieldTerm = (Phantoms.unTTerm op)},+        Core.Field {+          Core.fieldName = (Core.Name "lhs"),+          Core.fieldTerm = (Phantoms.unTTerm lhs)},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))++opExprLhs :: Phantoms.TTerm Ast.OpExpr -> Phantoms.TTerm Ast.Expr+opExprLhs x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),+        Core.projectionField = (Core.Name "lhs")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++opExprOp :: Phantoms.TTerm Ast.OpExpr -> Phantoms.TTerm Ast.Op+opExprOp x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),+        Core.projectionField = (Core.Name "op")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++opExprRhs :: Phantoms.TTerm Ast.OpExpr -> Phantoms.TTerm Ast.Expr+opExprRhs x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),+        Core.projectionField = (Core.Name "rhs")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++opExprWithLhs :: Phantoms.TTerm Ast.OpExpr -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.OpExpr+opExprWithLhs original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.OpExpr"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "op"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),+              Core.projectionField = (Core.Name "op")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "lhs"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),+              Core.projectionField = (Core.Name "rhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++opExprWithOp :: Phantoms.TTerm Ast.OpExpr -> Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.OpExpr+opExprWithOp original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.OpExpr"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "op"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "lhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),+              Core.projectionField = (Core.Name "lhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),+              Core.projectionField = (Core.Name "rhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++opExprWithRhs :: Phantoms.TTerm Ast.OpExpr -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Ast.OpExpr+opExprWithRhs original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.OpExpr"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "op"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),+              Core.projectionField = (Core.Name "op")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "lhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.OpExpr"),+              Core.projectionField = (Core.Name "lhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++opPadding :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Padding+opPadding x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+        Core.projectionField = (Core.Name "padding")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++opPrecedence :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Precedence+opPrecedence x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+        Core.projectionField = (Core.Name "precedence")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++opSymbol :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Symbol+opSymbol x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+        Core.projectionField = (Core.Name "symbol")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++opWithAssociativity :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Associativity -> Phantoms.TTerm Ast.Op+opWithAssociativity original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.Op"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "symbol"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+              Core.projectionField = (Core.Name "symbol")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "padding"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+              Core.projectionField = (Core.Name "padding")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "precedence"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+              Core.projectionField = (Core.Name "precedence")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "associativity"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++opWithPadding :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Padding -> Phantoms.TTerm Ast.Op+opWithPadding original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.Op"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "symbol"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+              Core.projectionField = (Core.Name "symbol")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "padding"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "precedence"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+              Core.projectionField = (Core.Name "precedence")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "associativity"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+              Core.projectionField = (Core.Name "associativity")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++opWithPrecedence :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Precedence -> Phantoms.TTerm Ast.Op+opWithPrecedence original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.Op"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "symbol"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+              Core.projectionField = (Core.Name "symbol")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "padding"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+              Core.projectionField = (Core.Name "padding")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "precedence"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "associativity"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+              Core.projectionField = (Core.Name "associativity")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++opWithSymbol :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm Ast.Op+opWithSymbol original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.Op"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "symbol"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "padding"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+              Core.projectionField = (Core.Name "padding")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "precedence"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+              Core.projectionField = (Core.Name "precedence")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "associativity"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Op"),+              Core.projectionField = (Core.Name "associativity")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++padding :: Phantoms.TTerm Ast.Ws -> Phantoms.TTerm Ast.Ws -> Phantoms.TTerm Ast.Padding+padding left right =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.Padding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Phantoms.unTTerm left)},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Phantoms.unTTerm right)}]}))++paddingLeft :: Phantoms.TTerm Ast.Padding -> Phantoms.TTerm Ast.Ws+paddingLeft x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.Padding"),+        Core.projectionField = (Core.Name "left")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++paddingRight :: Phantoms.TTerm Ast.Padding -> Phantoms.TTerm Ast.Ws+paddingRight x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.Padding"),+        Core.projectionField = (Core.Name "right")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++paddingWithLeft :: Phantoms.TTerm Ast.Padding -> Phantoms.TTerm Ast.Ws -> Phantoms.TTerm Ast.Padding+paddingWithLeft original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.Padding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Padding"),+              Core.projectionField = (Core.Name "right")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++paddingWithRight :: Phantoms.TTerm Ast.Padding -> Phantoms.TTerm Ast.Ws -> Phantoms.TTerm Ast.Padding+paddingWithRight original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.Padding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.Padding"),+              Core.projectionField = (Core.Name "left")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++precedence :: Phantoms.TTerm Int -> Phantoms.TTerm Ast.Precedence+precedence x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.ast.Precedence"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++seqExpr :: Phantoms.TTerm Ast.Op -> Phantoms.TTerm [Ast.Expr] -> Phantoms.TTerm Ast.SeqExpr+seqExpr op elements =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.SeqExpr"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "op"),+          Core.fieldTerm = (Phantoms.unTTerm op)},+        Core.Field {+          Core.fieldName = (Core.Name "elements"),+          Core.fieldTerm = (Phantoms.unTTerm elements)}]}))++seqExprElements :: Phantoms.TTerm Ast.SeqExpr -> Phantoms.TTerm [Ast.Expr]+seqExprElements x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.SeqExpr"),+        Core.projectionField = (Core.Name "elements")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++seqExprOp :: Phantoms.TTerm Ast.SeqExpr -> Phantoms.TTerm Ast.Op+seqExprOp x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ast.SeqExpr"),+        Core.projectionField = (Core.Name "op")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++seqExprWithElements :: Phantoms.TTerm Ast.SeqExpr -> Phantoms.TTerm [Ast.Expr] -> Phantoms.TTerm Ast.SeqExpr+seqExprWithElements original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.SeqExpr"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "op"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.SeqExpr"),+              Core.projectionField = (Core.Name "op")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "elements"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++seqExprWithOp :: Phantoms.TTerm Ast.SeqExpr -> Phantoms.TTerm Ast.Op -> Phantoms.TTerm Ast.SeqExpr+seqExprWithOp original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.SeqExpr"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "op"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "elements"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ast.SeqExpr"),+              Core.projectionField = (Core.Name "elements")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++symbol :: Phantoms.TTerm String -> Phantoms.TTerm Ast.Symbol+symbol x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.ast.Symbol"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++unPrecedence :: Phantoms.TTerm Ast.Precedence -> Phantoms.TTerm Int+unPrecedence x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.ast.Precedence")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unSymbol :: Phantoms.TTerm Ast.Symbol -> Phantoms.TTerm String+unSymbol x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.ast.Symbol")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++wsBreak :: Phantoms.TTerm Ast.Ws+wsBreak =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "break"),+        Core.fieldTerm = Core.TermUnit}}))++wsBreakAndIndent :: Phantoms.TTerm String -> Phantoms.TTerm Ast.Ws+wsBreakAndIndent x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "breakAndIndent"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++wsDoubleBreak :: Phantoms.TTerm Ast.Ws+wsDoubleBreak =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "doubleBreak"),+        Core.fieldTerm = Core.TermUnit}}))++wsNone :: Phantoms.TTerm Ast.Ws+wsNone =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "none"),+        Core.fieldTerm = Core.TermUnit}}))++wsSpace :: Phantoms.TTerm Ast.Ws+wsSpace =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "space"),+        Core.fieldTerm = Core.TermUnit}}))
+ src/gen-main/haskell/Hydra/Dsl/Classes.hs view
@@ -0,0 +1,31 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.classes++module Hydra.Dsl.Classes where++import qualified Hydra.Classes as Classes+import qualified Hydra.Core as Core+import qualified Hydra.Phantoms as Phantoms+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++typeClassEquality :: Phantoms.TTerm Classes.TypeClass+typeClassEquality =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "equality"),+        Core.fieldTerm = Core.TermUnit}}))++typeClassOrdering :: Phantoms.TTerm Classes.TypeClass+typeClassOrdering =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "ordering"),+        Core.fieldTerm = Core.TermUnit}}))
+ src/gen-main/haskell/Hydra/Dsl/Coders.hs view
@@ -0,0 +1,788 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.coders++module Hydra.Dsl.Coders where++import qualified Hydra.Coders as Coders+import qualified Hydra.Core as Core+import qualified Hydra.Graph as Graph+import qualified Hydra.Phantoms as Phantoms+import qualified Hydra.Util as Util+import qualified Hydra.Variants as Variants+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++adapterContext :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm Coders.Language -> Phantoms.TTerm (M.Map Core.Name (Util.Adapter Core.Type Core.Type Core.Term Core.Term)) -> Phantoms.TTerm Coders.AdapterContext+adapterContext graph language adapters =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.AdapterContext"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "graph"),+          Core.fieldTerm = (Phantoms.unTTerm graph)},+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Phantoms.unTTerm language)},+        Core.Field {+          Core.fieldName = (Core.Name "adapters"),+          Core.fieldTerm = (Phantoms.unTTerm adapters)}]}))++adapterContextAdapters :: Phantoms.TTerm Coders.AdapterContext -> Phantoms.TTerm (M.Map Core.Name (Util.Adapter Core.Type Core.Type Core.Term Core.Term))+adapterContextAdapters x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),+        Core.projectionField = (Core.Name "adapters")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++adapterContextGraph :: Phantoms.TTerm Coders.AdapterContext -> Phantoms.TTerm Graph.Graph+adapterContextGraph x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),+        Core.projectionField = (Core.Name "graph")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++adapterContextLanguage :: Phantoms.TTerm Coders.AdapterContext -> Phantoms.TTerm Coders.Language+adapterContextLanguage x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),+        Core.projectionField = (Core.Name "language")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++adapterContextWithAdapters :: Phantoms.TTerm Coders.AdapterContext -> Phantoms.TTerm (M.Map Core.Name (Util.Adapter Core.Type Core.Type Core.Term Core.Term)) -> Phantoms.TTerm Coders.AdapterContext+adapterContextWithAdapters original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.AdapterContext"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "graph"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),+              Core.projectionField = (Core.Name "graph")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),+              Core.projectionField = (Core.Name "language")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "adapters"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++adapterContextWithGraph :: Phantoms.TTerm Coders.AdapterContext -> Phantoms.TTerm Graph.Graph -> Phantoms.TTerm Coders.AdapterContext+adapterContextWithGraph original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.AdapterContext"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "graph"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),+              Core.projectionField = (Core.Name "language")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "adapters"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),+              Core.projectionField = (Core.Name "adapters")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++adapterContextWithLanguage :: Phantoms.TTerm Coders.AdapterContext -> Phantoms.TTerm Coders.Language -> Phantoms.TTerm Coders.AdapterContext+adapterContextWithLanguage original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.AdapterContext"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "graph"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),+              Core.projectionField = (Core.Name "graph")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "adapters"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.AdapterContext"),+              Core.projectionField = (Core.Name "adapters")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++coderDirectionDecode :: Phantoms.TTerm Coders.CoderDirection+coderDirectionDecode =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.coders.CoderDirection"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "decode"),+        Core.fieldTerm = Core.TermUnit}}))++coderDirectionEncode :: Phantoms.TTerm Coders.CoderDirection+coderDirectionEncode =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.coders.CoderDirection"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "encode"),+        Core.fieldTerm = Core.TermUnit}}))++language :: Phantoms.TTerm Coders.LanguageName -> Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm Coders.Language+language name constraints =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.Language"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "constraints"),+          Core.fieldTerm = (Phantoms.unTTerm constraints)}]}))++languageConstraints :: Phantoms.TTerm Coders.Language -> Phantoms.TTerm Coders.LanguageConstraints+languageConstraints x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.coders.Language"),+        Core.projectionField = (Core.Name "constraints")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++languageConstraintsEliminationVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.EliminationVariant)+languageConstraintsEliminationVariants x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+        Core.projectionField = (Core.Name "eliminationVariants")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++languageConstraintsFloatTypes :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Core.FloatType)+languageConstraintsFloatTypes x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+        Core.projectionField = (Core.Name "floatTypes")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++languageConstraintsFunctionVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.FunctionVariant)+languageConstraintsFunctionVariants x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+        Core.projectionField = (Core.Name "functionVariants")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++languageConstraintsIntegerTypes :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Core.IntegerType)+languageConstraintsIntegerTypes x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+        Core.projectionField = (Core.Name "integerTypes")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++languageConstraintsLiteralVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.LiteralVariant)+languageConstraintsLiteralVariants x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+        Core.projectionField = (Core.Name "literalVariants")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++languageConstraintsTermVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.TermVariant)+languageConstraintsTermVariants x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+        Core.projectionField = (Core.Name "termVariants")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++languageConstraintsTypeVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.TypeVariant)+languageConstraintsTypeVariants x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+        Core.projectionField = (Core.Name "typeVariants")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++languageConstraintsTypes :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (Core.Type -> Bool)+languageConstraintsTypes x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+        Core.projectionField = (Core.Name "types")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++languageConstraintsWithEliminationVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.EliminationVariant) -> Phantoms.TTerm Coders.LanguageConstraints+languageConstraintsWithEliminationVariants original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "eliminationVariants"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "literalVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "literalVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "floatTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "floatTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "functionVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "functionVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "integerTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "integerTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "termVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "termVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "typeVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "types")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++languageConstraintsWithFloatTypes :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Core.FloatType) -> Phantoms.TTerm Coders.LanguageConstraints+languageConstraintsWithFloatTypes original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "eliminationVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "eliminationVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "literalVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "literalVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "floatTypes"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "functionVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "functionVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "integerTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "integerTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "termVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "termVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "typeVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "types")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++languageConstraintsWithFunctionVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.FunctionVariant) -> Phantoms.TTerm Coders.LanguageConstraints+languageConstraintsWithFunctionVariants original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "eliminationVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "eliminationVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "literalVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "literalVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "floatTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "floatTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "functionVariants"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "integerTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "integerTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "termVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "termVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "typeVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "types")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++languageConstraintsWithIntegerTypes :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Core.IntegerType) -> Phantoms.TTerm Coders.LanguageConstraints+languageConstraintsWithIntegerTypes original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "eliminationVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "eliminationVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "literalVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "literalVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "floatTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "floatTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "functionVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "functionVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "integerTypes"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "termVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "termVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "typeVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "types")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++languageConstraintsWithLiteralVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.LiteralVariant) -> Phantoms.TTerm Coders.LanguageConstraints+languageConstraintsWithLiteralVariants original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "eliminationVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "eliminationVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "literalVariants"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "floatTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "floatTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "functionVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "functionVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "integerTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "integerTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "termVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "termVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "typeVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "types")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++languageConstraintsWithTermVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.TermVariant) -> Phantoms.TTerm Coders.LanguageConstraints+languageConstraintsWithTermVariants original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "eliminationVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "eliminationVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "literalVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "literalVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "floatTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "floatTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "functionVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "functionVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "integerTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "integerTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "termVariants"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "typeVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "types")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++languageConstraintsWithTypeVariants :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (S.Set Variants.TypeVariant) -> Phantoms.TTerm Coders.LanguageConstraints+languageConstraintsWithTypeVariants original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "eliminationVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "eliminationVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "literalVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "literalVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "floatTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "floatTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "functionVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "functionVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "integerTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "integerTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "termVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "termVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariants"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "types")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++languageConstraintsWithTypes :: Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm (Core.Type -> Bool) -> Phantoms.TTerm Coders.LanguageConstraints+languageConstraintsWithTypes original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "eliminationVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "eliminationVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "literalVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "literalVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "floatTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "floatTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "functionVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "functionVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "integerTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "integerTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "termVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "termVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariants"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+              Core.projectionField = (Core.Name "typeVariants")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++languageConstraints_ :: Phantoms.TTerm (S.Set Variants.EliminationVariant) -> Phantoms.TTerm (S.Set Variants.LiteralVariant) -> Phantoms.TTerm (S.Set Core.FloatType) -> Phantoms.TTerm (S.Set Variants.FunctionVariant) -> Phantoms.TTerm (S.Set Core.IntegerType) -> Phantoms.TTerm (S.Set Variants.TermVariant) -> Phantoms.TTerm (S.Set Variants.TypeVariant) -> Phantoms.TTerm (Core.Type -> Bool) -> Phantoms.TTerm Coders.LanguageConstraints+languageConstraints_ eliminationVariants literalVariants floatTypes functionVariants integerTypes termVariants typeVariants types =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.LanguageConstraints"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "eliminationVariants"),+          Core.fieldTerm = (Phantoms.unTTerm eliminationVariants)},+        Core.Field {+          Core.fieldName = (Core.Name "literalVariants"),+          Core.fieldTerm = (Phantoms.unTTerm literalVariants)},+        Core.Field {+          Core.fieldName = (Core.Name "floatTypes"),+          Core.fieldTerm = (Phantoms.unTTerm floatTypes)},+        Core.Field {+          Core.fieldName = (Core.Name "functionVariants"),+          Core.fieldTerm = (Phantoms.unTTerm functionVariants)},+        Core.Field {+          Core.fieldName = (Core.Name "integerTypes"),+          Core.fieldTerm = (Phantoms.unTTerm integerTypes)},+        Core.Field {+          Core.fieldName = (Core.Name "termVariants"),+          Core.fieldTerm = (Phantoms.unTTerm termVariants)},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariants"),+          Core.fieldTerm = (Phantoms.unTTerm typeVariants)},+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Phantoms.unTTerm types)}]}))++languageName :: Phantoms.TTerm Coders.Language -> Phantoms.TTerm Coders.LanguageName+languageName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.coders.Language"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++languageName_ :: Phantoms.TTerm String -> Phantoms.TTerm Coders.LanguageName+languageName_ x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.coders.LanguageName"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++languageWithConstraints :: Phantoms.TTerm Coders.Language -> Phantoms.TTerm Coders.LanguageConstraints -> Phantoms.TTerm Coders.Language+languageWithConstraints original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.Language"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.Language"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "constraints"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++languageWithName :: Phantoms.TTerm Coders.Language -> Phantoms.TTerm Coders.LanguageName -> Phantoms.TTerm Coders.Language+languageWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.coders.Language"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "constraints"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.coders.Language"),+              Core.projectionField = (Core.Name "constraints")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++traversalOrderPost :: Phantoms.TTerm Coders.TraversalOrder+traversalOrderPost =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.coders.TraversalOrder"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "post"),+        Core.fieldTerm = Core.TermUnit}}))++traversalOrderPre :: Phantoms.TTerm Coders.TraversalOrder+traversalOrderPre =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.coders.TraversalOrder"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "pre"),+        Core.fieldTerm = Core.TermUnit}}))++unLanguageName :: Phantoms.TTerm Coders.LanguageName -> Phantoms.TTerm String+unLanguageName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.coders.LanguageName")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))
+ src/gen-main/haskell/Hydra/Dsl/Context.hs view
@@ -0,0 +1,183 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.context++module Hydra.Dsl.Context where++import qualified Hydra.Context as Context+import qualified Hydra.Core as Core+import qualified Hydra.Phantoms as Phantoms+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++context :: Phantoms.TTerm [String] -> Phantoms.TTerm [String] -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Context.Context+context trace messages other =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.context.Context"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "trace"),+          Core.fieldTerm = (Phantoms.unTTerm trace)},+        Core.Field {+          Core.fieldName = (Core.Name "messages"),+          Core.fieldTerm = (Phantoms.unTTerm messages)},+        Core.Field {+          Core.fieldName = (Core.Name "other"),+          Core.fieldTerm = (Phantoms.unTTerm other)}]}))++contextMessages :: Phantoms.TTerm Context.Context -> Phantoms.TTerm [String]+contextMessages x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.context.Context"),+        Core.projectionField = (Core.Name "messages")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++contextOther :: Phantoms.TTerm Context.Context -> Phantoms.TTerm (M.Map Core.Name Core.Term)+contextOther x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.context.Context"),+        Core.projectionField = (Core.Name "other")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++contextTrace :: Phantoms.TTerm Context.Context -> Phantoms.TTerm [String]+contextTrace x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.context.Context"),+        Core.projectionField = (Core.Name "trace")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++contextWithMessages :: Phantoms.TTerm Context.Context -> Phantoms.TTerm [String] -> Phantoms.TTerm Context.Context+contextWithMessages original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.context.Context"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "trace"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.context.Context"),+              Core.projectionField = (Core.Name "trace")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "messages"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "other"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.context.Context"),+              Core.projectionField = (Core.Name "other")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++contextWithOther :: Phantoms.TTerm Context.Context -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Context.Context+contextWithOther original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.context.Context"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "trace"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.context.Context"),+              Core.projectionField = (Core.Name "trace")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "messages"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.context.Context"),+              Core.projectionField = (Core.Name "messages")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "other"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++contextWithTrace :: Phantoms.TTerm Context.Context -> Phantoms.TTerm [String] -> Phantoms.TTerm Context.Context+contextWithTrace original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.context.Context"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "trace"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "messages"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.context.Context"),+              Core.projectionField = (Core.Name "messages")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "other"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.context.Context"),+              Core.projectionField = (Core.Name "other")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++inContext :: Phantoms.TTerm e -> Phantoms.TTerm Context.Context -> Phantoms.TTerm (Context.InContext e)+inContext object context =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.context.InContext"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "object"),+          Core.fieldTerm = (Phantoms.unTTerm object)},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Phantoms.unTTerm context)}]}))++inContextContext :: Phantoms.TTerm (Context.InContext e) -> Phantoms.TTerm Context.Context+inContextContext x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.context.InContext"),+        Core.projectionField = (Core.Name "context")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++inContextObject :: Phantoms.TTerm (Context.InContext e) -> Phantoms.TTerm e+inContextObject x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.context.InContext"),+        Core.projectionField = (Core.Name "object")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++inContextWithContext :: Phantoms.TTerm (Context.InContext e) -> Phantoms.TTerm Context.Context -> Phantoms.TTerm (Context.InContext e)+inContextWithContext original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.context.InContext"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "object"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.context.InContext"),+              Core.projectionField = (Core.Name "object")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++inContextWithObject :: Phantoms.TTerm (Context.InContext e) -> Phantoms.TTerm e -> Phantoms.TTerm (Context.InContext e)+inContextWithObject original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.context.InContext"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "object"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.context.InContext"),+              Core.projectionField = (Core.Name "context")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
+ src/gen-main/haskell/Hydra/Dsl/Core.hs view
@@ -0,0 +1,2164 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.core++module Hydra.Dsl.Core where++import qualified Hydra.Core as Core+import qualified Hydra.Phantoms as Phantoms+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++annotatedTerm :: Phantoms.TTerm Core.Term -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Core.AnnotatedTerm+annotatedTerm body annotation =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm body)},+        Core.Field {+          Core.fieldName = (Core.Name "annotation"),+          Core.fieldTerm = (Phantoms.unTTerm annotation)}]}))++annotatedTermAnnotation :: Phantoms.TTerm Core.AnnotatedTerm -> Phantoms.TTerm (M.Map Core.Name Core.Term)+annotatedTermAnnotation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedTerm"),+        Core.projectionField = (Core.Name "annotation")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++annotatedTermBody :: Phantoms.TTerm Core.AnnotatedTerm -> Phantoms.TTerm Core.Term+annotatedTermBody x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedTerm"),+        Core.projectionField = (Core.Name "body")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++annotatedTermWithAnnotation :: Phantoms.TTerm Core.AnnotatedTerm -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Core.AnnotatedTerm+annotatedTermWithAnnotation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedTerm"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "annotation"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++annotatedTermWithBody :: Phantoms.TTerm Core.AnnotatedTerm -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.AnnotatedTerm+annotatedTermWithBody original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "annotation"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedTerm"),+              Core.projectionField = (Core.Name "annotation")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++annotatedType :: Phantoms.TTerm Core.Type -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Core.AnnotatedType+annotatedType body annotation =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm body)},+        Core.Field {+          Core.fieldName = (Core.Name "annotation"),+          Core.fieldTerm = (Phantoms.unTTerm annotation)}]}))++annotatedTypeAnnotation :: Phantoms.TTerm Core.AnnotatedType -> Phantoms.TTerm (M.Map Core.Name Core.Term)+annotatedTypeAnnotation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedType"),+        Core.projectionField = (Core.Name "annotation")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++annotatedTypeBody :: Phantoms.TTerm Core.AnnotatedType -> Phantoms.TTerm Core.Type+annotatedTypeBody x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedType"),+        Core.projectionField = (Core.Name "body")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++annotatedTypeWithAnnotation :: Phantoms.TTerm Core.AnnotatedType -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Core.AnnotatedType+annotatedTypeWithAnnotation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedType"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "annotation"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++annotatedTypeWithBody :: Phantoms.TTerm Core.AnnotatedType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.AnnotatedType+annotatedTypeWithBody original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "annotation"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.AnnotatedType"),+              Core.projectionField = (Core.Name "annotation")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++application :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Application+application function argument =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Application"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (Phantoms.unTTerm function)},+        Core.Field {+          Core.fieldName = (Core.Name "argument"),+          Core.fieldTerm = (Phantoms.unTTerm argument)}]}))++applicationArgument :: Phantoms.TTerm Core.Application -> Phantoms.TTerm Core.Term+applicationArgument x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Application"),+        Core.projectionField = (Core.Name "argument")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++applicationFunction :: Phantoms.TTerm Core.Application -> Phantoms.TTerm Core.Term+applicationFunction x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Application"),+        Core.projectionField = (Core.Name "function")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++applicationType :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.ApplicationType+applicationType function argument =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.ApplicationType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (Phantoms.unTTerm function)},+        Core.Field {+          Core.fieldName = (Core.Name "argument"),+          Core.fieldTerm = (Phantoms.unTTerm argument)}]}))++applicationTypeArgument :: Phantoms.TTerm Core.ApplicationType -> Phantoms.TTerm Core.Type+applicationTypeArgument x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.ApplicationType"),+        Core.projectionField = (Core.Name "argument")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++applicationTypeFunction :: Phantoms.TTerm Core.ApplicationType -> Phantoms.TTerm Core.Type+applicationTypeFunction x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.ApplicationType"),+        Core.projectionField = (Core.Name "function")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++applicationTypeWithArgument :: Phantoms.TTerm Core.ApplicationType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.ApplicationType+applicationTypeWithArgument original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.ApplicationType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.ApplicationType"),+              Core.projectionField = (Core.Name "function")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "argument"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++applicationTypeWithFunction :: Phantoms.TTerm Core.ApplicationType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.ApplicationType+applicationTypeWithFunction original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.ApplicationType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "argument"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.ApplicationType"),+              Core.projectionField = (Core.Name "argument")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++applicationWithArgument :: Phantoms.TTerm Core.Application -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Application+applicationWithArgument original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Application"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Application"),+              Core.projectionField = (Core.Name "function")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "argument"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++applicationWithFunction :: Phantoms.TTerm Core.Application -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Application+applicationWithFunction original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Application"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "argument"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Application"),+              Core.projectionField = (Core.Name "argument")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++binding :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Term -> Phantoms.TTerm (Maybe Core.TypeScheme) -> Phantoms.TTerm Core.Binding+binding name term type_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Binding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Phantoms.unTTerm term)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))++bindingName :: Phantoms.TTerm Core.Binding -> Phantoms.TTerm Core.Name+bindingName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Binding"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++bindingTerm :: Phantoms.TTerm Core.Binding -> Phantoms.TTerm Core.Term+bindingTerm x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Binding"),+        Core.projectionField = (Core.Name "term")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++bindingType :: Phantoms.TTerm Core.Binding -> Phantoms.TTerm (Maybe Core.TypeScheme)+bindingType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Binding"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++bindingWithName :: Phantoms.TTerm Core.Binding -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Binding+bindingWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Binding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Binding"),+              Core.projectionField = (Core.Name "term")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Binding"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++bindingWithTerm :: Phantoms.TTerm Core.Binding -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Binding+bindingWithTerm original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Binding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Binding"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Binding"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++bindingWithType :: Phantoms.TTerm Core.Binding -> Phantoms.TTerm (Maybe Core.TypeScheme) -> Phantoms.TTerm Core.Binding+bindingWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Binding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Binding"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Binding"),+              Core.projectionField = (Core.Name "term")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++caseStatement :: Phantoms.TTerm Core.Name -> Phantoms.TTerm (Maybe Core.Term) -> Phantoms.TTerm [Core.Field] -> Phantoms.TTerm Core.CaseStatement+caseStatement typeName default_ cases =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.CaseStatement"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm typeName)},+        Core.Field {+          Core.fieldName = (Core.Name "default"),+          Core.fieldTerm = (Phantoms.unTTerm default_)},+        Core.Field {+          Core.fieldName = (Core.Name "cases"),+          Core.fieldTerm = (Phantoms.unTTerm cases)}]}))++caseStatementCases :: Phantoms.TTerm Core.CaseStatement -> Phantoms.TTerm [Core.Field]+caseStatementCases x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),+        Core.projectionField = (Core.Name "cases")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++caseStatementDefault :: Phantoms.TTerm Core.CaseStatement -> Phantoms.TTerm (Maybe Core.Term)+caseStatementDefault x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),+        Core.projectionField = (Core.Name "default")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++caseStatementTypeName :: Phantoms.TTerm Core.CaseStatement -> Phantoms.TTerm Core.Name+caseStatementTypeName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),+        Core.projectionField = (Core.Name "typeName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++caseStatementWithCases :: Phantoms.TTerm Core.CaseStatement -> Phantoms.TTerm [Core.Field] -> Phantoms.TTerm Core.CaseStatement+caseStatementWithCases original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.CaseStatement"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),+              Core.projectionField = (Core.Name "typeName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "default"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),+              Core.projectionField = (Core.Name "default")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "cases"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++caseStatementWithDefault :: Phantoms.TTerm Core.CaseStatement -> Phantoms.TTerm (Maybe Core.Term) -> Phantoms.TTerm Core.CaseStatement+caseStatementWithDefault original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.CaseStatement"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),+              Core.projectionField = (Core.Name "typeName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "default"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "cases"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),+              Core.projectionField = (Core.Name "cases")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++caseStatementWithTypeName :: Phantoms.TTerm Core.CaseStatement -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.CaseStatement+caseStatementWithTypeName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.CaseStatement"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "default"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),+              Core.projectionField = (Core.Name "default")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "cases"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.CaseStatement"),+              Core.projectionField = (Core.Name "cases")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++eitherType :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.EitherType+eitherType left right =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.EitherType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Phantoms.unTTerm left)},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Phantoms.unTTerm right)}]}))++eitherTypeLeft :: Phantoms.TTerm Core.EitherType -> Phantoms.TTerm Core.Type+eitherTypeLeft x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.EitherType"),+        Core.projectionField = (Core.Name "left")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++eitherTypeRight :: Phantoms.TTerm Core.EitherType -> Phantoms.TTerm Core.Type+eitherTypeRight x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.EitherType"),+        Core.projectionField = (Core.Name "right")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++eitherTypeWithLeft :: Phantoms.TTerm Core.EitherType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.EitherType+eitherTypeWithLeft original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.EitherType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.EitherType"),+              Core.projectionField = (Core.Name "right")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++eitherTypeWithRight :: Phantoms.TTerm Core.EitherType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.EitherType+eitherTypeWithRight original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.EitherType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.EitherType"),+              Core.projectionField = (Core.Name "left")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++eliminationRecord :: Phantoms.TTerm Core.Projection -> Phantoms.TTerm Core.Elimination+eliminationRecord x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Elimination"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "record"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++eliminationUnion :: Phantoms.TTerm Core.CaseStatement -> Phantoms.TTerm Core.Elimination+eliminationUnion x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Elimination"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "union"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++eliminationWrap :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Elimination+eliminationWrap x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Elimination"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "wrap"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++field :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Field+field name term =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Field"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Phantoms.unTTerm term)}]}))++fieldName :: Phantoms.TTerm Core.Field -> Phantoms.TTerm Core.Name+fieldName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Field"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++fieldTerm :: Phantoms.TTerm Core.Field -> Phantoms.TTerm Core.Term+fieldTerm x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Field"),+        Core.projectionField = (Core.Name "term")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++fieldType :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.FieldType+fieldType name type_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.FieldType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))++fieldTypeName :: Phantoms.TTerm Core.FieldType -> Phantoms.TTerm Core.Name+fieldTypeName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.FieldType"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++fieldTypeType :: Phantoms.TTerm Core.FieldType -> Phantoms.TTerm Core.Type+fieldTypeType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.FieldType"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++fieldTypeWithName :: Phantoms.TTerm Core.FieldType -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.FieldType+fieldTypeWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.FieldType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.FieldType"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++fieldTypeWithType :: Phantoms.TTerm Core.FieldType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.FieldType+fieldTypeWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.FieldType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.FieldType"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++fieldWithName :: Phantoms.TTerm Core.Field -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Field+fieldWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Field"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Field"),+              Core.projectionField = (Core.Name "term")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++fieldWithTerm :: Phantoms.TTerm Core.Field -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Field+fieldWithTerm original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Field"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Field"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++floatTypeBigfloat :: Phantoms.TTerm Core.FloatType+floatTypeBigfloat =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "bigfloat"),+        Core.fieldTerm = Core.TermUnit}}))++floatTypeFloat32 :: Phantoms.TTerm Core.FloatType+floatTypeFloat32 =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "float32"),+        Core.fieldTerm = Core.TermUnit}}))++floatTypeFloat64 :: Phantoms.TTerm Core.FloatType+floatTypeFloat64 =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "float64"),+        Core.fieldTerm = Core.TermUnit}}))++floatValueBigfloat :: Phantoms.TTerm Double -> Phantoms.TTerm Core.FloatValue+floatValueBigfloat x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "bigfloat"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++floatValueFloat32 :: Phantoms.TTerm Float -> Phantoms.TTerm Core.FloatValue+floatValueFloat32 x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "float32"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++floatValueFloat64 :: Phantoms.TTerm Double -> Phantoms.TTerm Core.FloatValue+floatValueFloat64 x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "float64"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++forallType :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.ForallType+forallType parameter body =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.ForallType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "parameter"),+          Core.fieldTerm = (Phantoms.unTTerm parameter)},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm body)}]}))++forallTypeBody :: Phantoms.TTerm Core.ForallType -> Phantoms.TTerm Core.Type+forallTypeBody x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.ForallType"),+        Core.projectionField = (Core.Name "body")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++forallTypeParameter :: Phantoms.TTerm Core.ForallType -> Phantoms.TTerm Core.Name+forallTypeParameter x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.ForallType"),+        Core.projectionField = (Core.Name "parameter")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++forallTypeWithBody :: Phantoms.TTerm Core.ForallType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.ForallType+forallTypeWithBody original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.ForallType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "parameter"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.ForallType"),+              Core.projectionField = (Core.Name "parameter")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++forallTypeWithParameter :: Phantoms.TTerm Core.ForallType -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.ForallType+forallTypeWithParameter original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.ForallType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "parameter"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.ForallType"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++functionElimination :: Phantoms.TTerm Core.Elimination -> Phantoms.TTerm Core.Function+functionElimination x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Function"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "elimination"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++functionLambda :: Phantoms.TTerm Core.Lambda -> Phantoms.TTerm Core.Function+functionLambda x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Function"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "lambda"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++functionPrimitive :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Function+functionPrimitive x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Function"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "primitive"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++functionType :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.FunctionType+functionType domain codomain =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.FunctionType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = (Phantoms.unTTerm domain)},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (Phantoms.unTTerm codomain)}]}))++functionTypeCodomain :: Phantoms.TTerm Core.FunctionType -> Phantoms.TTerm Core.Type+functionTypeCodomain x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.FunctionType"),+        Core.projectionField = (Core.Name "codomain")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++functionTypeDomain :: Phantoms.TTerm Core.FunctionType -> Phantoms.TTerm Core.Type+functionTypeDomain x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.FunctionType"),+        Core.projectionField = (Core.Name "domain")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++functionTypeWithCodomain :: Phantoms.TTerm Core.FunctionType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.FunctionType+functionTypeWithCodomain original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.FunctionType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.FunctionType"),+              Core.projectionField = (Core.Name "domain")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++functionTypeWithDomain :: Phantoms.TTerm Core.FunctionType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.FunctionType+functionTypeWithDomain original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.FunctionType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.FunctionType"),+              Core.projectionField = (Core.Name "codomain")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++injection :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Field -> Phantoms.TTerm Core.Injection+injection typeName field =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Injection"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm typeName)},+        Core.Field {+          Core.fieldName = (Core.Name "field"),+          Core.fieldTerm = (Phantoms.unTTerm field)}]}))++injectionField :: Phantoms.TTerm Core.Injection -> Phantoms.TTerm Core.Field+injectionField x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),+        Core.projectionField = (Core.Name "field")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++injectionTypeName :: Phantoms.TTerm Core.Injection -> Phantoms.TTerm Core.Name+injectionTypeName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Injection"),+        Core.projectionField = (Core.Name "typeName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++injectionWithField :: Phantoms.TTerm Core.Injection -> Phantoms.TTerm Core.Field -> Phantoms.TTerm Core.Injection+injectionWithField original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Injection"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Injection"),+              Core.projectionField = (Core.Name "typeName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "field"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++injectionWithTypeName :: Phantoms.TTerm Core.Injection -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Injection+injectionWithTypeName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Injection"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "field"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Injection"),+              Core.projectionField = (Core.Name "field")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++integerTypeBigint :: Phantoms.TTerm Core.IntegerType+integerTypeBigint =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "bigint"),+        Core.fieldTerm = Core.TermUnit}}))++integerTypeInt16 :: Phantoms.TTerm Core.IntegerType+integerTypeInt16 =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "int16"),+        Core.fieldTerm = Core.TermUnit}}))++integerTypeInt32 :: Phantoms.TTerm Core.IntegerType+integerTypeInt32 =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "int32"),+        Core.fieldTerm = Core.TermUnit}}))++integerTypeInt64 :: Phantoms.TTerm Core.IntegerType+integerTypeInt64 =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "int64"),+        Core.fieldTerm = Core.TermUnit}}))++integerTypeInt8 :: Phantoms.TTerm Core.IntegerType+integerTypeInt8 =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "int8"),+        Core.fieldTerm = Core.TermUnit}}))++integerTypeUint16 :: Phantoms.TTerm Core.IntegerType+integerTypeUint16 =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "uint16"),+        Core.fieldTerm = Core.TermUnit}}))++integerTypeUint32 :: Phantoms.TTerm Core.IntegerType+integerTypeUint32 =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "uint32"),+        Core.fieldTerm = Core.TermUnit}}))++integerTypeUint64 :: Phantoms.TTerm Core.IntegerType+integerTypeUint64 =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "uint64"),+        Core.fieldTerm = Core.TermUnit}}))++integerTypeUint8 :: Phantoms.TTerm Core.IntegerType+integerTypeUint8 =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "uint8"),+        Core.fieldTerm = Core.TermUnit}}))++integerValueBigint :: Phantoms.TTerm Integer -> Phantoms.TTerm Core.IntegerValue+integerValueBigint x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "bigint"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++integerValueInt16 :: Phantoms.TTerm I.Int16 -> Phantoms.TTerm Core.IntegerValue+integerValueInt16 x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "int16"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++integerValueInt32 :: Phantoms.TTerm Int -> Phantoms.TTerm Core.IntegerValue+integerValueInt32 x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "int32"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++integerValueInt64 :: Phantoms.TTerm I.Int64 -> Phantoms.TTerm Core.IntegerValue+integerValueInt64 x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "int64"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++integerValueInt8 :: Phantoms.TTerm I.Int8 -> Phantoms.TTerm Core.IntegerValue+integerValueInt8 x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "int8"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++integerValueUint16 :: Phantoms.TTerm Int -> Phantoms.TTerm Core.IntegerValue+integerValueUint16 x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "uint16"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++integerValueUint32 :: Phantoms.TTerm I.Int64 -> Phantoms.TTerm Core.IntegerValue+integerValueUint32 x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "uint32"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++integerValueUint64 :: Phantoms.TTerm Integer -> Phantoms.TTerm Core.IntegerValue+integerValueUint64 x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "uint64"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++integerValueUint8 :: Phantoms.TTerm I.Int16 -> Phantoms.TTerm Core.IntegerValue+integerValueUint8 x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "uint8"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++lambda :: Phantoms.TTerm Core.Name -> Phantoms.TTerm (Maybe Core.Type) -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Lambda+lambda parameter domain body =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Lambda"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "parameter"),+          Core.fieldTerm = (Phantoms.unTTerm parameter)},+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = (Phantoms.unTTerm domain)},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm body)}]}))++lambdaBody :: Phantoms.TTerm Core.Lambda -> Phantoms.TTerm Core.Term+lambdaBody x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),+        Core.projectionField = (Core.Name "body")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++lambdaDomain :: Phantoms.TTerm Core.Lambda -> Phantoms.TTerm (Maybe Core.Type)+lambdaDomain x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),+        Core.projectionField = (Core.Name "domain")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++lambdaParameter :: Phantoms.TTerm Core.Lambda -> Phantoms.TTerm Core.Name+lambdaParameter x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),+        Core.projectionField = (Core.Name "parameter")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++lambdaWithBody :: Phantoms.TTerm Core.Lambda -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Lambda+lambdaWithBody original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Lambda"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "parameter"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),+              Core.projectionField = (Core.Name "parameter")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),+              Core.projectionField = (Core.Name "domain")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++lambdaWithDomain :: Phantoms.TTerm Core.Lambda -> Phantoms.TTerm (Maybe Core.Type) -> Phantoms.TTerm Core.Lambda+lambdaWithDomain original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Lambda"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "parameter"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),+              Core.projectionField = (Core.Name "parameter")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++lambdaWithParameter :: Phantoms.TTerm Core.Lambda -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Lambda+lambdaWithParameter original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Lambda"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "parameter"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),+              Core.projectionField = (Core.Name "domain")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Lambda"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++let_ :: Phantoms.TTerm [Core.Binding] -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Let+let_ bindings body =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Let"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Phantoms.unTTerm bindings)},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm body)}]}))++letBindings :: Phantoms.TTerm Core.Let -> Phantoms.TTerm [Core.Binding]+letBindings x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Let"),+        Core.projectionField = (Core.Name "bindings")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++letBody :: Phantoms.TTerm Core.Let -> Phantoms.TTerm Core.Term+letBody x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Let"),+        Core.projectionField = (Core.Name "body")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++letWithBindings :: Phantoms.TTerm Core.Let -> Phantoms.TTerm [Core.Binding] -> Phantoms.TTerm Core.Let+letWithBindings original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Let"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Let"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++letWithBody :: Phantoms.TTerm Core.Let -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Let+letWithBody original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Let"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Let"),+              Core.projectionField = (Core.Name "bindings")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++literalBinary :: Phantoms.TTerm B.ByteString -> Phantoms.TTerm Core.Literal+literalBinary x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "binary"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++literalBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Core.Literal+literalBoolean x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "boolean"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++literalFloat :: Phantoms.TTerm Core.FloatValue -> Phantoms.TTerm Core.Literal+literalFloat x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "float"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++literalInteger :: Phantoms.TTerm Core.IntegerValue -> Phantoms.TTerm Core.Literal+literalInteger x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "integer"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++literalString :: Phantoms.TTerm String -> Phantoms.TTerm Core.Literal+literalString x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Literal"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "string"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++literalTypeBinary :: Phantoms.TTerm Core.LiteralType+literalTypeBinary =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "binary"),+        Core.fieldTerm = Core.TermUnit}}))++literalTypeBoolean :: Phantoms.TTerm Core.LiteralType+literalTypeBoolean =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "boolean"),+        Core.fieldTerm = Core.TermUnit}}))++literalTypeFloat :: Phantoms.TTerm Core.FloatType -> Phantoms.TTerm Core.LiteralType+literalTypeFloat x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "float"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++literalTypeInteger :: Phantoms.TTerm Core.IntegerType -> Phantoms.TTerm Core.LiteralType+literalTypeInteger x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "integer"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++literalTypeString :: Phantoms.TTerm Core.LiteralType+literalTypeString =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "string"),+        Core.fieldTerm = Core.TermUnit}}))++mapType :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.MapType+mapType keys values =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.MapType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "keys"),+          Core.fieldTerm = (Phantoms.unTTerm keys)},+        Core.Field {+          Core.fieldName = (Core.Name "values"),+          Core.fieldTerm = (Phantoms.unTTerm values)}]}))++mapTypeKeys :: Phantoms.TTerm Core.MapType -> Phantoms.TTerm Core.Type+mapTypeKeys x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.MapType"),+        Core.projectionField = (Core.Name "keys")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++mapTypeValues :: Phantoms.TTerm Core.MapType -> Phantoms.TTerm Core.Type+mapTypeValues x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.MapType"),+        Core.projectionField = (Core.Name "values")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++mapTypeWithKeys :: Phantoms.TTerm Core.MapType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.MapType+mapTypeWithKeys original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.MapType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "keys"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "values"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.MapType"),+              Core.projectionField = (Core.Name "values")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++mapTypeWithValues :: Phantoms.TTerm Core.MapType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.MapType+mapTypeWithValues original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.MapType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "keys"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.MapType"),+              Core.projectionField = (Core.Name "keys")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "values"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++name :: Phantoms.TTerm String -> Phantoms.TTerm Core.Name+name x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++pairType :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.PairType+pairType first second =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.PairType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "first"),+          Core.fieldTerm = (Phantoms.unTTerm first)},+        Core.Field {+          Core.fieldName = (Core.Name "second"),+          Core.fieldTerm = (Phantoms.unTTerm second)}]}))++pairTypeFirst :: Phantoms.TTerm Core.PairType -> Phantoms.TTerm Core.Type+pairTypeFirst x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.PairType"),+        Core.projectionField = (Core.Name "first")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++pairTypeSecond :: Phantoms.TTerm Core.PairType -> Phantoms.TTerm Core.Type+pairTypeSecond x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.PairType"),+        Core.projectionField = (Core.Name "second")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++pairTypeWithFirst :: Phantoms.TTerm Core.PairType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.PairType+pairTypeWithFirst original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.PairType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "first"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "second"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.PairType"),+              Core.projectionField = (Core.Name "second")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++pairTypeWithSecond :: Phantoms.TTerm Core.PairType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.PairType+pairTypeWithSecond original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.PairType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "first"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.PairType"),+              Core.projectionField = (Core.Name "first")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "second"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++projection :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Projection+projection typeName field =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Projection"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm typeName)},+        Core.Field {+          Core.fieldName = (Core.Name "field"),+          Core.fieldTerm = (Phantoms.unTTerm field)}]}))++projectionField :: Phantoms.TTerm Core.Projection -> Phantoms.TTerm Core.Name+projectionField x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Projection"),+        Core.projectionField = (Core.Name "field")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++projectionTypeName :: Phantoms.TTerm Core.Projection -> Phantoms.TTerm Core.Name+projectionTypeName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Projection"),+        Core.projectionField = (Core.Name "typeName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++projectionWithField :: Phantoms.TTerm Core.Projection -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Projection+projectionWithField original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Projection"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Projection"),+              Core.projectionField = (Core.Name "typeName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "field"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++projectionWithTypeName :: Phantoms.TTerm Core.Projection -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Projection+projectionWithTypeName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Projection"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "field"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Projection"),+              Core.projectionField = (Core.Name "field")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++record :: Phantoms.TTerm Core.Name -> Phantoms.TTerm [Core.Field] -> Phantoms.TTerm Core.Record+record typeName fields =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Record"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm typeName)},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))++recordFields :: Phantoms.TTerm Core.Record -> Phantoms.TTerm [Core.Field]+recordFields x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Record"),+        Core.projectionField = (Core.Name "fields")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++recordTypeName :: Phantoms.TTerm Core.Record -> Phantoms.TTerm Core.Name+recordTypeName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.Record"),+        Core.projectionField = (Core.Name "typeName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++recordWithFields :: Phantoms.TTerm Core.Record -> Phantoms.TTerm [Core.Field] -> Phantoms.TTerm Core.Record+recordWithFields original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Record"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Record"),+              Core.projectionField = (Core.Name "typeName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++recordWithTypeName :: Phantoms.TTerm Core.Record -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Record+recordWithTypeName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Record"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.Record"),+              Core.projectionField = (Core.Name "fields")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++termAnnotated :: Phantoms.TTerm Core.AnnotatedTerm -> Phantoms.TTerm Core.Term+termAnnotated x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "annotated"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termApplication :: Phantoms.TTerm Core.Application -> Phantoms.TTerm Core.Term+termApplication x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "application"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termEither :: Phantoms.TTerm (Either Core.Term Core.Term) -> Phantoms.TTerm Core.Term+termEither x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "either"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termFunction :: Phantoms.TTerm Core.Function -> Phantoms.TTerm Core.Term+termFunction x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "function"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termLet :: Phantoms.TTerm Core.Let -> Phantoms.TTerm Core.Term+termLet x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "let"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termList :: Phantoms.TTerm [Core.Term] -> Phantoms.TTerm Core.Term+termList x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "list"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termLiteral :: Phantoms.TTerm Core.Literal -> Phantoms.TTerm Core.Term+termLiteral x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "literal"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termMap :: Phantoms.TTerm (M.Map Core.Term Core.Term) -> Phantoms.TTerm Core.Term+termMap x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "map"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termMaybe :: Phantoms.TTerm (Maybe Core.Term) -> Phantoms.TTerm Core.Term+termMaybe x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "maybe"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termPair :: Phantoms.TTerm (Core.Term, Core.Term) -> Phantoms.TTerm Core.Term+termPair x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "pair"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termRecord :: Phantoms.TTerm Core.Record -> Phantoms.TTerm Core.Term+termRecord x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "record"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termSet :: Phantoms.TTerm (S.Set Core.Term) -> Phantoms.TTerm Core.Term+termSet x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "set"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termTypeApplication :: Phantoms.TTerm Core.TypeApplicationTerm -> Phantoms.TTerm Core.Term+termTypeApplication x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typeApplication"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termTypeLambda :: Phantoms.TTerm Core.TypeLambda -> Phantoms.TTerm Core.Term+termTypeLambda x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typeLambda"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termUnion :: Phantoms.TTerm Core.Injection -> Phantoms.TTerm Core.Term+termUnion x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "union"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termUnit :: Phantoms.TTerm Core.Term+termUnit =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unit"),+        Core.fieldTerm = Core.TermUnit}}))++termVariable :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Term+termVariable x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "variable"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++termWrap :: Phantoms.TTerm Core.WrappedTerm -> Phantoms.TTerm Core.Term+termWrap x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "wrap"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeAnnotated :: Phantoms.TTerm Core.AnnotatedType -> Phantoms.TTerm Core.Type+typeAnnotated x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "annotated"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeApplication :: Phantoms.TTerm Core.ApplicationType -> Phantoms.TTerm Core.Type+typeApplication x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "application"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeApplicationTerm :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.TypeApplicationTerm+typeApplicationTerm body type_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm body)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))++typeApplicationTermBody :: Phantoms.TTerm Core.TypeApplicationTerm -> Phantoms.TTerm Core.Term+typeApplicationTermBody x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),+        Core.projectionField = (Core.Name "body")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeApplicationTermType :: Phantoms.TTerm Core.TypeApplicationTerm -> Phantoms.TTerm Core.Type+typeApplicationTermType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeApplicationTermWithBody :: Phantoms.TTerm Core.TypeApplicationTerm -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.TypeApplicationTerm+typeApplicationTermWithBody original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeApplicationTermWithType :: Phantoms.TTerm Core.TypeApplicationTerm -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.TypeApplicationTerm+typeApplicationTermWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeEither :: Phantoms.TTerm Core.EitherType -> Phantoms.TTerm Core.Type+typeEither x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "either"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeForall :: Phantoms.TTerm Core.ForallType -> Phantoms.TTerm Core.Type+typeForall x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "forall"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeFunction :: Phantoms.TTerm Core.FunctionType -> Phantoms.TTerm Core.Type+typeFunction x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "function"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeLambda :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.TypeLambda+typeLambda parameter body =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeLambda"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "parameter"),+          Core.fieldTerm = (Phantoms.unTTerm parameter)},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm body)}]}))++typeLambdaBody :: Phantoms.TTerm Core.TypeLambda -> Phantoms.TTerm Core.Term+typeLambdaBody x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.TypeLambda"),+        Core.projectionField = (Core.Name "body")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeLambdaParameter :: Phantoms.TTerm Core.TypeLambda -> Phantoms.TTerm Core.Name+typeLambdaParameter x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.TypeLambda"),+        Core.projectionField = (Core.Name "parameter")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeLambdaWithBody :: Phantoms.TTerm Core.TypeLambda -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.TypeLambda+typeLambdaWithBody original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeLambda"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "parameter"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.TypeLambda"),+              Core.projectionField = (Core.Name "parameter")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeLambdaWithParameter :: Phantoms.TTerm Core.TypeLambda -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.TypeLambda+typeLambdaWithParameter original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeLambda"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "parameter"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.TypeLambda"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeList :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type+typeList x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "list"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeLiteral :: Phantoms.TTerm Core.LiteralType -> Phantoms.TTerm Core.Type+typeLiteral x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "literal"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeMap :: Phantoms.TTerm Core.MapType -> Phantoms.TTerm Core.Type+typeMap x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "map"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeMaybe :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type+typeMaybe x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "maybe"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typePair :: Phantoms.TTerm Core.PairType -> Phantoms.TTerm Core.Type+typePair x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "pair"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeRecord :: Phantoms.TTerm [Core.FieldType] -> Phantoms.TTerm Core.Type+typeRecord x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "record"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeScheme :: Phantoms.TTerm [Core.Name] -> Phantoms.TTerm Core.Type -> Phantoms.TTerm (Maybe (M.Map Core.Name Core.TypeVariableMetadata)) -> Phantoms.TTerm Core.TypeScheme+typeScheme variables type_ constraints =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeScheme"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variables"),+          Core.fieldTerm = (Phantoms.unTTerm variables)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)},+        Core.Field {+          Core.fieldName = (Core.Name "constraints"),+          Core.fieldTerm = (Phantoms.unTTerm constraints)}]}))++typeSchemeConstraints :: Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm (Maybe (M.Map Core.Name Core.TypeVariableMetadata))+typeSchemeConstraints x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),+        Core.projectionField = (Core.Name "constraints")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeSchemeType :: Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm Core.Type+typeSchemeType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeSchemeVariables :: Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm [Core.Name]+typeSchemeVariables x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),+        Core.projectionField = (Core.Name "variables")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeSchemeWithConstraints :: Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm (Maybe (M.Map Core.Name Core.TypeVariableMetadata)) -> Phantoms.TTerm Core.TypeScheme+typeSchemeWithConstraints original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeScheme"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),+              Core.projectionField = (Core.Name "variables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "constraints"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeSchemeWithType :: Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.TypeScheme+typeSchemeWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeScheme"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),+              Core.projectionField = (Core.Name "variables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "constraints"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),+              Core.projectionField = (Core.Name "constraints")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeSchemeWithVariables :: Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm [Core.Name] -> Phantoms.TTerm Core.TypeScheme+typeSchemeWithVariables original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeScheme"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variables"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "constraints"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.TypeScheme"),+              Core.projectionField = (Core.Name "constraints")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeSet :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type+typeSet x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "set"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeUnion :: Phantoms.TTerm [Core.FieldType] -> Phantoms.TTerm Core.Type+typeUnion x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "union"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeUnit :: Phantoms.TTerm Core.Type+typeUnit =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unit"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariable :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Type+typeVariable x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "variable"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeVariableMetadata :: Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Core.TypeVariableMetadata+typeVariableMetadata classes =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeVariableMetadata"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "classes"),+          Core.fieldTerm = (Phantoms.unTTerm classes)}]}))++typeVariableMetadataClasses :: Phantoms.TTerm Core.TypeVariableMetadata -> Phantoms.TTerm (S.Set Core.Name)+typeVariableMetadataClasses x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.TypeVariableMetadata"),+        Core.projectionField = (Core.Name "classes")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeVariableMetadataWithClasses :: Phantoms.TTerm Core.TypeVariableMetadata -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Core.TypeVariableMetadata+typeVariableMetadataWithClasses original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeVariableMetadata"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "classes"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeVoid :: Phantoms.TTerm Core.Type+typeVoid =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "void"),+        Core.fieldTerm = Core.TermUnit}}))++typeWrap :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type+typeWrap x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.core.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "wrap"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++unName :: Phantoms.TTerm Core.Name -> Phantoms.TTerm String+unName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.core.Name")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++wrappedTerm :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.WrappedTerm+wrappedTerm typeName body =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm typeName)},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm body)}]}))++wrappedTermBody :: Phantoms.TTerm Core.WrappedTerm -> Phantoms.TTerm Core.Term+wrappedTermBody x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),+        Core.projectionField = (Core.Name "body")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++wrappedTermTypeName :: Phantoms.TTerm Core.WrappedTerm -> Phantoms.TTerm Core.Name+wrappedTermTypeName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),+        Core.projectionField = (Core.Name "typeName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++wrappedTermWithBody :: Phantoms.TTerm Core.WrappedTerm -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.WrappedTerm+wrappedTermWithBody original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),+              Core.projectionField = (Core.Name "typeName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++wrappedTermWithTypeName :: Phantoms.TTerm Core.WrappedTerm -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.WrappedTerm+wrappedTermWithTypeName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.core.WrappedTerm"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
+ src/gen-main/haskell/Hydra/Dsl/Error/Checking.hs view
@@ -0,0 +1,617 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.error.checking++module Hydra.Dsl.Error.Checking where++import qualified Hydra.Core as Core+import qualified Hydra.Error.Checking as Checking+import qualified Hydra.Phantoms as Phantoms+import qualified Hydra.Typing as Typing+import qualified Hydra.Variants as Variants+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++checkingErrorIncorrectUnification :: Phantoms.TTerm Checking.IncorrectUnificationError -> Phantoms.TTerm Checking.CheckingError+checkingErrorIncorrectUnification x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "incorrectUnification"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++checkingErrorNotAForallType :: Phantoms.TTerm Checking.NotAForallTypeError -> Phantoms.TTerm Checking.CheckingError+checkingErrorNotAForallType x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "notAForallType"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++checkingErrorNotAFunctionType :: Phantoms.TTerm Checking.NotAFunctionTypeError -> Phantoms.TTerm Checking.CheckingError+checkingErrorNotAFunctionType x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "notAFunctionType"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++checkingErrorTypeArityMismatch :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm Checking.CheckingError+checkingErrorTypeArityMismatch x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typeArityMismatch"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++checkingErrorTypeMismatch :: Phantoms.TTerm Checking.TypeMismatchError -> Phantoms.TTerm Checking.CheckingError+checkingErrorTypeMismatch x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typeMismatch"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++checkingErrorUnboundTypeVariables :: Phantoms.TTerm Checking.UnboundTypeVariablesError -> Phantoms.TTerm Checking.CheckingError+checkingErrorUnboundTypeVariables x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unboundTypeVariables"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++checkingErrorUnequalTypes :: Phantoms.TTerm Checking.UnequalTypesError -> Phantoms.TTerm Checking.CheckingError+checkingErrorUnequalTypes x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unequalTypes"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++checkingErrorUnsupportedTermVariant :: Phantoms.TTerm Checking.UnsupportedTermVariantError -> Phantoms.TTerm Checking.CheckingError+checkingErrorUnsupportedTermVariant x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unsupportedTermVariant"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++checkingErrorUntypedLambda :: Phantoms.TTerm Checking.UntypedLambdaError -> Phantoms.TTerm Checking.CheckingError+checkingErrorUntypedLambda x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "untypedLambda"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++checkingErrorUntypedLetBinding :: Phantoms.TTerm Checking.UntypedLetBindingError -> Phantoms.TTerm Checking.CheckingError+checkingErrorUntypedLetBinding x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "untypedLetBinding"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++incorrectUnificationError :: Phantoms.TTerm Typing.TypeSubst -> Phantoms.TTerm Checking.IncorrectUnificationError+incorrectUnificationError substitution =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.IncorrectUnificationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "substitution"),+          Core.fieldTerm = (Phantoms.unTTerm substitution)}]}))++incorrectUnificationErrorSubstitution :: Phantoms.TTerm Checking.IncorrectUnificationError -> Phantoms.TTerm Typing.TypeSubst+incorrectUnificationErrorSubstitution x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.IncorrectUnificationError"),+        Core.projectionField = (Core.Name "substitution")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++incorrectUnificationErrorWithSubstitution :: Phantoms.TTerm Checking.IncorrectUnificationError -> Phantoms.TTerm Typing.TypeSubst -> Phantoms.TTerm Checking.IncorrectUnificationError+incorrectUnificationErrorWithSubstitution original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.IncorrectUnificationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "substitution"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++notAForallTypeError :: Phantoms.TTerm Core.Type -> Phantoms.TTerm [Core.Type] -> Phantoms.TTerm Checking.NotAForallTypeError+notAForallTypeError type_ typeArguments =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)},+        Core.Field {+          Core.fieldName = (Core.Name "typeArguments"),+          Core.fieldTerm = (Phantoms.unTTerm typeArguments)}]}))++notAForallTypeErrorType :: Phantoms.TTerm Checking.NotAForallTypeError -> Phantoms.TTerm Core.Type+notAForallTypeErrorType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++notAForallTypeErrorTypeArguments :: Phantoms.TTerm Checking.NotAForallTypeError -> Phantoms.TTerm [Core.Type]+notAForallTypeErrorTypeArguments x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),+        Core.projectionField = (Core.Name "typeArguments")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++notAForallTypeErrorWithType :: Phantoms.TTerm Checking.NotAForallTypeError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.NotAForallTypeError+notAForallTypeErrorWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "typeArguments"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),+              Core.projectionField = (Core.Name "typeArguments")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++notAForallTypeErrorWithTypeArguments :: Phantoms.TTerm Checking.NotAForallTypeError -> Phantoms.TTerm [Core.Type] -> Phantoms.TTerm Checking.NotAForallTypeError+notAForallTypeErrorWithTypeArguments original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeArguments"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++notAFunctionTypeError :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.NotAFunctionTypeError+notAFunctionTypeError type_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAFunctionTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))++notAFunctionTypeErrorType :: Phantoms.TTerm Checking.NotAFunctionTypeError -> Phantoms.TTerm Core.Type+notAFunctionTypeErrorType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.NotAFunctionTypeError"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++notAFunctionTypeErrorWithType :: Phantoms.TTerm Checking.NotAFunctionTypeError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.NotAFunctionTypeError+notAFunctionTypeErrorWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAFunctionTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeArityMismatchError :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Int -> Phantoms.TTerm Int -> Phantoms.TTerm [Core.Type] -> Phantoms.TTerm Checking.TypeArityMismatchError+typeArityMismatchError type_ expectedArity actualArity typeArguments =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)},+        Core.Field {+          Core.fieldName = (Core.Name "expectedArity"),+          Core.fieldTerm = (Phantoms.unTTerm expectedArity)},+        Core.Field {+          Core.fieldName = (Core.Name "actualArity"),+          Core.fieldTerm = (Phantoms.unTTerm actualArity)},+        Core.Field {+          Core.fieldName = (Core.Name "typeArguments"),+          Core.fieldTerm = (Phantoms.unTTerm typeArguments)}]}))++typeArityMismatchErrorActualArity :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm Int+typeArityMismatchErrorActualArity x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+        Core.projectionField = (Core.Name "actualArity")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeArityMismatchErrorExpectedArity :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm Int+typeArityMismatchErrorExpectedArity x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+        Core.projectionField = (Core.Name "expectedArity")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeArityMismatchErrorType :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm Core.Type+typeArityMismatchErrorType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeArityMismatchErrorTypeArguments :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm [Core.Type]+typeArityMismatchErrorTypeArguments x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+        Core.projectionField = (Core.Name "typeArguments")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeArityMismatchErrorWithActualArity :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm Int -> Phantoms.TTerm Checking.TypeArityMismatchError+typeArityMismatchErrorWithActualArity original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expectedArity"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+              Core.projectionField = (Core.Name "expectedArity")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "actualArity"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "typeArguments"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+              Core.projectionField = (Core.Name "typeArguments")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeArityMismatchErrorWithExpectedArity :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm Int -> Phantoms.TTerm Checking.TypeArityMismatchError+typeArityMismatchErrorWithExpectedArity original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expectedArity"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "actualArity"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+              Core.projectionField = (Core.Name "actualArity")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeArguments"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+              Core.projectionField = (Core.Name "typeArguments")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeArityMismatchErrorWithType :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.TypeArityMismatchError+typeArityMismatchErrorWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "expectedArity"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+              Core.projectionField = (Core.Name "expectedArity")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "actualArity"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+              Core.projectionField = (Core.Name "actualArity")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeArguments"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+              Core.projectionField = (Core.Name "typeArguments")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeArityMismatchErrorWithTypeArguments :: Phantoms.TTerm Checking.TypeArityMismatchError -> Phantoms.TTerm [Core.Type] -> Phantoms.TTerm Checking.TypeArityMismatchError+typeArityMismatchErrorWithTypeArguments original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expectedArity"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+              Core.projectionField = (Core.Name "expectedArity")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "actualArity"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+              Core.projectionField = (Core.Name "actualArity")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeArguments"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeMismatchError :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.TypeMismatchError+typeMismatchError expectedType actualType =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "expectedType"),+          Core.fieldTerm = (Phantoms.unTTerm expectedType)},+        Core.Field {+          Core.fieldName = (Core.Name "actualType"),+          Core.fieldTerm = (Phantoms.unTTerm actualType)}]}))++typeMismatchErrorActualType :: Phantoms.TTerm Checking.TypeMismatchError -> Phantoms.TTerm Core.Type+typeMismatchErrorActualType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),+        Core.projectionField = (Core.Name "actualType")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeMismatchErrorExpectedType :: Phantoms.TTerm Checking.TypeMismatchError -> Phantoms.TTerm Core.Type+typeMismatchErrorExpectedType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),+        Core.projectionField = (Core.Name "expectedType")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeMismatchErrorWithActualType :: Phantoms.TTerm Checking.TypeMismatchError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.TypeMismatchError+typeMismatchErrorWithActualType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "expectedType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),+              Core.projectionField = (Core.Name "expectedType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "actualType"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeMismatchErrorWithExpectedType :: Phantoms.TTerm Checking.TypeMismatchError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.TypeMismatchError+typeMismatchErrorWithExpectedType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "expectedType"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "actualType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),+              Core.projectionField = (Core.Name "actualType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++unboundTypeVariablesError :: Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.UnboundTypeVariablesError+unboundTypeVariablesError variables type_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variables"),+          Core.fieldTerm = (Phantoms.unTTerm variables)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))++unboundTypeVariablesErrorType :: Phantoms.TTerm Checking.UnboundTypeVariablesError -> Phantoms.TTerm Core.Type+unboundTypeVariablesErrorType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unboundTypeVariablesErrorVariables :: Phantoms.TTerm Checking.UnboundTypeVariablesError -> Phantoms.TTerm (S.Set Core.Name)+unboundTypeVariablesErrorVariables x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),+        Core.projectionField = (Core.Name "variables")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unboundTypeVariablesErrorWithType :: Phantoms.TTerm Checking.UnboundTypeVariablesError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Checking.UnboundTypeVariablesError+unboundTypeVariablesErrorWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),+              Core.projectionField = (Core.Name "variables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++unboundTypeVariablesErrorWithVariables :: Phantoms.TTerm Checking.UnboundTypeVariablesError -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Checking.UnboundTypeVariablesError+unboundTypeVariablesErrorWithVariables original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variables"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++unequalTypesError :: Phantoms.TTerm [Core.Type] -> Phantoms.TTerm String -> Phantoms.TTerm Checking.UnequalTypesError+unequalTypesError types description =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Phantoms.unTTerm types)},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Phantoms.unTTerm description)}]}))++unequalTypesErrorDescription :: Phantoms.TTerm Checking.UnequalTypesError -> Phantoms.TTerm String+unequalTypesErrorDescription x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),+        Core.projectionField = (Core.Name "description")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unequalTypesErrorTypes :: Phantoms.TTerm Checking.UnequalTypesError -> Phantoms.TTerm [Core.Type]+unequalTypesErrorTypes x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),+        Core.projectionField = (Core.Name "types")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unequalTypesErrorWithDescription :: Phantoms.TTerm Checking.UnequalTypesError -> Phantoms.TTerm String -> Phantoms.TTerm Checking.UnequalTypesError+unequalTypesErrorWithDescription original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),+              Core.projectionField = (Core.Name "types")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++unequalTypesErrorWithTypes :: Phantoms.TTerm Checking.UnequalTypesError -> Phantoms.TTerm [Core.Type] -> Phantoms.TTerm Checking.UnequalTypesError+unequalTypesErrorWithTypes original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),+              Core.projectionField = (Core.Name "description")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++unsupportedTermVariantError :: Phantoms.TTerm Variants.TermVariant -> Phantoms.TTerm Checking.UnsupportedTermVariantError+unsupportedTermVariantError termVariant =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UnsupportedTermVariantError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "termVariant"),+          Core.fieldTerm = (Phantoms.unTTerm termVariant)}]}))++unsupportedTermVariantErrorTermVariant :: Phantoms.TTerm Checking.UnsupportedTermVariantError -> Phantoms.TTerm Variants.TermVariant+unsupportedTermVariantErrorTermVariant x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.UnsupportedTermVariantError"),+        Core.projectionField = (Core.Name "termVariant")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unsupportedTermVariantErrorWithTermVariant :: Phantoms.TTerm Checking.UnsupportedTermVariantError -> Phantoms.TTerm Variants.TermVariant -> Phantoms.TTerm Checking.UnsupportedTermVariantError+unsupportedTermVariantErrorWithTermVariant original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UnsupportedTermVariantError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "termVariant"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++untypedLambdaError :: Phantoms.TTerm Checking.UntypedLambdaError+untypedLambdaError =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedLambdaError"),+      Core.recordFields = []}))++untypedLetBindingError :: Phantoms.TTerm Core.Binding -> Phantoms.TTerm Checking.UntypedLetBindingError+untypedLetBindingError binding =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedLetBindingError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "binding"),+          Core.fieldTerm = (Phantoms.unTTerm binding)}]}))++untypedLetBindingErrorBinding :: Phantoms.TTerm Checking.UntypedLetBindingError -> Phantoms.TTerm Core.Binding+untypedLetBindingErrorBinding x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.checking.UntypedLetBindingError"),+        Core.projectionField = (Core.Name "binding")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++untypedLetBindingErrorWithBinding :: Phantoms.TTerm Checking.UntypedLetBindingError -> Phantoms.TTerm Core.Binding -> Phantoms.TTerm Checking.UntypedLetBindingError+untypedLetBindingErrorWithBinding original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedLetBindingError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "binding"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
+ src/gen-main/haskell/Hydra/Dsl/Error/Core.hs view
@@ -0,0 +1,2305 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.error.core++module Hydra.Dsl.Error.Core where++import qualified Hydra.Core as Core+import qualified Hydra.Error.Core as Core_+import qualified Hydra.Paths as Paths+import qualified Hydra.Phantoms as Phantoms+import qualified Hydra.Variants as Variants+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++constantConditionError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Bool -> Phantoms.TTerm Core_.ConstantConditionError+constantConditionError location value =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "value"),+          Core.fieldTerm = (Phantoms.unTTerm value)}]}))++constantConditionErrorLocation :: Phantoms.TTerm Core_.ConstantConditionError -> Phantoms.TTerm Paths.SubtermPath+constantConditionErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++constantConditionErrorValue :: Phantoms.TTerm Core_.ConstantConditionError -> Phantoms.TTerm Bool+constantConditionErrorValue x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),+        Core.projectionField = (Core.Name "value")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++constantConditionErrorWithLocation :: Phantoms.TTerm Core_.ConstantConditionError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.ConstantConditionError+constantConditionErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "value"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),+              Core.projectionField = (Core.Name "value")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++constantConditionErrorWithValue :: Phantoms.TTerm Core_.ConstantConditionError -> Phantoms.TTerm Bool -> Phantoms.TTerm Core_.ConstantConditionError+constantConditionErrorWithValue original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "value"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++duplicateBindingError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.DuplicateBindingError+duplicateBindingError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++duplicateBindingErrorLocation :: Phantoms.TTerm Core_.DuplicateBindingError -> Phantoms.TTerm Paths.SubtermPath+duplicateBindingErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++duplicateBindingErrorName :: Phantoms.TTerm Core_.DuplicateBindingError -> Phantoms.TTerm Core.Name+duplicateBindingErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++duplicateBindingErrorWithLocation :: Phantoms.TTerm Core_.DuplicateBindingError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.DuplicateBindingError+duplicateBindingErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++duplicateBindingErrorWithName :: Phantoms.TTerm Core_.DuplicateBindingError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.DuplicateBindingError+duplicateBindingErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++duplicateFieldError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.DuplicateFieldError+duplicateFieldError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++duplicateFieldErrorLocation :: Phantoms.TTerm Core_.DuplicateFieldError -> Phantoms.TTerm Paths.SubtermPath+duplicateFieldErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++duplicateFieldErrorName :: Phantoms.TTerm Core_.DuplicateFieldError -> Phantoms.TTerm Core.Name+duplicateFieldErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++duplicateFieldErrorWithLocation :: Phantoms.TTerm Core_.DuplicateFieldError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.DuplicateFieldError+duplicateFieldErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++duplicateFieldErrorWithName :: Phantoms.TTerm Core_.DuplicateFieldError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.DuplicateFieldError+duplicateFieldErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++duplicateRecordTypeFieldNamesError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.DuplicateRecordTypeFieldNamesError+duplicateRecordTypeFieldNamesError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++duplicateRecordTypeFieldNamesErrorLocation :: Phantoms.TTerm Core_.DuplicateRecordTypeFieldNamesError -> Phantoms.TTerm Paths.SubtermPath+duplicateRecordTypeFieldNamesErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++duplicateRecordTypeFieldNamesErrorName :: Phantoms.TTerm Core_.DuplicateRecordTypeFieldNamesError -> Phantoms.TTerm Core.Name+duplicateRecordTypeFieldNamesErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++duplicateRecordTypeFieldNamesErrorWithLocation :: Phantoms.TTerm Core_.DuplicateRecordTypeFieldNamesError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.DuplicateRecordTypeFieldNamesError+duplicateRecordTypeFieldNamesErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++duplicateRecordTypeFieldNamesErrorWithName :: Phantoms.TTerm Core_.DuplicateRecordTypeFieldNamesError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.DuplicateRecordTypeFieldNamesError+duplicateRecordTypeFieldNamesErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++duplicateUnionTypeFieldNamesError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.DuplicateUnionTypeFieldNamesError+duplicateUnionTypeFieldNamesError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++duplicateUnionTypeFieldNamesErrorLocation :: Phantoms.TTerm Core_.DuplicateUnionTypeFieldNamesError -> Phantoms.TTerm Paths.SubtermPath+duplicateUnionTypeFieldNamesErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++duplicateUnionTypeFieldNamesErrorName :: Phantoms.TTerm Core_.DuplicateUnionTypeFieldNamesError -> Phantoms.TTerm Core.Name+duplicateUnionTypeFieldNamesErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++duplicateUnionTypeFieldNamesErrorWithLocation :: Phantoms.TTerm Core_.DuplicateUnionTypeFieldNamesError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.DuplicateUnionTypeFieldNamesError+duplicateUnionTypeFieldNamesErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++duplicateUnionTypeFieldNamesErrorWithName :: Phantoms.TTerm Core_.DuplicateUnionTypeFieldNamesError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.DuplicateUnionTypeFieldNamesError+duplicateUnionTypeFieldNamesErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++emptyCaseStatementError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.EmptyCaseStatementError+emptyCaseStatementError location typeName =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm typeName)}]}))++emptyCaseStatementErrorLocation :: Phantoms.TTerm Core_.EmptyCaseStatementError -> Phantoms.TTerm Paths.SubtermPath+emptyCaseStatementErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++emptyCaseStatementErrorTypeName :: Phantoms.TTerm Core_.EmptyCaseStatementError -> Phantoms.TTerm Core.Name+emptyCaseStatementErrorTypeName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),+        Core.projectionField = (Core.Name "typeName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++emptyCaseStatementErrorWithLocation :: Phantoms.TTerm Core_.EmptyCaseStatementError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.EmptyCaseStatementError+emptyCaseStatementErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),+              Core.projectionField = (Core.Name "typeName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++emptyCaseStatementErrorWithTypeName :: Phantoms.TTerm Core_.EmptyCaseStatementError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.EmptyCaseStatementError+emptyCaseStatementErrorWithTypeName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++emptyLetBindingsError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.EmptyLetBindingsError+emptyLetBindingsError location =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyLetBindingsError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)}]}))++emptyLetBindingsErrorLocation :: Phantoms.TTerm Core_.EmptyLetBindingsError -> Phantoms.TTerm Paths.SubtermPath+emptyLetBindingsErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyLetBindingsError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++emptyLetBindingsErrorWithLocation :: Phantoms.TTerm Core_.EmptyLetBindingsError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.EmptyLetBindingsError+emptyLetBindingsErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyLetBindingsError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++emptyRecordTypeError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.EmptyRecordTypeError+emptyRecordTypeError location =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyRecordTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)}]}))++emptyRecordTypeErrorLocation :: Phantoms.TTerm Core_.EmptyRecordTypeError -> Phantoms.TTerm Paths.SubtermPath+emptyRecordTypeErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyRecordTypeError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++emptyRecordTypeErrorWithLocation :: Phantoms.TTerm Core_.EmptyRecordTypeError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.EmptyRecordTypeError+emptyRecordTypeErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyRecordTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++emptyTermAnnotationError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.EmptyTermAnnotationError+emptyTermAnnotationError location =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTermAnnotationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)}]}))++emptyTermAnnotationErrorLocation :: Phantoms.TTerm Core_.EmptyTermAnnotationError -> Phantoms.TTerm Paths.SubtermPath+emptyTermAnnotationErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyTermAnnotationError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++emptyTermAnnotationErrorWithLocation :: Phantoms.TTerm Core_.EmptyTermAnnotationError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.EmptyTermAnnotationError+emptyTermAnnotationErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTermAnnotationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++emptyTypeAnnotationError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.EmptyTypeAnnotationError+emptyTypeAnnotationError location =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTypeAnnotationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)}]}))++emptyTypeAnnotationErrorLocation :: Phantoms.TTerm Core_.EmptyTypeAnnotationError -> Phantoms.TTerm Paths.SubtermPath+emptyTypeAnnotationErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyTypeAnnotationError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++emptyTypeAnnotationErrorWithLocation :: Phantoms.TTerm Core_.EmptyTypeAnnotationError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.EmptyTypeAnnotationError+emptyTypeAnnotationErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTypeAnnotationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++emptyTypeNameInTermError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.EmptyTypeNameInTermError+emptyTypeNameInTermError location =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTypeNameInTermError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)}]}))++emptyTypeNameInTermErrorLocation :: Phantoms.TTerm Core_.EmptyTypeNameInTermError -> Phantoms.TTerm Paths.SubtermPath+emptyTypeNameInTermErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyTypeNameInTermError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++emptyTypeNameInTermErrorWithLocation :: Phantoms.TTerm Core_.EmptyTypeNameInTermError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.EmptyTypeNameInTermError+emptyTypeNameInTermErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTypeNameInTermError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++emptyUnionTypeError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.EmptyUnionTypeError+emptyUnionTypeError location =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyUnionTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)}]}))++emptyUnionTypeErrorLocation :: Phantoms.TTerm Core_.EmptyUnionTypeError -> Phantoms.TTerm Paths.SubtermPath+emptyUnionTypeErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.EmptyUnionTypeError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++emptyUnionTypeErrorWithLocation :: Phantoms.TTerm Core_.EmptyUnionTypeError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.EmptyUnionTypeError+emptyUnionTypeErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyUnionTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++invalidForallParameterNameError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.InvalidForallParameterNameError+invalidForallParameterNameError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++invalidForallParameterNameErrorLocation :: Phantoms.TTerm Core_.InvalidForallParameterNameError -> Phantoms.TTerm Paths.SubtermPath+invalidForallParameterNameErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++invalidForallParameterNameErrorName :: Phantoms.TTerm Core_.InvalidForallParameterNameError -> Phantoms.TTerm Core.Name+invalidForallParameterNameErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++invalidForallParameterNameErrorWithLocation :: Phantoms.TTerm Core_.InvalidForallParameterNameError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.InvalidForallParameterNameError+invalidForallParameterNameErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++invalidForallParameterNameErrorWithName :: Phantoms.TTerm Core_.InvalidForallParameterNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.InvalidForallParameterNameError+invalidForallParameterNameErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++invalidLambdaParameterNameError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.InvalidLambdaParameterNameError+invalidLambdaParameterNameError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++invalidLambdaParameterNameErrorLocation :: Phantoms.TTerm Core_.InvalidLambdaParameterNameError -> Phantoms.TTerm Paths.SubtermPath+invalidLambdaParameterNameErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++invalidLambdaParameterNameErrorName :: Phantoms.TTerm Core_.InvalidLambdaParameterNameError -> Phantoms.TTerm Core.Name+invalidLambdaParameterNameErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++invalidLambdaParameterNameErrorWithLocation :: Phantoms.TTerm Core_.InvalidLambdaParameterNameError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.InvalidLambdaParameterNameError+invalidLambdaParameterNameErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++invalidLambdaParameterNameErrorWithName :: Phantoms.TTerm Core_.InvalidLambdaParameterNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.InvalidLambdaParameterNameError+invalidLambdaParameterNameErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++invalidLetBindingNameError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.InvalidLetBindingNameError+invalidLetBindingNameError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++invalidLetBindingNameErrorLocation :: Phantoms.TTerm Core_.InvalidLetBindingNameError -> Phantoms.TTerm Paths.SubtermPath+invalidLetBindingNameErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++invalidLetBindingNameErrorName :: Phantoms.TTerm Core_.InvalidLetBindingNameError -> Phantoms.TTerm Core.Name+invalidLetBindingNameErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++invalidLetBindingNameErrorWithLocation :: Phantoms.TTerm Core_.InvalidLetBindingNameError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.InvalidLetBindingNameError+invalidLetBindingNameErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++invalidLetBindingNameErrorWithName :: Phantoms.TTerm Core_.InvalidLetBindingNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.InvalidLetBindingNameError+invalidLetBindingNameErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++invalidTermErrorConstantCondition :: Phantoms.TTerm Core_.ConstantConditionError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorConstantCondition x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "constantCondition"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorDuplicateBinding :: Phantoms.TTerm Core_.DuplicateBindingError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorDuplicateBinding x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "duplicateBinding"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorDuplicateField :: Phantoms.TTerm Core_.DuplicateFieldError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorDuplicateField x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "duplicateField"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorEmptyCaseStatement :: Phantoms.TTerm Core_.EmptyCaseStatementError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorEmptyCaseStatement x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "emptyCaseStatement"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorEmptyLetBindings :: Phantoms.TTerm Core_.EmptyLetBindingsError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorEmptyLetBindings x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "emptyLetBindings"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorEmptyTermAnnotation :: Phantoms.TTerm Core_.EmptyTermAnnotationError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorEmptyTermAnnotation x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "emptyTermAnnotation"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorEmptyTypeNameInTerm :: Phantoms.TTerm Core_.EmptyTypeNameInTermError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorEmptyTypeNameInTerm x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "emptyTypeNameInTerm"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorInvalidLambdaParameterName :: Phantoms.TTerm Core_.InvalidLambdaParameterNameError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorInvalidLambdaParameterName x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "invalidLambdaParameterName"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorInvalidLetBindingName :: Phantoms.TTerm Core_.InvalidLetBindingNameError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorInvalidLetBindingName x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "invalidLetBindingName"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorInvalidTypeLambdaParameterName :: Phantoms.TTerm Core_.InvalidTypeLambdaParameterNameError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorInvalidTypeLambdaParameterName x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "invalidTypeLambdaParameterName"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorNestedTermAnnotation :: Phantoms.TTerm Core_.NestedTermAnnotationError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorNestedTermAnnotation x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "nestedTermAnnotation"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorRedundantWrapUnwrap :: Phantoms.TTerm Core_.RedundantWrapUnwrapError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorRedundantWrapUnwrap x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "redundantWrapUnwrap"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorSelfApplication :: Phantoms.TTerm Core_.SelfApplicationError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorSelfApplication x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "selfApplication"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorTermVariableShadowing :: Phantoms.TTerm Core_.TermVariableShadowingError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorTermVariableShadowing x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "termVariableShadowing"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorTypeVariableShadowingInTypeLambda :: Phantoms.TTerm Core_.TypeVariableShadowingInTypeLambdaError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorTypeVariableShadowingInTypeLambda x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typeVariableShadowingInTypeLambda"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorUndefinedTermVariable :: Phantoms.TTerm Core_.UndefinedTermVariableError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorUndefinedTermVariable x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "undefinedTermVariable"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorUndefinedTypeVariableInBindingType :: Phantoms.TTerm Core_.UndefinedTypeVariableInBindingTypeError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorUndefinedTypeVariableInBindingType x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "undefinedTypeVariableInBindingType"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorUndefinedTypeVariableInLambdaDomain :: Phantoms.TTerm Core_.UndefinedTypeVariableInLambdaDomainError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorUndefinedTypeVariableInLambdaDomain x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "undefinedTypeVariableInLambdaDomain"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorUndefinedTypeVariableInTypeApplication :: Phantoms.TTerm Core_.UndefinedTypeVariableInTypeApplicationError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorUndefinedTypeVariableInTypeApplication x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "undefinedTypeVariableInTypeApplication"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorUnknownPrimitiveName :: Phantoms.TTerm Core_.UnknownPrimitiveNameError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorUnknownPrimitiveName x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unknownPrimitiveName"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorUnnecessaryIdentityApplication :: Phantoms.TTerm Core_.UnnecessaryIdentityApplicationError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorUnnecessaryIdentityApplication x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unnecessaryIdentityApplication"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTermErrorUntypedTermVariable :: Phantoms.TTerm Core_.UntypedTermVariableError -> Phantoms.TTerm Core_.InvalidTermError+invalidTermErrorUntypedTermVariable x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "untypedTermVariable"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeErrorDuplicateRecordTypeFieldNames :: Phantoms.TTerm Core_.DuplicateRecordTypeFieldNamesError -> Phantoms.TTerm Core_.InvalidTypeError+invalidTypeErrorDuplicateRecordTypeFieldNames x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "duplicateRecordTypeFieldNames"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeErrorDuplicateUnionTypeFieldNames :: Phantoms.TTerm Core_.DuplicateUnionTypeFieldNamesError -> Phantoms.TTerm Core_.InvalidTypeError+invalidTypeErrorDuplicateUnionTypeFieldNames x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "duplicateUnionTypeFieldNames"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeErrorEmptyRecordType :: Phantoms.TTerm Core_.EmptyRecordTypeError -> Phantoms.TTerm Core_.InvalidTypeError+invalidTypeErrorEmptyRecordType x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "emptyRecordType"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeErrorEmptyTypeAnnotation :: Phantoms.TTerm Core_.EmptyTypeAnnotationError -> Phantoms.TTerm Core_.InvalidTypeError+invalidTypeErrorEmptyTypeAnnotation x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "emptyTypeAnnotation"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeErrorEmptyUnionType :: Phantoms.TTerm Core_.EmptyUnionTypeError -> Phantoms.TTerm Core_.InvalidTypeError+invalidTypeErrorEmptyUnionType x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "emptyUnionType"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeErrorInvalidForallParameterName :: Phantoms.TTerm Core_.InvalidForallParameterNameError -> Phantoms.TTerm Core_.InvalidTypeError+invalidTypeErrorInvalidForallParameterName x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "invalidForallParameterName"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeErrorInvalidTypeSchemeVariableName :: Phantoms.TTerm Core_.InvalidTypeSchemeVariableNameError -> Phantoms.TTerm Core_.InvalidTypeError+invalidTypeErrorInvalidTypeSchemeVariableName x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "invalidTypeSchemeVariableName"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeErrorNestedTypeAnnotation :: Phantoms.TTerm Core_.NestedTypeAnnotationError -> Phantoms.TTerm Core_.InvalidTypeError+invalidTypeErrorNestedTypeAnnotation x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "nestedTypeAnnotation"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeErrorNonComparableMapKeyType :: Phantoms.TTerm Core_.NonComparableMapKeyTypeError -> Phantoms.TTerm Core_.InvalidTypeError+invalidTypeErrorNonComparableMapKeyType x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "nonComparableMapKeyType"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeErrorNonComparableSetElementType :: Phantoms.TTerm Core_.NonComparableSetElementTypeError -> Phantoms.TTerm Core_.InvalidTypeError+invalidTypeErrorNonComparableSetElementType x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "nonComparableSetElementType"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeErrorSingleVariantUnion :: Phantoms.TTerm Core_.SingleVariantUnionError -> Phantoms.TTerm Core_.InvalidTypeError+invalidTypeErrorSingleVariantUnion x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "singleVariantUnion"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeErrorTypeVariableShadowingInForall :: Phantoms.TTerm Core_.TypeVariableShadowingInForallError -> Phantoms.TTerm Core_.InvalidTypeError+invalidTypeErrorTypeVariableShadowingInForall x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typeVariableShadowingInForall"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeErrorUndefinedTypeVariable :: Phantoms.TTerm Core_.UndefinedTypeVariableError -> Phantoms.TTerm Core_.InvalidTypeError+invalidTypeErrorUndefinedTypeVariable x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "undefinedTypeVariable"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeErrorVoidInNonBottomPosition :: Phantoms.TTerm Core_.VoidInNonBottomPositionError -> Phantoms.TTerm Core_.InvalidTypeError+invalidTypeErrorVoidInNonBottomPosition x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "voidInNonBottomPosition"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidTypeLambdaParameterNameError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.InvalidTypeLambdaParameterNameError+invalidTypeLambdaParameterNameError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++invalidTypeLambdaParameterNameErrorLocation :: Phantoms.TTerm Core_.InvalidTypeLambdaParameterNameError -> Phantoms.TTerm Paths.SubtermPath+invalidTypeLambdaParameterNameErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++invalidTypeLambdaParameterNameErrorName :: Phantoms.TTerm Core_.InvalidTypeLambdaParameterNameError -> Phantoms.TTerm Core.Name+invalidTypeLambdaParameterNameErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++invalidTypeLambdaParameterNameErrorWithLocation :: Phantoms.TTerm Core_.InvalidTypeLambdaParameterNameError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.InvalidTypeLambdaParameterNameError+invalidTypeLambdaParameterNameErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++invalidTypeLambdaParameterNameErrorWithName :: Phantoms.TTerm Core_.InvalidTypeLambdaParameterNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.InvalidTypeLambdaParameterNameError+invalidTypeLambdaParameterNameErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++invalidTypeSchemeVariableNameError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.InvalidTypeSchemeVariableNameError+invalidTypeSchemeVariableNameError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++invalidTypeSchemeVariableNameErrorLocation :: Phantoms.TTerm Core_.InvalidTypeSchemeVariableNameError -> Phantoms.TTerm Paths.SubtermPath+invalidTypeSchemeVariableNameErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++invalidTypeSchemeVariableNameErrorName :: Phantoms.TTerm Core_.InvalidTypeSchemeVariableNameError -> Phantoms.TTerm Core.Name+invalidTypeSchemeVariableNameErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++invalidTypeSchemeVariableNameErrorWithLocation :: Phantoms.TTerm Core_.InvalidTypeSchemeVariableNameError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.InvalidTypeSchemeVariableNameError+invalidTypeSchemeVariableNameErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++invalidTypeSchemeVariableNameErrorWithName :: Phantoms.TTerm Core_.InvalidTypeSchemeVariableNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.InvalidTypeSchemeVariableNameError+invalidTypeSchemeVariableNameErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++nestedTermAnnotationError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.NestedTermAnnotationError+nestedTermAnnotationError location =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.NestedTermAnnotationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)}]}))++nestedTermAnnotationErrorLocation :: Phantoms.TTerm Core_.NestedTermAnnotationError -> Phantoms.TTerm Paths.SubtermPath+nestedTermAnnotationErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.NestedTermAnnotationError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++nestedTermAnnotationErrorWithLocation :: Phantoms.TTerm Core_.NestedTermAnnotationError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.NestedTermAnnotationError+nestedTermAnnotationErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.NestedTermAnnotationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++nestedTypeAnnotationError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.NestedTypeAnnotationError+nestedTypeAnnotationError location =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.NestedTypeAnnotationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)}]}))++nestedTypeAnnotationErrorLocation :: Phantoms.TTerm Core_.NestedTypeAnnotationError -> Phantoms.TTerm Paths.SubtermPath+nestedTypeAnnotationErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.NestedTypeAnnotationError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++nestedTypeAnnotationErrorWithLocation :: Phantoms.TTerm Core_.NestedTypeAnnotationError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.NestedTypeAnnotationError+nestedTypeAnnotationErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.NestedTypeAnnotationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++nonComparableMapKeyTypeError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core_.NonComparableMapKeyTypeError+nonComparableMapKeyTypeError location keyType =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "keyType"),+          Core.fieldTerm = (Phantoms.unTTerm keyType)}]}))++nonComparableMapKeyTypeErrorKeyType :: Phantoms.TTerm Core_.NonComparableMapKeyTypeError -> Phantoms.TTerm Core.Type+nonComparableMapKeyTypeErrorKeyType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),+        Core.projectionField = (Core.Name "keyType")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++nonComparableMapKeyTypeErrorLocation :: Phantoms.TTerm Core_.NonComparableMapKeyTypeError -> Phantoms.TTerm Paths.SubtermPath+nonComparableMapKeyTypeErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++nonComparableMapKeyTypeErrorWithKeyType :: Phantoms.TTerm Core_.NonComparableMapKeyTypeError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core_.NonComparableMapKeyTypeError+nonComparableMapKeyTypeErrorWithKeyType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "keyType"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++nonComparableMapKeyTypeErrorWithLocation :: Phantoms.TTerm Core_.NonComparableMapKeyTypeError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.NonComparableMapKeyTypeError+nonComparableMapKeyTypeErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "keyType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),+              Core.projectionField = (Core.Name "keyType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++nonComparableSetElementTypeError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core_.NonComparableSetElementTypeError+nonComparableSetElementTypeError location elementType =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "elementType"),+          Core.fieldTerm = (Phantoms.unTTerm elementType)}]}))++nonComparableSetElementTypeErrorElementType :: Phantoms.TTerm Core_.NonComparableSetElementTypeError -> Phantoms.TTerm Core.Type+nonComparableSetElementTypeErrorElementType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),+        Core.projectionField = (Core.Name "elementType")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++nonComparableSetElementTypeErrorLocation :: Phantoms.TTerm Core_.NonComparableSetElementTypeError -> Phantoms.TTerm Paths.SubtermPath+nonComparableSetElementTypeErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++nonComparableSetElementTypeErrorWithElementType :: Phantoms.TTerm Core_.NonComparableSetElementTypeError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core_.NonComparableSetElementTypeError+nonComparableSetElementTypeErrorWithElementType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "elementType"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++nonComparableSetElementTypeErrorWithLocation :: Phantoms.TTerm Core_.NonComparableSetElementTypeError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.NonComparableSetElementTypeError+nonComparableSetElementTypeErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "elementType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),+              Core.projectionField = (Core.Name "elementType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++redundantWrapUnwrapError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.RedundantWrapUnwrapError+redundantWrapUnwrapError location typeName =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm typeName)}]}))++redundantWrapUnwrapErrorLocation :: Phantoms.TTerm Core_.RedundantWrapUnwrapError -> Phantoms.TTerm Paths.SubtermPath+redundantWrapUnwrapErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++redundantWrapUnwrapErrorTypeName :: Phantoms.TTerm Core_.RedundantWrapUnwrapError -> Phantoms.TTerm Core.Name+redundantWrapUnwrapErrorTypeName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),+        Core.projectionField = (Core.Name "typeName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++redundantWrapUnwrapErrorWithLocation :: Phantoms.TTerm Core_.RedundantWrapUnwrapError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.RedundantWrapUnwrapError+redundantWrapUnwrapErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),+              Core.projectionField = (Core.Name "typeName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++redundantWrapUnwrapErrorWithTypeName :: Phantoms.TTerm Core_.RedundantWrapUnwrapError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.RedundantWrapUnwrapError+redundantWrapUnwrapErrorWithTypeName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++selfApplicationError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.SelfApplicationError+selfApplicationError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++selfApplicationErrorLocation :: Phantoms.TTerm Core_.SelfApplicationError -> Phantoms.TTerm Paths.SubtermPath+selfApplicationErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++selfApplicationErrorName :: Phantoms.TTerm Core_.SelfApplicationError -> Phantoms.TTerm Core.Name+selfApplicationErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++selfApplicationErrorWithLocation :: Phantoms.TTerm Core_.SelfApplicationError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.SelfApplicationError+selfApplicationErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++selfApplicationErrorWithName :: Phantoms.TTerm Core_.SelfApplicationError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.SelfApplicationError+selfApplicationErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++singleVariantUnionError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.SingleVariantUnionError+singleVariantUnionError location fieldName =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "fieldName"),+          Core.fieldTerm = (Phantoms.unTTerm fieldName)}]}))++singleVariantUnionErrorFieldName :: Phantoms.TTerm Core_.SingleVariantUnionError -> Phantoms.TTerm Core.Name+singleVariantUnionErrorFieldName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),+        Core.projectionField = (Core.Name "fieldName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++singleVariantUnionErrorLocation :: Phantoms.TTerm Core_.SingleVariantUnionError -> Phantoms.TTerm Paths.SubtermPath+singleVariantUnionErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++singleVariantUnionErrorWithFieldName :: Phantoms.TTerm Core_.SingleVariantUnionError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.SingleVariantUnionError+singleVariantUnionErrorWithFieldName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fieldName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++singleVariantUnionErrorWithLocation :: Phantoms.TTerm Core_.SingleVariantUnionError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.SingleVariantUnionError+singleVariantUnionErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "fieldName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),+              Core.projectionField = (Core.Name "fieldName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++termVariableShadowingError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.TermVariableShadowingError+termVariableShadowingError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++termVariableShadowingErrorLocation :: Phantoms.TTerm Core_.TermVariableShadowingError -> Phantoms.TTerm Paths.SubtermPath+termVariableShadowingErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++termVariableShadowingErrorName :: Phantoms.TTerm Core_.TermVariableShadowingError -> Phantoms.TTerm Core.Name+termVariableShadowingErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++termVariableShadowingErrorWithLocation :: Phantoms.TTerm Core_.TermVariableShadowingError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.TermVariableShadowingError+termVariableShadowingErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++termVariableShadowingErrorWithName :: Phantoms.TTerm Core_.TermVariableShadowingError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.TermVariableShadowingError+termVariableShadowingErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeVariableShadowingInForallError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.TypeVariableShadowingInForallError+typeVariableShadowingInForallError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++typeVariableShadowingInForallErrorLocation :: Phantoms.TTerm Core_.TypeVariableShadowingInForallError -> Phantoms.TTerm Paths.SubtermPath+typeVariableShadowingInForallErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeVariableShadowingInForallErrorName :: Phantoms.TTerm Core_.TypeVariableShadowingInForallError -> Phantoms.TTerm Core.Name+typeVariableShadowingInForallErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeVariableShadowingInForallErrorWithLocation :: Phantoms.TTerm Core_.TypeVariableShadowingInForallError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.TypeVariableShadowingInForallError+typeVariableShadowingInForallErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeVariableShadowingInForallErrorWithName :: Phantoms.TTerm Core_.TypeVariableShadowingInForallError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.TypeVariableShadowingInForallError+typeVariableShadowingInForallErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeVariableShadowingInTypeLambdaError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.TypeVariableShadowingInTypeLambdaError+typeVariableShadowingInTypeLambdaError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++typeVariableShadowingInTypeLambdaErrorLocation :: Phantoms.TTerm Core_.TypeVariableShadowingInTypeLambdaError -> Phantoms.TTerm Paths.SubtermPath+typeVariableShadowingInTypeLambdaErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeVariableShadowingInTypeLambdaErrorName :: Phantoms.TTerm Core_.TypeVariableShadowingInTypeLambdaError -> Phantoms.TTerm Core.Name+typeVariableShadowingInTypeLambdaErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeVariableShadowingInTypeLambdaErrorWithLocation :: Phantoms.TTerm Core_.TypeVariableShadowingInTypeLambdaError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.TypeVariableShadowingInTypeLambdaError+typeVariableShadowingInTypeLambdaErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeVariableShadowingInTypeLambdaErrorWithName :: Phantoms.TTerm Core_.TypeVariableShadowingInTypeLambdaError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.TypeVariableShadowingInTypeLambdaError+typeVariableShadowingInTypeLambdaErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++undefinedFieldError :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UndefinedFieldError+undefinedFieldError fieldName typeName =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "fieldName"),+          Core.fieldTerm = (Phantoms.unTTerm fieldName)},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm typeName)}]}))++undefinedFieldErrorFieldName :: Phantoms.TTerm Core_.UndefinedFieldError -> Phantoms.TTerm Core.Name+undefinedFieldErrorFieldName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),+        Core.projectionField = (Core.Name "fieldName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++undefinedFieldErrorTypeName :: Phantoms.TTerm Core_.UndefinedFieldError -> Phantoms.TTerm Core.Name+undefinedFieldErrorTypeName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),+        Core.projectionField = (Core.Name "typeName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++undefinedFieldErrorWithFieldName :: Phantoms.TTerm Core_.UndefinedFieldError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UndefinedFieldError+undefinedFieldErrorWithFieldName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "fieldName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),+              Core.projectionField = (Core.Name "typeName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++undefinedFieldErrorWithTypeName :: Phantoms.TTerm Core_.UndefinedFieldError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UndefinedFieldError+undefinedFieldErrorWithTypeName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "fieldName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),+              Core.projectionField = (Core.Name "fieldName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++undefinedTermVariableError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UndefinedTermVariableError+undefinedTermVariableError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++undefinedTermVariableErrorLocation :: Phantoms.TTerm Core_.UndefinedTermVariableError -> Phantoms.TTerm Paths.SubtermPath+undefinedTermVariableErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++undefinedTermVariableErrorName :: Phantoms.TTerm Core_.UndefinedTermVariableError -> Phantoms.TTerm Core.Name+undefinedTermVariableErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++undefinedTermVariableErrorWithLocation :: Phantoms.TTerm Core_.UndefinedTermVariableError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.UndefinedTermVariableError+undefinedTermVariableErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++undefinedTermVariableErrorWithName :: Phantoms.TTerm Core_.UndefinedTermVariableError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UndefinedTermVariableError+undefinedTermVariableErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++undefinedTypeVariableError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UndefinedTypeVariableError+undefinedTypeVariableError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++undefinedTypeVariableErrorLocation :: Phantoms.TTerm Core_.UndefinedTypeVariableError -> Phantoms.TTerm Paths.SubtermPath+undefinedTypeVariableErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++undefinedTypeVariableErrorName :: Phantoms.TTerm Core_.UndefinedTypeVariableError -> Phantoms.TTerm Core.Name+undefinedTypeVariableErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++undefinedTypeVariableErrorWithLocation :: Phantoms.TTerm Core_.UndefinedTypeVariableError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.UndefinedTypeVariableError+undefinedTypeVariableErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++undefinedTypeVariableErrorWithName :: Phantoms.TTerm Core_.UndefinedTypeVariableError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UndefinedTypeVariableError+undefinedTypeVariableErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++undefinedTypeVariableInBindingTypeError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UndefinedTypeVariableInBindingTypeError+undefinedTypeVariableInBindingTypeError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++undefinedTypeVariableInBindingTypeErrorLocation :: Phantoms.TTerm Core_.UndefinedTypeVariableInBindingTypeError -> Phantoms.TTerm Paths.SubtermPath+undefinedTypeVariableInBindingTypeErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++undefinedTypeVariableInBindingTypeErrorName :: Phantoms.TTerm Core_.UndefinedTypeVariableInBindingTypeError -> Phantoms.TTerm Core.Name+undefinedTypeVariableInBindingTypeErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++undefinedTypeVariableInBindingTypeErrorWithLocation :: Phantoms.TTerm Core_.UndefinedTypeVariableInBindingTypeError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.UndefinedTypeVariableInBindingTypeError+undefinedTypeVariableInBindingTypeErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++undefinedTypeVariableInBindingTypeErrorWithName :: Phantoms.TTerm Core_.UndefinedTypeVariableInBindingTypeError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UndefinedTypeVariableInBindingTypeError+undefinedTypeVariableInBindingTypeErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++undefinedTypeVariableInLambdaDomainError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UndefinedTypeVariableInLambdaDomainError+undefinedTypeVariableInLambdaDomainError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++undefinedTypeVariableInLambdaDomainErrorLocation :: Phantoms.TTerm Core_.UndefinedTypeVariableInLambdaDomainError -> Phantoms.TTerm Paths.SubtermPath+undefinedTypeVariableInLambdaDomainErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++undefinedTypeVariableInLambdaDomainErrorName :: Phantoms.TTerm Core_.UndefinedTypeVariableInLambdaDomainError -> Phantoms.TTerm Core.Name+undefinedTypeVariableInLambdaDomainErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++undefinedTypeVariableInLambdaDomainErrorWithLocation :: Phantoms.TTerm Core_.UndefinedTypeVariableInLambdaDomainError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.UndefinedTypeVariableInLambdaDomainError+undefinedTypeVariableInLambdaDomainErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++undefinedTypeVariableInLambdaDomainErrorWithName :: Phantoms.TTerm Core_.UndefinedTypeVariableInLambdaDomainError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UndefinedTypeVariableInLambdaDomainError+undefinedTypeVariableInLambdaDomainErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++undefinedTypeVariableInTypeApplicationError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UndefinedTypeVariableInTypeApplicationError+undefinedTypeVariableInTypeApplicationError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++undefinedTypeVariableInTypeApplicationErrorLocation :: Phantoms.TTerm Core_.UndefinedTypeVariableInTypeApplicationError -> Phantoms.TTerm Paths.SubtermPath+undefinedTypeVariableInTypeApplicationErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++undefinedTypeVariableInTypeApplicationErrorName :: Phantoms.TTerm Core_.UndefinedTypeVariableInTypeApplicationError -> Phantoms.TTerm Core.Name+undefinedTypeVariableInTypeApplicationErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++undefinedTypeVariableInTypeApplicationErrorWithLocation :: Phantoms.TTerm Core_.UndefinedTypeVariableInTypeApplicationError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.UndefinedTypeVariableInTypeApplicationError+undefinedTypeVariableInTypeApplicationErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++undefinedTypeVariableInTypeApplicationErrorWithName :: Phantoms.TTerm Core_.UndefinedTypeVariableInTypeApplicationError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UndefinedTypeVariableInTypeApplicationError+undefinedTypeVariableInTypeApplicationErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++unexpectedTermVariantError :: Phantoms.TTerm Variants.TermVariant -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core_.UnexpectedTermVariantError+unexpectedTermVariantError expectedVariant actualTerm =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "expectedVariant"),+          Core.fieldTerm = (Phantoms.unTTerm expectedVariant)},+        Core.Field {+          Core.fieldName = (Core.Name "actualTerm"),+          Core.fieldTerm = (Phantoms.unTTerm actualTerm)}]}))++unexpectedTermVariantErrorActualTerm :: Phantoms.TTerm Core_.UnexpectedTermVariantError -> Phantoms.TTerm Core.Term+unexpectedTermVariantErrorActualTerm x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),+        Core.projectionField = (Core.Name "actualTerm")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unexpectedTermVariantErrorExpectedVariant :: Phantoms.TTerm Core_.UnexpectedTermVariantError -> Phantoms.TTerm Variants.TermVariant+unexpectedTermVariantErrorExpectedVariant x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),+        Core.projectionField = (Core.Name "expectedVariant")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unexpectedTermVariantErrorWithActualTerm :: Phantoms.TTerm Core_.UnexpectedTermVariantError -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core_.UnexpectedTermVariantError+unexpectedTermVariantErrorWithActualTerm original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "expectedVariant"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),+              Core.projectionField = (Core.Name "expectedVariant")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "actualTerm"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++unexpectedTermVariantErrorWithExpectedVariant :: Phantoms.TTerm Core_.UnexpectedTermVariantError -> Phantoms.TTerm Variants.TermVariant -> Phantoms.TTerm Core_.UnexpectedTermVariantError+unexpectedTermVariantErrorWithExpectedVariant original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "expectedVariant"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "actualTerm"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),+              Core.projectionField = (Core.Name "actualTerm")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++unexpectedTypeVariantError :: Phantoms.TTerm Variants.TypeVariant -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core_.UnexpectedTypeVariantError+unexpectedTypeVariantError expectedVariant actualType =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "expectedVariant"),+          Core.fieldTerm = (Phantoms.unTTerm expectedVariant)},+        Core.Field {+          Core.fieldName = (Core.Name "actualType"),+          Core.fieldTerm = (Phantoms.unTTerm actualType)}]}))++unexpectedTypeVariantErrorActualType :: Phantoms.TTerm Core_.UnexpectedTypeVariantError -> Phantoms.TTerm Core.Type+unexpectedTypeVariantErrorActualType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),+        Core.projectionField = (Core.Name "actualType")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unexpectedTypeVariantErrorExpectedVariant :: Phantoms.TTerm Core_.UnexpectedTypeVariantError -> Phantoms.TTerm Variants.TypeVariant+unexpectedTypeVariantErrorExpectedVariant x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),+        Core.projectionField = (Core.Name "expectedVariant")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unexpectedTypeVariantErrorWithActualType :: Phantoms.TTerm Core_.UnexpectedTypeVariantError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core_.UnexpectedTypeVariantError+unexpectedTypeVariantErrorWithActualType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "expectedVariant"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),+              Core.projectionField = (Core.Name "expectedVariant")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "actualType"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++unexpectedTypeVariantErrorWithExpectedVariant :: Phantoms.TTerm Core_.UnexpectedTypeVariantError -> Phantoms.TTerm Variants.TypeVariant -> Phantoms.TTerm Core_.UnexpectedTypeVariantError+unexpectedTypeVariantErrorWithExpectedVariant original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "expectedVariant"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "actualType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),+              Core.projectionField = (Core.Name "actualType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++unknownPrimitiveNameError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UnknownPrimitiveNameError+unknownPrimitiveNameError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++unknownPrimitiveNameErrorLocation :: Phantoms.TTerm Core_.UnknownPrimitiveNameError -> Phantoms.TTerm Paths.SubtermPath+unknownPrimitiveNameErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unknownPrimitiveNameErrorName :: Phantoms.TTerm Core_.UnknownPrimitiveNameError -> Phantoms.TTerm Core.Name+unknownPrimitiveNameErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unknownPrimitiveNameErrorWithLocation :: Phantoms.TTerm Core_.UnknownPrimitiveNameError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.UnknownPrimitiveNameError+unknownPrimitiveNameErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++unknownPrimitiveNameErrorWithName :: Phantoms.TTerm Core_.UnknownPrimitiveNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UnknownPrimitiveNameError+unknownPrimitiveNameErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++unnecessaryIdentityApplicationError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.UnnecessaryIdentityApplicationError+unnecessaryIdentityApplicationError location =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnnecessaryIdentityApplicationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)}]}))++unnecessaryIdentityApplicationErrorLocation :: Phantoms.TTerm Core_.UnnecessaryIdentityApplicationError -> Phantoms.TTerm Paths.SubtermPath+unnecessaryIdentityApplicationErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UnnecessaryIdentityApplicationError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unnecessaryIdentityApplicationErrorWithLocation :: Phantoms.TTerm Core_.UnnecessaryIdentityApplicationError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.UnnecessaryIdentityApplicationError+unnecessaryIdentityApplicationErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnnecessaryIdentityApplicationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++untypedTermVariableError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UntypedTermVariableError+untypedTermVariableError location name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++untypedTermVariableErrorLocation :: Phantoms.TTerm Core_.UntypedTermVariableError -> Phantoms.TTerm Paths.SubtermPath+untypedTermVariableErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++untypedTermVariableErrorName :: Phantoms.TTerm Core_.UntypedTermVariableError -> Phantoms.TTerm Core.Name+untypedTermVariableErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++untypedTermVariableErrorWithLocation :: Phantoms.TTerm Core_.UntypedTermVariableError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.UntypedTermVariableError+untypedTermVariableErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++untypedTermVariableErrorWithName :: Phantoms.TTerm Core_.UntypedTermVariableError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core_.UntypedTermVariableError+untypedTermVariableErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),+              Core.projectionField = (Core.Name "location")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++voidInNonBottomPositionError :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.VoidInNonBottomPositionError+voidInNonBottomPositionError location =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.VoidInNonBottomPositionError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm location)}]}))++voidInNonBottomPositionErrorLocation :: Phantoms.TTerm Core_.VoidInNonBottomPositionError -> Phantoms.TTerm Paths.SubtermPath+voidInNonBottomPositionErrorLocation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.core.VoidInNonBottomPositionError"),+        Core.projectionField = (Core.Name "location")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++voidInNonBottomPositionErrorWithLocation :: Phantoms.TTerm Core_.VoidInNonBottomPositionError -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Core_.VoidInNonBottomPositionError+voidInNonBottomPositionErrorWithLocation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.VoidInNonBottomPositionError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
+ src/gen-main/haskell/Hydra/Dsl/Error/Packaging.hs view
@@ -0,0 +1,440 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.error.packaging++module Hydra.Dsl.Error.Packaging where++import qualified Hydra.Core as Core+import qualified Hydra.Error.Packaging as Packaging+import qualified Hydra.Module as Module+import qualified Hydra.Phantoms as Phantoms+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++conflictingModuleNamespaceError :: Phantoms.TTerm Module.Namespace -> Phantoms.TTerm Module.Namespace -> Phantoms.TTerm Packaging.ConflictingModuleNamespaceError+conflictingModuleNamespaceError first second =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "first"),+          Core.fieldTerm = (Phantoms.unTTerm first)},+        Core.Field {+          Core.fieldName = (Core.Name "second"),+          Core.fieldTerm = (Phantoms.unTTerm second)}]}))++conflictingModuleNamespaceErrorFirst :: Phantoms.TTerm Packaging.ConflictingModuleNamespaceError -> Phantoms.TTerm Module.Namespace+conflictingModuleNamespaceErrorFirst x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),+        Core.projectionField = (Core.Name "first")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++conflictingModuleNamespaceErrorSecond :: Phantoms.TTerm Packaging.ConflictingModuleNamespaceError -> Phantoms.TTerm Module.Namespace+conflictingModuleNamespaceErrorSecond x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),+        Core.projectionField = (Core.Name "second")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++conflictingModuleNamespaceErrorWithFirst :: Phantoms.TTerm Packaging.ConflictingModuleNamespaceError -> Phantoms.TTerm Module.Namespace -> Phantoms.TTerm Packaging.ConflictingModuleNamespaceError+conflictingModuleNamespaceErrorWithFirst original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "first"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "second"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),+              Core.projectionField = (Core.Name "second")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++conflictingModuleNamespaceErrorWithSecond :: Phantoms.TTerm Packaging.ConflictingModuleNamespaceError -> Phantoms.TTerm Module.Namespace -> Phantoms.TTerm Packaging.ConflictingModuleNamespaceError+conflictingModuleNamespaceErrorWithSecond original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "first"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingModuleNamespaceError"),+              Core.projectionField = (Core.Name "first")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "second"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++conflictingVariantNameError :: Phantoms.TTerm Module.Namespace -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Packaging.ConflictingVariantNameError+conflictingVariantNameError namespace typeName variantName conflictingName =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Phantoms.unTTerm namespace)},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm typeName)},+        Core.Field {+          Core.fieldName = (Core.Name "variantName"),+          Core.fieldTerm = (Phantoms.unTTerm variantName)},+        Core.Field {+          Core.fieldName = (Core.Name "conflictingName"),+          Core.fieldTerm = (Phantoms.unTTerm conflictingName)}]}))++conflictingVariantNameErrorConflictingName :: Phantoms.TTerm Packaging.ConflictingVariantNameError -> Phantoms.TTerm Core.Name+conflictingVariantNameErrorConflictingName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+        Core.projectionField = (Core.Name "conflictingName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++conflictingVariantNameErrorNamespace :: Phantoms.TTerm Packaging.ConflictingVariantNameError -> Phantoms.TTerm Module.Namespace+conflictingVariantNameErrorNamespace x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+        Core.projectionField = (Core.Name "namespace")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++conflictingVariantNameErrorTypeName :: Phantoms.TTerm Packaging.ConflictingVariantNameError -> Phantoms.TTerm Core.Name+conflictingVariantNameErrorTypeName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+        Core.projectionField = (Core.Name "typeName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++conflictingVariantNameErrorVariantName :: Phantoms.TTerm Packaging.ConflictingVariantNameError -> Phantoms.TTerm Core.Name+conflictingVariantNameErrorVariantName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+        Core.projectionField = (Core.Name "variantName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++conflictingVariantNameErrorWithConflictingName :: Phantoms.TTerm Packaging.ConflictingVariantNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Packaging.ConflictingVariantNameError+conflictingVariantNameErrorWithConflictingName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+              Core.projectionField = (Core.Name "namespace")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+              Core.projectionField = (Core.Name "typeName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "variantName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+              Core.projectionField = (Core.Name "variantName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "conflictingName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++conflictingVariantNameErrorWithNamespace :: Phantoms.TTerm Packaging.ConflictingVariantNameError -> Phantoms.TTerm Module.Namespace -> Phantoms.TTerm Packaging.ConflictingVariantNameError+conflictingVariantNameErrorWithNamespace original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+              Core.projectionField = (Core.Name "typeName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "variantName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+              Core.projectionField = (Core.Name "variantName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "conflictingName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+              Core.projectionField = (Core.Name "conflictingName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++conflictingVariantNameErrorWithTypeName :: Phantoms.TTerm Packaging.ConflictingVariantNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Packaging.ConflictingVariantNameError+conflictingVariantNameErrorWithTypeName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+              Core.projectionField = (Core.Name "namespace")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "variantName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+              Core.projectionField = (Core.Name "variantName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "conflictingName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+              Core.projectionField = (Core.Name "conflictingName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++conflictingVariantNameErrorWithVariantName :: Phantoms.TTerm Packaging.ConflictingVariantNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Packaging.ConflictingVariantNameError+conflictingVariantNameErrorWithVariantName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+              Core.projectionField = (Core.Name "namespace")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+              Core.projectionField = (Core.Name "typeName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "variantName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "conflictingName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.ConflictingVariantNameError"),+              Core.projectionField = (Core.Name "conflictingName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++definitionNotInModuleNamespaceError :: Phantoms.TTerm Module.Namespace -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Packaging.DefinitionNotInModuleNamespaceError+definitionNotInModuleNamespaceError namespace name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Phantoms.unTTerm namespace)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++definitionNotInModuleNamespaceErrorName :: Phantoms.TTerm Packaging.DefinitionNotInModuleNamespaceError -> Phantoms.TTerm Core.Name+definitionNotInModuleNamespaceErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++definitionNotInModuleNamespaceErrorNamespace :: Phantoms.TTerm Packaging.DefinitionNotInModuleNamespaceError -> Phantoms.TTerm Module.Namespace+definitionNotInModuleNamespaceErrorNamespace x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),+        Core.projectionField = (Core.Name "namespace")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++definitionNotInModuleNamespaceErrorWithName :: Phantoms.TTerm Packaging.DefinitionNotInModuleNamespaceError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Packaging.DefinitionNotInModuleNamespaceError+definitionNotInModuleNamespaceErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),+              Core.projectionField = (Core.Name "namespace")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++definitionNotInModuleNamespaceErrorWithNamespace :: Phantoms.TTerm Packaging.DefinitionNotInModuleNamespaceError -> Phantoms.TTerm Module.Namespace -> Phantoms.TTerm Packaging.DefinitionNotInModuleNamespaceError+definitionNotInModuleNamespaceErrorWithNamespace original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.DefinitionNotInModuleNamespaceError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++duplicateDefinitionNameError :: Phantoms.TTerm Module.Namespace -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Packaging.DuplicateDefinitionNameError+duplicateDefinitionNameError namespace name =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Phantoms.unTTerm namespace)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)}]}))++duplicateDefinitionNameErrorName :: Phantoms.TTerm Packaging.DuplicateDefinitionNameError -> Phantoms.TTerm Core.Name+duplicateDefinitionNameErrorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++duplicateDefinitionNameErrorNamespace :: Phantoms.TTerm Packaging.DuplicateDefinitionNameError -> Phantoms.TTerm Module.Namespace+duplicateDefinitionNameErrorNamespace x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),+        Core.projectionField = (Core.Name "namespace")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++duplicateDefinitionNameErrorWithName :: Phantoms.TTerm Packaging.DuplicateDefinitionNameError -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Packaging.DuplicateDefinitionNameError+duplicateDefinitionNameErrorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),+              Core.projectionField = (Core.Name "namespace")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++duplicateDefinitionNameErrorWithNamespace :: Phantoms.TTerm Packaging.DuplicateDefinitionNameError -> Phantoms.TTerm Module.Namespace -> Phantoms.TTerm Packaging.DuplicateDefinitionNameError+duplicateDefinitionNameErrorWithNamespace original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.error.packaging.DuplicateDefinitionNameError"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++duplicateModuleNamespaceError :: Phantoms.TTerm Module.Namespace -> Phantoms.TTerm Packaging.DuplicateModuleNamespaceError+duplicateModuleNamespaceError namespace =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.DuplicateModuleNamespaceError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Phantoms.unTTerm namespace)}]}))++duplicateModuleNamespaceErrorNamespace :: Phantoms.TTerm Packaging.DuplicateModuleNamespaceError -> Phantoms.TTerm Module.Namespace+duplicateModuleNamespaceErrorNamespace x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.error.packaging.DuplicateModuleNamespaceError"),+        Core.projectionField = (Core.Name "namespace")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++duplicateModuleNamespaceErrorWithNamespace :: Phantoms.TTerm Packaging.DuplicateModuleNamespaceError -> Phantoms.TTerm Module.Namespace -> Phantoms.TTerm Packaging.DuplicateModuleNamespaceError+duplicateModuleNamespaceErrorWithNamespace original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.packaging.DuplicateModuleNamespaceError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++invalidModuleErrorConflictingVariantName :: Phantoms.TTerm Packaging.ConflictingVariantNameError -> Phantoms.TTerm Packaging.InvalidModuleError+invalidModuleErrorConflictingVariantName x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidModuleError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "conflictingVariantName"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidModuleErrorDefinitionNotInModuleNamespace :: Phantoms.TTerm Packaging.DefinitionNotInModuleNamespaceError -> Phantoms.TTerm Packaging.InvalidModuleError+invalidModuleErrorDefinitionNotInModuleNamespace x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidModuleError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "definitionNotInModuleNamespace"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidModuleErrorDuplicateDefinitionName :: Phantoms.TTerm Packaging.DuplicateDefinitionNameError -> Phantoms.TTerm Packaging.InvalidModuleError+invalidModuleErrorDuplicateDefinitionName x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidModuleError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "duplicateDefinitionName"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidPackageErrorConflictingModuleNamespace :: Phantoms.TTerm Packaging.ConflictingModuleNamespaceError -> Phantoms.TTerm Packaging.InvalidPackageError+invalidPackageErrorConflictingModuleNamespace x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidPackageError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "conflictingModuleNamespace"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidPackageErrorDuplicateModuleNamespace :: Phantoms.TTerm Packaging.DuplicateModuleNamespaceError -> Phantoms.TTerm Packaging.InvalidPackageError+invalidPackageErrorDuplicateModuleNamespace x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidPackageError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "duplicateModuleNamespace"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++invalidPackageErrorInvalidModule :: Phantoms.TTerm Packaging.InvalidModuleError -> Phantoms.TTerm Packaging.InvalidPackageError+invalidPackageErrorInvalidModule x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.error.packaging.InvalidPackageError"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "invalidModule"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))
+ src/gen-main/haskell/Hydra/Dsl/Errors.hs view
@@ -0,0 +1,237 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.errors++module Hydra.Dsl.Errors where++import qualified Hydra.Core as Core+import qualified Hydra.Error.Checking as Checking+import qualified Hydra.Error.Core as Core_+import qualified Hydra.Errors as Errors+import qualified Hydra.Phantoms as Phantoms+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++decodingError :: Phantoms.TTerm String -> Phantoms.TTerm Errors.DecodingError+decodingError x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++errorChecking :: Phantoms.TTerm Checking.CheckingError -> Phantoms.TTerm Errors.Error+errorChecking x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "checking"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++errorDecoding :: Phantoms.TTerm Errors.DecodingError -> Phantoms.TTerm Errors.Error+errorDecoding x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "decoding"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++errorDuplicateBinding :: Phantoms.TTerm Core_.DuplicateBindingError -> Phantoms.TTerm Errors.Error+errorDuplicateBinding x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "duplicateBinding"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++errorDuplicateField :: Phantoms.TTerm Core_.DuplicateFieldError -> Phantoms.TTerm Errors.Error+errorDuplicateField x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "duplicateField"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++errorOther :: Phantoms.TTerm Errors.OtherError -> Phantoms.TTerm Errors.Error+errorOther x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "other"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++errorUndefinedField :: Phantoms.TTerm Core_.UndefinedFieldError -> Phantoms.TTerm Errors.Error+errorUndefinedField x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "undefinedField"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++errorUndefinedTermVariable :: Phantoms.TTerm Core_.UndefinedTermVariableError -> Phantoms.TTerm Errors.Error+errorUndefinedTermVariable x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "undefinedTermVariable"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++errorUnexpectedTermVariant :: Phantoms.TTerm Core_.UnexpectedTermVariantError -> Phantoms.TTerm Errors.Error+errorUnexpectedTermVariant x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unexpectedTermVariant"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++errorUnexpectedTypeVariant :: Phantoms.TTerm Core_.UnexpectedTypeVariantError -> Phantoms.TTerm Errors.Error+errorUnexpectedTypeVariant x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unexpectedTypeVariant"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++errorUnification :: Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm Errors.Error+errorUnification x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unification"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++errorUntypedTermVariable :: Phantoms.TTerm Core_.UntypedTermVariableError -> Phantoms.TTerm Errors.Error+errorUntypedTermVariable x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "untypedTermVariable"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++otherError :: Phantoms.TTerm String -> Phantoms.TTerm Errors.OtherError+otherError x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.errors.OtherError"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++unDecodingError :: Phantoms.TTerm Errors.DecodingError -> Phantoms.TTerm String+unDecodingError x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.errors.DecodingError")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unOtherError :: Phantoms.TTerm Errors.OtherError -> Phantoms.TTerm String+unOtherError x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.errors.OtherError")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unificationError :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm String -> Phantoms.TTerm Errors.UnificationError+unificationError leftType rightType message =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.errors.UnificationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "leftType"),+          Core.fieldTerm = (Phantoms.unTTerm leftType)},+        Core.Field {+          Core.fieldName = (Core.Name "rightType"),+          Core.fieldTerm = (Phantoms.unTTerm rightType)},+        Core.Field {+          Core.fieldName = (Core.Name "message"),+          Core.fieldTerm = (Phantoms.unTTerm message)}]}))++unificationErrorLeftType :: Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm Core.Type+unificationErrorLeftType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),+        Core.projectionField = (Core.Name "leftType")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unificationErrorMessage :: Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm String+unificationErrorMessage x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),+        Core.projectionField = (Core.Name "message")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unificationErrorRightType :: Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm Core.Type+unificationErrorRightType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),+        Core.projectionField = (Core.Name "rightType")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unificationErrorWithLeftType :: Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Errors.UnificationError+unificationErrorWithLeftType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.errors.UnificationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "leftType"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "rightType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),+              Core.projectionField = (Core.Name "rightType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "message"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),+              Core.projectionField = (Core.Name "message")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++unificationErrorWithMessage :: Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm String -> Phantoms.TTerm Errors.UnificationError+unificationErrorWithMessage original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.errors.UnificationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "leftType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),+              Core.projectionField = (Core.Name "leftType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rightType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),+              Core.projectionField = (Core.Name "rightType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "message"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++unificationErrorWithRightType :: Phantoms.TTerm Errors.UnificationError -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Errors.UnificationError+unificationErrorWithRightType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.errors.UnificationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "leftType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),+              Core.projectionField = (Core.Name "leftType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rightType"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "message"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.errors.UnificationError"),+              Core.projectionField = (Core.Name "message")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
+ src/gen-main/haskell/Hydra/Dsl/Ext/Haskell/Syntax.hs view
@@ -0,0 +1,3759 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.ext.haskell.syntax++module Hydra.Dsl.Ext.Haskell.Syntax where++import qualified Hydra.Core as Core+import qualified Hydra.Ext.Haskell.Syntax as Syntax+import qualified Hydra.Phantoms as Phantoms+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++alternative :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.CaseRhs -> Phantoms.TTerm (Maybe Syntax.LocalBindings) -> Phantoms.TTerm Syntax.Alternative+alternative pattern rhs binds =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Alternative"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "pattern"),+          Core.fieldTerm = (Phantoms.unTTerm pattern)},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Phantoms.unTTerm rhs)},+        Core.Field {+          Core.fieldName = (Core.Name "binds"),+          Core.fieldTerm = (Phantoms.unTTerm binds)}]}))++alternativeBinds :: Phantoms.TTerm Syntax.Alternative -> Phantoms.TTerm (Maybe Syntax.LocalBindings)+alternativeBinds x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Alternative"),+        Core.projectionField = (Core.Name "binds")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++alternativePattern :: Phantoms.TTerm Syntax.Alternative -> Phantoms.TTerm Syntax.Pattern+alternativePattern x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Alternative"),+        Core.projectionField = (Core.Name "pattern")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++alternativeRhs :: Phantoms.TTerm Syntax.Alternative -> Phantoms.TTerm Syntax.CaseRhs+alternativeRhs x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Alternative"),+        Core.projectionField = (Core.Name "rhs")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++alternativeWithBinds :: Phantoms.TTerm Syntax.Alternative -> Phantoms.TTerm (Maybe Syntax.LocalBindings) -> Phantoms.TTerm Syntax.Alternative+alternativeWithBinds original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Alternative"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "pattern"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Alternative"),+              Core.projectionField = (Core.Name "pattern")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Alternative"),+              Core.projectionField = (Core.Name "rhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "binds"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++alternativeWithPattern :: Phantoms.TTerm Syntax.Alternative -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Alternative+alternativeWithPattern original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Alternative"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "pattern"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Alternative"),+              Core.projectionField = (Core.Name "rhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "binds"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Alternative"),+              Core.projectionField = (Core.Name "binds")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++alternativeWithRhs :: Phantoms.TTerm Syntax.Alternative -> Phantoms.TTerm Syntax.CaseRhs -> Phantoms.TTerm Syntax.Alternative+alternativeWithRhs original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Alternative"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "pattern"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Alternative"),+              Core.projectionField = (Core.Name "pattern")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "binds"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Alternative"),+              Core.projectionField = (Core.Name "binds")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++applicationDeclarationHead :: Phantoms.TTerm Syntax.DeclarationHead -> Phantoms.TTerm Syntax.Variable -> Phantoms.TTerm Syntax.ApplicationDeclarationHead+applicationDeclarationHead function operand =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationDeclarationHead"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (Phantoms.unTTerm function)},+        Core.Field {+          Core.fieldName = (Core.Name "operand"),+          Core.fieldTerm = (Phantoms.unTTerm operand)}]}))++applicationDeclarationHeadFunction :: Phantoms.TTerm Syntax.ApplicationDeclarationHead -> Phantoms.TTerm Syntax.DeclarationHead+applicationDeclarationHeadFunction x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationDeclarationHead"),+        Core.projectionField = (Core.Name "function")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++applicationDeclarationHeadOperand :: Phantoms.TTerm Syntax.ApplicationDeclarationHead -> Phantoms.TTerm Syntax.Variable+applicationDeclarationHeadOperand x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationDeclarationHead"),+        Core.projectionField = (Core.Name "operand")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++applicationDeclarationHeadWithFunction :: Phantoms.TTerm Syntax.ApplicationDeclarationHead -> Phantoms.TTerm Syntax.DeclarationHead -> Phantoms.TTerm Syntax.ApplicationDeclarationHead+applicationDeclarationHeadWithFunction original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationDeclarationHead"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "operand"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationDeclarationHead"),+              Core.projectionField = (Core.Name "operand")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++applicationDeclarationHeadWithOperand :: Phantoms.TTerm Syntax.ApplicationDeclarationHead -> Phantoms.TTerm Syntax.Variable -> Phantoms.TTerm Syntax.ApplicationDeclarationHead+applicationDeclarationHeadWithOperand original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationDeclarationHead"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationDeclarationHead"),+              Core.projectionField = (Core.Name "function")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "operand"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++applicationExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ApplicationExpression+applicationExpression function argument =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (Phantoms.unTTerm function)},+        Core.Field {+          Core.fieldName = (Core.Name "argument"),+          Core.fieldTerm = (Phantoms.unTTerm argument)}]}))++applicationExpressionArgument :: Phantoms.TTerm Syntax.ApplicationExpression -> Phantoms.TTerm Syntax.Expression+applicationExpressionArgument x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationExpression"),+        Core.projectionField = (Core.Name "argument")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++applicationExpressionFunction :: Phantoms.TTerm Syntax.ApplicationExpression -> Phantoms.TTerm Syntax.Expression+applicationExpressionFunction x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationExpression"),+        Core.projectionField = (Core.Name "function")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++applicationExpressionWithArgument :: Phantoms.TTerm Syntax.ApplicationExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ApplicationExpression+applicationExpressionWithArgument original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationExpression"),+              Core.projectionField = (Core.Name "function")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "argument"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++applicationExpressionWithFunction :: Phantoms.TTerm Syntax.ApplicationExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.ApplicationExpression+applicationExpressionWithFunction original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "argument"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationExpression"),+              Core.projectionField = (Core.Name "argument")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++applicationPattern :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.ApplicationPattern+applicationPattern name args =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "args"),+          Core.fieldTerm = (Phantoms.unTTerm args)}]}))++applicationPatternArgs :: Phantoms.TTerm Syntax.ApplicationPattern -> Phantoms.TTerm [Syntax.Pattern]+applicationPatternArgs x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationPattern"),+        Core.projectionField = (Core.Name "args")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++applicationPatternName :: Phantoms.TTerm Syntax.ApplicationPattern -> Phantoms.TTerm Syntax.Name+applicationPatternName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationPattern"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++applicationPatternWithArgs :: Phantoms.TTerm Syntax.ApplicationPattern -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.ApplicationPattern+applicationPatternWithArgs original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationPattern"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "args"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++applicationPatternWithName :: Phantoms.TTerm Syntax.ApplicationPattern -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ApplicationPattern+applicationPatternWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "args"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationPattern"),+              Core.projectionField = (Core.Name "args")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++applicationType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ApplicationType+applicationType context argument =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Phantoms.unTTerm context)},+        Core.Field {+          Core.fieldName = (Core.Name "argument"),+          Core.fieldTerm = (Phantoms.unTTerm argument)}]}))++applicationTypeArgument :: Phantoms.TTerm Syntax.ApplicationType -> Phantoms.TTerm Syntax.Type+applicationTypeArgument x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationType"),+        Core.projectionField = (Core.Name "argument")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++applicationTypeContext :: Phantoms.TTerm Syntax.ApplicationType -> Phantoms.TTerm Syntax.Type+applicationTypeContext x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationType"),+        Core.projectionField = (Core.Name "context")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++applicationTypeWithArgument :: Phantoms.TTerm Syntax.ApplicationType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ApplicationType+applicationTypeWithArgument original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationType"),+              Core.projectionField = (Core.Name "context")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "argument"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++applicationTypeWithContext :: Phantoms.TTerm Syntax.ApplicationType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ApplicationType+applicationTypeWithContext original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "argument"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ApplicationType"),+              Core.projectionField = (Core.Name "argument")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++asPattern :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.AsPattern+asPattern name inner =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.AsPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Phantoms.unTTerm inner)}]}))++asPatternInner :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.Pattern+asPatternInner x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.AsPattern"),+        Core.projectionField = (Core.Name "inner")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++asPatternName :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.Name+asPatternName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.AsPattern"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++asPatternWithInner :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.AsPattern+asPatternWithInner original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.AsPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.AsPattern"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++asPatternWithName :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.AsPattern+asPatternWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.AsPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.AsPattern"),+              Core.projectionField = (Core.Name "inner")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++assertionClass :: Phantoms.TTerm Syntax.ClassAssertion -> Phantoms.TTerm Syntax.Assertion+assertionClass x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Assertion"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "class"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++assertionTuple :: Phantoms.TTerm [Syntax.Assertion] -> Phantoms.TTerm Syntax.Assertion+assertionTuple x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Assertion"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "tuple"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++caseExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm [Syntax.Alternative] -> Phantoms.TTerm Syntax.CaseExpression+caseExpression case_ alternatives =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.CaseExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "case"),+          Core.fieldTerm = (Phantoms.unTTerm case_)},+        Core.Field {+          Core.fieldName = (Core.Name "alternatives"),+          Core.fieldTerm = (Phantoms.unTTerm alternatives)}]}))++caseExpressionAlternatives :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm [Syntax.Alternative]+caseExpressionAlternatives x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.CaseExpression"),+        Core.projectionField = (Core.Name "alternatives")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++caseExpressionCase :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm Syntax.Expression+caseExpressionCase x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.CaseExpression"),+        Core.projectionField = (Core.Name "case")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++caseExpressionWithAlternatives :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm [Syntax.Alternative] -> Phantoms.TTerm Syntax.CaseExpression+caseExpressionWithAlternatives original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.CaseExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "case"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.CaseExpression"),+              Core.projectionField = (Core.Name "case")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "alternatives"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++caseExpressionWithCase :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CaseExpression+caseExpressionWithCase original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.CaseExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "case"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "alternatives"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.CaseExpression"),+              Core.projectionField = (Core.Name "alternatives")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++caseRhs :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.CaseRhs+caseRhs x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.ext.haskell.syntax.CaseRhs"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++classAssertion :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.ClassAssertion+classAssertion name types =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ClassAssertion"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Phantoms.unTTerm types)}]}))++classAssertionName :: Phantoms.TTerm Syntax.ClassAssertion -> Phantoms.TTerm Syntax.Name+classAssertionName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ClassAssertion"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++classAssertionTypes :: Phantoms.TTerm Syntax.ClassAssertion -> Phantoms.TTerm [Syntax.Type]+classAssertionTypes x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ClassAssertion"),+        Core.projectionField = (Core.Name "types")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++classAssertionWithName :: Phantoms.TTerm Syntax.ClassAssertion -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ClassAssertion+classAssertionWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ClassAssertion"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ClassAssertion"),+              Core.projectionField = (Core.Name "types")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++classAssertionWithTypes :: Phantoms.TTerm Syntax.ClassAssertion -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.ClassAssertion+classAssertionWithTypes original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ClassAssertion"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ClassAssertion"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++constructRecordExpression :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.FieldUpdate] -> Phantoms.TTerm Syntax.ConstructRecordExpression+constructRecordExpression name fields =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ConstructRecordExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))++constructRecordExpressionFields :: Phantoms.TTerm Syntax.ConstructRecordExpression -> Phantoms.TTerm [Syntax.FieldUpdate]+constructRecordExpressionFields x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ConstructRecordExpression"),+        Core.projectionField = (Core.Name "fields")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++constructRecordExpressionName :: Phantoms.TTerm Syntax.ConstructRecordExpression -> Phantoms.TTerm Syntax.Name+constructRecordExpressionName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ConstructRecordExpression"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++constructRecordExpressionWithFields :: Phantoms.TTerm Syntax.ConstructRecordExpression -> Phantoms.TTerm [Syntax.FieldUpdate] -> Phantoms.TTerm Syntax.ConstructRecordExpression+constructRecordExpressionWithFields original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ConstructRecordExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ConstructRecordExpression"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++constructRecordExpressionWithName :: Phantoms.TTerm Syntax.ConstructRecordExpression -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ConstructRecordExpression+constructRecordExpressionWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ConstructRecordExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ConstructRecordExpression"),+              Core.projectionField = (Core.Name "fields")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++constructorOrdinary :: Phantoms.TTerm Syntax.OrdinaryConstructor -> Phantoms.TTerm Syntax.Constructor+constructorOrdinary x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Constructor"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "ordinary"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++constructorRecord :: Phantoms.TTerm Syntax.RecordConstructor -> Phantoms.TTerm Syntax.Constructor+constructorRecord x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Constructor"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "record"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++constructorWithComments :: Phantoms.TTerm Syntax.Constructor -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ConstructorWithComments+constructorWithComments body comments =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ConstructorWithComments"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm body)},+        Core.Field {+          Core.fieldName = (Core.Name "comments"),+          Core.fieldTerm = (Phantoms.unTTerm comments)}]}))++constructorWithCommentsBody :: Phantoms.TTerm Syntax.ConstructorWithComments -> Phantoms.TTerm Syntax.Constructor+constructorWithCommentsBody x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ConstructorWithComments"),+        Core.projectionField = (Core.Name "body")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++constructorWithCommentsComments :: Phantoms.TTerm Syntax.ConstructorWithComments -> Phantoms.TTerm (Maybe String)+constructorWithCommentsComments x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ConstructorWithComments"),+        Core.projectionField = (Core.Name "comments")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++constructorWithCommentsWithBody :: Phantoms.TTerm Syntax.ConstructorWithComments -> Phantoms.TTerm Syntax.Constructor -> Phantoms.TTerm Syntax.ConstructorWithComments+constructorWithCommentsWithBody original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ConstructorWithComments"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "comments"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ConstructorWithComments"),+              Core.projectionField = (Core.Name "comments")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++constructorWithCommentsWithComments :: Phantoms.TTerm Syntax.ConstructorWithComments -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ConstructorWithComments+constructorWithCommentsWithComments original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ConstructorWithComments"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ConstructorWithComments"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "comments"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++contextType :: Phantoms.TTerm Syntax.Assertion -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ContextType+contextType ctx type_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ContextType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "ctx"),+          Core.fieldTerm = (Phantoms.unTTerm ctx)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))++contextTypeCtx :: Phantoms.TTerm Syntax.ContextType -> Phantoms.TTerm Syntax.Assertion+contextTypeCtx x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ContextType"),+        Core.projectionField = (Core.Name "ctx")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++contextTypeType :: Phantoms.TTerm Syntax.ContextType -> Phantoms.TTerm Syntax.Type+contextTypeType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ContextType"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++contextTypeWithCtx :: Phantoms.TTerm Syntax.ContextType -> Phantoms.TTerm Syntax.Assertion -> Phantoms.TTerm Syntax.ContextType+contextTypeWithCtx original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ContextType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "ctx"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ContextType"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++contextTypeWithType :: Phantoms.TTerm Syntax.ContextType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.ContextType+contextTypeWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ContextType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "ctx"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ContextType"),+              Core.projectionField = (Core.Name "ctx")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++dataDeclaration :: Phantoms.TTerm Syntax.DataOrNewtype -> Phantoms.TTerm [Syntax.Assertion] -> Phantoms.TTerm Syntax.DeclarationHead -> Phantoms.TTerm [Syntax.ConstructorWithComments] -> Phantoms.TTerm [Syntax.Deriving] -> Phantoms.TTerm Syntax.DataDeclaration+dataDeclaration keyword context head constructors deriving_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "keyword"),+          Core.fieldTerm = (Phantoms.unTTerm keyword)},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Phantoms.unTTerm context)},+        Core.Field {+          Core.fieldName = (Core.Name "head"),+          Core.fieldTerm = (Phantoms.unTTerm head)},+        Core.Field {+          Core.fieldName = (Core.Name "constructors"),+          Core.fieldTerm = (Phantoms.unTTerm constructors)},+        Core.Field {+          Core.fieldName = (Core.Name "deriving"),+          Core.fieldTerm = (Phantoms.unTTerm deriving_)}]}))++dataDeclarationConstructors :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm [Syntax.ConstructorWithComments]+dataDeclarationConstructors x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+        Core.projectionField = (Core.Name "constructors")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++dataDeclarationContext :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm [Syntax.Assertion]+dataDeclarationContext x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+        Core.projectionField = (Core.Name "context")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++dataDeclarationDeriving :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm [Syntax.Deriving]+dataDeclarationDeriving x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+        Core.projectionField = (Core.Name "deriving")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++dataDeclarationHead :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm Syntax.DeclarationHead+dataDeclarationHead x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+        Core.projectionField = (Core.Name "head")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++dataDeclarationKeyword :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm Syntax.DataOrNewtype+dataDeclarationKeyword x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+        Core.projectionField = (Core.Name "keyword")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++dataDeclarationWithConstructors :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm [Syntax.ConstructorWithComments] -> Phantoms.TTerm Syntax.DataDeclaration+dataDeclarationWithConstructors original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "keyword"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "keyword")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "context")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "head"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "head")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "constructors"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "deriving"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "deriving")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++dataDeclarationWithContext :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm [Syntax.Assertion] -> Phantoms.TTerm Syntax.DataDeclaration+dataDeclarationWithContext original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "keyword"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "keyword")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "head"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "head")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "constructors"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "constructors")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "deriving"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "deriving")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++dataDeclarationWithDeriving :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm [Syntax.Deriving] -> Phantoms.TTerm Syntax.DataDeclaration+dataDeclarationWithDeriving original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "keyword"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "keyword")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "context")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "head"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "head")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "constructors"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "constructors")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "deriving"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++dataDeclarationWithHead :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm Syntax.DeclarationHead -> Phantoms.TTerm Syntax.DataDeclaration+dataDeclarationWithHead original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "keyword"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "keyword")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "context")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "head"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "constructors"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "constructors")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "deriving"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "deriving")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++dataDeclarationWithKeyword :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm Syntax.DataOrNewtype -> Phantoms.TTerm Syntax.DataDeclaration+dataDeclarationWithKeyword original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "keyword"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "context")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "head"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "head")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "constructors"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "constructors")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "deriving"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataDeclaration"),+              Core.projectionField = (Core.Name "deriving")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++dataOrNewtypeData :: Phantoms.TTerm Syntax.DataOrNewtype+dataOrNewtypeData =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataOrNewtype"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "data"),+        Core.fieldTerm = Core.TermUnit}}))++dataOrNewtypeNewtype :: Phantoms.TTerm Syntax.DataOrNewtype+dataOrNewtypeNewtype =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DataOrNewtype"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "newtype"),+        Core.fieldTerm = Core.TermUnit}}))++declarationData :: Phantoms.TTerm Syntax.DataDeclaration -> Phantoms.TTerm Syntax.Declaration+declarationData x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Declaration"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "data"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++declarationHeadApplication :: Phantoms.TTerm Syntax.ApplicationDeclarationHead -> Phantoms.TTerm Syntax.DeclarationHead+declarationHeadApplication x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DeclarationHead"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "application"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++declarationHeadParens :: Phantoms.TTerm Syntax.DeclarationHead -> Phantoms.TTerm Syntax.DeclarationHead+declarationHeadParens x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DeclarationHead"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "parens"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++declarationHeadSimple :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.DeclarationHead+declarationHeadSimple x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DeclarationHead"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "simple"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++declarationType :: Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm Syntax.Declaration+declarationType x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Declaration"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "type"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++declarationTypedBinding :: Phantoms.TTerm Syntax.TypedBinding -> Phantoms.TTerm Syntax.Declaration+declarationTypedBinding x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Declaration"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typedBinding"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++declarationValueBinding :: Phantoms.TTerm Syntax.ValueBinding -> Phantoms.TTerm Syntax.Declaration+declarationValueBinding x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Declaration"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "valueBinding"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++declarationWithComments :: Phantoms.TTerm Syntax.Declaration -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.DeclarationWithComments+declarationWithComments body comments =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.DeclarationWithComments"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm body)},+        Core.Field {+          Core.fieldName = (Core.Name "comments"),+          Core.fieldTerm = (Phantoms.unTTerm comments)}]}))++declarationWithCommentsBody :: Phantoms.TTerm Syntax.DeclarationWithComments -> Phantoms.TTerm Syntax.Declaration+declarationWithCommentsBody x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DeclarationWithComments"),+        Core.projectionField = (Core.Name "body")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++declarationWithCommentsComments :: Phantoms.TTerm Syntax.DeclarationWithComments -> Phantoms.TTerm (Maybe String)+declarationWithCommentsComments x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DeclarationWithComments"),+        Core.projectionField = (Core.Name "comments")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++declarationWithCommentsWithBody :: Phantoms.TTerm Syntax.DeclarationWithComments -> Phantoms.TTerm Syntax.Declaration -> Phantoms.TTerm Syntax.DeclarationWithComments+declarationWithCommentsWithBody original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.DeclarationWithComments"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "comments"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DeclarationWithComments"),+              Core.projectionField = (Core.Name "comments")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++declarationWithCommentsWithComments :: Phantoms.TTerm Syntax.DeclarationWithComments -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.DeclarationWithComments+declarationWithCommentsWithComments original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.DeclarationWithComments"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.DeclarationWithComments"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "comments"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++deriving_ :: Phantoms.TTerm [Syntax.Name] -> Phantoms.TTerm Syntax.Deriving+deriving_ x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.ext.haskell.syntax.Deriving"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++exportDeclaration :: Phantoms.TTerm Syntax.ImportExportSpec -> Phantoms.TTerm Syntax.Export+exportDeclaration x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Export"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "declaration"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++exportModule :: Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm Syntax.Export+exportModule x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Export"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "module"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionApplication :: Phantoms.TTerm Syntax.ApplicationExpression -> Phantoms.TTerm Syntax.Expression+expressionApplication x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "application"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionCase :: Phantoms.TTerm Syntax.CaseExpression -> Phantoms.TTerm Syntax.Expression+expressionCase x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "case"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionConstructRecord :: Phantoms.TTerm Syntax.ConstructRecordExpression -> Phantoms.TTerm Syntax.Expression+expressionConstructRecord x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "constructRecord"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionDo :: Phantoms.TTerm [Syntax.Statement] -> Phantoms.TTerm Syntax.Expression+expressionDo x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "do"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionIf :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression+expressionIf x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "if"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionInfixApplication :: Phantoms.TTerm Syntax.InfixApplicationExpression -> Phantoms.TTerm Syntax.Expression+expressionInfixApplication x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "infixApplication"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionLambda :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.Expression+expressionLambda x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "lambda"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionLeftSection :: Phantoms.TTerm Syntax.SectionExpression -> Phantoms.TTerm Syntax.Expression+expressionLeftSection x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "leftSection"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionLet :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm Syntax.Expression+expressionLet x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "let"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionList :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Expression+expressionList x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "list"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.Expression+expressionLiteral x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "literal"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionParens :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression+expressionParens x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "parens"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionPrefixApplication :: Phantoms.TTerm Syntax.PrefixApplicationExpression -> Phantoms.TTerm Syntax.Expression+expressionPrefixApplication x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "prefixApplication"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionRightSection :: Phantoms.TTerm Syntax.SectionExpression -> Phantoms.TTerm Syntax.Expression+expressionRightSection x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "rightSection"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionTuple :: Phantoms.TTerm [Syntax.Expression] -> Phantoms.TTerm Syntax.Expression+expressionTuple x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "tuple"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionTypeSignature :: Phantoms.TTerm Syntax.TypeSignatureExpression -> Phantoms.TTerm Syntax.Expression+expressionTypeSignature x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typeSignature"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionUpdateRecord :: Phantoms.TTerm Syntax.UpdateRecordExpression -> Phantoms.TTerm Syntax.Expression+expressionUpdateRecord x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "updateRecord"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++expressionVariable :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Expression+expressionVariable x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Expression"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "variable"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++field :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Field+field name type_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Field"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))++fieldName :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm Syntax.Name+fieldName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Field"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++fieldType :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm Syntax.Type+fieldType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Field"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++fieldUpdate :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FieldUpdate+fieldUpdate name value =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.FieldUpdate"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "value"),+          Core.fieldTerm = (Phantoms.unTTerm value)}]}))++fieldUpdateName :: Phantoms.TTerm Syntax.FieldUpdate -> Phantoms.TTerm Syntax.Name+fieldUpdateName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.FieldUpdate"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++fieldUpdateValue :: Phantoms.TTerm Syntax.FieldUpdate -> Phantoms.TTerm Syntax.Expression+fieldUpdateValue x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.FieldUpdate"),+        Core.projectionField = (Core.Name "value")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++fieldUpdateWithName :: Phantoms.TTerm Syntax.FieldUpdate -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.FieldUpdate+fieldUpdateWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.FieldUpdate"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "value"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.FieldUpdate"),+              Core.projectionField = (Core.Name "value")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++fieldUpdateWithValue :: Phantoms.TTerm Syntax.FieldUpdate -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.FieldUpdate+fieldUpdateWithValue original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.FieldUpdate"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.FieldUpdate"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "value"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++fieldWithComments :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.FieldWithComments+fieldWithComments field comments =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.FieldWithComments"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "field"),+          Core.fieldTerm = (Phantoms.unTTerm field)},+        Core.Field {+          Core.fieldName = (Core.Name "comments"),+          Core.fieldTerm = (Phantoms.unTTerm comments)}]}))++fieldWithCommentsComments :: Phantoms.TTerm Syntax.FieldWithComments -> Phantoms.TTerm (Maybe String)+fieldWithCommentsComments x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.FieldWithComments"),+        Core.projectionField = (Core.Name "comments")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++fieldWithCommentsField :: Phantoms.TTerm Syntax.FieldWithComments -> Phantoms.TTerm Syntax.Field+fieldWithCommentsField x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.FieldWithComments"),+        Core.projectionField = (Core.Name "field")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++fieldWithCommentsWithComments :: Phantoms.TTerm Syntax.FieldWithComments -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.FieldWithComments+fieldWithCommentsWithComments original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.FieldWithComments"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "field"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.FieldWithComments"),+              Core.projectionField = (Core.Name "field")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "comments"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++fieldWithCommentsWithField :: Phantoms.TTerm Syntax.FieldWithComments -> Phantoms.TTerm Syntax.Field -> Phantoms.TTerm Syntax.FieldWithComments+fieldWithCommentsWithField original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.FieldWithComments"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "field"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "comments"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.FieldWithComments"),+              Core.projectionField = (Core.Name "comments")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++fieldWithName :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Field+fieldWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Field"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Field"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++fieldWithType :: Phantoms.TTerm Syntax.Field -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Field+fieldWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Field"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Field"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++functionType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FunctionType+functionType domain codomain =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.FunctionType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = (Phantoms.unTTerm domain)},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (Phantoms.unTTerm codomain)}]}))++functionTypeCodomain :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.Type+functionTypeCodomain x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.FunctionType"),+        Core.projectionField = (Core.Name "codomain")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++functionTypeDomain :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.Type+functionTypeDomain x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.FunctionType"),+        Core.projectionField = (Core.Name "domain")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++functionTypeWithCodomain :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FunctionType+functionTypeWithCodomain original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.FunctionType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.FunctionType"),+              Core.projectionField = (Core.Name "domain")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++functionTypeWithDomain :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.FunctionType+functionTypeWithDomain original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.FunctionType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.FunctionType"),+              Core.projectionField = (Core.Name "codomain")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++ifExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IfExpression+ifExpression condition then_ else_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.IfExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "condition"),+          Core.fieldTerm = (Phantoms.unTTerm condition)},+        Core.Field {+          Core.fieldName = (Core.Name "then"),+          Core.fieldTerm = (Phantoms.unTTerm then_)},+        Core.Field {+          Core.fieldName = (Core.Name "else"),+          Core.fieldTerm = (Phantoms.unTTerm else_)}]}))++ifExpressionCondition :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression+ifExpressionCondition x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.IfExpression"),+        Core.projectionField = (Core.Name "condition")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++ifExpressionElse :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression+ifExpressionElse x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.IfExpression"),+        Core.projectionField = (Core.Name "else")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++ifExpressionThen :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression+ifExpressionThen x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.IfExpression"),+        Core.projectionField = (Core.Name "then")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++ifExpressionWithCondition :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IfExpression+ifExpressionWithCondition original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.IfExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "condition"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "then"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.IfExpression"),+              Core.projectionField = (Core.Name "then")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "else"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.IfExpression"),+              Core.projectionField = (Core.Name "else")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++ifExpressionWithElse :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IfExpression+ifExpressionWithElse original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.IfExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "condition"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.IfExpression"),+              Core.projectionField = (Core.Name "condition")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "then"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.IfExpression"),+              Core.projectionField = (Core.Name "then")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "else"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++ifExpressionWithThen :: Phantoms.TTerm Syntax.IfExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.IfExpression+ifExpressionWithThen original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.IfExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "condition"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.IfExpression"),+              Core.projectionField = (Core.Name "condition")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "then"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "else"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.IfExpression"),+              Core.projectionField = (Core.Name "else")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++import_ :: Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm (Maybe Syntax.ModuleName) -> Phantoms.TTerm (Maybe Syntax.SpecImport) -> Phantoms.TTerm Syntax.Import+import_ qualified module_ as spec =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "qualified"),+          Core.fieldTerm = (Phantoms.unTTerm qualified)},+        Core.Field {+          Core.fieldName = (Core.Name "module"),+          Core.fieldTerm = (Phantoms.unTTerm module_)},+        Core.Field {+          Core.fieldName = (Core.Name "as"),+          Core.fieldTerm = (Phantoms.unTTerm as)},+        Core.Field {+          Core.fieldName = (Core.Name "spec"),+          Core.fieldTerm = (Phantoms.unTTerm spec)}]}))++importAs :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm (Maybe Syntax.ModuleName)+importAs x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+        Core.projectionField = (Core.Name "as")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++importExportSpec :: Phantoms.TTerm (Maybe Syntax.ImportModifier) -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm (Maybe Syntax.SubspecImportExportSpec) -> Phantoms.TTerm Syntax.ImportExportSpec+importExportSpec modifier name subspec =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportExportSpec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "modifier"),+          Core.fieldTerm = (Phantoms.unTTerm modifier)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "subspec"),+          Core.fieldTerm = (Phantoms.unTTerm subspec)}]}))++importExportSpecModifier :: Phantoms.TTerm Syntax.ImportExportSpec -> Phantoms.TTerm (Maybe Syntax.ImportModifier)+importExportSpecModifier x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportExportSpec"),+        Core.projectionField = (Core.Name "modifier")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++importExportSpecName :: Phantoms.TTerm Syntax.ImportExportSpec -> Phantoms.TTerm Syntax.Name+importExportSpecName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportExportSpec"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++importExportSpecSubspec :: Phantoms.TTerm Syntax.ImportExportSpec -> Phantoms.TTerm (Maybe Syntax.SubspecImportExportSpec)+importExportSpecSubspec x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportExportSpec"),+        Core.projectionField = (Core.Name "subspec")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++importExportSpecWithModifier :: Phantoms.TTerm Syntax.ImportExportSpec -> Phantoms.TTerm (Maybe Syntax.ImportModifier) -> Phantoms.TTerm Syntax.ImportExportSpec+importExportSpecWithModifier original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportExportSpec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "modifier"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportExportSpec"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "subspec"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportExportSpec"),+              Core.projectionField = (Core.Name "subspec")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++importExportSpecWithName :: Phantoms.TTerm Syntax.ImportExportSpec -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.ImportExportSpec+importExportSpecWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportExportSpec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "modifier"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportExportSpec"),+              Core.projectionField = (Core.Name "modifier")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "subspec"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportExportSpec"),+              Core.projectionField = (Core.Name "subspec")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++importExportSpecWithSubspec :: Phantoms.TTerm Syntax.ImportExportSpec -> Phantoms.TTerm (Maybe Syntax.SubspecImportExportSpec) -> Phantoms.TTerm Syntax.ImportExportSpec+importExportSpecWithSubspec original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportExportSpec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "modifier"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportExportSpec"),+              Core.projectionField = (Core.Name "modifier")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportExportSpec"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "subspec"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++importModifierPattern :: Phantoms.TTerm Syntax.ImportModifier+importModifierPattern =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportModifier"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "pattern"),+        Core.fieldTerm = Core.TermUnit}}))++importModifierType :: Phantoms.TTerm Syntax.ImportModifier+importModifierType =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ImportModifier"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "type"),+        Core.fieldTerm = Core.TermUnit}}))++importModule :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm Syntax.ModuleName+importModule x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+        Core.projectionField = (Core.Name "module")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++importQualified :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm Bool+importQualified x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+        Core.projectionField = (Core.Name "qualified")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++importSpec :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm (Maybe Syntax.SpecImport)+importSpec x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+        Core.projectionField = (Core.Name "spec")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++importWithAs :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm (Maybe Syntax.ModuleName) -> Phantoms.TTerm Syntax.Import+importWithAs original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "qualified"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+              Core.projectionField = (Core.Name "qualified")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "module"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+              Core.projectionField = (Core.Name "module")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "as"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "spec"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+              Core.projectionField = (Core.Name "spec")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++importWithModule :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm Syntax.Import+importWithModule original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "qualified"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+              Core.projectionField = (Core.Name "qualified")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "module"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "as"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+              Core.projectionField = (Core.Name "as")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "spec"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+              Core.projectionField = (Core.Name "spec")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++importWithQualified :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm Bool -> Phantoms.TTerm Syntax.Import+importWithQualified original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "qualified"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "module"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+              Core.projectionField = (Core.Name "module")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "as"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+              Core.projectionField = (Core.Name "as")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "spec"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+              Core.projectionField = (Core.Name "spec")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++importWithSpec :: Phantoms.TTerm Syntax.Import -> Phantoms.TTerm (Maybe Syntax.SpecImport) -> Phantoms.TTerm Syntax.Import+importWithSpec original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "qualified"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+              Core.projectionField = (Core.Name "qualified")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "module"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+              Core.projectionField = (Core.Name "module")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "as"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Import"),+              Core.projectionField = (Core.Name "as")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "spec"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++infixApplicationExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.InfixApplicationExpression+infixApplicationExpression lhs operator rhs =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixApplicationExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "lhs"),+          Core.fieldTerm = (Phantoms.unTTerm lhs)},+        Core.Field {+          Core.fieldName = (Core.Name "operator"),+          Core.fieldTerm = (Phantoms.unTTerm operator)},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))++infixApplicationExpressionLhs :: Phantoms.TTerm Syntax.InfixApplicationExpression -> Phantoms.TTerm Syntax.Expression+infixApplicationExpressionLhs x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixApplicationExpression"),+        Core.projectionField = (Core.Name "lhs")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++infixApplicationExpressionOperator :: Phantoms.TTerm Syntax.InfixApplicationExpression -> Phantoms.TTerm Syntax.Operator+infixApplicationExpressionOperator x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixApplicationExpression"),+        Core.projectionField = (Core.Name "operator")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++infixApplicationExpressionRhs :: Phantoms.TTerm Syntax.InfixApplicationExpression -> Phantoms.TTerm Syntax.Expression+infixApplicationExpressionRhs x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixApplicationExpression"),+        Core.projectionField = (Core.Name "rhs")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++infixApplicationExpressionWithLhs :: Phantoms.TTerm Syntax.InfixApplicationExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.InfixApplicationExpression+infixApplicationExpressionWithLhs original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixApplicationExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "lhs"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "operator"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixApplicationExpression"),+              Core.projectionField = (Core.Name "operator")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixApplicationExpression"),+              Core.projectionField = (Core.Name "rhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++infixApplicationExpressionWithOperator :: Phantoms.TTerm Syntax.InfixApplicationExpression -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.InfixApplicationExpression+infixApplicationExpressionWithOperator original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixApplicationExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "lhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixApplicationExpression"),+              Core.projectionField = (Core.Name "lhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "operator"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixApplicationExpression"),+              Core.projectionField = (Core.Name "rhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++infixApplicationExpressionWithRhs :: Phantoms.TTerm Syntax.InfixApplicationExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.InfixApplicationExpression+infixApplicationExpressionWithRhs original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixApplicationExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "lhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixApplicationExpression"),+              Core.projectionField = (Core.Name "lhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "operator"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixApplicationExpression"),+              Core.projectionField = (Core.Name "operator")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++infixType :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.InfixType+infixType lhs operator rhs =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "lhs"),+          Core.fieldTerm = (Phantoms.unTTerm lhs)},+        Core.Field {+          Core.fieldName = (Core.Name "operator"),+          Core.fieldTerm = (Phantoms.unTTerm operator)},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))++infixTypeLhs :: Phantoms.TTerm Syntax.InfixType -> Phantoms.TTerm Syntax.Type+infixTypeLhs x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixType"),+        Core.projectionField = (Core.Name "lhs")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++infixTypeOperator :: Phantoms.TTerm Syntax.InfixType -> Phantoms.TTerm Syntax.Operator+infixTypeOperator x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixType"),+        Core.projectionField = (Core.Name "operator")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++infixTypeRhs :: Phantoms.TTerm Syntax.InfixType -> Phantoms.TTerm Syntax.Operator+infixTypeRhs x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixType"),+        Core.projectionField = (Core.Name "rhs")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++infixTypeWithLhs :: Phantoms.TTerm Syntax.InfixType -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.InfixType+infixTypeWithLhs original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "lhs"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "operator"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixType"),+              Core.projectionField = (Core.Name "operator")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixType"),+              Core.projectionField = (Core.Name "rhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++infixTypeWithOperator :: Phantoms.TTerm Syntax.InfixType -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.InfixType+infixTypeWithOperator original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "lhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixType"),+              Core.projectionField = (Core.Name "lhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "operator"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixType"),+              Core.projectionField = (Core.Name "rhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++infixTypeWithRhs :: Phantoms.TTerm Syntax.InfixType -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.InfixType+infixTypeWithRhs original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "lhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixType"),+              Core.projectionField = (Core.Name "lhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "operator"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.InfixType"),+              Core.projectionField = (Core.Name "operator")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++lambdaExpression :: Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LambdaExpression+lambdaExpression bindings inner =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.LambdaExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Phantoms.unTTerm bindings)},+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Phantoms.unTTerm inner)}]}))++lambdaExpressionBindings :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm [Syntax.Pattern]+lambdaExpressionBindings x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.LambdaExpression"),+        Core.projectionField = (Core.Name "bindings")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++lambdaExpressionInner :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.Expression+lambdaExpressionInner x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.LambdaExpression"),+        Core.projectionField = (Core.Name "inner")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++lambdaExpressionWithBindings :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.LambdaExpression+lambdaExpressionWithBindings original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.LambdaExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.LambdaExpression"),+              Core.projectionField = (Core.Name "inner")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++lambdaExpressionWithInner :: Phantoms.TTerm Syntax.LambdaExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LambdaExpression+lambdaExpressionWithInner original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.LambdaExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.LambdaExpression"),+              Core.projectionField = (Core.Name "bindings")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++letExpression :: Phantoms.TTerm [Syntax.LocalBinding] -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LetExpression+letExpression bindings inner =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.LetExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Phantoms.unTTerm bindings)},+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Phantoms.unTTerm inner)}]}))++letExpressionBindings :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm [Syntax.LocalBinding]+letExpressionBindings x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.LetExpression"),+        Core.projectionField = (Core.Name "bindings")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++letExpressionInner :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm Syntax.Expression+letExpressionInner x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.LetExpression"),+        Core.projectionField = (Core.Name "inner")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++letExpressionWithBindings :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm [Syntax.LocalBinding] -> Phantoms.TTerm Syntax.LetExpression+letExpressionWithBindings original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.LetExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.LetExpression"),+              Core.projectionField = (Core.Name "inner")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++letExpressionWithInner :: Phantoms.TTerm Syntax.LetExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.LetExpression+letExpressionWithInner original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.LetExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.LetExpression"),+              Core.projectionField = (Core.Name "bindings")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++literalChar :: Phantoms.TTerm Int -> Phantoms.TTerm Syntax.Literal+literalChar x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Literal"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "char"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++literalDouble :: Phantoms.TTerm Double -> Phantoms.TTerm Syntax.Literal+literalDouble x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Literal"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "double"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++literalFloat :: Phantoms.TTerm Float -> Phantoms.TTerm Syntax.Literal+literalFloat x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Literal"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "float"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++literalInt :: Phantoms.TTerm Int -> Phantoms.TTerm Syntax.Literal+literalInt x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Literal"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "int"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++literalInteger :: Phantoms.TTerm Integer -> Phantoms.TTerm Syntax.Literal+literalInteger x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Literal"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "integer"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++literalString :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.Literal+literalString x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Literal"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "string"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++localBindingSignature :: Phantoms.TTerm Syntax.TypeSignature -> Phantoms.TTerm Syntax.LocalBinding+localBindingSignature x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.LocalBinding"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "signature"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++localBindingValue :: Phantoms.TTerm Syntax.ValueBinding -> Phantoms.TTerm Syntax.LocalBinding+localBindingValue x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.LocalBinding"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "value"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++localBindings :: Phantoms.TTerm [Syntax.LocalBinding] -> Phantoms.TTerm Syntax.LocalBindings+localBindings x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.ext.haskell.syntax.LocalBindings"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++module_ :: Phantoms.TTerm (Maybe Syntax.ModuleHead) -> Phantoms.TTerm [Syntax.Import] -> Phantoms.TTerm [Syntax.DeclarationWithComments] -> Phantoms.TTerm Syntax.Module+module_ head imports declarations =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Module"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "head"),+          Core.fieldTerm = (Phantoms.unTTerm head)},+        Core.Field {+          Core.fieldName = (Core.Name "imports"),+          Core.fieldTerm = (Phantoms.unTTerm imports)},+        Core.Field {+          Core.fieldName = (Core.Name "declarations"),+          Core.fieldTerm = (Phantoms.unTTerm declarations)}]}))++moduleDeclarations :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm [Syntax.DeclarationWithComments]+moduleDeclarations x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Module"),+        Core.projectionField = (Core.Name "declarations")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++moduleHead :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm (Maybe Syntax.ModuleHead)+moduleHead x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Module"),+        Core.projectionField = (Core.Name "head")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++moduleHeadComments :: Phantoms.TTerm Syntax.ModuleHead -> Phantoms.TTerm (Maybe String)+moduleHeadComments x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ModuleHead"),+        Core.projectionField = (Core.Name "comments")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++moduleHeadExports :: Phantoms.TTerm Syntax.ModuleHead -> Phantoms.TTerm [Syntax.Export]+moduleHeadExports x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ModuleHead"),+        Core.projectionField = (Core.Name "exports")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++moduleHeadName :: Phantoms.TTerm Syntax.ModuleHead -> Phantoms.TTerm Syntax.ModuleName+moduleHeadName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ModuleHead"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++moduleHeadWithComments :: Phantoms.TTerm Syntax.ModuleHead -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ModuleHead+moduleHeadWithComments original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ModuleHead"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "comments"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ModuleHead"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "exports"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ModuleHead"),+              Core.projectionField = (Core.Name "exports")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++moduleHeadWithExports :: Phantoms.TTerm Syntax.ModuleHead -> Phantoms.TTerm [Syntax.Export] -> Phantoms.TTerm Syntax.ModuleHead+moduleHeadWithExports original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ModuleHead"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "comments"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ModuleHead"),+              Core.projectionField = (Core.Name "comments")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ModuleHead"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "exports"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++moduleHeadWithName :: Phantoms.TTerm Syntax.ModuleHead -> Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm Syntax.ModuleHead+moduleHeadWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ModuleHead"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "comments"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ModuleHead"),+              Core.projectionField = (Core.Name "comments")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "exports"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ModuleHead"),+              Core.projectionField = (Core.Name "exports")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++moduleHead_ :: Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm [Syntax.Export] -> Phantoms.TTerm Syntax.ModuleHead+moduleHead_ comments name exports =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.ModuleHead"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "comments"),+          Core.fieldTerm = (Phantoms.unTTerm comments)},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "exports"),+          Core.fieldTerm = (Phantoms.unTTerm exports)}]}))++moduleImports :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm [Syntax.Import]+moduleImports x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Module"),+        Core.projectionField = (Core.Name "imports")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++moduleName :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.ModuleName+moduleName x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.ext.haskell.syntax.ModuleName"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++moduleWithDeclarations :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm [Syntax.DeclarationWithComments] -> Phantoms.TTerm Syntax.Module+moduleWithDeclarations original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Module"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "head"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Module"),+              Core.projectionField = (Core.Name "head")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "imports"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Module"),+              Core.projectionField = (Core.Name "imports")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "declarations"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++moduleWithHead :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm (Maybe Syntax.ModuleHead) -> Phantoms.TTerm Syntax.Module+moduleWithHead original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Module"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "head"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "imports"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Module"),+              Core.projectionField = (Core.Name "imports")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "declarations"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Module"),+              Core.projectionField = (Core.Name "declarations")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++moduleWithImports :: Phantoms.TTerm Syntax.Module -> Phantoms.TTerm [Syntax.Import] -> Phantoms.TTerm Syntax.Module+moduleWithImports original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.Module"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "head"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Module"),+              Core.projectionField = (Core.Name "head")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "imports"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "declarations"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Module"),+              Core.projectionField = (Core.Name "declarations")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++nameImplicit :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm Syntax.Name+nameImplicit x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Name"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "implicit"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++nameNormal :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm Syntax.Name+nameNormal x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Name"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "normal"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++nameParens :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm Syntax.Name+nameParens x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Name"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "parens"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++namePart :: Phantoms.TTerm String -> Phantoms.TTerm Syntax.NamePart+namePart x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.ext.haskell.syntax.NamePart"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++operatorBacktick :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm Syntax.Operator+operatorBacktick x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Operator"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "backtick"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++operatorNormal :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm Syntax.Operator+operatorNormal x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Operator"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "normal"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++ordinaryConstructor :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.OrdinaryConstructor+ordinaryConstructor name fields =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.OrdinaryConstructor"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))++ordinaryConstructorFields :: Phantoms.TTerm Syntax.OrdinaryConstructor -> Phantoms.TTerm [Syntax.Type]+ordinaryConstructorFields x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.OrdinaryConstructor"),+        Core.projectionField = (Core.Name "fields")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++ordinaryConstructorName :: Phantoms.TTerm Syntax.OrdinaryConstructor -> Phantoms.TTerm Syntax.Name+ordinaryConstructorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.OrdinaryConstructor"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++ordinaryConstructorWithFields :: Phantoms.TTerm Syntax.OrdinaryConstructor -> Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.OrdinaryConstructor+ordinaryConstructorWithFields original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.OrdinaryConstructor"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.OrdinaryConstructor"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++ordinaryConstructorWithName :: Phantoms.TTerm Syntax.OrdinaryConstructor -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.OrdinaryConstructor+ordinaryConstructorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.OrdinaryConstructor"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.OrdinaryConstructor"),+              Core.projectionField = (Core.Name "fields")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++patternApplication :: Phantoms.TTerm Syntax.ApplicationPattern -> Phantoms.TTerm Syntax.Pattern+patternApplication x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "application"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++patternAs :: Phantoms.TTerm Syntax.AsPattern -> Phantoms.TTerm Syntax.Pattern+patternAs x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "as"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++patternField :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.PatternField+patternField name pattern =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.PatternField"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "pattern"),+          Core.fieldTerm = (Phantoms.unTTerm pattern)}]}))++patternFieldName :: Phantoms.TTerm Syntax.PatternField -> Phantoms.TTerm Syntax.Name+patternFieldName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.PatternField"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++patternFieldPattern :: Phantoms.TTerm Syntax.PatternField -> Phantoms.TTerm Syntax.Pattern+patternFieldPattern x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.PatternField"),+        Core.projectionField = (Core.Name "pattern")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++patternFieldWithName :: Phantoms.TTerm Syntax.PatternField -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.PatternField+patternFieldWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.PatternField"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "pattern"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.PatternField"),+              Core.projectionField = (Core.Name "pattern")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++patternFieldWithPattern :: Phantoms.TTerm Syntax.PatternField -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.PatternField+patternFieldWithPattern original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.PatternField"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.PatternField"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "pattern"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++patternList :: Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.Pattern+patternList x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "list"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++patternLiteral :: Phantoms.TTerm Syntax.Literal -> Phantoms.TTerm Syntax.Pattern+patternLiteral x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "literal"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++patternName :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Pattern+patternName x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "name"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++patternParens :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Pattern+patternParens x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "parens"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++patternRecord :: Phantoms.TTerm Syntax.RecordPattern -> Phantoms.TTerm Syntax.Pattern+patternRecord x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "record"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++patternTuple :: Phantoms.TTerm [Syntax.Pattern] -> Phantoms.TTerm Syntax.Pattern+patternTuple x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "tuple"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++patternTyped :: Phantoms.TTerm Syntax.TypedPattern -> Phantoms.TTerm Syntax.Pattern+patternTyped x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typed"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++patternWildcard :: Phantoms.TTerm Syntax.Pattern+patternWildcard =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "wildcard"),+        Core.fieldTerm = Core.TermUnit}}))++prefixApplicationExpression :: Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PrefixApplicationExpression+prefixApplicationExpression operator rhs =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.PrefixApplicationExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "operator"),+          Core.fieldTerm = (Phantoms.unTTerm operator)},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Phantoms.unTTerm rhs)}]}))++prefixApplicationExpressionOperator :: Phantoms.TTerm Syntax.PrefixApplicationExpression -> Phantoms.TTerm Syntax.Operator+prefixApplicationExpressionOperator x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.PrefixApplicationExpression"),+        Core.projectionField = (Core.Name "operator")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++prefixApplicationExpressionRhs :: Phantoms.TTerm Syntax.PrefixApplicationExpression -> Phantoms.TTerm Syntax.Expression+prefixApplicationExpressionRhs x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.PrefixApplicationExpression"),+        Core.projectionField = (Core.Name "rhs")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++prefixApplicationExpressionWithOperator :: Phantoms.TTerm Syntax.PrefixApplicationExpression -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.PrefixApplicationExpression+prefixApplicationExpressionWithOperator original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.PrefixApplicationExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "operator"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.PrefixApplicationExpression"),+              Core.projectionField = (Core.Name "rhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++prefixApplicationExpressionWithRhs :: Phantoms.TTerm Syntax.PrefixApplicationExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.PrefixApplicationExpression+prefixApplicationExpressionWithRhs original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.PrefixApplicationExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "operator"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.PrefixApplicationExpression"),+              Core.projectionField = (Core.Name "operator")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++qualifiedName :: Phantoms.TTerm [Syntax.NamePart] -> Phantoms.TTerm Syntax.NamePart -> Phantoms.TTerm Syntax.QualifiedName+qualifiedName qualifiers unqualified =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.QualifiedName"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "qualifiers"),+          Core.fieldTerm = (Phantoms.unTTerm qualifiers)},+        Core.Field {+          Core.fieldName = (Core.Name "unqualified"),+          Core.fieldTerm = (Phantoms.unTTerm unqualified)}]}))++qualifiedNameQualifiers :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm [Syntax.NamePart]+qualifiedNameQualifiers x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.QualifiedName"),+        Core.projectionField = (Core.Name "qualifiers")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++qualifiedNameUnqualified :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm Syntax.NamePart+qualifiedNameUnqualified x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.QualifiedName"),+        Core.projectionField = (Core.Name "unqualified")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++qualifiedNameWithQualifiers :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm [Syntax.NamePart] -> Phantoms.TTerm Syntax.QualifiedName+qualifiedNameWithQualifiers original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.QualifiedName"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "qualifiers"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "unqualified"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.QualifiedName"),+              Core.projectionField = (Core.Name "unqualified")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++qualifiedNameWithUnqualified :: Phantoms.TTerm Syntax.QualifiedName -> Phantoms.TTerm Syntax.NamePart -> Phantoms.TTerm Syntax.QualifiedName+qualifiedNameWithUnqualified original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.QualifiedName"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "qualifiers"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.QualifiedName"),+              Core.projectionField = (Core.Name "qualifiers")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "unqualified"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++recordConstructor :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.FieldWithComments] -> Phantoms.TTerm Syntax.RecordConstructor+recordConstructor name fields =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.RecordConstructor"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))++recordConstructorFields :: Phantoms.TTerm Syntax.RecordConstructor -> Phantoms.TTerm [Syntax.FieldWithComments]+recordConstructorFields x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.RecordConstructor"),+        Core.projectionField = (Core.Name "fields")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++recordConstructorName :: Phantoms.TTerm Syntax.RecordConstructor -> Phantoms.TTerm Syntax.Name+recordConstructorName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.RecordConstructor"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++recordConstructorWithFields :: Phantoms.TTerm Syntax.RecordConstructor -> Phantoms.TTerm [Syntax.FieldWithComments] -> Phantoms.TTerm Syntax.RecordConstructor+recordConstructorWithFields original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.RecordConstructor"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.RecordConstructor"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++recordConstructorWithName :: Phantoms.TTerm Syntax.RecordConstructor -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.RecordConstructor+recordConstructorWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.RecordConstructor"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.RecordConstructor"),+              Core.projectionField = (Core.Name "fields")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++recordPattern :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm [Syntax.PatternField] -> Phantoms.TTerm Syntax.RecordPattern+recordPattern name fields =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.RecordPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))++recordPatternFields :: Phantoms.TTerm Syntax.RecordPattern -> Phantoms.TTerm [Syntax.PatternField]+recordPatternFields x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.RecordPattern"),+        Core.projectionField = (Core.Name "fields")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++recordPatternName :: Phantoms.TTerm Syntax.RecordPattern -> Phantoms.TTerm Syntax.Name+recordPatternName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.RecordPattern"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++recordPatternWithFields :: Phantoms.TTerm Syntax.RecordPattern -> Phantoms.TTerm [Syntax.PatternField] -> Phantoms.TTerm Syntax.RecordPattern+recordPatternWithFields original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.RecordPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.RecordPattern"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++recordPatternWithName :: Phantoms.TTerm Syntax.RecordPattern -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.RecordPattern+recordPatternWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.RecordPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.RecordPattern"),+              Core.projectionField = (Core.Name "fields")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++rightHandSide :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.RightHandSide+rightHandSide x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.ext.haskell.syntax.RightHandSide"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++sectionExpression :: Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SectionExpression+sectionExpression operator expression =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.SectionExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "operator"),+          Core.fieldTerm = (Phantoms.unTTerm operator)},+        Core.Field {+          Core.fieldName = (Core.Name "expression"),+          Core.fieldTerm = (Phantoms.unTTerm expression)}]}))++sectionExpressionExpression :: Phantoms.TTerm Syntax.SectionExpression -> Phantoms.TTerm Syntax.Expression+sectionExpressionExpression x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SectionExpression"),+        Core.projectionField = (Core.Name "expression")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++sectionExpressionOperator :: Phantoms.TTerm Syntax.SectionExpression -> Phantoms.TTerm Syntax.Operator+sectionExpressionOperator x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SectionExpression"),+        Core.projectionField = (Core.Name "operator")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++sectionExpressionWithExpression :: Phantoms.TTerm Syntax.SectionExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.SectionExpression+sectionExpressionWithExpression original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.SectionExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "operator"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SectionExpression"),+              Core.projectionField = (Core.Name "operator")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expression"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++sectionExpressionWithOperator :: Phantoms.TTerm Syntax.SectionExpression -> Phantoms.TTerm Syntax.Operator -> Phantoms.TTerm Syntax.SectionExpression+sectionExpressionWithOperator original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.SectionExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "operator"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "expression"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SectionExpression"),+              Core.projectionField = (Core.Name "expression")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++simpleValueBinding :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.RightHandSide -> Phantoms.TTerm (Maybe Syntax.LocalBindings) -> Phantoms.TTerm Syntax.SimpleValueBinding+simpleValueBinding pattern rhs localBindings =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.SimpleValueBinding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "pattern"),+          Core.fieldTerm = (Phantoms.unTTerm pattern)},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Phantoms.unTTerm rhs)},+        Core.Field {+          Core.fieldName = (Core.Name "localBindings"),+          Core.fieldTerm = (Phantoms.unTTerm localBindings)}]}))++simpleValueBindingLocalBindings :: Phantoms.TTerm Syntax.SimpleValueBinding -> Phantoms.TTerm (Maybe Syntax.LocalBindings)+simpleValueBindingLocalBindings x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SimpleValueBinding"),+        Core.projectionField = (Core.Name "localBindings")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++simpleValueBindingPattern :: Phantoms.TTerm Syntax.SimpleValueBinding -> Phantoms.TTerm Syntax.Pattern+simpleValueBindingPattern x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SimpleValueBinding"),+        Core.projectionField = (Core.Name "pattern")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++simpleValueBindingRhs :: Phantoms.TTerm Syntax.SimpleValueBinding -> Phantoms.TTerm Syntax.RightHandSide+simpleValueBindingRhs x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SimpleValueBinding"),+        Core.projectionField = (Core.Name "rhs")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++simpleValueBindingWithLocalBindings :: Phantoms.TTerm Syntax.SimpleValueBinding -> Phantoms.TTerm (Maybe Syntax.LocalBindings) -> Phantoms.TTerm Syntax.SimpleValueBinding+simpleValueBindingWithLocalBindings original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.SimpleValueBinding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "pattern"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SimpleValueBinding"),+              Core.projectionField = (Core.Name "pattern")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SimpleValueBinding"),+              Core.projectionField = (Core.Name "rhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "localBindings"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++simpleValueBindingWithPattern :: Phantoms.TTerm Syntax.SimpleValueBinding -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.SimpleValueBinding+simpleValueBindingWithPattern original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.SimpleValueBinding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "pattern"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SimpleValueBinding"),+              Core.projectionField = (Core.Name "rhs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "localBindings"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SimpleValueBinding"),+              Core.projectionField = (Core.Name "localBindings")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++simpleValueBindingWithRhs :: Phantoms.TTerm Syntax.SimpleValueBinding -> Phantoms.TTerm Syntax.RightHandSide -> Phantoms.TTerm Syntax.SimpleValueBinding+simpleValueBindingWithRhs original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.SimpleValueBinding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "pattern"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SimpleValueBinding"),+              Core.projectionField = (Core.Name "pattern")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "localBindings"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SimpleValueBinding"),+              Core.projectionField = (Core.Name "localBindings")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++specImportHiding :: Phantoms.TTerm [Syntax.ImportExportSpec] -> Phantoms.TTerm Syntax.SpecImport+specImportHiding x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SpecImport"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "hiding"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++specImportList :: Phantoms.TTerm [Syntax.ImportExportSpec] -> Phantoms.TTerm Syntax.SpecImport+specImportList x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SpecImport"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "list"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++statement :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Statement+statement x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.ext.haskell.syntax.Statement"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++subspecImportExportSpecAll :: Phantoms.TTerm Syntax.SubspecImportExportSpec+subspecImportExportSpecAll =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SubspecImportExportSpec"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "all"),+        Core.fieldTerm = Core.TermUnit}}))++subspecImportExportSpecList :: Phantoms.TTerm [Syntax.Name] -> Phantoms.TTerm Syntax.SubspecImportExportSpec+subspecImportExportSpecList x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.SubspecImportExportSpec"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "list"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeApplication :: Phantoms.TTerm Syntax.ApplicationType -> Phantoms.TTerm Syntax.Type+typeApplication x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "application"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeCtx :: Phantoms.TTerm Syntax.ContextType -> Phantoms.TTerm Syntax.Type+typeCtx x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "ctx"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeDeclaration :: Phantoms.TTerm Syntax.DeclarationHead -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeDeclaration+typeDeclaration name type_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeDeclaration"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))++typeDeclarationName :: Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm Syntax.DeclarationHead+typeDeclarationName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeDeclaration"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeDeclarationType :: Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm Syntax.Type+typeDeclarationType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeDeclaration"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeDeclarationWithName :: Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm Syntax.DeclarationHead -> Phantoms.TTerm Syntax.TypeDeclaration+typeDeclarationWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeDeclaration"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeDeclaration"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeDeclarationWithType :: Phantoms.TTerm Syntax.TypeDeclaration -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeDeclaration+typeDeclarationWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeDeclaration"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeDeclaration"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeFunction :: Phantoms.TTerm Syntax.FunctionType -> Phantoms.TTerm Syntax.Type+typeFunction x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "function"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeInfix :: Phantoms.TTerm Syntax.InfixType -> Phantoms.TTerm Syntax.Type+typeInfix x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "infix"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeList :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type+typeList x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "list"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeParens :: Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.Type+typeParens x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "parens"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeSignature :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeSignature+typeSignature name type_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeSignature"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))++typeSignatureExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeSignatureExpression+typeSignatureExpression inner type_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeSignatureExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Phantoms.unTTerm inner)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))++typeSignatureExpressionInner :: Phantoms.TTerm Syntax.TypeSignatureExpression -> Phantoms.TTerm Syntax.Expression+typeSignatureExpressionInner x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeSignatureExpression"),+        Core.projectionField = (Core.Name "inner")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeSignatureExpressionType :: Phantoms.TTerm Syntax.TypeSignatureExpression -> Phantoms.TTerm Syntax.Type+typeSignatureExpressionType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeSignatureExpression"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeSignatureExpressionWithInner :: Phantoms.TTerm Syntax.TypeSignatureExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.TypeSignatureExpression+typeSignatureExpressionWithInner original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeSignatureExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeSignatureExpression"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeSignatureExpressionWithType :: Phantoms.TTerm Syntax.TypeSignatureExpression -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeSignatureExpression+typeSignatureExpressionWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeSignatureExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeSignatureExpression"),+              Core.projectionField = (Core.Name "inner")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeSignatureName :: Phantoms.TTerm Syntax.TypeSignature -> Phantoms.TTerm Syntax.Name+typeSignatureName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeSignature"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeSignatureType :: Phantoms.TTerm Syntax.TypeSignature -> Phantoms.TTerm Syntax.Type+typeSignatureType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeSignature"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeSignatureWithName :: Phantoms.TTerm Syntax.TypeSignature -> Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.TypeSignature+typeSignatureWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeSignature"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeSignature"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeSignatureWithType :: Phantoms.TTerm Syntax.TypeSignature -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypeSignature+typeSignatureWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeSignature"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypeSignature"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeTuple :: Phantoms.TTerm [Syntax.Type] -> Phantoms.TTerm Syntax.Type+typeTuple x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "tuple"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typeVariable :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Type+typeVariable x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.Type"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "variable"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++typedBinding :: Phantoms.TTerm Syntax.TypeSignature -> Phantoms.TTerm Syntax.ValueBinding -> Phantoms.TTerm Syntax.TypedBinding+typedBinding typeSignature valueBinding =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypedBinding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeSignature"),+          Core.fieldTerm = (Phantoms.unTTerm typeSignature)},+        Core.Field {+          Core.fieldName = (Core.Name "valueBinding"),+          Core.fieldTerm = (Phantoms.unTTerm valueBinding)}]}))++typedBindingTypeSignature :: Phantoms.TTerm Syntax.TypedBinding -> Phantoms.TTerm Syntax.TypeSignature+typedBindingTypeSignature x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypedBinding"),+        Core.projectionField = (Core.Name "typeSignature")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typedBindingValueBinding :: Phantoms.TTerm Syntax.TypedBinding -> Phantoms.TTerm Syntax.ValueBinding+typedBindingValueBinding x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypedBinding"),+        Core.projectionField = (Core.Name "valueBinding")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typedBindingWithTypeSignature :: Phantoms.TTerm Syntax.TypedBinding -> Phantoms.TTerm Syntax.TypeSignature -> Phantoms.TTerm Syntax.TypedBinding+typedBindingWithTypeSignature original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypedBinding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeSignature"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "valueBinding"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypedBinding"),+              Core.projectionField = (Core.Name "valueBinding")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typedBindingWithValueBinding :: Phantoms.TTerm Syntax.TypedBinding -> Phantoms.TTerm Syntax.ValueBinding -> Phantoms.TTerm Syntax.TypedBinding+typedBindingWithValueBinding original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypedBinding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeSignature"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypedBinding"),+              Core.projectionField = (Core.Name "typeSignature")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "valueBinding"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typedPattern :: Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypedPattern+typedPattern inner type_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypedPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Phantoms.unTTerm inner)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))++typedPatternInner :: Phantoms.TTerm Syntax.TypedPattern -> Phantoms.TTerm Syntax.Pattern+typedPatternInner x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypedPattern"),+        Core.projectionField = (Core.Name "inner")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typedPatternType :: Phantoms.TTerm Syntax.TypedPattern -> Phantoms.TTerm Syntax.Type+typedPatternType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypedPattern"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typedPatternWithInner :: Phantoms.TTerm Syntax.TypedPattern -> Phantoms.TTerm Syntax.Pattern -> Phantoms.TTerm Syntax.TypedPattern+typedPatternWithInner original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypedPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypedPattern"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typedPatternWithType :: Phantoms.TTerm Syntax.TypedPattern -> Phantoms.TTerm Syntax.Type -> Phantoms.TTerm Syntax.TypedPattern+typedPatternWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.TypedPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.TypedPattern"),+              Core.projectionField = (Core.Name "inner")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++unCaseRhs :: Phantoms.TTerm Syntax.CaseRhs -> Phantoms.TTerm Syntax.Expression+unCaseRhs x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.ext.haskell.syntax.CaseRhs")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unDeriving :: Phantoms.TTerm Syntax.Deriving -> Phantoms.TTerm [Syntax.Name]+unDeriving x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.ext.haskell.syntax.Deriving")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unLocalBindings :: Phantoms.TTerm Syntax.LocalBindings -> Phantoms.TTerm [Syntax.LocalBinding]+unLocalBindings x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.ext.haskell.syntax.LocalBindings")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unModuleName :: Phantoms.TTerm Syntax.ModuleName -> Phantoms.TTerm String+unModuleName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.ext.haskell.syntax.ModuleName")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unNamePart :: Phantoms.TTerm Syntax.NamePart -> Phantoms.TTerm String+unNamePart x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.ext.haskell.syntax.NamePart")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unRightHandSide :: Phantoms.TTerm Syntax.RightHandSide -> Phantoms.TTerm Syntax.Expression+unRightHandSide x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.ext.haskell.syntax.RightHandSide")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unStatement :: Phantoms.TTerm Syntax.Statement -> Phantoms.TTerm Syntax.Expression+unStatement x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.ext.haskell.syntax.Statement")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unVariable :: Phantoms.TTerm Syntax.Variable -> Phantoms.TTerm Syntax.Name+unVariable x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.ext.haskell.syntax.Variable")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++updateRecordExpression :: Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm [Syntax.FieldUpdate] -> Phantoms.TTerm Syntax.UpdateRecordExpression+updateRecordExpression inner fields =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.UpdateRecordExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Phantoms.unTTerm inner)},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Phantoms.unTTerm fields)}]}))++updateRecordExpressionFields :: Phantoms.TTerm Syntax.UpdateRecordExpression -> Phantoms.TTerm [Syntax.FieldUpdate]+updateRecordExpressionFields x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.UpdateRecordExpression"),+        Core.projectionField = (Core.Name "fields")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++updateRecordExpressionInner :: Phantoms.TTerm Syntax.UpdateRecordExpression -> Phantoms.TTerm Syntax.Expression+updateRecordExpressionInner x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.UpdateRecordExpression"),+        Core.projectionField = (Core.Name "inner")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++updateRecordExpressionWithFields :: Phantoms.TTerm Syntax.UpdateRecordExpression -> Phantoms.TTerm [Syntax.FieldUpdate] -> Phantoms.TTerm Syntax.UpdateRecordExpression+updateRecordExpressionWithFields original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.UpdateRecordExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.UpdateRecordExpression"),+              Core.projectionField = (Core.Name "inner")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++updateRecordExpressionWithInner :: Phantoms.TTerm Syntax.UpdateRecordExpression -> Phantoms.TTerm Syntax.Expression -> Phantoms.TTerm Syntax.UpdateRecordExpression+updateRecordExpressionWithInner original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ext.haskell.syntax.UpdateRecordExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "inner"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.ext.haskell.syntax.UpdateRecordExpression"),+              Core.projectionField = (Core.Name "fields")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++valueBindingSimple :: Phantoms.TTerm Syntax.SimpleValueBinding -> Phantoms.TTerm Syntax.ValueBinding+valueBindingSimple x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.haskell.syntax.ValueBinding"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "simple"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++variable :: Phantoms.TTerm Syntax.Name -> Phantoms.TTerm Syntax.Variable+variable x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.ext.haskell.syntax.Variable"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
+ src/gen-main/haskell/Hydra/Dsl/Ext/Org/Yaml/Model.hs view
@@ -0,0 +1,79 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.ext.org.yaml.model++module Hydra.Dsl.Ext.Org.Yaml.Model where++import qualified Hydra.Core as Core+import qualified Hydra.Ext.Org.Yaml.Model as Model+import qualified Hydra.Phantoms as Phantoms+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++nodeMapping :: Phantoms.TTerm (M.Map Model.Node Model.Node) -> Phantoms.TTerm Model.Node+nodeMapping x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.org.yaml.model.Node"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "mapping"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++nodeScalar :: Phantoms.TTerm Model.Scalar -> Phantoms.TTerm Model.Node+nodeScalar x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.org.yaml.model.Node"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "scalar"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++nodeSequence :: Phantoms.TTerm [Model.Node] -> Phantoms.TTerm Model.Node+nodeSequence x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.org.yaml.model.Node"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "sequence"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++scalarBool :: Phantoms.TTerm Bool -> Phantoms.TTerm Model.Scalar+scalarBool x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.org.yaml.model.Scalar"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "bool"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++scalarFloat :: Phantoms.TTerm Double -> Phantoms.TTerm Model.Scalar+scalarFloat x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.org.yaml.model.Scalar"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "float"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++scalarInt :: Phantoms.TTerm Integer -> Phantoms.TTerm Model.Scalar+scalarInt x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.org.yaml.model.Scalar"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "int"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++scalarNull :: Phantoms.TTerm Model.Scalar+scalarNull =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.org.yaml.model.Scalar"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "null"),+        Core.fieldTerm = Core.TermUnit}}))++scalarStr :: Phantoms.TTerm String -> Phantoms.TTerm Model.Scalar+scalarStr x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.ext.org.yaml.model.Scalar"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "str"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))
+ src/gen-main/haskell/Hydra/Dsl/Graph.hs view
@@ -0,0 +1,791 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.graph++module Hydra.Dsl.Graph where++import qualified Hydra.Context as Context+import qualified Hydra.Core as Core+import qualified Hydra.Errors as Errors+import qualified Hydra.Graph as Graph+import qualified Hydra.Phantoms as Phantoms+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++graph :: Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm (M.Map Core.Name Core.TypeScheme) -> Phantoms.TTerm (M.Map Core.Name Core.TypeVariableMetadata) -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm (M.Map Core.Name Graph.Primitive) -> Phantoms.TTerm (M.Map Core.Name Core.TypeScheme) -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Graph.Graph+graph boundTerms boundTypes classConstraints lambdaVariables metadata primitives schemaTypes typeVariables =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "boundTerms"),+          Core.fieldTerm = (Phantoms.unTTerm boundTerms)},+        Core.Field {+          Core.fieldName = (Core.Name "boundTypes"),+          Core.fieldTerm = (Phantoms.unTTerm boundTypes)},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Phantoms.unTTerm classConstraints)},+        Core.Field {+          Core.fieldName = (Core.Name "lambdaVariables"),+          Core.fieldTerm = (Phantoms.unTTerm lambdaVariables)},+        Core.Field {+          Core.fieldName = (Core.Name "metadata"),+          Core.fieldTerm = (Phantoms.unTTerm metadata)},+        Core.Field {+          Core.fieldName = (Core.Name "primitives"),+          Core.fieldTerm = (Phantoms.unTTerm primitives)},+        Core.Field {+          Core.fieldName = (Core.Name "schemaTypes"),+          Core.fieldTerm = (Phantoms.unTTerm schemaTypes)},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariables"),+          Core.fieldTerm = (Phantoms.unTTerm typeVariables)}]}))++graphBoundTerms :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.Term)+graphBoundTerms x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+        Core.projectionField = (Core.Name "boundTerms")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++graphBoundTypes :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.TypeScheme)+graphBoundTypes x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+        Core.projectionField = (Core.Name "boundTypes")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++graphClassConstraints :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.TypeVariableMetadata)+graphClassConstraints x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+        Core.projectionField = (Core.Name "classConstraints")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++graphLambdaVariables :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (S.Set Core.Name)+graphLambdaVariables x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+        Core.projectionField = (Core.Name "lambdaVariables")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++graphMetadata :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.Term)+graphMetadata x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+        Core.projectionField = (Core.Name "metadata")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++graphPrimitives :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Graph.Primitive)+graphPrimitives x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+        Core.projectionField = (Core.Name "primitives")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++graphSchemaTypes :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.TypeScheme)+graphSchemaTypes x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+        Core.projectionField = (Core.Name "schemaTypes")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++graphTypeVariables :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (S.Set Core.Name)+graphTypeVariables x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+        Core.projectionField = (Core.Name "typeVariables")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++graphWithBoundTerms :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Graph.Graph+graphWithBoundTerms original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "boundTerms"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "boundTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "boundTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "classConstraints")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "lambdaVariables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "lambdaVariables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "metadata"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "metadata")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "primitives"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "primitives")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "schemaTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "schemaTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "typeVariables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++graphWithBoundTypes :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.TypeScheme) -> Phantoms.TTerm Graph.Graph+graphWithBoundTypes original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "boundTerms"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "boundTerms")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "boundTypes"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "classConstraints")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "lambdaVariables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "lambdaVariables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "metadata"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "metadata")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "primitives"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "primitives")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "schemaTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "schemaTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "typeVariables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++graphWithClassConstraints :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.TypeVariableMetadata) -> Phantoms.TTerm Graph.Graph+graphWithClassConstraints original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "boundTerms"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "boundTerms")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "boundTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "boundTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "lambdaVariables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "lambdaVariables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "metadata"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "metadata")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "primitives"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "primitives")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "schemaTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "schemaTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "typeVariables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++graphWithLambdaVariables :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Graph.Graph+graphWithLambdaVariables original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "boundTerms"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "boundTerms")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "boundTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "boundTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "classConstraints")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "lambdaVariables"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "metadata"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "metadata")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "primitives"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "primitives")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "schemaTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "schemaTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "typeVariables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++graphWithMetadata :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Graph.Graph+graphWithMetadata original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "boundTerms"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "boundTerms")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "boundTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "boundTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "classConstraints")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "lambdaVariables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "lambdaVariables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "metadata"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "primitives"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "primitives")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "schemaTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "schemaTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "typeVariables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++graphWithPrimitives :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Graph.Primitive) -> Phantoms.TTerm Graph.Graph+graphWithPrimitives original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "boundTerms"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "boundTerms")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "boundTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "boundTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "classConstraints")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "lambdaVariables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "lambdaVariables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "metadata"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "metadata")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "primitives"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "schemaTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "schemaTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "typeVariables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++graphWithSchemaTypes :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (M.Map Core.Name Core.TypeScheme) -> Phantoms.TTerm Graph.Graph+graphWithSchemaTypes original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "boundTerms"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "boundTerms")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "boundTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "boundTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "classConstraints")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "lambdaVariables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "lambdaVariables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "metadata"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "metadata")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "primitives"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "primitives")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "schemaTypes"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "typeVariables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++graphWithTypeVariables :: Phantoms.TTerm Graph.Graph -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Graph.Graph+graphWithTypeVariables original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.Graph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "boundTerms"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "boundTerms")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "boundTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "boundTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "classConstraints")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "lambdaVariables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "lambdaVariables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "metadata"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "metadata")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "primitives"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "primitives")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "schemaTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Graph"),+              Core.projectionField = (Core.Name "schemaTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeVariables"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++primitive :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm (Context.Context -> Graph.Graph -> [Core.Term] -> Either (Context.InContext Errors.Error) Core.Term) -> Phantoms.TTerm Graph.Primitive+primitive name type_ implementation =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.Primitive"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)},+        Core.Field {+          Core.fieldName = (Core.Name "implementation"),+          Core.fieldTerm = (Phantoms.unTTerm implementation)}]}))++primitiveImplementation :: Phantoms.TTerm Graph.Primitive -> Phantoms.TTerm (Context.Context -> Graph.Graph -> [Core.Term] -> Either (Context.InContext Errors.Error) Core.Term)+primitiveImplementation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),+        Core.projectionField = (Core.Name "implementation")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++primitiveName :: Phantoms.TTerm Graph.Primitive -> Phantoms.TTerm Core.Name+primitiveName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++primitiveType :: Phantoms.TTerm Graph.Primitive -> Phantoms.TTerm Core.TypeScheme+primitiveType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++primitiveWithImplementation :: Phantoms.TTerm Graph.Primitive -> Phantoms.TTerm (Context.Context -> Graph.Graph -> [Core.Term] -> Either (Context.InContext Errors.Error) Core.Term) -> Phantoms.TTerm Graph.Primitive+primitiveWithImplementation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.Primitive"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "implementation"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++primitiveWithName :: Phantoms.TTerm Graph.Primitive -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Graph.Primitive+primitiveWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.Primitive"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "implementation"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),+              Core.projectionField = (Core.Name "implementation")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++primitiveWithType :: Phantoms.TTerm Graph.Primitive -> Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm Graph.Primitive+primitiveWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.Primitive"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "implementation"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.Primitive"),+              Core.projectionField = (Core.Name "implementation")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++termCoder :: Phantoms.TTerm Core.Type -> Phantoms.TTerm (Context.Context -> Graph.Graph -> Core.Term -> Either (Context.InContext Errors.Error) a) -> Phantoms.TTerm (Context.Context -> a -> Either (Context.InContext Errors.Error) Core.Term) -> Phantoms.TTerm (Graph.TermCoder a)+termCoder type_ encode decode =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.TermCoder"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)},+        Core.Field {+          Core.fieldName = (Core.Name "encode"),+          Core.fieldTerm = (Phantoms.unTTerm encode)},+        Core.Field {+          Core.fieldName = (Core.Name "decode"),+          Core.fieldTerm = (Phantoms.unTTerm decode)}]}))++termCoderDecode :: Phantoms.TTerm (Graph.TermCoder a) -> Phantoms.TTerm (Context.Context -> a -> Either (Context.InContext Errors.Error) Core.Term)+termCoderDecode x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),+        Core.projectionField = (Core.Name "decode")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++termCoderEncode :: Phantoms.TTerm (Graph.TermCoder a) -> Phantoms.TTerm (Context.Context -> Graph.Graph -> Core.Term -> Either (Context.InContext Errors.Error) a)+termCoderEncode x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),+        Core.projectionField = (Core.Name "encode")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++termCoderType :: Phantoms.TTerm (Graph.TermCoder a) -> Phantoms.TTerm Core.Type+termCoderType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++termCoderWithDecode :: Phantoms.TTerm (Graph.TermCoder a) -> Phantoms.TTerm (Context.Context -> a -> Either (Context.InContext Errors.Error) Core.Term) -> Phantoms.TTerm (Graph.TermCoder a)+termCoderWithDecode original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.TermCoder"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encode"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),+              Core.projectionField = (Core.Name "encode")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "decode"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++termCoderWithEncode :: Phantoms.TTerm (Graph.TermCoder a) -> Phantoms.TTerm (Context.Context -> Graph.Graph -> Core.Term -> Either (Context.InContext Errors.Error) a) -> Phantoms.TTerm (Graph.TermCoder a)+termCoderWithEncode original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.TermCoder"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encode"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "decode"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),+              Core.projectionField = (Core.Name "decode")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++termCoderWithType :: Phantoms.TTerm (Graph.TermCoder a) -> Phantoms.TTerm Core.Type -> Phantoms.TTerm (Graph.TermCoder a)+termCoderWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.graph.TermCoder"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "encode"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),+              Core.projectionField = (Core.Name "encode")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "decode"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.graph.TermCoder"),+              Core.projectionField = (Core.Name "decode")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
+ src/gen-main/haskell/Hydra/Dsl/Json/Model.hs view
@@ -0,0 +1,63 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.json.model++module Hydra.Dsl.Json.Model where++import qualified Hydra.Core as Core+import qualified Hydra.Json.Model as Model+import qualified Hydra.Phantoms as Phantoms+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++valueArray :: Phantoms.TTerm [Model.Value] -> Phantoms.TTerm Model.Value+valueArray x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "array"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++valueBoolean :: Phantoms.TTerm Bool -> Phantoms.TTerm Model.Value+valueBoolean x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "boolean"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++valueNull :: Phantoms.TTerm Model.Value+valueNull =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "null"),+        Core.fieldTerm = Core.TermUnit}}))++valueNumber :: Phantoms.TTerm Double -> Phantoms.TTerm Model.Value+valueNumber x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "number"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++valueObject :: Phantoms.TTerm (M.Map String Model.Value) -> Phantoms.TTerm Model.Value+valueObject x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "object"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++valueString :: Phantoms.TTerm String -> Phantoms.TTerm Model.Value+valueString x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.json.model.Value"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "string"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))
+ src/gen-main/haskell/Hydra/Dsl/Module.hs view
@@ -0,0 +1,698 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.module++module Hydra.Dsl.Module where++import qualified Hydra.Core as Core+import qualified Hydra.Graph as Graph+import qualified Hydra.Module as Module+import qualified Hydra.Phantoms as Phantoms+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++definitionTerm :: Phantoms.TTerm Module.TermDefinition -> Phantoms.TTerm Module.Definition+definitionTerm x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.module.Definition"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "term"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++definitionType :: Phantoms.TTerm Module.TypeDefinition -> Phantoms.TTerm Module.Definition+definitionType x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.module.Definition"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "type"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++fileExtension :: Phantoms.TTerm String -> Phantoms.TTerm Module.FileExtension+fileExtension x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.module.FileExtension"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++library :: Phantoms.TTerm Module.Namespace -> Phantoms.TTerm String -> Phantoms.TTerm [Graph.Primitive] -> Phantoms.TTerm Module.Library+library namespace prefix primitives =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.Library"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Phantoms.unTTerm namespace)},+        Core.Field {+          Core.fieldName = (Core.Name "prefix"),+          Core.fieldTerm = (Phantoms.unTTerm prefix)},+        Core.Field {+          Core.fieldName = (Core.Name "primitives"),+          Core.fieldTerm = (Phantoms.unTTerm primitives)}]}))++libraryNamespace :: Phantoms.TTerm Module.Library -> Phantoms.TTerm Module.Namespace+libraryNamespace x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.Library"),+        Core.projectionField = (Core.Name "namespace")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++libraryPrefix :: Phantoms.TTerm Module.Library -> Phantoms.TTerm String+libraryPrefix x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.Library"),+        Core.projectionField = (Core.Name "prefix")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++libraryPrimitives :: Phantoms.TTerm Module.Library -> Phantoms.TTerm [Graph.Primitive]+libraryPrimitives x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.Library"),+        Core.projectionField = (Core.Name "primitives")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++libraryWithNamespace :: Phantoms.TTerm Module.Library -> Phantoms.TTerm Module.Namespace -> Phantoms.TTerm Module.Library+libraryWithNamespace original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.Library"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "prefix"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Library"),+              Core.projectionField = (Core.Name "prefix")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "primitives"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Library"),+              Core.projectionField = (Core.Name "primitives")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++libraryWithPrefix :: Phantoms.TTerm Module.Library -> Phantoms.TTerm String -> Phantoms.TTerm Module.Library+libraryWithPrefix original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.Library"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Library"),+              Core.projectionField = (Core.Name "namespace")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "prefix"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "primitives"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Library"),+              Core.projectionField = (Core.Name "primitives")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++libraryWithPrimitives :: Phantoms.TTerm Module.Library -> Phantoms.TTerm [Graph.Primitive] -> Phantoms.TTerm Module.Library+libraryWithPrimitives original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.Library"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Library"),+              Core.projectionField = (Core.Name "namespace")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "prefix"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Library"),+              Core.projectionField = (Core.Name "prefix")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "primitives"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++module_ :: Phantoms.TTerm Module.Namespace -> Phantoms.TTerm [Module.Definition] -> Phantoms.TTerm [Module.Namespace] -> Phantoms.TTerm [Module.Namespace] -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Module.Module+module_ namespace definitions termDependencies typeDependencies description =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.Module"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Phantoms.unTTerm namespace)},+        Core.Field {+          Core.fieldName = (Core.Name "definitions"),+          Core.fieldTerm = (Phantoms.unTTerm definitions)},+        Core.Field {+          Core.fieldName = (Core.Name "termDependencies"),+          Core.fieldTerm = (Phantoms.unTTerm termDependencies)},+        Core.Field {+          Core.fieldName = (Core.Name "typeDependencies"),+          Core.fieldTerm = (Phantoms.unTTerm typeDependencies)},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Phantoms.unTTerm description)}]}))++moduleDefinitions :: Phantoms.TTerm Module.Module -> Phantoms.TTerm [Module.Definition]+moduleDefinitions x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.Module"),+        Core.projectionField = (Core.Name "definitions")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++moduleDescription :: Phantoms.TTerm Module.Module -> Phantoms.TTerm (Maybe String)+moduleDescription x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.Module"),+        Core.projectionField = (Core.Name "description")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++moduleNamespace :: Phantoms.TTerm Module.Module -> Phantoms.TTerm Module.Namespace+moduleNamespace x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.Module"),+        Core.projectionField = (Core.Name "namespace")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++moduleTermDependencies :: Phantoms.TTerm Module.Module -> Phantoms.TTerm [Module.Namespace]+moduleTermDependencies x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.Module"),+        Core.projectionField = (Core.Name "termDependencies")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++moduleTypeDependencies :: Phantoms.TTerm Module.Module -> Phantoms.TTerm [Module.Namespace]+moduleTypeDependencies x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.Module"),+        Core.projectionField = (Core.Name "typeDependencies")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++moduleWithDefinitions :: Phantoms.TTerm Module.Module -> Phantoms.TTerm [Module.Definition] -> Phantoms.TTerm Module.Module+moduleWithDefinitions original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.Module"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "namespace")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "definitions"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "termDependencies"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "termDependencies")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeDependencies"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "typeDependencies")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "description")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++moduleWithDescription :: Phantoms.TTerm Module.Module -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Module.Module+moduleWithDescription original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.Module"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "namespace")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "definitions"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "definitions")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "termDependencies"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "termDependencies")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeDependencies"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "typeDependencies")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++moduleWithNamespace :: Phantoms.TTerm Module.Module -> Phantoms.TTerm Module.Namespace -> Phantoms.TTerm Module.Module+moduleWithNamespace original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.Module"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "definitions"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "definitions")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "termDependencies"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "termDependencies")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeDependencies"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "typeDependencies")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "description")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++moduleWithTermDependencies :: Phantoms.TTerm Module.Module -> Phantoms.TTerm [Module.Namespace] -> Phantoms.TTerm Module.Module+moduleWithTermDependencies original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.Module"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "namespace")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "definitions"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "definitions")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "termDependencies"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "typeDependencies"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "typeDependencies")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "description")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++moduleWithTypeDependencies :: Phantoms.TTerm Module.Module -> Phantoms.TTerm [Module.Namespace] -> Phantoms.TTerm Module.Module+moduleWithTypeDependencies original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.Module"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "namespace")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "definitions"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "definitions")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "termDependencies"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "termDependencies")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "typeDependencies"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Module"),+              Core.projectionField = (Core.Name "description")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++namespace :: Phantoms.TTerm String -> Phantoms.TTerm Module.Namespace+namespace x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.module.Namespace"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++namespaces :: Phantoms.TTerm (Module.Namespace, n) -> Phantoms.TTerm (M.Map Module.Namespace n) -> Phantoms.TTerm (Module.Namespaces n)+namespaces focus mapping =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.Namespaces"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "focus"),+          Core.fieldTerm = (Phantoms.unTTerm focus)},+        Core.Field {+          Core.fieldName = (Core.Name "mapping"),+          Core.fieldTerm = (Phantoms.unTTerm mapping)}]}))++namespacesFocus :: Phantoms.TTerm (Module.Namespaces n) -> Phantoms.TTerm (Module.Namespace, n)+namespacesFocus x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.Namespaces"),+        Core.projectionField = (Core.Name "focus")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++namespacesMapping :: Phantoms.TTerm (Module.Namespaces n) -> Phantoms.TTerm (M.Map Module.Namespace n)+namespacesMapping x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.Namespaces"),+        Core.projectionField = (Core.Name "mapping")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++namespacesWithFocus :: Phantoms.TTerm (Module.Namespaces n) -> Phantoms.TTerm (Module.Namespace, n) -> Phantoms.TTerm (Module.Namespaces n)+namespacesWithFocus original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.Namespaces"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "focus"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "mapping"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Namespaces"),+              Core.projectionField = (Core.Name "mapping")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++namespacesWithMapping :: Phantoms.TTerm (Module.Namespaces n) -> Phantoms.TTerm (M.Map Module.Namespace n) -> Phantoms.TTerm (Module.Namespaces n)+namespacesWithMapping original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.Namespaces"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "focus"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.Namespaces"),+              Core.projectionField = (Core.Name "focus")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "mapping"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++qualifiedName :: Phantoms.TTerm (Maybe Module.Namespace) -> Phantoms.TTerm String -> Phantoms.TTerm Module.QualifiedName+qualifiedName namespace local =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.QualifiedName"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Phantoms.unTTerm namespace)},+        Core.Field {+          Core.fieldName = (Core.Name "local"),+          Core.fieldTerm = (Phantoms.unTTerm local)}]}))++qualifiedNameLocal :: Phantoms.TTerm Module.QualifiedName -> Phantoms.TTerm String+qualifiedNameLocal x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.QualifiedName"),+        Core.projectionField = (Core.Name "local")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++qualifiedNameNamespace :: Phantoms.TTerm Module.QualifiedName -> Phantoms.TTerm (Maybe Module.Namespace)+qualifiedNameNamespace x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.QualifiedName"),+        Core.projectionField = (Core.Name "namespace")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++qualifiedNameWithLocal :: Phantoms.TTerm Module.QualifiedName -> Phantoms.TTerm String -> Phantoms.TTerm Module.QualifiedName+qualifiedNameWithLocal original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.QualifiedName"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.QualifiedName"),+              Core.projectionField = (Core.Name "namespace")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "local"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++qualifiedNameWithNamespace :: Phantoms.TTerm Module.QualifiedName -> Phantoms.TTerm (Maybe Module.Namespace) -> Phantoms.TTerm Module.QualifiedName+qualifiedNameWithNamespace original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.QualifiedName"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespace"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "local"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.QualifiedName"),+              Core.projectionField = (Core.Name "local")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++termDefinition :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Term -> Phantoms.TTerm (Maybe Core.TypeScheme) -> Phantoms.TTerm Module.TermDefinition+termDefinition name term type_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.TermDefinition"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Phantoms.unTTerm term)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))++termDefinitionName :: Phantoms.TTerm Module.TermDefinition -> Phantoms.TTerm Core.Name+termDefinitionName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.TermDefinition"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++termDefinitionTerm :: Phantoms.TTerm Module.TermDefinition -> Phantoms.TTerm Core.Term+termDefinitionTerm x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.TermDefinition"),+        Core.projectionField = (Core.Name "term")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++termDefinitionType :: Phantoms.TTerm Module.TermDefinition -> Phantoms.TTerm (Maybe Core.TypeScheme)+termDefinitionType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.TermDefinition"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++termDefinitionWithName :: Phantoms.TTerm Module.TermDefinition -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Module.TermDefinition+termDefinitionWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.TermDefinition"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.TermDefinition"),+              Core.projectionField = (Core.Name "term")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.TermDefinition"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++termDefinitionWithTerm :: Phantoms.TTerm Module.TermDefinition -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Module.TermDefinition+termDefinitionWithTerm original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.TermDefinition"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.TermDefinition"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.TermDefinition"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++termDefinitionWithType :: Phantoms.TTerm Module.TermDefinition -> Phantoms.TTerm (Maybe Core.TypeScheme) -> Phantoms.TTerm Module.TermDefinition+termDefinitionWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.TermDefinition"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.TermDefinition"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.TermDefinition"),+              Core.projectionField = (Core.Name "term")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeDefinition :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Module.TypeDefinition+typeDefinition name type_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.TypeDefinition"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))++typeDefinitionName :: Phantoms.TTerm Module.TypeDefinition -> Phantoms.TTerm Core.Name+typeDefinitionName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.TypeDefinition"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeDefinitionType :: Phantoms.TTerm Module.TypeDefinition -> Phantoms.TTerm Core.Type+typeDefinitionType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.module.TypeDefinition"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeDefinitionWithName :: Phantoms.TTerm Module.TypeDefinition -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Module.TypeDefinition+typeDefinitionWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.TypeDefinition"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.TypeDefinition"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeDefinitionWithType :: Phantoms.TTerm Module.TypeDefinition -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Module.TypeDefinition+typeDefinitionWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.module.TypeDefinition"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.module.TypeDefinition"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++unFileExtension :: Phantoms.TTerm Module.FileExtension -> Phantoms.TTerm String+unFileExtension x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.module.FileExtension")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unNamespace :: Phantoms.TTerm Module.Namespace -> Phantoms.TTerm String+unNamespace x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.module.Namespace")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))
+ src/gen-main/haskell/Hydra/Dsl/Packaging.hs view
@@ -0,0 +1,198 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.packaging++module Hydra.Dsl.Packaging where++import qualified Hydra.Core as Core+import qualified Hydra.Module as Module+import qualified Hydra.Packaging as Packaging+import qualified Hydra.Phantoms as Phantoms+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++package :: Phantoms.TTerm Packaging.PackageName -> Phantoms.TTerm [Module.Module] -> Phantoms.TTerm [Packaging.PackageName] -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Packaging.Package+package name modules dependencies description =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.packaging.Package"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "modules"),+          Core.fieldTerm = (Phantoms.unTTerm modules)},+        Core.Field {+          Core.fieldName = (Core.Name "dependencies"),+          Core.fieldTerm = (Phantoms.unTTerm dependencies)},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Phantoms.unTTerm description)}]}))++packageDependencies :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm [Packaging.PackageName]+packageDependencies x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+        Core.projectionField = (Core.Name "dependencies")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++packageDescription :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm (Maybe String)+packageDescription x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+        Core.projectionField = (Core.Name "description")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++packageModules :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm [Module.Module]+packageModules x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+        Core.projectionField = (Core.Name "modules")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++packageName :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm Packaging.PackageName+packageName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++packageName_ :: Phantoms.TTerm String -> Phantoms.TTerm Packaging.PackageName+packageName_ x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.packaging.PackageName"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++packageWithDependencies :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm [Packaging.PackageName] -> Phantoms.TTerm Packaging.Package+packageWithDependencies original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.packaging.Package"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "modules"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+              Core.projectionField = (Core.Name "modules")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "dependencies"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+              Core.projectionField = (Core.Name "description")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++packageWithDescription :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Packaging.Package+packageWithDescription original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.packaging.Package"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "modules"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+              Core.projectionField = (Core.Name "modules")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "dependencies"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+              Core.projectionField = (Core.Name "dependencies")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++packageWithModules :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm [Module.Module] -> Phantoms.TTerm Packaging.Package+packageWithModules original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.packaging.Package"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "modules"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "dependencies"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+              Core.projectionField = (Core.Name "dependencies")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+              Core.projectionField = (Core.Name "description")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++packageWithName :: Phantoms.TTerm Packaging.Package -> Phantoms.TTerm Packaging.PackageName -> Phantoms.TTerm Packaging.Package+packageWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.packaging.Package"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "modules"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+              Core.projectionField = (Core.Name "modules")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "dependencies"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+              Core.projectionField = (Core.Name "dependencies")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.packaging.Package"),+              Core.projectionField = (Core.Name "description")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++unPackageName :: Phantoms.TTerm Packaging.PackageName -> Phantoms.TTerm String+unPackageName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.packaging.PackageName")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))
+ src/gen-main/haskell/Hydra/Dsl/Parsing.hs view
@@ -0,0 +1,163 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.parsing++module Hydra.Dsl.Parsing where++import qualified Hydra.Core as Core+import qualified Hydra.Parsing as Parsing+import qualified Hydra.Phantoms as Phantoms+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++parseError :: Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Parsing.ParseError+parseError message remainder =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.parsing.ParseError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "message"),+          Core.fieldTerm = (Phantoms.unTTerm message)},+        Core.Field {+          Core.fieldName = (Core.Name "remainder"),+          Core.fieldTerm = (Phantoms.unTTerm remainder)}]}))++parseErrorMessage :: Phantoms.TTerm Parsing.ParseError -> Phantoms.TTerm String+parseErrorMessage x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.parsing.ParseError"),+        Core.projectionField = (Core.Name "message")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++parseErrorRemainder :: Phantoms.TTerm Parsing.ParseError -> Phantoms.TTerm String+parseErrorRemainder x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.parsing.ParseError"),+        Core.projectionField = (Core.Name "remainder")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++parseErrorWithMessage :: Phantoms.TTerm Parsing.ParseError -> Phantoms.TTerm String -> Phantoms.TTerm Parsing.ParseError+parseErrorWithMessage original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.parsing.ParseError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "message"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "remainder"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.parsing.ParseError"),+              Core.projectionField = (Core.Name "remainder")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++parseErrorWithRemainder :: Phantoms.TTerm Parsing.ParseError -> Phantoms.TTerm String -> Phantoms.TTerm Parsing.ParseError+parseErrorWithRemainder original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.parsing.ParseError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "message"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.parsing.ParseError"),+              Core.projectionField = (Core.Name "message")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "remainder"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++parseResultFailure :: Phantoms.TTerm Parsing.ParseError -> Phantoms.TTerm (Parsing.ParseResult a)+parseResultFailure x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.parsing.ParseResult"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "failure"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++parseResultSuccess :: Phantoms.TTerm (Parsing.ParseSuccess a) -> Phantoms.TTerm (Parsing.ParseResult a)+parseResultSuccess x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.parsing.ParseResult"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "success"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++parseSuccess :: Phantoms.TTerm a -> Phantoms.TTerm String -> Phantoms.TTerm (Parsing.ParseSuccess a)+parseSuccess value remainder =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.parsing.ParseSuccess"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "value"),+          Core.fieldTerm = (Phantoms.unTTerm value)},+        Core.Field {+          Core.fieldName = (Core.Name "remainder"),+          Core.fieldTerm = (Phantoms.unTTerm remainder)}]}))++parseSuccessRemainder :: Phantoms.TTerm (Parsing.ParseSuccess a) -> Phantoms.TTerm String+parseSuccessRemainder x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.parsing.ParseSuccess"),+        Core.projectionField = (Core.Name "remainder")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++parseSuccessValue :: Phantoms.TTerm (Parsing.ParseSuccess a) -> Phantoms.TTerm a+parseSuccessValue x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.parsing.ParseSuccess"),+        Core.projectionField = (Core.Name "value")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++parseSuccessWithRemainder :: Phantoms.TTerm (Parsing.ParseSuccess a) -> Phantoms.TTerm String -> Phantoms.TTerm (Parsing.ParseSuccess a)+parseSuccessWithRemainder original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.parsing.ParseSuccess"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "value"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.parsing.ParseSuccess"),+              Core.projectionField = (Core.Name "value")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "remainder"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++parseSuccessWithValue :: Phantoms.TTerm (Parsing.ParseSuccess a) -> Phantoms.TTerm a -> Phantoms.TTerm (Parsing.ParseSuccess a)+parseSuccessWithValue original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.parsing.ParseSuccess"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "value"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "remainder"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.parsing.ParseSuccess"),+              Core.projectionField = (Core.Name "remainder")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++parser :: Phantoms.TTerm (String -> Parsing.ParseResult a) -> Phantoms.TTerm (Parsing.Parser a)+parser x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.parsing.Parser"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++unParser :: Phantoms.TTerm (Parsing.Parser a) -> Phantoms.TTerm (String -> Parsing.ParseResult a)+unParser x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.parsing.Parser")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))
+ src/gen-main/haskell/Hydra/Dsl/Paths.hs view
@@ -0,0 +1,895 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.paths++module Hydra.Dsl.Paths where++import qualified Hydra.Core as Core+import qualified Hydra.Paths as Paths+import qualified Hydra.Phantoms as Phantoms+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++subtermEdge :: Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm Paths.SubtermEdge+subtermEdge source path target =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtermEdge"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "source"),+          Core.fieldTerm = (Phantoms.unTTerm source)},+        Core.Field {+          Core.fieldName = (Core.Name "path"),+          Core.fieldTerm = (Phantoms.unTTerm path)},+        Core.Field {+          Core.fieldName = (Core.Name "target"),+          Core.fieldTerm = (Phantoms.unTTerm target)}]}))++subtermEdgePath :: Phantoms.TTerm Paths.SubtermEdge -> Phantoms.TTerm Paths.SubtermPath+subtermEdgePath x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),+        Core.projectionField = (Core.Name "path")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtermEdgeSource :: Phantoms.TTerm Paths.SubtermEdge -> Phantoms.TTerm Paths.SubtermNode+subtermEdgeSource x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),+        Core.projectionField = (Core.Name "source")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtermEdgeTarget :: Phantoms.TTerm Paths.SubtermEdge -> Phantoms.TTerm Paths.SubtermNode+subtermEdgeTarget x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),+        Core.projectionField = (Core.Name "target")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtermEdgeWithPath :: Phantoms.TTerm Paths.SubtermEdge -> Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm Paths.SubtermEdge+subtermEdgeWithPath original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtermEdge"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "source"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),+              Core.projectionField = (Core.Name "source")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "path"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "target"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),+              Core.projectionField = (Core.Name "target")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++subtermEdgeWithSource :: Phantoms.TTerm Paths.SubtermEdge -> Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm Paths.SubtermEdge+subtermEdgeWithSource original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtermEdge"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "source"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "path"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),+              Core.projectionField = (Core.Name "path")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "target"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),+              Core.projectionField = (Core.Name "target")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++subtermEdgeWithTarget :: Phantoms.TTerm Paths.SubtermEdge -> Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm Paths.SubtermEdge+subtermEdgeWithTarget original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtermEdge"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "source"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),+              Core.projectionField = (Core.Name "source")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "path"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermEdge"),+              Core.projectionField = (Core.Name "path")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "target"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++subtermGraph :: Phantoms.TTerm [Paths.SubtermNode] -> Phantoms.TTerm [Paths.SubtermEdge] -> Phantoms.TTerm Paths.SubtermGraph+subtermGraph nodes edges =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtermGraph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "nodes"),+          Core.fieldTerm = (Phantoms.unTTerm nodes)},+        Core.Field {+          Core.fieldName = (Core.Name "edges"),+          Core.fieldTerm = (Phantoms.unTTerm edges)}]}))++subtermGraphEdges :: Phantoms.TTerm Paths.SubtermGraph -> Phantoms.TTerm [Paths.SubtermEdge]+subtermGraphEdges x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermGraph"),+        Core.projectionField = (Core.Name "edges")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtermGraphNodes :: Phantoms.TTerm Paths.SubtermGraph -> Phantoms.TTerm [Paths.SubtermNode]+subtermGraphNodes x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermGraph"),+        Core.projectionField = (Core.Name "nodes")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtermGraphWithEdges :: Phantoms.TTerm Paths.SubtermGraph -> Phantoms.TTerm [Paths.SubtermEdge] -> Phantoms.TTerm Paths.SubtermGraph+subtermGraphWithEdges original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtermGraph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "nodes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermGraph"),+              Core.projectionField = (Core.Name "nodes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "edges"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++subtermGraphWithNodes :: Phantoms.TTerm Paths.SubtermGraph -> Phantoms.TTerm [Paths.SubtermNode] -> Phantoms.TTerm Paths.SubtermGraph+subtermGraphWithNodes original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtermGraph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "nodes"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "edges"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermGraph"),+              Core.projectionField = (Core.Name "edges")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++subtermNode :: Phantoms.TTerm Core.Name -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Paths.SubtermNode+subtermNode name label id =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtermNode"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "label"),+          Core.fieldTerm = (Phantoms.unTTerm label)},+        Core.Field {+          Core.fieldName = (Core.Name "id"),+          Core.fieldTerm = (Phantoms.unTTerm id)}]}))++subtermNodeId :: Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm String+subtermNodeId x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),+        Core.projectionField = (Core.Name "id")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtermNodeLabel :: Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm String+subtermNodeLabel x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),+        Core.projectionField = (Core.Name "label")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtermNodeName :: Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm Core.Name+subtermNodeName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtermNodeWithId :: Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm String -> Phantoms.TTerm Paths.SubtermNode+subtermNodeWithId original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtermNode"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "label"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),+              Core.projectionField = (Core.Name "label")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "id"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++subtermNodeWithLabel :: Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm String -> Phantoms.TTerm Paths.SubtermNode+subtermNodeWithLabel original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtermNode"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "label"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "id"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),+              Core.projectionField = (Core.Name "id")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++subtermNodeWithName :: Phantoms.TTerm Paths.SubtermNode -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Paths.SubtermNode+subtermNodeWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtermNode"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "label"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),+              Core.projectionField = (Core.Name "label")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "id"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtermNode"),+              Core.projectionField = (Core.Name "id")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++subtermPath :: Phantoms.TTerm [Paths.SubtermStep] -> Phantoms.TTerm Paths.SubtermPath+subtermPath x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.paths.SubtermPath"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++subtermStepAnnotatedBody :: Phantoms.TTerm Paths.SubtermStep+subtermStepAnnotatedBody =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "annotatedBody"),+        Core.fieldTerm = Core.TermUnit}}))++subtermStepApplicationArgument :: Phantoms.TTerm Paths.SubtermStep+subtermStepApplicationArgument =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "applicationArgument"),+        Core.fieldTerm = Core.TermUnit}}))++subtermStepApplicationFunction :: Phantoms.TTerm Paths.SubtermStep+subtermStepApplicationFunction =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "applicationFunction"),+        Core.fieldTerm = Core.TermUnit}}))++subtermStepInjectionTerm :: Phantoms.TTerm Paths.SubtermStep+subtermStepInjectionTerm =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "injectionTerm"),+        Core.fieldTerm = Core.TermUnit}}))++subtermStepLambdaBody :: Phantoms.TTerm Paths.SubtermStep+subtermStepLambdaBody =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "lambdaBody"),+        Core.fieldTerm = Core.TermUnit}}))++subtermStepLetBinding :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Paths.SubtermStep+subtermStepLetBinding x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "letBinding"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++subtermStepLetBody :: Phantoms.TTerm Paths.SubtermStep+subtermStepLetBody =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "letBody"),+        Core.fieldTerm = Core.TermUnit}}))++subtermStepListElement :: Phantoms.TTerm Int -> Phantoms.TTerm Paths.SubtermStep+subtermStepListElement x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "listElement"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++subtermStepMapKey :: Phantoms.TTerm Int -> Phantoms.TTerm Paths.SubtermStep+subtermStepMapKey x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "mapKey"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++subtermStepMapValue :: Phantoms.TTerm Int -> Phantoms.TTerm Paths.SubtermStep+subtermStepMapValue x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "mapValue"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++subtermStepMaybeTerm :: Phantoms.TTerm Paths.SubtermStep+subtermStepMaybeTerm =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "maybeTerm"),+        Core.fieldTerm = Core.TermUnit}}))++subtermStepProductTerm :: Phantoms.TTerm Int -> Phantoms.TTerm Paths.SubtermStep+subtermStepProductTerm x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "productTerm"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++subtermStepRecordField :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Paths.SubtermStep+subtermStepRecordField x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "recordField"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++subtermStepSetElement :: Phantoms.TTerm Int -> Phantoms.TTerm Paths.SubtermStep+subtermStepSetElement x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "setElement"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++subtermStepSumTerm :: Phantoms.TTerm Paths.SubtermStep+subtermStepSumTerm =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "sumTerm"),+        Core.fieldTerm = Core.TermUnit}}))++subtermStepTypeApplicationTerm :: Phantoms.TTerm Paths.SubtermStep+subtermStepTypeApplicationTerm =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typeApplicationTerm"),+        Core.fieldTerm = Core.TermUnit}}))++subtermStepTypeLambdaBody :: Phantoms.TTerm Paths.SubtermStep+subtermStepTypeLambdaBody =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typeLambdaBody"),+        Core.fieldTerm = Core.TermUnit}}))++subtermStepUnionCasesBranch :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Paths.SubtermStep+subtermStepUnionCasesBranch x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unionCasesBranch"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++subtermStepUnionCasesDefault :: Phantoms.TTerm Paths.SubtermStep+subtermStepUnionCasesDefault =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unionCasesDefault"),+        Core.fieldTerm = Core.TermUnit}}))++subtermStepWrappedTerm :: Phantoms.TTerm Paths.SubtermStep+subtermStepWrappedTerm =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtermStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "wrappedTerm"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeEdge :: Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm Paths.SubtypePath -> Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm Paths.SubtypeEdge+subtypeEdge source path target =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeEdge"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "source"),+          Core.fieldTerm = (Phantoms.unTTerm source)},+        Core.Field {+          Core.fieldName = (Core.Name "path"),+          Core.fieldTerm = (Phantoms.unTTerm path)},+        Core.Field {+          Core.fieldName = (Core.Name "target"),+          Core.fieldTerm = (Phantoms.unTTerm target)}]}))++subtypeEdgePath :: Phantoms.TTerm Paths.SubtypeEdge -> Phantoms.TTerm Paths.SubtypePath+subtypeEdgePath x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),+        Core.projectionField = (Core.Name "path")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtypeEdgeSource :: Phantoms.TTerm Paths.SubtypeEdge -> Phantoms.TTerm Paths.SubtypeNode+subtypeEdgeSource x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),+        Core.projectionField = (Core.Name "source")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtypeEdgeTarget :: Phantoms.TTerm Paths.SubtypeEdge -> Phantoms.TTerm Paths.SubtypeNode+subtypeEdgeTarget x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),+        Core.projectionField = (Core.Name "target")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtypeEdgeWithPath :: Phantoms.TTerm Paths.SubtypeEdge -> Phantoms.TTerm Paths.SubtypePath -> Phantoms.TTerm Paths.SubtypeEdge+subtypeEdgeWithPath original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeEdge"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "source"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),+              Core.projectionField = (Core.Name "source")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "path"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "target"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),+              Core.projectionField = (Core.Name "target")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++subtypeEdgeWithSource :: Phantoms.TTerm Paths.SubtypeEdge -> Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm Paths.SubtypeEdge+subtypeEdgeWithSource original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeEdge"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "source"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "path"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),+              Core.projectionField = (Core.Name "path")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "target"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),+              Core.projectionField = (Core.Name "target")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++subtypeEdgeWithTarget :: Phantoms.TTerm Paths.SubtypeEdge -> Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm Paths.SubtypeEdge+subtypeEdgeWithTarget original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeEdge"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "source"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),+              Core.projectionField = (Core.Name "source")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "path"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeEdge"),+              Core.projectionField = (Core.Name "path")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "target"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++subtypeGraph :: Phantoms.TTerm [Paths.SubtypeNode] -> Phantoms.TTerm [Paths.SubtypeEdge] -> Phantoms.TTerm Paths.SubtypeGraph+subtypeGraph nodes edges =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeGraph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "nodes"),+          Core.fieldTerm = (Phantoms.unTTerm nodes)},+        Core.Field {+          Core.fieldName = (Core.Name "edges"),+          Core.fieldTerm = (Phantoms.unTTerm edges)}]}))++subtypeGraphEdges :: Phantoms.TTerm Paths.SubtypeGraph -> Phantoms.TTerm [Paths.SubtypeEdge]+subtypeGraphEdges x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeGraph"),+        Core.projectionField = (Core.Name "edges")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtypeGraphNodes :: Phantoms.TTerm Paths.SubtypeGraph -> Phantoms.TTerm [Paths.SubtypeNode]+subtypeGraphNodes x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeGraph"),+        Core.projectionField = (Core.Name "nodes")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtypeGraphWithEdges :: Phantoms.TTerm Paths.SubtypeGraph -> Phantoms.TTerm [Paths.SubtypeEdge] -> Phantoms.TTerm Paths.SubtypeGraph+subtypeGraphWithEdges original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeGraph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "nodes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeGraph"),+              Core.projectionField = (Core.Name "nodes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "edges"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++subtypeGraphWithNodes :: Phantoms.TTerm Paths.SubtypeGraph -> Phantoms.TTerm [Paths.SubtypeNode] -> Phantoms.TTerm Paths.SubtypeGraph+subtypeGraphWithNodes original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeGraph"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "nodes"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "edges"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeGraph"),+              Core.projectionField = (Core.Name "edges")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++subtypeNode :: Phantoms.TTerm Core.Name -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Paths.SubtypeNode+subtypeNode name label id =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeNode"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "label"),+          Core.fieldTerm = (Phantoms.unTTerm label)},+        Core.Field {+          Core.fieldName = (Core.Name "id"),+          Core.fieldTerm = (Phantoms.unTTerm id)}]}))++subtypeNodeId :: Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm String+subtypeNodeId x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),+        Core.projectionField = (Core.Name "id")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtypeNodeLabel :: Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm String+subtypeNodeLabel x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),+        Core.projectionField = (Core.Name "label")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtypeNodeName :: Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm Core.Name+subtypeNodeName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++subtypeNodeWithId :: Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm String -> Phantoms.TTerm Paths.SubtypeNode+subtypeNodeWithId original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeNode"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "label"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),+              Core.projectionField = (Core.Name "label")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "id"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++subtypeNodeWithLabel :: Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm String -> Phantoms.TTerm Paths.SubtypeNode+subtypeNodeWithLabel original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeNode"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "label"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "id"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),+              Core.projectionField = (Core.Name "id")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++subtypeNodeWithName :: Phantoms.TTerm Paths.SubtypeNode -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Paths.SubtypeNode+subtypeNodeWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.paths.SubtypeNode"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "label"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),+              Core.projectionField = (Core.Name "label")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "id"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.paths.SubtypeNode"),+              Core.projectionField = (Core.Name "id")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++subtypePath :: Phantoms.TTerm [Paths.SubtypeStep] -> Phantoms.TTerm Paths.SubtypePath+subtypePath x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.paths.SubtypePath"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++subtypeStepAnnotatedBody :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepAnnotatedBody =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "annotatedBody"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepApplicationArgument :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepApplicationArgument =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "applicationArgument"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepApplicationFunction :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepApplicationFunction =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "applicationFunction"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepEitherLeft :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepEitherLeft =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "eitherLeft"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepEitherRight :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepEitherRight =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "eitherRight"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepForallBody :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepForallBody =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "forallBody"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepFunctionCodomain :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepFunctionCodomain =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "functionCodomain"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepFunctionDomain :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepFunctionDomain =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "functionDomain"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepListElement :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepListElement =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "listElement"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepMapKeys :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepMapKeys =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "mapKeys"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepMapValues :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepMapValues =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "mapValues"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepMaybeElement :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepMaybeElement =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "maybeElement"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepPairFirst :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepPairFirst =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "pairFirst"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepPairSecond :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepPairSecond =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "pairSecond"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepRecordField :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Paths.SubtypeStep+subtypeStepRecordField x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "recordField"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++subtypeStepSetElement :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepSetElement =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "setElement"),+        Core.fieldTerm = Core.TermUnit}}))++subtypeStepUnionField :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Paths.SubtypeStep+subtypeStepUnionField x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unionField"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++subtypeStepWrappedType :: Phantoms.TTerm Paths.SubtypeStep+subtypeStepWrappedType =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.paths.SubtypeStep"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "wrappedType"),+        Core.fieldTerm = Core.TermUnit}}))++unSubtermPath :: Phantoms.TTerm Paths.SubtermPath -> Phantoms.TTerm [Paths.SubtermStep]+unSubtermPath x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.paths.SubtermPath")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unSubtypePath :: Phantoms.TTerm Paths.SubtypePath -> Phantoms.TTerm [Paths.SubtypeStep]+unSubtypePath x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.paths.SubtypePath")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))
+ src/gen-main/haskell/Hydra/Dsl/Query.hs view
@@ -0,0 +1,819 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.query++module Hydra.Dsl.Query where++import qualified Hydra.Core as Core+import qualified Hydra.Phantoms as Phantoms+import qualified Hydra.Query as Query+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++comparisonConstraintEqual :: Phantoms.TTerm Query.ComparisonConstraint+comparisonConstraintEqual =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "equal"),+        Core.fieldTerm = Core.TermUnit}}))++comparisonConstraintGreaterThan :: Phantoms.TTerm Query.ComparisonConstraint+comparisonConstraintGreaterThan =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "greaterThan"),+        Core.fieldTerm = Core.TermUnit}}))++comparisonConstraintGreaterThanOrEqual :: Phantoms.TTerm Query.ComparisonConstraint+comparisonConstraintGreaterThanOrEqual =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "greaterThanOrEqual"),+        Core.fieldTerm = Core.TermUnit}}))++comparisonConstraintLessThan :: Phantoms.TTerm Query.ComparisonConstraint+comparisonConstraintLessThan =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "lessThan"),+        Core.fieldTerm = Core.TermUnit}}))++comparisonConstraintLessThanOrEqual :: Phantoms.TTerm Query.ComparisonConstraint+comparisonConstraintLessThanOrEqual =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "lessThanOrEqual"),+        Core.fieldTerm = Core.TermUnit}}))++comparisonConstraintNotEqual :: Phantoms.TTerm Query.ComparisonConstraint+comparisonConstraintNotEqual =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.ComparisonConstraint"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "notEqual"),+        Core.fieldTerm = Core.TermUnit}}))++edge :: Phantoms.TTerm Core.Name -> Phantoms.TTerm (Maybe Core.Name) -> Phantoms.TTerm (Maybe Core.Name) -> Phantoms.TTerm Query.Edge+edge type_ out in_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.Edge"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)},+        Core.Field {+          Core.fieldName = (Core.Name "out"),+          Core.fieldTerm = (Phantoms.unTTerm out)},+        Core.Field {+          Core.fieldName = (Core.Name "in"),+          Core.fieldTerm = (Phantoms.unTTerm in_)}]}))++edgeIn :: Phantoms.TTerm Query.Edge -> Phantoms.TTerm (Maybe Core.Name)+edgeIn x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.Edge"),+        Core.projectionField = (Core.Name "in")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++edgeOut :: Phantoms.TTerm Query.Edge -> Phantoms.TTerm (Maybe Core.Name)+edgeOut x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.Edge"),+        Core.projectionField = (Core.Name "out")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++edgeType :: Phantoms.TTerm Query.Edge -> Phantoms.TTerm Core.Name+edgeType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.Edge"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++edgeWithIn :: Phantoms.TTerm Query.Edge -> Phantoms.TTerm (Maybe Core.Name) -> Phantoms.TTerm Query.Edge+edgeWithIn original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.Edge"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.Edge"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "out"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.Edge"),+              Core.projectionField = (Core.Name "out")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "in"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++edgeWithOut :: Phantoms.TTerm Query.Edge -> Phantoms.TTerm (Maybe Core.Name) -> Phantoms.TTerm Query.Edge+edgeWithOut original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.Edge"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.Edge"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "out"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "in"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.Edge"),+              Core.projectionField = (Core.Name "in")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++edgeWithType :: Phantoms.TTerm Query.Edge -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Query.Edge+edgeWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.Edge"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "out"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.Edge"),+              Core.projectionField = (Core.Name "out")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "in"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.Edge"),+              Core.projectionField = (Core.Name "in")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++graphPattern :: Phantoms.TTerm Core.Name -> Phantoms.TTerm [Query.Pattern] -> Phantoms.TTerm Query.GraphPattern+graphPattern graph patterns =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.GraphPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "graph"),+          Core.fieldTerm = (Phantoms.unTTerm graph)},+        Core.Field {+          Core.fieldName = (Core.Name "patterns"),+          Core.fieldTerm = (Phantoms.unTTerm patterns)}]}))++graphPatternGraph :: Phantoms.TTerm Query.GraphPattern -> Phantoms.TTerm Core.Name+graphPatternGraph x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.GraphPattern"),+        Core.projectionField = (Core.Name "graph")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++graphPatternPatterns :: Phantoms.TTerm Query.GraphPattern -> Phantoms.TTerm [Query.Pattern]+graphPatternPatterns x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.GraphPattern"),+        Core.projectionField = (Core.Name "patterns")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++graphPatternWithGraph :: Phantoms.TTerm Query.GraphPattern -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Query.GraphPattern+graphPatternWithGraph original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.GraphPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "graph"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "patterns"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.GraphPattern"),+              Core.projectionField = (Core.Name "patterns")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++graphPatternWithPatterns :: Phantoms.TTerm Query.GraphPattern -> Phantoms.TTerm [Query.Pattern] -> Phantoms.TTerm Query.GraphPattern+graphPatternWithPatterns original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.GraphPattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "graph"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.GraphPattern"),+              Core.projectionField = (Core.Name "graph")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "patterns"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++nodeTerm :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Query.Node+nodeTerm x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.Node"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "term"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++nodeVariable :: Phantoms.TTerm Query.Variable -> Phantoms.TTerm Query.Node+nodeVariable x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.Node"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "variable"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++nodeWildcard :: Phantoms.TTerm Query.Node+nodeWildcard =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.Node"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "wildcard"),+        Core.fieldTerm = Core.TermUnit}}))++pathEquation :: Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.PathEquation+pathEquation left right =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.PathEquation"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Phantoms.unTTerm left)},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Phantoms.unTTerm right)}]}))++pathEquationLeft :: Phantoms.TTerm Query.PathEquation -> Phantoms.TTerm Query.Path+pathEquationLeft x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.PathEquation"),+        Core.projectionField = (Core.Name "left")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++pathEquationRight :: Phantoms.TTerm Query.PathEquation -> Phantoms.TTerm Query.Path+pathEquationRight x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.PathEquation"),+        Core.projectionField = (Core.Name "right")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++pathEquationWithLeft :: Phantoms.TTerm Query.PathEquation -> Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.PathEquation+pathEquationWithLeft original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.PathEquation"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.PathEquation"),+              Core.projectionField = (Core.Name "right")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++pathEquationWithRight :: Phantoms.TTerm Query.PathEquation -> Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.PathEquation+pathEquationWithRight original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.PathEquation"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.PathEquation"),+              Core.projectionField = (Core.Name "left")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++pathInverse :: Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.Path+pathInverse x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.Path"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "inverse"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++pathRegex :: Phantoms.TTerm Query.RegexSequence -> Phantoms.TTerm Query.Path+pathRegex x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.Path"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "regex"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++pathStep :: Phantoms.TTerm Query.Step -> Phantoms.TTerm Query.Path+pathStep x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.Path"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "step"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++patternConjunction :: Phantoms.TTerm [Query.Pattern] -> Phantoms.TTerm Query.Pattern+patternConjunction x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "conjunction"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++patternDisjunction :: Phantoms.TTerm [Query.Pattern] -> Phantoms.TTerm Query.Pattern+patternDisjunction x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "disjunction"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++patternGraph :: Phantoms.TTerm Query.GraphPattern -> Phantoms.TTerm Query.Pattern+patternGraph x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "graph"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++patternImplication :: Phantoms.TTerm Query.Pattern -> Phantoms.TTerm Query.Pattern -> Phantoms.TTerm Query.PatternImplication+patternImplication antecedent consequent =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.PatternImplication"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "antecedent"),+          Core.fieldTerm = (Phantoms.unTTerm antecedent)},+        Core.Field {+          Core.fieldName = (Core.Name "consequent"),+          Core.fieldTerm = (Phantoms.unTTerm consequent)}]}))++patternImplicationAntecedent :: Phantoms.TTerm Query.PatternImplication -> Phantoms.TTerm Query.Pattern+patternImplicationAntecedent x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.PatternImplication"),+        Core.projectionField = (Core.Name "antecedent")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++patternImplicationConsequent :: Phantoms.TTerm Query.PatternImplication -> Phantoms.TTerm Query.Pattern+patternImplicationConsequent x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.PatternImplication"),+        Core.projectionField = (Core.Name "consequent")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++patternImplicationWithAntecedent :: Phantoms.TTerm Query.PatternImplication -> Phantoms.TTerm Query.Pattern -> Phantoms.TTerm Query.PatternImplication+patternImplicationWithAntecedent original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.PatternImplication"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "antecedent"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "consequent"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.PatternImplication"),+              Core.projectionField = (Core.Name "consequent")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++patternImplicationWithConsequent :: Phantoms.TTerm Query.PatternImplication -> Phantoms.TTerm Query.Pattern -> Phantoms.TTerm Query.PatternImplication+patternImplicationWithConsequent original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.PatternImplication"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "antecedent"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.PatternImplication"),+              Core.projectionField = (Core.Name "antecedent")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "consequent"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++patternNegation :: Phantoms.TTerm Query.Pattern -> Phantoms.TTerm Query.Pattern+patternNegation x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "negation"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++patternTriple :: Phantoms.TTerm Query.TriplePattern -> Phantoms.TTerm Query.Pattern+patternTriple x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.Pattern"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "triple"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++query :: Phantoms.TTerm [Query.Variable] -> Phantoms.TTerm [Query.Pattern] -> Phantoms.TTerm Query.Query+query variables patterns =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.Query"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variables"),+          Core.fieldTerm = (Phantoms.unTTerm variables)},+        Core.Field {+          Core.fieldName = (Core.Name "patterns"),+          Core.fieldTerm = (Phantoms.unTTerm patterns)}]}))++queryPatterns :: Phantoms.TTerm Query.Query -> Phantoms.TTerm [Query.Pattern]+queryPatterns x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.Query"),+        Core.projectionField = (Core.Name "patterns")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++queryVariables :: Phantoms.TTerm Query.Query -> Phantoms.TTerm [Query.Variable]+queryVariables x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.Query"),+        Core.projectionField = (Core.Name "variables")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++queryWithPatterns :: Phantoms.TTerm Query.Query -> Phantoms.TTerm [Query.Pattern] -> Phantoms.TTerm Query.Query+queryWithPatterns original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.Query"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variables"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.Query"),+              Core.projectionField = (Core.Name "variables")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "patterns"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++queryWithVariables :: Phantoms.TTerm Query.Query -> Phantoms.TTerm [Query.Variable] -> Phantoms.TTerm Query.Query+queryWithVariables original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.Query"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variables"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "patterns"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.Query"),+              Core.projectionField = (Core.Name "patterns")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++range :: Phantoms.TTerm Int -> Phantoms.TTerm Int -> Phantoms.TTerm Query.Range+range min max =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.Range"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "min"),+          Core.fieldTerm = (Phantoms.unTTerm min)},+        Core.Field {+          Core.fieldName = (Core.Name "max"),+          Core.fieldTerm = (Phantoms.unTTerm max)}]}))++rangeMax :: Phantoms.TTerm Query.Range -> Phantoms.TTerm Int+rangeMax x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.Range"),+        Core.projectionField = (Core.Name "max")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++rangeMin :: Phantoms.TTerm Query.Range -> Phantoms.TTerm Int+rangeMin x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.Range"),+        Core.projectionField = (Core.Name "min")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++rangeWithMax :: Phantoms.TTerm Query.Range -> Phantoms.TTerm Int -> Phantoms.TTerm Query.Range+rangeWithMax original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.Range"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "min"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.Range"),+              Core.projectionField = (Core.Name "min")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "max"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++rangeWithMin :: Phantoms.TTerm Query.Range -> Phantoms.TTerm Int -> Phantoms.TTerm Query.Range+rangeWithMin original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.Range"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "min"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "max"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.Range"),+              Core.projectionField = (Core.Name "max")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++regexQuantifierAtLeast :: Phantoms.TTerm Int -> Phantoms.TTerm Query.RegexQuantifier+regexQuantifierAtLeast x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "atLeast"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++regexQuantifierExactly :: Phantoms.TTerm Int -> Phantoms.TTerm Query.RegexQuantifier+regexQuantifierExactly x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "exactly"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++regexQuantifierOne :: Phantoms.TTerm Query.RegexQuantifier+regexQuantifierOne =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "one"),+        Core.fieldTerm = Core.TermUnit}}))++regexQuantifierOneOrMore :: Phantoms.TTerm Query.RegexQuantifier+regexQuantifierOneOrMore =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "oneOrMore"),+        Core.fieldTerm = Core.TermUnit}}))++regexQuantifierRange :: Phantoms.TTerm Query.Range -> Phantoms.TTerm Query.RegexQuantifier+regexQuantifierRange x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "range"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++regexQuantifierZeroOrMore :: Phantoms.TTerm Query.RegexQuantifier+regexQuantifierZeroOrMore =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "zeroOrMore"),+        Core.fieldTerm = Core.TermUnit}}))++regexQuantifierZeroOrOne :: Phantoms.TTerm Query.RegexQuantifier+regexQuantifierZeroOrOne =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.RegexQuantifier"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "zeroOrOne"),+        Core.fieldTerm = Core.TermUnit}}))++regexSequence :: Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.RegexQuantifier -> Phantoms.TTerm Query.RegexSequence+regexSequence path quantifier =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.RegexSequence"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "path"),+          Core.fieldTerm = (Phantoms.unTTerm path)},+        Core.Field {+          Core.fieldName = (Core.Name "quantifier"),+          Core.fieldTerm = (Phantoms.unTTerm quantifier)}]}))++regexSequencePath :: Phantoms.TTerm Query.RegexSequence -> Phantoms.TTerm Query.Path+regexSequencePath x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.RegexSequence"),+        Core.projectionField = (Core.Name "path")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++regexSequenceQuantifier :: Phantoms.TTerm Query.RegexSequence -> Phantoms.TTerm Query.RegexQuantifier+regexSequenceQuantifier x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.RegexSequence"),+        Core.projectionField = (Core.Name "quantifier")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++regexSequenceWithPath :: Phantoms.TTerm Query.RegexSequence -> Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.RegexSequence+regexSequenceWithPath original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.RegexSequence"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "path"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "quantifier"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.RegexSequence"),+              Core.projectionField = (Core.Name "quantifier")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++regexSequenceWithQuantifier :: Phantoms.TTerm Query.RegexSequence -> Phantoms.TTerm Query.RegexQuantifier -> Phantoms.TTerm Query.RegexSequence+regexSequenceWithQuantifier original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.RegexSequence"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "path"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.RegexSequence"),+              Core.projectionField = (Core.Name "path")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "quantifier"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++stepCompare :: Phantoms.TTerm Query.ComparisonConstraint -> Phantoms.TTerm Query.Step+stepCompare x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.Step"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "compare"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++stepEdge :: Phantoms.TTerm Query.Edge -> Phantoms.TTerm Query.Step+stepEdge x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.Step"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "edge"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++stepProject :: Phantoms.TTerm Core.Projection -> Phantoms.TTerm Query.Step+stepProject x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.query.Step"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "project"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++triplePattern :: Phantoms.TTerm Query.Node -> Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.Node -> Phantoms.TTerm Query.TriplePattern+triplePattern subject predicate object =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.TriplePattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "subject"),+          Core.fieldTerm = (Phantoms.unTTerm subject)},+        Core.Field {+          Core.fieldName = (Core.Name "predicate"),+          Core.fieldTerm = (Phantoms.unTTerm predicate)},+        Core.Field {+          Core.fieldName = (Core.Name "object"),+          Core.fieldTerm = (Phantoms.unTTerm object)}]}))++triplePatternObject :: Phantoms.TTerm Query.TriplePattern -> Phantoms.TTerm Query.Node+triplePatternObject x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),+        Core.projectionField = (Core.Name "object")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++triplePatternPredicate :: Phantoms.TTerm Query.TriplePattern -> Phantoms.TTerm Query.Path+triplePatternPredicate x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),+        Core.projectionField = (Core.Name "predicate")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++triplePatternSubject :: Phantoms.TTerm Query.TriplePattern -> Phantoms.TTerm Query.Node+triplePatternSubject x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),+        Core.projectionField = (Core.Name "subject")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++triplePatternWithObject :: Phantoms.TTerm Query.TriplePattern -> Phantoms.TTerm Query.Node -> Phantoms.TTerm Query.TriplePattern+triplePatternWithObject original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.TriplePattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "subject"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),+              Core.projectionField = (Core.Name "subject")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "predicate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),+              Core.projectionField = (Core.Name "predicate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "object"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++triplePatternWithPredicate :: Phantoms.TTerm Query.TriplePattern -> Phantoms.TTerm Query.Path -> Phantoms.TTerm Query.TriplePattern+triplePatternWithPredicate original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.TriplePattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "subject"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),+              Core.projectionField = (Core.Name "subject")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "predicate"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "object"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),+              Core.projectionField = (Core.Name "object")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++triplePatternWithSubject :: Phantoms.TTerm Query.TriplePattern -> Phantoms.TTerm Query.Node -> Phantoms.TTerm Query.TriplePattern+triplePatternWithSubject original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.query.TriplePattern"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "subject"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "predicate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),+              Core.projectionField = (Core.Name "predicate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "object"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.query.TriplePattern"),+              Core.projectionField = (Core.Name "object")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++unVariable :: Phantoms.TTerm Query.Variable -> Phantoms.TTerm String+unVariable x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.query.Variable")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++variable :: Phantoms.TTerm String -> Phantoms.TTerm Query.Variable+variable x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.query.Variable"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))
+ src/gen-main/haskell/Hydra/Dsl/Relational.hs view
@@ -0,0 +1,377 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.relational++module Hydra.Dsl.Relational where++import qualified Hydra.Core as Core+import qualified Hydra.Phantoms as Phantoms+import qualified Hydra.Relational as Relational+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++columnName :: Phantoms.TTerm String -> Phantoms.TTerm Relational.ColumnName+columnName x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.relational.ColumnName"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++columnSchema :: Phantoms.TTerm Relational.ColumnName -> Phantoms.TTerm t -> Phantoms.TTerm (Relational.ColumnSchema t)+columnSchema name domain =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.relational.ColumnSchema"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = (Phantoms.unTTerm domain)}]}))++columnSchemaDomain :: Phantoms.TTerm (Relational.ColumnSchema t) -> Phantoms.TTerm t+columnSchemaDomain x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.relational.ColumnSchema"),+        Core.projectionField = (Core.Name "domain")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++columnSchemaName :: Phantoms.TTerm (Relational.ColumnSchema t) -> Phantoms.TTerm Relational.ColumnName+columnSchemaName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.relational.ColumnSchema"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++columnSchemaWithDomain :: Phantoms.TTerm (Relational.ColumnSchema t) -> Phantoms.TTerm t -> Phantoms.TTerm (Relational.ColumnSchema t)+columnSchemaWithDomain original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.relational.ColumnSchema"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.ColumnSchema"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++columnSchemaWithName :: Phantoms.TTerm (Relational.ColumnSchema t) -> Phantoms.TTerm Relational.ColumnName -> Phantoms.TTerm (Relational.ColumnSchema t)+columnSchemaWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.relational.ColumnSchema"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.ColumnSchema"),+              Core.projectionField = (Core.Name "domain")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++foreignKey :: Phantoms.TTerm Relational.RelationName -> Phantoms.TTerm (M.Map Relational.ColumnName Relational.ColumnName) -> Phantoms.TTerm Relational.ForeignKey+foreignKey foreignRelation keys =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.relational.ForeignKey"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "foreignRelation"),+          Core.fieldTerm = (Phantoms.unTTerm foreignRelation)},+        Core.Field {+          Core.fieldName = (Core.Name "keys"),+          Core.fieldTerm = (Phantoms.unTTerm keys)}]}))++foreignKeyForeignRelation :: Phantoms.TTerm Relational.ForeignKey -> Phantoms.TTerm Relational.RelationName+foreignKeyForeignRelation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.relational.ForeignKey"),+        Core.projectionField = (Core.Name "foreignRelation")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++foreignKeyKeys :: Phantoms.TTerm Relational.ForeignKey -> Phantoms.TTerm (M.Map Relational.ColumnName Relational.ColumnName)+foreignKeyKeys x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.relational.ForeignKey"),+        Core.projectionField = (Core.Name "keys")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++foreignKeyWithForeignRelation :: Phantoms.TTerm Relational.ForeignKey -> Phantoms.TTerm Relational.RelationName -> Phantoms.TTerm Relational.ForeignKey+foreignKeyWithForeignRelation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.relational.ForeignKey"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "foreignRelation"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "keys"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.ForeignKey"),+              Core.projectionField = (Core.Name "keys")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++foreignKeyWithKeys :: Phantoms.TTerm Relational.ForeignKey -> Phantoms.TTerm (M.Map Relational.ColumnName Relational.ColumnName) -> Phantoms.TTerm Relational.ForeignKey+foreignKeyWithKeys original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.relational.ForeignKey"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "foreignRelation"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.ForeignKey"),+              Core.projectionField = (Core.Name "foreignRelation")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "keys"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++primaryKey :: Phantoms.TTerm [Relational.ColumnName] -> Phantoms.TTerm Relational.PrimaryKey+primaryKey x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.relational.PrimaryKey"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++relation :: Phantoms.TTerm [Relational.Row v] -> Phantoms.TTerm (Relational.Relation v)+relation x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.relational.Relation"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++relationName :: Phantoms.TTerm String -> Phantoms.TTerm Relational.RelationName+relationName x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.relational.RelationName"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++relationSchema :: Phantoms.TTerm Relational.RelationName -> Phantoms.TTerm [Relational.ColumnSchema t] -> Phantoms.TTerm [Relational.PrimaryKey] -> Phantoms.TTerm [Relational.ForeignKey] -> Phantoms.TTerm (Relational.RelationSchema t)+relationSchema name columns primaryKeys foreignKeys =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.relational.RelationSchema"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "columns"),+          Core.fieldTerm = (Phantoms.unTTerm columns)},+        Core.Field {+          Core.fieldName = (Core.Name "primaryKeys"),+          Core.fieldTerm = (Phantoms.unTTerm primaryKeys)},+        Core.Field {+          Core.fieldName = (Core.Name "foreignKeys"),+          Core.fieldTerm = (Phantoms.unTTerm foreignKeys)}]}))++relationSchemaColumns :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm [Relational.ColumnSchema t]+relationSchemaColumns x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+        Core.projectionField = (Core.Name "columns")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++relationSchemaForeignKeys :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm [Relational.ForeignKey]+relationSchemaForeignKeys x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+        Core.projectionField = (Core.Name "foreignKeys")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++relationSchemaName :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm Relational.RelationName+relationSchemaName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++relationSchemaPrimaryKeys :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm [Relational.PrimaryKey]+relationSchemaPrimaryKeys x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+        Core.projectionField = (Core.Name "primaryKeys")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++relationSchemaWithColumns :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm [Relational.ColumnSchema t] -> Phantoms.TTerm (Relational.RelationSchema t)+relationSchemaWithColumns original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.relational.RelationSchema"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "columns"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "primaryKeys"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+              Core.projectionField = (Core.Name "primaryKeys")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "foreignKeys"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+              Core.projectionField = (Core.Name "foreignKeys")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++relationSchemaWithForeignKeys :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm [Relational.ForeignKey] -> Phantoms.TTerm (Relational.RelationSchema t)+relationSchemaWithForeignKeys original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.relational.RelationSchema"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "columns"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+              Core.projectionField = (Core.Name "columns")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "primaryKeys"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+              Core.projectionField = (Core.Name "primaryKeys")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "foreignKeys"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++relationSchemaWithName :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm Relational.RelationName -> Phantoms.TTerm (Relational.RelationSchema t)+relationSchemaWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.relational.RelationSchema"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "columns"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+              Core.projectionField = (Core.Name "columns")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "primaryKeys"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+              Core.projectionField = (Core.Name "primaryKeys")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "foreignKeys"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+              Core.projectionField = (Core.Name "foreignKeys")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++relationSchemaWithPrimaryKeys :: Phantoms.TTerm (Relational.RelationSchema t) -> Phantoms.TTerm [Relational.PrimaryKey] -> Phantoms.TTerm (Relational.RelationSchema t)+relationSchemaWithPrimaryKeys original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.relational.RelationSchema"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "columns"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+              Core.projectionField = (Core.Name "columns")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "primaryKeys"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "foreignKeys"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.relational.RelationSchema"),+              Core.projectionField = (Core.Name "foreignKeys")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++relationship :: Phantoms.TTerm (S.Set (M.Map Relational.ColumnName v)) -> Phantoms.TTerm (Relational.Relationship v)+relationship x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.relational.Relationship"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++row :: Phantoms.TTerm [v] -> Phantoms.TTerm (Relational.Row v)+row x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.relational.Row"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++unColumnName :: Phantoms.TTerm Relational.ColumnName -> Phantoms.TTerm String+unColumnName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.relational.ColumnName")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unPrimaryKey :: Phantoms.TTerm Relational.PrimaryKey -> Phantoms.TTerm [Relational.ColumnName]+unPrimaryKey x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.relational.PrimaryKey")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unRelation :: Phantoms.TTerm (Relational.Relation v) -> Phantoms.TTerm [Relational.Row v]+unRelation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.relational.Relation")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unRelationName :: Phantoms.TTerm Relational.RelationName -> Phantoms.TTerm String+unRelationName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.relational.RelationName")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unRelationship :: Phantoms.TTerm (Relational.Relationship v) -> Phantoms.TTerm (S.Set (M.Map Relational.ColumnName v))+unRelationship x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.relational.Relationship")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unRow :: Phantoms.TTerm (Relational.Row v) -> Phantoms.TTerm [v]+unRow x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.relational.Row")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))
+ src/gen-main/haskell/Hydra/Dsl/Tabular.hs view
@@ -0,0 +1,220 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.tabular++module Hydra.Dsl.Tabular where++import qualified Hydra.Core as Core+import qualified Hydra.Phantoms as Phantoms+import qualified Hydra.Relational as Relational+import qualified Hydra.Tabular as Tabular+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++columnType :: Phantoms.TTerm Relational.ColumnName -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Tabular.ColumnType+columnType name type_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.tabular.ColumnType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)}]}))++columnTypeName :: Phantoms.TTerm Tabular.ColumnType -> Phantoms.TTerm Relational.ColumnName+columnTypeName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.tabular.ColumnType"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++columnTypeType :: Phantoms.TTerm Tabular.ColumnType -> Phantoms.TTerm Core.Type+columnTypeType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.tabular.ColumnType"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++columnTypeWithName :: Phantoms.TTerm Tabular.ColumnType -> Phantoms.TTerm Relational.ColumnName -> Phantoms.TTerm Tabular.ColumnType+columnTypeWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.tabular.ColumnType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.tabular.ColumnType"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++columnTypeWithType :: Phantoms.TTerm Tabular.ColumnType -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Tabular.ColumnType+columnTypeWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.tabular.ColumnType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.tabular.ColumnType"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++dataRow :: Phantoms.TTerm [Maybe v] -> Phantoms.TTerm (Tabular.DataRow v)+dataRow x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.tabular.DataRow"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++headerRow :: Phantoms.TTerm [String] -> Phantoms.TTerm Tabular.HeaderRow+headerRow x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.tabular.HeaderRow"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++table :: Phantoms.TTerm (Maybe Tabular.HeaderRow) -> Phantoms.TTerm [Tabular.DataRow v] -> Phantoms.TTerm (Tabular.Table v)+table header data_ =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.tabular.Table"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "header"),+          Core.fieldTerm = (Phantoms.unTTerm header)},+        Core.Field {+          Core.fieldName = (Core.Name "data"),+          Core.fieldTerm = (Phantoms.unTTerm data_)}]}))++tableData :: Phantoms.TTerm (Tabular.Table v) -> Phantoms.TTerm [Tabular.DataRow v]+tableData x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.tabular.Table"),+        Core.projectionField = (Core.Name "data")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++tableHeader :: Phantoms.TTerm (Tabular.Table v) -> Phantoms.TTerm (Maybe Tabular.HeaderRow)+tableHeader x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.tabular.Table"),+        Core.projectionField = (Core.Name "header")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++tableType :: Phantoms.TTerm Relational.RelationName -> Phantoms.TTerm [Tabular.ColumnType] -> Phantoms.TTerm Tabular.TableType+tableType name columns =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.tabular.TableType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "columns"),+          Core.fieldTerm = (Phantoms.unTTerm columns)}]}))++tableTypeColumns :: Phantoms.TTerm Tabular.TableType -> Phantoms.TTerm [Tabular.ColumnType]+tableTypeColumns x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.tabular.TableType"),+        Core.projectionField = (Core.Name "columns")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++tableTypeName :: Phantoms.TTerm Tabular.TableType -> Phantoms.TTerm Relational.RelationName+tableTypeName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.tabular.TableType"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++tableTypeWithColumns :: Phantoms.TTerm Tabular.TableType -> Phantoms.TTerm [Tabular.ColumnType] -> Phantoms.TTerm Tabular.TableType+tableTypeWithColumns original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.tabular.TableType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.tabular.TableType"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "columns"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++tableTypeWithName :: Phantoms.TTerm Tabular.TableType -> Phantoms.TTerm Relational.RelationName -> Phantoms.TTerm Tabular.TableType+tableTypeWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.tabular.TableType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "columns"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.tabular.TableType"),+              Core.projectionField = (Core.Name "columns")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++tableWithData :: Phantoms.TTerm (Tabular.Table v) -> Phantoms.TTerm [Tabular.DataRow v] -> Phantoms.TTerm (Tabular.Table v)+tableWithData original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.tabular.Table"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "header"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.tabular.Table"),+              Core.projectionField = (Core.Name "header")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "data"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++tableWithHeader :: Phantoms.TTerm (Tabular.Table v) -> Phantoms.TTerm (Maybe Tabular.HeaderRow) -> Phantoms.TTerm (Tabular.Table v)+tableWithHeader original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.tabular.Table"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "header"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "data"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.tabular.Table"),+              Core.projectionField = (Core.Name "data")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++unDataRow :: Phantoms.TTerm (Tabular.DataRow v) -> Phantoms.TTerm [Maybe v]+unDataRow x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.tabular.DataRow")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unHeaderRow :: Phantoms.TTerm Tabular.HeaderRow -> Phantoms.TTerm [String]+unHeaderRow x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.tabular.HeaderRow")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))
+ src/gen-main/haskell/Hydra/Dsl/Testing.hs view
@@ -0,0 +1,5142 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.testing++module Hydra.Dsl.Testing where++import qualified Hydra.Ast as Ast+import qualified Hydra.Coders as Coders+import qualified Hydra.Core as Core+import qualified Hydra.Error.Core as Core_+import qualified Hydra.Graph as Graph+import qualified Hydra.Json.Model as Model+import qualified Hydra.Module as Module+import qualified Hydra.Parsing as Parsing+import qualified Hydra.Phantoms as Phantoms+import qualified Hydra.Testing as Testing+import qualified Hydra.Typing as Typing+import qualified Hydra.Util as Util+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++alphaConversionTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.AlphaConversionTestCase+alphaConversionTestCase term oldVariable newVariable result =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Phantoms.unTTerm term)},+        Core.Field {+          Core.fieldName = (Core.Name "oldVariable"),+          Core.fieldTerm = (Phantoms.unTTerm oldVariable)},+        Core.Field {+          Core.fieldName = (Core.Name "newVariable"),+          Core.fieldTerm = (Phantoms.unTTerm newVariable)},+        Core.Field {+          Core.fieldName = (Core.Name "result"),+          Core.fieldTerm = (Phantoms.unTTerm result)}]}))++alphaConversionTestCaseNewVariable :: Phantoms.TTerm Testing.AlphaConversionTestCase -> Phantoms.TTerm Core.Name+alphaConversionTestCaseNewVariable x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+        Core.projectionField = (Core.Name "newVariable")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++alphaConversionTestCaseOldVariable :: Phantoms.TTerm Testing.AlphaConversionTestCase -> Phantoms.TTerm Core.Name+alphaConversionTestCaseOldVariable x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+        Core.projectionField = (Core.Name "oldVariable")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++alphaConversionTestCaseResult :: Phantoms.TTerm Testing.AlphaConversionTestCase -> Phantoms.TTerm Core.Term+alphaConversionTestCaseResult x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+        Core.projectionField = (Core.Name "result")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++alphaConversionTestCaseTerm :: Phantoms.TTerm Testing.AlphaConversionTestCase -> Phantoms.TTerm Core.Term+alphaConversionTestCaseTerm x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+        Core.projectionField = (Core.Name "term")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++alphaConversionTestCaseWithNewVariable :: Phantoms.TTerm Testing.AlphaConversionTestCase -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Testing.AlphaConversionTestCase+alphaConversionTestCaseWithNewVariable original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+              Core.projectionField = (Core.Name "term")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "oldVariable"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+              Core.projectionField = (Core.Name "oldVariable")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "newVariable"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "result"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+              Core.projectionField = (Core.Name "result")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++alphaConversionTestCaseWithOldVariable :: Phantoms.TTerm Testing.AlphaConversionTestCase -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Testing.AlphaConversionTestCase+alphaConversionTestCaseWithOldVariable original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+              Core.projectionField = (Core.Name "term")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "oldVariable"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "newVariable"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+              Core.projectionField = (Core.Name "newVariable")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "result"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+              Core.projectionField = (Core.Name "result")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++alphaConversionTestCaseWithResult :: Phantoms.TTerm Testing.AlphaConversionTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.AlphaConversionTestCase+alphaConversionTestCaseWithResult original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+              Core.projectionField = (Core.Name "term")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "oldVariable"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+              Core.projectionField = (Core.Name "oldVariable")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "newVariable"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+              Core.projectionField = (Core.Name "newVariable")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "result"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++alphaConversionTestCaseWithTerm :: Phantoms.TTerm Testing.AlphaConversionTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.AlphaConversionTestCase+alphaConversionTestCaseWithTerm original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "oldVariable"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+              Core.projectionField = (Core.Name "oldVariable")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "newVariable"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+              Core.projectionField = (Core.Name "newVariable")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "result"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.AlphaConversionTestCase"),+              Core.projectionField = (Core.Name "result")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++caseConversionTestCase :: Phantoms.TTerm Util.CaseConvention -> Phantoms.TTerm Util.CaseConvention -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm Testing.CaseConversionTestCase+caseConversionTestCase fromConvention toConvention fromString toString =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "fromConvention"),+          Core.fieldTerm = (Phantoms.unTTerm fromConvention)},+        Core.Field {+          Core.fieldName = (Core.Name "toConvention"),+          Core.fieldTerm = (Phantoms.unTTerm toConvention)},+        Core.Field {+          Core.fieldName = (Core.Name "fromString"),+          Core.fieldTerm = (Phantoms.unTTerm fromString)},+        Core.Field {+          Core.fieldName = (Core.Name "toString"),+          Core.fieldTerm = (Phantoms.unTTerm toString)}]}))++caseConversionTestCaseFromConvention :: Phantoms.TTerm Testing.CaseConversionTestCase -> Phantoms.TTerm Util.CaseConvention+caseConversionTestCaseFromConvention x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+        Core.projectionField = (Core.Name "fromConvention")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++caseConversionTestCaseFromString :: Phantoms.TTerm Testing.CaseConversionTestCase -> Phantoms.TTerm String+caseConversionTestCaseFromString x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+        Core.projectionField = (Core.Name "fromString")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++caseConversionTestCaseToConvention :: Phantoms.TTerm Testing.CaseConversionTestCase -> Phantoms.TTerm Util.CaseConvention+caseConversionTestCaseToConvention x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+        Core.projectionField = (Core.Name "toConvention")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++caseConversionTestCaseToString :: Phantoms.TTerm Testing.CaseConversionTestCase -> Phantoms.TTerm String+caseConversionTestCaseToString x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+        Core.projectionField = (Core.Name "toString")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++caseConversionTestCaseWithFromConvention :: Phantoms.TTerm Testing.CaseConversionTestCase -> Phantoms.TTerm Util.CaseConvention -> Phantoms.TTerm Testing.CaseConversionTestCase+caseConversionTestCaseWithFromConvention original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "fromConvention"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "toConvention"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+              Core.projectionField = (Core.Name "toConvention")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fromString"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+              Core.projectionField = (Core.Name "fromString")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "toString"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+              Core.projectionField = (Core.Name "toString")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++caseConversionTestCaseWithFromString :: Phantoms.TTerm Testing.CaseConversionTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.CaseConversionTestCase+caseConversionTestCaseWithFromString original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "fromConvention"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+              Core.projectionField = (Core.Name "fromConvention")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "toConvention"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+              Core.projectionField = (Core.Name "toConvention")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fromString"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "toString"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+              Core.projectionField = (Core.Name "toString")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++caseConversionTestCaseWithToConvention :: Phantoms.TTerm Testing.CaseConversionTestCase -> Phantoms.TTerm Util.CaseConvention -> Phantoms.TTerm Testing.CaseConversionTestCase+caseConversionTestCaseWithToConvention original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "fromConvention"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+              Core.projectionField = (Core.Name "fromConvention")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "toConvention"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "fromString"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+              Core.projectionField = (Core.Name "fromString")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "toString"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+              Core.projectionField = (Core.Name "toString")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++caseConversionTestCaseWithToString :: Phantoms.TTerm Testing.CaseConversionTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.CaseConversionTestCase+caseConversionTestCaseWithToString original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "fromConvention"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+              Core.projectionField = (Core.Name "fromConvention")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "toConvention"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+              Core.projectionField = (Core.Name "toConvention")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fromString"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.CaseConversionTestCase"),+              Core.projectionField = (Core.Name "fromString")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "toString"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++deannotateTermTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.DeannotateTermTestCase+deannotateTermTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.DeannotateTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++deannotateTermTestCaseInput :: Phantoms.TTerm Testing.DeannotateTermTestCase -> Phantoms.TTerm Core.Term+deannotateTermTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.DeannotateTermTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++deannotateTermTestCaseOutput :: Phantoms.TTerm Testing.DeannotateTermTestCase -> Phantoms.TTerm Core.Term+deannotateTermTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.DeannotateTermTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++deannotateTermTestCaseWithInput :: Phantoms.TTerm Testing.DeannotateTermTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.DeannotateTermTestCase+deannotateTermTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.DeannotateTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.DeannotateTermTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++deannotateTermTestCaseWithOutput :: Phantoms.TTerm Testing.DeannotateTermTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.DeannotateTermTestCase+deannotateTermTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.DeannotateTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.DeannotateTermTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++deannotateTypeTestCase :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.DeannotateTypeTestCase+deannotateTypeTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.DeannotateTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++deannotateTypeTestCaseInput :: Phantoms.TTerm Testing.DeannotateTypeTestCase -> Phantoms.TTerm Core.Type+deannotateTypeTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.DeannotateTypeTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++deannotateTypeTestCaseOutput :: Phantoms.TTerm Testing.DeannotateTypeTestCase -> Phantoms.TTerm Core.Type+deannotateTypeTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.DeannotateTypeTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++deannotateTypeTestCaseWithInput :: Phantoms.TTerm Testing.DeannotateTypeTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.DeannotateTypeTestCase+deannotateTypeTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.DeannotateTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.DeannotateTypeTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++deannotateTypeTestCaseWithOutput :: Phantoms.TTerm Testing.DeannotateTypeTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.DeannotateTypeTestCase+deannotateTypeTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.DeannotateTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.DeannotateTypeTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++delegatedEvaluationTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.DelegatedEvaluationTestCase+delegatedEvaluationTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.DelegatedEvaluationTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++delegatedEvaluationTestCaseInput :: Phantoms.TTerm Testing.DelegatedEvaluationTestCase -> Phantoms.TTerm Core.Term+delegatedEvaluationTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.DelegatedEvaluationTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++delegatedEvaluationTestCaseOutput :: Phantoms.TTerm Testing.DelegatedEvaluationTestCase -> Phantoms.TTerm Core.Term+delegatedEvaluationTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.DelegatedEvaluationTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++delegatedEvaluationTestCaseWithInput :: Phantoms.TTerm Testing.DelegatedEvaluationTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.DelegatedEvaluationTestCase+delegatedEvaluationTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.DelegatedEvaluationTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.DelegatedEvaluationTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++delegatedEvaluationTestCaseWithOutput :: Phantoms.TTerm Testing.DelegatedEvaluationTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.DelegatedEvaluationTestCase+delegatedEvaluationTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.DelegatedEvaluationTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.DelegatedEvaluationTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++etaExpansionTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.EtaExpansionTestCase+etaExpansionTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.EtaExpansionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++etaExpansionTestCaseInput :: Phantoms.TTerm Testing.EtaExpansionTestCase -> Phantoms.TTerm Core.Term+etaExpansionTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.EtaExpansionTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++etaExpansionTestCaseOutput :: Phantoms.TTerm Testing.EtaExpansionTestCase -> Phantoms.TTerm Core.Term+etaExpansionTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.EtaExpansionTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++etaExpansionTestCaseWithInput :: Phantoms.TTerm Testing.EtaExpansionTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.EtaExpansionTestCase+etaExpansionTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.EtaExpansionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.EtaExpansionTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++etaExpansionTestCaseWithOutput :: Phantoms.TTerm Testing.EtaExpansionTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.EtaExpansionTestCase+etaExpansionTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.EtaExpansionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.EtaExpansionTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++evaluationStyleEager :: Phantoms.TTerm Testing.EvaluationStyle+evaluationStyleEager =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.EvaluationStyle"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "eager"),+        Core.fieldTerm = Core.TermUnit}}))++evaluationStyleLazy :: Phantoms.TTerm Testing.EvaluationStyle+evaluationStyleLazy =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.EvaluationStyle"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "lazy"),+        Core.fieldTerm = Core.TermUnit}}))++evaluationTestCase :: Phantoms.TTerm Testing.EvaluationStyle -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.EvaluationTestCase+evaluationTestCase evaluationStyle input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.EvaluationTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "evaluationStyle"),+          Core.fieldTerm = (Phantoms.unTTerm evaluationStyle)},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++evaluationTestCaseEvaluationStyle :: Phantoms.TTerm Testing.EvaluationTestCase -> Phantoms.TTerm Testing.EvaluationStyle+evaluationTestCaseEvaluationStyle x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.EvaluationTestCase"),+        Core.projectionField = (Core.Name "evaluationStyle")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++evaluationTestCaseInput :: Phantoms.TTerm Testing.EvaluationTestCase -> Phantoms.TTerm Core.Term+evaluationTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.EvaluationTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++evaluationTestCaseOutput :: Phantoms.TTerm Testing.EvaluationTestCase -> Phantoms.TTerm Core.Term+evaluationTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.EvaluationTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++evaluationTestCaseWithEvaluationStyle :: Phantoms.TTerm Testing.EvaluationTestCase -> Phantoms.TTerm Testing.EvaluationStyle -> Phantoms.TTerm Testing.EvaluationTestCase+evaluationTestCaseWithEvaluationStyle original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.EvaluationTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "evaluationStyle"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.EvaluationTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.EvaluationTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++evaluationTestCaseWithInput :: Phantoms.TTerm Testing.EvaluationTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.EvaluationTestCase+evaluationTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.EvaluationTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "evaluationStyle"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.EvaluationTestCase"),+              Core.projectionField = (Core.Name "evaluationStyle")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.EvaluationTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++evaluationTestCaseWithOutput :: Phantoms.TTerm Testing.EvaluationTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.EvaluationTestCase+evaluationTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.EvaluationTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "evaluationStyle"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.EvaluationTestCase"),+              Core.projectionField = (Core.Name "evaluationStyle")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.EvaluationTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++flattenLetTermsTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.FlattenLetTermsTestCase+flattenLetTermsTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.FlattenLetTermsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++flattenLetTermsTestCaseInput :: Phantoms.TTerm Testing.FlattenLetTermsTestCase -> Phantoms.TTerm Core.Term+flattenLetTermsTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.FlattenLetTermsTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++flattenLetTermsTestCaseOutput :: Phantoms.TTerm Testing.FlattenLetTermsTestCase -> Phantoms.TTerm Core.Term+flattenLetTermsTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.FlattenLetTermsTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++flattenLetTermsTestCaseWithInput :: Phantoms.TTerm Testing.FlattenLetTermsTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.FlattenLetTermsTestCase+flattenLetTermsTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.FlattenLetTermsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FlattenLetTermsTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++flattenLetTermsTestCaseWithOutput :: Phantoms.TTerm Testing.FlattenLetTermsTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.FlattenLetTermsTestCase+flattenLetTermsTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.FlattenLetTermsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FlattenLetTermsTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++foldOperationCollectLabels :: Phantoms.TTerm Testing.FoldOperation+foldOperationCollectLabels =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.FoldOperation"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "collectLabels"),+        Core.fieldTerm = Core.TermUnit}}))++foldOperationCollectListLengths :: Phantoms.TTerm Testing.FoldOperation+foldOperationCollectListLengths =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.FoldOperation"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "collectListLengths"),+        Core.fieldTerm = Core.TermUnit}}))++foldOperationSumInt32Literals :: Phantoms.TTerm Testing.FoldOperation+foldOperationSumInt32Literals =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.FoldOperation"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "sumInt32Literals"),+        Core.fieldTerm = Core.TermUnit}}))++foldOverTermTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Coders.TraversalOrder -> Phantoms.TTerm Testing.FoldOperation -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.FoldOverTermTestCase+foldOverTermTestCase input traversalOrder operation output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "traversalOrder"),+          Core.fieldTerm = (Phantoms.unTTerm traversalOrder)},+        Core.Field {+          Core.fieldName = (Core.Name "operation"),+          Core.fieldTerm = (Phantoms.unTTerm operation)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++foldOverTermTestCaseInput :: Phantoms.TTerm Testing.FoldOverTermTestCase -> Phantoms.TTerm Core.Term+foldOverTermTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++foldOverTermTestCaseOperation :: Phantoms.TTerm Testing.FoldOverTermTestCase -> Phantoms.TTerm Testing.FoldOperation+foldOverTermTestCaseOperation x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+        Core.projectionField = (Core.Name "operation")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++foldOverTermTestCaseOutput :: Phantoms.TTerm Testing.FoldOverTermTestCase -> Phantoms.TTerm Core.Term+foldOverTermTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++foldOverTermTestCaseTraversalOrder :: Phantoms.TTerm Testing.FoldOverTermTestCase -> Phantoms.TTerm Coders.TraversalOrder+foldOverTermTestCaseTraversalOrder x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+        Core.projectionField = (Core.Name "traversalOrder")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++foldOverTermTestCaseWithInput :: Phantoms.TTerm Testing.FoldOverTermTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.FoldOverTermTestCase+foldOverTermTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "traversalOrder"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+              Core.projectionField = (Core.Name "traversalOrder")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "operation"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+              Core.projectionField = (Core.Name "operation")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++foldOverTermTestCaseWithOperation :: Phantoms.TTerm Testing.FoldOverTermTestCase -> Phantoms.TTerm Testing.FoldOperation -> Phantoms.TTerm Testing.FoldOverTermTestCase+foldOverTermTestCaseWithOperation original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "traversalOrder"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+              Core.projectionField = (Core.Name "traversalOrder")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "operation"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++foldOverTermTestCaseWithOutput :: Phantoms.TTerm Testing.FoldOverTermTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.FoldOverTermTestCase+foldOverTermTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "traversalOrder"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+              Core.projectionField = (Core.Name "traversalOrder")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "operation"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+              Core.projectionField = (Core.Name "operation")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++foldOverTermTestCaseWithTraversalOrder :: Phantoms.TTerm Testing.FoldOverTermTestCase -> Phantoms.TTerm Coders.TraversalOrder -> Phantoms.TTerm Testing.FoldOverTermTestCase+foldOverTermTestCaseWithTraversalOrder original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "traversalOrder"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "operation"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+              Core.projectionField = (Core.Name "operation")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FoldOverTermTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++freeVariablesTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Testing.FreeVariablesTestCase+freeVariablesTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.FreeVariablesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++freeVariablesTestCaseInput :: Phantoms.TTerm Testing.FreeVariablesTestCase -> Phantoms.TTerm Core.Term+freeVariablesTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.FreeVariablesTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++freeVariablesTestCaseOutput :: Phantoms.TTerm Testing.FreeVariablesTestCase -> Phantoms.TTerm (S.Set Core.Name)+freeVariablesTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.FreeVariablesTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++freeVariablesTestCaseWithInput :: Phantoms.TTerm Testing.FreeVariablesTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.FreeVariablesTestCase+freeVariablesTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.FreeVariablesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FreeVariablesTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++freeVariablesTestCaseWithOutput :: Phantoms.TTerm Testing.FreeVariablesTestCase -> Phantoms.TTerm (S.Set Core.Name) -> Phantoms.TTerm Testing.FreeVariablesTestCase+freeVariablesTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.FreeVariablesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.FreeVariablesTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++hoistCaseStatementsTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.HoistCaseStatementsTestCase+hoistCaseStatementsTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.HoistCaseStatementsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++hoistCaseStatementsTestCaseInput :: Phantoms.TTerm Testing.HoistCaseStatementsTestCase -> Phantoms.TTerm Core.Term+hoistCaseStatementsTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.HoistCaseStatementsTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++hoistCaseStatementsTestCaseOutput :: Phantoms.TTerm Testing.HoistCaseStatementsTestCase -> Phantoms.TTerm Core.Term+hoistCaseStatementsTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.HoistCaseStatementsTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++hoistCaseStatementsTestCaseWithInput :: Phantoms.TTerm Testing.HoistCaseStatementsTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.HoistCaseStatementsTestCase+hoistCaseStatementsTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.HoistCaseStatementsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.HoistCaseStatementsTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++hoistCaseStatementsTestCaseWithOutput :: Phantoms.TTerm Testing.HoistCaseStatementsTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.HoistCaseStatementsTestCase+hoistCaseStatementsTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.HoistCaseStatementsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.HoistCaseStatementsTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++hoistLetBindingsTestCase :: Phantoms.TTerm Core.Let -> Phantoms.TTerm Core.Let -> Phantoms.TTerm Testing.HoistLetBindingsTestCase+hoistLetBindingsTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.HoistLetBindingsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++hoistLetBindingsTestCaseInput :: Phantoms.TTerm Testing.HoistLetBindingsTestCase -> Phantoms.TTerm Core.Let+hoistLetBindingsTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.HoistLetBindingsTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++hoistLetBindingsTestCaseOutput :: Phantoms.TTerm Testing.HoistLetBindingsTestCase -> Phantoms.TTerm Core.Let+hoistLetBindingsTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.HoistLetBindingsTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++hoistLetBindingsTestCaseWithInput :: Phantoms.TTerm Testing.HoistLetBindingsTestCase -> Phantoms.TTerm Core.Let -> Phantoms.TTerm Testing.HoistLetBindingsTestCase+hoistLetBindingsTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.HoistLetBindingsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.HoistLetBindingsTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++hoistLetBindingsTestCaseWithOutput :: Phantoms.TTerm Testing.HoistLetBindingsTestCase -> Phantoms.TTerm Core.Let -> Phantoms.TTerm Testing.HoistLetBindingsTestCase+hoistLetBindingsTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.HoistLetBindingsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.HoistLetBindingsTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++hoistPolymorphicLetBindingsTestCase :: Phantoms.TTerm Core.Let -> Phantoms.TTerm Core.Let -> Phantoms.TTerm Testing.HoistPolymorphicLetBindingsTestCase+hoistPolymorphicLetBindingsTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.HoistPolymorphicLetBindingsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++hoistPolymorphicLetBindingsTestCaseInput :: Phantoms.TTerm Testing.HoistPolymorphicLetBindingsTestCase -> Phantoms.TTerm Core.Let+hoistPolymorphicLetBindingsTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.HoistPolymorphicLetBindingsTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++hoistPolymorphicLetBindingsTestCaseOutput :: Phantoms.TTerm Testing.HoistPolymorphicLetBindingsTestCase -> Phantoms.TTerm Core.Let+hoistPolymorphicLetBindingsTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.HoistPolymorphicLetBindingsTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++hoistPolymorphicLetBindingsTestCaseWithInput :: Phantoms.TTerm Testing.HoistPolymorphicLetBindingsTestCase -> Phantoms.TTerm Core.Let -> Phantoms.TTerm Testing.HoistPolymorphicLetBindingsTestCase+hoistPolymorphicLetBindingsTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.HoistPolymorphicLetBindingsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.HoistPolymorphicLetBindingsTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++hoistPolymorphicLetBindingsTestCaseWithOutput :: Phantoms.TTerm Testing.HoistPolymorphicLetBindingsTestCase -> Phantoms.TTerm Core.Let -> Phantoms.TTerm Testing.HoistPolymorphicLetBindingsTestCase+hoistPolymorphicLetBindingsTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.HoistPolymorphicLetBindingsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.HoistPolymorphicLetBindingsTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++hoistPredicateApplications :: Phantoms.TTerm Testing.HoistPredicate+hoistPredicateApplications =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.HoistPredicate"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "applications"),+        Core.fieldTerm = Core.TermUnit}}))++hoistPredicateCaseStatements :: Phantoms.TTerm Testing.HoistPredicate+hoistPredicateCaseStatements =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.HoistPredicate"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "caseStatements"),+        Core.fieldTerm = Core.TermUnit}}))++hoistPredicateLists :: Phantoms.TTerm Testing.HoistPredicate+hoistPredicateLists =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.HoistPredicate"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "lists"),+        Core.fieldTerm = Core.TermUnit}}))++hoistPredicateNothing :: Phantoms.TTerm Testing.HoistPredicate+hoistPredicateNothing =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.HoistPredicate"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "nothing"),+        Core.fieldTerm = Core.TermUnit}}))++hoistSubtermsTestCase :: Phantoms.TTerm Testing.HoistPredicate -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.HoistSubtermsTestCase+hoistSubtermsTestCase predicate input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.HoistSubtermsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "predicate"),+          Core.fieldTerm = (Phantoms.unTTerm predicate)},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++hoistSubtermsTestCaseInput :: Phantoms.TTerm Testing.HoistSubtermsTestCase -> Phantoms.TTerm Core.Term+hoistSubtermsTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.HoistSubtermsTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++hoistSubtermsTestCaseOutput :: Phantoms.TTerm Testing.HoistSubtermsTestCase -> Phantoms.TTerm Core.Term+hoistSubtermsTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.HoistSubtermsTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++hoistSubtermsTestCasePredicate :: Phantoms.TTerm Testing.HoistSubtermsTestCase -> Phantoms.TTerm Testing.HoistPredicate+hoistSubtermsTestCasePredicate x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.HoistSubtermsTestCase"),+        Core.projectionField = (Core.Name "predicate")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++hoistSubtermsTestCaseWithInput :: Phantoms.TTerm Testing.HoistSubtermsTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.HoistSubtermsTestCase+hoistSubtermsTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.HoistSubtermsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "predicate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.HoistSubtermsTestCase"),+              Core.projectionField = (Core.Name "predicate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.HoistSubtermsTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++hoistSubtermsTestCaseWithOutput :: Phantoms.TTerm Testing.HoistSubtermsTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.HoistSubtermsTestCase+hoistSubtermsTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.HoistSubtermsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "predicate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.HoistSubtermsTestCase"),+              Core.projectionField = (Core.Name "predicate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.HoistSubtermsTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++hoistSubtermsTestCaseWithPredicate :: Phantoms.TTerm Testing.HoistSubtermsTestCase -> Phantoms.TTerm Testing.HoistPredicate -> Phantoms.TTerm Testing.HoistSubtermsTestCase+hoistSubtermsTestCaseWithPredicate original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.HoistSubtermsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "predicate"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.HoistSubtermsTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.HoistSubtermsTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++inferenceFailureTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.InferenceFailureTestCase+inferenceFailureTestCase input =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.InferenceFailureTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)}]}))++inferenceFailureTestCaseInput :: Phantoms.TTerm Testing.InferenceFailureTestCase -> Phantoms.TTerm Core.Term+inferenceFailureTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.InferenceFailureTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++inferenceFailureTestCaseWithInput :: Phantoms.TTerm Testing.InferenceFailureTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.InferenceFailureTestCase+inferenceFailureTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.InferenceFailureTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++inferenceTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm Testing.InferenceTestCase+inferenceTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.InferenceTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++inferenceTestCaseInput :: Phantoms.TTerm Testing.InferenceTestCase -> Phantoms.TTerm Core.Term+inferenceTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.InferenceTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++inferenceTestCaseOutput :: Phantoms.TTerm Testing.InferenceTestCase -> Phantoms.TTerm Core.TypeScheme+inferenceTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.InferenceTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++inferenceTestCaseWithInput :: Phantoms.TTerm Testing.InferenceTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.InferenceTestCase+inferenceTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.InferenceTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.InferenceTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++inferenceTestCaseWithOutput :: Phantoms.TTerm Testing.InferenceTestCase -> Phantoms.TTerm Core.TypeScheme -> Phantoms.TTerm Testing.InferenceTestCase+inferenceTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.InferenceTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.InferenceTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++joinTypesTestCase :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm (Either () [Typing.TypeConstraint]) -> Phantoms.TTerm Testing.JoinTypesTestCase+joinTypesTestCase left right expected =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.JoinTypesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Phantoms.unTTerm left)},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Phantoms.unTTerm right)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm expected)}]}))++joinTypesTestCaseExpected :: Phantoms.TTerm Testing.JoinTypesTestCase -> Phantoms.TTerm (Either () [Typing.TypeConstraint])+joinTypesTestCaseExpected x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.JoinTypesTestCase"),+        Core.projectionField = (Core.Name "expected")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++joinTypesTestCaseLeft :: Phantoms.TTerm Testing.JoinTypesTestCase -> Phantoms.TTerm Core.Type+joinTypesTestCaseLeft x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.JoinTypesTestCase"),+        Core.projectionField = (Core.Name "left")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++joinTypesTestCaseRight :: Phantoms.TTerm Testing.JoinTypesTestCase -> Phantoms.TTerm Core.Type+joinTypesTestCaseRight x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.JoinTypesTestCase"),+        Core.projectionField = (Core.Name "right")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++joinTypesTestCaseWithExpected :: Phantoms.TTerm Testing.JoinTypesTestCase -> Phantoms.TTerm (Either () [Typing.TypeConstraint]) -> Phantoms.TTerm Testing.JoinTypesTestCase+joinTypesTestCaseWithExpected original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.JoinTypesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JoinTypesTestCase"),+              Core.projectionField = (Core.Name "left")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JoinTypesTestCase"),+              Core.projectionField = (Core.Name "right")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++joinTypesTestCaseWithLeft :: Phantoms.TTerm Testing.JoinTypesTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.JoinTypesTestCase+joinTypesTestCaseWithLeft original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.JoinTypesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JoinTypesTestCase"),+              Core.projectionField = (Core.Name "right")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JoinTypesTestCase"),+              Core.projectionField = (Core.Name "expected")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++joinTypesTestCaseWithRight :: Phantoms.TTerm Testing.JoinTypesTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.JoinTypesTestCase+joinTypesTestCaseWithRight original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.JoinTypesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JoinTypesTestCase"),+              Core.projectionField = (Core.Name "left")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JoinTypesTestCase"),+              Core.projectionField = (Core.Name "expected")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++jsonDecodeTestCase :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Model.Value -> Phantoms.TTerm (Either String Core.Term) -> Phantoms.TTerm Testing.JsonDecodeTestCase+jsonDecodeTestCase type_ json expected =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.JsonDecodeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)},+        Core.Field {+          Core.fieldName = (Core.Name "json"),+          Core.fieldTerm = (Phantoms.unTTerm json)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm expected)}]}))++jsonDecodeTestCaseExpected :: Phantoms.TTerm Testing.JsonDecodeTestCase -> Phantoms.TTerm (Either String Core.Term)+jsonDecodeTestCaseExpected x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.JsonDecodeTestCase"),+        Core.projectionField = (Core.Name "expected")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++jsonDecodeTestCaseJson :: Phantoms.TTerm Testing.JsonDecodeTestCase -> Phantoms.TTerm Model.Value+jsonDecodeTestCaseJson x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.JsonDecodeTestCase"),+        Core.projectionField = (Core.Name "json")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++jsonDecodeTestCaseType :: Phantoms.TTerm Testing.JsonDecodeTestCase -> Phantoms.TTerm Core.Type+jsonDecodeTestCaseType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.JsonDecodeTestCase"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++jsonDecodeTestCaseWithExpected :: Phantoms.TTerm Testing.JsonDecodeTestCase -> Phantoms.TTerm (Either String Core.Term) -> Phantoms.TTerm Testing.JsonDecodeTestCase+jsonDecodeTestCaseWithExpected original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.JsonDecodeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JsonDecodeTestCase"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "json"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JsonDecodeTestCase"),+              Core.projectionField = (Core.Name "json")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++jsonDecodeTestCaseWithJson :: Phantoms.TTerm Testing.JsonDecodeTestCase -> Phantoms.TTerm Model.Value -> Phantoms.TTerm Testing.JsonDecodeTestCase+jsonDecodeTestCaseWithJson original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.JsonDecodeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JsonDecodeTestCase"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "json"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JsonDecodeTestCase"),+              Core.projectionField = (Core.Name "expected")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++jsonDecodeTestCaseWithType :: Phantoms.TTerm Testing.JsonDecodeTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.JsonDecodeTestCase+jsonDecodeTestCaseWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.JsonDecodeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "json"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JsonDecodeTestCase"),+              Core.projectionField = (Core.Name "json")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JsonDecodeTestCase"),+              Core.projectionField = (Core.Name "expected")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++jsonEncodeTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm (Either String Model.Value) -> Phantoms.TTerm Testing.JsonEncodeTestCase+jsonEncodeTestCase term expected =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.JsonEncodeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Phantoms.unTTerm term)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm expected)}]}))++jsonEncodeTestCaseExpected :: Phantoms.TTerm Testing.JsonEncodeTestCase -> Phantoms.TTerm (Either String Model.Value)+jsonEncodeTestCaseExpected x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.JsonEncodeTestCase"),+        Core.projectionField = (Core.Name "expected")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++jsonEncodeTestCaseTerm :: Phantoms.TTerm Testing.JsonEncodeTestCase -> Phantoms.TTerm Core.Term+jsonEncodeTestCaseTerm x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.JsonEncodeTestCase"),+        Core.projectionField = (Core.Name "term")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++jsonEncodeTestCaseWithExpected :: Phantoms.TTerm Testing.JsonEncodeTestCase -> Phantoms.TTerm (Either String Model.Value) -> Phantoms.TTerm Testing.JsonEncodeTestCase+jsonEncodeTestCaseWithExpected original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.JsonEncodeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JsonEncodeTestCase"),+              Core.projectionField = (Core.Name "term")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++jsonEncodeTestCaseWithTerm :: Phantoms.TTerm Testing.JsonEncodeTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.JsonEncodeTestCase+jsonEncodeTestCaseWithTerm original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.JsonEncodeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JsonEncodeTestCase"),+              Core.projectionField = (Core.Name "expected")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++jsonRoundtripTestCase :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.JsonRoundtripTestCase+jsonRoundtripTestCase type_ term =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.JsonRoundtripTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Phantoms.unTTerm term)}]}))++jsonRoundtripTestCaseTerm :: Phantoms.TTerm Testing.JsonRoundtripTestCase -> Phantoms.TTerm Core.Term+jsonRoundtripTestCaseTerm x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.JsonRoundtripTestCase"),+        Core.projectionField = (Core.Name "term")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++jsonRoundtripTestCaseType :: Phantoms.TTerm Testing.JsonRoundtripTestCase -> Phantoms.TTerm Core.Type+jsonRoundtripTestCaseType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.JsonRoundtripTestCase"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++jsonRoundtripTestCaseWithTerm :: Phantoms.TTerm Testing.JsonRoundtripTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.JsonRoundtripTestCase+jsonRoundtripTestCaseWithTerm original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.JsonRoundtripTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JsonRoundtripTestCase"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++jsonRoundtripTestCaseWithType :: Phantoms.TTerm Testing.JsonRoundtripTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.JsonRoundtripTestCase+jsonRoundtripTestCaseWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.JsonRoundtripTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.JsonRoundtripTestCase"),+              Core.projectionField = (Core.Name "term")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++liftLambdaAboveLetTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.LiftLambdaAboveLetTestCase+liftLambdaAboveLetTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.LiftLambdaAboveLetTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++liftLambdaAboveLetTestCaseInput :: Phantoms.TTerm Testing.LiftLambdaAboveLetTestCase -> Phantoms.TTerm Core.Term+liftLambdaAboveLetTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.LiftLambdaAboveLetTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++liftLambdaAboveLetTestCaseOutput :: Phantoms.TTerm Testing.LiftLambdaAboveLetTestCase -> Phantoms.TTerm Core.Term+liftLambdaAboveLetTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.LiftLambdaAboveLetTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++liftLambdaAboveLetTestCaseWithInput :: Phantoms.TTerm Testing.LiftLambdaAboveLetTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.LiftLambdaAboveLetTestCase+liftLambdaAboveLetTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.LiftLambdaAboveLetTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.LiftLambdaAboveLetTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++liftLambdaAboveLetTestCaseWithOutput :: Phantoms.TTerm Testing.LiftLambdaAboveLetTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.LiftLambdaAboveLetTestCase+liftLambdaAboveLetTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.LiftLambdaAboveLetTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.LiftLambdaAboveLetTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++normalizeTypeVariablesTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.NormalizeTypeVariablesTestCase+normalizeTypeVariablesTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.NormalizeTypeVariablesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++normalizeTypeVariablesTestCaseInput :: Phantoms.TTerm Testing.NormalizeTypeVariablesTestCase -> Phantoms.TTerm Core.Term+normalizeTypeVariablesTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.NormalizeTypeVariablesTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++normalizeTypeVariablesTestCaseOutput :: Phantoms.TTerm Testing.NormalizeTypeVariablesTestCase -> Phantoms.TTerm Core.Term+normalizeTypeVariablesTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.NormalizeTypeVariablesTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++normalizeTypeVariablesTestCaseWithInput :: Phantoms.TTerm Testing.NormalizeTypeVariablesTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.NormalizeTypeVariablesTestCase+normalizeTypeVariablesTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.NormalizeTypeVariablesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.NormalizeTypeVariablesTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++normalizeTypeVariablesTestCaseWithOutput :: Phantoms.TTerm Testing.NormalizeTypeVariablesTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.NormalizeTypeVariablesTestCase+normalizeTypeVariablesTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.NormalizeTypeVariablesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.NormalizeTypeVariablesTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++parserTestCase :: Phantoms.TTerm String -> Phantoms.TTerm (Parsing.ParseResult a) -> Phantoms.TTerm (Testing.ParserTestCase a)+parserTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.ParserTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++parserTestCaseInput :: Phantoms.TTerm (Testing.ParserTestCase a) -> Phantoms.TTerm String+parserTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.ParserTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++parserTestCaseOutput :: Phantoms.TTerm (Testing.ParserTestCase a) -> Phantoms.TTerm (Parsing.ParseResult a)+parserTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.ParserTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++parserTestCaseWithInput :: Phantoms.TTerm (Testing.ParserTestCase a) -> Phantoms.TTerm String -> Phantoms.TTerm (Testing.ParserTestCase a)+parserTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.ParserTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.ParserTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++parserTestCaseWithOutput :: Phantoms.TTerm (Testing.ParserTestCase a) -> Phantoms.TTerm (Parsing.ParseResult a) -> Phantoms.TTerm (Testing.ParserTestCase a)+parserTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.ParserTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.ParserTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++rewriteTermTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.TermRewriter -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.RewriteTermTestCase+rewriteTermTestCase input rewriter output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.RewriteTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "rewriter"),+          Core.fieldTerm = (Phantoms.unTTerm rewriter)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++rewriteTermTestCaseInput :: Phantoms.TTerm Testing.RewriteTermTestCase -> Phantoms.TTerm Core.Term+rewriteTermTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTermTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++rewriteTermTestCaseOutput :: Phantoms.TTerm Testing.RewriteTermTestCase -> Phantoms.TTerm Core.Term+rewriteTermTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTermTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++rewriteTermTestCaseRewriter :: Phantoms.TTerm Testing.RewriteTermTestCase -> Phantoms.TTerm Testing.TermRewriter+rewriteTermTestCaseRewriter x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTermTestCase"),+        Core.projectionField = (Core.Name "rewriter")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++rewriteTermTestCaseWithInput :: Phantoms.TTerm Testing.RewriteTermTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.RewriteTermTestCase+rewriteTermTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.RewriteTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "rewriter"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTermTestCase"),+              Core.projectionField = (Core.Name "rewriter")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTermTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++rewriteTermTestCaseWithOutput :: Phantoms.TTerm Testing.RewriteTermTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.RewriteTermTestCase+rewriteTermTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.RewriteTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTermTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rewriter"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTermTestCase"),+              Core.projectionField = (Core.Name "rewriter")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++rewriteTermTestCaseWithRewriter :: Phantoms.TTerm Testing.RewriteTermTestCase -> Phantoms.TTerm Testing.TermRewriter -> Phantoms.TTerm Testing.RewriteTermTestCase+rewriteTermTestCaseWithRewriter original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.RewriteTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTermTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rewriter"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTermTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++rewriteTypeTestCase :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.TypeRewriter -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.RewriteTypeTestCase+rewriteTypeTestCase input rewriter output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.RewriteTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "rewriter"),+          Core.fieldTerm = (Phantoms.unTTerm rewriter)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++rewriteTypeTestCaseInput :: Phantoms.TTerm Testing.RewriteTypeTestCase -> Phantoms.TTerm Core.Type+rewriteTypeTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTypeTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++rewriteTypeTestCaseOutput :: Phantoms.TTerm Testing.RewriteTypeTestCase -> Phantoms.TTerm Core.Type+rewriteTypeTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTypeTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++rewriteTypeTestCaseRewriter :: Phantoms.TTerm Testing.RewriteTypeTestCase -> Phantoms.TTerm Testing.TypeRewriter+rewriteTypeTestCaseRewriter x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTypeTestCase"),+        Core.projectionField = (Core.Name "rewriter")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++rewriteTypeTestCaseWithInput :: Phantoms.TTerm Testing.RewriteTypeTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.RewriteTypeTestCase+rewriteTypeTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.RewriteTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "rewriter"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTypeTestCase"),+              Core.projectionField = (Core.Name "rewriter")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTypeTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++rewriteTypeTestCaseWithOutput :: Phantoms.TTerm Testing.RewriteTypeTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.RewriteTypeTestCase+rewriteTypeTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.RewriteTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTypeTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rewriter"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTypeTestCase"),+              Core.projectionField = (Core.Name "rewriter")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++rewriteTypeTestCaseWithRewriter :: Phantoms.TTerm Testing.RewriteTypeTestCase -> Phantoms.TTerm Testing.TypeRewriter -> Phantoms.TTerm Testing.RewriteTypeTestCase+rewriteTypeTestCaseWithRewriter original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.RewriteTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTypeTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "rewriter"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.RewriteTypeTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++serializationTestCase :: Phantoms.TTerm Ast.Expr -> Phantoms.TTerm String -> Phantoms.TTerm Testing.SerializationTestCase+serializationTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.SerializationTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++serializationTestCaseInput :: Phantoms.TTerm Testing.SerializationTestCase -> Phantoms.TTerm Ast.Expr+serializationTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.SerializationTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++serializationTestCaseOutput :: Phantoms.TTerm Testing.SerializationTestCase -> Phantoms.TTerm String+serializationTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.SerializationTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++serializationTestCaseWithInput :: Phantoms.TTerm Testing.SerializationTestCase -> Phantoms.TTerm Ast.Expr -> Phantoms.TTerm Testing.SerializationTestCase+serializationTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.SerializationTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.SerializationTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++serializationTestCaseWithOutput :: Phantoms.TTerm Testing.SerializationTestCase -> Phantoms.TTerm String -> Phantoms.TTerm Testing.SerializationTestCase+serializationTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.SerializationTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.SerializationTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++simplifyTermTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.SimplifyTermTestCase+simplifyTermTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.SimplifyTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++simplifyTermTestCaseInput :: Phantoms.TTerm Testing.SimplifyTermTestCase -> Phantoms.TTerm Core.Term+simplifyTermTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.SimplifyTermTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++simplifyTermTestCaseOutput :: Phantoms.TTerm Testing.SimplifyTermTestCase -> Phantoms.TTerm Core.Term+simplifyTermTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.SimplifyTermTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++simplifyTermTestCaseWithInput :: Phantoms.TTerm Testing.SimplifyTermTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.SimplifyTermTestCase+simplifyTermTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.SimplifyTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.SimplifyTermTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++simplifyTermTestCaseWithOutput :: Phantoms.TTerm Testing.SimplifyTermTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.SimplifyTermTestCase+simplifyTermTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.SimplifyTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.SimplifyTermTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++substInTypeTestCase :: Phantoms.TTerm [(Core.Name, Core.Type)] -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.SubstInTypeTestCase+substInTypeTestCase substitution input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.SubstInTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "substitution"),+          Core.fieldTerm = (Phantoms.unTTerm substitution)},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++substInTypeTestCaseInput :: Phantoms.TTerm Testing.SubstInTypeTestCase -> Phantoms.TTerm Core.Type+substInTypeTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.SubstInTypeTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++substInTypeTestCaseOutput :: Phantoms.TTerm Testing.SubstInTypeTestCase -> Phantoms.TTerm Core.Type+substInTypeTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.SubstInTypeTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++substInTypeTestCaseSubstitution :: Phantoms.TTerm Testing.SubstInTypeTestCase -> Phantoms.TTerm [(Core.Name, Core.Type)]+substInTypeTestCaseSubstitution x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.SubstInTypeTestCase"),+        Core.projectionField = (Core.Name "substitution")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++substInTypeTestCaseWithInput :: Phantoms.TTerm Testing.SubstInTypeTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.SubstInTypeTestCase+substInTypeTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.SubstInTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "substitution"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.SubstInTypeTestCase"),+              Core.projectionField = (Core.Name "substitution")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.SubstInTypeTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++substInTypeTestCaseWithOutput :: Phantoms.TTerm Testing.SubstInTypeTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.SubstInTypeTestCase+substInTypeTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.SubstInTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "substitution"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.SubstInTypeTestCase"),+              Core.projectionField = (Core.Name "substitution")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.SubstInTypeTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++substInTypeTestCaseWithSubstitution :: Phantoms.TTerm Testing.SubstInTypeTestCase -> Phantoms.TTerm [(Core.Name, Core.Type)] -> Phantoms.TTerm Testing.SubstInTypeTestCase+substInTypeTestCaseWithSubstitution original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.SubstInTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "substitution"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.SubstInTypeTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.SubstInTypeTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++tag :: Phantoms.TTerm String -> Phantoms.TTerm Testing.Tag+tag x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.testing.Tag"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++termRewriterReplaceFooWithBar :: Phantoms.TTerm Testing.TermRewriter+termRewriterReplaceFooWithBar =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TermRewriter"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "replaceFooWithBar"),+        Core.fieldTerm = Core.TermUnit}}))++termRewriterReplaceInt32WithInt64 :: Phantoms.TTerm Testing.TermRewriter+termRewriterReplaceInt32WithInt64 =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TermRewriter"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "replaceInt32WithInt64"),+        Core.fieldTerm = Core.TermUnit}}))++testCaseAlphaConversion :: Phantoms.TTerm Testing.AlphaConversionTestCase -> Phantoms.TTerm Testing.TestCase+testCaseAlphaConversion x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "alphaConversion"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseCaseConversion :: Phantoms.TTerm Testing.CaseConversionTestCase -> Phantoms.TTerm Testing.TestCase+testCaseCaseConversion x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "caseConversion"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseDeannotateTerm :: Phantoms.TTerm Testing.DeannotateTermTestCase -> Phantoms.TTerm Testing.TestCase+testCaseDeannotateTerm x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "deannotateTerm"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseDeannotateType :: Phantoms.TTerm Testing.DeannotateTypeTestCase -> Phantoms.TTerm Testing.TestCase+testCaseDeannotateType x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "deannotateType"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseDelegatedEvaluation :: Phantoms.TTerm Testing.DelegatedEvaluationTestCase -> Phantoms.TTerm Testing.TestCase+testCaseDelegatedEvaluation x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "delegatedEvaluation"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseEtaExpansion :: Phantoms.TTerm Testing.EtaExpansionTestCase -> Phantoms.TTerm Testing.TestCase+testCaseEtaExpansion x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "etaExpansion"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseEvaluation :: Phantoms.TTerm Testing.EvaluationTestCase -> Phantoms.TTerm Testing.TestCase+testCaseEvaluation x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "evaluation"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseFlattenLetTerms :: Phantoms.TTerm Testing.FlattenLetTermsTestCase -> Phantoms.TTerm Testing.TestCase+testCaseFlattenLetTerms x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "flattenLetTerms"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseFoldOverTerm :: Phantoms.TTerm Testing.FoldOverTermTestCase -> Phantoms.TTerm Testing.TestCase+testCaseFoldOverTerm x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "foldOverTerm"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseFreeVariables :: Phantoms.TTerm Testing.FreeVariablesTestCase -> Phantoms.TTerm Testing.TestCase+testCaseFreeVariables x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "freeVariables"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseHoistCaseStatements :: Phantoms.TTerm Testing.HoistCaseStatementsTestCase -> Phantoms.TTerm Testing.TestCase+testCaseHoistCaseStatements x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "hoistCaseStatements"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseHoistLetBindings :: Phantoms.TTerm Testing.HoistLetBindingsTestCase -> Phantoms.TTerm Testing.TestCase+testCaseHoistLetBindings x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "hoistLetBindings"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseHoistPolymorphicLetBindings :: Phantoms.TTerm Testing.HoistPolymorphicLetBindingsTestCase -> Phantoms.TTerm Testing.TestCase+testCaseHoistPolymorphicLetBindings x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "hoistPolymorphicLetBindings"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseHoistSubterms :: Phantoms.TTerm Testing.HoistSubtermsTestCase -> Phantoms.TTerm Testing.TestCase+testCaseHoistSubterms x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "hoistSubterms"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseInference :: Phantoms.TTerm Testing.InferenceTestCase -> Phantoms.TTerm Testing.TestCase+testCaseInference x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "inference"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseInferenceFailure :: Phantoms.TTerm Testing.InferenceFailureTestCase -> Phantoms.TTerm Testing.TestCase+testCaseInferenceFailure x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "inferenceFailure"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseJoinTypes :: Phantoms.TTerm Testing.JoinTypesTestCase -> Phantoms.TTerm Testing.TestCase+testCaseJoinTypes x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "joinTypes"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseJsonDecode :: Phantoms.TTerm Testing.JsonDecodeTestCase -> Phantoms.TTerm Testing.TestCase+testCaseJsonDecode x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "jsonDecode"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseJsonEncode :: Phantoms.TTerm Testing.JsonEncodeTestCase -> Phantoms.TTerm Testing.TestCase+testCaseJsonEncode x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "jsonEncode"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseJsonParser :: Phantoms.TTerm Testing.JsonParserTestCase -> Phantoms.TTerm Testing.TestCase+testCaseJsonParser x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "jsonParser"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseJsonRoundtrip :: Phantoms.TTerm Testing.JsonRoundtripTestCase -> Phantoms.TTerm Testing.TestCase+testCaseJsonRoundtrip x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "jsonRoundtrip"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseJsonWriter :: Phantoms.TTerm Testing.JsonWriterTestCase -> Phantoms.TTerm Testing.TestCase+testCaseJsonWriter x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "jsonWriter"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseLiftLambdaAboveLet :: Phantoms.TTerm Testing.LiftLambdaAboveLetTestCase -> Phantoms.TTerm Testing.TestCase+testCaseLiftLambdaAboveLet x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "liftLambdaAboveLet"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseNormalizeTypeVariables :: Phantoms.TTerm Testing.NormalizeTypeVariablesTestCase -> Phantoms.TTerm Testing.TestCase+testCaseNormalizeTypeVariables x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "normalizeTypeVariables"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseRewriteTerm :: Phantoms.TTerm Testing.RewriteTermTestCase -> Phantoms.TTerm Testing.TestCase+testCaseRewriteTerm x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "rewriteTerm"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseRewriteType :: Phantoms.TTerm Testing.RewriteTypeTestCase -> Phantoms.TTerm Testing.TestCase+testCaseRewriteType x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "rewriteType"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseSerialization :: Phantoms.TTerm Testing.SerializationTestCase -> Phantoms.TTerm Testing.TestCase+testCaseSerialization x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "serialization"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseSimplifyTerm :: Phantoms.TTerm Testing.SimplifyTermTestCase -> Phantoms.TTerm Testing.TestCase+testCaseSimplifyTerm x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "simplifyTerm"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseSubstInType :: Phantoms.TTerm Testing.SubstInTypeTestCase -> Phantoms.TTerm Testing.TestCase+testCaseSubstInType x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "substInType"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseTopologicalSort :: Phantoms.TTerm Testing.TopologicalSortTestCase -> Phantoms.TTerm Testing.TestCase+testCaseTopologicalSort x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "topologicalSort"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseTopologicalSortBindings :: Phantoms.TTerm Testing.TopologicalSortBindingsTestCase -> Phantoms.TTerm Testing.TestCase+testCaseTopologicalSortBindings x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "topologicalSortBindings"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseTopologicalSortSCC :: Phantoms.TTerm Testing.TopologicalSortSCCTestCase -> Phantoms.TTerm Testing.TestCase+testCaseTopologicalSortSCC x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "topologicalSortSCC"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseTypeChecking :: Phantoms.TTerm Testing.TypeCheckingTestCase -> Phantoms.TTerm Testing.TestCase+testCaseTypeChecking x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typeChecking"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseTypeCheckingFailure :: Phantoms.TTerm Testing.TypeCheckingFailureTestCase -> Phantoms.TTerm Testing.TestCase+testCaseTypeCheckingFailure x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typeCheckingFailure"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseTypeReduction :: Phantoms.TTerm Testing.TypeReductionTestCase -> Phantoms.TTerm Testing.TestCase+testCaseTypeReduction x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typeReduction"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseUnifyTypes :: Phantoms.TTerm Testing.UnifyTypesTestCase -> Phantoms.TTerm Testing.TestCase+testCaseUnifyTypes x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unifyTypes"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseUnshadowVariables :: Phantoms.TTerm Testing.UnshadowVariablesTestCase -> Phantoms.TTerm Testing.TestCase+testCaseUnshadowVariables x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unshadowVariables"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseValidateCoreTerm :: Phantoms.TTerm Testing.ValidateCoreTermTestCase -> Phantoms.TTerm Testing.TestCase+testCaseValidateCoreTerm x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "validateCoreTerm"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseVariableOccursInType :: Phantoms.TTerm Testing.VariableOccursInTypeTestCase -> Phantoms.TTerm Testing.TestCase+testCaseVariableOccursInType x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TestCase"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "variableOccursInType"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))++testCaseWithMetadata :: Phantoms.TTerm String -> Phantoms.TTerm Testing.TestCase -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm [Testing.Tag] -> Phantoms.TTerm Testing.TestCaseWithMetadata+testCaseWithMetadata name case_ description tags =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "case"),+          Core.fieldTerm = (Phantoms.unTTerm case_)},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Phantoms.unTTerm description)},+        Core.Field {+          Core.fieldName = (Core.Name "tags"),+          Core.fieldTerm = (Phantoms.unTTerm tags)}]}))++testCaseWithMetadataCase :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm Testing.TestCase+testCaseWithMetadataCase x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+        Core.projectionField = (Core.Name "case")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCaseWithMetadataDescription :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm (Maybe String)+testCaseWithMetadataDescription x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+        Core.projectionField = (Core.Name "description")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCaseWithMetadataName :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm String+testCaseWithMetadataName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCaseWithMetadataTags :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm [Testing.Tag]+testCaseWithMetadataTags x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+        Core.projectionField = (Core.Name "tags")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCaseWithMetadataWithCase :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm Testing.TestCase -> Phantoms.TTerm Testing.TestCaseWithMetadata+testCaseWithMetadataWithCase original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "case"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+              Core.projectionField = (Core.Name "description")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "tags"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+              Core.projectionField = (Core.Name "tags")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testCaseWithMetadataWithDescription :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Testing.TestCaseWithMetadata+testCaseWithMetadataWithDescription original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "case"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+              Core.projectionField = (Core.Name "case")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "tags"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+              Core.projectionField = (Core.Name "tags")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testCaseWithMetadataWithName :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TestCaseWithMetadata+testCaseWithMetadataWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "case"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+              Core.projectionField = (Core.Name "case")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+              Core.projectionField = (Core.Name "description")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "tags"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+              Core.projectionField = (Core.Name "tags")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testCaseWithMetadataWithTags :: Phantoms.TTerm Testing.TestCaseWithMetadata -> Phantoms.TTerm [Testing.Tag] -> Phantoms.TTerm Testing.TestCaseWithMetadata+testCaseWithMetadataWithTags original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "case"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+              Core.projectionField = (Core.Name "case")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCaseWithMetadata"),+              Core.projectionField = (Core.Name "description")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "tags"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++testCodec :: Phantoms.TTerm Coders.LanguageName -> Phantoms.TTerm Module.FileExtension -> Phantoms.TTerm (Core.Term -> Graph.Graph -> Either String String) -> Phantoms.TTerm (Core.Type -> Graph.Graph -> Either String String) -> Phantoms.TTerm (String -> String) -> Phantoms.TTerm (Module.Namespace -> String) -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm String -> Phantoms.TTerm (S.Set Core.Name -> [String]) -> Phantoms.TTerm Testing.TestCodec+testCodec language fileExtension encodeTerm encodeType formatTestName formatModuleName testCaseTemplate testGroupTemplate moduleTemplate importTemplate findImports =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCodec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Phantoms.unTTerm language)},+        Core.Field {+          Core.fieldName = (Core.Name "fileExtension"),+          Core.fieldTerm = (Phantoms.unTTerm fileExtension)},+        Core.Field {+          Core.fieldName = (Core.Name "encodeTerm"),+          Core.fieldTerm = (Phantoms.unTTerm encodeTerm)},+        Core.Field {+          Core.fieldName = (Core.Name "encodeType"),+          Core.fieldTerm = (Phantoms.unTTerm encodeType)},+        Core.Field {+          Core.fieldName = (Core.Name "formatTestName"),+          Core.fieldTerm = (Phantoms.unTTerm formatTestName)},+        Core.Field {+          Core.fieldName = (Core.Name "formatModuleName"),+          Core.fieldTerm = (Phantoms.unTTerm formatModuleName)},+        Core.Field {+          Core.fieldName = (Core.Name "testCaseTemplate"),+          Core.fieldTerm = (Phantoms.unTTerm testCaseTemplate)},+        Core.Field {+          Core.fieldName = (Core.Name "testGroupTemplate"),+          Core.fieldTerm = (Phantoms.unTTerm testGroupTemplate)},+        Core.Field {+          Core.fieldName = (Core.Name "moduleTemplate"),+          Core.fieldTerm = (Phantoms.unTTerm moduleTemplate)},+        Core.Field {+          Core.fieldName = (Core.Name "importTemplate"),+          Core.fieldTerm = (Phantoms.unTTerm importTemplate)},+        Core.Field {+          Core.fieldName = (Core.Name "findImports"),+          Core.fieldTerm = (Phantoms.unTTerm findImports)}]}))++testCodecEncodeTerm :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm (Core.Term -> Graph.Graph -> Either String String)+testCodecEncodeTerm x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+        Core.projectionField = (Core.Name "encodeTerm")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCodecEncodeType :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm (Core.Type -> Graph.Graph -> Either String String)+testCodecEncodeType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+        Core.projectionField = (Core.Name "encodeType")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCodecFileExtension :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm Module.FileExtension+testCodecFileExtension x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+        Core.projectionField = (Core.Name "fileExtension")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCodecFindImports :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm (S.Set Core.Name -> [String])+testCodecFindImports x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+        Core.projectionField = (Core.Name "findImports")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCodecFormatModuleName :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm (Module.Namespace -> String)+testCodecFormatModuleName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+        Core.projectionField = (Core.Name "formatModuleName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCodecFormatTestName :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm (String -> String)+testCodecFormatTestName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+        Core.projectionField = (Core.Name "formatTestName")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCodecImportTemplate :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm String+testCodecImportTemplate x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+        Core.projectionField = (Core.Name "importTemplate")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCodecLanguage :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm Coders.LanguageName+testCodecLanguage x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+        Core.projectionField = (Core.Name "language")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCodecModuleTemplate :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm String+testCodecModuleTemplate x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+        Core.projectionField = (Core.Name "moduleTemplate")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCodecTestCaseTemplate :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm String+testCodecTestCaseTemplate x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+        Core.projectionField = (Core.Name "testCaseTemplate")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCodecTestGroupTemplate :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm String+testCodecTestGroupTemplate x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+        Core.projectionField = (Core.Name "testGroupTemplate")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testCodecWithEncodeTerm :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm (Core.Term -> Graph.Graph -> Either String String) -> Phantoms.TTerm Testing.TestCodec+testCodecWithEncodeTerm original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCodec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "language")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fileExtension"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "fileExtension")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeTerm"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "encodeType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatTestName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatTestName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatModuleName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatModuleName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testCaseTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testCaseTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testGroupTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testGroupTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "moduleTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "moduleTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "importTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "importTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "findImports"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "findImports")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testCodecWithEncodeType :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm (Core.Type -> Graph.Graph -> Either String String) -> Phantoms.TTerm Testing.TestCodec+testCodecWithEncodeType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCodec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "language")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fileExtension"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "fileExtension")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeTerm"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeTerm")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeType"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "formatTestName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatTestName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatModuleName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatModuleName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testCaseTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testCaseTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testGroupTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testGroupTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "moduleTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "moduleTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "importTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "importTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "findImports"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "findImports")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testCodecWithFileExtension :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm Module.FileExtension -> Phantoms.TTerm Testing.TestCodec+testCodecWithFileExtension original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCodec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "language")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fileExtension"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "encodeTerm"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeTerm")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatTestName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatTestName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatModuleName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatModuleName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testCaseTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testCaseTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testGroupTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testGroupTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "moduleTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "moduleTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "importTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "importTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "findImports"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "findImports")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testCodecWithFindImports :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm (S.Set Core.Name -> [String]) -> Phantoms.TTerm Testing.TestCodec+testCodecWithFindImports original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCodec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "language")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fileExtension"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "fileExtension")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeTerm"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeTerm")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatTestName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatTestName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatModuleName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatModuleName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testCaseTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testCaseTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testGroupTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testGroupTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "moduleTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "moduleTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "importTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "importTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "findImports"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++testCodecWithFormatModuleName :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm (Module.Namespace -> String) -> Phantoms.TTerm Testing.TestCodec+testCodecWithFormatModuleName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCodec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "language")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fileExtension"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "fileExtension")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeTerm"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeTerm")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatTestName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatTestName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatModuleName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "testCaseTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testCaseTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testGroupTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testGroupTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "moduleTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "moduleTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "importTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "importTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "findImports"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "findImports")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testCodecWithFormatTestName :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm (String -> String) -> Phantoms.TTerm Testing.TestCodec+testCodecWithFormatTestName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCodec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "language")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fileExtension"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "fileExtension")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeTerm"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeTerm")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatTestName"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "formatModuleName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatModuleName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testCaseTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testCaseTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testGroupTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testGroupTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "moduleTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "moduleTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "importTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "importTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "findImports"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "findImports")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testCodecWithImportTemplate :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TestCodec+testCodecWithImportTemplate original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCodec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "language")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fileExtension"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "fileExtension")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeTerm"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeTerm")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatTestName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatTestName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatModuleName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatModuleName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testCaseTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testCaseTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testGroupTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testGroupTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "moduleTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "moduleTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "importTemplate"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "findImports"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "findImports")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testCodecWithLanguage :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm Coders.LanguageName -> Phantoms.TTerm Testing.TestCodec+testCodecWithLanguage original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCodec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "fileExtension"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "fileExtension")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeTerm"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeTerm")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatTestName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatTestName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatModuleName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatModuleName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testCaseTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testCaseTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testGroupTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testGroupTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "moduleTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "moduleTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "importTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "importTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "findImports"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "findImports")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testCodecWithModuleTemplate :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TestCodec+testCodecWithModuleTemplate original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCodec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "language")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fileExtension"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "fileExtension")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeTerm"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeTerm")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatTestName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatTestName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatModuleName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatModuleName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testCaseTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testCaseTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testGroupTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testGroupTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "moduleTemplate"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "importTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "importTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "findImports"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "findImports")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testCodecWithTestCaseTemplate :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TestCodec+testCodecWithTestCaseTemplate original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCodec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "language")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fileExtension"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "fileExtension")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeTerm"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeTerm")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatTestName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatTestName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatModuleName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatModuleName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testCaseTemplate"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "testGroupTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testGroupTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "moduleTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "moduleTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "importTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "importTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "findImports"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "findImports")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testCodecWithTestGroupTemplate :: Phantoms.TTerm Testing.TestCodec -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TestCodec+testCodecWithTestGroupTemplate original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestCodec"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "language"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "language")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "fileExtension"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "fileExtension")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeTerm"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeTerm")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "encodeType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "encodeType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatTestName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatTestName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "formatModuleName"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "formatModuleName")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testCaseTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "testCaseTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "testGroupTemplate"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "moduleTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "moduleTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "importTemplate"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "importTemplate")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "findImports"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestCodec"),+              Core.projectionField = (Core.Name "findImports")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testGenerator :: Phantoms.TTerm (Module.Module -> Graph.Graph -> Either String (Module.Namespaces a)) -> Phantoms.TTerm (Module.Namespaces a -> Testing.TestCodec) -> Phantoms.TTerm (Module.Module -> Testing.TestGroup -> Graph.Graph -> Either String (String, String)) -> Phantoms.TTerm (Maybe (String -> [Module.Module] -> (String, String))) -> Phantoms.TTerm (Testing.TestGenerator a)+testGenerator namespacesForModule createCodec generateTestFile aggregatorFile =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestGenerator"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespacesForModule"),+          Core.fieldTerm = (Phantoms.unTTerm namespacesForModule)},+        Core.Field {+          Core.fieldName = (Core.Name "createCodec"),+          Core.fieldTerm = (Phantoms.unTTerm createCodec)},+        Core.Field {+          Core.fieldName = (Core.Name "generateTestFile"),+          Core.fieldTerm = (Phantoms.unTTerm generateTestFile)},+        Core.Field {+          Core.fieldName = (Core.Name "aggregatorFile"),+          Core.fieldTerm = (Phantoms.unTTerm aggregatorFile)}]}))++testGeneratorAggregatorFile :: Phantoms.TTerm (Testing.TestGenerator a) -> Phantoms.TTerm (Maybe (String -> [Module.Module] -> (String, String)))+testGeneratorAggregatorFile x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+        Core.projectionField = (Core.Name "aggregatorFile")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testGeneratorCreateCodec :: Phantoms.TTerm (Testing.TestGenerator a) -> Phantoms.TTerm (Module.Namespaces a -> Testing.TestCodec)+testGeneratorCreateCodec x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+        Core.projectionField = (Core.Name "createCodec")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testGeneratorGenerateTestFile :: Phantoms.TTerm (Testing.TestGenerator a) -> Phantoms.TTerm (Module.Module -> Testing.TestGroup -> Graph.Graph -> Either String (String, String))+testGeneratorGenerateTestFile x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+        Core.projectionField = (Core.Name "generateTestFile")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testGeneratorNamespacesForModule :: Phantoms.TTerm (Testing.TestGenerator a) -> Phantoms.TTerm (Module.Module -> Graph.Graph -> Either String (Module.Namespaces a))+testGeneratorNamespacesForModule x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+        Core.projectionField = (Core.Name "namespacesForModule")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testGeneratorWithAggregatorFile :: Phantoms.TTerm (Testing.TestGenerator a) -> Phantoms.TTerm (Maybe (String -> [Module.Module] -> (String, String))) -> Phantoms.TTerm (Testing.TestGenerator a)+testGeneratorWithAggregatorFile original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestGenerator"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespacesForModule"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+              Core.projectionField = (Core.Name "namespacesForModule")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "createCodec"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+              Core.projectionField = (Core.Name "createCodec")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "generateTestFile"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+              Core.projectionField = (Core.Name "generateTestFile")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "aggregatorFile"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++testGeneratorWithCreateCodec :: Phantoms.TTerm (Testing.TestGenerator a) -> Phantoms.TTerm (Module.Namespaces a -> Testing.TestCodec) -> Phantoms.TTerm (Testing.TestGenerator a)+testGeneratorWithCreateCodec original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestGenerator"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespacesForModule"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+              Core.projectionField = (Core.Name "namespacesForModule")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "createCodec"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "generateTestFile"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+              Core.projectionField = (Core.Name "generateTestFile")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "aggregatorFile"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+              Core.projectionField = (Core.Name "aggregatorFile")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testGeneratorWithGenerateTestFile :: Phantoms.TTerm (Testing.TestGenerator a) -> Phantoms.TTerm (Module.Module -> Testing.TestGroup -> Graph.Graph -> Either String (String, String)) -> Phantoms.TTerm (Testing.TestGenerator a)+testGeneratorWithGenerateTestFile original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestGenerator"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespacesForModule"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+              Core.projectionField = (Core.Name "namespacesForModule")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "createCodec"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+              Core.projectionField = (Core.Name "createCodec")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "generateTestFile"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "aggregatorFile"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+              Core.projectionField = (Core.Name "aggregatorFile")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testGeneratorWithNamespacesForModule :: Phantoms.TTerm (Testing.TestGenerator a) -> Phantoms.TTerm (Module.Module -> Graph.Graph -> Either String (Module.Namespaces a)) -> Phantoms.TTerm (Testing.TestGenerator a)+testGeneratorWithNamespacesForModule original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestGenerator"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "namespacesForModule"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "createCodec"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+              Core.projectionField = (Core.Name "createCodec")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "generateTestFile"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+              Core.projectionField = (Core.Name "generateTestFile")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "aggregatorFile"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGenerator"),+              Core.projectionField = (Core.Name "aggregatorFile")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testGroup :: Phantoms.TTerm String -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm [Testing.TestGroup] -> Phantoms.TTerm [Testing.TestCaseWithMetadata] -> Phantoms.TTerm Testing.TestGroup+testGroup name description subgroups cases =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestGroup"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm name)},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Phantoms.unTTerm description)},+        Core.Field {+          Core.fieldName = (Core.Name "subgroups"),+          Core.fieldTerm = (Phantoms.unTTerm subgroups)},+        Core.Field {+          Core.fieldName = (Core.Name "cases"),+          Core.fieldTerm = (Phantoms.unTTerm cases)}]}))++testGroupCases :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm [Testing.TestCaseWithMetadata]+testGroupCases x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+        Core.projectionField = (Core.Name "cases")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testGroupDescription :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm (Maybe String)+testGroupDescription x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+        Core.projectionField = (Core.Name "description")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testGroupName :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm String+testGroupName x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+        Core.projectionField = (Core.Name "name")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testGroupSubgroups :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm [Testing.TestGroup]+testGroupSubgroups x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+        Core.projectionField = (Core.Name "subgroups")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++testGroupWithCases :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm [Testing.TestCaseWithMetadata] -> Phantoms.TTerm Testing.TestGroup+testGroupWithCases original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestGroup"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+              Core.projectionField = (Core.Name "description")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "subgroups"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+              Core.projectionField = (Core.Name "subgroups")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "cases"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++testGroupWithDescription :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm (Maybe String) -> Phantoms.TTerm Testing.TestGroup+testGroupWithDescription original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestGroup"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "subgroups"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+              Core.projectionField = (Core.Name "subgroups")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "cases"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+              Core.projectionField = (Core.Name "cases")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testGroupWithName :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm String -> Phantoms.TTerm Testing.TestGroup+testGroupWithName original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestGroup"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+              Core.projectionField = (Core.Name "description")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "subgroups"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+              Core.projectionField = (Core.Name "subgroups")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "cases"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+              Core.projectionField = (Core.Name "cases")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++testGroupWithSubgroups :: Phantoms.TTerm Testing.TestGroup -> Phantoms.TTerm [Testing.TestGroup] -> Phantoms.TTerm Testing.TestGroup+testGroupWithSubgroups original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TestGroup"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+              Core.projectionField = (Core.Name "name")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+              Core.projectionField = (Core.Name "description")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "subgroups"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "cases"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TestGroup"),+              Core.projectionField = (Core.Name "cases")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++topologicalSortBindingsTestCase :: Phantoms.TTerm [(Core.Name, Core.Term)] -> Phantoms.TTerm [[(Core.Name, Core.Term)]] -> Phantoms.TTerm Testing.TopologicalSortBindingsTestCase+topologicalSortBindingsTestCase bindings expected =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TopologicalSortBindingsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Phantoms.unTTerm bindings)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm expected)}]}))++topologicalSortBindingsTestCaseBindings :: Phantoms.TTerm Testing.TopologicalSortBindingsTestCase -> Phantoms.TTerm [(Core.Name, Core.Term)]+topologicalSortBindingsTestCaseBindings x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TopologicalSortBindingsTestCase"),+        Core.projectionField = (Core.Name "bindings")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++topologicalSortBindingsTestCaseExpected :: Phantoms.TTerm Testing.TopologicalSortBindingsTestCase -> Phantoms.TTerm [[(Core.Name, Core.Term)]]+topologicalSortBindingsTestCaseExpected x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TopologicalSortBindingsTestCase"),+        Core.projectionField = (Core.Name "expected")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++topologicalSortBindingsTestCaseWithBindings :: Phantoms.TTerm Testing.TopologicalSortBindingsTestCase -> Phantoms.TTerm [(Core.Name, Core.Term)] -> Phantoms.TTerm Testing.TopologicalSortBindingsTestCase+topologicalSortBindingsTestCaseWithBindings original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TopologicalSortBindingsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TopologicalSortBindingsTestCase"),+              Core.projectionField = (Core.Name "expected")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++topologicalSortBindingsTestCaseWithExpected :: Phantoms.TTerm Testing.TopologicalSortBindingsTestCase -> Phantoms.TTerm [[(Core.Name, Core.Term)]] -> Phantoms.TTerm Testing.TopologicalSortBindingsTestCase+topologicalSortBindingsTestCaseWithExpected original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TopologicalSortBindingsTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TopologicalSortBindingsTestCase"),+              Core.projectionField = (Core.Name "bindings")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++topologicalSortSCCTestCase :: Phantoms.TTerm [(Int, [Int])] -> Phantoms.TTerm [[Int]] -> Phantoms.TTerm Testing.TopologicalSortSCCTestCase+topologicalSortSCCTestCase adjacencyList expected =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TopologicalSortSCCTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "adjacencyList"),+          Core.fieldTerm = (Phantoms.unTTerm adjacencyList)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm expected)}]}))++topologicalSortSCCTestCaseAdjacencyList :: Phantoms.TTerm Testing.TopologicalSortSCCTestCase -> Phantoms.TTerm [(Int, [Int])]+topologicalSortSCCTestCaseAdjacencyList x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TopologicalSortSCCTestCase"),+        Core.projectionField = (Core.Name "adjacencyList")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++topologicalSortSCCTestCaseExpected :: Phantoms.TTerm Testing.TopologicalSortSCCTestCase -> Phantoms.TTerm [[Int]]+topologicalSortSCCTestCaseExpected x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TopologicalSortSCCTestCase"),+        Core.projectionField = (Core.Name "expected")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++topologicalSortSCCTestCaseWithAdjacencyList :: Phantoms.TTerm Testing.TopologicalSortSCCTestCase -> Phantoms.TTerm [(Int, [Int])] -> Phantoms.TTerm Testing.TopologicalSortSCCTestCase+topologicalSortSCCTestCaseWithAdjacencyList original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TopologicalSortSCCTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "adjacencyList"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TopologicalSortSCCTestCase"),+              Core.projectionField = (Core.Name "expected")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++topologicalSortSCCTestCaseWithExpected :: Phantoms.TTerm Testing.TopologicalSortSCCTestCase -> Phantoms.TTerm [[Int]] -> Phantoms.TTerm Testing.TopologicalSortSCCTestCase+topologicalSortSCCTestCaseWithExpected original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TopologicalSortSCCTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "adjacencyList"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TopologicalSortSCCTestCase"),+              Core.projectionField = (Core.Name "adjacencyList")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++topologicalSortTestCase :: Phantoms.TTerm [(Int, [Int])] -> Phantoms.TTerm (Either [[Int]] [Int]) -> Phantoms.TTerm Testing.TopologicalSortTestCase+topologicalSortTestCase adjacencyList expected =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TopologicalSortTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "adjacencyList"),+          Core.fieldTerm = (Phantoms.unTTerm adjacencyList)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm expected)}]}))++topologicalSortTestCaseAdjacencyList :: Phantoms.TTerm Testing.TopologicalSortTestCase -> Phantoms.TTerm [(Int, [Int])]+topologicalSortTestCaseAdjacencyList x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TopologicalSortTestCase"),+        Core.projectionField = (Core.Name "adjacencyList")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++topologicalSortTestCaseExpected :: Phantoms.TTerm Testing.TopologicalSortTestCase -> Phantoms.TTerm (Either [[Int]] [Int])+topologicalSortTestCaseExpected x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TopologicalSortTestCase"),+        Core.projectionField = (Core.Name "expected")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++topologicalSortTestCaseWithAdjacencyList :: Phantoms.TTerm Testing.TopologicalSortTestCase -> Phantoms.TTerm [(Int, [Int])] -> Phantoms.TTerm Testing.TopologicalSortTestCase+topologicalSortTestCaseWithAdjacencyList original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TopologicalSortTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "adjacencyList"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TopologicalSortTestCase"),+              Core.projectionField = (Core.Name "expected")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++topologicalSortTestCaseWithExpected :: Phantoms.TTerm Testing.TopologicalSortTestCase -> Phantoms.TTerm (Either [[Int]] [Int]) -> Phantoms.TTerm Testing.TopologicalSortTestCase+topologicalSortTestCaseWithExpected original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TopologicalSortTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "adjacencyList"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TopologicalSortTestCase"),+              Core.projectionField = (Core.Name "adjacencyList")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeCheckingFailureTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.TypeCheckingFailureTestCase+typeCheckingFailureTestCase input =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TypeCheckingFailureTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)}]}))++typeCheckingFailureTestCaseInput :: Phantoms.TTerm Testing.TypeCheckingFailureTestCase -> Phantoms.TTerm Core.Term+typeCheckingFailureTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TypeCheckingFailureTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeCheckingFailureTestCaseWithInput :: Phantoms.TTerm Testing.TypeCheckingFailureTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.TypeCheckingFailureTestCase+typeCheckingFailureTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TypeCheckingFailureTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeCheckingTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.TypeCheckingTestCase+typeCheckingTestCase input outputTerm outputType =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TypeCheckingTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "outputTerm"),+          Core.fieldTerm = (Phantoms.unTTerm outputTerm)},+        Core.Field {+          Core.fieldName = (Core.Name "outputType"),+          Core.fieldTerm = (Phantoms.unTTerm outputType)}]}))++typeCheckingTestCaseInput :: Phantoms.TTerm Testing.TypeCheckingTestCase -> Phantoms.TTerm Core.Term+typeCheckingTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TypeCheckingTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeCheckingTestCaseOutputTerm :: Phantoms.TTerm Testing.TypeCheckingTestCase -> Phantoms.TTerm Core.Term+typeCheckingTestCaseOutputTerm x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TypeCheckingTestCase"),+        Core.projectionField = (Core.Name "outputTerm")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeCheckingTestCaseOutputType :: Phantoms.TTerm Testing.TypeCheckingTestCase -> Phantoms.TTerm Core.Type+typeCheckingTestCaseOutputType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TypeCheckingTestCase"),+        Core.projectionField = (Core.Name "outputType")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeCheckingTestCaseWithInput :: Phantoms.TTerm Testing.TypeCheckingTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.TypeCheckingTestCase+typeCheckingTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TypeCheckingTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "outputTerm"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TypeCheckingTestCase"),+              Core.projectionField = (Core.Name "outputTerm")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "outputType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TypeCheckingTestCase"),+              Core.projectionField = (Core.Name "outputType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeCheckingTestCaseWithOutputTerm :: Phantoms.TTerm Testing.TypeCheckingTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.TypeCheckingTestCase+typeCheckingTestCaseWithOutputTerm original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TypeCheckingTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TypeCheckingTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "outputTerm"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "outputType"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TypeCheckingTestCase"),+              Core.projectionField = (Core.Name "outputType")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeCheckingTestCaseWithOutputType :: Phantoms.TTerm Testing.TypeCheckingTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.TypeCheckingTestCase+typeCheckingTestCaseWithOutputType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TypeCheckingTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TypeCheckingTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "outputTerm"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TypeCheckingTestCase"),+              Core.projectionField = (Core.Name "outputTerm")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "outputType"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeReductionTestCase :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.TypeReductionTestCase+typeReductionTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TypeReductionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++typeReductionTestCaseInput :: Phantoms.TTerm Testing.TypeReductionTestCase -> Phantoms.TTerm Core.Type+typeReductionTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TypeReductionTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeReductionTestCaseOutput :: Phantoms.TTerm Testing.TypeReductionTestCase -> Phantoms.TTerm Core.Type+typeReductionTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.TypeReductionTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeReductionTestCaseWithInput :: Phantoms.TTerm Testing.TypeReductionTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.TypeReductionTestCase+typeReductionTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TypeReductionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TypeReductionTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeReductionTestCaseWithOutput :: Phantoms.TTerm Testing.TypeReductionTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.TypeReductionTestCase+typeReductionTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.TypeReductionTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.TypeReductionTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeRewriterReplaceStringWithInt32 :: Phantoms.TTerm Testing.TypeRewriter+typeRewriterReplaceStringWithInt32 =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.testing.TypeRewriter"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "replaceStringWithInt32"),+        Core.fieldTerm = Core.TermUnit}}))++unTag :: Phantoms.TTerm Testing.Tag -> Phantoms.TTerm String+unTag x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.testing.Tag")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unifyTypesTestCase :: Phantoms.TTerm [Core.Name] -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm (Either String Typing.TypeSubst) -> Phantoms.TTerm Testing.UnifyTypesTestCase+unifyTypesTestCase schemaTypes left right expected =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "schemaTypes"),+          Core.fieldTerm = (Phantoms.unTTerm schemaTypes)},+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Phantoms.unTTerm left)},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Phantoms.unTTerm right)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm expected)}]}))++unifyTypesTestCaseExpected :: Phantoms.TTerm Testing.UnifyTypesTestCase -> Phantoms.TTerm (Either String Typing.TypeSubst)+unifyTypesTestCaseExpected x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+        Core.projectionField = (Core.Name "expected")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unifyTypesTestCaseLeft :: Phantoms.TTerm Testing.UnifyTypesTestCase -> Phantoms.TTerm Core.Type+unifyTypesTestCaseLeft x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+        Core.projectionField = (Core.Name "left")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unifyTypesTestCaseRight :: Phantoms.TTerm Testing.UnifyTypesTestCase -> Phantoms.TTerm Core.Type+unifyTypesTestCaseRight x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+        Core.projectionField = (Core.Name "right")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unifyTypesTestCaseSchemaTypes :: Phantoms.TTerm Testing.UnifyTypesTestCase -> Phantoms.TTerm [Core.Name]+unifyTypesTestCaseSchemaTypes x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+        Core.projectionField = (Core.Name "schemaTypes")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unifyTypesTestCaseWithExpected :: Phantoms.TTerm Testing.UnifyTypesTestCase -> Phantoms.TTerm (Either String Typing.TypeSubst) -> Phantoms.TTerm Testing.UnifyTypesTestCase+unifyTypesTestCaseWithExpected original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "schemaTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+              Core.projectionField = (Core.Name "schemaTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+              Core.projectionField = (Core.Name "left")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+              Core.projectionField = (Core.Name "right")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++unifyTypesTestCaseWithLeft :: Phantoms.TTerm Testing.UnifyTypesTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.UnifyTypesTestCase+unifyTypesTestCaseWithLeft original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "schemaTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+              Core.projectionField = (Core.Name "schemaTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+              Core.projectionField = (Core.Name "right")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+              Core.projectionField = (Core.Name "expected")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++unifyTypesTestCaseWithRight :: Phantoms.TTerm Testing.UnifyTypesTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.UnifyTypesTestCase+unifyTypesTestCaseWithRight original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "schemaTypes"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+              Core.projectionField = (Core.Name "schemaTypes")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+              Core.projectionField = (Core.Name "left")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+              Core.projectionField = (Core.Name "expected")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++unifyTypesTestCaseWithSchemaTypes :: Phantoms.TTerm Testing.UnifyTypesTestCase -> Phantoms.TTerm [Core.Name] -> Phantoms.TTerm Testing.UnifyTypesTestCase+unifyTypesTestCaseWithSchemaTypes original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "schemaTypes"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+              Core.projectionField = (Core.Name "left")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+              Core.projectionField = (Core.Name "right")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.UnifyTypesTestCase"),+              Core.projectionField = (Core.Name "expected")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++unshadowVariablesTestCase :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.UnshadowVariablesTestCase+unshadowVariablesTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.UnshadowVariablesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++unshadowVariablesTestCaseInput :: Phantoms.TTerm Testing.UnshadowVariablesTestCase -> Phantoms.TTerm Core.Term+unshadowVariablesTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.UnshadowVariablesTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unshadowVariablesTestCaseOutput :: Phantoms.TTerm Testing.UnshadowVariablesTestCase -> Phantoms.TTerm Core.Term+unshadowVariablesTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.UnshadowVariablesTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unshadowVariablesTestCaseWithInput :: Phantoms.TTerm Testing.UnshadowVariablesTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.UnshadowVariablesTestCase+unshadowVariablesTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.UnshadowVariablesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.UnshadowVariablesTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++unshadowVariablesTestCaseWithOutput :: Phantoms.TTerm Testing.UnshadowVariablesTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.UnshadowVariablesTestCase+unshadowVariablesTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.UnshadowVariablesTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.UnshadowVariablesTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++validateCoreTermTestCase :: Phantoms.TTerm Bool -> Phantoms.TTerm Core.Term -> Phantoms.TTerm (Maybe Core_.InvalidTermError) -> Phantoms.TTerm Testing.ValidateCoreTermTestCase+validateCoreTermTestCase typed input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.ValidateCoreTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typed"),+          Core.fieldTerm = (Phantoms.unTTerm typed)},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++validateCoreTermTestCaseInput :: Phantoms.TTerm Testing.ValidateCoreTermTestCase -> Phantoms.TTerm Core.Term+validateCoreTermTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.ValidateCoreTermTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++validateCoreTermTestCaseOutput :: Phantoms.TTerm Testing.ValidateCoreTermTestCase -> Phantoms.TTerm (Maybe Core_.InvalidTermError)+validateCoreTermTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.ValidateCoreTermTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++validateCoreTermTestCaseTyped :: Phantoms.TTerm Testing.ValidateCoreTermTestCase -> Phantoms.TTerm Bool+validateCoreTermTestCaseTyped x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.ValidateCoreTermTestCase"),+        Core.projectionField = (Core.Name "typed")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++validateCoreTermTestCaseWithInput :: Phantoms.TTerm Testing.ValidateCoreTermTestCase -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Testing.ValidateCoreTermTestCase+validateCoreTermTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.ValidateCoreTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typed"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.ValidateCoreTermTestCase"),+              Core.projectionField = (Core.Name "typed")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.ValidateCoreTermTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++validateCoreTermTestCaseWithOutput :: Phantoms.TTerm Testing.ValidateCoreTermTestCase -> Phantoms.TTerm (Maybe Core_.InvalidTermError) -> Phantoms.TTerm Testing.ValidateCoreTermTestCase+validateCoreTermTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.ValidateCoreTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typed"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.ValidateCoreTermTestCase"),+              Core.projectionField = (Core.Name "typed")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.ValidateCoreTermTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++validateCoreTermTestCaseWithTyped :: Phantoms.TTerm Testing.ValidateCoreTermTestCase -> Phantoms.TTerm Bool -> Phantoms.TTerm Testing.ValidateCoreTermTestCase+validateCoreTermTestCaseWithTyped original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.ValidateCoreTermTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typed"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.ValidateCoreTermTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.ValidateCoreTermTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++variableOccursInTypeTestCase :: Phantoms.TTerm Core.Name -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Bool -> Phantoms.TTerm Testing.VariableOccursInTypeTestCase+variableOccursInTypeTestCase variable type_ expected =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.VariableOccursInTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variable"),+          Core.fieldTerm = (Phantoms.unTTerm variable)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm expected)}]}))++variableOccursInTypeTestCaseExpected :: Phantoms.TTerm Testing.VariableOccursInTypeTestCase -> Phantoms.TTerm Bool+variableOccursInTypeTestCaseExpected x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.VariableOccursInTypeTestCase"),+        Core.projectionField = (Core.Name "expected")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++variableOccursInTypeTestCaseType :: Phantoms.TTerm Testing.VariableOccursInTypeTestCase -> Phantoms.TTerm Core.Type+variableOccursInTypeTestCaseType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.VariableOccursInTypeTestCase"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++variableOccursInTypeTestCaseVariable :: Phantoms.TTerm Testing.VariableOccursInTypeTestCase -> Phantoms.TTerm Core.Name+variableOccursInTypeTestCaseVariable x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.VariableOccursInTypeTestCase"),+        Core.projectionField = (Core.Name "variable")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++variableOccursInTypeTestCaseWithExpected :: Phantoms.TTerm Testing.VariableOccursInTypeTestCase -> Phantoms.TTerm Bool -> Phantoms.TTerm Testing.VariableOccursInTypeTestCase+variableOccursInTypeTestCaseWithExpected original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.VariableOccursInTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variable"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.VariableOccursInTypeTestCase"),+              Core.projectionField = (Core.Name "variable")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.VariableOccursInTypeTestCase"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++variableOccursInTypeTestCaseWithType :: Phantoms.TTerm Testing.VariableOccursInTypeTestCase -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Testing.VariableOccursInTypeTestCase+variableOccursInTypeTestCaseWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.VariableOccursInTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variable"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.VariableOccursInTypeTestCase"),+              Core.projectionField = (Core.Name "variable")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.VariableOccursInTypeTestCase"),+              Core.projectionField = (Core.Name "expected")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++variableOccursInTypeTestCaseWithVariable :: Phantoms.TTerm Testing.VariableOccursInTypeTestCase -> Phantoms.TTerm Core.Name -> Phantoms.TTerm Testing.VariableOccursInTypeTestCase+variableOccursInTypeTestCaseWithVariable original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.VariableOccursInTypeTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variable"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.VariableOccursInTypeTestCase"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "expected"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.VariableOccursInTypeTestCase"),+              Core.projectionField = (Core.Name "expected")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++writerTestCase :: Phantoms.TTerm a -> Phantoms.TTerm String -> Phantoms.TTerm (Testing.WriterTestCase a)+writerTestCase input output =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.WriterTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm input)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm output)}]}))++writerTestCaseInput :: Phantoms.TTerm (Testing.WriterTestCase a) -> Phantoms.TTerm a+writerTestCaseInput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.WriterTestCase"),+        Core.projectionField = (Core.Name "input")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++writerTestCaseOutput :: Phantoms.TTerm (Testing.WriterTestCase a) -> Phantoms.TTerm String+writerTestCaseOutput x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.testing.WriterTestCase"),+        Core.projectionField = (Core.Name "output")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++writerTestCaseWithInput :: Phantoms.TTerm (Testing.WriterTestCase a) -> Phantoms.TTerm a -> Phantoms.TTerm (Testing.WriterTestCase a)+writerTestCaseWithInput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.WriterTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.WriterTestCase"),+              Core.projectionField = (Core.Name "output")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++writerTestCaseWithOutput :: Phantoms.TTerm (Testing.WriterTestCase a) -> Phantoms.TTerm String -> Phantoms.TTerm (Testing.WriterTestCase a)+writerTestCaseWithOutput original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.testing.WriterTestCase"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "input"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.testing.WriterTestCase"),+              Core.projectionField = (Core.Name "input")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "output"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))
+ src/gen-main/haskell/Hydra/Dsl/Topology.hs view
@@ -0,0 +1,411 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.topology++module Hydra.Dsl.Topology where++import qualified Hydra.Core as Core+import qualified Hydra.Phantoms as Phantoms+import qualified Hydra.Topology as Topology+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++orderingIsomorphism :: Phantoms.TTerm ([a] -> [a]) -> Phantoms.TTerm ([a] -> [a]) -> Phantoms.TTerm (Topology.OrderingIsomorphism a)+orderingIsomorphism encode decode =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.topology.OrderingIsomorphism"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "encode"),+          Core.fieldTerm = (Phantoms.unTTerm encode)},+        Core.Field {+          Core.fieldName = (Core.Name "decode"),+          Core.fieldTerm = (Phantoms.unTTerm decode)}]}))++orderingIsomorphismDecode :: Phantoms.TTerm (Topology.OrderingIsomorphism a) -> Phantoms.TTerm ([a] -> [a])+orderingIsomorphismDecode x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.topology.OrderingIsomorphism"),+        Core.projectionField = (Core.Name "decode")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++orderingIsomorphismEncode :: Phantoms.TTerm (Topology.OrderingIsomorphism a) -> Phantoms.TTerm ([a] -> [a])+orderingIsomorphismEncode x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.topology.OrderingIsomorphism"),+        Core.projectionField = (Core.Name "encode")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++orderingIsomorphismWithDecode :: Phantoms.TTerm (Topology.OrderingIsomorphism a) -> Phantoms.TTerm ([a] -> [a]) -> Phantoms.TTerm (Topology.OrderingIsomorphism a)+orderingIsomorphismWithDecode original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.topology.OrderingIsomorphism"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "encode"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.OrderingIsomorphism"),+              Core.projectionField = (Core.Name "encode")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "decode"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++orderingIsomorphismWithEncode :: Phantoms.TTerm (Topology.OrderingIsomorphism a) -> Phantoms.TTerm ([a] -> [a]) -> Phantoms.TTerm (Topology.OrderingIsomorphism a)+orderingIsomorphismWithEncode original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.topology.OrderingIsomorphism"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "encode"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "decode"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.OrderingIsomorphism"),+              Core.projectionField = (Core.Name "decode")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++tarjanState :: Phantoms.TTerm Int -> Phantoms.TTerm (M.Map Topology.Vertex Int) -> Phantoms.TTerm (M.Map Topology.Vertex Int) -> Phantoms.TTerm [Topology.Vertex] -> Phantoms.TTerm (S.Set Topology.Vertex) -> Phantoms.TTerm [[Topology.Vertex]] -> Phantoms.TTerm Topology.TarjanState+tarjanState counter indices lowLinks stack onStack sccs =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "counter"),+          Core.fieldTerm = (Phantoms.unTTerm counter)},+        Core.Field {+          Core.fieldName = (Core.Name "indices"),+          Core.fieldTerm = (Phantoms.unTTerm indices)},+        Core.Field {+          Core.fieldName = (Core.Name "lowLinks"),+          Core.fieldTerm = (Phantoms.unTTerm lowLinks)},+        Core.Field {+          Core.fieldName = (Core.Name "stack"),+          Core.fieldTerm = (Phantoms.unTTerm stack)},+        Core.Field {+          Core.fieldName = (Core.Name "onStack"),+          Core.fieldTerm = (Phantoms.unTTerm onStack)},+        Core.Field {+          Core.fieldName = (Core.Name "sccs"),+          Core.fieldTerm = (Phantoms.unTTerm sccs)}]}))++tarjanStateCounter :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm Int+tarjanStateCounter x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+        Core.projectionField = (Core.Name "counter")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++tarjanStateIndices :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm (M.Map Topology.Vertex Int)+tarjanStateIndices x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+        Core.projectionField = (Core.Name "indices")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++tarjanStateLowLinks :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm (M.Map Topology.Vertex Int)+tarjanStateLowLinks x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+        Core.projectionField = (Core.Name "lowLinks")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++tarjanStateOnStack :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm (S.Set Topology.Vertex)+tarjanStateOnStack x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+        Core.projectionField = (Core.Name "onStack")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++tarjanStateSccs :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm [[Topology.Vertex]]+tarjanStateSccs x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+        Core.projectionField = (Core.Name "sccs")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++tarjanStateStack :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm [Topology.Vertex]+tarjanStateStack x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+        Core.projectionField = (Core.Name "stack")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++tarjanStateWithCounter :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm Int -> Phantoms.TTerm Topology.TarjanState+tarjanStateWithCounter original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "counter"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "indices"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "indices")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "lowLinks"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "lowLinks")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "stack"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "stack")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "onStack"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "onStack")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "sccs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "sccs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++tarjanStateWithIndices :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm (M.Map Topology.Vertex Int) -> Phantoms.TTerm Topology.TarjanState+tarjanStateWithIndices original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "counter"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "counter")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "indices"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "lowLinks"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "lowLinks")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "stack"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "stack")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "onStack"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "onStack")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "sccs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "sccs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++tarjanStateWithLowLinks :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm (M.Map Topology.Vertex Int) -> Phantoms.TTerm Topology.TarjanState+tarjanStateWithLowLinks original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "counter"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "counter")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "indices"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "indices")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "lowLinks"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "stack"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "stack")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "onStack"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "onStack")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "sccs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "sccs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++tarjanStateWithOnStack :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm (S.Set Topology.Vertex) -> Phantoms.TTerm Topology.TarjanState+tarjanStateWithOnStack original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "counter"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "counter")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "indices"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "indices")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "lowLinks"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "lowLinks")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "stack"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "stack")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "onStack"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "sccs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "sccs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++tarjanStateWithSccs :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm [[Topology.Vertex]] -> Phantoms.TTerm Topology.TarjanState+tarjanStateWithSccs original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "counter"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "counter")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "indices"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "indices")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "lowLinks"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "lowLinks")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "stack"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "stack")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "onStack"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "onStack")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "sccs"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++tarjanStateWithStack :: Phantoms.TTerm Topology.TarjanState -> Phantoms.TTerm [Topology.Vertex] -> Phantoms.TTerm Topology.TarjanState+tarjanStateWithStack original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.topology.TarjanState"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "counter"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "counter")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "indices"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "indices")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "lowLinks"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "lowLinks")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "stack"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "onStack"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "onStack")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "sccs"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.topology.TarjanState"),+              Core.projectionField = (Core.Name "sccs")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))
+ src/gen-main/haskell/Hydra/Dsl/Typing.hs view
@@ -0,0 +1,834 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.typing++module Hydra.Dsl.Typing where++import qualified Hydra.Context as Context+import qualified Hydra.Core as Core+import qualified Hydra.Phantoms as Phantoms+import qualified Hydra.Typing as Typing+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++functionStructure :: Phantoms.TTerm [Core.Name] -> Phantoms.TTerm [Core.Name] -> Phantoms.TTerm [Core.Binding] -> Phantoms.TTerm Core.Term -> Phantoms.TTerm [Core.Type] -> Phantoms.TTerm (Maybe Core.Type) -> Phantoms.TTerm env -> Phantoms.TTerm (Typing.FunctionStructure env)+functionStructure typeParams params bindings body domains codomain environment =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeParams"),+          Core.fieldTerm = (Phantoms.unTTerm typeParams)},+        Core.Field {+          Core.fieldName = (Core.Name "params"),+          Core.fieldTerm = (Phantoms.unTTerm params)},+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Phantoms.unTTerm bindings)},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm body)},+        Core.Field {+          Core.fieldName = (Core.Name "domains"),+          Core.fieldTerm = (Phantoms.unTTerm domains)},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (Phantoms.unTTerm codomain)},+        Core.Field {+          Core.fieldName = (Core.Name "environment"),+          Core.fieldTerm = (Phantoms.unTTerm environment)}]}))++functionStructureBindings :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Binding]+functionStructureBindings x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+        Core.projectionField = (Core.Name "bindings")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++functionStructureBody :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm Core.Term+functionStructureBody x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+        Core.projectionField = (Core.Name "body")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++functionStructureCodomain :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm (Maybe Core.Type)+functionStructureCodomain x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+        Core.projectionField = (Core.Name "codomain")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++functionStructureDomains :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Type]+functionStructureDomains x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+        Core.projectionField = (Core.Name "domains")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++functionStructureEnvironment :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm env+functionStructureEnvironment x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+        Core.projectionField = (Core.Name "environment")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++functionStructureParams :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Name]+functionStructureParams x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+        Core.projectionField = (Core.Name "params")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++functionStructureTypeParams :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Name]+functionStructureTypeParams x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+        Core.projectionField = (Core.Name "typeParams")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++functionStructureWithBindings :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Binding] -> Phantoms.TTerm (Typing.FunctionStructure env)+functionStructureWithBindings original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeParams"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "typeParams")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "params"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "params")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "domains"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "domains")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "codomain")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "environment"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "environment")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++functionStructureWithBody :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm Core.Term -> Phantoms.TTerm (Typing.FunctionStructure env)+functionStructureWithBody original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeParams"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "typeParams")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "params"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "params")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "bindings")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "domains"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "domains")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "codomain")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "environment"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "environment")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++functionStructureWithCodomain :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm (Maybe Core.Type) -> Phantoms.TTerm (Typing.FunctionStructure env)+functionStructureWithCodomain original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeParams"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "typeParams")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "params"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "params")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "bindings")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "domains"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "domains")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "environment"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "environment")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++functionStructureWithDomains :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Type] -> Phantoms.TTerm (Typing.FunctionStructure env)+functionStructureWithDomains original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeParams"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "typeParams")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "params"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "params")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "bindings")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "domains"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "codomain")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "environment"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "environment")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++functionStructureWithEnvironment :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm env -> Phantoms.TTerm (Typing.FunctionStructure env)+functionStructureWithEnvironment original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeParams"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "typeParams")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "params"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "params")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "bindings")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "domains"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "domains")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "codomain")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "environment"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++functionStructureWithParams :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Name] -> Phantoms.TTerm (Typing.FunctionStructure env)+functionStructureWithParams original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeParams"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "typeParams")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "params"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "bindings")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "domains"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "domains")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "codomain")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "environment"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "environment")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++functionStructureWithTypeParams :: Phantoms.TTerm (Typing.FunctionStructure env) -> Phantoms.TTerm [Core.Name] -> Phantoms.TTerm (Typing.FunctionStructure env)+functionStructureWithTypeParams original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.FunctionStructure"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeParams"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "params"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "params")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "bindings")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "body")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "domains"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "domains")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "codomain")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "environment"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.FunctionStructure"),+              Core.projectionField = (Core.Name "environment")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++inferenceResult :: Phantoms.TTerm Core.Term -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Typing.TypeSubst -> Phantoms.TTerm (M.Map Core.Name Core.TypeVariableMetadata) -> Phantoms.TTerm Context.Context -> Phantoms.TTerm Typing.InferenceResult+inferenceResult term type_ subst classConstraints context =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.InferenceResult"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Phantoms.unTTerm term)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm type_)},+        Core.Field {+          Core.fieldName = (Core.Name "subst"),+          Core.fieldTerm = (Phantoms.unTTerm subst)},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Phantoms.unTTerm classConstraints)},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Phantoms.unTTerm context)}]}))++inferenceResultClassConstraints :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm (M.Map Core.Name Core.TypeVariableMetadata)+inferenceResultClassConstraints x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+        Core.projectionField = (Core.Name "classConstraints")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++inferenceResultContext :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Context.Context+inferenceResultContext x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+        Core.projectionField = (Core.Name "context")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++inferenceResultSubst :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Typing.TypeSubst+inferenceResultSubst x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+        Core.projectionField = (Core.Name "subst")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++inferenceResultTerm :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Core.Term+inferenceResultTerm x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+        Core.projectionField = (Core.Name "term")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++inferenceResultType :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Core.Type+inferenceResultType x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+        Core.projectionField = (Core.Name "type")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++inferenceResultWithClassConstraints :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm (M.Map Core.Name Core.TypeVariableMetadata) -> Phantoms.TTerm Typing.InferenceResult+inferenceResultWithClassConstraints original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.InferenceResult"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "term")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "subst"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "subst")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "context")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++inferenceResultWithContext :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Context.Context -> Phantoms.TTerm Typing.InferenceResult+inferenceResultWithContext original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.InferenceResult"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "term")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "subst"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "subst")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "classConstraints")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++inferenceResultWithSubst :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Typing.TypeSubst -> Phantoms.TTerm Typing.InferenceResult+inferenceResultWithSubst original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.InferenceResult"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "term")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "subst"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "classConstraints")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "context")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++inferenceResultWithTerm :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Core.Term -> Phantoms.TTerm Typing.InferenceResult+inferenceResultWithTerm original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.InferenceResult"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "type")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "subst"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "subst")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "classConstraints")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "context")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++inferenceResultWithType :: Phantoms.TTerm Typing.InferenceResult -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Typing.InferenceResult+inferenceResultWithType original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.InferenceResult"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "term")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "subst"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "subst")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "classConstraints"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "classConstraints")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.InferenceResult"),+              Core.projectionField = (Core.Name "context")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++termSubst :: Phantoms.TTerm (M.Map Core.Name Core.Term) -> Phantoms.TTerm Typing.TermSubst+termSubst x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.typing.TermSubst"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++typeConstraint :: Phantoms.TTerm Core.Type -> Phantoms.TTerm Core.Type -> Phantoms.TTerm String -> Phantoms.TTerm Typing.TypeConstraint+typeConstraint left right comment =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.TypeConstraint"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Phantoms.unTTerm left)},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Phantoms.unTTerm right)},+        Core.Field {+          Core.fieldName = (Core.Name "comment"),+          Core.fieldTerm = (Phantoms.unTTerm comment)}]}))++typeConstraintComment :: Phantoms.TTerm Typing.TypeConstraint -> Phantoms.TTerm String+typeConstraintComment x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),+        Core.projectionField = (Core.Name "comment")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeConstraintLeft :: Phantoms.TTerm Typing.TypeConstraint -> Phantoms.TTerm Core.Type+typeConstraintLeft x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),+        Core.projectionField = (Core.Name "left")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeConstraintRight :: Phantoms.TTerm Typing.TypeConstraint -> Phantoms.TTerm Core.Type+typeConstraintRight x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),+        Core.projectionField = (Core.Name "right")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++typeConstraintWithComment :: Phantoms.TTerm Typing.TypeConstraint -> Phantoms.TTerm String -> Phantoms.TTerm Typing.TypeConstraint+typeConstraintWithComment original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.TypeConstraint"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),+              Core.projectionField = (Core.Name "left")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),+              Core.projectionField = (Core.Name "right")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "comment"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++typeConstraintWithLeft :: Phantoms.TTerm Typing.TypeConstraint -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Typing.TypeConstraint+typeConstraintWithLeft original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.TypeConstraint"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),+              Core.projectionField = (Core.Name "right")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "comment"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),+              Core.projectionField = (Core.Name "comment")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeConstraintWithRight :: Phantoms.TTerm Typing.TypeConstraint -> Phantoms.TTerm Core.Type -> Phantoms.TTerm Typing.TypeConstraint+typeConstraintWithRight original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.typing.TypeConstraint"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),+              Core.projectionField = (Core.Name "left")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "comment"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.typing.TypeConstraint"),+              Core.projectionField = (Core.Name "comment")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++typeSubst :: Phantoms.TTerm (M.Map Core.Name Core.Type) -> Phantoms.TTerm Typing.TypeSubst+typeSubst x =+    Phantoms.TTerm (Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.typing.TypeSubst"),+      Core.wrappedTermBody = (Phantoms.unTTerm x)}))++unTermSubst :: Phantoms.TTerm Typing.TermSubst -> Phantoms.TTerm (M.Map Core.Name Core.Term)+unTermSubst x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.typing.TermSubst")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++unTypeSubst :: Phantoms.TTerm Typing.TypeSubst -> Phantoms.TTerm (M.Map Core.Name Core.Type)+unTypeSubst x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.typing.TypeSubst")))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))
+ src/gen-main/haskell/Hydra/Dsl/Util.hs view
@@ -0,0 +1,379 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.util++module Hydra.Dsl.Util where++import qualified Hydra.Context as Context+import qualified Hydra.Core as Core+import qualified Hydra.Errors as Errors+import qualified Hydra.Phantoms as Phantoms+import qualified Hydra.Util as Util+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++adapter :: Phantoms.TTerm Bool -> Phantoms.TTerm t1 -> Phantoms.TTerm t2 -> Phantoms.TTerm (Util.Coder v1 v2) -> Phantoms.TTerm (Util.Adapter t1 t2 v1 v2)+adapter isLossy source target coder =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.util.Adapter"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "isLossy"),+          Core.fieldTerm = (Phantoms.unTTerm isLossy)},+        Core.Field {+          Core.fieldName = (Core.Name "source"),+          Core.fieldTerm = (Phantoms.unTTerm source)},+        Core.Field {+          Core.fieldName = (Core.Name "target"),+          Core.fieldTerm = (Phantoms.unTTerm target)},+        Core.Field {+          Core.fieldName = (Core.Name "coder"),+          Core.fieldTerm = (Phantoms.unTTerm coder)}]}))++adapterCoder :: Phantoms.TTerm (Util.Adapter t1 t2 v1 v2) -> Phantoms.TTerm (Util.Coder v1 v2)+adapterCoder x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+        Core.projectionField = (Core.Name "coder")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++adapterIsLossy :: Phantoms.TTerm (Util.Adapter t1 t2 v1 v2) -> Phantoms.TTerm Bool+adapterIsLossy x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+        Core.projectionField = (Core.Name "isLossy")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++adapterSource :: Phantoms.TTerm (Util.Adapter t1 t2 v1 v2) -> Phantoms.TTerm t1+adapterSource x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+        Core.projectionField = (Core.Name "source")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++adapterTarget :: Phantoms.TTerm (Util.Adapter t1 t2 v1 v2) -> Phantoms.TTerm t2+adapterTarget x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+        Core.projectionField = (Core.Name "target")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++adapterWithCoder :: Phantoms.TTerm (Util.Adapter t1 t2 v1 v2) -> Phantoms.TTerm (Util.Coder v1 v2) -> Phantoms.TTerm (Util.Adapter t1 t2 v1 v2)+adapterWithCoder original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.util.Adapter"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "isLossy"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+              Core.projectionField = (Core.Name "isLossy")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "source"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+              Core.projectionField = (Core.Name "source")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "target"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+              Core.projectionField = (Core.Name "target")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "coder"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++adapterWithIsLossy :: Phantoms.TTerm (Util.Adapter t1 t2 v1 v2) -> Phantoms.TTerm Bool -> Phantoms.TTerm (Util.Adapter t1 t2 v1 v2)+adapterWithIsLossy original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.util.Adapter"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "isLossy"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "source"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+              Core.projectionField = (Core.Name "source")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "target"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+              Core.projectionField = (Core.Name "target")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "coder"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+              Core.projectionField = (Core.Name "coder")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++adapterWithSource :: Phantoms.TTerm (Util.Adapter t1 t2 v1 v2) -> Phantoms.TTerm t1 -> Phantoms.TTerm (Util.Adapter t1 t2 v1 v2)+adapterWithSource original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.util.Adapter"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "isLossy"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+              Core.projectionField = (Core.Name "isLossy")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "source"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "target"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+              Core.projectionField = (Core.Name "target")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "coder"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+              Core.projectionField = (Core.Name "coder")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++adapterWithTarget :: Phantoms.TTerm (Util.Adapter t1 t2 v1 v2) -> Phantoms.TTerm t2 -> Phantoms.TTerm (Util.Adapter t1 t2 v1 v2)+adapterWithTarget original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.util.Adapter"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "isLossy"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+              Core.projectionField = (Core.Name "isLossy")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "source"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+              Core.projectionField = (Core.Name "source")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "target"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "coder"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Adapter"),+              Core.projectionField = (Core.Name "coder")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++bicoder :: Phantoms.TTerm (t1 -> Util.Adapter t1 t2 v1 v2) -> Phantoms.TTerm (t2 -> Util.Adapter t2 t1 v2 v1) -> Phantoms.TTerm (Util.Bicoder t1 t2 v1 v2)+bicoder encode decode =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.util.Bicoder"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "encode"),+          Core.fieldTerm = (Phantoms.unTTerm encode)},+        Core.Field {+          Core.fieldName = (Core.Name "decode"),+          Core.fieldTerm = (Phantoms.unTTerm decode)}]}))++bicoderDecode :: Phantoms.TTerm (Util.Bicoder t1 t2 v1 v2) -> Phantoms.TTerm (t2 -> Util.Adapter t2 t1 v2 v1)+bicoderDecode x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.util.Bicoder"),+        Core.projectionField = (Core.Name "decode")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++bicoderEncode :: Phantoms.TTerm (Util.Bicoder t1 t2 v1 v2) -> Phantoms.TTerm (t1 -> Util.Adapter t1 t2 v1 v2)+bicoderEncode x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.util.Bicoder"),+        Core.projectionField = (Core.Name "encode")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++bicoderWithDecode :: Phantoms.TTerm (Util.Bicoder t1 t2 v1 v2) -> Phantoms.TTerm (t2 -> Util.Adapter t2 t1 v2 v1) -> Phantoms.TTerm (Util.Bicoder t1 t2 v1 v2)+bicoderWithDecode original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.util.Bicoder"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "encode"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Bicoder"),+              Core.projectionField = (Core.Name "encode")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "decode"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++bicoderWithEncode :: Phantoms.TTerm (Util.Bicoder t1 t2 v1 v2) -> Phantoms.TTerm (t1 -> Util.Adapter t1 t2 v1 v2) -> Phantoms.TTerm (Util.Bicoder t1 t2 v1 v2)+bicoderWithEncode original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.util.Bicoder"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "encode"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "decode"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Bicoder"),+              Core.projectionField = (Core.Name "decode")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++caseConventionCamel :: Phantoms.TTerm Util.CaseConvention+caseConventionCamel =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "camel"),+        Core.fieldTerm = Core.TermUnit}}))++caseConventionLowerSnake :: Phantoms.TTerm Util.CaseConvention+caseConventionLowerSnake =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "lowerSnake"),+        Core.fieldTerm = Core.TermUnit}}))++caseConventionPascal :: Phantoms.TTerm Util.CaseConvention+caseConventionPascal =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "pascal"),+        Core.fieldTerm = Core.TermUnit}}))++caseConventionUpperSnake :: Phantoms.TTerm Util.CaseConvention+caseConventionUpperSnake =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.util.CaseConvention"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "upperSnake"),+        Core.fieldTerm = Core.TermUnit}}))++coder :: Phantoms.TTerm (Context.Context -> v1 -> Either (Context.InContext Errors.Error) v2) -> Phantoms.TTerm (Context.Context -> v2 -> Either (Context.InContext Errors.Error) v1) -> Phantoms.TTerm (Util.Coder v1 v2)+coder encode decode =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.util.Coder"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "encode"),+          Core.fieldTerm = (Phantoms.unTTerm encode)},+        Core.Field {+          Core.fieldName = (Core.Name "decode"),+          Core.fieldTerm = (Phantoms.unTTerm decode)}]}))++coderDecode :: Phantoms.TTerm (Util.Coder v1 v2) -> Phantoms.TTerm (Context.Context -> v2 -> Either (Context.InContext Errors.Error) v1)+coderDecode x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.util.Coder"),+        Core.projectionField = (Core.Name "decode")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++coderEncode :: Phantoms.TTerm (Util.Coder v1 v2) -> Phantoms.TTerm (Context.Context -> v1 -> Either (Context.InContext Errors.Error) v2)+coderEncode x =+    Phantoms.TTerm (Core.TermApplication (Core.Application {+      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+        Core.projectionTypeName = (Core.Name "hydra.util.Coder"),+        Core.projectionField = (Core.Name "encode")})))),+      Core.applicationArgument = (Phantoms.unTTerm x)}))++coderWithDecode :: Phantoms.TTerm (Util.Coder v1 v2) -> Phantoms.TTerm (Context.Context -> v2 -> Either (Context.InContext Errors.Error) v1) -> Phantoms.TTerm (Util.Coder v1 v2)+coderWithDecode original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.util.Coder"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "encode"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Coder"),+              Core.projectionField = (Core.Name "encode")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))},+        Core.Field {+          Core.fieldName = (Core.Name "decode"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)}]}))++coderWithEncode :: Phantoms.TTerm (Util.Coder v1 v2) -> Phantoms.TTerm (Context.Context -> v1 -> Either (Context.InContext Errors.Error) v2) -> Phantoms.TTerm (Util.Coder v1 v2)+coderWithEncode original newVal =+    Phantoms.TTerm (Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.util.Coder"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "encode"),+          Core.fieldTerm = (Phantoms.unTTerm newVal)},+        Core.Field {+          Core.fieldName = (Core.Name "decode"),+          Core.fieldTerm = (Core.TermApplication (Core.Application {+            Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationRecord (Core.Projection {+              Core.projectionTypeName = (Core.Name "hydra.util.Coder"),+              Core.projectionField = (Core.Name "decode")})))),+            Core.applicationArgument = (Phantoms.unTTerm original)}))}]}))++comparisonEqualTo :: Phantoms.TTerm Util.Comparison+comparisonEqualTo =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "equalTo"),+        Core.fieldTerm = Core.TermUnit}}))++comparisonGreaterThan :: Phantoms.TTerm Util.Comparison+comparisonGreaterThan =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "greaterThan"),+        Core.fieldTerm = Core.TermUnit}}))++comparisonLessThan :: Phantoms.TTerm Util.Comparison+comparisonLessThan =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.util.Comparison"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "lessThan"),+        Core.fieldTerm = Core.TermUnit}}))++precisionArbitrary :: Phantoms.TTerm Util.Precision+precisionArbitrary =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.util.Precision"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "arbitrary"),+        Core.fieldTerm = Core.TermUnit}}))++precisionBits :: Phantoms.TTerm Int -> Phantoms.TTerm Util.Precision+precisionBits x =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.util.Precision"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "bits"),+        Core.fieldTerm = (Phantoms.unTTerm x)}}))
+ src/gen-main/haskell/Hydra/Dsl/Variants.hs view
@@ -0,0 +1,383 @@+-- Note: this is an automatically generated file. Do not edit.++-- | DSL functions for hydra.variants++module Hydra.Dsl.Variants where++import qualified Hydra.Core as Core+import qualified Hydra.Phantoms as Phantoms+import qualified Hydra.Variants as Variants+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++eliminationVariantRecord :: Phantoms.TTerm Variants.EliminationVariant+eliminationVariantRecord =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.EliminationVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "record"),+        Core.fieldTerm = Core.TermUnit}}))++eliminationVariantUnion :: Phantoms.TTerm Variants.EliminationVariant+eliminationVariantUnion =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.EliminationVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "union"),+        Core.fieldTerm = Core.TermUnit}}))++eliminationVariantWrap :: Phantoms.TTerm Variants.EliminationVariant+eliminationVariantWrap =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.EliminationVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "wrap"),+        Core.fieldTerm = Core.TermUnit}}))++functionVariantElimination :: Phantoms.TTerm Variants.FunctionVariant+functionVariantElimination =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.FunctionVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "elimination"),+        Core.fieldTerm = Core.TermUnit}}))++functionVariantLambda :: Phantoms.TTerm Variants.FunctionVariant+functionVariantLambda =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.FunctionVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "lambda"),+        Core.fieldTerm = Core.TermUnit}}))++functionVariantPrimitive :: Phantoms.TTerm Variants.FunctionVariant+functionVariantPrimitive =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.FunctionVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "primitive"),+        Core.fieldTerm = Core.TermUnit}}))++literalVariantBinary :: Phantoms.TTerm Variants.LiteralVariant+literalVariantBinary =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "binary"),+        Core.fieldTerm = Core.TermUnit}}))++literalVariantBoolean :: Phantoms.TTerm Variants.LiteralVariant+literalVariantBoolean =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "boolean"),+        Core.fieldTerm = Core.TermUnit}}))++literalVariantFloat :: Phantoms.TTerm Variants.LiteralVariant+literalVariantFloat =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "float"),+        Core.fieldTerm = Core.TermUnit}}))++literalVariantInteger :: Phantoms.TTerm Variants.LiteralVariant+literalVariantInteger =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "integer"),+        Core.fieldTerm = Core.TermUnit}}))++literalVariantString :: Phantoms.TTerm Variants.LiteralVariant+literalVariantString =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.LiteralVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "string"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantAnnotated :: Phantoms.TTerm Variants.TermVariant+termVariantAnnotated =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "annotated"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantApplication :: Phantoms.TTerm Variants.TermVariant+termVariantApplication =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "application"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantEither :: Phantoms.TTerm Variants.TermVariant+termVariantEither =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "either"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantFunction :: Phantoms.TTerm Variants.TermVariant+termVariantFunction =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "function"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantLet :: Phantoms.TTerm Variants.TermVariant+termVariantLet =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "let"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantList :: Phantoms.TTerm Variants.TermVariant+termVariantList =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "list"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantLiteral :: Phantoms.TTerm Variants.TermVariant+termVariantLiteral =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "literal"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantMap :: Phantoms.TTerm Variants.TermVariant+termVariantMap =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "map"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantMaybe :: Phantoms.TTerm Variants.TermVariant+termVariantMaybe =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "maybe"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantPair :: Phantoms.TTerm Variants.TermVariant+termVariantPair =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "pair"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantRecord :: Phantoms.TTerm Variants.TermVariant+termVariantRecord =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "record"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantSet :: Phantoms.TTerm Variants.TermVariant+termVariantSet =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "set"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantTypeApplication :: Phantoms.TTerm Variants.TermVariant+termVariantTypeApplication =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typeApplication"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantTypeLambda :: Phantoms.TTerm Variants.TermVariant+termVariantTypeLambda =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "typeLambda"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantUnion :: Phantoms.TTerm Variants.TermVariant+termVariantUnion =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "union"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantUnit :: Phantoms.TTerm Variants.TermVariant+termVariantUnit =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unit"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantVariable :: Phantoms.TTerm Variants.TermVariant+termVariantVariable =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "variable"),+        Core.fieldTerm = Core.TermUnit}}))++termVariantWrap :: Phantoms.TTerm Variants.TermVariant+termVariantWrap =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TermVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "wrap"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantAnnotated :: Phantoms.TTerm Variants.TypeVariant+typeVariantAnnotated =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "annotated"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantApplication :: Phantoms.TTerm Variants.TypeVariant+typeVariantApplication =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "application"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantEither :: Phantoms.TTerm Variants.TypeVariant+typeVariantEither =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "either"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantForall :: Phantoms.TTerm Variants.TypeVariant+typeVariantForall =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "forall"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantFunction :: Phantoms.TTerm Variants.TypeVariant+typeVariantFunction =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "function"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantList :: Phantoms.TTerm Variants.TypeVariant+typeVariantList =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "list"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantLiteral :: Phantoms.TTerm Variants.TypeVariant+typeVariantLiteral =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "literal"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantMap :: Phantoms.TTerm Variants.TypeVariant+typeVariantMap =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "map"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantMaybe :: Phantoms.TTerm Variants.TypeVariant+typeVariantMaybe =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "maybe"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantPair :: Phantoms.TTerm Variants.TypeVariant+typeVariantPair =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "pair"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantRecord :: Phantoms.TTerm Variants.TypeVariant+typeVariantRecord =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "record"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantSet :: Phantoms.TTerm Variants.TypeVariant+typeVariantSet =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "set"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantUnion :: Phantoms.TTerm Variants.TypeVariant+typeVariantUnion =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "union"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantUnit :: Phantoms.TTerm Variants.TypeVariant+typeVariantUnit =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "unit"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantVariable :: Phantoms.TTerm Variants.TypeVariant+typeVariantVariable =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "variable"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantVoid :: Phantoms.TTerm Variants.TypeVariant+typeVariantVoid =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "void"),+        Core.fieldTerm = Core.TermUnit}}))++typeVariantWrap :: Phantoms.TTerm Variants.TypeVariant+typeVariantWrap =+    Phantoms.TTerm (Core.TermUnion (Core.Injection {+      Core.injectionTypeName = (Core.Name "hydra.variants.TypeVariant"),+      Core.injectionField = Core.Field {+        Core.fieldName = (Core.Name "wrap"),+        Core.fieldTerm = Core.TermUnit}}))
+ src/gen-main/haskell/Hydra/Dsls.hs view
@@ -0,0 +1,561 @@+-- Note: this is an automatically generated file. Do not edit.++-- | Functions for generating domain-specific DSL modules from type modules++module Hydra.Dsls where++import qualified Hydra.Annotations as Annotations+import qualified Hydra.Context as Context+import qualified Hydra.Core as Core+import qualified Hydra.Decode.Core as Core_+import qualified Hydra.Errors as Errors+import qualified Hydra.Formatting as Formatting+import qualified Hydra.Graph as Graph+import qualified Hydra.Lib.Eithers as Eithers+import qualified Hydra.Lib.Equality as Equality+import qualified Hydra.Lib.Lists as Lists+import qualified Hydra.Lib.Logic as Logic+import qualified Hydra.Lib.Maybes as Maybes+import qualified Hydra.Lib.Pairs as Pairs+import qualified Hydra.Lib.Strings as Strings+import qualified Hydra.Module as Module+import qualified Hydra.Names as Names+import qualified Hydra.Rewriting as Rewriting+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++-- | Collect forall type variable names from a type+collectForallVars :: Core.Type -> [Core.Name]+collectForallVars typ =+    case typ of+      Core.TypeAnnotated v0 -> collectForallVars (Core.annotatedTypeBody v0)+      Core.TypeForall v0 -> Lists.cons (Core.forallTypeParameter v0) (collectForallVars (Core.forallTypeBody v0))+      _ -> []++-- | Deduplicate bindings by appending underscore suffixes to duplicate names+deduplicateBindings :: [Core.Binding] -> [Core.Binding]+deduplicateBindings bindings =+    Lists.foldl (\acc -> \b ->+      let n = Core.unName (Core.bindingName b)+          usedNames = Lists.map (\a -> Core.unName (Core.bindingName a)) acc+          uniqueName = findUniqueName n usedNames+      in (Lists.concat2 acc [+        Core.Binding {+          Core.bindingName = (Core.Name uniqueName),+          Core.bindingTerm = (Core.bindingTerm b),+          Core.bindingType = (Core.bindingType b)}])) [] bindings++-- | Generate a binding name for a DSL function from a type name+dslBindingName :: Core.Name -> Core.Name+dslBindingName n =++      let parts = Strings.splitOn "." (Core.unName n)+      in (Logic.ifElse (Logic.not (Lists.null (Lists.tail parts))) (Logic.ifElse (Equality.equal (Lists.head parts) "hydra") (Core.Name (Strings.intercalate "." (Lists.concat2 [+        "hydra",+        "dsl"] (Lists.concat2 (Lists.tail (Lists.init parts)) [+        Formatting.decapitalize (Names.localNameOf n)])))) (Core.Name (Strings.intercalate "." (Lists.concat2 [+        "hydra",+        "dsl"] (Lists.concat2 (Lists.init parts) [+        Formatting.decapitalize (Names.localNameOf n)]))))) (Core.Name (Formatting.decapitalize (Names.localNameOf n))))++-- | Generate a qualified DSL element name from a type name and local element name+dslElementName :: Core.Name -> String -> Core.Name+dslElementName typeName localName =++      let parts = Strings.splitOn "." (Core.unName typeName)+          nsParts = Lists.init parts+          dslNsParts =+                  Logic.ifElse (Equality.equal (Lists.head nsParts) "hydra") (Lists.concat2 [+                    "hydra",+                    "dsl"] (Lists.tail nsParts)) (Lists.concat2 [+                    "hydra",+                    "dsl"] nsParts)+      in (Core.Name (Strings.intercalate "." (Lists.concat2 dslNsParts [+        localName])))++-- | Transform a type module into a DSL module+dslModule :: Context.Context -> Graph.Graph -> Module.Module -> Either (Context.InContext Errors.Error) (Maybe Module.Module)+dslModule cx graph mod =+    Eithers.bind (filterTypeBindings cx graph (Maybes.cat (Lists.map (\d -> case d of+      Module.DefinitionType v0 -> Just (Annotations.typeElement (Module.typeDefinitionName v0) (Module.typeDefinitionType v0))+      _ -> Nothing) (Module.moduleDefinitions mod)))) (\typeBindings -> Logic.ifElse (Lists.null typeBindings) (Right Nothing) (Eithers.bind (Eithers.mapList (\b -> Eithers.bimap (\ic -> Context.InContext {+      Context.inContextObject = (Errors.ErrorOther (Errors.OtherError (Errors.unDecodingError (Context.inContextObject ic)))),+      Context.inContextContext = (Context.inContextContext ic)}) (\x -> x) (generateBindingsForType cx graph b)) typeBindings) (\dslBindings -> Right (Just (Module.Module {+      Module.moduleNamespace = (dslNamespace (Module.moduleNamespace mod)),+      Module.moduleDefinitions = (Lists.map (\b -> Module.DefinitionTerm (Module.TermDefinition {+        Module.termDefinitionName = (Core.bindingName b),+        Module.termDefinitionTerm = (Core.bindingTerm b),+        Module.termDefinitionType = (Core.bindingType b)})) (deduplicateBindings (Lists.concat dslBindings))),+      Module.moduleTermDependencies = (Lists.nub (Lists.map dslNamespace (Module.moduleTypeDependencies mod))),+      Module.moduleTypeDependencies = (Lists.nub (Lists.concat2 [+        Module.moduleNamespace mod,+        (Module.Namespace "hydra.phantoms")] (Module.moduleTypeDependencies mod))),+      Module.moduleDescription = (Just (Strings.cat [+        "DSL functions for ",+        (Module.unNamespace (Module.moduleNamespace mod))]))})))))++-- | Generate a DSL module namespace from a source module namespace+dslNamespace :: Module.Namespace -> Module.Namespace+dslNamespace ns =++      let parts = Strings.splitOn "." (Module.unNamespace ns)+      in (Logic.ifElse (Equality.equal (Lists.head parts) "hydra") (Module.Namespace (Strings.cat [+        "hydra.dsl.",+        (Strings.intercalate "." (Lists.tail parts))])) (Module.Namespace (Strings.cat [+        "hydra.dsl.",+        (Module.unNamespace ns)])))++-- | Build a TypeScheme with TTerm-wrapped parameter and result types+dslTypeScheme :: Core.Type -> [Core.Type] -> Core.Type -> Core.TypeScheme+dslTypeScheme origType paramTypes resultType =++      let typeVars = collectForallVars origType+          wrappedResult =+                  Core.TypeApplication (Core.ApplicationType {+                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),+                    Core.applicationTypeArgument = resultType})+          funType =+                  Lists.foldr (\paramType -> \acc -> Core.TypeFunction (Core.FunctionType {+                    Core.functionTypeDomain = (Core.TypeApplication (Core.ApplicationType {+                      Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),+                      Core.applicationTypeArgument = paramType})),+                    Core.functionTypeCodomain = acc})) wrappedResult paramTypes+      in Core.TypeScheme {+        Core.typeSchemeVariables = typeVars,+        Core.typeSchemeType = funType,+        Core.typeSchemeConstraints = Nothing}++-- | Filter bindings to only DSL-eligible type definitions+filterTypeBindings :: t0 -> t1 -> [Core.Binding] -> Either t2 [Core.Binding]+filterTypeBindings cx graph bindings =+    Eithers.map Maybes.cat (Eithers.mapList (isDslEligibleBinding cx graph) (Lists.filter Annotations.isNativeType bindings))++-- | Find a unique name by appending underscores+findUniqueName :: String -> [String] -> String+findUniqueName candidate usedNames =+    Logic.ifElse (Lists.null (Lists.filter (Equality.equal candidate) usedNames)) candidate (findUniqueName (Strings.cat [+      candidate,+      "_"]) usedNames)++-- | Generate all DSL bindings for a type binding+generateBindingsForType :: Context.Context -> Graph.Graph -> Core.Binding -> Either (Context.InContext Errors.DecodingError) [Core.Binding]+generateBindingsForType cx graph b =++      let typeName = Core.bindingName b+      in (Eithers.bind (Eithers.bimap (\_wc_e -> Context.InContext {+        Context.inContextObject = _wc_e,+        Context.inContextContext = cx}) (\_wc_a -> _wc_a) (Core_.type_ graph (Core.bindingTerm b))) (\rawType ->+        let typ = Rewriting.deannotateTypeParameters (Rewriting.deannotateType rawType)+        in (Right (case typ of+          Core.TypeRecord v0 -> Lists.concat [+            generateRecordConstructor rawType typeName v0,+            (Lists.map (generateRecordAccessor rawType typeName) v0),+            (Lists.map (generateRecordWithUpdater rawType typeName v0) v0)]+          Core.TypeUnion v0 -> Lists.map (generateUnionInjector rawType typeName) v0+          Core.TypeWrap v0 -> generateWrappedTypeAccessors rawType typeName v0+          _ -> []))))++-- | Generate a record field accessor function+generateRecordAccessor :: Core.Type -> Core.Name -> Core.FieldType -> Core.Binding+generateRecordAccessor origType typeName ft =++      let fieldName = Core.fieldTypeName ft+          accessorLocalName =+                  Strings.cat [+                    Formatting.decapitalize (Names.localNameOf typeName),+                    (Strings.intercalate "" (Lists.map (\s -> Formatting.capitalize s) (Strings.splitOn "." (Core.unName fieldName))))]+          accessorName = dslElementName typeName accessorLocalName+          paramDomain =+                  Core.TypeApplication (Core.ApplicationType {+                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),+                    Core.applicationTypeArgument = (nominalResultType typeName origType)})+          body =+                  Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "x"),+                    Core.lambdaDomain = (Just paramDomain),+                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.phantoms.TTerm"),+                      Core.wrappedTermBody = (Core.TermUnion (Core.Injection {+                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+                        Core.injectionField = Core.Field {+                          Core.fieldName = (Core.Name "application"),+                          Core.fieldTerm = (Core.TermRecord (Core.Record {+                            Core.recordTypeName = (Core.Name "hydra.core.Application"),+                            Core.recordFields = [+                              Core.Field {+                                Core.fieldName = (Core.Name "function"),+                                Core.fieldTerm = (Core.TermUnion (Core.Injection {+                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),+                                  Core.injectionField = Core.Field {+                                    Core.fieldName = (Core.Name "function"),+                                    Core.fieldTerm = (Core.TermUnion (Core.Injection {+                                      Core.injectionTypeName = (Core.Name "hydra.core.Function"),+                                      Core.injectionField = Core.Field {+                                        Core.fieldName = (Core.Name "elimination"),+                                        Core.fieldTerm = (Core.TermUnion (Core.Injection {+                                          Core.injectionTypeName = (Core.Name "hydra.core.Elimination"),+                                          Core.injectionField = Core.Field {+                                            Core.fieldName = (Core.Name "record"),+                                            Core.fieldTerm = (Core.TermRecord (Core.Record {+                                              Core.recordTypeName = (Core.Name "hydra.core.Projection"),+                                              Core.recordFields = [+                                                Core.Field {+                                                  Core.fieldName = (Core.Name "typeName"),+                                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {+                                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName typeName)))}))},+                                                Core.Field {+                                                  Core.fieldName = (Core.Name "field"),+                                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {+                                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+                                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName fieldName)))}))}]}))}}))}}))}}))},+                              Core.Field {+                                Core.fieldName = (Core.Name "argument"),+                                Core.fieldTerm = (Core.TermApplication (Core.Application {+                                  Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.phantoms.TTerm")))),+                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}]}))}}))}))}))+          ts = dslTypeScheme origType [+                nominalResultType typeName origType] (Core.fieldTypeType ft)+      in Core.Binding {+        Core.bindingName = accessorName,+        Core.bindingTerm = body,+        Core.bindingType = (Just ts)}++-- | Generate a record constructor function+generateRecordConstructor :: Core.Type -> Core.Name -> [Core.FieldType] -> [Core.Binding]+generateRecordConstructor origType typeName fieldTypes =++      let dFields =+              Lists.map (\ft -> Core.TermRecord (Core.Record {+                Core.recordTypeName = (Core.Name "hydra.core.Field"),+                Core.recordFields = [+                  Core.Field {+                    Core.fieldName = (Core.Name "name"),+                    Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName (Core.fieldTypeName ft))))}))},+                  Core.Field {+                    Core.fieldName = (Core.Name "term"),+                    Core.fieldTerm = (Core.TermApplication (Core.Application {+                      Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.phantoms.TTerm")))),+                      Core.applicationArgument = (Core.TermVariable (Core.Name (Formatting.decapitalize (Names.localNameOf (Core.fieldTypeName ft)))))}))}]})) fieldTypes+          recordTerm =+                  Core.TermWrap (Core.WrappedTerm {+                    Core.wrappedTermTypeName = (Core.Name "hydra.phantoms.TTerm"),+                    Core.wrappedTermBody = (Core.TermUnion (Core.Injection {+                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+                      Core.injectionField = Core.Field {+                        Core.fieldName = (Core.Name "record"),+                        Core.fieldTerm = (Core.TermRecord (Core.Record {+                          Core.recordTypeName = (Core.Name "hydra.core.Record"),+                          Core.recordFields = [+                            Core.Field {+                              Core.fieldName = (Core.Name "typeName"),+                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {+                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName typeName)))}))},+                            Core.Field {+                              Core.fieldName = (Core.Name "fields"),+                              Core.fieldTerm = (Core.TermList dFields)}]}))}}))})+          paramPairs =+                  Lists.map (\ft -> (Formatting.decapitalize (Names.localNameOf (Core.fieldTypeName ft)), (Core.TypeApplication (Core.ApplicationType {+                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),+                    Core.applicationTypeArgument = (Core.fieldTypeType ft)})))) fieldTypes+          body =+                  Lists.foldl (\acc -> \pp -> Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name (Pairs.first pp)),+                    Core.lambdaDomain = (Just (Pairs.second pp)),+                    Core.lambdaBody = acc}))) recordTerm (Lists.reverse paramPairs)+          paramTypes = Lists.map (\ft -> Core.fieldTypeType ft) fieldTypes+          resultType = nominalResultType typeName origType+          ts = dslTypeScheme origType paramTypes resultType+      in [+        Core.Binding {+          Core.bindingName = (dslBindingName typeName),+          Core.bindingTerm = body,+          Core.bindingType = (Just ts)}]++-- | Generate a withXxx record field updater function+generateRecordWithUpdater :: Core.Type -> Core.Name -> [Core.FieldType] -> Core.FieldType -> Core.Binding+generateRecordWithUpdater origType typeName allFields targetField =++      let targetFieldName = Core.fieldTypeName targetField+          updaterLocalName =+                  Strings.cat [+                    Formatting.decapitalize (Names.localNameOf typeName),+                    "With",+                    (Strings.intercalate "" (Lists.map (\s -> Formatting.capitalize s) (Strings.splitOn "." (Core.unName targetFieldName))))]+          updaterName = dslElementName typeName updaterLocalName+          dFields =+                  Lists.map (\ft -> Core.TermRecord (Core.Record {+                    Core.recordTypeName = (Core.Name "hydra.core.Field"),+                    Core.recordFields = [+                      Core.Field {+                        Core.fieldName = (Core.Name "name"),+                        Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {+                          Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+                          Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName (Core.fieldTypeName ft))))}))},+                      Core.Field {+                        Core.fieldName = (Core.Name "term"),+                        Core.fieldTerm = (Logic.ifElse (Equality.equal (Core.unName (Core.fieldTypeName ft)) (Core.unName targetFieldName)) (Core.TermApplication (Core.Application {+                          Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.phantoms.TTerm")))),+                          Core.applicationArgument = (Core.TermVariable (Core.Name "newVal"))})) (Core.TermUnion (Core.Injection {+                          Core.injectionTypeName = (Core.Name "hydra.core.Term"),+                          Core.injectionField = Core.Field {+                            Core.fieldName = (Core.Name "application"),+                            Core.fieldTerm = (Core.TermRecord (Core.Record {+                              Core.recordTypeName = (Core.Name "hydra.core.Application"),+                              Core.recordFields = [+                                Core.Field {+                                  Core.fieldName = (Core.Name "function"),+                                  Core.fieldTerm = (Core.TermUnion (Core.Injection {+                                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),+                                    Core.injectionField = Core.Field {+                                      Core.fieldName = (Core.Name "function"),+                                      Core.fieldTerm = (Core.TermUnion (Core.Injection {+                                        Core.injectionTypeName = (Core.Name "hydra.core.Function"),+                                        Core.injectionField = Core.Field {+                                          Core.fieldName = (Core.Name "elimination"),+                                          Core.fieldTerm = (Core.TermUnion (Core.Injection {+                                            Core.injectionTypeName = (Core.Name "hydra.core.Elimination"),+                                            Core.injectionField = Core.Field {+                                              Core.fieldName = (Core.Name "record"),+                                              Core.fieldTerm = (Core.TermRecord (Core.Record {+                                                Core.recordTypeName = (Core.Name "hydra.core.Projection"),+                                                Core.recordFields = [+                                                  Core.Field {+                                                    Core.fieldName = (Core.Name "typeName"),+                                                    Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {+                                                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+                                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName typeName)))}))},+                                                  Core.Field {+                                                    Core.fieldName = (Core.Name "field"),+                                                    Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {+                                                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+                                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName (Core.fieldTypeName ft))))}))}]}))}}))}}))}}))},+                                Core.Field {+                                  Core.fieldName = (Core.Name "argument"),+                                  Core.fieldTerm = (Core.TermApplication (Core.Application {+                                    Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.phantoms.TTerm")))),+                                    Core.applicationArgument = (Core.TermVariable (Core.Name "original"))}))}]}))}})))}]})) allFields+          recDomain =+                  Core.TypeApplication (Core.ApplicationType {+                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),+                    Core.applicationTypeArgument = (nominalResultType typeName origType)})+          fieldDomain =+                  Core.TypeApplication (Core.ApplicationType {+                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),+                    Core.applicationTypeArgument = (Core.fieldTypeType targetField)})+          body =+                  Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "original"),+                    Core.lambdaDomain = (Just recDomain),+                    Core.lambdaBody = (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                      Core.lambdaParameter = (Core.Name "newVal"),+                      Core.lambdaDomain = (Just fieldDomain),+                      Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {+                        Core.wrappedTermTypeName = (Core.Name "hydra.phantoms.TTerm"),+                        Core.wrappedTermBody = (Core.TermUnion (Core.Injection {+                          Core.injectionTypeName = (Core.Name "hydra.core.Term"),+                          Core.injectionField = Core.Field {+                            Core.fieldName = (Core.Name "record"),+                            Core.fieldTerm = (Core.TermRecord (Core.Record {+                              Core.recordTypeName = (Core.Name "hydra.core.Record"),+                              Core.recordFields = [+                                Core.Field {+                                  Core.fieldName = (Core.Name "typeName"),+                                  Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {+                                    Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+                                    Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName typeName)))}))},+                                Core.Field {+                                  Core.fieldName = (Core.Name "fields"),+                                  Core.fieldTerm = (Core.TermList dFields)}]}))}}))}))})))}))+          recType = nominalResultType typeName origType+          ts =+                  dslTypeScheme origType [+                    recType,+                    (Core.fieldTypeType targetField)] recType+      in Core.Binding {+        Core.bindingName = updaterName,+        Core.bindingTerm = body,+        Core.bindingType = (Just ts)}++-- | Generate a union injection helper+generateUnionInjector :: Core.Type -> Core.Name -> Core.FieldType -> Core.Binding+generateUnionInjector origType typeName ft =++      let fieldName = Core.fieldTypeName ft+          fieldType = Core.fieldTypeType ft+          injectorLocalName =+                  Strings.cat [+                    Formatting.decapitalize (Names.localNameOf typeName),+                    (Strings.intercalate "" (Lists.map (\s -> Formatting.capitalize s) (Strings.splitOn "." (Core.unName fieldName))))]+          injectorName = dslElementName typeName injectorLocalName+          isUnit =+                  (\t -> case (Rewriting.deannotateType t) of+                    Core.TypeUnit -> True+                    _ -> False) fieldType+          dFieldValue =+                  Logic.ifElse isUnit (Core.TermUnion (Core.Injection {+                    Core.injectionTypeName = (Core.Name "hydra.core.Term"),+                    Core.injectionField = Core.Field {+                      Core.fieldName = (Core.Name "unit"),+                      Core.fieldTerm = Core.TermUnit}})) (Core.TermApplication (Core.Application {+                    Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.phantoms.TTerm")))),+                    Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))+          injectionTerm =+                  Core.TermWrap (Core.WrappedTerm {+                    Core.wrappedTermTypeName = (Core.Name "hydra.phantoms.TTerm"),+                    Core.wrappedTermBody = (Core.TermUnion (Core.Injection {+                      Core.injectionTypeName = (Core.Name "hydra.core.Term"),+                      Core.injectionField = Core.Field {+                        Core.fieldName = (Core.Name "union"),+                        Core.fieldTerm = (Core.TermRecord (Core.Record {+                          Core.recordTypeName = (Core.Name "hydra.core.Injection"),+                          Core.recordFields = [+                            Core.Field {+                              Core.fieldName = (Core.Name "typeName"),+                              Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {+                                Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+                                Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName typeName)))}))},+                            Core.Field {+                              Core.fieldName = (Core.Name "field"),+                              Core.fieldTerm = (Core.TermRecord (Core.Record {+                                Core.recordTypeName = (Core.Name "hydra.core.Field"),+                                Core.recordFields = [+                                  Core.Field {+                                    Core.fieldName = (Core.Name "name"),+                                    Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {+                                      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+                                      Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName fieldName)))}))},+                                  Core.Field {+                                    Core.fieldName = (Core.Name "term"),+                                    Core.fieldTerm = dFieldValue}]}))}]}))}}))})+          variantDomain =+                  Core.TypeApplication (Core.ApplicationType {+                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),+                    Core.applicationTypeArgument = (Core.fieldTypeType ft)})+          body =+                  Logic.ifElse isUnit injectionTerm (Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "x"),+                    Core.lambdaDomain = (Just variantDomain),+                    Core.lambdaBody = injectionTerm})))+          unionType = nominalResultType typeName origType+          ts = Logic.ifElse isUnit (dslTypeScheme origType [] unionType) (dslTypeScheme origType [+                Core.fieldTypeType ft] unionType)+      in Core.Binding {+        Core.bindingName = injectorName,+        Core.bindingTerm = body,+        Core.bindingType = (Just ts)}++-- | Generate wrap/unwrap accessors for a wrapped type+generateWrappedTypeAccessors :: Core.Type -> Core.Name -> Core.Type -> [Core.Binding]+generateWrappedTypeAccessors origType typeName innerType =++      let localName = Names.localNameOf typeName+          wrapName = dslElementName typeName (Formatting.decapitalize localName)+          unwrapLocalName =+                  Strings.cat [+                    "un",+                    localName]+          unwrapName = dslElementName typeName unwrapLocalName+          wrapperType = nominalResultType typeName origType+          wrapDomain =+                  Core.TypeApplication (Core.ApplicationType {+                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),+                    Core.applicationTypeArgument = innerType})+          wrapBody =+                  Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "x"),+                    Core.lambdaDomain = (Just wrapDomain),+                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.phantoms.TTerm"),+                      Core.wrappedTermBody = (Core.TermUnion (Core.Injection {+                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+                        Core.injectionField = Core.Field {+                          Core.fieldName = (Core.Name "wrap"),+                          Core.fieldTerm = (Core.TermRecord (Core.Record {+                            Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),+                            Core.recordFields = [+                              Core.Field {+                                Core.fieldName = (Core.Name "typeName"),+                                Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {+                                  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+                                  Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName typeName)))}))},+                              Core.Field {+                                Core.fieldName = (Core.Name "body"),+                                Core.fieldTerm = (Core.TermApplication (Core.Application {+                                  Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.phantoms.TTerm")))),+                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}]}))}}))}))}))+          unwrapDomain =+                  Core.TypeApplication (Core.ApplicationType {+                    Core.applicationTypeFunction = (Core.TypeVariable (Core.Name "hydra.phantoms.TTerm")),+                    Core.applicationTypeArgument = wrapperType})+          unwrapBody =+                  Core.TermFunction (Core.FunctionLambda (Core.Lambda {+                    Core.lambdaParameter = (Core.Name "x"),+                    Core.lambdaDomain = (Just unwrapDomain),+                    Core.lambdaBody = (Core.TermWrap (Core.WrappedTerm {+                      Core.wrappedTermTypeName = (Core.Name "hydra.phantoms.TTerm"),+                      Core.wrappedTermBody = (Core.TermUnion (Core.Injection {+                        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+                        Core.injectionField = Core.Field {+                          Core.fieldName = (Core.Name "application"),+                          Core.fieldTerm = (Core.TermRecord (Core.Record {+                            Core.recordTypeName = (Core.Name "hydra.core.Application"),+                            Core.recordFields = [+                              Core.Field {+                                Core.fieldName = (Core.Name "function"),+                                Core.fieldTerm = (Core.TermUnion (Core.Injection {+                                  Core.injectionTypeName = (Core.Name "hydra.core.Term"),+                                  Core.injectionField = Core.Field {+                                    Core.fieldName = (Core.Name "function"),+                                    Core.fieldTerm = (Core.TermUnion (Core.Injection {+                                      Core.injectionTypeName = (Core.Name "hydra.core.Function"),+                                      Core.injectionField = Core.Field {+                                        Core.fieldName = (Core.Name "elimination"),+                                        Core.fieldTerm = (Core.TermUnion (Core.Injection {+                                          Core.injectionTypeName = (Core.Name "hydra.core.Elimination"),+                                          Core.injectionField = Core.Field {+                                            Core.fieldName = (Core.Name "wrap"),+                                            Core.fieldTerm = (Core.TermWrap (Core.WrappedTerm {+                                              Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+                                              Core.wrappedTermBody = (Core.TermLiteral (Core.LiteralString (Core.unName typeName)))}))}}))}}))}}))},+                              Core.Field {+                                Core.fieldName = (Core.Name "argument"),+                                Core.fieldTerm = (Core.TermApplication (Core.Application {+                                  Core.applicationFunction = (Core.TermFunction (Core.FunctionElimination (Core.EliminationWrap (Core.Name "hydra.phantoms.TTerm")))),+                                  Core.applicationArgument = (Core.TermVariable (Core.Name "x"))}))}]}))}}))}))}))+          wrapTs = dslTypeScheme origType [+                innerType] wrapperType+          unwrapTs = dslTypeScheme origType [+                wrapperType] innerType+      in [+        Core.Binding {+          Core.bindingName = wrapName,+          Core.bindingTerm = wrapBody,+          Core.bindingType = (Just wrapTs)},+        Core.Binding {+          Core.bindingName = unwrapName,+          Core.bindingTerm = unwrapBody,+          Core.bindingType = (Just unwrapTs)}]++-- | Check if a binding is eligible for DSL generation+isDslEligibleBinding :: t0 -> t1 -> Core.Binding -> Either t2 (Maybe Core.Binding)+isDslEligibleBinding cx graph b =++      let ns = Names.namespaceOf (Core.bindingName b)+      in (Logic.ifElse (Equality.equal (Maybes.maybe "" Module.unNamespace ns) "hydra.phantoms") (Right Nothing) (Right (Just b)))++-- | Build the nominal result type with type applications for forall variables+nominalResultType :: Core.Name -> Core.Type -> Core.Type+nominalResultType typeName origType =++      let vars = collectForallVars origType+      in (Lists.foldl (\acc -> \v -> Core.TypeApplication (Core.ApplicationType {+        Core.applicationTypeFunction = acc,+        Core.applicationTypeArgument = (Core.TypeVariable v)})) (Core.TypeVariable typeName) vars)
− src/gen-main/haskell/Hydra/Encode/Accessors.hs
@@ -1,163 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Term encoders for hydra.accessors--module Hydra.Encode.Accessors where--import qualified Hydra.Accessors as Accessors-import qualified Hydra.Core as Core-import qualified Hydra.Encode.Core as Core_-import qualified Hydra.Lib.Lists as Lists-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S--accessorEdge :: (Accessors.AccessorEdge -> Core.Term)-accessorEdge x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.accessors.AccessorEdge"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "source"),-      Core.fieldTerm = (accessorNode (Accessors.accessorEdgeSource x))},-    Core.Field {-      Core.fieldName = (Core.Name "path"),-      Core.fieldTerm = (accessorPath (Accessors.accessorEdgePath x))},-    Core.Field {-      Core.fieldName = (Core.Name "target"),-      Core.fieldTerm = (accessorNode (Accessors.accessorEdgeTarget x))}]}))--accessorGraph :: (Accessors.AccessorGraph -> Core.Term)-accessorGraph x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.accessors.AccessorGraph"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "nodes"),-      Core.fieldTerm = ((\xs -> Core.TermList (Lists.map accessorNode xs)) (Accessors.accessorGraphNodes x))},-    Core.Field {-      Core.fieldName = (Core.Name "edges"),-      Core.fieldTerm = ((\xs -> Core.TermList (Lists.map accessorEdge xs)) (Accessors.accessorGraphEdges x))}]}))--accessorNode :: (Accessors.AccessorNode -> Core.Term)-accessorNode x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.accessors.AccessorNode"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "name"),-      Core.fieldTerm = (Core_.name (Accessors.accessorNodeName x))},-    Core.Field {-      Core.fieldName = (Core.Name "label"),-      Core.fieldTerm = ((\x -> Core.TermLiteral (Core.LiteralString x)) (Accessors.accessorNodeLabel x))},-    Core.Field {-      Core.fieldName = (Core.Name "id"),-      Core.fieldTerm = ((\x -> Core.TermLiteral (Core.LiteralString x)) (Accessors.accessorNodeId x))}]}))--accessorPath :: (Accessors.AccessorPath -> Core.Term)-accessorPath x = (Core.TermWrap (Core.WrappedTerm {-  Core.wrappedTermTypeName = (Core.Name "hydra.accessors.AccessorPath"),-  Core.wrappedTermBody = ((\xs -> Core.TermList (Lists.map termAccessor xs)) (Accessors.unAccessorPath x))}))--termAccessor :: (Accessors.TermAccessor -> Core.Term)-termAccessor x = case x of-  Accessors.TermAccessorAnnotatedBody -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "annotatedBody"),-      Core.fieldTerm = Core.TermUnit}}))-  Accessors.TermAccessorApplicationFunction -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "applicationFunction"),-      Core.fieldTerm = Core.TermUnit}}))-  Accessors.TermAccessorApplicationArgument -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "applicationArgument"),-      Core.fieldTerm = Core.TermUnit}}))-  Accessors.TermAccessorLambdaBody -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "lambdaBody"),-      Core.fieldTerm = Core.TermUnit}}))-  Accessors.TermAccessorUnionCasesDefault -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "unionCasesDefault"),-      Core.fieldTerm = Core.TermUnit}}))-  Accessors.TermAccessorUnionCasesBranch v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "unionCasesBranch"),-      Core.fieldTerm = (Core_.name v1)}}))-  Accessors.TermAccessorLetBody -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "letBody"),-      Core.fieldTerm = Core.TermUnit}}))-  Accessors.TermAccessorLetBinding v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "letBinding"),-      Core.fieldTerm = (Core_.name v1)}}))-  Accessors.TermAccessorListElement v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "listElement"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v1)))}}))-  Accessors.TermAccessorMapKey v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "mapKey"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v1)))}}))-  Accessors.TermAccessorMapValue v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "mapValue"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v1)))}}))-  Accessors.TermAccessorMaybeTerm -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "maybeTerm"),-      Core.fieldTerm = Core.TermUnit}}))-  Accessors.TermAccessorProductTerm v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "productTerm"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v1)))}}))-  Accessors.TermAccessorRecordField v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "recordField"),-      Core.fieldTerm = (Core_.name v1)}}))-  Accessors.TermAccessorSetElement v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "setElement"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v1)))}}))-  Accessors.TermAccessorSumTerm -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "sumTerm"),-      Core.fieldTerm = Core.TermUnit}}))-  Accessors.TermAccessorTypeLambdaBody -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "typeLambdaBody"),-      Core.fieldTerm = Core.TermUnit}}))-  Accessors.TermAccessorTypeApplicationTerm -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "typeApplicationTerm"),-      Core.fieldTerm = Core.TermUnit}}))-  Accessors.TermAccessorInjectionTerm -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "injectionTerm"),-      Core.fieldTerm = Core.TermUnit}}))-  Accessors.TermAccessorWrappedTerm -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.accessors.TermAccessor"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "wrappedTerm"),-      Core.fieldTerm = Core.TermUnit}}))
src/gen-main/haskell/Hydra/Encode/Ast.hs view
@@ -6,6 +6,7 @@  import qualified Hydra.Ast as Ast import qualified Hydra.Core as Core+import qualified Hydra.Lib.Lists as Lists import qualified Hydra.Lib.Maybes as Maybes import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum) import qualified Data.ByteString as B@@ -14,191 +15,221 @@ import qualified Data.Map as M import qualified Data.Set as S -associativity :: (Ast.Associativity -> Core.Term)-associativity x = case x of-  Ast.AssociativityNone -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "none"),-      Core.fieldTerm = Core.TermUnit}}))-  Ast.AssociativityLeft -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "left"),-      Core.fieldTerm = Core.TermUnit}}))-  Ast.AssociativityRight -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "right"),-      Core.fieldTerm = Core.TermUnit}}))-  Ast.AssociativityBoth -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "both"),-      Core.fieldTerm = Core.TermUnit}}))+associativity :: Ast.Associativity -> Core.Term+associativity x =+    case x of+      Ast.AssociativityNone -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "none"),+          Core.fieldTerm = Core.TermUnit}})+      Ast.AssociativityLeft -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = Core.TermUnit}})+      Ast.AssociativityRight -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = Core.TermUnit}})+      Ast.AssociativityBoth -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.Associativity"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "both"),+          Core.fieldTerm = Core.TermUnit}}) -blockStyle :: (Ast.BlockStyle -> Core.Term)-blockStyle x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.ast.BlockStyle"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "indent"),-      Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map (\x -> Core.TermLiteral (Core.LiteralString x)) opt)) (Ast.blockStyleIndent x))},-    Core.Field {-      Core.fieldName = (Core.Name "newlineBeforeContent"),-      Core.fieldTerm = ((\x -> Core.TermLiteral (Core.LiteralBoolean x)) (Ast.blockStyleNewlineBeforeContent x))},-    Core.Field {-      Core.fieldName = (Core.Name "newlineAfterContent"),-      Core.fieldTerm = ((\x -> Core.TermLiteral (Core.LiteralBoolean x)) (Ast.blockStyleNewlineAfterContent x))}]}))+blockStyle :: Ast.BlockStyle -> Core.Term+blockStyle x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.BlockStyle"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "indent"),+          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map (\x -> Core.TermLiteral (Core.LiteralString x)) opt)) (Ast.blockStyleIndent x))},+        Core.Field {+          Core.fieldName = (Core.Name "newlineBeforeContent"),+          Core.fieldTerm = ((\x -> Core.TermLiteral (Core.LiteralBoolean x)) (Ast.blockStyleNewlineBeforeContent x))},+        Core.Field {+          Core.fieldName = (Core.Name "newlineAfterContent"),+          Core.fieldTerm = ((\x -> Core.TermLiteral (Core.LiteralBoolean x)) (Ast.blockStyleNewlineAfterContent x))}]}) -bracketExpr :: (Ast.BracketExpr -> Core.Term)-bracketExpr x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.ast.BracketExpr"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "brackets"),-      Core.fieldTerm = (brackets (Ast.bracketExprBrackets x))},-    Core.Field {-      Core.fieldName = (Core.Name "enclosed"),-      Core.fieldTerm = (expr (Ast.bracketExprEnclosed x))},-    Core.Field {-      Core.fieldName = (Core.Name "style"),-      Core.fieldTerm = (blockStyle (Ast.bracketExprStyle x))}]}))+bracketExpr :: Ast.BracketExpr -> Core.Term+bracketExpr x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.BracketExpr"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "brackets"),+          Core.fieldTerm = (brackets (Ast.bracketExprBrackets x))},+        Core.Field {+          Core.fieldName = (Core.Name "enclosed"),+          Core.fieldTerm = (expr (Ast.bracketExprEnclosed x))},+        Core.Field {+          Core.fieldName = (Core.Name "style"),+          Core.fieldTerm = (blockStyle (Ast.bracketExprStyle x))}]}) -brackets :: (Ast.Brackets -> Core.Term)-brackets x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.ast.Brackets"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "open"),-      Core.fieldTerm = (symbol (Ast.bracketsOpen x))},-    Core.Field {-      Core.fieldName = (Core.Name "close"),-      Core.fieldTerm = (symbol (Ast.bracketsClose x))}]}))+brackets :: Ast.Brackets -> Core.Term+brackets x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.Brackets"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "open"),+          Core.fieldTerm = (symbol (Ast.bracketsOpen x))},+        Core.Field {+          Core.fieldName = (Core.Name "close"),+          Core.fieldTerm = (symbol (Ast.bracketsClose x))}]}) -expr :: (Ast.Expr -> Core.Term)-expr x = case x of-  Ast.ExprConst v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "const"),-      Core.fieldTerm = (symbol v1)}}))-  Ast.ExprIndent v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "indent"),-      Core.fieldTerm = (indentedExpression v1)}}))-  Ast.ExprOp v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "op"),-      Core.fieldTerm = (opExpr v1)}}))-  Ast.ExprBrackets v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "brackets"),-      Core.fieldTerm = (bracketExpr v1)}}))+expr :: Ast.Expr -> Core.Term+expr x =+    case x of+      Ast.ExprConst v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "const"),+          Core.fieldTerm = (symbol v0)}})+      Ast.ExprIndent v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "indent"),+          Core.fieldTerm = (indentedExpression v0)}})+      Ast.ExprOp v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "op"),+          Core.fieldTerm = (opExpr v0)}})+      Ast.ExprBrackets v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "brackets"),+          Core.fieldTerm = (bracketExpr v0)}})+      Ast.ExprSeq v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.Expr"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "seq"),+          Core.fieldTerm = (seqExpr v0)}}) -indentedExpression :: (Ast.IndentedExpression -> Core.Term)-indentedExpression x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.ast.IndentedExpression"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "style"),-      Core.fieldTerm = (indentStyle (Ast.indentedExpressionStyle x))},-    Core.Field {-      Core.fieldName = (Core.Name "expr"),-      Core.fieldTerm = (expr (Ast.indentedExpressionExpr x))}]}))+indentStyle :: Ast.IndentStyle -> Core.Term+indentStyle x =+    case x of+      Ast.IndentStyleAllLines v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.IndentStyle"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "allLines"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v0))}})+      Ast.IndentStyleSubsequentLines v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.IndentStyle"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "subsequentLines"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v0))}}) -indentStyle :: (Ast.IndentStyle -> Core.Term)-indentStyle x = case x of-  Ast.IndentStyleAllLines v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.IndentStyle"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "allLines"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v1))}}))-  Ast.IndentStyleSubsequentLines v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.IndentStyle"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "subsequentLines"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v1))}}))+indentedExpression :: Ast.IndentedExpression -> Core.Term+indentedExpression x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.IndentedExpression"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "style"),+          Core.fieldTerm = (indentStyle (Ast.indentedExpressionStyle x))},+        Core.Field {+          Core.fieldName = (Core.Name "expr"),+          Core.fieldTerm = (expr (Ast.indentedExpressionExpr x))}]}) -op :: (Ast.Op -> Core.Term)-op x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.ast.Op"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "symbol"),-      Core.fieldTerm = (symbol (Ast.opSymbol x))},-    Core.Field {-      Core.fieldName = (Core.Name "padding"),-      Core.fieldTerm = (padding (Ast.opPadding x))},-    Core.Field {-      Core.fieldName = (Core.Name "precedence"),-      Core.fieldTerm = (precedence (Ast.opPrecedence x))},-    Core.Field {-      Core.fieldName = (Core.Name "associativity"),-      Core.fieldTerm = (associativity (Ast.opAssociativity x))}]}))+op :: Ast.Op -> Core.Term+op x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.Op"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "symbol"),+          Core.fieldTerm = (symbol (Ast.opSymbol x))},+        Core.Field {+          Core.fieldName = (Core.Name "padding"),+          Core.fieldTerm = (padding (Ast.opPadding x))},+        Core.Field {+          Core.fieldName = (Core.Name "precedence"),+          Core.fieldTerm = (precedence (Ast.opPrecedence x))},+        Core.Field {+          Core.fieldName = (Core.Name "associativity"),+          Core.fieldTerm = (associativity (Ast.opAssociativity x))}]}) -opExpr :: (Ast.OpExpr -> Core.Term)-opExpr x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.ast.OpExpr"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "op"),-      Core.fieldTerm = (op (Ast.opExprOp x))},-    Core.Field {-      Core.fieldName = (Core.Name "lhs"),-      Core.fieldTerm = (expr (Ast.opExprLhs x))},-    Core.Field {-      Core.fieldName = (Core.Name "rhs"),-      Core.fieldTerm = (expr (Ast.opExprRhs x))}]}))+opExpr :: Ast.OpExpr -> Core.Term+opExpr x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.OpExpr"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "op"),+          Core.fieldTerm = (op (Ast.opExprOp x))},+        Core.Field {+          Core.fieldName = (Core.Name "lhs"),+          Core.fieldTerm = (expr (Ast.opExprLhs x))},+        Core.Field {+          Core.fieldName = (Core.Name "rhs"),+          Core.fieldTerm = (expr (Ast.opExprRhs x))}]}) -padding :: (Ast.Padding -> Core.Term)-padding x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.ast.Padding"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "left"),-      Core.fieldTerm = (ws (Ast.paddingLeft x))},-    Core.Field {-      Core.fieldName = (Core.Name "right"),-      Core.fieldTerm = (ws (Ast.paddingRight x))}]}))+padding :: Ast.Padding -> Core.Term+padding x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.Padding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (ws (Ast.paddingLeft x))},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (ws (Ast.paddingRight x))}]}) -precedence :: (Ast.Precedence -> Core.Term)-precedence x = (Core.TermWrap (Core.WrappedTerm {-  Core.wrappedTermTypeName = (Core.Name "hydra.ast.Precedence"),-  Core.wrappedTermBody = ((\x -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x))) (Ast.unPrecedence x))}))+precedence :: Ast.Precedence -> Core.Term+precedence x =+    Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.ast.Precedence"),+      Core.wrappedTermBody = ((\x -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x))) (Ast.unPrecedence x))}) -symbol :: (Ast.Symbol -> Core.Term)-symbol x = (Core.TermWrap (Core.WrappedTerm {-  Core.wrappedTermTypeName = (Core.Name "hydra.ast.Symbol"),-  Core.wrappedTermBody = ((\x -> Core.TermLiteral (Core.LiteralString x)) (Ast.unSymbol x))}))+seqExpr :: Ast.SeqExpr -> Core.Term+seqExpr x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.ast.SeqExpr"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "op"),+          Core.fieldTerm = (op (Ast.seqExprOp x))},+        Core.Field {+          Core.fieldName = (Core.Name "elements"),+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map expr xs)) (Ast.seqExprElements x))}]}) -ws :: (Ast.Ws -> Core.Term)-ws x = case x of-  Ast.WsNone -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "none"),-      Core.fieldTerm = Core.TermUnit}}))-  Ast.WsSpace -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "space"),-      Core.fieldTerm = Core.TermUnit}}))-  Ast.WsBreak -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "break"),-      Core.fieldTerm = Core.TermUnit}}))-  Ast.WsBreakAndIndent v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "breakAndIndent"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v1))}}))-  Ast.WsDoubleBreak -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "doubleBreak"),-      Core.fieldTerm = Core.TermUnit}}))+symbol :: Ast.Symbol -> Core.Term+symbol x =+    Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.ast.Symbol"),+      Core.wrappedTermBody = ((\x -> Core.TermLiteral (Core.LiteralString x)) (Ast.unSymbol x))})++ws :: Ast.Ws -> Core.Term+ws x =+    case x of+      Ast.WsNone -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "none"),+          Core.fieldTerm = Core.TermUnit}})+      Ast.WsSpace -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "space"),+          Core.fieldTerm = Core.TermUnit}})+      Ast.WsBreak -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "break"),+          Core.fieldTerm = Core.TermUnit}})+      Ast.WsBreakAndIndent v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "breakAndIndent"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v0))}})+      Ast.WsDoubleBreak -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.ast.Ws"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "doubleBreak"),+          Core.fieldTerm = Core.TermUnit}})
src/gen-main/haskell/Hydra/Encode/Classes.hs view
@@ -13,15 +13,16 @@ import qualified Data.Map as M import qualified Data.Set as S -typeClass :: (Classes.TypeClass -> Core.Term)-typeClass x = case x of-  Classes.TypeClassEquality -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "equality"),-      Core.fieldTerm = Core.TermUnit}}))-  Classes.TypeClassOrdering -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "ordering"),-      Core.fieldTerm = Core.TermUnit}}))+typeClass :: Classes.TypeClass -> Core.Term+typeClass x =+    case x of+      Classes.TypeClassEquality -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "equality"),+          Core.fieldTerm = Core.TermUnit}})+      Classes.TypeClassOrdering -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.classes.TypeClass"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "ordering"),+          Core.fieldTerm = Core.TermUnit}})
src/gen-main/haskell/Hydra/Encode/Coders.hs view
@@ -13,33 +13,36 @@ import qualified Data.Map as M import qualified Data.Set as S -coderDirection :: (Coders.CoderDirection -> Core.Term)-coderDirection x = case x of-  Coders.CoderDirectionEncode -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.coders.CoderDirection"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "encode"),-      Core.fieldTerm = Core.TermUnit}}))-  Coders.CoderDirectionDecode -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.coders.CoderDirection"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "decode"),-      Core.fieldTerm = Core.TermUnit}}))+coderDirection :: Coders.CoderDirection -> Core.Term+coderDirection x =+    case x of+      Coders.CoderDirectionEncode -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.coders.CoderDirection"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "encode"),+          Core.fieldTerm = Core.TermUnit}})+      Coders.CoderDirectionDecode -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.coders.CoderDirection"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "decode"),+          Core.fieldTerm = Core.TermUnit}}) -languageName :: (Coders.LanguageName -> Core.Term)-languageName x = (Core.TermWrap (Core.WrappedTerm {-  Core.wrappedTermTypeName = (Core.Name "hydra.coders.LanguageName"),-  Core.wrappedTermBody = ((\x -> Core.TermLiteral (Core.LiteralString x)) (Coders.unLanguageName x))}))+languageName :: Coders.LanguageName -> Core.Term+languageName x =+    Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.coders.LanguageName"),+      Core.wrappedTermBody = ((\x -> Core.TermLiteral (Core.LiteralString x)) (Coders.unLanguageName x))}) -traversalOrder :: (Coders.TraversalOrder -> Core.Term)-traversalOrder x = case x of-  Coders.TraversalOrderPre -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.coders.TraversalOrder"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "pre"),-      Core.fieldTerm = Core.TermUnit}}))-  Coders.TraversalOrderPost -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.coders.TraversalOrder"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "post"),-      Core.fieldTerm = Core.TermUnit}}))+traversalOrder :: Coders.TraversalOrder -> Core.Term+traversalOrder x =+    case x of+      Coders.TraversalOrderPre -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.coders.TraversalOrder"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "pre"),+          Core.fieldTerm = Core.TermUnit}})+      Coders.TraversalOrderPost -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.coders.TraversalOrder"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "post"),+          Core.fieldTerm = Core.TermUnit}})
− src/gen-main/haskell/Hydra/Encode/Compute.hs
@@ -1,46 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Term encoders for hydra.compute--module Hydra.Encode.Compute where--import qualified Hydra.Compute as Compute-import qualified Hydra.Core as Core-import qualified Hydra.Encode.Core as Core_-import qualified Hydra.Lib.Lists as Lists-import qualified Hydra.Lib.Maps as Maps-import qualified Hydra.Lib.Maybes as Maybes-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S--flowState :: ((t0 -> Core.Term) -> (t1 -> Core.Term) -> Compute.FlowState t0 t1 -> Core.Term)-flowState s v x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.compute.FlowState"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "value"),-      Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map v opt)) (Compute.flowStateValue x))},-    Core.Field {-      Core.fieldName = (Core.Name "state"),-      Core.fieldTerm = (s (Compute.flowStateState x))},-    Core.Field {-      Core.fieldName = (Core.Name "trace"),-      Core.fieldTerm = (trace (Compute.flowStateTrace x))}]}))--trace :: (Compute.Trace -> Core.Term)-trace x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.compute.Trace"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "stack"),-      Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (\x -> Core.TermLiteral (Core.LiteralString x)) xs)) (Compute.traceStack x))},-    Core.Field {-      Core.fieldName = (Core.Name "messages"),-      Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (\x -> Core.TermLiteral (Core.LiteralString x)) xs)) (Compute.traceMessages x))},-    Core.Field {-      Core.fieldName = (Core.Name "other"),-      Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap Core_.name Core_.term m)) (Compute.traceOther x))}]}))
− src/gen-main/haskell/Hydra/Encode/Constraints.hs
@@ -1,37 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Term encoders for hydra.constraints--module Hydra.Encode.Constraints where--import qualified Hydra.Constraints as Constraints-import qualified Hydra.Core as Core-import qualified Hydra.Encode.Query as Query-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S--pathEquation :: (Constraints.PathEquation -> Core.Term)-pathEquation x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.constraints.PathEquation"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "left"),-      Core.fieldTerm = (Query.path (Constraints.pathEquationLeft x))},-    Core.Field {-      Core.fieldName = (Core.Name "right"),-      Core.fieldTerm = (Query.path (Constraints.pathEquationRight x))}]}))--patternImplication :: (Constraints.PatternImplication -> Core.Term)-patternImplication x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.constraints.PatternImplication"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "antecedent"),-      Core.fieldTerm = (Query.pattern (Constraints.patternImplicationAntecedent x))},-    Core.Field {-      Core.fieldName = (Core.Name "consequent"),-      Core.fieldTerm = (Query.pattern (Constraints.patternImplicationConsequent x))}]}))
+ src/gen-main/haskell/Hydra/Encode/Context.hs view
@@ -0,0 +1,44 @@+-- Note: this is an automatically generated file. Do not edit.++-- | Term encoders for hydra.context++module Hydra.Encode.Context where++import qualified Hydra.Context as Context+import qualified Hydra.Core as Core+import qualified Hydra.Encode.Core as Core_+import qualified Hydra.Lib.Lists as Lists+import qualified Hydra.Lib.Maps as Maps+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++context :: Context.Context -> Core.Term+context x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.context.Context"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "trace"),+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (\x -> Core.TermLiteral (Core.LiteralString x)) xs)) (Context.contextTrace x))},+        Core.Field {+          Core.fieldName = (Core.Name "messages"),+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map (\x -> Core.TermLiteral (Core.LiteralString x)) xs)) (Context.contextMessages x))},+        Core.Field {+          Core.fieldName = (Core.Name "other"),+          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap Core_.name Core_.term m)) (Context.contextOther x))}]})++inContext :: (t0 -> Core.Term) -> Context.InContext t0 -> Core.Term+inContext e x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.context.InContext"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "object"),+          Core.fieldTerm = (e (Context.inContextObject x))},+        Core.Field {+          Core.fieldName = (Core.Name "context"),+          Core.fieldTerm = (context (Context.inContextContext x))}]})
src/gen-main/haskell/Hydra/Encode/Core.hs view
@@ -18,691 +18,708 @@ import qualified Data.Map as M import qualified Data.Set as S -annotatedTerm :: (Core.AnnotatedTerm -> Core.Term)-annotatedTerm x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "body"),-      Core.fieldTerm = (term (Core.annotatedTermBody x))},-    Core.Field {-      Core.fieldName = (Core.Name "annotation"),-      Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap name term m)) (Core.annotatedTermAnnotation x))}]}))--annotatedType :: (Core.AnnotatedType -> Core.Term)-annotatedType x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.AnnotatedType"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "body"),-      Core.fieldTerm = (type_ (Core.annotatedTypeBody x))},-    Core.Field {-      Core.fieldName = (Core.Name "annotation"),-      Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap name term m)) (Core.annotatedTypeAnnotation x))}]}))--application :: (Core.Application -> Core.Term)-application x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.Application"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "function"),-      Core.fieldTerm = (term (Core.applicationFunction x))},-    Core.Field {-      Core.fieldName = (Core.Name "argument"),-      Core.fieldTerm = (term (Core.applicationArgument x))}]}))--applicationType :: (Core.ApplicationType -> Core.Term)-applicationType x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.ApplicationType"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "function"),-      Core.fieldTerm = (type_ (Core.applicationTypeFunction x))},-    Core.Field {-      Core.fieldName = (Core.Name "argument"),-      Core.fieldTerm = (type_ (Core.applicationTypeArgument x))}]}))--binding :: (Core.Binding -> Core.Term)-binding x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.Binding"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "name"),-      Core.fieldTerm = (name (Core.bindingName x))},-    Core.Field {-      Core.fieldName = (Core.Name "term"),-      Core.fieldTerm = (term (Core.bindingTerm x))},-    Core.Field {-      Core.fieldName = (Core.Name "type"),-      Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map typeScheme opt)) (Core.bindingType x))}]}))--caseStatement :: (Core.CaseStatement -> Core.Term)-caseStatement x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.CaseStatement"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "typeName"),-      Core.fieldTerm = (name (Core.caseStatementTypeName x))},-    Core.Field {-      Core.fieldName = (Core.Name "default"),-      Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map term opt)) (Core.caseStatementDefault x))},-    Core.Field {-      Core.fieldName = (Core.Name "cases"),-      Core.fieldTerm = ((\xs -> Core.TermList (Lists.map field xs)) (Core.caseStatementCases x))}]}))--eitherType :: (Core.EitherType -> Core.Term)-eitherType x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.EitherType"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "left"),-      Core.fieldTerm = (type_ (Core.eitherTypeLeft x))},-    Core.Field {-      Core.fieldName = (Core.Name "right"),-      Core.fieldTerm = (type_ (Core.eitherTypeRight x))}]}))--pairType :: (Core.PairType -> Core.Term)-pairType x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.PairType"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "first"),-      Core.fieldTerm = (type_ (Core.pairTypeFirst x))},-    Core.Field {-      Core.fieldName = (Core.Name "second"),-      Core.fieldTerm = (type_ (Core.pairTypeSecond x))}]}))--elimination :: (Core.Elimination -> Core.Term)-elimination x = case x of-  Core.EliminationRecord v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Elimination"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "record"),-      Core.fieldTerm = (projection v1)}}))-  Core.EliminationUnion v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Elimination"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "union"),-      Core.fieldTerm = (caseStatement v1)}}))-  Core.EliminationWrap v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Elimination"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "wrap"),-      Core.fieldTerm = (name v1)}}))--field :: (Core.Field -> Core.Term)-field x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.Field"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "name"),-      Core.fieldTerm = (name (Core.fieldName x))},-    Core.Field {-      Core.fieldName = (Core.Name "term"),-      Core.fieldTerm = (term (Core.fieldTerm x))}]}))--fieldType :: (Core.FieldType -> Core.Term)-fieldType x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.FieldType"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "name"),-      Core.fieldTerm = (name (Core.fieldTypeName x))},-    Core.Field {-      Core.fieldName = (Core.Name "type"),-      Core.fieldTerm = (type_ (Core.fieldTypeType x))}]}))--floatType :: (Core.FloatType -> Core.Term)-floatType x = case x of-  Core.FloatTypeBigfloat -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "bigfloat"),-      Core.fieldTerm = Core.TermUnit}}))-  Core.FloatTypeFloat32 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "float32"),-      Core.fieldTerm = Core.TermUnit}}))-  Core.FloatTypeFloat64 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "float64"),-      Core.fieldTerm = Core.TermUnit}}))--floatValue :: (Core.FloatValue -> Core.Term)-floatValue x = case x of-  Core.FloatValueBigfloat v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "bigfloat"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat v1)))}}))-  Core.FloatValueFloat32 v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "float32"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 v1)))}}))-  Core.FloatValueFloat64 v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "float64"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 v1)))}}))--forallType :: (Core.ForallType -> Core.Term)-forallType x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.ForallType"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "parameter"),-      Core.fieldTerm = (name (Core.forallTypeParameter x))},-    Core.Field {-      Core.fieldName = (Core.Name "body"),-      Core.fieldTerm = (type_ (Core.forallTypeBody x))}]}))--function :: (Core.Function -> Core.Term)-function x = case x of-  Core.FunctionElimination v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Function"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "elimination"),-      Core.fieldTerm = (elimination v1)}}))-  Core.FunctionLambda v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Function"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "lambda"),-      Core.fieldTerm = (lambda v1)}}))-  Core.FunctionPrimitive v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Function"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "primitive"),-      Core.fieldTerm = (name v1)}}))--functionType :: (Core.FunctionType -> Core.Term)-functionType x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.FunctionType"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "domain"),-      Core.fieldTerm = (type_ (Core.functionTypeDomain x))},-    Core.Field {-      Core.fieldName = (Core.Name "codomain"),-      Core.fieldTerm = (type_ (Core.functionTypeCodomain x))}]}))--injection :: (Core.Injection -> Core.Term)-injection x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.Injection"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "typeName"),-      Core.fieldTerm = (name (Core.injectionTypeName x))},-    Core.Field {-      Core.fieldName = (Core.Name "field"),-      Core.fieldTerm = (field (Core.injectionField x))}]}))--integerType :: (Core.IntegerType -> Core.Term)-integerType x = case x of-  Core.IntegerTypeBigint -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "bigint"),-      Core.fieldTerm = Core.TermUnit}}))-  Core.IntegerTypeInt8 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "int8"),-      Core.fieldTerm = Core.TermUnit}}))-  Core.IntegerTypeInt16 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "int16"),-      Core.fieldTerm = Core.TermUnit}}))-  Core.IntegerTypeInt32 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "int32"),-      Core.fieldTerm = Core.TermUnit}}))-  Core.IntegerTypeInt64 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "int64"),-      Core.fieldTerm = Core.TermUnit}}))-  Core.IntegerTypeUint8 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "uint8"),-      Core.fieldTerm = Core.TermUnit}}))-  Core.IntegerTypeUint16 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "uint16"),-      Core.fieldTerm = Core.TermUnit}}))-  Core.IntegerTypeUint32 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "uint32"),-      Core.fieldTerm = Core.TermUnit}}))-  Core.IntegerTypeUint64 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "uint64"),-      Core.fieldTerm = Core.TermUnit}}))--integerValue :: (Core.IntegerValue -> Core.Term)-integerValue x = case x of-  Core.IntegerValueBigint v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "bigint"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint v1)))}}))-  Core.IntegerValueInt8 v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "int8"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 v1)))}}))-  Core.IntegerValueInt16 v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "int16"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 v1)))}}))-  Core.IntegerValueInt32 v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "int32"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v1)))}}))-  Core.IntegerValueInt64 v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "int64"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 v1)))}}))-  Core.IntegerValueUint8 v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "uint8"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 v1)))}}))-  Core.IntegerValueUint16 v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "uint16"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 v1)))}}))-  Core.IntegerValueUint32 v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "uint32"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 v1)))}}))-  Core.IntegerValueUint64 v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "uint64"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 v1)))}}))--lambda :: (Core.Lambda -> Core.Term)-lambda x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.Lambda"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "parameter"),-      Core.fieldTerm = (name (Core.lambdaParameter x))},-    Core.Field {-      Core.fieldName = (Core.Name "domain"),-      Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map type_ opt)) (Core.lambdaDomain x))},-    Core.Field {-      Core.fieldName = (Core.Name "body"),-      Core.fieldTerm = (term (Core.lambdaBody x))}]}))--let_ :: (Core.Let -> Core.Term)-let_ x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.Let"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "bindings"),-      Core.fieldTerm = ((\xs -> Core.TermList (Lists.map binding xs)) (Core.letBindings x))},-    Core.Field {-      Core.fieldName = (Core.Name "body"),-      Core.fieldTerm = (term (Core.letBody x))}]}))--literal :: (Core.Literal -> Core.Term)-literal x = case x of-  Core.LiteralBinary v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Literal"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "binary"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralBinary v1))}}))-  Core.LiteralBoolean v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Literal"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "boolean"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean v1))}}))-  Core.LiteralFloat v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Literal"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "float"),-      Core.fieldTerm = (floatValue v1)}}))-  Core.LiteralInteger v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Literal"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "integer"),-      Core.fieldTerm = (integerValue v1)}}))-  Core.LiteralString v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Literal"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "string"),-      Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v1))}}))--literalType :: (Core.LiteralType -> Core.Term)-literalType x = case x of-  Core.LiteralTypeBinary -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "binary"),-      Core.fieldTerm = Core.TermUnit}}))-  Core.LiteralTypeBoolean -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "boolean"),-      Core.fieldTerm = Core.TermUnit}}))-  Core.LiteralTypeFloat v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "float"),-      Core.fieldTerm = (floatType v1)}}))-  Core.LiteralTypeInteger v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "integer"),-      Core.fieldTerm = (integerType v1)}}))-  Core.LiteralTypeString -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "string"),-      Core.fieldTerm = Core.TermUnit}}))--mapType :: (Core.MapType -> Core.Term)-mapType x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.MapType"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "keys"),-      Core.fieldTerm = (type_ (Core.mapTypeKeys x))},-    Core.Field {-      Core.fieldName = (Core.Name "values"),-      Core.fieldTerm = (type_ (Core.mapTypeValues x))}]}))--name :: (Core.Name -> Core.Term)-name x = (Core.TermWrap (Core.WrappedTerm {-  Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),-  Core.wrappedTermBody = ((\x -> Core.TermLiteral (Core.LiteralString x)) (Core.unName x))}))--projection :: (Core.Projection -> Core.Term)-projection x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.Projection"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "typeName"),-      Core.fieldTerm = (name (Core.projectionTypeName x))},-    Core.Field {-      Core.fieldName = (Core.Name "field"),-      Core.fieldTerm = (name (Core.projectionField x))}]}))--record :: (Core.Record -> Core.Term)-record x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.Record"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "typeName"),-      Core.fieldTerm = (name (Core.recordTypeName x))},-    Core.Field {-      Core.fieldName = (Core.Name "fields"),-      Core.fieldTerm = ((\xs -> Core.TermList (Lists.map field xs)) (Core.recordFields x))}]}))--rowType :: (Core.RowType -> Core.Term)-rowType x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.RowType"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "typeName"),-      Core.fieldTerm = (name (Core.rowTypeTypeName x))},-    Core.Field {-      Core.fieldName = (Core.Name "fields"),-      Core.fieldTerm = ((\xs -> Core.TermList (Lists.map fieldType xs)) (Core.rowTypeFields x))}]}))--term :: (Core.Term -> Core.Term)-term x = case x of-  Core.TermAnnotated v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "annotated"),-      Core.fieldTerm = (annotatedTerm v1)}}))-  Core.TermApplication v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "application"),-      Core.fieldTerm = (application v1)}}))-  Core.TermEither v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "either"),-      Core.fieldTerm = (Core.TermEither (Eithers.bimap term term v1))}}))-  Core.TermFunction v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "function"),-      Core.fieldTerm = (function v1)}}))-  Core.TermLet v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "let"),-      Core.fieldTerm = (let_ v1)}}))-  Core.TermList v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "list"),-      Core.fieldTerm = (Core.TermList (Lists.map term v1))}}))-  Core.TermLiteral v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "literal"),-      Core.fieldTerm = (literal v1)}}))-  Core.TermMap v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "map"),-      Core.fieldTerm = (Core.TermMap (Maps.bimap term term v1))}}))-  Core.TermMaybe v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "maybe"),-      Core.fieldTerm = (Core.TermMaybe (Maybes.map term v1))}}))-  Core.TermPair v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "pair"),-      Core.fieldTerm = (Core.TermPair (Pairs.bimap term term v1))}}))-  Core.TermRecord v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "record"),-      Core.fieldTerm = (record v1)}}))-  Core.TermSet v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "set"),-      Core.fieldTerm = (Core.TermSet (Sets.map term v1))}}))-  Core.TermTypeApplication v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "typeApplication"),-      Core.fieldTerm = (typeApplicationTerm v1)}}))-  Core.TermTypeLambda v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "typeLambda"),-      Core.fieldTerm = (typeLambda v1)}}))-  Core.TermUnion v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "union"),-      Core.fieldTerm = (injection v1)}}))-  Core.TermUnit -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "unit"),-      Core.fieldTerm = Core.TermUnit}}))-  Core.TermVariable v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "variable"),-      Core.fieldTerm = (name v1)}}))-  Core.TermWrap v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Term"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "wrap"),-      Core.fieldTerm = (wrappedTerm v1)}}))--type_ :: (Core.Type -> Core.Term)-type_ x = case x of-  Core.TypeAnnotated v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "annotated"),-      Core.fieldTerm = (annotatedType v1)}}))-  Core.TypeApplication v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "application"),-      Core.fieldTerm = (applicationType v1)}}))-  Core.TypeEither v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "either"),-      Core.fieldTerm = (eitherType v1)}}))-  Core.TypeForall v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "forall"),-      Core.fieldTerm = (forallType v1)}}))-  Core.TypeFunction v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "function"),-      Core.fieldTerm = (functionType v1)}}))-  Core.TypeList v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "list"),-      Core.fieldTerm = (type_ v1)}}))-  Core.TypeLiteral v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "literal"),-      Core.fieldTerm = (literalType v1)}}))-  Core.TypeMap v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "map"),-      Core.fieldTerm = (mapType v1)}}))-  Core.TypeMaybe v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "maybe"),-      Core.fieldTerm = (type_ v1)}}))-  Core.TypePair v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "pair"),-      Core.fieldTerm = (pairType v1)}}))-  Core.TypeRecord v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "record"),-      Core.fieldTerm = (rowType v1)}}))-  Core.TypeSet v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "set"),-      Core.fieldTerm = (type_ v1)}}))-  Core.TypeUnion v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "union"),-      Core.fieldTerm = (rowType v1)}}))-  Core.TypeUnit -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "unit"),-      Core.fieldTerm = Core.TermUnit}}))-  Core.TypeVariable v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "variable"),-      Core.fieldTerm = (name v1)}}))-  Core.TypeWrap v1 -> (Core.TermUnion (Core.Injection {-    Core.injectionTypeName = (Core.Name "hydra.core.Type"),-    Core.injectionField = Core.Field {-      Core.fieldName = (Core.Name "wrap"),-      Core.fieldTerm = (wrappedType v1)}}))--typeApplicationTerm :: (Core.TypeApplicationTerm -> Core.Term)-typeApplicationTerm x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "body"),-      Core.fieldTerm = (term (Core.typeApplicationTermBody x))},-    Core.Field {-      Core.fieldName = (Core.Name "type"),-      Core.fieldTerm = (type_ (Core.typeApplicationTermType x))}]}))--typeLambda :: (Core.TypeLambda -> Core.Term)-typeLambda x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.TypeLambda"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "parameter"),-      Core.fieldTerm = (name (Core.typeLambdaParameter x))},-    Core.Field {-      Core.fieldName = (Core.Name "body"),-      Core.fieldTerm = (term (Core.typeLambdaBody x))}]}))--typeScheme :: (Core.TypeScheme -> Core.Term)-typeScheme x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.TypeScheme"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "variables"),-      Core.fieldTerm = ((\xs -> Core.TermList (Lists.map name xs)) (Core.typeSchemeVariables x))},-    Core.Field {-      Core.fieldName = (Core.Name "type"),-      Core.fieldTerm = (type_ (Core.typeSchemeType x))},-    Core.Field {-      Core.fieldName = (Core.Name "constraints"),-      Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map (\m -> Core.TermMap (Maps.bimap name typeVariableMetadata m)) opt)) (Core.typeSchemeConstraints x))}]}))--typeVariableMetadata :: (Core.TypeVariableMetadata -> Core.Term)-typeVariableMetadata x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.TypeVariableMetadata"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "classes"),-      Core.fieldTerm = ((\s -> Core.TermSet (Sets.map name s)) (Core.typeVariableMetadataClasses x))}]}))--wrappedTerm :: (Core.WrappedTerm -> Core.Term)-wrappedTerm x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "typeName"),-      Core.fieldTerm = (name (Core.wrappedTermTypeName x))},-    Core.Field {-      Core.fieldName = (Core.Name "body"),-      Core.fieldTerm = (term (Core.wrappedTermBody x))}]}))--wrappedType :: (Core.WrappedType -> Core.Term)-wrappedType x = (Core.TermRecord (Core.Record {-  Core.recordTypeName = (Core.Name "hydra.core.WrappedType"),-  Core.recordFields = [-    Core.Field {-      Core.fieldName = (Core.Name "typeName"),-      Core.fieldTerm = (name (Core.wrappedTypeTypeName x))},-    Core.Field {-      Core.fieldName = (Core.Name "body"),-      Core.fieldTerm = (type_ (Core.wrappedTypeBody x))}]}))+annotatedTerm :: Core.AnnotatedTerm -> Core.Term+annotatedTerm x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedTerm"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (term (Core.annotatedTermBody x))},+        Core.Field {+          Core.fieldName = (Core.Name "annotation"),+          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap name term m)) (Core.annotatedTermAnnotation x))}]})++annotatedType :: Core.AnnotatedType -> Core.Term+annotatedType x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.AnnotatedType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (type_ (Core.annotatedTypeBody x))},+        Core.Field {+          Core.fieldName = (Core.Name "annotation"),+          Core.fieldTerm = ((\m -> Core.TermMap (Maps.bimap name term m)) (Core.annotatedTypeAnnotation x))}]})++application :: Core.Application -> Core.Term+application x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Application"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (term (Core.applicationFunction x))},+        Core.Field {+          Core.fieldName = (Core.Name "argument"),+          Core.fieldTerm = (term (Core.applicationArgument x))}]})++applicationType :: Core.ApplicationType -> Core.Term+applicationType x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.ApplicationType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (type_ (Core.applicationTypeFunction x))},+        Core.Field {+          Core.fieldName = (Core.Name "argument"),+          Core.fieldTerm = (type_ (Core.applicationTypeArgument x))}]})++binding :: Core.Binding -> Core.Term+binding x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Binding"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (name (Core.bindingName x))},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (term (Core.bindingTerm x))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map typeScheme opt)) (Core.bindingType x))}]})++caseStatement :: Core.CaseStatement -> Core.Term+caseStatement x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.CaseStatement"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (name (Core.caseStatementTypeName x))},+        Core.Field {+          Core.fieldName = (Core.Name "default"),+          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map term opt)) (Core.caseStatementDefault x))},+        Core.Field {+          Core.fieldName = (Core.Name "cases"),+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map field xs)) (Core.caseStatementCases x))}]})++eitherType :: Core.EitherType -> Core.Term+eitherType x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.EitherType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "left"),+          Core.fieldTerm = (type_ (Core.eitherTypeLeft x))},+        Core.Field {+          Core.fieldName = (Core.Name "right"),+          Core.fieldTerm = (type_ (Core.eitherTypeRight x))}]})++elimination :: Core.Elimination -> Core.Term+elimination x =+    case x of+      Core.EliminationRecord v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Elimination"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "record"),+          Core.fieldTerm = (projection v0)}})+      Core.EliminationUnion v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Elimination"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "union"),+          Core.fieldTerm = (caseStatement v0)}})+      Core.EliminationWrap v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Elimination"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "wrap"),+          Core.fieldTerm = (name v0)}})++field :: Core.Field -> Core.Term+field x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Field"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (name (Core.fieldName x))},+        Core.Field {+          Core.fieldName = (Core.Name "term"),+          Core.fieldTerm = (term (Core.fieldTerm x))}]})++fieldType :: Core.FieldType -> Core.Term+fieldType x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.FieldType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (name (Core.fieldTypeName x))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (type_ (Core.fieldTypeType x))}]})++floatType :: Core.FloatType -> Core.Term+floatType x =+    case x of+      Core.FloatTypeBigfloat -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "bigfloat"),+          Core.fieldTerm = Core.TermUnit}})+      Core.FloatTypeFloat32 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "float32"),+          Core.fieldTerm = Core.TermUnit}})+      Core.FloatTypeFloat64 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.FloatType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "float64"),+          Core.fieldTerm = Core.TermUnit}})++floatValue :: Core.FloatValue -> Core.Term+floatValue x =+    case x of+      Core.FloatValueBigfloat v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "bigfloat"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueBigfloat v0)))}})+      Core.FloatValueFloat32 v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "float32"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat32 v0)))}})+      Core.FloatValueFloat64 v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.FloatValue"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "float64"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralFloat (Core.FloatValueFloat64 v0)))}})++forallType :: Core.ForallType -> Core.Term+forallType x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.ForallType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "parameter"),+          Core.fieldTerm = (name (Core.forallTypeParameter x))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (type_ (Core.forallTypeBody x))}]})++function :: Core.Function -> Core.Term+function x =+    case x of+      Core.FunctionElimination v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Function"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "elimination"),+          Core.fieldTerm = (elimination v0)}})+      Core.FunctionLambda v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Function"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "lambda"),+          Core.fieldTerm = (lambda v0)}})+      Core.FunctionPrimitive v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Function"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "primitive"),+          Core.fieldTerm = (name v0)}})++functionType :: Core.FunctionType -> Core.Term+functionType x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.FunctionType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = (type_ (Core.functionTypeDomain x))},+        Core.Field {+          Core.fieldName = (Core.Name "codomain"),+          Core.fieldTerm = (type_ (Core.functionTypeCodomain x))}]})++injection :: Core.Injection -> Core.Term+injection x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Injection"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (name (Core.injectionTypeName x))},+        Core.Field {+          Core.fieldName = (Core.Name "field"),+          Core.fieldTerm = (field (Core.injectionField x))}]})++integerType :: Core.IntegerType -> Core.Term+integerType x =+    case x of+      Core.IntegerTypeBigint -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "bigint"),+          Core.fieldTerm = Core.TermUnit}})+      Core.IntegerTypeInt8 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "int8"),+          Core.fieldTerm = Core.TermUnit}})+      Core.IntegerTypeInt16 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "int16"),+          Core.fieldTerm = Core.TermUnit}})+      Core.IntegerTypeInt32 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "int32"),+          Core.fieldTerm = Core.TermUnit}})+      Core.IntegerTypeInt64 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "int64"),+          Core.fieldTerm = Core.TermUnit}})+      Core.IntegerTypeUint8 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "uint8"),+          Core.fieldTerm = Core.TermUnit}})+      Core.IntegerTypeUint16 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "uint16"),+          Core.fieldTerm = Core.TermUnit}})+      Core.IntegerTypeUint32 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "uint32"),+          Core.fieldTerm = Core.TermUnit}})+      Core.IntegerTypeUint64 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "uint64"),+          Core.fieldTerm = Core.TermUnit}})++integerValue :: Core.IntegerValue -> Core.Term+integerValue x =+    case x of+      Core.IntegerValueBigint v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "bigint"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueBigint v0)))}})+      Core.IntegerValueInt8 v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "int8"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt8 v0)))}})+      Core.IntegerValueInt16 v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "int16"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt16 v0)))}})+      Core.IntegerValueInt32 v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "int32"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 v0)))}})+      Core.IntegerValueInt64 v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "int64"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt64 v0)))}})+      Core.IntegerValueUint8 v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "uint8"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint8 v0)))}})+      Core.IntegerValueUint16 v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "uint16"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint16 v0)))}})+      Core.IntegerValueUint32 v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "uint32"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint32 v0)))}})+      Core.IntegerValueUint64 v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.IntegerValue"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "uint64"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueUint64 v0)))}})++lambda :: Core.Lambda -> Core.Term+lambda x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Lambda"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "parameter"),+          Core.fieldTerm = (name (Core.lambdaParameter x))},+        Core.Field {+          Core.fieldName = (Core.Name "domain"),+          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map type_ opt)) (Core.lambdaDomain x))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (term (Core.lambdaBody x))}]})++let_ :: Core.Let -> Core.Term+let_ x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Let"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "bindings"),+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map binding xs)) (Core.letBindings x))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (term (Core.letBody x))}]})++literal :: Core.Literal -> Core.Term+literal x =+    case x of+      Core.LiteralBinary v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "binary"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralBinary v0))}})+      Core.LiteralBoolean v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "boolean"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralBoolean v0))}})+      Core.LiteralFloat v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "float"),+          Core.fieldTerm = (floatValue v0)}})+      Core.LiteralInteger v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "integer"),+          Core.fieldTerm = (integerValue v0)}})+      Core.LiteralString v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Literal"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "string"),+          Core.fieldTerm = (Core.TermLiteral (Core.LiteralString v0))}})++literalType :: Core.LiteralType -> Core.Term+literalType x =+    case x of+      Core.LiteralTypeBinary -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "binary"),+          Core.fieldTerm = Core.TermUnit}})+      Core.LiteralTypeBoolean -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "boolean"),+          Core.fieldTerm = Core.TermUnit}})+      Core.LiteralTypeFloat v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "float"),+          Core.fieldTerm = (floatType v0)}})+      Core.LiteralTypeInteger v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "integer"),+          Core.fieldTerm = (integerType v0)}})+      Core.LiteralTypeString -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.LiteralType"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "string"),+          Core.fieldTerm = Core.TermUnit}})++mapType :: Core.MapType -> Core.Term+mapType x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.MapType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "keys"),+          Core.fieldTerm = (type_ (Core.mapTypeKeys x))},+        Core.Field {+          Core.fieldName = (Core.Name "values"),+          Core.fieldTerm = (type_ (Core.mapTypeValues x))}]})++name :: Core.Name -> Core.Term+name x =+    Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.core.Name"),+      Core.wrappedTermBody = ((\x -> Core.TermLiteral (Core.LiteralString x)) (Core.unName x))})++pairType :: Core.PairType -> Core.Term+pairType x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.PairType"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "first"),+          Core.fieldTerm = (type_ (Core.pairTypeFirst x))},+        Core.Field {+          Core.fieldName = (Core.Name "second"),+          Core.fieldTerm = (type_ (Core.pairTypeSecond x))}]})++projection :: Core.Projection -> Core.Term+projection x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Projection"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (name (Core.projectionTypeName x))},+        Core.Field {+          Core.fieldName = (Core.Name "field"),+          Core.fieldTerm = (name (Core.projectionField x))}]})++record :: Core.Record -> Core.Term+record x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.Record"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (name (Core.recordTypeName x))},+        Core.Field {+          Core.fieldName = (Core.Name "fields"),+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map field xs)) (Core.recordFields x))}]})++term :: Core.Term -> Core.Term+term x =+    case x of+      Core.TermAnnotated v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "annotated"),+          Core.fieldTerm = (annotatedTerm v0)}})+      Core.TermApplication v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "application"),+          Core.fieldTerm = (application v0)}})+      Core.TermEither v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "either"),+          Core.fieldTerm = (Core.TermEither (Eithers.bimap term term v0))}})+      Core.TermFunction v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (function v0)}})+      Core.TermLet v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "let"),+          Core.fieldTerm = (let_ v0)}})+      Core.TermList v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "list"),+          Core.fieldTerm = (Core.TermList (Lists.map term v0))}})+      Core.TermLiteral v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "literal"),+          Core.fieldTerm = (literal v0)}})+      Core.TermMap v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "map"),+          Core.fieldTerm = (Core.TermMap (Maps.bimap term term v0))}})+      Core.TermMaybe v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "maybe"),+          Core.fieldTerm = (Core.TermMaybe (Maybes.map term v0))}})+      Core.TermPair v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "pair"),+          Core.fieldTerm = (Core.TermPair (Pairs.bimap term term v0))}})+      Core.TermRecord v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "record"),+          Core.fieldTerm = (record v0)}})+      Core.TermSet v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "set"),+          Core.fieldTerm = (Core.TermSet (Sets.map term v0))}})+      Core.TermTypeApplication v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "typeApplication"),+          Core.fieldTerm = (typeApplicationTerm v0)}})+      Core.TermTypeLambda v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "typeLambda"),+          Core.fieldTerm = (typeLambda v0)}})+      Core.TermUnion v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "union"),+          Core.fieldTerm = (injection v0)}})+      Core.TermUnit -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "unit"),+          Core.fieldTerm = Core.TermUnit}})+      Core.TermVariable v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "variable"),+          Core.fieldTerm = (name v0)}})+      Core.TermWrap v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Term"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "wrap"),+          Core.fieldTerm = (wrappedTerm v0)}})++type_ :: Core.Type -> Core.Term+type_ x =+    case x of+      Core.TypeAnnotated v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "annotated"),+          Core.fieldTerm = (annotatedType v0)}})+      Core.TypeApplication v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "application"),+          Core.fieldTerm = (applicationType v0)}})+      Core.TypeEither v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "either"),+          Core.fieldTerm = (eitherType v0)}})+      Core.TypeForall v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "forall"),+          Core.fieldTerm = (forallType v0)}})+      Core.TypeFunction v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "function"),+          Core.fieldTerm = (functionType v0)}})+      Core.TypeList v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "list"),+          Core.fieldTerm = (type_ v0)}})+      Core.TypeLiteral v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "literal"),+          Core.fieldTerm = (literalType v0)}})+      Core.TypeMap v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "map"),+          Core.fieldTerm = (mapType v0)}})+      Core.TypeMaybe v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "maybe"),+          Core.fieldTerm = (type_ v0)}})+      Core.TypePair v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "pair"),+          Core.fieldTerm = (pairType v0)}})+      Core.TypeRecord v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "record"),+          Core.fieldTerm = (Core.TermList (Lists.map fieldType v0))}})+      Core.TypeSet v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "set"),+          Core.fieldTerm = (type_ v0)}})+      Core.TypeUnion v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "union"),+          Core.fieldTerm = (Core.TermList (Lists.map fieldType v0))}})+      Core.TypeUnit -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "unit"),+          Core.fieldTerm = Core.TermUnit}})+      Core.TypeVariable v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "variable"),+          Core.fieldTerm = (name v0)}})+      Core.TypeVoid -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "void"),+          Core.fieldTerm = Core.TermUnit}})+      Core.TypeWrap v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.core.Type"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "wrap"),+          Core.fieldTerm = (type_ v0)}})++typeApplicationTerm :: Core.TypeApplicationTerm -> Core.Term+typeApplicationTerm x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeApplicationTerm"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (term (Core.typeApplicationTermBody x))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (type_ (Core.typeApplicationTermType x))}]})++typeLambda :: Core.TypeLambda -> Core.Term+typeLambda x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeLambda"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "parameter"),+          Core.fieldTerm = (name (Core.typeLambdaParameter x))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (term (Core.typeLambdaBody x))}]})++typeScheme :: Core.TypeScheme -> Core.Term+typeScheme x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeScheme"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variables"),+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map name xs)) (Core.typeSchemeVariables x))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (type_ (Core.typeSchemeType x))},+        Core.Field {+          Core.fieldName = (Core.Name "constraints"),+          Core.fieldTerm = ((\opt -> Core.TermMaybe (Maybes.map (\m -> Core.TermMap (Maps.bimap name typeVariableMetadata m)) opt)) (Core.typeSchemeConstraints x))}]})++typeVariableMetadata :: Core.TypeVariableMetadata -> Core.Term+typeVariableMetadata x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.TypeVariableMetadata"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "classes"),+          Core.fieldTerm = ((\s -> Core.TermSet (Sets.map name s)) (Core.typeVariableMetadataClasses x))}]})++wrappedTerm :: Core.WrappedTerm -> Core.Term+wrappedTerm x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.core.WrappedTerm"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (name (Core.wrappedTermTypeName x))},+        Core.Field {+          Core.fieldName = (Core.Name "body"),+          Core.fieldTerm = (term (Core.wrappedTermBody x))}]})
+ src/gen-main/haskell/Hydra/Encode/Error/Checking.hs view
@@ -0,0 +1,181 @@+-- Note: this is an automatically generated file. Do not edit.++-- | Term encoders for hydra.error.checking++module Hydra.Encode.Error.Checking where++import qualified Hydra.Core as Core+import qualified Hydra.Encode.Core as Core_+import qualified Hydra.Encode.Typing as Typing+import qualified Hydra.Encode.Variants as Variants+import qualified Hydra.Error.Checking as Checking+import qualified Hydra.Lib.Lists as Lists+import qualified Hydra.Lib.Sets as Sets+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++checkingError :: Checking.CheckingError -> Core.Term+checkingError x =+    case x of+      Checking.CheckingErrorIncorrectUnification v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "incorrectUnification"),+          Core.fieldTerm = (incorrectUnificationError v0)}})+      Checking.CheckingErrorNotAForallType v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "notAForallType"),+          Core.fieldTerm = (notAForallTypeError v0)}})+      Checking.CheckingErrorNotAFunctionType v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "notAFunctionType"),+          Core.fieldTerm = (notAFunctionTypeError v0)}})+      Checking.CheckingErrorTypeArityMismatch v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "typeArityMismatch"),+          Core.fieldTerm = (typeArityMismatchError v0)}})+      Checking.CheckingErrorTypeMismatch v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "typeMismatch"),+          Core.fieldTerm = (typeMismatchError v0)}})+      Checking.CheckingErrorUnboundTypeVariables v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "unboundTypeVariables"),+          Core.fieldTerm = (unboundTypeVariablesError v0)}})+      Checking.CheckingErrorUnequalTypes v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "unequalTypes"),+          Core.fieldTerm = (unequalTypesError v0)}})+      Checking.CheckingErrorUnsupportedTermVariant v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "unsupportedTermVariant"),+          Core.fieldTerm = (unsupportedTermVariantError v0)}})+      Checking.CheckingErrorUntypedLambda v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "untypedLambda"),+          Core.fieldTerm = (untypedLambdaError v0)}})+      Checking.CheckingErrorUntypedLetBinding v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.checking.CheckingError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "untypedLetBinding"),+          Core.fieldTerm = (untypedLetBindingError v0)}})++incorrectUnificationError :: Checking.IncorrectUnificationError -> Core.Term+incorrectUnificationError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.IncorrectUnificationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "substitution"),+          Core.fieldTerm = (Typing.typeSubst (Checking.incorrectUnificationErrorSubstitution x))}]})++notAForallTypeError :: Checking.NotAForallTypeError -> Core.Term+notAForallTypeError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAForallTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core_.type_ (Checking.notAForallTypeErrorType x))},+        Core.Field {+          Core.fieldName = (Core.Name "typeArguments"),+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map Core_.type_ xs)) (Checking.notAForallTypeErrorTypeArguments x))}]})++notAFunctionTypeError :: Checking.NotAFunctionTypeError -> Core.Term+notAFunctionTypeError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.NotAFunctionTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core_.type_ (Checking.notAFunctionTypeErrorType x))}]})++typeArityMismatchError :: Checking.TypeArityMismatchError -> Core.Term+typeArityMismatchError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeArityMismatchError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core_.type_ (Checking.typeArityMismatchErrorType x))},+        Core.Field {+          Core.fieldName = (Core.Name "expectedArity"),+          Core.fieldTerm = ((\x -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x))) (Checking.typeArityMismatchErrorExpectedArity x))},+        Core.Field {+          Core.fieldName = (Core.Name "actualArity"),+          Core.fieldTerm = ((\x -> Core.TermLiteral (Core.LiteralInteger (Core.IntegerValueInt32 x))) (Checking.typeArityMismatchErrorActualArity x))},+        Core.Field {+          Core.fieldName = (Core.Name "typeArguments"),+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map Core_.type_ xs)) (Checking.typeArityMismatchErrorTypeArguments x))}]})++typeMismatchError :: Checking.TypeMismatchError -> Core.Term+typeMismatchError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.TypeMismatchError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "expectedType"),+          Core.fieldTerm = (Core_.type_ (Checking.typeMismatchErrorExpectedType x))},+        Core.Field {+          Core.fieldName = (Core.Name "actualType"),+          Core.fieldTerm = (Core_.type_ (Checking.typeMismatchErrorActualType x))}]})++unboundTypeVariablesError :: Checking.UnboundTypeVariablesError -> Core.Term+unboundTypeVariablesError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UnboundTypeVariablesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "variables"),+          Core.fieldTerm = ((\s -> Core.TermSet (Sets.map Core_.name s)) (Checking.unboundTypeVariablesErrorVariables x))},+        Core.Field {+          Core.fieldName = (Core.Name "type"),+          Core.fieldTerm = (Core_.type_ (Checking.unboundTypeVariablesErrorType x))}]})++unequalTypesError :: Checking.UnequalTypesError -> Core.Term+unequalTypesError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UnequalTypesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "types"),+          Core.fieldTerm = ((\xs -> Core.TermList (Lists.map Core_.type_ xs)) (Checking.unequalTypesErrorTypes x))},+        Core.Field {+          Core.fieldName = (Core.Name "description"),+          Core.fieldTerm = ((\x -> Core.TermLiteral (Core.LiteralString x)) (Checking.unequalTypesErrorDescription x))}]})++unsupportedTermVariantError :: Checking.UnsupportedTermVariantError -> Core.Term+unsupportedTermVariantError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UnsupportedTermVariantError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "termVariant"),+          Core.fieldTerm = (Variants.termVariant (Checking.unsupportedTermVariantErrorTermVariant x))}]})++untypedLambdaError :: t0 -> Core.Term+untypedLambdaError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedLambdaError"),+      Core.recordFields = []})++untypedLetBindingError :: Checking.UntypedLetBindingError -> Core.Term+untypedLetBindingError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.checking.UntypedLetBindingError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "binding"),+          Core.fieldTerm = (Core_.binding (Checking.untypedLetBindingErrorBinding x))}]})
+ src/gen-main/haskell/Hydra/Encode/Error/Core.hs view
@@ -0,0 +1,643 @@+-- Note: this is an automatically generated file. Do not edit.++-- | Term encoders for hydra.error.core++module Hydra.Encode.Error.Core where++import qualified Hydra.Core as Core+import qualified Hydra.Encode.Core as Core_+import qualified Hydra.Encode.Paths as Paths+import qualified Hydra.Encode.Variants as Variants+import qualified Hydra.Error.Core as Core__+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++constantConditionError :: Core__.ConstantConditionError -> Core.Term+constantConditionError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.ConstantConditionError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.constantConditionErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "value"),+          Core.fieldTerm = ((\x -> Core.TermLiteral (Core.LiteralBoolean x)) (Core__.constantConditionErrorValue x))}]})++duplicateBindingError :: Core__.DuplicateBindingError -> Core.Term+duplicateBindingError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateBindingError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.duplicateBindingErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.duplicateBindingErrorName x))}]})++duplicateFieldError :: Core__.DuplicateFieldError -> Core.Term+duplicateFieldError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateFieldError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.duplicateFieldErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.duplicateFieldErrorName x))}]})++duplicateRecordTypeFieldNamesError :: Core__.DuplicateRecordTypeFieldNamesError -> Core.Term+duplicateRecordTypeFieldNamesError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateRecordTypeFieldNamesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.duplicateRecordTypeFieldNamesErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.duplicateRecordTypeFieldNamesErrorName x))}]})++duplicateUnionTypeFieldNamesError :: Core__.DuplicateUnionTypeFieldNamesError -> Core.Term+duplicateUnionTypeFieldNamesError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.DuplicateUnionTypeFieldNamesError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.duplicateUnionTypeFieldNamesErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.duplicateUnionTypeFieldNamesErrorName x))}]})++emptyCaseStatementError :: Core__.EmptyCaseStatementError -> Core.Term+emptyCaseStatementError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyCaseStatementError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.emptyCaseStatementErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core_.name (Core__.emptyCaseStatementErrorTypeName x))}]})++emptyLetBindingsError :: Core__.EmptyLetBindingsError -> Core.Term+emptyLetBindingsError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyLetBindingsError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.emptyLetBindingsErrorLocation x))}]})++emptyRecordTypeError :: Core__.EmptyRecordTypeError -> Core.Term+emptyRecordTypeError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyRecordTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.emptyRecordTypeErrorLocation x))}]})++emptyTermAnnotationError :: Core__.EmptyTermAnnotationError -> Core.Term+emptyTermAnnotationError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTermAnnotationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.emptyTermAnnotationErrorLocation x))}]})++emptyTypeAnnotationError :: Core__.EmptyTypeAnnotationError -> Core.Term+emptyTypeAnnotationError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTypeAnnotationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.emptyTypeAnnotationErrorLocation x))}]})++emptyTypeNameInTermError :: Core__.EmptyTypeNameInTermError -> Core.Term+emptyTypeNameInTermError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyTypeNameInTermError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.emptyTypeNameInTermErrorLocation x))}]})++emptyUnionTypeError :: Core__.EmptyUnionTypeError -> Core.Term+emptyUnionTypeError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.EmptyUnionTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.emptyUnionTypeErrorLocation x))}]})++invalidForallParameterNameError :: Core__.InvalidForallParameterNameError -> Core.Term+invalidForallParameterNameError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidForallParameterNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.invalidForallParameterNameErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.invalidForallParameterNameErrorName x))}]})++invalidLambdaParameterNameError :: Core__.InvalidLambdaParameterNameError -> Core.Term+invalidLambdaParameterNameError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLambdaParameterNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.invalidLambdaParameterNameErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.invalidLambdaParameterNameErrorName x))}]})++invalidLetBindingNameError :: Core__.InvalidLetBindingNameError -> Core.Term+invalidLetBindingNameError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidLetBindingNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.invalidLetBindingNameErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.invalidLetBindingNameErrorName x))}]})++invalidTermError :: Core__.InvalidTermError -> Core.Term+invalidTermError x =+    case x of+      Core__.InvalidTermErrorConstantCondition v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "constantCondition"),+          Core.fieldTerm = (constantConditionError v0)}})+      Core__.InvalidTermErrorDuplicateBinding v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "duplicateBinding"),+          Core.fieldTerm = (duplicateBindingError v0)}})+      Core__.InvalidTermErrorDuplicateField v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "duplicateField"),+          Core.fieldTerm = (duplicateFieldError v0)}})+      Core__.InvalidTermErrorEmptyCaseStatement v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "emptyCaseStatement"),+          Core.fieldTerm = (emptyCaseStatementError v0)}})+      Core__.InvalidTermErrorEmptyLetBindings v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "emptyLetBindings"),+          Core.fieldTerm = (emptyLetBindingsError v0)}})+      Core__.InvalidTermErrorEmptyTermAnnotation v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "emptyTermAnnotation"),+          Core.fieldTerm = (emptyTermAnnotationError v0)}})+      Core__.InvalidTermErrorEmptyTypeNameInTerm v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "emptyTypeNameInTerm"),+          Core.fieldTerm = (emptyTypeNameInTermError v0)}})+      Core__.InvalidTermErrorInvalidLambdaParameterName v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "invalidLambdaParameterName"),+          Core.fieldTerm = (invalidLambdaParameterNameError v0)}})+      Core__.InvalidTermErrorInvalidLetBindingName v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "invalidLetBindingName"),+          Core.fieldTerm = (invalidLetBindingNameError v0)}})+      Core__.InvalidTermErrorInvalidTypeLambdaParameterName v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "invalidTypeLambdaParameterName"),+          Core.fieldTerm = (invalidTypeLambdaParameterNameError v0)}})+      Core__.InvalidTermErrorNestedTermAnnotation v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "nestedTermAnnotation"),+          Core.fieldTerm = (nestedTermAnnotationError v0)}})+      Core__.InvalidTermErrorRedundantWrapUnwrap v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "redundantWrapUnwrap"),+          Core.fieldTerm = (redundantWrapUnwrapError v0)}})+      Core__.InvalidTermErrorSelfApplication v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "selfApplication"),+          Core.fieldTerm = (selfApplicationError v0)}})+      Core__.InvalidTermErrorTermVariableShadowing v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "termVariableShadowing"),+          Core.fieldTerm = (termVariableShadowingError v0)}})+      Core__.InvalidTermErrorTypeVariableShadowingInTypeLambda v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "typeVariableShadowingInTypeLambda"),+          Core.fieldTerm = (typeVariableShadowingInTypeLambdaError v0)}})+      Core__.InvalidTermErrorUndefinedTermVariable v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "undefinedTermVariable"),+          Core.fieldTerm = (undefinedTermVariableError v0)}})+      Core__.InvalidTermErrorUndefinedTypeVariableInBindingType v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "undefinedTypeVariableInBindingType"),+          Core.fieldTerm = (undefinedTypeVariableInBindingTypeError v0)}})+      Core__.InvalidTermErrorUndefinedTypeVariableInLambdaDomain v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "undefinedTypeVariableInLambdaDomain"),+          Core.fieldTerm = (undefinedTypeVariableInLambdaDomainError v0)}})+      Core__.InvalidTermErrorUndefinedTypeVariableInTypeApplication v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "undefinedTypeVariableInTypeApplication"),+          Core.fieldTerm = (undefinedTypeVariableInTypeApplicationError v0)}})+      Core__.InvalidTermErrorUnknownPrimitiveName v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "unknownPrimitiveName"),+          Core.fieldTerm = (unknownPrimitiveNameError v0)}})+      Core__.InvalidTermErrorUnnecessaryIdentityApplication v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "unnecessaryIdentityApplication"),+          Core.fieldTerm = (unnecessaryIdentityApplicationError v0)}})+      Core__.InvalidTermErrorUntypedTermVariable v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTermError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "untypedTermVariable"),+          Core.fieldTerm = (untypedTermVariableError v0)}})++invalidTypeError :: Core__.InvalidTypeError -> Core.Term+invalidTypeError x =+    case x of+      Core__.InvalidTypeErrorDuplicateRecordTypeFieldNames v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "duplicateRecordTypeFieldNames"),+          Core.fieldTerm = (duplicateRecordTypeFieldNamesError v0)}})+      Core__.InvalidTypeErrorDuplicateUnionTypeFieldNames v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "duplicateUnionTypeFieldNames"),+          Core.fieldTerm = (duplicateUnionTypeFieldNamesError v0)}})+      Core__.InvalidTypeErrorEmptyRecordType v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "emptyRecordType"),+          Core.fieldTerm = (emptyRecordTypeError v0)}})+      Core__.InvalidTypeErrorEmptyTypeAnnotation v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "emptyTypeAnnotation"),+          Core.fieldTerm = (emptyTypeAnnotationError v0)}})+      Core__.InvalidTypeErrorEmptyUnionType v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "emptyUnionType"),+          Core.fieldTerm = (emptyUnionTypeError v0)}})+      Core__.InvalidTypeErrorInvalidForallParameterName v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "invalidForallParameterName"),+          Core.fieldTerm = (invalidForallParameterNameError v0)}})+      Core__.InvalidTypeErrorInvalidTypeSchemeVariableName v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "invalidTypeSchemeVariableName"),+          Core.fieldTerm = (invalidTypeSchemeVariableNameError v0)}})+      Core__.InvalidTypeErrorNestedTypeAnnotation v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "nestedTypeAnnotation"),+          Core.fieldTerm = (nestedTypeAnnotationError v0)}})+      Core__.InvalidTypeErrorNonComparableMapKeyType v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "nonComparableMapKeyType"),+          Core.fieldTerm = (nonComparableMapKeyTypeError v0)}})+      Core__.InvalidTypeErrorNonComparableSetElementType v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "nonComparableSetElementType"),+          Core.fieldTerm = (nonComparableSetElementTypeError v0)}})+      Core__.InvalidTypeErrorSingleVariantUnion v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "singleVariantUnion"),+          Core.fieldTerm = (singleVariantUnionError v0)}})+      Core__.InvalidTypeErrorTypeVariableShadowingInForall v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "typeVariableShadowingInForall"),+          Core.fieldTerm = (typeVariableShadowingInForallError v0)}})+      Core__.InvalidTypeErrorUndefinedTypeVariable v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "undefinedTypeVariable"),+          Core.fieldTerm = (undefinedTypeVariableError v0)}})+      Core__.InvalidTypeErrorVoidInNonBottomPosition v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.error.core.InvalidTypeError"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "voidInNonBottomPosition"),+          Core.fieldTerm = (voidInNonBottomPositionError v0)}})++invalidTypeLambdaParameterNameError :: Core__.InvalidTypeLambdaParameterNameError -> Core.Term+invalidTypeLambdaParameterNameError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeLambdaParameterNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.invalidTypeLambdaParameterNameErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.invalidTypeLambdaParameterNameErrorName x))}]})++invalidTypeSchemeVariableNameError :: Core__.InvalidTypeSchemeVariableNameError -> Core.Term+invalidTypeSchemeVariableNameError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.InvalidTypeSchemeVariableNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.invalidTypeSchemeVariableNameErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.invalidTypeSchemeVariableNameErrorName x))}]})++nestedTermAnnotationError :: Core__.NestedTermAnnotationError -> Core.Term+nestedTermAnnotationError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.NestedTermAnnotationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.nestedTermAnnotationErrorLocation x))}]})++nestedTypeAnnotationError :: Core__.NestedTypeAnnotationError -> Core.Term+nestedTypeAnnotationError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.NestedTypeAnnotationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.nestedTypeAnnotationErrorLocation x))}]})++nonComparableMapKeyTypeError :: Core__.NonComparableMapKeyTypeError -> Core.Term+nonComparableMapKeyTypeError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableMapKeyTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.nonComparableMapKeyTypeErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "keyType"),+          Core.fieldTerm = (Core_.type_ (Core__.nonComparableMapKeyTypeErrorKeyType x))}]})++nonComparableSetElementTypeError :: Core__.NonComparableSetElementTypeError -> Core.Term+nonComparableSetElementTypeError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.NonComparableSetElementTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.nonComparableSetElementTypeErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "elementType"),+          Core.fieldTerm = (Core_.type_ (Core__.nonComparableSetElementTypeErrorElementType x))}]})++redundantWrapUnwrapError :: Core__.RedundantWrapUnwrapError -> Core.Term+redundantWrapUnwrapError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.RedundantWrapUnwrapError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.redundantWrapUnwrapErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core_.name (Core__.redundantWrapUnwrapErrorTypeName x))}]})++selfApplicationError :: Core__.SelfApplicationError -> Core.Term+selfApplicationError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.SelfApplicationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.selfApplicationErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.selfApplicationErrorName x))}]})++singleVariantUnionError :: Core__.SingleVariantUnionError -> Core.Term+singleVariantUnionError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.SingleVariantUnionError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.singleVariantUnionErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "fieldName"),+          Core.fieldTerm = (Core_.name (Core__.singleVariantUnionErrorFieldName x))}]})++termVariableShadowingError :: Core__.TermVariableShadowingError -> Core.Term+termVariableShadowingError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.TermVariableShadowingError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.termVariableShadowingErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.termVariableShadowingErrorName x))}]})++typeVariableShadowingInForallError :: Core__.TypeVariableShadowingInForallError -> Core.Term+typeVariableShadowingInForallError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInForallError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.typeVariableShadowingInForallErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.typeVariableShadowingInForallErrorName x))}]})++typeVariableShadowingInTypeLambdaError :: Core__.TypeVariableShadowingInTypeLambdaError -> Core.Term+typeVariableShadowingInTypeLambdaError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.TypeVariableShadowingInTypeLambdaError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.typeVariableShadowingInTypeLambdaErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.typeVariableShadowingInTypeLambdaErrorName x))}]})++undefinedFieldError :: Core__.UndefinedFieldError -> Core.Term+undefinedFieldError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedFieldError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "fieldName"),+          Core.fieldTerm = (Core_.name (Core__.undefinedFieldErrorFieldName x))},+        Core.Field {+          Core.fieldName = (Core.Name "typeName"),+          Core.fieldTerm = (Core_.name (Core__.undefinedFieldErrorTypeName x))}]})++undefinedTermVariableError :: Core__.UndefinedTermVariableError -> Core.Term+undefinedTermVariableError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTermVariableError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.undefinedTermVariableErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.undefinedTermVariableErrorName x))}]})++undefinedTypeVariableError :: Core__.UndefinedTypeVariableError -> Core.Term+undefinedTypeVariableError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.undefinedTypeVariableErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.undefinedTypeVariableErrorName x))}]})++undefinedTypeVariableInBindingTypeError :: Core__.UndefinedTypeVariableInBindingTypeError -> Core.Term+undefinedTypeVariableInBindingTypeError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInBindingTypeError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.undefinedTypeVariableInBindingTypeErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.undefinedTypeVariableInBindingTypeErrorName x))}]})++undefinedTypeVariableInLambdaDomainError :: Core__.UndefinedTypeVariableInLambdaDomainError -> Core.Term+undefinedTypeVariableInLambdaDomainError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInLambdaDomainError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.undefinedTypeVariableInLambdaDomainErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.undefinedTypeVariableInLambdaDomainErrorName x))}]})++undefinedTypeVariableInTypeApplicationError :: Core__.UndefinedTypeVariableInTypeApplicationError -> Core.Term+undefinedTypeVariableInTypeApplicationError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UndefinedTypeVariableInTypeApplicationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.undefinedTypeVariableInTypeApplicationErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.undefinedTypeVariableInTypeApplicationErrorName x))}]})++unexpectedTermVariantError :: Core__.UnexpectedTermVariantError -> Core.Term+unexpectedTermVariantError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTermVariantError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "expectedVariant"),+          Core.fieldTerm = (Variants.termVariant (Core__.unexpectedTermVariantErrorExpectedVariant x))},+        Core.Field {+          Core.fieldName = (Core.Name "actualTerm"),+          Core.fieldTerm = (Core_.term (Core__.unexpectedTermVariantErrorActualTerm x))}]})++unexpectedTypeVariantError :: Core__.UnexpectedTypeVariantError -> Core.Term+unexpectedTypeVariantError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnexpectedTypeVariantError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "expectedVariant"),+          Core.fieldTerm = (Variants.typeVariant (Core__.unexpectedTypeVariantErrorExpectedVariant x))},+        Core.Field {+          Core.fieldName = (Core.Name "actualType"),+          Core.fieldTerm = (Core_.type_ (Core__.unexpectedTypeVariantErrorActualType x))}]})++unknownPrimitiveNameError :: Core__.UnknownPrimitiveNameError -> Core.Term+unknownPrimitiveNameError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnknownPrimitiveNameError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.unknownPrimitiveNameErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.unknownPrimitiveNameErrorName x))}]})++unnecessaryIdentityApplicationError :: Core__.UnnecessaryIdentityApplicationError -> Core.Term+unnecessaryIdentityApplicationError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UnnecessaryIdentityApplicationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.unnecessaryIdentityApplicationErrorLocation x))}]})++untypedTermVariableError :: Core__.UntypedTermVariableError -> Core.Term+untypedTermVariableError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.UntypedTermVariableError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.untypedTermVariableErrorLocation x))},+        Core.Field {+          Core.fieldName = (Core.Name "name"),+          Core.fieldTerm = (Core_.name (Core__.untypedTermVariableErrorName x))}]})++voidInNonBottomPositionError :: Core__.VoidInNonBottomPositionError -> Core.Term+voidInNonBottomPositionError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.error.core.VoidInNonBottomPositionError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "location"),+          Core.fieldTerm = (Paths.subtermPath (Core__.voidInNonBottomPositionErrorLocation x))}]})
+ src/gen-main/haskell/Hydra/Encode/Errors.hs view
@@ -0,0 +1,103 @@+-- Note: this is an automatically generated file. Do not edit.++-- | Term encoders for hydra.errors++module Hydra.Encode.Errors where++import qualified Hydra.Core as Core+import qualified Hydra.Encode.Core as Core_+import qualified Hydra.Encode.Error.Checking as Checking+import qualified Hydra.Encode.Error.Core as Core__+import qualified Hydra.Errors as Errors+import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)+import qualified Data.ByteString as B+import qualified Data.Int as I+import qualified Data.List as L+import qualified Data.Map as M+import qualified Data.Set as S++decodingError :: Errors.DecodingError -> Core.Term+decodingError x =+    Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.errors.DecodingError"),+      Core.wrappedTermBody = ((\x -> Core.TermLiteral (Core.LiteralString x)) (Errors.unDecodingError x))})++error :: Errors.Error -> Core.Term+error x =+    case x of+      Errors.ErrorChecking v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "checking"),+          Core.fieldTerm = (Checking.checkingError v0)}})+      Errors.ErrorDecoding v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "decoding"),+          Core.fieldTerm = (decodingError v0)}})+      Errors.ErrorDuplicateBinding v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "duplicateBinding"),+          Core.fieldTerm = (Core__.duplicateBindingError v0)}})+      Errors.ErrorDuplicateField v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "duplicateField"),+          Core.fieldTerm = (Core__.duplicateFieldError v0)}})+      Errors.ErrorOther v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "other"),+          Core.fieldTerm = (otherError v0)}})+      Errors.ErrorUndefinedField v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "undefinedField"),+          Core.fieldTerm = (Core__.undefinedFieldError v0)}})+      Errors.ErrorUndefinedTermVariable v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "undefinedTermVariable"),+          Core.fieldTerm = (Core__.undefinedTermVariableError v0)}})+      Errors.ErrorUntypedTermVariable v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "untypedTermVariable"),+          Core.fieldTerm = (Core__.untypedTermVariableError v0)}})+      Errors.ErrorUnexpectedTermVariant v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "unexpectedTermVariant"),+          Core.fieldTerm = (Core__.unexpectedTermVariantError v0)}})+      Errors.ErrorUnexpectedTypeVariant v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "unexpectedTypeVariant"),+          Core.fieldTerm = (Core__.unexpectedTypeVariantError v0)}})+      Errors.ErrorUnification v0 -> Core.TermUnion (Core.Injection {+        Core.injectionTypeName = (Core.Name "hydra.errors.Error"),+        Core.injectionField = Core.Field {+          Core.fieldName = (Core.Name "unification"),+          Core.fieldTerm = (unificationError v0)}})++otherError :: Errors.OtherError -> Core.Term+otherError x =+    Core.TermWrap (Core.WrappedTerm {+      Core.wrappedTermTypeName = (Core.Name "hydra.errors.OtherError"),+      Core.wrappedTermBody = ((\x -> Core.TermLiteral (Core.LiteralString x)) (Errors.unOtherError x))})++unificationError :: Errors.UnificationError -> Core.Term+unificationError x =+    Core.TermRecord (Core.Record {+      Core.recordTypeName = (Core.Name "hydra.errors.UnificationError"),+      Core.recordFields = [+        Core.Field {+          Core.fieldName = (Core.Name "leftType"),+          Core.fieldTerm = (Core_.type_ (Errors.unificationErrorLeftType x))},+        Core.Field {+          Core.fieldName = (Core.Name "rightType"),+          Core.fieldTerm = (Core_.type_ (Errors.unificationErrorRightType x))},+        Core.Field {+          Core.fieldName = (Core.Name "message"),+          Core.fieldTerm = ((\x -> Core.TermLiteral (Core.LiteralString x)) (Errors.unificationErrorMessage x))}]})
− src/gen-main/haskell/Hydra/Encode/Grammar.hs
@@ -1,120 +0,0 @@--- Note: this is an automatically generated file. Do not edit.---- | Term encoders for hydra.grammar--module Hydra.Encode.Grammar where--import qualified Hydra.Core as Core-import qualified Hydra.Grammar as Grammar-import qualified Hydra.Lib.Lists as Lists-import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)-import qualified Data.ByteString as B-import qualified Data.Int as I-import qualified Data.List as L-import qualified Data.Map as M-import qualified Data.Set as S--constant :: (Grammar.Constant -> Core.Term)-constant x = (Core.TermWrap (Core.WrappedTerm {-  Core.wrappedTermTypeName = (Core.Name "hydra.grammar.Constant"),-  Core.wrappedTermBody = ((\x -> Core.TermLiteral (Core.LiteralString x)) (Grammar.unConstant x))}))--grammar :: (Grammar.Grammar -> Core.Term)-grammar x = (Core.TermWrap (Core.WrappedTerm {-  Core.wrappedTermTypeName = (Core.Name "hydra.grammar.Grammar"),-  Core.wrappedTermBody = ((\xs -> Core.TermList (Lists.map production xs)) (Grammar.unGrammar x))}))--label :: (Grammar.Label -> Core.Term)-label x = (Core.TermWrap (Core.WrappedTerm {-  Core.wrappedTermTypeName = (Core.Name "hydra.grammar.Label"),-  Core.wrappedTermBody =