mkDots function

This commit is contained in:
Allen Nelson 2016-02-18 16:52:05 -06:00
parent cf3002cf21
commit b4eff58b8c

View file

@ -19,6 +19,7 @@ mkStr = Fix . NStr . DoubleQuoted . \case
"" -> []
x -> [Plain x]
-- | Make an indented string.
mkIndentedStr :: Text -> NExpr
mkIndentedStr = Fix . NStr . Indented . \case
"" -> []
@ -100,6 +101,9 @@ mkFunction params = Fix . NAbs params
mkDot :: NExpr -> Text -> NExpr
mkDot e key = Fix $ NSelect e [StaticKey key] Nothing
mkDots :: NExpr -> [Text] -> NExpr
mkDots e keys = Fix $ NSelect e (StaticKey <$> keys) Nothing
-- | An `inherit` clause without an expression to pull from.
inherit :: [NKeyName e] -> Binding e
inherit = Inherit Nothing