{-# LANGUAGE NoMonomorphismRestriction #-} module Baserock.Schema.Utils where import Control.Applicative import Data.List import Data.Maybe import Data.Yaml listElemCmp as x y = fromJust $ liftA2 compare (elemIndex x as) (elemIndex y as) possibly f v = if v == mempty then mempty else [f .= v]