// foo.h
static inline bool use_foo = true;
static
: Limits the variable's linkage to the current translation unit. Each translation unit (source file including this header) will have its own separate instance ofuse_foo
.
// An Arbitrary instance generator for std::variant, for | |
// Rapidcheck: https://github.com/emil-e/rapidcheck | |
#include <variant> | |
namespace rc { | |
template<> | |
struct Arbitrary<std::monostate> { | |
static Gen<std::monostate> arbitrary() { |
git log --date=local --format="%cD" --stat --no-merges |
# To use this, you need to implement some class with a read() method, eg. | |
# | |
# class MyReader(object): | |
# def __init__(self, path): | |
# self.path = path | |
# | |
# def read(self): | |
# with open(self.path, 'r') as f: | |
# return f.read() | |
# ... |
(Read the comments) |
#!/bin/sh | |
# | |
# ci: Continuously invoke a command when input files change | |
# | |
# Requires inotifywait, from inotify-tools: | |
# # apt-get install inotify-tools | |
# # yum install inotify-tools | |
# | |
# Conrad Parker 2015 |
function cd_down_rec () { | |
case $(find ./* -maxdepth 0 -type d -not -name ".*" | wc -l) in | |
1) | |
cd * | |
cd_down_rec | |
;; | |
*) | |
;; | |
esac |
#!/bin/bash | |
apply () { | |
filename=$1 | |
shift | |
patch_args=$* | |
gotSubject=no | |
msg="" |
diff --git a/src/Fay/Compiler.hs b/src/Fay/Compiler.hs | |
index 8de77fc..ed388d5 100644 | |
--- a/src/Fay/Compiler.hs | |
+++ b/src/Fay/Compiler.hs | |
@@ -81,24 +81,27 @@ compileToplevelModule filein mod@Module{} = do | |
either throwError warn res | |
initialPass filein | |
-- Reset imports after initialPass so the modules can be imported during code generation. | |
- startCompile compileFileWithSource filein | |
+ (hstmts, fstmts) <- startCompile compileFileWithSource filein |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE RebindableSyntax #-} | |
module TodoFay ( | |
Todo(..) | |
, TodoState(..) | |
, initialState | |
, remaining | |
, addTodo | |
, archive |