hydra-0.1.1: Type-aware transformations for data and programs
Safe HaskellSafe-Inferred
LanguageHaskell2010

Hydra.Impl.Haskell.Dsl.Terms

Description

A DSL for constructing Hydra terms

Documentation

annot :: m -> Term m -> Term m Source #

apply :: Term m -> Term m -> Term m Source #

cases :: Name -> [Field m] -> Term m Source #

expectList :: Show m => (Term m -> Flow s a) -> Term m -> Flow s [a] Source #

expectLiteral :: Show m => (Literal -> Flow s a) -> Term m -> Flow s a Source #

expectMap :: (Ord k, Show m) => (Term m -> Flow s k) -> (Term m -> Flow s v) -> Term m -> Flow s (Map k v) Source #

expectNArgs :: Int -> [Term m] -> Flow s () Source #

expectOptional :: Show m => (Term m -> Flow s a) -> Term m -> Flow s (Maybe a) Source #

expectRecord :: Show m => Term m -> Flow s [Field m] Source #

expectSet :: (Ord a, Show m) => (Term m -> Flow s a) -> Term m -> Flow s (Set a) Source #

expectUnion :: Show m => Term m -> Flow s (Field m) Source #

field :: String -> Term m -> Field m Source #

fold :: Term m -> Term m Source #

isUnit :: Eq m => Term m -> Bool Source #

lambda :: String -> Term m -> Term m Source #

letTerm :: Variable -> Term m -> Term m -> Term m Source #

list :: [Term m] -> Term m Source #

map :: Map (Term m) (Term m) -> Term m Source #

mapTerm :: Map (Term m) (Term m) -> Term m Source #

match :: Name -> [(FieldName, Term m)] -> Term m Source #

nominal :: Name -> Term m -> Term m Source #

product :: [Term m] -> Term m Source #

record :: Name -> [Field m] -> Term m Source #

set :: Set (Term m) -> Term m Source #

sum :: Int -> Int -> Term m -> Term m Source #

union :: Name -> Field m -> Term m Source #

Orphan instances

IsString (Term m) Source # 
Instance details

Methods

fromString :: String -> Term m #