_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
8b0eb513adbd4cb2bd2b4321df3eb414ba6a29559dcec5ee03e74b5648570b1a
karimarttila/clojure
reset_dynamodb_sessions.clj
(ns simpleserver.testutils.reset-dynamodb-sessions (:require [clojure.tools.logging :as log] [environ.core :as environ] [amazonica.aws.dynamodbv2 :as dynamodb] [simpleserver.sessiondb.session-factory :as ss-session-factory] [simpleserver.sessiondb.session-service-interf...
null
https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/clj-ring-cljs-reagent-demo/simple-server/test/simpleserver/testutils/reset_dynamodb_sessions.clj
clojure
Calling with empty request list causes exception.
(ns simpleserver.testutils.reset-dynamodb-sessions (:require [clojure.tools.logging :as log] [environ.core :as environ] [amazonica.aws.dynamodbv2 :as dynamodb] [simpleserver.sessiondb.session-factory :as ss-session-factory] [simpleserver.sessiondb.session-service-interf...
5a28019b6d8653635e60c1bdfe8de3a584ce3f82ca18289c4ee32529dfd49c07
gethop-dev/hop-cli
core.clj
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 hop-cli.bootstrap.profile.registry.core (:require [hop-cli.bootstrap.profile.registry :as registry] [hop-cli.bootstrap.util :a...
null
https://raw.githubusercontent.com/gethop-dev/hop-cli/41e7635eea4b413cbb3374733ec6370f04dcafa9/src/hop_cli/bootstrap/profile/registry/core.clj
clojure
file, You can obtain one at /
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 (ns hop-cli.bootstrap.profile.registry.core (:require [hop-cli.bootstrap.profile.registry :as registry] [hop-cli.bootstrap.util :as bp.util])) (defn- common-confi...
96602d3b31035cfa09a98212d8d7046248d360a37728c278db89f7c79c8fc920
erlang/corba
icpreproc.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1997 - 2016 . 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 applic...
null
https://raw.githubusercontent.com/erlang/corba/396df81473a386d0315bbba830db6f9d4b12a04f/lib/ic/src/icpreproc.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 l...
Copyright Ericsson AB 1997 - 2016 . 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(icpreproc). -export([preproc/2]). -import(lists, [filter/2]). preproc(G, File) -> Cmd = ic_opti...
b08f7b6e7434e369891891ca504e9bc62a3873f6e3ab15a08a6653acfcf2dfff
mikail-khan/hqfl
BarrierOption.hs
----------------------------------------------------------------------------- -- | Module : Finance . . Instrument . BarrierOption Copyright : ( C ) 2016 -- License : (see the file LICENSE) Maintainer : < > -- Stability : stable -- Portability : portable -- ------------------------...
null
https://raw.githubusercontent.com/mikail-khan/hqfl/398bd921089522c6c0e6d91893a75615a1f39a2e/src/Finance/Hqfl/Instrument/BarrierOption.hs
haskell
--------------------------------------------------------------------------- | License : (see the file LICENSE) Stability : stable Portability : portable --------------------------------------------------------------------------
Module : Finance . . Instrument . BarrierOption Copyright : ( C ) 2016 Maintainer : < > module Finance.Hqfl.Instrument.BarrierOption ( BarrierType(..) , BarrierOption(..) ) where import Finance.Hqfl.Instrument.Type Exotic Options , and , 1992 Barrier options are path - d...
398ae381c4ccfbd3adaef3adfebd15b2b68e224185c153cff92f66a9da83ff93
twanvl/ttie
Main.hs
# LANGUAGE FlexibleInstances , FlexibleContexts , UndecidableInstances , MultiParamTypeClasses # # LANGUAGE TemplateHaskell , RankNTypes # module Main where import Prelude () import Util.MyPrelude import Util.PrettyM hiding ((<.>)) import Util.Parser import Names import Tokenizer import Syntax import Typing import TcM...
null
https://raw.githubusercontent.com/twanvl/ttie/cfae8ec79d1d2d7cf4f9913c613a3a965717b4e8/src/Main.hs
haskell
------------------------------------------------------------------------------ Statements ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ -----------------------------------------------------------------------...
# LANGUAGE FlexibleInstances , FlexibleContexts , UndecidableInstances , MultiParamTypeClasses # # LANGUAGE TemplateHaskell , RankNTypes # module Main where import Prelude () import Util.MyPrelude import Util.PrettyM hiding ((<.>)) import Util.Parser import Names import Tokenizer import Syntax import Typing import TcM...
c3159ad8b669567c09a0b7bd582bc13c45584984e2ec95024bbe516852f4a7c9
pmatos/racket-binaryen
modules.rkt
#lang racket/base ;; --------------------------------------------------------------------------------------------------- (require "binaryen-ffi.rkt") (provide (struct-out module) current-module module-parse) ;; --------------------------------------------------------------------------------------------------- ;...
null
https://raw.githubusercontent.com/pmatos/racket-binaryen/3535a9400b20f5e64d799bb70916d85466802e6d/private/modules.rkt
racket
--------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------- Module is just an opaque type representing a module
#lang racket/base (require "binaryen-ffi.rkt") (provide (struct-out module) current-module module-parse) (struct module (ref) #:constructor-name make-module) (define current-module (make-parameter #false)) (define (module-parse s) (make-module (BinaryenModuleParse s)))
150518a0f4d9c3c3348a719d244c4330976aed6be6b256e1a44d7cec01b6b703
S8A/htdp-exercises
ex054.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex054) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex054.rkt
racket
about the language level of this file in a form that our tools can easily process. distances in pixels – "resting" – a Number between -3 and -1 interpretation a grounded rocket; in countdown mode; a number denotes the number of pixels between the top of the canvas and the rocket (its height) LRCD -> Image ren...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex054) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ...
cd4c4fe09f96e5d65a760cd851eeaa69c736baba99c1f5ea90597f8698bfae91
o1-labs/snarkette
nat_intf.ml
open Core_kernel module type S = sig type t [@@deriving eq, bin_io, sexp, compare] include Stringable.S with type t := t val of_int : int -> t val to_int_exn : t -> int val ( < ) : t -> t -> bool val ( + ) : t -> t -> t val ( * ) : t -> t -> t val ( - ) : t -> t -> t val ( // ) : t -> t -> t ...
null
https://raw.githubusercontent.com/o1-labs/snarkette/c4af4a5f654497183871b5f2ee99005020be20d8/src/nat_intf.ml
ocaml
open Core_kernel module type S = sig type t [@@deriving eq, bin_io, sexp, compare] include Stringable.S with type t := t val of_int : int -> t val to_int_exn : t -> int val ( < ) : t -> t -> bool val ( + ) : t -> t -> t val ( * ) : t -> t -> t val ( - ) : t -> t -> t val ( // ) : t -> t -> t ...
53df7b373cec56358bb693383810f6ab5f4931c05d674902820a9e8eee5cdcae
janestreet/universe
syntax_error.ml
(* we want the error report to tell us the correct file, with the correct line *) let f x = 4513^&#$%1645!#^$$
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ocaml_plugin/sample/config/syntax_error.ml
ocaml
we want the error report to tell us the correct file, with the correct line
let f x = 4513^&#$%1645!#^$$
e37d08365de700ea65c3598497800b731328824fbb059a3155ab853534fe6b08
anton-k/processing-for-haskell
PioRef.hs
module Graphics.Proc.Core.PioRef( PioRef, newPioRef, readPioRef, writePioRef, modifyPioRef ) where import Data.IORef import Control.Monad.IO.Class import Graphics.Proc.Core.State | for mutable variables . We can create a reference and then manipulate the value with functions and @writePioRef@. The API is ...
null
https://raw.githubusercontent.com/anton-k/processing-for-haskell/7f99414f3c266135b6a2848978fcb572fd7b67b1/src/Graphics/Proc/Core/PioRef.hs
haskell
| Creates a reference for a mutable value. The argument is an initial value assigned to the variable. | Reads the value from the reference. | Writes the value to reference. | Modifies a value iside the reference with a function.
module Graphics.Proc.Core.PioRef( PioRef, newPioRef, readPioRef, writePioRef, modifyPioRef ) where import Data.IORef import Control.Monad.IO.Class import Graphics.Proc.Core.State | for mutable variables . We can create a reference and then manipulate the value with functions and @writePioRef@. The API is ...
2f820e43ff1f87690548b66dad13244f67f3615f4f7e02045382ed3f0bf01a92
zeniuseducation/poly-euler
one.clj
(ns eulerpeter.one (require [eulerpeter.core :refer :all])) Problem 50 (defn next-sum-prime [n] (let [[sum i] (sum-prime-until n) j (next-prime i)] (+ sum j))) (defn eul50 [lim] (loop [i 2 res 0] (if (< lim res) res (recur (next-sum-prime i) (if (and (prime? i) (cons-prime-sum? i)) ...
null
https://raw.githubusercontent.com/zeniuseducation/poly-euler/734fdcf1ddd096a8730600b684bf7398d071d499/clojure/eulerpeter/src/eulerpeter/one.clj
clojure
Amicable numbers sum all the faktor of x without x Implemented from paper return "Elapsed time: 12624.563651 msecs" recusive sum memoized \displaystyle T = \frac{1}{2} | (x_A - x_c)(y_B-y_A) - (x_A - x_B)(y_C-y_A)|
(ns eulerpeter.one (require [eulerpeter.core :refer :all])) Problem 50 (defn next-sum-prime [n] (let [[sum i] (sum-prime-until n) j (next-prime i)] (+ sum j))) (defn eul50 [lim] (loop [i 2 res 0] (if (< lim res) res (recur (next-sum-prime i) (if (and (prime? i) (cons-prime-sum? i)) ...
4079a086ae73b7476a2d0ad4cfa2c583cbf68e8d591a933be11e3ad60442f0f3
kadena-io/chainweb-node
InMem.hs
module Chainweb.Test.Mempool.InMem ( tests ) where ------------------------------------------------------------------------------ import Control.Concurrent.MVar import qualified Data.Vector as V import Test.Tasty ------------------------------------------------------------------------------ import Chainweb.Graph (...
null
https://raw.githubusercontent.com/kadena-io/chainweb-node/731ce2bae1040070af0b84be92b1ffb77e9a247a/test/Chainweb/Test/Mempool/InMem.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ----------------------------------------------------------------------------
module Chainweb.Test.Mempool.InMem ( tests ) where import Control.Concurrent.MVar import qualified Data.Vector as V import Test.Tasty import Chainweb.Graph (singletonChainGraph) import qualified Chainweb.Mempool.InMem as InMem import Chainweb.Mempool.InMemTypes (InMemConfig(..)) import Chainweb.Mempool.Mempool imp...
d8e9656a4bc287ce1d2c08930609c541909dce44eb10c15867f8b892afc0d2c1
bnoordhuis/chicken-core
foreign.import.scm
;;;; foreign.import.scm - import library for "foreign" pseudo module ; Copyright ( c ) 2008 - 2013 , The Chicken Team ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following ; conditions are met: ; ; Redistributions of sou...
null
https://raw.githubusercontent.com/bnoordhuis/chicken-core/56d30e3be095b6abe1bddcfe10505fa726a43bb5/foreign.import.scm
scheme
foreign.import.scm - import library for "foreign" pseudo module All rights reserved. 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, this list o...
Copyright ( c ) 2008 - 2013 , The Chicken Team THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE...
6c1af33960af280eb3ba785c12ce7c070438e17f536a0d2155d76761b3878771
finnschiermer/x86prime
branches.ml
exception Branch_conversion_failure_at of string type generator_info = Unknown | Chosen of Ast.line | Conflict of string let rewrite_bcc lnum condition (flag_setter : generator_info) = let open Ast in match condition, flag_setter with | Ctl1(Jcc(cond),lab), Chosen(Alu2(TEST,a,b)) -> (lnum, Ctl3(CBcc(Ast.rev_con...
null
https://raw.githubusercontent.com/finnschiermer/x86prime/2e16a9e571d27b4ebb043da102c9ff987d1c4194/lib/branches.ml
ocaml
compare unifies if both compares are equal - is this redundant? something we don't know - so flag it
exception Branch_conversion_failure_at of string type generator_info = Unknown | Chosen of Ast.line | Conflict of string let rewrite_bcc lnum condition (flag_setter : generator_info) = let open Ast in match condition, flag_setter with | Ctl1(Jcc(cond),lab), Chosen(Alu2(TEST,a,b)) -> (lnum, Ctl3(CBcc(Ast.rev_con...
e0b856668ea4e8e6fcd0afd59a74dfe74d600839ebdb41e02fb0fa155c1f0b11
ypyf/fscm
load.scm
(define start #f) (if (not start) (call/cc (lambda (cc) (set! start cc)))) (display "Going to invoke (start)\n") (start #f)
null
https://raw.githubusercontent.com/ypyf/fscm/4e6a31665051d51bbcfc823ac8d85dcc3491a6ef/test/load.scm
scheme
(define start #f) (if (not start) (call/cc (lambda (cc) (set! start cc)))) (display "Going to invoke (start)\n") (start #f)
a3adb837f29370227a4cbd0fc23ce6544ba8d2e20be6d41e1fcb0af0f75d0bb9
lyrm/ocaml-httpadapter
status.ml
{ { { Copyright ( C ) < 2020 > < > * * 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 THE AUT...
null
https://raw.githubusercontent.com/lyrm/ocaml-httpadapter/01926ba6a1e3ab607fc8a33a40fb13682b6711a5/src-cohttp/status.ml
ocaml
{ { { Copyright ( C ) < 2020 > < > * * 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 THE AUT...
b572a3d783bac5971636ac9ffe92e74b601f0cbc10f3b42c9909aedca9564db7
nakagami/efirebirdsql
efirebirdsql_op.erl
The MIT License ( MIT ) Copyright ( c ) 2016 - 2022 Hajime Nakagami< > -module(efirebirdsql_op). -define(DEBUG_FORMAT(X,Y), ok). -export([op_connect/6, op_attach/2, op_detach/1, op_create/3, op_transaction/2, op_allocate_statement/1, op_prepare_statement/3, op_free_statement/2, op_execute/3, op_execute2/3...
null
https://raw.githubusercontent.com/nakagami/efirebirdsql/9a9755fa657748f31b55f50416c650c40ebcec1e/src/efirebirdsql_op.erl
erlang
isc_info_sql_select isc_info_sql_describe_vars isc_info_sql_sqlda_seq isc_info_sql_sub_type isc_info_sql_scale isc_info_sql_length isc_info_sql_null_ind, isc_info_sql_field, isc_info_sql_relation, isc_info_sql_owner, isc_info_sql_alias, isc_info_sql_describe_end CNCT_login CNCT_plugin_name CNCT_user CNC...
The MIT License ( MIT ) Copyright ( c ) 2016 - 2022 Hajime Nakagami< > -module(efirebirdsql_op). -define(DEBUG_FORMAT(X,Y), ok). -export([op_connect/6, op_attach/2, op_detach/1, op_create/3, op_transaction/2, op_allocate_statement/1, op_prepare_statement/3, op_free_statement/2, op_execute/3, op_execute2/3...
5e70fc1d1277eb7a198c0a3d31c544dd795281e29b3203681beee96a1ec59e45
2600hz-archive/whistle
erlctl_cmdline.erl
Copyright 2010 , Scatterbit , Inc. & Jayson Vantuyl < > % This file is part of erlctl . % Erlctl is open source . See LICENSE.txt for details . -module (erlctl_cmdline). -export([process_cmdline/0]). % Command Line Handling Functions process_cmdline() -> try do_process_cmdline() catch error:{sysar...
null
https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/erlctl/lib/erlctl-0.3/src/erlctl_cmdline.erl
erlang
Command Line Handling Functions "erlctl", show generic usage "erlctl <app>" or "<app>ctl", show app usage "erlctl <app> <cmd> ..." or "<app>ctl <cmd> ...", run command Convert "<app>_?ctl" into "<app>" System Arguments
Copyright 2010 , Scatterbit , Inc. & Jayson Vantuyl < > This file is part of erlctl . Erlctl is open source . See LICENSE.txt for details . -module (erlctl_cmdline). -export([process_cmdline/0]). process_cmdline() -> try do_process_cmdline() catch error:{sysarg,[BadArg | _Rest] } -> erlctl_e...
a07ba5ef365947e61060ff5aa1835543b6923fb46cc9ee198538b3914bc138d1
spawnfest/eep49ers
wxListItem.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2021 . 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/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxListItem.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 - 2021 . 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(wxListItem). -include("wxe.hrl"). -export([clear/1,destroy/1,getAlign/1,getBackgroundColour/1,getColumn/1,ge...
9cc2414b27967f5ed08809769ee4fb2a43fa81703c6e5df936f229024cfbba13
qriollo/qriollo
TestEval.hs
-- Este archivo es parte de Qriollo. Qriollo 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 version. -- Qriollo is distributed in the...
null
https://raw.githubusercontent.com/qriollo/qriollo/b45ba0f4e9d444f786217ff931d7ecf74bfddbe4/src/Test/TestEval.hs
haskell
Este archivo es parte de Qriollo. (at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. Record Record and select Simple function declaration and application ...
Qriollo 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 Qriollo is distributed in the hope that it will be useful , You should have received a copy of the GNU Gen...
c0a9822bddb8d3c8ab6696569e368e80077cdb76ad1c26c3705c4e3210f736c4
HachiSecurity/plc-llvm
LibrarySpec.hs
module Hachi.LibrarySpec ( test_library_samples ) where ------------------------------------------------------------------------------- import System.FilePath import Test.Tasty import Hachi.Compiler import Hachi.Compiler.Config import Hachi.Compiler.CodeGen.Driver import Hachi.TestCommon ---------------------...
null
https://raw.githubusercontent.com/HachiSecurity/plc-llvm/c99c8d58ec7cbbb8942604338cfde00ad23e7f13/compiler/test/Hachi/LibrarySpec.hs
haskell
----------------------------------------------------------------------------- ----------------------------------------------------------------------------- together into an executable check that the output is as expected -----------------------------------------------------------------------------
module Hachi.LibrarySpec ( test_library_samples ) where import System.FilePath import Test.Tasty import Hachi.Compiler import Hachi.Compiler.Config import Hachi.Compiler.CodeGen.Driver import Hachi.TestCommon mkLibraryConfig :: FilePath -> Config mkLibraryConfig fp = (mkDefaultConfig fp){ cfgLibrary = Tr...
4826f847efc754ab821d8b85f578d1cdb10d210945a1313e1d27fca8660c82a5
SHoltzen/dice
Wmc.mli
type weight = (Bdd.label, (Bignum.t*Bignum.t)) Core.Hashtbl.Poly.t * Performs a weighted model count of the BDD with the supplied weight function . val wmc : wmc_type: int -> Bdd.manager -> Bdd.bddptr -> weight -> Bignum.t
null
https://raw.githubusercontent.com/SHoltzen/dice/0577a89ce08e49da069c242f6353e4d9c19b12f5/lib/Wmc.mli
ocaml
type weight = (Bdd.label, (Bignum.t*Bignum.t)) Core.Hashtbl.Poly.t * Performs a weighted model count of the BDD with the supplied weight function . val wmc : wmc_type: int -> Bdd.manager -> Bdd.bddptr -> weight -> Bignum.t
23ba1895b4316290d730335f97db73b3c28d90454177dc1e9fb2b0f4aaa5f519
emqx/emqx
emqx_schema.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2017 - 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/d0f43bead3ed7fd26c125080bee2f51aecea1e25/apps/emqx/src/emqx_schema.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 ) 2017 - 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_schema). -dialyzer(no_return). -dialyzer(no_match). -dialyzer(no_contracts). -dial...
efc25a060d5af7bd4ebc96d36c395683747fc349b84cb7aaa3500b86986420c1
reflex-frp/reflex-native
AdjustingBuilder.hs
# LANGUAGE ExplicitNamespaces # # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # {-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # | A generic builder for implementing ' Reflex . Adjustable ...
null
https://raw.githubusercontent.com/reflex-frp/reflex-native/5fb6a07845e4f7c51f97e9c8ce1a48009f341246/reflex-native/src/Reflex/Native/AdjustingBuilder.hs
haskell
# LANGUAGE RankNTypes # This module contains the main function 'adjustingBuilder' along with specializations of that function for various data structures, as required for @adjustingBuilder@ is quite complicated because of the intersection of mutability, performance requirements, and @NotReady@; these complications ...
# LANGUAGE ExplicitNamespaces # # LANGUAGE KindSignatures # # LANGUAGE LambdaCase # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # | A generic builder for implementing ' Reflex . Adjustable ' and ' Reflex . NotReady ' ...
9ddc9d44e56837c5774efb95fea8bcb1dfde6c9a9c6537abbab65855169ebb23
OCamlPro/ocp-build
ocpCompat.ml
(**************************************************************************) (* *) (* Typerex Libraries *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/ocp-build/66b4639b74b3e22a050da64fb49c85b9550f5829/libs/ocplib-compat/ocpCompat.ml
ocaml
************************************************************************ Typerex Libraries ...
Copyright 2011 - 2017 OCamlPro SAS the GNU Lesser General Public License version 2.1 , with the #if OCAML_VERSION < "4.04" module String404 = struct include String let split_on_char c s = let len = String.length s in let rec iter pos to_rev = if...
d86f2709b3cb24ed58584ee632c1323f4f6de6b27749616574276ec2123adca2
zoka/lein-webrepl
webrepl.clj
(ns leiningen.webrepl (:require [ringmon.server :as server] [clojure.string :as string] [leiningen.core.eval :as eval] [leiningen.core.main :as main])) (defn- repl-port "Try to fin out preconfigured server port value." [project] (if-let [port (or (System/getenv "LEIN_REPL_POR...
null
https://raw.githubusercontent.com/zoka/lein-webrepl/b8c55cf6b8fd238c93ee826efe8384def02986cc/src/leiningen/webrepl.clj
clojure
outside of a project block forever
(ns leiningen.webrepl (:require [ringmon.server :as server] [clojure.string :as string] [leiningen.core.eval :as eval] [leiningen.core.main :as main])) (defn- repl-port "Try to fin out preconfigured server port value." [project] (if-let [port (or (System/getenv "LEIN_REPL_POR...
d11c2b7848d55015ba4cc760b1e05bc1a842eb4c13bd75157bd61f47fd64cb42
penpot/penpot
rpc_project_test.clj
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) KALEIDOS INC (ns backend-tests.rpc-project-test (:require [backend-tests.helpers :as th] [app.common.uuid :as uuid]...
null
https://raw.githubusercontent.com/penpot/penpot/42e97f8be105af41757f8e896b93a99032a2b72a/backend/test/backend_tests/rpc_project_test.clj
clojure
Copyright (c) KALEIDOS INC create project (th/print-result! out) query the list of projects of a team (th/print-result! out) query all projects of a user (th/print-result! out) rename project (th/print-result! out) retrieve project (th/print-result! out) delete project (th/print-result! out) query a list...
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 backend-tests.rpc-project-test (:require [backend-tests.helpers :as th] [app.common.uuid :as uuid] [app.db :as db] [app.rpc :...
0f3feb369dc45fb0ec94784e4f1929d32e7afbfdc0ce770afce35c2d59bd88a5
unnohideyuki/bunny
sample245.hs
main = print $ length "hello"
null
https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample245.hs
haskell
main = print $ length "hello"
a9c94ef34eaf6c927f91ebe25a39868e2237350cfbefb071496d75d9076bbd36
zotonic/zotonic
z_letsencrypt_jws.erl
Copyright 2015 - 2020 %% 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/zotonic/zotonic/28d344e1d8237d408fa00c089d1697c5a542ca33/apps/zotonic_mod_ssl_letsencrypt/src/support/z_letsencrypt_jws.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 permi...
Copyright 2015 - 2020 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(z_letsencrypt_jws). -author("Guillaume Bour <>"). -export([init/1, encode/3, keyauth/2]). Initialize a RSA JWS with given private key . ...
e0959b8df3a50df3d014246375e31f6f0eae7bc6d2582dab2f918760c07c100c
Odie/gd-edit
stemmers.cljc
;; ------------------------------------------------------------------- ;; clj-fuzzy Stemmers API ;; ------------------------------------------------------------------- ;; ;; Author : ( Yomguithereal ) Version : 0.1 ;; (ns clj-fuzzy.stemmers (:require clj-fuzzy.lancaster clj-fuzzy.lovins ...
null
https://raw.githubusercontent.com/Odie/gd-edit/abc91b6350ca0faa60e6b448cdfaddf056dafa04/src/clj_fuzzy/stemmers.cljc
clojure
------------------------------------------------------------------- clj-fuzzy Stemmers API -------------------------------------------------------------------
Author : ( Yomguithereal ) Version : 0.1 (ns clj-fuzzy.stemmers (:require clj-fuzzy.lancaster clj-fuzzy.lovins clj-fuzzy.porter clj-fuzzy.schinke)) (def ^:export lancaster clj-fuzzy.lancaster/stem) (def ^:export lovins clj-fuzzy.lovins/stem) (def ^:export porter clj-fuzz...
cab7187485cc3598445ec93abd0d6ff097a074b58b4b69e52b0671e4386796c7
tweag/asterius
Typeable1.hs
# LANGUAGE PolyKinds # import Type.Reflection import Data.Kind data ComposeK (f :: k' -> Type) (g :: k -> k') a = ComposeK (f (g a)) main :: IO () main = do let x :: ComposeK Maybe Maybe Int x = undefined App x y <- pure $ typeOf x print (x, y) App x y <- pure x print (x, y) App x ...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/typecheck/Typeable1.hs
haskell
# LANGUAGE PolyKinds # import Type.Reflection import Data.Kind data ComposeK (f :: k' -> Type) (g :: k -> k') a = ComposeK (f (g a)) main :: IO () main = do let x :: ComposeK Maybe Maybe Int x = undefined App x y <- pure $ typeOf x print (x, y) App x y <- pure x print (x, y) App x ...
169560cdc7aa7710f8f9ae050b45be98bea3ac555c6d31fa4d1cc2b8a826b195
nasa/Common-Metadata-Repository
metadata_specification.clj
(ns cmr.umm-spec.metadata-specification "Functions related to the MetadataSpecification node common to many of the umm models. Eventually all models will include this node, so a common set of functions is needed." (:require [cmr.umm-spec.versioning :as ver])) (def types "This is a mapping between collec...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/16744bdb289edb9cff1635396b52df67be60886e/umm-spec-lib/src/cmr/umm_spec/metadata_specification.clj
clojure
Reserved: currently does not have this node UMM-V can not be used due to visualizations. Concept IDs start with V. Currently not implemented but this name is reserved for future use.
(ns cmr.umm-spec.metadata-specification "Functions related to the MetadataSpecification node common to many of the umm models. Eventually all models will include this node, so a common set of functions is needed." (:require [cmr.umm-spec.versioning :as ver])) (def types "This is a mapping between collec...
e7022dc5a5c949b9291406eadbbec3cc5529dfc2e8a4f1b15621068cdefd95b5
nuprl/gradual-typing-performance
deck.rkt
#lang typed/racket/base (provide deal init-deck wiggle-top-card ) ;; ----------------------------------------------------------------------------- (require typed/racket/class "../base/games-cards-adapted.rkt" ) ;; ============================================================================= ;; Set up the...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/gofish/typed/deck.rkt
racket
----------------------------------------------------------------------------- ============================================================================= Set up the cards Function for dealing or drawing cards ----------------------------------------------------------------------------- Visual info to go fish
#lang typed/racket/base (provide deal init-deck wiggle-top-card ) (require typed/racket/class "../base/games-cards-adapted.rkt" ) (: init-deck (-> Natural Deck)) (define (init-deck N) (box (shuffle-list (make-deck) N))) (: deal (-> Deck Natural Card*)) (define (deal deck n) (let loop ([n : Natural n...
15de2565b7f9f68c6b3bd80c9023308c06b223802f9caff1c598df0f027d45ce
spawnfest/eep49ers
proplists_SUITE.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2019 . 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 applicable law ...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/stdlib/test/proplists_SUITE.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 2019 . 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(proplists_SUITE). -export([all/0, suite/0,groups/0, init_per_suite/1, end_per_suite/1, init_per_group/2, ...
086141348ffb01153cbbeba167ae4c882a87affeb77878e758eabed5b31f7c49
yallop/ocaml-asp
asp_unstaged.mli
* Copyright ( c ) 2018 and * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2018 Neelakantan Krishnaswami and Jeremy Yallop * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *...
null
https://raw.githubusercontent.com/yallop/ocaml-asp/a092f17ea55d427c63414899e39a8fe80b30db14/lib/asp_unstaged.mli
ocaml
* [type_check p] checks that a parser satisfies the typing constraints -- e.g. that the grammar is unambiguous and does not contain left-recursion * [parse p s] parses the stream of input tokens [s] using the parser [p] and returns the result, or fails with an exception.
* Copyright ( c ) 2018 and * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2018 Neelakantan Krishnaswami and Jeremy Yallop * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *...
68e24d051bb07901424dc1118cb4b112668d5361f6bf930015adc6c823fbeb10
V-Wong/COMP3141
StateMonad.hs
import Control.Monad The State type holds a function from the -- actual state to a tuple of state and a result value. -- Essentially: initialState -> (newState, result) runState is an accesor that allows us to access the held function -- without pattern matching. newtype State s a = State { runState :: s -> (s, a)...
null
https://raw.githubusercontent.com/V-Wong/COMP3141/f5a92e5833d2bb0a08e68cb2d025e38c8c875563/Functors%2C%20Monads%20and%20Applicatives/StateMonad.hs
haskell
actual state to a tuple of state and a result value. Essentially: initialState -> (newState, result) without pattern matching. This is the bind function which allows for sequential composition. which is equivalent to: (>>=) :: (s -> (s, a)) -> (a -> s -> (s, b)) -> (s -> (s, b)). Set the result value to the stat...
import Control.Monad The State type holds a function from the runState is an accesor that allows us to access the held function newtype State s a = State { runState :: s -> (s, a) } instance Functor (State s) where fmap = Control.Monad.liftM instance Applicative (State s) where pure = return (<*>) = Contro...
0741572ddebe80e8f7a3b244d8685bf4e45965458246a2cfc0bdf09d33938dc7
fccm/OCamlSDL2
sdlpower.ml
OCamlSDL2 - An OCaml interface to the SDL2 library Copyright ( C ) 2013 This software is provided " AS - IS " , without any express or implied warranty . In no event will the authors be held liable for any damages arising from the use of this software . Permission is granted to anyone to use this...
null
https://raw.githubusercontent.com/fccm/OCamlSDL2/01fa29187cab90052d2581eb509d1bca1a85418f/src/sdlpower.ml
ocaml
* Power management * cannot determine power status * Not plugged in, running on the battery * Plugged in, no battery available * Plugged in, charging battery * Plugged in, battery charged
OCamlSDL2 - An OCaml interface to the SDL2 library Copyright ( C ) 2013 This software is provided " AS - IS " , without any express or implied warranty . In no event will the authors be held liable for any damages arising from the use of this software . Permission is granted to anyone to use this...
54a1a83aa643ab3bca9a8b3ab4e1ac3d22b1d9e9d13eed0a448ddb4d3658f46c
sifbiri/project-resources-operations
account.cljc
(ns com.fluxym.model.account (:require [com.fulcrologic.rad.attributes :as attr :refer [defattr]])) (defattr id :account/id :uuid {::attr/identity? true :com.fulcrologic.rad.database-adapters.datomic/schema :dev}) (defattr name2 :account/name2 :string {:com.fulcrologic.rad.database-adapters.datomic/schema...
null
https://raw.githubusercontent.com/sifbiri/project-resources-operations/b08adb09ef03f123ca7ad19ec1c2bdc070a66291/src/main/com/fluxym/model/account.cljc
clojure
(ns com.fluxym.model.account (:require [com.fulcrologic.rad.attributes :as attr :refer [defattr]])) (defattr id :account/id :uuid {::attr/identity? true :com.fulcrologic.rad.database-adapters.datomic/schema :dev}) (defattr name2 :account/name2 :string {:com.fulcrologic.rad.database-adapters.datomic/schema...
88751ac822afe0f148f4d90084f72f6037c5ea7f42c2cb01769b014ab988abf7
gizmo385/discord.clj
reactions.clj
(ns discord.extensions.reactions (:require [clojure.core.async :refer [go]] [clojure.string :as s] [discord.types.messages :as msgs] [discord.gateway :as gw] [taoensso.timbre :as timbre])) (defmulti handle-message-reaction-by-name (fn [reaction auth] (-> reaction (get-in [:emoji :name]) s/lower...
null
https://raw.githubusercontent.com/gizmo385/discord.clj/11719d16193b444d7ac695698d21125a91ff90e9/src/discord/extensions/reactions.clj
clojure
We don't actually need to do anything here
(ns discord.extensions.reactions (:require [clojure.core.async :refer [go]] [clojure.string :as s] [discord.types.messages :as msgs] [discord.gateway :as gw] [taoensso.timbre :as timbre])) (defmulti handle-message-reaction-by-name (fn [reaction auth] (-> reaction (get-in [:emoji :name]) s/lower...
2519f6aa7118be9a62d11e3a7603883438330c890845a04d593a4c9942b02b4d
input-output-hk/plutus
PrettyBy.hs
-- | The main module of the library. module Text.PrettyBy ( PrettyBy (..) , IgnorePrettyConfig (..) , AttachPrettyConfig (..) , PrettyAny (..) , withAttachPrettyConfig , defaultPrettyFunctorBy , defaultPrettyBifunctorBy , NonDefaultPrettyBy (..) , HasPrettyDefaults , PrettyDefau...
null
https://raw.githubusercontent.com/input-output-hk/plutus/1f31e640e8a258185db01fa899da63f9018c0e85/prettyprinter-configurable/src/Text/PrettyBy.hs
haskell
| The main module of the library.
module Text.PrettyBy ( PrettyBy (..) , IgnorePrettyConfig (..) , AttachPrettyConfig (..) , PrettyAny (..) , withAttachPrettyConfig , defaultPrettyFunctorBy , defaultPrettyBifunctorBy , NonDefaultPrettyBy (..) , HasPrettyDefaults , PrettyDefaultBy , Render (..) , display ...
e5f2e6d7bce078201ddb4538a4d95d6125e03d9c8d51aef0beb5dde881cdca5f
igorhvr/bedlam
util.scm
(module util (any? list-intersperse list-intersperse! list-tail-diff string-index string-rindex substring? string-prefix? string-prefix-ci? string-suffix? string-suffix-ci? string-downcase string-upcase string-downcase string-downcase! string-upcase! string->integer ...
null
https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/siscweb/siscweb-src-0.5/opt/sxml/scm/ssax/util.scm
scheme
**************************************************************************** My Scheme misc utility functions (mainly dealing with string and list manipulations) (declare ; Gambit-compiler optimization options (block) (standard-bindings) (fixnum) ) (include "myenv.scm") ; include my standard prelude O...
(module util (any? list-intersperse list-intersperse! list-tail-diff string-index string-rindex substring? string-prefix? string-prefix-ci? string-suffix? string-suffix-ci? string-downcase string-upcase string-downcase string-downcase! string-upcase! string->integer ...
11928b393573623287b3785a0852f8c0f897d574477ee45a046e001d130d2a7d
ahrefs/atd
a_bs.ml
let write_from_module_a = Atdgen_codec_runtime.Encode.make (function | A_t.Foo -> `String "Foo" | Bar -> `String "Bar") let read_from_module_a = Atdgen_codec_runtime.Decode.enum [ "Foo", `Single A_t.Foo ; "Bar", `Single A_t.Bar ]
null
https://raw.githubusercontent.com/ahrefs/atd/9a3cb984a695563c04b41cdd7a1ce9454eb40e1c/atdgen/test/bucklescript/a_bs.ml
ocaml
let write_from_module_a = Atdgen_codec_runtime.Encode.make (function | A_t.Foo -> `String "Foo" | Bar -> `String "Bar") let read_from_module_a = Atdgen_codec_runtime.Decode.enum [ "Foo", `Single A_t.Foo ; "Bar", `Single A_t.Bar ]
374d8b579a5c00b6db153faf0d58dbf7f729144efa15e385197ffff44341d308
meta-ex/ignite
names.clj
(ns meta-ex.viz.names (:use quil.core [overtone.core :only [on-event]] [overtone.helpers.ref :only [swap-returning-prev!]])) (defn state-map [] {:menlo-font (create-font "Menlo" 300)}) (defonce votes (atom [])) (on-event [:vote] (fn [msg] (swap! votes conj msg)) ::re...
null
https://raw.githubusercontent.com/meta-ex/ignite/b9b1ed7ae2fa01d017c23febabb714a6389a98dd/src/meta_ex/viz/names.clj
clojure
(ns meta-ex.viz.names (:use quil.core [overtone.core :only [on-event]] [overtone.helpers.ref :only [swap-returning-prev!]])) (defn state-map [] {:menlo-font (create-font "Menlo" 300)}) (defonce votes (atom [])) (on-event [:vote] (fn [msg] (swap! votes conj msg)) ::re...
36054591f35f91d5528465fa84c99b1d0f575447637e6971e0b9dff5602f472a
sellout/LOOM
package.lisp
(defpackage loom (:documentation "This is an umbrella package that collects all the LOOM modules so you can get the flexibility of the generic functions without having to pick and choose the pieces you want – IE, it gives you LOO without the M.") (:use)) (de...
null
https://raw.githubusercontent.com/sellout/LOOM/b34b0590e82a8ba41ca1e58a8a825dd889285c1d/src/package.lisp
lisp
(defpackage loom (:documentation "This is an umbrella package that collects all the LOOM modules so you can get the flexibility of the generic functions without having to pick and choose the pieces you want – IE, it gives you LOO without the M.") (:use)) (de...
12babb1280fa78b396920e4b1ea1b5429ad72fc8171d42684dc7291fe95f2635
evrim/core-server
socket.lisp
Core Server : Web Application Server Copyright ( C ) 2006 - 2008 , Aycan iRiCAN ;; 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 opti...
null
https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/src/servers/socket.lisp
lisp
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 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public L...
Core Server : Web Application Server Copyright ( C ) 2006 - 2008 , Aycan iRiCAN 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 (in-package :tr.g...
93eaf3c03ac8b18b4d844ce1855b10bcad021d199bf647bd364c1882f19ede3f
rems-project/cerberus
ocaml_builtins.ml
Cerberus builtin functions module M = Cerb_frontend.Impl_mem let builtin_any_bounded_int _ = failwith "builtin any bounded int" let builtin_errno _ = failwith "builtin errno" let builtin_printf _ _ _ = failwith "builtin printf" let builtin_vprintf _ = failwith "builtin vsprintf" let builtin_vsnprintf _ = failwith "b...
null
https://raw.githubusercontent.com/rems-project/cerberus/124c93f10cb4c235f6396adec82ebf9563daeb7e/backend/ocaml/runtime/ocaml_builtins.ml
ocaml
Cerberus builtin functions module M = Cerb_frontend.Impl_mem let builtin_any_bounded_int _ = failwith "builtin any bounded int" let builtin_errno _ = failwith "builtin errno" let builtin_printf _ _ _ = failwith "builtin printf" let builtin_vprintf _ = failwith "builtin vsprintf" let builtin_vsnprintf _ = failwith "b...
80ecf4c8fa231b00fb0c5410d6a245687aaa7f3db986a3bd34f9c9c60b9d3682
remixlabs/wasicaml
wc_traceinstr.ml
Copyright ( C ) 2021 by Figly , Inc. This code is free software , see the file LICENSE for details . This code is free software, see the file LICENSE for details. *) open Printf open Wc_types let trace_stack_max depth instr = (* some instructions need temporarily additional stack positions *) match ...
null
https://raw.githubusercontent.com/remixlabs/wasicaml/74ff72535aa8e49ab94a05d9c32c059ce264c1bb/src/wasicaml/wc_traceinstr.ml
ocaml
some instructions need temporarily additional stack positions
Copyright ( C ) 2021 by Figly , Inc. This code is free software , see the file LICENSE for details . This code is free software, see the file LICENSE for details. *) open Printf open Wc_types let trace_stack_max depth instr = match instr with | I.Kapply num -> if num < 4 then depth+3 else depth ...
bff8edb6ea14c9ecee09ec240007250223518c710279571c98301547c0c1f5f0
composewell/unicode-data
Division.hs
-- | -- Module : Unicode.Internal.Division Copyright : ( c ) 2020 -- -- License : BSD-3-Clause -- Maintainer : -- Stability : experimental Portability : GHC -- -- Fast division by known constants. -- -- Division by a constant can be replaced by a double-word multiplication. Roughly speaking , in...
null
https://raw.githubusercontent.com/composewell/unicode-data/9bf74ed68aa18c7109c8041580785ef16f6b0446/unicode-data/lib/Unicode/Internal/Division.hs
haskell
| Module : Unicode.Internal.Division License : BSD-3-Clause Maintainer : Stability : experimental Fast division by known constants. Division by a constant can be replaced by a double-word multiplication. multiplication, but since our applications does not involve negative integers, we convert ...
Copyright : ( c ) 2020 Portability : GHC Roughly speaking , instead of dividing by x , multiply by 2 ^ 64 / x , obtaining 128 - bit - long product , and take upper 64 bits . The peculiar details can be found in 's Delight , Ch . 10 . Even GHC 8.10 does not provide a primitive for a signed double - wor...
89312211ce86faa834d897379c02f5b7ac708451f808cf2064f7dd49019e50d4
pirapira/coq2rust
usage.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/toplevel/usage.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * {6 Prints the version number on th...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * val version : int -> 'a val...
3a444889057208c3f1e446b3f3a685987b2b2e7840aeae4971c38a66b4536d42
janestreet/bonsai
tabs_style.mli
include module type of Tabs_style__generated
null
https://raw.githubusercontent.com/janestreet/bonsai/8643e8b3717b035386ac36f2bcfa4a05bca0d64f/web_ui/view/kado/tabs_style.mli
ocaml
include module type of Tabs_style__generated
9cde750fc5605d7b5a9340ce6da5424cc51c00de0129ff7ef4b314892b070aca
dgiot/dgiot
dgiot_mysql_app.erl
%%%------------------------------------------------------------------- %% @doc dgiot_mysql public API %% @end %%%------------------------------------------------------------------- -module(dgiot_mysql_app). -include("dgiot_mysql.hrl"). -include_lib("dgiot/include/logger.hrl"). -emqx_plugin(?MODULE). -behaviour(applic...
null
https://raw.githubusercontent.com/dgiot/dgiot/a6b816a094b1c9bd024ce40b8142375a0f0289d8/apps/dgiot_mysql/src/dgiot_mysql_app.erl
erlang
------------------------------------------------------------------- @doc dgiot_mysql public API @end ------------------------------------------------------------------- Application callbacks ==================================================================== API ====================================================...
-module(dgiot_mysql_app). -include("dgiot_mysql.hrl"). -include_lib("dgiot/include/logger.hrl"). -emqx_plugin(?MODULE). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> dgiot_mysql_sup:start_link(). stop(_State) -> ok. Internal functions
7a0e069b8b7a2c38f6064c2cc98b971f89c51e3501b9418217d194bc35aea8e2
f-o-a-m/kepler
Keys.hs
module Nameservice.Modules.Nameservice.Keys ( whoisMapKey ) where import Data.ByteString (ByteString) whoisMapKey :: ByteString whoisMapKey = "whoisMap"
null
https://raw.githubusercontent.com/f-o-a-m/kepler/6c1ad7f37683f509c2f1660e3561062307d3056b/hs-abci-docs/nameservice/src/Nameservice/Modules/Nameservice/Keys.hs
haskell
module Nameservice.Modules.Nameservice.Keys ( whoisMapKey ) where import Data.ByteString (ByteString) whoisMapKey :: ByteString whoisMapKey = "whoisMap"
9c2f62b043caa530aa603f39b4b1294de8e4f680799fa38bd43610f981dc0a77
lambdamikel/DLMAPS
some-expansion2.lisp
;;; -*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- (in-package :PROVER) ;;; ;;; ;;; (defrule some-expansion (dl-with-somes abox) (multiple-value-bind (some-concept node) (select-some-concept abox *strategy* language) (cond ((not node) +insert-negative-code+ ) ...
null
https://raw.githubusercontent.com/lambdamikel/DLMAPS/7f8dbb9432069d41e6a7d9c13dc5b25602ad35dc/src/prover/some-expansion2.lisp
lisp
-*- Mode: LISP; Syntax: Common-Lisp; Package: PROVER -*- vollständiges chronologisches backtracking bei *compute-all-completions-p* erforderlich! bei *compute-all-completions-p* das durchfuehrt! einfaches BACKJUMPING deterministischer Teil der Expansion
(in-package :PROVER) (defrule some-expansion (dl-with-somes abox) (multiple-value-bind (some-concept node) (select-some-concept abox *strategy* language) (cond ((not node) +insert-negative-code+ ) (t (let* ((role (role some-concept)) ...
7841cea4bb8d7e474b108a7a4018a6efaf5a9fb9ae3b0d271bc82ae5571c97b3
fp-works/2019-winter-Haskell-school
Sized.hs
# LANGUAGE GeneralizedNewtypeDeriving , FlexibleInstances # module Sized where import Data.Monoid newtype Size = Size Int deriving (Eq, Ord, Show, Num) getSize :: Size -> Int getSize (Size i) = i class Sized a where size :: a -> Size instance Sized Size where size = id -- This instance means that things lik...
null
https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week7/tien/src/Sized.hs
haskell
This instance means that things like (Foo, Size) ... are all instances of Sized.
# LANGUAGE GeneralizedNewtypeDeriving , FlexibleInstances # module Sized where import Data.Monoid newtype Size = Size Int deriving (Eq, Ord, Show, Num) getSize :: Size -> Int getSize (Size i) = i class Sized a where size :: a -> Size instance Sized Size where size = id ( , ( Bar , Size ) ) instance Siz...
1e60aee6c23976d9a9c5824f8c29d6a3a31f02dc764f98a1b83dc76c644dbbd3
bgamari/ghc-debug
Ptr.hs
# LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE GADTs #-} # LANGUAGE MagicHash # # LANGUAGE DerivingVia # # LANGUAGE ViewPatterns # # LANGUAGE BinaryLiterals # # LANGUAGE TypeApplications # # LANGUAGE PatternSynonyms # -- | Data types for representing different pointers and raw information -- All pointers are sto...
null
https://raw.githubusercontent.com/bgamari/ghc-debug/c931fe52efbed1f4c3e47e27e81994ddd0b88f10/common/src/GHC/Debug/Types/Ptr.hs
haskell
# LANGUAGE GADTs # | Data types for representing different pointers and raw information All pointers are stored in little-endian to make arithmetic easier. We have to send and recieve the pointers in big endian though. This then the other pointers are derived from this instance using DerivingVia * InfoTables Unt...
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MagicHash # # LANGUAGE DerivingVia # # LANGUAGE ViewPatterns # # LANGUAGE BinaryLiterals # # LANGUAGE TypeApplications # # LANGUAGE PatternSynonyms # conversion is dealt with in the Binary instance for ClosurePtr and InfoTablePtr(..) ...
b671dfa67751daf79c7247290d1b74557fb47e3530e00c8c1df9f14396813a8b
ghc/testsuite
tc248.hs
{-# LANGUAGE ExplicitForAll #-} module ShouldCompile where identity :: forall a. a -> a identity x = x
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/tc248.hs
haskell
# LANGUAGE ExplicitForAll #
module ShouldCompile where identity :: forall a. a -> a identity x = x
0e8f937e07831ad14a52f797e040ca1d341c1efe82861e6494b5c0f43be9c87d
conal/MemoTrie
Generic.hs
# LANGUAGE DeriveGeneric , TypeOperators , TypeFamilies # import Data.MemoTrie import GHC.Generics (Generic) data Color = RGB Int Int Int | NamedColor String deriving (Generic) instance HasTrie Color where newtype (Color :->: b) = ColorTrie { unColorTrie :: Reg Color :->: b } trie = trieGene...
null
https://raw.githubusercontent.com/conal/MemoTrie/f0ab0340331b18cbca63c107acc78e46c8fb25c5/examples/Generic.hs
haskell
# LANGUAGE DeriveGeneric , TypeOperators , TypeFamilies # import Data.MemoTrie import GHC.Generics (Generic) data Color = RGB Int Int Int | NamedColor String deriving (Generic) instance HasTrie Color where newtype (Color :->: b) = ColorTrie { unColorTrie :: Reg Color :->: b } trie = trieGene...
a569b2d38649d1bf12082c678c820c69dc322ea0f2978970a09d326f187d290a
vii/dysfunkycom
points-and-lines.lisp
Converted from the " Points and Lines " Processing example at : ;;;;; "" ;;;;; (C)2006 Luke J Crook (in-package #:sdl-examples) (defun points-and-lines () (let ((width 200) (height 200)) (sdl:with-init () (sdl:window width height :title-caption "Points and Lines, from Processing.org") (setf (sdl:...
null
https://raw.githubusercontent.com/vii/dysfunkycom/a493fa72662b79e7c4e70361ad0ea3c7235b6166/addons/lispbuilder-sdl/examples/points-and-lines.lisp
lisp
"" (C)2006 Luke J Crook
Converted from the " Points and Lines " Processing example at : (in-package #:sdl-examples) (defun points-and-lines () (let ((width 200) (height 200)) (sdl:with-init () (sdl:window width height :title-caption "Points and Lines, from Processing.org") (setf (sdl:frame-rate) 10) (sdl:clear-dis...
169f9cf8bb44540d11e438f5ee7614238c8301b0c477c17a851d5b9382c5ee1d
bsansouci/bsb-native
pervasives.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/stdlib/pervasives.ml
ocaml
********************************************************************* OCaml ...
, 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 GNU Library General Public License , with external register_named_value : strin...
dec6e4c9e9c485920236c316b560cc474d71e0894a0b01b502248a1277222ad7
frenetic-lang/netcore-1.0
JSON.hs
module Frenetic.NetCore.JSON ( NetCoreMessage (..) , makeRuntime , hGetNetCoreMessage , hPutNetCoreMessage , hPutNetCoreError ) where import Frenetic.Common import Frenetic.NetCore.Types import Frenetic.NetCore.Semantics import Frenetic.Topo (Switch) import Text.JSON import Text.JSON.Generic import Contro...
null
https://raw.githubusercontent.com/frenetic-lang/netcore-1.0/976b08b740027e8ed19f2d55b1e77f663bee6f02/src/Frenetic/NetCore/JSON.hs
haskell
^Deploy a policy to the hypervisor. ^Inject a packet into the network. ^Response from the hypervisor. ^Response from the hypervisor. ^Response from the hypervisor. ^Response from the hypervisor. ^Error message. Response from the hypervisor. |Build the runtime components necessary to deploy a semantic policy (f...
module Frenetic.NetCore.JSON ( NetCoreMessage (..) , makeRuntime , hGetNetCoreMessage , hPutNetCoreMessage , hPutNetCoreError ) where import Frenetic.Common import Frenetic.NetCore.Types import Frenetic.NetCore.Semantics import Frenetic.Topo (Switch) import Text.JSON import Text.JSON.Generic import Contro...
bac01ddac26c82daedbc5f91e8b242bfe8e6f2dfa4399c78ed0ab954e2aca25d
ermine/sulci
es_time.ml
let expand_time_proc _cause years months days hours minutes seconds = (if years = 0 then "" else Printf.sprintf "%d %s " years (match years with | 1 -> "año" | _ -> "años")) ^ (if months = 0 then "" else Printf.sprintf "%d %s " months (match months with | 1 ->...
null
https://raw.githubusercontent.com/ermine/sulci/3ee4bd609b01e2093a6d37bf74579728d0a93b70/lang/es_time.ml
ocaml
let expand_time_proc _cause years months days hours minutes seconds = (if years = 0 then "" else Printf.sprintf "%d %s " years (match years with | 1 -> "año" | _ -> "años")) ^ (if months = 0 then "" else Printf.sprintf "%d %s " months (match months with | 1 ->...
eda40f78d14aa55b62014c8e6182a0fab9336d1861cbd159564dcaca26f3896b
TerrorJack/ghc-alter
Encoding.hs
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude # {-# OPTIONS_GHC -funbox-strict-fields #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.IO.Encoding Copyright : ( c ) The University of Glasgow , 2008 - 2009 -- License : see libraries/b...
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/GHC/IO/Encoding.hs
haskell
# OPTIONS_GHC -funbox-strict-fields # --------------------------------------------------------------------------- | Module : GHC.IO.Encoding License : see libraries/base/LICENSE Maintainer : Stability : internal Portability : non-portable Text codecs for I/O ---------------------------------...
# LANGUAGE Trustworthy # # LANGUAGE CPP , NoImplicitPrelude # Copyright : ( c ) The University of Glasgow , 2008 - 2009 module GHC.IO.Encoding ( BufferCodec(..), TextEncoding(..), TextEncoder, TextDecoder, CodingProgress(..), latin1, latin1_encode, latin1_decode, utf8, utf8_bom, ...
57b6187becb2ab54e3457d6410cba64ab8bbf26c82d1e66005041e288e4c78c3
Rhywun/get-programming-with-haskell
simple_calc.hs
import Data.List.Split {- isPlus "1 + 2" -- True -} isPlus :: String -> Bool isPlus = elem '+' {- isMult "1 + 2" -- False -} isMult :: String -> Bool isMult = elem '*' splitEquation " 1 + 2 " -- ( 1 , 2 ) splitEquation "1 + 2" -- (1, 2) -} splitEquation :: String -> (Int, Int) splitEquation eq | isPl...
null
https://raw.githubusercontent.com/Rhywun/get-programming-with-haskell/b9cf06f725b2ef038d69ed49f7d2900f55e98ca3/Unit04/Lesson22/simple_calc.hs
haskell
isPlus "1 + 2" -- True isMult "1 + 2" -- False ( 1 , 2 ) (1, 2) 46 4368 46 4368 My solution prints the results after all equations are input Perhaps we were supposed to use the non-lazy technique here?
import Data.List.Split isPlus :: String -> Bool isPlus = elem '+' isMult :: String -> Bool isMult = elem '*' -} splitEquation :: String -> (Int, Int) splitEquation eq | isPlus eq = (read (head sp), read (last sp)) | isMult eq = (read (head sm), read (last sm)) where sp = splitOn "+" eq sm =...
5e01d40fbb26e65257bb8b9a68c03222b3faa0d69b06c442bfc22519daa7cdca
dbuenzli/react
pkg.ml
#!/usr/bin/env ocaml #use "topfind" #require "topkg" open Topkg let jsoo_test ~cond test = Pkg.flatten [ Pkg.test ~run:false ~cond ~auto:false (test ^ ".js"); Pkg.test ~run:false ~cond ~auto:false (test ^ ".html"); ] let () = Pkg.describe "react" @@ fun c -> Ok [ Pkg.mllib "src/react.mllib"; Pk...
null
https://raw.githubusercontent.com/dbuenzli/react/aebf35179964e73a7ef557c6a56175c7abdb9947/pkg/pkg.ml
ocaml
jsoo_test ~cond:jsoo "test/js_hisig_test"; jsoo_test ~cond:jsoo "test/js_test";
#!/usr/bin/env ocaml #use "topfind" #require "topkg" open Topkg let jsoo_test ~cond test = Pkg.flatten [ Pkg.test ~run:false ~cond ~auto:false (test ^ ".js"); Pkg.test ~run:false ~cond ~auto:false (test ^ ".html"); ] let () = Pkg.describe "react" @@ fun c -> Ok [ Pkg.mllib "src/react.mllib"; Pk...
351c9358e3ced517bd940f5fff2e6565d69ce84d0bbaf620b9bb04605f2807a3
ygmpkk/house
Face.hs
-- #hide -------------------------------------------------------------------------------- -- | -- Module : Graphics.Rendering.OpenGL.GL.Face Copyright : ( c ) 2003 -- License : BSD-style (see the file libraries/OpenGL/LICENSE) -- -- Maintainer : -- Stability : provisional -- Portability : po...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/OpenGL/Graphics/Rendering/OpenGL/GL/Face.hs
haskell
#hide ------------------------------------------------------------------------------ | Module : Graphics.Rendering.OpenGL.GL.Face License : BSD-style (see the file libraries/OpenGL/LICENSE) Maintainer : Stability : provisional Portability : portable -----------------------------------------...
Copyright : ( c ) 2003 This is a purely internal module for ( un-)marshaling Face . module Graphics.Rendering.OpenGL.GL.Face ( Face(..), marshalFace, unmarshalFace ) where import Graphics.Rendering.OpenGL.GL.BasicTypes ( GLenum ) data Face = Front | Back | FrontAndBack deriving ( Eq, Ord...
a017a719bdd87639221d041a40388d8be117677c3c2a103c3de1ed912875039a
eneroth/fulcro-template-aleph
index.clj
(ns poc.component.index (:require [hiccup.page :refer [include-css include-js]] [hiccup.core :as hiccup])) To help avoid caching of CSS and JS when pushed to a server (def js-loc (str "/js/main.js?" (java.util.UUID/randomUUID))) (def css-loc (str "/css/main.css?" (java.util.UUID/randomUUID))) ;; Te...
null
https://raw.githubusercontent.com/eneroth/fulcro-template-aleph/ed614f192cee63ee56fcbb325d92ea24a3a95a1f/src/poc/component/index.clj
clojure
Template
(ns poc.component.index (:require [hiccup.page :refer [include-css include-js]] [hiccup.core :as hiccup])) To help avoid caching of CSS and JS when pushed to a server (def js-loc (str "/js/main.js?" (java.util.UUID/randomUUID))) (def css-loc (str "/css/main.css?" (java.util.UUID/randomUUID))) # #...
16902da1d3f41b1ebad1d9a5fe4b09fd7607af4700b5b511d6770b73b55c77e3
avsm/jekyll-format
jekyll_post.mli
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) 2...
null
https://raw.githubusercontent.com/avsm/jekyll-format/187a362ff50d5202aea5fdfd2d884585a12fe155/src/jekyll_post.mli
ocaml
* Jekyll blog post handling library {{:} Jekyll} is a simple, blog-aware static site generator that takes a template directory of files and turns them into a website. This library exists to parse those blog posts and make them easy to manipulate from OCaml code. {e %%VERSION%% — {{:%%PKG_HOMEPAGE%...
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) 2...
e81064d687cbfbedfc09001c883f077cc4d79a63164b1ee9ae1279adf1fe03f6
esl/MongooseIM
mod_smart_markers_rdbms.erl
%%%---------------------------------------------------------------------------- %%% @doc %%% RDBMS backend for mod_smart_markers %%% @end ( C ) 2020 - 2022 , Erlang Solutions Ltd. %%%---------------------------------------------------------------------------- -module(mod_smart_markers_rdbms). -author("denysgoncha...
null
https://raw.githubusercontent.com/esl/MongooseIM/7b2787b5f32cb68f7a9cb0dcecffd6cb2233d86b/src/smart_markers/mod_smart_markers_rdbms.erl
erlang
---------------------------------------------------------------------------- @doc RDBMS backend for mod_smart_markers @end ---------------------------------------------------------------------------- -------------------------------------------------------------------- API ----------------------------------------...
( C ) 2020 - 2022 , Erlang Solutions Ltd. -module(mod_smart_markers_rdbms). -author("denysgonchar"). -behavior(mod_smart_markers_backend). -include("jlib.hrl"). -include("mongoose_logger.hrl"). -export([init/2, update_chat_marker/2, get_chat_markers/4]). -export([get_conv_chat_marker/6]). -export([remove_domain/2,...
b50b08ee8a1ce801de703b3b623b37079124b8235fa1cf60d31b9318b7a39c67
haskellfoundation/matchmaker
Main.hs
module Main where import Server main :: IO () main = appMain
null
https://raw.githubusercontent.com/haskellfoundation/matchmaker/d64a1f0782a6be121a5df6038297e72f8d19fe4c/app/Main.hs
haskell
module Main where import Server main :: IO () main = appMain
3a55dd655718eab811a9b96b9fcbf7d4144920bd2e982326bd8eac85b286d62d
hidaris/thinking-dumps
interp.rkt
#lang typed/racket (provide (all-defined-out)) (require "parser.rkt") (require "ast.rkt") (require "env.rkt") (: apply-procedure (Closure (Listof Value) -> Value)) (define (apply-procedure proc vals) (match proc [(Closure params body saved-env) (define (extend*-env [vars : (Listof Symbol)] ...
null
https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap3/3-24/interp.rkt
racket
#lang typed/racket (provide (all-defined-out)) (require "parser.rkt") (require "ast.rkt") (require "env.rkt") (: apply-procedure (Closure (Listof Value) -> Value)) (define (apply-procedure proc vals) (match proc [(Closure params body saved-env) (define (extend*-env [vars : (Listof Symbol)] ...
da084995b4e5ab4118a390eb5dd4a5e40562a1e2f5238ada633902ca9166286f
vascokk/rivus_cep
rivus_cep_window_ets.erl
%%------------------------------------------------------------------------------ Copyright ( c ) 2013 - 2014 %% 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 %% %% -...
null
https://raw.githubusercontent.com/vascokk/rivus_cep/e9fe6ed79201d852065f7fb2a24a880414031d27/src/rivus_cep_window_ets.erl
erlang
------------------------------------------------------------------------------ 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 la...
Copyright ( c ) 2013 - 2014 Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . distributed under the License is distributed on an " AS IS " BASIS , -module(rivus_cep_window_ets). -compile([{parse_transform, lager...
d2e38f1c3f96aa928cb642a0cc5eeda1597a0cc4252663fed59648ec691592a8
dongcarl/guix
store-deduplication.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2018 , 2020 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU 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 t...
null
https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/tests/store-deduplication.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2018 , 2020 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (test-store-deduplication) #:use-module (guix tests) #:use-module (guix store deduplicat...
6322bb44ea70e96f63c1a67af153a3ff4219e906a66fecf6c8c16a99be481b93
avsm/platform
xml_iter.ml
TyXML * * Copyright ( C ) 2004 < > * Copyright ( C ) 2011 , * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/tyxml.4.3.0/lib/xml_iter.ml
ocaml
* Iterators
TyXML * * Copyright ( C ) 2004 < > * Copyright ( C ) 2011 , * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , with linking exception ; * either version...
f4fba98928e98fcdbe1ca1d8b9c51c9821bd8b95501a2fb448eb714dde0a4c8f
commercialhaskell/rio
Exit.hs
module RIO.Prelude.Exit ( exitFailure , exitSuccess , exitWith , System.Exit.ExitCode(..) ) where import Control.Monad.IO.Class import qualified System.Exit ( ExitCode (..) , exitFailure , exitSuccess , exitWith ...
null
https://raw.githubusercontent.com/commercialhaskell/rio/4eba306d37a60a20f0bed27f40afc23a7c892c40/rio/src/RIO/Prelude/Exit.hs
haskell
| Lifted version of "System.Exit.exitFailure". | Lifted version of "System.Exit.exitSuccess". | Lifted version of "System.Exit.exitWith".
module RIO.Prelude.Exit ( exitFailure , exitSuccess , exitWith , System.Exit.ExitCode(..) ) where import Control.Monad.IO.Class import qualified System.Exit ( ExitCode (..) , exitFailure , exitSuccess , exitWith ...
1499fb5f97d9c787265894607a6571b7df5ba2776c3acbe7660daef0e8d7e0fd
clj-commons/cljss
core.clj
(ns cljss.core (:require [cljss.utils :refer [build-css escape-val resolve-get]] [cljss.font-face :as ff] [cljss.inject-global :as ig] [cljss.builder :refer [status? build-styles]] [cljss.collect :refer [dynamic?]] [clojure.string :as cstr] [sabl...
null
https://raw.githubusercontent.com/clj-commons/cljss/d2856688cf650babe518c798cf20e6bdb4227bb7/src/cljss/core.clj
clojure
(ns cljss.core (:require [cljss.utils :refer [build-css escape-val resolve-get]] [cljss.font-face :as ff] [cljss.inject-global :as ig] [cljss.builder :refer [status? build-styles]] [cljss.collect :refer [dynamic?]] [clojure.string :as cstr] [sabl...
95eeae915219cea966fd677a67a2f9af1cc57e10496fa5505590010b1c1a488c
felipereigosa/mock-mechanics
translate.clj
(defn get-tree-with-root [parts root-name] (let [root (get-in parts [root-name]) children (keys (:children root)) descendents (map #(get-tree-with-root parts %) children)] (vec (apply concat [root-name] descendents)))) (defn translate-mode-pressed [world event] (if-let...
null
https://raw.githubusercontent.com/felipereigosa/mock-mechanics/4049f2543b55c04426c8b5265d3486a6c5e4e8aa/src/mockmechanics/edit/translate.clj
clojure
(defn get-tree-with-root [parts root-name] (let [root (get-in parts [root-name]) children (keys (:children root)) descendents (map #(get-tree-with-root parts %) children)] (vec (apply concat [root-name] descendents)))) (defn translate-mode-pressed [world event] (if-let...
4629ce6afdcbaca480abd886eb5de3ab9af523b7dca268f8247e33b43b45694f
ocaml-ppx/ppx
builder.mli
(** Helpers for building Ast nodes *) open Ppx_ast.V4_07 (** Builds an identifier prefixed by the ppx_view runtime library module path. *) val view_lib_ident : loc: Astlib.Location.t -> string -> Longident_loc.t (** Builds the longident for runtime lib's [interval]. *) val view_lib_interval : loc: Astlib.Locatio...
null
https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/ppx_view/lib/builder.mli
ocaml
* Helpers for building Ast nodes * Builds an identifier prefixed by the ppx_view runtime library module path. * Builds the longident for runtime lib's [interval]. * Builds the longident for runtime lib's [choice]. * Builds the longident for runtime lib's [larray_cons]. * Helpers for building expressions * Bui...
open Ppx_ast.V4_07 val view_lib_ident : loc: Astlib.Location.t -> string -> Longident_loc.t val view_lib_interval : loc: Astlib.Location.t -> Longident_loc.t val view_lib_choice : loc: Astlib.Location.t -> Longident_loc.t val view_lib_larray_cons : loc: Astlib.Location.t -> Longident_loc.t module Exp : sig val...
4eb79441a07f060aefaae4bdab24b7afe9b9da2b9b640fa1e50204f0ef7a91c9
jrh13/hol-light
cart.ml
(* ========================================================================= *) Definition of finite Cartesian product types . (* *) ( c ) Copyright , 1998 - 2007 ( c ) ...
null
https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/cart.ml
ocaml
========================================================================= ========================================================================= ------------------------------------------------------------------------- Association of ...
Definition of finite Cartesian product types . ( c ) Copyright , 1998 - 2007 ( c ) Copyright , , 2017 - 2018 needs "iterate.ml";; let dimindex = new_definition `dimindex(s:A->bool) = if FINITE(:A) then CARD(:A) else 1`;;...
3d29f9990315703dcfd1ee2a90379bd78576d2267b8d2ef7c08fa729903258f9
clojure-interop/aws-api
project.clj
(defproject clojure-interop/com.amazonaws.services.sagemaker "1.0.0" :description "Clojure to Java Interop Bindings for com.amazonaws.services.sagemaker" :url "-interop/aws-api" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]] :source-paths [...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.sagemaker/project.clj
clojure
(defproject clojure-interop/com.amazonaws.services.sagemaker "1.0.0" :description "Clojure to Java Interop Bindings for com.amazonaws.services.sagemaker" :url "-interop/aws-api" :license {:name "Eclipse Public License" :url "-v10.html"} :dependencies [[org.clojure/clojure "1.8.0"]] :source-paths [...
225ea8bbb4a4b29b65b5ead48185c5f507111899a20490b8a7716487fa17fe78
danr/hipspec
Sequences.hs
module Sequences where import Hip.Prelude import Prelude (Eq,Ord,Show,iterate,(!!),fmap,Bool(..),take) data Nat = Z | S Nat deriving (Eq,Ord,Show) instance Arbitrary Nat where arbitrary = let nats = iterate S Z in (nats !!) `fmap` choose (0,25) Z + y = y (S x) + y = S (x + y) Z * _ = Z (S x) *...
null
https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/examples/old-examples/hip/Sequences.hs
haskell
Factorials ----------------------------------------------------------------- Fibonacci ------------------------------------------------------------------
module Sequences where import Hip.Prelude import Prelude (Eq,Ord,Show,iterate,(!!),fmap,Bool(..),take) data Nat = Z | S Nat deriving (Eq,Ord,Show) instance Arbitrary Nat where arbitrary = let nats = iterate S Z in (nats !!) `fmap` choose (0,25) Z + y = y (S x) + y = S (x + y) Z * _ = Z (S x) *...
7e6b8f55e521c19ff9476353d0c72577874d56833cccb6a71c35adad1189eb21
lorenzo/wrecker
Logger.hs
# LANGUAGE RecordWildCards # {-# LANGUAGE OverloadedStrings #-} module Wrecker.Logger where import Control.Monad (when) import Data.Aeson import Data.Monoid ((<>)) import qualified Data.Text.Encoding as TE import System.Log.FastLogger data LogLevel = LevelDebug | LevelInfo | LevelWarn | LevelError ...
null
https://raw.githubusercontent.com/lorenzo/wrecker/595ce8df42a706f3e49ec6782c9a87a86162c519/src/Wrecker/Logger.hs
haskell
# LANGUAGE OverloadedStrings # | Create a logger using stderr. This is the typical way a logger is created. True if the write was successful or False otherwise
# LANGUAGE RecordWildCards # module Wrecker.Logger where import Control.Monad (when) import Data.Aeson import Data.Monoid ((<>)) import qualified Data.Text.Encoding as TE import System.Log.FastLogger data LogLevel = LevelDebug | LevelInfo | LevelWarn | LevelError deriving (Show, Eq, Ord, Read) d...
a39ba9b19d63d946392ce2b1c8153657e85e93d181568ffdde929eb221467811
unclebob/spacewar
damage_panel.cljc
(ns spacewar.ui.control-panels.damage-panel (:require [spacewar.ui.protocols :as p] [spacewar.ui.config :as uic] [spacewar.ui.widgets.lcars :as lcars] [spacewar.ui.widgets.lights :as lights] [spacewar.ui.widgets.named-indicator :refer [->named-indicator]] ))...
null
https://raw.githubusercontent.com/unclebob/spacewar/71c3195b050c4fdb7e643f53556ab580d70f27ba/src/spacewar/ui/control_panels/damage_panel.cljc
clojure
(ns spacewar.ui.control-panels.damage-panel (:require [spacewar.ui.protocols :as p] [spacewar.ui.config :as uic] [spacewar.ui.widgets.lcars :as lcars] [spacewar.ui.widgets.lights :as lights] [spacewar.ui.widgets.named-indicator :refer [->named-indicator]] ))...
37116a795d8717f96d1aa7945aea8d505b54ddb448737c9a3c3a7729c6fe3399
alanz/ghc-exactprint
CheckUtils.hs
{-# LANGUAGE RankNTypes #-} This program must be called with GHC 's libdir and the file to be checked as -- the command line arguments. module CheckUtils where import Data.Data import Data.List import System.IO import GHC import BasicTypes import DynFlags import MonadUtils import Outputable import ApiAnnotation imp...
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/CheckUtils.hs
haskell
# LANGUAGE RankNTypes # the command line arguments. --------------------------------------------------------------------- | Generic queries of type \"r\", i.e., take any \"a\" and return an \"r\" | Make a generic query; start from a type-specific case; return a constant otherwise | Summarise all nodes i...
This program must be called with GHC 's libdir and the file to be checked as module CheckUtils where import Data.Data import Data.List import System.IO import GHC import BasicTypes import DynFlags import MonadUtils import Outputable import ApiAnnotation import Bag (filterBag,isEmptyBag) import System.Directory (rem...
4381d2f9929490bfd99a7721ac1fa727e8af1ab99d81c515e49a601d25e69052
sampou-org/ghc_users_guide_ja
CodeGen.hs
module Options.CodeGen where import Types codegenOptions :: [Flag] codegenOptions = [ flag { flagName = "-fasm" , flagDescription = ":ref:`ネイティブコード生成器 <native-code-gen>` を使う" , flagType = DynamicFlag , flagReverse = "-fllvm" } , flag { flagName = "-fllvm" , ...
null
https://raw.githubusercontent.com/sampou-org/ghc_users_guide_ja/91ac4ee4347802bbfc63686cfcbd4fc12f95a584/8.2.2/mkUserGuidePart/Options/CodeGen.hs
haskell
module Options.CodeGen where import Types codegenOptions :: [Flag] codegenOptions = [ flag { flagName = "-fasm" , flagDescription = ":ref:`ネイティブコード生成器 <native-code-gen>` を使う" , flagType = DynamicFlag , flagReverse = "-fllvm" } , flag { flagName = "-fllvm" , ...
0805c9eb985f1461330701724c539c7209980aabf9bd892a1a6be404acd5603f
AndrasKovacs/setoidtt
FNV164.hs
module FNV164 where import qualified Data.ByteString as B import qualified Data.ByteString.Internal as B import GHC.ForeignPtr import GHC.Exts fnv164 :: B.ByteString -> Int -> Int fnv164 (B.PS (ForeignPtr ptr _) (I# offset) (I# len)) (I# salt) = let go :: Addr# -> Addr# -> Int# -> Int# go ptr end hash = case eqA...
null
https://raw.githubusercontent.com/AndrasKovacs/setoidtt/621aef2c4ae5a6acb418fa1153575b21e2dc48d2/setoidtt/src/FNV164.hs
haskell
module FNV164 where import qualified Data.ByteString as B import qualified Data.ByteString.Internal as B import GHC.ForeignPtr import GHC.Exts fnv164 :: B.ByteString -> Int -> Int fnv164 (B.PS (ForeignPtr ptr _) (I# offset) (I# len)) (I# salt) = let go :: Addr# -> Addr# -> Int# -> Int# go ptr end hash = case eqA...
29ff450adf19e73d2a456237426754f992519df44f95b40e3373b0a2f5b411b8
kudu-dynamics/blaze
Prelude.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DataKinds # # OPTIONS_GHC -fno - warn - orphans # module Blaze.Prelude ( module Exports , Streaming , StreamingIO , PShow(PShow) , catchEither , liftListM , liftListIO , liftEitherIO , liftMaybeIO , liftEitherM , liftMaybe , liftMaybeM , liftMaybeTI...
null
https://raw.githubusercontent.com/kudu-dynamics/blaze/63e30781f4c7bd816118e855f6fa4ae6e59949fe/src/Blaze/Prelude.hs
haskell
# LANGUAGE ConstraintKinds # sort of redundant, actually... hardcore debug ------------ taken from Relude
# LANGUAGE DataKinds # # OPTIONS_GHC -fno - warn - orphans # module Blaze.Prelude ( module Exports , Streaming , StreamingIO , PShow(PShow) , catchEither , liftListM , liftListIO , liftEitherIO , liftMaybeIO , liftEitherM , liftMaybe , liftMaybeM , liftMaybeTIO , maxFunctionNameLength , p...
a08326072fc58dd5a1d8469f45993260369f540c59667de0c09c7f0bec4687cf
nuprl/gradual-typing-performance
image.rkt
#lang racket/base (require 2htdp/image) (provide (all-from-out 2htdp/image))
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/teachpack/2htdp/image.rkt
racket
#lang racket/base (require 2htdp/image) (provide (all-from-out 2htdp/image))
29d7a2fc15eada8a7f185dc8542e5dc3a1df40e7b38823a3610c0fb9ff668f50
immutant/immutant
messaging_test.clj
Copyright 2014 - 2017 Red Hat , Inc , and individual contributors . ;; 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 ...
null
https://raw.githubusercontent.com/immutant/immutant/6ff8fa03acf73929f61f2ca75446cb559ddfc1ef/messaging/test/immutant/messaging_test.clj
clojure
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 permiss...
Copyright 2014 - 2017 Red Hat , Inc , and individual contributors . distributed under the License is distributed on an " AS IS " BASIS , (ns immutant.messaging-test (:require [clojure.test :refer :all] [immutant.messaging :refer :all] [immutant.util :as u]) (:import org.projectodd.wunde...
ee0be75b2fbc49ec59dcfaee60d3ca13c4ec3e3e77ded391117610a89c0b187a
conreality/conreality
time.mli
(* This is free and unencumbered software released into the public domain. *) (* delay_microseconds int -> unit *) external delay_microseconds: int -> unit = "caml_time_delay_microseconds"
null
https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/libexec/bcm283x/time.mli
ocaml
This is free and unencumbered software released into the public domain. delay_microseconds int -> unit
external delay_microseconds: int -> unit = "caml_time_delay_microseconds"
2bbec2d039c566bdea1e52b1a3c7b36bf540a5b065846ae80ec6bc7499e1e916
MastodonC/kixi.datastore
inmemory.clj
(ns kixi.datastore.metadatastore.inmemory (:require [clojure.spec.alpha :as s] [com.stuartsierra.component :as component] [kixi.datastore.metadatastore :refer [MetaDataStore] :as ms] [kixi.comms :as c] [kixi.datastore.communication-specs :as cs] ...
null
https://raw.githubusercontent.com/MastodonC/kixi.datastore/f33bba4b1fdd8c56cc7ac0f559ffe35254c9ca99/src/kixi/datastore/metadatastore/inmemory.clj
clojure
(ns kixi.datastore.metadatastore.inmemory (:require [clojure.spec.alpha :as s] [com.stuartsierra.component :as component] [kixi.datastore.metadatastore :refer [MetaDataStore] :as ms] [kixi.comms :as c] [kixi.datastore.communication-specs :as cs] ...
d30731893a2c24dad8c7ff12692d6a92cd5ed098c64f3a11f8866613bf14662b
deadpendency/deadpendency
ToProcessingError.hs
module Common.Model.Error.ToProcessingError ( ToProcessingError (..), ) where import Common.Model.Error.ProcessingError class ToProcessingError sharedError where toProcessingError :: sharedError -> Maybe ProcessingError
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Model/Error/ToProcessingError.hs
haskell
module Common.Model.Error.ToProcessingError ( ToProcessingError (..), ) where import Common.Model.Error.ProcessingError class ToProcessingError sharedError where toProcessingError :: sharedError -> Maybe ProcessingError
05e00116560f87a2b920316851bde3362ae667f4ba334f979597d1b07c755451
tel/oak
higher_order.cljs
(ns oak.oracle.higher-order "Functions for constructing Oracles from sub-Oracles." (:require [oak.oracle :as oracle] [oak.internal.utils :as util] [oak.schema :as os])) (defn parallel [oracle-map] (oracle/make :model (util/map-vals oracle/model oracle-map) :action (apply os/cond-pair (util/...
null
https://raw.githubusercontent.com/tel/oak/12227273ba5fbc27bc0c5379017ee8902992670d/src/oak/oracle/higher_order.cljs
clojure
(ns oak.oracle.higher-order "Functions for constructing Oracles from sub-Oracles." (:require [oak.oracle :as oracle] [oak.internal.utils :as util] [oak.schema :as os])) (defn parallel [oracle-map] (oracle/make :model (util/map-vals oracle/model oracle-map) :action (apply os/cond-pair (util/...
b010447ff78a9d07bbeb9338b547c361820a112774b07b148794eda3c7a0365b
vyorkin/tiger
suite.ml
open Core module Path = struct open Filename let book = parent_dir_name ^/ "book/testcases" let main = parent_dir_name ^/ "testcases" let mk dir = main ^/ dir end let book_tests = (* failing / negative-case tests *) let failing = [ 9; 10; 11; 13; 14; 15; 17; 18; 19; 20; 21; 22; 23; 24; 25; 2...
null
https://raw.githubusercontent.com/vyorkin/tiger/54dd179c1cd291df42f7894abce3ee9064e18def/chapter6/test/suite.ml
ocaml
failing / negative-case tests
open Core module Path = struct open Filename let book = parent_dir_name ^/ "book/testcases" let main = parent_dir_name ^/ "testcases" let mk dir = main ^/ dir end let book_tests = let failing = [ 9; 10; 11; 13; 14; 15; 17; 18; 19; 20; 21; 22; 23; 24; 25; 26; 28; 29; 31; 33; 32; 34; 35; 36;...
034a3585e0312ff6606f4ecd62b5d45ac3d07311e6ddef1fe7381a370bed24d4
gwkkwg/metatilities-base
copy-file.lisp
(in-package #:metatilities) (eval-always (export '(source/target-file-error source-pathname target-pathname source/target-target-already-exists-error source/target-source-does-not-exist-error copy-file))) (define-condition source/target-file-error (file-error) ((p...
null
https://raw.githubusercontent.com/gwkkwg/metatilities-base/ef04337759972fd622c9b27b53149f3d594a841f/dev/copy-file.lisp
lisp
no source file! borrowed from asdf-install -- how did this ever work ?!
(in-package #:metatilities) (eval-always (export '(source/target-file-error source-pathname target-pathname source/target-target-already-exists-error source/target-source-does-not-exist-error copy-file))) (define-condition source/target-file-error (file-error) ((p...
db3c376aedf12a63503600953e11c85a481cc0fe2c85a445e18f71a71cf67790
jxv/dino-rush
Runner.hs
# LANGUAGE TemplateHaskell # module DinoRush.Runner where import Control.Lens import Control.Monad (unless, when) import Control.Monad.State (MonadState(..), modify, gets) import Control.Monad.Reader (MonadReader(..)) import KeyState import DinoRush.Config import DinoRush.Effect.Audio import DinoRush.Effect.Camera im...
null
https://raw.githubusercontent.com/jxv/dino-rush/f888bc05fe734ced2c49bec81f9c804b47c81069/library/DinoRush/Runner.hs
haskell
# LANGUAGE TemplateHaskell # module DinoRush.Runner where import Control.Lens import Control.Monad (unless, when) import Control.Monad.State (MonadState(..), modify, gets) import Control.Monad.Reader (MonadReader(..)) import KeyState import DinoRush.Config import DinoRush.Effect.Audio import DinoRush.Effect.Camera im...
e203015ea4086bae4203656423b62081ac948ea09256f3d030ef0fde8c5da06a
evertedsphere/noether
Module.hs
# OPTIONS_GHC -fno - warn - unticked - promoted - constructors # module Noether.Algebra.Linear.Module where import Data.Complex import Noether.Lemmata.Prelude import Noether.Lemmata.TypeFu import Noether.Algebra.Actions import Noether.Algebra.Multiple import ...
null
https://raw.githubusercontent.com/evertedsphere/noether/c4223f64b9df5b0dbbeec1fea726bfff7f5810f5/library/Noether/Algebra/Linear/Module.hs
haskell
# OPTIONS_GHC -fno - warn - unticked - promoted - constructors # module Noether.Algebra.Linear.Module where import Data.Complex import Noether.Lemmata.Prelude import Noether.Lemmata.TypeFu import Noether.Algebra.Actions import Noether.Algebra.Multiple import ...
b2ca6b5b1c480b35c905282ef08656e5bdc6a6a124a65659662f1f1e822c5837
psholtz/MIT-SICP
exercise1-17.scm
;; Exercise 1.17 ;; ;; The exponentiation algorithms in this section are based on performing exponentiation by ;; means of repeated multiplication. In a similar way, one can perform integer multiplication ;; by means of repeated addition. The following multiplication procedure (in which it is ;; assumed that our la...
null
https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-1.2/mit-scheme/exercise1-17.scm
scheme
The exponentiation algorithms in this section are based on performing exponentiation by means of repeated multiplication. In a similar way, one can perform integer multiplication by means of repeated addition. The following multiplication procedure (in which it is assumed that our language can only add, not mul...
Exercise 1.17 ( even ) integer by 2 . Using these , design a multiplication procedure analogous to " fast - expt " (define (double x) (+ x x)) (define (halve x) (/ x 2)) (define (even? n) (= (remainder n 2) 0)) (define (* a b) (cond ((= b 0) 0) ((even? b) (double (* a (halve b)))) (else (+ a (* a (- b 1))))...
abaa4dd15df74c44be1436261c7f2904577586d53464a02da067e5be8c4e808d
racket/gui
button.rkt
#lang racket/base (require ffi/unsafe racket/class "../../syntax.rkt" "../../lock.rkt" "item.rkt" "utils.rkt" "types.rkt" "window.rkt" "const.rkt" "pixbuf.rkt" "message.rkt" "../common/event.rkt") (provide (protect-o...
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/gtk/button.rkt
racket
---------------------------------------- Globally turning on button images isn't really the right thing. Is there a way to enable image just for the widget `gtk'? Called from event-handling thread
#lang racket/base (require ffi/unsafe racket/class "../../syntax.rkt" "../../lock.rkt" "item.rkt" "utils.rkt" "types.rkt" "window.rkt" "const.rkt" "pixbuf.rkt" "message.rkt" "../common/event.rkt") (provide (protect-o...
b62e49a5246b8d8fa67cc71641256219be743451481063e593639559bab9e4f6
caisah/sicp-exercises-and-examples
mutation.scm
(define (cons x y) (define (dispatch m) (cond ((eq? m 'car) x) ((eq? m 'cdr) y) (else (error "Undefined operation - CONS" m)))) dispatch) (define (car z (z 'car))) (define (cdr z) (z 'cdr)) (define (cons x y) (define (set-x! v) (set! x v)) (define (set-y! v) (set! y v)) (define (di...
null
https://raw.githubusercontent.com/caisah/sicp-exercises-and-examples/605c698d7495aa3474c2b6edcd1312cb16c5b5cb/3.3.1-mutable_list_structure/mutation.scm
scheme
(define (cons x y) (define (dispatch m) (cond ((eq? m 'car) x) ((eq? m 'cdr) y) (else (error "Undefined operation - CONS" m)))) dispatch) (define (car z (z 'car))) (define (cdr z) (z 'cdr)) (define (cons x y) (define (set-x! v) (set! x v)) (define (set-y! v) (set! y v)) (define (di...
d566da1d08fd9743b9ad55566d259dad16c9abe93b980a6ee59d52bb08f886f0
TyOverby/mono
import.ml
module Vdom = struct module Node = struct type t = string end end module Effect = struct type 'a t = unit end
null
https://raw.githubusercontent.com/TyOverby/mono/3047276b9c7b35401fd10963d38c5c84830fce1a/lib/view_prototype/src/import.ml
ocaml
module Vdom = struct module Node = struct type t = string end end module Effect = struct type 'a t = unit end