Skip to content

Instantly share code, notes, and snippets.

View dalaing's full-sized avatar

Dave Laing dalaing

  • Brisbane, Australia
View GitHub Profile
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
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
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
@dalaing
dalaing / propme.hs
Last active November 15, 2017 03:10
Prop
{-# 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)
@dalaing
dalaing / tada?
Last active November 8, 2017 02:00
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 " | "
@dalaing
dalaing / Main.hs
Last active November 8, 2017 00:26
Autocomplete
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecursiveDo #-}
module Main (
main
) where
import Control.Lens
import Data.Text (Text)
import qualified Data.Text as Text
{ config, pkgs, ...}: {
services.postfix = {
enable = true;
setSendmail = true;
};
services.postgresql = {
enable = true;
package = pkgs.postgresql;
@dalaing
dalaing / Scratch.hs
Created October 13, 2017 06:30
Terria
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLists #-}
{-# LANGUAGE FlexibleContexts #-}
module Scratch where
import Data.Monoid ((<>))
import Control.Monad.Trans (liftIO)
import Reflex.Dom.Core
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE OverloadedStrings #-}
module Run (
runner
) where
import Control.Monad.Reader (ReaderT, runReaderT)
import Data.Foldable (traverse_)
@dalaing
dalaing / gist:c4c48aeff051d2049e4bd1a5be05797d
Last active August 28, 2016 03:05
reactive-banana airlock
-- Things from reactive-banana in use:
-- - stepper
-- to accumulate state in a behavior from an inital value and the firings of an event
-- - <@> and <@
-- to sample behaviors at the point when an event occurs (with or without the value in the event)
-- - whenE
-- to filter events based on a Behavior Bool
-- - reactimate
-- to do IO when an event occurs
-- plus leftmost