This file contains hidden or 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 Signal exposing (Address,Mailbox,mailbox) | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (onClick,on,targetValue) | |
import Task exposing (Task,andThen) | |
import Http exposing (multipart,stringData) | |
import Time exposing (every,second) | |
main : Signal Html |
This file contains hidden or 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 Http | |
import Markdown | |
import Html exposing (Html) | |
import Task exposing (Task, andThen) | |
import Time exposing (every, second) | |
main : Signal Html | |
main = Signal.map Markdown.toHtml readme.signal |
This file contains hidden or 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 Timer | |
import Signal exposing (Address,Mailbox,mailbox) | |
import Html exposing (div, button, text, Html) | |
import Html.Events exposing (onClick) | |
import Task exposing (Task,andThen) | |
import Http | |
import Time exposing (every,second) |
This file contains hidden or 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
#toc,.toc { position: fixed;font-size: .8em;top: 8em; left: 80em; background: #fafafa;max-height: 80%; overflow: auto; display: block; } | |
html { font-family: Sevarek, Helvetica, sans-serif; font-size: 1.1em; } | |
div#content { width: 35em; color: #657b83; background: #fafafa; font-size: 1.2em; } | |
a {color: #268bd2 !important; } | |
a:visited {color: #6c71c4 !important; } | |
a:hover {color: #cb4b16 !important; } | |
table.wikitable { background-color: #fafafa; color: #657b83; } | |
table.wikitable > * > tr > th { background-color: #eee; } | |
body, div#mw-head, #catlinks {background-color: #eee;} | |
code,pre{background-color: #eee;color:#657b83;} |
This file contains hidden or 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
Serve javascript | |
> newtype RepJavascript = RepJavascript Content | |
> instance ToTypedContent RepJavascript where | |
> toTypedContent (RepJavascript c) = TypedContent typeJavascript c | |
> instance HasContentType RepJavascript where | |
> getContentType _ = typeJavascript | |
> deriving instance ToContent RepJavascript | |
> deriving instance ToContent Javascript where | |
> toContent = toContent . renderJavascript |
This file contains hidden or 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
site.hs:230:50: | |
Couldn't match expected type `M.Map k0 [a0]' | |
with actual type `Metadata' | |
In the second argument of `M.lookup', namely `metadata' | |
In the second argument of `($)', namely `M.lookup "tags" metadata' | |
In the second argument of `($)', namely | |
`maybe "" renderMeta $ M.lookup "tags" metadata' |
This file contains hidden or 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
site.hs:221:71: | |
Couldn't match expected type `M.Map String String' | |
with actual type `Metadata' | |
In the second argument of `ylookup', namely `metadata' | |
In the second argument of `($)', namely `ylookup "image" metadata' | |
In the second argument of `($)', namely | |
`maybe "/Scratch/img/presentation.png" id | |
$ ylookup "image" metadata' | |
site.hs:230:50: |
This file contains hidden or 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
main = hakyll $ do | |
rulesExtraDependencies [IdentifierDependency "Scratch/css/include/modern.sass"] $ do | |
match "Scratch/css/*" $ do | |
route $ setExtension "css" | |
compile $ getResourceString >>= | |
withItemBody (unixFilter "sass" ["--trace"]) >>= | |
return ∘ fmap compressCss |
This file contains hidden or 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
cabal-dev install | |
Resolving dependencies... | |
cabal: Could not resolve dependencies: | |
trying: inmanis-0.0.0 (user goal) | |
trying: http-conduit-1.4.1.10 (dependency of inmanis-0.0.0) | |
trying: base64-bytestring-0.1.2.0 (dependency of http-conduit-1.4.1.10) | |
trying: attoparsec-0.10.2.0 (dependency of http-conduit-1.4.1.10) | |
trying: yesod-test-0.2.1 (dependency of inmanis-0.0.0) | |
trying: HUnit-1.2.4.2/installed-6a8... (dependency of yesod-test-0.2.1) | |
next goal: yesod-platform (dependency of inmanis-0.0.0) |
This file contains hidden or 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
## First version | |
We can consider two parts. | |
The first being mostly some boilerplate[^011]. | |
And the second part more focused on OpenGL and content. | |
[^011]: Generally in Haskell you need to declare a lot of import lines. | |
This is something I find annoying. | |
In particular, it should be possible to create a special file, Import.hs | |
which make all the necessary import for you, as you generally need them all. |