_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
0dc16f43c5d30a08a44905390ab3cc4683d1d277e3dd9100fe9d461501849381
morpheusgraphql/morpheus-graphql
Validator.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveFunctor # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE Ran...
null
https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/cfaadc6f8491548bccab856757e95584946681b7/morpheus-graphql-core/src/Data/Morpheus/Types/Internal/Validation/Validator.hs
haskell
# LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # Resolution, asks,
# LANGUAGE DataKinds # # LANGUAGE DeriveFunctor # # LANGUAGE DerivingStrategies # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE T...
8c7da119bd746bd69a751bb999382a5fda26dc23ebf45c8248913cfeeaed0091
JacquesCarette/Drasil
Body.hs
# LANGUAGE PostfixOperators # module Drasil.SWHS.Body where import Language.Drasil hiding (organization, section, variable) import Drasil.SRSDocument import qualified Drasil.DocLang.SRS as SRS (inModel) import Theory.Drasil (GenDefn, InstanceModel) import Language.Drasil.Chunk.Concept.NamedCombinators import qualified...
null
https://raw.githubusercontent.com/JacquesCarette/Drasil/84272acccc09574dec70d8d96c6ea994f15f8b22/code/drasil-example/swhs/lib/Drasil/SWHS/Body.hs
haskell
----------------------------------------------------------------------------- Will there be a table of contents? heatEInPCM ? FIXME: heatEInPCM? It is sometimes hard to remember to add new sections both here and above. =================================== -- SOFTWARE REQUIREMENTS SPECIFICATION -- =================...
# LANGUAGE PostfixOperators # module Drasil.SWHS.Body where import Language.Drasil hiding (organization, section, variable) import Drasil.SRSDocument import qualified Drasil.DocLang.SRS as SRS (inModel) import Theory.Drasil (GenDefn, InstanceModel) import Language.Drasil.Chunk.Concept.NamedCombinators import qualified...
2a2e8e6138a92a4a4ee0342796cf8179e4aa0016f006f0a4088c488ed8d234b5
puppetlabs/ring-middleware
utils.clj
(ns puppetlabs.ring-middleware.utils (:require [schema.core :as schema] [ring.util.response :as rr] [slingshot.slingshot :as sling] [cheshire.core :as json]) (:import (java.security.cert X509Certificate))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/puppetlabs/ring-middleware/a09e0fe0e62f31ce49c807b831adf7153cdc37ac/src/puppetlabs/ring_middleware/utils.clj
clojure
Helpers
(ns puppetlabs.ring-middleware.utils (:require [schema.core :as schema] [ring.util.response :as rr] [slingshot.slingshot :as sling] [cheshire.core :as json]) (:import (java.security.cert X509Certificate))) Schemas (def ResponseType (schema/enum :json :plain)) (def RingRequ...
144ec57617f7dba552fcddc13f980a1440a0547cb8bf18056c3b4a821eb7ef69
typelead/eta
Tc220.hs
{-# LANGUAGE DeriveDataTypeable #-} See Trac # 1033 module Tc220 where import Data.Generics import Control.Monad.State data HsExp = HsWildCard deriving( Typeable, Data ) data HsName = HsName deriving( Typeable, Data ) rename : : ( ) - > HsExp - > State ( , [ HsName ] ) HsExp -- Type sig commented out rename1 ...
null
https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/tc220/Tc220.hs
haskell
# LANGUAGE DeriveDataTypeable # Type sig commented out
See Trac # 1033 module Tc220 where import Data.Generics import Control.Monad.State data HsExp = HsWildCard deriving( Typeable, Data ) data HsName = HsName deriving( Typeable, Data ) rename : : ( ) - > HsExp - > State ( , [ HsName ] ) HsExp rename1 = \_ -> everywhereM (mkM (\e -> case e of HsWildCard -> return...
f484b8f786c6750578c86768f675aaf5b0ecb173b73a7452ee7d6679700f817e
S8A/htdp-exercises
ex058.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex058) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex058.rkt
racket
about the language level of this file in a form that our tools can easily process. — 0 through LOW-PRICE-THRESHOLD — LOW-PRICE-THRESHOLD through LUXURY-PRICE-THRESHOLD — LUXURY-PRICE-THRESHOLD and above. interpretation the price of an item Price -> Number
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex058) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ...
7cd2b1598fe42b0295e251297cc7e9645928882864fa965ba8e129ed39b22b07
sadiqj/ocaml-esp32
pr6872.ml
Ignore = b to be reproducible Printexc.record_backtrace false;; exception A;; type a = A;; A;; raise A;; fun (A : a) -> ();; function Not_found -> 1 | A -> 2 | _ -> 3;; try raise A with A -> 2;;
null
https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/testsuite/tests/typing-warnings/pr6872.ml
ocaml
Ignore = b to be reproducible Printexc.record_backtrace false;; exception A;; type a = A;; A;; raise A;; fun (A : a) -> ();; function Not_found -> 1 | A -> 2 | _ -> 3;; try raise A with A -> 2;;
b2f4709b0454d49aa70d0ad9f7caa86fb7f82ae476e4e0acb98d4687ae4e7a1b
avsm/eeww
stdlib.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/avsm/eeww/4d65720b5dd51376842ffe5c8c220d5329c1dc10/boot/ocaml/stdlib/stdlib.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the * The OCaml Standard library . This module is automatically opened at the beginning of each ...
3a02410adb146b25fd0dade12f5a48708139fd8e7dae06caca9299c756e7b4b2
jepsen-io/jepsen
interpreter.clj
(ns jepsen.generator.interpreter "This namespace interprets operations from a pure generator, handling worker threads, spawning processes for interacting with clients and nemeses, and recording a history." (:refer-clojure :exclude [run!]) (:require [clojure [datafy :refer [datafy]] [pprin...
null
https://raw.githubusercontent.com/jepsen-io/jepsen/e601daf2b20d77cfccc447c05c9deab2620fdc44/jepsen/src/jepsen/generator/interpreter.clj
clojure
New process, new client! Try to open new client If we failed to open, just go ahead and return that error op. Otherwise, we can try again, this time with a fresh client. Good, we have a client for this process. This doesn't feel like the right shape exactly, but it's symmetric to Client, (locking *out* (prn :spaw...
(ns jepsen.generator.interpreter "This namespace interprets operations from a pure generator, handling worker threads, spawning processes for interacting with clients and nemeses, and recording a history." (:refer-clojure :exclude [run!]) (:require [clojure [datafy :refer [datafy]] [pprin...
4250e2d436ff74cc18bf32f1a498af636a1286240002b8fa3b623c23e1a0d030
ndmitchell/catch
FilePath.hs
module FilePath where | Module : System . FilePath . Version_0_12 Copyright : ( c ) 2005 - 2006 License : BSD3 Maintainer : /~ndm/ Stability : in - progress Portability : portable A library for FilePath manipulations , designed to be cross platform . This library w...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/examples/Example/FilePath.hs
haskell
* Path methods (environment $PATH) * Extension methods * Drive methods * Drive methods * Operations on a FilePath ||| as a list of directories * File name manipulators ------------------------------------------------------------------- ------------------------------------------------------------------- The basi...
module FilePath where | Module : System . FilePath . Version_0_12 Copyright : ( c ) 2005 - 2006 License : BSD3 Maintainer : /~ndm/ Stability : in - progress Portability : portable A library for FilePath manipulations , designed to be cross platform . This library w...
5fc0765894ffe16cb01c273e34ee1d61a3f0277cd17b2c8813ee62d15765f192
raph-amiard/clojurescript-lua
cljsloader.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/raph-amiard/clojurescript-lua/a1992a1666c59c8fcf7e8f7471e51b0e68183e72/src/cljs/cljsloader.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (ns cljs.cljsloader (:require [clojure.java.io :as io])) (defn read-or-nil [rdr] (try (read rdr) (catch RuntimeException e nil))) (defn make-forms-seq "Construct a lazy sequence of clojure forms from input f. f can be anything that can be coerced to a reader" ...
42795461a0cecd146ead734005ca38c12bfdfa4dcf1b511d28d98482a4a6d166
bravit/hid-examples
Main.hs
import System.Environment import System.TimeIt import IsPrime main :: IO () main = getArgs >>= timeIt . print . isPrime . read . head
null
https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/ch09/isprime/Main.hs
haskell
import System.Environment import System.TimeIt import IsPrime main :: IO () main = getArgs >>= timeIt . print . isPrime . read . head
071c9b9e85004855a466a3a47e0463cc13c5581cff3222ba764002fc7241af10
erlyaws/yaws
websockets_SUITE.erl
-module(websockets_SUITE). -include("testsuite.hrl"). -compile(export_all). -record(frame, {fin = true, rsv = 0, opcode, masked = false, mask, payload = <<>>}). -define(WS_OPCODE_CONTINUATION, 16#00). -define(WS_OPCODE_TEXT, ...
null
https://raw.githubusercontent.com/erlyaws/yaws/da198c828e9d95ca2137da7884cddadd73941d13/testsuite/websockets_SUITE.erl
erlang
==================================================================== ==================================================================== Send the handshake and retrieve the response Check the server response Close the webscoket and check the server reply Send the handshake and retrieve the response Check the serv...
-module(websockets_SUITE). -include("testsuite.hrl"). -compile(export_all). -record(frame, {fin = true, rsv = 0, opcode, masked = false, mask, payload = <<>>}). -define(WS_OPCODE_CONTINUATION, 16#00). -define(WS_OPCODE_TEXT, ...
79069d62038c8ffc668958e41996fe5d273f5ff93aa5c60ffef39fbdd86b12b0
schemedoc/implementation-metadata
s7.scm
(title "s7") (tagline "extension language for Snd, Radium, and Common Music") (based-on "tinyscheme") (named-after "the Sunbeam S7 motorcycle") (homepage-url "/") (person "Bill Schottstaedt") (country "US") (sourceforge "snd") (documentation (title "User Manual") (web-url "")) (mailing-list (name "cmdist") (li...
null
https://raw.githubusercontent.com/schemedoc/implementation-metadata/6280d9c4c73833dc5bd1c9bef9b45be6ea5beb68/schemes/s7.scm
scheme
(title "s7") (tagline "extension language for Snd, Radium, and Common Music") (based-on "tinyscheme") (named-after "the Sunbeam S7 motorcycle") (homepage-url "/") (person "Bill Schottstaedt") (country "US") (sourceforge "snd") (documentation (title "User Manual") (web-url "")) (mailing-list (name "cmdist") (li...
3d55b966a344dcfd3eeb9c2bd7baa84df902e525aaea9ea1d922aadfa9b2de9d
input-output-hk/cardano-sl
Internal.hs
# OPTIONS_GHC -fno - warn - name - shadowing # # LANGUAGE BangPatterns # # LANGUAGE CPP # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE GADTSyntax # # LANGUAGE GeneralizedNe...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/networking/src/Node/Internal.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE RecursiveDo # | A 'NodeId' wraps a network-transport endpoint address | The state of a Node, to be held in a shared atomic cell because other threads will mutate it in o...
# OPTIONS_GHC -fno - warn - name - shadowing # # LANGUAGE BangPatterns # # LANGUAGE CPP # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE GADTSyntax # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE KindSignatures ...
c323346b174bdcadd6d80adefda1cd7e51dbb69b594752ab5519b087fcbab02a
c4-project/c4f
args.ml
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
null
https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/common_cmd/src/args.ml
ocaml
This file is part of c4f . Copyright ( c ) 2018 - 2022 C4 Project c4 t itself is licensed under the MIT License . See the LICENSE file in the project root for more information . Parts of c4 t are based on code from the Herdtools7 project ( ) : see the LICENSE.herd file in the project...
b7488afb51697fa6e77939446683bc461f8cedf5a767ae5096e4bc2d5e3f4d3c
aigarashi/copl-tools
keywords.ml
open Parser let v = [ (* game-specific keywords *) (":", COLON); (* ML1 expressions *) ("true", TRUE); ("false", FALSE); ("if", IF); ("then", THEN); ("else", ELSE); ("*", AST); ("+", CROSS); ("-", HYPHEN); ("<", LT); ML2 judgments and expressions ("|-", VDASH); (",", COMMA); ("let...
null
https://raw.githubusercontent.com/aigarashi/copl-tools/3c4da117083a0870334c8eef270206b11060514e/checker/TypingML2/keywords.ml
ocaml
game-specific keywords ML1 expressions TypingML2 types
open Parser let v = [ (":", COLON); ("true", TRUE); ("false", FALSE); ("if", IF); ("then", THEN); ("else", ELSE); ("*", AST); ("+", CROSS); ("-", HYPHEN); ("<", LT); ML2 judgments and expressions ("|-", VDASH); (",", COMMA); ("let", LET); ("in", IN); ("=", EQ); ("int", INT); ...
415b10d9c438a6ab8672e01db6ab380b8519c5dac8fa718443f509d371abacda
Andromedans/andromeda
reflect.ml
* * * * * Predefined operations and conversion from AML to OCaml * * * * * * Conversions between OCaml list and ML list let tag_nil, _, _ = Typecheck.Builtin.nil let tag_cons, _, _ = Typecheck.Builtin.cons let tag_none, _, _ = Typecheck.Builtin.none let tag_some, _, _ = Typecheck.Builtin.some let tag_mlless, _, _...
null
https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/src/runtime/reflect.ml
ocaml
let as_list ~at v = | Some lst -> lst | Runtime.Tag (t, []) when (Runtime.equal_tag t tag_none) -> None | Runtime.Tag (t, [x]) when (Runtime.equal_tag t tag_some) -> Some x | Runtime.(Judgement _ | Boundary _ | Derivation _ | External _ | Closure _ | Handler _ | Exc _ | Tag _ | Tuple _ ...
* * * * * Predefined operations and conversion from AML to OCaml * * * * * * Conversions between OCaml list and ML list let tag_nil, _, _ = Typecheck.Builtin.nil let tag_cons, _, _ = Typecheck.Builtin.cons let tag_none, _, _ = Typecheck.Builtin.none let tag_some, _, _ = Typecheck.Builtin.some let tag_mlless, _, _...
96ece2540b97c4d89750e19904d4fbf7dd899bae03fce48176c519cebb521f4f
michaelnisi/feeder
fedex_parse.erl
%% example_parse - stream parse feed over HTTP -module(fedex_parse). -export([start_link/1]). -export([resume/1]). -behaviour(gen_statem). -export([terminate/3]). -export([code_change/4]). -export([init/1]). -export([callback_mode/0]). -export([ready/3]). -export([executing/3]). -record(state, { httpcPid, req...
null
https://raw.githubusercontent.com/michaelnisi/feeder/de2004cb954a5a70390a680e2cb0ed697dfcfd27/example/src/fedex_parse.erl
erlang
example_parse - stream parse feed over HTTP API Mandatory callback functions Internals
-module(fedex_parse). -export([start_link/1]). -export([resume/1]). -behaviour(gen_statem). -export([terminate/3]). -export([code_change/4]). -export([init/1]). -export([callback_mode/0]). -export([ready/3]). -export([executing/3]). -record(state, { httpcPid, reqId, url }). -define(TIMEOUT, 5000). resume...
d3ac6d013be056a6395da939403b8f19bd0bb57ae3049314d7642012aa8c47b5
appleshan/cl-http
cl-http-init.lisp
;;; ;;; ********************************************************************** This code was written by and has been placed in ;;; the Public domain, and is provided 'as is'. ;;; ;;; ********************************************************************** ;;; Example initialisation file for CL - HTTP CMUCL ; to be...
null
https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/cmucl/examples/cl-http-init.lisp
lisp
********************************************************************** the Public domain, and is provided 'as is'. ********************************************************************** to be loaded into a dumped core. Load the configuration, and default demos if not already loaded. Even if the examples are...
This code was written by and has been placed in (in-package "USER") May need to disable page protection if it causes trouble . #+(and gencgc nil) (setf (alien:extern-alien "enable_page_protection" alien:unsigned) 0) (if (member :cl-http-examples *cl-http-options*) (load "http:examples;configuration") ...
7b84600531031ba343b5ff9122ed1ef94159e1a1c9a51db7311a3f93a83dbe8a
headwinds/reagent-reframe-material-ui
demo-autocomplete.cljs
(ns example.demos.autocomplete.demo-autocomplete (:require [reagent.core :as r] ["material-ui" :as mui] [example.utils.theme :refer [with-custom-styles]] [example.demos.demo-text-field :refer [text-field]] [example.utils.theme :refer [with-custom-styles custom-theme]] ...
null
https://raw.githubusercontent.com/headwinds/reagent-reframe-material-ui/8a6fba82a026cfedca38491becac85751be9a9d4/src/example/demos/autocomplete/demo-autocomplete.cljs
clojure
(ns example.demos.autocomplete.demo-autocomplete (:require [reagent.core :as r] ["material-ui" :as mui] [example.utils.theme :refer [with-custom-styles]] [example.demos.demo-text-field :refer [text-field]] [example.utils.theme :refer [with-custom-styles custom-theme]] ...
b2b176e5ac037161e956119a1ff75a6d1e0add4dbcbb1cea309abb076b72d860
ijvcms/chuanqi_dev
hook_lib.erl
%%%------------------------------------------------------------------- @author zhengsiying ( C ) 2015 , < COMPANY > %%% @doc %%% 个人挂机 %%% @end Created : 04 . 八月 2015 下午5:21 %%%------------------------------------------------------------------- -module(hook_lib). -include("common.hrl"). -include("record.hrl"). ...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/hook/hook_lib.erl
erlang
------------------------------------------------------------------- @doc 个人挂机 @end ------------------------------------------------------------------- 回合修正时间间隔 更新最后挂机时间间隔(用于记录最后挂机时间,便于离线后上线奖励计算) boss击杀后下一轮时间 API ==================================================================== API functions ==============...
@author zhengsiying ( C ) 2015 , < COMPANY > Created : 04 . 八月 2015 下午5:21 -module(hook_lib). -include("common.hrl"). -include("record.hrl"). -include("cache.hrl"). -include("config.hrl"). -include("proto.hrl"). -include("language_config.hrl"). -include("log_type_config.hrl"). -export([ init/1, get_obj/3, g...
ee966cb88a6e166cbfbe81943beca663a9ecabd1bda81f915d194f5b7ceadfd7
tlaplus/tlapm
loc.mli
* loc.mli --- source locations * * * Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation * loc.mli --- source locations * * * Copyright (C) 2008-2010 INRIA and Microsoft Corporation *) (** Source locations *) (** A location represents a col in a source file *) type pt_ = { line : int ; ...
null
https://raw.githubusercontent.com/tlaplus/tlapm/b82e2fd049c5bc1b14508ae16890666c6928975f/src/loc.mli
ocaml
* Source locations * A location represents a col in a source file line number beginning of line column number relative to beginning of line, see the implementation of the function `locus_of_position`. * A location that is always invalid (but both = and == itself). * The character offset of a lo...
* loc.mli --- source locations * * * Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation * loc.mli --- source locations * * * Copyright (C) 2008-2010 INRIA and Microsoft Corporation *) } type pt = Actual of pt_ | Dummy val dummy : pt * The line number of the location , st...
1110d0271ee8da6f14b4dedb555d48106c48b4b2f30bdaf328c9e15cefbc9b6b
moostang/autolisp
get_matchline_pairs.lsp
;; ------------------------------------------------------------------------- ;; ;; ------------------------------------------------------------------------- ;; Find pairs of coordinates for matchlines along a centerline . ; ; Created on : March 02 , 2019 ...
null
https://raw.githubusercontent.com/moostang/autolisp/e4f9e624175880a6383850bae58718c48e31ff43/get_matchline_pairs.lsp
lisp
------------------------------------------------------------------------- ;; ------------------------------------------------------------------------- ;; ; ; ------------------------------------------------------------------------- ;; ------------------------------------------------------------------------- ;; ;...
(defun createStripMap(data rowCount fieldMXYZIndices matchlineInterval headerOption / rowStartIndex overlapDistance fieldMIndex totalLength matchlineCount beforeTriplet matchlineIndex mMatchline afterTriplet pairList ) (setq rowStartIndex (getRowStartIndex headerOption)) 10 % ...
685b157d6f5b553d6c0be4d0734c59e47bba0b117c9b93a2ed72183f12d1099e
synduce/Synduce
height.ml
let s0 = 0 let f0 x5 = x5 + 1 let rec target = function Nil -> s0 | Node(a, l, r) -> f0 (target l)
null
https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/extras/solutions/constraints/balanced_tree/height.ml
ocaml
let s0 = 0 let f0 x5 = x5 + 1 let rec target = function Nil -> s0 | Node(a, l, r) -> f0 (target l)
f104cbf795d762833a0ade96cc75080d9ea2eee4b6c93619ef848ac2715c6a12
janestreet/universe
date_bindings.ml
(* THIS CODE IS GENERATED AUTOMATICALLY, DO NOT EDIT BY HAND *) open! Base open! Python_lib open! Python_lib.Let_syntax open! Gen_types open! Gen_import [@@@alert "-deprecated-legacy"] let protect ~f x = try f x with | Py.Err _ as err -> raise err | exn -> raise (Py.Err (SyntaxError, Exn.to_string exn)) ;; let ...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/pythonlib/examples-gen/generated/date_bindings.ml
ocaml
THIS CODE IS GENERATED AUTOMATICALLY, DO NOT EDIT BY HAND Bin_prot__.Shape.t Sexplib0__.Sexp.t -> Core_kernel__Date.t Core_kernel__Date.t -> Sexplib0__.Sexp.t Ppx_hash_lib.Std.Hash.state -> Core_kernel__Date.t -> Ppx_hash_lib.Std.Hash.state string -> Core_kernel__Date.t Core_kernel__Date.t -> string Core...
open! Base open! Python_lib open! Python_lib.Let_syntax open! Gen_types open! Gen_import [@@@alert "-deprecated-legacy"] let protect ~f x = try f x with | Py.Err _ as err -> raise err | exn -> raise (Py.Err (SyntaxError, Exn.to_string exn)) ;; Defunc.no_arg (fun () -> Core_kernel__Date.bin_shape_t |> python_o...
b5bc092072da0349922bf254239bdfe98f98b4c4d490f3f8758d265d15232d26
saturn-lab/BDMI-2019S
李金朋-getfiblist.hs
fib n1 n2 = n1 : fib n2 (n1+n2) getfiblist = fib 1 1
null
https://raw.githubusercontent.com/saturn-lab/BDMI-2019S/77f1e7a341a894f1c673e0f2340ccc37184c04b6/haskell/homework/%E6%9D%8E%E9%87%91%E6%9C%8B-getfiblist.hs
haskell
fib n1 n2 = n1 : fib n2 (n1+n2) getfiblist = fib 1 1
c2bb59714213daa500d48d99cbb6b4ba2f99457d99130e07fb33de33a74a4fdc
icfpcontest2021/icfpcontest2021.github.io
GenerateBonus.hs
{-# LANGUAGE NamedFieldPuns #-} # LANGUAGE RecordWildCards # module BrainWall.Main.GenerateBonus ( main ) where import qualified BrainWall.Box as Box import BrainWall.Database (allFeatures) import BrainWall.Json import BrainWall.Main.InsertProblems ...
null
https://raw.githubusercontent.com/icfpcontest2021/icfpcontest2021.github.io/fb23fea2a8ecec7740017d3dda78d921c1df5a26/toolchain/lib/BrainWall/Main/GenerateBonus.hs
haskell
# LANGUAGE NamedFieldPuns # | Shuffle such that no element ends up at its original position.
# LANGUAGE RecordWildCards # module BrainWall.Main.GenerateBonus ( main ) where import qualified BrainWall.Box as Box import BrainWall.Database (allFeatures) import BrainWall.Json import BrainWall.Main.InsertProblems (iterateProblems, ...
a1df6c6c47d3c29aa38381e5b19c6a90ed552ad4c42b111987a0bfac1a121573
ssardina/ergo
tag-bridge.scm
This is interface code that can be used for an ERGO agent that ;;; uses tagged actions for online interactions this calls define - interface after modifying readfn and printfn to use tag (define (define-tagged-interfaces tag readfn printfn) (define (read-add-tag) (let ((r (readfn))) (if (symbol? r) ...
null
https://raw.githubusercontent.com/ssardina/ergo/4225ebb95779d1748f377cf2e4d0a593d6a2a103/Projects/LEGO/tag-bridge.scm
scheme
uses tagged actions for online interactions setup in and out interfaces over TCP setup in and out interfaces with standard IO
This is interface code that can be used for an ERGO agent that this calls define - interface after modifying readfn and printfn to use tag (define (define-tagged-interfaces tag readfn printfn) (define (read-add-tag) (let ((r (readfn))) (if (symbol? r) (list r tag) (cons (car r) (cons tag (cdr r)))))) ...
4bb9bb2d05ab9e1598bab338ac2b3877f313d16a65aadd8d6d8bb299d03aa53b
didierverna/tfm
character.lisp
;;; character.lisp --- Character Information Copyright ( C ) 2018 , 2019 Author : < > This file is part of TFM . ;; Permission to use, copy, modify, and distribute this software for any ;; purpose with or without fee is hereby granted, provided that the above ;; copyright notice and this permission notic...
null
https://raw.githubusercontent.com/didierverna/tfm/192c10b04eaec381638bfcf9bbea66b208141f5a/core/src/character.lisp
lisp
character.lisp --- Character Information Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF M...
Copyright ( C ) 2018 , 2019 Author : < > This file is part of TFM . THIS SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN (i...
037a48de020d90ea134596b3424e1b844f5481fdaacbede0317718e129c6c53b
robertmeta/cowboy-examples
upload_html.erl
-module(upload_html). -export([init/3, handle/2, terminate/2]). init({tcp, http}, Req, _Opts) -> {ok, Req, undefined_state}. handle(Req, State) -> HtmlContentType = {<<"Content-Type">>, <<"text/html">>}, {ok, Reply} = cowboy_http_req:reply(200, [HtmlContentType], <<" <html><form action='/...
null
https://raw.githubusercontent.com/robertmeta/cowboy-examples/d03c289c9fb0d750eca11e3f1671e74d1841bd09/apps/upload/src/upload_html.erl
erlang
-module(upload_html). -export([init/3, handle/2, terminate/2]). init({tcp, http}, Req, _Opts) -> {ok, Req, undefined_state}. handle(Req, State) -> HtmlContentType = {<<"Content-Type">>, <<"text/html">>}, {ok, Reply} = cowboy_http_req:reply(200, [HtmlContentType], <<" <html><form action='/...
bba64d0dfe39f70ac92b66ea6bfdfef1e6969a96b2efeeb82e5b12abe20e298e
Noeda/dfterm3
CP437ToUnicode.hs
| Module that turns CP437 code points to Unicode code points . -- module Dfterm3.CP437ToUnicode ( cp437ToUnicode , unicodeToCP437 ) where import Data.Word ( Word8 ) import Data.Char ( chr ) import qualified Data.Map as M cp437ToUnicode :: Word8 -> Char cp437ToUnicode 1 = '\x263a' cp437ToUnicode 2 = '\...
null
https://raw.githubusercontent.com/Noeda/dfterm3/6b33c9b4712da486bb84356f6c9f48abb8074faf/src/Dfterm3/CP437ToUnicode.hs
haskell
| Module that turns CP437 code points to Unicode code points . module Dfterm3.CP437ToUnicode ( cp437ToUnicode , unicodeToCP437 ) where import Data.Word ( Word8 ) import Data.Char ( chr ) import qualified Data.Map as M cp437ToUnicode :: Word8 -> Char cp437ToUnicode 1 = '\x263a' cp437ToUnicode 2 = '\x26...
13b6de4f0c9c026b230b88b21b675aa63d7a483acba4538be871160a46cb549e
rainbyte/frag
ReadImage.hs
ReadImage.hs ( adapted from readImage.c which is ( c ) Silicon Graphics , Inc. ) Copyright ( c ) 2002 - 2004 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE This module has been modified to read both color and alpha data n...
null
https://raw.githubusercontent.com/rainbyte/frag/28893048f093f369c896932ff297150ef8ed2dd0/src/ReadImage.hs
haskell
This is probably overkill, but anyway... This is the reason for all this stuff above... Closing a file is nice, even when an error occurs during reading.
ReadImage.hs ( adapted from readImage.c which is ( c ) Silicon Graphics , Inc. ) Copyright ( c ) 2002 - 2004 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE This module has been modified to read both color and alpha data n...
f308ce654b6f18af1e683f22c7950858481035988c4c80014fcd84b39a560f04
racketscript/racketscript
vector.rkt
#lang racket/base (define vec (vector 0 1 2 3)) (displayln vec) (displayln (vector-ref vec 0)) (displayln (vector-ref vec 1)) (displayln (vector-ref vec 2)) (displayln (vector-ref vec 3)) (vector-set! vec 0 3) (vector-set! vec 1 2) (vector-set! vec 2 1) (vector-set! vec 3 0) (displayln vec) (displayln #(1 2 3)) (dis...
null
https://raw.githubusercontent.com/racketscript/racketscript/11400fdd9d11541e7dd40c536c015677a7fa4181/tests/basic/vector.rkt
racket
#lang racket/base (define vec (vector 0 1 2 3)) (displayln vec) (displayln (vector-ref vec 0)) (displayln (vector-ref vec 1)) (displayln (vector-ref vec 2)) (displayln (vector-ref vec 3)) (vector-set! vec 0 3) (vector-set! vec 1 2) (vector-set! vec 2 1) (vector-set! vec 3 0) (displayln vec) (displayln #(1 2 3)) (dis...
4d1d684d4b804822750ce2e316b67fde153a0759d3d1eae16f7c8d9024681752
Bogdanp/nemea
current-visitors.rkt
#lang racket/base (require component net/url racket/contract racket/list racket/match racket/set) (provide (contract-out [struct current-visitors ((session-timeout exact-positive-integer?) (manager-thread (or/c false/c thread?)...
null
https://raw.githubusercontent.com/Bogdanp/nemea/6e6149007fb0c43d8f0fb2271b36f0ccad830703/nemea/components/current-visitors.rkt
racket
broadcast for alice broadcast for bob timeout timeout broadcast for bob timeout timeout timeout
#lang racket/base (require component net/url racket/contract racket/list racket/match racket/set) (provide (contract-out [struct current-visitors ((session-timeout exact-positive-integer?) (manager-thread (or/c false/c thread?)...
2310a4316ec5da2bc9c89aa58582f48e534ab762cfb13b253f4aa2e815b8fa43
lisp-mirror/cl-tar
fd-stream.lisp
;;;; This is part of cl-tar. See README.md and LICENSE for more information. (in-package #:tar-extract) (define-condition fd-stream-error (stream-error) ()) (define-condition simple-fd-stream-error (fd-stream-error simple-error) ()) (defclass directory-fd-stream () ((fd :initarg :fd :reader fd :d...
null
https://raw.githubusercontent.com/lisp-mirror/cl-tar/8369f16b51dfe04dc68c2ebf146c769d4bc7d471/src/extract/fd-stream.lisp
lisp
This is part of cl-tar. See README.md and LICENSE for more information. Still directories to traverse. replace the symlink with a directory. If the file doesn't seem to exist, add O_EXCL to our flags and try to open it. The O_EXCL ensures we get an error if the file is created between the stat and open calls The...
(in-package #:tar-extract) (define-condition fd-stream-error (stream-error) ()) (define-condition simple-fd-stream-error (fd-stream-error simple-error) ()) (defclass directory-fd-stream () ((fd :initarg :fd :reader fd :documentation "The underlying file descriptor."))) (defclass fd-stream (t...
86db6da4025e7f706d12533097343a39ccb9fc71abd25b02dbabb7a398aa0c5c
OCamlPro/ocp-build
test.ml
(**************************************************************************) (* *) (* Typerex Libraries *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/libs/ocplib-lang/test.ml
ocaml
************************************************************************ Typerex Libraries ...
Copyright 2011 - 2017 OCamlPro SAS the GNU Lesser General Public License version 2.1 , with the Few lines from xen-api.git/ocaml/xapi/quicktest_common.ml Copyright ( C ) 2006 - 2009 Citrix Systems Inc. LGPL v2.1 open StringCompat let total_started = ref 0 le...
e8476a2911f28db05ea95897ca6d11d8240425299e30f052675d2380cef96a61
monadfix/ormolu-live
Avail.hs
# LANGUAGE CPP # {-# LANGUAGE DeriveDataTypeable #-} -- ( c ) The University of Glasgow -- #include "HsVersions2.h" module Avail ( Avails, AvailInfo(..), avail, availsToNameSet, availsToNameSetWithSelectors, availsToNameEnv, availName, availNames, availNonFldNames, availNamesWithSele...
null
https://raw.githubusercontent.com/monadfix/ormolu-live/d8ae72ef168b98a8d179d642f70352c88b3ac226/ghc-lib-parser-8.10.1.20200412/compiler/basicTypes/Avail.hs
haskell
# LANGUAGE DeriveDataTypeable # ----------------------------------------------------------------------------- | An ordinary identifier in scope | A type or class in scope The __AvailTC Invariant__: If the type or class is itself to be in scope, it must be /first/ in this list. Thus, typically: ^ The name of ...
# LANGUAGE CPP # ( c ) The University of Glasgow #include "HsVersions2.h" module Avail ( Avails, AvailInfo(..), avail, availsToNameSet, availsToNameSetWithSelectors, availsToNameEnv, availName, availNames, availNonFldNames, availNamesWithSelectors, availFlds, availsNamesWithO...
4542cb1872bdc72732b703cc5d0b19b24a6a147b06c16faac941c7cb7afc463f
squirrel-prover/squirrel-prover
action.ml
open Utils type 'a item = { par_choice : int * 'a ; (** position in parallel compositions *) sum_choice : int * 'a (** position in conditionals *) } type 'a t = 'a item list (** Strict dependency [a < b]. *) let depends a b = let rec aux a b = match a, b with | [], _::_ -> true | hda::tla, hdb::tlb w...
null
https://raw.githubusercontent.com/squirrel-prover/squirrel-prover/d25b6dab570ea0e99915059a67599fd3a38caa8b/src/action.ml
ocaml
* position in parallel compositions * position in conditionals * Strict dependency [a < b]. * Distance in control-flow graph. Return [None] when there is no * dependency, and [Some 0] when the actions are equal. * Action symbols * Pretty-printing * Print integers in action shapes. * Print list of indices in ac...
open Utils type 'a item = { } type 'a t = 'a item list let depends a b = let rec aux a b = match a, b with | [], _::_ -> true | hda::tla, hdb::tlb when hda = hdb -> aux tla tlb | _ -> false in aux a b let distance a b = let rec aux a b = match a, b with | [], _ -> Some (List.length b) | hd...
f0f060288f5facc6c4ac394c6a53f7c518c3f39c8caf86a73647d2a14aa36576
mainej/schema-voyager
additional_fields.cljs
(ns schema-voyager.html.components.additional-fields) (defn additional-fields [fields] (when (seq fields) [:dl.divide-y (for [[field value] (sort-by first fields)] ^{:key field} [:div.sm:flex.p-4.sm:p-6 [:dt.sm:w-1|3 (pr-str field)] [:dd (pr-str value)]])]))
null
https://raw.githubusercontent.com/mainej/schema-voyager/eaf0367ec639f5a2e9238a5b1fbbb2fc2d76d520/src/web/schema_voyager/html/components/additional_fields.cljs
clojure
(ns schema-voyager.html.components.additional-fields) (defn additional-fields [fields] (when (seq fields) [:dl.divide-y (for [[field value] (sort-by first fields)] ^{:key field} [:div.sm:flex.p-4.sm:p-6 [:dt.sm:w-1|3 (pr-str field)] [:dd (pr-str value)]])]))
05f252f7f0a9cf10ca066c4cab67e7335414c0c1ae984896120e3e6b929f9936
uccmisl/dashc
dashc.ml
* dashc , client emulator for DASH video streaming * Copyright ( c ) 2016 - 2018 , , University College Cork * * This program is free software ; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation ; eit...
null
https://raw.githubusercontent.com/uccmisl/dashc/8a97ceb2bdf6a74bde410be9a1d1432d5e11445a/src/dashc.ml
ocaml
* dashc , client emulator for DASH video streaming * Copyright ( c ) 2016 - 2018 , , University College Cork * * This program is free software ; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation ; eit...
112a8aa32548d2abf7c6730f2ffac845f73e20a0ec1a075b76ca112d1901e40b
awakesecurity/spectacle
Env.hs
{-# OPTIONS_HADDOCK show-extensions #-} -- | -- Module : Language.Spectacle.Syntax.Env Copyright : ( c ) Arista Networks , 2022 - 2023 License : Apache License 2.0 , see LICENSE -- -- Stability : stable Portability : non - portable ( GHC extensions ) -- -- TODO: docs -- -- @since 1.0.0 mod...
null
https://raw.githubusercontent.com/awakesecurity/spectacle/430680c28b26dabb50f466948180eb59ba72fc8e/src/Language/Spectacle/Syntax/Env.hs
haskell
# OPTIONS_HADDOCK show-extensions # | Module : Language.Spectacle.Syntax.Env Stability : stable TODO: docs @since 1.0.0 --------------------------------------------------------------------------------------------------------------------- # INLINE get # # INLINE gets #
Copyright : ( c ) Arista Networks , 2022 - 2023 License : Apache License 2.0 , see LICENSE Portability : non - portable ( GHC extensions ) module Language.Spectacle.Syntax.Env ( Env (Env), Effect (Get, Put), get, gets, put, modify, runEnv, ) where import Data.Coerce (co...
6368e92f27734e11519a80193d85610a54e6fbaee4df374cdf8806035b46b7d1
kingcons/cl-6502
disassemble.lisp
(in-package :6502) (defmacro with-disasm ((start end &key op) &body body) "Loop from START to END, passing each instruction to OP and execute BODY. OP is PRINT-INSTRUCTION by default. Within BODY, the return value of OP is bound to RESULT and the length of the instruction in bytes is bound to STEP." `(loop with in...
null
https://raw.githubusercontent.com/kingcons/cl-6502/0fbce82c55a63df0ceaf17d6e3d952219514a949/src/disassemble.lisp
lisp
(in-package :6502) (defmacro with-disasm ((start end &key op) &body body) "Loop from START to END, passing each instruction to OP and execute BODY. OP is PRINT-INSTRUCTION by default. Within BODY, the return value of OP is bound to RESULT and the length of the instruction in bytes is bound to STEP." `(loop with in...
ec390071316c076b703967ba75ccfcefdc3fef7e09d28cdc4595b9d05f59318c
braidchat/braid
notify_rules.clj
(ns braid.core.server.notify-rules (:require [clojure.set :as set] [braid.chat.db.tag :as tag] [braid.chat.db.thread :as thread] [braid.core.common.util :as util] [braid.core.common.schema :as schema])) (defn tag->group [tag-id] (tag/tag-group-id tag-id)) (defn thread->tags [thread-id] (...
null
https://raw.githubusercontent.com/braidchat/braid/2e44eb6e77f1d203115f9b9c529bd865fa3d7302/src/braid/core/server/notify_rules.clj
clojure
notify if... ...you want to be notified by anything in any group ...or by a tag that this thread has ...or by anything in this group ...or by a mention... in any group or this group
(ns braid.core.server.notify-rules (:require [clojure.set :as set] [braid.chat.db.tag :as tag] [braid.chat.db.thread :as thread] [braid.core.common.util :as util] [braid.core.common.schema :as schema])) (defn tag->group [tag-id] (tag/tag-group-id tag-id)) (defn thread->tags [thread-id] (...
11af79c7e92f097d122edfe1d277bb683614ce7c9d47a29e4111e2a5cef55366
backtracking/cfrac
bench.ml
open Format open Cfrac open Unix let start, stop = let t = ref 0. in (fun () -> t := (times()).tms_utime), (fun () -> printf "=> %f s@." ((times()).tms_utime -. !t)) let test ?(n=1_000_000) msg x = printf "%s:@." msg; printf " to_float: @?"; start (); for _ = 1 to n do ignore (to_float x) done; stop...
null
https://raw.githubusercontent.com/backtracking/cfrac/3be4cff8a2372985fa4f17bf0bbe907993c4a88b/bench.ml
ocaml
open Format open Cfrac open Unix let start, stop = let t = ref 0. in (fun () -> t := (times()).tms_utime), (fun () -> printf "=> %f s@." ((times()).tms_utime -. !t)) let test ?(n=1_000_000) msg x = printf "%s:@." msg; printf " to_float: @?"; start (); for _ = 1 to n do ignore (to_float x) done; stop...
670c2815c1d7677234033ddc78c879829a5dc44e1271ddf549543d946e423f49
RyanMcG/Cadence
project.clj
(defproject cadence "0.4.3-SNAPSHOT" :description "Use pattern recognition to match users with Cadence.js output." :url "/" :min-lein-version "2.0.0" :license {:name "Eclipse Public License" :url "-v10.html"} :profiles {:dev {:marginalia {:css ["/docs/marginalia.css"]}} :production {:...
null
https://raw.githubusercontent.com/RyanMcG/Cadence/c7364cba7e2de48c8a0b90f0f4d16a8248c097d4/project.clj
clojure
(defproject cadence "0.4.3-SNAPSHOT" :description "Use pattern recognition to match users with Cadence.js output." :url "/" :min-lein-version "2.0.0" :license {:name "Eclipse Public License" :url "-v10.html"} :profiles {:dev {:marginalia {:css ["/docs/marginalia.css"]}} :production {:...
8c24bd03a2af403da47414b7703397c2153e2015b84f3ff829aea60135495c1d
k-stz/cl-ptrace
proc-pid-dir.lisp
(in-package :cl-ptrace) ;;; /proc/<pid>/maps and ;;; /proc/<pid>/mem operations (defun get-maps-path (&optional (pid *pid*)) (concatenate 'string "/proc/" (format nil "~a" pid) "/maps")) (defun parse-proc-pid-maps (&optional (pid *pid*) (parse-this-file-instead nil)) "Return a list of pli...
null
https://raw.githubusercontent.com/k-stz/cl-ptrace/10b95e226d21e0059e0ce0ff6130895522ec64b4/cl-ptrace/proc-pid-dir.lisp
lisp
/proc/<pid>/maps and /proc/<pid>/mem operations condition of type END-OF-FILE nil quick hack " /some/path/etc" -> "/some/path/etc Takes the output from `parse-proc-pid-maps' and creates a list of memory regions that are all readable they have a :dev entry or :pathname they're probably loaded from somewh...
(in-package :cl-ptrace) (defun get-maps-path (&optional (pid *pid*)) (concatenate 'string "/proc/" (format nil "~a" pid) "/maps")) (defun parse-proc-pid-maps (&optional (pid *pid*) (parse-this-file-instead nil)) "Return a list of plists with GETFable columns of /proc/pid/maps" (let (map...
cd6c9950026ca9810950bf34f9462c015245b9939444a2e5e7e04afa4b6313f8
camllight/camllight
myTypeParser.mli
type token = IDENT of string | INFIX of string | INT of int | CHAR of char | FLOAT of float | STRING of string | EOF | MULTIPLICATIVE of string | ADDITIVE of string | SUBTRACTIVE of string | CONCATENATION of string | COMPARISON of string | EQUAL | EQUALEQUAL | SHARP | BANG | AMPERSAN...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/search_isos/myTypeParser.mli
ocaml
type token = IDENT of string | INFIX of string | INT of int | CHAR of char | FLOAT of float | STRING of string | EOF | MULTIPLICATIVE of string | ADDITIVE of string | SUBTRACTIVE of string | CONCATENATION of string | COMPARISON of string | EQUAL | EQUALEQUAL | SHARP | BANG | AMPERSAN...
66ef8d74f6960a7052fa03265c171fae63c6ea19fa5923c1ed49f14f2a9520db
mauny/the-functional-approach-to-programming
fonts.ml
(* *) (* Projet Formel *) (* *) CAML - light : (* ...
null
https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/MLGRAPH.DIR/fonts.ml
ocaml
Projet Formel ********************************...
CAML - light : 45 rue d'Ulm 75005 PARIS France $ I d : fonts.mlp , v 1.1 1997/08/14 11:34:25 ...
6f2cc69cb3501050bf3ecf433d963f7496a7975a510d89ab9998f236c44f4568
l29ah/hatexmpp3
Roster.hs
{-# LANGUAGE OverloadedStrings #-} module GTK.Roster ( spawnRosterWindow ) where import Control.Concurrent import Control.Concurrent.STM import Control.Monad.Reader import Data.Text (Text) import qualified Data.Text as T import Data.Tree import Graphics.UI.Gtk hiding (eventKeyName, eventModifier) import qualified Gr...
null
https://raw.githubusercontent.com/l29ah/hatexmpp3/9d3e25c6acf4c0978a2c1d88b3572ad20b1c228d/GTK/Roster.hs
haskell
# LANGUAGE OverloadedStrings #
module GTK.Roster ( spawnRosterWindow ) where import Control.Concurrent import Control.Concurrent.STM import Control.Monad.Reader import Data.Text (Text) import qualified Data.Text as T import Data.Tree import Graphics.UI.Gtk hiding (eventKeyName, eventModifier) import qualified Graphics.UI.Gtk.ModelView as MView im...
30f0678ab35b96d5ecad3ee68d0ece23eec47fedaca1c81a200dbb08a1750eb9
dktr0/estuary
Notepad.hs
# LANGUAGE OverloadedStrings , RecursiveDo # module Estuary.Widgets.Notepad where import Reflex import Reflex.Dom import Control.Monad import Data.Text (Text) import Data.Sequence as Seq import Data.Text as T import GHCJS.DOM.EventM import Estuary.Widgets.W import Estuary.Types.Definition import Estuary.Widgets.Refl...
null
https://raw.githubusercontent.com/dktr0/estuary/41c4ceeaaa7cc9183b53db4b9d961acbbe686bc0/client/src/Estuary/Widgets/Notepad.hs
haskell
[] [] add note :: m (Event t (Notepad -> Notepad)) erase note :: m (Event t (Notepad -> Notepad)) prev page :: m (Event t ()) :: m (Event t (Notepad -> Notepad)) next page :: m (Event t ()) :: m (Event t (Notepad -> Notepad)) (t,c) (t,c) :: (Event t Text, Event t Text) :: m (Event t (Notepad -> Notepad...
# LANGUAGE OverloadedStrings , RecursiveDo # module Estuary.Widgets.Notepad where import Reflex import Reflex.Dom import Control.Monad import Data.Text (Text) import Data.Sequence as Seq import Data.Text as T import GHCJS.DOM.EventM import Estuary.Widgets.W import Estuary.Types.Definition import Estuary.Widgets.Refl...
5267e4947a0a50988d9ab3f71555c1e63d4b1660c407c45cafeac25eccb951b0
coq/coq
microPG.ml
(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * *...
null
https://raw.githubusercontent.com/coq/coq/e0de9db708817cc08efb20d65b9819d8f2b0ea68/ide/coqide/microPG.ml
ocaml
********************************************************************** * The Coq Proof Assistant / The Coq Development Team // * This file is distributed under the terms of the * (see LICENSE file for the text of the license) ************************************...
v * Copyright INRIA , CNRS and contributors < O _ _ _ , , * ( see version control and CREDITS file for authors & dates ) \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * GNU Lesser Gener...
55e2f6bd89ccfa6af1eb2ee4dbeec658e4ae1b265a69193925b00e7d303c5eeb
joshaber/clojurem
compiler.clj
Copyright ( c ) . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/joshaber/clojurem/cf60fc6a8ef0e9065a1219c33ca39176ee88c2de/src/clj/cljm/compiler.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) . All rights reserved . (set! *warn-on-reflection* true) (ns cljm.compiler (:refer-clojure :exclude [munge macroexpand-1]) (:require [clojure.java.io :as io] [clojure.string :as string] [cljm.tagged-literals :as tags] [cljm.analyzer :as ana] [c...
f38cd185d673f55869c05a002888724baadc667a5a2a2b45bf8f967be74d285e
gedge-platform/gedge-platform
jose_curve25519_unsupported.erl
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- %% vim: ts=4 sw=4 ft=erlang noet %%%------------------------------------------------------------------- @author < > 2014 - 2016 , %%% @doc %%% %%% @end Created : 02 Jan 2016 by < > %%%---------------------------...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/jose/src/jose_curve25519_unsupported.erl
erlang
vim: ts=4 sw=4 ft=erlang noet ------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- jose_curve25519 callbacks ==================================================================== jose_curve25519 callbacks =================...
-*- mode : erlang ; tab - width : 4 ; indent - tabs - mode : 1 ; st - rulers : [ 70 ] -*- @author < > 2014 - 2016 , Created : 02 Jan 2016 by < > -module(jose_curve25519_unsupported). -behaviour(jose_curve25519). -export([eddsa_keypair/0]). -export([eddsa_keypair/1]). -export([eddsa_secret_to_public...
065eb3eb4e8d4ae228e837be69f5ba3880cb00ac03c8d3122a9c554f96e24f20
ahrefs/ocaml-elastic
elastic_query_dsl.mli
type term type query type top_query val bool_val : bool -> term val int_val : int -> term val int64_val : Int64.t -> term val float_val : float -> term val string_val : string -> term val list_val : ('a -> term) -> 'a list -> term val int64_list : Int64.t list -> term val bool_list : bool list -> term val in...
null
https://raw.githubusercontent.com/ahrefs/ocaml-elastic/a25aab7ab321e0302bd5c8e2d7e7a4217ab1ed8a/elastic_query_dsl.mli
ocaml
* NB term is usually split on word boundaries (tokenized), will not work for multi-word query * NB wildcard on analyzed fields will only match per-term, use wildcard on non-analyzed subfield for multi-word grepping
type term type query type top_query val bool_val : bool -> term val int_val : int -> term val int64_val : Int64.t -> term val float_val : float -> term val string_val : string -> term val list_val : ('a -> term) -> 'a list -> term val int64_list : Int64.t list -> term val bool_list : bool list -> term val in...
efc3c9db626155de7b535146ef38c446c4849adfbd259cd5901934baaf02d86f
manavpatnaik/haskell
24_change_case.hs
changeCase :: String -> String changeCase "" = "" changeCase (x:xs) | (x >= 'a') && (x <= 'z') = toEnum ((fromEnum x) - 32) : changeCase xs | (x >= 'A') && (x <= 'Z') = toEnum ((fromEnum x) + 32) : changeCase xs | otherwise = x : changeCase xs main = do print(changeCase "Manav") print(changeCase "m...
null
https://raw.githubusercontent.com/manavpatnaik/haskell/af45c3eb5c3461aa77cf25610dfcb3b41c7f7ef9/practice-set-1-basics/24_change_case.hs
haskell
changeCase :: String -> String changeCase "" = "" changeCase (x:xs) | (x >= 'a') && (x <= 'z') = toEnum ((fromEnum x) - 32) : changeCase xs | (x >= 'A') && (x <= 'Z') = toEnum ((fromEnum x) + 32) : changeCase xs | otherwise = x : changeCase xs main = do print(changeCase "Manav") print(changeCase "m...
8369cce9c5fd0fc6f2f01740615e4ac194383def6789527aca5c538109313249
potapenko/playphraseme-site
validation.cljc
(ns playphraseme.validation (:require [struct.core :as st]))
null
https://raw.githubusercontent.com/potapenko/playphraseme-site/d50a62a6bc8f463e08365dca96b3a6e5dde4fb12/src/cljc/playphraseme/validation.cljc
clojure
(ns playphraseme.validation (:require [struct.core :as st]))
a1a4d1c6d735263448f12075f45b3bdd009c4e7abd9d8c5142524914aece18ab
gedge-platform/gedge-platform
gr_manager_sup.erl
Copyright ( c ) 2013 , < > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS A...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/goldrush/src/gr_manager_sup.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2013 , < > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN { @link gr_param : start_link/0 . < em > Param</em > } ets...
34909b7bc0c7b9ceb73b377bf0cd2ccde677c318bf438cb7dd181004f187707c
baryluk/ex11
tcp_server.erl
Copyright ( C ) 2002 , %% File : tcp_server.erl Author : ( ) %% Purpose : Keeps track of a number of TCP sessions Last modified : 2002 - 11 - 17 -module(tcp_server). -export([start_raw_server/4, start_client/3]). -export([stop/1]). -export([children/1]). %% -export([start_child/3]). start_raw_serv...
null
https://raw.githubusercontent.com/baryluk/ex11/be8abc64ab9fb50611f93d6631fc33ffdee08fdb/widgets/tcp_server.erl
erlang
File : tcp_server.erl Purpose : Keeps track of a number of TCP sessions -export([start_child/3]). Then Fun(Socket) is called. a typical server is usually written like this: To setup a lister start_server(Port) -> S = self(), process_flag(trap_exit, true), tcp_server:start_raw_server(Port...
Copyright ( C ) 2002 , Author : ( ) Last modified : 2002 - 11 - 17 -module(tcp_server). -export([start_raw_server/4, start_client/3]). -export([stop/1]). -export([children/1]). start_raw_server(Port , Fun , Max ) This server accepts up to connections on Port The * first * time a connection i...
cfd14398c40838ba0c9a4110676e758cb3a38ed5e136ef8a9e8b4a656c152ed6
haskell/cabal
Foobar.hs
module Foobar where
null
https://raw.githubusercontent.com/haskell/cabal/00a2351789a460700a2567eb5ecc42cca0af913f/cabal-testsuite/PackageTests/Backpack/Includes5/impl/Foobar.hs
haskell
module Foobar where
04f6e736e0e7c78cfd07be0d836fbe8884df2244a7d1a3ce3167f156fd602036
gilith/hol-light
calc_num.ml
(* ========================================================================= *) (* Calculation with naturals. *) (* *) , University of Cambridge Computer Laboratory (* ...
null
https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/calc_num.ml
ocaml
========================================================================= Calculation with naturals. ===============...
, University of Cambridge Computer Laboratory ( c ) Copyright , University of Cambridge 1998 ( c ) Copyright , 1998 - 2007 needs "arith.ml";; Simple rule to get rid of NUMERAL constant . let ...
d588be6e7be35c2e86b3eca60a9b275d8234b00364740cadc389c94772d3435e
gator1/jepsen
project.clj
(defproject jepsen.etcdemo "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :main jepsen.etcdemo :dependencies [[org.clojure/clojure "1.8.0"] [jepsen "0.1.4"] [verschlimmbesserung "0.1.3"]]...
null
https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/etcdemo/project.clj
clojure
(defproject jepsen.etcdemo "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :main jepsen.etcdemo :dependencies [[org.clojure/clojure "1.8.0"] [jepsen "0.1.4"] [verschlimmbesserung "0.1.3"]]...
52758d8c4cf4b4b5b99d8b440260d7ed0f1a652469bea7451df043d263f80795
kframework/semantic-approaches
SmallStep.hs
module SemanticModel.SmallStep ( Transition, o, nStep , manyStep , stepRun , isLiteral, isNotLiteral, rules , Trace(..), runTrace , get, put, modify, runStateT, gets, mzero, mplus , state ) where import Data.Hashable ( hash ) import Control.Monad.State.Lazy import Data.List.Extra ( nubOn ) class (Eq c...
null
https://raw.githubusercontent.com/kframework/semantic-approaches/6f64eac09e005fe4eae7141e3c0e0f5711da0647/haskell/semantic-styles/src/SemanticModel/SmallStep.hs
haskell
module SemanticModel.SmallStep ( Transition, o, nStep , manyStep , stepRun , isLiteral, isNotLiteral, rules , Trace(..), runTrace , get, put, modify, runStateT, gets, mzero, mplus , state ) where import Data.Hashable ( hash ) import Control.Monad.State.Lazy import Data.List.Extra ( nubOn ) class (Eq c...
64756d10f4d2b6aff2e33e36e257312688d8828fb1a979007ae0b0113871b069
ocaml/oasis
BaseData.mli
(******************************************************************************) OASIS : architecture for building OCaml libraries and applications (* *) Copyright ( C ) 2011 - 2016 , Copyrig...
null
https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/src/base/BaseData.mli
ocaml
**************************************************************************** This library is free software; you can redistribute it and/or modify it under the t...
OASIS : architecture for building OCaml libraries and applications Copyright ( C ) 2011 - 2016 , Copyright ( C ) 2008 - 2011 , OCamlCore SARL the Free Software Foundation ; either version 2.1 of the License , or ( at You s...
34295e6bf063a28760bcb0e303dcf0778ad0d86e638a35b38ce70bb0839bcd8a
austral/austral
TypeParameters.ml
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions . See LICENSE file for details . SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions. See LICENSE file for details. SPDX...
null
https://raw.githubusercontent.com/austral/austral/69b6f7de36cc9576483acd1ac4a31bf52074dbd1/lib/TypeParameters.ml
ocaml
Convert both sets to lists If any element of b appears in a, error.
Part of the Austral project , under the Apache License v2.0 with LLVM Exceptions . See LICENSE file for details . SPDX - License - Identifier : Apache-2.0 WITH LLVM - exception Part of the Austral project, under the Apache License v2.0 with LLVM Exceptions. See LICENSE file for details. SPDX...
300347df48c105b70bd8c33f2fcef1576cd588343d0ab6c5be18e9a9d2bf6ba6
rems-project/cerberus
smt2.ml
open Nondeterminism open Memory_model open Global_ocaml let pad = ref 0 prerr_endline ( String.make ! pad ' ' ^ str ) let do_red str= "\x1b[31m" ^ str ^ "\x1b[0m" let runND exec_mode (type cs) cs_module (m: ('a, Driver.step_kind, 'err, cs, 'st) ndM) (st0: 'st) = prerr "ENTERING runND"; Debug_ocaml.print_debug...
null
https://raw.githubusercontent.com/rems-project/cerberus/f9b43246f0b9fa5a6bbfadbdfb82e7bcb0786f2b/ocaml_frontend/smt2.ml
ocaml
rec >>= function | [] -> with_backtracking m xs' | ys -> return ys in TODO: graph export with_constraints debug_str backtrack prerr "EXITING";
open Nondeterminism open Memory_model open Global_ocaml let pad = ref 0 prerr_endline ( String.make ! pad ' ' ^ str ) let do_red str= "\x1b[31m" ^ str ^ "\x1b[0m" let runND exec_mode (type cs) cs_module (m: ('a, Driver.step_kind, 'err, cs, 'st) ndM) (st0: 'st) = prerr "ENTERING runND"; Debug_ocaml.print_debug...
36e5e2098b1cbaa9751ba1bf9624b5f07f13d56b9f0f2a14289ef8d7a48c7d9e
Lambda-Logan/faker
CreditCard.hs
| Module : Faker . App Description : Module for generating fake credit card numbers Copyright : ( c ) , 2014 - 2018 License : MIT Maintainer : Stability : experimental Portability : POSIX Fake data Module : Faker.App Description : Module for generating f...
null
https://raw.githubusercontent.com/Lambda-Logan/faker/8935346192e67631b97c1a52f6644ba5ed48a1a2/src/Faker/CreditCard.hs
haskell
* Functions for generate fake credit card numbers | Returns random mastercard card number, i.e. "5524-7275-2305-9123" | Returns random discover card number, i.e. "6485-6297-9249-9908-4511" | Returns random solo card number, i.e. "6767-9171-7219-8374-98" | Returns random dankort card number, i.e. "5019-5391-9757-35...
| Module : Faker . App Description : Module for generating fake credit card numbers Copyright : ( c ) , 2014 - 2018 License : MIT Maintainer : Stability : experimental Portability : POSIX Fake data Module : Faker.App Description : Module for generating f...
efd045deb5a53c738d6740dfe378482b68310d4458c3e1f6cf3250b744e00767
haskell/cabal
Lens.hs
module Distribution.Types.BuildInfo.Lens ( BuildInfo, HasBuildInfo (..), HasBuildInfos (..), ) where import Distribution.Compat.Lens import Distribution.Compat.Prelude import Prelude () import Distribution.Compiler (PerCompilerFlavor) import Distribution.ModuleName (Mod...
null
https://raw.githubusercontent.com/haskell/cabal/0abbe37187f708e0a5daac8d388167f72ca0db7e/Cabal-syntax/src/Distribution/Types/BuildInfo/Lens.hs
haskell
# INLINE includes # # INLINE includes #
module Distribution.Types.BuildInfo.Lens ( BuildInfo, HasBuildInfo (..), HasBuildInfos (..), ) where import Distribution.Compat.Lens import Distribution.Compat.Prelude import Prelude () import Distribution.Compiler (PerCompilerFlavor) import Distribution.ModuleName (Mod...
063962d2866bcb5c74aa1ff1d1f0bf24dd6b0df03d240b6552893428e803fcd8
sqd/haskell-C89-interpreter
Grammar.hs
module Grammar( Exp(..), VarInit(..), VariableDeclaration(..), FunctionDefinition(..), StructDefinition(..), Jump(..), Program(..), Structure(..), )where import Definition import Type data Exp = Exp Identifier [Exp] | Constant Literal deriving Show data VarInit = InitList [Exp] | InitExp Exp deriving Show data Variab...
null
https://raw.githubusercontent.com/sqd/haskell-C89-interpreter/cd0cd344cf07eba29a906b62fb31ea120adfca86/Grammar.hs
haskell
module Grammar( Exp(..), VarInit(..), VariableDeclaration(..), FunctionDefinition(..), StructDefinition(..), Jump(..), Program(..), Structure(..), )where import Definition import Type data Exp = Exp Identifier [Exp] | Constant Literal deriving Show data VarInit = InitList [Exp] | InitExp Exp deriving Show data Variab...
281674648d03fd16a82a028f7913571209a5f16adf991a8b00d888fd226bdb02
acl2/acl2
top.lisp
C Library ; Copyright ( C ) 2023 Kestrel Institute ( ) Copyright ( C ) 2023 Kestrel Technology LLC ( ) ; License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . ; Author : ( ) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (in-package "C") (i...
null
https://raw.githubusercontent.com/acl2/acl2/2ca2950fc647e50315cee2b8a07e36694f7e61f4/books/kestrel/c/atc/symbolic-execution-rules/top.lisp
lisp
We define a theory for the rules because experiments show that a long time is spent by ACL2 translating hints, We use this theory in the generated proofs (see generation.lisp).
C Library Copyright ( C ) 2023 Kestrel Institute ( ) Copyright ( C ) 2023 Kestrel Technology LLC ( ) License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 . Author : ( ) (in-package "C") (include-book "../symbolic-computation-states") (include-book "../shallow-embedding") (i...
bedd39cce66b2099d138723c38d34cdd1d87b2f36025b45ac8725f0eeaf82831
Risto-Stevcev/bastet
Functions.ml
open Interface let const, flip = let open Function in const, flip and id = let open Function.Category in id and ( <. ) = Function.Infix.( <. ) module Monoid (M : MONOID) = struct module I = Infix.Magma (M) let power = (fun x p -> let open I in let rec go p = match p with ...
null
https://raw.githubusercontent.com/Risto-Stevcev/bastet/030db286f57d2e316897f0600d40b34777eabba6/bastet/src/Functions.ml
ocaml
open Interface let const, flip = let open Function in const, flip and id = let open Function.Category in id and ( <. ) = Function.Infix.( <. ) module Monoid (M : MONOID) = struct module I = Infix.Magma (M) let power = (fun x p -> let open I in let rec go p = match p with ...
b592f76eb861f14be1ca91d8662edbf34af6a514e29e02fcd826578f43e8dd04
tweag/linear-base
Linear.hs
# LANGUAGE MagicHash # # LANGUAGE NoImplicitPrelude # -- | This module defines a stream-like type named 'Replicator', which is mainly used in the definition of the ' Data . Unrestricted . Linear . ' -- class to provide efficient linear duplication. -- The API of 'Replicator' is close to the one of an infinite strea...
null
https://raw.githubusercontent.com/tweag/linear-base/69f1b73f852dac5fbdd7294dd8d709f73c634efb/src/Data/Replicator/Linear.hs
haskell
| This module defines a stream-like type named 'Replicator', which is class to provide efficient linear duplication. The API of 'Replicator' is close to the one of an infinite stream: it can either produce a new value linearly (with 'next' or 'next#'), or be linearly discarded (with 'consume' or 'extract'). A cr...
# LANGUAGE MagicHash # # LANGUAGE NoImplicitPrelude # mainly used in the definition of the ' Data . Unrestricted . Linear . ' types to be given an efficient instance of ' Data . Unrestricted . Linear . ' . ' Data . Unrestricted . Linear . ' typically involve deep copies . The implementation of ' pure ' lets...
b72b8b8e96c4ea1d4aeca046d37f4905a1ba6d2245122fcd003e7e4f825b6285
Ramarren/cells
hello-world-q.lisp
;; -*- mode: Lisp; Syntax: Common-Lisp; Package: cells; -*- ;;; ;;; Copyright ( c ) 1995,2003 by . ;;; ;;; Permission is hereby granted, free of charge, to any person obtaining a copy ;;; of this software and associated documentation files (the "Software"), to deal in the Software without restriction , includi...
null
https://raw.githubusercontent.com/Ramarren/cells/cced2e55c363572914358c0a693ebac2caed4e22/cells-test/hello-world-q.lisp
lisp
-*- mode: Lisp; Syntax: Common-Lisp; Package: cells; -*- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to do so, subject to th...
Copyright ( c ) 1995,2003 by . in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is furnished all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIN...
de23ece90810e52de02ada6aeaeac0ff0e58fdd88f7505b5015aed39303ef926
hyperfiddle/electric
compiler2.cljc
(ns dustin.compiler2 (:require [minitest :refer [tests]] [missionary.core :as m] [dustin.trace25 :refer [from-trace!]])) (def conjv (fnil conj [])) (def conjs (fnil conj #{})) (defn parenting [acc parent child] (-> acc (assoc-in [child :parent] parent) (update-in [parent :children]...
null
https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/dustin/y2021/compiler2.cljc
clojure
RUNTIME ;; ; Stop the reactor
(ns dustin.compiler2 (:require [minitest :refer [tests]] [missionary.core :as m] [dustin.trace25 :refer [from-trace!]])) (def conjv (fnil conj [])) (def conjs (fnil conj #{})) (defn parenting [acc parent child] (-> acc (assoc-in [child :parent] parent) (update-in [parent :children]...
c9c8d26e2cea89281ae39727d318f87a500f2fcb42d6acf515ac863d33ff901a
roburio/utcp
utcp.ml
type state = State.t let empty = State.empty let start_listen = State.start_listen let stop_listen = State.stop_listen type flow = State.Connection.t module FM = State.CM let pp_flow = State.Connection.pp let peers (src, src_port, dst, dst_port) = (src, src_port), (dst, dst_port) type output = Ipaddr.t * Ipad...
null
https://raw.githubusercontent.com/roburio/utcp/6cf6100a256caba3f3346d70bfc514aa8d371ca6/src/utcp.ml
ocaml
type state = State.t let empty = State.empty let start_listen = State.start_listen let stop_listen = State.stop_listen type flow = State.Connection.t module FM = State.CM let pp_flow = State.Connection.pp let peers (src, src_port, dst, dst_port) = (src, src_port), (dst, dst_port) type output = Ipaddr.t * Ipad...
fa141ea639dae642e19c2270ca65938e532b9d28d15bdc85bdb35dd01a75f145
psholtz/MIT-SICP
exercise1-44.scm
;; Exercise 1.44 ;; ;; The idea of "smoothing" a function is an important concept in signal processing. If f is a function ;; and dx is some small number, then the smoothed version of f is the function whose value at a point x ;; is the average of f(x-dx), f(x), f(x+dx). Write a procedure "smooth" that takes as input...
null
https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Section-1.3/mit-scheme/exercise1-44.scm
scheme
The idea of "smoothing" a function is an important concept in signal processing. If f is a function and dx is some small number, then the smoothed version of f is the function whose value at a point x is the average of f(x-dx), f(x), f(x+dx). Write a procedure "smooth" that takes as input a procedure that compute...
Exercise 1.44 using " smooth " and " repeated " from exercise 1.43 . (define (smooth f) (define (average a b c) (/ (+ a b c) 3.0)) (lambda (x) (average (f (- x dx)) (f x) (f (+ x dx))))) to be 3 at x=0 , and 0 everywhere else . (define (impulse-maker a value) (lambda (x) (if (= x a) value 0)...
fc5a0b5301708f0ba385da58be158661a854865dc75b1feb33cc6b561a703cdd
camsaul/methodical
clos_test.clj
(ns methodical.impl.combo.clos-test (:require [clojure.string :as str] [clojure.test :as t] [methodical.core :as m] [methodical.impl.combo.clos :as combo.clos] [methodical.interface :as i])) (defn- combine-methods [primary-methods aux-methods] (i/combine-methods (com...
null
https://raw.githubusercontent.com/camsaul/methodical/de05a43afe93d6732f8630b16dc512302703a30c/test/methodical/impl/combo/clos_test.clj
clojure
which makes a method impl that adds its invocation (`(method-key & args)`) to calls, and returns fn names provided for clarity/debugging
(ns methodical.impl.combo.clos-test (:require [clojure.string :as str] [clojure.test :as t] [methodical.core :as m] [methodical.impl.combo.clos :as combo.clos] [methodical.interface :as i])) (defn- combine-methods [primary-methods aux-methods] (i/combine-methods (com...
d010636f22490032694f411a3168a16b8a7fa22e3c04a0c84c00269ffe8d5eb4
inhabitedtype/ocaml-aws
registerDefaultPatchBaseline.ml
open Types open Aws type input = RegisterDefaultPatchBaselineRequest.t type output = RegisterDefaultPatchBaselineResult.t type error = Errors_internal.t let service = "ssm" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Util.of_op...
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/3bc554af7ae7ef9e2dcea44a1b72c9e687435fa9/libraries/ssm/lib/registerDefaultPatchBaseline.ml
ocaml
open Types open Aws type input = RegisterDefaultPatchBaselineRequest.t type output = RegisterDefaultPatchBaselineResult.t type error = Errors_internal.t let service = "ssm" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Util.of_op...
3fa4c0d37335085697963821a2a91bb704472d9325e3edde2524d333cdfdf712
mbj/stratosphere
ConfigurationItemProperty.hs
module Stratosphere.ResourceGroups.Group.ConfigurationItemProperty ( module Exports, ConfigurationItemProperty(..), mkConfigurationItemProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/resourcegroups/gen/Stratosphere/ResourceGroups/Group/ConfigurationItemProperty.hs
haskell
# SOURCE #
module Stratosphere.ResourceGroups.Group.ConfigurationItemProperty ( module Exports, ConfigurationItemProperty(..), mkConfigurationItemProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProper...
24ffeff5a45dd59f331e60ee08219eb8fd826c474e67f1b05c0977025dad9c40
rwilcox/my-learnings-docs
learning_time_series_database_druid.md.rkt
#lang scribble/text @(require "scribble-utils.rkt") --- path: /learnings/learning_time_series_database_druid title: Learning Druid --- # Table Of Contents <!-- toc --> # What is Druid Druid is a time series database that ingests data from various sources (files, streaming) which are controlled via spec files. User...
null
https://raw.githubusercontent.com/rwilcox/my-learnings-docs/8326c43cacef76546293453a1fbb47bebb873911/learning_time_series_database_druid.md.rkt
racket
they route requests to Brokers, Coordinators, and Overlords.
#lang scribble/text @(require "scribble-utils.rkt") --- path: /learnings/learning_time_series_database_druid title: Learning Druid --- # Table Of Contents <!-- toc --> # What is Druid Druid is a time series database that ingests data from various sources (files, streaming) which are controlled via spec files. User...
4bc89fff9d4c73075ad0e88566f6f5949a80e65715289099d902d17ec8fb7a4e
binaryage/cljs-oops
gcall_dynamic.cljs
(ns oops.arena.gcall-dynamic (:require [oops.core :refer [gcall+]] [oops.tools :refer [init-arena-test! done-arena-test! testing]])) (init-arena-test!) ; we are compiling under advanced mode (testing "simple dynamic gcall" (gcall+ (identity "f") "p1" "p2")) (testing "retageted dynamic gcall" (gcal...
null
https://raw.githubusercontent.com/binaryage/cljs-oops/a2b48d59047c28decb0d6334e2debbf21848e29c/test/src/arena/oops/arena/gcall_dynamic.cljs
clojure
we are compiling under advanced mode
(ns oops.arena.gcall-dynamic (:require [oops.core :refer [gcall+]] [oops.tools :refer [init-arena-test! done-arena-test! testing]])) (init-arena-test!) (testing "simple dynamic gcall" (gcall+ (identity "f") "p1" "p2")) (testing "retageted dynamic gcall" (gcall+ (identity "a.f") "p1" "p2")) (done-...
34a7b86513834e872ac06e541a142188c834e96cc9ca761372fca2affd126049
RoadRunnr/dtlsex
dtlsex_session_cache_api.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2011 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Publi...
null
https://raw.githubusercontent.com/RoadRunnr/dtlsex/6cb9e52ff00ab0e5f33e0c4b54bf46eacddeb8e7/src/dtlsex_session_cache_api.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitatio...
Copyright Ericsson AB 2008 - 2011 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(dtlsex_session_cache_api). -inclu...
6f80925227b748efba47d042fef23edff2be6fb48e29c751f2548245d61419c3
sixohsix/tak
Util.hs
module Tak.Util where import Tak.Types import Data.Foldable (Foldable, toList) clamp :: Int -> Int -> Int -> Int clamp low high = max low . min high comboBreakers :: Foldable t => [(a -> Bool)] -> t a -> [Int] comboBreakers fs lSeq = cBreakers fs (zip [0..] (toList lSeq)) where cBreakers _ [] = [] cBre...
null
https://raw.githubusercontent.com/sixohsix/tak/6310d19faa683156933dde38666c11dc087d79ea/src/Tak/Util.hs
haskell
module Tak.Util where import Tak.Types import Data.Foldable (Foldable, toList) clamp :: Int -> Int -> Int -> Int clamp low high = max low . min high comboBreakers :: Foldable t => [(a -> Bool)] -> t a -> [Int] comboBreakers fs lSeq = cBreakers fs (zip [0..] (toList lSeq)) where cBreakers _ [] = [] cBre...
221a4f0142fe4fae6226ee783f7aa77e52359e887775e436a96145c6b81df9b9
untangled-web/untangled-ui
clip_tool.cljs
(ns untangled.ui.clip-tool (:require [om.next :as om :refer [defui]] [om.dom :as dom] [untangled.client.core :as uc] [untangled.ui.clip-geometry :as cg])) (defn refresh-clip-region [this props] (let [{:keys [url size handle-size] :or {handle-size 10}} props {:keys [width...
null
https://raw.githubusercontent.com/untangled-web/untangled-ui/ae101f90cd9b7bf5d0c80e9453595fdfe784923c/src/main/untangled/ui/clip_tool.cljs
clojure
for URL changes
(ns untangled.ui.clip-tool (:require [om.next :as om :refer [defui]] [om.dom :as dom] [untangled.client.core :as uc] [untangled.ui.clip-geometry :as cg])) (defn refresh-clip-region [this props] (let [{:keys [url size handle-size] :or {handle-size 10}} props {:keys [width...
89298d08b48b7353fac111be4b6c725b9a6d7c557339bde86e03d5b1324b20d6
anoma/juvix
Internal.hs
module Juvix.Compiler.Internal ( module Juvix.Compiler.Internal.Language, module Juvix.Compiler.Internal.Data, module Juvix.Compiler.Internal.Pretty, module Juvix.Compiler.Internal.Translation, ) where import Juvix.Compiler.Internal.Data import Juvix.Compiler.Internal.Language import Juvix.Compiler.Int...
null
https://raw.githubusercontent.com/anoma/juvix/ff39db3319b0478f0f3fc82f61d1746a27e13427/src/Juvix/Compiler/Internal.hs
haskell
module Juvix.Compiler.Internal ( module Juvix.Compiler.Internal.Language, module Juvix.Compiler.Internal.Data, module Juvix.Compiler.Internal.Pretty, module Juvix.Compiler.Internal.Translation, ) where import Juvix.Compiler.Internal.Data import Juvix.Compiler.Internal.Language import Juvix.Compiler.Int...
3931483352ea63375b9d6d1ba733fc56e17d8b03c6bba505b92be221c8b59540
hopv/MoCHi
HCCSSolver.ml
open Util open Combinator type t = HCCS.t -> PredSubst.t exception NoSolution exception UnsolvableCore of string list exception Unknown * { 6 Dynamically linked solvers } let ext_solve_duality = ref (fun _ -> assert false : t) let solve_duality hcs = Logger.log_block1 "HCCSSolver.solve_duality" !ext_solve_duali...
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/fpat/HCCSSolver.ml
ocaml
open Util open Combinator type t = HCCS.t -> PredSubst.t exception NoSolution exception UnsolvableCore of string list exception Unknown * { 6 Dynamically linked solvers } let ext_solve_duality = ref (fun _ -> assert false : t) let solve_duality hcs = Logger.log_block1 "HCCSSolver.solve_duality" !ext_solve_duali...
baa6a888eb8b32e9378538e75c482e6458509c22f5d95e7d1f3bfad1aec99b79
OCamlPro/drom
main.ml
!{header-ml} open Ppxlib open Ast_builder.Default let verbose = match Sys.getenv_opt "!{name:upp}_DEBUG" with | None | Some "0" | Some "false" | Some "no" -> 0 | Some s -> match s with | "true" -> 1 | s -> match int_of_string_opt s with | Some i -> i | None -> 0 let dprintf ?(v=1) ?(force...
null
https://raw.githubusercontent.com/OCamlPro/drom/7bc86026e0e170f1a468b437d369aefc5dbea5d7/src/drom_lib/share/drom/skeletons/packages/ppx_rewriter/main.ml
ocaml
!{header-ml} open Ppxlib open Ast_builder.Default let verbose = match Sys.getenv_opt "!{name:upp}_DEBUG" with | None | Some "0" | Some "false" | Some "no" -> 0 | Some s -> match s with | "true" -> 1 | s -> match int_of_string_opt s with | Some i -> i | None -> 0 let dprintf ?(v=1) ?(force...
5e269d8e4d021f41b8ab120f3b8a0a924fcccbe1aadce00e88163051e82abcdc
alt-romes/slfl
MakeMeWorkState.hs
data State b a = State (!b -o (a * !b)); synth runState :: State b a -o (!b -o (a * !b)); synth bind :: State c a -o (a -o State c b) -o State c b; #synth bind :: (State c a -o (a -o State c b) -o State c b) | using (runState); synth return :: a -o State b a; synth get :: State a a; synth put :: !a -o (State a 1)...
null
https://raw.githubusercontent.com/alt-romes/slfl/4956fcce8ff2ca7622799fe0715c118b568b74eb/STLLC/MakeMeWorkState.hs
haskell
data State b a = State (!b -o (a * !b)); synth runState :: State b a -o (!b -o (a * !b)); synth bind :: State c a -o (a -o State c b) -o State c b; #synth bind :: (State c a -o (a -o State c b) -o State c b) | using (runState); synth return :: a -o State b a; synth get :: State a a; synth put :: !a -o (State a 1)...
081b3dc91ec571da01591a2ce99a73c00c7de9d652ed3f09053bc2247d2782a9
crategus/cl-cffi-gtk
rtest-gobject-enumeration.lisp
(def-suite gobject-enumeration :in gobject-suite) (in-suite gobject-enumeration) ;;; --- Types and Values ------------------------------------------------------- (test define-g-enum-macro (is (equal '(PROGN (DEFCENUM (GTK-WINDOW-TYPE :INT) (:TOPLEVEL 0) ...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/27bdcefb703e7ae144f506929f1935468b6987ad/test/rtest-gobject-enumeration.lisp
lisp
--- Types and Values ------------------------------------------------------- g-enum-class g-enum-value g-flags-class g-flags-value --- Functions -------------------------------------------------------------- G_ENUM_CLASS_TYPE G_ENUM_CLASS_TYPE_NAME g-type-is-enum G_ENUM_CLASS G_IS...
(def-suite gobject-enumeration :in gobject-suite) (in-suite gobject-enumeration) (test define-g-enum-macro (is (equal '(PROGN (DEFCENUM (GTK-WINDOW-TYPE :INT) (:TOPLEVEL 0) (:POPUP 1)) (GOBJECT::REGISTER-ENUM-TYPE "GtkWindowType" 'G...
e1d94022a4732495c76b26729c37c3871eb540eb81e0f46f6b76ba7d2c1551e6
v-kolesnikov/sicp
2_05_test.clj
(ns sicp.chapter02.2-05-test (:require [clojure.test :refer :all] [sicp.chapter02.2-05 :as sicp-2-05] [sicp.test-helper :refer :all])) (deftest car-test (assert-equal 3 (sicp-2-05/car (sicp-2-05/cons 3 8))) (assert-equal 5 (sicp-2-05/car (sicp-2-05/cons 5 0)))) (deftest cdr-test (asser...
null
https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter02/2_05_test.clj
clojure
(ns sicp.chapter02.2-05-test (:require [clojure.test :refer :all] [sicp.chapter02.2-05 :as sicp-2-05] [sicp.test-helper :refer :all])) (deftest car-test (assert-equal 3 (sicp-2-05/car (sicp-2-05/cons 3 8))) (assert-equal 5 (sicp-2-05/car (sicp-2-05/cons 5 0)))) (deftest cdr-test (asser...
49fbf28ed9e060f41d57d3ee9b1a1d1ebc067bd857dd39bca4b04d149fd71fb8
BillHallahan/G2
PolyRef.hs
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # {-# LANGUAGE DeriveTraversable#-} # LANGUAGE FlexibleContexts # # LANGUAGE TupleSections # module G2.Liquid.Inference.PolyRef ( PolyBound (.. ) , RefNamePolyBound , ExprPolyBound ...
null
https://raw.githubusercontent.com/BillHallahan/G2/0683a633f9dad2cd5066d2515645fa79bb105401/src/G2/Liquid/Inference/PolyRef.hs
haskell
# LANGUAGE DeriveTraversable# | The subexpressions of an expression corresponding to the polymorphic arguments. If a polymorphic argument is instantiated with a polymorphic type, these are nested recursively. ----------------------------- ExprPolyBound ----------------------------- ----------------------------- T...
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # # LANGUAGE FlexibleContexts # # LANGUAGE TupleSections # module G2.Liquid.Inference.PolyRef ( PolyBound (.. ) , RefNamePolyBound , ExprPolyBound , extractExprP...
dc8d7bf69db72d4274531c700c65bca2a3abc23ad3b865c6ee9119b60b23ca02
icicle-lang/icicle-ambiata
Data.hs
# LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # module Icicle.Test.Gen.Runtime.Data where import Data.ByteString (ByteString) import qualified Data.ByteString as ByteString import qualified Data.List as List import Data.Map (Map) ...
null
https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-compiler/test/Icicle/Test/Gen/Runtime/Data.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE LambdaCase # # LANGUAGE NoImplicitPrelude # # LANGUAGE TupleSections # module Icicle.Test.Gen.Runtime.Data where import Data.ByteString (ByteString) import qualified Data.ByteString as ByteString import qualified Data.List as List import Data.Map (Map) import qualified Data.Map.Strict as...
902b5a674901abf18485a1f76f8f637c0173be267c2e6c9cc35695869049068a
teknql/wing
resource_test.clj
(ns wing.core.resource-test (:require [wing.core.resource :as sut :refer [with-resource Resource]] [clojure.test :as t :refer [deftest testing is]])) (deftest with-resource-test (testing "calls release in reverse order" (let [release-calls (atom 0)] (with-resource [foo (reify Resource ...
null
https://raw.githubusercontent.com/teknql/wing/de8148bf48210eac0c0e3f8e31346b5b2ead39c2/test/wing/core/resource_test.clj
clojure
(ns wing.core.resource-test (:require [wing.core.resource :as sut :refer [with-resource Resource]] [clojure.test :as t :refer [deftest testing is]])) (deftest with-resource-test (testing "calls release in reverse order" (let [release-calls (atom 0)] (with-resource [foo (reify Resource ...
018c9c7d27844bf295492733c98de764635856b27c1a22a60474396e03833c29
liqd/thentos
Types.hs
{- Safe -} {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE DeriveFunctor #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # {-...
null
https://raw.githubusercontent.com/liqd/thentos/f7d53d8e9d11956d2cc83efb5f5149876109b098/thentos-core/src/Thentos/Action/Types.hs
haskell
Safe # LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE DeriveFunctor # # LANGUAGE FlexibleContexts # # LANGUAGE TemplateHaskell # | The 'Action' monad transformer stack. It contains: - A state of polymorphic type (for use e.g. by ...
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # module Thentos.Action.Types where import Control.Exception (SomeException) import Control.Monad.Reader (ReaderT(ReaderT)) import Control.Monad.State (StateT) import Control.Monad.Trans.Class ...
85eec4469c8dd89b2697cbb5c13573c76fd9de4ffb1ad4912a2d4789d50c2c69
GillianPlatform/Gillian
WType.ml
type t = (* Used only for work in compilation *) | WList | WNull | WBool | WString | WPtr | WInt | WAny | WSet (** Are types t1 and t2 compatible *) let compatible t1 t2 = match (t1, t2) with | WAny, _ -> true | _, WAny -> true | t1, t2 when t1 = t2 -> true | _ -> false let strongest t1 t2...
null
https://raw.githubusercontent.com/GillianPlatform/Gillian/190c5a054c9572c81af6bc44c6a80b8a499766f8/wisl/lib/syntax/WType.ml
ocaml
Used only for work in compilation * Are types t1 and t2 compatible * returns (x, y) when unop takes type x and returns type y * checks and adds to typemap
type t = | WList | WNull | WBool | WString | WPtr | WInt | WAny | WSet let compatible t1 t2 = match (t1, t2) with | WAny, _ -> true | _, WAny -> true | t1, t2 when t1 = t2 -> true | _ -> false let strongest t1 t2 = match (t1, t2) with | WAny, t -> t | t, WAny -> t | _ -> t1 carefu...
bffa4bc12d48f6f8dda1897446d13ce706a19827918aee95aec5058b31842140
GrammaTech/sel
scopes-2.lisp
(defvar *a* 1) (defvar *b* 1) (+ *a* *b*)
null
https://raw.githubusercontent.com/GrammaTech/sel/a59174c02a454e8d588614e221cf281260cf12f8/test/etc/lisp-scopes/scopes-2.lisp
lisp
(defvar *a* 1) (defvar *b* 1) (+ *a* *b*)
49d0627a0ea5df7f63a0d35f26b3544e4ee08c5148d3a84863926a708141ee95
google/codeworld
EmbedAsUrl.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # Copyright 2020 The CodeWorld Authors . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at ...
null
https://raw.githubusercontent.com/google/codeworld/77b0863075be12e3bc5f182a53fcc38b038c3e16/codeworld-api/src/Util/EmbedAsUrl.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # Copyright 2020 The CodeWorld Authors . All rights reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required b...
6d5fbfcd7db9fe53caa2f54d7a1f54254d62df70abce9f7de4c8b6b8a0ab792e
aggieben/weblocks
weblocks.lisp
(in-package :weblocks-test) ;;; testing root-composite (deftest root-composite-1 (with-request :get nil (root-composite)) nil nil) (deftest root-composite-2 (with-request :get nil (setf (root-composite) 'foobar) (multiple-value-bind (res present-p) (root-composite) (values res (not (n...
null
https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/test/weblocks.lisp
lisp
testing root-composite
(in-package :weblocks-test) (deftest root-composite-1 (with-request :get nil (root-composite)) nil nil) (deftest root-composite-2 (with-request :get nil (setf (root-composite) 'foobar) (multiple-value-bind (res present-p) (root-composite) (values res (not (null present-p))))) foobar...
8bfa6bcf4ea837a0412da68b51f22c55112976dfd08a0f63ba799636420d5735
lem-project/lem
sourcelist.lisp
(defpackage :lem.sourcelist (:use :cl :lem) (:export :title-attribute :position-attribute :with-sourcelist :append-jump-function :append-sourcelist :jump-highlighting) #+sbcl (:lock t)) (in-package :lem.sourcelist) (define-attribute jump-highlight (t :ba...
null
https://raw.githubusercontent.com/lem-project/lem/f9061a817492bbef0ff9aea27e5305d5ba6bcf16/src/ext/sourcelist.lisp
lisp
(defpackage :lem.sourcelist (:use :cl :lem) (:export :title-attribute :position-attribute :with-sourcelist :append-jump-function :append-sourcelist :jump-highlighting) #+sbcl (:lock t)) (in-package :lem.sourcelist) (define-attribute jump-highlight (t :ba...
0ad487e64784764714297fae4b723cf8272c3918b1d08109255189641c0b69c4
weyrick/roadsend-php
generate.scm
(module generate (main main)) ;;; XXX I added null-ok by hand! make sure this generates it next time ;;; around. --tpd 2005.4.12 ;;; XXXXXX although... it looks like it's not used by php-gtk anyway --tpd 2005.5.2 ;;; ;;; globals ;;; ======= (define *classes* (make-hashtable)) (define *filename* #f) ;;; ;;; ...
null
https://raw.githubusercontent.com/weyrick/roadsend-php/d6301a897b1a02d7a85bdb915bea91d0991eb158/runtime/ext/gtk/defs/generate.scm
scheme
XXX I added null-ok by hand! make sure this generates it next time around. --tpd 2005.4.12 XXXXXX although... it looks like it's not used by php-gtk anyway globals ======= main ==== the static methods of the gtk class (when (some? (lambda (a) (some? parameter-optional? (method-parameters a))) methods)...
(module generate (main main)) --tpd 2005.5.2 (define *classes* (make-hashtable)) (define *filename* #f) (define (main args) (set! *filename* (list-ref args 1)) (generate-gtk-functions)) (define (generate-custom-properties) (let ((classes '())) (for-each-list *filename* (lambd...
8a8e286c90fc1040d9ac79dc7d82b7eeaf260e405ec8bc75936c17bb16c23923
xapi-project/xen-api
test_no_migrate.ml
* Copyright ( C ) 2016 Citrix Systems Inc. * * 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 fi...
null
https://raw.githubusercontent.com/xapi-project/xen-api/e984d34bd9ff60d7224a841270db0fe1dfe42e7a/ocaml/tests/test_no_migrate.ml
ocaml
* Copyright ( C ) 2016 Citrix Systems Inc. * * 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 fi...