Skip to content

Instantly share code, notes, and snippets.

View sritchie's full-sized avatar
🎯
Focusing

Sam Ritchie sritchie

🎯
Focusing
View GitHub Profile
WARNING: 3 error(s), 0 warning(s)
ERROR: JSC_BASE_CLASS_ERROR. incorrect use of goog.base: First argument must be 'this'. at /Users/sritchie/code/clojure/racehub.com/resources/public/assets/generated/racehub/om/router.js line 520 : 104
ERROR: JSC_BASE_CLASS_ERROR. incorrect use of goog.base: First argument must be 'this'. at /Users/sritchie/code/clojure/racehub.com/resources/public/assets/generated/racehub/om/router.js line 523 : 223
ERROR: JSC_BASE_CLASS_ERROR. incorrect use of goog.base: First argument must be 'this'. at /Users/sritchie/code/clojure/racehub.com/resources/public/assets/generated/racehub/om/router.js line 526 : 250
;; ## State Methods
(defmulti initial-state
"Multimethod that returns the initial state for the supplied
page." :name)
(s/defmethod initial-state :default [r :- Route s :- (s/maybe AppState)] {})
(defmulti page-title
"Returns the current page title for the supplied route." :name)
data Wrapper
= WrappedInt Integer
| WrappedFloat Float
unpack :: Num a => Wrapper -> a
unpack (WrappedInt x) = x
unpack (WrappedFloat x) = x
src/Course/Apply.hs:197:16-22: The first argument of ‘Apply’ should have kind ‘* -> *’, …
but ‘P.Monad’ has kind ‘(* -> *) -> Constraint’
In the instance declaration for ‘Apply P.Monad’
Compilation failed.
Result: #1=((name . #4="course") (current-response-cursor . 0) (current-response . #5="") (command-queue [cl-struct-haskell-command (#1#) #2=(lambda (state) (if (eq system-type (quote windows-nt)) (haskell-process-send-string (car state) (format ":!powershell -Command \"& { cd %s ; hasktags -e -x (ls -fi *.hs *.lhs *.hsc -exclude \\\"#*#\\\" -name -r) ; exit }\"" (haskell-session-cabal-dir (haskell-process-session (car state))))) (haskell-process-send-string (car state) (format ":!cd %s && %s | %s" (haskell-session-cabal-dir (haskell-process-session (car state))) "find . -name '*.hs' -print0 -or -name '*.lhs' -print0 -or -name '*.hsc' -print0" "xargs -0 hasktags -e -x")))) nil #3=(lambda (state response) (if (cdr state) (progn (let ((tags-file-name (haskell-session-tags-filename (haskell-process-session (car state))))) (find-tag (cdr state))))) (haskell-mode-message-line "Tags generated."))] [cl-struct-haskell-command (#1#) #2# nil #3#] [cl-struct-haskell-command (#6=((name . #4#) (next-error-region #<marker
(defn cljs-env?
"Take the &env from a macro, and tell whether we are expanding into
cljs."
[env]
(boolean (:ns env)))
(defmacro if-cljs
"Return then if we are generating cljs code and else for Clojure code.
https://groups.google.com/d/msg/clojurescript/iBY5HaQda4A/w1lAQi9_AwsJ"
[then else]
@sritchie
sritchie / emacs.el
Created April 9, 2015 01:59
add this to your .emacs to get nice indenting for Om methods (as defined by om-tools).
(defvar om-methods
(list 'render
'render-state
'init-state
'will-mount
'should-update
'will-receive-props
'will-update
'display-name
'will-unmount)
@sritchie
sritchie / distinctg.hs
Created April 9, 2015 15:43
State Transformer over Optional Transformer over Logger...
-- | Remove all duplicate integers from a list. Produce a log as you go.
-- If there is an element above 100, then abort the entire computation and produce no result.
-- However, always keep a log. If you abort the computation, produce a log with the value,
-- "aborting > 100: " followed by the value that caused it.
-- If you see an even number, produce a log message, "even number: " followed by the even number.
-- Other numbers produce no log message.
--
-- /Tip:/ Use `filtering` and `StateT over (`OptionalT` over `Logger` with a @Data.Set#Set@).
--
-- >>> distinctG $ listh [1,2,3,2,6]
diff --git a/ob-core.el b/ob-core-old.el
index ba82d88..a6ffcc4 100644
--- a/ob-core.el
+++ b/ob-core-old.el
@@ -1368,14 +1368,7 @@ specified in the properties of the current outline entry."
(or body "")))))
(preserve-indentation (or org-src-preserve-indentation
(save-match-data
- (string-match "-i\\>" switches))))
- (header-args (apply #'org-babel-merge-params
;; Copyright (c) 2010 Charles Cave
;;
;; Permission is hereby granted, free of charge, to any person
;; obtaining a copy of this software and associated documentation
;; files (the "Software"), to deal in the Software without
;; restriction, including without limitation the rights to use,
;; copy, modify, merge, publish, distribute, sublicense, and/or sell
;; copies of the Software, and to permit persons to whom the
;; Software is furnished to do so, subject to the following
;; conditions: