_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
c557de96e6b2afb7a9edd5d187cd23078b0825ba27ace28210cc1f78e0c5e825
nikita-volkov/rebase
Foreign.hs
module Rebase.Foreign ( module Foreign ) where import Foreign
null
https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Foreign.hs
haskell
module Rebase.Foreign ( module Foreign ) where import Foreign
a97ddcb87ca4e4574ddc6d2da6653d262d81bd2a860aae963b488e6d50227b21
dwayne/eopl3
parser.test.rkt
#lang racket (require "./parser.rkt") (require rackunit) (check-equal? (parse "1") (a-program (const-exp 1))) (check-equal? (parse "x") (a-program (var-exp 'x))) (check-equal? (parse "-(5, y)") (a-program (diff-exp (const-exp 5) (var-exp 'y)))) (check-equal? (parse "zero?(z)") (a-program (zero?-exp (var-e...
null
https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/EXPLICIT-REFS-4.11/parser.test.rkt
racket
#lang racket (require "./parser.rkt") (require rackunit) (check-equal? (parse "1") (a-program (const-exp 1))) (check-equal? (parse "x") (a-program (var-exp 'x))) (check-equal? (parse "-(5, y)") (a-program (diff-exp (const-exp 5) (var-exp 'y)))) (check-equal? (parse "zero?(z)") (a-program (zero?-exp (var-e...
8d8f1e5f4ce9f0f052ec488e04414255d9cefd5abdeec1facaf74b55f7231646
arachne-framework/arachne-core
runtime_test.clj
(ns arachne.core.runtime-test (:require [arachne.core :as a] [arachne.core.descriptor :as d] [arachne.aristotle.registry :as reg] [clojure.test :refer :all] [arachne.core.runtime :as rt] [com.stuartsierra.component :as component] [arachne.core.ut...
null
https://raw.githubusercontent.com/arachne-framework/arachne-core/ef6f10e20939986292e4630adaef845a6a012d61/test/arachne/core/runtime_test.clj
clojure
(ns arachne.core.runtime-test (:require [arachne.core :as a] [arachne.core.descriptor :as d] [arachne.aristotle.registry :as reg] [clojure.test :refer :all] [arachne.core.runtime :as rt] [com.stuartsierra.component :as component] [arachne.core.ut...
e54660801f98dd671d0e9fa7e00687410aa0b3f60153bf917ec8bc0e5ec6c55b
d-cent/objective8
cloverage_entrypoint.clj
(ns cloverage-entrypoint (:require [clojure.test :refer :all])) (deftest empty-test)
null
https://raw.githubusercontent.com/d-cent/objective8/db8344ba4425ca0b38a31c99a3b282d7c8ddaef0/test/cloverage_entrypoint.clj
clojure
(ns cloverage-entrypoint (:require [clojure.test :refer :all])) (deftest empty-test)
a6488c961a95fb5945bb1b8fea2e14583cccadf1d55c62b6d2e094867e437688
fetburner/Coq2SML
indtypes.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/checker/indtypes.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** Same as noccur_between but may perf...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Util open Names open Uni...
2cb1db0cab610094e413a8f8b22a4eefd13318b9e381377f1651267bb50d29eb
brendanhay/gogol
Get.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-spanner/gen/Gogol/Spanner/Projects/InstanceConfigs/Get.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Gets information about a particular instance configuration. /See:/ </ Cloud Spanner API Reference> for @spanner.projects.instanceConfigs.get@. * Resource ** Constructing a Request | A resource alias for @spanner.projects.inst...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
c5b9a4bcf05da8b2568917003d495f2115826af1aff76bda27f683fe37a79193
mclumd/Meta-AQUA
rep_burglarscript.lisp
-*- Mode : LISP ; Syntax : Common - lisp ; Package : REPRESENTATIONS ; Base : 10 -*- (in-package :reps) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; ;;;; Meta-AQUA Background Knowledge Represented as Frames ;;;; Copyright ( C ) 1996 ( ) ;;;; ...
null
https://raw.githubusercontent.com/mclumd/Meta-AQUA/e4d4f83330fd07d1354aec245a49bde9e246c618/Representations/rep_burglarscript.lisp
lisp
Syntax : Common - lisp ; Package : REPRESENTATIONS ; Base : 10 -*- Meta-AQUA Background Knowledge Represented as Frames File: rep_burglarscript.lisp ******************************************************* This program is free software; you can redistribute it...
(in-package :reps) Copyright ( C ) 1996 ( ) under the terms of the GNU General Public License as published by the Free You should have received a copy of the GNU General Public License along Mass Ave , Cambridge , , USA . In emacs type C - h C - w to view license . ...
97989762d3444914284027a39c22621e20887f30eee8484a9e93ece362ab4290
ghc/packages-base
IORef.hs
# LANGUAGE Unsafe # # LANGUAGE NoImplicitPrelude , MagicHash , DeriveDataTypeable # {-# OPTIONS_GHC -funbox-strict-fields #-} {-# OPTIONS_HADDOCK hide #-} ----------------------------------------------------------------------------- -- | -- Module : GHC.IORef Copyright : ( c ) The University of Glasgow 20...
null
https://raw.githubusercontent.com/ghc/packages-base/52c0b09036c36f1ed928663abb2f295fd36a88bb/GHC/IORef.hs
haskell
# OPTIONS_GHC -funbox-strict-fields # # OPTIONS_HADDOCK hide # --------------------------------------------------------------------------- | Module : GHC.IORef License : see libraries/base/LICENSE Maintainer : Stability : internal The IORef type ------------------------------------------------...
# LANGUAGE Unsafe # # LANGUAGE NoImplicitPrelude , MagicHash , DeriveDataTypeable # Copyright : ( c ) The University of Glasgow 2008 Portability : non - portable ( GHC Extensions ) module GHC.IORef ( IORef(..), newIORef, readIORef, writeIORef, atomicModifyIORef ) where import GHC.Base ...
0d76b1f57491154b562db2971dbe12d51adb8488ed2747456489d767232ac685
heyoka/faxe
esp_delete.erl
Date : 28.01.17 - 14:11 Ⓒ 2017 heyoka %% @doc %% Delete value(s) with the given fieldname or path from data_point and data_batch %% %% Now, conditional delete with a lambda expression is possible. %% @end -module(esp_delete). -author("Alexander Minichmair"). %% API -behavior(df_component). -include("faxe.hrl"). %...
null
https://raw.githubusercontent.com/heyoka/faxe/1ce2b0b0b0a7685d523327855a0934ac6a44ad99/apps/faxe/src/components/esp_delete.erl
erlang
@doc Delete value(s) with the given fieldname or path from data_point and data_batch Now, conditional delete with a lambda expression is possible. @end API API for conditional delete {one_of_params, [where, when_value]}
Date : 28.01.17 - 14:11 Ⓒ 2017 heyoka -module(esp_delete). -author("Alexander Minichmair"). -behavior(df_component). -include("faxe.hrl"). -export([init/3, process/3, options/0, check_options/0]). -record(state, { node_id, fields, tags, condition, when_val }). options() -> [ {fields, binary_li...
b8ac38d304a57d0976bc10bce32e373fb563eade934f5d9b1e9e7d0624899dc6
MLstate/opalang
pass_Retyping.ml
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/opa/pass_Retyping.ml
ocaml
shorthands
Copyright © 2011 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be useful , ...
9ccb926c4cddb2a440091b6c8f235844b697fd30a113c45245a9924b78240c8e
RunOrg/RunOrg
https.mli
(* © 2013 RunOrg *) (** Initializes the modules used internally for HTTPS, such as SSL. *) val init : unit -> unit (** Creates an SSL context to be used for all requests, using the server's listening socket. *) val context : Unix.file_descr -> Common.config -> Ssl.context * the request received on the specified...
null
https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/httpdLib/https.mli
ocaml
© 2013 RunOrg * Initializes the modules used internally for HTTPS, such as SSL. * Creates an SSL context to be used for all requests, using the server's listening socket.
val init : unit -> unit val context : Unix.file_descr -> Common.config -> Ssl.context * the request received on the specified socket , handle it using the handler , send back the generated response , and close the socket . handler, send back the generated response, and close the socket. *) val parse : ...
179209ba6ff550f5e1c93bcdc3cbde723768f3b618b704d5bfea5d44f8091981
OCamlPro/OCamlPro-OCaml-Branch
reversecomplement.ml
The Computer Language Shootout / contributed by Ingo Bormuth < > optimized by Fabrice Le Fessant / contributed by Ingo Bormuth <> optimized by Fabrice Le Fessant *) (* to optimize: we need to wait for a better handling of shared memory in OCaml. *) let verbose = false let rec print_arg...
null
https://raw.githubusercontent.com/OCamlPro/OCamlPro-OCaml-Branch/3a522985649389f89dac73e655d562c54f0456a5/shootout-benchmark/08-reverse-complement/reversecomplement.ml
ocaml
to optimize: we need to wait for a better handling of shared memory in OCaml. read all non empty lines from : handler : val iter : (string -> int -> int -> unit) -> unit don't allocate any buffers on x64
The Computer Language Shootout / contributed by Ingo Bormuth < > optimized by Fabrice Le Fessant / contributed by Ingo Bormuth <> optimized by Fabrice Le Fessant *) let verbose = false let rec print_args list = match list with [] -> () | x :: tail -> Printf.fprintf stderr ...
ccf3cd5fdfcd7d1525e351d70d93681aeaa59937e45b48a237db31278c6e867c
apache/dubbo-erlang
dubbo_lists_util.erl
%%------------------------------------------------------------------------------ Licensed to the Apache Software Foundation ( ASF ) under one or more %% contributor license agreements. See the NOTICE file distributed with %% this work for additional information regarding copyright ownership. The ASF licenses this ...
null
https://raw.githubusercontent.com/apache/dubbo-erlang/24e0c1a9028b50d2e9e05e3fe26f4e3335384acc/src/dubbo_lists_util.erl
erlang
------------------------------------------------------------------------------ contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES ...
Licensed to the Apache Software Foundation ( ASF ) under one or more The ASF licenses this file 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 distributed under the License is distr...
cf520e1ce48c524f09ef1d0a023777f76b348a6ff6ffdc6b5060dfa36acde110
tomas81508/chess-clojure
core.cljc
(ns chess.core "A collection of pure functions for the game Chess." (:use [clojure.test :only [deftest is run-tests function?]] [clojure.repl :only [doc]] [clojure.pprint :only [pprint]] [test.core :only [is= is-not error?]] [chess.Fisher]) (:require [chess.state :as s] ...
null
https://raw.githubusercontent.com/tomas81508/chess-clojure/c27c51786031b57414f915ae5d42956ee66b43be/src/chess/core.cljc
clojure
Movement ending by out of board Movement ending on enemy player's piece Movement ending on own player's piece If not on board answer with the list that we currenly have If we hit our own piece ... If marked by another player king is not going to correct square Pieces of players that are not in turn should not be...
(ns chess.core "A collection of pure functions for the game Chess." (:use [clojure.test :only [deftest is run-tests function?]] [clojure.repl :only [doc]] [clojure.pprint :only [pprint]] [test.core :only [is= is-not error?]] [chess.Fisher]) (:require [chess.state :as s] ...
14d46ad6c7305b3a954125f73411e049391175b733e965680516eee48389054b
graphql-erlang/graphql
graphql_type_list.erl
-module(graphql_type_list). -export([ type/1 ]). type(InnerType)-> #{ kind => 'LIST', name => null, ofType => InnerType, parse_value => fun parse_value/2, parse_literal => fun parse_literal/2 }. parse_value(null, _) -> null; parse_value( #{kind := Kind, values := Values}, #{ofType := InnerType} ) wh...
null
https://raw.githubusercontent.com/graphql-erlang/graphql/feef75d955e3404c3c8e4500b1e2c4d4821c1dc6/src/types/graphql_type_list.erl
erlang
-module(graphql_type_list). -export([ type/1 ]). type(InnerType)-> #{ kind => 'LIST', name => null, ofType => InnerType, parse_value => fun parse_value/2, parse_literal => fun parse_literal/2 }. parse_value(null, _) -> null; parse_value( #{kind := Kind, values := Values}, #{ofType := InnerType} ) wh...
e740c7baa58bd3b5b3d2d9791ba0bd3635848e973b26352f544712de204366ff
Bogdanp/racket-gui-easy
group.rkt
#lang racket/base (require racket/gui/easy) (render (window (group "Test" (text "A") (text "B"))))
null
https://raw.githubusercontent.com/Bogdanp/racket-gui-easy/136ce6ce73098c4b5ff542dce2197b42212216d1/examples/group.rkt
racket
#lang racket/base (require racket/gui/easy) (render (window (group "Test" (text "A") (text "B"))))
da4e939996731c8b8e970b73e09b6ac48b888dd50e7f7041651717be4422f392
syocy/a-tour-of-go-in-haskell
EquivalentBinaryTreesU.hs
module A_Tour_of_Go.Concurrency.EquivalentBinaryTreesU where import A_Tour_of_Go.Concurrency.Tree import Control.Concurrent (Chan, newChan, writeChan, readChan, getChanContents) import Control.Concurrent.Async (async) import Control.Monad (forever, forM, forM_) import Data.Maybe (catMaybes, isJust) {- `walk` walk ...
null
https://raw.githubusercontent.com/syocy/a-tour-of-go-in-haskell/9bd6eb1d40098369b37329bc8d48ac2f27a6e7e2/src/A_Tour_of_Go/Concurrency/EquivalentBinaryTreesU.hs
haskell
`walk` walk a tree in ascending order and push each element to a channel. Pure version
module A_Tour_of_Go.Concurrency.EquivalentBinaryTreesU where import A_Tour_of_Go.Concurrency.Tree import Control.Concurrent (Chan, newChan, writeChan, readChan, getChanContents) import Control.Concurrent.Async (async) import Control.Monad (forever, forM, forM_) import Data.Maybe (catMaybes, isJust) walk :: Tree ->...
b3f5f4128428fbdd000a801a623209f2586ca33e98524530c52df6d5aa1b005b
ttuegel/sparse-linear
Sparse.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE ForeignFunctionInterface # # LANGUAGE RecordWildCards # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # LANGUAGE ViewPatterns # mod...
null
https://raw.githubusercontent.com/ttuegel/sparse-linear/e10453c04e0fa13ba3e943122a7d5902279fa70d/sparse-linear/src/Data/Matrix/Sparse.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE GADTs # ^ number of columns ^ number of rows ^ starting index of each slice, # INLINE ofoldl' # # INLINE (+) # # INLINE (-) # # INLINE (*) # | Given a vector of pointers to slices in an array, return the indexed slice. The following requirements are not checked: * @index + 1 <...
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ForeignFunctionInterface # # LANGUAGE RecordWildCards # # LANGUAGE StandaloneDeriving # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # # LANGUAGE ViewPatterns # module Data.Matrix.Sparse ( Matrix(..), cmap, sca...
5facff78d86e168d7c52ca733574b5ff0b36e59d59a40bfcf7fc130a15503775
well-typed-lightbulbs/ocaml-esp32
cannot_shadow_error.ml
TEST * setup - ocamlc.byte - build - env flags = " -nostdlib -nopervasives " * * ocamlc.byte ocamlc_byte_exit_status = " 2 " * * * check - ocamlc.byte - output * setup-ocamlc.byte-build-env flags = "-nostdlib -nopervasives" ** ocamlc.byte ocamlc_byte_exit_status = "2" *** check-ocamlc.byte-output *) (* S...
null
https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/shadow_include/cannot_shadow_error.ml
ocaml
Same example as in tests/typing-sigsubst/sigsubst.ml, but not as an expect_test so we get the full error.
TEST * setup - ocamlc.byte - build - env flags = " -nostdlib -nopervasives " * * ocamlc.byte ocamlc_byte_exit_status = " 2 " * * * check - ocamlc.byte - output * setup-ocamlc.byte-build-env flags = "-nostdlib -nopervasives" ** ocamlc.byte ocamlc_byte_exit_status = "2" *** check-ocamlc.byte-output *) mod...
45331d61be1bb57ffe3fd753a50c82d94c743f2f21b0c2b88a1c9c97cfb3bfd7
gtk2hs/gtk2hs
GtkChap4-5.hs
import Graphics.UI.Gtk main :: IO () main = do initGUI dia <- dialogNew set dia [windowTitle := "Time Flies"] dialogAddButton dia stockApply ResponseApply dialogAddButton dia stockCancel ResponseCancel dialogAddButton dia stockClose ResponseClose pr <- progressBarNew progres...
null
https://raw.githubusercontent.com/gtk2hs/gtk2hs/0f90caa1dae319a0f4bbab76ed1a84f17c730adf/docs/tutorial/Tutorial_Port/Example_Code/GtkChap4-5.hs
haskell
import Graphics.UI.Gtk main :: IO () main = do initGUI dia <- dialogNew set dia [windowTitle := "Time Flies"] dialogAddButton dia stockApply ResponseApply dialogAddButton dia stockCancel ResponseCancel dialogAddButton dia stockClose ResponseClose pr <- progressBarNew progres...
0c78ecff57aedbcb137f40e8c1b88273f3203860e757887b929dd60eade26e4c
anwyn/cl-horde3d
horde3d.lisp
;;; horde3d.lisp --- lispification for the horde3d wrapper ;;; _ _ _____ _ ;;; | |__ ___ _ __ __| | ___|___ / __| | ;;; | '_ \ / _ \| '__/ _` |/ _ \ |_ \ / _` | ;;; | | | | (_) | | | (_| | __/___) | (_| | ;;; |_| |_|\___/|_| \__,_|\___|____/ \__,_| ;;; Copyright ( C ) 2009 < > ;;...
null
https://raw.githubusercontent.com/anwyn/cl-horde3d/0576aba1879ab6c0f7688566c604d022cc538b4c/src/horde3d.lisp
lisp
horde3d.lisp --- lispification for the horde3d wrapper _ _ _____ _ | |__ ___ _ __ __| | ___|___ / __| | | '_ \ / _ \| '__/ _` |/ _ \ |_ \ / _` | | | | | (_) | | | (_| | __/___) | (_| | |_| |_|\___/|_| \__,_|\___|____/ \__,_| Import and re-export. Typedefs and constants Enume...
Copyright ( C ) 2009 < > (in-package :horde3d) (defmacro import-export (&rest symbols) `(eval-when (:compile-toplevel :load-toplevel :execute) Unintern first to avoid conflicts . (dolist (sym ',symbols) (let ((s (find-symbol (symbol-name sym)))) (when s (unintern s)))) (import ',sy...
60b38d8f7a8251b758c6e219975e85d418fb0a3a3a123e66b108a28d6e11381a
mflatt/plai-typed
types.rkt
#lang racket/base (require racket/list racket/pretty syntax/srcloc (for-template racket/contract/base racket/base "s-exp.rkt")) (provide gen-tvar make-bool make-num make-sym make-str make-chr make-vd make-sexp make-arrow make-listof make...
null
https://raw.githubusercontent.com/mflatt/plai-typed/419102db1e44b74dea9daf7a75e9b0e2b9c97d05/plai-typed/private/types.rkt
racket
The `non-poly` field controls the layer where a type variable can delay let-based polymorphism to the end of checking a whole module, which allows inferring types of recursive functions (at the expense of potentially looping in the type checker, although it doesn't mean "extension of any poly context". A type vari...
#lang racket/base (require racket/list racket/pretty syntax/srcloc (for-template racket/contract/base racket/base "s-exp.rkt")) (provide gen-tvar make-bool make-num make-sym make-str make-chr make-vd make-sexp make-arrow make-listof make...
c5b5490ed5048f60a6caaa5755588b5db060cd72f243db276e7c6e3f4612945c
rwmjones/guestfs-tools
list_entries.mli
virt - builder * Copyright ( C ) 2013 Red Hat Inc. * * 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 ; either version 2 of the License , or * ( at your option ) any later ver...
null
https://raw.githubusercontent.com/rwmjones/guestfs-tools/3a498512f58bc431db490e96cdb712b19389bda4/builder/list_entries.mli
ocaml
* The string representation of the available formats. * Convert from a string to the corresponding format. Throw [Invalid_argument] if the string does not match any valid format.
virt - builder * Copyright ( C ) 2013 Red Hat Inc. * * 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 ; either version 2 of the License , or * ( at your option ) any later ver...
76f479a5ddd690f680e0c68be9dcfc196a3bc79d69599644746b64e7a596015a
dizengrong/erlang_game
create_table.erl
%% @doc 使用amnesia来创建数据库 -module (create_table). -compile([export_all]). -include("db.hrl"). %% 生成db_tables.erl文件,并生成一个数据库和所有的表 create_one() -> {ok, Mod} = create_file(), os:cmd("rebar compile"), c:l(Mod), amnesia:db_tool(Mod, get_make_db_conf()), ok=file:rename(lists:concat(["include/", Mod, ".hrl"]), "include/d...
null
https://raw.githubusercontent.com/dizengrong/erlang_game/4598f97daa9ca5eecff292ac401dd8f903eea867/gerl/tool/create_table.erl
erlang
@doc 使用amnesia来创建数据库 生成db_tables.erl文件,并生成一个数据库和所有的表 生成不同的数据库和头文件 下面的sleep和开一个进程的原因是amnesia:db_tool中打开了mysql连接 但关闭时貌似有问题,关闭的消息会发送给上一次打开的那个进程。。。 windows下创建数据库由于环境的原因会找不到mysqladmin命令,所以需要手动创建 This file is generated automaticly @doc We use amnesia([]) deal with mysql datas This file is generated automaticly
-module (create_table). -compile([export_all]). -include("db.hrl"). create_one() -> {ok, Mod} = create_file(), os:cmd("rebar compile"), c:l(Mod), amnesia:db_tool(Mod, get_make_db_conf()), ok=file:rename(lists:concat(["include/", Mod, ".hrl"]), "include/db_tables.hrl"), ok. create_all() -> Files = filelib:wild...
2454f48d696520461f561c4aa99670aa8525bbb94224538b3e8e4a681d046ad6
Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library
SubscriptionPendingInvoiceItemInterval.hs
{-# LANGUAGE MultiWayIf #-} CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . {-# LANGUAGE OverloadedStrings #-} -- | Contains the types generated from the schema SubscriptionPendingInvoiceItemInterval module StripeAPI.Types.SubscriptionP...
null
https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/SubscriptionPendingInvoiceItemInterval.hs
haskell
# LANGUAGE MultiWayIf # # LANGUAGE OverloadedStrings # | Contains the types generated from the schema SubscriptionPendingInvoiceItemInterval | Defines the object schema located at @components.schemas.subscription_pending_invoice_item_interval@ in the specification. | Create a new 'SubscriptionPendingInvoiceItemInter...
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator . module StripeAPI.Types.SubscriptionPendingInvoiceItemInterval where import qualified Control.Monad.Fail import qualified Data.Aeson import qualified Data.Aeson as Data.Aeson.Encoding.Inte...
b9b78349a0ffc46fb69b76b6ac2c07d9f31586da55b989e100f31df82e5f73af
falsetru/htdp
29.3.5.scm
(define (lr-vector-sum v) (local ((define len (vector-length v)) (define (vector-sum-aux i) (cond [(= i len) 0] [else (+ (vector-ref v i) (vector-sum-aux (add1 i)))]))) (vector-sum-aux 0))) (require rackunit) (require rackunit/text-ui) (def...
null
https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/29/29.3.5.scm
scheme
(define (lr-vector-sum v) (local ((define len (vector-length v)) (define (vector-sum-aux i) (cond [(= i len) 0] [else (+ (vector-ref v i) (vector-sum-aux (add1 i)))]))) (vector-sum-aux 0))) (require rackunit) (require rackunit/text-ui) (def...
4f6c11d9a319d7c169c29e8b2817fb54ea77dd0acbc2519ebf752d7ba513de37
argp/bap
var.mli
* The type of variables . @author @author Ivan Jager *) type t = private V of int * string * Type.typ (** The type for a variable identifier. The int should uniquely identify the variable. The string is to make it easier for humans to read. A variable's type is embedded in it. *) (** [newvar...
null
https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/var.mli
ocaml
* The type for a variable identifier. The int should uniquely identify the variable. The string is to make it easier for humans to read. A variable's type is embedded in it. * [newvar s t] creates a fresh variable of type [t] and human readable string [s]. * [typ v] returns the type of [v]. * [name v] ...
* The type of variables . @author @author Ivan Jager *) type t = private V of int * string * Type.typ val newvar : string -> Type.typ -> t * [ renewvar v ] creates a fresh variable with the same name and type as [ v ] . [ renewvar v ] is equivalent to [ newvar ( Var.name v ) ( Var.typ v...
112a3e3e2758e7a4029cdbb5f26d785a1dd0a8c52b7a2885a5e22262c69ce9bd
ermine-language/ermine
Command.hs
# LANGUAGE LambdaCase # # LANGUAGE TupleSections # # LANGUAGE TemplateHaskell # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ExtendedDefaultRules # # LANGUAGE MultiParamTypeClasses # # OPTIONS_GHC -fno - warn - type - defaults # -----------------------------...
null
https://raw.githubusercontent.com/ermine-language/ermine/bd58949ab56311be9e0d2506a900f3d77652566b/src/Ermine/Console/Command.hs
haskell
# LANGUAGE OverloadedStrings # ------------------------------------------------------------------ | Stability : experimental Portability: non-portable ------------------------------------------------------------------ ---------------------------------------------------------------------------- Command -----------...
# LANGUAGE LambdaCase # # LANGUAGE TupleSections # # LANGUAGE TemplateHaskell # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE ExtendedDefaultRules # # LANGUAGE MultiParamTypeClasses # # OPTIONS_GHC -fno - warn - type - defaults # Copyright : ( c ) and 2012 - 2013 License : BSD2 ...
a81f922a14621091b317bd328dffc26d46c50b8f55727fc9c979f990946e1de0
spurious/sagittarius-scheme-mirror
core.scm
(library (clos core) (export slot-ref slot-set! slot-bound? slot-ref-using-accessor slot-set-using-accessor! slot-ref-using-class slot-set-using-class! slot-bound-using-class? slot-unbound slot-missing slot-exists-using-class? slot-exists? make initialize make-method add-method remov...
null
https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/lib/clos/core.scm
scheme
<class> <generic> <methods> slots builtin class immediates pair number collection symbol keyword io procedure etc builtin generic helper helper generics eql specializer change-class but %make does not need this, so just a dummy note above sub classes make generic accessor for <class> <generi...
(library (clos core) (export slot-ref slot-set! slot-bound? slot-ref-using-accessor slot-set-using-accessor! slot-ref-using-class slot-set-using-class! slot-bound-using-class? slot-unbound slot-missing slot-exists-using-class? slot-exists? make initialize make-method add-method remov...
b48e4eaa2f93bab0171d984de292e738e8d3f66d41e490ab01ac7523cd1d6fa7
thierry-martinez/stdcompat
listLabels.mli
val length : 'a list -> int val hd : 'a list -> 'a val compare_lengths : 'a list -> 'b list -> int val compare_length_with : 'a list -> len:int -> int val cons : 'a -> 'a list -> 'a list val tl : 'a list -> 'a list val nth : 'a list -> int -> 'a val nth_opt : 'a list -> int -> 'a option val rev : 'a list -> 'a list val...
null
https://raw.githubusercontent.com/thierry-martinez/stdcompat/83d786cdb17fae0caadf5c342e283c3dcfee2279/interfaces/4.05/listLabels.mli
ocaml
val length : 'a list -> int val hd : 'a list -> 'a val compare_lengths : 'a list -> 'b list -> int val compare_length_with : 'a list -> len:int -> int val cons : 'a -> 'a list -> 'a list val tl : 'a list -> 'a list val nth : 'a list -> int -> 'a val nth_opt : 'a list -> int -> 'a option val rev : 'a list -> 'a list val...
76df39d6013b50d87d009d9876d478bed116f8cb48fc6d0b1e08e715b3e33460
srid/emanote
StaticFile.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE TemplateHaskell # module Emanote.Model.StaticFile where import Commonmark.Extensions.WikiLink qualified as WL import Data.Aeson qualified as Aeson import Data.IxSet.Typed (Indexable (..), IxSet, ixFun, ixList) import Data.Time (UTCTime) import Emanote.Route qualified as R im...
null
https://raw.githubusercontent.com/srid/emanote/66dad06ca8fff73e30c52aee28f6458c73c900e3/src/Emanote/Model/StaticFile.hs
haskell
# LANGUAGE DeriveAnyClass # ^ Indicates that this file was updated no latter than the given time.
# LANGUAGE TemplateHaskell # module Emanote.Model.StaticFile where import Commonmark.Extensions.WikiLink qualified as WL import Data.Aeson qualified as Aeson import Data.IxSet.Typed (Indexable (..), IxSet, ixFun, ixList) import Data.Time (UTCTime) import Emanote.Route qualified as R import Optics.TH (makeLenses) impo...
8c977822c505b574b8d154e44f8f0c7bbf651ce6e9c5de2bb7b48941ccd96b48
eeng/mercurius
execute_trades_test.clj
(ns mercurius.trading.domain.use-cases.execute-trades-test (:require [clojure.test :refer [deftest testing is]] [matcher-combinators.test] [spy.core :as spy] [spy.assert :as assert] [mercurius.support.factory :refer [build-user-id build-order]] [mercurius.tr...
null
https://raw.githubusercontent.com/eeng/mercurius/f83778ddde99aa13692e4fe2e70b2e9dc2fd70e9/test/mercurius/trading/domain/use_cases/execute_trades_test.clj
clojure
(ns mercurius.trading.domain.use-cases.execute-trades-test (:require [clojure.test :refer [deftest testing is]] [matcher-combinators.test] [spy.core :as spy] [spy.assert :as assert] [mercurius.support.factory :refer [build-user-id build-order]] [mercurius.tr...
b649bd490271c951544c234cc427b74736addf7368929aa979fce6016d41bb31
GaloisInc/tower
Handler.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE TypeOperators # # LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # module Ivory.Tower.Handler ( emitter , Emitter() , callback , callbackV , emit , emitV , Handler() ) where import Ivory.Tower.Backend import Ivory.Tower.Types.Emitter i...
null
https://raw.githubusercontent.com/GaloisInc/tower/a43f5e36c6443472ea2dc15bbd49faf8643a6f87/tower/src/Ivory/Tower/Handler.hs
haskell
# LANGUAGE RankNTypes #
# LANGUAGE TypeOperators # # LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE FlexibleContexts # module Ivory.Tower.Handler ( emitter , Emitter() , callback , callbackV , emit , emitV , Handler() ) where import Ivory.Tower.Backend import Ivory.Tower.Types.Emitter import Ivory.Tower.Types.Chan...
6eaca279ffa90c28237b6d0a9e3d851feca7d4436b8b47bc915c2bb619b44865
craigl64/clim-ccl
chess.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLIM - USER ; Base : 10 ; Lowercase : Yes -*- ;; ;; ;; See the file LICENSE for the full license governing this code. ;; (in-package :clim-user) (define-application-frame chess-board () ((board :initform (make-array '(8 8) :initial-contents ...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/test/chess.lisp
lisp
Syntax : ANSI - Common - Lisp ; Package : CLIM - USER ; Base : 10 ; Lowercase : Yes -*- See the file LICENSE for the full license governing this code. row column Move confirmation
(in-package :clim-user) (define-application-frame chess-board () ((board :initform (make-array '(8 8) :initial-contents (make-chess-board-initial-state))) (bitmaps :initform nil :allocation :class) (subprocess :initform (create-chess-subprocess))) (:command-table chess-commands) (:pane...
885cf5c59096a4ad1ccf05f6ade4d6c6e486167bd1b5816a84f7fac07af2e5af
dalaing/little-languages
Gen.hs
module Components.Type.Nat.Gen where import Control.Lens (preview, review) import Control.Lens.Prism (isn't) import Test.QuickCheck (Gen) import Common.Type.Gen import Components.Type.Nat.Data genTyNat :: WithNatType ty => Gen ty genTyNat = pure (review _TyNat ()) genNotTyNat :: WithNatType ty ...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/nb-modular/src/Components/Type/Nat/Gen.hs
haskell
module Components.Type.Nat.Gen where import Control.Lens (preview, review) import Control.Lens.Prism (isn't) import Test.QuickCheck (Gen) import Common.Type.Gen import Components.Type.Nat.Data genTyNat :: WithNatType ty => Gen ty genTyNat = pure (review _TyNat ()) genNotTyNat :: WithNatType ty ...
80b3d034f959d8147468f1c0cf7847175f73a3518e51c709692e4c2dd8f06e0e
backtracking/mlpost
gen_dune.ml
(* Generate dune file for the examples *) (* In order to add a new example `foo` from `foo.ml` - add the name `foo` in gen_dune.ml - touch `foo.dune.inc` - dune runtest --auto-promote - dune runtest --auto-promote *) (** mode general: generate the top rules *) (** mode leaf: generate the leaf rules *) let e...
null
https://raw.githubusercontent.com/backtracking/mlpost/bd4305289fd64d531b9f42d64dd641d72ab82fd5/examples/gen_dune.ml
ocaml
Generate dune file for the examples In order to add a new example `foo` from `foo.ml` - add the name `foo` in gen_dune.ml - touch `foo.dune.inc` - dune runtest --auto-promote - dune runtest --auto-promote * mode general: generate the top rules * mode leaf: generate the leaf rules "misc","" ; create fig...
let examples = [ ("boxes", ""); ("paths", ""); ("tree", ""); ("label", ""); ("automata", ""); ("hist", ""); ("radar", ""); ("real_plot", ""); ("dot_dot", "mlpost.dot"); ("color", ""); ] let mode_general () = List.iter (fun (file, libraries) -> Format.printf ";...
51404ad9447e2916298c6df7b8c13910a36b732af9d179be30c98e7d641210ae
nasa/Common-Metadata-Repository
pages.clj
(ns cmr.opendap.site.pages "The functions of this namespace are specifically responsible for returning ready-to-serve pages." (:require [cmr.http.kit.site.data :as data] [cmr.http.kit.site.pages :as pages] [taoensso.timbre :as log])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/service-bridge/src/cmr/opendap/site/pages.clj
clojure
HTML page-genereating functions ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(ns cmr.opendap.site.pages "The functions of this namespace are specifically responsible for returning ready-to-serve pages." (:require [cmr.http.kit.site.data :as data] [cmr.http.kit.site.pages :as pages] [taoensso.timbre :as log])) (defn home "Prepare the home page template." [system request data...
50ea56f6f7407bb1280f56a2f2bc96a9ade44b6f6e63574b113956d13895a309
dbuenzli/affect
fiber.ml
--------------------------------------------------------------------------- Copyright ( c ) 2022 The affect programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c...
null
https://raw.githubusercontent.com/dbuenzli/affect/5ccf1e2fea197f6257ccebffaff8ca0970a0d86c/src/fiber.ml
ocaml
Fibers The type for fiber states. Must be understood as follows: * In the [Running spawns] state the fiber may be executing, suspended or blocked. [spawns] keeps a reference on its spawns that may not be terminated yet. * In the [Aborting] state the fiber is in the process of aborting, if it ex...
--------------------------------------------------------------------------- Copyright ( c ) 2022 The affect programmers . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c...
cd69f6dd143c51df865263d1d96f500336f62ac2ec151ccc81f380f64de9767d
shayan-najd/QFeldspar
GADTHigherOrder.hs
module QFeldspar.Expression.Utils.Reuse.GADTHigherOrder where import QFeldspar.MyPrelude import QFeldspar.Expression.GADTHigherOrder import QFeldspar.Environment.Typed import QFeldspar.Conversion import QFeldspar.Singleton import qualified QFeldspar.Type.GADT as TG import qualified QFeldspar.Expression.GADTFirstOrder ...
null
https://raw.githubusercontent.com/shayan-najd/QFeldspar/ed60ce02794a548833317388f6e82e2ab1eabc1c/QFeldspar/Expression/Utils/Reuse/GADTHigherOrder.hs
haskell
module QFeldspar.Expression.Utils.Reuse.GADTHigherOrder where import QFeldspar.MyPrelude import QFeldspar.Expression.GADTHigherOrder import QFeldspar.Environment.Typed import QFeldspar.Conversion import QFeldspar.Singleton import qualified QFeldspar.Type.GADT as TG import qualified QFeldspar.Expression.GADTFirstOrder ...
18a487112bf3ee91f75d2083f2de271e913bd9e963b5585dbf2868ef8199fc7b
Plisp/vico
editor.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; editor event loop (main) ;; ;; (defpackage :vico-core.editor (:use :cl) (:local-nicknames (:concurrency :vico-core.concurrency) (:ui :vico-core.ui)) (:export #:command #:queue-...
null
https://raw.githubusercontent.com/Plisp/vico/40606aea583ef9db98941ee337feb47f10c9696c/src/core/editor.lisp
lisp
editor event loop (main) must be called from within the dynamic extent of `start-editor-loop`
(defpackage :vico-core.editor (:use :cl) (:local-nicknames (:concurrency :vico-core.concurrency) (:ui :vico-core.ui)) (:export #:command #:queue-command #:read-command #:handle-command #:editor #:*editor* #:buffers #:frontends #...
3c34e12820e490bf685dfa64ce90d083759ed99b401f9cb748a229648c1746f7
CardanoSolutions/ogmios
Server.hs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DerivingVia # # LANGUAGE DuplicateRecordFields # # OPTIONS_GHC -fno - warn - partial - fields # ...
null
https://raw.githubusercontent.com/CardanoSolutions/ogmios/317c826d9d0388cb7efaf61a34085fc7c1b12b06/server/src/Ogmios/App/Server.hs
haskell
# LANGUAGE DeriveAnyClass # * Logging them to JSON. static files. This function is blocking and starts a Warp server which will route requests Logging
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. # LANGUAGE DerivingVia # # LANGUAGE DuplicateRecordFields # # OPTIONS_GHC -fno - warn - partial - fields # module Ogmios.App.Server ( ...
64a6d1aa063740fb981b8cdc59210beda8a6a097cdab5194a83847d8796b1892
SamB/coq
rawterm_to_relation.ml
open Printer open Pp open Names open Term open Rawterm open Libnames open Indfun_common open Util open Rawtermops let observe strm = if do_observe () then Pp.msgnl strm else () let observennl strm = if do_observe () then Pp.msg strm else () type binder_type = | Lambda of name | Prod of name ...
null
https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/contrib/funind/rawterm_to_relation.ml
ocaml
The main part deals with building a list of raw constructor expressions from the rhs of a fixpoint equation. the binding context of the result The value for each result in arg_res we add it in each args_res and then we flatten the map The combination function for an argument with a list of argu...
open Printer open Pp open Names open Term open Rawterm open Libnames open Indfun_common open Util open Rawtermops let observe strm = if do_observe () then Pp.msgnl strm else () let observennl strm = if do_observe () then Pp.msg strm else () type binder_type = | Lambda of name | Prod of name ...
8dfdc0c89828d84e5adb40850cfc485a34cb03a0c15da8c260708e3a4bad0070
acl2/acl2
member-equal.lisp
; A lightweight book about the built-in function member-equal. ; Copyright ( C ) 2008 - 2011 and Stanford University Copyright ( C ) 2013 - 2022 Kestrel Institute ; License : A 3 - clause BSD license . See the file books/3BSD - mod.txt . ; Author : ( ) Supporting Author : ( ) ;;;;;;;;;;;;;;;;;;;;;;;;...
null
https://raw.githubusercontent.com/acl2/acl2/69204c321c7948154d5912e65544f3826c5fd14b/books/kestrel/lists-light/member-equal.lisp
lisp
A lightweight book about the built-in function member-equal. Disabled since ACL2 will match (cons b x) with a constant, possibly leading to large case splits when rewriting (member-equal x <large-constant-list>). (implies (member-equal b (remove1-equal b y)) (iff (member-equal a (remove1-equal b y...
Copyright ( C ) 2008 - 2011 and Stanford University Copyright ( C ) 2013 - 2022 Kestrel Institute License : A 3 - clause BSD license . See the file books/3BSD - mod.txt . Author : ( ) Supporting Author : ( ) (in-package "ACL2") (in-theory (disable member-equal)) (defthm member-equal-of-append-iff ...
991c5981da8a97df8bc6338ca71c84020a99107160e84f6c0aff3efb4bca24ee
monadbobo/ocaml-core
logger.ml
open Core.Std type message = [ `Fatal | `Error | `Warn | `Info | `Debug ] * string type size = [ `Kb of int64 | `Mb of int64 | `Unlimited ] type 'a t = { dirname:string; basename:string; max_size:size; mode:Unix.file_perm; max_archives:[`Unlimited | `Max of int]; full_callback:(string Squeue.t ...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib/logger.ml
ocaml
really try to close the log, but at least force the bad file pointer out of scope so we don't use it again any error stating a file means that we should give up on ever using it close the log if it happens to be open roll the file if necessary return a file pointer to the end of the file register a f...
open Core.Std type message = [ `Fatal | `Error | `Warn | `Info | `Debug ] * string type size = [ `Kb of int64 | `Mb of int64 | `Unlimited ] type 'a t = { dirname:string; basename:string; max_size:size; mode:Unix.file_perm; max_archives:[`Unlimited | `Max of int]; full_callback:(string Squeue.t ...
8c21d241e8f4f9f78c290b9fa441b23595201f0ce19442c6a53c853bcc8d7c5f
awslabs/s2n-bignum
bignum_mod_sm2.ml
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) (* =================================================================...
null
https://raw.githubusercontent.com/awslabs/s2n-bignum/6b53f075a0e28e6b89db12301de5f59ec788855c/arm/proofs/bignum_mod_sm2.ml
ocaml
========================================================================= Reduction modulo p_sm2, the field characteristic for CC curve SM2. ========================================================================= *** print_literal_from_elf "arm/sm2/bignum_mod_sm2.o";; *** arm_MOV X12 (rvalue (word 1844...
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) let bignum_mod_sm2_mc = define_assert_from_elf "bignum_mod_sm2_m...
131bd29a7b47ec3f125b95b4cb2d1ce9d712d5709f30f8b060a6294c22357115
clj-commons/seesaw
widget_options.clj
Copyright ( c ) , 2011 . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this ; distribution. ; By using this software in any fashion, you are agreeing to be ...
null
https://raw.githubusercontent.com/clj-commons/seesaw/4ca89d0dcdf0557d99d5fa84202b7cc6e2e92263/src/seesaw/widget_options.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 rem...
Copyright ( c ) , 2011 . All rights reserved . (ns ^{:doc "Functions and protocol for dealing with widget options." :author "Dave Ray"} seesaw.widget-options (:use [seesaw.options :only [OptionProvider get-option-maps*]])) (defprotocol WidgetOptionProvider (get-widget-option-map* [this]) (get-layo...
bbafda6a4777e0f6a9e15dab753a85bab2fd22e7ba0fbb71329d73da2ba9fabe
prg-titech/baccaml
jit_emit.mli
open MinCaml val h : [ `Meta_tracing | `Meta_method ] -> out_channel -> Asm.fundef -> unit
null
https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/jit/jit_emit.mli
ocaml
open MinCaml val h : [ `Meta_tracing | `Meta_method ] -> out_channel -> Asm.fundef -> unit
6385a6e1a8fb584d5a666e7790a934c580e80d59ea9416b3a0e9ca7f2bacbb2e
johnlawrenceaspden/hobby-code
gaussian.clj
the integral over R of e^{-x^2 } is } the inverse of which is roughly 40 % (def gaussian-constant (/ (Math/sqrt (* 2 Math/PI)))) (defn gaussian [sigma, mu] (let [C (/ gaussian-constant sigma)] (fn [x] (let [s (/ (- x mu) sigma) e (/ (* s s) 2 )] (* C (Math/exp (- e))...
null
https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/gaussian.clj
clojure
What is the likelihood of the set of points {1 3 5} nil 1.5943246622599484E-9 2.594839778602918E-4 2.594839778602918E-4 tradition demands that we do it in logs (-12.756815599614018 -8.256815599614018 -6.756815599614018 -8.256815599614018 -12.756815599614018) is clearly at mu=3 (-2.9189385332046727 -0.91893853...
the integral over R of e^{-x^2 } is } the inverse of which is roughly 40 % (def gaussian-constant (/ (Math/sqrt (* 2 Math/PI)))) (defn gaussian [sigma, mu] (let [C (/ gaussian-constant sigma)] (fn [x] (let [s (/ (- x mu) sigma) e (/ (* s s) 2 )] (* C (Math/exp (- e))...
01c0f93a810ce7021c94081b070547b25a160cb087cea1b709f241af6c715acc
mokus0/junkbox
Reflection.hs
# LANGUAGE GADTs , RankNTypes # module TypeExperiments.Reflection where import Data.Proxy import Data.Reflection data Reified a where Reified :: Reifies s a => !(Proxy s) -> Reified a instance Show a => Show (Reified a) where showsPrec p x = showParen (p > 10) ( showString "banzai " ...
null
https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/TypeExperiments/Reflection.hs
haskell
# LANGUAGE GADTs , RankNTypes # module TypeExperiments.Reflection where import Data.Proxy import Data.Reflection data Reified a where Reified :: Reifies s a => !(Proxy s) -> Reified a instance Show a => Show (Reified a) where showsPrec p x = showParen (p > 10) ( showString "banzai " ...
98307901c435d01b92a9a43c01869008dd467d2bb54374899ada946517ec764d
gelisam/ludum-dare-31
Animation.hs
{-# LANGUAGE DeriveFunctor, ScopedTypeVariables #-} module Reactive.Banana.Animation where import Reactive.Banana import Reactive.Banana.Frameworks import Animation data Animated t a = Animated { animatedValue :: Behavior t a , isAnimating :: Behavior t Bool } deriving Functor instance Applicative (Animated ...
null
https://raw.githubusercontent.com/gelisam/ludum-dare-31/4bdd2937b290c41118503bc85a2a16a73139edd2/src/Reactive/Banana/Animation.hs
haskell
# LANGUAGE DeriveFunctor, ScopedTypeVariables # we won't have to hold the last frame
module Reactive.Banana.Animation where import Reactive.Banana import Reactive.Banana.Frameworks import Animation data Animated t a = Animated { animatedValue :: Behavior t a , isAnimating :: Behavior t Bool } deriving Functor instance Applicative (Animated t) where pure x = Animated (pure x) (pure False)...
31d2c4146eaac3db73ac6e03dd9166807489c15acb64820c44d1f3a6d8ba7186
m4b/elf2json
E2j_ElfDynamic.ml
open Elf.Dynamic open E2j_ElfSymbolTable open E2j_Json let dyn2json dyn = `O [ "d_tag" , (to_float @@ from_tag dyn.d_tag); "d_un", (to_float dyn.d_un); "name", `String (tag_to_string dyn.d_tag); ] let dynamic_symbols2json syms = let json = List.map sym2json syms in let meta = [ "bytes...
null
https://raw.githubusercontent.com/m4b/elf2json/72dfb62e797f68e4ad24cf3e74547ef91f8a1e62/lib/E2j_ElfDynamic.ml
ocaml
open Elf.Dynamic open E2j_ElfSymbolTable open E2j_Json let dyn2json dyn = `O [ "d_tag" , (to_float @@ from_tag dyn.d_tag); "d_un", (to_float dyn.d_un); "name", `String (tag_to_string dyn.d_tag); ] let dynamic_symbols2json syms = let json = List.map sym2json syms in let meta = [ "bytes...
01812ec8eade4bbecc53879976d020cf982b7e3e10bf54f6b65b0f7925e584b4
ricky-escobar/sparse
minimization.rkt
#lang racket (require "generator.rkt") (provide minimal-failures rho->sexp) ;; Constructs a list of minimal failures to the student's parse function. ;; The list is empty only if the student passes the testcase, but it is not ;; meant to be "exhaustive"; fixing the identified failures does not guarantee ;; that the ...
null
https://raw.githubusercontent.com/ricky-escobar/sparse/0d713dd9524c5bbba7fbebe49f44cbe9aab70275/minimization.rkt
racket
Constructs a list of minimal failures to the student's parse function. The list is empty only if the student passes the testcase, but it is not meant to be "exhaustive"; fixing the identified failures does not guarantee that the fixed parse function will pass the testcase. The `parse` parameter should be exactly t...
#lang racket (require "generator.rkt") (provide minimal-failures rho->sexp) ( ( Sexp - > Any ) rho ( Sexp - > Sexp ) - > ( ) ) (define (minimal-failures parse testcase preprocess) (define (wrapped-parse s) (with-handlers ([exn:fail? (λ (e) #f)]) (parse (preprocess s)) #t)) (remove-duplicates (map rho->se...
7158522ab9324419a95bc3bc10690b1d63097d30f528aa35a9343cb13a6c1d02
k0001/tisch
Window.hs
-- | TODO: This is a work in progress. module Tisch.Internal.Window ( winRowNum , winRank , winRankDense , winRankPercent , winRankCumDist , winBucket , winLag , winLead , winFirst , winLast , winNth ) where import qualified Opaleye as O import Tisch.Internal.Kol (PgTyped, Kol(..)) import Tisch.Internal.Ko...
null
https://raw.githubusercontent.com/k0001/tisch/4d3fc55f0b64f50dc8a59b371e855a22d22f0a79/src/lib/Tisch/Internal/Window.hs
haskell
| TODO: This is a work in progress. ------------------------------------------------------------------------------ | Window function. Number of the current row within its partition, counting Sql function name: @row_number()@ | Window function. Rank of the current row with gaps. Same as `winRowNum` of Sql functio...
module Tisch.Internal.Window ( winRowNum , winRank , winRankDense , winRankPercent , winRankCumDist , winBucket , winLag , winLead , winFirst , winLast , winNth ) where import qualified Opaleye as O import Tisch.Internal.Kol (PgTyped, Kol(..)) import Tisch.Internal.Koln (Koln(..)) import Tisch.Internal.Com...
b36d738ebf049bc35cd29893c6ee8ec090829d57f0c70afa3e534f0536238f46
xtdb/xtdb
multi_field.clj
(ns xtdb.lucene.multi-field (:require [clojure.spec.alpha :as s] [xtdb.codec :as cc] [xtdb.lucene :as l] [xtdb.memory :as mem] [xtdb.query :as q]) (:import org.apache.lucene.analysis.Analyzer [org.apache.lucene.document Document Field$Store StoredField Stri...
null
https://raw.githubusercontent.com/xtdb/xtdb/669c39fb39a962906c5472764bee42a50e2c6aea/modules/lucene/src/xtdb/lucene/multi_field.clj
clojure
The actual term, which will be tokenized For eviction:
(ns xtdb.lucene.multi-field (:require [clojure.spec.alpha :as s] [xtdb.codec :as cc] [xtdb.lucene :as l] [xtdb.memory :as mem] [xtdb.query :as q]) (:import org.apache.lucene.analysis.Analyzer [org.apache.lucene.document Document Field$Store StoredField Stri...
84be2ae136726c29f261f3ca8ed93f5cd0f1cb7e8b945d276dc2fe57a59687f9
AndrasKovacs/sett
Configuration.hs
module Configuration where -- TODO: benchmark these! -- | Meta solutions smaller than this size (in terms of syntax AST nodes) which contain at most one -- metavar, will be inlined. inlineMaxSize :: Int inlineMaxSize = 30 | The number of simplification passes we do on each top - level block . Each pass inlines ...
null
https://raw.githubusercontent.com/AndrasKovacs/sett/52b94f49dd45020a4ac23116b90a2de002afae86/src/Configuration.hs
haskell
TODO: benchmark these! | Meta solutions smaller than this size (in terms of syntax AST nodes) which contain at most one metavar, will be inlined. with small solutions. | How many times can we backtrack from an unfolding in unification and conversion checking. -- | Meta solutions smaller than this size (in ter...
module Configuration where inlineMaxSize :: Int inlineMaxSize = 30 | The number of simplification passes we do on each top - level block . Each pass inlines linear metas or metas simplificationPasses :: Int simplificationPasses = 0 conversionSpeculation :: Int conversionSpeculation = 3 inlineMaxSize = 30 ...
35254d033d1482c32411803164e0153d6d1397e4e3118e7d62bcf337d538c1ff
ryanpbrewster/haskell
longest_word.hs
-- longest_word.hs - In this challenge you need to find the longest word in a sentence . If the sentence has more than one word of the same length you should pick the first one . - Input sample : - - Your program should accept as its first argument a path to a filename . Input example is the following - ...
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/CodeEval/longest_word.hs
haskell
longest_word.hs
- In this challenge you need to find the longest word in a sentence . If the sentence has more than one word of the same length you should pick the first one . - Input sample : - - Your program should accept as its first argument a path to a filename . Input example is the following - - some line with...
3e71e89fcdcf639eea9f75a60fd6b7951b0e470b2308394de9bd1be9a179db5b
TyOverby/mono
typed_deriver_fields.ml
open Base open Import open Ppxlib open Type_kind_intf open Typed_deriver_intf let gen_sig_t ~loc ~params = let open (val Ast_builder.make loc) in let unique_id = generate_unique_id (generate_core_type_params params) in let t_params = params @ [ ptyp_var unique_id, (NoVariance, NoInjectivity) ] in psig_type ...
null
https://raw.githubusercontent.com/TyOverby/mono/8d6b3484d5db63f2f5472c7367986ea30290764d/vendor/janestreet-ppx_typed_fields/src/typed_deriver_fields.ml
ocaml
* Generates a partial signature without the upper level t and without the upper level record.
open Base open Import open Ppxlib open Type_kind_intf open Typed_deriver_intf let gen_sig_t ~loc ~params = let open (val Ast_builder.make loc) in let unique_id = generate_unique_id (generate_core_type_params params) in let t_params = params @ [ ptyp_var unique_id, (NoVariance, NoInjectivity) ] in psig_type ...
ddbaa1bc6f6943f897785501554f51273b8bbabc5d29b27e091ccc4181da3697
stuarthalloway/programming-clojure
default.clj
(ns examples.multimethods.default) START : multimethod - default (defmulti my-print class :default :everything-else) (defmethod my-print String [s] (.write *out* s)) (defmethod my-print :everything-else [_] (.write *out* "Not implemented yet...")) ; END: multimethod-default
null
https://raw.githubusercontent.com/stuarthalloway/programming-clojure/192e2f28d797fd70e50778aabd031b3ff55bd2b9/src/examples/multimethods/default.clj
clojure
END: multimethod-default
(ns examples.multimethods.default) START : multimethod - default (defmulti my-print class :default :everything-else) (defmethod my-print String [s] (.write *out* s)) (defmethod my-print :everything-else [_] (.write *out* "Not implemented yet..."))
c8df0c8401070c4203d5946bb2332377d98901e4161262ad79a2e3a585f8ede1
Opetushallitus/ataru
client_error.clj
(ns ataru.util.client-error (:require [taoensso.timbre :as log] [schema.core :as s])) (s/defschema ClientError {:error-message s/Str :url s/Str :line s/Int :col s/Int :description s/Str ...
null
https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/clj/ataru/util/client_error.clj
clojure
(ns ataru.util.client-error (:require [taoensso.timbre :as log] [schema.core :as s])) (s/defschema ClientError {:error-message s/Str :url s/Str :line s/Int :col s/Int :description s/Str ...
ca8d2c7e025a5f98335f235e014af86d106b09ed32ee48b95c0f2f5eb6408928
jserot/hocl
main.ml
(**********************************************************************) (* *) This file is part of the HOCL package (* *) Copyright ( c ) 2019 - prese...
null
https://raw.githubusercontent.com/jserot/hocl/7ab1dba918e64c3cdbc446e5f2c0cba37181bccf/src/main.ml
ocaml
******************************************************************** All rights reserved. ...
This file is part of the HOCL package Copyright ( c ) 2019 - present , ( ) . open Printf let usage = "usage: hoclc [options...] files" let anonymous fname = Misc.source_files := !Misc.source_files @ [fname] let main () = Sys.catch_break true; Arg.parse Options.options_spec...
bd1bc1e67bc55a25f064e4e1096dcb499af70e60488cac79669250076ac8fe52
RDTK/generator
execution.lisp
;;;; execution.lisp --- Execution of planned tasks. ;;;; Copyright ( C ) 2018 , 2019 , 2020 , 2022 Jan Moringen ;;;; Author : < > (cl:in-package #:build-generator.deployment.build) ;;; Debug (defvar *output-mutex* (bt:make-lock "Output lock")) (defun out (format-control &rest format-arguments) (declare (ig...
null
https://raw.githubusercontent.com/RDTK/generator/8d9e6e47776f2ccb7b5ed934337d2db50ecbe2f5/src/deployment/build/execution.lisp
lisp
execution.lisp --- Execution of planned tasks. Debug Execution The execution state tracking a set of pending tasks and a set of completed tasks. Whenever a task completes, it is added to the set of completed tasks and the set of pending tasks is checked for tasks that have become executable due to the complet...
Copyright ( C ) 2018 , 2019 , 2020 , 2022 Jan Moringen Author : < > (cl:in-package #:build-generator.deployment.build) (defvar *output-mutex* (bt:make-lock "Output lock")) (defun out (format-control &rest format-arguments) (declare (ignore format-control format-arguments) ) #+(or) (bt:with-lock-held (*ou...
66d689458e18ef03a326d2164609ad339519b7e187e4be810f5e158c8e47ae79
matijapretnar/eff
typeDefinitionContext.ml
open Utils open Language open Type type state = (TyName.t, type_data) Assoc.t (* make me a map *) let initial_state = Assoc.of_list [ ( Type.bool_tyname, { params = empty_tydef_params; type_def = Inline bool_ty } ); ( Type.unit_tyname, { params = empty_tydef_params; type_def = Inline...
null
https://raw.githubusercontent.com/matijapretnar/eff/1be07f0c7fbaadf5c28437bf11fe818aa76640e7/src/03-typechecker/typeDefinitionContext.ml
ocaml
make me a map * [find_variant lbl] returns the information about the variant type that defines the label [lbl]. * [find_field fld] returns the information about the record type that defines the field [fld]. * [infer_variant lbl] finds a variant type that defines the label [lbl] and returns it with refre...
open Utils open Language open Type let initial_state = Assoc.of_list [ ( Type.bool_tyname, { params = empty_tydef_params; type_def = Inline bool_ty } ); ( Type.unit_tyname, { params = empty_tydef_params; type_def = Inline unit_ty } ); ( Type.int_tyname, { params = empty...
e4c347c94fbacba7b5924104b4a02c2f371ce64aa47589be2d9cd2a8122f834d
SimulaVR/godot-haskell
VBoxContainer.hs
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.VBoxContainer () where import Data.Coerce import Foreign.C ...
null
https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/VBoxContainer.hs
haskell
# LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving , TypeFamilies , TypeOperators , FlexibleContexts , DataKinds , MultiParamTypeClasses # TypeFamilies, TypeOperators, FlexibleContexts, DataKinds, MultiParamTypeClasses #-} module Godot.Core.VBoxContainer () where import Data.Coerce import Foreign.C ...
69c0d542cbca847638c5c9c9bbf67d56ca8857efcf0def57d146afc3e2cf801c
yrashk/erlang
snmp_view_based_acm_mib.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 1999 - 2009 . 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 Pu...
null
https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/snmp/src/agent/snmp_view_based_acm_mib.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 limit...
Copyright Ericsson AB 1999 - 2009 . 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(snmp_view_based_acm_mib). -export(...
900d8ea7d4383a61d154295c5634ea324628c51c71704c31c9aa715d25012df4
nasa/Common-Metadata-Repository
all_granule_search_test.clj
(ns cmr.system-int-test.search.all-granule-search-test (:require [clojure.test :refer :all] [cmr.common-app.test.side-api :as side] [cmr.search.api.concepts-search :as concepts-search] [cmr.system-int-test.utils.search-util :as search])) ;; Tests all granule search when allow-all-granule-params-flag is f...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/9de7b427b536c9af7e8f52b7143aea339864a148/system-int-test/test/cmr/system_int_test/search/all_granule_search_test.clj
clojure
Tests all granule search when allow-all-granule-params-flag is false Existing tests should cover the case when the flag is set to true. With allow-all-granule-params-flag being set to false, all granule query is allowed only when client-id is present and allow-all-gran header is set to true. allow-all-gran header ...
(ns cmr.system-int-test.search.all-granule-search-test (:require [clojure.test :refer :all] [cmr.common-app.test.side-api :as side] [cmr.search.api.concepts-search :as concepts-search] [cmr.system-int-test.utils.search-util :as search])) (deftest allow-all-granule-params-flag-false-search-test (let [sa...
5f2fddba50ed8d7a6722a067b67b36994f2ceebebfd3d8361e2046d4693a1570
Octachron/codept
extended_args.mli
val parse: string array -> (Arg.key * Arg.spec * Arg.doc) list -> (string -> unit) -> string -> unit
null
https://raw.githubusercontent.com/Octachron/codept/66fb4b2caac8e9757eefb3f4e605b392a0fa457f/core/extended_args.mli
ocaml
val parse: string array -> (Arg.key * Arg.spec * Arg.doc) list -> (string -> unit) -> string -> unit
fdfe751801959469c87756a4e57f828f5aa3a905adc022a0e0fa459f88669a48
ndmitchell/catch
Backward.hs
module Backward(backward) where import Req import Template import Propagate import Reduce import System.IO import Data.Proposition import Data.Maybe import Data.List import Control.Monad import Yhc.Core import Safe import qualified Data.Map as Map -- basic idea: -- store everything as a Map, the Vals for each item ...
null
https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/gadget/Backward.hs
haskell
basic idea: store everything as a Map, the Vals for each item
module Backward(backward) where import Req import Template import Propagate import Reduce import System.IO import Data.Proposition import Data.Maybe import Data.List import Control.Monad import Yhc.Core import Safe import qualified Data.Map as Map type FixpMap = Map.Map CoreFuncName Vals backward :: Core -> Temp...
0d2d8975464435789311076ae890bbf21a64e56fc53f713b759ab5d5482e6f2f
haskell-tools/haskell-tools
MoveSignature_res.hs
module Refactor.FloatOut.MoveSignature where f = g g :: a -> a g = id
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/FloatOut/MoveSignature_res.hs
haskell
module Refactor.FloatOut.MoveSignature where f = g g :: a -> a g = id
ee5ce3167435704d731c51775fd968ee2853f501884fb994416a33bdacc20319
lemmaandrew/CodingBatHaskell
extraFront.hs
From Given a string , return a new string made of 3 copies of the first 2 chars of the original string . The string may be any length . If there are fewer than 2 chars , use whatever is there . Given a string, return a new string made of 3 copies of the first 2 chars of the original string. The string may b...
null
https://raw.githubusercontent.com/lemmaandrew/CodingBatHaskell/d839118be02e1867504206657a0664fd79d04736/CodingBat/String-1/extraFront.hs
haskell
From Given a string , return a new string made of 3 copies of the first 2 chars of the original string . The string may be any length . If there are fewer than 2 chars , use whatever is there . Given a string, return a new string made of 3 copies of the first 2 chars of the original string. The string may b...
ad4b438688a31190c80d0ccf146457113f6c195700c42be4570fc1f221d1635b
jvranish/TheExperiment
AST.hs
module Language.TheExperiment.AST ( module Language.TheExperiment.AST.Type , module Language.TheExperiment.AST.Statement , module Language.TheExperiment.AST.Expression , module Language.TheExperiment.AST.Module ) where import Language.TheExperiment.AST.Type import Language.TheExperiment.AST.Statement import...
null
https://raw.githubusercontent.com/jvranish/TheExperiment/54ca832d2f62a928a992b4c23dadf9653d13a5a7/src/Language/TheExperiment/AST.hs
haskell
module Language.TheExperiment.AST ( module Language.TheExperiment.AST.Type , module Language.TheExperiment.AST.Statement , module Language.TheExperiment.AST.Expression , module Language.TheExperiment.AST.Module ) where import Language.TheExperiment.AST.Type import Language.TheExperiment.AST.Statement import...
f66e95e71c97eb242d395750e544c9a34bd167456657163189dc6c3a78da0ce4
digitallyinduced/ihp
SchemaUpdateFailed.hs
module IHP.IDE.SchemaDesigner.View.Schema.SchemaUpdateFailed where import IHP.ViewPrelude import IHP.IDE.SchemaDesigner.Types import IHP.IDE.ToolServer.Types import IHP.IDE.ToolServer.Layout import IHP.IDE.SchemaDesigner.View.Layout import System.Exit import qualified Data.Text as Text data SchemaUpdateFailedView = S...
null
https://raw.githubusercontent.com/digitallyinduced/ihp/d98c3d6eb8145d859c9ce461e7d1367be5be7337/IHP/IDE/SchemaDesigner/View/Schema/SchemaUpdateFailed.hs
haskell
| E.g. the make db succeeded but there an sql error inside the output
module IHP.IDE.SchemaDesigner.View.Schema.SchemaUpdateFailed where import IHP.ViewPrelude import IHP.IDE.SchemaDesigner.Types import IHP.IDE.ToolServer.Types import IHP.IDE.ToolServer.Layout import IHP.IDE.SchemaDesigner.View.Layout import System.Exit import qualified Data.Text as Text data SchemaUpdateFailedView = S...
a561648f8e1067359b7fec04b7bd366127d41b420563372d19dce5d874bb6e55
divs1210/xodarap
macro_utils.clj
(ns xodarap.macro-utils) (defn add-meta "Merge any key values from opts into the meta data of the desired var." [name opts] (with-meta name (merge (meta name) opts))) (defn parse-params "Used to handle determining which parameters are meant to be docstring or argv. Returns a map of all arguments that de...
null
https://raw.githubusercontent.com/divs1210/xodarap/4c1d763e190c471b1cdfc7e069924135837e8267/src/xodarap/macro_utils.clj
clojure
(ns xodarap.macro-utils) (defn add-meta "Merge any key values from opts into the meta data of the desired var." [name opts] (with-meta name (merge (meta name) opts))) (defn parse-params "Used to handle determining which parameters are meant to be docstring or argv. Returns a map of all arguments that de...
00d628142f1a25e032abcd3ced6372433e48498165275c11f21f386d31bcb425
baskeboler/cljs-karaoke-client
playlist_mode.cljs
(ns cljs-karaoke.views.playlist-mode (:require [re-frame.core :as rf] [cljs-karaoke.playlists :as playlists] [cljs-karaoke.events :as events] [cljs-karaoke.events.songs :as song-events] [cljs-karaoke.events.playlists :as playlist-events] [cljs-karaoke.subs :...
null
https://raw.githubusercontent.com/baskeboler/cljs-karaoke-client/bb6512435eaa436d35034886be99213625847ee0/src/main/cljs_karaoke/views/playlist_mode.cljs
clojure
(rf/dispatch [::view-events/view-action-transition :go-to-playback]))} (when-not (number? (protocols/current @pl)) (rf/dispatch-sync [::playlist-events/set-current-playlist-song])
(ns cljs-karaoke.views.playlist-mode (:require [re-frame.core :as rf] [cljs-karaoke.playlists :as playlists] [cljs-karaoke.events :as events] [cljs-karaoke.events.songs :as song-events] [cljs-karaoke.events.playlists :as playlist-events] [cljs-karaoke.subs :...
72ac526851bf64961a1c0deb49b7ed3b3da6678d629e80dc4a452389a9261131
rleonid/oml
oml_common_naive_bayes.ml
Copyright 2015,2016 : < > 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 , softwa...
null
https://raw.githubusercontent.com/rleonid/oml/a857d67708827ed00df3f175a942044601ca50cf/src/cls/oml_common_naive_bayes.ml
ocaml
Simplify the evaluate code by keeping track of the evidence. init - init per class data update - update per class data incorporate - convert class assoc to final shape
Copyright 2015,2016 : < > 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 , softwa...
d37a1f3b9862645310f39d4139bd6b7cec2981bb08e056ea9546b8b427b11b95
softwarelanguageslab/maf
sieve.scm
(define Limit (int-top)) (define NumMaxLocalPrimes (int-top)) (define (locally-prime n) (bool-top)) ;; not modeled (define number-producer-actor (actor "number-producer-actor" () (prime-filter (actorRef) (letrec ((loop (lambda (candidate) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/4ad15e2fe3b8ceeb1bb77c1ff2737582675bfb77/test/concurrentScheme/actors/savina/sieve.scm
scheme
not modeled
(define Limit (int-top)) (define NumMaxLocalPrimes (int-top)) (define number-producer-actor (actor "number-producer-actor" () (prime-filter (actorRef) (letrec ((loop (lambda (candidate) (if (>= candidate Limit) ...
4f6ec529927ce03019d33772351eb0d5db94fd7f45d33373e5a2c726cefd42bc
ryanpbrewster/haskell
split_stream.hs
splitStream (x:y:rest) = let (xs,ys) = splitStream rest in (x:xs, y:ys)
null
https://raw.githubusercontent.com/ryanpbrewster/haskell/6edd0afe234008a48b4871032dedfd143ca6e412/hello-world/split_stream.hs
haskell
splitStream (x:y:rest) = let (xs,ys) = splitStream rest in (x:xs, y:ys)
2d976d93c7eb0cd72928cd4bb68a865abcf8c9fd997f46a9c32cdc9a54bca846
YoshikuniJujo/markdown2svg
testParser.hs
# LANGUAGE QuasiQuotes , TypeFamilies , PackageImports # import Control.Arrow import "monads-tf" Control.Monad.State import "monads-tf" Control.Monad.Error import Data.Maybe import Data.Char import System.Environment import Text.Papillon type List = [List1] data List1 = Item String List deriving Show main :: IO () m...
null
https://raw.githubusercontent.com/YoshikuniJujo/markdown2svg/a4a53d2f669c124684e8beee5c1c271d9699f952/tests/testParser.hs
haskell
# LANGUAGE QuasiQuotes , TypeFamilies , PackageImports # import Control.Arrow import "monads-tf" Control.Monad.State import "monads-tf" Control.Monad.Error import Data.Maybe import Data.Char import System.Environment import Text.Papillon type List = [List1] data List1 = Item String List deriving Show main :: IO () m...
4f152d7f11bfa59fc87283e23f23d41c7a1e3b3b9fbc6dbcf49e2c3e642150bf
benrady/specific
gene_spec.clj
(ns specific.gene-spec (:require [clojure.spec.alpha :as spec] [specific [gene :as gene]]) (:use [clojure.test])) (spec/def ::three-string (spec/and string? #(= 3 (count %)))) (deftest gene (testing "ensures custom specs are consistent" (is (= "zW3" (gene/det-sample ::three-string))...
null
https://raw.githubusercontent.com/benrady/specific/e1b790f2be2d577e49817472177bcc0136a2545a/test/specific/gene_spec.clj
clojure
(ns specific.gene-spec (:require [clojure.spec.alpha :as spec] [specific [gene :as gene]]) (:use [clojure.test])) (spec/def ::three-string (spec/and string? #(= 3 (count %)))) (deftest gene (testing "ensures custom specs are consistent" (is (= "zW3" (gene/det-sample ::three-string))...
1fa71100e6143f22c68a9686f95b57b3ed9b6cde2c6ab9d1ddd49912c8daa9c1
janestreet/base_quickcheck
test_shrinker.mli
include module type of Base_quickcheck.Shrinker
null
https://raw.githubusercontent.com/janestreet/base_quickcheck/b3dc5bda5084253f62362293977e451a6c4257de/test/src/test_shrinker.mli
ocaml
include module type of Base_quickcheck.Shrinker
81b73e2040f52520dfe8d9015a0bef6c8ad2aee39cbff54a63d0719648fb707b
input-output-hk/ouroboros-network
InjectTxs.hs
{-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE PatternSynonyms #-} {-# LANGUAGE RecordWildCards #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # {-# LANGUAGE TypeOperators #-} | Injecting a transaction from one block type to another module Ouroboros.Consensus.HardFork.Combinato...
null
https://raw.githubusercontent.com/input-output-hk/ouroboros-network/8d44955afdebcf9cc521f60e3a9f31e853ace2c1/ouroboros-consensus/src/Ouroboros/Consensus/HardFork/Combinator/InjectTxs.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeOperators # * Polymorphic * Unvalidated transactions * Validated transactions ------------------------------------------------------------------------------ Polymorphic definitions --------------...
# LANGUAGE ScopedTypeVariables # # LANGUAGE TypeFamilies # | Injecting a transaction from one block type to another module Ouroboros.Consensus.HardFork.Combinator.InjectTxs ( InjectPolyTx (..) , cannotInjectPolyTx , matchPolyTx , matchPolyTxsNS , InjectTx , cannotInjectTx , matchTx , patter...
c99aab2b7188d8782a07eece98311c119ec37da2572b306ee099f8ec0e509b1d
JanHenryNystrom/jhn_stdlib
json_tests.erl
%%============================================================================== Copyright 2013 - 2021 Jan < > %% 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 %% %% U...
null
https://raw.githubusercontent.com/JanHenryNystrom/jhn_stdlib/ffe3d8a58db28a4b0e270597fef7aa599dff9647/test/json_tests.erl
erlang
============================================================================== you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ex...
Copyright 2013 - 2021 Jan < > Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > ( C ) 2013 - 2021 , < > -module(json_tests). -copyright('Jan Henry Nystrom <>'). -include_lib("eunit/include/eunit....
486cdedb4942175a7aff54b5b0f855413ac2e642cb87115cf27fc4b30143a2ca
parapluu/Concuerror
is_process_alive_1.erl
-module(is_process_alive_1). -export([is_process_alive_1/0]). -export([scenarios/0]). scenarios() -> [{?MODULE, inf, dpor}]. is_process_alive_1() -> Pid = spawn(fun() -> ok end), case is_process_alive(Pid) of true -> register(child, Pid); false -> ok end.
null
https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/basic_tests/src/is_process_alive_1.erl
erlang
-module(is_process_alive_1). -export([is_process_alive_1/0]). -export([scenarios/0]). scenarios() -> [{?MODULE, inf, dpor}]. is_process_alive_1() -> Pid = spawn(fun() -> ok end), case is_process_alive(Pid) of true -> register(child, Pid); false -> ok end.
cc31c1f1ecf91b035f43d90b99835b5a36115e6c7231a6421beedd6acb35f946
haskell/haskell-ide-engine
Symbols.hs
# LANGUAGE PatternSynonyms # module Symbols where import Data.Maybe foo = bar where bar = 42 + dog where (dog, cat) = (1234, "meow") data MyData = A Int | B String pattern TestPattern :: Int -> MyData pattern TestPattern x = A x
null
https://raw.githubusercontent.com/haskell/haskell-ide-engine/d84b84322ccac81bf4963983d55cc4e6e98ad418/test/testdata/Symbols.hs
haskell
# LANGUAGE PatternSynonyms # module Symbols where import Data.Maybe foo = bar where bar = 42 + dog where (dog, cat) = (1234, "meow") data MyData = A Int | B String pattern TestPattern :: Int -> MyData pattern TestPattern x = A x
94293702ebf702cfa29fa030ecb65f953ee6ad128a5f134a12a0088acbfba4b3
pyr/warp
ansi.cljs
(ns warp.client.ansi (:require [clojure.string :as string])) (def colors ["black" "red" "green" "yellow" "blue" "magenta" "cyan" "white"]) (def replacements {"&" "&amp;" "<" "&lt;" ">" "&gt;"}) (defn escape [text] (string/replace text (re-pattern (str "[" (string/join "" ...
null
https://raw.githubusercontent.com/pyr/warp/c3ee96d90b233a47c1104b4339fed071ec8afe68/src/warp/client/ansi.cljs
clojure
(ns warp.client.ansi (:require [clojure.string :as string])) (def colors ["black" "red" "green" "yellow" "blue" "magenta" "cyan" "white"]) (def replacements {"&" "&amp;" "<" "&lt;" ">" "&gt;"}) (defn escape [text] (string/replace text (re-pattern (str "[" (string/join "" ...
e4fd5234dc1ca982d9f533d1f05fdb074978807127f69aca5920c42b7b0e2824
dieu/consulerl
consulerl_status.erl
-module(consulerl_status). -include("consulerl.hrl"). %% API -export([ leader/0, peers/0 ]). -spec leader() -> return(). leader() -> consulerl_api:get([status, leader]). -spec peers() -> return(). peers() -> consulerl_api:get([status, peers]).
null
https://raw.githubusercontent.com/dieu/consulerl/a8c003dbc380911a1ad90a3468e60017aef38c79/src/consulerl_status.erl
erlang
API
-module(consulerl_status). -include("consulerl.hrl"). -export([ leader/0, peers/0 ]). -spec leader() -> return(). leader() -> consulerl_api:get([status, leader]). -spec peers() -> return(). peers() -> consulerl_api:get([status, peers]).
380a514897641e3caa7c80632a169cde9d9a81fc51e578d6f617fe8087fb5930
QuickChick/TestingNoninterference
Zipper.hs
# LANGUAGE RecordWildCards # module Zipper where import Data.List data Zipper a = Zipper { front :: [a] , current :: a , back :: [a] , idx :: Int} toList :: Zipper a -> [a] toList Zipper{..} = foldl' (flip (:)) (current : back) front fr...
null
https://raw.githubusercontent.com/QuickChick/TestingNoninterference/29cc71ec6aa734e84b4087556ddf8d5555cf8819/register/Zipper.hs
haskell
# LANGUAGE RecordWildCards # module Zipper where import Data.List data Zipper a = Zipper { front :: [a] , current :: a , back :: [a] , idx :: Int} toList :: Zipper a -> [a] toList Zipper{..} = foldl' (flip (:)) (current : back) front fr...
18b58c760023a3992e3c01a6cde11fbec3a1b4594145361c7e179d7a1aaffff4
bluelisp/hemlock
slave-list.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; ;;; ;;; ******************************************...
null
https://raw.githubusercontent.com/bluelisp/hemlock/47e16ba731a0cf4ffd7fb2110e17c764ae757170/src/slave-list.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- ********************************************************************** ********************************************************************** This file contains slave-list-related code. Representation of existing slaves. This is the slave-list buffer if it exists. ...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . (in-package :hemlock) (defvar *slave-list-items* nil) (defvar *slave-list-items-end* nil) (defstruct slave-list-item (marked nil) name info) (defvar *slave-list-buff...
e401003360d6b23e915f71bba0f5f569b477aa83c8776142725d679447a56b51
Elzair/nazghul
spider.scm
;; Local variables (define spider-melee-weapon t_hands) (define web-spew-range 3) ;; Remapped display and newline to local procs so they can be disabled/enabled ;; for debug more conveniently ; (define (spider-display . args) ; (display (kern-get-ticks)) ; (display ":") ; (apply display args)) ; (define (s...
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.001/spider.scm
scheme
Local variables Remapped display and newline to local procs so they can be disabled/enabled for debug more conveniently (define (spider-display . args) (display (kern-get-ticks)) (display ":") (apply display args)) (define (spider-newline) (newline)) -----------------------------------------------------...
(define spider-melee-weapon t_hands) (define web-spew-range 3) (define (spider-display . args) ) (define (spider-newline) ) (define spider-egg-hatch-time 10) (define (spider-egg-gob-mk) (list spider-egg-hatch-time)) (define (spider-egg-hatch-timer gob) (car gob)) (define (spider-egg-set-hatch-timer! gob val) (...
7737f08a67daaf2bc5e35f948ed2b399976ff1864bcc4e17668032460748ce52
alanz/ghc-exactprint
plugins07.hs
module Main where # NOINLINE x # x = "foo" main = putStrLn (show x)
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/plugins07.hs
haskell
module Main where # NOINLINE x # x = "foo" main = putStrLn (show x)
cd174c385fb2c53fd7e00deb2eb175c664c0aebca0ce45bd6e1f78e88450ad9f
w3ntao/sicp-solution
3-72.rkt
#lang racket (require (only-in "../ToolBox/AbstractionOfData/stream.rkt" cons-stream stream-car stream-cdr stream-ref stream-map integers stream-filter merge-weighted ...
null
https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/chap-3/3-72.rkt
racket
#lang racket (require (only-in "../ToolBox/AbstractionOfData/stream.rkt" cons-stream stream-car stream-cdr stream-ref stream-map integers stream-filter merge-weighted ...
18ef1858044401e684770908fa8d02ad628cd291283928eb39d57449b4ff618f
ollef/sixten
Cycle.hs
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE MonadComprehensions # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ViewPatterns # module Analysis.Cycle where import Protolude hiding (TypeError, moduleName) import Data.HashMap.Lazy(HashMap) import qualified Data.HashMap.Lazy as HashMap import Data.Ha...
null
https://raw.githubusercontent.com/ollef/sixten/60d46eee20abd62599badea85774a9365c81af45/src/Analysis/Cycle.hs
haskell
# LANGUAGE OverloadedStrings # We need to detect possible cycles in top-level constants because if not, we'll accept e.g. the following program: i = f MkUnit f MkUnit = i compilation scheme where constants are initialised at program startup, this actually means that i gets some default value like 0. (i is compi...
# LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE MonadComprehensions # # LANGUAGE ViewPatterns # module Analysis.Cycle where import Protolude hiding (TypeError, moduleName) import Data.HashMap.Lazy(HashMap) import qualified Data.HashMap.Lazy as HashMap import Data.HashSet(HashSet) import qualified Dat...
bccfb7d2018765e0c3adbf734a9bd98fdeabc7cd4a28725ee30b123ab591537c
qkrgud55/ocamlmulti
frx_fileinput.ml
(***********************************************************************) (* *) MLTk , Tcl / Tk interface of OCaml (* *) , , and ...
null
https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/otherlibs/labltk/frx/frx_fileinput.ml
ocaml
********************************************************************* described in file LICENSE found in the...
MLTk , Tcl / Tk interface of OCaml , , and projet Cristal , INRIA Rocquencourt , Kyoto University RIMS Copyright 2002 Institut National de Recherche en Informatique et en Automatique and...
79b5923a3811a0f09740ed0f698b540389572fc62f547dfa01cbb61c7c82cd8f
astrada/ocaml-extjs
extUtils.mli
(** Collection of utility functions. *) external call_parent : 'a -> string -> unit = "caml_js_call_parent" (** [call_parent o n] calls method [n] of the superclass of object [o]. *) val log : string -> unit (** [log m] logs message [m] to Javascript console. *) val undef : 'a (** Generic [undefined] to use as optio...
null
https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/extUtils.mli
ocaml
* Collection of utility functions. * [call_parent o n] calls method [n] of the superclass of object [o]. * [log m] logs message [m] to Javascript console. * Generic [undefined] to use as optional parameter. * [alert m] displays an alert dialog with content [m] and an OK button. * [setTimeout f d] calls function [f...
external call_parent : 'a -> string -> unit = "caml_js_call_parent" val log : string -> unit val undef : 'a val to_class_configs : < .. > Js.t -> Ext_Class.configs Js.t * [ to_class_configs o ] converts instance [ o ] to an Ext.class config object val alert : Js.js_string Js.t -> unit val setTimeout : (unit -> un...
e83d6c9de7dd33a2cf6cf8f01c8a7f7fe4fe2c7793a80c194033a418d0767a6d
babashka/sci.configs
promesa.cljs
(ns sci.configs.funcool.promesa (:refer-clojure :exclude [delay spread promise await map mapcat run! future let loop recur -> ->> with-redefs doseq]) (:require [clojure.core :as c] [promesa.co...
null
https://raw.githubusercontent.com/babashka/sci.configs/2717e545e5a61d4cccd85350b9ad6265afc9146c/src/sci/configs/funcool/promesa.cljs
clojure
returns a promise returns a promise (prn "result" res# err#)
(ns sci.configs.funcool.promesa (:refer-clojure :exclude [delay spread promise await map mapcat run! future let loop recur -> ->> with-redefs doseq]) (:require [clojure.core :as c] [promesa.co...
9ec80383fa9ee7e5ebca9690b81b48e5f4d9063cd40a6469d3338680aa8a0300
jerith/chaocaml
foo.ml
open Cmdliner open Lwt.Infix let main api_base email password = Lwt_log.(add_rule "discord" Debug); Lwt_main.run (Discord.login ?api_base email password >>= Discord.connect) (* Command line stuff. *) let api_base = let doc = "alternate base URI for discord API" in Arg.(value & opt (some string) None & info...
null
https://raw.githubusercontent.com/jerith/chaocaml/9489ee4386f9e97becebc5afab85cada6c5466ab/example/foo.ml
ocaml
Command line stuff.
open Cmdliner open Lwt.Infix let main api_base email password = Lwt_log.(add_rule "discord" Debug); Lwt_main.run (Discord.login ?api_base email password >>= Discord.connect) let api_base = let doc = "alternate base URI for discord API" in Arg.(value & opt (some string) None & info ["api-base"] ~docv:"URI" ...
3e6525921057db5def0cf703875ba58c44a976fa97940a8913405bd29dee7cbf
cbiffle/ruckus
state.rkt
#lang racket ; EDSL evaluation internal state. (require "../core/model.rkt") (provide call-with-empty-stack call-with-color add-child-node begin-child end-child end-root add-child current-mode? current-mode call-with-mode) ; -----------------------------------------------------------------------...
null
https://raw.githubusercontent.com/cbiffle/ruckus/62cd4a00837783a88a007c2d5979909a4e86ca0f/lang/state.rkt
racket
EDSL evaluation internal state. ------------------------------------------------------------------------ The node stack used during EDSL interpretation and initial AST building. Rewrite the attributes to take color from the current state.
#lang racket (require "../core/model.rkt") (provide call-with-empty-stack call-with-color add-child-node begin-child end-child end-root add-child current-mode? current-mode call-with-mode) (define *stack* (make-parameter '())) (define *color* (make-parameter #f)) (define *mode* (make-parameter...
8a90da9881edb744a1ac7ed0fa9d5f88bc06bacb1c3d60a76501720425e7ce51
Armael/stone
watch.ml
open Util type rel_path = string type handler = Inotify.event -> unit type handler_with_rel_path = rel_path -> Inotify.event -> unit let modified_selectors = [ Inotify.S_Create; Inotify.S_Delete; Inotify.S_Modify; Inotify.S_Move; ] let watch_eq w1 w2 = (Inotify.int_of_watch w1) = (Inotify.int_of_watch w2) ...
null
https://raw.githubusercontent.com/Armael/stone/01ce69b0c3558a96d411603fabf886ced8e004ae/src/watch.ml
ocaml
Watches a directory, recursively. Returns a handler that should be called on every inotify event; which will in turn call [base_handler] on each event, with the additional [rel_path] information, which contains the path of the sub-directory on which the event occured. The list of the currently watched i...
open Util type rel_path = string type handler = Inotify.event -> unit type handler_with_rel_path = rel_path -> Inotify.event -> unit let modified_selectors = [ Inotify.S_Create; Inotify.S_Delete; Inotify.S_Modify; Inotify.S_Move; ] let watch_eq w1 w2 = (Inotify.int_of_watch w1) = (Inotify.int_of_watch w2) ...
007f9d5f96b0d3808683488090cc835aaccd6ebd9f50bb7c86c0ac6a481e9cc9
goodell/cppmem
lwt_js_events.ml
Js_of_ocaml library * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * 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 , with linking ...
null
https://raw.githubusercontent.com/goodell/cppmem/eb3ce19b607a5d6ec81138cd8cacd236f9388e87/js_of_ocaml-1.2/lib/lwt_js_events.ml
ocaml
true because we do not want to prevent default -> the user can use the preventDefault function above. In the case it has been cancelled during the previous handler, we do not reinstall the event handler s...
Js_of_ocaml library * / * Copyright ( C ) 2010 * Laboratoire PPS - CNRS Université Paris Diderot * * 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 , with linking ...
603bd71526dc012d679396bc41f130e0f9778b63af4878b7420ab31e56a57fb8
ozusrl/SubtypedQuotedML
engine.mli
(*********************************************************************************************************************) (* *) ...
null
https://raw.githubusercontent.com/ozusrl/SubtypedQuotedML/7b09eb5518dea21fda3dc9db3b966a17225d91ff/src/toy/engine.mli
ocaml
******************************************************************************************************************* ...
, projet Cristal , INRIA Rocquencourt Copyright 2000 Institut National de Recherche en Informatique et Automatique . Distributed only by per...
d52cd17d4cd784fb28617d6f9a5672ef08783035b129acf50c042f918dd67ff4
zgbjgg/dasherl
dasherl_components_SUITE.erl
-module(dasherl_components_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -export([all/0, init_per_suite/1, end_per_suite/1]). -export([test_dasherl_divc/1, test_dasherl_h1/1, test_dasherl_h2/1, test_dasherl_h3/1, test_dasherl_h4/1, test_dasherl_p/1, ...
null
https://raw.githubusercontent.com/zgbjgg/dasherl/78c0345bded3ef263d276774fcb308976056d227/test/dasherl_components_SUITE.erl
erlang
-module(dasherl_components_SUITE). -include_lib("common_test/include/ct.hrl"). -include_lib("eunit/include/eunit.hrl"). -export([all/0, init_per_suite/1, end_per_suite/1]). -export([test_dasherl_divc/1, test_dasherl_h1/1, test_dasherl_h2/1, test_dasherl_h3/1, test_dasherl_h4/1, test_dasherl_p/1, ...