mirror of
https://github.com/sdiehl/write-you-a-haskell.git
synced 2024-10-03 22:38:04 +03:00
rewwork table layouts
This commit is contained in:
parent
e8116f5e3d
commit
4c13c06936
@ -207,18 +207,12 @@ Combinator Description
|
|||||||
----------- ------------
|
----------- ------------
|
||||||
``char`` Match the given character.
|
``char`` Match the given character.
|
||||||
``string`` Match the given string.
|
``string`` Match the given string.
|
||||||
``<|>`` The choice operator tries to parse the first argument before
|
``<|>`` The choice operator tries to parse the first argument before proceeding to the second. Can be chained sequentially to generate a sequence of options.
|
||||||
proceeding to the second. Can be chained sequentially to
|
``many`` Consumes an arbitrary number of patterns matching the given pattern and returns them as a list.
|
||||||
generate a sequence of options.
|
|
||||||
``many`` Consumes an arbitrary number of patterns matching the given
|
|
||||||
pattern and returns them as a list.
|
|
||||||
``many1`` Like many but requires at least one match.
|
``many1`` Like many but requires at least one match.
|
||||||
``sepBy`` Match a arbitrary length sequence of patterns, delimited by
|
``sepBy`` Match a arbitrary length sequence of patterns, delimited by a given pattern.
|
||||||
a given pattern.
|
``optional`` Optionally parses a given pattern returning its value as a Maybe.
|
||||||
``optional`` Optionally parses a given pattern returning its value as a
|
``try`` Backtracking operator will let us parse ambiguous matching expressions and restart with a different pattern.
|
||||||
Maybe.
|
|
||||||
``try`` Backtracking operator will let us parse ambiguous matching
|
|
||||||
expressions and restart with a different pattern.
|
|
||||||
``parens`` Parses the given pattern surrounded by parentheses.
|
``parens`` Parses the given pattern surrounded by parentheses.
|
||||||
|
|
||||||
**Tokens**
|
**Tokens**
|
||||||
|
@ -269,7 +269,7 @@ executable, you will see a similar interactive shell.
|
|||||||
|_| |_|\__,_|___/_|\_\ | Type :help for help
|
|_| |_|\__,_|___/_|\_\ | Type :help for help
|
||||||
|
|
||||||
Compiling module: prelude.fun
|
Compiling module: prelude.fun
|
||||||
λ> id (1+2)
|
> id (1+2)
|
||||||
3
|
3
|
||||||
> :type (>>=)
|
> :type (>>=)
|
||||||
(>>=) :: Monad m => m a -> (a -> m b) -> m b
|
(>>=) :: Monad m => m a -> (a -> m b) -> m b
|
||||||
|
@ -85,12 +85,14 @@ none a = Inr a
|
|||||||
|
|
||||||
In Haskell the convention for the sum and product notation is as follows:
|
In Haskell the convention for the sum and product notation is as follows:
|
||||||
|
|
||||||
* ``a * b`` : ``(a,b)``
|
Notation Haskell Type
|
||||||
* ``a + b`` : ``Either a b``
|
--------- ------------
|
||||||
* ``Inl`` : ``Left``
|
``a * b`` ``(a,b)``
|
||||||
* ``Inr`` : ``Right``
|
``a + b`` ``Either a b``
|
||||||
* ``Empty`` : ``Void``
|
``Inl`` ``Left``
|
||||||
* ``Unit`` : ``()``
|
``Inr`` ``Right``
|
||||||
|
``Empty`` ``Void``
|
||||||
|
``Unit`` ``()``
|
||||||
|
|
||||||
Recursive Types
|
Recursive Types
|
||||||
---------------
|
---------------
|
||||||
|
@ -39,12 +39,34 @@ pre code {
|
|||||||
height: 36px;
|
height: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table th {
|
table{
|
||||||
border-right: 1em solid transparent;
|
background:#fff;
|
||||||
|
border:1px solid #ccc;
|
||||||
|
border-width:2px;
|
||||||
|
border-collapse:collapse;
|
||||||
|
margin:5px 0 10px;
|
||||||
|
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
table td {
|
th, td{
|
||||||
border-right: 1em solid transparent;
|
border:1px solid #ccc;
|
||||||
|
padding:3px 10px;
|
||||||
|
text-align:left;
|
||||||
|
vertical-align:top;
|
||||||
|
}
|
||||||
|
|
||||||
|
tr.even td{
|
||||||
|
background:#f7f7f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
th{
|
||||||
|
background:#edeff0;
|
||||||
|
}
|
||||||
|
|
||||||
|
td code {
|
||||||
|
border: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
@ -108,7 +130,7 @@ p a {
|
|||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
li code, p code, table code {
|
li code, p code {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
margin-left: 3px;
|
margin-left: 3px;
|
||||||
@ -119,62 +141,6 @@ li code, p code, table code {
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Language Extensions Table */
|
|
||||||
|
|
||||||
.table-striped .verical {
|
|
||||||
-webkit-transform: rotate(-90deg);
|
|
||||||
-moz-transform: rotate(-90deg);
|
|
||||||
-ms-transform: rotate(-90deg);
|
|
||||||
-o-transform: rotate(-90deg);
|
|
||||||
transform: rotate(-90deg);
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-striped .striped-header td {
|
|
||||||
/*border-bottom: 1px solid black;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-striped .striped-header td {
|
|
||||||
padding-left: 10px;
|
|
||||||
padding-right: 10px;
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 8pt;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-striped {
|
|
||||||
text-align: center;
|
|
||||||
border-spacing: 0px;
|
|
||||||
padding: 0px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-striped td:first-child {
|
|
||||||
text-align: left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-striped td:nth-child(5) {
|
|
||||||
text-align: left;
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-striped td:nth-child(6) {
|
|
||||||
text-align: left;
|
|
||||||
padding-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
.table-striped a {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-striped
|
|
||||||
|
|
||||||
.table-striped tr:nth-child(even) {
|
|
||||||
background-color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-striped tr:nth-child(odd) {
|
|
||||||
background-color: #eeeeee;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
.center {
|
.center {
|
||||||
|
Loading…
Reference in New Issue
Block a user