{-# LANGUAGE OverloadedStrings #-}

module Funcons.Core.Values.Composite.GraphsBuiltin where

import Funcons.EDSL
import qualified Funcons.Operations as VAL 

library :: FunconLibrary
library = [(Name, EvalFunction)] -> FunconLibrary
libFromList [
    (Name
"is-cyclic", ([Funcons] -> Funcons)
-> ([OpExpr Funcons] -> OpExpr Funcons) -> EvalFunction
fromValOp [Funcons] -> Funcons
is_cyclic_ [OpExpr Funcons] -> OpExpr Funcons
forall t. (Ord t, HasValues t) => [OpExpr t] -> OpExpr t
VAL.is_cyclic_)
  , (Name
"topological-sort", ([Funcons] -> Funcons)
-> ([OpExpr Funcons] -> OpExpr Funcons) -> EvalFunction
fromValOp [Funcons] -> Funcons
topological_sort_ [OpExpr Funcons] -> OpExpr Funcons
forall t. (Ord t, HasValues t) => [OpExpr t] -> OpExpr t
VAL.topological_sort_)
  ]

is_cyclic_ :: [Funcons] -> Funcons
is_cyclic_ = Name -> [Funcons] -> Funcons
applyFuncon Name
"is-cyclic"
topological_sort_ :: [Funcons] -> Funcons
topological_sort_ = Name -> [Funcons] -> Funcons
applyFuncon Name
"topological-sort"