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
;; This buffer is for notes you don't want to save, and for Lisp evaluation. | |
;; If you want to create a file, visit that file with C-x C-f, | |
;; then enter the text in that file's own buffer. | |
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
module TenStrings | |
import Decidable.Order | |
%default total | |
----------------------------------------------- | |
-- Copied from tpsinnem/libs-misc | |
----------------------------------------------- |
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
mathijs@bluebook xorg% cd /home/mathijs/Repositories/nix/nixpkgs/pkgs/servers/x11/xorg next 0 | |
mathijs@bluebook ~% cd tmp /home/mathijs 0 | |
mathijs@bluebook tmp% ls -l /home/mathijs/tmp 0 | |
total 6840 | |
drwxr-xr-x 1 mathijs users 14 24 feb 23:17 agda | |
-rw-r--r-- 1 mathijs users 4905 29 apr 13:59 bla2.js.gz | |
-rw-r--r-- 1 mathijs users 113719 4 mei 13:11 bla.bc | |
-rw-r--r-- 1 mathijs users 164560 4 mei 13:13 bla.c | |
-rw-r--r-- 1 mathijs users 137972 4 mei 13:22 bla.js | |
drwxr-xr-x 1 mathijs users 18 20 mei 23:58 channel |
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
!function() { | |
var count = 0; | |
$(document).ajaxSend(function() { count++; report(); }); | |
$(document).ajaxComplete(function() { count--; report(); }); | |
function report() { if (count > 1) { console.warn('' + count + ' simultaneous ajax calls!'); }} | |
}(); |
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
module hello2 where | |
data ℕ : Set where | |
zero : ℕ | |
suc : ℕ → ℕ | |
one : ℕ | |
one = suc zero | |
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
mathijs@bluebook uhc-stuff% ls -l | |
total 12 | |
drwxr-xr-x 3 mathijs users 4096 13 aug 18:22 platforms | |
-rw-r--r-- 1 mathijs users 79 15 aug 07:26 Test.hs | |
drwxr-xr-x 3 mathijs users 4096 15 aug 07:31 vendor | |
mathijs@bluebook uhc-stuff% cd vendor | |
mathijs@bluebook vendor% ./fetchdeps |
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
diff --git a/reactive-banana/src/Reactive/Banana/Internal/CompileModel.hs b/reactive-banana/src/Reactive/Banana/Internal/CompileModel.hs | |
index a9b78df..c3e07e8 100644 | |
--- a/reactive-banana/src/Reactive/Banana/Internal/CompileModel.hs | |
+++ b/reactive-banana/src/Reactive/Banana/Internal/CompileModel.hs | |
@@ -27,12 +27,15 @@ import Reactive.Banana.Model | |
data InputToEvent = InputToEvent (forall a. InputChannel a -> Event a) | |
type Compile a b = (InputToEvent -> IO (Event a,b)) -> IO (Automaton a,b) | |
+ | |
+data Box a = Box { unBox :: a } |
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
once :: Event t a -> Event t a | |
once e = let b = stepper True (False <$ e) | |
in whenE b e | |
changes' :: Eq a => Event t (a, a) -> Event t a | |
changes' e = fst <$> filterE (uncurry (/=)) e | |
stepperP :: a -> Event t a -> (Event t (a, a), Behavior t a) | |
stepperP acc e = mapAccum acc (withPrev <$> e) | |
where withPrev x acc = ((x, acc), x) |
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
interpretModel :: (forall t. Event t a -> Event t b) -> [[a]] -> [[b]] | |
interpretModel f xs = map toList $ (unE . f . E) (map Just xs) | |
where toList :: Maybe [a] -> [a] | |
toList Nothing = [] | |
toList (Just xs) = xs | |
runner :: (forall t. Event t a -> Event t b) -> IO ([a] -> IO [[b]]) | |
runner network = do inbox <- newIORef [] -- ref to write events into | |
outbox <- newIORef . interpretModel network =<< toEvents inbox | |
return $ step inbox outbox |
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
{ | |
packageOverrides = pkgs: | |
let | |
haskell = pkgs.haskellPackages_ghc704; | |
emacs = pkgs.emacs23Packages; | |
lowPrio = pkgs.lib.lowPrio; | |
hiPrio = pkgs.lib.hiPrio; | |
# uhc = haskell.uhc.override {useJSBackend = true; }; | |
uhc = haskell.uhc; # js backend is enabled by default nowadays |
NewerOlder