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
@js.native | |
trait Window extends js.Object { | |
def alert(message: String): Unit = js.native | |
} | |
@js.native | |
@JSName("window") | |
object W extends Window |
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
This is available [here] as a .lhs file. | |
Let's just deal with the `MaybeT` transformer. | |
First some imports: | |
> import Control.Monad | |
> import Control.Monad.Trans | |
> import Control.Monad.Trans.Maybe |
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
[nix-shell:~/try-reflex/reflex-todomvc]$ codex update | |
cabal: user error (Saved package config file seems to be corrupt. Try re-running the 'configure' command.) | |
codex: *warning* falling back on dependency resolution using hackage | |
Nothing to update. | |
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
clear = FrameBuffer $ (DepthImage @1 1000, ColorImage @1 navy) -- ... | |
triangleRasterCtx = TriangleCtx CullNone PolygonFill NoOffset LastVertex | |
colorFragmentCtx = AccumulationContext (DepthOp Less True, ColorOp NoBlending (V4 True True True True)) | |
rasterizeWith = Rasterize | |
triangles = triangleRasterCtx | |
cubeVertexStream = Fetch "stream4" Triangles (Attribute "position4" :: Vec 4 Float) |
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
[nix-shell:~/try-reflex]$ cat source.hs | |
import Reflex.Dom | |
import Data.Default | |
main = mainWidget $ el "div" $ do | |
t <- textInput def | |
dynText $ _textInput_value t | |
[nix-shell:~/try-reflex]$ ghcjs source.hs | |
[1 of 1] Compiling Main ( source.hs, source.js_o ) |
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 Reflex.Dom | |
main = mainWidget $ el "div" $ do | |
t <- textInput def | |
dynText $ _textInput_value t |
NewerOlder