packages feed

hydra-kernel-0.17.3: src/main/haskell/Hydra/Dsl/Lib/Lists.hs

-- Note: this is an automatically generated file. Do not edit.

-- | DSL functions for hydra.lib.lists

module Hydra.Dsl.Lib.Lists where

import qualified Hydra.Ast as Ast
import qualified Hydra.Coders as Coders
import qualified Hydra.Core as Core
import qualified Hydra.Docs as Docs
import qualified Hydra.Dsl.Ast as DslAst
import qualified Hydra.Dsl.Coders as DslCoders
import qualified Hydra.Dsl.Core as DslCore
import qualified Hydra.Dsl.Docs as DslDocs
import qualified Hydra.Dsl.Error.Checking as ErrorChecking
import qualified Hydra.Dsl.Error.Core as DslErrorCore
import qualified Hydra.Dsl.Error.File as DslErrorFile
import qualified Hydra.Dsl.Error.Packaging as DslErrorPackaging
import qualified Hydra.Dsl.Error.System as DslErrorSystem
import qualified Hydra.Dsl.Errors as DslErrors
import qualified Hydra.Dsl.File as DslFile
import qualified Hydra.Dsl.Graph as DslGraph
import qualified Hydra.Dsl.Json.Model as JsonModel
import qualified Hydra.Dsl.Packaging as DslPackaging
import qualified Hydra.Dsl.Parsing as DslParsing
import qualified Hydra.Dsl.Paths as DslPaths
import qualified Hydra.Dsl.Query as DslQuery
import qualified Hydra.Dsl.Regex as DslRegex
import qualified Hydra.Dsl.Relational as DslRelational
import qualified Hydra.Dsl.System as DslSystem
import qualified Hydra.Dsl.Tabular as DslTabular
import qualified Hydra.Dsl.Testing as DslTesting
import qualified Hydra.Dsl.Time as DslTime
import qualified Hydra.Dsl.Topology as DslTopology
import qualified Hydra.Dsl.Typing as DslTyping
import qualified Hydra.Dsl.Util as DslUtil
import qualified Hydra.Dsl.Validation as DslValidation
import qualified Hydra.Dsl.Variants as DslVariants
import qualified Hydra.Error.Checking as Checking
import qualified Hydra.Error.Core as ErrorCore
import qualified Hydra.Error.File as ErrorFile
import qualified Hydra.Error.Packaging as ErrorPackaging
import qualified Hydra.Error.System as ErrorSystem
import qualified Hydra.Errors as Errors
import qualified Hydra.File as File
import qualified Hydra.Graph as Graph
import qualified Hydra.Json.Model as Model
import qualified Hydra.Packaging as Packaging
import qualified Hydra.Parsing as Parsing
import qualified Hydra.Paths as Paths
import qualified Hydra.Query as Query
import qualified Hydra.Regex as Regex
import qualified Hydra.Relational as Relational
import qualified Hydra.System as System
import qualified Hydra.Tabular as Tabular
import qualified Hydra.Testing as Testing
import qualified Hydra.Time as Time
import qualified Hydra.Topology as Topology
import qualified Hydra.Typed as Typed
import qualified Hydra.Typing as Typing
import qualified Hydra.Util as Util
import qualified Hydra.Validation as Validation
import qualified Hydra.Variants as Variants
import Prelude hiding  (Enum, Ordering, decodeFloat, encodeFloat, fail, map, pure, sum)
import qualified Data.Scientific as Sci
import qualified Data.Set as S

-- | DSL reference to hydra.lib.lists.apply
apply :: Typed.TypedTerm [x -> y] -> Typed.TypedTerm [x] -> Typed.TypedTerm [y]
apply fs xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.apply")),
        Core.applicationArgument = (Typed.unTypedTerm fs)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.at
at :: Typed.TypedTerm Int -> Typed.TypedTerm [x] -> Typed.TypedTerm (Maybe x)
at i xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.at")),
        Core.applicationArgument = (Typed.unTypedTerm i)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.bind
bind :: Typed.TypedTerm [x] -> Typed.TypedTerm (x -> [y]) -> Typed.TypedTerm [y]
bind xs f =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.bind")),
        Core.applicationArgument = (Typed.unTypedTerm xs)})),
      Core.applicationArgument = (Typed.unTypedTerm f)}))

-- | DSL reference to hydra.lib.lists.compose
compose :: Typed.TypedTerm (x -> [y]) -> Typed.TypedTerm (y -> [z]) -> Typed.TypedTerm x -> Typed.TypedTerm [z]
compose f g x =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermApplication (Core.Application {
          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.compose")),
          Core.applicationArgument = (Typed.unTypedTerm f)})),
        Core.applicationArgument = (Typed.unTypedTerm g)})),
      Core.applicationArgument = (Typed.unTypedTerm x)}))

-- | DSL reference to hydra.lib.lists.concat
concat :: Typed.TypedTerm [[x]] -> Typed.TypedTerm [x]
concat xss =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat")),
      Core.applicationArgument = (Typed.unTypedTerm xss)}))

-- | DSL reference to hydra.lib.lists.concat2
concat2 :: Typed.TypedTerm [x] -> Typed.TypedTerm [x] -> Typed.TypedTerm [x]
concat2 xs ys =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.concat2")),
        Core.applicationArgument = (Typed.unTypedTerm xs)})),
      Core.applicationArgument = (Typed.unTypedTerm ys)}))

-- | DSL reference to hydra.lib.lists.cons
cons :: Typed.TypedTerm x -> Typed.TypedTerm [x] -> Typed.TypedTerm [x]
cons x xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.cons")),
        Core.applicationArgument = (Typed.unTypedTerm x)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.distinct
distinct :: Typed.TypedTerm [x] -> Typed.TypedTerm [x]
distinct xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.distinct")),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.drop
drop :: Typed.TypedTerm Int -> Typed.TypedTerm [x] -> Typed.TypedTerm [x]
drop n xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.drop")),
        Core.applicationArgument = (Typed.unTypedTerm n)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.dropWhile
dropWhile :: Typed.TypedTerm (x -> Bool) -> Typed.TypedTerm [x] -> Typed.TypedTerm [x]
dropWhile p xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.dropWhile")),
        Core.applicationArgument = (Typed.unTypedTerm p)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.filter
filter :: Typed.TypedTerm (x -> Bool) -> Typed.TypedTerm [x] -> Typed.TypedTerm [x]
filter p xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.filter")),
        Core.applicationArgument = (Typed.unTypedTerm p)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.find
find :: Typed.TypedTerm (x -> Bool) -> Typed.TypedTerm [x] -> Typed.TypedTerm (Maybe x)
find p xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.find")),
        Core.applicationArgument = (Typed.unTypedTerm p)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.foldList
foldList :: Typed.TypedTerm (x -> y -> [x]) -> Typed.TypedTerm x -> Typed.TypedTerm [y] -> Typed.TypedTerm [x]
foldList f acc0 xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermApplication (Core.Application {
          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldList")),
          Core.applicationArgument = (Typed.unTypedTerm f)})),
        Core.applicationArgument = (Typed.unTypedTerm acc0)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.foldl
foldl :: Typed.TypedTerm (y -> x -> y) -> Typed.TypedTerm y -> Typed.TypedTerm [x] -> Typed.TypedTerm y
foldl f acc0 xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermApplication (Core.Application {
          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldl")),
          Core.applicationArgument = (Typed.unTypedTerm f)})),
        Core.applicationArgument = (Typed.unTypedTerm acc0)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.foldr
foldr :: Typed.TypedTerm (x -> y -> y) -> Typed.TypedTerm y -> Typed.TypedTerm [x] -> Typed.TypedTerm y
foldr f acc0 xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermApplication (Core.Application {
          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.foldr")),
          Core.applicationArgument = (Typed.unTypedTerm f)})),
        Core.applicationArgument = (Typed.unTypedTerm acc0)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.group
group :: Typed.TypedTerm [x] -> Typed.TypedTerm [[x]]
group xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.group")),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.head
head :: Typed.TypedTerm [x] -> Typed.TypedTerm (Maybe x)
head xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.head")),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.init
init :: Typed.TypedTerm [x] -> Typed.TypedTerm (Maybe [x])
init xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.init")),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.intersperse
intersperse :: Typed.TypedTerm x -> Typed.TypedTerm [x] -> Typed.TypedTerm [x]
intersperse sep xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.intersperse")),
        Core.applicationArgument = (Typed.unTypedTerm sep)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.join
join :: Typed.TypedTerm [x] -> Typed.TypedTerm [[x]] -> Typed.TypedTerm [x]
join sep xss =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.join")),
        Core.applicationArgument = (Typed.unTypedTerm sep)})),
      Core.applicationArgument = (Typed.unTypedTerm xss)}))

-- | DSL reference to hydra.lib.lists.last
last :: Typed.TypedTerm [x] -> Typed.TypedTerm (Maybe x)
last xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.last")),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.length
length :: Typed.TypedTerm [x] -> Typed.TypedTerm Int
length xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.length")),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.map
map :: Typed.TypedTerm (x -> y) -> Typed.TypedTerm [x] -> Typed.TypedTerm [y]
map f xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.map")),
        Core.applicationArgument = (Typed.unTypedTerm f)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.mapList
mapList :: Typed.TypedTerm (x -> [y]) -> Typed.TypedTerm [x] -> Typed.TypedTerm [[y]]
mapList f xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.mapList")),
        Core.applicationArgument = (Typed.unTypedTerm f)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.mapOptional
mapOptional :: Typed.TypedTerm (x -> [y]) -> Typed.TypedTerm (Maybe x) -> Typed.TypedTerm [Maybe y]
mapOptional f m =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.mapOptional")),
        Core.applicationArgument = (Typed.unTypedTerm f)})),
      Core.applicationArgument = (Typed.unTypedTerm m)}))

-- | DSL reference to hydra.lib.lists.mapSet
mapSet :: (Ord x, Ord y) => (Typed.TypedTerm (x -> [y]) -> Typed.TypedTerm (S.Set x) -> Typed.TypedTerm [S.Set y])
mapSet f s =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.mapSet")),
        Core.applicationArgument = (Typed.unTypedTerm f)})),
      Core.applicationArgument = (Typed.unTypedTerm s)}))

-- | DSL reference to hydra.lib.lists.member
member :: Typed.TypedTerm x -> Typed.TypedTerm [x] -> Typed.TypedTerm Bool
member x xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.member")),
        Core.applicationArgument = (Typed.unTypedTerm x)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.null
null :: Typed.TypedTerm [x] -> Typed.TypedTerm Bool
null xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.null")),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.partition
partition :: Typed.TypedTerm (x -> Bool) -> Typed.TypedTerm [x] -> Typed.TypedTerm ([x], [x])
partition p xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.partition")),
        Core.applicationArgument = (Typed.unTypedTerm p)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.pure
pure :: Typed.TypedTerm x -> Typed.TypedTerm [x]
pure x =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.pure")),
      Core.applicationArgument = (Typed.unTypedTerm x)}))

-- | DSL reference to hydra.lib.lists.replicate
replicate :: Typed.TypedTerm Int -> Typed.TypedTerm x -> Typed.TypedTerm [x]
replicate n x =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.replicate")),
        Core.applicationArgument = (Typed.unTypedTerm n)})),
      Core.applicationArgument = (Typed.unTypedTerm x)}))

-- | DSL reference to hydra.lib.lists.reverse
reverse :: Typed.TypedTerm [x] -> Typed.TypedTerm [x]
reverse xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.reverse")),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.singleton
singleton :: Typed.TypedTerm x -> Typed.TypedTerm [x]
singleton x =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.singleton")),
      Core.applicationArgument = (Typed.unTypedTerm x)}))

-- | DSL reference to hydra.lib.lists.sort
sort :: Typed.TypedTerm [x] -> Typed.TypedTerm [x]
sort xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sort")),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.sortBy
sortBy :: Typed.TypedTerm (x -> y) -> Typed.TypedTerm [x] -> Typed.TypedTerm [x]
sortBy f xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.sortBy")),
        Core.applicationArgument = (Typed.unTypedTerm f)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.span
span :: Typed.TypedTerm (x -> Bool) -> Typed.TypedTerm [x] -> Typed.TypedTerm ([x], [x])
span p xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.span")),
        Core.applicationArgument = (Typed.unTypedTerm p)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.tail
tail :: Typed.TypedTerm [x] -> Typed.TypedTerm (Maybe [x])
tail xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.tail")),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.take
take :: Typed.TypedTerm Int -> Typed.TypedTerm [x] -> Typed.TypedTerm [x]
take n xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.take")),
        Core.applicationArgument = (Typed.unTypedTerm n)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.takeWhile
takeWhile :: Typed.TypedTerm (x -> Bool) -> Typed.TypedTerm [x] -> Typed.TypedTerm [x]
takeWhile p xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.takeWhile")),
        Core.applicationArgument = (Typed.unTypedTerm p)})),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.transpose
transpose :: Typed.TypedTerm [[x]] -> Typed.TypedTerm [[x]]
transpose xss =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.transpose")),
      Core.applicationArgument = (Typed.unTypedTerm xss)}))

-- | DSL reference to hydra.lib.lists.uncons
uncons :: Typed.TypedTerm [x] -> Typed.TypedTerm (Maybe (x, [x]))
uncons xs =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.uncons")),
      Core.applicationArgument = (Typed.unTypedTerm xs)}))

-- | DSL reference to hydra.lib.lists.zip
zip :: Typed.TypedTerm [x] -> Typed.TypedTerm [y] -> Typed.TypedTerm [(x, y)]
zip xs ys =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.zip")),
        Core.applicationArgument = (Typed.unTypedTerm xs)})),
      Core.applicationArgument = (Typed.unTypedTerm ys)}))

-- | DSL reference to hydra.lib.lists.zipWith
zipWith :: Typed.TypedTerm (x -> y -> z) -> Typed.TypedTerm [x] -> Typed.TypedTerm [y] -> Typed.TypedTerm [z]
zipWith f xs ys =
    Typed.TypedTerm (Core.TermApplication (Core.Application {
      Core.applicationFunction = (Core.TermApplication (Core.Application {
        Core.applicationFunction = (Core.TermApplication (Core.Application {
          Core.applicationFunction = (Core.TermVariable (Core.Name "hydra.lib.lists.zipWith")),
          Core.applicationArgument = (Typed.unTypedTerm f)})),
        Core.applicationArgument = (Typed.unTypedTerm xs)})),
      Core.applicationArgument = (Typed.unTypedTerm ys)}))