Module

Yoga.Format

Package
purescript-yoga-format
Repository
rowtype-yoga/purescript-yoga-format

#format Source

format :: forall @tmpl segments input. IsSymbol tmpl => ParseTemplate tmpl segments => RenderInput segments input => input -> String

#fmt Source

fmt :: forall @tmpl segments input. IsSymbol tmpl => ParseTemplate tmpl segments => RenderInput segments input => input -> String

Re-exports from Yoga.Format.Interpolate

Re-exports from Yoga.Format.Parse

#ParseTemplate Source

class ParseTemplate :: Symbol -> SList -> Constraintclass ParseTemplate sym segments | sym -> segments

Parse a template string into a list of segments

Instances

Re-exports from Yoga.Format.Render

#RenderInput Source

class RenderInput :: SList -> Type -> Constraintclass RenderInput segments input  where

Typeclass dispatching between record and bare value input

Members

Instances

#RenderSegments Source

class RenderSegments :: SList -> Row Type -> Constraintclass RenderSegments segments row  where

Render a parsed template's segments against a record

Members

Instances

#RenderSingle Source

class RenderSingle :: SList -> Constraintclass RenderSingle segments 

Render a single-var template with a bare value

Instances