1module Snapshot.Html (Html, test) where
3import Prelude hiding (discard)
5import Data.Array as Array
7class BuildArray a b c | a b -> c where
8 buildArray :: a -> b -> Array c
10instance BuildArray (Array a) (Array a) a where
12else instance BuildArray a (Array a) a where
13 buildArray = Array.cons
14else instance BuildArray (Array a) a a where
15 buildArray = Array.snoc
16else instance BuildArray a a a where
17 buildArray a b = [ a, b ]
19discard :: forall a b c. BuildArray a b c => a -> (Unit -> b) -> Array c
20discard a k = buildArray a (k unit)
22data Html = Elem String (Array Html) | Text String
24class BuildChildren a where
25 buildChildren :: a -> Array Html
27instance BuildChildren Html where
30instance BuildChildren (Array Html) where
31 buildChildren = identity
33section :: forall a. BuildChildren a => a -> Html
34section = Elem "section" <<< buildChildren
36article :: forall a. BuildChildren a => a -> Html
37article = Elem "article" <<< buildChildren
39h1 :: forall a. BuildChildren a => a -> Html
40h1 = Elem "h1" <<< buildChildren
42h2 :: forall a. BuildChildren a => a -> Html
43h2 = Elem "h2" <<< buildChildren
45p :: forall a. BuildChildren a => a -> Html
46p = Elem "p" <<< buildChildren
54 text $ "Posts for " <> user
59 text "This is the first post."
60 text "Not much else to say."
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list