_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
f1d301d6fab98f23a044459b00c458a388209eb47b5f01321196d4d3b4704667
nikivazou/liquid-meta
ValuesDontStep.hs
{-@ LIQUID "--reflection" @-} {-@ LIQUID "--ple" @-} module Lemmata.ValuesDontStep where import Syntax import Expressions import Substitutions.Expressions import Propositions import Helpers.ProofCombinators values_dont_step :: Expr -> Expr -> Step -> a @ values_dont_step : : v:{Expr | isValue v } - > e : E...
null
https://raw.githubusercontent.com/nikivazou/liquid-meta/c3e9f85529ab6d1135ca886bfb2808737e134f22/src/Lemmata/ValuesDontStep.hs
haskell
@ LIQUID "--reflection" @ @ LIQUID "--ple" @
module Lemmata.ValuesDontStep where import Syntax import Expressions import Substitutions.Expressions import Propositions import Helpers.ProofCombinators values_dont_step :: Expr -> Expr -> Step -> a @ values_dont_step : : v:{Expr | isValue v } - > e : Expr - > Prop ( Step v e ) - > { v : a | false } @ values_don...
8f4514323d57ff53332ad715e29264a12df9dfc8f56d1a7326319fc965f2efbe
camllight/camllight
int.ml
(* Operations on integers *) #open "eq";; let abs n = if n < 0 then -n else n ;; let lnot n = n lxor (-1) ;; let string_of_int = format_int "%ld";; let min_int = 1 lsl (if 1 lsl 31 = 0 then 30 else 62);; let max_int = min_int - 1;;
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/src/lib/int.ml
ocaml
Operations on integers
#open "eq";; let abs n = if n < 0 then -n else n ;; let lnot n = n lxor (-1) ;; let string_of_int = format_int "%ld";; let min_int = 1 lsl (if 1 lsl 31 = 0 then 30 else 62);; let max_int = min_int - 1;;
7fb9f1fd97738695bd6647789c2617ef73e3b8f1f0df8cca90ca54725308de3d
chebert/schemeish
struct.lisp
(in-package #:schemeish.struct) (install-syntax!) (defclass struct () () (:documentation "The base type for structures defined using DEFINE-STRUCT.")) (define (struct? datum) (typep datum 'struct)) (defgeneric struct-copy (struct) (:documentation "Returns a shallow copy of struct.")) (defmethod struct-copy (str...
null
https://raw.githubusercontent.com/chebert/schemeish/f273f75db1b19cd9ec790dd42754c45813763686/src/struct.lisp
lisp
We are in a proper list We are in a cycle, just return the field In the middle of the list, keep looking. xs is not empty or a list, we are in a dotted list or cons. Dotted-list
(in-package #:schemeish.struct) (install-syntax!) (defclass struct () () (:documentation "The base type for structures defined using DEFINE-STRUCT.")) (define (struct? datum) (typep datum 'struct)) (defgeneric struct-copy (struct) (:documentation "Returns a shallow copy of struct.")) (defmethod struct-copy (str...
ad9aa1c3e70df42c95ca2379ddef468adfc61886656a0614e4e9cd20a48265d5
yariv/twoorl
language_select_controller.erl
-module(language_select_controller). -compile(export_all). -include("twoorl.hrl"). private() -> true. index(A) -> Lang = case erlyweb_util:get_cookie("lang", A) of undefined -> <<"eng">>; Other -> list_to_binary(Other) end, {data, Lang}.
null
https://raw.githubusercontent.com/yariv/twoorl/77b6bea2e29283d09a95d8db131b916e16d2960b/src/components/language_select_controller.erl
erlang
-module(language_select_controller). -compile(export_all). -include("twoorl.hrl"). private() -> true. index(A) -> Lang = case erlyweb_util:get_cookie("lang", A) of undefined -> <<"eng">>; Other -> list_to_binary(Other) end, {data, Lang}.
edff134e026cee8af937664f9c3dfa562056821db7642d4e5d4e8c7ac9b5052a
simingwang/emqx-plugin-kafkav5
asn1ct_parser2.erl
%% vim: tabstop=8:shiftwidth=4 %% %% %CopyrightBegin% %% Copyright Ericsson AB 2000 - 2017 . 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 %%...
null
https://raw.githubusercontent.com/simingwang/emqx-plugin-kafkav5/bbf919e56dbc8fd2d4c1c541084532f844a11cbc/_build/default/rel/emqx_plugin_kafka/lib/asn1-5.0.18/src/asn1ct_parser2.erl
erlang
vim: tabstop=8:shiftwidth=4 %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...
Copyright Ericsson AB 2000 - 2017 . 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(asn1ct_parser2). -export([parse/2,format_error/1]). -include("asn1_records.hrl"). -record(typereference, {p...
8b29ac2ae0ab077f5994fb3419cc80f4e8ba403755a738785907a5f8f4d01456
pkel/cpr
distributions.mli
open Rresult type 'a iid val sample : 'a iid -> 'a val constant : float -> float iid val uniform : lower:float -> upper:float -> float iid val exponential : ev:float -> float iid val geometric : success_probability:float -> int iid (** Optimized for repeated sampling with alias method *) val discrete : weights:float...
null
https://raw.githubusercontent.com/pkel/cpr/854db775bdeb2e95ec94dc9f815314157e74dd81/simulator/lib/distributions.mli
ocaml
* Optimized for repeated sampling with alias method * same as [float_of_string] but reuses previously returned values
open Rresult type 'a iid val sample : 'a iid -> 'a val constant : float -> float iid val uniform : lower:float -> upper:float -> float iid val exponential : ev:float -> float iid val geometric : success_probability:float -> int iid val discrete : weights:float list -> int iid val to_string : 'a iid -> string val fl...
173a5a8f8ad21e968b74b9e0a5307a87d82f3912d9b24f1763697a1a570c2c88
kelamg/HtDP2e-workthrough
ex401.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-intermediate-lambda-reader.ss" "lang")((modname ex401) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Intertwined-Data/ex401.rkt
racket
about the language level of this file in a form that our tools can easily process. – [List-of S-expr] An Atom is one of: – Number – String – Symbol Any -> Boolean is x an atom S-expr S-expr -> Boolean produces #true if s1 and s2 are equal
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex401) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (require racket/base) An S - expr ( S - expression ...
8b5188e7916e3958db03898d63def44d6b8b235c78df0bec128aef588bc4c51f
haskell-opengl/GLUT
Feedback.hs
Feedback.hs ( adapted from feedback.c which is ( c ) Silicon Graphics , Inc. ) Copyright ( c ) 2002 - 2018 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE This program demonstrates use of OpenGL feedback . First , a lighti...
null
https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/examples/RedBook4/Feedback.hs
haskell
mode, a passthrough token is issued between each primitive resolve overloading, not needed in "real" programs will be clipped not in original example
Feedback.hs ( adapted from feedback.c which is ( c ) Silicon Graphics , Inc. ) Copyright ( c ) 2002 - 2018 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE This program demonstrates use of OpenGL feedback . First , a lighti...
ae465d40e47040f1ea0402ff7b235115d59443b97696dac4d1651aa2fccb8969
crownedgrouse/jason
jason.erl
%%%----------------------------------------------------------------------------- %%% File: jason.erl @author < > 2017 crownedgrouse.com %%% @doc JSON encode / decode Erlang library %%% @end %%% %%% Permission to use, copy, modify, and/or distribute this software %%% for any purpose with or without fe...
null
https://raw.githubusercontent.com/crownedgrouse/jason/f643611075c27200a47bb94bc2fc191e9f98526a/src/jason.erl
erlang
----------------------------------------------------------------------------- File: jason.erl @doc @end Permission to use, copy, modify, and/or 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 c...
@author < > 2017 crownedgrouse.com JSON encode / decode Erlang library THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL LOSS OF USE , DATA OR PROFITS , WHETHER IN AN ACTION OF CONTRACT , Created : 2017 - 01 - 08 -module(jason). -export([encode/1, decode/1]). -export([encode/2, decode...
09f137bbf975c2535c832c21d8612f5b2cedc02defa1cb31b238efe40a1ebde9
Zulu-Inuoe/clution
package.lisp
(defpackage :cl-utilities (:use :common-lisp) (:export #:split-sequence #:split-sequence-if #:split-sequence-if-not #:partition #:partition-if #:partition-if-not #:extremum #:no-extremum #:extremum-fastkey #:extrema #:n-most-extreme #:n-most-extreme-not-enough-elemen...
null
https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/cl-utilities-1.2.4/package.lisp
lisp
(defpackage :cl-utilities (:use :common-lisp) (:export #:split-sequence #:split-sequence-if #:split-sequence-if-not #:partition #:partition-if #:partition-if-not #:extremum #:no-extremum #:extremum-fastkey #:extrema #:n-most-extreme #:n-most-extreme-not-enough-elemen...
3a117a1ee89e90eec719ee212a2fc313c164eedccbdc72c14cec29e1bb9a58db
dmitryvk/sbcl-win32-threads
clos.pure.lisp
CLOS tests with no side effects This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from scratch after the fork from CMU CL . ;;;; ;;;; This software is in the publ...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tests/clos.pure.lisp
lisp
more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. not really a test for observable behaviour, but: make sure that all generic functions on st...
CLOS tests with no side effects This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . (cl:in-package :cl-user) (assert (null (let (collect) (sb-pcl::map-all-generic-functions (lambda (gf...
0d1fddacf1049df7ca40b770b397664fcb5e1a024847e4083f9da1e388c55e7c
kana/sicp
ex-4.49.scm
Exercise 4.49 . is more interested in generating ;;; interesting sentences than in parsing them. She reasons that by simply ;;; changing the procedure parse-word so that it ignores the ``input sentence'' ;;; and instead always succeeds and generates an appropriate word, we can use ;;; the programs we had built f...
null
https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-4.49.scm
scheme
interesting sentences than in parsing them. She reasons that by simply changing the procedure parse-word so that it ignores the ``input sentence'' and instead always succeeds and generates an appropriate word, we can use the programs we had built for parsing to do generation instead. Implement Warning: Run this sc...
Exercise 4.49 . is more interested in generating 's idea , and show the first half - dozen or so sentences generated . [ 54 ] (load "./sec-4.3.2.scm") (load "./sec-4.3.3.scm") (ambtest `(begin ,@parser-definitions (define (an-element-of items) (require (not (null? i...
9ad25fa0ee933acef6649ce83da76310e4be97c5a6b0ab9e355f8c65fe1409bd
danidiaz/really-small-backpack-example
Lesson10.hs
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE StandaloneKindSignatures # # LANGUAGE...
null
https://raw.githubusercontent.com/danidiaz/really-small-backpack-example/d16ffb5c3644dbe3d9617dcffd711e9921aee84f/lesson10-coercing-proofs/lib/Lesson10.hs
haskell
# LANGUAGE GADTs #
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE DataKinds # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE StandaloneKindSignatures # # LANGUAGE TypeApplications # # L...
0ba5b77da43822f1cab576feba98c7863aa82b993a5797b3ab0e218d7f0fb5b6
Ptival/chick
Tactic.hs
module PrettyPrinting.Tactic where import Text . PrettyPrint . Annotated . WL import PrettyPrinting . Atomic import Tactic import Term . Variable prettyTacticDoc : : Tactic Variable - > Doc a prettyTacticDoc = \case Atomic a - > prettyAtomicDoc a Semicolon a b - > fillCat [ prettyTac...
null
https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/PrettyPrinting/Tactic.hs
haskell
module PrettyPrinting.Tactic where import Text . PrettyPrint . Annotated . WL import PrettyPrinting . Atomic import Tactic import Term . Variable prettyTacticDoc : : Tactic Variable - > Doc a prettyTacticDoc = \case Atomic a - > prettyAtomicDoc a Semicolon a b - > fillCat [ prettyTac...
f8f1c7f3d5718f12b9e2b2e62904e93189a6f804042ce3f81d82c796353217d2
Eonblast/Scalaxis
log.erl
2007 - 2011 Zuse Institute Berlin 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 di...
null
https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/src/log.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 gov...
2007 - 2011 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > -module(log). -author(''). -vsn('$Id$'). -include("log4erl.hrl"). -export([start_link/0]). -export([log/2, log/3, l...
85291dc7f72040086da148ab4db655c594e8931841deedc19ceb0c585218823f
shayan-najd/QFeldspar
Singleton.hs
module QFeldspar.Singleton where import QFeldspar . MyPrelude import Prelude hiding (sin) import QFeldspar.ErrorMonad import Unsafe.Coerce import qualified QFeldspar.Nat.ADT as NA class HasSin tf t where sin :: tf t -- type family Trm (t :: k) :: * -- type family RevTrm (t :: *) :: k data Eql :: k -> k -> * w...
null
https://raw.githubusercontent.com/shayan-najd/QFeldspar/ed60ce02794a548833317388f6e82e2ab1eabc1c/QFeldspar/Singleton.hs
haskell
type family Trm (t :: k) :: * type family RevTrm (t :: *) :: k Type-level Lookup type-leve conditional type-level boolean and operator
module QFeldspar.Singleton where import QFeldspar . MyPrelude import Prelude hiding (sin) import QFeldspar.ErrorMonad import Unsafe.Coerce import qualified QFeldspar.Nat.ADT as NA class HasSin tf t where sin :: tf t data Eql :: k -> k -> * where Rfl :: Eql a a class EqlSin tf where eqlSin :: tf t -> tf t...
27b6d6957ad09f1b325efd5a653c59239f05fd4ab25b4c421168e33b2ef93682
clojure-interop/aws-api
AmazonPollyAsyncClientBuilder.clj
(ns com.amazonaws.services.polly.AmazonPollyAsyncClientBuilder "Fluent builder for AmazonPollyAsync. Use of the builder is preferred over using constructors of the client class." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.services.polly AmazonPollyAsyncClientBuilder])) (defn *stan...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.polly/src/com/amazonaws/services/polly/AmazonPollyAsyncClientBuilder.clj
clojure
(ns com.amazonaws.services.polly.AmazonPollyAsyncClientBuilder "Fluent builder for AmazonPollyAsync. Use of the builder is preferred over using constructors of the client class." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.services.polly AmazonPollyAsyncClientBuilder])) (defn *stan...
bb50993d56b36a7135fba5584582e1df27fdde312f93003f3b68beecdc0d0601
exoscale/clojure-kubernetes-client
v1_stateful_set_spec.clj
(ns clojure-kubernetes-client.specs.v1-stateful-set-spec (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.v1-label-selector :refer :all] [clojure-kubernetes-client.specs.v1-pod-template-spec :refer :all] [clojure-kubern...
null
https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_stateful_set_spec.clj
clojure
(ns clojure-kubernetes-client.specs.v1-stateful-set-spec (:require [clojure.spec.alpha :as s] [spec-tools.data-spec :as ds] [clojure-kubernetes-client.specs.v1-label-selector :refer :all] [clojure-kubernetes-client.specs.v1-pod-template-spec :refer :all] [clojure-kubern...
4f3c503225bf2c980f840216e59e672fdce7d370d69e69e466f67ceddb61cdfd
bjorng/wings
wings_wm.erl
%% %% wings_wm.erl -- %% Window manager for Wings . %% Copyright ( c ) 2002 - 2011 %% %% See the file "license.terms" for information on usage and redistribution %% of this file, and for a DISCLAIMER OF ALL WARRANTIES. %% %% $Id$ %% -module(wings_wm). -export([toplevel/4,toplevel_title/2]). -export(...
null
https://raw.githubusercontent.com/bjorng/wings/1e2c2d62e93a98c263b167c7a41f8611e0ff08cd/src/wings_wm.erl
erlang
wings_wm.erl -- See the file "license.terms" for information on usage and redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. $Id$ Window information. Setting the information bar message. Window property mangagement. Z order. Position. Size. Name of window. Event handler stack. Wind...
Window manager for Wings . Copyright ( c ) 2002 - 2011 -module(wings_wm). -export([toplevel/4,toplevel_title/2]). -export([init/1,enter_event_loop/0,dirty/0,dirty_mode/1,pdirty/0, new/2, new/3, new/4,delete/1,raise/1, link/2,hide/1,show/1,is_hidden/1, later/1,send/2,psend/2, psend/3,send_after_redraw...
257bff4550611a6a84787f92458d5996867af91e9c7f15799fcae2417fc99afb
open-company/open-company-web
user.cljs
(ns oc.web.stores.user (:require [oc.lib.user :as user-lib] [clojure.set :as clj-set] [oc.web.router :as router] [oc.web.dispatcher :as dispatcher] [oc.web.lib.jwt :as j] [oc.web.lib.utils :as utils] [oc.web.utils.user :as uu] [oc.web...
null
https://raw.githubusercontent.com/open-company/open-company-web/3f7aad2708fa6083fcab25637c3d19652e51de78/src/main/oc/web/stores/user.cljs
clojure
if not get a random icon from the rest of the images vector Signup keys Auth Settings Start with the empty user map Merge in the new user data If user is editing the profile let's merge in all the editable keys Merge in the fixed avatar url Login actions Store in application state whether to display the login ...
(ns oc.web.stores.user (:require [oc.lib.user :as user-lib] [clojure.set :as clj-set] [oc.web.router :as router] [oc.web.dispatcher :as dispatcher] [oc.web.lib.jwt :as j] [oc.web.lib.utils :as utils] [oc.web.utils.user :as uu] [oc.web...
2665909c34fbd3dad69bfa88306b50d7e148c082105930d39eb3df40e16a8e19
korya/efuns
patmatch.ml
(* Tests for matchings on integers and characters *) (* Dense integer switch *) let f = function 1 -> 1 | 2 -> 2 | 3 -> 3 | 4 -> 4 | 5 -> 5 | 6 -> 6 | _ -> 0 (* Sparse integer switch *) let g = function 303 -> 1 | 401 -> 2 | _ -> 0 (* Very sparse integer switch *) let iszero = function 0 -> true | _ -> false (* ...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/inliner/perf/Moretest/patmatch.ml
ocaml
Tests for matchings on integers and characters Dense integer switch Sparse integer switch Very sparse integer switch Simple matching on characters Matching with orpats Matching on arrays The test
let f = function 1 -> 1 | 2 -> 2 | 3 -> 3 | 4 -> 4 | 5 -> 5 | 6 -> 6 | _ -> 0 let g = function 303 -> 1 | 401 -> 2 | _ -> 0 let iszero = function 0 -> true | _ -> false let h = function 'a' -> "a" | 'e' -> "e" | 'i' -> "i" | 'o' -> "o" | 'u' -> "u" | _ -> "?" let k = function ' ' | '\t' | '\...
0a09b965cb66d9bca28e5f344391c6b2072c2415ab706439fc0c9be7d1bf7732
metosin/komponentit
scrollbar_width.cljs
(ns komponentit.scrollbar-width (:require [reagent.core :as r])) ;; It would be easy to calculate scrollbar width once and use that for all components, ;; but it is possible that scrollbar width changes per element, if ::-webkit-scrollbar ;; rule is used. (defn- get-scrollbar-width [el] (- (.-offsetWidth el) (.-s...
null
https://raw.githubusercontent.com/metosin/komponentit/d962ce1d69ccc3800db0d6b4fc18fc2fd30b494a/src/cljs/komponentit/scrollbar_width.cljs
clojure
It would be easy to calculate scrollbar width once and use that for all components, but it is possible that scrollbar width changes per element, if ::-webkit-scrollbar rule is used.
(ns komponentit.scrollbar-width (:require [reagent.core :as r])) (defn- get-scrollbar-width [el] (- (.-offsetWidth el) (.-scrollWidth el))) (defn scrollbar-padding "Renders the container first time with forced scrollbar, but once the width of scrollbar can be detected, replaces scrollbar with padding." [...
0e34fc1a1c73c7feb1b30bc9a417099a5d7ff80f9b2b153be167231bfab186c9
ddssff/refact-global-hse
Utils.hs
# LANGUAGE CPP # {-# LANGUAGE PackageImports #-} # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts , FlexibleInstances , RankNTypes , ScopedTypeVariables # module Utils where import Control.Exception (SomeException, throw) import ...
null
https://raw.githubusercontent.com/ddssff/refact-global-hse/519a017009cae8aa1a3db1b46eb560d76bd9895d/tests/expected/decl2/Utils.hs
haskell
# LANGUAGE PackageImports # | Do a hard reset of all the files of the repository containing the working directory. | Do a hard reset of all the files of a subdirectory within a git repository. (Does this every throw an exception?) | Determine whether the repository containing the working directory is in a modifi...
# LANGUAGE CPP # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts , FlexibleInstances , RankNTypes , ScopedTypeVariables # module Utils where import Control.Exception (SomeException, throw) import Control.Exception.Lifted as IO (...
11007f09bb3015d9e3d64f32ae6ba8c98e24810ad7b60d5acd3a2a4f14a12613
ocaml-community/yojson
common.ml
let version = "%%VERSION%%" exception Json_error of string let json_error s = raise (Json_error s) exception End_of_array exception End_of_object exception End_of_tuple exception End_of_input type in_param = { string_buf : Buffer.t } let create_in_param ?(len = 256) () = { string_buf = Buffer.create len } let utf...
null
https://raw.githubusercontent.com/ocaml-community/yojson/a3fbc94d1d57bcacb00d3b1b9ec4aa602326a4d0/lib/common.ml
ocaml
5 + 6 4 + 6 + 6 Buffer used to accumulate substrings Name describing the input file
let version = "%%VERSION%%" exception Json_error of string let json_error s = raise (Json_error s) exception End_of_array exception End_of_object exception End_of_tuple exception End_of_input type in_param = { string_buf : Buffer.t } let create_in_param ?(len = 256) () = { string_buf = Buffer.create len } let utf...
ac1a33916f835586184a44debf89bea22ff8729545557ea36bba01d23a9997ea
Eduap-com/WordMat
dlsode.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $...
null
https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/share/odepack/src/dlsode.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':simple-array) (:array-slicing t) (:declare-common t) (:float-format double-float))
( " f2cl1.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl2.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl5.l , v 95098eb54f13 2013/04/01 00:45:16 toy $ " " f2cl6.l , v 1d5cbacbb9...
adbd6a6500849ce58bf455ceccbcdf0a4174708fa32969a98bfa0d4e449f41ea
triffon/fp-2022-23
02-growing-trees.rkt
#lang racket a ) . Да се напише функция grow t x , t , в което към всяко листо на t добавя по две нови листа със зададена стойност x (define empty-tree '()) (define empty-tree? null?) (define (make-tree root left right) (list root left right)) (define (make-leaf element) (make-tree element empty-tr...
null
https://raw.githubusercontent.com/triffon/fp-2022-23/7ab850f2b143680a2f0a0c22f6e08a623bfe810b/exercises/inf2/exams/02-exam/exam-2017-2018/scheme/02-growing-trees.rkt
racket
решение (define test-tree ; = > ' ( ) примитиви за работа с потоци решение (define (stream-take n stream) (if (or (< n 1) (empty-stream? stream)) the-empty-stream (cons (head stream) (stream-take (- n 1) (tail stream))))) '((0 () ()) (0 (1 () ()) (1 () ())) (0
#lang racket a ) . Да се напише функция grow t x , t , в което към всяко листо на t добавя по две нови листа със зададена стойност x (define empty-tree '()) (define empty-tree? null?) (define (make-tree root left right) (list root left right)) (define (make-leaf element) (make-tree element empty-tr...
a6d750f2ca136b0701ca8fadae4c83ae5e5ccbbfed2ab71866efa63f84d327a5
TheLortex/mirage-monorepo
functions.ml
* Copyright ( c ) 2014 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2014 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) (* Foreign function bindings ...
null
https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/ocaml-ctypes/tests/test-bigarrays/stubs/functions.ml
ocaml
Foreign function bindings for the bigarrays tests.
* Copyright ( c ) 2014 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2014 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) open Ctypes module Stubs (F...
86f1d7704eaece33325ffc14c80df2ff77267e785a7e299f26e2918f43b648e1
LightAndLight/closure
Machine.hs
module Machine where import Prelude hiding (read) import Control.Monad (when) import Control.Monad.ST (ST, runST) import Control.Monad.Except (ExceptT, runExceptT, throwError) import Control.Monad.Trans (lift) import Data.STRef (STRef, newSTRef, readSTRef, writeSTRef, modifySTRef) import Data.Vector (Vector) import D...
null
https://raw.githubusercontent.com/LightAndLight/closure/fc7545d7764d9f1b63f65bbe4d2a2ace35eeaba2/src/Machine.hs
haskell
module Machine where import Prelude hiding (read) import Control.Monad (when) import Control.Monad.ST (ST, runST) import Control.Monad.Except (ExceptT, runExceptT, throwError) import Control.Monad.Trans (lift) import Data.STRef (STRef, newSTRef, readSTRef, writeSTRef, modifySTRef) import Data.Vector (Vector) import D...
3a6eacb90e829e9729c398622ed7496878ae65dc5107e87782bb5410ddde5dab
fortytools/holumbus
Base.hs
-- ---------------------------------------------------------------------------- | Module : Holumbus . Distribution . DNode . Base Copyright : Copyright ( C ) 2009 License : MIT Maintainer : ( ) Stability : experimental Portability : portable Version : 0.1 The...
null
https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/distribution/source/Holumbus/Distribution/DNode/Base.hs
haskell
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- * datatypes rf == only to be used by new resource implementations rf rf rf rf rf * adding, deleting other nodes * checking other nodes and resources * nee...
| Module : Holumbus . Distribution . DNode . Base Copyright : Copyright ( C ) 2009 License : MIT Maintainer : ( ) Stability : experimental Portability : portable Version : 0.1 The main module for the implementation of the distributed data structures . It ...
25ed9c235cba7cc4fae2a923b88cf233d8832e832e011ff0eb330caa596265fa
jepsen-io/jepsen
adya.clj
(ns jepsen.tests.adya "Generators and checkers for tests of Adya's proscribed behaviors for weakly-consistent systems. See -phd.pdf" (:require [jepsen [client :as client] [checker :as checker] [generator :as gen] [independent :as independent]] ...
null
https://raw.githubusercontent.com/jepsen-io/jepsen/355666761f404a79e0301da79ed5add012d16302/jepsen/src/jepsen/tests/adya.clj
clojure
databases may There should be at most one successful insert for any given key
(ns jepsen.tests.adya "Generators and checkers for tests of Adya's proscribed behaviors for weakly-consistent systems. See -phd.pdf" (:require [jepsen [client :as client] [checker :as checker] [generator :as gen] [independent :as independent]] ...
445339d1b2f0178758f84b4835d6731fcfad7fe9649f3f50e1fcf1374b788a33
stonebuddha/eopl
syntax.mli
type program = | AProgram of top_level list and top_level = | ValTop of string * expression | FunTop of string * expression and expression = | ConstExp of int * Ploc.t | DiffExp of expression * expression * Ploc.t | IsZeroExp of expression * Ploc.t | IfExp of expression * expression * expression * Ploc....
null
https://raw.githubusercontent.com/stonebuddha/eopl/88ea636110421706f900e753c30240ff1ea26f67/CALL-BY-NEED-EXT/syntax.mli
ocaml
type program = | AProgram of top_level list and top_level = | ValTop of string * expression | FunTop of string * expression and expression = | ConstExp of int * Ploc.t | DiffExp of expression * expression * Ploc.t | IsZeroExp of expression * Ploc.t | IfExp of expression * expression * expression * Ploc....
95dcda33c0803b48d50fa18ef43faf35cabf303eb3b584be4382b2c387911503
cuplv/dai
cfg_parser.mli
open Dai.Import open Tree_sitter_java open Syntax type edge = Cfg.Loc.t * Cfg.Loc.t * Ast.Stmt.t type prgm_parse_result = { loc_map : Loc_map.t; cfgs : Cfg.t Cfg.Fn.Map.t; fields : Declared_fields.t; cha : Class_hierarchy.t; } val set_parse_result : ?loc_map:Loc_map.t -> ?cfgs:Cfg.t Cfg.Fn.Map.t -> ?fi...
null
https://raw.githubusercontent.com/cuplv/dai/f11ff4c2a9aacf36e63f8b5401f454fccade8138/src/frontend/cfg_parser.mli
ocaml
run in [diagnostic] mode if set, gathering information about our compatibility with the syntax of the given CST rather than failing fast on incompatible syntactic form print information about unimplemented syntax encountered * Translate the given tree-sitter parse [trees] to CFGs * Convert an expression concrete sy...
open Dai.Import open Tree_sitter_java open Syntax type edge = Cfg.Loc.t * Cfg.Loc.t * Ast.Stmt.t type prgm_parse_result = { loc_map : Loc_map.t; cfgs : Cfg.t Cfg.Fn.Map.t; fields : Declared_fields.t; cha : Class_hierarchy.t; } val set_parse_result : ?loc_map:Loc_map.t -> ?cfgs:Cfg.t Cfg.Fn.Map.t -> ?fi...
f95dbcd362233a96496e6cbf1827042edc5c893677e18afc8348db85aac77eb6
metabase/metabase
group_manager_test.clj
(ns ^:mb/once metabase-enterprise.advanced-permissions.api.group-manager-test "Permisisons tests for API that needs to be enforced by Group Manager permisisons." (:require [clojure.set :refer [subset?]] [clojure.test :refer :all] [metabase-enterprise.advanced-permissions.models.permissions.group-manager :a...
null
https://raw.githubusercontent.com/metabase/metabase/d774262b4fb3fe866819ad1c36b8df2018c26904/enterprise/backend/test/metabase_enterprise/advanced_permissions/api/group_manager_test.clj
clojure
Use different groups for each block since `clear-memberships` is destructive ensure `user-to-update` is not in `group-to-add` ensure `user-to-update` is in `group-to-remove`
(ns ^:mb/once metabase-enterprise.advanced-permissions.api.group-manager-test "Permisisons tests for API that needs to be enforced by Group Manager permisisons." (:require [clojure.set :refer [subset?]] [clojure.test :refer :all] [metabase-enterprise.advanced-permissions.models.permissions.group-manager :a...
dfaee787ddf7abb8f6ebd915e0f9830eae313bcf0a9a4a90a6e50889d8ddf258
facebookarchive/duckling_old
numbers.clj
( ; Context map {} "0" "zero" "nici unul" "nici unu" "nici una" "nici o" "nimic" (number 0) "1" "unu" "unul" "un" "o" "intai" "întâi" (number 1) "primul" "prima" (ordinal 1) "2" "doi" "doua" "două" (number 2) "a...
null
https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/ro/corpus/numbers.clj
clojure
Context map
( {} "0" "zero" "nici unul" "nici unu" "nici una" "nici o" "nimic" (number 0) "1" "unu" "unul" "un" "o" "intai" "întâi" (number 1) "primul" "prima" (ordinal 1) "2" "doi" "doua" "două" (number 2) "al doilea" "a...
0cb417b2bac94fa06827d553a9a3abea13e35598f83eb9f6bec428aaf59d91fa
Octachron/babilim
tmap.ml
module Inner=CamlinternalFormatBasics module U = Untyped.Cfmt type 'a gkey = { id: 'a; ctx: string; num: int option } type dynkey = U.u gkey module M = Map.Make(struct type t = dynkey let compare = compare end) module W = Witness type t = Metafmt.Box.u M.t type tmap = t let empty: t = M.empty let fmt (Inner.Forma...
null
https://raw.githubusercontent.com/Octachron/babilim/46b0412cd6efef5efe26bfd379566688bf7ab571/metaprintf/tmap.ml
ocaml
* Singular form printing function * Plural form printing function
module Inner=CamlinternalFormatBasics module U = Untyped.Cfmt type 'a gkey = { id: 'a; ctx: string; num: int option } type dynkey = U.u gkey module M = Map.Make(struct type t = dynkey let compare = compare end) module W = Witness type t = Metafmt.Box.u M.t type tmap = t let empty: t = M.empty let fmt (Inner.Forma...
02642b0ab87729f565fc359375c431a4b045ff8e9c1bd3a8b14c7a4c51926bb8
ocaml-ppx/ocamlformat
rpc_test.ml
module Result = struct module Infix = struct let ( >>= ) r f = match r with Ok x -> f x | Error _ as e -> e let ( >>| ) r f = match r with Ok x -> Ok (f x) | Error _ as e -> e end let map_error ~f = function Ok x -> Ok x | Error x -> Error (f x) end module IO = struct type 'a t = 'a type ic = in_c...
null
https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/5ce32d2aeb1f7ca38b0bbc65d5d77eb64f78484e/test/rpc/rpc_test.ml
ocaml
* this does something testing format args
module Result = struct module Infix = struct let ( >>= ) r f = match r with Ok x -> f x | Error _ as e -> e let ( >>| ) r f = match r with Ok x -> Ok (f x) | Error _ as e -> e end let map_error ~f = function Ok x -> Ok x | Error x -> Error (f x) end module IO = struct type 'a t = 'a type ic = in_c...
9b9cb4c54a864d58abfd70a25c6f8b61fe30fa85b59eab92e7667363eb7f153d
lispbuilder/lispbuilder
rectangle.lisp
SDL ( Simple Media Layer ) library using CFFI for foreign function interfacing ... ( C)2006 Justin Heyes - Jones < > and < > Thanks to and ;; see COPYING for license This file contains some useful functions for using SDL from Common lisp ;; using sdl.lisp (the CFFI wrapper) (in-package #:lispbuilder-sd...
null
https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl/base/rectangle.lisp
lisp
see COPYING for license using sdl.lisp (the CFFI wrapper) (declaim (inline rectangle-from-edges-*))
SDL ( Simple Media Layer ) library using CFFI for foreign function interfacing ... ( C)2006 Justin Heyes - Jones < > and < > Thanks to and This file contains some useful functions for using SDL from Common lisp (in-package #:lispbuilder-sdl-base) (declaim (inline rectangle)) (defun rectangle (&key (x ...
b33d4159dc737aec4787c0e41a117c519eb62f80f602492137fd8d8699466374
csabahruska/gpipe-quake3
Graphics.hs
# LANGUAGE ScopedTypeVariables , PackageImports , TypeFamilies , FlexibleContexts , RecordWildCards , ViewPatterns # module Graphics where import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as SB import Data.List import qualified Data.Vector as V import qualified Data.Trie as T import Dat...
null
https://raw.githubusercontent.com/csabahruska/gpipe-quake3/cf625599b6220cf8b4b27a931f94446a080529e6/Graphics.hs
haskell
Front Back
# LANGUAGE ScopedTypeVariables , PackageImports , TypeFamilies , FlexibleContexts , RecordWildCards , ViewPatterns # module Graphics where import Data.ByteString.Char8 (ByteString) import qualified Data.ByteString.Char8 as SB import Data.List import qualified Data.Vector as V import qualified Data.Trie as T import Dat...
bfc37e97832d63b969339e001c7ff8680c4ba00d92c444ab2e1bb0a33276d02b
ravichugh/djs
xx_test00.ml
let _ :: Int = 1 in let _ :: Str = "hi" in let sanity_check :: FLS = "should fail" in 0
null
https://raw.githubusercontent.com/ravichugh/djs/c4a13e06adb3e0945f39966523a4d944448c1941/tests/functional/underscore/xx_test00.ml
ocaml
let _ :: Int = 1 in let _ :: Str = "hi" in let sanity_check :: FLS = "should fail" in 0
196ef03afded120a9065109a080c41620baf41dd0e62cb0e2b6ae83e7d5fee47
egison/egison
Setup.hs
#!/usr/bin/env runhaskell import Distribution.Simple main = defaultMain
null
https://raw.githubusercontent.com/egison/egison/df4e47f7c8adfe90d9bf408459772a6cb4e71b70/Setup.hs
haskell
#!/usr/bin/env runhaskell import Distribution.Simple main = defaultMain
a22d119873887408f7cf4f8741d089c2fff00a44bd9e0cbe75a02c90b0d50d31
fugue/fregot
Find.hs
| Copyright : ( c ) 2020 Fugue , Inc. License : Apache License , version 2.0 Maintainer : Stability : experimental Portability : POSIX Find rego files in directories . Copyright : (c) 2020 Fugue, Inc. License : Apache License, version 2.0 Maintainer : Stability : experimental Port...
null
https://raw.githubusercontent.com/fugue/fregot/abee55eb1feaf7ce5b8579dc22528154d65fcf77/lib/Fregot/Find.hs
haskell
| Takes a list of files or directories, and returns a full exhaustive list of all found files.
| Copyright : ( c ) 2020 Fugue , Inc. License : Apache License , version 2.0 Maintainer : Stability : experimental Portability : POSIX Find rego files in directories . Copyright : (c) 2020 Fugue, Inc. License : Apache License, version 2.0 Maintainer : Stability : experimental Port...
4e4129622fa02a3b9c25c67f02aa1f74f97c927f91a892f9776c78d94be38ed4
dbuenzli/cmdliner
cmdliner_manpage.mli
--------------------------------------------------------------------------- Copyright ( c ) 2011 The cmdliner programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright ...
null
https://raw.githubusercontent.com/dbuenzli/cmdliner/e23f44933786a4a3a47fc1bd3e845049e5b5d81a/src/cmdliner_manpage.mli
ocaml
* [escape s] escapes [s] from the doc language. * {1 Section maps} Used for handling the merging of metadata doc strings. * {1 Content boilerplate} * {1 Output} * [subst b ~subst s], using [b], substitutes in [s] variables of the form "$(doc)" by their [subst] definition. This leaves escapes and markup ...
--------------------------------------------------------------------------- Copyright ( c ) 2011 The cmdliner programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright ...
6ba1831c2a2e056b313ef2cde60cd715dc11b9a466f6f4f9bf30a65686c558a4
jlouis/etorrent_core
etorrent_progress.erl
%% @author < > @doc Chunk manager of a torrent . %% <p>This module implement a manager of chunks for the etorrent %% application. When we download from multiple peers, each peer will have %% different pieces. Say for instance that A has pieces [1,2] while B has [ 1,3 ] . In this case , we can download 2 from ...
null
https://raw.githubusercontent.com/jlouis/etorrent_core/7db7f4ef36c1d055812504f00df92c6a67c2e4af/src/etorrent_progress.erl
erlang
<p>This module implement a manager of chunks for the etorrent application. When we download from multiple peers, each peer will have different pieces. Say for instance that A has pieces [1,2] while B has either of them.</p> <p>The bittorrent protocol, however, does not transfer -- mostly to battle the problem th...
@author < > @doc Chunk manager of a torrent . [ 1,3 ] . In this case , we can download 2 from A , 3 from B and 1 from pieces . Instead it transfers slices of pieces , 16 Kilobytes in size has not been downloaded > < p > A chunk must only be downloaded from one peer at a time in order < li > A peer ...
257cf1e661555ca8a4bf02f5007f6d879ccfa49705c3b63f9b3da0aafe682292
craigl64/clim-ccl
drawing-state-mixin.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*- (in-package :clim-internals) "Copyright (c) 1990, 1991, 1992 Symbolics, Inc. All rights reserved." ;;; Line Style (define-protocol-class line-style ()) (defclass standard-line-style (line-style) (...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/pre-silica/drawing-state-mixin.lisp
lisp
Syntax : ANSI - Common - Lisp ; Package : CLIM - INTERNALS ; Base : 10 ; Lowercase : Yes -*- Line Style Cache the common case when only :DASHES and :THICKNESS are provided NOTE: if you change the keyword arguments accepted by this method, you also have to change the list of keywords in *ALL-DRAWING-OPTIONS* Close...
(in-package :clim-internals) "Copyright (c) 1990, 1991, 1992 Symbolics, Inc. All rights reserved." (define-protocol-class line-style ()) (defclass standard-line-style (line-style) ((unit :type (member :normal :point) :initform :normal :initarg :unit :reader line-style-unit) (thickness :type real...
b50ff817fa347d9a01c9ff03d27697b9f9497455a6957f587b5067e73ef7bc80
collaborativetrust/WikiTrust
read_revision.ml
Copyright ( c ) 2009 The Regents of the University of California All rights reserved . Authors : and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : 1 . Redistributions of source code must retain the above copyright notice ,...
null
https://raw.githubusercontent.com/collaborativetrust/WikiTrust/9dd056e65c37a22f67d600dd1e87753aa0ec9e2c/remote/analysis/read_revision.ml
ocaml
read_revision -- given a revision id and database params, outputs the colored markup for this revision to stdout. Figure out what to do and how we are going to do it. Prepares the database connection information
Copyright ( c ) 2009 The Regents of the University of California All rights reserved . Authors : and use in source and binary forms , with or without modification , are permitted provided that the following conditions are met : 1 . Redistributions of source code must retain the above copyright notice ,...
9799d95b0e39bb4048fca8ea6bccbf0f7d0895423afad2e022a5da0faea3bf2e
gfour/gic
exmh201.hs
main :: IO () main = putStrLn (show result) integ :: ((Int -> Int) -> Int -> Int) -> (Int -> Int) -> Int -> Int -> Int -> Int -> Int integ g h a b i s = if i < (b-a) then integ g h a b (i+1) (s + g h (a + i)) else s; trapezoid :: (Int -> Int) -> Int -> Int trapezoid f x = (f(x) + f(x+1))...
null
https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/Examples/Num/exmh201.hs
haskell
simpson13 f x = ( f(x ) + 4 * f(x+1 ) + f(x+2 ) ) ` div ` 6 ; simpson38 f x = ( f(x ) + 3 * f(x+1 ) + 3 * f(x+2 ) + f(x+3 ) ) * 3 ` div ` 24 ; simpson13 f x = (f(x) + 4 * f(x+1) + f(x+2)) `div` 6; simpson38 f x = (f(x) + 3 * f(x+1) + 3 * f(x+2) + f(x+3)) * 3 `div` 24; inverse x = 10 ` div ` x ; absol...
main :: IO () main = putStrLn (show result) integ :: ((Int -> Int) -> Int -> Int) -> (Int -> Int) -> Int -> Int -> Int -> Int -> Int integ g h a b i s = if i < (b-a) then integ g h a b (i+1) (s + g h (a + i)) else s; trapezoid :: (Int -> Int) -> Int -> Int trapezoid f x = (f(x) + f(x+1))...
febdbbd5caa330e8db5f921ef25fd921962ccac250f385cea52fc1037433bbee
nuvla/api-server
module_test.clj
(ns sixsq.nuvla.server.resources.module-test (:require [clojure.test :refer [deftest is]] [sixsq.nuvla.pricing.impl :as pricing-impl] [sixsq.nuvla.server.resources.module :as module])) (deftest set-price-test (is (= (module/set-price {} "user/jane") {})) (with-redefs [pricing-impl/retrieve-price ...
null
https://raw.githubusercontent.com/nuvla/api-server/be1110f7f8fa7c5b1f311333022b4bfdf4813b30/code/test/sixsq/nuvla/server/resources/module_test.clj
clojure
(ns sixsq.nuvla.server.resources.module-test (:require [clojure.test :refer [deftest is]] [sixsq.nuvla.pricing.impl :as pricing-impl] [sixsq.nuvla.server.resources.module :as module])) (deftest set-price-test (is (= (module/set-price {} "user/jane") {})) (with-redefs [pricing-impl/retrieve-price ...
f423620055a494598dcf03f7506e8154e75ee0a20b0f65ef8c5eda5498f6b05b
autolwe/autolwe
NormList.mli
open Expr val norm_list_expr : (expr -> expr) -> expr -> expr val norm_list_ifte : (expr -> expr) -> expr -> expr -> expr -> expr
null
https://raw.githubusercontent.com/autolwe/autolwe/3452c3dae06fc8e9815d94133fdeb8f3b8315f32/src/Norm/NormList.mli
ocaml
open Expr val norm_list_expr : (expr -> expr) -> expr -> expr val norm_list_ifte : (expr -> expr) -> expr -> expr -> expr -> expr
694d878421236a6d54e0b0b76cc8de6178f7bd55345b0609ded9961d2c6834b4
jaked/ocamljs
lwt_dom.mli
* This file is part of ocamljs , OCaml to Javascript compiler * Copyright ( C ) 2009 , Inc * Copyright ( C ) 2010 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundatio...
null
https://raw.githubusercontent.com/jaked/ocamljs/378080ff1c8033bb15ed2bd29bf1443e301d7af8/src/lwt-dom/lwt_dom.mli
ocaml
* [sleep d] is a thread which remains suspended for [d] seconds (letting other threads run) and then terminates. * [yield ()] is a thread which suspends itself (letting other threads run) and then resumes as soon as possible and terminates.
* This file is part of ocamljs , OCaml to Javascript compiler * Copyright ( C ) 2009 , Inc * Copyright ( C ) 2010 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundatio...
006001c06648057469abd0e4eee3b3a33a013721975cce7ba5026b96534156e6
haskell/ghcup-hs
Upgrade.hs
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE TypeApplications # # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE DuplicateRecordFields # {-# LANGUAGE RankNTypes #-} module GHCup.OptParse.Upgrade where import GHCup import GHCup.Errors ...
null
https://raw.githubusercontent.com/haskell/ghcup-hs/54af66d11525587326e7652de8c4ed3ac84876e1/app/ghcup/GHCup/OptParse/Upgrade.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # ------------- [ Options ]-- ------------- ------------- ------------- ------------------------- [ Effect interpreters ]-- ------------------------- ---------------- [ Entrypoint ]-- ----------------
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE TypeApplications # # LANGUAGE FlexibleContexts # # LANGUAGE DuplicateRecordFields # module GHCup.OptParse.Upgrade where import GHCup import GHCup.Errors import GHCup.Types import GHCup.Prelude.Fil...
7baeab53fa3f33a64d777c27d150e80b8d60f2a7df2005849cc3945e6e6e9a6f
Yomguithereal/clj-fuzzy
daitch_mokotoff_test.clj
;; ------------------------------------------------------------------- ;; clj-fuzzy Daitch-Mokotoff Soundex Tests ;; ------------------------------------------------------------------- ;; ;; Author : ( Yomguithereal ) Version : 0.1 ;; (ns clj-fuzzy.daitch-mokotoff-test (:require [clojure.test :refer :all] ...
null
https://raw.githubusercontent.com/Yomguithereal/clj-fuzzy/ce7c57dfb14f6ddc99bf4d9ab74c778128438d8b/test/clj_fuzzy/daitch_mokotoff_test.clj
clojure
------------------------------------------------------------------- clj-fuzzy Daitch-Mokotoff Soundex Tests ------------------------------------------------------------------- (deftest process-test (is (= "T522" (process "Tymczak"))) (is (= "A536" (process "Andrew"))) (is (= "C423" (process "Callister")...
Author : ( Yomguithereal ) Version : 0.1 (ns clj-fuzzy.daitch-mokotoff-test (:require [clojure.test :refer :all] [clj-fuzzy.daitch-mokotoff :refer :all])) ( is (= " R163 " ( process " " ) ) ) ( is (= " R163 " ( process " " ) ) ) ( is (= " R150 " ( process " " ) ) ) ( is (= " ...
33efa37075fececa1872767249b9dd96fdb1fdc9fbd914eccfd6b1ed8ac247a0
tweag/HaskellR
tests.hs
-- | Copyright : ( C ) 2013 Amgen , Inc. -- -- Main test suite for inline-r. Pass --torture on command-line or set -- R_GCTORTURE environment variable to perform memory tests. They will be -- ignored otherwise. Only pass --torture when linking against a version of -- R compiled with the --enable-strict-barrier config...
null
https://raw.githubusercontent.com/tweag/HaskellR/43dee47c735045d4178aae4b42f4dd18103ec631/inline-r/tests/tests.hs
haskell
| Main test suite for inline-r. Pass --torture on command-line or set R_GCTORTURE environment variable to perform memory tests. They will be ignored otherwise. Only pass --torture when linking against a version of R compiled with the --enable-strict-barrier configure flag turned on. # LANGUAGE GADTs # # LANGUAGE ...
Copyright : ( C ) 2013 Amgen , Inc. # LANGUAGE DataKinds # # LANGUAGE LambdaCase # # LANGUAGE QuasiQuotes # module Main where import qualified Test.Constraints import qualified Test.Event import qualified Test.FunPtr import qualified Test.GC import qualified Test.Regions import qualified Test.Vector import qualifie...
bbbc940166c4db97363e64529de664a911b3ae1cd641b7d22d6ad9b544fd1115
haskell-opengl/OpenGLRaw
TextureMirrorClamp.hs
# LANGUAGE PatternSynonyms # -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.EXT.TextureMirrorClamp Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- -------------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/EXT/TextureMirrorClamp.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.GL.EXT.TextureMirrorClamp License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ * Extension Support * Enums
# LANGUAGE PatternSynonyms # Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.EXT.TextureMirrorClamp ( glGetEXTTextureMirrorClamp, gl_EXT_texture_mirror_clamp, pattern GL_MIRROR_CLAMP_EXT, pattern GL_MIRROR_CLAMP_TO_BORDER_EXT, pattern GL_MIRROR_CLAMP_TO_EDGE_EXT ) where import G...
22aed57863c48d16b438ccd18aa73dc28c5c00962f13b5e277655f65b5e835ad
spawnfest/eep49ers
ssl_dist_test_lib.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2017 - 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/ssl/test/ssl_dist_test_lib.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 2017 - 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(ssl_dist_test_lib). -behaviour(ct_suite). -include_lib("common_test/include/ct.hrl"). -include_lib("public...
ca163e0aa302430e11acd300ec73ecb3d4fd566f624ab6abee45b5aa932bd56c
zcaudate/hara
progress.clj
(ns hara.print.base.progress (:require [hara.data.base.nested :as nested] [hara.print.base.common :as common])) (def +progress-defaults+ {:throttle 20 :bar {:width 50 :complete \= :incomplete \space :marker \=}}) (defn replace-center "replaces th...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/print/base/progress.clj
clojure
(ns hara.print.base.progress (:require [hara.data.base.nested :as nested] [hara.print.base.common :as common])) (def +progress-defaults+ {:throttle 20 :bar {:width 50 :complete \= :incomplete \space :marker \=}}) (defn replace-center "replaces th...
710dde57daeb939221e380f90ee56f4a7b0a043f486ffbc5d3165a912e5ab59c
qrilka/xlsx
Common.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE DeriveGeneric # module Codec.Xlsx.Types.Drawing.Common where import GHC.Generics (Generic) import Control.Arrow (first) #ifdef USE_MICROLENS import Lens.Micro.TH (makeLenses) #else import Control.L...
null
https://raw.githubusercontent.com/qrilka/xlsx/397c3c9db965419a2d2d72470ba68f478748c573/src/Codec/Xlsx/Types/Drawing/Common.hs
haskell
# LANGUAGE OverloadedStrings # Positive angles are clockwise (i.e., towards the positive y axis); negative angles are counter-clockwise (i.e., towards the negative y axis). | A string with rich text formatting fromWordArt, forceAA, upright, compatLnSpc, prstTxWarp, ^ Specifies the rotation that is being applie...
# LANGUAGE CPP # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE DeriveGeneric # module Codec.Xlsx.Types.Drawing.Common where import GHC.Generics (Generic) import Control.Arrow (first) #ifdef USE_MICROLENS import Lens.Micro.TH (makeLenses) #else import Control.Lens.TH #endif import Control.Monad ...
e25eda67f047e91c49361017f0712fff3a978e95d391b0fcf043d461ea1c43f3
AnIrishDuck/SnapChat
Chat.hs
| Implements chat room functionality . Allows the application to post messages ( ' addEntry ' ) , add users ( ' addUser ' ) , get a list of entries ( ' getEntries ' ) and kick inactive users ( ' tick ' ) . All of this is done in a thread - safe way through the magic of " Control . Concurrent . STM " . Impl...
null
https://raw.githubusercontent.com/AnIrishDuck/SnapChat/001aa7ffe1c2633e594e991122d7db78b21656b9/src/Chat.hs
haskell
|An active user in a chat room. |Something someone has said. |A chat room with a list of active users and what they have said. |Creates an empty chat room. |Gets everything that has been said in the given chat room. |Updates the given variable in place. |Adds an entry to the room. |Number of ticks to wait for a...
| Implements chat room functionality . Allows the application to post messages ( ' addEntry ' ) , add users ( ' addUser ' ) , get a list of entries ( ' getEntries ' ) and kick inactive users ( ' tick ' ) . All of this is done in a thread - safe way through the magic of " Control . Concurrent . STM " . Impl...
873f4302e210a9d65e6eea2a2df3cef2da08bbfb70c04ee0dda3d0cec91d1a06
bevuta/pepa
core.clj
(ns pepa.core (:require [com.stuartsierra.component :as component] [pepa.config :as config] [pepa.db :as db] [pepa.bus :as bus] [pepa.web :as web] [pepa.smtp :as smtp] [pepa.processor.file-page-extractor :as fpe] [pepa.processor.page-...
null
https://raw.githubusercontent.com/bevuta/pepa/0a9991de0fd1714515ca3def645aec30e21cd671/src/pepa/core.clj
clojure
(ns pepa.core (:require [com.stuartsierra.component :as component] [pepa.config :as config] [pepa.db :as db] [pepa.bus :as bus] [pepa.web :as web] [pepa.smtp :as smtp] [pepa.processor.file-page-extractor :as fpe] [pepa.processor.page-...
c1566a7fc368bc01ffe9f62e8562598952832e73a78d4d54a1705f9b5328af4e
nasa/Common-Metadata-Repository
v1.clj
(ns cmr.ous.impl.v1 (:require [cmr.exchange.common.results.core :as results] [cmr.exchange.common.results.errors :as errors] [cmr.exchange.common.util :as util] [cmr.metadata.proxy.concepts.collection :as collection] [cmr.metadata.proxy.concepts.granule :as granule] [cmr.metadata.proxy.results.error...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/3215ee6945cb1fa82499c3c3d74841c3284eec6e/other/cmr-exchange/ous-plugin/src/cmr/ous/impl/v1.clj
clojure
Defaults ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Utility/Support Functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Stages Overrides for URL Generation ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; API ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Stage 1 St...
(ns cmr.ous.impl.v1 (:require [cmr.exchange.common.results.core :as results] [cmr.exchange.common.results.errors :as errors] [cmr.exchange.common.util :as util] [cmr.metadata.proxy.concepts.collection :as collection] [cmr.metadata.proxy.concepts.granule :as granule] [cmr.metadata.proxy.results.error...
2920da4ac5ffef12f50d1fe0cc059c3ff513937f37b1ebfe37a8d7e73913858c
clj-commons/aleph
core_test.clj
(ns aleph.http.core-test (:require [aleph.http.core :as core] [clojure.test :refer [deftest is]]) (:import (io.netty.handler.codec.http DefaultHttpRequest))) (deftest test-HeaderMap-keys (let [^DefaultHttpRequest req (core/ring-request->netty-request {:uri "" ...
null
https://raw.githubusercontent.com/clj-commons/aleph/b5ca4d1b16b701c9465101be937a8ccce5d95d0b/test/aleph/http/core_test.clj
clojure
(ns aleph.http.core-test (:require [aleph.http.core :as core] [clojure.test :refer [deftest is]]) (:import (io.netty.handler.codec.http DefaultHttpRequest))) (deftest test-HeaderMap-keys (let [^DefaultHttpRequest req (core/ring-request->netty-request {:uri "" ...
831636bfcb54fec85969cda4e61b17e014d538762e678a6e9f76074358026528
OlivierSohn/hamazed
Color.hs
# LANGUAGE NoImplicitPrelude # -- | This module defines colors of game elements. module Imj.Game.Color ( -- * Config color configColors , configFgColor , darkConfigFgColor -- * Messages color , neutralMessageColor , neutralMessageColorFg , messageColor ) where import Imj.Prelude impor...
null
https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-game/src/Imj/Game/Color.hs
haskell
| This module defines colors of game elements. * Config color * Messages color
# LANGUAGE NoImplicitPrelude # module Imj.Game.Color configColors , configFgColor , darkConfigFgColor , neutralMessageColor , neutralMessageColorFg , messageColor ) where import Imj.Prelude import Imj.Graphics.Color import Imj.Game.Level neutralMessageColorFg :: Color...
b7f52c0daf5ed2534d6cc7b30ac2eda64d3c1427c8a2023ff6b518e7e981790d
uds-psl/Prog
poly.ml
let fst (x,y) = x let snd (x,y) = y let swap (x,y) = (y,x) let car f (x,y) = f x y let cas f x y = f (x,y) let rec iter f n x = if n < 1 then x else iter f (n - 1) (f x) let succ x = x + 1 let add x y = iter succ y x let mul x y = iter (add y) x 0 let pow x y = iter (mul x) y 1 let rec fib n = if n < 2 then n else ...
null
https://raw.githubusercontent.com/uds-psl/Prog/58afc2b9c1278aa0d8c4959996f114b3242e2d35/ml/poly.ml
ocaml
let fst (x,y) = x let snd (x,y) = y let swap (x,y) = (y,x) let car f (x,y) = f x y let cas f x y = f (x,y) let rec iter f n x = if n < 1 then x else iter f (n - 1) (f x) let succ x = x + 1 let add x y = iter succ y x let mul x y = iter (add y) x 0 let pow x y = iter (mul x) y 1 let rec fib n = if n < 2 then n else ...
a5e2570f29810f14fbf2a6d74f6f0e0a14386c8fed41d2b0ae6724cc3a5b8af8
jhund/re-frame-and-reagent-and-slatejs
events.cljs
(ns rrs.events (:require [re-frame.core :refer [path reg-cofx reg-event-db reg-event-fx reg-fx]] [rrs.db] [rrs.ui.events] [rrs.ui.slatejs.events])) ;; Commands (reg-event-db :rrs/cmd-initialize-db (fn cmd-initialize-db-handler [_ _] rrs.db/default-db))
null
https://raw.githubusercontent.com/jhund/re-frame-and-reagent-and-slatejs/75593b626d9a31b8069daf16eef2a23e9aa19ec7/src/cljs/rrs/events.cljs
clojure
Commands
(ns rrs.events (:require [re-frame.core :refer [path reg-cofx reg-event-db reg-event-fx reg-fx]] [rrs.db] [rrs.ui.events] [rrs.ui.slatejs.events])) (reg-event-db :rrs/cmd-initialize-db (fn cmd-initialize-db-handler [_ _] rrs.db/default-db))
d0ab08eedbf0b2dc68e532a0b804fbf45a5652c1609fe46265370e35cd0ae9f6
erlangonrails/devdb
ejabberd_local.erl
%%%---------------------------------------------------------------------- %%% File : ejabberd_local.erl Author : < > %%% Purpose : Route local packets Created : 30 Nov 2002 by < > %%% %%% ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne %%% %%% This program is free software; you can redistribute it...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/ejabberd-2.1.4/src/ejabberd_local.erl
erlang
---------------------------------------------------------------------- File : ejabberd_local.erl Purpose : Route local packets This program is free software; you can redistribute it and/or License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WI...
Author : < > Created : 30 Nov 2002 by < > ejabberd , Copyright ( C ) 2002 - 2010 ProcessOne modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU General Public License Founda...
ae3e85a293666fb0e706412e6ebbee424d48da9b9c8c4f7a4f19e83a60850ae0
kupl/FixML
sub13.ml
type nat = ZERO | SUCC of nat let rec natadd (nadd1, nadd2)= match nadd1 with | ZERO -> nadd2 | SUCC nadd1' -> SUCC (natadd (nadd1', nadd2)) let rec natmul (nmul1, nmul2)= match nmul1 with | ZERO -> ZERO | SUCC ZERO -> nmul2 | SUCC (SUCC nmul1') -> match nmul2 with | ZERO -> ZERO | SUCC ZERO -> SUCC ...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/nat/nat/submissions/sub13.ml
ocaml
type nat = ZERO | SUCC of nat let rec natadd (nadd1, nadd2)= match nadd1 with | ZERO -> nadd2 | SUCC nadd1' -> SUCC (natadd (nadd1', nadd2)) let rec natmul (nmul1, nmul2)= match nmul1 with | ZERO -> ZERO | SUCC ZERO -> nmul2 | SUCC (SUCC nmul1') -> match nmul2 with | ZERO -> ZERO | SUCC ZERO -> SUCC ...
e10339b2c356eda3f67c7911c789f8288a26099efff135be8f6db5e5c3866a48
tdietert/haskell-blockchain-workshop
Message.hs
{-# LANGUAGE DeriveAnyClass #-} module Network.P2P.Message ( messagingProc , issueTransfer , mineBlock ) where import Protolude import Control.Distributed.Process ( Process , NodeId , getSelfNode , getSelfPid , send , nsendRemote , receiveWait , match , register , matchAny , say ) ...
null
https://raw.githubusercontent.com/tdietert/haskell-blockchain-workshop/e7258ebc962b849b0bac5f0dff04c79074555373/src/Network/P2P/Message.hs
haskell
# LANGUAGE DeriveAnyClass # ------------------------------------------------------------------------------ Messages ------------------------------------------------------------------------------ ^ Index of the block desired ^ Which node is querying for the block ^ Block being sent to peer ^ Which process is sendin...
module Network.P2P.Message ( messagingProc , issueTransfer , mineBlock ) where import Protolude import Control.Distributed.Process ( Process , NodeId , getSelfNode , getSelfPid , send , nsendRemote , receiveWait , match , register , matchAny , say ) import Data.Binary (Binary) imp...
0641fc5525e09e8b82ede7c33e432d77dd0f28d0aa64452f49dfffad2deec359
scarvalhojr/haskellbook
Main.hs
module Main where import Control.Monad (forever) import Data.Char (toLower) import Data.Maybe (isJust) import Data.List (intersperse) import System.Exit (exitSuccess) import System.Random (randomRIO) import System.IO newtype WordList = WordList [String] deriving (Eq, Show) data Puzzle = Puzzle String [Maybe Char] [C...
null
https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter13/hangman/src/Main.hs
haskell
module Main where import Control.Monad (forever) import Data.Char (toLower) import Data.Maybe (isJust) import Data.List (intersperse) import System.Exit (exitSuccess) import System.Random (randomRIO) import System.IO newtype WordList = WordList [String] deriving (Eq, Show) data Puzzle = Puzzle String [Maybe Char] [C...
41f90e42acf8f0bba8bc03026a343b1d91652c21b0b5a00ebe6e87aa1eee1fe8
processone/tsung
rabbit_misc.erl
-module(rabbit_misc). -include("rabbit.hrl"). -include("rabbit_framing.hrl"). -export([method_record_type/1]). -export([amqp_error/4]). -export([frame_error/2]). -export([protocol_error/3, protocol_error/4, protocol_error/1]). method_record_type(Record) -> element(1, Record). amqp_error(Name, ExplanationFormat, ...
null
https://raw.githubusercontent.com/processone/tsung/e9babe2acfb4298e3b51bd56886561b052979884/src/lib/rabbit_misc.erl
erlang
-module(rabbit_misc). -include("rabbit.hrl"). -include("rabbit_framing.hrl"). -export([method_record_type/1]). -export([amqp_error/4]). -export([frame_error/2]). -export([protocol_error/3, protocol_error/4, protocol_error/1]). method_record_type(Record) -> element(1, Record). amqp_error(Name, ExplanationFormat, ...
8e463e03fa1293fd3aaa88863ed6ca1b2f263f0d4e1722d75b06a639b2a2f386
ygrek/mldonkey
syslog.ml
syslog(3 ) routines for ocaml This library is based on original syslog library as included in , with significant modifications by by < > . Copyright ( C ) 2002 < > Copyright ( C ) 2005 < > This library is free software ; you can redistribute it and/or modify it under ...
null
https://raw.githubusercontent.com/ygrek/mldonkey/333868a12bb6cd25fed49391dd2c3a767741cb51/src/utils/lib/syslog.ml
ocaml
* Flags to pass to openlog. [`LOG_CONS] isn't implemented yet. * The priority of the error. on error, attempt to reconnect
syslog(3 ) routines for ocaml This library is based on original syslog library as included in , with significant modifications by by < > . Copyright ( C ) 2002 < > Copyright ( C ) 2005 < > This library is free software ; you can redistribute it and/or modify it under ...
2f356b62bc534c1882f73c3e269fa01276ff1efdde45a849c2884cd31a615422
mistupv/cauder
prova.erl
-module(prova). -export([quad/1]). quad(N) -> provaMod:inc(N) * N.
null
https://raw.githubusercontent.com/mistupv/cauder/ff4955cca4b0aa6ae9d682e9f0532be188a5cc16/examples/prova.erl
erlang
-module(prova). -export([quad/1]). quad(N) -> provaMod:inc(N) * N.
9659c1258913cf677055d70973b96dd3d2a9c9e266d15efb3d0303d9fc7c9d00
jespercockx/agda2scheme
ToScheme.hs
module Agda.Compiler.ToScheme where import Prelude hiding ( null , empty ) import Agda.Compiler.Common import Agda.Compiler.Erase ( runE , erasable , getFunInfo ) import Agda.Compiler.ToTreeless import Agda.Compiler.Treeless.EliminateLiteralPatterns import Agda.Compiler.Treeless.Erase import Agda.Compiler.Treeless.Gu...
null
https://raw.githubusercontent.com/jespercockx/agda2scheme/165f3723d4dd99b5188f2c9ecacf9e931660e4a6/src/Agda/Compiler/ToScheme.hs
haskell
Bind each argument individually instead of all at once. Apply to each argument individually instead of all at once. Apply a function symbol of given arity and erasure info to a list of arguments, inserting lambdas or applications where needed to match the symbol's arity. TODO: put this in a separate file and impo...
module Agda.Compiler.ToScheme where import Prelude hiding ( null , empty ) import Agda.Compiler.Common import Agda.Compiler.Erase ( runE , erasable , getFunInfo ) import Agda.Compiler.ToTreeless import Agda.Compiler.Treeless.EliminateLiteralPatterns import Agda.Compiler.Treeless.Erase import Agda.Compiler.Treeless.Gu...
b60df4f6f9b3b032cea0e4106ba3c1d0b07b6426ec842b72de15ead83d19d377
metosin/reitit
pedestal_test.clj
(ns reitit.pedestal-test (:require [clojure.test :refer [deftest is testing]] [io.pedestal.http] [io.pedestal.test] [reitit.http :as http] [reitit.http.interceptors.exception :as exception] [reitit.pedestal :as pedestal])) (deftest arities-test (is (= #{0...
null
https://raw.githubusercontent.com/metosin/reitit/198cfda00d20093f3d7b3069e5e902835c396698/test/clj/reitit/pedestal_test.clj
clojure
(ns reitit.pedestal-test (:require [clojure.test :refer [deftest is testing]] [io.pedestal.http] [io.pedestal.test] [reitit.http :as http] [reitit.http.interceptors.exception :as exception] [reitit.pedestal :as pedestal])) (deftest arities-test (is (= #{0...
5bb02aaa26f79e99e17c3c0356c61f7642a76f72e938c99cc862eff3af100ba6
spacegangster/space-ui
icon_status.cljc
(ns space-ui.tiny.icon-status "Checkmark icon in CSS") (def style-rules [:.icon-status {:cursor :pointer :position :relative :width :100% :height :100% :color "hsl(0, 0%, 70%)"} [:&__dash1 :&__dash2 {:position :absolute :width :36% :border-top "2px solid" ...
null
https://raw.githubusercontent.com/spacegangster/space-ui/74825c904b6b456d845c3b3d669ce795b33f5ba9/src/space_ui/tiny/icon_status.cljc
clojure
(ns space-ui.tiny.icon-status "Checkmark icon in CSS") (def style-rules [:.icon-status {:cursor :pointer :position :relative :width :100% :height :100% :color "hsl(0, 0%, 70%)"} [:&__dash1 :&__dash2 {:position :absolute :width :36% :border-top "2px solid" ...
25eadd41814c54a8e5c5a9d51e1c48e358397b394a5f965e1a5b0bb49157c23a
NetworkVerification/nv
Var.mli
(* Program Variables *) type t [@@deriving show] val create : string -> t val fresh : string -> t val reset : unit -> unit val name : t -> string val to_var : string * int -> t val from_var : t -> string * int val to_string : t -> string val to_string_delim : string -> t -> string (* Inverse of to_string. Do not use...
null
https://raw.githubusercontent.com/NetworkVerification/nv/aa48abcd1bf9d4b7167cfe83a94b44e446a636e8/src/lib/datastructures/Var.mli
ocaml
Program Variables Inverse of to_string. Do not use for other values.
type t [@@deriving show] val create : string -> t val fresh : string -> t val reset : unit -> unit val name : t -> string val to_var : string * int -> t val from_var : t -> string * int val to_string : t -> string val to_string_delim : string -> t -> string val of_var_string : string -> t val equal : t -> t -> bool ...
00d5d30a3713d397ff0d624c78917b1eaaa1381549c4f270a865eea89b61d3ff
orionsbelt-battlegrounds/obb-rules
evaluator_test.cljc
(ns obb-rules.evaluator-test (:require [obb-rules.evaluator :as evaluator] [obb-rules.stash :as stash] [obb-rules.board :as board] [obb-rules.unit :as unit] [obb-rules.result :as result] [obb-rules.element :as element] [obb-rules.turn :as turn] ...
null
https://raw.githubusercontent.com/orionsbelt-battlegrounds/obb-rules/97fad6506eb81142f74f4722aca58b80d618bf45/test/obb_rules/evaluator_test.cljc
clojure
(ns obb-rules.evaluator-test (:require [obb-rules.evaluator :as evaluator] [obb-rules.stash :as stash] [obb-rules.board :as board] [obb-rules.unit :as unit] [obb-rules.result :as result] [obb-rules.element :as element] [obb-rules.turn :as turn] ...
60882310ac561b7e06a6c8b748b2b4c7177f1cc11c0d92915e73d7f0f6779693
tnelson/Forge
override-core.rkt
#lang forge/core (require (only-in rackunit check-exn)) (sig Parent #:abstract) (sig P1 #:extends Parent #:one) (sig P2 #:extends Parent #:one) (sig P3 #:extends Parent #:one) (sig Family #:abstract) (sig F1 #:extends Family #:one) (sig F2 #:extends Family #:one) (sig F3 #:extends Family #:one) (relation fp (Family...
null
https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/tests/forge-core/other/override-core.rkt
racket
Hopefully this test would fail if there were ever any issues left arity bigger than right arity left arity smaller than right arity Can't use ++ unless both arguments have the same types
#lang forge/core (require (only-in rackunit check-exn)) (sig Parent #:abstract) (sig P1 #:extends Parent #:one) (sig P2 #:extends Parent #:one) (sig P3 #:extends Parent #:one) (sig Family #:abstract) (sig F1 #:extends Family #:one) (sig F2 #:extends Family #:one) (sig F3 #:extends Family #:one) (relation fp (Family...
906d40947559f81d9964fd5244cf4a828a9cb21e87802de261c2670e4ec25190
reflex-frp/reflex-examples
Server.hs
{-# LANGUAGE OverloadedStrings #-} module Backend.Examples.WebSocketChat.Server where import Control.Concurrent (MVar, modifyMVar, modifyMVar_, readMVar) import Control.Exception (finally) import Control.Monad (forM_, forever) import D...
null
https://raw.githubusercontent.com/reflex-frp/reflex-examples/d238a419aad0e25083cb057262d0e30335449de1/backend/src/Backend/Examples/WebSocketChat/Server.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ forM_ clients $ \(_, conn) -> WS.sendTextData conn message Just (C2Sjoin txt) -> txt Just C2Sclose -> "close msg" ...
module Backend.Examples.WebSocketChat.Server where import Control.Concurrent (MVar, modifyMVar, modifyMVar_, readMVar) import Control.Exception (finally) import Control.Monad (forM_, forever) import Data.Aeson (encode, decode) ...
0c5c8d9785b9b856498b5fdaedd39f2175cf2bdece5dd89889e2946810d3fde6
ndmitchell/build-shootout
monad3-shake.hs
import Development.Shake main = shakeArgs shakeOptions $ do "output" %> \out -> do src <- readFileLines "list" need src cmd Shell "cat" src ">" [out] "list" %> \out -> do need ["source"] cmd Shell "sh monad3-run source -- list" "gen" %> \out -> do cmd Shell...
null
https://raw.githubusercontent.com/ndmitchell/build-shootout/40b2fd3804d89f8c7cf0a37b3a9d45a863be04ce/examples/monad3-shake.hs
haskell
import Development.Shake main = shakeArgs shakeOptions $ do "output" %> \out -> do src <- readFileLines "list" need src cmd Shell "cat" src ">" [out] "list" %> \out -> do need ["source"] cmd Shell "sh monad3-run source -- list" "gen" %> \out -> do cmd Shell...
cf845dcf8f709d36daba2a3ee16ee54982bc63dc375975166337968e9639d471
fulcrologic/fulcro-rad-datomic
datomic_common_spec.clj
(ns com.fulcrologic.rad.database-adapters.datomic-common-spec (:require [clojure.test :refer [use-fixtures]] [com.fulcrologic.fulcro.algorithms.tempid :as tempid] [com.fulcrologic.rad.attributes :as attr] [com.fulcrologic.rad.database-adapters.datomic-common :as common] [com.fulcrologic.rad.ids :a...
null
https://raw.githubusercontent.com/fulcrologic/fulcro-rad-datomic/cc8cc0edd001df97ad439fb589ea6c6a423f1df3/src/test/com/fulcrologic/rad/database_adapters/datomic_common_spec.clj
clojure
(ns com.fulcrologic.rad.database-adapters.datomic-common-spec (:require [clojure.test :refer [use-fixtures]] [com.fulcrologic.fulcro.algorithms.tempid :as tempid] [com.fulcrologic.rad.attributes :as attr] [com.fulcrologic.rad.database-adapters.datomic-common :as common] [com.fulcrologic.rad.ids :a...
df5f98c053b21a9b7b1ab4a1d92df4385e31fc11d6efa2c45c977ed200088767
gelisam/hyzzy
Commands.hs
-- Commands which are available in every room. # LANGUAGE MultiWayIf , OverloadedLabels , OverloadedStrings , RecordWildCards # module Commands where import Data.Generics.Labels () import Hyzzy.Command import Objects open :: Door -> Command open door = Command $ do DoorFields {..} <- getFields door if | doorLo...
null
https://raw.githubusercontent.com/gelisam/hyzzy/c5c861d5556ed3ca82fbb583d6928fac40d0d8df/games/castle/Commands.hs
haskell
Commands which are available in every room.
# LANGUAGE MultiWayIf , OverloadedLabels , OverloadedStrings , RecordWildCards # module Commands where import Data.Generics.Labels () import Hyzzy.Command import Objects open :: Door -> Command open door = Command $ do DoorFields {..} <- getFields door if | doorLocked -> display "It's locked." | doorOpene...
02e3902d2008ac0f330adb594fd4eabccaa45a3f5bcc3246e2deeb109eb3c8d2
mindpool/gambit-termite
data.scm
;;; Various mutable data structures implemented behind processes ;; (it would be "better" if those were implemented functionally) (define (data-make-process-name type) (string->symbol (string-append (symbol->string (thread-name (current-thread))) "-" (symbol->string type...
null
https://raw.githubusercontent.com/mindpool/gambit-termite/391b75253cc3a5abd77dfc29392a72b2eca0d09e/data.scm
scheme
Various mutable data structures implemented behind processes (it would be "better" if those were implemented functionally) ---------------------------------------------------------------------------- Cells or: (define-termite-type cell content) ---------------------------------------------------------------------...
(define (data-make-process-name type) (string->symbol (string-append (symbol->string (thread-name (current-thread))) "-" (symbol->string type)))) (define (make-cell #!key (name (data-make-process-name 'cell)) #!rest content) (spawn (lambda () ...
427059471c20ddd2dc62078f1d0be9f1bcb4e20f6bab2fa3fbd1dc64a7e8169a
seancorfield/honeysql
ops_test.cljc
copyright ( c ) 2023 , all rights reserved (ns honey.ops-test (:refer-clojure :exclude [format]) (:require [clojure.test :refer [deftest is]] [honey.sql :as sut] [honey.sql :as sql])) (deftest issue-454 (is (= ["SELECT a - b - c AS x"] (-> {:select [[[:- :a :b :c] :x]]} ...
null
https://raw.githubusercontent.com/seancorfield/honeysql/4a7c3631a6608436533506f629eafecfe00a16ee/test/honey/ops_test.cljc
clojure
copyright ( c ) 2023 , all rights reserved (ns honey.ops-test (:refer-clojure :exclude [format]) (:require [clojure.test :refer [deftest is]] [honey.sql :as sut] [honey.sql :as sql])) (deftest issue-454 (is (= ["SELECT a - b - c AS x"] (-> {:select [[[:- :a :b :c] :x]]} ...
274f033d5e13af57179aefff75bd89f0225f4285444b6ad4d3f95e48a9abf778
joearms/crypto_tutorial
ez_crypt.erl
-module(ez_crypt). -export([ aes_decrypt/2, aes_encrypt/2, bsize/1, decrypt_message/3, encrypt_message/2, file2sha/1, is_probably_prime/1, make_k_bit_prime/1, make_rsa_key/1, make_rsa_keyfiles/4, mod_pow/3, random_session_key/0, read_private_key/2, read_public_key/1, rsa_decrypt/2, rsa_...
null
https://raw.githubusercontent.com/joearms/crypto_tutorial/e487699017dbd102f67d18f466ff44445d10ba3e/src/ez_crypt.erl
erlang
compute N^P mod N END:make_rsa_keyfiles the file can be huge so read it in chunks END:filehash
-module(ez_crypt). -export([ aes_decrypt/2, aes_encrypt/2, bsize/1, decrypt_message/3, encrypt_message/2, file2sha/1, is_probably_prime/1, make_k_bit_prime/1, make_rsa_key/1, make_rsa_keyfiles/4, mod_pow/3, random_session_key/0, read_private_key/2, read_public_key/1, rsa_decrypt/2, rsa_...
2a24ffbe821822c0097a657a59623402bcca202425893ab8499fd1bcd0134449
justinethier/nugget
csi-boyer.scm
JAE - A version of the benchmark that runs directly from CHICKEN scheme : > BOYER -- Logic programming benchmark , originally written by . ;;; Fairly CONS intensive. (define (lookup key table) (let loop ((x table)) (if (null? x) #f (let ((pair (car x))) (if (eq? (car pair) key) ...
null
https://raw.githubusercontent.com/justinethier/nugget/0c4e3e9944684ea83191671d58b5c8c342f64343/benchmarks/csi-boyer.scm
scheme
Fairly CONS intensive.
JAE - A version of the benchmark that runs directly from CHICKEN scheme : > BOYER -- Logic programming benchmark , originally written by . (define (lookup key table) (let loop ((x table)) (if (null? x) #f (let ((pair (car x))) (if (eq? (car pair) key) pair (loop...
e1123e1d06431d5a42d0312672ee31ae19081044445a7b31a9954c516d048171
rorra/rorracasts_erlang
test.erl
-module(test). -compile(export_all). -vsn(1.1). -define(VERSION, v1_1). start() -> V1 = spawn(?MODULE, loop, []), register(?VERSION, V1), V1. loop() -> timer:sleep(2000), io:format("Version ~w~n", [?VERSION]), test:loop().
null
https://raw.githubusercontent.com/rorra/rorracasts_erlang/c50d20abe3f1a65001576734caedae90f36e3ecd/019-actualizacion-de-codigo/test.erl
erlang
-module(test). -compile(export_all). -vsn(1.1). -define(VERSION, v1_1). start() -> V1 = spawn(?MODULE, loop, []), register(?VERSION, V1), V1. loop() -> timer:sleep(2000), io:format("Version ~w~n", [?VERSION]), test:loop().
4f8943b8ff11b985950a41441f28fb11d888798fa82a059afcb1f3db32dcb05a
mikera/core.matrix
test_vectorz.clj
(ns clojure.core.matrix.test-vectorz (:require [clojure.core.matrix.impl.pprint :as pprint] [mikera.vectorz.matrix-api] [clojure.core.matrix.compliance-tester :as compliance] [clojure.core.matrix.stats :as stats] [clojure.core.matrix :refer :all] [clojure.te...
null
https://raw.githubusercontent.com/mikera/core.matrix/0a35f6e3d6d2335cb56f6f3e5744bfa1dd0390aa/src/test/clojure/clojure/core/matrix/test_vectorz.clj
clojure
this is useful to detect breaking changes early. TODO: fix issue with validate-shape (compliance/instance-test (array :vectorz 1))
(ns clojure.core.matrix.test-vectorz (:require [clojure.core.matrix.impl.pprint :as pprint] [mikera.vectorz.matrix-api] [clojure.core.matrix.compliance-tester :as compliance] [clojure.core.matrix.stats :as stats] [clojure.core.matrix :refer :all] [clojure.te...
f6fd9d3009892ed34a58fa50140bb0e8ef8425fe68e9f518ae5ce2a77e8e4785
AshleyYakeley/Truth
Sequence.hs
module Changes.Core.Sequence where import Changes.Core.Import newtype SequencePoint = MkSequencePoint { unSequencePoint :: Int64 } deriving (Eq, Ord, Num, Enum, Real, Integral) instance Show SequencePoint where show (MkSequencePoint i) = show i seqLength :: IsSequence seq => seq -> SequencePoint seqLeng...
null
https://raw.githubusercontent.com/AshleyYakeley/Truth/0b12f3b0ff68a8257f585ec239e1fa88eec45d1c/Changes/changes-core/lib/Changes/Core/Sequence.hs
haskell
module Changes.Core.Sequence where import Changes.Core.Import newtype SequencePoint = MkSequencePoint { unSequencePoint :: Int64 } deriving (Eq, Ord, Num, Enum, Real, Integral) instance Show SequencePoint where show (MkSequencePoint i) = show i seqLength :: IsSequence seq => seq -> SequencePoint seqLeng...
45fc6a5230c5756411b4c91745600a5c966c35638a87362def1c578c48055188
modular-macros/ocaml-macros
camlinternalFormat.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/stdlib/camlinternalFormat.ml
ocaml
************************************************************************ OCaml ...
, ENSTA Copyright 2014 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open CamlinternalFormatBasics type mutable_char_set = bytes let create_char_set () = Bytes.make 32 '\000...
ff6dc0738d914459a0a04bba12c377ecd8c4ccfc624416b831d95dc487ca2aa5
ghc/testsuite
tcfail009.hs
module ShouldFail where p = [(1::Int)..(2::Integer)]
null
https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail009.hs
haskell
module ShouldFail where p = [(1::Int)..(2::Integer)]
d2d01ea49fa97c091d55d33d3d603693fad9cc724459f3d88ba1d7c94555f35e
nominolo/lambdachine
Grin.hs
module Lambdachine.Grin where import Lambdachine.Utils import Lambdachine.Id -- These should become proper data types type Var = Id type Literal = Integer type DataCon = Var data Module = Module { moduleId :: ModuleId , moduleFuns :: [FunDef] , moduleCafs :: [(Var, Expr)] } deriving (Show, Eq) data ModuleId...
null
https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/compiler/Lambdachine/Grin.hs
haskell
These should become proper data types ^ Used to initialise mutually recursive nodes.
module Lambdachine.Grin where import Lambdachine.Utils import Lambdachine.Id type Var = Id type Literal = Integer type DataCon = Var data Module = Module { moduleId :: ModuleId , moduleFuns :: [FunDef] , moduleCafs :: [(Var, Expr)] } deriving (Show, Eq) data ModuleId = ModuleId { modulePackage :: String ...
3c13609c9e48661a63efac89125c31ce77b446abf50b149ea44981f845f27f61
xray-tech/xorc-xray
http_test.clj
(ns re.coeffect.http-test (:require [clojure.test :refer :all] [integrant.core :as ig] [re.test-utils :refer [with-system]])) (def config {:re.coeffect/http {:rpc (ig/ref :re/rpc)} :re/rpc {:topic "rpc.http" :encoder (fn [v] v)}}) (deftest basic (with-system [system config...
null
https://raw.githubusercontent.com/xray-tech/xorc-xray/ee1c841067207c5952473dc8fb1f0b7d237976cb/test/re/coeffect/http_test.clj
clojure
(ns re.coeffect.http-test (:require [clojure.test :refer :all] [integrant.core :as ig] [re.test-utils :refer [with-system]])) (def config {:re.coeffect/http {:rpc (ig/ref :re/rpc)} :re/rpc {:topic "rpc.http" :encoder (fn [v] v)}}) (deftest basic (with-system [system config...
a77b025f8d299621081133cbd14638ee370fd5c651bb66a9b6212e33f6697c3f
tweag/kernmantle
ExCli.hs
{-# LANGUAGE Arrows #-} # LANGUAGE OverloadedLabels # {-# LANGUAGE GADTs #-} # LANGUAGE TypeOperators # # LANGUAGE DataKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE FlexibleContexts # # LANGUAGE DeriveFunctor # -- | In this example, we show how to make an effect that can expose options it wants , then accumulate t...
null
https://raw.githubusercontent.com/tweag/kernmantle/19e018449f4fba68d383611a9d38a1b9e04e81ee/kernmantle/examples/ExCli.hs
haskell
# LANGUAGE Arrows # # LANGUAGE GADTs # # LANGUAGE RankNTypes # | In this example, we show how to make an effect that can expose options it optparse-applicative) which builds a pipeline. ^ Name ^ Docstring ^ Default value ^ Returns final value ^ File name ^ File name This demonstrates early failure: if age isn'...
# LANGUAGE OverloadedLabels # # LANGUAGE TypeOperators # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE DeriveFunctor # wants , then accumulate these options into a regular Parser ( from import Prelude hiding (id, (.)) import Control.Kernmantle.Rope import Control.Arrow import Control.Category im...
6b84e9caf6b660e71fd0380173133e916d635235d15ab885406cd1326770ed35
avsm/mirage-duniverse
syntaxerr.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/ppxlib/ast/syntaxerr.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1997 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Import open Format type error = Unclosed of Location.t * string * Location.t * string | Expe...
008114d36b1065d773f5aef1e27068bf28549a22c9b74ba78196c2327c67fb09
chenyukang/eopl
scheduler.scm
(define the-ready-queue 'uninitialized) (define the-final-answer 'uninitialized) (define the-max-time-slice 'uninitialized) (define the-time-remaining 'uninitialized) ;; initialize-scheduler! : Int -> Unspecified (define initialize-scheduler! (lambda (ticks) (set! the-ready-queue (empty-queue)) (se...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/ch5/base/scheduler.scm
scheme
initialize-scheduler! : Int -> Unspecified the final answer ;;;;;;;;;;;;;;;; place-on-ready-queue! : Thread -> Unspecified run-next-thread : () -> FinalAnswer set-final-answer! : ExpVal -> Unspecified time-expired? : () -> Bool decrement-timer! : () -> Unspecified
(define the-ready-queue 'uninitialized) (define the-final-answer 'uninitialized) (define the-max-time-slice 'uninitialized) (define the-time-remaining 'uninitialized) (define initialize-scheduler! (lambda (ticks) (set! the-ready-queue (empty-queue)) (set! the-final-answer 'uninitialized) (set! ...
06861252140d9c0a6bb389a5ba9ac4507c45fed24f671a33326917dc86945ff7
beamparticle/beamparticle
beamparticle_git_util.erl
%%%------------------------------------------------------------------- @author neerajsharma ( C ) 2017 , < > %%% @doc %%% %%% The inspiration for implementation of these utility functions is %%% as follows: %%% %%% %%% * -scm.com/docs/git-status#_short_format %%% * -ide/dugite-extra/blob/master/src/command/ %%%...
null
https://raw.githubusercontent.com/beamparticle/beamparticle/65dcea1569d06b331b08cd9f8018ece4b176b690/src/beamparticle_git_util.erl
erlang
------------------------------------------------------------------- @doc The inspiration for implementation of these utility functions is as follows: * -scm.com/docs/git-status#_short_format * -ide/dugite-extra/blob/master/src/command/ @end %CopyrightBegin% you may not use this file except in compliance...
@author neerajsharma ( C ) 2017 , < > Copyright < > 2017 . 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(beamparticle_git_util). -export([parse_git_status/1, parse_git_...
3ebf5ca07d25e5054bf796ef97dabdb300c0048a1aecddee9cc7fd427c09e00e
pariyatti/kosa
mobile.clj
(ns kosa.layouts.mobile (:require [hiccup.page :as h] [kosa.layouts.shared.flash :as flash] [kosa.layouts.shared.footer :as footer] [kosa.layouts.shared.head :as head] [kosa.layouts.shared.header :as header])) (defn app [req title & content] IANA can not use 3 - char...
null
https://raw.githubusercontent.com/pariyatti/kosa/7dd37d60ba390f06e37b9bb34ed3c069891ab24a/src/kosa/layouts/mobile.clj
clojure
-subtag-registry/language-subtag-registry TODO: pass a flash map
(ns kosa.layouts.mobile (:require [hiccup.page :as h] [kosa.layouts.shared.flash :as flash] [kosa.layouts.shared.footer :as footer] [kosa.layouts.shared.head :as head] [kosa.layouts.shared.header :as header])) (defn app [req title & content] IANA can not use 3 - char...
d7bdc64ee2abb8743c905fd5c5cd4ef12ead4cc2c15b70811f0a1d7567aaf559
bravit/hid-examples
Main.hs
# LANGUAGE QuasiQuotes # module Main where import Str verse :: String verse = [str|What needs my Shakespeare for his honoured bones, The labor of an age in pilèd stones, Or that his hallowed relics should be hid Under a star-ypointing pyramid? Dear son of Memory, great heir of fame, What need’st thou such weak witnes...
null
https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/ch12/th/mstr-lits/Main.hs
haskell
# LANGUAGE QuasiQuotes # module Main where import Str verse :: String verse = [str|What needs my Shakespeare for his honoured bones, The labor of an age in pilèd stones, Or that his hallowed relics should be hid Under a star-ypointing pyramid? Dear son of Memory, great heir of fame, What need’st thou such weak witnes...
8c114460a061ca85573f90a28d26622fe9252108c7ff4a5a1abfec1b5dd6fa72
helpshift/hydrox
numbers_test.clj
(ns hydrox.doc.link.numbers-test (:use midje.sweet) (:require [hydrox.doc.link.numbers :refer :all])) ^{:refer hydrox.doc.link.numbers/increment :added "0.1"} (fact "increments a string for alphanumerics and numbers" (increment "1") => "2" (increment "A") => "B") ^{:refer hydrox.doc.link.numbers/link-n...
null
https://raw.githubusercontent.com/helpshift/hydrox/2beb3c56fad43bbf16f07db7ee72c5862978350c/test/hydrox/doc/link/numbers_test.clj
clojure
(ns hydrox.doc.link.numbers-test (:use midje.sweet) (:require [hydrox.doc.link.numbers :refer :all])) ^{:refer hydrox.doc.link.numbers/increment :added "0.1"} (fact "increments a string for alphanumerics and numbers" (increment "1") => "2" (increment "A") => "B") ^{:refer hydrox.doc.link.numbers/link-n...
bbca20ae2473f197410fab2b7a8b60c12d782c5afcce001e103cf437a36e855a
basho/machi
machi_projection_store_test.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2007 - 2015 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You...
null
https://raw.githubusercontent.com/basho/machi/e87bd59a9777d805b00f9e9981467eb28e28390c/test/machi_projection_store_test.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2007 - 2015 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY ...
984b329878129870f0b9121e67297c55d963db7b6166d1fb68e107256695bec9
ml4tp/tcoq
wg_Command.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/ide/wg_Command.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 **********************************************************************
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * class command_window : string...