Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type (>) a b = (:@:) a () b
- data (a :@: b) c where
- WithAttributes :: (a ??> b, a ?> c) => b -> c -> (a :@: b) c
- data a # b = (:#:) a b
- (#) :: a -> b -> a # b
- type family (a :: Element) ?> b :: Constraint where ...
- type family (a :: Element) ??> b :: Constraint where ...
- newtype a := b = AT b
- newtype Raw a = Raw a
- data Attribute
- = AcceptA
- | AcceptCharsetA
- | AccesskeyA
- | ActionA
- | AlignA
- | AltA
- | AsyncA
- | AutocompleteA
- | AutofocusA
- | AutoplayA
- | AutosaveA
- | BgcolorA
- | BorderA
- | BufferedA
- | ChallengeA
- | CharsetA
- | CheckedA
- | CiteA
- | ClassA
- | CodeA
- | CodebaseA
- | ColorA
- | ColsA
- | ColspanA
- | ContentA
- | ContenteditableA
- | ContextmenuA
- | ControlsA
- | CoordsA
- | CrossoriginA
- | DataA
- | DatetimeA
- | DefaultA
- | DeferA
- | DirA
- | DirnameA
- | DisabledA
- | DownloadA
- | DraggableA
- | DropzoneA
- | EnctypeA
- | ForA
- | FormA
- | FormactionA
- | HeadersA
- | HeightA
- | HiddenA
- | HighA
- | HrefA
- | HreflangA
- | HttpEquivA
- | IconA
- | IdA
- | IntegrityA
- | IsmapA
- | ItempropA
- | KeytypeA
- | KindA
- | LabelA
- | LangA
- | LanguageA
- | ListA
- | LoopA
- | LowA
- | ManifestA
- | MaxA
- | MaxlengthA
- | MinlengthA
- | MediaA
- | MethodA
- | MinA
- | MultipleA
- | MutedA
- | NameA
- | NovalidateA
- | OpenA
- | OptimumA
- | PatternA
- | PingA
- | PlaceholderA
- | PosterA
- | PreloadA
- | RadiogroupA
- | ReadonlyA
- | RelA
- | RequiredA
- | ReversedA
- | RowsA
- | RowspanA
- | SandboxA
- | ScopeA
- | ScopedA
- | SeamlessA
- | SelectedA
- | ShapeA
- | SizeA
- | SizesA
- | SlotA
- | SpanA
- | SpellcheckA
- | SrcA
- | SrcdocA
- | SrclangA
- | SrcsetA
- | StartA
- | StepA
- | StyleA
- | SummaryA
- | TabindexA
- | TargetA
- | TitleA
- | TypeA
- | UsemapA
- | ValueA
- | WidthA
- | WrapA
- data Element
- = DOCTYPE
- | A
- | Abbr
- | Acronym
- | Address
- | Applet
- | Area
- | Article
- | Aside
- | Audio
- | B
- | Base
- | Basefont
- | Bdi
- | Bdo
- | Bgsound
- | Big
- | Blink
- | Blockquote
- | Body
- | Br
- | Button
- | Canvas
- | Caption
- | Center
- | Cite
- | Code
- | Col
- | Colgroup
- | Command
- | Content
- | Data
- | Datalist
- | Dd
- | Del
- | Details
- | Dfn
- | Dialog
- | Dir
- | Div
- | Dl
- | Dt
- | Element
- | Em
- | Embed
- | Fieldset
- | Figcaption
- | Figure
- | Font
- | Footer
- | Form
- | Frame
- | Frameset
- | H1
- | H2
- | H3
- | H4
- | H5
- | H6
- | Head
- | Header
- | Hgroup
- | Hr
- | Html
- | I
- | Iframe
- | Image
- | Img
- | Input
- | Ins
- | Isindex
- | Kbd
- | Keygen
- | Label
- | Legend
- | Li
- | Link
- | Listing
- | Main
- | Map
- | Mark
- | Marquee
- | Math
- | Menu
- | Menuitem
- | Meta
- | Meter
- | Multicol
- | Nav
- | Nextid
- | Nobr
- | Noembed
- | Noframes
- | Noscript
- | Object
- | Ol
- | Optgroup
- | Option
- | Output
- | P
- | Param
- | Picture
- | Plaintext
- | Pre
- | Progress
- | Q
- | Rp
- | Rt
- | Rtc
- | Ruby
- | S
- | Samp
- | Script
- | Section
- | Select
- | Shadow
- | Slot
- | Small
- | Source
- | Spacer
- | Span
- | Strike
- | Strong
- | Style
- | Sub
- | Summary
- | Sup
- | Svg
- | Table
- | Tbody
- | Td
- | Template
- | Textarea
- | Tfoot
- | Th
- | Thead
- | Time
- | Title
- | Tr
- | Track
- | Tt
- | U
- | Ul
- | Var
- | Video
- | Wbr
- | Xmp
Documentation
data (a :@: b) c where infixr 8 Source #
Decorate an element with attributes and descend to a valid child. It is recommended to use the predefined elements.
>>>
WithAttributes (A.class_ "bar") "a" :: ('Div :@: ('ClassA := String)) String
<div class="bar">a</div>
>>>
div_A (A.class_ "bar") "a"
<div class="bar">a</div>
>>>
div_ "a"
<div>a</div>
WithAttributes :: (a ??> b, a ?> c) => b -> c -> (a :@: b) c |
Combine two elements or attributes sequentially.
>>>
i_ () # div_ ()
<i></i><div></div>
>>>
i_A (A.id_ "a" # A.class_ "b") "c"
<i id="a" class="b">c</i>
(:#:) a b |
type family (a :: Element) ?> b :: Constraint where ... Source #
Check whether b
is a valid child of a
. You'll propably never
need to call this directly. Through a GADT, it is enforced that
every child is lawful.
a ?> (b # c) = (a ?> b, a ?> c) | |
a ?> ((b :@: _) _) = MaybeTypeError a b (TestPaternity (SingleElement b) (GetInfo a) (GetInfo b)) | |
a ?> (Maybe b) = a ?> b | |
a ?> (Either b c) = (a ?> b, a ?> c) | |
a ?> (f ((b :@: c) d)) = a ?> (b :@: c) d | |
a ?> (f (b # c)) = a ?> (b # c) | |
a ?> () = () | |
a ?> (b -> c) = TypeError (Text "Html elements can't contain functions") | |
a ?> b = CheckString a b |
type family (a :: Element) ??> b :: Constraint where ... Source #
Wrapper for types which won't be escaped.
Raw a |
The data type of all html elements and the kind of elements.
DOCTYPE | |
A | |
Abbr | |
Acronym | Deprecated: This is an obsolete html element and should not be used. |
Address | |
Applet | Deprecated: This is an obsolete html element and should not be used. |
Area | |
Article | |
Aside | |
Audio | |
B | |
Base | |
Basefont | Deprecated: This is an obsolete html element and should not be used. |
Bdi | |
Bdo | |
Bgsound | |
Big | Deprecated: This is an obsolete html element and should not be used. |
Blink | Deprecated: This is an obsolete html element and should not be used. |
Blockquote | |
Body | |
Br | |
Button | |
Canvas | |
Caption | |
Center | Deprecated: This is an obsolete html element and should not be used. |
Cite | |
Code | |
Col | |
Colgroup | |
Command | Deprecated: This is an obsolete html element and should not be used. |
Content | Deprecated: This is an obsolete html element and should not be used. |
Data | |
Datalist | |
Dd | |
Del | |
Details | |
Dfn | |
Dialog | |
Dir | Deprecated: This is an obsolete html element and should not be used. |
Div | |
Dl | |
Dt | |
Element | |
Em | |
Embed | |
Fieldset | |
Figcaption | |
Figure | |
Font | Deprecated: This is an obsolete html element and should not be used. |
Footer | |
Form | |
Frame | Deprecated: This is an obsolete html element and should not be used. |
Frameset | Deprecated: This is an obsolete html element and should not be used. |
H1 | |
H2 | |
H3 | |
H4 | |
H5 | |
H6 | |
Head | |
Header | |
Hgroup | |
Hr | |
Html | |
I | |
Iframe | |
Image | |
Img | |
Input | |
Ins | |
Isindex | Deprecated: This is an obsolete html element and should not be used. |
Kbd | |
Keygen | Deprecated: This is an obsolete html element and should not be used. |
Label | |
Legend | |
Li | |
Link | |
Listing | Deprecated: This is an obsolete html element and should not be used. |
Main | |
Map | |
Mark | |
Marquee | Deprecated: This is an obsolete html element and should not be used. |
Math | |
Menu | |
Menuitem | |
Meta | |
Meter | |
Multicol | Deprecated: This is an obsolete html element and should not be used. |
Nav | |
Nextid | Deprecated: This is an obsolete html element and should not be used. |
Nobr | |
Noembed | Deprecated: This is an obsolete html element and should not be used. |
Noframes | |
Noscript | |
Object | |
Ol | |
Optgroup | |
Option | |
Output | |
P | |
Param | |
Picture | |
Plaintext | Deprecated: This is an obsolete html element and should not be used. |
Pre | |
Progress | |
Q | |
Rp | |
Rt | |
Rtc | |
Ruby | |
S | |
Samp | |
Script | |
Section | |
Select | |
Shadow | Deprecated: This is an obsolete html element and should not be used. |
Slot | |
Small | |
Source | |
Spacer | Deprecated: This is an obsolete html element and should not be used. |
Span | |
Strike | Deprecated: This is an obsolete html element and should not be used. |
Strong | |
Style | |
Sub | |
Summary | |
Sup | |
Svg | |
Table | |
Tbody | |
Td | |
Template | |
Textarea | |
Tfoot | |
Th | |
Thead | |
Time | |
Title | |
Tr | |
Track | |
Tt | Deprecated: This is an obsolete html element and should not be used. |
U | |
Ul | |
Var | |
Video | |
Wbr | |
Xmp | Deprecated: This is an obsolete html element and should not be used. |