_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
bb82f70b3d226ad456126171bed8a70b80a773098284f1abf3cbf7befd5527de
erlang/otp
wxEvtHandler.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2022 . 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 of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/erlang/otp/936b91b1e5ac6500326f79dcb1c371a1033bde21/lib/wx/src/gen/wxEvtHandler.erl
erlang
%CopyrightBegin% 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 or implied. See the License for the specific lan...
Copyright Ericsson AB 2008 - 2022 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , This module is actually handwritten see .. /api_gen / wx_extra / wxEvtHandler.erl was supplied These messages ...
d553d37a6cd122d8b538c19e5deb70a0bb6e02e46696c59278172b9aa6102c04
edbutler/nonograms-rule-synthesis
config.rkt
#lang racket (provide flag-set? flag-value get-config load-config config-ref config-pathref) (require "core/core.rkt" json) ; string? -> boolean? ; #t if the given flag is in the command-line arguments (define (flag-set? str) (define args (current-command-line-arguments)) (> (vector-count (λ (s) ...
null
https://raw.githubusercontent.com/edbutler/nonograms-rule-synthesis/16f8dacb17bd77c9d927ab9fa0b8c1678dc68088/src/config.rkt
racket
string? -> boolean? #t if the given flag is in the command-line arguments string-> (or/c false/c? string?) symbol? -> void? if the root directory does not exist, create it Reference a config key from the 'files category, appending the root-dir symbol? -> path?
#lang racket (provide flag-set? flag-value get-config load-config config-ref config-pathref) (require "core/core.rkt" json) (define (flag-set? str) (define args (current-command-line-arguments)) (> (vector-count (λ (s) (string=? s str)) args) 0)) (define (flag-value str) (define args (current-...
e443e4e935f7a2393f87679e9982ea3e9546f6356e5f50bb86e2ae4c779925ab
aprell/compiler-potpourri
test_ssa.ml
open Control_flow open Graphs let () = let graph = graph_of_input (match Sys.argv with | [| _; filename |] -> filename | _ -> "examples/pow.hir") in let ssa_graph = Ssa.construct graph in Cfg.print_basic_blocks graph; print_newline (); Ssa.Graph.output_dot ssa_graph
null
https://raw.githubusercontent.com/aprell/compiler-potpourri/a668b71f392abf1810a1f33f362a1d96bc5eebce/ssa/test_ssa.ml
ocaml
open Control_flow open Graphs let () = let graph = graph_of_input (match Sys.argv with | [| _; filename |] -> filename | _ -> "examples/pow.hir") in let ssa_graph = Ssa.construct graph in Cfg.print_basic_blocks graph; print_newline (); Ssa.Graph.output_dot ssa_graph
a85d632d006307d1d5f366b982bbf76a3caedb4038ded0350ad365b9dcbd4368
dparis/gen-phzr
timer_event.cljs
(ns phzr.timer-event (:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]] [phzr.impl.extend :as ex] [cljsjs.phaser])) (defn ->TimerEvent "A TimerEvent is a single event that is processed by a Phaser.Timer. It consists of a delay, which is a value in milliseconds after which ...
null
https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/timer_event.cljs
clojure
(ns phzr.timer-event (:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]] [phzr.impl.extend :as ex] [cljsjs.phaser])) (defn ->TimerEvent "A TimerEvent is a single event that is processed by a Phaser.Timer. It consists of a delay, which is a value in milliseconds after which ...
f452e38ac9a91cbb14a19b12ba2767e8164f36d38654e3ba819fbdd41fb7f12d
nobutaka/nanopass
tests-2.3-req.scm
(add-tests-with-string-output "complex constants" ['42 => "42\n"] ['(1 . 2) => "(1 . 2)\n"] ['(1 2 3) => "(1 2 3)\n"] [(let ([x '(1 2 3)]) x) => "(1 2 3)\n"] [(let ([f (lambda () '(1 2 3))]) (f)) => "(1 2 3)\n"] [(let ([f (lambda () '(1 2 3))]) (eq? (f) (f))) => "#t\n"] [(let ([f (lambda () ...
null
https://raw.githubusercontent.com/nobutaka/nanopass/80e0344a1f143832a75d798be903e05b5dbdd079/tests/tests-2.3-req.scm
scheme
(add-tests-with-string-output "complex constants" ['42 => "42\n"] ['(1 . 2) => "(1 . 2)\n"] ['(1 2 3) => "(1 2 3)\n"] [(let ([x '(1 2 3)]) x) => "(1 2 3)\n"] [(let ([f (lambda () '(1 2 3))]) (f)) => "(1 2 3)\n"] [(let ([f (lambda () '(1 2 3))]) (eq? (f) (f))) => "#t\n"] [(let ([f (lambda () ...
9c6ddd1829b4bd05369368c4cd13f2ea5f9955cfc8f6de7140bbed041b077d64
lemmih/lhc
Fixed.hs
module Data.Bedrock.Storage.Fixed where import Data.Bedrock import Data.Bedrock.Storage.Pluggable import LLVM.AST.Type as LLVM Allocate a fixed buffer at program start , bump allocate into it . gc_init = pagesize < - sysconf _ SC_PAGESIZE ; mem < - @ccall mmap(null , 1024*pagesize ...
null
https://raw.githubusercontent.com/lemmih/lhc/53bfa57b9b7275b7737dcf9dd620533d0261be66/bedrock/src/Data/Bedrock/Storage/Fixed.hs
haskell
module Data.Bedrock.Storage.Fixed where import Data.Bedrock import Data.Bedrock.Storage.Pluggable import LLVM.AST.Type as LLVM Allocate a fixed buffer at program start , bump allocate into it . gc_init = pagesize < - sysconf _ SC_PAGESIZE ; mem < - @ccall mmap(null , 1024*pagesize ...
db76a35ebf118eaaacde648e7f1cf85b6d9af53713a966e78cc3dde8f31c9166
juji-io/datalevin
remote_transact_test.clj
(ns datalevin.remote-transact-test (:require [datalevin.core :as d] [datalevin.util :as u] [datalevin.datom :as dd] [datalevin.constants :as c] [datalevin.test.core :as tdc :refer [server-fixture]] [clojure.test :as t :refer [is are deftest testing use-fixtures]]) (:import [java.util UUID])) (...
null
https://raw.githubusercontent.com/juji-io/datalevin/84a546224718378044961ad3acdf25d43bc3bc48/test/datalevin/remote_transact_test.clj
clojure
(ns datalevin.remote-transact-test (:require [datalevin.core :as d] [datalevin.util :as u] [datalevin.datom :as dd] [datalevin.constants :as c] [datalevin.test.core :as tdc :refer [server-fixture]] [clojure.test :as t :refer [is are deftest testing use-fixtures]]) (:import [java.util UUID])) (...
6edb5a7ca651b68576c5ff6171939a6f7e7440dd3b4dfde74c182e620a7eb1ba
benoitc/couchbeam
couchbeam.erl
%%% -*- erlang -*- %%% This file is part of couchbeam released under the MIT license . %%% See the NOTICE for more information. -module(couchbeam). -author('Benoît Chesneau <>'). -include("couchbeam.hrl"). -define(TIMEOUT, infinity). %% API urls -export([server_connection/0, server_connection/1, server_c...
null
https://raw.githubusercontent.com/benoitc/couchbeam/8dcba7209b040d7225aceddc2956680340937790/src/couchbeam.erl
erlang
-*- erlang -*- See the NOTICE for more information. API urls -------------------------------------------------------------------- API functins. -------------------------------------------------------------------- @equiv server_connection(Host, Port, "", []) Connections are made to: ```:PortPrefix''...
This file is part of couchbeam released under the MIT license . -module(couchbeam). -author('Benoît Chesneau <>'). -include("couchbeam.hrl"). -define(TIMEOUT, infinity). -export([server_connection/0, server_connection/1, server_connection/2, server_connection/4, server_info/1, get_uuid/...
154669c940c27792735a53e4eedfa9d24571c95343e4378afb70537de91fb265
magnars/optimus
export_test.clj
(ns optimus.export-test (:require [clojure.java.io :as io] [midje.sweet :refer [fact =>]] [optimus.export :refer [save-assets]] [test-with-files.core :refer [with-tmp-dir tmp-dir]])) (fact "You can save assets to disk, like if you need to push them to a CDN server." (with-tmp-d...
null
https://raw.githubusercontent.com/magnars/optimus/ac5df602726d255312dfd48cf7ae2e00d99069bd/test/optimus/export_test.clj
clojure
(ns optimus.export-test (:require [clojure.java.io :as io] [midje.sweet :refer [fact =>]] [optimus.export :refer [save-assets]] [test-with-files.core :refer [with-tmp-dir tmp-dir]])) (fact "You can save assets to disk, like if you need to push them to a CDN server." (with-tmp-d...
5cfdc6c992bf5b86d782a6ef5e95c3cdac70110373322ef5e7df327a02170320
eait-itig/rdp_proto
credssp_ber.erl
Generated by the Erlang ASN.1 BER compiler . Version : 5.0.17 %% Purpose: Encoding and decoding of the types in CREDSSP. -module('credssp_ber'). -compile(nowarn_unused_vars). -dialyzer(no_improper_lists). -dialyzer(no_match). -include("credssp.hrl"). -asn1_info([{vsn,'5.0.17'}, {module,'credssp_ber'}, ...
null
https://raw.githubusercontent.com/eait-itig/rdp_proto/2b6ef3fa93fa7b3035933821a713f5607dea646b/src/credssp_ber.erl
erlang
Purpose: Encoding and decoding of the types in CREDSSP. ================================ ================================ ------------------------------------------------- ------------------------------------------------- ------------------------------------------------- -----------------------------------------------...
Generated by the Erlang ASN.1 BER compiler . Version : 5.0.17 -module('credssp_ber'). -compile(nowarn_unused_vars). -dialyzer(no_improper_lists). -dialyzer(no_match). -include("credssp.hrl"). -asn1_info([{vsn,'5.0.17'}, {module,'credssp_ber'}, {options,[der,noout,{i,"."}]}]). -export([encodi...
ac848c3e9f5745d6392e7e4940a99feba35a72b7aea82e0c977839d9b55d6dcb
softwarelanguageslab/maf
R5RS_scp1_haha-3.scm
; Changes: * removed : 0 * added : 2 * swaps : 1 ; * negated predicates: 0 ; * swapped branches: 0 * calls to i d fun : 2 (letrec ((result ()) (output (lambda (i) (<change> () result) (set! result (cons i result)))) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_haha-3.scm
scheme
Changes: * negated predicates: 0 * swapped branches: 0
* removed : 0 * added : 2 * swaps : 1 * calls to i d fun : 2 (letrec ((result ()) (output (lambda (i) (<change> () result) (set! result (cons i result)))) (hulp 2) (haha (lambda (x) (<ch...
0a21a61341349fc18960002cfdb9ab63b5f5a0fd1e789f19c16a9df1fff7f7ae
mbj/mhs
Main.hs
import System.IO (IO) import qualified DBT.Postgresql.Container.CLI as CLI main :: IO () main = CLI.main
null
https://raw.githubusercontent.com/mbj/mhs/54fe191d16fbabed6d71355146071ba1339901a9/dbt-postgresql-container/app/Main.hs
haskell
import System.IO (IO) import qualified DBT.Postgresql.Container.CLI as CLI main :: IO () main = CLI.main
2eb6024180dbbf98bd46bb2d6d9a9464e630ea12a61718f3268238356a97a454
gregnwosu/haskellbook
ChapterExercisesFixCode.hs
module ChapterExercisesFixCode where import Control.Monad.Trans.Maybe import Control.Monad.Trans.Class import Control.Monad isValid :: String -> Bool isValid v = '!' `elem` v maybeExcite :: MaybeT IO String maybeExcite = do v <- lift getLine guard $ isValid v return v doExcite :: IO () doExcite = do putS...
null
https://raw.githubusercontent.com/gregnwosu/haskellbook/b21fb6772e58f07cff334d9c551d0477ec856897/chapter26/src/ChapterExercisesFixCode.hs
haskell
module ChapterExercisesFixCode where import Control.Monad.Trans.Maybe import Control.Monad.Trans.Class import Control.Monad isValid :: String -> Bool isValid v = '!' `elem` v maybeExcite :: MaybeT IO String maybeExcite = do v <- lift getLine guard $ isValid v return v doExcite :: IO () doExcite = do putS...
a22b1f99c6eb7c02d7b5bada0f604c70d3c771487f55e6083a794be86827dd8a
jeromesimeon/Galax
schema_dtd_import.mli
(***********************************************************************) (* *) (* GALAX *) (* XQuery Engine *) (* ...
null
https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/schema/schema_dtd_import.mli
ocaml
********************************************************************* GALAX XQuery Engine ...
Copyright 2001 - 2007 . $ I d : schema_dtd_import.mli , v 1.2 2007/02/01 22:08:53 simeon Exp $ Module : Schema_dtd_import Description : This module imports a DTD as a set of XML Schema declarations . Description: This module imports a DTD as ...
c7fa6a429d4a97518a504d9c59d1387d8ea0e19fb83ef4eeece9a26da4e70e91
conal/Fran
UsersMan.hs
This module goes with the Fran Users ' Manual , but is largely redundant -- with the tutorial -- I added artificial " u " arguments to circ , ball1 , etc , to eliminate CAFs , but have n't updated the manual . In GHC main has to be in module module UsersMan where import Fran -- Basic Fran ...
null
https://raw.githubusercontent.com/conal/Fran/a113693cfab23f9ac9704cfee9c610c5edc13d9d/demos/UsersMan.hs
haskell
with the tutorial Basic Fran functionality -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- ---------------...
This module goes with the Fran Users ' Manual , but is largely redundant I added artificial " u " arguments to circ , ball1 , etc , to eliminate CAFs , but have n't updated the manual . In GHC main has to be in module module UsersMan where import qualified StaticTypes as S The VKey type ...
43d99a93608bd09a0328a56ce7fda590db6fa92cfba14d24f5a28c4ee102669b
gordonpace/contractLarva
Instrumentation.hs
Copyright 2017 and -- 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 of the License at -- -- -2.0 -- -- Unless required by applicable law or agreed to in writing, software distributed under...
null
https://raw.githubusercontent.com/gordonpace/contractLarva/5a2febd1c9ba4763b30def3a96bb07f2fef8a9dc/src/DEA/Instrumentation.hs
haskell
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 or implied. See the License for the specific language governing perm...
Copyright 2017 and Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , module DEA.Instrumentation (instrumentSpecification, warningsSpecification) where import Control.Monad hiding (guard) import Text.Parsec hiding (Sta...
6ae3c7bfe2b611b54099d1fb7b7684a66095c992e2320722685079bb6cf7ce39
arrterian/nix-env-selector
actions.cljs
(ns ext.actions (:require ["fs" :refer [readdir]] [config :refer [config vscode-config]] [vscode.window :as w] [vscode.env :refer [open-external-url]] [vscode.command :as cmd] [vscode.workspace :as workspace] [vscode.status-bar :as status-bar] ...
null
https://raw.githubusercontent.com/arrterian/nix-env-selector/62f01e632dd1e5ba4ac72d23ccf18b30175dabe0/src/main/ext/actions.cljs
clojure
(ns ext.actions (:require ["fs" :refer [readdir]] [config :refer [config vscode-config]] [vscode.window :as w] [vscode.env :refer [open-external-url]] [vscode.command :as cmd] [vscode.workspace :as workspace] [vscode.status-bar :as status-bar] ...
fbc12607f7a57a23bee36d567b542c6f30cb2fb9f64545a8c89c36c34aaab8b9
reborg/reclojure
bitmap_indexed_node_test.clj
(ns reclojure.lang.bitmap-indexed-node-test (:require [midje.sweet :refer :all] [reclojure.lang.node :as bin] [reclojure.lang.box] [reclojure.lang.protocols.node :as node]) (:import [reclojure.lang.box Box])) (facts "creating" (fact "empty" (.binEdit (bin/EMP...
null
https://raw.githubusercontent.com/reborg/reclojure/c8aae4cc384d59262569cbc9c332e08619f292ef/test/reclojure/lang/bitmap_indexed_node_test.clj
clojure
(ns reclojure.lang.bitmap-indexed-node-test (:require [midje.sweet :refer :all] [reclojure.lang.node :as bin] [reclojure.lang.box] [reclojure.lang.protocols.node :as node]) (:import [reclojure.lang.box Box])) (facts "creating" (fact "empty" (.binEdit (bin/EMP...
d61d58bf6f084ec7d14a1c291712ceb21dc106b7978432782484bd954ae38dc0
RutledgePaulV/kube-api
core_test.clj
(ns kube-api.io.core-test (:require [clojure.test :refer :all] [kube-api.io.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 1 1))))
null
https://raw.githubusercontent.com/RutledgePaulV/kube-api/ff335b5e9dbf0f10ed00227733f26898d57c2c55/kube-api-io/test/kube_api/io/core_test.clj
clojure
(ns kube-api.io.core-test (:require [clojure.test :refer :all] [kube-api.io.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 1 1))))
a445632c747e20a65b5dbe317f337962e574123bc88877f546c289da6fae6348
passy/coding-puzzles
Main.hs
# LANGUAGE ScopedTypeVariables # import Control.Applicative ((<$>)) import Control.Monad (replicateM, forM_) main :: IO () main = do n <- readLn :: IO Int lines <- replicateM n getLine :: IO [String] let res = fmap read . words <$> lines :: [[Int]] -- Surely, there's a way nicer approach just folding...
null
https://raw.githubusercontent.com/passy/coding-puzzles/686bd0775ee5a98004229d44c913376d033b13de/hackerrank/diagonal-difference/Main.hs
haskell
Surely, there's a way nicer approach just folding over this, right?
# LANGUAGE ScopedTypeVariables # import Control.Applicative ((<$>)) import Control.Monad (replicateM, forM_) main :: IO () main = do n <- readLn :: IO Int lines <- replicateM n getLine :: IO [String] let res = fmap read . words <$> lines :: [[Int]] let lrindices = [ (m, m) | m <- [0..(n - 1)] ] l...
62911fecd8e5b6eaa7c4459a68ffd7e06350c859489526d8fd29bf05675fd0b6
zcaudate/hara
path_test.clj
(ns hara.io.file.path-test (:use hara.test) (:require [hara.io.file.path :refer :all] [hara.io.file.common :as common] [hara.string :as string]) (:refer-clojure :exclude [resolve])) ^{:refer hara.io.file.path/normalise :added "3.0"} (fact "creates a string that takes notice of the user ho...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/io/file/path_test.clj
clojure
=> #path:"/Users/chris/Development/chit/hara/project.clj" idempotent => #path:"/Users/chris/Development/chit/hara/project.clj" tilda multiple arguments => #path:"/Users/chris/Development/chit/hara/src/hara/time.clj" vector => #path:"/Users/chris/Development/chit/hara/src/hara/time.clj" java.io.File object => #pa...
(ns hara.io.file.path-test (:use hara.test) (:require [hara.io.file.path :refer :all] [hara.io.file.common :as common] [hara.string :as string]) (:refer-clojure :exclude [resolve])) ^{:refer hara.io.file.path/normalise :added "3.0"} (fact "creates a string that takes notice of the user ho...
674f96c93c0d8b33f0b74c6f97c69849e721382658fc714d5cfd49bd7a76dcfc
metaocaml/ber-metaocaml
t110-lsrint.ml
TEST include tool - ocaml - lib flags = " -w a " ocaml_script_as_argument = " true " * setup - ocaml - build - env * * include tool-ocaml-lib flags = "-w a" ocaml_script_as_argument = "true" * setup-ocaml-build-env ** ocaml *) open Lib;; if (14 lsr 2) <> 3 then raise Not_found;; * 0 CONSTINT 42...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/testsuite/tests/tool-ocaml/t110-lsrint.ml
ocaml
TEST include tool - ocaml - lib flags = " -w a " ocaml_script_as_argument = " true " * setup - ocaml - build - env * * include tool-ocaml-lib flags = "-w a" ocaml_script_as_argument = "true" * setup-ocaml-build-env ** ocaml *) open Lib;; if (14 lsr 2) <> 3 then raise Not_found;; * 0 CONSTINT 42...
140e00bfdbe876f6fede64df45d0147da67cede429c920e477a32a5922323ceb
bluemont/kria
set.clj
(ns kria.pb.bucket.set (:require [kria.conversions :refer [byte-string<-utf8-string]] [kria.pb.bucket.props :refer [BucketProps->pb]]) (:import [com.basho.riak.protobuf RiakPB$RpbSetBucketReq])) (set! *warn-on-reflection* true) (defrecord SetBucketReq [bucket ; required bytes props...
null
https://raw.githubusercontent.com/bluemont/kria/8ed7fb1ebda8bfa1a2a6d7a3acf05e2255fcf0f0/src/clojure/kria/pb/bucket/set.clj
clojure
required bytes required RpbBucketProps optional bytes
(ns kria.pb.bucket.set (:require [kria.conversions :refer [byte-string<-utf8-string]] [kria.pb.bucket.props :refer [BucketProps->pb]]) (:import [com.basho.riak.protobuf RiakPB$RpbSetBucketReq])) (set! *warn-on-reflection* true) (defrecord SetBucketReq ]) (defn ^RiakPB$RpbSetBucketReq SetBuck...
46786905ed3e536ffb7cf9a256d718ce7dad03d6a3749f1c4aa71467dc599754
byteally/webapi
WebApi.hs
module WebApi ( module WebApi.Contract , module WebApi.ContentTypes , module WebApi.Server , module WebApi.Client , module WebApi.Param , module WebApi.Mock ) where import WebApi.Contract import WebApi.ContentTypes import WebApi.Server import WebApi.Client import WebAp...
null
https://raw.githubusercontent.com/byteally/webapi/8d712d0ae786475b177beacee32dc40db320af4c/webapi/src/WebApi.hs
haskell
module WebApi ( module WebApi.Contract , module WebApi.ContentTypes , module WebApi.Server , module WebApi.Client , module WebApi.Param , module WebApi.Mock ) where import WebApi.Contract import WebApi.ContentTypes import WebApi.Server import WebApi.Client import WebAp...
a05014f0b0f64885f9488625b844168dc44a9d0368a46bc39e61aad21298cea6
Quid2/zm
Ka5782c1002a5.hs
{-# LANGUAGE DeriveAnyClass #-} {-# LANGUAGE DeriveGeneric #-} module Test.ZM.ADT.Celsius.Ka5782c1002a5 (Celsius(..)) where import qualified Prelude(Eq,Ord,Show) import qualified GHC.Generics import qualified Flat import qualified Data.Model import qualified Test.ZM.ADT.IEEE_754_binary32.Kb53bec846608 newtype Celsius...
null
https://raw.githubusercontent.com/Quid2/zm/02c0514777a75ac054bfd6251edd884372faddea/test/Test/ZM/ADT/Celsius/Ka5782c1002a5.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE DeriveGeneric #
module Test.ZM.ADT.Celsius.Ka5782c1002a5 (Celsius(..)) where import qualified Prelude(Eq,Ord,Show) import qualified GHC.Generics import qualified Flat import qualified Data.Model import qualified Test.ZM.ADT.IEEE_754_binary32.Kb53bec846608 newtype Celsius = Celsius Test.ZM.ADT.IEEE_754_binary32.Kb53bec846608.IEEE_75...
22bb0c1e4a11dc8654ba55c403a4f62a19dddf03090a197477569f4062b4d4a4
gar1t/psycho
psycho.erl
-module(psycho). -export([call_app/2, call_app_with_data/3, priv_dir/0, env/2, env/3, env_val/2, env_val/3, set_env/3, env_header/2, env_header/3, parsed_request_path/1]). call_app(M, Env) when is_atom(M) -> erlang:apply(M, app, [Env]); call_app({M, F}, Env) when is_at...
null
https://raw.githubusercontent.com/gar1t/psycho/6335b9c27559f417e613372776edbea760720559/src/psycho.erl
erlang
-module(psycho). -export([call_app/2, call_app_with_data/3, priv_dir/0, env/2, env/3, env_val/2, env_val/3, set_env/3, env_header/2, env_header/3, parsed_request_path/1]). call_app(M, Env) when is_atom(M) -> erlang:apply(M, app, [Env]); call_app({M, F}, Env) when is_at...
2cd95dce3e5c907d7f2e41ca53269368a235f0264fab6151c295383ad684a528
hirokai/PaperServer
Formatter.hs
{-# LANGUAGE ScopedTypeVariables, OverloadedStrings #-} module Parser.Formatter ( format , Format (..) ) where import Data.List import Control.Monad import Parser.Import hiding (Url,toHtml) import qualified Data.Text as T import qualified Data.ByteString.Lazy as LB import Text.Blaze.Html5 hiding (map) import qual...
null
https://raw.githubusercontent.com/hirokai/PaperServer/b577955af08660253d0cd11282cf141d1c174bc0/Parser/Formatter.hs
haskell
# LANGUAGE ScopedTypeVariables, OverloadedStrings # import Settings format _ _ = error "Not supported format." ul ! class_ "nav"
module Parser.Formatter ( format , Format (..) ) where import Data.List import Control.Monad import Parser.Import hiding (Url,toHtml) import qualified Data.Text as T import qualified Data.ByteString.Lazy as LB import Text.Blaze.Html5 hiding (map) import qualified Text.Blaze.Html5 as H import Text.Blaze.Html5.Attr...
ea9f3d574d943845e2531ed4240216bb704fd00c4fedfeda9a1af2d69fcba6da
pa-ba/compdata-param
Sum.hs
# LANGUAGE TypeOperators , MultiParamTypeClasses , IncoherentInstances , FlexibleInstances , FlexibleContexts , GADTs , TypeSynonymInstances , ScopedTypeVariables , TemplateHaskell , Rank2Types # FlexibleInstances, FlexibleContexts, GADTs, TypeSynonymInstances, ScopedTypeVariables, TemplateHaskell, Rank2Typ...
null
https://raw.githubusercontent.com/pa-ba/compdata-param/5d6b0afa95a27fd3233f86e5efc6e6a6080f4236/src/Data/Comp/Param/Sum.hs
haskell
------------------------------------------------------------------------------ | Module : Data.Comp.Param.Sum License : BSD3 Stability : experimental This module provides the infrastructure to extend signatures. ------------------------------------------------------------------------------ * Proje...
# LANGUAGE TypeOperators , MultiParamTypeClasses , IncoherentInstances , FlexibleInstances , FlexibleContexts , GADTs , TypeSynonymInstances , ScopedTypeVariables , TemplateHaskell , Rank2Types # FlexibleInstances, FlexibleContexts, GADTs, TypeSynonymInstances, ScopedTypeVariables, TemplateHaskell, Rank2Typ...
1667175eb6c7897851b1f5afcbffef6c675405e1e20274b4fa32d05212252cad
koto-bank/lbge
package.lisp
(defpackage :lbge.filesystem (:use :cl) (:export :get-app-root :set-app-root :set-app-root-to-system :is-exist :is-file :is-dir :parse-asset-path :merge-paths :path-eq :make-path :root-relative-path))
null
https://raw.githubusercontent.com/koto-bank/lbge/6be4b3212ea87288b1ee2a655e9a1bb30a74dd27/src/filesystem/package.lisp
lisp
(defpackage :lbge.filesystem (:use :cl) (:export :get-app-root :set-app-root :set-app-root-to-system :is-exist :is-file :is-dir :parse-asset-path :merge-paths :path-eq :make-path :root-relative-path))
4d8382c08bd1eea64e47cf5f61c77e62dc0b8ece0ce2eb439a2374601aba63e3
dalaing/little-languages
SmallStep.hs
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Small - step rules and helpers for the NB language . This module reexports ' Term . Eval . SmallStep . Strict ' . There is also ' Term . Eval . SmallStep . Lazy ' if you need it . Copyright ...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/nb/src/Term/Eval/SmallStep.hs
haskell
local
| Copyright : ( c ) , 2016 License : : Stability : experimental Portability : non - portable Small - step rules and helpers for the NB language . This module reexports ' Term . Eval . SmallStep . Strict ' . There is also ' Term . Eval . SmallStep . Lazy ' if you need it . Copyright ...
af42d5b4a4177544125c87386274f3d71a8ac0fe43275be1e39da41adfb038cc
airalab/hs-web3
AbiSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Language.Solidity.Test.AbiSpec where import Data.Either (isLeft) import Data.Text (Text) import Language.Solidity.Abi import Test.Hspec spec :: Spec spec = parallel $ do describe "parseSolidityType" $ descr...
null
https://raw.githubusercontent.com/airalab/hs-web3/e6f5cbf8262d42af23cdf520e851c814fcc2573b/packages/solidity/tests/Language/Solidity/Test/AbiSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Language.Solidity.Test.AbiSpec where import Data.Either (isLeft) import Data.Text (Text) import Language.Solidity.Abi import Test.Hspec spec :: Spec spec = parallel $ do describe "parseSolidityType" $ describe "tuple type" $ do it "c...
1a51d5d46423998e63b383f4f21fee8d271a1739737162b665f0b0d5def70f28
flokkus/fast_mnesia
sc_app.erl
-module(sc_app). -behaviour(application). -export([start/2, stop/1]). -define(WAIT_FOR_RESOURCES, 2500). start(_StartType, _StartArgs) -> sc_store:init(), case sc_sup:start_link() of {ok, Pid} -> sc_event_logger:add_handler(), {ok, Pid}; Other -> {error, O...
null
https://raw.githubusercontent.com/flokkus/fast_mnesia/522f0f1bf8af3600767ec13dedac613a11e8f315/load/simple_cache/src/sc_app.erl
erlang
-module(sc_app). -behaviour(application). -export([start/2, stop/1]). -define(WAIT_FOR_RESOURCES, 2500). start(_StartType, _StartArgs) -> sc_store:init(), case sc_sup:start_link() of {ok, Pid} -> sc_event_logger:add_handler(), {ok, Pid}; Other -> {error, O...
dc67f9fdd3b422340bbf61365632a2ab07f60b26df310e469d63d388863be34f
YoshikuniJujo/test_haskell
StraightInsertionSort.hs
# LANGUAGE BlockArguments # # OPTIONS_GHC -Wall -fno - warn - tabs # module StraightInsertionSort (insertionSort, isort) where import Control.Monad.ST import Data.Foldable import Data.Array.ST insertionSort :: Ord a => [a] -> [a] insertionSort ks = runST $ (>>) <$> isort n <*> getElems =<< newListArray (1, n) ks w...
null
https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/9876a8ef6fd35f935e754b69fd34ffbe6c1119e7/tribial/mastodon/quicksort/src/StraightInsertionSort.hs
haskell
# LANGUAGE BlockArguments # # OPTIONS_GHC -Wall -fno - warn - tabs # module StraightInsertionSort (insertionSort, isort) where import Control.Monad.ST import Data.Foldable import Data.Array.ST insertionSort :: Ord a => [a] -> [a] insertionSort ks = runST $ (>>) <$> isort n <*> getElems =<< newListArray (1, n) ks w...
03718af6a104a1b6686da52e0ded54b4a0deea854c0b43f805557ba871799338
5HT/ant
Trie.mli
open Unicode.Types; type trie 'a = { array of 3n entries : offset , char , data , offset , char , data , ... t_data : array 'a; (* array of the actual data *) t_data_len : mutable int (* number of used enties in the |t_data| array *) }; value g...
null
https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Runtime/Trie.mli
ocaml
array of the actual data number of used enties in the |t_data| array
open Unicode.Types; type trie 'a = { array of 3n entries : offset , char , data , offset , char , data , ... }; value get_offset : trie 'a -> int -> int; value get_char : trie 'a -> int -> int; value get_data : trie 'a -> int -> option 'a; value lookup : trie 'a -> int -> uc_string -> option 'a; v...
7e51d4547d58dae9034a9434b9a7aa28a5f904f2378a11324106ac310be1fdb7
mcorbin/meuse
crate_user.clj
(ns meuse.db.public.crate-user (:require [meuse.db :refer [database]] [meuse.db.actions.crate-user :as crate-user] [mount.core :refer [defstate]])) (defprotocol ICrateUserDB (create-crate-users [this crate-name users]) (delete [this crate-name user-name]) (delete-crate-users [this crate...
null
https://raw.githubusercontent.com/mcorbin/meuse/d2b74543fce37c8cde770ae6f6097cabb509a804/src/meuse/db/public/crate_user.clj
clojure
(ns meuse.db.public.crate-user (:require [meuse.db :refer [database]] [meuse.db.actions.crate-user :as crate-user] [mount.core :refer [defstate]])) (defprotocol ICrateUserDB (create-crate-users [this crate-name users]) (delete [this crate-name user-name]) (delete-crate-users [this crate...
cd492fc73771dfff8f9b063d52007dd8d0c9a0af544347f5ba3c919329f8f47f
snowdriftcoop/snowdrift
Model.hs
# LANGUAGE FlexibleInstances # module Model (module Model) where import ClassyPrelude.Yesod import Database.Persist.Quasi import Database.Persist.Sql import Crowdmatch (ToCrowdmatchPatron(..)) -- You can define all of your database entities in the entities file. -- You can find more information on persistent and how...
null
https://raw.githubusercontent.com/snowdriftcoop/snowdrift/91fd1b84fea5d9c4aa2c419d91d790d886b3d100/website/src/Model.hs
haskell
You can define all of your database entities in the entities file. You can find more information on persistent and how to declare entities at: /
# LANGUAGE FlexibleInstances # module Model (module Model) where import ClassyPrelude.Yesod import Database.Persist.Quasi import Database.Persist.Sql import Crowdmatch (ToCrowdmatchPatron(..)) share [ mkPersist sqlSettings{ mpsGenerateLenses = True } , mkMigrate "migrateSnowdrift"] $(persistFileWith lowe...
27e721a314f1a142e31517c6f4c69e648a00644e677012dd9945b9eecb8bd3ac
webyrd/mediKanren
build-rtx-kg2.rkt
#lang racket/base (require "../../../medikanren2/dbk/dbk/io.rkt" "../../../medikanren2/dbk/dbk/data.rkt" "../../../medikanren2/dbk/dbk/stream.rkt" racket/runtime-path) (define-runtime-path path.here ".") (define db (database (build-path path.here "rtx-kg2_20210204.db"))) (unless (database-relation-has? db '(...
null
https://raw.githubusercontent.com/webyrd/mediKanren/eb3c53e4d6c4bee9db0456ba5e640ab583573290/contrib/medikanren2/Thi/build-rtx-kg2.rkt
racket
#lang racket/base (require "../../../medikanren2/dbk/dbk/io.rkt" "../../../medikanren2/dbk/dbk/data.rkt" "../../../medikanren2/dbk/dbk/stream.rkt" racket/runtime-path) (define-runtime-path path.here ".") (define db (database (build-path path.here "rtx-kg2_20210204.db"))) (unless (database-relation-has? db '(...
bf31a7292958c41cdbba0f0493153049d58c1ee028aa42c7130650ca1dd58f68
samply/blaze
include.clj
(ns blaze.interaction.search.include (:require [blaze.db.api :as d] [blaze.fhir.spec :as fhir-spec])) (defn- forward-includes* [db handle {:keys [code target-type]}] (if target-type (d/include db handle code target-type) (d/include db handle code))) (defn- reverse-includes* [db handle {:keys [so...
null
https://raw.githubusercontent.com/samply/blaze/41244588a59c5d5bf1070da1b263af7b46788268/modules/interaction/src/blaze/interaction/search/include.clj
clojure
(ns blaze.interaction.search.include (:require [blaze.db.api :as d] [blaze.fhir.spec :as fhir-spec])) (defn- forward-includes* [db handle {:keys [code target-type]}] (if target-type (d/include db handle code target-type) (d/include db handle code))) (defn- reverse-includes* [db handle {:keys [so...
b37351c0febeca676773327b52f62d57d1bc5db6b25ca72abd76144dc64893e8
yannics/N3
SOM.lisp
NEUROMUSE3 from neuromuse1 < > writed by < > freely adapted by < > ;; LISP code to simulate artificial neural networks ;------------------------------------------------------------------ (in-package :N3) ;; make-new-symbol is used to name or rename a symbol (defun make-new-symbol (name &optional conten...
null
https://raw.githubusercontent.com/yannics/N3/736c18a873320d1d0e31bd87ca1b126cbc9bf5af/SOM.lisp
lisp
LISP code to simulate artificial neural networks ------------------------------------------------------------------ make-new-symbol is used to name or rename a symbol ------------------------------------------------------------------ (RNA name which the neuron belongs) index position in the RNA neurons-list noise ...
NEUROMUSE3 from neuromuse1 < > writed by < > freely adapted by < > (in-package :N3) (defun make-new-symbol (name &optional content) (let ((sym (intern (string (if (boundp (read-from-string (string name))) (gensym (format nil "~S-" name)) n...
c7cc21c7050753644339c41b511aee17ec147cc69b33f41fe71e8f15de8a1e57
janestreet/learn-ocaml-workshop
problem.mli
(* This file deliberately left empty. *)
null
https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/02-exercises/21-reading_sigs/problem.mli
ocaml
This file deliberately left empty.
425d06901353cef426b07aa195679053c73e37d1cf5b6893601040bfd564651c
jfeser/castor
transform.mli
open Core open Castor.Ast module Config : sig module type S = sig val conn : Castor.Db.t val cost_conn : Castor.Db.t val params : Set.M(Castor.Name).t val cost_timeout : float option val random : Castor.Mcmc.Random_choice.t end end module Make (Config : Config.S) : sig val is_serializable : ...
null
https://raw.githubusercontent.com/jfeser/castor/e9f394e9c0984300f71dc77b5a457ae4e4faa226/eopt/transform.mli
ocaml
open Core open Castor.Ast module Config : sig module type S = sig val conn : Castor.Db.t val cost_conn : Castor.Db.t val params : Set.M(Castor.Name).t val cost_timeout : float option val random : Castor.Mcmc.Random_choice.t end end module Make (Config : Config.S) : sig val is_serializable : ...
3a8a0e83c58d5bb713cdc38fa8c66ceec3972fde8b2573d7dcb02401b966a101
vyorkin/tiger
err.ml
module L = Location type t = | SyntaxError | TypeError | IdError [@@deriving show] exception Error of t * L.loc * string let error_name = function | SyntaxError -> "Syntax" | TypeError -> "Type" | IdError -> "Identifier" let fail err l msg = raise @@ Error (err, l.L.loc, msg) let syntax_error l...
null
https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter5/lib/err.ml
ocaml
module L = Location type t = | SyntaxError | TypeError | IdError [@@deriving show] exception Error of t * L.loc * string let error_name = function | SyntaxError -> "Syntax" | TypeError -> "Type" | IdError -> "Identifier" let fail err l msg = raise @@ Error (err, l.L.loc, msg) let syntax_error l...
b9b128cdd1b97a3a823270e03f80a4f53b91062624bc51edcd7c2c158912c1a3
timothypratley/power-turtle
translations.clj
(ns power-turtle.translations (:require [cban.core :as cban] [clojure.java.io :as io]) (:import (java.io File))) (def translations (cban/read-translation-maps ["clojure-core-translations-map.edn" "power-turtle-translations-map.edn"])) (defmacro translation-map [] (list 'quote translations...
null
https://raw.githubusercontent.com/timothypratley/power-turtle/b7a9aafd8ed7c5c7b5c19419de0a203e5e5dc288/src/power_turtle/translations.clj
clojure
TODO: kinda sux because does not hot reload
(ns power-turtle.translations (:require [cban.core :as cban] [clojure.java.io :as io]) (:import (java.io File))) (def translations (cban/read-translation-maps ["clojure-core-translations-map.edn" "power-turtle-translations-map.edn"])) (defmacro translation-map [] (list 'quote translations...
fce1efdf7c0db3570850b805581b149e5ba8175ae28321cb9e9c212249b2caba
freckle/graphula
Key.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # -- | Convenience functions for working with 'Key' dependencies module Graphula.Key ( onlyKey , keys , Keys ) where import Database.Persist import GHC.TypeLits (ErrorMess...
null
https://raw.githubusercontent.com/freckle/graphula/070645e4fe697f15bd088ee59c6e1c4704684f3d/src/Graphula/Key.hs
haskell
| Convenience functions for working with 'Key' dependencies | Type-class for turning a tuple of 'Entity' into a tuple of 'Key' For example, given: @ @ You would have to do, @ @ This type-class allows you to do: @ @ For some reason, this definition (but no others) triggers ERROR: brittany pretty ...
# LANGUAGE DataKinds # # LANGUAGE FlexibleInstances # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Graphula.Key ( onlyKey , keys , Keys ) where import Database.Persist import GHC.TypeLits (ErrorMessage(..), TypeError) import Graphula (Only(..), only) class Ent...
2a05e9e6ddf8da0393cbeb0a68d49a9bb20a0dab454aef6fb799000dbfa06eb9
zotonic/zotonic
action_wires_slide_toggle.erl
@author < > 2009 %% Based on code copyright ( c ) 2008 - 2009 Copyright 2009 %% 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 of the License at %% %% -2.0 %% %% Unless required b...
null
https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_wires/src/actions/action_wires_slide_toggle.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 or implied. See the License for the specific language governing per...
@author < > 2009 Based on code copyright ( c ) 2008 - 2009 Copyright 2009 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(action_wires_slide_toggle). -include_lib("zotonic_core/include/zotonic.hrl"...
506c7f0c8d0b0914683aac7c66b084d60fab21988913642ba92034f91bb48935
Holworth/SICP_Solutions
exercise2-39.rkt
#lang sicp (define (reduce op init items) (cond ((null? items) init) (else (op (car items) (reduce op init (cdr items)))))) (define (fold-right op init items) (reduce op init items)) (define (fold-left op init items) (define (iter result rest) (if (null? ...
null
https://raw.githubusercontent.com/Holworth/SICP_Solutions/a10d0a1cbeb07241b47ee523540d3ca4870eaf57/solutions/chap2/code/exercise2-39.rkt
racket
#lang sicp (define (reduce op init items) (cond ((null? items) init) (else (op (car items) (reduce op init (cdr items)))))) (define (fold-right op init items) (reduce op init items)) (define (fold-left op init items) (define (iter result rest) (if (null? ...
22ccfaee7f7915cc2d781750dca67bc2de4da9fa5494e3ff59348cf693ef4128
discord-haskell/discord-haskell
ScheduledEvents.hs
{-# LANGUAGE GADTs #-} # LANGUAGE DataKinds # {-# LANGUAGE OverloadedStrings #-} -- | Provides actions for Scheduled Event API module Discord.Internal.Rest.ScheduledEvents ( ScheduledEventRequest(..) ) where import Data.Aeson ( ToJSON(toJSON) ) import Discord.Internal.Re...
null
https://raw.githubusercontent.com/discord-haskell/discord-haskell/98c74aff4a87aa1bef08559a7c1533b0d2ba2da9/src/Discord/Internal/Rest/ScheduledEvents.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # | Provides actions for Scheduled Event API | Data constructor for requests. See <-scheduled-event> | Gets the information about an Event | Modifies a Scheduled Event's information | Delete a ScheduledEvent | Gets the Users that subscribed to the event
# LANGUAGE DataKinds # module Discord.Internal.Rest.ScheduledEvents ( ScheduledEventRequest(..) ) where import Data.Aeson ( ToJSON(toJSON) ) import Discord.Internal.Rest.Prelude ( JsonRequest(..) , Request ...
8525e8dd66d64c73fa80296182136c62276f9f007dc2b4284a783728daa42fd7
ajkavanagh/vimwiki-publishing-system
Context.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE ExtendedDefaultRules #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} {-# LANGUAGE ScopedTypeVariables #-} # LANGUAGE TypeAp...
null
https://raw.githubusercontent.com/ajkavanagh/vimwiki-publishing-system/c358ea03bcdb576ce4a7a4e42ac38ba5e1816c7b/src/Lib/Context.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE ExtendedDefaultRules # # LANGUAGE FlexibleContexts # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators #
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE PolyKinds # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE AllowAmbiguousTypes # # OPTIONS_GHC -fplugin = Polys...
0f6abdbb66048f5ee7fc7a606183461c858803b7f4755b6371332d77cab7ce4c
sboehler/beans
Process.hs
module Beans.Process ( runLedger, runLedgers, ProcessException, ) where import Beans.Account (Account, AccountType (..)) import Beans.Amount (Amount) import Beans.Assertion (Assertion (..)) import Beans.Balance (Balance (Balance)) import qualified Beans.Balance as Balance import Beans.Close (Close (..)) im...
null
https://raw.githubusercontent.com/sboehler/beans/897fc30a602f49906eb952c4fd5c8c0bf05a6beb/src/Beans/Process.hs
haskell
------------------------------------------------------------------------------ PROCESSING PIPELINE update the date update the prices update normalized prices valuate ledgerstep (updating transactions) process openings process transactions to compute balance' process balance assertions valuate {asset, liability...
module Beans.Process ( runLedger, runLedgers, ProcessException, ) where import Beans.Account (Account, AccountType (..)) import Beans.Amount (Amount) import Beans.Assertion (Assertion (..)) import Beans.Balance (Balance (Balance)) import qualified Beans.Balance as Balance import Beans.Close (Close (..)) im...
0597dd7554cc2432a3ba25fb9b1c9be4b872da7d7efe71ac5c44545c5b187f88
henry-hz/erlang-trader
fix_engine.erl
-module(fix_engine). %% External API -compile(export_all). %% Internal API add_listener(From, Handler, Filter) -> Ref = make_ref(), fix_engine_server:add_listener(Ref, From, Handler, Filter), {node(), Ref}. remove_listener(From, Ref) -> fix_engine_server:remove_listener(Ref, From), ok. send(...
null
https://raw.githubusercontent.com/henry-hz/erlang-trader/5ec6a20902a894e0c29712f199bb6be3fad68a3b/fix_engine/src/fix_engine.erl
erlang
External API Internal API
-module(fix_engine). -compile(export_all). add_listener(From, Handler, Filter) -> Ref = make_ref(), fix_engine_server:add_listener(Ref, From, Handler, Filter), {node(), Ref}. remove_listener(From, Ref) -> fix_engine_server:remove_listener(Ref, From), ok. send(Data) -> ok.
80a7e8efd6faf8109a1542f23cb3eaa4c452dbe2d06fa687c7ee692115366b3b
OlafChitil/hat
IOBuiltin.hs
module Hat.IOBuiltin where import qualified System.IO as IO import System.IO(Handle,HandlePosn) import qualified Prelude import Hat.Hat as T import Hat.PreludeBuiltinTypes import Hat.Prelude import Hat.IOBuiltinTypes toHandle :: RefExp -> R Handle -> IO.Handle toHandle h (R e _) = e fromHandle :: RefExp -> IO.Handl...
null
https://raw.githubusercontent.com/OlafChitil/hat/8840a480c076f9f01e58ce24b346850169498be2/Hat/IOBuiltin.hs
haskell
module Hat.IOBuiltin where import qualified System.IO as IO import System.IO(Handle,HandlePosn) import qualified Prelude import Hat.Hat as T import Hat.PreludeBuiltinTypes import Hat.Prelude import Hat.IOBuiltinTypes toHandle :: RefExp -> R Handle -> IO.Handle toHandle h (R e _) = e fromHandle :: RefExp -> IO.Handl...
2ab0e3ca2715d9a3498cdc9079c75cdfa1849dcb7a116c0af305612238635db8
roddyyaga/jay
trees.ml
type ('terminal, 'nonterminal) completion = (('terminal, 'nonterminal) Grammar.rule * int) * int * int [@@deriving show] type ('t, 'nt) finished_node = ('t, 'nt) completion * ('t, 'nt) child list and ('t, 'nt) child = Nt of ('t, 'nt) finished_node | T of 't [@@deriving show] let npad s n = List.init n (fun _ -> s)...
null
https://raw.githubusercontent.com/roddyyaga/jay/3aa1dd8e1e3fdb89e437333f52c3c138af0ad7ee/lib/trees.ml
ocaml
TODO - combine with build_all
type ('terminal, 'nonterminal) completion = (('terminal, 'nonterminal) Grammar.rule * int) * int * int [@@deriving show] type ('t, 'nt) finished_node = ('t, 'nt) completion * ('t, 'nt) child list and ('t, 'nt) child = Nt of ('t, 'nt) finished_node | T of 't [@@deriving show] let npad s n = List.init n (fun _ -> s)...
e90bb9b315e76c950604e882de17769202cf08efa64c58af57ce1994cbde86ac
dparis/gen-phzr
keyboard.cljs
(ns phzr.impl.accessors.keyboard) (def keyboard-get-properties {:callback-context "callbackContext" :enabled "enabled" :event "event" :game "game" :last-char "lastChar" :last-key "lastKey" :on-down-callback "onDownCallback" :on-press-callback "onPressCallback" :on-up-callback "onUpCallback" ...
null
https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/keyboard.cljs
clojure
(ns phzr.impl.accessors.keyboard) (def keyboard-get-properties {:callback-context "callbackContext" :enabled "enabled" :event "event" :game "game" :last-char "lastChar" :last-key "lastKey" :on-down-callback "onDownCallback" :on-press-callback "onPressCallback" :on-up-callback "onUpCallback" ...
0e82929b04f6bc6e7139c69c0d69fdbb6b7043bde4a9a2e0dc930220ed7b753a
fetburner/Coq2SML
cemitcodes.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/kernel/cemitcodes.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Relocation information Buffering ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Author : as part of the b...
de9f1915aca7f72ee9f6938c096762e3a1c23aea2d1ce9b07a079be0aac9ad37
fp-alice/dante
info.cljs
(ns dante.views.info (:require [cljs-react-material-ui.reagent :as ui] [clojure.string :as string] [re-frame.core :as re-frame] [dante.state.http :as http])) (defn info [] (let [name (re-frame/subscribe [:username]) images (re-frame/subscribe [:images]) key ...
null
https://raw.githubusercontent.com/fp-alice/dante/3f5eb64fddbee7c2b0ae94282d30aa62f68e61ec/src/cljs/dante/views/info.cljs
clojure
(ns dante.views.info (:require [cljs-react-material-ui.reagent :as ui] [clojure.string :as string] [re-frame.core :as re-frame] [dante.state.http :as http])) (defn info [] (let [name (re-frame/subscribe [:username]) images (re-frame/subscribe [:images]) key ...
bc97d52c78942191299192099d6387ee4e0e09b9fcd6a1de19f67d44e0e630b9
yesodweb/wai
Recv.hs
{-# LANGUAGE ForeignFunctionInterface, OverloadedStrings #-} # LANGUAGE CPP # module Network.Socket.BufferPool.Recv ( receive , makeRecvN ) where import qualified Data.ByteString as BS import Data.ByteString.Internal (ByteString(..), unsafeCreate) import Data.IORef import Foreign.C.Error (eAGAIN, getErrno, th...
null
https://raw.githubusercontent.com/yesodweb/wai/3887d7c51db18ea28d42efafe3dd17f34ff9cb6d/recv/Network/Socket/BufferPool/Recv.hs
haskell
# LANGUAGE ForeignFunctionInterface, OverloadedStrings # -------------------------------------------------------------- | The receiving function with a buffer pool. The buffer pool is automatically managed. -------------------------------------------------------------- ----------------------------------------------...
# LANGUAGE CPP # module Network.Socket.BufferPool.Recv ( receive , makeRecvN ) where import qualified Data.ByteString as BS import Data.ByteString.Internal (ByteString(..), unsafeCreate) import Data.IORef import Foreign.C.Error (eAGAIN, getErrno, throwErrno) import Foreign.C.Types import Foreign.Ptr (Ptr, cas...
56db5178937343192bb7e58e5d6ade96571cef37b7a5570f2495fca661d38065
vyorkin/tiger
frame_x64.ml
open Core_kernel Every target machine architecture will have a different standard stack frame layout . But we do n't want the specifics of any particular machine intruding on the implementation of the semantic analysis module of the Tiger compiler . Thus we must use abstraction to represent frame...
null
https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter8/lib/frame_x64.ml
ocaml
Location of a formal parameter (function argument) or a local variable that may be placed in a frame or in a register Memory location at the specific offset from the frame pointer Register location Frame unique id (used for equality testing and tracing) Label at which the function's machine code begins...
open Core_kernel Every target machine architecture will have a different standard stack frame layout . But we do n't want the specifics of any particular machine intruding on the implementation of the semantic analysis module of the Tiger compiler . Thus we must use abstraction to represent frame...
2a3a62635d53ad8b84d86603048502c058a8c4fb972a5c7fdfa7a94b4b32423b
tweag/asterius
T149_A.hs
module Main (main) where -- See #149 Currently ( with GHC 7.0 ) the CSE works , just , -- but it's delicate. import System.CPUTime main :: IO () main = print $ playerMostOccur1 [1..m] m :: Int m = 22 playerMostOccur1 :: [Int] -> Int playerMostOccur1 [a] = a playerMostOccur1 (x:xs) | numOccur x (x:xs) > numOcc...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/perf/T149_A.hs
haskell
See #149 but it's delicate.
module Main (main) where Currently ( with GHC 7.0 ) the CSE works , just , import System.CPUTime main :: IO () main = print $ playerMostOccur1 [1..m] m :: Int m = 22 playerMostOccur1 :: [Int] -> Int playerMostOccur1 [a] = a playerMostOccur1 (x:xs) | numOccur x (x:xs) > numOccur (playerMostOccur1 xs) xs = x |...
92f1e281be24827cfd5eaecfd4e8a3c2cf56f74e76d07b5a45432d9a04add9fb
cedlemo/OCaml-GObject-Introspection
Registered_type_info.mli
* Copyright 2017 - 2019 , * This file is part of OCaml - GObject - Introspection . * * OCaml - GObject - Introspection 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 o...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GObject-Introspection/261c76d9e5d90f706edff1121a63bf5eb611399b/lib/Registered_type_info.mli
ocaml
* Obtain the gtype for this registered type or None which a special meaning. It means that either there is no type information associated with this info or that the shared library which provides the type_init function for this info cannot be called. * Add unref of the C underlying structure whith Gc.finali...
* Copyright 2017 - 2019 , * This file is part of OCaml - GObject - Introspection . * * OCaml - GObject - Introspection 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 o...
7c29d8de3e3b7f679f7e9ef0f99c7ec0ad9d975b89929327eed6954ce9c44bae
quietfanatic/neskell
ASoundEngine.hs
# LANGUAGE RecursiveDo , DeriveDataTypeable # -- Please import this qualified. module NES.ASoundEngine ( ASoundEngine, a_sound_engine', initialize', set_stream', run', note, delay, loop, repeat, set_env, call, ensure_length ) where import Prelude hiding (repeat) import Data.Word import Data.Typeable import ...
null
https://raw.githubusercontent.com/quietfanatic/neskell/63ebd4316959ab95c8b2a4aea21eb114340a39c0/lib/NES/ASoundEngine.hs
haskell
Please import this qualified. nn-- Takes a note table as input. We're assuming memory has been zeroed out. Y is either the low end of pos or the note index. play a note Also read a delay. Do a special comand
# LANGUAGE RecursiveDo , DeriveDataTypeable # module NES.ASoundEngine ( ASoundEngine, a_sound_engine', initialize', set_stream', run', note, delay, loop, repeat, set_env, call, ensure_length ) where import Prelude hiding (repeat) import Data.Word import Data.Typeable import Assembler import ASM import ASM650...
527aa68127daf7a94cbac9926a7c563b1754e697f7f2fb443649f137b7a641c1
dmillett/political-canvas
specs.clj
(ns political-canvas.shared.specs (:require [clojure.spec.alpha :as s] [political-canvas.shared.tools :as t]) (:use [political-canvas.shared.data.schema.objects]) (:import [political_canvas.shared.data.schema.objects Name Address EmailAddress SocialMedia])) ;; todo: placeholder for specs to assist wi...
null
https://raw.githubusercontent.com/dmillett/political-canvas/ec59a065b832277ec06f80e67977eee196a6a194/src/political_canvas/shared/specs.clj
clojure
todo: placeholder for specs to assist with names, campaigns, etc ... lots to do In cases where it might be useful to reuse a 'Model' data type like 'defrecord
(ns political-canvas.shared.specs (:require [clojure.spec.alpha :as s] [political-canvas.shared.tools :as t]) (:use [political-canvas.shared.data.schema.objects]) (:import [political_canvas.shared.data.schema.objects Name Address EmailAddress SocialMedia])) Now to add secondary validation for defr...
cd540e2b3ef7c4f820a6082b8479cc5d54c10fc4dbc1acb3bf785fe6e8847433
input-output-hk/project-icarus-importer
UtilSpec.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE RankNTypes # # LANGUAGE TypeFamilies # -- | Pos.Util specification module Test.Pos.UtilSpec ( spec ) where import Universum import qualified Data.List.NonEmpty as NE import qualified GHC.Exts as IL (IsList (..)) import Pos.Util.Chrono (C...
null
https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/util/test/Test/Pos/UtilSpec.hs
haskell
# LANGUAGE DataKinds # | Pos.Util specification
# LANGUAGE RankNTypes # # LANGUAGE TypeFamilies # module Test.Pos.UtilSpec ( spec ) where import Universum import qualified Data.List.NonEmpty as NE import qualified GHC.Exts as IL (IsList (..)) import Pos.Util.Chrono (Chrono (..), NewestFirst (..), OldestFirst (..)) import ...
840e1344dc923716404708c7e61083f9bcb2c9177164c16514d86659617ff52b
Abbath/Calculator
Parser.hs
# LANGUAGE FlexibleContexts , OverloadedStrings # module Calculator.Parser ( parse ) where import Calculator.Types import Control.Arrow (first) import Control.Monad.Except import Control.Monad.Reader import Data.Map.Strict (Map) import qualified Data.M...
null
https://raw.githubusercontent.com/Abbath/Calculator/75985d5a9b4e602bc087462c8046bf2cf692a0e1/Calculator/src/Calculator/Parser.hs
haskell
# LANGUAGE FlexibleContexts , OverloadedStrings # module Calculator.Parser ( parse ) where import Calculator.Types import Control.Arrow (first) import Control.Monad.Except import Control.Monad.Reader import Data.Map.Strict (Map) import qualified Data.M...
3ed70fde5582bc36758c8353cf6e646dd482f2e9fd81ee5c08b07147f423e355
kadena-io/digraph
Main.hs
# LANGUAGE CPP # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # -- | -- Module: Main Copyright : Copyright © 2019 - 2020 Kadena LLC . License : MIT Maintainer : < > -- Stability: experimental -- module Main ( main ) where import Data.Bitraversable #if !MIN_VERSION...
null
https://raw.githubusercontent.com/kadena-io/digraph/bc8875ddb572534227f0136623758d597064a010/test/Main.hs
haskell
# LANGUAGE OverloadedStrings # | Module: Main Stability: experimental internal modules -------------------------------------------------------------------------- -- -------------------------------------------------------------------------- -- Main
# LANGUAGE CPP # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # Copyright : Copyright © 2019 - 2020 Kadena LLC . License : MIT Maintainer : < > module Main ( main ) where import Data.Bitraversable #if !MIN_VERSION_base(4,11,0) import Data.Semigroup #endif import System.Exit import Test.QuickCheck...
2fd4d41e01c6415282a06edf705318b00fd1e7fa29d68e4be59797e874255f8a
coccinelle/coccinelle
index.ml
* This file is part of Coccinelle , licensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, licensed under the terms of the GPL v2. * See copyright.txt in the Cocci...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/2d0014efa4c67f4c3b4687cbcddef7456bad9aac/parsing_cocci/index.ml
ocaml
create an index for each constructor doesn't really work - requires that identical terms with no token subterms (eg dots) not appear on the same line added after added after added after added after added after added after added after added after added after
* This file is part of Coccinelle , licensed under the terms of the GPL v2 . * See copyright.txt in the Coccinelle source code for more information . * The Coccinelle source code can be obtained at * This file is part of Coccinelle, licensed under the terms of the GPL v2. * See copyright.txt in the Cocci...
0a80c19a1d6cff4e6551c7dd8ca25b5931e9d565c3315074eee8f8bd0e96a0a3
LimitEpsilon/reanalyze-ropas
CL.ml
Compiler libs : use the host compiler libs except on 4.06 use vendored ones . This allows to target 4.06 on any compiler by overriding OCAML_VERSION . This allows to target 4.06 on any compiler by overriding OCAML_VERSION. *) [%%import "../config.h"] [%%if ocaml_version <= (4, 06, 1) || defined npm] include ...
null
https://raw.githubusercontent.com/LimitEpsilon/reanalyze-ropas/bb14574b99fc8d0d25998bfb32d1c6ff0fe06b19/src/CL.ml
ocaml
Compiler libs : use the host compiler libs except on 4.06 use vendored ones . This allows to target 4.06 on any compiler by overriding OCAML_VERSION . This allows to target 4.06 on any compiler by overriding OCAML_VERSION. *) [%%import "../config.h"] [%%if ocaml_version <= (4, 06, 1) || defined npm] include ...
d8ff19b17bc7d24d2f55340b30e718d3de6ec10d3b7dfe0e34d5e3670ea2a589
UBTECH-Walker/WalkerSimulationFor2020WAIC
cruiser_navigation_motion.lisp
; Auto-generated. Do not edit! (cl:in-package cruiser_msgs-msg) ;//! \htmlinclude cruiser_navigation_motion.msg.html (cl:defclass <cruiser_navigation_motion> (roslisp-msg-protocol:ros-message) ((header :reader header :initarg :header :type std_msgs-msg:Header :initform (cl:make-instance 'std_msgs...
null
https://raw.githubusercontent.com/UBTECH-Walker/WalkerSimulationFor2020WAIC/7cdb21dabb8423994ba3f6021bc7934290d5faa9/walker_WAIC_16.04_v1.2_20200616/walker_install/share/common-lisp/ros/cruiser_msgs/msg/cruiser_navigation_motion.lisp
lisp
Auto-generated. Do not edit! //! \htmlinclude cruiser_navigation_motion.msg.html
(cl:in-package cruiser_msgs-msg) (cl:defclass <cruiser_navigation_motion> (roslisp-msg-protocol:ros-message) ((header :reader header :initarg :header :type std_msgs-msg:Header :initform (cl:make-instance 'std_msgs-msg:Header)) (datapacket :reader datapacket :initarg :datapacket :ty...
2c32974294c382ebcb010e467ea76a7d9667333ac32238c8ca273f3b73097bff
helium/blockchain-core
blockchain_state_channel_sup.erl
%%%------------------------------------------------------------------- %% @doc = = Blockchain State Channel Sup = = %% @end %%%------------------------------------------------------------------- -module(blockchain_state_channel_sup). -behaviour(supervisor). %% API -export([start_link/1]). %% Supervisor callbacks -...
null
https://raw.githubusercontent.com/helium/blockchain-core/9833392b838e8e062fb01ddd9f42e8cd1d90046b/src/state_channel/blockchain_state_channel_sup.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API Supervisor callbacks ------------------------------------------------------------------ API functions -------------------------------------------------------------...
= = Blockchain State Channel Sup = = -module(blockchain_state_channel_sup). -behaviour(supervisor). -export([start_link/1]). -export([init/1]). -define(WORKER(I, Args), #{ id => I, start => {I, start_link, Args}, restart => permanent, shutdown => 5000, type => worker, modules => [I] }). -d...
a0a48bb2003131b3672dd4424940a1a6a6b6f79c03d8a0befa1618b2593b275d
leo-project/leofs
tcp_server_sup.erl
%%====================================================================== %% LeoManager %% Copyright ( c ) 2012 - 2017 Rakuten , Inc. %% 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 ...
null
https://raw.githubusercontent.com/leo-project/leofs/4ff701e0f4a4cf39a968dbe078b9c2412a22f995/apps/leo_manager/src/tcp_server_sup.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 permis...
LeoManager Copyright ( c ) 2012 - 2017 Rakuten , Inc. 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 -module(tcp_server_sup)...
4a896d6ceed6e08d08312b26f3bcb929158a30ce9de42de14c2d7166fc0b19b5
NorfairKing/tickler
PostIntrayTrigger.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # module Tickler.Server.Handler.Protected.PostIntrayTrigger (servePostIntrayTrigger) where import qualified Data.Text as T import Data.Time import Data.UUID.Typed import Database.P...
null
https://raw.githubusercontent.com/NorfairKing/tickler/71c6aec471d095fe2357e135bed90a92619de393/tickler-server/src/Tickler/Server/Handler/Protected/PostIntrayTrigger.hs
haskell
# LANGUAGE GADTs #
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE RecordWildCards # module Tickler.Server.Handler.Protected.PostIntrayTrigger (servePostIntrayTrigger) where import qualified Data.Text as T import Data.Time import Data.UUID.Typed import Database.Persist import Import im...
56301b01cabfe462c929258da41e759818f555d516c5d2baa7348c4f75e89527
gedge-platform/gedge-platform
rabbit_mqtt_retained_msg_store_noop.erl
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 /. %% Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_mqtt_retained_msg_store_noop). -b...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_mqtt/src/rabbit_mqtt_retained_msg_store_noop.erl
erlang
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 /. Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_mqtt_retained_msg_store_noop). -behavio...
76662a888de246affb14de06b82a5af164ba4652427d6d4e0a8de71ed0888bd7
esb-lwb/lwb
roths_ltl_test.clj
lwb Logic WorkBench -- Natural deduction -- tests Copyright ( c ) 2016 , THM . All rights reserved . ; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) . ; By using this software in any fashion, you are agreeing to be bound by ; the terms of this licen...
null
https://raw.githubusercontent.com/esb-lwb/lwb/bba51ada7f7316341733d37b0dc4848c4891ef3a/test/lwb/nd/roths_ltl_test.clj
clojure
The use and distribution terms for this software are covered by the By using this software in any fashion, you are agreeing to be bound by the terms of this license. (step-f :and-i m n) (step-f :and-i m) (step-f :and-i :? n) (step-b :and-i k) (step-b :and-i k m) (step-b :and-i k :? n) (step-f :and-e1 m) (step-b...
lwb Logic WorkBench -- Natural deduction -- tests Copyright ( c ) 2016 , THM . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) . (ns lwb.nd.roths-ltl-test (:require [clojure.test :refer :all] [lwb.nd.rules :refer :all] [lwb.nd.repl :refer :all])) (defn setup [] (load...
88bc13e087a0ff8640819b7747bd32ac83700a603417d5669d300742c44f280c
binaryage/cljs-devtools
runner.cljs
(ns devtools.runner (:require-macros [devtools.oops :refer [unchecked-aset]]) (:require [cljs.test :as test :refer-macros [run-tests] :refer [report inc-report-counter! testing-vars-str get-current-env testing-contexts-str]] [devtools.tests.core] [devtools.tests.mun...
null
https://raw.githubusercontent.com/binaryage/cljs-devtools/d07fc6d404479b1ddd32cecc105009de77e3cba7/test/src/tests/devtools/runner.cljs
clojure
taken from only present diffs for (not (js-equals a b)) forms -- entry point ------------------------------------------------------------------------------------------------------------
(ns devtools.runner (:require-macros [devtools.oops :refer [unchecked-aset]]) (:require [cljs.test :as test :refer-macros [run-tests] :refer [report inc-report-counter! testing-vars-str get-current-env testing-contexts-str]] [devtools.tests.core] [devtools.tests.mun...
565bd5f5848ffb4ab2c90f9127dd7d79ea832145f14c429f5731ed73d5aedde7
lspitzner/brittany
Test169.hs
import Test ( longbindingNameThatoverflowsColum ) import Test ( Long ( List ...
null
https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test169.hs
haskell
import Test ( longbindingNameThatoverflowsColum ) import Test ( Long ( List ...
b4182fbecb647325585edab2185206ca35578cb77ea192bad995c553fdb6d084
nikodemus/SBCL
type.pure.lisp
This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from scratch after the fork from CMU CL . ;;;; ;;;; This software is in the public domain and is provided with ;;;;...
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/tests/type.pure.lisp
lisp
more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. #(1 2 3)) give an error which prints as "This is not a (OR SINGLE-FLOAT DOUBLE-FLOAT RATION...
This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . (in-package "CL-USER") (locally (declare (notinline mapcar)) (mapcar (lambda (args) (destructuring-bind (obj type-spec result) args (flet...
18e37c03f8fa694b905642f10d96461c244c89ff79ffa5972b15d85472b1df67
galdor/tungsten
strings.lisp
(in-package :core) (defmacro string-case (string &rest clauses) (let ((string-var (gensym "STRING-"))) `(let ((,string-var ,string)) (declare (ignorable ,string-var)) (cond ,@(mapcar (lambda (clause) (destructuring-bind (keys &rest forms) clause ...
null
https://raw.githubusercontent.com/galdor/tungsten/9b0972da374e438e4050f1f367818166a517be1d/tungsten-core/src/strings.lisp
lisp
(in-package :core) (defmacro string-case (string &rest clauses) (let ((string-var (gensym "STRING-"))) `(let ((,string-var ,string)) (declare (ignorable ,string-var)) (cond ,@(mapcar (lambda (clause) (destructuring-bind (keys &rest forms) clause ...
b8180b37841e71383c5db02d056816490cd73e661f68d7593aa802d28627137b
project-oak/hafnium-verification
ALVar.ml
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/al/ALVar.ml
ocaml
* a regexp and its cached compiled version * true if and only if a substring of container matches the regular expression
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
d8493f63a973404f3e364676402f83d21427f8740287384d108b808f9d930c9c
cyverse-archive/DiscoveryEnvironmentBackend
favorites.clj
(ns donkey.services.metadata.favorites (:require [clojure.set :as set] [cheshire.core :as json] [donkey.auth.user-attributes :as user] [donkey.clients.data-info :as data] [donkey.clients.metadata.raw :as metadata] [donkey.util.service :as svc] [d...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/Donkey/src/donkey/services/metadata/favorites.clj
clojure
(ns donkey.services.metadata.favorites (:require [clojure.set :as set] [cheshire.core :as json] [donkey.auth.user-attributes :as user] [donkey.clients.data-info :as data] [donkey.clients.metadata.raw :as metadata] [donkey.util.service :as svc] [d...
2d973e8444509e8e6cf89ad264cc754c468289537f7c33df6ca1dd64203bf655
Minoru/hakyll-convert
IO.hs
{-# LANGUAGE OverloadedStrings #-} module Golden.IO where import qualified Data.ByteString.Lazy.Char8 as LBS import Data.Default (def) import qualified Data.Time.Calendar as Calendar import Data.Time.Clock (UTCTime (..), secondsToDiffTime) import Hakyll.Convert.Common (DistilledPost (..)) import Hakyll.Convert.IO (sa...
null
https://raw.githubusercontent.com/Minoru/hakyll-convert/9e5006b996586d864c5f3c6f716f3c10aeb51bbb/test/golden/Golden/IO.hs
haskell
# LANGUAGE OverloadedStrings # Ignore the generated filename -- we'll just check if the file is at the expected place instead. Ignore the generated filename -- we'll just check if the file is at the expected place instead.
module Golden.IO where import qualified Data.ByteString.Lazy.Char8 as LBS import Data.Default (def) import qualified Data.Time.Calendar as Calendar import Data.Time.Clock (UTCTime (..), secondsToDiffTime) import Hakyll.Convert.Common (DistilledPost (..)) import Hakyll.Convert.IO (savePost) import System.FilePath ((</...
8e69305a45333fdf289a579b178d220ceeccb65ce3795a09a0c4748af5d09b80
kmi/ocml
concepts.lisp
, 2007 (in-package :ocml.tests) (def-suite concepts-suite :description "Tests for OCML's concept reasoning.") (in-suite concepts-suite) (defun c (symbol) (ocml::get-domain-class symbol)) (test subsumption-test ;; Test non-reflexivity, transitivity. (is-true (ocml::subclass-of* (c 'ocml::integer) (lis...
null
https://raw.githubusercontent.com/kmi/ocml/90b0b173f588c580c26393c94f9970282c640f4d/tests/concepts.lisp
lisp
Test non-reflexivity, transitivity.
, 2007 (in-package :ocml.tests) (def-suite concepts-suite :description "Tests for OCML's concept reasoning.") (in-suite concepts-suite) (defun c (symbol) (ocml::get-domain-class symbol)) (test subsumption-test (is-true (ocml::subclass-of* (c 'ocml::integer) (list (c 'ocml::number)))) (is-true (ocml::...
21c4cea3277a67bcef40e156c9471532049ae6fc23dc35b15a5981241c0cb0a3
pavlobaron/DevRoulette
dr_session_state.erl
@author Baron < > @doc This is the game session state module of DevRoulette . Two players will be assigned to a session before it will be ' activated ' 2010 Pavlo Baron -module(dr_session_state). -behaviour(gen_fsm). -export([start_link/1]). -export([init/1]). start_link(Id) -> gen_fsm:start_link({loc...
null
https://raw.githubusercontent.com/pavlobaron/DevRoulette/2aaa582f65645c7178e98dce08a4535dabf59793/src/engine/dr_session_state.erl
erlang
@author Baron < > @doc This is the game session state module of DevRoulette . Two players will be assigned to a session before it will be ' activated ' 2010 Pavlo Baron -module(dr_session_state). -behaviour(gen_fsm). -export([start_link/1]). -export([init/1]). start_link(Id) -> gen_fsm:start_link({loc...
5bf1f0ad6b87e6e94de5997c7d8ed372f966e115b008236c67720f26b00cf1d3
xsc/base64-clj
apache_commons_base64.clj
(ns base64-clj-benchmark.apache-commons-base64 (:use base64-clj-benchmark.data) (:import org.apache.commons.codec.binary.Base64)) (defmacro apache-base64-encode [d] `(Base64/encodeBase64String ~d)) (defmacro apache-base64-decode [d] `(Base64/decodeBase64 ~d)) (defbench -main apache-base64-encode apache...
null
https://raw.githubusercontent.com/xsc/base64-clj/56a016526cb5ea9e2aed9fd89bc703a5a83c3547/benchmark/base64_clj_benchmark/apache_commons_base64.clj
clojure
(ns base64-clj-benchmark.apache-commons-base64 (:use base64-clj-benchmark.data) (:import org.apache.commons.codec.binary.Base64)) (defmacro apache-base64-encode [d] `(Base64/encodeBase64String ~d)) (defmacro apache-base64-decode [d] `(Base64/decodeBase64 ~d)) (defbench -main apache-base64-encode apache...
72044a8bd8802d11c84f9c64f6cff704fe544b899db0febf9c54ab2ff5f86387
dmjio/miso
Mathml.hs
----------------------------------------------------------------------------- -- | Module : Miso . Copyright : ( C ) 2016 - 2018 -- License : BSD3-style (see the file LICENSE) Maintainer : < > -- Stability : experimental -- Portability : non-portable -- -- Example usage: -- -- @ ...
null
https://raw.githubusercontent.com/dmjio/miso/0be227bca6e0aec16a69a1c09f9a90624af070c1/src/Miso/Mathml.hs
haskell
--------------------------------------------------------------------------- | License : BSD3-style (see the file LICENSE) Stability : experimental Portability : non-portable Example usage: @ @ <> --------------------------------------------------------------------------
Module : Miso . Copyright : ( C ) 2016 - 2018 Maintainer : < > More information on how to use ` miso ` is available on GitHub module Miso.Mathml ( module Miso.Mathml.Element ) where import Miso.Mathml.Element
b2256584129c35ff15cd25191c0e31e059322414cb4ab21ac8f9c0fe27b66273
aggelgian/erlang-algorithms
doc.erl
-module(doc). -export([make_doc/0]). -spec make_doc() -> ok. make_doc() -> Src = filename:absname("src"), Mods = [graph, heap, union_find, dfs, bfs, graph_lib, dijkstra, kruskal, edmonds_karp, a_star], Fs = [Src ++ "/" ++ atom_to_list(M) ++ ".erl" || M <- Mods], edoc:files(Fs, [{dir, "doc"}]).
null
https://raw.githubusercontent.com/aggelgian/erlang-algorithms/8ceee72146f2a6eff70a16e3e9a74d2ed072fa0a/src/doc.erl
erlang
-module(doc). -export([make_doc/0]). -spec make_doc() -> ok. make_doc() -> Src = filename:absname("src"), Mods = [graph, heap, union_find, dfs, bfs, graph_lib, dijkstra, kruskal, edmonds_karp, a_star], Fs = [Src ++ "/" ++ atom_to_list(M) ++ ".erl" || M <- Mods], edoc:files(Fs, [{dir, "doc"}]).
f788d97abf08de6d4f68370c92ee9c78252f9a9e15490f5a57115e97ed5dcbca
Perry961002/SICP
exe2.80-=zero.scm
;安装到常规数包 (define (install-scheme-number-package) (put '=zero? '(scheme-number scheme-number) (lambda (x) (= x 0))) 'done) ;安装到有理数包 (define (install-rational-package) (put '=zero? '(rational rational) (lambda (x) (= (numer x) 0))) 'done) ;安装到复数包 (define (install-complex-package) (put '=zero '(compl...
null
https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap2/exercise/exe2.80-%3Dzero.scm
scheme
安装到常规数包 安装到有理数包 安装到复数包
(define (install-scheme-number-package) (put '=zero? '(scheme-number scheme-number) (lambda (x) (= x 0))) 'done) (define (install-rational-package) (put '=zero? '(rational rational) (lambda (x) (= (numer x) 0))) 'done) (define (install-complex-package) (put '=zero '(complex complex) (lambda (z) ...
3e2e3c60c8bac887e7ec0093d34140522579768c75700f0275a424ff5eb00fb6
sdiehl/elliptic-curve
BN254A.hs
module Data.Curve.Weierstrass.BN254A ( module Data.Curve.Weierstrass , Point(..) -- * BN254A curve , module Data.Curve.Weierstrass.BN254A ) where import Protolude import Data.Field.Galois import GHC.Natural (Natural) import Data.Curve.Weierstrass -----------------------------------------------------------...
null
https://raw.githubusercontent.com/sdiehl/elliptic-curve/445e196a550e36e0f25bd4d9d6a38676b4cf2be8/src/Data/Curve/Weierstrass/BN254A.hs
haskell
* BN254A curve ----------------------------------------------------------------------------- Types ----------------------------------------------------------------------------- | BN254A curve. | Field of points of BN254A curve. | Field of coefficients of BN254A curve. # INLINABLE a_ # # INLINABLE h_ # | Affine BN...
module Data.Curve.Weierstrass.BN254A ( module Data.Curve.Weierstrass , Point(..) , module Data.Curve.Weierstrass.BN254A ) where import Protolude import Data.Field.Galois import GHC.Natural (Natural) import Data.Curve.Weierstrass data BN254A type Fq = Prime Q type Q = 0x2370fb049d410fbe4e761a9886e502417d02...
16215d4c4282734cbb41a88e5a08837264ad3f6664906595b8d2a42268c2d4f2
webyrd/n-grams-for-synthesis
26.scm
Copyright ( C ) ( 2016 ) . All Rights Reserved . ;; Permission is hereby granted, free of charge, to any person ;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the Software without ;; restriction, including without limitation the rights to use, copy, ...
null
https://raw.githubusercontent.com/webyrd/n-grams-for-synthesis/b53b071e53445337d3fe20db0249363aeb9f3e51/datasets/srfi/srfi-150/srfi/26.scm
scheme
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies furnished to do so, subject to the following conditions: ...
Copyright ( C ) ( 2016 ) . All Rights Reserved . files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY K...
e1901404cf9e92fda553f6c747a861080e2f022ece7317126083d401cd71c841
rpav/spell-and-dagger
game-char.lisp
(in-package :game) ;; Quick take on character (defclass game-char (actor) ((life :initform 5 :reader char-life) (max-life :initform 5 :accessor char-max-life) (magic :initform 5 :reader char-magic) (max-magic :initform 5 :accessor char-max-magic) (spells :initform nil :accessor char-spells) (eqp-sp...
null
https://raw.githubusercontent.com/rpav/spell-and-dagger/0424416ff14a6758d27cc0f84c21bf85df024a7b/src/entity/game-char.lisp
lisp
Quick take on character Could we do this smarter? Probably. util dagger-pickup This is a hack for the jam, it should be moved into a more general class, more infrastructure for items etc.
(in-package :game) (defclass game-char (actor) ((life :initform 5 :reader char-life) (max-life :initform 5 :accessor char-max-life) (magic :initform 5 :reader char-magic) (max-magic :initform 5 :accessor char-max-magic) (spells :initform nil :accessor char-spells) (eqp-spell :initform nil :accessor c...
b96ff8b1519d06d620c0f2fa1d79a922c291e4281e188597734812ca564ec4ae
np/camllexer
input.ml
$:$
null
https://raw.githubusercontent.com/np/camllexer/5222a062cb4f0d651e41a66a875c39941137b67d/tests/antiquot-colon.t/input.ml
ocaml
$:$
4f19f94d41eab1e9a6a3d6ddb56792e1cadff00b95a8d46264fdfd02bbfb2927
mkoppmann/eselsohr
Main.hs
module Main where import Options.Applicative ( CommandFields , Mod , Parser , ParserInfo , ParserPrefs (..) , command , commandGroup , customExecParser , defaultPrefs , execParser , fullDesc , header , help , helper , hidden , info , long , option...
null
https://raw.githubusercontent.com/mkoppmann/eselsohr/3bb8609199c1dfda94935e6dde0c46fc429de84e/app/Main.hs
haskell
---------------------------------------------------------------------- ----------------------------------------------------------------------
module Main where import Options.Applicative ( CommandFields , Mod , Parser , ParserInfo , ParserPrefs (..) , command , commandGroup , customExecParser , defaultPrefs , execParser , fullDesc , header , help , helper , hidden , info , long , option...
e3d4b7a19be957b758c46a156fa2eceefc17d77657265dea5b23640de1cc7cf4
anuyts/menkar
MCont.hs
# LANGUAGE UndecidableInstances # module Control.Monad.MCont where import Control.Monad.Trans.Class import Control.Monad.State import Control.Monad.Except import Control.Monad.Trans.Cont -- | THIS THING DOESN'T EVEN SATISFY THE RIGHT UNIT LAW FOR MONADS ! ! ! ! ! ! ! ! ! data MContT r m a = MContT { runMCont...
null
https://raw.githubusercontent.com/anuyts/menkar/1f00e9febd1e9ed70c138ae8232b1c72a17d31da/menkar/obsolete/Control/Monad/MCont.hs
haskell
| THIS THING DOESN'T EVEN SATISFY THE RIGHT UNIT LAW FOR MONADS ! ! ! ! ! ! ! ! ! | THIS THING DOESN'T EVEN SATISFY THE RIGHT UNIT LAW FOR MONADS!!!!!!!!! (cmg :: MContT r m (t -> b)) <*> (cmt :: MContT r m t) = MContT $ \ kmb -> let f :: (t -> b) -> MContT r m b f g' = g' <$> cmt kg...
# LANGUAGE UndecidableInstances # module Control.Monad.MCont where import Control.Monad.Trans.Class import Control.Monad.State import Control.Monad.Except import Control.Monad.Trans.Cont data MContT r m a = MContT { runMContT : : ( m a - > m r ) - > m r } deriving Functor evalMContT : : MContT r m r - >...
21cf72599c6ab14c07ccb17311d0c9392fb3bd25625ec555283098dc50b8c4e9
phronmophobic/clj-media
cljfx.clj
(ns com.phronemophobic.clj-media.cljfx (:require [membrane.ui :as ui] membrane.component [membrane.cljfx :as cljfx] [avclj :as avclj] [tech.v3.datatype :as dtype] [tech.v3.libs.buffered-image :as bufimg] ) (:import javafx.embed.swi...
null
https://raw.githubusercontent.com/phronmophobic/clj-media/374d778667ca7fb3bda295106ad2701cf79b72fe/src/com/phronemophobic/clj_media/cljfx.clj
clojure
(ns com.phronemophobic.clj-media.cljfx (:require [membrane.ui :as ui] membrane.component [membrane.cljfx :as cljfx] [avclj :as avclj] [tech.v3.datatype :as dtype] [tech.v3.libs.buffered-image :as bufimg] ) (:import javafx.embed.swi...
3f9178c509f3cbb5df34f2389a29068aa17948e6eaacb9c1739be06d4c92eeeb
minad/intro
Trustworthy.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE KindSignatures # # LANGUAGE NoImplicitPrelude # # LANGUAGE Trustworthy # ----------------------------------------------------------------------------- -- | -- Module : Intro.Trustworthy Copyright : ( c ) 2016 - 2017 License : MIT -- -- Maintainer : ...
null
https://raw.githubusercontent.com/minad/intro/45a0bbcfebae747c77e39d30f7ed9c7bb52ac098/src/Intro/Trustworthy.hs
haskell
# LANGUAGE ConstraintKinds # --------------------------------------------------------------------------- | Module : Intro.Trustworthy Maintainer : Stability : experimental Portability : portable Trustworthy reexports from 'GHC.Exts' and 'Debug.Trace' -----------------------------------------------...
# LANGUAGE KindSignatures # # LANGUAGE NoImplicitPrelude # # LANGUAGE Trustworthy # Copyright : ( c ) 2016 - 2017 License : MIT module Intro.Trustworthy ( GHC.Exts.IsList( Item , fromList , toList ) , Constraint , HasCallStack , trace , traceIO , traceId , trace...
32fda2d84a1bbe2578bfcb37c11815e50a1614ad5e35234742aefdfd499206ef
returntocorp/semgrep
AST_bash.ml
(* Bash AST type definition. References: - man page: -pages/man1/bash.1.html#SHELL_GRAMMAR *) (* Disable warnings against records with identical field names. Typically, it's the 'loc' field. *) [@@@warning "-30"] The type of input . Each results in a slightly different generic AST . type input_kind ...
null
https://raw.githubusercontent.com/returntocorp/semgrep/dcea978347df81cbc8f2c2b49b80c1980f6194cf/languages/bash/ast/AST_bash.ml
ocaml
Bash AST type definition. References: - man page: -pages/man1/bash.1.html#SHELL_GRAMMAR Disable warnings against records with identical field names. Typically, it's the 'loc' field. *************************************************************************** Token info *****************************...
[@@@warning "-30"] The type of input . Each results in a slightly different generic AST . type input_kind = Pattern | Program type tok = Parse_info.t [@@deriving show] A location is made of the first token and the last token in the source code . Each node of the AST has a field that 's either a loc or ...
3a1963b2f44cc19a9ff1f192646e5001fef03544764877602bb824102affffcf
crategus/cl-cffi-gtk
rtest-gtk-entry-completion.lisp
(def-suite gtk-entry-completion :in gtk-suite) (in-suite gtk-entry-completion) ;;; --- Types and Values ------------------------------------------------------- ;;; GtkEntryCompletion (test g-entry-completion-class ;; Type check (is (g-type-is-object "GtkEntryCompletion")) ;; Check the registered name (is...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/test/rtest-gtk-entry-completion.lisp
lisp
--- Types and Values ------------------------------------------------------- GtkEntryCompletion Type check Check the registered name Check the type initializer Check the parent Check the children Check the interfaces Check the class properties Check the class definition --- Properties -------------------...
(def-suite gtk-entry-completion :in gtk-suite) (in-suite gtk-entry-completion) (test g-entry-completion-class (is (g-type-is-object "GtkEntryCompletion")) (is (eq 'gtk-entry-completion (registered-object-type-by-name "GtkEntryCompletion"))) (is (eq (gtype "GtkEntryCompletion") (gtype (forei...
394235fa3de98a36a9d367da4c33a0c93868285b8181461b6a676547e20eb6ae
softwarelanguageslab/maf
R5RS_various_rsa-1.scm
; Changes: * removed : 0 * added : 1 * swaps : 0 * negated predicates : 1 * swapped branches : 1 * calls to i d fun : 1 (letrec ((extended-gcd (lambda (a b) (if (= (modulo a b) 0) (cons 0 1) (let* ((x:y (extended-gcd b (modulo ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_various_rsa-1.scm
scheme
Changes:
* removed : 0 * added : 1 * swaps : 0 * negated predicates : 1 * swapped branches : 1 * calls to i d fun : 1 (letrec ((extended-gcd (lambda (a b) (if (= (modulo a b) 0) (cons 0 1) (let* ((x:y (extended-gcd b (modulo a b))) ...
55f6455e0a112b500fdc76a73110391f08c988f686ddec6b2f0589f8a94f1bc1
rudymatela/tankode
left-turner.hs
import Tankode.Basic ident :: Id ident = Id { name = "left-turner" , bodyColour = "red3" , radarColour = "red3" , scanColour = "red8" , trackColour = "red3" , bulletColour = "red9" , gunColour = "yellow7" } leftTurner :: Tankode () leftTurner input = output { accel = 0 , body = 0 , gun...
null
https://raw.githubusercontent.com/rudymatela/tankode/299ec6f78a9a18a8fc902be911a556d0497c30e1/haskell/eg/left-turner.hs
haskell
import Tankode.Basic ident :: Id ident = Id { name = "left-turner" , bodyColour = "red3" , radarColour = "red3" , scanColour = "red8" , trackColour = "red3" , bulletColour = "red9" , gunColour = "yellow7" } leftTurner :: Tankode () leftTurner input = output { accel = 0 , body = 0 , gun...
c1786f934469e9b5d9a195f8b7cfbed921b3bb0834559fab91a152e26160f778
mfp/extprot
ptypes.ml
include Protocol_types open ExtList let declaration_name = function Message_decl (n, _, _, _) | Type_decl (n, _, _, _) -> n let declaration_arity = function Message_decl _ -> 0 | Type_decl (_, l, _, _) -> List.length l module SSet = Set.Make(struct type t = string let compare = String.compare end) module SMap...
null
https://raw.githubusercontent.com/mfp/extprot/c69eb66398e35b964c4232a7c3c85151fb5eddbe/compiler/ptypes.ml
ocaml
subset name orig field subset orig
include Protocol_types open ExtList let declaration_name = function Message_decl (n, _, _, _) | Type_decl (n, _, _, _) -> n let declaration_arity = function Message_decl _ -> 0 | Type_decl (_, l, _, _) -> List.length l module SSet = Set.Make(struct type t = string let compare = String.compare end) module SMap...
e43c2b7f2b0c95f92133da81dddb4a2cf78d876634bc48af04d875259ca30467
skeeto/euler-cl
euler-18.lisp
Project Euler - Problem 18 ;; By starting at the top of the triangle below and moving to adjacent ;; numbers on the row below, the maximum total from top to bottom is 23 . ;; 3 7 4 2 4 6 ;; 8 5 9 3 That is , 3 + 7 + 4 + 9 = 23 . ;; Find the maximum total from top to bottom of the tri...
null
https://raw.githubusercontent.com/skeeto/euler-cl/82000252703070274e09bd13f9effdca68705404/euler-18.lisp
lisp
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 3 8 5 9 3 Find the maximum total from top to bottom of the triangle below: it can not be solved by brute force, and requires a clever method! ;o)
Project Euler - Problem 18 23 . 7 4 2 4 6 That is , 3 + 7 + 4 + 9 = 23 . 75 95 64 17 47 82 18 35 87 10 20 04 82 47 65 ...
e705513b9752178617ee56ce6478c4d1c1565d1248e66760e9b57d633ba07061
masaomi-yamaguchi/synbit
LazyEvalP.hs
# LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # { - # OPTIONS_GHC -Wunused - imports # - } -- {-# OPTIONS_GHC -fwarn-incomplete-patterns #-} module Synthesis.LazyEvalP where import Value hiding (Store) import Control.Monad.Sharing (resultListIO, Co...
null
https://raw.githubusercontent.com/masaomi-yamaguchi/synbit/4553ae090dfcda4965a16b09130c1d6874b5a849/src/Synthesis/LazyEvalP.hs
haskell
{-# OPTIONS_GHC -fwarn-incomplete-patterns #-} env, v, mexpはshareされていることを仮定 Value は bidirectional ではない Residual Exp は bidirectional heads以外はshareされている。headsは後に1回しか使われないので無問題 liftIO $ putStrLn "orginal branch was taken" liftIO $ putStrLn "branch switch" do liftIO $ putStrLn $ "cannnot find match branch" bindは後...
# LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # { - # OPTIONS_GHC -Wunused - imports # - } module Synthesis.LazyEvalP where import Value hiding (Store) import Control.Monad.Sharing (resultListIO, Convertible(..) ...