_id
stringlengths
64
64
repository
stringlengths
6
84
name
stringlengths
4
110
content
stringlengths
0
248k
license
null
download_url
stringlengths
89
454
language
stringclasses
7 values
comments
stringlengths
0
74.6k
code
stringlengths
0
248k
b00993edbb738ff4d3cc70b5b56e2103d69e588b6c3763215aa580fbb3cf4c66
zw/PoLtree
cli.clj
; An implementation of (the proof-of-inclusion-in-liabilities part of) gmaxwell 's proof - of - reserves-(non)fractionality system , as described at ; <-bitcoin-reserves>. ; Copyright 2014 . This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not dis...
null
https://raw.githubusercontent.com/zw/PoLtree/3ec526ecadc5db1df0bc2427016d7047fb7f7dbd/src/uk/me/iwilcox/poltree/cli.clj
clojure
An implementation of (the proof-of-inclusion-in-liabilities part of) <-bitcoin-reserves>. Basic command-line interface. Extract a customer's partial tree from a complete tree produced earlier by completetree: poltree.sh partialtree '' completetree.json This does NOT complain if you feed it balances with ...
gmaxwell 's proof - of - reserves-(non)fractionality system , as described at Copyright 2014 . This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns uk.me.iwilcox.poltree.cli (:require...
e14b810048e748444f744a028db20f1c637fe48dc02863a892268c931d50abdb
sulami/spielwiese
02-answer.hs
main = do print "What is your name?" name <- getLine print ("Hello " ++ name ++ "!")
null
https://raw.githubusercontent.com/sulami/spielwiese/da354aa112d43d7ec5f258f4b5afafd7a88c8aa8/hthw/02-answer.hs
haskell
main = do print "What is your name?" name <- getLine print ("Hello " ++ name ++ "!")
c1f406c06cc9f6487bb52e2d12768d3fcc38cd21a830550cbbce4539e1b2a9d4
janestreet/async_js
http.ml
open Core open Async_kernel open Js_of_ocaml module Opt = Js.Opt module Optdef = Js.Optdef module Response_type = struct type 'a t = 'a XmlHttpRequest.response = | ArrayBuffer : Typed_array.arrayBuffer Js.t Opt.t t | Blob : #File.blob Js.t Js.Opt.t t | Document : Dom.element Dom.document Js.t Opt.t t ...
null
https://raw.githubusercontent.com/janestreet/async_js/d0cff4bd7bababd2480d6e4bd9609ab5453cbb10/src/http.ml
ocaml
open Core open Async_kernel open Js_of_ocaml module Opt = Js.Opt module Optdef = Js.Optdef module Response_type = struct type 'a t = 'a XmlHttpRequest.response = | ArrayBuffer : Typed_array.arrayBuffer Js.t Opt.t t | Blob : #File.blob Js.t Js.Opt.t t | Document : Dom.element Dom.document Js.t Opt.t t ...
cdf38a95c658d960b89b55e5964162b092d710b96ffe489f3849a6ce1f6ed3b5
ariesteam/aries
aesthetic_view_puget.clj
Copyright 2011 The ARIES Consortium ( ) ;;; ;;; This file is part of ARIES. ;;; ;;; ARIES is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ;;; (at your option)...
null
https://raw.githubusercontent.com/ariesteam/aries/b3fafd4640f4e7950fff3791bc4ea4c06ee4dcdf/plugins/org.integratedmodelling.aries.core/models/aesthetic_view_puget.clj
clojure
This file is part of ARIES. ARIES is free software: you can redistribute it and/or modify it (at your option) any later version. ARIES is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ...
Copyright 2011 The ARIES Consortium ( ) under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License Viewshed model for Western Washington (ns core.models.aes...
d938e7b557cbef744e96a10fb94145fbaad793b9fd3d5c8186f7d3860a64e520
Toxaris/pts
Value.hs
# LANGUAGE FlexibleInstances # module PTS.Dynamics.Value ( Value ( Function , Number , Constant , PiType , ResidualIntOp , ResidualIfZero , ResidualVar , ResidualApp ) , Function , abstract , open ) where import PTS.Syntax.Constants (C) import PTS.Syntax.Names (Name) impor...
null
https://raw.githubusercontent.com/Toxaris/pts/1700024f47bc9d28528b68fc815d2421f5d25b84/src-lib/PTS/Dynamics/Value.hs
haskell
# LANGUAGE FlexibleInstances # module PTS.Dynamics.Value ( Value ( Function , Number , Constant , PiType , ResidualIntOp , ResidualIfZero , ResidualVar , ResidualApp ) , Function , abstract , open ) where import PTS.Syntax.Constants (C) import PTS.Syntax.Names (Name) impor...
40d622d5743db2977ad8189943ae00e08ae2b2aa18fcd7c8863feddfbd3ddc7e
jimweirich/sicp-study
ex2_20_test.scm
SICP Tests 2.20 (test-case "Ex 2.10 - Same Parity" (assert-equal (list 1 3 5 7) (same-parity 1 2 3 4 5 6 7)) (assert-equal (list 2 4 6) (same-parity 2 3 4 5 6 7)))
null
https://raw.githubusercontent.com/jimweirich/sicp-study/bc5190e04ed6ae321107ed6149241f26efc1b8c8/scheme/chapter2/ex2_20_test.scm
scheme
SICP Tests 2.20 (test-case "Ex 2.10 - Same Parity" (assert-equal (list 1 3 5 7) (same-parity 1 2 3 4 5 6 7)) (assert-equal (list 2 4 6) (same-parity 2 3 4 5 6 7)))
2b7ffa5aa3f70faa8aada92314a60b006a9781b672a91cf44f4fcd9556d2b518
jrm-code-project/LISP-Machine
uc-lambda-cold-disk.lisp
-*- Mode : LISP ; Package : LAMBDA ; Base:8 ; : ZL -*- ;this file for LAMBDA only!! * * ( c ) Copyright 1983 Lisp Machine Inc * * (DEFCONST UC-LAMBDA-COLD-DISK '( ;physical memory referencing on LAMBDA works by setting having a straight map set up ahead of time . ( also , the page fault routines are r...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/ulambda/uc-lambda-cold-disk.lisp
lisp
Package : LAMBDA ; Base:8 ; : ZL -*- this file for LAMBDA only!! physical memory referencing on LAMBDA works by setting having a straight map set up etc, without much setup). The PHYS-MEM-READ and PHYS-MEM-WRITE routines are and therefore must save and restore map. SELF-ADDRESS RW 4 READ / WRITE put back map PHYS...
* * ( c ) Copyright 1983 Lisp Machine Inc * * (DEFCONST UC-LAMBDA-COLD-DISK '( ahead of time . ( also , the page fault routines are relied upon to work for IO devices , kept around for convience . PHYS - MEM - READ , tho , is used to reference disk CCW lists , PHYS-MEM-READ (declare (clobb...
ef3943befba5d27f44017993bdfde87af2b17be927bf89da10ffa9541d8eec0f
evancz/elm-project-survey
Main.hs
# LANGUAGE OverloadedStrings , QuasiQuotes # module Main (main) where import Prelude hiding (lines, maybe) import Data.Aeson ((.:)) import qualified Data.Aeson as Json import Data.Binary (get, put) import qualified Data.Binary as Binary import qualified Data.ByteString as BS import qualified Data.ByteString.Builder a...
null
https://raw.githubusercontent.com/evancz/elm-project-survey/ccd96187ca1e1ddee26a491cdc480337bc944302/1-gather/src/Main.hs
haskell
MAIN RESULTS VERIFY ELM JSON GET ROOTS output=elm.js\n\ GET NODE RUN JS FAILURE
# LANGUAGE OverloadedStrings , QuasiQuotes # module Main (main) where import Prelude hiding (lines, maybe) import Data.Aeson ((.:)) import qualified Data.Aeson as Json import Data.Binary (get, put) import qualified Data.Binary as Binary import qualified Data.ByteString as BS import qualified Data.ByteString.Builder a...
6fb2a1875b966f0dcdc28f0cc24cacd6cb82c0a1df4d90be81e38766c8a36328
mirage/irmin
irmin_cli.ml
* Copyright ( c ) 2022 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND ...
null
https://raw.githubusercontent.com/mirage/irmin/c8e5327d3c72b12c326dcc416836d69ab100b0a2/src/irmin-cli/irmin_cli.ml
ocaml
* Copyright ( c ) 2022 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND ...
96fe4dda1b2dbbf44620d6063103ec03b9b6dc2776a2f1afd290385b2bc6322d
bmeurer/ocamljit2
mtype.mli
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/typing/mtype.mli
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ Id$ open Types val scrape: Env.t...
f2b9a8eb3845e5abb7c57095262f8f710b06ea8e32162b533dc43b3c91b6348a
cmsc430/www
interp-prims.rkt
#lang racket (require "ast.rkt") (provide interp-prim1 interp-prim2 interp-prim3) ;; Op1 Value -> Answer (define (interp-prim1 p1 v) (match (list p1 v) [(list 'add1 (? integer?)) (add1 v)] [(list 'sub1 (? integer?)) (sub1 v)] [(list 'zero? (? integer?)) (zero? v)] [(li...
null
https://raw.githubusercontent.com/cmsc430/www/417450315bdcfa1acea1e2e8bffc052b561039f0/langs/iniquity-gc/interp-prims.rkt
racket
Op1 Value -> Answer Op2 Value Value -> Answer Op3 Value Value Value -> Answer Any -> Boolean
#lang racket (require "ast.rkt") (provide interp-prim1 interp-prim2 interp-prim3) (define (interp-prim1 p1 v) (match (list p1 v) [(list 'add1 (? integer?)) (add1 v)] [(list 'sub1 (? integer?)) (sub1 v)] [(list 'zero? (? integer?)) (zero? v)] [(list 'char? v) ...
5c654d858fbe0ed2226d56602f11686b438fdc5c281dc6184e13be45bc81e803
facebook/flow
trace.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/typing/trace.ml
ocaml
Single-step trace with a parent. This corresponds to a recursive invocation of the flow function. Optimization: only embed when modes.trace > 0, because otherwise we're not going to see any traces anyway. Join a list of traces. If the maximum depth of traces is configured to 0, then agressively throw awa...
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
0442f22db60e6729e9e5a4a884709e9de1f428e10c2c621b9067a7a1ff5c0269
fukamachi/qlot
dist.lisp
(defpackage #:qlot/tests/distify/dist (:use #:cl #:rove #:qlot/distify/dist) (:import-from #:qlot/source #:make-source) (:import-from #:qlot/utils/ql #:parse-distinfo-file) (:import-from #:qlot/utils/tmp #:tmp-directory) (:import-from #:assoc-uti...
null
https://raw.githubusercontent.com/fukamachi/qlot/96c40e6e6193f4bcbc61fe23aee98916347e2d94/tests/distify/dist.lisp
lisp
(defpackage #:qlot/tests/distify/dist (:use #:cl #:rove #:qlot/distify/dist) (:import-from #:qlot/source #:make-source) (:import-from #:qlot/utils/ql #:parse-distinfo-file) (:import-from #:qlot/utils/tmp #:tmp-directory) (:import-from #:assoc-uti...
f31d1372cfc28bfb1584b16ff700a09a6f0e64a52eedb53cd04895cc6cc89c39
khibino/haskell-relational-record
List.hs
module Text.Parser.List ( Parser, runParser, evalParser , Error, errorE, errorP, noteP , token, eof, sink, satisfy', satisfy, list ) where import Control.Applicative (pure) import Control.Monad (guard) import Control.Monad.Trans.State.Strict (StateT (..), evalStateT, get, put) import Contr...
null
https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/text-postgresql/src/Text/Parser/List.hs
haskell
^ Function to build error string ^ Predicate to satisfy ^ Result parser | make satisfy parser with monoid-empty error. expect empty error
module Text.Parser.List ( Parser, runParser, evalParser , Error, errorE, errorP, noteP , token, eof, sink, satisfy', satisfy, list ) where import Control.Applicative (pure) import Control.Monad (guard) import Control.Monad.Trans.State.Strict (StateT (..), evalStateT, get, put) import Contr...
81ae7ad90770812f783421919d7b579196cb2ab6fe67bf8caa5f6c7de1321715
ktakashi/sagittarius-scheme
api.scm
-*- mode : scheme ; coding : utf-8 -*- ;;; ;;; text/markdown/extensions/api.scm - Extension API ;;; Copyright ( c ) 2022 < > ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; ...
null
https://raw.githubusercontent.com/ktakashi/sagittarius-scheme/3ba83ba82b857c21df86ccce99395020310d3af8/sitelib/text/markdown/extensions/api.scm
scheme
coding : utf-8 -*- text/markdown/extensions/api.scm - Extension API Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, thi...
Copyright ( c ) 2022 < > " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING #!nounbound (library (text markdown extensions api)...
f9da9208aed72f400e65f661fccd5fe0ac1f49c5b10194da1f8dfdee07cd79b6
fgalassi/cs61a-sp11
3.7.scm
(define (make-account balance secret-password) (define (incorrect-password . args) "Incorrect password") (define (withdraw amount) (if (>= balance amount) (begin (set! balance (- balance amount)) balance) "Insufficient funds")) (define (deposit amount) (set! balance (+ balance amount)) bal...
null
https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/homework/3.7.scm
scheme
(define (make-account balance secret-password) (define (incorrect-password . args) "Incorrect password") (define (withdraw amount) (if (>= balance amount) (begin (set! balance (- balance amount)) balance) "Insufficient funds")) (define (deposit amount) (set! balance (+ balance amount)) bal...
a11410ec454d53dfa8bdd49ac16e14dd20d7a56adb2bba5e040a285d5094452a
clojure-interop/java-jdk
SynthPanelUI.clj
(ns javax.swing.plaf.synth.SynthPanelUI "Provides the Synth L&F UI delegate for JPanel." (:refer-clojure :only [require comment defn ->]) (:import [javax.swing.plaf.synth SynthPanelUI])) (defn ->synth-panel-ui "Constructor." (^SynthPanelUI [] (new SynthPanelUI ))) (defn *create-ui "Creates a new UI ...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/synth/SynthPanelUI.clj
clojure
(ns javax.swing.plaf.synth.SynthPanelUI "Provides the Synth L&F UI delegate for JPanel." (:refer-clojure :only [require comment defn ->]) (:import [javax.swing.plaf.synth SynthPanelUI])) (defn ->synth-panel-ui "Constructor." (^SynthPanelUI [] (new SynthPanelUI ))) (defn *create-ui "Creates a new UI ...
19925231b7fa96148da53f681cbbdfc1fff6e1e0bb43569c35724b78e6b1720e
appleshan/cl-http
http-proxy-6-28.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*- Patch file for HTTP - PROXY version 6.28 ;;; Reason: Function HTTP::PROXY-CACHEABLE-REQUEST-HEADER-PLIST: update for change in %with-header-set-index Written by JCMa , 11/06/01 15:28:57 while running on FUJI - VLM from...
null
https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/proxy/patch/http-proxy-6/http-proxy-6-28.lisp
lisp
Syntax : Common - Lisp ; Package : USER ; Base : 10 ; Patch - File : t -*- Reason: Function HTTP::PROXY-CACHEABLE-REQUEST-HEADER-PLIST: update for change in %with-header-set-index DOMAIN - FIXES.LISP.33 ) , MAILBOX - FORMAT.LISP.24 ) , MAILER - FIXES.LISP.15 ) , Patch TCP hang on close when client drops connection....
Patch file for HTTP - PROXY version 6.28 Written by JCMa , 11/06/01 15:28:57 while running on FUJI - VLM from FUJI:/usr / lib / symbolics / ComLink-39 - 8 - F - MIT-8 - 5.vlod with Open Genera 2.0 , Genera 8.5 , Lock Simple 437.0 , Version Control 405.0 , Compare Merge 404.0 , VC Documentation 401.0 , Logic...
8576e11204f49b5f226a4a396106c656578f37f21cb3079d23592ae239b78dac
zcaudate/hara
enum_test.clj
(ns hara.core.base.enum-test (:use hara.test) (:require [hara.core.base.enum :refer :all]) (:import java.lang.annotation.ElementType)) ^{:refer hara.core.base.enum/enum? :added "3.0"} (fact "check to see if class is an enum type" (enum? java.lang.annotation.ElementType) => true (enum? String) => false) ^{...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/core/base/enum_test.clj
clojure
(ns hara.core.base.enum-test (:use hara.test) (:require [hara.core.base.enum :refer :all]) (:import java.lang.annotation.ElementType)) ^{:refer hara.core.base.enum/enum? :added "3.0"} (fact "check to see if class is an enum type" (enum? java.lang.annotation.ElementType) => true (enum? String) => false) ^{...
bd9900e72abd92050eef15a8347575f9d5fedeb490f0de2713e422d0d58404e4
racket/honu
wrap.rkt
#lang racket (require (for-syntax racket/base syntax/define syntax/parse "debug.rkt" "compile.rkt" "transformer.rkt" "parse.rkt")) (define-syntax (define-honu-wrap stx) (syntax-parse stx ...
null
https://raw.githubusercontent.com/racket/honu/b36b9aeda8be22bf7fda177e831f42ac1a1de79b/honu-parse/wrap.rkt
racket
function calls nothing on the left side should interact with a semicolon
#lang racket (require (for-syntax racket/base syntax/define syntax/parse "debug.rkt" "compile.rkt" "transformer.rkt" "parse.rkt")) (define-syntax (define-honu-wrap stx) (syntax-parse stx ...
3e405ef0a91d434e6f288098dbf449a872c47002ee9d7c6025b67cb63b6a414c
layerware/hugsql
project.clj
(defproject com.layerware/hugsql-adapter-next-jdbc "0.5.3" :description "next.jdbc hugsql adapter" :url "" :license {:name "Apache License, Version 2.0" :url "-2.0.html"} :scm {:dir ".."} :dependencies [[org.clojure/clojure "1.10.1"] [com.github.seancorfield/next.jdbc "1.2.772"] ...
null
https://raw.githubusercontent.com/layerware/hugsql/ad73d080f84487c3438058ed5203d44f06c46365/hugsql-adapter-next-jdbc/project.clj
clojure
(defproject com.layerware/hugsql-adapter-next-jdbc "0.5.3" :description "next.jdbc hugsql adapter" :url "" :license {:name "Apache License, Version 2.0" :url "-2.0.html"} :scm {:dir ".."} :dependencies [[org.clojure/clojure "1.10.1"] [com.github.seancorfield/next.jdbc "1.2.772"] ...
1be1d438eae9b28bbabcab7563f10c11a7e0d7a6bbc2dc142edafc056ed8d1be
taylorwood/advent-of-code
6.clj
(ns advent-of-code.2017.6 (:require [clojure.string :as cs])) (def raw-input "5\t1\t10\t0\t1\t7\t13\t14\t3\t12\t8\t10\t7\t12\t0\t6") (def banks (mapv #(Integer/parseInt %) (cs/split raw-input #"\t"))) (defn max-first-index "Finds the index of the first maximal value in coll. Ugly but works and I'm already like...
null
https://raw.githubusercontent.com/taylorwood/advent-of-code/c6b08f4b618875a45c8083a04ae2c669626c43bf/src/advent_of_code/2017/6.clj
clojure
(ns advent-of-code.2017.6 (:require [clojure.string :as cs])) (def raw-input "5\t1\t10\t0\t1\t7\t13\t14\t3\t12\t8\t10\t7\t12\t0\t6") (def banks (mapv #(Integer/parseInt %) (cs/split raw-input #"\t"))) (defn max-first-index "Finds the index of the first maximal value in coll. Ugly but works and I'm already like...
24351bb8eff2dfd933b7426f2fbf94f1af2916cc2ae75ce23c7e9e4e3b033748
KingMob/TrueGrit
util.clj
(ns net.modulolotus.truegrit.util "Utility methods for True Grit." {:no-doc true} (:import (io.github.resilience4j.core EventConsumer IntervalBiFunction IntervalFunction) (io.github.resilience4j.core.functions Either) (java.time Duration) (java.util.function Predicate Supplier))) ...
null
https://raw.githubusercontent.com/KingMob/TrueGrit/be63e14d1bccaa016fb4574f63bef961759c58f3/src/net/modulolotus/truegrit/util.clj
clojure
Can't seem to get the fucking type hints working on the apply sig
(ns net.modulolotus.truegrit.util "Utility methods for True Grit." {:no-doc true} (:import (io.github.resilience4j.core EventConsumer IntervalBiFunction IntervalFunction) (io.github.resilience4j.core.functions Either) (java.time Duration) (java.util.function Predicate Supplier))) ...
5100decf44ec7dfd1824df832ca8a7ce5eb58f89079477b9287282f039885b26
softwarelanguageslab/maf
R5RS_gambit_peval-2.scm
; Changes: * removed : 0 * added : 2 * swaps : 0 * negated predicates : 4 * swapped branches : 8 * calls to i d fun : 8 (letrec ((every? (lambda (pred? l) (let ((__or_res (null? l))) (<change> (if __or_res __or_res...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_gambit_peval-2.scm
scheme
Changes:
* removed : 0 * added : 2 * swaps : 0 * negated predicates : 4 * swapped branches : 8 * calls to i d fun : 8 (letrec ((every? (lambda (pred? l) (let ((__or_res (null? l))) (<change> (if __or_res __or_res ...
3c6cc757b4c4e3e87726ece20594518ca52c68103c49e3154faf307b22f36e2c
wireapp/wire-server
CanonicalInterpreter.hs
module Brig.CanonicalInterpreter where import Brig.App import Brig.Effects.BlacklistPhonePrefixStore (BlacklistPhonePrefixStore) import Brig.Effects.BlacklistPhonePrefixStore.Cassandra (interpretBlacklistPhonePrefixStoreToCassandra) import Brig.Effects.BlacklistStore (BlacklistStore) import Brig.Effects.BlacklistStore...
null
https://raw.githubusercontent.com/wireapp/wire-server/7f8f941d83f6501d7041914a05f6e81bbd0d6a3e/services/brig/src/Brig/CanonicalInterpreter.hs
haskell
module Brig.CanonicalInterpreter where import Brig.App import Brig.Effects.BlacklistPhonePrefixStore (BlacklistPhonePrefixStore) import Brig.Effects.BlacklistPhonePrefixStore.Cassandra (interpretBlacklistPhonePrefixStoreToCassandra) import Brig.Effects.BlacklistStore (BlacklistStore) import Brig.Effects.BlacklistStore...
5c63eff5c44737e70646b234fb6980bedaeb50f7f848fccb4dbd91610478daf3
8thlight/hyperion
spec_helper.clj
(ns hyperion.redis.spec-helper (:require [speclj.core :refer :all ] [hyperion.redis :refer :all ] [taoensso.carmine :as r] [hyperion.api :refer [*ds*]])) (defn- clear-db [db] (let [test-keys (carmine db (r/keys "hyperion:*"))] (when (seq test-keys) (carmine db (app...
null
https://raw.githubusercontent.com/8thlight/hyperion/b1b8f60a5ef013da854e98319220b97920727865/redis/src/hyperion/redis/spec_helper.clj
clojure
(ns hyperion.redis.spec-helper (:require [speclj.core :refer :all ] [hyperion.redis :refer :all ] [taoensso.carmine :as r] [hyperion.api :refer [*ds*]])) (defn- clear-db [db] (let [test-keys (carmine db (r/keys "hyperion:*"))] (when (seq test-keys) (carmine db (app...
b7b5caeed39fd30bac28a92f930a0a6896bdd0c28f8eb6d77380238baea0adcb
ygmpkk/house
StdMenuDef.hs
----------------------------------------------------------------------------- -- | -- Module : StdMenuDef Copyright : ( c ) 2002 -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- Definition of Menus and MenuElements : -- ---------------------...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/ObjectIO/Graphics/UI/ObjectIO/StdMenuDef.hs
haskell
--------------------------------------------------------------------------- | Module : StdMenuDef License : BSD-style Maintainer : Stability : provisional Portability : portable --------------------------------------------------------------------------- * Menus * Menu items * Menu attribu...
Copyright : ( c ) 2002 Definition of Menus and MenuElements : module Graphics.UI.ObjectIO.StdMenuDef ( Menu(..), PopUpMenu(..), MenuItem(..), MenuSeparator(..) , RadioMenu(..), MenuRadioItem(..) , SubMenu(..), MenuAttribute(..), module Graphics.UI.ObjectIO.StdGUI , mod...
f9b0c50fa9806ed088f767ec47f1845940374643de6f5963a085c575e37967bc
smart-chain-fr/tokenomia
Transfer.hs
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE RecordWildCards #-} module Tokenomia.TokenDistribution.Transfer ( distributionOutputs , transferTokenInParallel ) where import Control.Monad ( void ) import Control.Monad.Reader...
null
https://raw.githubusercontent.com/smart-chain-fr/tokenomia/eacde8e851a2e107c8a4a09ffe85cabaa4f52953/src/Tokenomia/TokenDistribution/Transfer.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE ImportQualifiedPost # # LANGUAGE RecordWildCards # to understand why a change address is needed there. The logic about when to add a change to the outputs must match exactly the conditions defined in `splitAdaSourceOutputs`.
module Tokenomia.TokenDistribution.Transfer ( distributionOutputs , transferTokenInParallel ) where import Control.Monad ( void ) import Control.Monad.Reader ( MonadIO, MonadReader, liftIO ) import Control.Monad.Except ( MonadError ) import Data.List.NonEmpty ( NonEmpty((:|)), (<...
b19e9965227eef4e4023150f4a3e4e81e2c89e067a4ebcc3924882addf6ff506
K1D77A/lisp-pay
token.lisp
(in-package #:lisp-pay/paypal) (defclass token () ((nonce :reader nonce :initarg :nonce :type string) (expires-in :reader expires-in :initarg :expires-in :type local-time:timestamp) (app-id :reader app-id :initarg :app-id :type (or null string)) (token-type :reader t...
null
https://raw.githubusercontent.com/K1D77A/lisp-pay/0098384f4a7440ce66130e5e491e033bf74dee1b/src/paypal/token.lisp
lisp
(in-package #:lisp-pay/paypal) (defclass token () ((nonce :reader nonce :initarg :nonce :type string) (expires-in :reader expires-in :initarg :expires-in :type local-time:timestamp) (app-id :reader app-id :initarg :app-id :type (or null string)) (token-type :reader t...
542883ed5d5615aa4b521100f01f0c17a0a4f120df2cc59b8341cbb341861bab
obsidiansystems/constraints-extras
Flip.hs
# LANGUAGE CPP # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # #if __GLASGOW_HASKELL__ >= 800 # LANGUAGE UndecidableSuperClasses # #endif module Data.Constraint.Flip ( FlipC ) where import Data.Constraint -- | Flip for constraints. class...
null
https://raw.githubusercontent.com/obsidiansystems/constraints-extras/8ed3f93e3ee38a2c233bb2079f50b3f4c9d5d3d5/src/Data/Constraint/Flip.hs
haskell
# LANGUAGE ConstraintKinds # | Flip for constraints.
# LANGUAGE CPP # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # #if __GLASGOW_HASKELL__ >= 800 # LANGUAGE UndecidableSuperClasses # #endif module Data.Constraint.Flip ( FlipC ) where import Data.Constraint class c h g => FlipC (c :: k -> k' -> Constraint) (g :: k') (h ::...
6849d483e2217c81fa12eb79dc0a5f365cc30cb036caa6c2fc675f58c373efb3
B-Lang-org/bsc
ARenameIO.hs
module ARenameIO( aRenameIO ) where import qualified Data.Map as M import ListUtil(mapFst) import FStringCompat(FString) import Flags(Flags) import ASyntax import BackendNamingConventions(createVerilogNameMap, xLateIdUsingFStringMap) import Util(fastNub) im...
null
https://raw.githubusercontent.com/B-Lang-org/bsc/bd141b505394edc5a4bdd3db442a9b0a8c101f0f/src/comp/ARenameIO.hs
haskell
============================== Function: aRenameIO rename pragmas. (It converts ASPackage references in such as the_fifo$DEQ.) Part of inlining registers is to drop the $Q_OUT from the register special handling is needed here. This is the submodule connection map names in state arg exprs remove duplicates be...
module ARenameIO( aRenameIO ) where import qualified Data.Map as M import ListUtil(mapFst) import FStringCompat(FString) import Flags(Flags) import ASyntax import BackendNamingConventions(createVerilogNameMap, xLateIdUsingFStringMap) import Util(fastNub) im...
102649a108872b1b68ef55a5e80616557f6d2bac9224b9adf295dad645d0f682
zoomhub/zoomhub
BaseURI.hs
module ZoomHub.Types.BaseURI ( BaseURI (BaseURI), unBaseURI, ) where import Data.Aeson (ToJSON, Value (String), toJSON) import qualified Data.Text as T import Network.URI (URI) newtype BaseURI = BaseURI {unBaseURI :: URI} deriving (Eq) instance Show BaseURI where show = show . unBaseURI instance ToJSON Ba...
null
https://raw.githubusercontent.com/zoomhub/zoomhub/3779709478d17a4c46762de1d5d3ae451437c087/src/ZoomHub/Types/BaseURI.hs
haskell
module ZoomHub.Types.BaseURI ( BaseURI (BaseURI), unBaseURI, ) where import Data.Aeson (ToJSON, Value (String), toJSON) import qualified Data.Text as T import Network.URI (URI) newtype BaseURI = BaseURI {unBaseURI :: URI} deriving (Eq) instance Show BaseURI where show = show . unBaseURI instance ToJSON Ba...
8e8b569a28fa82ae7808952aa0b5744d5584d7e6b823ab7d21c8f0dd8925a154
wadehennessey/wcl
translate.lisp
-*- Mode : Lisp ; Package : XLIB ; Syntax : COMMON - LISP ; ; Lowercase : YES -*- ;;; TEXAS INSTRUMENTS INCORPORATED ;;; P.O. BOX 2909 AUSTIN , TEXAS 78769 ;;; Copyright ( C ) 1987 Texas Instruments Incorporated . ;;; ;;; Permission is granted to any individual or institution to use, copy, mo...
null
https://raw.githubusercontent.com/wadehennessey/wcl/841316ffe06743d4c14b4ed70819bdb39158df6a/src/clx/translate.lisp
lisp
Package : XLIB ; Syntax : COMMON - LISP ; ; Lowercase : YES -*- P.O. BOX 2909 Permission is granted to any individual or institution to use, copy, modify, and distribute this software, provided that this complete copyright and permission notice is maintained, intact, in all copies and supporting document...
TEXAS INSTRUMENTS INCORPORATED AUSTIN , TEXAS 78769 Copyright ( C ) 1987 Texas Instruments Incorporated . Texas Instruments Incorporated provides this software " as is " without (in-package :xlib) Alist of ( name first - keysym last - keysym ) (defun define-keysym-set (set first-keysym last-ke...
632ba33e31345dd16b60231729005dc8367cddcebe475da9b5752485690825f5
hercules-ci/hercules-ci-agent
Raw.hs
# LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # module Hercules.CNix.Expr.Raw ( RawValue (..), mkRawValue, RawValueType (..), rawValueType, forceValue, canonicalRawType, ) where import Hercules.CNix.Expr.Context import qualified Language.C.Inline.Cpp as C import qualified Language.C.Inli...
null
https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/5d29ff1d8959d15180fb2a36620a50777dca28e3/hercules-ci-cnix-expr/src/Hercules/CNix/Expr/Raw.hs
haskell
| A heap object. Nix doesn't store all its objects on the heap, but we do. | Takes ownership of the value.
# LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # module Hercules.CNix.Expr.Raw ( RawValue (..), mkRawValue, RawValueType (..), rawValueType, forceValue, canonicalRawType, ) where import Hercules.CNix.Expr.Context import qualified Language.C.Inline.Cpp as C import qualified Language.C.Inli...
2af73f891933137807f9d44c7d81db23302481fb05bd9633b0856f819cba635b
amnh/PCG
Test.hs
------------------------------------------------------------------------------ -- | Module : Data . BitMatrix . Test Copyright : ( c ) 2015 - 2021 Ward Wheeler -- License : BSD-style -- -- Maintainer : -- Stability : provisional -- Portability : portable -- ---------------------------------...
null
https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/utility/test/Data/BitMatrix/Test.hs
haskell
---------------------------------------------------------------------------- | License : BSD-style Maintainer : Stability : provisional Portability : portable --------------------------------------------------------------------------- | Just to make sure that rows . fromRows == id. Strangely this ...
Module : Data . BitMatrix . Test Copyright : ( c ) 2015 - 2021 Ward Wheeler # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleInstances # module Data.BitMatrix.Test ( testSuite ) where import Control.DeepSeq import Control.Exception import Data.BitMatrix import Data.BitVector.LittleEndian imp...
ade6882461d179892c3553ce50e12803cb1e56dc13fecd555ed390f3e7c66ef4
GaloisInc/mistral
Name.hs
# LANGUAGE DeriveGeneric # module Mistral.ModuleSystem.Name where import Mistral.Utils.Panic ( panic ) import Mistral.Utils.Source ( NoSource(..) ) import Data.Function ( on ) import Data.List ( intercalate ) import Data.Serialize ( Serialize ) import Data.String ( IsString(fromString) ) import GHC.Generics ( Generi...
null
https://raw.githubusercontent.com/GaloisInc/mistral/3464ab332d73c608e64512e822fe2b8a619ec8f3/src/Mistral/ModuleSystem/Name.hs
haskell
Names ----------------------------------------------------------------------- ^ The typechecking pass ^ The code generation pass ^ The interpreter ^ The specialization pass ^ Names whose origin is a program ^ Names generated during compilation # INLINE (/=) # | Real names are ones that the compiler will use whe...
# LANGUAGE DeriveGeneric # module Mistral.ModuleSystem.Name where import Mistral.Utils.Panic ( panic ) import Mistral.Utils.Source ( NoSource(..) ) import Data.Function ( on ) import Data.List ( intercalate ) import Data.Serialize ( Serialize ) import Data.String ( IsString(fromString) ) import GHC.Generics ( Generi...
e2b9acd956345c5efb3d4e73b7656d8f4c0f9e95cbbd95271bc7f0347a605e8d
input-output-hk/marlowe-cardano
Client.hs
module Language.Marlowe.Runtime.Client ( module Control.Monad.Trans.Marlowe , module Control.Monad.Trans.Marlowe.Class , connectToMarloweRuntime ) where import Control.Monad.Trans.Marlowe import Control.Monad.Trans.Marlowe.Class import Language.Marlowe.Protocol.Client (marloweClientPeer) import Network.Protoco...
null
https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/16d1e16b0aac74e63f090fca4fc1a40104b7b573/marlowe-client/src/Language/Marlowe/Runtime/Client.hs
haskell
module Language.Marlowe.Runtime.Client ( module Control.Monad.Trans.Marlowe , module Control.Monad.Trans.Marlowe.Class , connectToMarloweRuntime ) where import Control.Monad.Trans.Marlowe import Control.Monad.Trans.Marlowe.Class import Language.Marlowe.Protocol.Client (marloweClientPeer) import Network.Protoco...
134cc0ef830de0a41bb56466460b9f47a0129c6053c7400db2993925c805157a
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
AccountPaymentsSettings.hs
{-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} | Contains the types generated from the schema module StripeAPI.Types.AccountPaymentsSettings where import qualified Cont...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/AccountPaymentsSettings.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | statement_descriptor: The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic \`statement_descriptor\` specified on the charge. Constraints: Constraints: Constraints: Constraints: Constraints: ...
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . | Contains the types generated from the schema module StripeAPI.Types.AccountPaymentsSettings where import qualified Control.Monad.Fail import qualified Data.Aeson import qualified Dat...
fa2a7a249db1a442bc03684cb06d34b5f1ef7965e0f450ae03e31080c13e2bde
jimcrayne/jhc
Ord.hs
module Deriving.Ord(deriveEq,deriveOrd,deriveBounded) where import Deriving.Type import Deriving.Util import FrontEnd.HsSyn import FrontEnd.Syn.Q import Name.Names import Util.Std deriveEq :: Derive -> Module -> Data -> Q HsDecl deriveEq der@Derive { deriveSrcLoc = hsMatchSrcLoc } mod d@D{ .. } = do t <- lift Tru...
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/src/Deriving/Ord.hs
haskell
module Deriving.Ord(deriveEq,deriveOrd,deriveBounded) where import Deriving.Type import Deriving.Util import FrontEnd.HsSyn import FrontEnd.Syn.Q import Name.Names import Util.Std deriveEq :: Derive -> Module -> Data -> Q HsDecl deriveEq der@Derive { deriveSrcLoc = hsMatchSrcLoc } mod d@D{ .. } = do t <- lift Tru...
3d481aed99341f26d60ad7dfc749b5fb5178b2ef03fa75100eb8e1a3a40a190a
SimulaVR/godot-haskell
Player.hs
module Game.Player where import Control.Lens import Control.Monad import Godot import Godot.Core.AnimatedSprite as AnimatedSprite import Godot.Core.CanvasItem as CanvasItem import Godot.Core.CollisionShape2D as CollisionShape2D import Godot.Core.Input as Input import Godot.Core.Node2D as Node2D import Godot.Core.Object...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/examples/dodge-the-creeps/src/Game/Player.hs
haskell
Player disappears after being hit. official demo sets flip_v to false but this is better
module Game.Player where import Control.Lens import Control.Monad import Godot import Godot.Core.AnimatedSprite as AnimatedSprite import Godot.Core.CanvasItem as CanvasItem import Godot.Core.CollisionShape2D as CollisionShape2D import Godot.Core.Input as Input import Godot.Core.Node2D as Node2D import Godot.Core.Object...
c0afab269b76925d5f8c0085a9d424b80b9d18c47fa30b2e4793cac8c85b42f1
deverl-ide/deverl
deverl_dialyzer.erl
%% ===================================================================== %% This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or %% (at your option) any later vers...
null
https://raw.githubusercontent.com/deverl-ide/deverl/69216c7720ce2a32344711f5526c0eb9676bcae0/deverl/src/deverl_dialyzer.erl
erlang
===================================================================== This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTAB...
it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License @author < > @author < > , 2014 @doc A library of functions for managing . -module(deverl_d...
9a6b364c140a424662d96efb6222374ff9641ac7669f5ab9c6a6a274bf4c2f28
ComputeSoftware/dev-local-tu
core.clj
(ns dev-local-tu.core (:require [clojure.string :as str] [datomic.client.api :as d] [datomic.dev-local] [clojure.java.io :as io] [dev-local-tu.internal.impl :as impl]) (:import (java.io Closeable File))) (defn gen-name! [prefix] (str prefix "-" (impl/rand-str! 7))) (def default-datomic-dev...
null
https://raw.githubusercontent.com/ComputeSoftware/dev-local-tu/63a6c2bfa5f53b81f06194953000352243601a18/src/dev_local_tu/core.clj
clojure
-local.html#release-db
(ns dev-local-tu.core (:require [clojure.string :as str] [datomic.client.api :as d] [datomic.dev-local] [clojure.java.io :as io] [dev-local-tu.internal.impl :as impl]) (:import (java.io Closeable File))) (defn gen-name! [prefix] (str prefix "-" (impl/rand-str! 7))) (def default-datomic-dev...
8704baf9a10f1033b16a728ad7eaad3c9c417718dbc176dfea5fcaba4c6f835d
leonardb/mnesia_fdb
mnesia_fdb_proper_semantics_test.erl
%%---------------------------------------------------------------- Copyright ( c ) 2013 - 2016 Klarna AB %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the License at %% %% ...
null
https://raw.githubusercontent.com/leonardb/mnesia_fdb/d94f89d67453cc2edb2053ae0799e424006d6e2f/test/mnesia_fdb_proper_semantics_test.erl
erlang
---------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissions an...
Copyright ( c ) 2013 - 2016 Klarna AB This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY @doc Verify dirty vs transaction seman...
79dc62613821dbac2bcb0e830c286bcd98f33bf4c298f45917d417a31813b652
manuel-serrano/bigloo
parse_args.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / cigloo / Init / parse - args.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/cigloo/Init/parse_args.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * Command-line parsing */ *===========================...
* serrano / prgm / project / bigloo / cigloo / Init / parse - args.scm * / * Author : * / * Creation : Thu Jun 29 11:56:20 1995 * / * Last change : Sun Dec 30 09:05:07 2007 ( serrano ) * / (module...
fb0f32526c61b86966c20c94296ba4af356762417f64d862ed42cb2a2729630b
mfoemmel/erlang-otp
megaco_sup.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2001 - 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/megaco/src/engine/megaco_sup.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2001 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " Purpose : The top supervisor for the Meg...
7b972457747fb9ea94060564f06c84a6672482e4f78f7ced0260454a7bc5a757
SamirTalwar/advent-of-code
AOC_09_1.hs
{-# OPTIONS -Wall #-} import Helpers.Grid (Grid, (!)) import qualified Helpers.Grid as Grid main :: IO () main = do heightMap <- Grid.fromDigits <$> getContents let lowestPoints = findLowestPoints heightMap print $ sum $ map succ lowestPoints findLowestPoints :: Grid Int -> [Int] findLowestPoints heightMap = ...
null
https://raw.githubusercontent.com/SamirTalwar/advent-of-code/3d37193f9a8cd506150f457900308e5132e92902/2021/AOC_09_1.hs
haskell
# OPTIONS -Wall #
import Helpers.Grid (Grid, (!)) import qualified Helpers.Grid as Grid main :: IO () main = do heightMap <- Grid.fromDigits <$> getContents let lowestPoints = findLowestPoints heightMap print $ sum $ map succ lowestPoints findLowestPoints :: Grid Int -> [Int] findLowestPoints heightMap = [ heightMap ! points ...
cefe9c2c9d305fe3019e8e25140ae5e474d6f0d5f3982f7dbad1a1b70711b55b
brianium/clean-todos
use_case.clj
(ns todos.core.use-case (:require [todos.core.entity :as entity] [todos.core.action :as action])) (defn result->action "Creates an action for the result of creating a new todo" [type result] (let [payload { :result result }] (if (entity/storage-error? result) (action/make-error type payl...
null
https://raw.githubusercontent.com/brianium/clean-todos/fca2320fe3bca052787c4ace479ce69d23d58a12/src/todos/core/use_case.clj
clojure
(ns todos.core.use-case (:require [todos.core.entity :as entity] [todos.core.action :as action])) (defn result->action "Creates an action for the result of creating a new todo" [type result] (let [payload { :result result }] (if (entity/storage-error? result) (action/make-error type payl...
538b0e3dae423928da104ca90ce080b07b2b5e6f97c08fb03633a3091b246f6f
emqx/emqx
emqx_mountpoint_SUITE.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2018 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/test/emqx_mountpoint_SUITE.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2018 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_mountpoint_SUITE). -compile(export_all). -compile(nowarn_export_all). -import( ...
c8bda39d2da41ee499e2cf6eb2b9007d963469611cba5bd8b3b2178ab045318e
droopp/drop-core
node_watch_app.erl
-module(node_watch_app). -behaviour(application). -export([start/2]). -export([stop/1]). start(_Type, _Args) -> node_watch_sup:start_link(). stop(_State) -> ok.
null
https://raw.githubusercontent.com/droopp/drop-core/9bb5ee05815ff73b2081967e5d804c0c432547d7/apps/node_watch/src/node_watch_app.erl
erlang
-module(node_watch_app). -behaviour(application). -export([start/2]). -export([stop/1]). start(_Type, _Args) -> node_watch_sup:start_link(). stop(_State) -> ok.
07bd0a5e4bd0fdb8209715c8cc3fb4750b58d3021707e14e4eebb72510f8cede
m4b/rdr
MachLoadCommandMacro.ml
open MachLoadCommandTypes open Binary let lc_count = 43 let get_load_command binary offset :load_command = let cmd,o = Binary.u32o binary offset in let cmdsize = Binary.u32 binary o in {cmd;cmdsize;} let get_section binary offset :section = let sectname,o = Binary.stringo binary offset ~num_bytes:16 in le...
null
https://raw.githubusercontent.com/m4b/rdr/2bf1f73fc317cd74f8c7cacd542889df729bd003/lib/mach/MachLoadCommandMacro.ml
ocaml
open MachLoadCommandTypes open Binary let lc_count = 43 let get_load_command binary offset :load_command = let cmd,o = Binary.u32o binary offset in let cmdsize = Binary.u32 binary o in {cmd;cmdsize;} let get_section binary offset :section = let sectname,o = Binary.stringo binary offset ~num_bytes:16 in le...
2a0c3cca34ca39e2db7be1d043e966bd679226c7dbde09dce18d05f40a189bd4
fetburner/Coq2SML
glob_termops.ml
open Pp open Glob_term open Util open Names (* Ocaml 3.06 Map.S does not handle is_empty *) let idmap_is_empty m = m = Idmap.empty (* Some basic functions to rebuild glob_constr In each of them the location is Util.dummy_loc *) let mkGRef ref = GRef(dummy_loc,ref) let mkGVar id = GVar(dummy_loc,id) let mkGApp(rt...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/plugins/funind/glob_termops.ml
ocaml
Ocaml 3.06 Map.S does not handle is_empty Some basic functions to rebuild glob_constr In each of them the location is Util.dummy_loc msgnl (str "glob_decompose_app on : "++ Printer.pr_glob_constr rt); [glob_make_eq t1 t2] build the glob_constr corresponding to [t2 = t1] [glob_make_neq t1 t2] build th...
open Pp open Glob_term open Util open Names let idmap_is_empty m = m = Idmap.empty let mkGRef ref = GRef(dummy_loc,ref) let mkGVar id = GVar(dummy_loc,id) let mkGApp(rt,rtl) = GApp(dummy_loc,rt,rtl) let mkGLambda(n,t,b) = GLambda(dummy_loc,n,Explicit,t,b) let mkGProd(n,t,b) = GProd(dummy_loc,n,Explicit,t,b) let mkGLet...
748fd810a2c230610972be38688693d60f3804ff4fa12ac402345630d0e0e337
AdaCore/why3
gnat_config.ml
open Why3 open Wstdlib open Whyconf type proof_mode = Progressive | No_WP | All_Split | Per_Path | Per_Check let builtin_provers = ["altergo"; "cvc4"; "z3"] let is_builtin_prover = let builtin_provers_set = List.fold_left (fun acc x -> Sstr.add x acc) Sstr.empty builtin_provers in (fun s -> l...
null
https://raw.githubusercontent.com/AdaCore/why3/be7e855fa7f773674ed7d9e438a05c6e44511b4c/src/gnat/gnat_config.ml
ocaml
this is a string list of the requested provers by the user sanitize list to rewrite alt-ergo into altergo the prover for counterexample generation Depending on what kinds of provers are requested, environment loading is a * bit different, hence we do this all together here now load the configuration of Why3 ...
open Why3 open Wstdlib open Whyconf type proof_mode = Progressive | No_WP | All_Split | Per_Path | Per_Check let builtin_provers = ["altergo"; "cvc4"; "z3"] let is_builtin_prover = let builtin_provers_set = List.fold_left (fun acc x -> Sstr.add x acc) Sstr.empty builtin_provers in (fun s -> l...
93bc4fd4ce964ad2f73d81d4772de6fed9a73f0ad05cc9a8fe38786ba8a997f4
slyrus/mcclim-old
cairo.lisp
;;; -*- Mode: Lisp; -*- ( c ) copyright 2005 by < > ( c ) copyright 2006 ( ) ;;; 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 ;;; with...
null
https://raw.githubusercontent.com/slyrus/mcclim-old/354cdf73c1a4c70e619ccd7d390cb2f416b21c1a/Backends/gtkairo/cairo.lisp
lisp
-*- Mode: Lisp; -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the without limitation the rights to use, copy, modify, merge, publish, the following conditions: The above copyright notice and this permission notice shall...
( c ) copyright 2005 by < > ( c ) copyright 2006 ( ) " Software " ) , to deal in the Software without restriction , including distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , subject to included in all copies or s...
7bed3fa5a08a42aa10779661a410807d8706747c986947284140dad8db9a88f1
sol/tinc
SourceDependencySpec.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # # LANGUAGE LambdaCase # # OPTIONS_GHC -fno - warn - incomplete - patterns # module Tinc.SourceDependencySpec (spec, anyVersion) where import Helper import qualified Hpack.Config as Hpack import Data.Tree import Data.Version imp...
null
https://raw.githubusercontent.com/sol/tinc/427df659df20d548bbe4c7bd0ea76cc13de40238/test/Tinc/SourceDependencySpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TupleSections # # LANGUAGE LambdaCase # # OPTIONS_GHC -fno - warn - incomplete - patterns # module Tinc.SourceDependencySpec (spec, anyVersion) where import Helper import qualified Hpack.Config as Hpack import Data.Tree import Data.Version import System.Directory impo...
4416c83ba18126f1aad602d6c1b78e881958ab343c10d74e18c1c4c24e1966b4
fourmolu/fourmolu
associated-types1-four-out.hs
# LANGUAGE TypeFamilies # class Foo a where type FooBar a -- | Something. class Bar a where -- | Bar bar type BarBar a -- | Bar baz type BarBaz a
null
https://raw.githubusercontent.com/fourmolu/fourmolu/1f8903a92c8d5001dc1ec8ecfd4a04a3b61c3283/data/examples/declaration/class/associated-types1-four-out.hs
haskell
| Something. | Bar bar | Bar baz
# LANGUAGE TypeFamilies # class Foo a where type FooBar a class Bar a where type BarBar a type BarBaz a
99d5551b096aaf94838fb90198a2fec722fa877c9a29e97f21043348c67c5419
acl2/acl2
non-trivial-formals-and-args.lisp
; Finding lambda formals that are not bound to themselves, and their args. ; Copyright ( C ) 2008 - 2011 and Stanford University Copyright ( C ) 2013 - 2023 Kestrel Institute ; License : A 3 - clause BSD license . See the file books/3BSD - mod.txt . ; Author : ( ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/acl2/acl2/4a7cd3dee752dfbf8e390f67de6a1d2e6f604f7e/books/kestrel/terms-light/non-trivial-formals-and-args.lisp
lisp
Finding lambda formals that are not bound to themselves, and their args. Returns (mv non-trivial-formals non-trivial-args). often, but not necessarily, pseudo-terms skip since trivial:
Copyright ( C ) 2008 - 2011 and Stanford University Copyright ( C ) 2013 - 2023 Kestrel Institute License : A 3 - clause BSD license . See the file books/3BSD - mod.txt . Author : ( ) (in-package "ACL2") Finds the members of FORMALS that do n't correspond to themselves in the ARGS . (defund non-trivia...
e1867bcb89fb89c0ace87dc69fd1be806abd2819b3f5daf936d602d78859e666
yetanalytics/pedestal-oidc
jwt.clj
(ns com.yetanalytics.pedestal-oidc.jwt (:require [clojure.spec.alpha :as s] [cheshire.core :as json] [clojure.java.io :as io] [buddy.core.keys :as bkeys] [buddy.sign.jwt :as jwt])) (s/def ::kid string?) (s/def ::keyset (s/or :map (s/map-of ::kid ...
null
https://raw.githubusercontent.com/yetanalytics/pedestal-oidc/e2294fc84dafca8300a7ab102e4d5841aa3f477b/src/lib/com/yetanalytics/pedestal_oidc/jwt.clj
clojure
(ns com.yetanalytics.pedestal-oidc.jwt (:require [clojure.spec.alpha :as s] [cheshire.core :as json] [clojure.java.io :as io] [buddy.core.keys :as bkeys] [buddy.sign.jwt :as jwt])) (s/def ::kid string?) (s/def ::keyset (s/or :map (s/map-of ::kid ...
c210b6029b7077f5dbbddf969e570423b27644f7ccc771db5564d8d9186d7d80
JacquesCarette/Drasil
Symbols.hs
module Drasil.GlassBR.Symbols where import Language.Drasil (QuantityDict, qw) import Language.Drasil.Code (Mod(Mod), asVC) import Drasil.GlassBR.IMods (iMods) import Drasil.GlassBR.ModuleDefs (allMods, implVars) import Drasil.GlassBR.Unitals (inputDataConstraints, inputs, outputs, specParamVals, symbols, symbolsWi...
null
https://raw.githubusercontent.com/JacquesCarette/Drasil/560ab2a9a4369430297eb1ec326a2da6f33458af/code/drasil-example/glassbr/lib/Drasil/GlassBR/Symbols.hs
haskell
include all module functions as symbols
module Drasil.GlassBR.Symbols where import Language.Drasil (QuantityDict, qw) import Language.Drasil.Code (Mod(Mod), asVC) import Drasil.GlassBR.IMods (iMods) import Drasil.GlassBR.ModuleDefs (allMods, implVars) import Drasil.GlassBR.Unitals (inputDataConstraints, inputs, outputs, specParamVals, symbols, symbolsWi...
601d3a75d7f99adbc6d8b6f76f621901990887ef90a9846be53e48e894200c84
glguy/ssh-hans
State.hs
-- | State data for one client - server pair , and many related types . {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE BangPatterns #-} module Network.SSH.State where import Network.SSH.Ciphers import Network.SSH.Mac import Network.SSH.Messages import ...
null
https://raw.githubusercontent.com/glguy/ssh-hans/25d05366d4655eb249bfb13f9a6d473b49885bd9/src/Network/SSH/State.hs
haskell
| # LANGUAGE OverloadedStrings # # LANGUAGE BangPatterns # -------------------------------------------------------------- Logging. available. | Safe console logger. | Replace control chars to avoid terminal attacks. The SSH RFCs suggest that terminal output be sanitized. Server Internals -----------------------...
State data for one client - server pair , and many related types . # LANGUAGE RecordWildCards # module Network.SSH.State where import Network.SSH.Ciphers import Network.SSH.Mac import Network.SSH.Messages import Network.SSH.Named import Network.SSH.Packet import ...
c858608f302b95fe072f57dfb1f36c26e1863aa8e41182f7a104777217187bfe
GrammaTech/sel
multi-objective.lisp
;;; multi-objective.lisp --- Multi-objective selection using Pareto dominance. ;;; ;;; Fitness values should be a list of numeric or vector (lexicase) ;;; scores, where each element represents a single objective. All ;;; fitness values in the same population must be the same length and ;;; have their scores in the same...
null
https://raw.githubusercontent.com/GrammaTech/sel/a4238945dfbf98b67b9d8a10b08924634544f9f8/components/multi-objective.lisp
lisp
multi-objective.lisp --- Multi-objective selection using Pareto dominance. Fitness values should be a list of numeric or vector (lexicase) scores, where each element represents a single objective. All fitness values in the same population must be the same length and have their scores in the same order. Some tri...
(defpackage :software-evolution-library/components/multi-objective (:nicknames :sel/components/multi-objective :sel/cp/multi-objective) (:use :gt/full :metabang-bind :software-evolution-library :software-evolution-library/components/lexicase) (:export :pareto-selector :*pareto-c...
50a7fb72f5e89bf118dc8bd82cecd0d90e1615cc4c86fdd56028d58d29f9cca7
RedPRL/algaett
Quantifier.ml
open RuleKit type rule = name:Yuujinchou.Trie.path option -> cbase:T.check -> cfam:T.check T.binder -> (S.t -> S.t -> S.t) -> T.check let auxiliary ~name ~cbase ~cbase_sort ~cfam builder : T.check = T.Check.rule @@ fun goal -> match goal.tp with | D.Univ _ -> let base = T.Check.run {tp = cbase_sor...
null
https://raw.githubusercontent.com/RedPRL/algaett/5685e49608aaf230f5691f3e339cd2bd3acb6ec9/src/refiner/rules/Quantifier.ml
ocaml
open RuleKit type rule = name:Yuujinchou.Trie.path option -> cbase:T.check -> cfam:T.check T.binder -> (S.t -> S.t -> S.t) -> T.check let auxiliary ~name ~cbase ~cbase_sort ~cfam builder : T.check = T.Check.rule @@ fun goal -> match goal.tp with | D.Univ _ -> let base = T.Check.run {tp = cbase_sor...
0c2b48762b7b999aaee1194d44a2c180258b08ca2c7c2ccec496f61f86a462cf
benoitc/hackney_disp
hackney_disp.erl
%%% -*- erlang -*- %%% This file is part of hackney_disp released under the Apache 2 license . %%% See the NOTICE for more information. %%% Copyright ( c ) 2012 , under the BSD license %%% %%% @doc Dispatcher for hackney using dispcount. Starts pools and %%% handles checkin/checkout. The user shouldn't have to...
null
https://raw.githubusercontent.com/benoitc/hackney_disp/04cc6c032d86a21d25340989c46d9595002582d3/src/hackney_disp.erl
erlang
-*- erlang -*- See the NOTICE for more information. @doc Dispatcher for hackney using dispcount. Starts pools and handles checkin/checkout. The user shouldn't have to touch this module. @end @todo: find a way to get rid of inactive pools. idea: each load balancer has an associated series of counters in a...
This file is part of hackney_disp released under the Apache 2 license . Copyright ( c ) 2012 , under the BSD license table : one for checkin , one for checkout , and one timestamp . -module(hackney_disp). -behaviour(hackney_pool_handler). -export([start/0, checkout/4, checkin/1, che...
ccdc41cf03f6d937b80bfd8e852b0424370419686a7a7eac1793960d7029abe8
morpheusgraphql/morpheus-graphql
API.hs
module Domains.API ( domainsApp, ) where import Data.Data (Typeable) import Data.Morpheus (App) import Data.Semigroup ((<>)) import qualified Domains.Posts.Resolver as P import qualified Domains.Users.Resolver as U import Namespaces.API () import Operation.API () import Prelude (Monad) domainsApp :: (Typeable m, ...
null
https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/1d3ab7e3bc723e29ef8bd2a0c818a03ae82ce8ad/examples/code-gen/src/Domains/API.hs
haskell
module Domains.API ( domainsApp, ) where import Data.Data (Typeable) import Data.Morpheus (App) import Data.Semigroup ((<>)) import qualified Domains.Posts.Resolver as P import qualified Domains.Users.Resolver as U import Namespaces.API () import Operation.API () import Prelude (Monad) domainsApp :: (Typeable m, ...
e2a9cbc7e5c01e43d47c3235669d3ab93a9223ed74c49e86c0441495d8c2c158
Happy0/wordify
Properties.hs
module Tests.Properties ( tests ) where import Test.Framework (Test, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import Tests.PosTest import Tests.LetterBagTest import Tests.BoardTest tests :: Test tests = testGroup "Properties" [ testGroup "Positions" [ ...
null
https://raw.githubusercontent.com/Happy0/wordify/70704824ae6829c518ab24875ba6b98ebf5db158/test/Tests/Properties.hs
haskell
module Tests.Properties ( tests ) where import Test.Framework (Test, testGroup) import Test.Framework.Providers.QuickCheck2 (testProperty) import Tests.PosTest import Tests.LetterBagTest import Tests.BoardTest tests :: Test tests = testGroup "Properties" [ testGroup "Positions" [ ...
96b402af054bb99d429e37ab4ed7b49820a4ac86da0484a3a31512d7e1a92986
spectrum-finance/cardano-dex-backend
UnliftIO.hs
# LANGUAGE TypeOperators # module Spectrum.Prelude.UnliftIO ( UnliftIO ) where import RIO ( IO ) import Spectrum.Prelude.HigherKind ( type (~>) ) type UnliftIO m = m ~> IO
null
https://raw.githubusercontent.com/spectrum-finance/cardano-dex-backend/e3a99b8a7f0edcadc6a777a7379c67d6dfa705a1/spectrum-prelude/src/Spectrum/Prelude/UnliftIO.hs
haskell
# LANGUAGE TypeOperators # module Spectrum.Prelude.UnliftIO ( UnliftIO ) where import RIO ( IO ) import Spectrum.Prelude.HigherKind ( type (~>) ) type UnliftIO m = m ~> IO
7f66bd110d2822b56167abe39981460d928ebcc36c6aa22edf0523287204f970
arcfide/oleg
validate-doctype-simple.scm
; SSAX parsing with limited XML doctype validation ; and datatype conversion ; ; XML Schema introduces a number of atomic XML datatypes and the corresponding validation rules . SXML likewise supports boolean , numerical , and other Scheme values [ 1 ] in the " character " content of SXML elements and attribute...
null
https://raw.githubusercontent.com/arcfide/oleg/c6826870436925fd4c873c01d7fcc24a7a7f95dc/ssax/examples/validate-doctype-simple.scm
scheme
SSAX parsing with limited XML doctype validation and datatype conversion XML Schema introduces a number of atomic XML datatypes and the validate and de-serialize character data from the source XML document into the corresponding numerical etc. Scheme values. The present code shows an example of such datatype ...
corresponding validation rules . SXML likewise supports boolean , numerical , and other Scheme values [ 1 ] in the " character " content of SXML elements and attributes . As we parse the document , we can changes from ssax : xml->sxml concern procedures UNDECL - ROOT , structural XML fragments . [ 1 ] One m...
a03c862543c68b751eaaec724f9da751192aaee20c79434ca6b2dd9d8e58cef1
WorksHub/client
section_company.cljs
(ns wh.profile.section-company (:require [re-frame.core :refer [dispatch]] [wh.company.applications.views :refer [get-in-touch-overlay]] [wh.components.common :refer [link]] [wh.logged-in.profile.components :as components] [wh.profile.db :as profile] [wh.pro...
null
https://raw.githubusercontent.com/WorksHub/client/fb17d9b33b348dd85090533ef2b7e9c563a0a2c6/client/src/wh/profile/section_company.cljs
clojure
if we want to put CV preview toggle back
(ns wh.profile.section-company (:require [re-frame.core :refer [dispatch]] [wh.company.applications.views :refer [get-in-touch-overlay]] [wh.components.common :refer [link]] [wh.logged-in.profile.components :as components] [wh.profile.db :as profile] [wh.pro...
aad837572432df0d625425c0314446c891809846118aaf77bb5fab11a55c251a
yzhs/ocamlllvm
scheduling.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) , projet ...
null
https://raw.githubusercontent.com/yzhs/ocamlllvm/45cbf449d81f2ef9d234968e49a4305aaa39ace2/src/asmcomp/sparc/scheduling.ml
ocaml
********************************************************************* Objective Caml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . $ I d : scheduling.ml 9547 2010 - 01 ...
93d61ac7d2078e651d7b4905f825bbed6acb5233b777dffd9fc72c0a3aab33e7
deech/fltkhs-demos
howto-drag-and-drop.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import qualified Graphics.UI.FLTK.LowLevel.FL as FL import Graphics.UI.FLTK.LowLevel.Fl_Types import Graphics.UI.FLTK.LowLevel.Fl_Enumerations import Graphics.UI.FLTK.LowLevel.FLTKHS import Data.IORef import qualified Data.Text as T import Control.Monad senderHandle...
null
https://raw.githubusercontent.com/deech/fltkhs-demos/64ed6dfd281d309535ea94d6396c0260395b37d0/src/Examples/howto-drag-and-drop.hs
haskell
# LANGUAGE OverloadedStrings # do 'copy/dnd' when someone clicks on box return (Right ()) for these events to 'accept' dnd handle actual drop (paste) operation
module Main where import qualified Graphics.UI.FLTK.LowLevel.FL as FL import Graphics.UI.FLTK.LowLevel.Fl_Types import Graphics.UI.FLTK.LowLevel.Fl_Enumerations import Graphics.UI.FLTK.LowLevel.FLTKHS import Data.IORef import qualified Data.Text as T import Control.Monad senderHandler :: Ref Box -> Event -> IO (Either...
9f0af62e1b940abe53458ca4cdcf75a7853c447a744658699465361de3097858
robert-strandh/Clump
rotation.lisp
(cl:in-package #:clump-binary-tree) (defgeneric rotate-left (tree)) (defgeneric rotate-right (tree)) (defmethod rotate-left (tree) (error 'invalid-binary-tree :tree tree)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Generic function ROTATE - LEFT - WITH - CHILD . ;;; Given a NOD...
null
https://raw.githubusercontent.com/robert-strandh/Clump/1ea4dbac1cb86713acff9ae58727dd187d21048a/Binary-tree/rotation.lisp
lisp
This function should not be called directly by client code. It is called by the function ROTATE-LEFT when that function is called right child. Client code can define methods on this generic function. Such methods may be specialized to strict subclasses of either When ROTATE-LEFT-WITH-CHILD is called from ...
(cl:in-package #:clump-binary-tree) (defgeneric rotate-left (tree)) (defgeneric rotate-right (tree)) (defmethod rotate-left (tree) (error 'invalid-binary-tree :tree tree)) Generic function ROTATE - LEFT - WITH - CHILD . Given a NODE and the right CHILD of that node , rotate left so that CHILD becomes the ro...
37810d37810c0affe729ec91cf0e4317c3e256ad5302b0e6bf19287932295aeb
oxidizing/sihl
jwt_postgresql.ml
let services = [ Sihl.Database.register () ; Sihl.Database.Migration.PostgreSql.register [] ; Sihl_token.JwtPostgreSql.register () ] ;; module Test = Token.Make (Sihl_token.JwtPostgreSql) let () = Sihl.Configuration.read_string "DATABASE_URL_TEST_POSTGRESQL" |> Option.value ~default:"postgres:password@127...
null
https://raw.githubusercontent.com/oxidizing/sihl/3f23bb9e6d163278e10bac719cd434194f50baaf/sihl-token/test/jwt_postgresql.ml
ocaml
let services = [ Sihl.Database.register () ; Sihl.Database.Migration.PostgreSql.register [] ; Sihl_token.JwtPostgreSql.register () ] ;; module Test = Token.Make (Sihl_token.JwtPostgreSql) let () = Sihl.Configuration.read_string "DATABASE_URL_TEST_POSTGRESQL" |> Option.value ~default:"postgres:password@127...
8d4616ee62ff6df7840ad8017788c906d5c9e4b309096759a320a6fd60948d5c
danlentz/clj-hangman
game.clj
(ns hangman.game (:refer-clojure :exclude []) (:require [clojure.pprint :as pp]) (:require [clojure.string :as str]) (:require [clojure.core.reducers :as r]) (:require [clojure.tools.logging :as log]) (:require [hangman.util :as util]) (:require [hangman.words :as words]) (:use [hangman.util :onl...
null
https://raw.githubusercontent.com/danlentz/clj-hangman/c7cfb84d772cf0dbb606b151f1728b4f7b7712b4/src/hangman/game.clj
clojure
"Guess the specified letter and update the game state accordingly returns the string representation of the current game state (which "Guess the specified word and update the game state accordingly. returns The string representation of the current game letters)" "return The score for the current g...
(ns hangman.game (:refer-clojure :exclude []) (:require [clojure.pprint :as pp]) (:require [clojure.string :as str]) (:require [clojure.core.reducers :as r]) (:require [clojure.tools.logging :as log]) (:require [hangman.util :as util]) (:require [hangman.words :as words]) (:use [hangman.util :onl...
434ad0cec6d4323530385c74c75780c71d6c24f6dd86e99221b01a2f195baa02
logseq/bb-tasks
util.clj
(ns logseq.bb-tasks.util "Misc util fns" (:require [clojure.edn :as edn])) (defn read-tasks-config "Read task configuration under :tasks/config of current bb.edn" [] (-> (System/getProperty "babashka.config") slurp edn/read-string :tasks/config))
null
https://raw.githubusercontent.com/logseq/bb-tasks/88736820d2b0daf44b45537331ee6177bb4626dd/src/logseq/bb_tasks/util.clj
clojure
(ns logseq.bb-tasks.util "Misc util fns" (:require [clojure.edn :as edn])) (defn read-tasks-config "Read task configuration under :tasks/config of current bb.edn" [] (-> (System/getProperty "babashka.config") slurp edn/read-string :tasks/config))
ce19f28ef82dbff5ae724a25435439fc8cf56e3ed7622c1e917d916054baef9c
ekmett/haskell
Spec.hs
{-# language OverloadedStrings #-} import Control.Concurrent import qualified Data.ByteString as BS import Data.Foldable import Data.Watch import Data.Watch.Directory import System.Directory import System.FilePath import Test.Hspec as Hspec import Test.Tasty import Test.Tasty.Hspec scratchDir :: FilePath scratchDir = ...
null
https://raw.githubusercontent.com/ekmett/haskell/37ad048531f5a3a13c6dfbf4772ee4325f0e4458/watch-directory/test/Spec.hs
haskell
# language OverloadedStrings #
import Control.Concurrent import qualified Data.ByteString as BS import Data.Foldable import Data.Watch import Data.Watch.Directory import System.Directory import System.FilePath import Test.Hspec as Hspec import Test.Tasty import Test.Tasty.Hspec scratchDir :: FilePath scratchDir = "test/scratch" emptyScratch :: IO ...
ad59551b0ef4b70b76c7ebbe8582816affb6cea8f2ed386bbf5b1dff44c9e2af
orionsbelt-battlegrounds/obb-rules
unit.cljc
(ns obb-rules.unit (:require [obb-rules.units.rain] [obb-rules.units.nova] [obb-rules.units.pretorian] [obb-rules.units.raptor] [obb-rules.units.worm] [obb-rules.units.eagle] [obb-rules.units.boozer] [obb-rules.units.doomer] ...
null
https://raw.githubusercontent.com/orionsbelt-battlegrounds/obb-rules/97fad6506eb81142f74f4722aca58b80d618bf45/src/obb_rules/unit.cljc
clojure
(ns obb-rules.unit (:require [obb-rules.units.rain] [obb-rules.units.nova] [obb-rules.units.pretorian] [obb-rules.units.raptor] [obb-rules.units.worm] [obb-rules.units.eagle] [obb-rules.units.boozer] [obb-rules.units.doomer] ...
41003cd86d29fb2eb687452f6d238f5cfb186ed1be8694057a37565b28013636
TristanCacqueray/haskell-butler
Butler.hs
module XStatic.Butler where import XStatic import XStatic.Htmx qualified as XStatic import XStatic.TH import XStatic.Tailwind qualified as XStatic logo :: XStaticFile logo = $(embedXStaticFile "data/haskell-butler-logo.svg"){xfPath = "/favicon.ico"} butlerWS :: XStaticFile butlerWS = $(embedXStaticFile "data/ws.js")...
null
https://raw.githubusercontent.com/TristanCacqueray/haskell-butler/69c4a9ae7e97454d5f293a68f1e0909e39781073/src/XStatic/Butler.hs
haskell
module XStatic.Butler where import XStatic import XStatic.Htmx qualified as XStatic import XStatic.TH import XStatic.Tailwind qualified as XStatic logo :: XStaticFile logo = $(embedXStaticFile "data/haskell-butler-logo.svg"){xfPath = "/favicon.ico"} butlerWS :: XStaticFile butlerWS = $(embedXStaticFile "data/ws.js")...
da8751043bb8013c5b89969a81fde272fb17dc0717e2a5b62d078f96ba5251e8
webyrd/tree-automata
main.rkt
#lang racket/base ; Note that the hash-procs we define for automaton and production are awful (constant), ; so these objects should not currently be used as keys in hash maps or in sets ; anywhere that performance is at all relevant. The equal? we define probably ; suffers in performance because of this, but ...
null
https://raw.githubusercontent.com/webyrd/tree-automata/77865d4c026b73c32c6d1d4fe3946b712f61466a/tree-automata/main.rkt
racket
Note that the hash-procs we define for automaton and production are awful (constant), so these objects should not currently be used as keys in hash maps or in sets anywhere that performance is at all relevant. The equal? we define probably suffers in performance because of this, but it's only used for test...
#lang racket/base (require (only-in racket/match match-let) (only-in racket/set list->set set) (only-in racket/list remove-duplicates) (for-syntax racket/base)) (provide define-automata make-unfold intersect! clear-caches! automaton-non-empty automaton-name) (module+ test (require rackunit)...
8eabebb4c1010cec77f7058133e0e94c105f12ee599f15d551210c7ec35c4f99
DavidAlphaFox/aiwx
ai_wx_menu.erl
-module(ai_wx_menu). -include_lib("aihttp/include/ai_url.hrl"). -include("priv/ai_wx_internal.hrl"). -export([create/2, retrieve/1, delete/1]). create(AccessToken, Menu) -> R = ai_url:parse(?MENU_CREATE_PATH), R0 = R#ai_url{ qs = [{<<"access_token">>,AccessToken}] }, URL = ai_url:build(R0),...
null
https://raw.githubusercontent.com/DavidAlphaFox/aiwx/c4817df8b8be5264b9ce93b0f20e6ae6947b5a35/src/ai_wx_menu.erl
erlang
-module(ai_wx_menu). -include_lib("aihttp/include/ai_url.hrl"). -include("priv/ai_wx_internal.hrl"). -export([create/2, retrieve/1, delete/1]). create(AccessToken, Menu) -> R = ai_url:parse(?MENU_CREATE_PATH), R0 = R#ai_url{ qs = [{<<"access_token">>,AccessToken}] }, URL = ai_url:build(R0),...
3e4056d65728c610dd99314e3ab53971f3f04cb989cb30f91c159a5b26c6bd5a
theodormoroianu/SecondYearCourses
HaskellChurchMonad_20210415161455.hs
module HaskellChurchMonad where A boolean is any way to choose between two alternatives newtype CBool t = CBool {cIf :: t -> t -> t} toBool :: CBool Bool -> Bool toBool b = cIf b True False The boolean constant true always chooses the first alternative cTrue :: CBool t cTrue = CBool $ \t f -> t The boolean consta...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurchMonad_20210415161455.hs
haskell
The boolean negation switches the alternatives The boolean conjunction can be built as a conditional The boolean disjunction can be built as a conditional a pair is a way to compute something based on the values contained within the pair. a function to be applied on the values, it will apply it on them. A natural nu...
module HaskellChurchMonad where A boolean is any way to choose between two alternatives newtype CBool t = CBool {cIf :: t -> t -> t} toBool :: CBool Bool -> Bool toBool b = cIf b True False The boolean constant true always chooses the first alternative cTrue :: CBool t cTrue = CBool $ \t f -> t The boolean consta...
e0a1405d8cfbb148f47fb075f4b789e1770475a8550dbb861adde456dfa4e09c
hammerlab/biokepi
somaticsniper.ml
open Biokepi_run_environment open Common module Remove = Workflow_utilities.Remove let default_prior_probability = 0.01 let default_theta = 0.85 module Configuration = struct type t = { name: string; prior_probability: float; theta: float } let to_json {name; prior_probability; theta}: Yojson.Bas...
null
https://raw.githubusercontent.com/hammerlab/biokepi/d64eb2c891b41bda3444445cd2adf4e3251725d4/src/bfx_tools/somaticsniper.ml
ocaml
open Biokepi_run_environment open Common module Remove = Workflow_utilities.Remove let default_prior_probability = 0.01 let default_theta = 0.85 module Configuration = struct type t = { name: string; prior_probability: float; theta: float } let to_json {name; prior_probability; theta}: Yojson.Bas...
aa40a01c54e09ee23a7ef0fe94a5cfd3ba933b506aef72141db1f18382c86e76
aaronlevin/haskell-shopify
Main.hs
module Main where main :: IO () main = putStrLn "Test"
null
https://raw.githubusercontent.com/aaronlevin/haskell-shopify/79be152dd7ba3a4d0561711ed9ccc4fd996a42ee/test/Main.hs
haskell
module Main where main :: IO () main = putStrLn "Test"
e17c71e047c23a4d03a06df351f0e2ec7765ae27d3e2c66eab832459f8b38143
degree9/enterprise
es6.clj
(ns degree9.es6 (:refer-clojure :exclude [class]) (:require [cljs.analyzer :as analyzer] [cljs.compiler :as compiler])) ;; Extends Analyzer Special Forms ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (alter-var-root #'analyzer/specials #(conj % 'js-class* 'js-method* 'js-super*)) ;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/degree9/enterprise/65737c347e513d0a0bf94f2d4374935c7270185d/src/degree9/es6.clj
clojure
Extends Analyzer Special Forms ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Native ES6 Class Super ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; Extends Analyzer Special Forms ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
(ns degree9.es6 (:refer-clojure :exclude [class]) (:require [cljs.analyzer :as analyzer] [cljs.compiler :as compiler])) (alter-var-root #'analyzer/specials #(conj % 'js-class* 'js-method* 'js-super*)) (defmacro ^:private js-super [] `('js* "super")) (defmacro super-as "Defines a scope where JavaS...
e11c7ee7cead26548380f1633c73d49e691d5a8e7419ad571f700e5b85f80704
haskell/time
Parse.hs
{-# LANGUAGE Safe #-} {-# OPTIONS -fno-warn-orphans #-} module Data.Time.Format.Parse ( -- * UNIX-style parsing parseTimeM, parseTimeMultipleM, parseTimeOrError, readSTime, readPTime, ParseTime (), -- * Locale module Data.Time.Format.Locale, ) where import Control.Applicative ((<...
null
https://raw.githubusercontent.com/haskell/time/d2df4dc522ffba56e3b6b8015b14e24401e8370c/lib/Data/Time/Format/Parse.hs
haskell
# LANGUAGE Safe # # OPTIONS -fno-warn-orphans # * UNIX-style parsing * Locale | Parses a time value given a format string. Case is not significant in the input string. Some variations in the input are accepted: [@%z@ @%Ez@] accepts any of @±HHMM@ or @±HH:MM@. and @%d@): | Accept leading and trailing whi...
module Data.Time.Format.Parse ( parseTimeM, parseTimeMultipleM, parseTimeOrError, readSTime, readPTime, ParseTime (), module Data.Time.Format.Locale, ) where import Control.Applicative ((<|>)) import Control.Monad.Fail import Data.Char import Data.Proxy import Data.Time.Calendar.Days imp...
a3ffc3e65259d1d3c2d2b932d61e752417f085236fd7b556f16a6900ef9caddd
samply/blaze
kv_spec.clj
(ns blaze.db.resource-store.kv-spec (:require [blaze.async.comp-spec]))
null
https://raw.githubusercontent.com/samply/blaze/e84c106b5ca235600c20ba74fe8a2295eb18f350/modules/db-resource-store/src/blaze/db/resource_store/kv_spec.clj
clojure
(ns blaze.db.resource-store.kv-spec (:require [blaze.async.comp-spec]))
b4aa43bc2f48aa57a048389c47268a88d5c08e268aac21f06798d5aa4197c948
aoh/led
input.scm
;;; ;;; Terminal Input ;;; ; ; Terminal input is handled by 'input-terminal thread, which only sends terminal ; input events to a specific target thread, which is usually the UI thread. This ; way blocking happens automatically within the input thread, and the rest can deal ; with asynchronous message passing as usual....
null
https://raw.githubusercontent.com/aoh/led/7eea766901a1843a1b4ec48261ca29391bf7733c/led/input.scm
scheme
Terminal Input Terminal input is handled by 'input-terminal thread, which only sends terminal input events to a specific target thread, which is usually the UI thread. This way blocking happens automatically within the input thread, and the rest can deal with asynchronous message passing as usual. (log "input ...
(define-library (led input) (import (owl toplevel) (led log) (owl terminal)) (export start-input-terminal) (begin (define (input-terminal input target) (lfold (λ (_ thing) (mail target thing)) 'unused input)) ...
29962490a0265984f84cb724659f2ab4dd3abab98aeb7f0745cb3301cabe60ee
alpmestan/statistics-linreg
linreg.hs
import Statistics.LinearRegression import Statistics.Sample import qualified Data.Vector.Unboxed as U import Control.Monad.Random import Control.Monad import Control.Applicative import System.Random.MWC import System.Random.MWC.Distributions import qualified Data.Packed.Vector as V import Graphics.Rendering.Plot main ...
null
https://raw.githubusercontent.com/alpmestan/statistics-linreg/14c2f10088d1914b0303c191ec0d7243c8eb83ee/tests/linreg.hs
haskell
simple
import Statistics.LinearRegression import Statistics.Sample import qualified Data.Vector.Unboxed as U import Control.Monad.Random import Control.Monad import Control.Applicative import System.Random.MWC import System.Random.MWC.Distributions import qualified Data.Packed.Vector as V import Graphics.Rendering.Plot main ...
96fd03d58a4ad3a9ab1b91c1c0e3b894a63ac9d6c79d1211073c4ade1e91c55a
Decentralized-Pictures/T4L3NT
receipt_repr.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > Copyright ( c...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_protocol/receipt_repr.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > Copyright ( c ) 2020 Metastate AG < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " ,...
da028b863485dacb73c396a83750a1b01fa57e208581c4f4876c50b30e3161c4
autolwe/autolwe
Assumption.mli
(* * Decisional and computational assumptions. *) (* ** Imports *) open Abbrevs open Util open Syms open Expr open Game (* ** Decisional assumptions * ----------------------------------------------------------------------- *) type assm_dec_orcls = OrclSym.t * VarSym.t list * (obody * obody) * counter (* advers...
null
https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Core/Assumption.mli
ocaml
* Decisional and computational assumptions. ** Imports ** Decisional assumptions * ----------------------------------------------------------------------- adversary calls, same asym and returned variables, argument and oracle on left and right name of assumption information-theoretic assumption ...
open Abbrevs open Util open Syms open Expr open Game type assm_dec_orcls = OrclSym.t * VarSym.t list * (obody * obody) * counter type assm_dec_adv_call = { ad_ac_sym : AdvSym.t; ad_ac_lv : VarSym.t list; ad_ac_args : expr * expr; ad_ac_orcls : assm_dec_orcls list; } type assm_dec = { ...
999a0ef088ccc758d96820292bc487928461c6c1a25948689200abc87f0a85fe
glutamate/bugpan
Asserts.hs
{-# LANGUAGE BangPatterns #-} module Tests.Asserts where import System.Time import Database import Parse import ImpInterpret import EvalM hiding (ListT) import Eval import Expr --import Stages import Query import QueryTypes import Control.Monad.Trans import Control.Monad.State.Lazy import HaskSyntaxUntyped import Que...
null
https://raw.githubusercontent.com/glutamate/bugpan/d0983152f5afce306049262cba296df00e52264b/Tests/Asserts.hs
haskell
# LANGUAGE BangPatterns # import Stages
module Tests.Asserts where import System.Time import Database import Parse import ImpInterpret import EvalM hiding (ListT) import Eval import Expr import Query import QueryTypes import Control.Monad.Trans import Control.Monad.State.Lazy import HaskSyntaxUntyped import QueryUnsafe import Data.IORef import QueryUtils i...
532e3a496344443622a3b4c2528717673f4f48a139a7aec01364e6beed903d79
ghcjs/ghcjs
fromToInteger.hs
# LANGUAGE MagicHash # module Main where import GHC.Exts import GHC.Integer main = do print v print w v :: Int v = I# (integerToInt (smallInteger 3#)) w :: Word w = W# (integerToWord (wordToInteger 3##))
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/integer/fromToInteger.hs
haskell
# LANGUAGE MagicHash # module Main where import GHC.Exts import GHC.Integer main = do print v print w v :: Int v = I# (integerToInt (smallInteger 3#)) w :: Word w = W# (integerToWord (wordToInteger 3##))
85a65becfee8cb800da1272fa568ba28513fcdf26db91e9364e02e433ec3b4fa
input-output-hk/cardano-base
Binary.hs
module Cardano.Binary ( module X ) where import Cardano.Binary.Deserialize as X import Cardano.Binary.ToCBOR as X import Cardano.Binary.Serialize as X import Cardano.Binary.FromCBOR as X
null
https://raw.githubusercontent.com/input-output-hk/cardano-base/7e64caa79e0f751f1333ccbce4a64cb48752ae69/cardano-binary/src/Cardano/Binary.hs
haskell
module Cardano.Binary ( module X ) where import Cardano.Binary.Deserialize as X import Cardano.Binary.ToCBOR as X import Cardano.Binary.Serialize as X import Cardano.Binary.FromCBOR as X
bbbcef4f4c12fa148dabd265f190bf44a023feb16acd5a66a100ec1ca0c4aef8
andreaslyn/mini-yu
ParseTree.hs
module ParseTree ( Program , ModuleIntro , Def (..) , Decl (..) , ValCase (..) , VarList , VarListElem , OptWhereClause , Expr (..) , ExprSeqElem , ExprListTypedElem , CaseCase , ParsePattern (..) , astToString -- Printing -- Getters , defIsData , defDecl , declLoc , defLoc , e...
null
https://raw.githubusercontent.com/andreaslyn/mini-yu/2ea08bfbcd39f4f892db0129685945fa5a51637b/src/ParseTree.hs
haskell
Printing Getters import M => path/to/mod of i1 (= False) of i2 (= False) export of e1 (= True) of e2 (= True) Bool = True if pure Bool = True if pure 'let' x : X, y : Y, z : Z ---------------------- Getters --------------------------------- -------------------- Pretty printing ----------------------------
module ParseTree ( Program , ModuleIntro , Def (..) , Decl (..) , ValCase (..) , VarList , VarListElem , OptWhereClause , Expr (..) , ExprSeqElem , ExprListTypedElem , CaseCase , ParsePattern (..) , defIsData , defDecl , declLoc , defLoc , exprLoc , valCaseLoc , patternLoc , ...
9acfcb1aa656713921127bd4eecff2841c4d9a860c4168a71e858a65472f5b50
racket/compiler
ctool.rkt
#lang racket (require setup/dirs) (define raco (build-path (find-console-bin-dir) (if (eq? (system-type) 'windows) "raco.exe" "raco"))) (define tmp (make-temporary-file)) (system* raco "ctool" "--3m" "--c-mo...
null
https://raw.githubusercontent.com/racket/compiler/88acf8a1ec81fec0fbcb6035af1d994d2fec4154/compiler-test/tests/compiler/ctool.rkt
racket
#lang racket (require setup/dirs) (define raco (build-path (find-console-bin-dir) (if (eq? (system-type) 'windows) "raco.exe" "raco"))) (define tmp (make-temporary-file)) (system* raco "ctool" "--3m" "--c-mo...
6d4b5bc82ccd3bb457c2603f6e6016feac5027169bec9560afd54a5a4b4119fb
larandaA/hgraphs
Queue.hs
module Data.Graph.Abstract.Accessor.Queue ( Queue , newReserve, new , empty, full , capacity, size , pop, push, drain ) where import Control.Monad.ST (ST) import Data.Graph.Abstract.Accessor (Accessor, liftST) import qualified Data.Queue.Mutable as QM type Queue = QM.STQueue # I...
null
https://raw.githubusercontent.com/larandaA/hgraphs/322b5cdfafbae851b4251c907e2c81b82cf02d4a/src/Data/Graph/Abstract/Accessor/Queue.hs
haskell
# INLINE new # # INLINE empty #
module Data.Graph.Abstract.Accessor.Queue ( Queue , newReserve, new , empty, full , capacity, size , pop, push, drain ) where import Control.Monad.ST (ST) import Data.Graph.Abstract.Accessor (Accessor, liftST) import qualified Data.Queue.Mutable as QM type Queue = QM.STQueue # I...
2f3a83edbf651a33dc4358fcaaeea979c3294b036ab1d911cc7c1b5d3414a5cc
racket/typed-racket
unboxed-let.rkt
#lang racket/base (require syntax/parse syntax/stx racket/sequence syntax/parse/experimental/template racket/match racket/syntax racket/promise "../utils/utils.rkt" (for-template racket/base) "../types/numeric-tower.rkt" "../types/utils.rkt" "../t...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-lib/typed-racket/optimizer/unboxed-let.rkt
racket
components useful for intermediate results used more than once and for loop variables let loops expand to an application of a letrec-values thus, the loop function technically escapes from the letrec, but it escapes in the operator position of a call site we control (here) we can extend unboxing sole element of ...
#lang racket/base (require syntax/parse syntax/stx racket/sequence syntax/parse/experimental/template racket/match racket/syntax racket/promise "../utils/utils.rkt" (for-template racket/base) "../types/numeric-tower.rkt" "../types/utils.rkt" "../t...
7060e46539cff06a5274a3d3e54cccca5f9d505ceb6a3d2066200aad252ea473
haskell-tools/haskell-tools
DataFamily.hs
# LANGUAGE TypeFamilies # module Decl.DataFamily where data family Array :: * -> * data instance Array () = UnitArray Int deriving Show
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/examples/Decl/DataFamily.hs
haskell
# LANGUAGE TypeFamilies # module Decl.DataFamily where data family Array :: * -> * data instance Array () = UnitArray Int deriving Show
27d0b0681f3ca1682f6e89974998fe320b38e364cdee5bd9d169d2d4459e7bed
lesguillemets/sicp-haskell
TList.hs
module TList where data TList a = Nil | Cons (TList a) (TList a) | V a deriving (Show) We should probably doing this with Cons [ TList a ] | V a -- Note that his allows lists that does not terminate with Nil, like Cons ( V 2 ) ( V 1 ) list :: [TList a] -> TList a list = foldr Cons Nil fromList :: [a] -> TList a f...
null
https://raw.githubusercontent.com/lesguillemets/sicp-haskell/df524a1e28c45fb16a56f539cad8babc881d0431/exercise/chap02/sect2/TList.hs
haskell
Note that his allows lists that does not terminate with Nil, like
module TList where data TList a = Nil | Cons (TList a) (TList a) | V a deriving (Show) We should probably doing this with Cons [ TList a ] | V a Cons ( V 2 ) ( V 1 ) list :: [TList a] -> TList a list = foldr Cons Nil fromList :: [a] -> TList a fromList = list . map V car :: TList a -> TList a car (Cons p _) = p ...
c204c9d496b63c4535b1626c79033ffab07fc43bab81d209d428742b5bf72bd9
p2k/ecoinpool
sql_sharelogger.erl
%% Copyright ( C ) 2011 Patrick " p2k " < > %% %% This file is part of ecoinpool. %% %% ecoinpool is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or %% (at your option...
null
https://raw.githubusercontent.com/p2k/ecoinpool/01ba76a7ab4b17b60cb0c525786fddef43ea80e1/apps/ecoinpool/src/sql_sharelogger.erl
erlang
This file is part of ecoinpool. ecoinpool is free software: you can redistribute it and/or modify (at your option) any later version. ecoinpool is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE....
Copyright ( C ) 2011 Patrick " p2k " < > it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License -module(sql_sharelogger). -behaviour(gen_server). -include("e...
f3c0dac67293784e9ea47003b5b0e45d236ebeaf5f93404c3d3320c0f31d6ffe
meain/evil-textobj-tree-sitter
textobjects.scm
class textobject (dataclass (typeExpr) (_) @class.inner) @class.outer function textobject (charpred (className) (_) @function.inner) @function.outer (memberPredicate (body) @function.inner) @function.outer (classlessPredicate (body) @function.inner) @function.outer scope name textobject (dataclass name: (classN...
null
https://raw.githubusercontent.com/meain/evil-textobj-tree-sitter/d67bdd55ae0d70978232e952020f6e8300b5c7bb/queries/ql/textobjects.scm
scheme
class textobject (dataclass (typeExpr) (_) @class.inner) @class.outer function textobject (charpred (className) (_) @function.inner) @function.outer (memberPredicate (body) @function.inner) @function.outer (classlessPredicate (body) @function.inner) @function.outer scope name textobject (dataclass name: (classN...
43ff5a25c1ed3f12335594678524e74ecc10d78fe267b53d01496cb038c79230
dizengrong/erlang_game
mysql_drv.erl
%% %% mysql_drv.erl %% %% --------------------------------------------------------------------------- %% AMNESIA Copyright ( C ) 2008 - 09 , %% %% Redistribution and use in source and binary forms, with or without %% modification, are permitted provided that the following conditions are met: %% %% - Redistribut...
null
https://raw.githubusercontent.com/dizengrong/erlang_game/4598f97daa9ca5eecff292ac401dd8f903eea867/gerl/lib/amnesia/src/drivers/mysql/mysql_drv.erl
erlang
mysql_drv.erl --------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, ...
AMNESIA Copyright ( C ) 2008 - 09 , THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS OR SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE , DATA , OR LIABILITY , WHETHER IN CONTRACT , STRICT LIABI...