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
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE RecursiveDo #-} | |
module Main ( | |
main | |
) where | |
import Control.Lens | |
import Data.Text (Text) | |
import qualified Data.Text as Text |
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
app :: MonadWidget t m => m () | |
app = mdo | |
curRoute <- menu initialRoute | |
tool curRoute | |
modeMenu :: MonadWidget t m => Dynamic t Route -> Mode -> m (Dynamic t Mode) | |
modeMenu dRoute initial = do | |
eMode <- elClass "div" "Mode" $ do | |
toV <- menuItem View dCur dRoute | |
text " | " |
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
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE RecursiveDo #-} | |
module Main where | |
import Data.Monoid | |
import Control.Applicative | |
import Text.Read | |
import Control.Monad.Fix (MonadFix) | |
import Control.Monad.Trans (liftIO) |
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
1. <eof> parser at end of file | |
2. Code generation | |
3. Running pass 'Function Pass Manager' on module 'rts/sm/Storage.c'. | |
4. Running pass 'WebAssembly Assembly Printer' on function '@flushExec' | |
clang-6.0: error: unable to execute command: Segmentation fault | |
clang-6.0: error: clang frontend command failed due to signal (use -v to see invocation) | |
clang version 6.0.0 | |
Target: wasm32-unknown-unknown-wasm | |
Thread model: posix | |
InstalledDir: /nix/store/n602mwa9ry7mcr2cfw46wkpmvw62p80a-clang/bin |
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
fatal error: error in backend: Cannot select: 0x739eeb0: i32,ch = AtomicCmpSwap<Volatile LDST4[%27]> 0x732d870, 0x739f870, 0x739f328, 0x739f0b8 | |
0x739f870: i32 = add 0x73a6b98, Constant:i32<8> | |
0x73a6b98: i32,ch = CopyFromReg 0x732d870, Register:i32 %vreg6 | |
0x739f598: i32 = Register %vreg6 | |
0x739f530: i32 = Constant<8> | |
0x739f328: i32,ch = CopyFromReg 0x732d870, Register:i32 %vreg1 | |
0x739f668: i32 = Register %vreg1 | |
0x739f0b8: i32 = add 0x739f328, Constant:i32<1> | |
0x739f328: i32,ch = CopyFromReg 0x732d870, Register:i32 %vreg1 | |
0x739f668: i32 = Register %vreg1 |
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
Error (figuring out linker information): user error (invalid --version output, or linker is unsupported) | |
<no location info>: error: | |
Warning: Couldn't figure out linker information! | |
Make sure you're using GNU ld, GNU gold or the built in OS X linker, etc. | |
*** Linker: | |
/nix/store/xzhv124j2cp9h7wk2p5c6syz3myj1jrh-wasm32-unknown-unknown-wasm-clang-cross-wrapper/bin/wasm32-unknown-unknown-wasm-cc -fno-stack-protector -DNO_REGS -DUSE_MINIINTERPRETER -o ../test -lm -no-pie ../Main.o -L/home/dave/work/github.com/WebGHC/ghc/libraries/base/dist-install/build -L/home/dave/work/github.com/WebGHC/ghc/libraries/integer-simple/dist-install/build -L/home/dave/work/github.com/WebGHC/ghc/libraries/ghc-prim/dist-install/build -L/home/dave/work/github.com/WebGHC/wasm-cross/ghc/rts/dist/build /run/user/1000/ghc23001_0/ghc_2.o -Wl,-u,base_GHCziTopHandler_runIO_closure -Wl,-u,base_GHCziTopHandler_runNonIO_closure -Wl,-u,ghczmprim_GHCziTuple_Z0T_closure -Wl,-u,ghczmprim_GHCziTypes_True_closure -Wl,-u,ghczmprim_GHCzi |
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
Error (figuring out linker information): user error (invalid --version output, or linker is unsupported) | |
<no location info>: error: | |
Warning: Couldn't figure out linker information! | |
Make sure you're using GNU ld, GNU gold or the built in OS X linker, etc. | |
*** Linker: | |
/nix/store/xzhv124j2cp9h7wk2p5c6syz3myj1jrh-wasm32-unknown-unknown-wasm-clang-cross-wrapper/bin/wasm32-unknown-unknown-wasm-cc -fno-stack-protector -DNO_REGS -DUSE_MINIINTERPRETER -o ../test -lm -no-pie ../Main.o -L/home/dave/work/github.com/WebGHC/ghc/libraries/base/dist-install/build -L/home/dave/work/github.com/WebGHC/ghc/libraries/integer-simple/dist-install/build -L/home/dave/work/github.com/WebGHC/ghc/libraries/ghc-prim/dist-install/build -L/home/dave/work/github.com/WebGHC/wasm-cross/ghc/rts/dist/build /run/user/1000/ghc5661_0/ghc_2.o -Wl,-allow-undefined-file,rts.wasm.syms -lHSbase-4.11.0.0 -lHSinteger-simple-0.1.1.1 -lHSghc-prim-0.5.2.0 -liconv -lm -lrt -ldl | |
clang-6.0: warning: argument unused during compilation: '-nopie |
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
trackLines :: (Reflex t, MonadHold t m) | |
=> Event t Point | |
-> Event t Point | |
-> Event t Point | |
-> m (Behavior t [Maybe Point]) | |
trackLines eUp eDown eMove = do | |
-- track whether the mouse is up or down in a Behavior | |
bState <- hold False . leftmost $ [ | |
False <$ eUp |
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
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE DeriveFoldable #-} | |
{-# LANGUAGE DeriveTraversable #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
module Demo where |
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
{ config, pkgs, lib ? pkgs.lib, ... }: | |
with lib; | |
let | |
cfg = config.services.blog-updater; | |
in | |
{ | |
# interface | |
options = { |