_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
afbeac18cb4ba69c89a9871fe07f5ca10c3d4939462f3c62b957aeaf5ccad794
brendanhay/gogol
ListDocuments.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-firestore/gen/Gogol/FireStore/Projects/Databases/Documents/ListDocuments.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Lists documents. /See:/ < Cloud Firestore API Reference> for @firestore.projects.databases.documents.listDocuments@. * Resource ** Constructing a Request 'FireStoreProjectsDatabasesDocumentsListDocuments' request conforms to....
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
4ca4eea1f17a531baf5ed5ad171234f7fc41d0d4dca53f30c3befa5de00adb5b
tanakh/optparse-declarative
Declarative.hs
# LANGUAGE CPP # {-# LANGUAGE DataKinds #-} {-# LANGUAGE DefaultSignatures #-} # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNe...
null
https://raw.githubusercontent.com/tanakh/optparse-declarative/bad96bdfc643cc07cc1bcc455a327efb0c80a4eb/src/Options/Declarative.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE DefaultSignatures # # LANGUAGE GADTs # # LANGUAGE MultiWayIf # # LANGUAGE PolyKinds # # LANGUAGE RankNTypes # # LANGUAGE TypeOperators # | Declarative options parser * Command...
# LANGUAGE CPP # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE KindSignatures # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections ...
5307a7823020fdb9c817fd74cb89e6a7ecf03df7fab240365a832272d7ba946d
tomjridge/imp_fs
v3_live_object_cache.ml
* Live object cache . A cache of " live " objects . Expunging an object may take some time . Resurrecting an object may take some time . We use reference counting to prevent objects from being expunged while references remain live . We are maintaining a cache of objects by i d. We can maintain the ...
null
https://raw.githubusercontent.com/tomjridge/imp_fs/39314764df2277f4d3fa76b06a2054aac8fcdbcf/src_v3/v3_live_object_cache.ml
ocaml
* backing counter Add a finalizer to ensure that the obj is not GC'ed in valid state * resurrect: slow operation to resurrect an object from a persistent store; finalise:called when removing objects from the cache; no outstanding references remain; as such, the object should certainly not be locked ...
* Live object cache . A cache of " live " objects . Expunging an object may take some time . Resurrecting an object may take some time . We use reference counting to prevent objects from being expunged while references remain live . We are maintaining a cache of objects by i d. We can maintain the ...
a869b56f5222d3ecc681b6a214056a9c8e677e92342f35e2f85c10dea5f5522c
inaka/elvis_core
pass_max_function_arity_elvis_attr.erl
-module(pass_max_function_arity_elvis_attr). -export([f/10]). -elvis([{elvis_style, max_function_arity, #{ max_arity => 10 }}]). f(X1, X2, X3, X4, X5, X6, X7, X8, X9, X0) -> {X1, X2, X3, X4, X5, X6, X7, X8, X9, X0}.
null
https://raw.githubusercontent.com/inaka/elvis_core/96a461f399545065524907d6f53d432fbe0ce16b/test/examples/pass_max_function_arity_elvis_attr.erl
erlang
-module(pass_max_function_arity_elvis_attr). -export([f/10]). -elvis([{elvis_style, max_function_arity, #{ max_arity => 10 }}]). f(X1, X2, X3, X4, X5, X6, X7, X8, X9, X0) -> {X1, X2, X3, X4, X5, X6, X7, X8, X9, X0}.
b1c870059d400a02300eba18fe37b64a3f90bba3dac7ab4e06ac8297fc71bb6d
bennn/forth
exit.rkt
#lang forth 2 2 2 + 2 EXIT + +
null
https://raw.githubusercontent.com/bennn/forth/2e9247b1b8c28402d0eecfc3fb97e805e3074255/examples/exit.rkt
racket
#lang forth 2 2 2 + 2 EXIT + +
39d20789d072b694a7823c9a20df911c1899c12427fd8c861f077e8877a4bafb
FreeProving/free-compiler
Queue.hs
module Queue.WithPatternMatching.Queue where import Queue.WithPatternMatching.Util type Queue a = [a] empty :: Queue a empty = [] isEmpty :: Queue a -> Bool isEmpty q = null q front :: Queue a -> a front (x : q) = x add :: a -> Queue a -> Queue a add x q = q `append` [x]
null
https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/example/Queue/WithPatternMatching/Queue.hs
haskell
module Queue.WithPatternMatching.Queue where import Queue.WithPatternMatching.Util type Queue a = [a] empty :: Queue a empty = [] isEmpty :: Queue a -> Bool isEmpty q = null q front :: Queue a -> a front (x : q) = x add :: a -> Queue a -> Queue a add x q = q `append` [x]
985ff076dd7d40f0071a5ff8eaa560c03ee93c8d750003b4fa63c91790857ecf
emqx/emqx
emqx_persistent_session_gc.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/src/persistent_session/emqx_persistent_session_gc.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2021 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_persistent_session_gc). -behaviour(gen_server). -include("emqx_persistent_session....
dd2616839cce2b7f785b7e6a9286fd89cf512a7f60083428e503ef0bde704780
zkincaid/duet
core.ml
* Core contains the core type definitions and conversion functions used by our internal representations , including the type [ ap ] of access paths and [ expr ] of expressions . Further operations on expr can be found in [ ] . our internal representations, including the type [ap] of access path...
null
https://raw.githubusercontent.com/zkincaid/duet/eb3dbfe6c51d5e1a11cb39ab8f70584aaaa309f9/duet/core.ml
ocaml
* Record containing the information of enumeration * Concrete type (any type that is not a named type * A function type consists of a return type and a list of parameter types. * A default type for values that cannot be assigned a static type, or whose static type ...
* Core contains the core type definitions and conversion functions used by our internal representations , including the type [ ap ] of access paths and [ expr ] of expressions . Further operations on expr can be found in [ ] . our internal representations, including the type [ap] of access path...
45cd5c5a9b8465e169b70588bebe865cf864397e407c6bc5e8e9b2a1d5881cb7
manuel-serrano/hop
js_parser.scm
;*=====================================================================*/ * Author : * / * Copyright : 2007 - 16 , see LICENSE file * / ;* ------------------------------------------------------------- */ * This file is part of Scheme2Js . ...
null
https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/scheme2js/js_parser.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * */ * but WITHOUT ANY WARRANTY; without even the implied warranty of */ * MERCHANTABILITY or FITNE...
* Author : * / * Copyright : 2007 - 16 , see LICENSE file * / * This file is part of Scheme2Js . * / * Scheme2Js is distributed in the hope that it will be useful , * / (module js-parser (import js-no...
88b328f45f46ce0e58e9a261d6eb4e6302f8a592ede39d6df395004006a92542
scalaris-team/scalaris
prime.erl
2012 - 2014 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/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/prime.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...
2012 - 2014 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 < > @reference 2009 - < em > The Genuine Sieve of Eratosthenes < /em > Journal of Functional P...
61b163e9745c5645acf27d08c132b512a44ed909d51fc452b749c3ea73b080e4
Clozure/ccl
system.lisp
(in-package :ccl) (defparameter *easygui-pathname* (or *load-pathname* *loading-file-source-file*)) (defvar *easygui-files* '("package" "new-cocoa-bindings" "events" "rgb" "views" "action-targets" "dialogs")) (defvar *easygui-examples* '("tiny" "currency-converter" "view-hierarch...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/examples/cocoa/easygui/system.lisp
lisp
(in-package :ccl) (defparameter *easygui-pathname* (or *load-pathname* *loading-file-source-file*)) (defvar *easygui-files* '("package" "new-cocoa-bindings" "events" "rgb" "views" "action-targets" "dialogs")) (defvar *easygui-examples* '("tiny" "currency-converter" "view-hierarch...
06471c607bf434047c00100bbf9b6a56cab22068ddbaafd8df1c2802f5aee5f7
eponai/sulolive
core.cljs
(ns sulo-native.ios.core (:require [om.next :as om :refer-macros [defui]] [re-natal.support :as sup] [sulo-native.state :as state])) (set! js/window.React (js/require "react")) (def ReactNative (js/require "react-native")) (defn create-element [rn-comp opts & children] (apply js/React....
null
https://raw.githubusercontent.com/eponai/sulolive/7a70701bbd3df6bbb92682679dcedb53f8822c18/sulo-native/src/sulo_native/ios/core.cljs
clojure
(ns sulo-native.ios.core (:require [om.next :as om :refer-macros [defui]] [re-natal.support :as sup] [sulo-native.state :as state])) (set! js/window.React (js/require "react")) (def ReactNative (js/require "react-native")) (defn create-element [rn-comp opts & children] (apply js/React....
532882e7092a7fd13271fa3b82d635755804a52632a17c634cc6fa3fab22e964
patoline/patoline
pa_convert.ml
open Earley_core open Earley open Earley_ocaml open Pa_ocaml_prelude #define LOCATE locate module Ext = functor(In:Extension) -> struct include In FIXME use Blanks.line_comments . Blank function let blank str pos = let rec fn state ((str, pos) as cur) = let (c, str', pos') = Input.read str pos in let n...
null
https://raw.githubusercontent.com/patoline/patoline/3dcd41fdff64895d795d4a78baa27d572b161081/unicodelib/pa_convert.ml
ocaml
Single mapping parser Creating and running the extension
open Earley_core open Earley open Earley_ocaml open Pa_ocaml_prelude #define LOCATE locate module Ext = functor(In:Extension) -> struct include In FIXME use Blanks.line_comments . Blank function let blank str pos = let rec fn state ((str, pos) as cur) = let (c, str', pos') = Input.read str pos in let n...
53df1d191094910b5fff3a661cbffac3285e362fcf7496f691b1d715aa84ae51
scrintal/heroicons-reagent
chart_bar_square.cljs
(ns com.scrintal.heroicons.mini.chart-bar-square) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M4.25 2A2.25 2.25 0 002 4.25v11.5A2.25 2.25 0 004.25 18h11.5A2.25 2.25 0 0...
null
https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/mini/chart_bar_square.cljs
clojure
(ns com.scrintal.heroicons.mini.chart-bar-square) (defn render [] [:svg {:xmlns "" :viewBox "0 0 20 20" :fill "currentColor" :aria-hidden "true"} [:path {:fillRule "evenodd" :d "M4.25 2A2.25 2.25 0 002 4.25v11.5A2.25 2.25 0 004.25 18h11.5A2.25 2.25 0 0...
89380256a86a9546515ae592e594462a9c366e840140c94d21b3c7974485c470
huangjs/cl
trans2.lisp
-*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; The data in this file contains enhancments. ;;;;; ;;; ;;;;; ...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/trans2.lisp
lisp
Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; The data in this file contains enhancments. ;;;;; ;;;;; ; ; ; ; All rights reserved ;;;;; Please ...
(in-package :maxima) (macsyma-module trans2) (transl-module trans2) (def%tr $random (form) `($fixnum . ($random ,@(tr-args (cdr form))))) (def%tr mequal (form) `($any . (simplify (list '(mequal) ,@(tr-args (cdr form)))))) (def%tr mcall (form) (setq form (cdr form)) (let ((mode (cond ((atom (car form)) ...
d5a5427b64e4bc47e62ac0ae8c14b7bf93c9cc59eda47738f8dad291e1f9719d
lpw25/ocaml-typed-effects
datarepr.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/lpw25/ocaml-typed-effects/79ea08b285c1fd9caf3f5a4d2aa112877f882bea/typing/datarepr.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . Compute constructor and label descrip...
92277158cb4548e8e6abd03f571bf4830db1ed62ac744e823f88ea44394ee332
pink-gorilla/goldly
system.cljs
(ns goldly.component.type.system (:require [taoensso.timbre :as timbre :refer-macros [debugf infof errorf]] [goldly.component.ui :refer [render-component]] [goldly.system.sci :refer [render-system]])) (defmethod render-component :system [{:keys [id data args]}] (let [{:keys [fns-clj cljs]} @data {...
null
https://raw.githubusercontent.com/pink-gorilla/goldly/a942f29378e51da5725989ba017bac5a61e7fe54/src-unused/system/goldly/component/type/system.cljs
clojure
(ns goldly.component.type.system (:require [taoensso.timbre :as timbre :refer-macros [debugf infof errorf]] [goldly.component.ui :refer [render-component]] [goldly.system.sci :refer [render-system]])) (defmethod render-component :system [{:keys [id data args]}] (let [{:keys [fns-clj cljs]} @data {...
95c66daad96f819cf5d8fdc26755453a274c8b5197396c663e5fb871672ac48b
typelead/intellij-eta
Hello00001.hs
main = print "Hello, World!"
null
https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/test/resources/fixtures/eta/sources/Hello00001.hs
haskell
main = print "Hello, World!"
2f123b825cd4195994bb0cf0d8633dd84cd6c1b17c3857c1452f06eef26c5964
Clozure/ccl
splay-tree.lisp
-*-Mode : LISP ; Package : CCL -*- ;;; Copyright 2003 - 2009 Clozure Associates ;;; 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 appli...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/library/splay-tree.lisp
lisp
Package : CCL -*- 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 la...
Copyright 2003 - 2009 Clozure Associates distributed under the License is distributed on an " AS IS " BASIS , (in-package "CCL") A ( partial ) implementation of SPLAY - TREEs , which are binary trees (defstruct (tree-node (:constructor make-tree-node (key value))) key value the child < this...
9b31dfe38f92bdc4f650681df6dcf7bc9938c808a5255fcb9324bdfc9d9f433b
KULeuven-CS/CPL
CALL-BY-NEED.rkt
#lang eopl (require "syntax.rkt") ;(require "store.rkt") (require "../EXPLICIT-REFS/store.rkt") (provide (all-defined-out)) Semantics (define-datatype expval expval? (num-val (value number?)) (bool-val (boolean boolean?)) (proc-val (proc proc?)) ) ;; proc? : SchemeVal -> Bool ;; procedure : Var * ...
null
https://raw.githubusercontent.com/KULeuven-CS/CPL/0c62cca832edc43218ac63c4e8233e3c3f05d20a/chapter4/CALL-BY-NEED/CALL-BY-NEED.rkt
racket
(require "store.rkt") proc? : SchemeVal -> Bool procedure : Var * Exp * Env -> Proc expval->num : ExpVal -> Int expval->bool : ExpVal -> Bool expval->proc : ExpVal -> Proc Environments new for implicit-refs apply-env: Env x Var -> Ref n : (maybe int) location : Sym * Listof(Sym) -> Maybe(Int) else (locatio...
#lang eopl (require "syntax.rkt") (require "../EXPLICIT-REFS/store.rkt") (provide (all-defined-out)) Semantics (define-datatype expval expval? (num-val (value number?)) (bool-val (boolean boolean?)) (proc-val (proc proc?)) ) (define-datatype proc proc? (procedure (var symbol?) (body expres...
5bee3e8bb258ec91892cf9616ff1608e55c3eeeae7d68f233477cdf512ca85b5
myaosato/clcm
inlines.lisp
(defpackage :clcm/inlines/inlines (:use :cl :clcm/utils :clcm/raw-html-regex :clcm/characters :clcm/inlines/parser :clcm/inlines/backslash-escape :clcm/inlines/character-references :clcm/inlines/code-span :clcm/inlines/special-characters :clcm/in...
null
https://raw.githubusercontent.com/myaosato/clcm/fd0390bedf00c5be3f5c2eb8176ff73bede797b0/src/inlines/inlines.lisp
lisp
api only < -> &lt; > -> &gt; & -> &amp; " -> &quot; main functions
(defpackage :clcm/inlines/inlines (:use :cl :clcm/utils :clcm/raw-html-regex :clcm/characters :clcm/inlines/parser :clcm/inlines/backslash-escape :clcm/inlines/character-references :clcm/inlines/code-span :clcm/inlines/special-characters :clcm/in...
7ee06e05478279a36537ab7fd8af341ee9228ad1a5af490b94e32113e2151834
gwkkwg/metatilities
package.lisp
(in-package #:common-lisp-user) (defpackage #:metatilities-base-test (:use #:common-lisp #:lift #:metatilities) (:import-from #:metatilities #:*automatic-slot-accessors?* #:*automatic-slot-initargs?* #:*prune-unknown-slot-options*))
null
https://raw.githubusercontent.com/gwkkwg/metatilities/82e13df0545d0e47ae535ea35c5c99dd3a44e69e/tests/unit-tests/package.lisp
lisp
(in-package #:common-lisp-user) (defpackage #:metatilities-base-test (:use #:common-lisp #:lift #:metatilities) (:import-from #:metatilities #:*automatic-slot-accessors?* #:*automatic-slot-initargs?* #:*prune-unknown-slot-options*))
a46662364b7645c72600431e39fef68df0906244961ded1ccf2a0e13e7283d70
ruhler/smten
STP.hs
# LANGUAGE NoImplicitPrelude # | This module provides the STP backend for smten . module Smten.Search.Solver.STP (stp) where import Smten.Plugin.Annotations import Smten.Prelude import Smten.Search.Prim # ANN module PrimitiveModule # | The STP smten solver stp :: Solver stp = primitive "Smten.Search.Solver.STP....
null
https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-stp/Smten/Search/Solver/STP.hs
haskell
# LANGUAGE NoImplicitPrelude # | This module provides the STP backend for smten . module Smten.Search.Solver.STP (stp) where import Smten.Plugin.Annotations import Smten.Prelude import Smten.Search.Prim # ANN module PrimitiveModule # | The STP smten solver stp :: Solver stp = primitive "Smten.Search.Solver.STP....
078b91e8552c4febd841a6455984d92540e67a73fda1b26387bb1ced30bbec70
gelisam/frp-zoo
Main.hs
module Main where import Control.Applicative import Control.DysFRP import Graphics.Gloss.Interface.IO.Game hiding (Event) import Buttons import GlossInterface Utilities if_then_else :: Bool -> a -> a -> a if_then_else True t _ = t if_then_else False _ f = f replaceWith :: a -> Event b -> Event a replaceWith = ...
null
https://raw.githubusercontent.com/gelisam/frp-zoo/1a1704e4294b17a1c6e4b417a73e61216bad2321/DysFRP-example/Main.hs
haskell
FRP network Part 1: static version scenario 0: new counter created each time Input Gloss event loop
module Main where import Control.Applicative import Control.DysFRP import Graphics.Gloss.Interface.IO.Game hiding (Event) import Buttons import GlossInterface Utilities if_then_else :: Bool -> a -> a -> a if_then_else True t _ = t if_then_else False _ f = f replaceWith :: a -> Event b -> Event a replaceWith = ...
69ad1a4d85311a828a36aa94e9110ec2b4022d31872b92bbb2ea65004738f37e
05st/artemis
BuiltIn.hs
module BuiltIn (defTEnv, defEnv) where import Data.Functor import qualified Data.Set as Set import qualified Data.Map as Map import Data.Char import Data.Time import Data.Time.Clock.POSIX import System.IO import Type import Value import Name -- Built-in functions, type checker guarantees that these patterns are mat...
null
https://raw.githubusercontent.com/05st/artemis/4d329a8e221076678a44fa29913a59892bb1b2ab/src/BuiltIn.hs
haskell
Built-in functions, type checker guarantees that these patterns are matched Helper function
module BuiltIn (defTEnv, defEnv) where import Data.Functor import qualified Data.Set as Set import qualified Data.Map as Map import Data.Char import Data.Time import Data.Time.Clock.POSIX import System.IO import Type import Value import Name addInt [VInt a, VInt b] = return $ VInt (a + b) subInt [VInt a, VInt b] = ...
d2134f61709eee37acd602c16cb1fc1cf13c477fcb4b1fcee629c52fd4f751f7
bzliu94/cs61a_fa07
lab3.scm
(define (substitute sent old_wd new_wd) (substitute-helper () sent old_wd new_wd)) (define (substitute-helper next_sent sent old_wd new_wd) (if (empty? sent) next_sent (let ((curr_wd (first sent))) (let ((substituted_curr_wd (get-next-word curr_wd old_wd new_wd))) (let ((next_next_sent (sentence ne...
null
https://raw.githubusercontent.com/bzliu94/cs61a_fa07/12a62689f149ef035a36b326351928928f6e7b5d/02%20-%20labs/lab3/lab3.scm
scheme
return type is function f - value or function taking any number of arguments (f) - function taking no arguments ((f)) - function taking no argument that returns a function taking no argument ((t (t 1+)) 0) = ((t (lambda (x) (1+ (1+ (1+ x))))) 0) = ((lambda (y) (lambda (x) (1+ (1+ (1+ y))))) ((lambda (y) (lam...
(define (substitute sent old_wd new_wd) (substitute-helper () sent old_wd new_wd)) (define (substitute-helper next_sent sent old_wd new_wd) (if (empty? sent) next_sent (let ((curr_wd (first sent))) (let ((substituted_curr_wd (get-next-word curr_wd old_wd new_wd))) (let ((next_next_sent (sentence ne...
8510e41753c43ff4d686ab21efbe7d24169946ac74cf69a0799b2e9661f88b37
kadena-io/chainweaver
Api.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} module Common.Api where import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Data.Text.Encoding.Error as T import Obelisk.Configs -- | Where to find the network list configuration, under config/co...
null
https://raw.githubusercontent.com/kadena-io/chainweaver/3ea0bb317c07ddf954d4ebf24b33d1be7d5f9c45/common/src/Common/Api.hs
haskell
# LANGUAGE OverloadedStrings # | Where to find the network list configuration, under config/common | Get "config/common/route" normalized.
# LANGUAGE LambdaCase # module Common.Api where import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Encoding as T import qualified Data.Text.Encoding.Error as T import Obelisk.Configs verificationServerPath :: Text verificationServerPath = "common/verification-server" | Get the nor...
2923b1c8f9d4be3b3590c440cec97e7c10ca6f63ea82bc444fd8b18be6b734b6
emqx/quic
example_server_stream.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2022 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the L...
null
https://raw.githubusercontent.com/emqx/quic/dc4746944acbc3f93572baebea5ff25071f2e09b/test/example_server_stream.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2022 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(example_server_stream). -behavior(quicer_stream). -export([ init_handoff/4 , post_hand...
33ef45b72a7fb6d60e61bc48d76ac6f1ef20743c87d7f7ef8c6e599f3878cd8b
EligiusSantori/L2Apf
my_target_selected.scm
(module system racket/base (require "../../packet.scm") (provide game-server-packet/my-target-selected) (define (game-server-packet/my-target-selected buffer) (let ((s (open-input-bytes buffer))) (list (cons 'id (read-byte s)) (cons 'target-id (read-int32 #f s)) (cons 'color (read-int16 #f...
null
https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/packet/game/server/my_target_selected.scm
scheme
(module system racket/base (require "../../packet.scm") (provide game-server-packet/my-target-selected) (define (game-server-packet/my-target-selected buffer) (let ((s (open-input-bytes buffer))) (list (cons 'id (read-byte s)) (cons 'target-id (read-int32 #f s)) (cons 'color (read-int16 #f...
24bb974ddf1a18fb49d23e73b539de72a940c75d965a472fe489bae38d96a229
CodyReichert/qi
utsname.lisp
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*- ;;; ;;; utsname.lisp --- Grovel definitions for uname(3). ;;; Copyright ( C ) 2007 , ;;; ;;; Permission is hereby granted, free of charge, to any person ;;; obtaining a copy of this software and associated documentation files ( the " Software " ) , to deal in the...
null
https://raw.githubusercontent.com/CodyReichert/qi/9cf6d31f40e19f4a7f60891ef7c8c0381ccac66f/dependencies/trivial-features-latest/tests/utsname.lisp
lisp
-*- Mode: lisp; indent-tabs-mode: nil -*- utsname.lisp --- Grovel definitions for uname(3). Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distr...
Copyright ( C ) 2007 , files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , (in-package :trivial-f...
cc1c3610eb6044052e2f2e80b02cabb342fd2181216934169fda54c913684a75
tsloughter/kuberl
kuberl_v1_object_meta.erl
-module(kuberl_v1_object_meta). -export([encode/1]). -export_type([kuberl_v1_object_meta/0]). -type kuberl_v1_object_meta() :: #{ 'annotations' => maps:map(), 'clusterName' => binary(), 'creationTimestamp' => kuberl_date_time:kuberl_date_time(), 'deletionGracePeriodSeconds' => integer(), ...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_object_meta.erl
erlang
-module(kuberl_v1_object_meta). -export([encode/1]). -export_type([kuberl_v1_object_meta/0]). -type kuberl_v1_object_meta() :: #{ 'annotations' => maps:map(), 'clusterName' => binary(), 'creationTimestamp' => kuberl_date_time:kuberl_date_time(), 'deletionGracePeriodSeconds' => integer(), ...
64fca26f9256641f1e6a00b2ee9f90d80623c564a8540026c0513d540ae8a28e
NashFP/bowling
bowling.erl
Erlang Bowling game scorer % % Expects a list of scores as input, generates game score as output. -module(bowling). -export([score/1, strike/2, spare/2]). % specials: Strike : current + next two balls Spare : current + next one ball score([]) -> 0; score([[N1,N2,N3]]) when N1 =:= 10 -> N1 + N2 + N3; %fin...
null
https://raw.githubusercontent.com/NashFP/bowling/d7829668fc221784528019796cc33011b1c65a2d/robhardin%2Berlang/bowling.erl
erlang
Expects a list of scores as input, generates game score as output. specials: final frame final frame
Erlang Bowling game scorer -module(bowling). -export([score/1, strike/2, spare/2]). Strike : current + next two balls Spare : current + next one ball score([]) -> 0; score([[N1,N2,N3]]) when N1 =:= 10 -> score([[N1,N2]|L]) when N1 =:= 10 -> strike([N1,N2], L) + score(L); score([[N1,N2]|L]) when N1 + N2 =...
a0c45fee72338d08c0e25efaf2a49bab6a3efeb442a2cf8c53c617bf9516c535
nasa/Common-Metadata-Repository
subscriptions_test.clj
(ns cmr.system-int-test.bootstrap.bulk-index.subscriptions-test "Integration test for CMR bulk index subscription operations." (:require [cmr.system-int-test.data2.umm-spec-collection :as data-umm-c] [clojure.test :refer :all] [cmr.mock-echo.client.echo-util :as echo-util] [cmr.system-int-test.bootstrap...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/0e64f0edcef65742c05b6ccf3da4d5c5586e814b/system-int-test/test/cmr/system_int_test/bootstrap/bulk_index/subscriptions_test.clj
clojure
Fixtures Tests The following is saved, but not indexed due to the above call and this subscription won't be indexed as a result of indexing subscriptions of PROV1 no index, no hits. bulk index again, using system token, all the subscriptions in PROV1 should be indexed. The following are saved, but not indexe...
(ns cmr.system-int-test.bootstrap.bulk-index.subscriptions-test "Integration test for CMR bulk index subscription operations." (:require [cmr.system-int-test.data2.umm-spec-collection :as data-umm-c] [clojure.test :refer :all] [cmr.mock-echo.client.echo-util :as echo-util] [cmr.system-int-test.bootstrap...
c5da95074c3d814d1b3f05a70035c911c49bcc052daffe9a397805b125827890
static-analysis-engineering/codehawk
jCHSystemUtils.mli
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) ...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchsys/jCHSystemUtils.mli
ocaml
jchlib jchpre
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) ...
372b8eee8a564cf8d4bb8485945dbb9f97e9282b2d9528b338098180a44ca805
Oblosys/proxima
Parser.hs
module Parser where import Data.Maybe import UU.Parsing import UU.Parsing.Machine(RealParser(..),RealRecogn(..),anaDynE,mkPR) import ConcreteSyntax import CommonTypes import Patterns import UU.Pretty(text,PP_Doc,empty,(>-<)) import TokenDef import List (intersperse) import Char import Scanner (Input(..),scanLit,input) ...
null
https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/uuagc/src/Parser.hs
haskell
Insertion is expensive for pCodeBlock in order to prevent infinite inserts. if the type is within some kind of parentheses or brackets (then we allow lowercase identifiers as well)
module Parser where import Data.Maybe import UU.Parsing import UU.Parsing.Machine(RealParser(..),RealRecogn(..),anaDynE,mkPR) import ConcreteSyntax import CommonTypes import Patterns import UU.Pretty(text,PP_Doc,empty,(>-<)) import TokenDef import List (intersperse) import Char import Scanner (Input(..),scanLit,input) ...
4e8b913797d97b84c7631a8f7ad8bafd2de0773cffc10abc9f77d99fc91fdaf0
music-suite/music-suite
StaffNumber.hs
# LANGUAGE DefaultSignatures # # OPTIONS_GHC -fno - warn - unused - imports # module Music.Score.StaffNumber ( -- * StaffNumber HasStaffNumber (..), staffNumber, * * StaffNumber note transformer StaffNumberT (..), runStaffNumberT, ) where import Control.Applicative import Control.Comonad import...
null
https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/src/Music/Score/StaffNumber.hs
haskell
* StaffNumber | Class of types with a notion of staff number. ==== Laws [/set-set/]
# LANGUAGE DefaultSignatures # # OPTIONS_GHC -fno - warn - unused - imports # module Music.Score.StaffNumber HasStaffNumber (..), staffNumber, * * StaffNumber note transformer StaffNumberT (..), runStaffNumberT, ) where import Control.Applicative import Control.Comonad import Control.Lens hiding ...
8ff20a9cca573efc6cb05144863259c621a6ebd28f98a3da7ff987c58168fe42
soulomoon/haskell-katas
OddsAndEvens.hs
# LANGUAGE GADTs , DataKinds , TypeFamilies , UndecidableInstances # TypeFamilies, UndecidableInstances #-} module Kyu2.OddsAndEvens where -- | The natural numbers. data Nat = Z | S Nat -- | The axioms of even numbers. data Even (a :: Nat) :: * where -- | Zero is even. ZeroEven :: Eve...
null
https://raw.githubusercontent.com/soulomoon/haskell-katas/0861338e945e5cbaadf98138cf8f5f24a6ca8bb3/src/Kyu2/OddsAndEvens.hs
haskell
| The natural numbers. | The axioms of even numbers. | Zero is even. | If n is even, then n+2 is even. | The axioms of odd numbers. | One is odd. | If n is odd, then n+2 is odd. | Proves that if n is even, n+1 is odd. Notice how I use the axioms here. | Proves that if n is odd, n+1 is even. Notice how the de...
# LANGUAGE GADTs , DataKinds , TypeFamilies , UndecidableInstances # TypeFamilies, UndecidableInstances #-} module Kyu2.OddsAndEvens where data Nat = Z | S Nat data Even (a :: Nat) :: * where ZeroEven :: Even Z NextEven :: Even n -> Even (S (S n)) data Odd (a :: Nat) :: * where One...
858f65ab6c56d6815ce07e25f7a46512e6ab3917035fe4118099fda717441c00
khmelevskii/duct-pedestal-reitit
routes.clj
(ns duct-pedestal-reitit.services.tasks.routes (:require [integrant.core :as ig] [duct-pedestal-reitit.interceptors.databases :refer [attach-db-interceptor]] [duct-pedestal-reitit.services.tasks.handlers.get :as handlers.get] [clojure.spec.alpha :as s])) ;; example of route validation (s/def ::archived b...
null
https://raw.githubusercontent.com/khmelevskii/duct-pedestal-reitit/f1d27bc81f1ffa91633fc12771e316515b8de0df/src/duct_pedestal_reitit/services/tasks/routes.clj
clojure
example of route validation
(ns duct-pedestal-reitit.services.tasks.routes (:require [integrant.core :as ig] [duct-pedestal-reitit.interceptors.databases :refer [attach-db-interceptor]] [duct-pedestal-reitit.services.tasks.handlers.get :as handlers.get] [clojure.spec.alpha :as s])) (s/def ::archived boolean?) (s/def ::query (s/ke...
073fe676f0c8769b5dab1411cf7813a33bb506d41de9060c200857cdddc315f9
wireapp/wire-server
Cassandra.hs
-- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License...
null
https://raw.githubusercontent.com/wireapp/wire-server/342ed3a72344f6756bbc525dabccdc23a62a7d58/libs/polysemy-wire-zoo/src/Wire/Sem/Paging/Cassandra.hs
haskell
This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTI...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module Wire.Sem.Paging.Cassandra...
2e61c3c5e4322f3ff0946b92c5ab8749043cd74a28399bacb0d7b838ba9ca06a
vernemq/vernemq
vmq_webhooks_sup.erl
%%%------------------------------------------------------------------- %% @doc vmq_webhooks top level supervisor. %% @end %%%------------------------------------------------------------------- -module(vmq_webhooks_sup). -behaviour(supervisor). %% API -export([start_link/0]). %% Supervisor callbacks -export([init/1]...
null
https://raw.githubusercontent.com/vernemq/vernemq/234d253250cb5371b97ebb588622076fdabc6a5f/apps/vmq_webhooks/src/vmq_webhooks_sup.erl
erlang
------------------------------------------------------------------- @doc vmq_webhooks top level supervisor. @end ------------------------------------------------------------------- API Supervisor callbacks ==================================================================== API functions ==========================...
-module(vmq_webhooks_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). -spec start_link() -> 'ignore' | {'error', any()} | {'ok', pid()}. start_link() -> case supervisor:start_link({local, ?SERVER}, ?MODULE, []) of {ok, _} = Ret -> spawn(fu...
f5fe0bd8f208566df0afdc06306d50981133e49e3f8dd720ed46cc508abfea35
cdornan/fmt
Main.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE QuasiQuotes # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE CPP # module Main where -- Monoid #if __GLASGOW_HASKELL__ < 804 import Data.Monoid ((<>)) #endif -- Text import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text....
null
https://raw.githubusercontent.com/cdornan/fmt/272c5b2d1c420ea1164067db47dfab952dbec854/tests/Main.hs
haskell
# LANGUAGE OverloadedStrings # Monoid Text Various data structures Generics Call stacks Tests Fmt -------------------------------------------------------------------------- Constants for testing (to avoid “ambiguous type” errors) -------------------------------------------------------------------------- -------...
# LANGUAGE QuasiQuotes # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE CPP # module Main where #if __GLASGOW_HASKELL__ < 804 import Data.Monoid ((<>)) #endif import Data.Text (Text) import qualified Data.Text as T import qualified Data.Text.Lazy as TL import NeatInterpolation import qualified ...
9376cdb4b568233f37d12b1cdfcc05a8c3eb3c210392efd56a7a9bf051bd97a1
PuercoPop/Movitz
bignums.lisp
;;;;------------------------------------------------------------------ ;;;; Copyright ( C ) 2003 - 2005 , Department of Computer Science , University of Tromso , Norway . ;;;; ;;;; For distribution policy, see the accompanying file COPYING. ;;;; ;;;; Filename: bignums.lisp ;;;; Description: Au...
null
https://raw.githubusercontent.com/PuercoPop/Movitz/7ffc41896c1e054aa43f44d64bbe9eaf3fcfa777/losp/muerte/bignums.lisp
lisp
------------------------------------------------------------------ For distribution policy, see the accompanying file COPYING. Filename: bignums.lisp Description: ------------------------------------------------------------------ EBX=0 => nothing to do. Set up ato...
Copyright ( C ) 2003 - 2005 , Department of Computer Science , University of Tromso , Norway . Author : < > Created at : Sat Jul 17 19:42:57 2004 $ I d : bignums.lisp , v 1.18 2008/02/04 15:11:16 Exp $ (require :muerte/basic-macros) (require :muerte/typep) (require :muerte/arithmetic-m...
db87895c53711bc25187669aa8c4f89601a3ef3137dc71bc07535df74dc65ed3
elli-lib/elli
elli_middleware_tests.erl
-module(elli_middleware_tests). -include_lib("eunit/include/eunit.hrl"). -include("elli_test.hrl"). elli_test_() -> {setup, fun setup/0, fun teardown/1, [ ?_test(hello_world()), ?_test(short_circuit()), ?_test(compress()), ?_test(no_callbacks()) ]}. %% %% TESTS %% short_ci...
null
https://raw.githubusercontent.com/elli-lib/elli/2f2fafb77c67244ba6237ca6b3c7238ff886c478/test/elli_middleware_tests.erl
erlang
TESTS HELPERS
-module(elli_middleware_tests). -include_lib("eunit/include/eunit.hrl"). -include("elli_test.hrl"). elli_test_() -> {setup, fun setup/0, fun teardown/1, [ ?_test(hello_world()), ?_test(short_circuit()), ?_test(compress()), ?_test(no_callbacks()) ]}. short_circuit() -> ...
504ed5b0712addaf9af4ac124ff2511331cd491e68542ddb892bffd5fd0439bf
weldr/bdcs
ReqType.hs
# LANGUAGE TemplateHaskell # -- | -- Module: BDCS.ReqType Copyright : ( c ) 2016 - 2017 Red Hat , Inc. -- License: LGPL -- Maintainer : -- Stability: alpha -- Portability: portable -- -- Data types for working with 'Requirements'. module BDCS.ReqType(ReqContext(..), ReqLanguage(..), ...
null
https://raw.githubusercontent.com/weldr/bdcs/cf360c3240644b4847336b9d58b2067f3aa1ec50/src/BDCS/ReqType.hs
haskell
| Module: BDCS.ReqType License: LGPL Stability: alpha Portability: portable Data types for working with 'Requirements'. | The type of a requirements language - this basically maps to a packaging system. For now, only RPM is supported. | The type for specifying when a requirement should be enforced. ^ Appli...
# LANGUAGE TemplateHaskell # Copyright : ( c ) 2016 - 2017 Red Hat , Inc. Maintainer : module BDCS.ReqType(ReqContext(..), ReqLanguage(..), ReqStrength(..)) where import Database.Persist.TH # ANN module ( " HLint : ignore Use module export list " : : String ) # data Re...
a28ace0b71c6dbfe86595575d124bacdaa57332915326df960c99f8a833d5ec7
finnishtransportagency/harja
maksuera_sanoma_test.clj
(ns harja.palvelin.integraatiot.sampo.sanomat.maksuera-sanoma-test (:require [clojure.test :refer [deftest is use-fixtures]] [harja.palvelin.integraatiot.sampo.sanomat.maksuera_sanoma :as maksuera_sanoma] [hiccup.core :refer [html]] [clojure.xml :refer [parse]] [clojure...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/c56d06472dcccecfd73921261c483ea904970635/test/clj/harja/palvelin/integraatiot/sampo/sanomat/maksuera_sanoma_test.clj
clojure
(ns harja.palvelin.integraatiot.sampo.sanomat.maksuera-sanoma-test (:require [clojure.test :refer [deftest is use-fixtures]] [harja.palvelin.integraatiot.sampo.sanomat.maksuera_sanoma :as maksuera_sanoma] [hiccup.core :refer [html]] [clojure.xml :refer [parse]] [clojure...
16c40faa9283711605e24cf6014533e39e26b441bc2dac8dafb6b68f8f76f328
lambdaclass/erlang-katana
ktn_date.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ktn_date : functions useful for handling dates and time values %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -module(ktn_date). -export([ now_human_readable/0 ]). -type date() :: ...
null
https://raw.githubusercontent.com/lambdaclass/erlang-katana/ebb6b1358c974b5e3b16f5e95422061385ae34ac/src/ktn_date.erl
erlang
@doc Returns the current date in a human readable format binary.
ktn_date : functions useful for handling dates and time values -module(ktn_date). -export([ now_human_readable/0 ]). -type date() :: {date, {non_neg_integer(), 1..12, 1..31}}. -type datetime() :: { datetime , {{integer(), 1..12, 1..31} , {1..24, 1..60, 1....
1932f99d76bacbce69cedfcc074dc730cef328b00ab7657e2065f7ecc738e3b8
gadfly361/reagent-figwheel
core_cards.cljs
(ns {{ns-name}}.core-cards (:require-macros [devcards.core :as dc]) (:require [{{ns-name}}.pages.home.cards] [{{ns-name}}.pages.about.cards] )) (dc/start-devcard-ui!)
null
https://raw.githubusercontent.com/gadfly361/reagent-figwheel/4c40657b31a2b358be5697add2e96e8cac6f8535/src/leiningen/new/reagent_figwheel/gadfly/src/app/core_cards.cljs
clojure
(ns {{ns-name}}.core-cards (:require-macros [devcards.core :as dc]) (:require [{{ns-name}}.pages.home.cards] [{{ns-name}}.pages.about.cards] )) (dc/start-devcard-ui!)
645a640fde9c0c1dcaaf6f50ddde74ad6c888d5149004f79d914969e7f76d4bc
valderman/haste-compiler
haste-cat.hs
# LANGUAGE OverloadedStrings , TupleSections # module Main where import System.Environment import Haste.Module import Haste.Config import Haste.AST import Haste.AST.PP import Data.Maybe import qualified Data.Map as M import qualified Data.ByteString.Lazy.Char8 as BSL import qualified Data.ByteString.Char8 as BS main =...
null
https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/src/haste-cat.hs
haskell
# LANGUAGE OverloadedStrings , TupleSections # module Main where import System.Environment import Haste.Module import Haste.Config import Haste.AST import Haste.AST.PP import Data.Maybe import qualified Data.Map as M import qualified Data.ByteString.Lazy.Char8 as BSL import qualified Data.ByteString.Char8 as BS main =...
300c0037993176e43fce4c7f9490a17920bd37708b654b5e01369cb2b7125b55
mransan/raft
raft_log.ml
type log_entry = { index : int; term : int; data : bytes; id : string; } let pp_log_entry fmt {index; term; id; _} = Format.fprintf fmt "{index: %i; term: %i, id: %s}" index term id module IntMap = Map.Make(struct type t = int let compare (x:int) (y:int) = Pervasives.compare x y end) type size =...
null
https://raw.githubusercontent.com/mransan/raft/292f99475183d67e960b3a199ed4fc01b1f183e2/src/raft_log.ml
ocaml
2x64bits for index/term when empty, no need for size limitation assert(log_entry.index > (last_log_index log)); Builder
type log_entry = { index : int; term : int; data : bytes; id : string; } let pp_log_entry fmt {index; term; id; _} = Format.fprintf fmt "{index: %i; term: %i, id: %s}" index term id module IntMap = Map.Make(struct type t = int let compare (x:int) (y:int) = Pervasives.compare x y end) type size =...
23d4765598ff986790633e03508bc37d75c9c40357d6343b17790541960296c5
lemmih/lhc
Exceptions.hs
module Data.Bedrock.Exceptions ( runGen , cpsTransformation , stdContinuation , isCatchFrame ) where import Control.Applicative (pure, (<$>), (<*>)) import Control.Monad.State import Data.Map (Map) import qualified Data.Map as Map impor...
null
https://raw.githubusercontent.com/lemmih/lhc/53bfa57b9b7275b7737dcf9dd620533d0261be66/bedrock/src/Data/Bedrock/Exceptions.hs
haskell
stackFrameName :: Name stackFrameName = Name ["bedrock"] "StackFrame" 0 pushNode $ NodeDefinition stackFrameName [] Bind [frameVar] (Store (ConstructorName stackFrameName 0) []) $ We need to invoke with at least 1+'size' arguments. 'node' is repeated here. Could be Undefined as well. Doesn't matter. Raise except...
module Data.Bedrock.Exceptions ( runGen , cpsTransformation , stdContinuation , isCatchFrame ) where import Control.Applicative (pure, (<$>), (<*>)) import Control.Monad.State import Data.Map (Map) import qualified Data.Map as Map impor...
abec49490fe39897e39d031297ba0ccbc40d788434692a50c4911455dff07592
c-cube/ocaml-containers
CCSexp_intf.ml
type 'a or_error = ('a, string) result type 'a iter = ('a -> unit) -> unit type 'a gen = unit -> 'a option * { 2 Abstract representation of S - expressions } @since 3.3 @since 3.3 *) module type BASIC_SEXP = sig type t val atom : string -> t val list : t list -> t val match_ : t -> atom:(string -> '...
null
https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/core/CCSexp_intf.ml
ocaml
* If provided, builds a location from a pair of [(line,column)] positions, and a (possibly dummy) filename * {2 Constructors} * Reverse the list. * [of_variant name args] is used to encode algebraic variants into a S-expr. For instance [of_variant "some" [of_int 1]] represents the value [Some 1]. ...
type 'a or_error = ('a, string) result type 'a iter = ('a -> unit) -> unit type 'a gen = unit -> 'a option * { 2 Abstract representation of S - expressions } @since 3.3 @since 3.3 *) module type BASIC_SEXP = sig type t val atom : string -> t val list : t list -> t val match_ : t -> atom:(string -> '...
8dcb56d641fb834997d0229b6dcd286b52e7a993022b54411a18b3e52f87da2b
emqx/ecpool
ecpool_sup.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2019 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the L...
null
https://raw.githubusercontent.com/emqx/ecpool/d01b8cb99af90bc177eeeabe29075133db878fb3/src/ecpool_sup.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2019 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(ecpool_sup). -behaviour(supervisor). -export([start_link/0]). -export([ start_pool/3 ...
54ad62f1a63a5409a64131dac6119e45b5841d6cf533e59f14fb31a26986dc9b
5HT/ant
FontTFM.ml
open XNum; open Substitute; open GlyphMetric; open FontMetric; module LigKern = struct type lig_kern_cmd = [ LigCmd of int and int and int and int | KernCmd of int and int and num ]; (* access methods *) value is_lig lk = match lk with [ LigCmd _ _ _ _ -> True | KernCmd _ _ _ -> False ]; value is_kern lk = matc...
null
https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/Runtime/FontTFM.ml
ocaml
access methods |next_lig_kern| can be used to enumerate all lig-kern pairs. If italic.(i) = 0 then we do not need to allocate a new structure.
open XNum; open Substitute; open GlyphMetric; open FontMetric; module LigKern = struct type lig_kern_cmd = [ LigCmd of int and int and int and int | KernCmd of int and int and num ]; value is_lig lk = match lk with [ LigCmd _ _ _ _ -> True | KernCmd _ _ _ -> False ]; value is_kern lk = match lk with [ LigCmd _ ...
bbca7ae6162fb6531d715efcb1c9f7d0a5afd34059a2bdcd31027f18e95f7fbb
Helium4Haskell/Top
TypeGraphSubstitution.hs
# LANGUAGE MonoLocalBinds , UndecidableInstances , FlexibleInstances , MultiParamTypeClasses # # OPTIONS_GHC -fno - warn - orphans # ----------------------------------------------------------------------------- -- | License : GPL -- -- Maintainer : -- Stability : provisional -- Portability : non-...
null
https://raw.githubusercontent.com/Helium4Haskell/Top/5e900184d6b2ab6d7ce69945287d782252e5ea68/src/Top/Implementation/TypeGraphSubstitution.hs
haskell
--------------------------------------------------------------------------- | License : GPL Maintainer : Stability : provisional Portability : non-portable (requires extensions) --------------------------------------------------------------------------- --------------------------------------...
# LANGUAGE MonoLocalBinds , UndecidableInstances , FlexibleInstances , MultiParamTypeClasses # # OPTIONS_GHC -fno - warn - orphans # module Top.Implementation.TypeGraphSubstitution where import Top.Implementation.TypeGraph.ClassMonadic import Top.Implementation.TypeGraph.Standard import Top.Implementation.TypeGraph.H...
2d938b9c81821305c6865a5f62c6cbc7e91535cbf5f6059377537e32920c1003
kolmodin/spdy
NVH.hs
module Network.SPDY.NVH ( encodeNVH , decodeNVH ) where -- haskell platform import Control.Monad (liftM) import Data.Binary.Get (runGetOrFail) import Data.Binary.Put (runPut) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as L impo...
null
https://raw.githubusercontent.com/kolmodin/spdy/e81cb708695e2f08426a2fe8f2dc30de89e7a6db/Network/SPDY/NVH.hs
haskell
haskell platform this library Fail _ _ msg -> throwIO (SPDYNVHException Nothing msg)
module Network.SPDY.NVH ( encodeNVH , decodeNVH ) where import Control.Monad (liftM) import Data.Binary.Get (runGetOrFail) import Data.Binary.Put (runPut) import qualified Data.ByteString as B import qualified Data.ByteString.Lazy as L import Data.IO...
415fa816728e60fe88edb447e7e73056d3f2286e550868d68a03a98bdd24566c
mixphix/toolbox
Toolbox.hs
# LANGUAGE TupleSections # -- | -- Module : Data.Tuple.Toolbox Copyright : ( c ) 2021 -- License : BSD3 (see the file LICENSE) -- Maintainer : -- -- Utility functions on top of 'Data.Tuple'. -- -- This module re-exports the above library, so modules need only import 'Data.Tuple.Toolbox'. module D...
null
https://raw.githubusercontent.com/mixphix/toolbox/e36340533f1b543759bb4c1fff4e5a11d6274849/src/Data/Tuple/Toolbox.hs
haskell
| Module : Data.Tuple.Toolbox License : BSD3 (see the file LICENSE) Maintainer : Utility functions on top of 'Data.Tuple'. This module re-exports the above library, so modules need only import 'Data.Tuple.Toolbox'. * Pairs * Triples * Re-exports | Duplicate a value. | Apply the same functio...
# LANGUAGE TupleSections # Copyright : ( c ) 2021 module Data.Tuple.Toolbox ( dup, (&&&), (***), first, second, both, assoc, unassoc, firstF, secondF, toFirst, toSecond, fst3, snd3, thd3, first3, second3, third3, first3F, second3F...
47cd5c447683f57a70ea565be73ef179dfb640a75092ffc3cf1e90cb7583f46c
kelamg/HtDP2e-workthrough
ex225.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex225) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decima...
null
https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Arbitrarily-Large-Data/ex225.rkt
racket
about the language level of this file in a form that our tools can easily process. CONSTANTS Scene airplane fire water in secs DEFINITIONS An Airplane is a structure: interp. at any time, a plane is at x-coordinate x, and has a direction dir - 1 - -1 A Water is a Posn interp. the position of a w...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex225) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (require 2htdp/image) (require 2htdp/universe) (define WID...
df3996ce2b93c1ece40214156c8c40bc14652cd431cce738d2b450edbe23f8d9
mmark-md/mmark-ext
KbdSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Text.MMark.Extension.KbdSpec (spec) where import Test.Hspec import Text.MMark.Extension.Kbd import Text.MMark.Extension.TestUtils spec :: Spec spec = describe "kbd" $ do let to = withExt kbd it "works" $ "Press [Ctrl+A](kbd:)" `to` "<p>Press <kbd>Ctrl+A</kbd>...
null
https://raw.githubusercontent.com/mmark-md/mmark-ext/cc7d035224d32a6133789d65cd0e130bcdbf8d2c/tests/Text/MMark/Extension/KbdSpec.hs
haskell
# LANGUAGE OverloadedStrings #
module Text.MMark.Extension.KbdSpec (spec) where import Test.Hspec import Text.MMark.Extension.Kbd import Text.MMark.Extension.TestUtils spec :: Spec spec = describe "kbd" $ do let to = withExt kbd it "works" $ "Press [Ctrl+A](kbd:)" `to` "<p>Press <kbd>Ctrl+A</kbd></p>\n"
25579d1078255f425e6a9c4c00d1e517b98d63917932a935de7ebd3684f3db5a
tweag/asterius
drvrun011.hs
-- Tests some simple deriving stuff, and built-in instances module Main( main ) where data Command = Commit (Maybe String) | Foo | Baz Bool | Boz Int deriving (Read,Show) type T = ([Command], [Command], [Command]) val :: T val = ([Commit Nothing, Commit (Just "foo")], [Foo, Baz True], [Boz...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/deriving/drvrun011.hs
haskell
Tests some simple deriving stuff, and built-in instances
module Main( main ) where data Command = Commit (Maybe String) | Foo | Baz Bool | Boz Int deriving (Read,Show) type T = ([Command], [Command], [Command]) val :: T val = ([Commit Nothing, Commit (Just "foo")], [Foo, Baz True], [Boz 3, Boz (-2)]) main = do { print val ; print (...
8b7fbeed2dc71fbeb0fb76c1e216c7be3f0ed7451dd0f3b4a2e589ed648655b1
xh4/web-toolkit
crc24.lisp
;;;; -*- mode: lisp; indent-tabs-mode: nil -*- ;;;; crc24.lisp (in-package :crypto) (in-ironclad-readtable) (declaim (type (simple-array (unsigned-byte 32) (256)) +crc24-table+)) (defconst +crc24-table+ #32@(#x00000000 #x00864CFB #x008AD50D #x000C99F6 #x0093E6E1 #x0015AA1A #x001933EC #x009F7F17 #x00A18139 #x0027CDC2 ...
null
https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/ironclad-v0.47/src/digests/crc24.lisp
lisp
-*- mode: lisp; indent-tabs-mode: nil -*- crc24.lisp
(in-package :crypto) (in-ironclad-readtable) (declaim (type (simple-array (unsigned-byte 32) (256)) +crc24-table+)) (defconst +crc24-table+ #32@(#x00000000 #x00864CFB #x008AD50D #x000C99F6 #x0093E6E1 #x0015AA1A #x001933EC #x009F7F17 #x00A18139 #x0027CDC2 #x002B5434 #x00AD18CF #x003267D8 #x00B42B23 #x00B8B2D5 #x003EFE...
04a2d9b2ede9f58dfa62e1a2898b88dda083bbfc32b4e05f14979a92f36fedb6
FieryCod/holy-lambda
publish.clj
(require '[selmer.parser :as selm]) (require '[babashka.process :as p]) (require '[clojure.string :as s]) (def ARM64 "arm64") (def AMD64 "amd64") (def ARCHS #{ARM64 AMD64}) (def FILES #{"README.md.template" "Dockerfile.bb.template" "template.yml.template"}) (def BABASHKA_VERSION "0.9.162") (def SEMANTIC_VERSION "0.7...
null
https://raw.githubusercontent.com/FieryCod/holy-lambda/e695797d21163d7e5f2b3818bf5abfc905f41376/modules/holy-lambda-babashka-layer/publish.clj
clojure
(require '[selmer.parser :as selm]) (require '[babashka.process :as p]) (require '[clojure.string :as s]) (def ARM64 "arm64") (def AMD64 "amd64") (def ARCHS #{ARM64 AMD64}) (def FILES #{"README.md.template" "Dockerfile.bb.template" "template.yml.template"}) (def BABASHKA_VERSION "0.9.162") (def SEMANTIC_VERSION "0.7...
1237aaabff9bb9de5e45a4e2cc357a3f63867deaf79bfe19ce5bbd537dbb57be
orionsbelt-battlegrounds/obb-rules
translator.cljc
(ns obb-rules.translator (:require [obb-rules.board :as board] [obb-rules.simplifier :as simplify] [obb-rules.laws :as laws] [obb-rules.element :as element])) (def max-coordinate (+ 1 laws/default-board-w)) (defn- default-focus? "Checks if the current given focus is the default...
null
https://raw.githubusercontent.com/orionsbelt-battlegrounds/obb-rules/97fad6506eb81142f74f4722aca58b80d618bf45/src/obb_rules/translator.cljc
clojure
(ns obb-rules.translator (:require [obb-rules.board :as board] [obb-rules.simplifier :as simplify] [obb-rules.laws :as laws] [obb-rules.element :as element])) (def max-coordinate (+ 1 laws/default-board-w)) (defn- default-focus? "Checks if the current given focus is the default...
fea38a9225021df8c181015f35581ade646c8d32e2a9ba1de748b5e941cc1c36
SoftwareFoundationGroupAtKyotoU/VeriCUDA
vc.ml
open Why3.Term module Varinfo = struct type t = Cil.varinfo let compare v1 v2 = compare v1.Cil.vid v2.Cil.vid end module VarinfoMap : (Map.S with type key = Cil.varinfo) = Map.Make(Varinfo) module OrderedString = struct type t = string let compare : string -> string -> int = compare end module StrMap : (M...
null
https://raw.githubusercontent.com/SoftwareFoundationGroupAtKyotoU/VeriCUDA/8c62058af5362cb1bd6c86121d9b8742e31706f2/vc.ml
ocaml
automatically generated variable automatically generated assumption assignment vc_asgn : assignment_info list;
open Why3.Term module Varinfo = struct type t = Cil.varinfo let compare v1 v2 = compare v1.Cil.vid v2.Cil.vid end module VarinfoMap : (Map.S with type key = Cil.varinfo) = Map.Make(Varinfo) module OrderedString = struct type t = string let compare : string -> string -> int = compare end module StrMap : (M...
1ac240f81f6052c7499f307e6dc65fe4759b6e3b32a81b570d5c353e45640358
rabbitmq/rabbitmq-stomp
command_SUITE.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% -module(command_SUITE). -compile([export_all]). ...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-stomp/925d78e2c7152723a68452b38fbc2713d2797b8b/test/command_SUITE.erl
erlang
No connections
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(command_SUITE). -compile([export_all]). -inclu...
7e75ad47aa778370eff030089fe293be348c3054cb3fb578961ec863f887fdca
tonyg/racket-operational-transformation
client.rkt
#lang racket/gui (require racket/cmdline) (require racket/match) (require racket/serialize) (require racket/tcp) (require operational-transformation) (require operational-transformation/text) (require operational-transformation/text/simple-document) (define ot-text% (class text% (init-field [insert-callback (la...
null
https://raw.githubusercontent.com/tonyg/racket-operational-transformation/1960b7f70138a9de6e3ceb2943b8ca46c83d94ae/operational-transformation-demo/client.rkt
racket
(printf "document-perform: ~v ~v\n" op remote?) (flush-output)
#lang racket/gui (require racket/cmdline) (require racket/match) (require racket/serialize) (require racket/tcp) (require operational-transformation) (require operational-transformation/text) (require operational-transformation/text/simple-document) (define ot-text% (class text% (init-field [insert-callback (la...
dad21461f4028dae7ced79522f93272efde3f9f5e5b9836d59a90a00755cdc82
Clozure/ccl
l1-error-system.lisp
-*-Mode : LISP ; Package : CCL -*- ;;; Copyright 1994 - 2009 Clozure Associates ;;; 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 appli...
null
https://raw.githubusercontent.com/Clozure/ccl/01cf6cd7f849d75bc61eeb3f25b034500da6b58b/level-1/l1-error-system.lisp
lisp
Package : CCL -*- 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 la...
Copyright 1994 - 2009 Clozure Associates distributed under the License is distributed on an " AS IS " BASIS , (in-package "CCL") (defclass condition () ()) (defclass warning (condition) ()) (defclass serious-condition (condition) ()) (defclass error (serious-condition) ()) (defun check-condition-superclasses ...
c7626f6c0e2b9bcfa19842bbcfa5e7bb958a962858b17810dced6d540ad56e62
BitGameEN/bitgamex
hello2.erl
%% File : hello2.erl %% File : luerl/examples/hello/hello2.erl Purpose : Demonstration of the Luerl interface . Author : Use : $ cd examples / hello & & erlc hello2.erl & & erl -pa .. / .. /ebin -s hello2 run -s init stop -noshell %% Or : $ make examples -module(hello2). -export([run/0]). ru...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/luerl/examples/hello/hello2.erl
erlang
File : hello2.erl File : luerl/examples/hello/hello2.erl Or : $ make examples execute a string execute a string, get a result execute a file execute a file, get a result execute a standard function separately parse, then execute a file. The file defines a function no() separately parse, then execut...
Purpose : Demonstration of the Luerl interface . Author : Use : $ cd examples / hello & & erlc hello2.erl & & erl -pa .. / .. /ebin -s hello2 run -s init stop -noshell -module(hello2). -export([run/0]). run() -> io:format("-------------------------------------------~n"), io:format("This is an ...
7da926c3378a6413fe0cebf7e7489e50adbfd1b07f4be6b8e5e754822f9a7ede
input-output-hk/cardano-sl
CborSpec.hs
# LANGUAGE TypeApplications # module Test.Pos.Block.CborSpec ( spec ) where import Universum import Test.Hspec (Spec, describe) import Test.Hspec.QuickCheck (modifyMaxSuccess) import qualified Pos.Chain.Block as Block import qualified Pos.Network.Block.Types as Block imp...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/lib/test/Test/Pos/Block/CborSpec.hs
haskell
# LANGUAGE TypeApplications # module Test.Pos.Block.CborSpec ( spec ) where import Universum import Test.Hspec (Spec, describe) import Test.Hspec.QuickCheck (modifyMaxSuccess) import qualified Pos.Chain.Block as Block import qualified Pos.Network.Block.Types as Block imp...
75838193e6b0c79f37fa9d74e6f2ef7332568930abb26ed27f88c2c2b736e4b6
zippy/anansi
email_bridge_out.clj
(ns anansi.test.streamscapes.channels.email-bridge-out (:use [anansi.streamscapes.channels.email-bridge-out] :reload) (:use [anansi.ceptr] [anansi.receptor.scape] [anansi.receptor.user :only [user-def]] [anansi.streamscapes.streamscapes] [anansi.streamscapes.channel :only [channel-de...
null
https://raw.githubusercontent.com/zippy/anansi/881aa279e5e7836f3002fc2ef7623f2ee1860c9a/test/anansi/test/streamscapes/channels/email_bridge_out.clj
clojure
d (get-receptor r droplet-address) commented out because e-mail not actually sent hack off the milliseconds
(ns anansi.test.streamscapes.channels.email-bridge-out (:use [anansi.streamscapes.channels.email-bridge-out] :reload) (:use [anansi.ceptr] [anansi.receptor.scape] [anansi.receptor.user :only [user-def]] [anansi.streamscapes.streamscapes] [anansi.streamscapes.channel :only [channel-de...
4223a557d77d6b6d90de5d371398e4b9b865664834716ccbff7aeaea3b6a966c
mcorbin/meuse
metric.clj
(ns meuse.api.public.metric (:require [meuse.api.public.http :refer [public-api!]] [meuse.metric :as metric])) (defmethod public-api! :metrics [_] {:status 200 :headers {"Content-Type" "text/plain"} :body (.getBytes (.scrape metric/registry))})
null
https://raw.githubusercontent.com/mcorbin/meuse/d2b74543fce37c8cde770ae6f6097cabb509a804/src/meuse/api/public/metric.clj
clojure
(ns meuse.api.public.metric (:require [meuse.api.public.http :refer [public-api!]] [meuse.metric :as metric])) (defmethod public-api! :metrics [_] {:status 200 :headers {"Content-Type" "text/plain"} :body (.getBytes (.scrape metric/registry))})
218161514357c09442c9648863094c876f25097d8a79fc96aae021adcd42701b
jaked/froc
froc_direct.mli
val direct : (unit -> 'a) -> 'a Froc.behavior val read : 'a Froc.behavior -> 'a val (~|) : (unit -> 'a) -> 'a Froc.behavior val (~.) : 'a Froc.behavior -> 'a
null
https://raw.githubusercontent.com/jaked/froc/6068a1fab883ed9254bfeb53a1f9c15e8af0bb20/src/froc-direct/froc_direct.mli
ocaml
val direct : (unit -> 'a) -> 'a Froc.behavior val read : 'a Froc.behavior -> 'a val (~|) : (unit -> 'a) -> 'a Froc.behavior val (~.) : 'a Froc.behavior -> 'a
16d31118a1e29a3d027d744272289a83508c2ba418159cb0448e56d3cd9d2964
owlbarn/owl_symbolic
owl_symbolic_ops_rnn.ml
* OWL - OCaml Scientific and Engineering Computing * Copyright ( c ) 2016 - 2020 < > * OWL - OCaml Scientific and Engineering Computing * Copyright (c) 2016-2020 Liang Wang <> *) * LSTM , RNN , GRU open Owl_symbolic_types module LSTM = struct type t = { mutable name : string ; mutable input ...
null
https://raw.githubusercontent.com/owlbarn/owl_symbolic/dc853a016757d3f143c5e07e50075e7ae605d969/src/ops/owl_symbolic_ops_rnn.ml
ocaml
* OWL - OCaml Scientific and Engineering Computing * Copyright ( c ) 2016 - 2020 < > * OWL - OCaml Scientific and Engineering Computing * Copyright (c) 2016-2020 Liang Wang <> *) * LSTM , RNN , GRU open Owl_symbolic_types module LSTM = struct type t = { mutable name : string ; mutable input ...
41651701c6a3d3aef15fd56dee7e2cafb088ec1f7ad6c66e408dc1909106692b
EMSL-NMR-EPR/Haskell-MFAPipe-Executable
MassFractionVector.hs
module MFAPipe.Csv.Types.MassFractionVector ( MassFractionVectorRecords(..) , MassFractionVectorRecord(..) , encode , encodeWith , IndexedMassFractionVectorRecords(..) , IndexedMassFractionVectorRecord(..) , encodeIndexed , encodeIndexedWith ) where import Data.ByteString.Lazy (ByteString) import qualified D...
null
https://raw.githubusercontent.com/EMSL-NMR-EPR/Haskell-MFAPipe-Executable/8a7fd13202d3b6b7380af52d86e851e995a9b53e/MFAPipe/app/MFAPipe/Csv/Types/MassFractionVector.hs
haskell
# UNPACK # # UNPACK #
module MFAPipe.Csv.Types.MassFractionVector ( MassFractionVectorRecords(..) , MassFractionVectorRecord(..) , encode , encodeWith , IndexedMassFractionVectorRecords(..) , IndexedMassFractionVectorRecord(..) , encodeIndexed , encodeIndexedWith ) where import Data.ByteString.Lazy (ByteString) import qualified D...
92f05e9ca63ee66eeb892c9f32fc491ade38f385c08bff4a8de0deb849a6ac65
tomjaguarpaw/product-profunctors
Newtype.hs
module Data.Profunctor.Product.Newtype where import qualified Data.Profunctor as P class Newtype t where constructor :: a -> t a field :: t a -> a pNewtype :: (P.Profunctor p, Newtype t) => p a b -> p (t a) (t b) pNewtype = P.dimap field constructor
null
https://raw.githubusercontent.com/tomjaguarpaw/product-profunctors/db78428cb2be7eddddf1f9f98899003efb9c8c56/Data/Profunctor/Product/Newtype.hs
haskell
module Data.Profunctor.Product.Newtype where import qualified Data.Profunctor as P class Newtype t where constructor :: a -> t a field :: t a -> a pNewtype :: (P.Profunctor p, Newtype t) => p a b -> p (t a) (t b) pNewtype = P.dimap field constructor
5c8ecf1e388653bb5604e2927edb9c66d16ddd64ba3582b722f35010952a9a8a
johnwhitington/ocamli
exercise06.ml
let concat ss = let b = Buffer.create 100 in List.iter (Buffer.add_string b) ss; Buffer.contents b
null
https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/OCaml%20from%20the%20Very%20Beginning/Chapter%2015/exercise06.ml
ocaml
let concat ss = let b = Buffer.create 100 in List.iter (Buffer.add_string b) ss; Buffer.contents b
cc46c9c93120085a84f2abdb51062f17a9dd3fe3b4ed834598b51a63f7357e10
well-typed/large-records
HL070.hs
module Common.HListOfSize.HL070 (Fields) where import Bench.Types type Fields = '[ -- 00 .. 09 T 00 , T 01 , T 02 , T 03 , T 04 , T 05 , T 06 , T 07 , T 08 , T 09 10 .. 19 , T 10 , T 11 , T 12 , T 13 , T 14 , T 15 , T 16 , T 17 , T ...
null
https://raw.githubusercontent.com/well-typed/large-records/551f265845fbe56346988a6b484dca40ef380609/large-records-benchmarks/bench/typelet/Common/HListOfSize/HL070.hs
haskell
00 .. 09
module Common.HListOfSize.HL070 (Fields) where import Bench.Types type Fields = '[ T 00 , T 01 , T 02 , T 03 , T 04 , T 05 , T 06 , T 07 , T 08 , T 09 10 .. 19 , T 10 , T 11 , T 12 , T 13 , T 14 , T 15 , T 16 , T 17 , T 18 , T 19 20...
0a7d768b207f36ac84d28323e8bc17c03c27261adb6c4f126e3847bae08472ad
MarkCurtiss/sicp
3_28_to_3_37.scm
3.28 ; ======================================================================== (define (logical-or signal1 signal2) (or signal1 signal2)) (define (or-gate wire1 wire2 output-wire) (define (or-action-procedure) (let ((new-value (logical-or (get-signal wire1) (get-signal wire2)))) (after-dela...
null
https://raw.githubusercontent.com/MarkCurtiss/sicp/8b55a3371458014c815ba8792218b6440127ab40/chapter_3_exercises/3_28_to_3_37.scm
scheme
======================================================================== ======================================================================== The delay time is equal to (+ inverter-delay inverter-delay and-gate-delay) ======================================================================== The delay time will...
3.28 (define (logical-or signal1 signal2) (or signal1 signal2)) (define (or-gate wire1 wire2 output-wire) (define (or-action-procedure) (let ((new-value (logical-or (get-signal wire1) (get-signal wire2)))) (after-delay or-gate-delay (lambda () (set-sig...
874db743df282014dd0d80d9f6b3f5d0d844c8b57058c225b242cb46d6402f39
titola/incudine
gen-envelope.lisp
(in-package :incudine-tests) (defun gen-envelope-test-1 (env &key periodic-p normalize-p (mult 1)) (with-cleanup (mapcar #'sample->fixnum (buffer->list (scale-buffer (make-buffer 64 :fill-function (gen:envelope env :periodic-p periodic-p ...
null
https://raw.githubusercontent.com/titola/incudine/325174a54a540f4daa67bcbb29780073c35b7b80/tests/gen-envelope.lisp
lisp
(in-package :incudine-tests) (defun gen-envelope-test-1 (env &key periodic-p normalize-p (mult 1)) (with-cleanup (mapcar #'sample->fixnum (buffer->list (scale-buffer (make-buffer 64 :fill-function (gen:envelope env :periodic-p periodic-p ...
f363b1d5be6fd028eb1f38ec803c33352378a405378aa9ba7cad9c58a973c8fa
nomeata/arbtt
MyText.hs
module Data.MyText where import qualified Data.ByteString.UTF8 as BSU import qualified Data.ByteString.Lazy.UTF8 as BLU import qualified Data.ByteString.Lazy as LBS import qualified Data.ByteString as BS import Data.Binary.Get import Data.Binary import Control.Applicative ((<$>)) import Control.Arrow (first) import Pr...
null
https://raw.githubusercontent.com/nomeata/arbtt/5e9bf42785e075adaa574bf853f7adbc3408e7f4/src/Data/MyText.hs
haskell
Binary instance compatible with Binary String Unfortunately, with binary-0.7, it is no longer possible to implement this nice and lazily, so go via String :-(
module Data.MyText where import qualified Data.ByteString.UTF8 as BSU import qualified Data.ByteString.Lazy.UTF8 as BLU import qualified Data.ByteString.Lazy as LBS import qualified Data.ByteString as BS import Data.Binary.Get import Data.Binary import Control.Applicative ((<$>)) import Control.Arrow (first) import Pr...
eddc8473b3bcfbd916b6831b4d51f9bbfa6b35ec05b52199126afc7843958a59
DSiSc/why3
eliminate_if.ml
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University (* ...
null
https://raw.githubusercontent.com/DSiSc/why3/8ba9c2287224b53075adc51544bc377bc8ea5c75/src/transform/eliminate_if.ml
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2018 -- Inria - CNRS - Paris - Sud University General Public License version 2.1 , with the special exception open Ident open Term open Decl let rec has_if t = match t.t_node with | Tif _ -> true | _ -> TermTF....
6e1a69d961ed5065a6fd2002dedd0f87edbe2358128528d71c6309888f9f035f
thoughtstem/morugamu
emoji-bool.rkt
#lang racket (provide theme) (require 2htdp/image) (define theme (list (bitmap "./emojis/and.png") (bitmap "./emojis/or.png") (bitmap "./emojis/not.png") (bitmap "./emojis/true.png") (bitmap "./emojis/false.png") (text "if" 24 'black)))
null
https://raw.githubusercontent.com/thoughtstem/morugamu/a9095ddebe364adffb036c3faed95c873a4d9f3c/themes/emoji-bool.rkt
racket
#lang racket (provide theme) (require 2htdp/image) (define theme (list (bitmap "./emojis/and.png") (bitmap "./emojis/or.png") (bitmap "./emojis/not.png") (bitmap "./emojis/true.png") (bitmap "./emojis/false.png") (text "if" 24 'black)))
a508d9cd79728064667123213398467ac29ee154dfb3279652738c6c93a36348
karimarttila/clojure
session_common.clj
(ns simpleserver.sessiondb.session-common (:require [clojure.tools.logging :as log] [buddy.sign.jwt :as buddy-jwt] [clj-time.core :as c-time] [simpleserver.util.prop :as ss-prop] )) ;; The rational we have it here is that we can change the value in ;; remote REPL for ...
null
https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/clj-ring-cljs-reagent-demo/simple-server/src/simpleserver/sessiondb/session_common.clj
clojure
The rational we have it here is that we can change the value in remote REPL for debugging purposes, i.e. test token invalidation dynamically. Some other issue, throw it.
(ns simpleserver.sessiondb.session-common (:require [clojure.tools.logging :as log] [buddy.sign.jwt :as buddy-jwt] [clj-time.core :as c-time] [simpleserver.util.prop :as ss-prop] )) (def my-expiration-time "Atom to store the JSON Web Token expiration as seconds. ...
7113c083fbda3b56cb861bc0bece76b29b318394c6874f421b5c019928645831
janestreet/incr_dom
row.mli
open! Core open! Incr_dom open! Import module Model : sig type t [@@deriving compare] val columns : t Column.t list val matches_pattern : t -> string -> bool val apply_edit : t -> column:string -> string -> t end module Action : sig type t [@@deriving sexp] val kick_price : t val kick_position : t e...
null
https://raw.githubusercontent.com/janestreet/incr_dom/f2dfcf932d252aec523ccbe3da02b5d264e4a1a2/example/ts_gui/row.mli
ocaml
open! Core open! Incr_dom open! Import module Model : sig type t [@@deriving compare] val columns : t Column.t list val matches_pattern : t -> string -> bool val apply_edit : t -> column:string -> string -> t end module Action : sig type t [@@deriving sexp] val kick_price : t val kick_position : t e...
ec50e0d0006bf03a7ab94df2444a2a24d01f6732f935ff7fb76c1dd918bdce62
sgbj/MaximaSharp
cobyla-interface.lisp
;;; -*- Mode: lisp -*- Simple Maxima interface to COBYLA , Constrained Optimization BY ;;; Linear Approximations. (in-package #-gcl #:maxima #+gcl "MAXIMA") ;; Variable that will hold the function that calculates the function ;; value and the constraints. (defvar *calcfc*) (in-package #-gcl #:cobyla #+gcl "COBYLA...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/cobyla/cobyla-interface.lisp
lisp
-*- Mode: lisp -*- Linear Approximations. Variable that will hold the function that calculates the function value and the constraints. constraint equations. But we want to be able to specify different do the real compuation. answer. If there are equality constraints, append them to the list of inequality cons...
Simple Maxima interface to COBYLA , Constrained Optimization BY (in-package #-gcl #:maxima #+gcl "MAXIMA") (defvar *calcfc*) (in-package #-gcl #:cobyla #+gcl "COBYLA") COBYLA always calls CALCFC to compute the function value and the versions . So , COBYLA calls CALCFC , which then calls * CALCFC * to (defu...
9a75f52bdf8dbde1a63e8af03b1624ab858b551ac2b7817fe0c411fb7176ea09
hammerlab/coclobas
local_docker_job.ml
open Internal_pervasives module Specification = struct type t = { image: string; command: string list [@main]; volume_mounts: [ `Local of string * string ] list; memory: [ `GB of int | `MB of int ] option; cpus: float option; } [@@deriving yojson, show, make] end let job_section id = ["job";...
null
https://raw.githubusercontent.com/hammerlab/coclobas/5341ea53fdb5bcea0dfac3e4bd94213b34a48bb9/src/lib/local_docker_job.ml
ocaml
open Internal_pervasives module Specification = struct type t = { image: string; command: string list [@main]; volume_mounts: [ `Local of string * string ] list; memory: [ `GB of int | `MB of int ] option; cpus: float option; } [@@deriving yojson, show, make] end let job_section id = ["job";...
002cded405a31391083032a4d24215de64a47ad0edd222f5164e91ac2f1cb74d
monky-hs/monky
Memory.hs
Copyright 2015,2016 , This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later v...
null
https://raw.githubusercontent.com/monky-hs/monky/5430352258622bdb0a54f6a197090cc4ef03102f/Monky/Memory.hs
haskell
# LANGUAGE OverloadedStrings # |The memory handle used for all functions |Return the memory available to userspace This is accurate (read from kernel) for current kernels. Old kernel (~3.13) estimates this. Old kernels may overestimate. |Get the total amount of memory in the system |Get the amount of memory rport...
Copyright 2015,2016 , This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later v...
803a2c38ffc2f8f92edb2403777b7ab520a2d44cc74d223e5262d86051a5036e
swarmpit/swarmpit
subscription.clj
(ns swarmpit.event.rules.subscription (:refer-clojure :exclude [list]) (:require [swarmpit.api :as api] [swarmpit.docker.utils :as du] [swarmpit.stats :as stats] [swarmpit.event.rules.predicate :refer :all] [clojure.tools.logging :as log])) (defn- service-id [servi...
null
https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/clj/swarmpit/event/rules/subscription.clj
clojure
Subscribed Data Rules
(ns swarmpit.event.rules.subscription (:refer-clojure :exclude [list]) (:require [swarmpit.api :as api] [swarmpit.docker.utils :as du] [swarmpit.stats :as stats] [swarmpit.event.rules.predicate :refer :all] [clojure.tools.logging :as log])) (defn- service-id [servi...
f051ea1c384080c2202a1d4df43e3d458c04de08c05a16ee147bba04b84f11bc
coccinelle/coccinelle
bool.mli
type t = bool = | false | true val not : bool -> bool external (&&) : bool -> bool -> bool = "%sequand" external (||) : bool -> bool -> bool = "%sequor" val equal : bool -> bool -> bool val compare : bool -> bool -> int val to_int : bool -> int val to_float : bool -> float val to_string : bool -> string
null
https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.14/bool.mli
ocaml
type t = bool = | false | true val not : bool -> bool external (&&) : bool -> bool -> bool = "%sequand" external (||) : bool -> bool -> bool = "%sequor" val equal : bool -> bool -> bool val compare : bool -> bool -> int val to_int : bool -> int val to_float : bool -> float val to_string : bool -> string
4cd6cd0dbde1f0ea05ed28e22cf7034a11a4aa35f2e89571578a293598a75c3b
aryx/lfs
inotify.ml
* Copyright ( C ) 2006 - 2008 < > * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LIC...
null
https://raw.githubusercontent.com/aryx/lfs/b931530c7132b77dfaf3c99d452dc044fce37589/ocamlinotify/inotify.ml
ocaml
convenience
* Copyright ( C ) 2006 - 2008 < > * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking described in file LIC...
1a56d9bdc40ba7c2b21516b2f14a0debf858bc4afea64f6fb93c52b2b940cdbb
hstreamdb/hstream
server.hs
# LANGUAGE CPP # {-# LANGUAGE DataKinds #-} # LANGUAGE GADTs # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE QuasiQuotes #-} {-# LANGUAGE RecordWildCards #-} # LANGUAGE ScopedTypeVariables # ...
null
https://raw.githubusercontent.com/hstreamdb/hstream/bf605e37f4bc847678cd9753a5dc77884acb97d4/hstream/app/server.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE OverloadedStrings # # LANGUAGE PatternSynonyms # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # ------------------------------------------------------------------------------ However, reconstruct hashRing every time can be expensive when we have a l...
# LANGUAGE CPP # # LANGUAGE GADTs # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # import Control.Concurrent (MVar, forkIO, newMVar, readMVar, swapMVar) impor...
a745d0c290d606e03055def7deaf4cb439eff2b71d2ea62692352df1652faec7
Helium4Haskell/helium
PatListResult.hs
module PatListResult where f :: Bool -> Int f [a] = 13
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeerrors/Examples/PatListResult.hs
haskell
module PatListResult where f :: Bool -> Int f [a] = 13
1f30fb16de2198e01f9d8b53fae888b7dcfea0d1ff6f00c15483b648f6aa371a
qrilka/xlsx
CommonTests.hs
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -fno - warn - orphans # module CommonTests ( tests ) where import Data.Fixed (Pico, Fixed(..), E12) import Data.Time.Calendar (fromGregorian) import Data.Time.Clock (...
null
https://raw.githubusercontent.com/qrilka/xlsx/c71992f20f78b444a5ff96254efc3a7bcf685abf/test/CommonTests.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # OPTIONS_GHC -fno - warn - orphans # module CommonTests ( tests ) where import Data.Fixed (Pico, Fixed(..), E12) import Data.Time.Calendar (fromGregorian) import Data.Time.Clock (UTCTime(..)) import Test.Tasty.Smal...
5ab0970c824d8d604a2222e01bc4a95e3c21bdd1b2c4509c0efd104693d071f8
gjz010/slowql
Database.hs
# LANGUAGE DeriveGeneric # module SlowQL.Manage.Database where import qualified SlowQL.Manage.Table as T import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BL import qualified SlowQL.Record.DataType as DT import qualified Data.ByteString.Char8 as BC import Data.Binar...
null
https://raw.githubusercontent.com/gjz010/slowql/5e8c698eeb10222082f5fb5bf5dabd4105819c77/src/SlowQL/Manage/Database.hs
haskell
Pre-create check param 2 Expand where-clause into where segments else the foreign reference becomes a global constraint that can be solved later Get all available indices if there are only optimizable clauses, try to optimize them else combine all single-table clauses together. cart this and that together. Maybe need...
# LANGUAGE DeriveGeneric # module SlowQL.Manage.Database where import qualified SlowQL.Manage.Table as T import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as BL import qualified SlowQL.Record.DataType as DT import qualified Data.ByteString.Char8 as BC import Data.Binar...
1f4405c990e150a0200a27f697c9c017e8ac5a5a6c033bf31f799cb830b065fd
pirapira/coq2rust
redops.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/pretyping/redops.ml
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 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Genredexpr FIXME let...
bf64163be547a99f04abb87f58221f74a5dd954d503786a8a4836deea8032ac3
samrushing/irken-compiler
t37.scm
(define (+ a b) (%%cexp (int int -> int) "%0+%1" a b)) (define (thing r) (let ((x r.x) (z r.z) ) (+ x z))) (thing {x=1 z=3})
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t37.scm
scheme
(define (+ a b) (%%cexp (int int -> int) "%0+%1" a b)) (define (thing r) (let ((x r.x) (z r.z) ) (+ x z))) (thing {x=1 z=3})
348ad0635dfd2d191a571bbf5f633b55b3b4c5f3eb2ad0b318ff8cf91ad41ca6
upenn-cis1xx/camelot
equality.ml
open Canonical open Utils open Astutils open Check (** ------------------ Checks rules: if (_ = [literals] | [literals] = _) ----------------------- *) module EqList : EXPRCHECK = struct type ctxt = Parsetree.expression_desc Pctxt.pctxt let fix = "using a pattern match to check whether a list has a certain value...
null
https://raw.githubusercontent.com/upenn-cis1xx/camelot/2d7e8db8abb8c1ad8187bfeb94499fe1746bb664/lib/style/equality.ml
ocaml
* ------------------ Checks rules: if (_ = [literals] | [literals] = _) ----------------------- * ------------------ Checks rules: _ = [None] | [None] = _ ------------- * ------------------ Checks rules: (_ = :bool | :bool = _) -----------------------
open Canonical open Utils open Astutils open Check module EqList : EXPRCHECK = struct type ctxt = Parsetree.expression_desc Pctxt.pctxt let fix = "using a pattern match to check whether a list has a certain value" let violation = "using `=` with lists as a condition in an if statement" let check st (E {locati...
16a44cc45a3122f7e771f83b0147fcb6651e87ebcd357dbe44d9922aebc7c5ad
clojure-interop/google-cloud-clients
LogEntry.clj
(ns com.google.cloud.logging.LogEntry "A Stackdriver Logging log entry. All log entries are represented via objects of this class. Log entries can have different type of payloads: an UTF-8 string (see Payload.StringPayload), a JSON object (see Payload.JsonPayload, or a protobuf object (see Payload.ProtoPayload). ...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.logging/src/com/google/cloud/logging/LogEntry.clj
clojure
and punctuation characters: _-./. The
(ns com.google.cloud.logging.LogEntry "A Stackdriver Logging log entry. All log entries are represented via objects of this class. Log entries can have different type of payloads: an UTF-8 string (see Payload.StringPayload), a JSON object (see Payload.JsonPayload, or a protobuf object (see Payload.ProtoPayload). ...
74bf9e1874a2b9945491e9e4a83b7e7a2da1ee8ac4b76b3f8b1be396f53fe56b
chpatrick/codec
Codec.hs
module Data.Binary.Codec ( -- * Binary codecs BinaryCodec , byteString , word8 , word16be, word16le, word16host , word32be, word32le, word32host , word64be, word64le, word64host , wordhost , int8 , int16be, int16le, int16host , int32be, int32le, int32host , int64be, int64le, int64host , in...
null
https://raw.githubusercontent.com/chpatrick/codec/0faf37a1cefb21dc46cc2857e538dd983bb28652/src/Data/Binary/Codec.hs
haskell
* Binary codecs | Get/put an n-byte field.
module Data.Binary.Codec ( BinaryCodec , byteString , word8 , word16be, word16le, word16host , word32be, word32le, word32host , word64be, word64le, word64host , wordhost , int8 , int16be, int16le, int16host , int32be, int32le, int32host , int64be, int64le, int64host , inthost ) where imp...
e1cc66f75970a320ea32987829a86cfc5c4fef9d8671e13efe8ede19d2854557
johnyob/dromedary
test_pr7381.ml
open! Import open Util let%expect_test "" = let str = {| type ('a, 'b) eq = | Refl constraint 'a = 'b ;; external hole : 'a. 'a = "%hole";; let (type 't) f = fun (t1 : (int, 't) eq) (t2 : (string, 't) eq) -> match (t1, t2) with ( (Refl, Refl) -> h...
null
https://raw.githubusercontent.com/johnyob/dromedary/a9359321492ff5c38c143385513e673d8d1f05a4/test/typing/gadts/test_pr7381.ml
ocaml
open! Import open Util let%expect_test "" = let str = {| type ('a, 'b) eq = | Refl constraint 'a = 'b ;; external hole : 'a. 'a = "%hole";; let (type 't) f = fun (t1 : (int, 't) eq) (t2 : (string, 't) eq) -> match (t1, t2) with ( (Refl, Refl) -> h...
f14251585a59c1ba6cf0ff5f5f2937e2f34b9eaf034cfb64156f6422745b9d4e
AndrasKovacs/setoidtt
Unlifted.hs
module Data.Unlifted where | Class for types that can be represented as elements of TYPE ' UnliftedRep . NOTE : this module is unsound to use in FFI : Do not pass any data to FFI which contains some unlifted value coerced to a different unlifted type ! NOTE: this module is unsound to ...
null
https://raw.githubusercontent.com/AndrasKovacs/setoidtt/621aef2c4ae5a6acb418fa1153575b21e2dc48d2/setoidtt/primdata/Data/Unlifted.hs
haskell
# inline indexUnlifted# #
module Data.Unlifted where | Class for types that can be represented as elements of TYPE ' UnliftedRep . NOTE : this module is unsound to use in FFI : Do not pass any data to FFI which contains some unlifted value coerced to a different unlifted type ! NOTE: this module is unsound to ...