- a definition for what a docuemnt is
- Sequence of Paragraphs
- non-newline-ending-pars
- PlainText - sequence of strings (paragraphs)
- RichText - sequence of styled segments
- non-newline-ending-pars
- Sequence of Paragraphs
- newline-ending pars
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
-- Zipperless / One-Hole Context | |
import Data.List (List(..), null, (:)) | |
import Data.Tuple (Tuple(..)) | |
class Invertable change where | |
invert :: change -> change | |
class Undoable a change where | |
applyChange :: a -> change -> a |
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
module Something where | |
-- Let's say we have a content type, like a String | |
type Content = String | |
{- | |
Now let's say we want to add a cursor/caret to that data type | |
so that we can add/remove characters to the String at | |
the position of that cursor. |
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
module Modern_FP_With_MTL where | |
import Effect.Console as Console | |
import Effect (Effect) | |
import Effect.Class (class MonadEffect, liftEffect) | |
import Control.Monad.Trans.Class (class MonadTrans, lift) | |
import Prelude | |
{- | |
Since Purescript does not have Haskell's "GeneralizedNewtypeDeriving" language |
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
module TestOP where | |
import Prelude | |
import Data.Array (filter, intercalate) | |
import Data.Array as Array | |
import Data.Either (Either(..)) | |
import Data.String (Pattern(..), split) | |
import Data.String as String | |
import Effect (Effect) |
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
module Main where | |
import Prelude | |
import Data.Const (Const) | |
import Data.Maybe (Maybe(..)) | |
import Effect (Effect) | |
import Effect.Aff (Aff, Milliseconds(..), delay, launchAff_) | |
import Effect.Console (log) | |
import Halogen (liftEffect) |
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
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE TupleSections #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE TypeInType #-} | |
{-# LANGUAGE GADTs #-} | |
module Data.Sheaves.Optics where | |
type a + b = Either a b |
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
module Syntax.RebindableDoAdo where | |
import Prelude | |
import Control.Bind as NormalBind | |
import Data.Functor as NormalMap | |
import Control.Apply as NormalApply | |
-- Given this monad (type class instances are at bottom of file) | |
data Box a = Box a |
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
module SeldaExample where | |
import Prelude | |
import Control.Monad.Except (ExceptT, runExceptT, throwError) | |
import Control.Monad.Reader (ReaderT, runReaderT) | |
import Data.Either (Either(..)) | |
import Data.Maybe (Maybe(..)) | |
import Data.Traversable (for_) | |
import Database.PostgreSQL (Connection, PGError, PoolConfiguration, Query(..), Row0(..), execute, newPool, withConnection) |
This has come up enough that I'm writing a guide for someone else to create these things. If you have a need, then you're likely motivated enough to get this going. This stuff is straight forward and can be inferred by looking at the source code. It is, however, a bit tedious.
HTML has 3 parts to it: the tag, the tag's attributes/properties/events, and whether or not it has children. In other words:
<elementName attribute="value" property="value" onevent="doStuff();">
<child></child>
<child></child>
OlderNewer