This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import qualified Data.Text as T | |
data Error = EndOfInput | Unexpected Char | |
deriving (Eq, Show) | |
-- Parser from T.Text to some type a. | |
data Parser a = Parser { runParser :: T.Text -> Either Error (a, T.Text) } | |
satisfy :: (Char -> Bool) -> Parser Char | |
satisfy p = Parser $ \input -> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- You can use JSBin: https://jsbin.com/xoketogeda/edit?html,output to play around with it. --> | |
<!-- The dialog element is specified in HTML specification, §4.11.4 "The dialog | |
element": https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element. --> | |
<button onclick="document.querySelector('dialog').showModal()">Open dialog</button> | |
<dialog style="width: 50%;"> | |
<h1>Native <code><dialog></code></h1> |