_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
9404878c04624a71481559de8176a17a140cecc152b76f3882670d7f1dfa0674
bottleneko/eraven
er_request_context.erl
-module(er_request_context). -record(er_request_context, {% method :: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE...
null
https://raw.githubusercontent.com/bottleneko/eraven/b922adff52d14a2dd5a20abfcb790cfb6403f66f/src/er_request_context.erl
erlang
API =================================================================== API ===================================================================
-module(er_request_context). method :: 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' ...
e6a2b913402a7ceea774bc110eb0beea115e1d4e8d79a95e8fe60eb9c02a8be4
dakk/caravand-fullnode
mempool.ml
open Utils;; open Bitcoinml;; open Tx;; open Conv;; type t = { txs : (Hash.t, Tx.t) Hashtbl.t; mutable fees : Int64.t; mutable average_fee : Int64.t; mutable size : int; };; let fee_of_tx tx = Int64.zero ;; let create () = { txs= Hashtbl.create 512; fees= Int64.ze...
null
https://raw.githubusercontent.com/dakk/caravand-fullnode/72735bf380812aea32ba0d3d4aa671f741cdaecb/src/blockchain/mempool.ml
ocaml
open Utils;; open Bitcoinml;; open Tx;; open Conv;; type t = { txs : (Hash.t, Tx.t) Hashtbl.t; mutable fees : Int64.t; mutable average_fee : Int64.t; mutable size : int; };; let fee_of_tx tx = Int64.zero ;; let create () = { txs= Hashtbl.create 512; fees= Int64.ze...
42a95860f201624e5f8898d6875eb87dd22385ba8527a3d0380ea996ba6dbc02
l29ah/hatexmpp3
AdHocCommands.hs
-- | Stability : Ultra - Violence -- Portability : I'm too young to die XEP-0050 : Ad - Hoc Commands {-# LANGUAGE OverloadedStrings #-} module Network.Xmpp.Extras.AdHocCommands where import Data.Default import Data.Either import Data.Maybe import Data.Text (Text) import qualified Data.Text as T import Data...
null
https://raw.githubusercontent.com/l29ah/hatexmpp3/9d3e25c6acf4c0978a2c1d88b3572ad20b1c228d/Network/Xmpp/Extras/AdHocCommands.hs
haskell
| Portability : I'm too young to die # LANGUAGE OverloadedStrings #
Stability : Ultra - Violence XEP-0050 : Ad - Hoc Commands module Network.Xmpp.Extras.AdHocCommands where import Data.Default import Data.Either import Data.Maybe import Data.Text (Text) import qualified Data.Text as T import Data.XML.Types as DXT import Network.Xmpp.Extras.DateTime import Network.Xmpp.Inter...
421e8e7056c53c7ee1b1469d9b739fcfbe290e67ce510afd07685250d7180329
theobat/massalia
Truck.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE NoImplicitPrelude # # LANGUAGE MultiParamTypeClasses # # LANGUAGE StandaloneDeriving # # LANGUAGE DerivingStrategies # # LANGUAGE DerivingVia # # LANGUAGE...
null
https://raw.githubusercontent.com/theobat/massalia/66d65c3431132091107d07e041f33c907f9d08cb/dataseed/MassaliaSchema/Industry/Truck.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE OverloadedStrings # | TODO: add actual truckFilter application
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE NoImplicitPrelude # # LANGUAGE MultiParamTypeClasses # # LANGUAGE StandaloneDeriving # # LANGUAGE DerivingStrategies # # LANGUAGE DerivingVia # # LANGUAGE PartialTypeSignatures # module MassaliaSchema.Industry.Truck ( ...
c7424b2fb6cabbe9d948ba3807d3e49ebe1ebf12951316d42d6856dd8b60b0f4
scrintal/heroicons-reagent
variable.cljs
(ns com.scrintal.heroicons.solid.variable) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M19.253 2.292a.75.75 0 01.955.461A28.123 28.123 0 0121.75 12c0 3.266-.547 6.388-1...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/variable.cljs
clojure
(ns com.scrintal.heroicons.solid.variable) (defn render [] [:svg {:xmlns "" :viewBox "0 0 24 24" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M19.253 2.292a.75.75 0 01.955.461A28.123 28.123 0 0121.75 12c0 3.266-.547 6.388-1...
9d737bd5f2f4f36d1a2d538805ff66b63b914e58b0b1181b56c1fbf1f95f1cff
aeternity/aeternity
aec_block_fork_tests.erl
-module(aec_block_fork_tests). -include_lib("eunit/include/eunit.hrl"). -include("../../aecontract/test/include/aect_sophia_vsn.hrl"). -include_lib("aecontract/include/hard_forks.hrl"). -include_lib("aecontract/include/aecontract.hrl"). %%%=================================================================== %%% Test ...
null
https://raw.githubusercontent.com/aeternity/aeternity/e66a588a41d8af5f4ce8467f28258d3f2c74cd8e/apps/aecore/test/aec_block_fork_tests.erl
erlang
=================================================================== Test cases =================================================================== no accounts migrated Extra accounts No contracts Check the extra_accounts. Extra accounts Check the extra_accounts. Make sure the locked account balance didn't chang...
-module(aec_block_fork_tests). -include_lib("eunit/include/eunit.hrl"). -include("../../aecontract/test/include/aect_sophia_vsn.hrl"). -include_lib("aecontract/include/hard_forks.hrl"). -include_lib("aecontract/include/aecontract.hrl"). -define(UAT_ROOT_HASH, "0BA96447352BA2C14D1F9AD03D6085A270FDC49704B7D2A190C60161...
32bac339e33844c706614fbc587954cb32253e1124e5ad9fb6aafa50b08e9b37
intolerable/reddit
CaptchaSpec.hs
module Reddit.Actions.CaptchaSpec where import Reddit import Utils import Test.Hspec isRight :: Either a b -> Bool isRight = const False `either` const True main :: IO () main = hspec spec spec :: Spec spec = skip $ describe "Reddit.Actions.Captcha" $ do it "should be able to get a new captcha" $ do res <- ...
null
https://raw.githubusercontent.com/intolerable/reddit/588901f79e684536a6839d63e6f9c6a4847fe001/test-anon/Reddit/Actions/CaptchaSpec.hs
haskell
module Reddit.Actions.CaptchaSpec where import Reddit import Utils import Test.Hspec isRight :: Either a b -> Bool isRight = const False `either` const True main :: IO () main = hspec spec spec :: Spec spec = skip $ describe "Reddit.Actions.Captcha" $ do it "should be able to get a new captcha" $ do res <- ...
dc15c57c5c6a9369891732e7959c2c4ddd7e850e3a813be5e0674a82e6963570
janestreet/bonsai
start.mli
* [ Start ] handles the entire lifecycle of web - based Bonsai application . Put another way , [ Start ] is like { ! Core . Command } for Bonsai_web apps . Put another way, [Start] is like {!Core.Command} for Bonsai_web apps. *) open! Core open! Async_kernel open! Import module Arrow_deprecated : sig mo...
null
https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/web/start.mli
ocaml
* A handle represents a running app, and can be used to schedule external actions, determine if the app has started, and stop the app. - ['input] is the input type of the outermost component of the app. - ['extra] is any extra result (other than the app view) returned by the outermost ...
* [ Start ] handles the entire lifecycle of web - based Bonsai application . Put another way , [ Start ] is like { ! Core . Command } for Bonsai_web apps . Put another way, [Start] is like {!Core.Command} for Bonsai_web apps. *) open! Core open! Async_kernel open! Import module Arrow_deprecated : sig mo...
71484027c9151507f292e8163853f08eff471010d78c49879d430400e4a1b8cc
flosell/lambdacd
execute_step_test.clj
(ns lambdacd.execution.internal.execute-step-test (:require [clojure.test :refer :all] [lambdacd.testsupport.data :refer [some-ctx-with some-ctx]] [lambdacd.testsupport.test-util :refer [events-for slurp-chan ...
null
https://raw.githubusercontent.com/flosell/lambdacd/e9ba3cebb2d5f0070a2e0e1e08fc85fc99ee7135/test/clj/lambdacd/execution/internal/execute_step_test.clj
clojure
wait for a bit so that the success doesn't screw up the order of events tested wait for a bit so that the success doesn't screw up the order of events tested wait for a bit so that the success doesn't screw up the order of events tested TODO: why exactly are we doing this? TODO : add tests here , possibly migrate f...
(ns lambdacd.execution.internal.execute-step-test (:require [clojure.test :refer :all] [lambdacd.testsupport.data :refer [some-ctx-with some-ctx]] [lambdacd.testsupport.test-util :refer [events-for slurp-chan ...
9e19e938aa989216844a68c6f966b8b3820a41e097b50677f67cb5c4167d4cb2
fraidev/tornado
runner.ml
let () = Alcotest.run "Tornado Tests E2E" [ Tcp_test.tests; Client_test.tests ] ;;
null
https://raw.githubusercontent.com/fraidev/tornado/d896911dcfddec49aa3acf53e43c03c7744a2721/test/e2e/runner.ml
ocaml
let () = Alcotest.run "Tornado Tests E2E" [ Tcp_test.tests; Client_test.tests ] ;;
f2d9d7fa297e31eece1fe6fe3d75d2e1ac0d587a962174a357a66c6bbf461e41
dwayne/eopl3
interpreter.rkt
#lang eopl (require "./nenv.rkt") (require "./parser.rkt") (require "./translator.rkt") (provide ;; Expressed Values num-val bool-val ;; Interpreter run) (define (run s) (let ([init-nenv (extend-nenv (num-val 1) (extend-nenv (num-val 5) ...
null
https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/03-ch3/interpreters/racket/NAMELESS-PROC-3.38/interpreter.rkt
racket
Expressed Values Interpreter Procedure ADT Values ExpVal = Int + Bool + Proc
#lang eopl (require "./nenv.rkt") (require "./parser.rkt") (require "./translator.rkt") (provide num-val bool-val run) (define (run s) (let ([init-nenv (extend-nenv (num-val 1) (extend-nenv (num-val 5) (extend-nenv ...
89160a984368204e4ab17fef894851c4929b75d104a453354426c5044bca59ee
progman1/genprintlib
command_line.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/progman1/genprintlib/acc1e5cc46b9ce6191d0306f51337581c93ffe94/debugger/4.10.0/command_line.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt OCaml port by and Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Int64ops open Format open Instruct open Unix open ...
ca92d01fa8434fcfef54cc03d29c914632bf5d4d4eaf469e3ebf5268811345d8
agda/agda
SparseMatrix.hs
| Sparse matrices . We assume the matrices to be very sparse , so we just implement them as sorted association lists . Most operations are linear in the number of non - zero elements . An exception is transposition , which needs to sort the association list again ; it has the complexity of sorting : @n ...
null
https://raw.githubusercontent.com/agda/agda/4f3899c597792fa4455e0f8134dfd63bc89b1c07/src/full/Agda/Termination/SparseMatrix.hs
haskell
* Basic data types Moved to the internal test - suite * Generating and creating matrices , matrix -- Moved to the internal test-suite * Combining and querying matrices * Modifying matrices ---------------------------------------------------------------------- * Basic data types ---------------------------------...
| Sparse matrices . We assume the matrices to be very sparse , so we just implement them as sorted association lists . Most operations are linear in the number of non - zero elements . An exception is transposition , which needs to sort the association list again ; it has the complexity of sorting : @n ...
f4384b323cf75f554ec8549706c6c3a1f7f434b217f3582e53c08151a77eaa02
reborg/clojure-essential-reference
1.clj
(monoid [op ctor])
null
https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/ReducersandTransducers/Reducers/monoid/1.clj
clojure
(monoid [op ctor])
1e6be102c180548949ef1bc943b9651a60ee3c43148239a1be59f2eb8cb15f48
mark-watson/lisp_practical_semantic_web
test.lisp
(require :aserve) (in-package :net.aserve.client) (push "../utils/yason/" asdf:*central-registry*) (asdf:operate 'asdf:load-op 'yason) (defvar mql-url "=") (defvar *h* (make-hash-table :test #'equal)) (defvar *h2* (make-hash-table :test #'equal)) (setf (gethash "name" *h2*) "Mark Louis Watson") (setf (gethash "type"...
null
https://raw.githubusercontent.com/mark-watson/lisp_practical_semantic_web/2d9d5bb06b574ab0bff15664fe747a5b99e1fb1b/freebase_client/test.lisp
lisp
(require :aserve) (in-package :net.aserve.client) (push "../utils/yason/" asdf:*central-registry*) (asdf:operate 'asdf:load-op 'yason) (defvar mql-url "=") (defvar *h* (make-hash-table :test #'equal)) (defvar *h2* (make-hash-table :test #'equal)) (setf (gethash "name" *h2*) "Mark Louis Watson") (setf (gethash "type"...
46b4401d26918fff5741b05c706884770ab25d60974e550ec26991d7c4e17ce2
fractalide/fractalide
set-password.rkt
#lang racket (require fractalide/modules/rkt/rkt-fbp/agent) (define-agent #:input '("in" "password") #:output '("out") (define maybe-passwd (try-recv (input "password"))) (define maybe-acc (try-recv (input "acc"))) (define password (or maybe-passwd maybe-acc)) (define button-pushed? (try-recv (input "...
null
https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/agents/cardano-wallet/set-password.rkt
racket
#lang racket (require fractalide/modules/rkt/rkt-fbp/agent) (define-agent #:input '("in" "password") #:output '("out") (define maybe-passwd (try-recv (input "password"))) (define maybe-acc (try-recv (input "acc"))) (define password (or maybe-passwd maybe-acc)) (define button-pushed? (try-recv (input "...
72e1c832706482aa426d182fd00aa3498f7c26396531a2db413db9f6ee53306b
wangsix/VMO_repeated_themes_discovery
converter.lisp
;(in-package :common-lisp-user) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "csv-files" :type "lisp") *lisp-code-root*)) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "humdrum-by-col" :type "lisp") *lisp-code...
null
https://raw.githubusercontent.com/wangsix/VMO_repeated_themes_discovery/0082b3c55e64ed447c8b68bcb705fd6da8e3541f/JKUPDD-Oct2013/groundTruth/mozartK282Mvt2/polyphonic/deadSym/repeatedPatterns/barlowAndMorgenstern/A/script/converter.lisp
lisp
(in-package :common-lisp-user)
(load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "csv-files" :type "lisp") *lisp-code-root*)) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "humdrum-by-col" :type "lisp") *lisp-code-root*)) (load (merge-pathnames...
4b8ca2512a7498f3c35fac67b82035d8d42951d7b8b6fc61c2e62f1917190f4f
brianium/clean-todos
db.cljs
(ns todos.delivery.web.db (:require [cljs.spec.alpha :as s] [re-frame.core :as rf] [todos.core.entity.spec :as es] [todos.core.entity.todo.spec :as ts]) (:import (goog Uri))) (s/def ::todos (s/and (s/map-of ::es/id ::ts/todo) #(instance? Persis...
null
https://raw.githubusercontent.com/brianium/clean-todos/fca2320fe3bca052787c4ace479ce69d23d58a12/src/todos/delivery/web/db.cljs
clojure
(ns todos.delivery.web.db (:require [cljs.spec.alpha :as s] [re-frame.core :as rf] [todos.core.entity.spec :as es] [todos.core.entity.todo.spec :as ts]) (:import (goog Uri))) (s/def ::todos (s/and (s/map-of ::es/id ::ts/todo) #(instance? Persis...
988144a7e8d7e9e6938506ae7b6f51fc5be337515dcf01c071aa46c28d6411a1
MercuryTechnologies/moat
AdvancedNewtypeSpec.hs
module AdvancedNewtypeSpec where import Common import Data.Text (Text) import Moat import Test.Hspec import Test.Hspec.Golden import Prelude newtype Newtype = Newtype Text mobileGenWith ( defaultOptions { dataAnnotations = [Parcelize, JvmInline], dataInterfaces = [Parcelable], dataProtocols =...
null
https://raw.githubusercontent.com/MercuryTechnologies/moat/a10031027759a6bffd6d0672b8f3ff4e23c06c82/test/AdvancedNewtypeSpec.hs
haskell
module AdvancedNewtypeSpec where import Common import Data.Text (Text) import Moat import Test.Hspec import Test.Hspec.Golden import Prelude newtype Newtype = Newtype Text mobileGenWith ( defaultOptions { dataAnnotations = [Parcelize, JvmInline], dataInterfaces = [Parcelable], dataProtocols =...
e879a6abeb4ad97052e955e7471be2c345259b7b175a7d8020cfd8ebeefdeb66
mbenke/zpf2012
examples2.hs
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , UndecidableInstances # import Test.QuickCheck class (Functor f) => Applicative f where pure :: a -> f a (<*>) :: f (a -> b) -> f a -> f b (<$>) :: (Applicative f) => (a -> b) -> f a -> f b f <$> u = pure f <*> u instance ...
null
https://raw.githubusercontent.com/mbenke/zpf2012/faad6468f9400059de1c0735e12a84a2fdf24bb4/Slides/10/examples2.hs
haskell
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances , UndecidableInstances # import Test.QuickCheck class (Functor f) => Applicative f where pure :: a -> f a (<*>) :: f (a -> b) -> f a -> f b (<$>) :: (Applicative f) => (a -> b) -> f a -> f b f <$> u = pure f <*> u instance ...
589a83bc9a52bb2399b6de3afdb282054088e5809e62dd524b395c186b16b099
Viasat/halite
test_jadeite_forms.clj
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.test-jadeite-forms (:require [clojure.test :refer :all] [clojure.set :as set] [com.viasat.halite :as halite] [com.viasat.jadeite :as jadeite]) (:import (clojure.lang ExceptionInfo))) (def senv ...
null
https://raw.githubusercontent.com/Viasat/halite/1145fdf49b5148acb389dd5100059b0d2ef959e1/test/com/viasat/test_jadeite_forms.clj
clojure
true => false Examples used in the docs this is an empty instance, which halite will reject (run-tests)
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.test-jadeite-forms (:require [clojure.test :refer :all] [clojure.set :as set] [com.viasat.halite :as halite] [com.viasat.jadeite :as jadeite]) (:import (clojure.lang ExceptionInfo))) (def senv ...
5ebedb9216eb13ab3770fcbb1bf69c66d7b7a2705e8b18cec549df43705a7726
epiccastle/spire
test_utils.clj
(ns test-pod.test-utils (:require [test-pod.utils :refer [bash]] [test-pod.conf :as conf] [clojure.string :as string] [clojure.java.io :as io] [pod.epiccastle.spire.utils :as utils] [clojure.test :refer [is deftest]] )) (deftest to-snakecase ...
null
https://raw.githubusercontent.com/epiccastle/spire/e58c6d8c748f57a56c180c0d254c18f1a08b64ff/test/test_pod/test_utils.clj
clojure
deftest runs inside runner outside deftest does not
(ns test-pod.test-utils (:require [test-pod.utils :refer [bash]] [test-pod.conf :as conf] [clojure.string :as string] [clojure.java.io :as io] [pod.epiccastle.spire.utils :as utils] [clojure.test :refer [is deftest]] )) (deftest to-snakecase ...
9dc92d879d68a5595b2167b5d4a236ab400950199bdb99df7ee10caa46f01baa
erlang/corba
m_i_impl.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1999 - 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/examples/pre_post_condition/m_i_impl.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 1999 - 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(m_i_impl). -export([init/1, terminate/2]). Interface functions -export([f/2, g/2]). init(_Env) -> {ok...
509cb360c3e5a63912f237715b64986bdbffe25284ff4d2929ab020165752175
nstack/nstack
Function.hs
module NStack.Prelude.Function where curry3 :: ((a, b, c) -> d) -> a -> b -> c -> d curry3 f a b c = f (a, b, c) curry4 :: ((a, b, c, d) -> e) -> a -> b -> c -> d -> e curry4 f a b c d = f (a, b, c, d) uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d uncurry3 f (a, b, c) = f a b c uncurry4 :: (a -> b -> c -> d -> e...
null
https://raw.githubusercontent.com/nstack/nstack/c987557511134ed61db152a0bccbb80216b07a4b/nstack-prelude/src/NStack/Prelude/Function.hs
haskell
module NStack.Prelude.Function where curry3 :: ((a, b, c) -> d) -> a -> b -> c -> d curry3 f a b c = f (a, b, c) curry4 :: ((a, b, c, d) -> e) -> a -> b -> c -> d -> e curry4 f a b c d = f (a, b, c, d) uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d uncurry3 f (a, b, c) = f a b c uncurry4 :: (a -> b -> c -> d -> e...
c21a5375bb09f0cc9c6501701c3528c8ef162253036a9463f84ad68a1cb9a6f6
ghc/packages-Cabal
P.hs
module P where p :: Int p = 42
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/cabal-install/tests/IntegrationTests2/regression/3324/p/P.hs
haskell
module P where p :: Int p = 42
518bd0c49578203e9c93cac89ff370df0f95077c30d0eb4e140d1a8c46ea0206
Helium4Haskell/helium
Missing9.hs
data T = L | B T T main :: T -> () main t = case t of B _ L -> () L -> () B _ (B L L) -> () B L _ -> () B _ (B (B _ _) _) -> ()
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/staticwarnings/Missing9.hs
haskell
data T = L | B T T main :: T -> () main t = case t of B _ L -> () L -> () B _ (B L L) -> () B L _ -> () B _ (B (B _ _) _) -> ()
e3cdf1ad25a4729dd8da5cdc712a1089d5410c067cc2c7eecad87633c3e4b4c1
squirrel-prover/squirrel-prover
rewrite.mli
module Pos = Match.Pos (*------------------------------------------------------------------*) include module type of LowRewrite (*------------------------------------------------------------------*) type error = | NothingToRewrite | MaxNestedRewriting | RuleBadSystems of string (*----------------------------...
null
https://raw.githubusercontent.com/squirrel-prover/squirrel-prover/b50eebf07debe8b39bd317c2c39046c0fa3ce60c/src/rewrite.mli
ocaml
------------------------------------------------------------------ ------------------------------------------------------------------ ------------------------------------------------------------------ * Try to do a rewrite at head position in a term. Return: rewritten term, proof obligations ----------------------...
module Pos = Match.Pos include module type of LowRewrite type error = | NothingToRewrite | MaxNestedRewriting | RuleBadSystems of string val rewrite_head : Symbols.table -> Macros.expand_context -> Hyps.TraceHyps.hyps Lazy.t -> SystemExpr.t -> rw_rule -> Term.term -> (Term.term * (SE.arbitrary ...
8e91cc725977e4cf8e678c98a55adea00fed1179b3a67e32f7d1250337126aa2
choener/BiobaseXNA
SubOptDistance.hs
-- | A very simple program that calculates base pair distances given -- a secondary structure as argument and a Vienna RNAsubopt output via stdin . module Main where import Control.Arrow import Data.Char (isSpace) import Data.Either (either) import Data.Ord import System.Console.CmdArgs import Text.Printf import ...
null
https://raw.githubusercontent.com/choener/BiobaseXNA/ebec70a3906106a50c29cdbbce9a3247d6ebb15f/src/SubOptDistance.hs
haskell
| A very simple program that calculates base pair distances given a secondary structure as argument and a Vienna RNAsubopt output via
stdin . module Main where import Control.Arrow import Data.Char (isSpace) import Data.Either (either) import Data.Ord import System.Console.CmdArgs import Text.Printf import Biobase.Secondary import Biobase.Secondary.Diagrams data Options = Options { structure :: String , aq :: Bool , qa :: Bool } deri...
53ae26db3f29c7dd53c0db587fb0982054d4920260b78f73dc5a393c3e8c34c4
danielmiladinov/joy-of-clojure
scalar_types.clj
;; Integers ;; --------------------------------------------------------------------------------------------------------------------- ;; Here are some example integers in clojure: 42 +9 -107 991778647261948849222819828311491035886734385827028118707676848307166514 All the numbers shown , except the last one , are read ...
null
https://raw.githubusercontent.com/danielmiladinov/joy-of-clojure/cad7d1851e153beb12a2cd536eb467be12cb7a73/src/joy-of-clojure/chapter2/scalar_types.clj
clojure
Integers --------------------------------------------------------------------------------------------------------------------- Here are some example integers in clojure: the last is too big to fit in a long and thus is read as a BigInt (which is printed with a trailing N). all representing the same number: When ...
42 +9 -107 991778647261948849222819828311491035886734385827028118707676848307166514 The following illustrates the use of decimal , hexadecimal , octal , radix-32 , and binary literals , respectively , [127 0x7F 0177 32r3V 2r01111111] = > [ 127 127 127 127 127 ] The radix notation supports up to base 36 , includin...
de8be0544343e09217c9f14654980f1a0e6dbc88d503771c7a825ccb499db543
roddyyaga/ppx_rapper
rapper.mli
module type CUSTOM = sig type t val t : t Caqti_type.t end val load_many : ('row -> 'parent) * ('parent -> 'key) -> (('row -> 'child) * ('parent -> 'child list -> 'parent)) list -> 'row list -> 'parent list module Internal : sig module Dynparam : sig type t = Pack : 'a Caqti_type.t * 'a -> t v...
null
https://raw.githubusercontent.com/roddyyaga/ppx_rapper/41a180a1f6f7e52af3fcd1a7573e192c25a0901b/lib-runtime/rapper.mli
ocaml
module type CUSTOM = sig type t val t : t Caqti_type.t end val load_many : ('row -> 'parent) * ('parent -> 'key) -> (('row -> 'child) * ('parent -> 'child list -> 'parent)) list -> 'row list -> 'parent list module Internal : sig module Dynparam : sig type t = Pack : 'a Caqti_type.t * 'a -> t v...
6cb5110ae1f6217f42aa8ffa4fbaa9cf11839fb01f491f2f1f348f049b957e17
LeventErkok/sbv
U2Bridge.hs
----------------------------------------------------------------------------- -- | -- Module : Documentation.SBV.Examples.Puzzles.U2Bridge Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- -- The famous U2 bridge crossing puzzle: <> ---------------------------------------------...
null
https://raw.githubusercontent.com/LeventErkok/sbv/0d791d9f4d1de6bd915b6d7d3f9a550385cb27a5/Documentation/SBV/Examples/Puzzles/U2Bridge.hs
haskell
--------------------------------------------------------------------------- | Module : Documentation.SBV.Examples.Puzzles.U2Bridge License : BSD3 Maintainer: Stability : experimental The famous U2 bridge crossing puzzle: <> --------------------------------------------------------------------------- # LANGU...
Copyright : ( c ) # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # OPTIONS_GHC -Wall -Werror -Wno - incomplete - uni - patterns # module Documentation.SBV.Examples.Puzzles.U2Bridge where import Control.Monad (unless) import Control.Monad.State (State, runState, put, get, gets, modif...
5622f8862ab0f46f940c5d5170a8a80d18e018d8f1ce1c73142b2c6f3563c95a
Bogdanp/racket-lz4
math.rkt
#lang racket/base (provide (all-defined-out)) (define u32max #xFFFFFFFF) (define u32max+1 (add1 u32max)) (define (uint32 bs pos) (integer-bytes->integer bs #f #f pos (+ pos 4))) (define (uint32+ a b) (define v (+ a b)) (if (> v u32max) (- v u32max 1) v)) (define (uint32- a b) (define v (- a b))...
null
https://raw.githubusercontent.com/Bogdanp/racket-lz4/5d4a38d78535a712590a3b6b564b86b56d50c2ef/xxhash-lib/private/xxhash32/math.rkt
racket
#lang racket/base (provide (all-defined-out)) (define u32max #xFFFFFFFF) (define u32max+1 (add1 u32max)) (define (uint32 bs pos) (integer-bytes->integer bs #f #f pos (+ pos 4))) (define (uint32+ a b) (define v (+ a b)) (if (> v u32max) (- v u32max 1) v)) (define (uint32- a b) (define v (- a b))...
3482a354904309336db64182e10a525d2cc00be2bac35ba0f6aa3060a2bcebba
macourtney/Dark-Exchange
home_tab.clj
(ns darkexchange.view.main.home-tab (:require [darkexchange.model.terms :as terms] [darkexchange.view.main.home.open-offer-panel :as open-offer-panel] [darkexchange.view.main.home.open-trade-panel :as open-trade-panel] [seesaw.core :as seesaw-core])) (def tab-name (terms/home)) (...
null
https://raw.githubusercontent.com/macourtney/Dark-Exchange/1654d05cda0c81585da7b8e64f9ea3e2944b27f1/src/darkexchange/view/main/home_tab.clj
clojure
(ns darkexchange.view.main.home-tab (:require [darkexchange.model.terms :as terms] [darkexchange.view.main.home.open-offer-panel :as open-offer-panel] [darkexchange.view.main.home.open-trade-panel :as open-trade-panel] [seesaw.core :as seesaw-core])) (def tab-name (terms/home)) (...
d1d13e76c7dc983d290e48e13e41e3935a679349d7b6113e5ec178c971da73ff
YPares/Haskell-OpenGL3.1-Tutos
main.hs
{-# LANGUAGE ImplicitParams, RecordWildCards, NoMonomorphismRestriction #-} module Main where import qualified Graphics.UI.GLFW as W import Graphics.Rendering.OpenGL.Raw import Data.Vec import Control.Monad import Control.Applicative import Data.Function import Foreign import Foreign.C.String withNewPt...
null
https://raw.githubusercontent.com/YPares/Haskell-OpenGL3.1-Tutos/7a027b927d061fbd26138cb7357c40c4cacbc927/tutorial03/main.hs
haskell
# LANGUAGE ImplicitParams, RecordWildCards, NoMonomorphismRestriction # attribute location in the shader coordinates type normalize? stride vertex buffer offset We are ROW-first ^^^ temporary recoding , W.displayOptions_openGLProfile = W.CoreProfile }
module Main where import qualified Graphics.UI.GLFW as W import Graphics.Rendering.OpenGL.Raw import Data.Vec import Control.Monad import Control.Applicative import Data.Function import Foreign import Foreign.C.String withNewPtr f = alloca (\p -> f p >> peek p) checkStatus statusFlag glGetFn glInfoLogFn id = do ...
e14373fa1175ed1fa6c407564c878c99957b505c6e78f1d6b23354ed59d96202
cyga/real-world-haskell
D.hs
file : ch25 / D.hs mean :: [Double] -> Double mean xs = s / fromIntegral n where (n, s) = foldl' k (0, 0) xs k (n, s) x = n `seq` s `seq` (n+1, s+x)
null
https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch25/D.hs
haskell
file : ch25 / D.hs mean :: [Double] -> Double mean xs = s / fromIntegral n where (n, s) = foldl' k (0, 0) xs k (n, s) x = n `seq` s `seq` (n+1, s+x)
c618c7bcf93c18c551e7a12fcfbc9dcddce3c6235fe425ebbcbbd1193812b57d
incanter/incanter
dataset_tests.clj
(ns incanter.dataset-tests (:require [clojure.core.matrix :as m]) (:use clojure.test (incanter core))) (def dataset1 (dataset [:a :b :c] [[1 2 3] [4 5 6]])) (def dataset2 (dataset [" a" "b" "c"] [[1 2 3] [4 5 6]])) (def dataset3 (dataset [:a :b :c] [{:a 1 :b 2 :c 3} {:a 4 :b 5 :c 6}])) (def dataset4 (datas...
null
https://raw.githubusercontent.com/incanter/incanter/e0a03aac237fcc60587278a36bd2e76266fc6356/modules/incanter-core/test/incanter/dataset_tests.clj
clojure
(ns incanter.dataset-tests (:require [clojure.core.matrix :as m]) (:use clojure.test (incanter core))) (def dataset1 (dataset [:a :b :c] [[1 2 3] [4 5 6]])) (def dataset2 (dataset [" a" "b" "c"] [[1 2 3] [4 5 6]])) (def dataset3 (dataset [:a :b :c] [{:a 1 :b 2 :c 3} {:a 4 :b 5 :c 6}])) (def dataset4 (datas...
31c409f21a8384c9593ebfbaca60880104a4b72fcc3a621e9f2b7811ade47ef7
racket/frtime
date.rkt
#lang racket/base (require (only-in frtime/frtime [provide frtime:provide])) (frtime:provide (lifted date->string date-display-format find-seconds date->julian/scalinger julian/scalinger->string)) (require racket/promise) ...
null
https://raw.githubusercontent.com/racket/frtime/9b9db67581107f4d7b995541c70f2d08f03ae89e/frlibs/date.rkt
racket
succeeded; double offset again julian/scalinger->string :
#lang racket/base (require (only-in frtime/frtime [provide frtime:provide])) (frtime:provide (lifted date->string date-display-format find-seconds date->julian/scalinger julian/scalinger->string)) (require racket/promise) ...
56e46b2dca25cb0751c1050507867386b45533b5e62e263675349d3f2a1a100d
nkaretnikov/OOHaskell
Rectangle.hs
{-# OPTIONS -fglasgow-exts #-} ( C ) 2004 - 2005 , Oleg Kiselyov & 's overlooked object system module Rectangle where import Shape import Subtype import GHC.IOBase -- The record type for rectangle data data Rectangle = Rectangle { rectangle2shape :: Shape , getWidth :: Int ...
null
https://raw.githubusercontent.com/nkaretnikov/OOHaskell/ddf42cfa62f8bd27643ff6db136dec6c14466232/repository/shapes/Haskell/Shapes6/Rectangle.hs
haskell
# OPTIONS -fglasgow-exts # The record type for rectangle data Substantiate the subtyping relation Setters Implement abstract methods
( C ) 2004 - 2005 , Oleg Kiselyov & 's overlooked object system module Rectangle where import Shape import Subtype import GHC.IOBase data Rectangle = Rectangle { rectangle2shape :: Shape , getWidth :: Int , getHeight :: Int } instance Subtype Rectang...
5191a4af7b7928909fb5b969200597cfd072ff85ebf609730f11c16465227011
smallmelon/sdzmmo
sd_gateway_server.erl
%%%--------------------------------------- %%% @Module : sd_gateway_server @Author : xyao %%% @Email : @Created : 2010.04.15 %%% @Description: tcp服务器 %%%--------------------------------------- -module(sd_gateway_server). -export([start_raw_server/3, stop/1, children/1]). -include("common.hrl"). ...
null
https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/sd_gateway_server.erl
erlang
--------------------------------------- @Module : sd_gateway_server @Email : @Description: tcp服务器 --------------------------------------- Port:端口 Fun:回调监听函数 停止TCP_SERVER服务器 Port:端口 Port:端口 Port:端口 打开监听 Port:端口 Fun:回调 Listen: Active:所有的子进程 Fun:回调 参数如上
@Author : xyao @Created : 2010.04.15 -module(sd_gateway_server). -export([start_raw_server/3, stop/1, children/1]). -include("common.hrl"). Max:最大连接数 start_raw_server(Port, Fun, Max) -> Name = port_name(Port), case whereis(Name) of undefined -> Self = self(), ...
a17075b21f46d3bd6fa1b84a6cb40c15e61ad97bb1f35376511ea57eaf1b582c
alvatar/spheres
access-remote.scm
;; Uniform access to local and remote resources Resolution for relative URIs in accordance with RFC 2396 ;; ;; This software is in Public Domain. IT IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND . ;; ;; Please send bug reports and comments to: ;; Dmitry Lizorkin ;;-------------------------------------...
null
https://raw.githubusercontent.com/alvatar/spheres/568836f234a469ef70c69f4a2d9b56d41c3fc5bd/spheres/markup/internal/id/access-remote.scm
scheme
Uniform access to local and remote resources This software is in Public Domain. Please send bug reports and comments to: Dmitry Lizorkin ------------------------------------------------------------------------------- !! Accessing (remote) resources ! Whether the resource exists (generalization of FILE-EXIST...
Resolution for relative URIs in accordance with RFC 2396 IT IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND . REQ - URI - a string representing a URI of the resource (define (resource-exists? req-uri) (cond HTTP scheme is used in REQ - URI (with-exception-handler (lambda () (http-trans...
0d326e86eda15b82788d2ea615f9d3ac2c6f55eb72940670bcf2f6d636f5c470
ghcjs/ghcjs-boot
Imp.hs
# LANGUAGE Unsafe # {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : Control.Monad.ST.Imp Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- ...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/Control/Monad/ST/Imp.hs
haskell
# OPTIONS_HADDOCK hide # --------------------------------------------------------------------------- | Module : Control.Monad.ST.Imp License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : non-portable (requires universal quantification for...
# LANGUAGE Unsafe # Copyright : ( c ) The University of Glasgow 2001 This library provides support for /strict/ state threads , as described in the PLDI \'94 paper by and module Control.Monad.ST.Imp ( abstract , instance of Functor , Monad , Typeable . runST, fixST, stToIO, ...
a8093907ce1716b5cfaf4ccbd206ba7aa36e95eb24086f7b031596db60d39569
backtracking/ocamlgraph
dirTree.ml
(**************************************************************************) (* *) : a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and (* ...
null
https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/editor/dirTree.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
: a generic graph library for OCaml Copyright ( C ) 2004 - 2010 , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking open Unix...
682c20b29b9913a3a13157793eb938f112669cc062f7e896737be2240d6114c1
rixed/ramen
RamenSampling.ml
Sampling function : build a sized down version of the list of all entries . * Returns a list , as the number of elements is unknown ( only known to be * between 1 and , inclusive ) * Returns a list, as the number of elements is unknown (only known to be * between 1 and max, inclusive) *) open Stdint type 'a...
null
https://raw.githubusercontent.com/rixed/ramen/941b3c0180540266059c41c8d613beec1041337f/src/RamenSampling.ml
ocaml
Count number of incoming items: The size of this array gives the reservoir max size. * Uninitialized values are initialized to a random value given by the * user: Because empty lists are invalid, the language makes sure we cannot ask * for max 0 samples: Returns the optional index where it's been sa...
Sampling function : build a sized down version of the list of all entries . * Returns a list , as the number of elements is unknown ( only known to be * between 1 and , inclusive ) * Returns a list, as the number of elements is unknown (only known to be * between 1 and max, inclusive) *) open Stdint type 'a...
ea0363ea5693ecd481fb884e86b4809d540e75b0cb4d5b5487001fdf22592e4a
qingliangcn/mgee
mgee_loglevel.erl
%%%---------------------------------------------------------------------- %%% File : mgee_loglevel.erl %%% Author : Qingliang %%% Purpose : Manage Erlang logging. Created : 2010 - 01 - 01 Description : Ming game engine erlang %%%---------------------------------------------------------------------- %%%--------...
null
https://raw.githubusercontent.com/qingliangcn/mgee/b65babc3a34ef678ae2b25ce1a8fdd06b2707bb8/src/mgee_loglevel.erl
erlang
---------------------------------------------------------------------- File : mgee_loglevel.erl Author : Qingliang Purpose : Manage Erlang logging. ---------------------------------------------------------------------- ---------------------------------------------------------------------- File : ejabberd_log...
Created : 2010 - 01 - 01 Description : Ming game engine erlang Author : < > Purpose : Loglevel switcher . Created : 29 Nov 2006 by < > ejabberd , Copyright ( C ) 2002 - 2012 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; ...
39a9cc468f5297e77fec695db7005ad1412592df822c813622e41d97f5848a4b
luc-tielen/eclair-lang
Transforms.hs
module Eclair.AST.Transforms ( simplify , ReplaceStrings.StringMap ) where import Eclair.AST.IR import Eclair.AST.Analysis import Eclair.Transform import qualified Eclair.AST.Transforms.ConstantFolding as ConstantFolding import qualified Eclair.AST.Transforms.RemoveAliases as RemoveAliases import qualified Eclai...
null
https://raw.githubusercontent.com/luc-tielen/eclair-lang/7fddbbfd3c52f524778153fd767684b7b119eb9d/lib/Eclair/AST/Transforms.hs
haskell
Transforms before optimizations: Optimizations that run until fixpoint is reached: Transforms after optimizations:
module Eclair.AST.Transforms ( simplify , ReplaceStrings.StringMap ) where import Eclair.AST.IR import Eclair.AST.Analysis import Eclair.Transform import qualified Eclair.AST.Transforms.ConstantFolding as ConstantFolding import qualified Eclair.AST.Transforms.RemoveAliases as RemoveAliases import qualified Eclai...
1960ef3d93f20f612fd8f529a57880f92bcece6764979fff18ccae788d4a2f2b
diku-kmc/kleenexlang
Core.hs
# LANGUAGE FlexibleContexts # module KMC.Kleenex.Core (stdToCore, getDecl) where import Control.Monad.State import qualified Data.Map as M import qualified Data.HashMap.Strict as HM import KMC.Kleenex.ApproximationMetrics (Decls, RTermAct, RProgAct) import KMC.Kleenex.Syntax data StdToC...
null
https://raw.githubusercontent.com/diku-kmc/kleenexlang/d474c6015339c261b2e7bf37061175fd69185baf/src/KMC/Kleenex/Core.hs
haskell
| Gets next free id | Inserts a deceleration in the final declaration map, given a id. | Gets a new id and adds the deceleration to that id | Returns next relevant declaration | Looks if the current id stack has already been visited | Rewrite each declaration
# LANGUAGE FlexibleContexts # module KMC.Kleenex.Core (stdToCore, getDecl) where import Control.Monad.State import qualified Data.Map as M import qualified Data.HashMap.Strict as HM import KMC.Kleenex.ApproximationMetrics (Decls, RTermAct, RProgAct) import KMC.Kleenex.Syntax data StdToC...
d589a4c7ce1a2821dd16b423b5743bdce828d2f919b13c39be84a190bc56ae58
google/lisp-koans
extra-credit.lisp
Copyright 2013 Google Inc. ;;; 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 distrib...
null
https://raw.githubusercontent.com/google/lisp-koans/df5e58dc88429ef0ff202d0b45c21ce572144ba8/koans/extra-credit.lisp
lisp
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
Copyright 2013 Google Inc. distributed under the License is distributed on an " AS IS " BASIS , (define-test play-greed (assert-true ____))
6b493a3034d17bb541c566d37d65e293a309ebb1d2ed000121f1591e72d19450
karimarttila/clojure
signin.cljs
(ns simplefrontend.signin (:require [re-frame.core :as re-frame] [reagent.core :as r] [day8.re-frame.http-fx] [simplefrontend.http :as sf-http] [simplefrontend.state :as sf-state] [simplefrontend.util :as sf-util])) (defn empty-user [] {:first-name "" :last-name "" :email "" :password ""}) ...
null
https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/webstore-demo/re-frame-demo/src/cljs/simplefrontend/signin.cljs
clojure
NOTE: The user data atom needs to be here and not inside the rendering function or you create a new atom every time the component re-renders. NOTE: The re-frame subscription needs to be inside the rendering function or the watch is not registered to the rendering function. :type :primary
(ns simplefrontend.signin (:require [re-frame.core :as re-frame] [reagent.core :as r] [day8.re-frame.http-fx] [simplefrontend.http :as sf-http] [simplefrontend.state :as sf-state] [simplefrontend.util :as sf-util])) (defn empty-user [] {:first-name "" :last-name "" :email "" :password ""}) ...
5e4318a86582eefd689946958569b5b80be0c3805ae9707d8ab91bc526035141
WorksHub/client
events.cljs
(ns wh.register.events (:require [re-frame.core :refer [reg-event-db reg-event-fx]] [wh.db :as db] [wh.common.keywords :as keywords] [wh.login.db :as login] [wh.register.db :as register]) (:require-macros [wh.graphql-macros :refer [defquery]])) (reg-event-db ::initialize-db db/default-i...
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/register/events.cljs
clojure
(ns wh.register.events (:require [re-frame.core :refer [reg-event-db reg-event-fx]] [wh.db :as db] [wh.common.keywords :as keywords] [wh.login.db :as login] [wh.register.db :as register]) (:require-macros [wh.graphql-macros :refer [defquery]])) (reg-event-db ::initialize-db db/default-i...
0c8c0130875718746d24f2891b51b488c1f60fb2bd10017a5e2961882210cf95
reenberg/wobot
Reify.hs
# LANGUAGE ScopedTypeVariables # Copyright ( c ) 2008 The President and Fellows of Harvard College . -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions -- are met: 1 . Redistributions of source code must retain th...
null
https://raw.githubusercontent.com/reenberg/wobot/ce7f112096ba1abd43b8d29da7e8944c2a004125/fladuino/fladuino/Fladuino/Reify.hs
haskell
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list of conditions and the following disclaimer in the documentation and/or other mate...
# LANGUAGE ScopedTypeVariables # Copyright ( c ) 2008 The President and Fellows of Harvard College . 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . Neither the name of the University nor the names of its con...
368ad2167822e4dacd77230113546acc05a87c11384815987e953e418c0c4f95
sicmutils/sicmutils
logic.cljc
#_"SPDX-License-Identifier: GPL-3.0" (ns sicmutils.util.logic "Logic utilities!" (:require [taoensso.timbre :as log])) (def ^{:doc "If true, logs assumptions." :dynamic true} *log-assumptions?* true) (defn assume! "Log an assumption. NOTE that `if-false` is not used right now. Currently this alwa...
null
https://raw.githubusercontent.com/sicmutils/sicmutils/ce763b31153eb9253f165bd5b4e4e6a6087bf730/src/sicmutils/util/logic.cljc
clojure
#_"SPDX-License-Identifier: GPL-3.0" (ns sicmutils.util.logic "Logic utilities!" (:require [taoensso.timbre :as log])) (def ^{:doc "If true, logs assumptions." :dynamic true} *log-assumptions?* true) (defn assume! "Log an assumption. NOTE that `if-false` is not used right now. Currently this alwa...
f031ccc207866d49d195882204d096c101355241f006018ac57b5e604d8670cd
paurkedal/ocaml-prime
unprime.mli
Copyright ( C ) 2013 - -2022 Petter A. Urkedal < > * * This library 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 , either version 3 of the License , or ( at your * option ) any la...
null
https://raw.githubusercontent.com/paurkedal/ocaml-prime/42efa85317069d726e8e3989e51c24ba03c56b47/lib/unprime.mli
ocaml
* Pervasives. * An operator variant of {!Option.fold}. * An operator variant of {!Option.iter}. * [None |?>= f] is [None] and [Some x |?>= f] is [f x]. This is the bind operator of the maybe monad. * An operator variant of {!List.fold}. * An operator variant of {!List.iter}.
Copyright ( C ) 2013 - -2022 Petter A. Urkedal < > * * This library 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 , either version 3 of the License , or ( at your * option ) any la...
cd4f989183798ce87433533f778b8288c587413cd6be02ae3b0c0f80ef670e47
3b/3bz
io.lisp
(in-package #:3bz) (defmacro with-vector-context ((context) &body body) (with-gensyms (boxes vector) (once-only (context) `(let* ((,boxes (boxes ,context)) (,vector (octet-vector ,context))) (declare (optimize speed) (ignorable ,vector ,boxes) (typ...
null
https://raw.githubusercontent.com/3b/3bz/569614c40408f3aefc77ba233e0e4bd66d3850ad/io.lisp
lisp
result + # of octets read as multiple values override POS/SET-POS for streams
(in-package #:3bz) (defmacro with-vector-context ((context) &body body) (with-gensyms (boxes vector) (once-only (context) `(let* ((,boxes (boxes ,context)) (,vector (octet-vector ,context))) (declare (optimize speed) (ignorable ,vector ,boxes) (typ...
f4d3b105be9c07b988c88ba5de3addbe44db962569d7cce8f382bc5f5041a2c6
haskell-opengl/OpenGLRaw
InternalformatSampleQuery.hs
# LANGUAGE PatternSynonyms # -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.NV.InternalformatSampleQuery Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- -------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/NV/InternalformatSampleQuery.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.GL.NV.InternalformatSampleQuery License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ * Extension Support * Enums ...
# LANGUAGE PatternSynonyms # Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.NV.InternalformatSampleQuery ( glGetNVInternalformatSampleQuery, gl_NV_internalformat_sample_query, pattern GL_CONFORMANT_NV, pattern GL_MULTISAMPLES_NV, pattern GL_RENDERBUFFER, pattern GL_SUPERSAMPLE...
c3693804d266be575ed3516cdeafe2267909376f6978e0ac1aa26eaffd0621d0
cyverse-archive/DiscoveryEnvironmentBackend
tools.clj
(ns metadactyl.routes.tools (:use [common-swagger-api.schema] [metadactyl.metadata.tool-requests] [metadactyl.containers] [metadactyl.schema.containers] [metadactyl.routes.domain.tool] [metadactyl.routes.params] [metadactyl.tools :only [add-tools get-tool search-tools u...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadactyl-clj/src/metadactyl/routes/tools.clj
clojure
(ns metadactyl.routes.tools (:use [common-swagger-api.schema] [metadactyl.metadata.tool-requests] [metadactyl.containers] [metadactyl.schema.containers] [metadactyl.routes.domain.tool] [metadactyl.routes.params] [metadactyl.tools :only [add-tools get-tool search-tools u...
28b504cff6c65b14ba8fc0cb3f9d495e31d659477bfbc35a051be49079cfab3d
tonyrog/graph
graph_mac.erl
@author < > ( C ) 2019 , %%% @doc MacGraph import / export %%% @end Created : 2 Mar 2019 by < > -module(graph_mac). -export([load/1]). -export([save/2]). -export([import/1]). -compile(export_all). -type int16() :: -16#8000 .. 16#7fff. -type uint16() :: 16#0000 .. 16#ffff. -type int32() :: -16#...
null
https://raw.githubusercontent.com/tonyrog/graph/73a54a61bc363a75a81b64010833b3b950611fc2/src/graph_mac.erl
erlang
@doc @end resource fork Graph object type numbers ID of TVertex ID of TComplexVertex ID of TComplexNode The enumerated super vertex or -1 for none The enumerated data unique for this vertex on file Current node color True if directed from x to y The vertex corresponding to theX enumeration The edge'...
@author < > ( C ) 2019 , MacGraph import / export Created : 2 Mar 2019 by < > -module(graph_mac). -export([load/1]). -export([save/2]). -export([import/1]). -compile(export_all). -type int16() :: -16#8000 .. 16#7fff. -type uint16() :: 16#0000 .. 16#ffff. -type int32() :: -16#80000000 .. 16#7ff...
919f2028bf0dc9737332126252dfc92ef42b3b5f59dd2e604ad2b4650ebc77e7
fluree/ledger
s3store.clj
(ns fluree.db.ledger.storage.s3store (:refer-clojure :exclude [read list list*]) (:require [clojure.core.async :as async] [clojure.java.io :as io] [clojure.string :as str] [cognitect.aws.client.api :as aws] [fluree.db.ledger.storage :refer [key->unix-path]] ...
null
https://raw.githubusercontent.com/fluree/ledger/995b7c43e8f196c71150e7cb10ac7d9f9d4c7104/src/fluree/db/ledger/storage/s3store.clj
clojure
handy for debugging but probably don't want it in production (aws/validate-requests client true) current usage, but be aware of this if those requirements ever change.
(ns fluree.db.ledger.storage.s3store (:refer-clojure :exclude [read list list*]) (:require [clojure.core.async :as async] [clojure.java.io :as io] [clojure.string :as str] [cognitect.aws.client.api :as aws] [fluree.db.ledger.storage :refer [key->unix-path]] ...
21d9e34e7b776bbb331c718a4d53b3c0f3175af1839808714eb535d429a438cc
chrisdone/prana
Setup.hs
We need to do some ugly hacks here because of GHC magic module Main (main) where import Control.Monad import Data.List import Data.Maybe import Distribution.PackageDescription import Distribution.Simple import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Program import Distribution.Simple.Utils im...
null
https://raw.githubusercontent.com/chrisdone/prana/f2e45538937d326aff562b6d49296eaedd015662/prana-boot/packages/ghc-prim-0.5.2.0/Setup.hs
haskell
I'm not sure which one of these we actually need to change. Replace a file only if the new version is different from the old. This prevents make from doing unnecessary work after we run 'setup makefile' quiet
We need to do some ugly hacks here because of GHC magic module Main (main) where import Control.Monad import Data.List import Data.Maybe import Distribution.PackageDescription import Distribution.Simple import Distribution.Simple.LocalBuildInfo import Distribution.Simple.Program import Distribution.Simple.Utils im...
2f9e7e6b092763dd0e943b836c646c5c2a527158aa8f6eeae0da086a08fc5d09
zellige/zellige
SphericalMercatorSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Data.Geometry.SphericalMercatorSpec where import qualified Data.Aeson.Types as AT import qualified Data.Geospatial as Geospatial import qualified Data.LinearRing as LinearRing import qualified Data.LineString as L...
null
https://raw.githubusercontent.com/zellige/zellige/87e6dab11ac4c1843009043580f14422a1d83ebf/test/Data/Geometry/SphericalMercatorSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Data.Geometry.SphericalMercatorSpec where import qualified Data.Aeson.Types as AT import qualified Data.Geospatial as Geospatial import qualified Data.LinearRing as LinearRing import qualified Data.LineString as LineString import qualified Data.Seq...
aea0e043da38525d1c547a4510a6a3120df708eb3e8257b3901597a9c11b90a9
LambdaHack/LambdaHack
Analytics.hs
# LANGUAGE DeriveGeneric , GeneralizedNewtypeDeriving # -- | Per-actor analytics of personal feats. module Game.LambdaHack.Common.Analytics ( FactionAnalytics, ActorAnalytics, GenerationAnalytics , KillMap, Analytics(..), KillHow(..) , emptyAnalytics, addFactionKill, addActorKill #ifdef EXPOSE_INTERNAL -- * I...
null
https://raw.githubusercontent.com/LambdaHack/LambdaHack/3c741b9eb99b032cfa9313462eb356e0ec306f42/engine-src/Game/LambdaHack/Common/Analytics.hs
haskell
| Per-actor analytics of personal feats. * Internal operations | Summary analytics data for each faction. | Analytics data for each live actor. | Statistics of possible and actual generation of items for each lore kind. | Labels of individual kill count analytics. | Statistics of past events concerning an actor.
# LANGUAGE DeriveGeneric , GeneralizedNewtypeDeriving # module Game.LambdaHack.Common.Analytics ( FactionAnalytics, ActorAnalytics, GenerationAnalytics , KillMap, Analytics(..), KillHow(..) , emptyAnalytics, addFactionKill, addActorKill #ifdef EXPOSE_INTERNAL , addKill #endif ) where import Prelude () impor...
51412feda497aa0ebc47890867185eea319497d397ff48cfd3766f61800c3426
varjagg/also-alsa
also-alsa.lisp
A very basic Advanced Linux Sound Architecture interface (in-package #:also-alsa) (eval-when (:compile-toplevel) (defconstant +epipe+ 32)) (declaim (inline alsa-element-type to-alsa-format ensure-success)) (defvar *alsa-warn* nil) (define-foreign-library libasound (:unix "libasound.so.2") (t (:default "lib...
null
https://raw.githubusercontent.com/varjagg/also-alsa/1cc16423b72b0c8386e45d13c7f4200fcf69bbf1/also-alsa.lisp
lisp
incomplete list of formats number of samples really number of samples really Under run, so prepare and retry
A very basic Advanced Linux Sound Architecture interface (in-package #:also-alsa) (eval-when (:compile-toplevel) (defconstant +epipe+ 32)) (declaim (inline alsa-element-type to-alsa-format ensure-success)) (defvar *alsa-warn* nil) (define-foreign-library libasound (:unix "libasound.so.2") (t (:default "lib...
4bb2940e06f40f26cc0c557538b608b834fba68731faf6a705f14880537240d5
lvh/icecap
core.clj
(ns icecap.core (:require [aleph.http :refer [start-server]] [icecap.crypto :as crypto] [icecap.rest :as rest] [icecap.store.mem :refer [mem-store]] [taoensso.timbre :refer [info]]) (:gen-class)) (def port ICECAP (defn run [] (let [[seed-key salt] (map crypto/...
null
https://raw.githubusercontent.com/lvh/icecap/700b82ca9af4aa7fe347e92b443ecf3b1e7e53f4/src/icecap/core.clj
clojure
:ssl-context (self-signed-ssl-context) block forever:
(ns icecap.core (:require [aleph.http :refer [start-server]] [icecap.crypto :as crypto] [icecap.rest :as rest] [icecap.store.mem :refer [mem-store]] [taoensso.timbre :refer [info]]) (:gen-class)) (def port ICECAP (defn run [] (let [[seed-key salt] (map crypto/...
37a549a1fb4396906a6e526163eaf15199dc832a3843be1fda0228d6910f95af
ngorogiannis/cyclist
misc.ml
let do_debug = ref false let debug f = if !do_debug then print_endline (f ()) else () (* boost::hash_combine *) size_t hash_combine ( size_t lhs , size_t rhs ) { lhs^= rhs + 0x9e3779b9 + ( lhs < < 6 ) + ( lhs > > 2 ) ; return lhs ; (* } ...
null
https://raw.githubusercontent.com/ngorogiannis/cyclist/4c5c8dd1a9918823fc760bf311216ade2f915e6a/src/lib/misc.ml
ocaml
boost::hash_combine }
let do_debug = ref false let debug f = if !do_debug then print_endline (f ()) else () size_t hash_combine ( size_t lhs , size_t rhs ) { lhs^= rhs + 0x9e3779b9 + ( lhs < < 6 ) + ( lhs > > 2 ) ; return lhs ; FIXME this should only produce > = 0 let genhash h v =...
d4554cdbe748055bdf574cd945278a034783f6c18c9be491f4149d89ffaf348d
bzliu94/cs61a_fa07
lab15_extra.scm
(define (last-pair l) (last-pair-helper l)) (define (last-pair-helper l) (if (equal? (cdr l) nil) l (last-pair-helper (cdr l))))
null
https://raw.githubusercontent.com/bzliu94/cs61a_fa07/12a62689f149ef035a36b326351928928f6e7b5d/02%20-%20labs/lab15/lab15_extra.scm
scheme
(define (last-pair l) (last-pair-helper l)) (define (last-pair-helper l) (if (equal? (cdr l) nil) l (last-pair-helper (cdr l))))
cff4cd77b188ed2432e57d20267978468fb01b94c48c45be22e9f88dec22c720
openvstorage/alba
osd_access_type.ml
Copyright ( C ) iNuron - This file is part of Open vStorage . For license information , see < LICENSE.txt > Copyright (C) iNuron - This file is part of Open vStorage. For license information, see <LICENSE.txt> *) open! Prelude let large_value = lazy (String.make (512*1024) 'a') class type t = objec...
null
https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/osd_access_type.ml
ocaml
Copyright ( C ) iNuron - This file is part of Open vStorage . For license information , see < LICENSE.txt > Copyright (C) iNuron - This file is part of Open vStorage. For license information, see <LICENSE.txt> *) open! Prelude let large_value = lazy (String.make (512*1024) 'a') class type t = objec...
fd6fbc94e86bda0820a942da355b6d5ce905545d6d732a3ba5e43dcba1e407d8
kazzmir/x11-racket
rect.rkt
#lang racket/base (provide (struct-out rect)) (struct rect (x y w h) #:transparent)
null
https://raw.githubusercontent.com/kazzmir/x11-racket/97c4a75872cfd2882c8895bba88b87a4ad12be0e/xlambda/rect.rkt
racket
#lang racket/base (provide (struct-out rect)) (struct rect (x y w h) #:transparent)
38ba255950960badf0db19a65d90bfa92a0a3789b5605c58364b1e1e40007a9f
damn/cdq
greenwalls.clj
(ns game.tools.neighbourvalues.greenwalls (:use data.grid2d utils.core (engine core render) game.utils.random (game.tools transitiontilemaker tiledmap-grid-convert))) needs a grid scaled x2 at least and nil cells behind other walls ; also remove NADS & single cells (def- greenwalls...
null
https://raw.githubusercontent.com/damn/cdq/5093dbdba91c445e403f53ce96ead05d5ed8262b/src/game/tools/neighbourvalues/greenwalls.clj
clojure
also remove NADS & single cells already set to :undefined by postprocessing... (start-slick-basicgame :init (fn [container] :random (java.util.Random.) :wall-borders true) grid (-> grid connect-regions fi...
(ns game.tools.neighbourvalues.greenwalls (:use data.grid2d utils.core (engine core render) game.utils.random (game.tools transitiontilemaker tiledmap-grid-convert))) (def- greenwalls-firstgid 1) (def- neighbourvalues {:topandleft 0 :top 1 :topandright 2 :bottomright 3 ...
73f8fd9f8fecc33c276137dc51528224f5ccb176748737ce4dd0e8990b4a2802
clj-commons/seesaw
project.clj
(defproject applet "1.0.0-SNAPSHOT" :description "FIXME: write" :aot [applet.core] :dependencies [[org.clojure/clojure "1.4.0"] [seesaw "1.4.2"]])
null
https://raw.githubusercontent.com/clj-commons/seesaw/4ca89d0dcdf0557d99d5fa84202b7cc6e2e92263/examples/applet/project.clj
clojure
(defproject applet "1.0.0-SNAPSHOT" :description "FIXME: write" :aot [applet.core] :dependencies [[org.clojure/clojure "1.4.0"] [seesaw "1.4.2"]])
73f888c01b6e938d53e565a7f8d2f68b7ce073f50e9a471f3bceadaf953b9fe4
mbj/stratosphere
EncryptionContractConfigurationProperty.hs
module Stratosphere.MediaPackage.OriginEndpoint.EncryptionContractConfigurationProperty ( EncryptionContractConfigurationProperty(..), mkEncryptionContractConfigurationProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property i...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/mediapackage/gen/Stratosphere/MediaPackage/OriginEndpoint/EncryptionContractConfigurationProperty.hs
haskell
module Stratosphere.MediaPackage.OriginEndpoint.EncryptionContractConfigurationProperty ( EncryptionContractConfigurationProperty(..), mkEncryptionContractConfigurationProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property i...
d3f9d3007f29b36b9753f0f10a4c12a6dfee3e9a388effb8b2db5519437b59fc
dbuenzli/bos
bos_os_cmd.ml
--------------------------------------------------------------------------- Copyright ( c ) 2015 The bos programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2...
null
https://raw.githubusercontent.com/dbuenzli/bos/314cb4ad8d56e2791bedf9f482937ddf68be7c16/src/bos_os_cmd.ml
ocaml
UNIX_BUFFER_SIZE 4.0.0 Unix pretty printers Error messages Primitives from Unix Process creation primitive. Tool existence and search Fd utils Maintains a set of fds to close, standard fds are never in the set. Command runs Run statuses Run standard errors Run standard inputs Run standard outpu...
--------------------------------------------------------------------------- Copyright ( c ) 2015 The bos programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2...
d67c8ffd537e0f5b7b6aa39747b75557bcf7979580a777460773b07315d40f57
w3ntao/sicp-solution
3-67.rkt
#lang racket (require (only-in "../ToolBox/AbstractionOfData/stream.rkt" cons-stream stream-car stream-cdr stream-map interleave integers display-stream-until)) (define (pairs s t) (cons-str...
null
https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/chap-3/3-67.rkt
racket
#lang racket (require (only-in "../ToolBox/AbstractionOfData/stream.rkt" cons-stream stream-car stream-cdr stream-map interleave integers display-stream-until)) (define (pairs s t) (cons-str...
30b995b57422321cf506a157e03bd88d3bc8f437774dea4c4bc7f0a037512fea
spawnfest/eep49ers
wxGraphicsObject.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2020 . 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/wxGraphicsObject.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 - 2020 . 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(wxGraphicsObject). -include("wxe.hrl"). -export([destroy/1,getRenderer/1,isNull/1]). -export([parent_class/...
2cd984df2de4d695c72d106f8e57fc3440172e0c962200f99b1218176a209cf9
takikawa/racket-ppa
info.rkt
(module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("base"))) (define pkg-desc "String constants to support internationalization, especially in DrRacket") (define pkg-authors (quote (robby))) (define version "1.42") (define license (quote (Apache-2.0 OR MIT)))))
null
https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/share/pkgs/string-constants-lib/info.rkt
racket
(module info setup/infotab (#%module-begin (define collection (quote multi)) (define deps (quote ("base"))) (define pkg-desc "String constants to support internationalization, especially in DrRacket") (define pkg-authors (quote (robby))) (define version "1.42") (define license (quote (Apache-2.0 OR MIT)))))
b9d708bacad862f0f4f0c97ed04c19d69b4cbcb76dce2778b8676dea97d39604
fendor/hsimport
ModuleTest10.hs
import Control.Monad f :: Int -> Int f = (+ 3)
null
https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/tests/goldenFiles/ModuleTest10.hs
haskell
import Control.Monad f :: Int -> Int f = (+ 3)
d1d1ca87278adff8496211c3e3436b4c517d5302919b85aa12d4b0d039434d02
pierric/fei-nn
TestMain.hs
# OPTIONS_GHC -F -pgmF tasty - discover #
null
https://raw.githubusercontent.com/pierric/fei-nn/0a78e31e98495a4ab5183ab1faabba5b0721280e/test/TestMain.hs
haskell
# OPTIONS_GHC -F -pgmF tasty - discover #
7d562aeba7c061d5bd59f618efd25ceace44323ef2e0dc95344c5c9fd6fd25e5
earl-ducaine/cl-garnet
roundtangle.lisp
(when (boundp 'w) (opal:destroy w)) (create-instance 'my-font opal:font (:size :small)) (defmacro add-line-with-arrowheads (agg l str x-offset y-offset) `(opal:add-components ,agg ,l (create-instance nil opal:arrowhead (:from-x (formula '(gv ,l :x1))) (:from-y (formula '(gv ,l :y1))) (:head-...
null
https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/doc/previous-version/src/opal/garnet-code/roundtangle.lisp
lisp
(when (boundp 'w) (opal:destroy w)) (create-instance 'my-font opal:font (:size :small)) (defmacro add-line-with-arrowheads (agg l str x-offset y-offset) `(opal:add-components ,agg ,l (create-instance nil opal:arrowhead (:from-x (formula '(gv ,l :x1))) (:from-y (formula '(gv ,l :y1))) (:head-...
56f03ab208dc29f677c09abaa19d589bc8c96cfab7c90b177863b3fc3000bf2d
technomancy/leiningen
profiles.clj
{:user {:aliases {"echo" ["with-profile" "+a2" "echo"] "project" ["with-profile" "+a2" "project"] "projecta" ["with-profile" "+a2" "project" "a"] "project-set" ["with-profile" "a2" "project"] "projecta-set" ["with-profile" "a2" "project" "a"]}}}
null
https://raw.githubusercontent.com/technomancy/leiningen/24fb93936133bd7fc30c393c127e9e69bb5f2392/test_projects/with-aliases2/profiles.clj
clojure
{:user {:aliases {"echo" ["with-profile" "+a2" "echo"] "project" ["with-profile" "+a2" "project"] "projecta" ["with-profile" "+a2" "project" "a"] "project-set" ["with-profile" "a2" "project"] "projecta-set" ["with-profile" "a2" "project" "a"]}}}
f54c945c95654232ae69ef053af8b8eec535af402a56fa1407d4b937130c7436
input-output-hk/ouroboros-network
RootPeersDNS.hs
{-# LANGUAGE BangPatterns #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # module Ouroboros.Network.PeerSelection.RootPeersDNS ( -- * DNS based...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/f2d0521658d75ad8e6eccfdae1264279bdf82cd2/ouroboros-network/src/Ouroboros/Network/PeerSelection/RootPeersDNS.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # * DNS based actions for local and public root providers * DNS based provider for local root peers * DNS based provider for public root peers DNS lookup support * DNS type re-exports ...
# LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # module Ouroboros.Network.PeerSelection.RootPeersDNS DNSActions (..) * DNS resolver IO auxiliary functions , constantResource * * DNSActions IO , ioDNSActions , LookupReqs (..) , localRootPeersProvider ...
e9c8473df67f8597ca533c88dffcaf1e19e35a6907f1ff6b94c63342a564f6aa
GregorySchwartz/too-many-cells
Utility.hs
TooManyCells . Program . Utility Utility functions for the command line program . Gregory W. Schwartz Utility functions for the command line program. -} {-# LANGUAGE BangPatterns #-} module TooManyCells.Program.Utility where -- Remote import Control.Exception (SomeException (..), try, evaluate) imp...
null
https://raw.githubusercontent.com/GregorySchwartz/too-many-cells/34b9c9ee5695504824169f44e01d8c3ea2d55546/src/TooManyCells/Program/Utility.hs
haskell
# LANGUAGE BangPatterns # Remote Local | Read or return an error. | Normalization defaults. | Get the file type of an input matrix. Returns either a left file (i.e. CSV) or a right matrix market. | Check if file exists and is not empty. Currently may have a handle closing issue, do not use for now.
TooManyCells . Program . Utility Utility functions for the command line program . Gregory W. Schwartz Utility functions for the command line program. -} module TooManyCells.Program.Utility where import Control.Exception (SomeException (..), try, evaluate) import Control.Monad (guard) import Control.Mona...
c58d8cf024392544bbaf23f215aed6726ffaf11e6fc1f25626607228dce23b12
fpco/inline-c
Types.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE CPP # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWild...
null
https://raw.githubusercontent.com/fpco/inline-c/ab1a2d9369d694c5980c09fe3352550121b5ef8f/inline-c/src/Language/C/Types.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveTraversable # # LANGUAGE OverloadedStrings # representing the concrete syntax tree of C types, this module provides friendlier views of C types, by turning them into a data type matching more appreciate the difference, look at the differen...
# LANGUAGE CPP # # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # | Views of C datatypes . While " Language . C.Types . " defines dat...
21204ff66b31fbab1bb7762d3d52513458daa3443ed38c94651adc083d9a1cef
relevance/mycroft
namespace.clj
(ns mycroft.namespace (:require [mycroft.breadcrumb :as breadcrumb])) (defn namespaces "Sorted list of namespaces" [] (->> (all-ns) (sort-by #(.name %)))) (defn vars "Sorted list of var names in a namespace (symbols)." [ns] (when-let [ns (find-ns (symbol ns))] (sort-by #(str (.sym %)) (vals (...
null
https://raw.githubusercontent.com/relevance/mycroft/1bf86dfd1092408c9e9fc836be6dfb2f95099253/src/mycroft/namespace.clj
clojure
(ns mycroft.namespace (:require [mycroft.breadcrumb :as breadcrumb])) (defn namespaces "Sorted list of namespaces" [] (->> (all-ns) (sort-by #(.name %)))) (defn vars "Sorted list of var names in a namespace (symbols)." [ns] (when-let [ns (find-ns (symbol ns))] (sort-by #(str (.sym %)) (vals (...
a62a5f08d3ec82725a8ee119fa78760d5c4c8d2f5465a24eef2df1558bc2a2a8
tlaplus/tlapm
isabelle_keywords.ml
(* AUTOMATICALLY GENERATED by isabelle_keywords_get.sh - DO NOT EDIT *) let v = [ "."; ".."; "Isabelle.command"; "ML"; "ML_command"; "ML_prf"; "ML_val"; "ProofGeneral.inform_file_processed"; "ProofGeneral.inform_file_retracted"; "ProofGeneral.kill_proof"; "ProofGeneral.pr"; "ProofGeneral.process...
null
https://raw.githubusercontent.com/tlaplus/tlapm/b82e2fd049c5bc1b14508ae16890666c6928975f/src/isabelle_keywords.ml
ocaml
AUTOMATICALLY GENERATED by isabelle_keywords_get.sh - DO NOT EDIT
let v = [ "."; ".."; "Isabelle.command"; "ML"; "ML_command"; "ML_prf"; "ML_val"; "ProofGeneral.inform_file_processed"; "ProofGeneral.inform_file_retracted"; "ProofGeneral.kill_proof"; "ProofGeneral.pr"; "ProofGeneral.process_pgip"; "ProofGeneral.restart"; "ProofGeneral.undo"; "abbreviation...
b8bd2dce2379f8a9a27449a46b73a228bba3fe3f7c665c9fa8b4c7355dbde14b
dharrigan/startrek
spec.clj
(ns startrek.api.officers.spec {:author "David Harrigan"}) (set! *warn-on-reflection* true) (def ^:private LoginResponse [:map [:login/session-id :string]]) (def post-login-response LoginResponse)
null
https://raw.githubusercontent.com/dharrigan/startrek/a91caa3f504ffea502b79cfd29d0499574aaced6/src/startrek/api/officers/spec.clj
clojure
(ns startrek.api.officers.spec {:author "David Harrigan"}) (set! *warn-on-reflection* true) (def ^:private LoginResponse [:map [:login/session-id :string]]) (def post-login-response LoginResponse)
2a66e1eaf66c64a40200b3def93bdc5bdd23ac922eddc610d49db5b3a5ab48db
marigold-dev/easier-proofs
main.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Marigold < > (* ...
null
https://raw.githubusercontent.com/marigold-dev/easier-proofs/49aa431be997df8c7363c8a81f7b64c0c70af0a8/examples/list/bin/main.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Marigold < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER ...
c58bf84219d4def284b108e8066ad59772bd5a841cb3283e7505c5e7a941db99
joinr/spork
combinatoric.clj
;;Simple combinatoric utilities used for solution representations. Note Feb 2017 - I found a better solution to the " combinatoric map " ;;that this library tries to provide (i.e. a sparse map whos keys are ;;computing based on the lexigraphic order of combinations). The ;;current library "works", but I never got aro...
null
https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/src/spork/util/combinatoric.clj
clojure
Simple combinatoric utilities used for solution representations. that this library tries to provide (i.e. a sparse map whos keys are computing based on the lexigraphic order of combinations). The current library "works", but I never got around to using it - target - spork.opt - stalled. Marked EXPERIMENTAL An impleme...
Note Feb 2017 - I found a better solution to the " combinatoric map " it stalled out between 2013/2014 around the same time its intended (ns spork.util.combinatoric) > ( greater ? ) = ( greater - entry ? k ) > > ( if ( < > ( get elem1 i ) ( get i ) ) ( > ( get elem1 i ) ( get i ) ) ( dual ...
a8413d48233ae461c641173d5b923b04a0f77e110fae8a18994737a0ab3bc1a9
input-output-hk/ouroboros-network
MockChainSel.hs
# LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # module Ouroboros.Consensus.Protocol.MockChainSel ( selectChain , selectUnvalidatedChain ) where import Data.List (sortOn) import Data.Maybe (listToMaybe, mapMaybe) import Data.Ord (Down (..)) import Our...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/2793b6993c8f6ed158f432055fa4ef581acdb661/ouroboros-consensus/src/Ouroboros/Consensus/Protocol/MockChainSel.hs
haskell
------------------------------------------------------------------------------ Chain selection ------------------------------------------------------------------------------ | Chain selection between our chain and list of candidates This is only a /model/ of chain selection: in reality of course we will not work ...
# LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # module Ouroboros.Consensus.Protocol.MockChainSel ( selectChain , selectUnvalidatedChain ) where import Data.List (sortOn) import Data.Maybe (listToMaybe, mapMaybe) import Data.Ord (Down (..)) import Our...
d05240f125e694629cf3b7b448daa093fb99403661465054767a09dbfaf51ce6
godotclj/godotclj
main_jvm.clj
(ns godotclj.main-jvm (:require [godotclj.bindings.godot :as godot] [godotclj.clang] [godotclj.core] [godotclj.defs :as defs] [godotclj.proto :as proto] [tech.v3.datatype.ffi :as dtype-ffi])) ;; The following is automatically configured by dtype-next, ;; ba...
null
https://raw.githubusercontent.com/godotclj/godotclj/23e9c62e7083f7be9aff8bb205d2a270dd5b5e39/src/clojure/godotclj/main_jvm.clj
clojure
The following is automatically configured by dtype-next, based on "java --add-modules=jdk.incubator.foreign" (cond (dtype-ffi/jdk-mmodel?) (require '[tech.v3.datatype.ffi.mmodel]) (dtype-ffi/jna-ffi?) (require '[tech.v3.datatype.ffi.jna]))
(ns godotclj.main-jvm (:require [godotclj.bindings.godot :as godot] [godotclj.clang] [godotclj.core] [godotclj.defs :as defs] [godotclj.proto :as proto] [tech.v3.datatype.ffi :as dtype-ffi])) force , so that i know how function pointers work (require 'g...
0a4c1341283e26392cd4dd218bbc4e0fe9cd72feebf651c2234f3d9a4cd2b4ff
krisajenkins/petrol
core.cljs
(ns petrol-examples.counter2.core (:require [petrol.core :as petrol] [reagent.core :as reagent] [petrol-examples.counter2.processing] [petrol-examples.counter2.view :as view])) (def initial-state {:counter 0}) (defonce !app (reagent/atom initial-state)) figwheel reload - h...
null
https://raw.githubusercontent.com/krisajenkins/petrol/607166ab48cf6193b6ad00bcd63bd3ff7f3958f7/examples/src/petrol-examples/counter2/core.cljs
clojure
(ns petrol-examples.counter2.core (:require [petrol.core :as petrol] [reagent.core :as reagent] [petrol-examples.counter2.processing] [petrol-examples.counter2.view :as view])) (def initial-state {:counter 0}) (defonce !app (reagent/atom initial-state)) figwheel reload - h...
6d63f7884e0ba0f51335912809ac7cf404d534e249490edc0636cbd3c8dfc259
rd--/hsc3
pv_MagGate.help.hs
-- pv_MagGate ( 0,100 ) i = soundIn 0 c = fft' (localBufId 'α' 2048 1) i x = mouseX kr lhs rhs Linear 0.2 y = mouseY kr 0 1 Linear 0.2 h = X.pv_MagGate c x y in ifft' h * 0.5
null
https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/pv_MagGate.help.hs
haskell
pv_MagGate
( 0,100 ) i = soundIn 0 c = fft' (localBufId 'α' 2048 1) i x = mouseX kr lhs rhs Linear 0.2 y = mouseY kr 0 1 Linear 0.2 h = X.pv_MagGate c x y in ifft' h * 0.5
3e0f5178c4b366d37923d738c9e7a464ce462ed7286740cdfb93e773260c4fe1
solita/mnt-teet
projektiot.cljs
(ns teet.map.openlayers.projektiot "Karttaa varten tarvittavat extent alueet ja projektiot" (:require [ol.proj :as ol-proj] ["proj4" :as proj4-lib])) (def proj4 (aget proj4-lib "default")) (defonce define-epsg3067 (let [defs (aget proj4 "defs")] (defs "EPSG:3301" "+proj=lcc +lat_1=59.33333...
null
https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/frontend/src/cljs/teet/map/openlayers/projektiot.cljs
clojure
(ns teet.map.openlayers.projektiot "Karttaa varten tarvittavat extent alueet ja projektiot" (:require [ol.proj :as ol-proj] ["proj4" :as proj4-lib])) (def proj4 (aget proj4-lib "default")) (defonce define-epsg3067 (let [defs (aget proj4 "defs")] (defs "EPSG:3301" "+proj=lcc +lat_1=59.33333...
cb1308043788df4e2af53f704ca22980616710b0d266113d6e0e8aabf6e4955e
dylex/haskell-nfs
PROPFIND.hs
# LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module Network.WebDAV.NFS.PROPFIND ( httpPROPFIND ) where import Control.Exception (try) import Control.Monad (when, void) import qualified Data.Conduit as C import Data.Either (partitionEithers) import Data.Maybe...
null
https://raw.githubusercontent.com/dylex/haskell-nfs/07d213e09f7bf9e6fe3200aca3de494c3dcd54f7/webdav/Network/WebDAV/NFS/PROPFIND.hs
haskell
when (depth == DepthInfinity) $ result $ errorResponse PropfindFiniteDepth
# LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module Network.WebDAV.NFS.PROPFIND ( httpPROPFIND ) where import Control.Exception (try) import Control.Monad (when, void) import qualified Data.Conduit as C import Data.Either (partitionEithers) import Data.Maybe...
78ce07342def8290ff986552ad4dcf63991125d0fd65822ec5937dfb77a872ba
aleator/Zettel-hs
Elucidations.hs
# LANGUAGE TupleSections # # LANGUAGE TypeFamilies # # LANGUAGE DataKinds # {-#LANGUAGE GADTs#-} module Elucidations where import qualified Data.Text as T import qualified Data.HashSet as HashSet import Zettel import Operations import ZettelKasten import Data.Proxy import qualif...
null
https://raw.githubusercontent.com/aleator/Zettel-hs/e7c4670689059cdb71eeb852651fc8ae6a8851ab/src/Elucidations.hs
haskell
#LANGUAGE GADTs# The main function
# LANGUAGE TupleSections # # LANGUAGE TypeFamilies # # LANGUAGE DataKinds # module Elucidations where import qualified Data.Text as T import qualified Data.HashSet as HashSet import Zettel import Operations import ZettelKasten import Data.Proxy import qualified Data.HashMap.Stri...
e582cf90f83fd9a72d509f544c792dfd028c6f2dd502343100a95c3eec9e0f8e
broadinstitute/firecloud-ui
configs.cljs
(ns broadfcui.page.method-repo.method.configs (:require [dmohs.react :as react] [broadfcui.common.style :as style] [broadfcui.common.table :refer [Table]] [broadfcui.components.blocker :refer [blocker]] [broadfcui.components.buttons :as buttons] [broadfcui.components.modals :as modals] [broadfcui...
null
https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/page/method_repo/method/configs.cljs
clojure
(ns broadfcui.page.method-repo.method.configs (:require [dmohs.react :as react] [broadfcui.common.style :as style] [broadfcui.common.table :refer [Table]] [broadfcui.components.blocker :refer [blocker]] [broadfcui.components.buttons :as buttons] [broadfcui.components.modals :as modals] [broadfcui...
3c9253cefaa8ce56389c2d539d35cf6020e45fd29c04fd0f988d4ca11b1c7e02
MarcosPividori/push-notify
yesodAppEcho.hs
Echo Test Example for Push Notifications . This is a simple example of a Yesod server , where devices can register to receive -- messages and every time they send a message to the server, they receive an echo response. # LANGUAGE OverloadedStrings , TypeFamilies , TemplateHaskell , FlexibleInstances , ...
null
https://raw.githubusercontent.com/MarcosPividori/push-notify/4c023c3fd731178d1d114774993a5e337225baa1/test/BackAndForth%20Messaging/Yesod-App/yesodAppEcho.hs
haskell
messages and every time they send a message to the server, they receive an echo response. Data Base: Yesod App: Instances: cert <- fileReadCertificate "public-cert.pem" -- your APNS Certificate your APNS PrivateKey Here you must complete with the
Echo Test Example for Push Notifications . This is a simple example of a Yesod server , where devices can register to receive # LANGUAGE OverloadedStrings , TypeFamilies , TemplateHaskell , FlexibleInstances , QuasiQuotes , MultiParamTypeClasses , GeneralizedNewtypeDeriving , FlexibleContexts , GADT...
57a7cfe1119b17c5ae3d32de7d37bfb24cc7b90e03e48cf1c3b51578b445ff34
ghc/nofib
Tree.hs
# LANGUAGE CPP # module Tree where import Control.Parallel import Control.Parallel.Strategies data Tree a = Branch a [Tree a] deriving Show repTree :: (a->[a]) -> (a->[a])-> a -> (Tree a) repTree f g a = Branch a (map (repTree g f) (f a)) #define SEQ #ifndef SEQ mapTree :: (a -> b) -> Tree a -> Tree b mapTree f (...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/parallel/minimax/Tree.hs
haskell
# LANGUAGE CPP # module Tree where import Control.Parallel import Control.Parallel.Strategies data Tree a = Branch a [Tree a] deriving Show repTree :: (a->[a]) -> (a->[a])-> a -> (Tree a) repTree f g a = Branch a (map (repTree g f) (f a)) #define SEQ #ifndef SEQ mapTree :: (a -> b) -> Tree a -> Tree b mapTree f (...
20441c9de90779b6d08a67eaaccd6d163f37b1a4f89304e72de75aeac4764129
simonmichael/hledger
Hledger.hs
{-# LANGUAGE OverloadedStrings #-} module Hledger ( module X ,tests_Hledger ) where import Hledger.Data as X import Hledger.Read as X import Hledger.Reports as X import Hledger.Query as X import Hledger.Utils as X tests_Hledger = testGroup "Hledger" [ ...
null
https://raw.githubusercontent.com/simonmichael/hledger/8274da81fc9c5aabf0dd2593e651442ff90e4fa1/hledger-lib/Hledger.hs
haskell
# LANGUAGE OverloadedStrings #
module Hledger ( module X ,tests_Hledger ) where import Hledger.Data as X import Hledger.Read as X import Hledger.Reports as X import Hledger.Query as X import Hledger.Utils as X tests_Hledger = testGroup "Hledger" [ tests_Data ,tests_Query ,tests...
d014dd63d5f1c660c0a21177f0fcabed86519347c4d88663b141a62e8dceb0b8
vert-x/mod-lang-clojure
isolation_test.clj
Copyright 2013 the original author or authors . ;; 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, sof...
null
https://raw.githubusercontent.com/vert-x/mod-lang-clojure/dcf713460b8f46c08d0db6e7bf8537f1dd91f297/lang-module/src/test/resources/isolation/isolation_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 pe...
Copyright 2013 the original author or authors . distributed under the License is distributed on an " AS IS " BASIS , (ns vertx.isolation-test (:require [vertx.core :as vertx] [vertx.eventbus :as eb] [vertx.testtools :as t])) (defn test-differently-named-verticles-are-isolated [] (let ...
f08edb2b62707f211de170160c82da9ae6712c08941163084077513085e4e4fe
casperschipper/ocaml-cisp
midi_looper.ml
open Seq Seq is a thunk that when forced returns a value and a thunk to get the tail (* this is the same as let thunk x = fun () -> x *) let csr = 44100 let csrf = 44100. let thunk x () = x let emptySt () = Nil let force l = l () let ( |> ) x f = f x let ( <| ) f x = f x let ( >> ) f g x = g (f x) let ...
null
https://raw.githubusercontent.com/casperschipper/ocaml-cisp/954e4b71dca0d0af0786395d727b7a7cde5568a7/examples/midi_looper.ml
ocaml
this is the same as let thunk x = fun () -> x not sure about these static zipped list will be lenght of shortest list operator is a function to get the next value create a singleton stream returnes the loops and the tail of the source preferably source is infinite choice use floats as argume...
open Seq Seq is a thunk that when forced returns a value and a thunk to get the tail let csr = 44100 let csrf = 44100. let thunk x () = x let emptySt () = Nil let force l = l () let ( |> ) x f = f x let ( <| ) f x = f x let ( >> ) f g x = g (f x) let ( << ) f g x = f (g x) let fst (x, _) = x let snd (_, ...
ee0cf7563de5b423a16556f75047cf211530f0b75ee9599b2aee56d8b87420ff
BinaryAnalysisPlatform/bap-plugins
toida.ml
open Core_kernel open Bap.Std let code_of_color = function | `green -> 0x99ff99 | `red -> 0xCCCCFF | `yellow -> 0xC2FFFF | _ -> invalid_arg "unexpected color" let cmd c = sprintf "SetFunctionAttr($symbol_addr, FUNCATTR_COLOR, 0x%x)\n" (code_of_color c) let () = Project.register_pass ~deps:["staticstore...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap-plugins/2e9aa5c7c24ef494d0e7db1b43c5ceedcb4196a8/staticstore/toida.ml
ocaml
open Core_kernel open Bap.Std let code_of_color = function | `green -> 0x99ff99 | `red -> 0xCCCCFF | `yellow -> 0xC2FFFF | _ -> invalid_arg "unexpected color" let cmd c = sprintf "SetFunctionAttr($symbol_addr, FUNCATTR_COLOR, 0x%x)\n" (code_of_color c) let () = Project.register_pass ~deps:["staticstore...
f8ce9971dc10a3029b68fdf0aa1586393bd452db3b3e2aa240c07ea59d0b1dae
merijn/validated-literals
ValidLiterals.hs
------------------------------------------------------------------------------- -- | -- Module : ValidLiterals Copyright : ( C ) 2015 - 2021 -- License : BSD-style (see the file LICENSE) Maintainer : < > -- Stability : experimental -- Portability : portable -- -- To disallow invalid inp...
null
https://raw.githubusercontent.com/merijn/validated-literals/a32515b898ceceb195987f354525511806b05f74/ValidLiterals.hs
haskell
----------------------------------------------------------------------------- | Module : ValidLiterals License : BSD-style (see the file LICENSE) Stability : experimental Portability : portable To disallow invalid input it is common to define (new)types with hidden data constructors. Forcing the ...
Copyright : ( C ) 2015 - 2021 Maintainer : < > This package provides a typeclasses for using TH to validate the x = $ $ ( valid 38 ) This will check , at compile time , that the provided ' Integer ' is , in fact , # LANGUAGE DefaultSignatures # # LANGUAGE FlexibleContexts # # LANGUAGE MultiParam...