_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
121ea810da69d4f37cc7a30e522f57ca5505a9e30308c55bf2fd75e4c1aa8943
wdebeaum/step
webmaster.lisp
;;;; W::WEBMASTER ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::WEBMASTER (SENSES ((LF-PARENT ONT::developer-programmer) ;professional) (TEMPL COUNT-PRED-TEMPL) (META-DATA :ORIGIN CALO :ENTRY-DATE 20040204 :CHANGE-DATE NIL :wn ("webmaster%1:18:00") :COMMENTS HTML-PURCHA...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/webmaster.lisp
lisp
professional)
W::WEBMASTER (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::WEBMASTER (SENSES (TEMPL COUNT-PRED-TEMPL) (META-DATA :ORIGIN CALO :ENTRY-DATE 20040204 :CHANGE-DATE NIL :wn ("webmaster%1:18:00") :COMMENTS HTML-PURCHASING-CORPUS)))) ))
6a562e82a32b039911f18dd25d9a602b0c4ba6502f09b180e11587e5c16c6d3b
binaryage/chromex
storage.cljs
(ns chromex.ext.storage (:require-macros [chromex.ext.storage :refer [gen-wrap]]) (:require [chromex.core])) ; -- properties ------------------------------------------------------------------------------------------------------------- (defn sync* [config] (gen-wrap :property ::sync config)) (defn local* [confi...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts/chromex/ext/storage.cljs
clojure
-- properties ------------------------------------------------------------------------------------------------------------- -- events -----------------------------------------------------------------------------------------------------------------
(ns chromex.ext.storage (:require-macros [chromex.ext.storage :refer [gen-wrap]]) (:require [chromex.core])) (defn sync* [config] (gen-wrap :property ::sync config)) (defn local* [config] (gen-wrap :property ::local config)) (defn managed* [config] (gen-wrap :property ::managed config)) (defn on-changed...
56c47b382ab3bb9690d1e340c9077a8baff9ab02d9be21cf00780a272cf03879
iustin/corydalis
Cache.hs
Copyright ( C ) 2013 This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . This program is distributed i...
null
https://raw.githubusercontent.com/iustin/corydalis/43f8bf004904847fad43c428a9e1b20e67da964d/src/Cache.hs
haskell
# LANGUAGE OverloadedStrings # destination, so if it is a link, that's OK-ish. | Deletes a cache file, given that it lies under the cache directory. ^ Canonical, absolute path to the cache directory. ^ Relative path to the cache file. ^ Error details, or Nothing in case of success. | Inner body for 'deleteCache...
Copyright ( C ) 2013 This program is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . This program is distributed i...
dd2b845fc5cf0d4db81cdecafc3b64a84841490bc9b25cdc0ce68c1d1c273a9d
haskell/haskell-language-server
AlternateNumberFormat.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Ide.Plugin.AlternateNumberFormat (descriptor, Log(..)) where import Control.Lens ((^.)) import Control.Monad.Except (ExceptT, MonadIO, liftIO) import qualif...
null
https://raw.githubusercontent.com/haskell/haskell-language-server/9e5fc880d1bcf45bdcda1160a1f2a67408bbf410/plugins/hls-alternate-number-format-plugin/src/Ide/Plugin/AlternateNumberFormat.hs
haskell
collect all the literals for a file make a code action for every literal and its' alternates (then flatten the result) | Checks whether the extension given is already enabled
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Ide.Plugin.AlternateNumberFormat (descriptor, Log(..)) where import Control.Lens ((^.)) import Control.Monad.Except (ExceptT, MonadIO, liftIO) import qualif...
260733d4c1b8077168fd1f379f9065c47e16250f0e28119f5a507f1d0114f3e2
magnusjonsson/opti
update.ml
open Expr open Syntax_tree open Delta open Simplify open Fresh exception Impossible of string let collect_subscript_comparisons (e: expr) : (string * string) list = let rec collect e = match e with | Expr_const _ -> [] | Expr_ref(_,_) -> [] | Expr_unop(_, e1) -> collect e1 | Expr_binop(_, e1...
null
https://raw.githubusercontent.com/magnusjonsson/opti/dffb7b86b81c8059276b038313ddd88d2e9ff67e/lib/update.ml
ocaml
open Expr open Syntax_tree open Delta open Simplify open Fresh exception Impossible of string let collect_subscript_comparisons (e: expr) : (string * string) list = let rec collect e = match e with | Expr_const _ -> [] | Expr_ref(_,_) -> [] | Expr_unop(_, e1) -> collect e1 | Expr_binop(_, e1...
8ec8b7563235ea7b14288183af7daac0fd979a09013021d38cb57e4ceedc94ec
adamdoupe/find_ear_rails
early_suite.ml
open OUnit let prog = "../src/early" let output = "output.rb" let run_assert cmd = assert_equal ~printer:string_of_int ~msg:("subcommand " ^ cmd ^ " failed") 0 (Sys.command cmd) let tests () = let () = if Sys.file_exists output then Sys.remove output in let files = List.sort String.compare...
null
https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/tests/early/early_suite.ml
ocaml
for a deterministic ordering tests ()
open OUnit let prog = "../src/early" let output = "output.rb" let run_assert cmd = assert_equal ~printer:string_of_int ~msg:("subcommand " ^ cmd ^ " failed") 0 (Sys.command cmd) let tests () = let () = if Sys.file_exists output then Sys.remove output in let files = (List.filter (fun x ...
94897ae5855726d683e4a940c684c081981e9874166d46294e2f3088d0c19de0
haskell/haskell-language-server
LangPragmaModuleWithComment.expected.hs
#   LANGUAGE OverloadedStrings # module Test ( SomeData(..) ) where import Data.Monoid -- comment class Semigroup a => SomeData a instance SomeData All
null
https://raw.githubusercontent.com/haskell/haskell-language-server/fdbc555a9245cb3761c2bf7335f3d18b8cf7673c/plugins/hls-refactor-plugin/test/data/import-placement/LangPragmaModuleWithComment.expected.hs
haskell
comment
#   LANGUAGE OverloadedStrings # module Test ( SomeData(..) ) where import Data.Monoid class Semigroup a => SomeData a instance SomeData All
034b3ecb2926d4910ae821b34d06a1ddea5af5daa86f55b03c3df3112ecd4000
PLTools/GT
test007.ml
@type ('a, 'b) t = A of 'a GT.list * 'b GT.list with show, gmap let _ = let x = A ([1; 2; 3], ["4"; "5"; "6"]) in let y = GT.gmap t string_of_int int_of_string x in Printf.printf "%s\n" @@ GT.show t string_of_int GT.id x; Printf.printf "%s\n" @@ GT.show t GT.id string_of_int y
null
https://raw.githubusercontent.com/PLTools/GT/62d1a424a3336f2317ba67e447a9ff09d179b583/regression/test007.ml
ocaml
@type ('a, 'b) t = A of 'a GT.list * 'b GT.list with show, gmap let _ = let x = A ([1; 2; 3], ["4"; "5"; "6"]) in let y = GT.gmap t string_of_int int_of_string x in Printf.printf "%s\n" @@ GT.show t string_of_int GT.id x; Printf.printf "%s\n" @@ GT.show t GT.id string_of_int y
dee9df004477077731191484091cd8badb2b3c06371059d58ba694eddb7b69d0
macalimlim/programming-in-haskell
Chapter5.hs
module Chapter5 where WAVE ! ! ! List Similarites with Set Comprehensions / Builder Notation in Mathematics WAVE!!! List Comprehensions Similarites with Set Comprehensions/Builder Notation in Mathematics -} a = [ x ^ 2 | x <- [0..9] ] b = [ (x, y) | x <- [1..3], y <- [4,5] ] c = [ (x, y) | y <- [4,...
null
https://raw.githubusercontent.com/macalimlim/programming-in-haskell/47d7d9b92c3d79eeedc1123e6eb690f96fa8a4fc/Chapter5.hs
haskell
Guards/Filters Prime Numbers is a natural number greater than 1 that has no positive divisors other than 1 and itself The zip function
module Chapter5 where WAVE ! ! ! List Similarites with Set Comprehensions / Builder Notation in Mathematics WAVE!!! List Comprehensions Similarites with Set Comprehensions/Builder Notation in Mathematics -} a = [ x ^ 2 | x <- [0..9] ] b = [ (x, y) | x <- [1..3], y <- [4,5] ] c = [ (x, y) | y <- [4,...
674be698f23225323aa828462936c43287e5dd03c930439e43228460b6c4c0fb
input-output-hk/cardano-prelude
Short.hs
# LANGUAGE CPP # # LANGUAGE MagicHash # module Cardano.Prelude.Compat.ByteString.Short ( unsafeShortByteStringIndex, ) where GHC > = 9.0 does not export unsafeIndex for ShortByteString GHC < 9.0 does not export the ShortByteString constructor SBS . Coniditional compile to work around this . #if __GLASGW_HASK...
null
https://raw.githubusercontent.com/input-output-hk/cardano-prelude/94b37483937cfb7c07d69a708c950a090bb9670f/cardano-prelude/src/Cardano/Prelude/Compat/ByteString/Short.hs
haskell
# LANGUAGE CPP # # LANGUAGE MagicHash # module Cardano.Prelude.Compat.ByteString.Short ( unsafeShortByteStringIndex, ) where GHC > = 9.0 does not export unsafeIndex for ShortByteString GHC < 9.0 does not export the ShortByteString constructor SBS . Coniditional compile to work around this . #if __GLASGW_HASK...
8d1f8c31c52304697b5f52f39fb0d0389187c44d466370fc7adcf39ee2caa801
jackfirth/resyntax
legacy-syntax-migrations.rkt
#lang racket/base (require racket/contract/base) (provide (contract-out [legacy-syntax-migrations refactoring-suite?])) (require (for-syntax racket/base) rebellion/private/static-name resyntax/refactoring-rule resyntax/refactoring-suite resyntax/private/syntax-replacement ...
null
https://raw.githubusercontent.com/jackfirth/resyntax/f5a8ae97ee17be45ae23519bb9e702da3940e8b8/default-recommendations/legacy-syntax-migrations.rkt
racket
@----------------------------------------------------------------------------------------------------
#lang racket/base (require racket/contract/base) (provide (contract-out [legacy-syntax-migrations refactoring-suite?])) (require (for-syntax racket/base) rebellion/private/static-name resyntax/refactoring-rule resyntax/refactoring-suite resyntax/private/syntax-replacement ...
fd8d86a6789fb93303d0c062d5882b8e162ad37859e4c8f6f0e42da283e5ffce
rbkmoney/genlib
genlib_list_tests.erl
-module(genlib_list_tests). -include_lib("eunit/include/eunit.hrl"). -spec test() -> _. -spec wrap_empty_list_for_undefined_test() -> _. wrap_empty_list_for_undefined_test() -> ?assertEqual(genlib_list:wrap(undefined), []).
null
https://raw.githubusercontent.com/rbkmoney/genlib/2bbc54d4abe0f779d57c8f5911dce64d295b1cd1/test/genlib_list_tests.erl
erlang
-module(genlib_list_tests). -include_lib("eunit/include/eunit.hrl"). -spec test() -> _. -spec wrap_empty_list_for_undefined_test() -> _. wrap_empty_list_for_undefined_test() -> ?assertEqual(genlib_list:wrap(undefined), []).
4550f8f8a5ef16685c672dddba1f638bf4621e3b3adc811cc37864d6076aa7ea
haskell-beam/beam
SqliteSpecific.hs
{-# LANGUAGE OverloadedStrings #-} -- | Postgres-specific types, functions, and operators module Database.Beam.Sqlite.SqliteSpecific * Sqlite functions and aggregates sqliteGroupConcat , sqliteGroupConcatOver ) where import Database.Beam import Database.Beam.Backend.SQL import ...
null
https://raw.githubusercontent.com/haskell-beam/beam/596981a1ea6765b9f311d48a2ec4d8460ebc4b7e/beam-sqlite/Database/Beam/Sqlite/SqliteSpecific.hs
haskell
# LANGUAGE OverloadedStrings # | Postgres-specific types, functions, and operators argument as a delimiter. See 'sqliteGroupConcatOver' if you want to provide explicit quantification. See 'sqliteGroupConcat' if you want to change the delimiter.
module Database.Beam.Sqlite.SqliteSpecific * Sqlite functions and aggregates sqliteGroupConcat , sqliteGroupConcatOver ) where import Database.Beam import Database.Beam.Backend.SQL import Database.Beam.Query.Internal import Database.Beam.Sqlite.Connection import...
9834aa140bca3532a2f601ca8b3176504a417ecf0f8f934d150be4d64dc539a0
aaronc/fx-clj
extensibility.clj
(ns fx-clj.core.extensibility "Hooks for extending fx-clj functionality." (:require [fx-clj.impl.bootstrap])) (defmulti convert-arg "Converts arguments sent to the pset! function and other functions which take similar arguments. Implementing methods take three parameters: the requested type, the value...
null
https://raw.githubusercontent.com/aaronc/fx-clj/29639356d8d1253438ecf61e123caacefa9269ec/src/fx_clj/core/extensibility.clj
clojure
(ns fx-clj.core.extensibility "Hooks for extending fx-clj functionality." (:require [fx-clj.impl.bootstrap])) (defmulti convert-arg "Converts arguments sent to the pset! function and other functions which take similar arguments. Implementing methods take three parameters: the requested type, the value...
663a6e7fd8acd0e435ef754c963318ea3513db2f2af866a984efd5b4662ecd60
erlcloud/erlcloud
erlcloud_securityhub_test.erl
-module(erlcloud_securityhub_test). -include_lib("eunit/include/eunit.hrl"). -include("erlcloud_aws.hrl"). -define(TEST_AWS_CONFIG, #aws_config{ access_key_id = "TEST_ACCESS_KEY_ID", secret_access_key = "TEST_ACCESS_KEY", security_token = "TEST_SECURITY_TOKEN" } ). api_test_() -> ...
null
https://raw.githubusercontent.com/erlcloud/erlcloud/6e36f7f4dc91f229cad1e156020d2a985f3d61d3/test/erlcloud_securityhub_test.erl
erlang
-module(erlcloud_securityhub_test). -include_lib("eunit/include/eunit.hrl"). -include("erlcloud_aws.hrl"). -define(TEST_AWS_CONFIG, #aws_config{ access_key_id = "TEST_ACCESS_KEY_ID", secret_access_key = "TEST_ACCESS_KEY", security_token = "TEST_SECURITY_TOKEN" } ). api_test_() -> ...
9a450c045bb9dd74f0515e3febe0ab7518e055dc3000027eb1c8c59847acc2f0
quil-lang/quilc
qaoa-bench.lisp
qaoa-bench.lisp ;;;; Authors : , ; benchmark (in-package :cl-user) (defvar *this-random-state* (sb-ext:seed-random-state 1337)) (setf *random-state* (make-random-state *this-random-state*)) (ql:quickload :cl-quil-benchmarking) (in-package #:cl-quil-benchmarking) (defun reload (file) (format t "~&;; reloadin...
null
https://raw.githubusercontent.com/quil-lang/quilc/3f3260aaa65cdde25a4f9c0027959e37ceef9d64/benchmarking/qaoa-tests/qaoa-bench.lisp
lisp
benchmark (sb-ext:gc :full t) note: you can make these into longer lists to get more benchmarks at once
qaoa-bench.lisp Authors : , (in-package :cl-user) (defvar *this-random-state* (sb-ext:seed-random-state 1337)) (setf *random-state* (make-random-state *this-random-state*)) (ql:quickload :cl-quil-benchmarking) (in-package #:cl-quil-benchmarking) (defun reload (file) (format t "~&;; reloading ~S~%" file) (...
1e39a5310ac0b568710b0a62ef90f7c47aa72c3062d6c49aaffab7ae7c0a51f6
SchornacklabSLCU/amfinder
uIToggleBar.ml
AMFinder - ui / uIToggleBar.ml * * MIT License * Copyright ( c ) 2021 * * Permission is hereby granted , free of charge , to any person obtaining a copy * of this software and associated documentation files ( the " Software " ) , to * deal in the Software without restriction , including without...
null
https://raw.githubusercontent.com/SchornacklabSLCU/amfinder/8790fdbaf324e20dfa794d3f5caf6597292741fe/amfbrowser/sources/ui/uIToggleBar.ml
ocaml
Add horizontal space between toggle buttons. Toggle button icon. Check activation of all toggle buttons. Check activation of a single toggle button. can check other layer! initialization. Setting up expand/fill allows to centre the button box.
AMFinder - ui / uIToggleBar.ml * * MIT License * Copyright ( c ) 2021 * * Permission is hereby granted , free of charge , to any person obtaining a copy * of this software and associated documentation files ( the " Software " ) , to * deal in the Software without restriction , including without...
6f429d312d22f96d85ffbf8bf593edaf29389c1246231c2e489bbd2d47cc02c4
TyOverby/mono
incr_map_collate.ml
open! Core module Collate = Collate module Collated = Collated module Map_list = Map_list module Compare = struct type ('k, 'v, 'cmp) t = | Unchanged | Reversed | Custom_by_value of { compare : 'v -> 'v -> int } | Custom_by_key_and_value of { compare : 'k * 'v -> 'k * 'v -> int } [@@deriving sexp_o...
null
https://raw.githubusercontent.com/TyOverby/mono/9f361de248f67441dd1486419ba19044b6fa4fad/vendor/janestreet-incr_map/collate/src/incr_map_collate.ml
ocaml
We implement "lazy eviction" here - we only allow ourselves to use a value from deeper cache if its partial computations are present in the earlier layers. E.g. if we evict some ordering "s" from [cache_sorted], we might still have "s, f, r" in [cache_sorted_filtered_ranked], but we won't u...
open! Core module Collate = Collate module Collated = Collated module Map_list = Map_list module Compare = struct type ('k, 'v, 'cmp) t = | Unchanged | Reversed | Custom_by_value of { compare : 'v -> 'v -> int } | Custom_by_key_and_value of { compare : 'k * 'v -> 'k * 'v -> int } [@@deriving sexp_o...
2b7de02bc3f6418646ba6bfa54e2c3eaf35a20a999542ea828bbee8fd780517e
kadena-io/pact
Type.hs
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # {-# OPTIONS_GHC -Wno-redundant-constraints #-} -- | -- Module :...
null
https://raw.githubusercontent.com/kadena-io/pact/564cf5f3440337f806c249032fb40a2be8aad734/src/Pact/Types/Type.hs
haskell
# LANGUAGE DeriveTraversable # # LANGUAGE OverloadedStrings # # OPTIONS_GHC -Wno-redundant-constraints # | Module : Pact.Types.Type License : BSD-style (see the file LICENSE) Language types. * String representations | Pair a name and a type (arguments, bindings etc) | Function type | Primitive/unva...
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE TemplateHaskell # Copyright : ( C ) 2016 Maintainer : < > module Pact.Types.Type ( TypeName(..) , Arg(..) , aInfo , aName ,...
df1ecbe9131f21c3627eb2921e15ae19af68b2e1d9838a27f8a14d1e2d5dfeae
marigold-dev/deku
decode.ml
(* Decoding stream *) type stream = { name : string; bytes : string; pos : int ref } exception EOS let stream name bs = { name; bytes = bs; pos = ref 0 } let len s = String.length s.bytes let pos s = !(s.pos) let eos s = pos s = len s let check n s = if pos s + n > len s then raise EOS let skip n s = if n < 0 the...
null
https://raw.githubusercontent.com/marigold-dev/deku/a26f31e0560ad12fd86cf7fa4667bb147247c7ef/deku-c/interpreter/binary/decode.ml
ocaml
Decoding stream Errors Types Decode instructions Sections Type section Import section Function section Table section Memory section Global section Export section Start section Code section Element section Data section Custom section Modules
type stream = { name : string; bytes : string; pos : int ref } exception EOS let stream name bs = { name; bytes = bs; pos = ref 0 } let len s = String.length s.bytes let pos s = !(s.pos) let eos s = pos s = len s let check n s = if pos s + n > len s then raise EOS let skip n s = if n < 0 then raise EOS else check...
5158899556b03d537dff91146ec36c7eea17c837a5b27224c4f4b9a432b6722a
codereport/SICP-2020
cezar_b_solutions.rkt
#lang racket (require rackunit) (require rnrs/mutable-pairs-6) (require compatibility/mlist) (require racket/promise) ;--------------------------------------------------------------------- ; Lots of code from the book ;--------------------------------------------------------------------- 4.1.1 The Core of the Evalua...
null
https://raw.githubusercontent.com/codereport/SICP-2020/2d1e60048db89678830d93fcc558a846b7f57b76/Chapter%204.2%20Solutions/cezar_b_solutions.rkt
racket
--------------------------------------------------------------------- Lots of code from the book --------------------------------------------------------------------- 4.1.2 Representing Expressions body no else clause 4.1.3 Evaluator Data Structures -----------------------------------------------------------------...
#lang racket (require rackunit) (require rnrs/mutable-pairs-6) (require compatibility/mlist) (require racket/promise) 4.1.1 The Core of the Evaluator (define (sicp-eval exp env) (cond ((self-evaluating? exp) exp) ((variable? exp) (lookup-variable-value exp env)) ((quoted? exp) (text-of-quotation ex...
0df9f8267125544acd9052a683217d2b10b43e99aa5d66ac1675c2d07552f3d0
atlas-engineer/nyxt
conditions.lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nyxt) (export-always 'nyxt-error) (define-condition nyxt-error (error) ((message :initarg :message :accessor message)) (:report (lambda (c stream) (format stream "~a" (slot-value c 'message))))...
null
https://raw.githubusercontent.com/atlas-engineer/nyxt/f2295b590c700e000015a4c246d4af776a60b0cb/source/conditions.lisp
lisp
SPDX - FileCopyrightText : Atlas Engineer LLC SPDX - License - Identifier : BSD-3 - Clause (in-package :nyxt) (export-always 'nyxt-error) (define-condition nyxt-error (error) ((message :initarg :message :accessor message)) (:report (lambda (c stream) (format stream "~a" (slot-value c 'message))))...
76ea1aa33817c32ce3c1a609547d6f66ab95fba1ab9f9d8f33d7bcbb9eccb266
yallop/ocaml-asp
sexp_tokens.mli
* Copyright ( c ) 2018 and * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2018 Neelakantan Krishnaswami and Jeremy Yallop * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *...
null
https://raw.githubusercontent.com/yallop/ocaml-asp/a092f17ea55d427c63414899e39a8fe80b30db14/benchmarks/sexp/sexp_tokens.mli
ocaml
* Copyright ( c ) 2018 and * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2018 Neelakantan Krishnaswami and Jeremy Yallop * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *...
319c576269e831d30de021a86d5b61d13d7f93174b7b3cef252a8a270ef664aa
VictorNicollet/99-Problems-OCaml
p14.ml
(* Duplicate the elements of a list *) let rec duplicate = function | [] -> [] | h :: t -> h :: h :: duplicate t ;; assert (duplicate [`a;`b;`c;`c;`d] = [`a;`a;`b;`b;`c;`c;`c;`c;`d;`d]) ;;
null
https://raw.githubusercontent.com/VictorNicollet/99-Problems-OCaml/a13e625545d54d4d927b39b18ab1ffba7de6b7e6/11-20/p14.ml
ocaml
Duplicate the elements of a list
let rec duplicate = function | [] -> [] | h :: t -> h :: h :: duplicate t ;; assert (duplicate [`a;`b;`c;`c;`d] = [`a;`a;`b;`b;`c;`c;`c;`c;`d;`d]) ;;
3edea64743809d2cc53280772699b2bef920ab68642e7dffbd8beb22e2327934
yetanalytics/flint
update_test.cljc
(ns com.yetanalytics.flint.format.update-test (:require [clojure.test :refer [deftest testing is]] [clojure.string :as cstr] [com.yetanalytics.flint.format :as f] [com.yetanalytics.flint.format.update])) (defn- format-ast [ast] (f/format-ast ast {:pretty? true})) (deftest forma...
null
https://raw.githubusercontent.com/yetanalytics/flint/b0a2530582e04f5592869b0152b846864c283d77/src/test/com/yetanalytics/flint/format/update_test.cljc
clojure
(ns com.yetanalytics.flint.format.update-test (:require [clojure.test :refer [deftest testing is]] [clojure.string :as cstr] [com.yetanalytics.flint.format :as f] [com.yetanalytics.flint.format.update])) (defn- format-ast [ast] (f/format-ast ast {:pretty? true})) (deftest forma...
433c77a743ecaeaa1bff5af502d19bcbbd05a9d4074cf5d9eef51c83ea86c4c0
zcaudate/hara
state.clj
(ns hara.state (:require [hara.module :as module])) (module/include (hara.state.base.common create clone copy get set empty update ...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/src/hara/state.clj
clojure
(ns hara.state (:require [hara.module :as module])) (module/include (hara.state.base.common create clone copy get set empty update ...
ee9a3c200627f0d9649b80f519e2353a5db5e88af599552d03611bbfc72365df
bellissimogiorno/nominal
Unique.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE Trustworthy # # LANGUAGE MagicHash # module Language.Nominal.Unique ( Unique , newUnique , hashUnique ) where import Data.Data (Typeable, Data) import Data.IORef import GHC.Base import GHC.Num import System.IO.Unsafe (unsafePerfor...
null
https://raw.githubusercontent.com/bellissimogiorno/nominal/ab3306ee349dc481d2e2e6d103d90ffdd14ccaa9/src/Language/Nominal/Unique.hs
haskell
# LANGUAGE DeriveDataTypeable # | An abstract unique object. Objects of type 'Unique' may be compared for equality and ordering and hashed into 'Int'. >>> :{ do x <- newUnique print (x == x) y <- newUnique print (x == y) :} True False | Creates a new object of type 'Unique'. The value returned wi...
# LANGUAGE Trustworthy # # LANGUAGE MagicHash # module Language.Nominal.Unique ( Unique , newUnique , hashUnique ) where import Data.Data (Typeable, Data) import Data.IORef import GHC.Base import GHC.Num import System.IO.Unsafe (unsafePerformIO) newtype Unique = Unique Intege...
73c4f0632e46b7012d4c33745c85e91efa186da3a63953102cc247358b3e22a5
let-def/cuite
qFlags.mli
type 'flag t = private int64 type 'a primitive type 'a set = 'a primitive -> 'a t val empty : _ t val is_empty : _ t -> bool val set : 'flag set -> 'flag -> 'flag t -> 'flag t val is_set : 'flag set -> 'flag -> 'flag t -> bool val intersection : 'flag t -> 'flag t -> 'flag t val union : 'flag t -> 'flag t -> 'flag t ...
null
https://raw.githubusercontent.com/let-def/cuite/42629a91c573ecbf1b01f213f1bf35a456d2b1af/lib/qFlags.mli
ocaml
type 'flag t = private int64 type 'a primitive type 'a set = 'a primitive -> 'a t val empty : _ t val is_empty : _ t -> bool val set : 'flag set -> 'flag -> 'flag t -> 'flag t val is_set : 'flag set -> 'flag -> 'flag t -> bool val intersection : 'flag t -> 'flag t -> 'flag t val union : 'flag t -> 'flag t -> 'flag t ...
03be6644b28e6ec71eab0ef028d5239e2e66432c91d9405d05061147ff5760fe
skanev/playground
30-tests.scm
(require rackunit rackunit/text-ui) (load "helpers/evaluator.scm") (load "../30.scm") (define (run exp) (run-controller ec-error-support extra-operations exp)) (define sicp-5.30-tests (test-suite "Tests for SICP exercise 5.30" (check-equal? (run 'x) 'unbound-variable) (check-equal? (run '(+ 1 x)) 'un...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/05/tests/30-tests.scm
scheme
(require rackunit rackunit/text-ui) (load "helpers/evaluator.scm") (load "../30.scm") (define (run exp) (run-controller ec-error-support extra-operations exp)) (define sicp-5.30-tests (test-suite "Tests for SICP exercise 5.30" (check-equal? (run 'x) 'unbound-variable) (check-equal? (run '(+ 1 x)) 'un...
78670b793e8d6358dd1e9b53c9472f7d8bbcd5c73763dd29f1d30a10f0dd840c
ostera/serde.ml
de_variant.ml
open Ppxlib module Ast = Ast_builder.Default open De_base (** implementation *) let gen_deserialize_record_variant_impl ~ctxt ~variant_name fields = let loc = loc ~ctxt in let make_vars_and_pats i (ldecl, field_variant) = let record_field_name = ldecl.pld_name.txt in let f_idx = "f_" ^ Int.to_string i in ...
null
https://raw.githubusercontent.com/ostera/serde.ml/88604884cf3e6a928916f33c4bca1444bc2e12a2/serde_derive/de_variant.ml
ocaml
* implementation
open Ppxlib module Ast = Ast_builder.Default open De_base let gen_deserialize_record_variant_impl ~ctxt ~variant_name fields = let loc = loc ~ctxt in let make_vars_and_pats i (ldecl, field_variant) = let record_field_name = ldecl.pld_name.txt in let f_idx = "f_" ^ Int.to_string i in let pat = f_idx |>...
b2dcb64f2bcb86723791e0d2de6e9ff0ca5151b256c9b7b00ec36cc271b3da45
haskell/base16-bytestring
Tests.hs
{-# LANGUAGE OverloadedStrings #-} module Main ( main ) where import Control.Monad (liftM) import qualified Data.ByteString as BS import Data.ByteString.Internal (c2w, w2c) import Data.ByteString.Char8 () import qualified Data.ByteString.Base16 as B16 import qualified Data.ByteString.Base16.Lazy as LB16 import quali...
null
https://raw.githubusercontent.com/haskell/base16-bytestring/86d2940c83ec1edb3789c11d1db0fc47eb58c8c4/tests/Tests.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------ -- Test data
module Main ( main ) where import Control.Monad (liftM) import qualified Data.ByteString as BS import Data.ByteString.Internal (c2w, w2c) import Data.ByteString.Char8 () import qualified Data.ByteString.Base16 as B16 import qualified Data.ByteString.Base16.Lazy as LB16 import qualified Data.ByteString.Lazy as LBS im...
5650c03acac8438f70c667782f83a53dedf5137fd74b4424276b421ff6fc9054
Frama-C/Frama-C-snapshot
register_gui.ml
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/metrics/register_gui.ml
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
158f19cd304364b5c41fc2d88e83e6e6ffc5b19dcf6bc4a2449957e02639a5be
aryx/xix
cursors.mli
val crosscursor : Cursor.t val boxcursor : Cursor.t val sightcursor : Cursor.t val whitearrow : Cursor.t val query : Cursor.t val whitearrow: Cursor.t val query: Cursor.t *) val which_corner_cursor: Rectangle.t -> Point.t -> Cursor.t
null
https://raw.githubusercontent.com/aryx/xix/60ce1bd9a3f923e0e8bb2192f8938a9aa49c739c/windows/cursors.mli
ocaml
val crosscursor : Cursor.t val boxcursor : Cursor.t val sightcursor : Cursor.t val whitearrow : Cursor.t val query : Cursor.t val whitearrow: Cursor.t val query: Cursor.t *) val which_corner_cursor: Rectangle.t -> Point.t -> Cursor.t
96efbb281b7a70838b05e00630f41098048dc158d75c2188f43a8e28dd435cef
emanjavacas/cosycat
key_bindings.cljs
(ns cosycat.key-bindings (:require [keybind.core :as key] [re-frame.core :as re-frame])) (def key-bindings {:query-panel [{:key-stroke "shift-n" :event-key :next :fn #(re-frame/dispatch [:query-range :next])} {:key-stroke "shift-p" ...
null
https://raw.githubusercontent.com/emanjavacas/cosycat/a7186363d3c0bdc7b714af126feb565f98793a6e/src/cljs/cosycat/key_bindings.cljs
clojure
(ns cosycat.key-bindings (:require [keybind.core :as key] [re-frame.core :as re-frame])) (def key-bindings {:query-panel [{:key-stroke "shift-n" :event-key :next :fn #(re-frame/dispatch [:query-range :next])} {:key-stroke "shift-p" ...
fd0bd281da9597983dabb717509f5367bf437c56de89074bf54f7b707f7fc72a
haskell/aeson
Text.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # module Data.Aeson.Internal.Text ( unsafeDecodeASCII, ) where import Data.ByteString (ByteString) import qualified Data.Text as T #if MIN_VERSION_text(2,0,0) import Data.Text.Array (Array...
null
https://raw.githubusercontent.com/haskell/aeson/596499db1da36eccdd139d5ef62bfb41d265adfd/src/Data/Aeson/Internal/Text.hs
haskell
# LANGUAGE BangPatterns #
# LANGUAGE CPP # module Data.Aeson.Internal.Text ( unsafeDecodeASCII, ) where import Data.ByteString (ByteString) import qualified Data.Text as T #if MIN_VERSION_text(2,0,0) import Data.Text.Array (Array (..)) import qualified Data.T...
2c05687f23996ee8d027575b0e74c4e59f9550432d8c8f4843e268aee5eaba1b
bburdette/chordster
Application.hs
# OPTIONS_GHC -fno - warn - orphans # module Application ( makeApplication , getApplicationDev , makeFoundation ) where import Import import Yesod.Auth import Yesod.Default.Config import Yesod.Default.Main import Yesod.Default.Handlers import Network.Wai.Middleware.RequestLogger ( mkRequestLogger, ...
null
https://raw.githubusercontent.com/bburdette/chordster/70d235f1ca379e5ecd4a8f39dc1e734e2d50978b/Application.hs
haskell
Import all relevant handler modules here. Don't forget to add new modules to your cabal file! comments there for more details. This function allocates resources (such as a database connection pool), place to put your migrate statements to have automatic database Create the WAI application and apply middlewares |...
# OPTIONS_GHC -fno - warn - orphans # module Application ( makeApplication , getApplicationDev , makeFoundation ) where import Import import Yesod.Auth import Yesod.Default.Config import Yesod.Default.Main import Yesod.Default.Handlers import Network.Wai.Middleware.RequestLogger ( mkRequestLogger, ...
a9d4cb99416a27bd1787ce6fd7b898e5b866787dc9502978e763c5f809197380
dhall-lang/dhall-to-cabal
DhallToCabal.hs
# language ApplicativeDo # {-# language FlexibleContexts #-} # language FlexibleInstances # # language GADTs # # language LambdaCase # {-# language OverloadedStrings #-} # language RecordWildCards # module DhallToCabal ( dhallToCabal , genericPackageDescription , sourceRepo , repoKind , repoType , compiler...
null
https://raw.githubusercontent.com/dhall-lang/dhall-to-cabal/d16c510b87e966c3031e07b1810d152b051bc0d8/lib/DhallToCabal.hs
haskell
# language FlexibleContexts # # language OverloadedStrings # AllRightsReserved, but we still have to switch between depending on cabal-version. ^ The Dhall to parse. The condition has already been shown to hold. Consider only the true branch and discard the false branch. ...and here, the condition has been shown ...
# language ApplicativeDo # # language FlexibleInstances # # language GADTs # # language LambdaCase # # language RecordWildCards # module DhallToCabal ( dhallToCabal , genericPackageDescription , sourceRepo , repoKind , repoType , compiler , operatingSystem , library , extension , compilerOptions ...
5746ab4be7e6442e8968a231848eb363984d75353fea2609860aba039bc32125
taylorlapeyre/oj
validation.clj
(ns oj.validation "Functions for validating query maps.") (defn problem [message] (let [message (str "The query map had a problem: " message)] (throw (Exception. message)))) (def valid-comparator? #{:> :< :>= :<= :not=}) (def valid-aggregate-function? #{'count 'avg 'max 'min 'first 'last 'sum}) (defn va...
null
https://raw.githubusercontent.com/taylorlapeyre/oj/267e392309cba48fd00fa4534d6c9707b7885933/src/oj/validation.clj
clojure
letfn is really ugly...
(ns oj.validation "Functions for validating query maps.") (defn problem [message] (let [message (str "The query map had a problem: " message)] (throw (Exception. message)))) (def valid-comparator? #{:> :< :>= :<= :not=}) (def valid-aggregate-function? #{'count 'avg 'max 'min 'first 'last 'sum}) (defn va...
6ab5cc369798952a3dd4f88461fa158090e55a30cefcd7b498b999fc12c4ecc4
b0-system/b0
b00_fexts.mli
--------------------------------------------------------------------------- Copyright ( c ) 2019 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
null
https://raw.githubusercontent.com/b0-system/b0/cbe12b8a55da6b50ab01ed058b339dbed3cfe894/src/b00/kit/b00_fexts.mli
ocaml
* Sets of file extension sets. * The type for sets of file extensions. * The type for files mapped by their extension. * [v exts] is a set for the given extensions. * [ext e] is the set that containes only [e]. * [find_files exts m] selects from [m] the files that have an extension in [exts]. * [all_files m] ...
--------------------------------------------------------------------------- Copyright ( c ) 2019 The b0 programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 20...
df95fb94bf832b43fd9d20dc9addfa008f8e6864e8e79a7950f2e54ab1ee25b0
uwiger/gproc
gproc_info.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- %% -------------------------------------------------- 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 a...
null
https://raw.githubusercontent.com/uwiger/gproc/3737f2b958a5908d7a3870046ae162c5b9bf971c/src/gproc_info.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 and limitations ...
-*- erlang - indent - level : 4;indent - tabs - mode : nil -*- 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 The Initial De...
abf48a08b5f5c07cd7191da035c30644daba493a35f97059fcd83d760c0250cf
binaryage/cljs-oops
build.clj
(ns oops.circus.build (:require [clojure.string :as string] [clojure.test :refer [do-report]] [clojure.tools.logging :as log] [clojure.stacktrace :as stacktrace] [cljs.build.api :as compiler] [environ.core :refer [env]] [oops.circus.utils :refer ...
null
https://raw.githubusercontent.com/binaryage/cljs-oops/a2b48d59047c28decb0d6334e2debbf21848e29c/test/src/circus/oops/circus/build.clj
clojure
-- transcripts ------------------------------------------------------------------------------------------------------------ -- top-level functionality ------------------------------------------------------------------------------------------------ for some reason cljs compilations do not provide stable output - depe...
(ns oops.circus.build (:require [clojure.string :as string] [clojure.test :refer [do-report]] [clojure.tools.logging :as log] [clojure.stacktrace :as stacktrace] [cljs.build.api :as compiler] [environ.core :refer [env]] [oops.circus.utils :refer ...
d9025e98a65c6b27e630168b4dc9724f2e5965ea70e0dd049e3f49fe24f3ed0f
haskell-tools/haskell-tools
Constructor_res.hs
module Refactor.RenameDefinition.Constructor where data Point = Point2D Double Double distance :: Point -> Point -> Double distance (Point2D x1 y1) (Point2D x2 y2) = sqrt ((x1 - x2) ^ 2 + (y1 - y2) ^ 2)
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/RenameDefinition/Constructor_res.hs
haskell
module Refactor.RenameDefinition.Constructor where data Point = Point2D Double Double distance :: Point -> Point -> Double distance (Point2D x1 y1) (Point2D x2 y2) = sqrt ((x1 - x2) ^ 2 + (y1 - y2) ^ 2)
824197e83cc98de001c5ac3fb8a121b2ac7befc3a437f9d048a9d3a23afc7289
jrm-code-project/LISP-Machine
k-memory.lisp
-*- Mode : LISP ; Package : SIM ; -*- ;;;; Memory Simulation (eval-when (eval compile load) (defpackage "KSI" :use NIL)) (defvar *ksi-package* (find-package 'ksi)) (defvar *low-level-simulate* t "Set this to NIL to use Lambda memory primitives, T to use simulated K machine memory") System Constants (defc...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/pace/k/k-memory.lisp
lisp
Package : SIM ; -*- Memory Simulation Simulation Stuff
(eval-when (eval compile load) (defpackage "KSI" :use NIL)) (defvar *ksi-package* (find-package 'ksi)) (defvar *low-level-simulate* t "Set this to NIL to use Lambda memory primitives, T to use simulated K machine memory") System Constants (defconstant %%ptr-data-type (byte 6. 19.)) (defconstant %%ptr-pointe...
eb1d1acdf273b1891ad33ff99854abb80187221b9f0174547f77bb7a387e9cda
Larkenx/LispGameJame2018
entities.rkt
#lang racket (provide (all-defined-out)) (require thing "point.rkt") ; All entities have: ; - a location on the map ; - attack and defense strengths ; - hitpoints ; - an inventory (define-thing entity [character "x"] [color "white"] [background-color "black"] [location (pt 0 0)] [inventory '()] [view-ran...
null
https://raw.githubusercontent.com/Larkenx/LispGameJame2018/1cc76fae49c86b567b739246377598eaa5635868/src/entities.rkt
racket
All entities have: - a location on the map - attack and defense strengths - hitpoints - an inventory Otherwise, wander A fleeing enemy moves the exact opposite of a seeking enemy Otherwise, wander
#lang racket (provide (all-defined-out)) (require thing "point.rkt") (define-thing entity [character "x"] [color "white"] [background-color "black"] [location (pt 0 0)] [inventory '()] [view-range 5]) (define-thing enemy entity [name "enemy"] [color "red"] [attack 10] [defense 10] [h...
b1de1dc40a152a01998ec5d1c3c44689b80ab5a8d18cd4013cd52f5c9efe067f
amarpotghan/crjdt-haskell
Eval.hs
{-# LANGUAGE GADTs #-} # LANGUAGE LambdaCase # # LANGUAGE ViewPatterns # {-# LANGUAGE ConstraintKinds #-} # LANGUAGE RecordWildCards # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # module Data.Crjdt.Eval ( Eval(..) , EvalError(..) , addReceivedOps , run , evalEval , execEval , add...
null
https://raw.githubusercontent.com/amarpotghan/crjdt-haskell/8412ada8136f49ab12a314407983d95a6ad39d43/src/Data/Crjdt/Eval.hs
haskell
# LANGUAGE GADTs # # LANGUAGE ConstraintKinds #
# LANGUAGE LambdaCase # # LANGUAGE ViewPatterns # # LANGUAGE RecordWildCards # # LANGUAGE FlexibleContexts # # LANGUAGE GeneralizedNewtypeDeriving # module Data.Crjdt.Eval ( Eval(..) , EvalError(..) , addReceivedOps , run , evalEval , execEval , addVariable , execute , eval ) where import Data.Voi...
149647f316d9485cfa8af15a933a0d605241901a10e04ae2a011d0a620a69120
waldheinz/bling
AABB.hs
module Graphics.Bling.AABB ( AABB(..), mkAABB, extendAABBP, maximumExtent, centroid, surfaceArea, intersectAABB, splitAABB, boundingSphere, diagonal ) where import Graphics.Bling.Math -- | an axis-aligned bounding box data AABB = AABB { aabbMin :: {-# UNPACK #-} !Point, -- ^ the box' minimum aabbMax :...
null
https://raw.githubusercontent.com/waldheinz/bling/1f338f4b8dbd6a2708cb10787f4a2ac55f66d5a8/src/lib/Graphics/Bling/AABB.hs
haskell
| an axis-aligned bounding box # UNPACK # ^ the box' minimum # UNPACK # ^ the box' maximum | finds the @Dimension@ along which an @AABB@ has it's maximum extent | finds the bounding sphere of an @AABB@ ^ the box to get the bounding sphere for ^ (center, radius) of the bounding shpere
module Graphics.Bling.AABB ( AABB(..), mkAABB, extendAABBP, maximumExtent, centroid, surfaceArea, intersectAABB, splitAABB, boundingSphere, diagonal ) where import Graphics.Bling.Math data AABB = AABB { } instance Show AABB where show b = "AABB [min=" ++ show (aabbMin b) ++ ", max=" ++ show (aa...
599193423263305938cfc6d16e33c1a0afe8cd71777502cee412f4a17ff243f1
haskell-effectful/effectful
Plugin.hs
# LANGUAGE BlockArguments # # LANGUAGE CPP # module Effectful.Plugin (plugin) where import Data.Function (on) import Data.IORef (IORef, modifyIORef, newIORef, readIORef) import Data.Maybe (isNothing, mapMaybe) import Data.Set (S...
null
https://raw.githubusercontent.com/haskell-effectful/effectful/3f425be2c240bba47c6d39b1cfcc19561259613a/effectful-plugin/src-legacy/Effectful/Plugin.hs
haskell
polymorphic or monomorphic. Some examples include: @ (\"cleff\", \"Cleff.Internal.Rec\", \":>\") (\"polysemy\", \"Polysemy.Internal.Union\", \"Member\") @ You can see the source code for notes on the implementation of the plugin. - 'allGivens' are constraints already in our context, In the following notes, ...
# LANGUAGE BlockArguments # # LANGUAGE CPP # module Effectful.Plugin (plugin) where import Data.Function (on) import Data.IORef (IORef, modifyIORef, newIORef, readIORef) import Data.Maybe (isNothing, mapMaybe) import Data.Set (S...
0175ebfd7f4c6ec17f2730b4673f47a0962b1ec7aea6e96173ef1f3dd3c8dc3b
kupl/LearnML
patch.ml
type lambda = V of var | P of (var * lambda) | C of (lambda * lambda) and var = string let rec listcheck (var : string) (varl : string list) : bool = match varl with | [] -> false | hd :: tl -> if var = hd then true else listcheck var tl let rec lamfind (lam : lambda) (varl : string list) : bool = match lam...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/lambda/sub128/patch.ml
ocaml
type lambda = V of var | P of (var * lambda) | C of (lambda * lambda) and var = string let rec listcheck (var : string) (varl : string list) : bool = match varl with | [] -> false | hd :: tl -> if var = hd then true else listcheck var tl let rec lamfind (lam : lambda) (varl : string list) : bool = match lam...
03644b0340b27b34fb51f1c414eec43cd8dead9487e1be51f4c9f9966bb6339f
xavierleroy/camlidl
testcomponent.ml
(* Test the Com component *) let test_ix c = print_string "Testing IX interface..."; print_newline(); print_string "Calling f 10"; print_newline(); c#f 10 let test_iy c = print_string "Testing IY interface..."; print_newline(); print_string "Calling g 2"; print_newline(); let n = c#g 2 in print_string "...
null
https://raw.githubusercontent.com/xavierleroy/camlidl/b192760875fe6e97b13004bd289720618e12ee22/tests/testcomponent.ml
ocaml
Test the Com component
let test_ix c = print_string "Testing IX interface..."; print_newline(); print_string "Calling f 10"; print_newline(); c#f 10 let test_iy c = print_string "Testing IY interface..."; print_newline(); print_string "Calling g 2"; print_newline(); let n = c#g 2 in print_string "Result is "; print_int n; pri...
c19796b86b560c8185453f8c702123e9478670994bbde1c74aa9024dad45a15c
TerrorJack/ghc-alter
Storable.hs
# LANGUAGE Trustworthy # # LANGUAGE NoImplicitPrelude , MagicHash , UnboxedTuples # {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | Module : GHC.Storable Copyright : ( c ) The FFI task force , 2000 - 2002 -- License : see libraries/b...
null
https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/GHC/Storable.hs
haskell
# OPTIONS_HADDOCK hide # --------------------------------------------------------------------------- | License : see libraries/base/LICENSE Stability : internal Helper functions for "Foreign.Storable" ---------------------------------------------------------------------------
# LANGUAGE Trustworthy # # LANGUAGE NoImplicitPrelude , MagicHash , UnboxedTuples # Module : GHC.Storable Copyright : ( c ) The FFI task force , 2000 - 2002 Maintainer : Portability : non - portable ( GHC Extensions ) module GHC.Storable ( readWideCharOffPtr , readIntOffPtr...
4a5300368c5dfe99caaedf0200b79cfbd275b61dbc6f2dec58cf3a3a6669a5ea
tsloughter/kuberl
kuberl_v1beta1_network_policy.erl
-module(kuberl_v1beta1_network_policy). -export([encode/1]). -export_type([kuberl_v1beta1_network_policy/0]). -type kuberl_v1beta1_network_policy() :: #{ 'apiVersion' => binary(), 'kind' => binary(), 'metadata' => kuberl_v1_object_meta:kuberl_v1_object_meta(), 'spec' => kuberl_v1beta1_networ...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_network_policy.erl
erlang
-module(kuberl_v1beta1_network_policy). -export([encode/1]). -export_type([kuberl_v1beta1_network_policy/0]). -type kuberl_v1beta1_network_policy() :: #{ 'apiVersion' => binary(), 'kind' => binary(), 'metadata' => kuberl_v1_object_meta:kuberl_v1_object_meta(), 'spec' => kuberl_v1beta1_networ...
cde695df8ea24bb2239ff253111d63b049dcc58ddffba4a6ccdbe31a1b23e0d2
deadcode/Learning-CL--David-Touretzky
8.43.lisp
(defun flatten (x) (cond ((null x) nil) ((atom x) (list x)) (t (append (flatten (car x)) (flatten (cdr x)))))) (let ((test1 '(flatten '((A B (R)) A C (A D ((A (B)) R) A))))) (format t "~s = ~s~%" test1 (eval test1)))
null
https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%208/8.43.lisp
lisp
(defun flatten (x) (cond ((null x) nil) ((atom x) (list x)) (t (append (flatten (car x)) (flatten (cdr x)))))) (let ((test1 '(flatten '((A B (R)) A C (A D ((A (B)) R) A))))) (format t "~s = ~s~%" test1 (eval test1)))
0053e4fffd89ab17d1970a180c04cdf3e5d1d2ff4230db4d8d09671b0833002a
tamarit/edd
io_lib_format_old.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1996 - 2013 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Pub...
null
https://raw.githubusercontent.com/tamarit/edd/867f287efe951bec6a8213743a218b86e4f5bbf7/examples/io_lib_format/io_lib_format_old.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 1996 - 2013 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(io_lib_format_old). -export([fwri...
e129f8ea79db6c9c52d1e12d1944419d6ee82ba0f295b3519c8ef707eb314ae7
rixed/ramen
RamenParams.ml
Program parameters . * String representation is used as part of the signature of a running * worker . * String representation is used as part of the signature of a running * worker. *) open Batteries open RamenHelpersNoLog module T = RamenTypes module N = RamenName type param = N.field * Raql_value.t [@@ppp ...
null
https://raw.githubusercontent.com/rixed/ramen/395e54fa834fe24f098482a1fe2c8685e7126d6c/src/RamenParams.ml
ocaml
In an alternate universe, params are just an array of string->value: String representation is the printed out values of all parameters * ("{p1=n1;p2=v2;...}").
Program parameters . * String representation is used as part of the signature of a running * worker . * String representation is used as part of the signature of a running * worker. *) open Batteries open RamenHelpersNoLog module T = RamenTypes module N = RamenName type param = N.field * Raql_value.t [@@ppp ...
a71591461df68793cbd4abe7cb5471bb065477c6cc925fedf0a09f390725c1ab
well-typed/large-records
KnownField.hs
{-# LANGUAGE DeriveFoldable #-} {-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE NamedFieldPuns #-} # LANGUAGE RecordWildCards # # LANGUAGE DataKinds # -- | Information about a field in a record -- -- Intended for qualified import -- > import Data . Record . Anon . Internal . Plugin . TC.Row . ( ( .. ) ) > import...
null
https://raw.githubusercontent.com/well-typed/large-records/01856f6eb661d4001335b0ab9684d7adc20bd3ea/large-anon/src/Data/Record/Anon/Internal/Plugin/TC/Row/KnownField.hs
haskell
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE NamedFieldPuns # | Information about a field in a record Intended for qualified import * Definition * Interop with @large-generics@ * Code generation ------------------------------------------------------------------------------ Definition -...
# LANGUAGE RecordWildCards # # LANGUAGE DataKinds # > import Data . Record . Anon . Internal . Plugin . TC.Row . ( ( .. ) ) > import qualified Data . Record . Anonymous . Row . Record . as module Data.Record.Anon.Internal.Plugin.TC.Row.KnownField ( KnownField(..) , fromString , toExpr , toType ) wh...
2534be8cce3d851c32e21d78dc26e9abf4dce15bd96e07e11709cafa941d62ab
ghcjs/ghcjs
tcNullaryTC.hs
# LANGUAGE NullaryTypeClasses # # LANGUAGE MultiParamTypeClasses # module Main where class R where f :: Int -> Int g :: a -> a instance R where f = (+1) g = id main = print (g (f 0))
null
https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/typecheck/tcNullaryTC.hs
haskell
# LANGUAGE NullaryTypeClasses # # LANGUAGE MultiParamTypeClasses # module Main where class R where f :: Int -> Int g :: a -> a instance R where f = (+1) g = id main = print (g (f 0))
10657a2d68efba0db7158c105303017a9a9b0c91e90260fed0a6d2694def2964
Feldspar/raw-feldspar
Representation.hs
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -fwarn - incomplete - patterns # -- | Primitive Feldspar expressions module Feldspar.Primitive.Representation where import Data.Array import Data.Bits (Bits (..)) import Data.Complex import Data.Int import Data.Typeable import Data.Word import Data.Constraint (Dict (..)...
null
https://raw.githubusercontent.com/Feldspar/raw-feldspar/84664bc5b2becf68c78b0c4ff3ebc491cd1b7714/src/Feldspar/Primitive/Representation.hs
haskell
| Primitive Feldspar expressions ------------------------------------------------------------------------------ * Types ------------------------------------------------------------------------------ | Representation of primitive supported types | A different view of 'PrimTypeRep' that allows matching on similar typ...
# LANGUAGE TemplateHaskell # # OPTIONS_GHC -fwarn - incomplete - patterns # module Feldspar.Primitive.Representation where import Data.Array import Data.Bits (Bits (..)) import Data.Complex import Data.Int import Data.Typeable import Data.Word import Data.Constraint (Dict (..)) import Language.Embedded.Expressi...
46be4d7fd92b4b78fd0b706d4c961851544d2ac283623ddd5e219ba43a3c197a
andrewthad/sockets
UnmanagedBytes.hs
# language BangPatterns # # language DataKinds # # language NamedFieldPuns # module Socket.Destined.IPv4.UnmanagedBytes ( Buffer , Peer , advance , length , send ) where import Prelude hiding (length) import Data.Bytes.Types (UnmanagedBytes(UnmanagedBytes)) import Foreign.C.Error (Errno) import Foreign.C...
null
https://raw.githubusercontent.com/andrewthad/sockets/90d314bd2ec71b248a90da6ad964c679f75cfcca/src-internal/Socket/Destined/IPv4/UnmanagedBytes.hs
haskell
# language BangPatterns # # language DataKinds # # language NamedFieldPuns # module Socket.Destined.IPv4.UnmanagedBytes ( Buffer , Peer , advance , length , send ) where import Prelude hiding (length) import Data.Bytes.Types (UnmanagedBytes(UnmanagedBytes)) import Foreign.C.Error (Errno) import Foreign.C...
dd56b981b55c800a536256d35a71281d847800dec9e08756e835ce2a0f916bd6
nuscr/nuscr
err.mli
(** Error reporting *) open Names (** A user error is an error found in the protocols *) type user_error = | UnknownPragma of string | IncompatibleFlag of string * string | MissingFlag of string * string | PragmaNotSet of string * string | LexerError of string | ParserError of Loc.t | UnboundRecursionNam...
null
https://raw.githubusercontent.com/nuscr/nuscr/e0d264c9c6aa3587e479a259211af2f3262444b1/lib/utils/err.mli
ocaml
* Error reporting * A user error is an error found in the protocols TODO: Extra Message for error reporting TODO: Extra Message for error reporting * A Violation is reported when an impossible state was reached. It has to be considered a bug even when the fix is to change the Violation to a user error * ...
open Names type user_error = | UnknownPragma of string | IncompatibleFlag of string * string | MissingFlag of string * string | PragmaNotSet of string * string | LexerError of string | ParserError of Loc.t | UnboundRecursionName of TypeVariableName.t | RedefinedRecursionName of TypeVariableName.t * Loc...
33d3641d99e1fc4c4c0db3168a3ff38538c86b8a0c909ee17e163aada95e9d30
philnguyen/soft-contract
succ.rkt
#lang racket (define (succ n) (add1 n)) (provide/contract [succ (->i ([n (and/c integer? (>=/c 0))]) (res (n) (and/c integer? (>/c n))))])
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/paper/succ.rkt
racket
#lang racket (define (succ n) (add1 n)) (provide/contract [succ (->i ([n (and/c integer? (>=/c 0))]) (res (n) (and/c integer? (>/c n))))])
16008cd3fe85f2ce25086b2256b17d540cb33a3fbfa5a42c77a2ec20f8b9719f
thheller/shadow-cljsjs
vi.cljs
(ns cljsjs.moment.locale.vi (:require ["moment/locale/vi"]))
null
https://raw.githubusercontent.com/thheller/shadow-cljsjs/eaf350d29d45adb85c0753dff77e276e7925a744/src/main/cljsjs/moment/locale/vi.cljs
clojure
(ns cljsjs.moment.locale.vi (:require ["moment/locale/vi"]))
64eab710e23b4a19d24627af7fa357cce38be6752d126f6249bfa406d532636b
bvaugon/ocapic
eeprom.ml
(*************************************************************************) (* *) (* OCaPIC *) (* *) ...
null
https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/lib/eeprom.ml
ocaml
*********************************************************************** OCaPIC ...
This file is distributed under the terms of the CeCILL license . external get_size : unit -> int = "caml_eeprom_get_size" external unsafe_read : int -> int = "caml_eeprom_read" external unsafe_write : int -> int -> unit = "caml_eeprom_write" let ...
187696a421db9fd71bb88abb62fab1bba73890c39bb37778649e87603576bc82
tonsky/icfpc2021
zapuskator.clj
(ns icfpc.zapuskator (:require [clj-http.client :as http] [clojure.edn :as edn] [clojure.java.io :as io] [clojure.java.shell :as sh] [clojure.math.combinatorics :as combo] [clojure.string :as str] [jsonista.core :as json] [icfpc.main :as main]) (:import [java.lang ProcessBuilder$Redirect]...
null
https://raw.githubusercontent.com/tonsky/icfpc2021/b17038a030e656933619ac628dd33e16939fdeaa/src/icfpc/zapuskator.clj
clojure
(ns icfpc.zapuskator (:require [clj-http.client :as http] [clojure.edn :as edn] [clojure.java.io :as io] [clojure.java.shell :as sh] [clojure.math.combinatorics :as combo] [clojure.string :as str] [jsonista.core :as json] [icfpc.main :as main]) (:import [java.lang ProcessBuilder$Redirect]...
6d9eb4a72de7c7de8068ad60cf764f806b8e404df96ca60e25d6c02778099241
brendanhay/gogol
Annotate.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-vision/gen/Gogol/Vision/Projects/Files/Annotate.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated /See:/ </ Cloud Vision API Reference> for @vision.projects.files.annotate@. * Resource ** Constructing a Request | A resource alias for @vision.projects.files.annotate@ method which the 'VisionProjectsFilesAnnotate' request c...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
0d1bf21a604a13618dcb9d202f0c0a693de8bdc6d9ad98dc1da60ab46f7bf1b9
coco-team/lustrec
arrow.mli
val arrow_id: string val arrow_top_decl: Lustre_types.top_decl val arrow_desc: Lustre_types.node_desc
null
https://raw.githubusercontent.com/coco-team/lustrec/b21f9820df97e661633cd4418fdab68a6c6ca67d/src/arrow.mli
ocaml
val arrow_id: string val arrow_top_decl: Lustre_types.top_decl val arrow_desc: Lustre_types.node_desc
6f35c4432e685525fa2d160fd74885e33b675a4ceeda5bdff7c7b3ae628d9d79
esl/MongooseIM
mod_mam_muc_cassandra_arch.erl
%%%------------------------------------------------------------------- @author Michael < > ( C ) 2013 , Uvarov Michael @doc RDBMS backend for Message Archive Management . %%% @end %%%------------------------------------------------------------------- -module(mod_mam_muc_cassandra_arch). -behaviour(mongoose_cas...
null
https://raw.githubusercontent.com/esl/MongooseIM/7b91117c0ec1018e3f847da9cfabdd89c50d358b/src/mam/mod_mam_muc_cassandra_arch.erl
erlang
------------------------------------------------------------------- @end ------------------------------------------------------------------- gen_mod handlers mongoose_cassandra callbacks ---------------------------------------------------------------------- Imports Other -----------------------------------------...
@author Michael < > ( C ) 2013 , Uvarov Michael @doc RDBMS backend for Message Archive Management . -module(mod_mam_muc_cassandra_arch). -behaviour(mongoose_cassandra). -behaviour(ejabberd_gen_mam_archive). -behaviour(gen_mod). -export([start/2, stop/1, hooks/1]). MAM hook handlers -export([archive_size/3,...
fbd6c46cdafeb0857fea66d2b2063603478f8c8ff9a1208a263d8b5742f57fd6
goldfirere/singletons
T492.hs
module T492 where import Data.Functor.Const import Data.Functor.Const.Singletons import Data.Proxy import Data.Proxy.Singletons import Prelude.Singletons hiding (Const, ConstSym0, ConstSym1) f :: Const Bool Ordering f = Const @Bool @Ordering True sF1 :: SConst ('Const @Bool @Ordering True) sF1 = SConst @Bool @Orderi...
null
https://raw.githubusercontent.com/goldfirere/singletons/70d622645b960d60411ab8f31d16ffb91e69379e/singletons-base/tests/compile-and-dump/Singletons/T492.hs
haskell
module T492 where import Data.Functor.Const import Data.Functor.Const.Singletons import Data.Proxy import Data.Proxy.Singletons import Prelude.Singletons hiding (Const, ConstSym0, ConstSym1) f :: Const Bool Ordering f = Const @Bool @Ordering True sF1 :: SConst ('Const @Bool @Ordering True) sF1 = SConst @Bool @Orderi...
1738de61c1b8ffd044943921c8a280a814ecdf6db9da410ee2d9363a07df074e
zytedata/sctools
app.cljs
(ns sctools.app (:require ["moment" :as moment] [applied-science.js-interop :as j] [sctools.app.fixes] [sctools.home :refer [bootstrap-view app-view]] [sctools.app.logging :refer [start-logging]] [sctools.app.error-boundary :refer [error-capturer inc-epoch]]...
null
https://raw.githubusercontent.com/zytedata/sctools/b6ec122a599c5b24236b6f2de848da8ab33504f1/src/sctools/app.cljs
clojure
for side effects
(ns sctools.app (:require ["moment" :as moment] [applied-science.js-interop :as j] [sctools.app.fixes] [sctools.home :refer [bootstrap-view app-view]] [sctools.app.logging :refer [start-logging]] [sctools.app.error-boundary :refer [error-capturer inc-epoch]]...
0869d4794f5f47bfe681f25a7f91367c38bd9ae7442cc69deada66fe7a168085
nikita-volkov/rebase
Lazy.hs
module Rebase.Control.Monad.State.Lazy ( module Control.Monad.State.Lazy ) where import Control.Monad.State.Lazy
null
https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Control/Monad/State/Lazy.hs
haskell
module Rebase.Control.Monad.State.Lazy ( module Control.Monad.State.Lazy ) where import Control.Monad.State.Lazy
db1a4478a0373e8301e120764ffa7d36ab46fc491173b229c27ea3f4d458ea2c
Viasat/halite
test_graph.clj
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.halite.lib.test-graph (:require [clojure.test :refer :all] [com.viasat.halite.lib.graph :as graph])) (deftest test-detect-cycle ;; test helper functions (is (#'graph/path-contains? [1 2] 2)) (is (not (#'graph/pa...
null
https://raw.githubusercontent.com/Viasat/halite/66eb18dc6e2ef9795cf48a6ee4e87887c47dbb81/test/com/viasat/halite/lib/test_graph.clj
clojure
test helper functions test main function (time (run-tests))
Copyright ( c ) 2022 Viasat , Inc. Licensed under the MIT license (ns com.viasat.halite.lib.test-graph (:require [clojure.test :refer :all] [com.viasat.halite.lib.graph :as graph])) (deftest test-detect-cycle (is (#'graph/path-contains? [1 2] 2)) (is (not (#'graph/path-contains? [1 2] 3))) ...
735ece3b332a3956929ab7e3938c6bf574935a67813c4dbbad0893cffeddda76
Clozure/ccl
objc-wrapper.lisp
;;; ;;; Copyright 2016 Clozure Associates ;;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;;; you may not use this file except in compliance with the License. ;;; You may obtain a copy of the License at ;;; ;;; -2.0 ;;; ;;; Unless required by applicable law or agreed to in writing, softw...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/mac-ui/objc-wrapper.lisp
lisp
Copyright 2016 Clozure Associates 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...
distributed under the License is distributed on an " AS IS " BASIS , (in-package :mac-ui) (defparameter *objc-wrapper-map* (make-hash-table :weak :value) "Map Objective-C objects to corresponding CLOS wrappers.") (defclass objc-object-wrapper () ((objc-object :reader objc-object :initarg :objc-object :initfor...
67b640fdff5a477958af0cf5a672a9543842a14aa1d24b0a272428cef96b0ec8
aistrate/Okasaki
CatenableDeque.hs
-- Source code from -- Purely Functional Data Structures Cambridge University Press , 1998 -- Copyright ( c ) 1998 Cambridge University Press module CatenableDeque (module Deque,CatenableDeque(..)) where import Prelude hiding (head,tail,last,init,(++)) import Deque class Deque q => CatenableDeque ...
null
https://raw.githubusercontent.com/aistrate/Okasaki/cc1473c81d053483bb5e327409346da7fda10fb4/Original/CatenableDeque.hs
haskell
Source code from Purely Functional Data Structures
Cambridge University Press , 1998 Copyright ( c ) 1998 Cambridge University Press module CatenableDeque (module Deque,CatenableDeque(..)) where import Prelude hiding (head,tail,last,init,(++)) import Deque class Deque q => CatenableDeque q where (++) :: q a -> q a -> q a
335bdaaf536f7f1639e7a8b439d37b46cd9af4a48294f50e0f8e07149c136f2e
spechub/Hets
Freeness.hs
| Module : ./Proofs / Freeness.hs Description : normalization of freeness Copyright : ( c ) , DFKI GmbH 2010 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : non - portable(Logic ) compute normal forms Module : ...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Proofs/Freeness.hs
haskell
success in logic lid new node new node -} failed in logic lid , look for comorphism and translate then recursive call ca n't translate to a logic where qta is implemented failed in logic lid, look for comorphism and translate then recursive call can't translate to a logic where qta is implemented del = Dele...
| Module : ./Proofs / Freeness.hs Description : normalization of freeness Copyright : ( c ) , DFKI GmbH 2010 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portability : non - portable(Logic ) compute normal forms Module : ...
b8928e8648941809b7c8ffc195b3e0e7b59da9bd24996942e1697cc056a44dfc
40ants/40ants-critic
forms-reader.lisp
(uiop:define-package #:40ants-critic/forms-reader (:use #:cl) (:import-from #:cl-ppcre) (:import-from #:eclector.parse-result)) (in-package #:40ants-critic/forms-reader) (defclass parse-client (eclector.parse-result:parse-result-client) ()) (defmethod eclector.parse-result:make-expression-result ((client...
null
https://raw.githubusercontent.com/40ants/40ants-critic/5bfc1c3df640d9713887e3888bc6a42207075eff/src/forms-reader.lisp
lisp
ignore-critiques: function-too-long ignore-critiques: function-too-long, sets-parameters ignore-critiques: nth-on-list" (format t "Recovering from error:~%~2@T~A~%using~%~2@T~A~%" condition restart)
(uiop:define-package #:40ants-critic/forms-reader (:use #:cl) (:import-from #:cl-ppcre) (:import-from #:eclector.parse-result)) (in-package #:40ants-critic/forms-reader) (defclass parse-client (eclector.parse-result:parse-result-client) ()) (defmethod eclector.parse-result:make-expression-result ((client...
3c85aed169aea6e8c6724e9dcfd081feba07c9557725414b89de71616a1d96c0
ivanperez-keera/Yampa
Event.hs
# LANGUAGE CPP # -- | -- Description : Test cases for events Copyright : , 2022 Authors : module Test.FRP.Yampa.Event ( tests ) where import Control.Applicative ((<|>)) import Control.Monad (guard, join) #if !MIN_VERSION_base(4,8,0) import Control.Applicative (pure, (<*>)) import Data....
null
https://raw.githubusercontent.com/ivanperez-keera/Yampa/05c31a6f5cb5f427578e6f37c1f16c6a367e81ca/yampa-test/tests/Test/FRP/Yampa/Event.hs
haskell
| Description : Test cases for events * The Event type | noEvent | noEventFst | noEventSnd | Eq instance > (x == z) | Ord instance > (x == y) > (x == z) | Functor instance | Applicative instance | Monad instance | Alternative instance * Internal utilities for event construction | maybeToEvent * Utility f...
# LANGUAGE CPP # Copyright : , 2022 Authors : module Test.FRP.Yampa.Event ( tests ) where import Control.Applicative ((<|>)) import Control.Monad (guard, join) #if !MIN_VERSION_base(4,8,0) import Control.Applicative (pure, (<*>)) import Data.Functor ((<$>)) #endif import Test.Q...
c24436b153af1157e70219b24482859e67395915cba374f566622e7eba508ba6
JoelSanchez/ventas
user_registered.clj
(ns ventas.email.templates.user-registered (:require [ventas.email.elements :as elements] [ventas.email.templates :as templates] [ventas.entities.configuration :as entities.configuration] [ventas.i18n :refer [i18n]] [ventas.entities.user :as entities.user] [ventas.entities.i18n :as entities.i18n])) ...
null
https://raw.githubusercontent.com/JoelSanchez/ventas/dc8fc8ff9f63dfc8558ecdaacfc4983903b8e9a1/src/clj/ventas/email/templates/user_registered.clj
clojure
(ns ventas.email.templates.user-registered (:require [ventas.email.elements :as elements] [ventas.email.templates :as templates] [ventas.entities.configuration :as entities.configuration] [ventas.i18n :refer [i18n]] [ventas.entities.user :as entities.user] [ventas.entities.i18n :as entities.i18n])) ...
5c9a2113d1d5c2e78d3826e11d6f9ead7e59e7d7ea9a2baf0910f174d7da594e
egobrain/ext_cowboy
http_SUITE.erl
Copyright ( c ) 2013 , > %% %% Permission to use, copy, modify, and/or distribute this software for any %% purpose with or without fee is hereby granted, provided that the above %% copyright notice and this permission notice appear in all copies. %% THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL...
null
https://raw.githubusercontent.com/egobrain/ext_cowboy/6e66c6b50a07a9589096d57ce734c257ba956547/test/http_SUITE.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVE...
Copyright ( c ) 2013 , > THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(http_SUITE). -include_lib("common_test/include/ct.hrl...
e4ac96f65586c039c16e264d22f40f242d6d767760497e568fd24c8233deb2c1
wangsix/VMO_repeated_themes_discovery
occurrences.lisp
;(in-package :common-lisp-user) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "csv-files" :type "lisp") *lisp-code-root*)) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "director-musices" :type "lisp") *lisp-co...
null
https://raw.githubusercontent.com/wangsix/VMO_repeated_themes_discovery/0082b3c55e64ed447c8b68bcb705fd6da8e3541f/JKUPDD-Oct2013/groundTruth/mozartK282Mvt2/polyphonic/deadSym/repeatedPatterns/barlowAndMorgenstern/B/occurrences/script/occurrences.lisp
lisp
(in-package :common-lisp-user) Load the piece and the pattern. Define all occurrences. occi. Save as csv, lisp, and midi. Definition of ontime-pitch pairs. Definition for MIDI file. Save MIDI file (have to alter any anacrusis). Save lisp-format text file. Save CSV.
(load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "csv-files" :type "lisp") *lisp-code-root*)) (load (merge-pathnames (make-pathname :directory '(:relative "File conversion") :name "director-musices" :type "lisp") *lisp-code-root*)) (load (merge-pathnam...
2d2d6f206caab6fb773278f650643b253517d5f7db8e7bb76cdafa3f1544f8ec
askonomm/clarktown
atx_heading_block.clj
(ns clarktown.correctors.atx-heading-block (:require [clojure.string :as string] [clarktown.matchers.heading-block :refer [is-atx-heading?]])) (defn- in-code-block? "Determines whether the current `line` is within a code block." [lines index] (->> (take index lines) (filter #(string/starts-with...
null
https://raw.githubusercontent.com/askonomm/clarktown/2ff0da12f58d17b6c1ab3736a41595073b3a534e/src/clarktown/correctors/atx_heading_block.clj
clojure
(ns clarktown.correctors.atx-heading-block (:require [clojure.string :as string] [clarktown.matchers.heading-block :refer [is-atx-heading?]])) (defn- in-code-block? "Determines whether the current `line` is within a code block." [lines index] (->> (take index lines) (filter #(string/starts-with...
9298f94981ba43369f1c9bfb62d68659033114e08fe82e1939eee261cc88a90b
erlang/rebar3
mygrispproject.erl
% @doc mygrispproject public API. % @end -module(mygrispproject). -behavior(application). % Callbacks -export([start/2]). -export([stop/1]). %--- Callbacks ----------------------------------------------------------------- start(_Type, _Args) -> mygrispproject_sup:start_link(). stop(_State) -> ok.
null
https://raw.githubusercontent.com/erlang/rebar3/d4f52f44ff8d7a17337326716033b00e07cf611f/systest/all_SUITE_data/grisp_explode/src/mygrispproject.erl
erlang
@doc mygrispproject public API. @end Callbacks --- Callbacks -----------------------------------------------------------------
-module(mygrispproject). -behavior(application). -export([start/2]). -export([stop/1]). start(_Type, _Args) -> mygrispproject_sup:start_link(). stop(_State) -> ok.
b7f096e29b0dd30ffcfc24040bf81c56d6cce1e6ced6ddd1a37c59343038f637
graninas/Pragmatic-Type-Level-Design
Action.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} # LANGUAGE FunctionalDependencies # {-# LANGUAGE TypeFamilies #-} # LANGUAGE PolyKinds # {-# LANGUAGE KindSignatures #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances ...
null
https://raw.githubusercontent.com/graninas/Pragmatic-Type-Level-Design/a7e051ed9d664c6986323336a0ad2132a3fa3f1c/demo-apps/auction/src/Auction/Introspection/Action.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE TypeFamilies # # LANGUAGE KindSignatures # # LANGUAGE ScopedTypeVariables # Implementation The Actions mechanism This is how we unwrap a type constructed with a type family. Example: ^ type to unw...
# LANGUAGE FunctionalDependencies # # LANGUAGE PolyKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE TypeApplications # module Auction.Introspection.Action where import TypeLevelDSL.Language.Action import TypeLevelDSL.Eval import Data.Proxy (...
231e5945de7dd7e0f2223b1012ddceb223b472e999295432e19541e199ba5086
oscaro/tools-io
test.clj
(ns tools.io.test (:require [charred.api :as charred] [clojure.edn :as edn] [clojure.java.io :as io] [clojure.string :as str] [clojure.test :refer [are deftest is testing]] [tools.io :as tio] [tools.io.core :as cio]) (:import (java.io File))) ...
null
https://raw.githubusercontent.com/oscaro/tools-io/3eff56a4aa357a3ad01e7960a1454b260b7602b8/test/tools/io/test.clj
clojure
It thus recursively listed the files under / and yielded all those starting with an 'a'. . ├── aa ├── aaa/ don't match directories
(ns tools.io.test (:require [charred.api :as charred] [clojure.edn :as edn] [clojure.java.io :as io] [clojure.string :as str] [clojure.test :refer [are deftest is testing]] [tools.io :as tio] [tools.io.core :as cio]) (:import (java.io File))) ...
ab1a63afa0d325d018662cac922f8afdcccabf693fb9919f32510a850334531b
rgleichman/glance
Util.hs
# LANGUAGE NoMonomorphismRestriction , FlexibleContexts , TypeFamilies # module Util ( printSelf, iconToPort, makeSimpleEdge, nameAndPort, justName, fromMaybeError, maybeBoolToBool, nodeNameToInt, customRenderSVG, namedToTuple, tupleToNamed ) where import Diagrams.Backend.SVG(renderSVG', Optio...
null
https://raw.githubusercontent.com/rgleichman/glance/685abb04a2c93af8aaae1ee81e81e09842eccf88/app/Util.hs
haskell
BEGIN Edge constructors -- END Edge constructors -- | (Just True) = True, Nothing = False This xml:space attribute preserves the whitespace in the svg text.
# LANGUAGE NoMonomorphismRestriction , FlexibleContexts , TypeFamilies # module Util ( printSelf, iconToPort, makeSimpleEdge, nameAndPort, justName, fromMaybeError, maybeBoolToBool, nodeNameToInt, customRenderSVG, namedToTuple, tupleToNamed ) where import Diagrams.Backend.SVG(renderSVG', Optio...
4a41d8ea2c81126e8bd5c059873475227fcd031d992a7f6844a39ac798575a03
inhabitedtype/ocaml-aws
disassociateVPCFromHostedZone.ml
open Types open Aws type input = DisassociateVPCFromHostedZoneRequest.t type output = DisassociateVPCFromHostedZoneResponse.t type error = Errors_internal.t let service = "route53" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Ut...
null
https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/route53/lib/disassociateVPCFromHostedZone.ml
ocaml
open Types open Aws type input = DisassociateVPCFromHostedZoneRequest.t type output = DisassociateVPCFromHostedZoneResponse.t type error = Errors_internal.t let service = "route53" let signature_version = Request.V4 let to_http service region req = let uri = Uri.add_query_params (Uri.of_string (Aws.Ut...
6f5af0760f922bf31d79b667ff7b20f068c6d851842d5131e5efcd7dbf75dfb9
kowainik/validation-selective
Doctest.hs
Copyright : ( c ) 2018 - 2022 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > DocTest 's run function to keep docs up to date . Copyright: (c) 2018-2022 Kowainik SPDX-License-Identifier: MPL-2.0 Maintainer: Kowainik <> DocTest's run function to keep docs up to date. -} module Main (mai...
null
https://raw.githubusercontent.com/kowainik/validation-selective/1e2156f7c1785cfd3d94b9f2070b9b8bf5134718/test/Doctest.hs
haskell
Copyright : ( c ) 2018 - 2022 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > DocTest 's run function to keep docs up to date . Copyright: (c) 2018-2022 Kowainik SPDX-License-Identifier: MPL-2.0 Maintainer: Kowainik <> DocTest's run function to keep docs up to date. -} module Main (mai...
bf0c014db9f167858f5ac0510912dbde84e3680f77b201ca66d7df8caad1c3c9
thma/PolysemyCleanArchitecture
KVSSqlite.hs
{-# LANGUAGE OverloadedStrings #-} module InterfaceAdapters.KVSSqlite where import Polysemy import Data.Aeson (decode, encode) import Data.Aeson.Types (FromJSON, ToJSON) import qualified Data.Text.Lazy as T import Data.Text.Lazy...
null
https://raw.githubusercontent.com/thma/PolysemyCleanArchitecture/f231c8da82c22d127d30a10bf60aec900f88ecf1/src/InterfaceAdapters/KVSSqlite.hs
haskell
# LANGUAGE OverloadedStrings # | create a connection based on configuration data, make sure table "store" exists.
module InterfaceAdapters.KVSSqlite where import Polysemy import Data.Aeson (decode, encode) import Data.Aeson.Types (FromJSON, ToJSON) import qualified Data.Text.Lazy as T import Data.Text.Lazy.Encoding import Database...
86f5e565193a731e36618766e3ee99c38313c43f23bcc6617929e69c4205cf0c
karlhof26/gimp-scheme
FU_color_grey-point.scm
; FU_color_grey-point.scm version 3.2 [ gimphelp.org ] last modified / tested by 02/15/2014 on GIMP-2.8.10 ; ; 12/14/2008 - added ability to set the foreground color ; from the script dialog ; tweaked for GIMP-2.4.x ( updated deprecated functions ) by 10/24/2007 , later moved menu location ; ;===========...
null
https://raw.githubusercontent.com/karlhof26/gimp-scheme/f8788a77223cb21366c68fade45856a522230717/FU_color_grey-point.scm
scheme
FU_color_grey-point.scm 12/14/2008 - added ability to set the foreground color from the script dialog ============================================================== Installation: This script should be placed in the user or system-wide script folder. Windows Vista/7/8) or or C:\Documents and Settings\yo...
version 3.2 [ gimphelp.org ] last modified / tested by 02/15/2014 on GIMP-2.8.10 tweaked for GIMP-2.4.x ( updated deprecated functions ) by 10/24/2007 , later moved menu location C:\Program Files\GIMP 2\share\gimp\2.0\scripts C:\Users\YOUR - NAME\.gimp-2.8\scripts Windows XP C:\Program Files\GIMP ...
f9b8bd8fc9cb4df8a93866e22a3868e6210d3942f501dcf3c4cc70ad181dc221
CIFASIS/QuickFuzz
Unique.hs
module Utils.Unique where import System.Environment import System.FilePath import System.Directory import Data.Time import Test.QuickFuzz.Gen.FormatInfo import Args -- |Return a unique filename testName :: FormatInfo base actions -> IO String testName fmt = do qf <- getProgName ts <- getTimestamp retur...
null
https://raw.githubusercontent.com/CIFASIS/QuickFuzz/a1c69f028b0960c002cb83e8145f039ecc0e0a23/app/Utils/Unique.hs
haskell
|Return a unique filename |Return a unique timestamp |Return a function that generates uniquely parametrized filenames outdir/progName.timestamp.testNumber.genSeed.genSize.ext
module Utils.Unique where import System.Environment import System.FilePath import System.Directory import Data.Time import Test.QuickFuzz.Gen.FormatInfo import Args testName :: FormatInfo base actions -> IO String testName fmt = do qf <- getProgName ts <- getTimestamp return $ qf <.> ts <.> ext fmt ge...
d30474fa81dd9cd50c5aa8643b26767e0bef858c062c2ecc4d56538084f7a9f7
dm3/manifold-cljs
main.cljs
(ns manifold-test.main (:require [manifold-cljs.deferred :as d] [manifold-test.daisy :as daisy] [manifold-test.robpike :as robpike] [manifold-test.utils :as utils] [manifold-cljs.stream :as s] [manifold-cljs.deferred :as d] [manifold-cljs.time :...
null
https://raw.githubusercontent.com/dm3/manifold-cljs/85a2aee8a376f55b000739ee14acb073227422c8/examples/src/manifold_test/main.cljs
clojure
(ns manifold-test.main (:require [manifold-cljs.deferred :as d] [manifold-test.daisy :as daisy] [manifold-test.robpike :as robpike] [manifold-test.utils :as utils] [manifold-cljs.stream :as s] [manifold-cljs.deferred :as d] [manifold-cljs.time :...
66fd3ea7814efd0ccee133ddfc165c83079ca2211cafe533be26c346050be43c
samrushing/irken-compiler
t_symbols1.scm
(include "lib/core.scm") (include "lib/pair.scm") (include "lib/string.scm") (include "lib/frb.scm") (include "lib/symbol.scm") (eq? 'thingy (string->symbol "thingy")) (printn the-symbol-table) (let ((s0 (string->symbol "abc")) (s1 (string->symbol "def")) ) (printn (symbol->index 'thingy)) (printn (sym...
null
https://raw.githubusercontent.com/samrushing/irken-compiler/690da48852d55497f873738df54f14e8e135d006/tests/t_symbols1.scm
scheme
(include "lib/core.scm") (include "lib/pair.scm") (include "lib/string.scm") (include "lib/frb.scm") (include "lib/symbol.scm") (eq? 'thingy (string->symbol "thingy")) (printn the-symbol-table) (let ((s0 (string->symbol "abc")) (s1 (string->symbol "def")) ) (printn (symbol->index 'thingy)) (printn (sym...
ca83f9241fe5d4691a242d549425d6e8fa25246c75bdc32bfb9a875ed53f5c30
rabbitmq/mnevis
mnevis_read.erl
-module(mnevis_read). -export([create_versions_table/0]). -export([all_table_versions/0]). -export([compare_versions/1]). -export([get_version/1, update_version/1, init_version/2]). -export([local_read_query/1, local_read_query/2]). -export([wait_for_versions/1]). create_versions_table() -> CreateResult = mnesia:...
null
https://raw.githubusercontent.com/rabbitmq/mnevis/a0fc52bba0a15848fa79e2298494953161fb29f4/src/mnevis_read.erl
erlang
TODO: handle error TODO: should we wait forever for a follower to catch up with the cluster? TODO: better timeout value? Assertion: The version should be in the matched versions
-module(mnevis_read). -export([create_versions_table/0]). -export([all_table_versions/0]). -export([compare_versions/1]). -export([get_version/1, update_version/1, init_version/2]). -export([local_read_query/1, local_read_query/2]). -export([wait_for_versions/1]). create_versions_table() -> CreateResult = mnesia:...
126ec3eff387f6ecd565b10a8620fbfe791101ae4d28a20273e151939e55767f
janegca/htdp2e
Exercise-311-eval-expression.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-306-eval-expression) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t...
null
https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/04-Intertwined%20Data/Exercise-311-eval-expression.rkt
racket
about the language level of this file in a form that our tools can easily process. - Number - Op - Add - Mul
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-306-eval-expression) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) Exercise 311 . Design eval - ex...
746f168474be71ff355079c99eb631e0ba3126213c98b832109a4fa112b85e13
gsakkas/rite
20060311-23:47:13-bb5548edde7545872f33b6b15649642f.seminal.ml
type exp = Int of int | Var of string | Plus of exp * exp | Times of exp * exp type stmt = Skip | Assign of string * exp | Seq of stmt * stmt | If of exp * stmt * stmt | While of exp * stmt type heapElement = | IntEntry of (string * int) | HeapEntry of (string * h...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060311-23%3A47%3A13-bb5548edde7545872f33b6b15649642f.seminal.ml
ocaml
type heap = (string * int) list
type exp = Int of int | Var of string | Plus of exp * exp | Times of exp * exp type stmt = Skip | Assign of string * exp | Seq of stmt * stmt | If of exp * stmt * stmt | While of exp * stmt type heapElement = | IntEntry of (string * int) | HeapEntry of (string * h...
5206511c781affa790220eb16eb7896acca087f3cf816a831f92e3b03279b600
soarlab/FPTaylor
pqueue.mli
Copyright 1999 / Jean - Marc Alliot This file is part of the library . The library is free software : you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the Licen...
null
https://raw.githubusercontent.com/soarlab/FPTaylor/efbbc83970fe3c9f4cb33fafbbe1050dd18749cd/INTERVAL/EXAMPLES/B_AND_B/pqueue.mli
ocaml
expt Not_found
Copyright 1999 / Jean - Marc Alliot This file is part of the library . The library is free software : you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the Licen...
45dc451c6016da70cb7982a6aa8ea26668f53ab1d1210d76704c88334a27975c
ds-wizard/engine-backend
Common.hs
module Wizard.Service.KnowledgeModel.Squash.Event.Common where import Shared.Model.Event.Event import Shared.Model.Event.EventField import Shared.Model.Event.EventLenses class EventSquash oldEvent newEvent where squashEvent :: oldEvent -> newEvent -> [Event] applyValue :: event -> event -> (event -> EventField val...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/bd98d1ee8aed0b2afcae8c7570dc7c2f3b03cae8/engine-wizard/src/Wizard/Service/KnowledgeModel/Squash/Event/Common.hs
haskell
module Wizard.Service.KnowledgeModel.Squash.Event.Common where import Shared.Model.Event.Event import Shared.Model.Event.EventField import Shared.Model.Event.EventLenses class EventSquash oldEvent newEvent where squashEvent :: oldEvent -> newEvent -> [Event] applyValue :: event -> event -> (event -> EventField val...
42356b6319eff7df0257d394618d14eaecce5cfa887e2980aa3705b6abb4c2cd
Frama-C/Frama-C-snapshot
metrics_base.ml
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/metrics/metrics_base.ml
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
abe663b5e8ee74cabe1fe699f508e7ad3a9ba98815275bdff7a3d2aada5781e8
giorgidze/Hydra
Sundials.hs
# LANGUAGE ForeignFunctionInterface # module Hydra.Solver.Sundials (sundials) where import Hydra import Foreign import Foreign.C.Types sundials :: Solver sundials = Solver { createSolver = c_create_solver , destroySolver = c_destroy_solver , solve = c_solve } foreign import ccall safe "create_solver" c...
null
https://raw.githubusercontent.com/giorgidze/Hydra/e5b59d0baff27f06368caeb1e9860f1395913ca5/hydra-solver-sundials/src/Hydra/Solver/Sundials.hs
haskell
# LANGUAGE ForeignFunctionInterface # module Hydra.Solver.Sundials (sundials) where import Hydra import Foreign import Foreign.C.Types sundials :: Solver sundials = Solver { createSolver = c_create_solver , destroySolver = c_destroy_solver , solve = c_solve } foreign import ccall safe "create_solver" c...
84ed788bac315f62d289d4f2b93baf3bfa5f10c45a276adbd95d0ed5393a488e
juhp/dnf-repo
Sudo.hs
module Sudo ( doSudo, prompt_, yesno ) where import Control.Monad import Data.List.Extra (lower) import SimpleCmd (cmdN, sudo_) FIXME make this silent ( simple - cmd-0.2.7 ) unless debug doSudo :: Bool -> Bool -> String -> [String] -> IO () doSudo dryrun debug c args = do if dryrun then cmdN c args ...
null
https://raw.githubusercontent.com/juhp/dnf-repo/40d36a0ec887e37b1a1df19d2b0c89222d014d51/src/Sudo.hs
haskell
module Sudo ( doSudo, prompt_, yesno ) where import Control.Monad import Data.List.Extra (lower) import SimpleCmd (cmdN, sudo_) FIXME make this silent ( simple - cmd-0.2.7 ) unless debug doSudo :: Bool -> Bool -> String -> [String] -> IO () doSudo dryrun debug c args = do if dryrun then cmdN c args ...
14c1eed5ed30c078ec7c9766b42856a60f322e5122e29a13c00a0a50b3b3911e
janherich/chisel
aero.cljc
(ns chisel.aero "Wings, airplanes, aero shapes" (:require [chisel.protocols :as protocols] [chisel.curves :as curves] [chisel.conic-sections :as conics] [chisel.coordinates :as c] [chisel.utils :as u] [chisel.open-scad :as os] [chisel.gcode :as...
null
https://raw.githubusercontent.com/janherich/chisel/aeb5a4763a9a2e8d630b83381a5a9027bd7ec3f1/src/chisel/aero.cljc
clojure
(ns chisel.aero "Wings, airplanes, aero shapes" (:require [chisel.protocols :as protocols] [chisel.curves :as curves] [chisel.conic-sections :as conics] [chisel.coordinates :as c] [chisel.utils :as u] [chisel.open-scad :as os] [chisel.gcode :as...
55fa6561d71bc87fd907e6d1559a13c991be3510d13c22671788b074714d877e
ktakashi/r6rs-pffi
chez.test.scm
#!r6rs (import (rnrs) (pffi) (srfi :64) (rename (pffi bv-pointer) (bytevector->pointer bytevector->address)) (only (pffi compat) pointer-tracker) (only (chezscheme) collect locked-object? make-weak-eq-hashtable)) (define *pointer-table* (make-weak-eq-hashtable)) (define (pointer-stat...
null
https://raw.githubusercontent.com/ktakashi/r6rs-pffi/0456a9ed82496c40feb0da2e82f1eb58e7b42716/tests/chez.test.scm
scheme
Set the tracker to count pointer allocations. make sure the locked pointers are gone
#!r6rs (import (rnrs) (pffi) (srfi :64) (rename (pffi bv-pointer) (bytevector->pointer bytevector->address)) (only (pffi compat) pointer-tracker) (only (chezscheme) collect locked-object? make-weak-eq-hashtable)) (define *pointer-table* (make-weak-eq-hashtable)) (define (pointer-stat...