diff --git a/src/Web/HTML.purs b/src/Web/HTML.purs index 16172e9..ae31a1f 100644 --- a/src/Web/HTML.purs +++ b/src/Web/HTML.purs @@ -5,6 +5,7 @@ module Web.HTML import Effect (Effect) import Web.HTML.Window (Window) +import Web.HTML.Common (PropName, AttrName, ClassName) as Exports import Web.HTML.History (History) as Exports import Web.HTML.HTMLAnchorElement (HTMLAnchorElement) as Exports import Web.HTML.HTMLAreaElement (HTMLAreaElement) as Exports diff --git a/src/Web/HTML/Common.purs b/src/Web/HTML/Common.purs new file mode 100644 index 0000000..6e5d8fa --- /dev/null +++ b/src/Web/HTML/Common.purs @@ -0,0 +1,30 @@ +module Web.HTML.Common where + +import Prelude + +import Data.Newtype (class Newtype) + +-- | A wrapper for property names. +-- | +-- | The phantom type `value` describes the type of value which this property +-- | requires. +newtype PropName :: Type -> Type +newtype PropName value = PropName String + +derive instance newtypePropName :: Newtype (PropName value) _ +derive newtype instance eqPropName :: Eq (PropName value) +derive newtype instance ordPropName :: Ord (PropName value) + +-- | A wrapper for attribute names. +newtype AttrName = AttrName String + +derive instance newtypeAttrName :: Newtype AttrName _ +derive newtype instance eqAttrName :: Eq AttrName +derive newtype instance ordAttrName :: Ord AttrName + +-- | A wrapper for strings which are used as CSS classes. +newtype ClassName = ClassName String + +derive instance newtypeClassName :: Newtype ClassName _ +derive newtype instance eqClassName :: Eq ClassName +derive newtype instance ordClassName :: Ord ClassName pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy