_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
586ad784221ec0867a04959b1664b5615c19dd61d34a5120e46a99620be1b2df
edn-format/data.edn
basic.clj
;;;; 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 ...
null
https://raw.githubusercontent.com/edn-format/data.edn/44e6f6d08120a68983a0c95a6a3787ab23f9776d/examples/org/edn_format/data/edn/examples/impls/printable/basic.clj
clojure
The use and distribution terms for this software are covered by the 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 this notice, or any other, from this software.
Eclipse Public License 1.0 ( -1.0.php ) (ns ^{:author "Tom Hickey, Jim Altieri"} org.edn-format.data.edn.examples.printable.basic "Basic example of extending IPrintable to core types. Simply uses spaces for delimiters." (:require [org.edn-format.print.protocols.writer :as writer] [org.edn-format.pr...
73b51da13f6e9aa108298e6e86c2caafe9faba54c22e366b4766119c07d9dcce
plum-umd/fundamentals
snake.0.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 snake.0) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-deci...
null
https://raw.githubusercontent.com/plum-umd/fundamentals/eb01ac528d42855be53649991a17d19c025a97ad/1/www/code/snake.0.rkt
racket
about the language level of this file in a form that our tools can easily process. ----------------------------------------------------------------------------- Main function [on-key click] [stop-when game-over?] ----------------------------------------------------------------------------- Data Definitions A Worl...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname snake.0) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (require 2htdp/universe) (require 2htdp/image) (define (m...
f121d976967695853ef11074340fe90a7267f4a14a9ea8cf312db0dcc0e4356f
jcclinton/wow-emulator
char_values.erl
This is a World of Warcraft emulator written in erlang , supporting client 1.12.x %% Copyright ( C ) 2014 < jamieclinton.com > %% %% 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 Found...
null
https://raw.githubusercontent.com/jcclinton/wow-emulator/21bc67bfc9eea131c447c67f7f889ba040dcdd79/src/lib/char_values.erl
erlang
This program is free software; you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU G...
This is a World of Warcraft emulator written in erlang , supporting client 1.12.x Copyright ( C ) 2014 < jamieclinton.com > it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or You should have received a copy...
afe0fed6358f642c487f9fbdd655af381319d9e6e2887c6288f428f2add184d7
thelema/ocaml-community
ocamlprof.ml
(***********************************************************************) (* *) (* OCaml *) (* *) and , INRIA R...
null
https://raw.githubusercontent.com/thelema/ocaml-community/ed0a2424bbf13d1b33292725e089f0d7ba94b540/tools/ocamlprof.ml
ocaml
********************************************************************* OCaml ...
and , INRIA Rocquencourt Ported to Caml Special Light by 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 . ...
2cf9b602e477a77cce0412d8526d1fe198d05bd2f454de135924d9c9ecc23e74
TomerAberbach/programming-in-haskell-exercises
9.hs
scalarproduct :: [Int] -> [Int] -> Int scalarproduct xs ys = sum [x * y | (x, y) <- zip xs ys]
null
https://raw.githubusercontent.com/TomerAberbach/programming-in-haskell-exercises/a66830529ebc9c4d84d0e4c6e0ad58041b46bc32/parts/1/chapters/5/9.hs
haskell
scalarproduct :: [Int] -> [Int] -> Int scalarproduct xs ys = sum [x * y | (x, y) <- zip xs ys]
20823d6f432c61a94cab8b2d951564ac7e9e21d30fbcfa10f28a61779fdc92f0
ocaml/dune
where.mli
open Import module Where : Dune_rpc.Where.S with type 'a fiber := 'a val default : unit -> Dune_rpc.Where.t val get : unit -> Dune_rpc.Where.t option val to_socket : Dune_rpc.Where.t -> Unix.sockaddr val rpc_socket_file : unit -> Path.Build.t val to_string : Dune_rpc.Where.t -> string
null
https://raw.githubusercontent.com/ocaml/dune/20180d12149343d073cdea5860d01dc181702e6a/src/dune_rpc_client/where.mli
ocaml
open Import module Where : Dune_rpc.Where.S with type 'a fiber := 'a val default : unit -> Dune_rpc.Where.t val get : unit -> Dune_rpc.Where.t option val to_socket : Dune_rpc.Where.t -> Unix.sockaddr val rpc_socket_file : unit -> Path.Build.t val to_string : Dune_rpc.Where.t -> string
71fcca284f53101e50149ca8580e48a48d19aea7a1aadb90e0714624825f0fa8
haskell-suite/haskell-names
Err3.hs
-- Imported module does not exist import Err3Imp
null
https://raw.githubusercontent.com/haskell-suite/haskell-names/795d717541484dbe456342a510ac8e712e1f16e4/tests/errors/Err3.hs
haskell
Imported module does not exist
import Err3Imp
4639ffd45d25571d12b92b618f8384a575f7deb214497bb7d6e116dc9e4735f6
zalando-incubator/chisel
http_client_test.clj
(ns chisel.http-client-test (:require [clojure.test :refer :all] [io.pedestal.log :as pedestal-log] [taoensso.timbre :as timbre] [clj-http.client :as original-http] [metrics.core :as metrics-core] [cheshire.core :as json] [diehard.circuit-breaker...
null
https://raw.githubusercontent.com/zalando-incubator/chisel/8ddf7e32bd66980555ef809f0b78b1d5af051d4f/test/chisel/http_client_test.clj
clojure
simply checks that logging was called checks that this call is counted an available through request-ctx/handler
(ns chisel.http-client-test (:require [clojure.test :refer :all] [io.pedestal.log :as pedestal-log] [taoensso.timbre :as timbre] [clj-http.client :as original-http] [metrics.core :as metrics-core] [cheshire.core :as json] [diehard.circuit-breaker...
18f9cc46d625ecd060e04ad51baf596f13d7e3a6692d50e8a577796f8f5f9b92
sru-systems/protobuf-simple
BoolListPacked.hs
-- Generated by protobuf-simple. DO NOT EDIT! module Types.BoolListPacked where import Control.Applicative ((<$>)) import Prelude () import qualified Data.ProtoBufInt as PB newtype BoolListPacked = BoolListPacked { value :: PB.Seq PB.Bool } deriving (PB.Show, PB.Eq, PB.Ord) instance PB.Default BoolListPacked whe...
null
https://raw.githubusercontent.com/sru-systems/protobuf-simple/ee0f26b6a8588ed9f105bc9ee72c38943133ed4d/test/Types/BoolListPacked.hs
haskell
Generated by protobuf-simple. DO NOT EDIT!
module Types.BoolListPacked where import Control.Applicative ((<$>)) import Prelude () import qualified Data.ProtoBufInt as PB newtype BoolListPacked = BoolListPacked { value :: PB.Seq PB.Bool } deriving (PB.Show, PB.Eq, PB.Ord) instance PB.Default BoolListPacked where defaultVal = BoolListPacked { value =...
e12245f40ffb0115231dc90aececa10f1b4a072ef90d7606a5ce3a4e5098c60a
kazu-yamamoto/wai-app-file-cgi
File.hs
# LANGUAGE OverloadedStrings , CPP # module Network.Wai.Application.Classic.File ( fileApp , redirectHeader ) where import Control.Applicative import Data.ByteString (ByteString) import Data.Maybe import qualified Data.ByteString.Char8 as BS (concat) import Network.HTTP.Types import Network.Wai import Network...
null
https://raw.githubusercontent.com/kazu-yamamoto/wai-app-file-cgi/2a096b810ded557bd5e0d2bfe0e1b7736d7823ab/Network/Wai/Application/Classic/File.hs
haskell
-------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- -------------------------------------------------------------- expecting an error ------------------------------------------------...
# LANGUAGE OverloadedStrings , CPP # module Network.Wai.Application.Classic.File ( fileApp , redirectHeader ) where import Control.Applicative import Data.ByteString (ByteString) import Data.Maybe import qualified Data.ByteString.Char8 as BS (concat) import Network.HTTP.Types import Network.Wai import Network...
9c53c7b034eaa1f743f174b9fa53a5aeff20f0689164246e5512577a6459912f
boxer-project/boxer-sunrise
opml-export.lisp
;;;; Copyright 1985 - 2022 Andrea A. diSessa and the Estate of Edward H. Lay ;;;; Portions of this code may be copyright 1982 - 1985 Massachusetts Institute of Technology . Those portions may be used for any purpose , including commercial ones , providing that notice of MIT copyright is retained . ...
null
https://raw.githubusercontent.com/boxer-project/boxer-sunrise/93dc8ca848a67f5fd409daf9b2859136d3b81b98/src/impexp/opml-export.lisp
lisp
+-Data--+ This file is part of the | BOXER | system +-------+ eventually look for created from (possibly) reading in file expansion control <vertScrollState>1</vertScrollState> file format info like <html> for h...
Copyright 1985 - 2022 Andrea A. diSessa and the Estate of Edward H. Lay Portions of this code may be copyright 1982 - 1985 Massachusetts Institute of Technology . Those portions may be used for any purpose , including commercial ones , providing that notice of MIT copyright is retained . Licen...
2d8e26d61eca294ce30011531bb96576e9cd112e9da4ed425d5d541d1b49d4ad
ocaml/odoc
ident_env.cppo.ml
* Copyright ( c ) 2014 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
null
https://raw.githubusercontent.com/ocaml/odoc/c3f025d2e67d2a6f236bad5b0db7891ad0a7973f/src/loader/ident_env.cppo.ml
ocaml
we use term hidden to mean shadowed and idents_in_doc_off_mode items The boolean is an override for whether it should be hidden - true only for items introduced by extended open
* Copyright ( c ) 2014 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND THE AU...
e890a0a898f64151ed4f4265201407bb1610736da1cf8d6cec194f24c94d55ae
erlang/rebar3
rebar_packages.erl
-module(rebar_packages). -export([get/2 ,get_all_names/1 ,registry_dir/1 ,package_dir/2 ,find_highest_matching/5 ,verify_table/1 ,format_error/1 ,update_package/3 ,resolve_version/6]). -ifdef(TEST). -export([new_package_table/0, find_highest_matching_/5,...
null
https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/src/rebar_packages.erl
erlang
no reason to confuse the user since we just start fresh and they shouldn't notice, so log as a debug message only Even after an update the package is still missing, time to error out Hex supports use of ~> to specify the version required for a dependency. Since rebar3 requires exact versions to choose from we find...
-module(rebar_packages). -export([get/2 ,get_all_names/1 ,registry_dir/1 ,package_dir/2 ,find_highest_matching/5 ,verify_table/1 ,format_error/1 ,update_package/3 ,resolve_version/6]). -ifdef(TEST). -export([new_package_table/0, find_highest_matching_/5,...
13fa4edd64aec7b1d69b7ef3b2ba1a34b102fc32579040ce5c2efa43d4a91f71
lambda-fairy/robot
Types.hs
-- | Defines the 'Switch' type, along with some constants and utilities. module Test.Robot.Types ( -- * Types Switch(..) -- ** Defining your own keys -- $keys -- * Constants -- ** Buttons , leftButton, middleButton, rightButton , scrollUp, scrollDown, scrollLeft, scroll...
null
https://raw.githubusercontent.com/lambda-fairy/robot/3b851d733c5835f04a7c4538e5fca1e1f42a7665/Test/Robot/Types.hs
haskell
| Defines the 'Switch' type, along with some constants and utilities. * Types ** Defining your own keys $keys * Constants ** Buttons $keys argument. On most Unix systems, you can look up common keysyms in the file @\/usr\/include\/X11\/keysymdef.h@. For example, the pound sign @£@ is listed as: so to inpu...
module Test.Robot.Types ( Switch(..) , leftButton, middleButton, rightButton , scrollUp, scrollDown, scrollLeft, scrollRight , backButton, forwardButton , module Test.Robot.Types.Keys ) where import Test.Robot.Types.Core import Test.Robot.Types.Keys The ' Key ' constructor requires...
f9b05b203f4294d7819c74f452b829adc25b501348c630479872039cd3830e15
iambrj/imin
interp-Rfun.rkt
#lang racket (require racket/fixnum) (require "utilities.rkt") (require "interp-Rvec.rkt") (provide interp-Rfun interp-Rfun-class) ;; Note to maintainers of this code: ;; A copy of this interpreter is in the book and should be ;; kept in sync with this code. (define interp-Rfun-class (class interp-Rvec-class ...
null
https://raw.githubusercontent.com/iambrj/imin/baf9e829c2aa85b69a2e86bfba320969ddf05f95/interp-Rfun.rkt
racket
Note to maintainers of this code: A copy of this interpreter is in the book and should be kept in sync with this code. For after the shrink pass. call the main function
#lang racket (require racket/fixnum) (require "utilities.rkt") (require "interp-Rvec.rkt") (provide interp-Rfun interp-Rfun-class) (define interp-Rfun-class (class interp-Rvec-class (super-new) (define/public (apply-fun fun-val arg-vals e) (match fun-val [`(function ,xs ,body ,fun-env) ...
dabaf2ff0d0fb941e647cf8edbbbd5bf1ed8272ee02c46386bdbf3f5128f1130
xapi-project/xen-api
monitor_pvs_proxy.ml
* Copyright ( C ) 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 file LI...
null
https://raw.githubusercontent.com/xapi-project/xen-api/47fae74032aa6ade0fc12e867c530eaf2a96bf75/ocaml/xapi/monitor_pvs_proxy.ml
ocaml
we are only interested in VM stats Check if anything has changed since our last reading.
* Copyright ( C ) 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 file LI...
1e1628acc6b4e363225f3d85884b48bf15d16d1bc3cdc7a5bd3e5e44a5267226
mzp/coq-ide-for-ios
gmapl.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/lib/gmapl.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Maps from ['a] to lists of ['b].
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : gmapl.mli 13323 201...
0e5eddd70c3b851e61e337831e08d674d00f4e82daee3aaf60e28eda5a9b5487
synduce/Synduce
Expand.ml
open Base open Lang (* *) open Either open Env open Term open ProblemDefs open Utils let identify_rcalls (p : PsiDef.t) (lam : variable) (t : term) : VarSet.t = let join = Set.union in let case _ t = match t.tkind with (* lam x *) | TApp ({ tkind = TVar lam'; _ }, [ single_arg ]) when Variable.(lam' ...
null
https://raw.githubusercontent.com/synduce/Synduce/42d970faa863365f10531b19945cbb5cfb70f134/src/common/Expand.ml
ocaml
lam x No lifting present. Lifting present. Replace subterms that correspond to the right-hand side of the main rule to avoid capturing f(v) when v is a variable. ============================================================================================= ===============================================...
open Base open Lang open Either open Env open Term open ProblemDefs open Utils let identify_rcalls (p : PsiDef.t) (lam : variable) (t : term) : VarSet.t = let join = Set.union in let case _ t = match t.tkind with | TApp ({ tkind = TVar lam'; _ }, [ single_arg ]) when Variable.(lam' = lam) -> (match ...
35893eee7f787e634f047982a49b6ccefd07933ccb78642a6d3937575b9e2617
fare/lisp-interface-library
size.lisp
;;;;; Size (uiop:define-package :lil/interface/size (:use :closer-common-lisp :uiop :lil/core :lil/interface/base) (:export #:<sizable> #:size #:size<=n-p #:<sizable-size<=n-p-from-size>)) (in-package :lil/interface/size) ;;; Size (define-interface <sizable> (<type>) () (:abstract) (:generic> siz...
null
https://raw.githubusercontent.com/fare/lisp-interface-library/ac2e0063dc65feb805f0c57715d52fda28d4dcd8/interface/size.lisp
lisp
Size Size
(uiop:define-package :lil/interface/size (:use :closer-common-lisp :uiop :lil/core :lil/interface/base) (:export #:<sizable> #:size #:size<=n-p #:<sizable-size<=n-p-from-size>)) (in-package :lil/interface/size) (define-interface <sizable> (<type>) () (:abstract) (:generic> size (object) (:in 1) (...
85155a26f213313afa55ffe5494ad7725339db4b2d855e0a17aacb767dada5f9
brendanhay/gogol
Create.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/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-websecurityscanner/gen/Gogol/WebSecurityScanner/Projects/ScanConfigs/Create.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated * Resource ** Constructing a Request | A resource alias for @websecurityscanner.projects.scanConfigs.create@ method which the 'WebSecurityScannerProjectsScanConfigsCreate' request conforms to. /See:/ 'newWebSecurityScannerPr...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
5c2df68c653f2d03f66e76d9003f2f7f87163e17da7096ad81fcc0d6d0184971
metosin/reitit
impl_perf_test.clj
(ns reitit.impl-perf-test (:require [criterium.core :as cc] [reitit.perf-utils :refer [suite]] [ring.util.codec] [reitit.impl :as impl]) (:import (java.net URLDecoder URLEncoder))) ;; start repl with ` perf repl ` ;; perf measured with the following setup: ;; ;; Model Name: ...
null
https://raw.githubusercontent.com/metosin/reitit/1ab075bd353966636f154ac36ae9b7990efeb008/perf-test/clj/reitit/impl_perf_test.clj
clojure
perf measured with the following setup: Model Name: MacBook Pro Model Identifier: MacBookPro11,3 ring 890ns 190ns 90ns naive 200ns reitit 630ns (-29%) 12ns (-94%) 8ns (-91%) 8ns (-90%) ring naive 1000ns 200ns reitit 740ns ring 25ns reitit 20ns (-84%) ring reitit 30ns 740ns
(ns reitit.impl-perf-test (:require [criterium.core :as cc] [reitit.perf-utils :refer [suite]] [ring.util.codec] [reitit.impl :as impl]) (:import (java.net URLDecoder URLEncoder))) start repl with ` perf repl ` Processor Name : Intel Core i7 Processor Speed : ...
26e5d0bda8486317f5a687da8eb3e3dd552d88f5d8b03761f543e890496b8969
zwizwa/staapl
scat-syntax.rkt
#lang racket/base ;; This combines syntax transformers from rpn-*.ss with namespace ;; tools from ns-*.ss into a single interface, together with scheme ;; snarfing and composition macros. (provide compositions ;; scat composer to namespace, using anonymous compiler with-compositions from snarf.ss snarf ;...
null
https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/scat/scat-syntax.rkt
racket
This combines syntax transformers from rpn-*.ss with namespace tools from ns-*.ss into a single interface, together with scheme snarfing and composition macros. scat composer to namespace, using anonymous compiler scheme snarfer to namespace snarfers "../tools.rkt" The 'compositions' macro is the entry point t...
#lang racket/base (provide with-compositions from snarf.ss as-push) (require "../tools.rkt" "../ns.rkt" "snarf.rkt" (for-syntax "../ns-tx.rkt" racket/base)) anonymous function compiler as an argument . Redefinitions are ( ( name ( fn : . body ) ) ... ) ) (define-syntax-rule (compositions...
d6e6f9efa0a0594efbddba621a36634d04398bb1b64d6d329400ab08e8a88e9a
gotthardp/lorawan-server
lorawan_gw_sup.erl
% Copyright ( c ) 2016 - 2019 < > % All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . % -module(lorawan_gw_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -spec start_link() -> {ok, pid()}. start_link() -> supervisor:start_link(?MODULE, [...
null
https://raw.githubusercontent.com/gotthardp/lorawan-server/1a5c0f2f4d8238a54a326c57a5eb0e6015821b1d/src/lorawan_gw_sup.erl
erlang
All rights reserved. end of file
Copyright ( c ) 2016 - 2019 < > Distributed under the terms of the MIT License . See the LICENSE file . -module(lorawan_gw_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -spec start_link() -> {ok, pid()}. start_link() -> supervisor:start_link(?MODULE, []). init([]) -> {ok, P...
4afa15181c6d2df50b0b90a7536e6ebd8eacb9534d28ccf71f0aae45ca3fff80
cndreisbach/clojure-web-dev-workshop
project.clj
(defproject we-owe "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :plugins [[lein-cljsbuild "0.3.2"] [lein-ring "0.8.3"]] :dependencies [[org.clojure/clojure "1.5.1"] [ring "1.1.8"] ...
null
https://raw.githubusercontent.com/cndreisbach/clojure-web-dev-workshop/95d9fdf94b39f8a1e408b8bf75a81b92899ee7d9/code/07-frp/project.clj
clojure
(defproject we-owe "0.1.0-SNAPSHOT" :description "FIXME: write description" :url "" :license {:name "Eclipse Public License" :url "-v10.html"} :plugins [[lein-cljsbuild "0.3.2"] [lein-ring "0.8.3"]] :dependencies [[org.clojure/clojure "1.5.1"] [ring "1.1.8"] ...
f845bacceb76ec18a5a575b7649e885adc1f19e40fcb8e47d037e93da95b5814
binaryage/chromex
storage.cljs
(ns chromex.ext.system.storage (:require-macros [chromex.ext.system.storage :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn get-info* [config] (gen-wrap :function ::get-info config)...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/system/storage.cljs
clojure
-- events -----------------------------------------------------------------------------------------------------------------
(ns chromex.ext.system.storage (:require-macros [chromex.ext.system.storage :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn get-info* [config] (gen-wrap :function ::get-info config)...
d7681831d35eb8092aecd069460f778968acd35efaefe26c8e7d3d7a3b63e235
nixin72/shan
purge.clj
(ns shan.commands.purge (:require [shan.print :as p] [shan.config :refer [app-config]] [shan.util :as u] [shan.packages :as ps] [shan.commands.-options :as opts])) (defn- cli-purge "Deletes all packages in temporary.edn file" [{:keys [check]}] (let [remove-map (u/get-temp) result (reduce...
null
https://raw.githubusercontent.com/nixin72/shan/4f78124c3bbbefce5b33efab7364416ea8e6e1be/src/shan/commands/purge.clj
clojure
(ns shan.commands.purge (:require [shan.print :as p] [shan.config :refer [app-config]] [shan.util :as u] [shan.packages :as ps] [shan.commands.-options :as opts])) (defn- cli-purge "Deletes all packages in temporary.edn file" [{:keys [check]}] (let [remove-map (u/get-temp) result (reduce...
452098cf4643e9e08778f57b84b71b0f71825c9ebf1ceb35c6519bac832633df
mirage/decompress
lz.ml
[@@@landmark "auto"] type bigstring = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t let bigstring_empty = Bigarray.Array1.create Bigarray.char Bigarray.c_layout 0 let bigstring_length x = Bigarray.Array1.dim x [@@inline] let bigstring_create l = Bigarray.Array1.create Bigarray.char Biga...
null
https://raw.githubusercontent.com/mirage/decompress/c2744b785a77d15e03c7397d59e232464855215a/lib/lz.ml
ocaml
default current match max hash chain length current string best match length so far XXX(dinosaure): it's possible that it remains one literal. max if (s->strm->avail_in == 0) break; d d
[@@@landmark "auto"] type bigstring = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t let bigstring_empty = Bigarray.Array1.create Bigarray.char Bigarray.c_layout 0 let bigstring_length x = Bigarray.Array1.dim x [@@inline] let bigstring_create l = Bigarray.Array1.create Bigarray.char Biga...
1ae9ef99d687bf2ab87ccfcf6d42efcac3ae813967f950c08c3fb68b29dbe907
jimmyrcom/HTML5-Canvas-Old-School-RPG-Map-with-Erlang-Websockets-Chat
move.erl
-module(move). -compile(export_all). -include("user.hrl"). Copyright ( C ) 2010 ( www . JimmyR.com , Youtube : JimmyRcom , Gmail : JimmyRuska ) , under GPL 2.0 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 Softw...
null
https://raw.githubusercontent.com/jimmyrcom/HTML5-Canvas-Old-School-RPG-Map-with-Erlang-Websockets-Chat/1c68c63e51eea76d475ce39baf6da5c807d6dbe5/move.erl
erlang
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
-module(move). -compile(export_all). -include("user.hrl"). Copyright ( C ) 2010 ( www . JimmyR.com , Youtube : JimmyRcom , Gmail : JimmyRuska ) , under GPL 2.0 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 Softw...
32172a7565b6498661c95d99949f53e3dca57954410cf101e70baf19b382d5c7
ideas-edu/ideas
Parameter.hs
----------------------------------------------------------------------------- Copyright 2019 , Ideas project team . This file is distributed under the terms of the Apache License 2.0 . For more information , see the files " LICENSE.txt " and " NOTICE.txt " , which are included in the distribution . -------...
null
https://raw.githubusercontent.com/ideas-edu/ideas/f84907f92a8c407b7313f99e65a08d2646dc1565/src/Ideas/Common/Rule/Parameter.hs
haskell
--------------------------------------------------------------------------- --------------------------------------------------------------------------- | Maintainer : Stability : provisional This module defines transformations. Given a term, a transformation returns a list of results (often a singlet...
Copyright 2019 , Ideas project team . This file is distributed under the terms of the Apache License 2.0 . For more information , see the files " LICENSE.txt " and " NOTICE.txt " , which are included in the distribution . Portability : portable ( depends on ghc ) transformation can be parameterized ...
59b79974cfba191921513a4faa4c5027e99d066fa2c6833fb1f388255f2beba8
AllAlgorithms/haskell
factorial.hs
factorial :: (Integral a) => a -> a factorial 0 = 1 factorial n = n * factorial (n - 1) -- Author: <github.com/monikanana> -- factorial using folding factorial_ :: Int -> Int factorial_ n = foldl (*) 1 [1..n]
null
https://raw.githubusercontent.com/AllAlgorithms/haskell/66611c3abad036db962d6d299dcb39c18b1b3cf8/algorithms/math/factorial.hs
haskell
Author: <github.com/monikanana> factorial using folding
factorial :: (Integral a) => a -> a factorial 0 = 1 factorial n = n * factorial (n - 1) factorial_ :: Int -> Int factorial_ n = foldl (*) 1 [1..n]
bfc60ff79e4e5bf7f0d3a957cb33cc08dd3eb19702dd9ebf5b5980215a7d59bc
spechub/Hets
Terms.hs
| Module : ./Omega / Terms.hs Description : Hets - to - Omega conversion Copyright : ( c ) , DFKI Bremen 2009 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : non - portable(Logic ) HasCASL terms will be exported to om...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Omega/Terms.hs
haskell
flatten the tuple to an argument list Term [a] Range Term a TypeQual Type Range Term Quantifier [GenVarDecl] a Range we skip the type variables Term [a] Partiality a Range Term a [b] Range Term LetBrand [b] a Range Term Id [Type] [a] Range Term Token Term [a] Term BracketKind [a] Range
| Module : ./Omega / Terms.hs Description : Hets - to - Omega conversion Copyright : ( c ) , DFKI Bremen 2009 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : non - portable(Logic ) HasCASL terms will be exported to om...
57ecc34b7d369f7b3a4fe36ef399934c47a4c9e77ad95689dd070ace18be3443
SquidDev/illuaminate
lint_arg_arg.ml
open IlluaminateCore.Syntax open IlluaminateCore open Linter let tag = Error.Tag.make ~attr:[ Default ] ~level:Warning "var:arg-arg" let check ~r { args_args = args; _ } = let go = function | NamedArg (Var n) when Node.contents.get n = "arg" -> r.r ~tag ~span:(Node.span n) "Argument named \"arg\"." ...
null
https://raw.githubusercontent.com/SquidDev/illuaminate/da18b101b4710881b71c42554d70a3a7d17c3cd6/src/lint/lint_arg_arg.ml
ocaml
open IlluaminateCore.Syntax open IlluaminateCore open Linter let tag = Error.Tag.make ~attr:[ Default ] ~level:Warning "var:arg-arg" let check ~r { args_args = args; _ } = let go = function | NamedArg (Var n) when Node.contents.get n = "arg" -> r.r ~tag ~span:(Node.span n) "Argument named \"arg\"." ...
5675e6515c326e2660e29a6fe6cee5ddd67cd5bc4832786e950d3dbe0fa9c1b7
tarides/ocaml-jit
string.ml
module String = Stdlib.String include StringLabels module Map = Map.Make (struct type t = string let compare = String.compare let pp fmt t = Format.fprintf fmt "%S" t let show t = Format.asprintf "%a" pp t end) let starts_with ~prefix str = let str_len = String.length str in let prefix_len = String.lengt...
null
https://raw.githubusercontent.com/tarides/ocaml-jit/fe2fce1a5bb89acf5f7239917f6098d53c2c14ec/stdext/string.ml
ocaml
module String = Stdlib.String include StringLabels module Map = Map.Make (struct type t = string let compare = String.compare let pp fmt t = Format.fprintf fmt "%S" t let show t = Format.asprintf "%a" pp t end) let starts_with ~prefix str = let str_len = String.length str in let prefix_len = String.lengt...
a93068def5a338e5693598de6677c695ea1cf91fb70a36455d01e9f6055289ec
bobzhang/fan
compile_gram.ml
let eprintf = Format.eprintf let list_of_list = Fan_ops.list_of_list let tuple_com = Ast_gen.tuple_com let typing = Ast_gen.typing let and_of_list = Ast_gen.and_of_list let seq_sem = Ast_gen.seq_sem open Astf open Util let print_warning = eprintf "%a:\n%s@." Locf.print let prefix = "__fan_" let ghost = Locf.ghost let m...
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/cold/compile_gram.ml
ocaml
let eprintf = Format.eprintf let list_of_list = Fan_ops.list_of_list let tuple_com = Ast_gen.tuple_com let typing = Ast_gen.typing let and_of_list = Ast_gen.and_of_list let seq_sem = Ast_gen.seq_sem open Astf open Util let print_warning = eprintf "%a:\n%s@." Locf.print let prefix = "__fan_" let ghost = Locf.ghost let m...
2cd2c89c79760410819a1c9d5a2b3f0eeff2329f5ca80682ecd0e33b8b6097b9
debug-ito/net-spider
CLI.hs
# LANGUAGE OverloadedStrings , RankNTypes # -- | -- Module: NetSpider.RPL.CLI Description : CLI executable of NetSpider . RPL Maintainer : < > -- module NetSpider.RPL.CLI ( main, -- * Symbols only for testing optionParser, CLIConfig(..), Cmd(..), InputParams(....
null
https://raw.githubusercontent.com/debug-ito/net-spider/82dfbdca1add1edfd54ef36cb1ca5129d528b814/net-spider-rpl-cli/src/NetSpider/RPL/CLI.hs
haskell
| Module: NetSpider.RPL.CLI * Symbols only for testing filenames is a list of syslog filenames insert a lot of FoundNodes, so this executable inserts only Write the merged SnapshotGraph in GraphML to stdout. Make a query from the FoundNodes just loaded. -- CLI parsers. attributes. | Top-level configuration o...
# LANGUAGE OverloadedStrings , RankNTypes # Description : CLI executable of NetSpider . RPL Maintainer : < > module NetSpider.RPL.CLI ( main, optionParser, CLIConfig(..), Cmd(..), InputParams(..) ) where import qualified Data.Text.Lazy.IO as TLIO import qualifie...
8efb18cb3e9b571ed3dcf63b339a6238227211c807be6446c1830579ffe30f40
runtimeverification/haskell-backend
Hook.hs
| Module : Data . Attribute . Hook Description : Representation and parser for hook attributes Copyright : ( c ) Runtime Verification , 2018 - 2021 License : BSD-3 - Clause Maintainer : Module : Data.Attribute.Hook Description : Representation and parser for hook attributes Copyright...
null
https://raw.githubusercontent.com/runtimeverification/haskell-backend/b06757e252ee01fdd5ab8f07de2910711997d845/kore/src/Kore/Attribute/Hook.hs
haskell
| The missing @hook@ attribute. | Kore identifier representing a @hook@ attribute symbol. | hooked function name | Look up a required @hook{}()@ attribute from the given attributes. It is an error if the attribute is missing.
| Module : Data . Attribute . Hook Description : Representation and parser for hook attributes Copyright : ( c ) Runtime Verification , 2018 - 2021 License : BSD-3 - Clause Maintainer : Module : Data.Attribute.Hook Description : Representation and parser for hook attributes Copyright...
aab94e9a3288f620a4ce035a0c5b59dd86a139ea7d63e3689987d9f0175c1731
helium/blockchain-etl
be_db_pending_txn.erl
-module(be_db_pending_txn). -include("be_db_worker.hrl"). % for BIN utility -include("be_db_follower.hrl"). -behavior(gen_server). -behavior(be_db_worker). be_db_worker -export([prepare_conn/1]). %% gen_server -export([start_link/0, init/1, handle_call/3, handle_cast/2, handle_info/2]). -record(state, {}). %% ...
null
https://raw.githubusercontent.com/helium/blockchain-etl/fef374f469aa1dbf23e842ffbc1cd89e452051fc/src/be_db_pending_txn.erl
erlang
for BIN utility gen_server gen_server Translates the pending transaction to it's json form. The currently supported pending transactions are always submitted without the need for a ledger so we don't use one here, but safeguard against any errors converting to json by setting fields to null Do not use be_t...
-module(be_db_pending_txn). -include("be_db_worker.hrl"). -include("be_db_follower.hrl"). -behavior(gen_server). -behavior(be_db_worker). be_db_worker -export([prepare_conn/1]). -export([start_link/0, init/1, handle_call/3, handle_cast/2, handle_info/2]). -record(state, {}). be_db_worker -define(S_PENDING_TXN...
7b4d9680b4765361108c890a5a799df9bc0ec34dbdc2437daa75913eb8f85d3f
arrayfire/arrayfire-haskell
Parse.hs
{-# LANGUAGE OverloadedStrings #-} module Parse where import Prelude hiding (lex) import Control.Monad import Data.Text (Text) import qualified Data.Text as T import Text.Parsec import Lex import Types parseAST :: Parser AST parseAST = do afa...
null
https://raw.githubusercontent.com/arrayfire/arrayfire-haskell/5d621602bb925ce5122a66011003498cbe638e2b/gen/Parse.hs
haskell
# LANGUAGE OverloadedStrings #
module Parse where import Prelude hiding (lex) import Control.Monad import Data.Text (Text) import qualified Data.Text as T import Text.Parsec import Lex import Types parseAST :: Parser AST parseAST = do afapi type' <- getType funcName <- n...
05161ed7b399780336210dd7235a67a0931ba2ee12b9eec3ded3a946a6644009
digikar99/numericals
lparallel.lisp
(in-package :dense-numericals.impl) (defparameter nu:*inline-with-multithreading* nil "Inlining is usually necessary for smaller arrays; for such arrays multithreading becomes unnecessary. If this parameter is non-NIL, code using multithreading would be emitted; otherwise, the code would be skipped.") (defparameter...
null
https://raw.githubusercontent.com/digikar99/numericals/797332c2c5b3d3e590619fd912d88c12a5ebf764/dense-numericals-src/lparallel.lisp
lisp
for such arrays multithreading otherwise, the code would be skipped.") While it's tempting to check the compile time value of NU:*MULTITHREADED-THRESHOLD* while inlining in an attempt to reduce code size, the actual size differences the size is largely determined by the PTR - ITERATE - BUT - INNER
(in-package :dense-numericals.impl) (defparameter nu:*inline-with-multithreading* nil becomes unnecessary. If this parameter is non-NIL, code using multithreading (defparameter nu:*multithreaded-threshold* 80000 "The lower bound of the array size beyond which LPARALLEL is used for distributing operations across mul...
579f4e9115f124f82714827c082db49ce31abd9ffe6b2cc8ac3ebdae84aac250
khibino/haskell-relational-record
Source.hs
module DB.Source (connect, defineTable) where import Database.HDBC.MySQL ( MySQLConnectInfo(..), defaultMySQLConnectInfo , Connection, connectMySQL ) import Database.HDBC.Query.TH (defineTableFromDB) ...
null
https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/test/HDBC/MySQL/DB/Source.hs
haskell
module DB.Source (connect, defineTable) where import Database.HDBC.MySQL ( MySQLConnectInfo(..), defaultMySQLConnectInfo , Connection, connectMySQL ) import Database.HDBC.Query.TH (defineTableFromDB) ...
436275a40dd4e13f146c914b8e949f47551ba83e78e0c55a4af187f49393807e
DanielG/ghc-mod
PathsAndFilesSpec.hs
module PathsAndFilesSpec where import GhcMod.PathsAndFiles import GhcMod.Cradle import qualified GhcMod.Utils as U import Control.Monad.Trans.Maybe import System.Directory import System.FilePath import Test.Hspec import TestUtils spec :: Spec spec = do describe "getSandboxDb" $ do it "can parse a config...
null
https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/test/PathsAndFilesSpec.hs
haskell
module PathsAndFilesSpec where import GhcMod.PathsAndFiles import GhcMod.Cradle import qualified GhcMod.Utils as U import Control.Monad.Trans.Maybe import System.Directory import System.FilePath import Test.Hspec import TestUtils spec :: Spec spec = do describe "getSandboxDb" $ do it "can parse a config...
d9f739578d5ee3f927c3820189f8d49ecc4199fc63047d170b6ee67371d58b3f
hbr/fmlib
state.mli
open Fmlib_std module Text: sig type t val substring: string -> int -> int -> t val string: string -> t val fill: int -> char -> t val char: char -> t val length: t -> int val peek: t -> char val advance: t -> t option end module Line: sig type t end type chunk type group mod...
null
https://raw.githubusercontent.com/hbr/fmlib/169a1b8e53c828d24329398b6ee0a6deab41a662/src/pretty/state.mli
ocaml
open Fmlib_std module Text: sig type t val substring: string -> int -> int -> t val string: string -> t val fill: int -> char -> t val char: char -> t val length: t -> int val peek: t -> char val advance: t -> t option end module Line: sig type t end type chunk type group mod...
c770f086dbb09c4d6a3c7f383e0f5650c720163090d3787999200063a5da6d66
zwizwa/staapl
label-unit.rkt
#lang racket/unit (require "sig.rkt" "label-sig.rkt" "ns.rkt" "code.rkt") ;; Translate a bunch of interfaces into one that is used to implement ;; the macros. (import jump^ ;; exit ram^ ;; allot org^ ;; org-begin, org-end instantiate^)...
null
https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/label-unit.rkt
racket
Translate a bunch of interfaces into one that is used to implement the macros. exit allot org-begin, org-end wrap-word, wrap-variable NOTE: you can't assign the value of an identifier to another one in a module body, as it will be #<undefined>. I.e. this doesn't always work: (define label:register! code-a...
#lang racket/unit (require "sig.rkt" "label-sig.rkt" "ns.rkt" "code.rkt") (export label^) (define-syntax-rule (wrap-functions (mf:x label:x) ...) (begin (define (mf:x . args) (apply label:x args)) ...)) (wrap-functions (label:append! code-append-postponed!) (label:wrap-wor...
d41b521c88384c3f50d0af510082c5a53a71ff70d7c4e70ada931e46037c3ba4
haskell/haskell-ide-engine
FunctionalBadProjectSpec.hs
{-# LANGUAGE OverloadedStrings #-} module FunctionalBadProjectSpec where -- import Control.Lens hiding (List) import Control . Monad . IO.Class -- import qualified Data.Text as T import Language . . LSP.Test hiding ( message ) import Language . . as LSP import ...
null
https://raw.githubusercontent.com/haskell/haskell-ide-engine/d84b84322ccac81bf4963983d55cc4e6e98ad418/test/functional/FunctionalBadProjectSpec.hs
haskell
# LANGUAGE OverloadedStrings # import Control.Lens hiding (List) import qualified Data.Text as T --------------------------------------------------------------------- can produce diagnostics at the moment. Needs more investigation TODO: @fendor: Add issue link here it "deals with cabal file with unsati...
module FunctionalBadProjectSpec where import Control . Monad . IO.Class import Language . . LSP.Test hiding ( message ) import Language . . as LSP import Language . . . Lens as LSP hiding ( contents , error ) import Test.Hspec import Test...
1381a966899ed94a0fcd193066e8767dec2867e47893dc0ec30d8558c8e983f8
RefactoringTools/HaRe
test1.hs
module Test1 where --id x = x --f x = not (not x) f = not . not g,h :: a -> a g x = x h = g property IsId = {| f::a->a | All x. {f x}===x |} --(x,y)=(id,id) assert IdIsId = id ::: IsId {-#cert:IdIsId#-} assert Id_g = g ::: IsId {-#cert:Id_g#-} assert Id_g' = IsId g assert MapIdIsId = {map id} ::: IsId {-#cer...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/property/tests/test1.hs
haskell
id x = x f x = not (not x) (x,y)=(id,id) #cert:IdIsId# #cert:Id_g# #cert:MapIdIsId# property P = P #cert:EqReflBool# all = [False,True] #cert:AllBools# #cert:ExcludedMiddle#
module Test1 where f = not . not g,h :: a -> a g x = x h = g property IsId = {| f::a->a | All x. {f x}===x |} assert Id_g' = IsId g # cert : NotNotIsId # property Reflexive = {| rel::a->a->a | All x . { x `rel` x } === {True} |} assert EqReflBool = {(==)::Bool->Bool->Bool} ::: Reflexive allElems :: (Bounded...
1c172889ca07738e8ab5b7c8174c88d254b79c9ec740ed4ed599892b393dc99f
lem-project/lem
grammer.lisp
(in-package :lem-lisp-mode) (defun featurep (form) (cond ((atom form) (find (find-symbol (let ((*print-case* :upcase)) (princ-to-string form)) :keyword) (features))) ((string-equal 'and (car form)) (every #'featurep (c...
null
https://raw.githubusercontent.com/lem-project/lem/81e234d205829996e6f99eeeeda7b82b38816e97/modes/lisp-mode/grammer.lisp
lisp
#\"))))
(in-package :lem-lisp-mode) (defun featurep (form) (cond ((atom form) (find (find-symbol (let ((*print-case* :upcase)) (princ-to-string form)) :keyword) (features))) ((string-equal 'and (car form)) (every #'featurep (c...
dfce7a997a6a2c99fcbda7a1539a6134b7ff27c9bfcd26d8101df250a9242012
haskell-suite/haskell-src-exts
ParenFunBind.hs
module ParenFunBind where (foo x) y = x + y
null
https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/ParenFunBind.hs
haskell
module ParenFunBind where (foo x) y = x + y
b6dd27bad4f3b9a6cc0085912e5dfe25a2470403798aec481f40e7ce905d1073
gregnwosu/haskellbook
Jammin.hs
module Jammin where import Data.List data Fruit = Peach | Plum | Apple | Blackberry deriving (Eq, Show, Ord) data JamJars = Jam {kind:: Fruit, quantity:: Int} deriving (Eq, Show, Ord) row1 = [Jam Plum 3, Jam Apple 4, Jam Peach 1, Jam Blackberry 7] row2 = [Jam Plum 8, Jam Apple 2, Jam Peach...
null
https://raw.githubusercontent.com/gregnwosu/haskellbook/b21fb6772e58f07cff334d9c551d0477ec856897/Jammin.hs
haskell
module Jammin where import Data.List data Fruit = Peach | Plum | Apple | Blackberry deriving (Eq, Show, Ord) data JamJars = Jam {kind:: Fruit, quantity:: Int} deriving (Eq, Show, Ord) row1 = [Jam Plum 3, Jam Apple 4, Jam Peach 1, Jam Blackberry 7] row2 = [Jam Plum 8, Jam Apple 2, Jam Peach...
b1a0cbfa6dff916747449f8f93387f01a0dc9cf509d43b63a3ba0888baeb970e
ragkousism/Guix-on-Hurd
apr.scm
;;; GNU Guix --- Functional package management for GNU Copyright © 2013 < > Copyright © 2014 , 2015 < > ;;; ;;; This file is part of GNU Guix. ;;; GNU is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundat...
null
https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/packages/apr.scm
scheme
GNU Guix --- Functional package management for GNU This file is part of GNU Guix. you can redistribute it and/or modify it either version 3 of the License , or ( at your option) any later version. GNU Guix is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied wa...
Copyright © 2013 < > Copyright © 2014 , 2015 < > under the terms of the GNU General Public License as published by You should have received a copy of the GNU General Public License along with GNU . If not , see < / > . (define-module (gnu packages apr) #:use-module ((guix licenses) #:prefix l:) ...
1ace40badefd2a52f44b9036628fa84ef4d574ff9294bcf555f00070a45fbbc0
robert-strandh/Climacs
file-commands.lisp
;;; -*- Mode: Lisp; Package: CLIMACS-GUI -*- ( c ) copyright 2004 - 2005 , 2016 by ( ) ( c ) copyright 2004 - 2005 by ( ) ( c ) copyright 2005 by ( ) ( c ) copyright 2005 by ( ) ;;; This library is free software; you can redistribute it and/or ...
null
https://raw.githubusercontent.com/robert-strandh/Climacs/68ccba6a2a9cc78c1a84f1698c31c78a215f3d90/file-commands.lisp
lisp
-*- Mode: Lisp; Package: CLIMACS-GUI -*- This library is free software; you can redistribute it and/or either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU License ...
( c ) copyright 2004 - 2005 , 2016 by ( ) ( c ) copyright 2004 - 2005 by ( ) ( c ) copyright 2005 by ( ) ( c ) copyright 2005 by ( ) modify it under the terms of the GNU Library General Public version 2 of the License , or ( at your option ) ...
fbd03fa686e51e27465508c40c5be4174916cebc19919cdfa5be0a98834d0484
alda-lang/alda-core
util.clj
(ns alda.util (:require [clojure.string :as str] [taoensso.timbre :as timbre] [taoensso.timbre.appenders.core :as appenders] [taoensso.timbre.appenders.3rd-party.rolling :as rolling]) (:import [java.io File] ...
null
https://raw.githubusercontent.com/alda-lang/alda-core/4c92eb4fe363485193c58b77b1ec8e36c8866fb5/src/alda/util.clj
clojure
(ns alda.util (:require [clojure.string :as str] [taoensso.timbre :as timbre] [taoensso.timbre.appenders.core :as appenders] [taoensso.timbre.appenders.3rd-party.rolling :as rolling]) (:import [java.io File] ...
1f73fcb21ea43639da3d98d29e4f10be4367d76656f46d0068fe0d2d299e7e48
pixlsus/registry.gimp.org_static
00-Volume-Express-4ST_v1.1.scm
; GIMP script-fu-00-volume-express-4st version 1.1 2011.04.23 from the script - fu " add-bevel.scm version 1.04 " by ; ; ; 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 , eithe...
null
https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/00-Volume-Express-4ST_v1.1.scm
scheme
GIMP script-fu-00-volume-express-4st This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A ...
version 1.1 2011.04.23 from the script - fu " add-bevel.scm version 1.04 " by it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or Thank you to ( sambrookjm ) who fixed the issue of bumpmap for certain valu...
791f13c6d6f3f60dfe0def7ee794eefb642f37f0dc9513abdd93493ddf469d5b
frenetic-lang/netcore-1.0
TopoParser.hs
module Frenetic.TopoParser ( parseTopo , makeEdgeList ) where import Text.ParserCombinators.Parsec import Frenetic.Topo as Topo import Data.List import Data.Maybe import Data.Word import Frenetic.NetCore.Types A topology is represented by mininet as a string of the following format : - switch < - > host...
null
https://raw.githubusercontent.com/frenetic-lang/netcore-1.0/976b08b740027e8ed19f2d55b1e77f663bee6f02/src/Frenetic/TopoParser.hs
haskell
is a singleton (or at the end) to make this the type we really want should do an additional map: parseTopo and cast that to an int (i.e. to a node)
module Frenetic.TopoParser ( parseTopo , makeEdgeList ) where import Text.ParserCombinators.Parsec import Frenetic.Topo as Topo import Data.List import Data.Maybe import Data.Word import Frenetic.NetCore.Types A topology is represented by mininet as a string of the following format : - switch < - > host...
584435ff1326063e543996a7a80674ba7e58292ace567fbd37378ac1e18e1bed
ygrek/ocaml-extlib
extBuffer.ml
open ExtBytes module Buffer = struct include Buffer #if OCAML < 402 The uses of unsafe_{of , to}_string above are not semantically justified , as the Buffer implementation may very well capture and share parts of its internal buffer , or of input string given as input . They are howe...
null
https://raw.githubusercontent.com/ygrek/ocaml-extlib/69b77f0f0500c98371aea9a6f2abb56c946cdab0/src/extBuffer.ml
ocaml
open ExtBytes module Buffer = struct include Buffer #if OCAML < 402 The uses of unsafe_{of , to}_string above are not semantically justified , as the Buffer implementation may very well capture and share parts of its internal buffer , or of input string given as input . They are howe...
aecb0fe061ccb15cc4de16a58bbb066b930df03a545918e0ec04e77bc589ccbf
alexandergunnarson/quantum
java.cljc
(ns quantum.test.compile.transpile.from.java (:require [#?(:clj clojure.test :cljs cljs.test) :refer [#?@(:clj [deftest is testing])] :refer-macros [deftest is testing]] [quantum.core.print :as pr] [quantum.core.convert :as conv] [quantum.core...
null
https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/test/quantum/test/compile/transpile/from/java.cljc
clojure
(do
(ns quantum.test.compile.transpile.from.java (:require [#?(:clj clojure.test :cljs cljs.test) :refer [#?@(:clj [deftest is testing])] :refer-macros [deftest is testing]] [quantum.core.print :as pr] [quantum.core.convert :as conv] [quantum.core...
9a8e28ff224e3e5f1084e4781a97a47e65e22cd15e17e236abe196104d21ad08
metabase/metabase
truncate_audit_log_test.clj
(ns metabase.task.truncate-audit-log-test (:require [clojure.test :refer :all] [java-time :as t] [metabase.models.query-execution :refer [QueryExecution]] [metabase.models.setting :as setting] [metabase.public-settings.premium-features :as premium-features] [metabase.query-processor.util :as qp.util...
null
https://raw.githubusercontent.com/metabase/metabase/4059bd7b8eb0749d069bc4c36b844d477db7678f/test/metabase/task/truncate_audit_log_test.clj
clojure
Tests for the EE implementation are in `metabase-enterprise.task.truncate-audit-log-test` Mock a cloud environment so that we can change the setting value via env var
(ns metabase.task.truncate-audit-log-test (:require [clojure.test :refer :all] [java-time :as t] [metabase.models.query-execution :refer [QueryExecution]] [metabase.models.setting :as setting] [metabase.public-settings.premium-features :as premium-features] [metabase.query-processor.util :as qp.util...
f8d0a71c33ca779931a8d75130c8fdd712b51bfde8fd0b7f27e0793774f67fcc
GaloisInc/cryptol
Name.hs
-- | Module : Cryptol . . Name Copyright : ( c ) 2015 - 2016 Galois , Inc. -- License : BSD3 -- Maintainer : -- Stability : provisional -- Portability : portable # LANGUAGE DeriveGeneric # {-# LANGUAGE Safe #-} module Cryptol.Parser.Name where import Cryptol.Utils.Fixity import Cryptol....
null
https://raw.githubusercontent.com/GaloisInc/cryptol/f8b55439467abe3e7427b80edc37ff95a13de62b/src/Cryptol/Parser/Name.hs
haskell
| License : BSD3 Maintainer : Stability : provisional Portability : portable # LANGUAGE Safe # Names ----------------------------------------------------------------------- | Names that originate in the parser. ^ Fresh names generated by a pass. | Passes that can generate fresh names. FIXME?
Module : Cryptol . . Name Copyright : ( c ) 2015 - 2016 Galois , Inc. # LANGUAGE DeriveGeneric # module Cryptol.Parser.Name where import Cryptol.Utils.Fixity import Cryptol.Utils.Ident import Cryptol.Utils.PP import Cryptol.Utils.Panic (panic) import Control.DeepSeq import GHC....
5fbc7312d8d8e0e98387249396a8f0238e38845b282aa7bba9aba31a59bda6ad
melange-re/melange
melange_ppx.ml
module Ast_deriving_compat = Ast_deriving_compat module Ast_uncurry_apply = Ast_uncurry_apply module Ppx_apply = Ppx_apply module Ppx_entry = Ppx_entry
null
https://raw.githubusercontent.com/melange-re/melange/b595c2647a285e8bb8b16f109d0ab0fbfa22afa3/jscomp/frontend/melange_ppx.ml
ocaml
module Ast_deriving_compat = Ast_deriving_compat module Ast_uncurry_apply = Ast_uncurry_apply module Ppx_apply = Ppx_apply module Ppx_entry = Ppx_entry
397b6cea968314cd458e272ba43a5d824a5b440f2376ca1fc625f479de6a878e
witan-org/witan
comp_keys.ml
(*************************************************************************) This file is part of Witan . (* *) Copyright ( C ) 2017 CEA ( Commi...
null
https://raw.githubusercontent.com/witan-org/witan/d26f9f810fc34bf44daccb91f71ad3258eb62037/src/stdlib/comp_keys.ml
ocaml
*********************************************************************** alternatives) Automatique) ...
This file is part of Witan . Copyright ( C ) 2017 CEA ( Commissariat à l'énergie atomique et aux énergies ( Institut National de Recherche en Informatique et en CNRS ( Centre nation...
e75a3d51d2480851ac24119b34a7ba77138415206c2422d13cb10d679c0460e4
xapi-project/xen-api
extauth_plugin_ADwinbind.mli
* Copyright ( C ) 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 file LI...
null
https://raw.githubusercontent.com/xapi-project/xen-api/afb22851ee5aafe9ec5f863844683aff241900f0/ocaml/xapi/extauth_plugin_ADwinbind.mli
ocaml
start winbind service stop winbind service init winbind service Expose function to make compiler happy for unittest
* Copyright ( C ) 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 file LI...
7d8178ce5a13c56aa5af21682e6cd3830c8ec4af6355124d36f25baf29504a74
twosigma/waiter
cookie_support.clj
;; Copyright ( c ) Two Sigma Open Source , LLC ;; 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...
null
https://raw.githubusercontent.com/twosigma/waiter/bcb4444541ed380c75a135a7fc347b3ca8a51e1a/waiter/src/waiter/cookie_support.clj
clojure
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permi...
Copyright ( c ) Two Sigma Open Source , LLC distributed under the License is distributed on an " AS IS " BASIS , (ns waiter.cookie-support (:require [clj-time.core :as t] [clojure.data.codec.base64 :as b64] [clojure.string :as str] [clojure.tools.logging :as log] [t...
f5a74a9680fd5ad646997812b089eb3d0895608ac9120bdd4df2575b14639eaf
ocaml-multicore/tezos
voting_period_storage.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2020 Metastate AG < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_protocol/voting_period_storage.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2020 Metastate AG < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER ...
59405ae273181b5c60490ac300fc58ab848c39ef863e85888e00752e448a1848
BillHallahan/G2
NQueens.hs
# LANGUAGE QuasiQuotes # module NQueens where import Data.List import SymH.SymH type Queen = (Int, Int) -- Gets all pairs of unique positions pairs :: Ord a => [a] -> [(a, a)] pairs xs = [(a, b) | a <- xs, b <- xs, a < b] -- Checks if all elements of list are unique allUnique :: Ord a => [a] -> Bool allUnique xs =...
null
https://raw.githubusercontent.com/BillHallahan/G2/4d287df8ed7ba13c06d96d4911b9eedf870e80a1/tests/QuasiQuotes/NQueens.hs
haskell
Gets all pairs of unique positions Checks if all elements of list are unique No same x and y value Not on the same diagonal Check that all queens in a list are safe Valid Queens on an n x n board
# LANGUAGE QuasiQuotes # module NQueens where import Data.List import SymH.SymH type Queen = (Int, Int) pairs :: Ord a => [a] -> [(a, a)] pairs xs = [(a, b) | a <- xs, b <- xs, a < b] allUnique :: Ord a => [a] -> Bool allUnique xs = length xs == length (nub xs) Check if two positions are safe pairSafe :: (Queen...
db7541344939c2e06de32d12cbc4def31fef3fdc335b3d5105b6aca031fb06fc
tmattio/spin
prompt_password.ml
module Input_buffer = struct let create () = ref "" let is_empty t = !t = "" let add_char t chr = t := !t ^ Char.escaped chr let rm_last_char t = if is_empty t then () else t := String.sub !t 0 (String.length !t - 1) let get t = !t let reset t = t := "" end let prompt ?validate ?de...
null
https://raw.githubusercontent.com/tmattio/spin/485a3329c9aea1f2def16e2f1fff375041e4931e/lib/inquire/prompts/prompt_password.ml
ocaml
Enter Enter, no input Enter, with input Handle ^L
module Input_buffer = struct let create () = ref "" let is_empty t = !t = "" let add_char t chr = t := !t ^ Char.escaped chr let rm_last_char t = if is_empty t then () else t := String.sub !t 0 (String.length !t - 1) let get t = !t let reset t = t := "" end let prompt ?validate ?de...
9213019f47cae3c9bb1080d246a62ca94b726255fd99dcdc8f2e60a328e7b5a8
sfx/ragtime.elasticsearch
elasticsearch.clj
(ns ragtime.elasticsearch (:require [clj-http.client :as http] [ragtime.core :refer [connection Migratable]])) (def ^{:private true} index "ragtime") (def ^{:private true} mapping "migrations") (def ^{:private true} created-at "created_at") (defn- ensure-migrations-index-exists [es] (try (let [i...
null
https://raw.githubusercontent.com/sfx/ragtime.elasticsearch/fea8a8b760ba0368ba18f69c5546dd6dd6193360/src/ragtime/elasticsearch.clj
clojure
(ns ragtime.elasticsearch (:require [clj-http.client :as http] [ragtime.core :refer [connection Migratable]])) (def ^{:private true} index "ragtime") (def ^{:private true} mapping "migrations") (def ^{:private true} created-at "created_at") (defn- ensure-migrations-index-exists [es] (try (let [i...
bbcdeef84b1479ffc92fe43db3c2d4f3225fed21bdb9a960e47454b0fb541f79
dchelimsky/sicp-exercises
ex-1.9.scm
#lang scheme Each of the following two procedures defines a method for adding two positive integers in terms of the procedures inc , which increments its argument by 1 , and dec , which decrements its argument by 1 . ; ;(define (+ a b) ; (if (= a 0) ; b ; (inc (+ (dec a) b)))) ; ;(define (+ a b) ; (if (= a...
null
https://raw.githubusercontent.com/dchelimsky/sicp-exercises/55c804e3775b87a490e05f8337fc59bc7ce07f28/chapter-1/ex-1.9.scm
scheme
(define (+ a b) (if (= a 0) b (inc (+ (dec a) b)))) (define (+ a b) (if (= a 0) b (+ (dec a) (inc b)))) Using the substitution model, illustrate the process generated by each procedure in evaluating (+ 4 5). Are these processes iterative or recursive? ^^ recursive ^^ iterative
#lang scheme Each of the following two procedures defines a method for adding two positive integers in terms of the procedures inc , which increments its argument by 1 , and dec , which decrements its argument by 1 . (define (+ a b) (if (= a 0) b (inc (+ (dec a) b)))) (+ 4 5) (inc (+ 3 5)) (inc (inc (+...
60465bd1d274b3752f1066ba77a21bced71d1c69f87da07261851557f5610ebf
valderman/haste-compiler
DoubleConversion.hs
# LANGUAGE CPP # module Tests.DoubleConversion where # NOINLINE cases # cases :: [Double] cases = [-1, -1.2, -1.7, 0, 1, 1.2, 1.7] runTest :: IO [Int] runTest = return $ map floor cases ++ map ceiling cases ++ map round cases
null
https://raw.githubusercontent.com/valderman/haste-compiler/47d942521570eb4b8b6828b0aa38e1f6b9c3e8a8/Tests/DoubleConversion.hs
haskell
# LANGUAGE CPP # module Tests.DoubleConversion where # NOINLINE cases # cases :: [Double] cases = [-1, -1.2, -1.7, 0, 1, 1.2, 1.7] runTest :: IO [Int] runTest = return $ map floor cases ++ map ceiling cases ++ map round cases
da03708dca713f583b346032b32994b30526ca9ef83bc6ae1aad323289f2a1d1
UChicago-PL/smyth
env.ml
open Lang let empty : env = ([], []) let all_res : env -> (string * res) list = fun (rs, _) -> rs let all_type : env -> (string * typ) list = fun (_, ts) -> ts let concat : env list -> env = fun envs -> let (rss, tss) = List.split envs in ( List.concat rss , List.concat tss ...
null
https://raw.githubusercontent.com/UChicago-PL/smyth/08fea281f70d3ee604fde9dde140c8a570d6905d/lib/smyth/env.ml
ocaml
open Lang let empty : env = ([], []) let all_res : env -> (string * res) list = fun (rs, _) -> rs let all_type : env -> (string * typ) list = fun (_, ts) -> ts let concat : env list -> env = fun envs -> let (rss, tss) = List.split envs in ( List.concat rss , List.concat tss ...
1b467f903885b0d2b62bd4dcea5f43f4120c8c9d7d9d99591990de38ad64abad
mstksg/backprop
Backprop.hs
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ViewPatterns # -- | -- Module : Numeric.Backprop -- Copyright : (c) Justin Le 2018 -- License : BS...
null
https://raw.githubusercontent.com/mstksg/backprop/e8962c2029476c7721c5f5488e8689737294ceee/src/Numeric/Backprop.hs
haskell
# LANGUAGE GADTs # # LANGUAGE PatternSynonyms # # LANGUAGE RankNTypes # | Module : Numeric.Backprop Copyright : (c) Justin Le 2018 License : BSD3 Stability : experimental Portability : non-portable Automatic differentation and backpropagation. Main idea: Write a function comput...
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ViewPatterns # Maintainer : result , you work with ' BVar 's containing those values . Working with these ' 's is made smooth with the usage of lenses and other combinators , and libraries can offe...
d7ebdb4e230b9609f358b56aa31cc4c94f96bce4206018c8c55c4041e59f277e
graninas/automatic-whitebox-testing-showcase
Types.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # {-# LANGUAGE GADTs #-} # LANGUAGE TypeApplications # {-# LANGUAGE TypeSynonymInstances ...
null
https://raw.githubusercontent.com/graninas/automatic-whitebox-testing-showcase/c465d0c22c0154525781442c8c8f0df481165aaa/lib/flow/Types.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE GADTs # # LANGUAGE TypeSynonymInstances # # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveGeneric # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE TypeApplications # module Types ( module Types , module X ) where import Data.Aeson (FromJSON, ToJSON) import ...
946b03a1b551b7e77db73f2a3c7bcc8459cbe5f7428b6e57b4b3140db07be204
larcenists/larceny
sect.scm
(data (label foo (dwords 100 200 300 (reloc abs $here 4)))) (text (label bar (esc ((push $win)) (seq (nop) (nop)))))
null
https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/sect.scm
scheme
(data (label foo (dwords 100 200 300 (reloc abs $here 4)))) (text (label bar (esc ((push $win)) (seq (nop) (nop)))))
ecacb3200ce609cec43118bfe9f2f0d31804f4807975359b03ec76a1d6c95637
henrik42/spring-break
core.clj
(ns spring-break.core (:gen-class)) (defn log [fmt & args] (.println System/out (apply format (str "+++ " fmt) args))) (defn -main [conf & bean-names] (let [_ (log "Loading ClassPathXmlApplicationContext from '%s'" conf) closed (promise) sac (proxy [org.springframework.context.support.ClassPathX...
null
https://raw.githubusercontent.com/henrik42/spring-break/0d4e51f6ec0ffab023c46709a43b9d877fac4536/src/main/clojure/spring_break/core.clj
clojure
(ns spring-break.core (:gen-class)) (defn log [fmt & args] (.println System/out (apply format (str "+++ " fmt) args))) (defn -main [conf & bean-names] (let [_ (log "Loading ClassPathXmlApplicationContext from '%s'" conf) closed (promise) sac (proxy [org.springframework.context.support.ClassPathX...
5bfcb8f3d83bc86f2f19efb6457b3b382031330e7868299868f6612057bc4ef2
clojure/core.typed
rec_type.clj
(ns clojure.core.typed.test.rec-type (:require [clojure.core.typed :as t]) (:import (clojure.lang IMapEntry))) ( t / defalias ( Rec [ x ] ( t / Map Any ( U [ Any - > Any ] x ) ) ) ) ; ;(t/ann-form {:a (t/ann-form (fn [a] a) ; [Any -> Any])} ; RuleSet) (t/defalias Rule [t/Any...
null
https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/rec_type.clj
clojure
(t/ann-form {:a (t/ann-form (fn [a] a) [Any -> Any])} RuleSet) (let [result (reduce (ann-form (fn [report kv] (let [rule-path (key kv) rule (val kv) datum (get ...
(ns clojure.core.typed.test.rec-type (:require [clojure.core.typed :as t]) (:import (clojure.lang IMapEntry))) ( t / defalias ( Rec [ x ] ( t / Map Any ( U [ Any - > Any ] x ) ) ) ) (t/defalias Rule [t/Any -> (t/Option t/Keyword)]) (t/defalias RuleSet (t/Rec [x] (t/Map t/Any (t/U Rule x)))) (t/defalia...
ba812adc0649f3693d279886e7442c00989a6bdd48dde8226b7eb86b8fbe2474
yav/hobbit
Env.hs
module Type.Env ( Env , empty, ext, Type.Env.lookup, fromList, fromFun ) where import AST import Type.FVS import qualified Data.Map as Map import Control.Monad(mplus) empty :: Env ext :: (Name,Schema) -> Env -> Env lookup :: Name -> Env -> Maybe Schema fromList ...
null
https://raw.githubusercontent.com/yav/hobbit/31414ba1188f4b39620c2553b45b9e4d4aa40169/src/Type/Env.hs
haskell
Note: we assume that there are no free variables in the function part of the environment.
module Type.Env ( Env , empty, ext, Type.Env.lookup, fromList, fromFun ) where import AST import Type.FVS import qualified Data.Map as Map import Control.Monad(mplus) empty :: Env ext :: (Name,Schema) -> Env -> Env lookup :: Name -> Env -> Maybe Schema fromList ...
5c7746c7e353eaa5c6065f59e2918b2eab5cac2bc688836ae0d88dbb1507e29d
GaloisInc/what4
BLT.hs
----------------------------------------------------------------------- -- | Module : What4.Solver . Description : What4 solver interface for BLT Copyright : ( c ) Galois , Inc 2015 - 2016 -- License : BSD3 -- Maintainer : -- Stability : provisional -- This modul...
null
https://raw.githubusercontent.com/GaloisInc/what4/af466fc8ba46c1f3e2981c0372930bf991288969/what4-blt/src/What4/Solver/BLT.hs
haskell
--------------------------------------------------------------------- | License : BSD3 Maintainer : Stability : provisional ---------------------------------------------------------------------- # LANGUAGE DeriveDataTypeable # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE Rank...
Module : What4.Solver . Description : What4 solver interface for BLT Copyright : ( c ) Galois , Inc 2015 - 2016 This module provides the BLT integer linear programming library as an optional solver in MSS . # LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE EmptyCase # # LANGUAGE Fl...
428a2231bcf13b9b2b0723c63c23b4878803c9586ccdbbc4e4ddb5fccbd6c608
davebryson/beepbeep
blog_database.erl
%%%------------------------------------------------------------------- %%% Description : Simple in-memory database for demo purposes %%%------------------------------------------------------------------- -module(blog_database). -behaviour(gen_server). %% API -export([start/0,insert/2,latest/0]). %% gen_server callba...
null
https://raw.githubusercontent.com/davebryson/beepbeep/62db46d268c6cb6ad86345562b3c77f8ff070b27/example/blog/src/blog_database.erl
erlang
------------------------------------------------------------------- Description : Simple in-memory database for demo purposes ------------------------------------------------------------------- API gen_server callbacks ==================================================================== API ========================...
-module(blog_database). -behaviour(gen_server). -export([start/0,insert/2,latest/0]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). Function : start_link ( ) - > { ok , Pid } | ignore | { error , Error } start() -> gen_server:start_link({local, ?MODULE}, ?MODULE...
2e7ca904ebeadf35c84e4a37e7267202d3db4d222465892c835f8563d4092556
tromp/ChessPositionRanking
CountChess.hs
module Main where import Control.Monad import Data.Array import qualified Data.Map as M tuple of # pieces # pawns # promotions # factorial_product data Army = Army !Int !Int !Int !Integer deriving (Eq, Ord, Show) given a number of fixed pawns ( normally 0 , but 1 with fixed en - passant ) and a number of fixe...
null
https://raw.githubusercontent.com/tromp/ChessPositionRanking/472195ccd9a8abb31c73ca68f130db8905a20ff8/src/CountChess.hs
haskell
return list of possibly armies number of unfixed rooks number of kings number of promotable pawns number of queens adjust for queen promotions number of rooks adjust for rook promotions number of bishops adjust for bishop promotions number of knights adjust for knight promotions number of promotions numbe...
module Main where import Control.Monad import Data.Array import qualified Data.Map as M tuple of # pieces # pawns # promotions # factorial_product data Army = Army !Int !Int !Int !Integer deriving (Eq, Ord, Show) given a number of fixed pawns ( normally 0 , but 1 with fixed en - passant ) and a number of fixe...
92626529bb90ef060edfde1767f9c26d75cd26340cfa5457ff60068e5236c929
deepflowinc/guardian
Constants.hs
# LANGUAGE QuasiQuotes # module Development.Guardian.Constants (configFileName) where import Path (File, Path, Rel, relfile) configFileName :: Path Rel File configFileName = [relfile|dependency-domains.yaml|]
null
https://raw.githubusercontent.com/deepflowinc/guardian/9409189a1149c63ea49055816efefeb873904883/src/Development/Guardian/Constants.hs
haskell
# LANGUAGE QuasiQuotes # module Development.Guardian.Constants (configFileName) where import Path (File, Path, Rel, relfile) configFileName :: Path Rel File configFileName = [relfile|dependency-domains.yaml|]
2039448e8e94fc0cafa80fee511c773b23668d47ca7b0027e70ff1fe8f1c6c10
nuprl/gradual-typing-performance
date.rkt
#lang typed/racket/base ;; Working with dates (provide;/contract date ;(->i ([year exact-integer?]) ( [ month ( integer - in 1 12 ) ] ; [day (year month) (day-of-month/c year month)]) ; [d date?])] ( - > date ? YMD ? ) ] date->jdn ;(-> date? exact...
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/postmortem/experiments/adaptor/without-adaptor/gregor/typed/date.rkt
racket
Working with dates /contract (->i ([year exact-integer?]) [day (year month) (day-of-month/c year month)]) [d date?])] (-> date? exact-integer?)] (-> YMD? date?)] (-> exact-integer? date?)] (-> date? exact-integer?)] (-> date? string?)] (-> date? date? boolean?)] (-> date? date? boolean?)] ---------------...
#lang typed/racket/base ( [ month ( integer - in 1 12 ) ] ( - > date ? YMD ? ) ] ( - > date ? ( integer - in 1 53 ) ) ] ) (require benchmark-util "../base/types.rkt" (only-in racket/math exact-round) (only-in racket/format ~r) racket/match) (require/typed/check "core-structs.rkt" [#:struct YMD ([...
9275f87004ee589904849815ec21afd35bb0543064caee8ef0a12986d3b39adb
brunjlar/simple-plutus
Types.hs
{-# LANGUAGE DerivingStrategies #-} # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE TemplateHaskell #-} module Plutus.Types ( module Plutus.Types.Datum , module Plutus.Types.Value , Map, Seq , PubKey , Slot , SlotEnd (..), _Finite, _Forever , SlotRange (..), srStart,...
null
https://raw.githubusercontent.com/brunjlar/simple-plutus/20fe63533cb5006e4dabce09ef02c3bd960fd3bb/src/Plutus/Types.hs
haskell
# LANGUAGE DerivingStrategies # # LANGUAGE TemplateHaskell # | A public key, which identifies a party on the blockchain. | A slot. | A time interval. ^ begin of the time interval ^ end of the time interval (can be infinite). | An address, specifiying who is entitled to unlock the funds locked i...
# LANGUAGE GeneralizedNewtypeDeriving # module Plutus.Types ( module Plutus.Types.Datum , module Plutus.Types.Value , Map, Seq , PubKey , Slot , SlotEnd (..), _Finite, _Forever , SlotRange (..), srStart, srEnd , Address (..), _PKAddr, _ScriptAddr , Output (..), oAddress, oValue, oDa...
24cb9eafc5e62da260cdd3654b0f742913fc484d40fc6a549e5916a77a95b4c5
clojure/core.typed.analyzer.jvm
utils.clj
Copyright ( c ) , contributors . ;; 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/clojure/core.typed.analyzer.jvm/7246adac3bb5565ae0a785f430a2121226e7d1cb/src/main/clojure/clojure/core/typed/analyzer/js/utils.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 ) , contributors . (ns clojure.core.typed.analyzer.js.utils (:require [clojure.string :as s] [clojure.tools.analyzer.utils :refer [-source-info]] [clojure.java.io :as io]) (:import java.io.File java.net.URL)) (defn desugar-macros [{:keys [require] :as ns...
cd661c48720fe1e1c468d12c33e4b5a0b5e76f8245deec9291aed6a7f0b6328d
lambdaisland/chui
report.cljs
(ns lambdaisland.chui.report (:require [clojure.pprint :as pprint] [kitchen-async.promise :as p] [lambdaisland.chui.stacktrace :as stacktrace] [lambdaisland.deep-diff2 :as ddiff] [lambdaisland.deep-diff2.printer-impl :as printer-impl] [lambdaisland.deep-diff...
null
https://raw.githubusercontent.com/lambdaisland/chui/dc8735863b461cf529881ba263e1096a39378ba4/modules/chui-ui/src/lambdaisland/chui/report.cljs
clojure
:actual is of the form (not (= ...)) Uncomment to include namespace in failure report:
(ns lambdaisland.chui.report (:require [clojure.pprint :as pprint] [kitchen-async.promise :as p] [lambdaisland.chui.stacktrace :as stacktrace] [lambdaisland.deep-diff2 :as ddiff] [lambdaisland.deep-diff2.printer-impl :as printer-impl] [lambdaisland.deep-diff...
e9c99b6dbd6d9b37c561b06a871051211fda96f2a41e1f44dd172c98d7492889
RyanMcG/Cadence
response_codes.clj
(ns cadence.views.response-codes (:require [cadence.views.common :as common])) (def not-found "Define 404 error page." (common/base-layout [:div.hero-unit [:h1 "Hey! Where are you going?"] [:p (str "Maybe it was just an accident, but we can't find that page" " you requested.")] [...
null
https://raw.githubusercontent.com/RyanMcG/Cadence/c7364cba7e2de48c8a0b90f0f4d16a8248c097d4/src/cadence/views/response_codes.clj
clojure
(ns cadence.views.response-codes (:require [cadence.views.common :as common])) (def not-found "Define 404 error page." (common/base-layout [:div.hero-unit [:h1 "Hey! Where are you going?"] [:p (str "Maybe it was just an accident, but we can't find that page" " you requested.")] [...
2edffa2dd457c59d4ddf746a1cb73ae9c47f19509620e8497e50091641e1a737
ndmitchell/catch
Main.hs
module Main(main) where import Board import Solution import Problem import System.Environment( getArgs ) main = do { files <- getArgs ; mapM mateInN files } mateInN file = do { putStrLn "" ; putStrLn ("File: " ++ file) ; input <- readFile file ; let { (bd, (c,n)) = readProblem input ; result = sho...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/examples/Nofib/Mate/Main.hs
haskell
module Main(main) where import Board import Solution import Problem import System.Environment( getArgs ) main = do { files <- getArgs ; mapM mateInN files } mateInN file = do { putStrLn "" ; putStrLn ("File: " ++ file) ; input <- readFile file ; let { (bd, (c,n)) = readProblem input ; result = sho...
a3165d72609ca1daea3a0c3a2da5189cad5f04f14b8ccb0e8b0c4a621f02e9c3
chef/chef-server
oc_chef_data_collector.erl
-module(oc_chef_data_collector). -include("oc_chef_wm.hrl"). -export([notify/2]). -spec notify(Req :: wm_req(), State :: #base_state{}) -> ok. notify(Req, #base_state{reqid = ReqId, resource_state = ResourceState, resource_mod = ResourceMod} = State) when is_record(ResourceState, acl_state); is_record(Resour...
null
https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/oc_chef_wm/src/oc_chef_data_collector.erl
erlang
Skip controls because oc_chef_action can't extract them yet is_record(ResourceState, control_state); Skip GET because we're not updating anything authenticate_user should not be an action. If we're here then we've matched a resource that we want to report but the request has to have failed with a non-successful r...
-module(oc_chef_data_collector). -include("oc_chef_wm.hrl"). -export([notify/2]). -spec notify(Req :: wm_req(), State :: #base_state{}) -> ok. notify(Req, #base_state{reqid = ReqId, resource_state = ResourceState, resource_mod = ResourceMod} = State) when is_record(ResourceState, acl_state); is_record(Resour...
cbdec62c165a8a80a264281647d6353ecb7d1f0d7162bd517993e7f0de206a0a
Perry961002/SICP
exe2.27-deep-reverse.scm
(define (deep-reverse items) (cond ((null? items) '()) ((not (pair? items)) items) (else (append (deep-reverse (cdr items)) (list (deep-reverse (car items)))))))
null
https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap2/exercise/exe2.27-deep-reverse.scm
scheme
(define (deep-reverse items) (cond ((null? items) '()) ((not (pair? items)) items) (else (append (deep-reverse (cdr items)) (list (deep-reverse (car items)))))))
6b17673608e583573b999f0ed9aa590f3bbb1f2fbcc0856faa501c33356f8c08
logseq/logseq
bug_report.cljs
(ns frontend.components.bug-report (:require [rum.core :as rum] [frontend.ui :as ui] [frontend.components.header :as header] [frontend.util :as util] [reitit.frontend.easy :as rfe] [clojure.string :as string] [frontend.handler.notification :as no...
null
https://raw.githubusercontent.com/logseq/logseq/dded4be84b61ddf8a261135c55853224d631ac23/src/main/frontend/components/bug_report.cljs
clojure
when step === 0 for mobile container divider
(ns frontend.components.bug-report (:require [rum.core :as rum] [frontend.ui :as ui] [frontend.components.header :as header] [frontend.util :as util] [reitit.frontend.easy :as rfe] [clojure.string :as string] [frontend.handler.notification :as no...
1a8eb52de81509bc75dc3b12bccbf9eea54fc20791a57d607fab8f3b91f26499
glondu/belenios
archive.ml
(**************************************************************************) (* BELENIOS *) (* *) Copyright © 2012 - 2022 (* ...
null
https://raw.githubusercontent.com/glondu/belenios/de4a3205c3d2adb91863965a706fa6028177d78f/src/lib/core/archive.ml
ocaml
************************************************************************ BELENIOS This program is free softw...
Copyright © 2012 - 2022 it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the exemption that compiling , linking , and/or using OpenSSL is allowed . You should have rece...
3af66e247762d0f086902b9feac28263be6428a738a776c44e05087113ff1c92
Convex-Dev/convex.cljc
def.clj
(ns convex.test.break.def "Testing utilities around `def`." {:author "Adam Helinski"} (:require [clojure.test.check.properties :as TC.prop] [convex.break :as $.break] [convex.cell :as $.cell] [convex.eval :as $.eval] ...
null
https://raw.githubusercontent.com/Convex-Dev/convex.cljc/effce7127933c0733a7ef00f4ede8fc83277ab28/module/break/src/test/clj/convex/test/break/def.clj
clojure
(ns convex.test.break.def "Testing utilities around `def`." {:author "Adam Helinski"} (:require [clojure.test.check.properties :as TC.prop] [convex.break :as $.break] [convex.cell :as $.cell] [convex.eval :as $.eval] ...
87544200ad0026fec50fa1a0bfd3ea7c7b30159a430ab219c23c6d2a571d91ab
jcfaracco/lispvirt
lispvirt-domain.lisp
;;;------------------------------------------------------------------------- Lispvirt - Common LISP bindings for Libvirt . ;;; Copyright ( C ) 2015 ;;; lispvirt-domain.lisp is part of Lispvirt . ;;; Lispvirt is free software : you can redistribute it and/or modify it under the terms of the GNU General Publ...
null
https://raw.githubusercontent.com/jcfaracco/lispvirt/568495b00bb19b46a40f4669b8b21395e5f5fe74/lispvirt/src/lispvirt-domain.lisp
lisp
------------------------------------------------------------------------- (at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -------------------------------...
Lispvirt - Common LISP bindings for Libvirt . Copyright ( C ) 2015 lispvirt-domain.lisp is part of Lispvirt . Lispvirt is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the Licen...
bab9b2e38524fcd5e8fbdb7c645176038f14c63c5d360dab609ff9861865d48d
digitallyinduced/ihp
Generators.hs
module IHP.IDE.CodeGen.View.Generators where import IHP.ViewPrelude import IHP.IDE.ToolServer.Types import IHP.IDE.ToolServer.Layout import IHP.IDE.CodeGen.Types import qualified Data.Text as Text import IHP.IDE.ToolServer.Helper.View data GeneratorsView = GeneratorsView instance View GeneratorsView where html G...
null
https://raw.githubusercontent.com/digitallyinduced/ihp/31cde86f59be65a999a7ffb4d7d37f0221354ad7/IHP/IDE/CodeGen/View/Generators.hs
haskell
module IHP.IDE.CodeGen.View.Generators where import IHP.ViewPrelude import IHP.IDE.ToolServer.Types import IHP.IDE.ToolServer.Layout import IHP.IDE.CodeGen.Types import qualified Data.Text as Text import IHP.IDE.ToolServer.Helper.View data GeneratorsView = GeneratorsView instance View GeneratorsView where html G...
2e6bcdba6f1da2105722662d9848365c6d70edacabab54ae77bf35ca1a54feee
aeternity/mnesia_leveled
mnesia_leveled_indexes.erl
%%---------------------------------------------------------------- Copyright ( c ) 2013 - 2016 Klarna AB %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the License at %% %% ...
null
https://raw.githubusercontent.com/aeternity/mnesia_leveled/11c480b5546ed6087ae688e8596bd596a1f7bdd1/test/mnesia_leveled_indexes.erl
erlang
---------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissions an...
Copyright ( c ) 2013 - 2016 Klarna AB This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(mnesia_leveled_indexes). -expor...
b42233408e01b44bb691d9ec65f2a3ff9fbe9ee7f647ecdd8f742b1ff1af906b
cryptosense/pkcs11
pkcs11_rev.mli
(** Reverse bindings. *) module Make : functor (X : Pkcs11.LOW_LEVEL_BINDINGS) -> sig end
null
https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/rev/pkcs11_rev.mli
ocaml
* Reverse bindings.
module Make : functor (X : Pkcs11.LOW_LEVEL_BINDINGS) -> sig end
6b7100eeabeba2751982782755c0f9b6da09254bce64f2d33e3435ea9d6c55a7
bolt12/laop
Internal.hs
# LANGUAGE TypeFamilies # {-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE GADTs #-} # LANGUAGE UndecidableInstances # # LANGUAGE FlexibleContexts # # LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE DerivingVia # # LANGUAGE DataKinds # ------------------------------...
null
https://raw.githubusercontent.com/bolt12/laop/54968c9e92e9243a731320758da7d59b98e903da/src/LAoP/Relation/Internal.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE GADTs # --------------------------------------------------------------------------- | Maintainer : Stability : experimental Boolean matrices. This module offers many of the combinators of the Algebra of Programming discipline. It is still under construction and very ex...
# LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # LANGUAGE FlexibleContexts # # LANGUAGE TypeApplications # # LANGUAGE ScopedTypeVariables # # LANGUAGE StandaloneDeriving # # LANGUAGE DerivingVia # # LANGUAGE DataKinds # Module : . Internal Copyright : ( c ) 2019 - 2020 The discipline gene...
1a0ad4e7ad6f0fdd24a3744f1bd89434afa297a2513a5feec82f59a8618e7f79
fission-codes/fission
DNSLink.hs
module Fission.Web.Server.IPFS.DNSLink ( module Fission.Web.Server.IPFS.DNSLink.Class ) where import Fission.Web.Server.IPFS.DNSLink.Class
null
https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-web-server/library/Fission/Web/Server/IPFS/DNSLink.hs
haskell
module Fission.Web.Server.IPFS.DNSLink ( module Fission.Web.Server.IPFS.DNSLink.Class ) where import Fission.Web.Server.IPFS.DNSLink.Class
43a1b4bcc0144991c166ea3186233abc7738c23acdc5f366ff426778c4123178
janestreet/memtrace_viewer_with_deps
test.ml
open Core let pr sexp = let ppf = Format.std_formatter in Format.pp_set_margin ppf Int.max_value; (* Because of [%here] which can be long... *) Sexp.pp_hum ppf sexp; Format.pp_print_flush ppf () ;; let%expect_test _ = let x = 42 and y = "forty-two" in pr [%message "foo" 1 2 3 "blah"]; [%expect {| (foo ...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/ppx_sexp_message/test/test.ml
ocaml
Because of [%here] which can be long... This is a bit weird but consistent.
open Core let pr sexp = let ppf = Format.std_formatter in Sexp.pp_hum ppf sexp; Format.pp_print_flush ppf () ;; let%expect_test _ = let x = 42 and y = "forty-two" in pr [%message "foo" 1 2 3 "blah"]; [%expect {| (foo 1 2 3 blah) |}]; pr [%message "foo" (x : int) (y : string) (x + String.length y : int...
6a2c3df1bde2e5ce29746cf2bf64d24116753de5f068763afb5f4998f95475e0
whitequark/pry.ml
pry_bytecode.ml
open Instruct type error = | Bad_magic_number | No_section of string exception Error of error type debug_info = { di_paths : string list; di_events : Instruct.debug_event list; } let read_toc ic = let pos_trailer = in_channel_length ic - 16 in seek_in ic pos_trailer; let num_sections = input_binary_int i...
null
https://raw.githubusercontent.com/whitequark/pry.ml/ff8d8e9861ddd67f68994c468f199643416c5f42/src/pry_bytecode.ml
ocaml
open Instruct type error = | Bad_magic_number | No_section of string exception Error of error type debug_info = { di_paths : string list; di_events : Instruct.debug_event list; } let read_toc ic = let pos_trailer = in_channel_length ic - 16 in seek_in ic pos_trailer; let num_sections = input_binary_int i...
8593e69635d67d9ed519afb475197cd64ec463f7cac6ceecd0efa34c351f112f
ocsigen/ocaml-eliom
consistbl.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocsigen/ocaml-eliom/497c6707f477cb3086dc6d8124384e74a8c379ae/utils/consistbl.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 2002 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the Consistency tables : for checking consistency of module CRCs ELIOM type loc = Client | Server type s...
8ae0c115641e4878861550c7a851a9e90dd68c2284bb430ff917f91c90e78ef5
jepst/CloudHaskell
Remote.hs
| Cloud Haskell ( previously Remote Haskell ) is a distributed computing framework for . We can describe its interface as roughly two levels : the /process layer/ , consisting of -- processes, messages, and fault monitoring; and the -- /task layer/, consisting of tasks, promises, and fault recovery. -- This summ...
null
https://raw.githubusercontent.com/jepst/CloudHaskell/6acbcb6b2fc6bb6789cce2083cdd4747ef427627/Remote.hs
haskell
processes, messages, and fault monitoring; and the /task layer/, consisting of tasks, promises, and fault recovery. This summary module provides the most common interface functions for both layers, although advanced users might want to import names from the other constituent modules, as well. * The process layer ...
| Cloud Haskell ( previously Remote Haskell ) is a distributed computing framework for . We can describe its interface as roughly two levels : the /process layer/ , consisting of remoteInit, ProcessM, NodeId, ProcessId, MatchM, getSelfPid, getSelfNode, ...
fe5a43c72f27251ed035c2f8956e48d09c71551127781b58bc6cd5388b383ebc
racket/games
memory.rkt
#lang racket (require games/cards racket/gui racket/class racket/unit) (provide game@) (define game@ (unit (import) (export) Layout width and height : (define WIDTH 5) (define HEIGHT 4) (define MAX-MATCHES (/ (* WIDTH HEIGHT) 2)) Randomize (random-seed (modulo (current-milliseconds) 10000)) ;; Set up the table...
null
https://raw.githubusercontent.com/racket/games/e57376f067be51257ed12cdf3e4509a00ffd533d/memory/memory.rkt
racket
Set up the table Get table width & height Set up the cards Put the cards on the table Setup Number of matches found so far: Cancel first card Can't click a matched card, unless the game is over, in which case we reset the game Flip over a card... Match Not a match The timer turns out to be the most diffic...
#lang racket (require games/cards racket/gui racket/class racket/unit) (provide game@) (define game@ (unit (import) (export) Layout width and height : (define WIDTH 5) (define HEIGHT 4) (define MAX-MATCHES (/ (* WIDTH HEIGHT) 2)) Randomize (random-seed (modulo (current-milliseconds) 10000)) (define t (make-tab...