_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
632a3d0a3218991d6db3e756907e312ef2181f784b584f88b1a06ff832a3e2a0
alaricsp/chicken-scheme
srfi-4.scm
;;;; srfi-4.scm - Homogeneous numeric vectors ; Copyright ( c ) 2000 - 2007 , Copyright ( c ) 2008 - 2009 , The Chicken Team ; All rights reserved. ; ; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following ; conditions are met: ; ; Redistribu...
null
https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/srfi-4.scm
scheme
srfi-4.scm - Homogeneous numeric vectors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the fo...
Copyright ( c ) 2000 - 2007 , Copyright ( c ) 2008 - 2009 , The Chicken Team THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIM...
fa560986232d5aa9d97fe29e0ae957fa6090dd8c5195ed0cc0b1851c0132ffa5
fulcrologic/datomic-cloud-backup
cloning.clj
(ns com.fulcrologic.datomic-cloud-backup.cloning "Copy a database with history via transaction logs. Based on code from Cognitect." (:require [com.fulcrologic.guardrails.core :refer [>defn => ?]] [clojure.core.async :as async] [clojure.pprint :refer [pprint]] [clojure.set :as set] [com.fulcrolog...
null
https://raw.githubusercontent.com/fulcrologic/datomic-cloud-backup/61b078401296d1419ac7192b1cc83389a684ff3f/src/main/com/fulcrologic/datomic_cloud_backup/cloning.clj
clojure
This is necessary because rewrite can cause the add/retract to match, which will cause Record that we has an empty transaction. The timestamp here is a bit of a pain, since I'm just guessing...but it looks like datomic internals set their timestamp to the UNIX epoch Aggressively load the segments from the backup st...
(ns com.fulcrologic.datomic-cloud-backup.cloning "Copy a database with history via transaction logs. Based on code from Cognitect." (:require [com.fulcrologic.guardrails.core :refer [>defn => ?]] [clojure.core.async :as async] [clojure.pprint :refer [pprint]] [clojure.set :as set] [com.fulcrolog...
02c76379c77c96faf541999c584dec87ac7eee3ab77d2dcab427742cab02c9a9
tek/proteome
Env.hs
module Proteome.Data.Env where import Ribosome (Buffer) import Proteome.Data.Project(Project) import Proteome.Data.ProjectMetadata (ProjectMetadata (DirProject, VirtualProject)) import Proteome.Data.ProjectType (ProjectType) import Proteome.Data.Replace (Replace) data Env = Env { mainProject :: Project, pr...
null
https://raw.githubusercontent.com/tek/proteome/a97ea1f111f75fc7f8885ec48a63051cfddd5520/packages/proteome/lib/Proteome/Data/Env.hs
haskell
module Proteome.Data.Env where import Ribosome (Buffer) import Proteome.Data.Project(Project) import Proteome.Data.ProjectMetadata (ProjectMetadata (DirProject, VirtualProject)) import Proteome.Data.ProjectType (ProjectType) import Proteome.Data.Replace (Replace) data Env = Env { mainProject :: Project, pr...
41d582487f5540b3f4d38405480f60d8c4c8d2345a2f2efb3454bb961ea22a16
gdamore/tree-sitter-d
module.scm
================================================================================ Module declaration ================================================================================ module test.blah.bah; -------------------------------------------------------------------------------- (source_file (module_def (mod...
null
https://raw.githubusercontent.com/gdamore/tree-sitter-d/ef33d2a62c7efedfa90ea6313f5f9f334379516e/test/corpus/module.scm
scheme
================================================================================ Module declaration ================================================================================ -------------------------------------------------------------------------------- (source_file (module_def (module_declaration ...
966b1def26617501d710ce408b5978bd71cefae6fa7b363ac374610c8d00d86d
mukul-rathi/bolt
bad_subord_access.ml
open Core open Print_data_race_checker_ast let%expect_test "Access subordinate variable from outside class" = print_data_race_checker_ast " class Foo { capability subordinate Bar; var int f : Bar; } void main(){ let x = new Foo(); x.f } " ; [%expect {| Line:8 ...
null
https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/tests/frontend/expect/data_race_checker/bad_subord_access.ml
ocaml
open Core open Print_data_race_checker_ast let%expect_test "Access subordinate variable from outside class" = print_data_race_checker_ast " class Foo { capability subordinate Bar; var int f : Bar; } void main(){ let x = new Foo(); x.f } " ; [%expect {| Line:8 ...
d67d817ddb287c1c94254b22b593c7717af745993ee5cd27efcf7a902d4807ff
juxt/grab
parser.clj
Copyright © 2021 , JUXT LTD . (ns juxt.grab.alpha.parser (:require [clj-antlr.core :as antlr] [clojure.java.io :as io] ;; TODO: Move entries produced by this ns from juxt.grab.alpha.graphql to ;; juxt.grab.alpha.parser [juxt.grab.alpha.graphql :as-alias g])) (defonce parser (antlr/parser (slurp (io...
null
https://raw.githubusercontent.com/juxt/grab/a0925f23472cb40d3e5526342c9f5d666d830dae/src/juxt/grab/alpha/parser.clj
clojure
TODO: Move entries produced by this ns from juxt.grab.alpha.graphql to juxt.grab.alpha.parser
Copyright © 2021 , JUXT LTD . (ns juxt.grab.alpha.parser (:require [clj-antlr.core :as antlr] [clojure.java.io :as io] [juxt.grab.alpha.graphql :as-alias g])) (defonce parser (antlr/parser (slurp (io/resource "GraphQL.g4")))) (defmulti process (fn [x] (cond (and (sequential? x) (keyword? (fi...
2d42def99dc6ec80eb96e19ab651aba470793ee431cd69addd908b52ab7ba427
jrm-code-project/LISP-Machine
emap.lisp
-*- Mode : LISP ; Package : USER ; -*- (defun describe-excelan-map () (format t "~&MB ADDR => NB ADDR~%") (dotimes (j (si:%system-configuration-excelan-multibus-map-size si:*sys-conf*)) (let* ((mb-page (+ (si:%system-configuration-excelan-base-multibus-map-block si:*sys-conf*) j)) ...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/gjcx/emap.lisp
lisp
Package : USER ; -*-
(defun describe-excelan-map () (format t "~&MB ADDR => NB ADDR~%") (dotimes (j (si:%system-configuration-excelan-multibus-map-size si:*sys-conf*)) (let* ((mb-page (+ (si:%system-configuration-excelan-base-multibus-map-block si:*sys-conf*) j)) (nb-page (ldb (byte 22 0) (si:rea...
a121f561fb4251c808cc4f224be8596b19a028c7cd02d58b3a91373322928f72
Elzair/nazghul
moon.scm
;; Given a kernel moon object, find the gate associated with the current phase . This is for the benefit of moongates trying to find a destination ;; gate. (define (moon-get-current-gate kmoon) (let ((gates (gob-data (kern-astral-body-get-gob kmoon))) (phase (kern-astral-body-get-phase kmoon))) (displa...
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.001/moon.scm
scheme
Given a kernel moon object, find the gate associated with the current gate. tag name relative distance minutes per phase minutes per degree initial arc initial phase script interface phase sprites
phase . This is for the benefit of moongates trying to find a destination (define (moon-get-current-gate kmoon) (let ((gates (gob-data (kern-astral-body-get-gob kmoon))) (phase (kern-astral-body-get-phase kmoon))) (display "gates=")(display gates)(newline) (display "phase=")(display phase)(newline)...
897929232bbbe464ad2fe67ef3415cb16af1cf68d276a918b875157a248ce60e
haskell-distributed/network-transport-tcp
TestTCP.hs
# LANGUAGE RebindableSyntax , TemplateHaskell # {-# LANGUAGE BangPatterns #-} # OPTIONS_GHC -fno - warn - orphans # module Main where import Prelude hiding ( (>>=) , return , fail , (>>) #if ! MIN_VERSION_base(4,6,0) , catch #endif ) import Network.Transport import Network.Transport.TCP ( createTransport ...
null
https://raw.githubusercontent.com/haskell-distributed/network-transport-tcp/2cb34ba7102cfa68ec86b562a96b07c1a64016f3/tests/TestTCP.hs
haskell
# LANGUAGE BangPatterns # Test that the server gets a ConnectionClosed message when the client closes establish a connection to them. This should re-establish the broken TCP connection. however, the remote client won't close the connection nicely but just closes the socket *Pfew* Listen for incoming messages In...
# LANGUAGE RebindableSyntax , TemplateHaskell # # OPTIONS_GHC -fno - warn - orphans # module Main where import Prelude hiding ( (>>=) , return , fail , (>>) #if ! MIN_VERSION_base(4,6,0) , catch #endif ) import Network.Transport import Network.Transport.TCP ( createTransport , ...
57abee6f9a1caa8475cfe7195152ec016c311525f9fac583943eac40ee052678
cfereday/flat-chores-engine
weekly_chores_if_else_test.clj
(ns engine.weekly-chores-if-else-test (:require [clojure.test :refer :all] [engine.weekly-chores-if-else :refer :all])) (deftest checks-chores (testing "If a flatmate has completed 4 chore their chore status is marked as completed" (is (= (:status (chores-checker {:chores [:bathroom :kitchen :laun...
null
https://raw.githubusercontent.com/cfereday/flat-chores-engine/82127bc1f354ee823725d79fed8d036792486b58/test/engine/weekly_chores_if_else_test.clj
clojure
(ns engine.weekly-chores-if-else-test (:require [clojure.test :refer :all] [engine.weekly-chores-if-else :refer :all])) (deftest checks-chores (testing "If a flatmate has completed 4 chore their chore status is marked as completed" (is (= (:status (chores-checker {:chores [:bathroom :kitchen :laun...
be339409309a8e5200169755842f7fd11b09fb5777dab745f58b033c217584a8
facebookincubator/hsthrift
HandlerTest.hs
Copyright ( c ) Facebook , Inc. and its affiliates . module HandlerTest where import Control.Concurrent import Control.Exception import Control.Monad.Trans.Class import Data.Proxy import Thrift.Monad import Thrift.Processor import Thrift.Protocol.Binary import TestRunner import Test.HUnit hiding (State) import Ec...
null
https://raw.githubusercontent.com/facebookincubator/hsthrift/d3ff75d487e9d0c2904d18327373b603456e7a01/server/test/HandlerTest.hs
haskell
Copyright ( c ) Facebook , Inc. and its affiliates . module HandlerTest where import Control.Concurrent import Control.Exception import Control.Monad.Trans.Class import Data.Proxy import Thrift.Monad import Thrift.Processor import Thrift.Protocol.Binary import TestRunner import Test.HUnit hiding (State) import Ec...
0e95657d75d93b05b24ea8d013f919f7a9bab64afe9ef603421adacb7970cd1d
conscell/hugs-android
IOExtensions.hs
module IOExtensions( module Hugs.IOExts, ) where import Hugs.IOExts
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/oldlib/IOExtensions.hs
haskell
module IOExtensions( module Hugs.IOExts, ) where import Hugs.IOExts
f860a9559b56d064fd3bd529d8313710c2a90949127e9d5a04aa040781543df9
B-Lang-org/bsc
Synthesize.hs
module Synthesize(aSynthesize) where import Data.List(transpose, sort, genericLength, nub) import Control.Monad.State import Debug.Trace import qualified Data.Map as M import Util(integerToBits, makePairs, log2, itos) import PPrint import IntLit import ErrorUtil import Flags(Flags, synthesize) import Position(noPosit...
null
https://raw.githubusercontent.com/B-Lang-org/bsc/bd141b505394edc5a4bdd3db442a9b0a8c101f0f/src/comp/Synthesize.hs
haskell
--------------- Naming conventions --------------- --------------- Improve by iterating the following steps: remove unused definitions inline variables and constants propagate constants XXX - assuming foreign function calls need not be touched because state variable instantiations are not touched ...
module Synthesize(aSynthesize) where import Data.List(transpose, sort, genericLength, nub) import Control.Monad.State import Debug.Trace import qualified Data.Map as M import Util(integerToBits, makePairs, log2, itos) import PPrint import IntLit import ErrorUtil import Flags(Flags, synthesize) import Position(noPosit...
f774ad4eff17ecc61f782d06efa8dad47aec8fa9707bdac0c9dd23f44db8e0ca
threatgrid/ctia
graphql_schemas.clj
(ns ctia.entity.target-record.graphql-schemas (:require [ctia.entity.feedback.graphql-schemas :as feedback] [ctia.entity.relationship.graphql-schemas :as relationship] [ctia.entity.target-record :as target-record] [ctia.schemas.graphql.flanders :as flanders] [ctia.schemas.graphql.helpers :as g] [cti...
null
https://raw.githubusercontent.com/threatgrid/ctia/32857663cdd7ac385161103dbafa8dc4f98febf0/src/ctia/entity/target_record/graphql_schemas.clj
clojure
(ns ctia.entity.target-record.graphql-schemas (:require [ctia.entity.feedback.graphql-schemas :as feedback] [ctia.entity.relationship.graphql-schemas :as relationship] [ctia.entity.target-record :as target-record] [ctia.schemas.graphql.flanders :as flanders] [ctia.schemas.graphql.helpers :as g] [cti...
5be6fa147fca574d91493634768c6140bba7090939ace1b3bd486ef4d192f135
erlang/otp
asn1rtt_per.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2012 - 2022 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/erlang/otp/349c292d4b75d6cfda7f9e4eb04fa1cd0753eb41/lib/asn1/src/asn1rtt_per.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2012 - 2022 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(asn1rtt_per). -export([skipextensions/3,complete/1,encode_fragmented_sof/3]). skipextensions(Bytes0, Nr, Ex...
41ca786599b38e2618dd1d00d3f29e32d25f3dcb5e3d585df125d0818b94271e
leepike/Copilot
AddMult.hs
-------------------------------------------------------------------------------- Copyright © 2011 National Institute of Aerospace / Galois , Inc. -------------------------------------------------------------------------------- -- | Another small example. module AddMult ( addMult ) where import Prelude () import La...
null
https://raw.githubusercontent.com/leepike/Copilot/18a71502c5c9e7262f14bb8167f3b4a09c9c6a8b/Examples/AddMult.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ | Another small example. ------------------------------------------------------------------------------ ---------------------------------------------------------...
Copyright © 2011 National Institute of Aerospace / Galois , Inc. module AddMult ( addMult ) where import Prelude () import Language.Copilot spec :: Spec spec = trigger "f" true [ arg $ mult 5 ] where mult :: Word64 -> Stream Word64 mult 0 = 1 mult i = constant i * mult (i-1) addMult :: IO () addMult...
3050344fc4bcf981c516e4b35f0e451f4a48d156d8dac424098d27625801047b
gonimo/gonimo
Prelude.hs
Common imports and definitions for gonimo ... module Gonimo.Prelude ( MaybeT(..) , MonadIO , liftIO , lift , traverse_ , module Maybe , module Safe , module Semigro...
null
https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/gonimo-common/src/Gonimo/Prelude.hs
haskell
Common imports and definitions for gonimo ... module Gonimo.Prelude ( MaybeT(..) , MonadIO , liftIO , lift , traverse_ , module Maybe , module Safe , module Semigro...
47a9e43924d3284b38aafd439bb6910d0ddd81ac27ac46bc237a782e13684be1
the-dr-lazy/cascade
FreePort.hs
| Module : Cascade . CLI.Data . Model . FreePort Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! ! Copyright : ( c ) 2020 - 2021 Cascade License : MPL 2.0 Maintainer : < > ( the-dr-lazy.github.io ) Stability : Stable Portability : POSIX ! ! ! INSERT MODULE LONG DESCRIPTION...
null
https://raw.githubusercontent.com/the-dr-lazy/cascade/014a5589a2763ce373e8c84a211cddc479872b44/cascade-cli/src/Cascade/CLI/Data/Model/FreePort.hs
haskell
| Module : Cascade . CLI.Data . Model . FreePort Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! ! Copyright : ( c ) 2020 - 2021 Cascade License : MPL 2.0 Maintainer : < > ( the-dr-lazy.github.io ) Stability : Stable Portability : POSIX ! ! ! INSERT MODULE LONG DESCRIPTION...
cb01a451899722dd4eab3b8ea69b1aeee57b2dc7ae84ab6950ddddcfc6e1de4a
facebook/flow
commandInfo.ml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/flow/741104e69c43057ebd32804dd6bcc1b5e97548ea/src/commands/commandInfo.ml
ocaml
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
d61d57ec7cd661ef9cdb5a46ea67da712b2fe1e43440f613c16e9509b25386a5
soulomoon/SICP
Exercise5.19.scm
Exercise 5.19 : wants a breakpoint feature in the simulator to help her debug her machine designs . You have been hired to install this feature for her . She wants to be able to specify a place in the controller sequence where the simulator will stop and allow her to examine the state of the machine . You are to imp...
null
https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter5/Exercise5.19.scm
scheme
(set-breakpoint ⟨machine⟩ ⟨label⟩ ⟨n⟩) that sets a breakpoint just before the nthnth instruction after the given label. For example, (proceed-machine ⟨machine⟩) She should also be able to remove a specific breakpoint by means of (cancel-breakpoint ⟨machine⟩ ⟨label⟩ ⟨n⟩) or to remove all breakpoints by means of (ca...
Exercise 5.19 : wants a breakpoint feature in the simulator to help her debug her machine designs . You have been hired to install this feature for her . She wants to be able to specify a place in the controller sequence where the simulator will stop and allow her to examine the state of the machine . You are to imp...
c9b90a994cdd8b2b2dfa61f9ddf565184b775aa710feff4e2eab4e2df157edf2
theodormoroianu/SecondYearCourses
LambdaChurch_20210415165110.hs
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415165110.hs
haskell
alpha-equivalence subst u x t defines [u/x]t, i.e., substituting u for x in t This substitution avoids variable captures so it is safe to be used when reducing terms with free variables (e.g., if evaluating inside lambda abstractions) ^ substitution term ^ variable to be substitutes ^ term in which the substit...
module LambdaChurch where import Data.Char (isLetter) import Data.List ( nub ) class ShowNice a where showNice :: a -> String class ReadNice a where readNice :: String -> (a, String) data Variable = Variable { name :: String , count :: Int } deriving (Show, Eq, Ord) var :: String -> Variable var ...
9b8d04adb1b04e73e362c0979b4cb035bfcedfcd150d20f08e6747160757d1bb
mindreframer/clojure-stuff
11_sequence_comprehensions.clj
(ns koans.11-sequence-comprehensions (:require [koan-engine.core :refer :all])) (meditations "Sequence comprehensions can bind each element in turn to a symbol" (= __ (for [x (range 6)] x)) "They can easily emulate mapping" (= '(0 1 4 9 16 25) (map (fn [x] (* x x)) (range 6)) ...
null
https://raw.githubusercontent.com/mindreframer/clojure-stuff/1e761b2dacbbfbeec6f20530f136767e788e0fe3/github.com/functional-koans/clojure-koans/src/koans/11_sequence_comprehensions.clj
clojure
(ns koans.11-sequence-comprehensions (:require [koan-engine.core :refer :all])) (meditations "Sequence comprehensions can bind each element in turn to a symbol" (= __ (for [x (range 6)] x)) "They can easily emulate mapping" (= '(0 1 4 9 16 25) (map (fn [x] (* x x)) (range 6)) ...
a44585059455e0110184f1dbbb713e2b3cf39e800b5739414dde68a441c7930a
ocaml/oasis
mod1.ml
(******************************************************************************) OASIS : architecture for building OCaml libraries and applications (* *) Copyright ( C ) 2011 - 2016 , Copyrig...
null
https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/test/data/TestPluginOMake/bug1747/liba/mod1.ml
ocaml
**************************************************************************** This library is free software; you can redistribute it and/or modify it under the t...
OASIS : architecture for building OCaml libraries and applications Copyright ( C ) 2011 - 2016 , Copyright ( C ) 2008 - 2011 , OCamlCore SARL the Free Software Foundation ; either version 2.1 of the License , or ( at You s...
184344fb9011c235e54e126c00a79c05b9821f02fc713e1327af80cfa5179c89
appleshan/cl-http
tcp-interface.lisp
-*- Mode : lisp ; Syntax : ansi - common - lisp ; Package : http ; Base : 10 -*- Copyright , 1995 . ;;; All rights reserved. ;;; Copyright ( C ) 1995 , ( OBC ) . ;;; All Rights Reserved -- Allegro UNIX extensions. ;;; ;;;------------------------------------------------------------------- ;;; ;;; MULTI-TH...
null
https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/acl/obc/server/tcp-interface.lisp
lisp
Syntax : ansi - common - lisp ; Package : http ; Base : 10 -*- All rights reserved. All Rights Reserved -- Allegro UNIX extensions. ------------------------------------------------------------------- MULTI-THREADED SERVER INTERFACE ------------------------------------------------------------------- STREAM...
Copyright , 1995 . Copyright ( C ) 1995 , ( OBC ) . (in-package :http) This will be reset by the configuration files . Typically 5 for MCL 1 - 5 for ACL , 1 for Lispworks . (defvar *number-of-listening-processes* 1 "The number of threads simultaneously listening for HTTP connections.") (defparamet...
38f021a98ee8e1fa4c3d6ca015a0858ea16eec37a56f8ee0b8621fb0c279ad92
erszcz/learning
fun_in_ets_sup.erl
%%%------------------------------------------------------------------- %% @doc fun_in_ets top level supervisor. %% @end %%%------------------------------------------------------------------- -module(fun_in_ets_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). star...
null
https://raw.githubusercontent.com/erszcz/learning/a0a0e8fb8541622b7c68e1f939d7b7170ac74c38/erlang-fun-in-ets/src/fun_in_ets_sup.erl
erlang
------------------------------------------------------------------- @doc fun_in_ets top level supervisor. @end ------------------------------------------------------------------- sup_flags() = #{strategy => strategy(), % optional intensity => non_neg_integer(), % optional optional child_sp...
-module(fun_in_ets_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). init([]) -> table = ets:new(table, [public, named_table]), SupFlags = #{strategy => one_for_all, ...
2d9c6d16eaa3bf833f498ec8ecfa2b6c6195543376c39fe3001156ee07e0d432
active-group/reacl
alpha.cljs
(ns ^{:doc "Various testing utilities for Reacl."} reacl2.test-util.alpha (:require [reacl2.core :as reacl :include-macros true] [reacl2.dom :as dom :include-macros true] ["react-dom/server" :as react-dom-server] ["react-dom/test-utils" :as react-tu] ["react-test-rend...
null
https://raw.githubusercontent.com/active-group/reacl/946e85a946d9659706b8875f9d1d2a7e0da55592/src/reacl2/test_util/alpha.cljs
clojure
see -react-component-state-in-jasmine-test unsatisfactory FIXME: move Reacl guts exposed here back into the core should have been cmp? (but might break someones tests)
(ns ^{:doc "Various testing utilities for Reacl."} reacl2.test-util.alpha (:require [reacl2.core :as reacl :include-macros true] [reacl2.dom :as dom :include-macros true] ["react-dom/server" :as react-dom-server] ["react-dom/test-utils" :as react-tu] ["react-test-rend...
b2b4524d5ed528a23afc7b238c5faba8239d9d356cd75964725b44b4b036d4de
ajkavanagh/vimwiki-publishing-system
Four04.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE GADTs # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PolyKinds # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # ...
null
https://raw.githubusercontent.com/ajkavanagh/vimwiki-publishing-system/c358ea03bcdb576ce4a7a4e42ac38ba5e1816c7b/src/Lib/SpecialPages/Four04.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # LANGUAGE TypeOperators # | 404 page handling is fun. b) Check that the template can be read. template you want; but you should specify it...
# LANGUAGE GADTs # # LANGUAGE PolyKinds # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Lib.SpecialPages.Four04 where 1 . If there is a page with /404 as the route , then we just use that . It 's the user deciding that they ...
a2069aa9b718923cdb2ac2308c9227835f363651f7729655b03d9ca00834eff4
ocharles/haskell-opentracing
Agent_Client.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -fno - warn - missing - fields # # OPTIONS_GHC -fno - warn - missing - signatures # # OPTIONS_GHC -fno - warn - name - shadowing # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - un...
null
https://raw.githubusercontent.com/ocharles/haskell-opentracing/8466a47b12fd5dbb7e9293c404c87e5f0222b285/jaeger-client/src-gen/Agent_Client.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE OverloadedStrings # --------------------------------------------------------------- -- DO NOT EDIT UNLESS YOU ARE SURE YOU KNOW WHAT YOU ARE DOING -- ---------------------------------------------------------------
# LANGUAGE DeriveGeneric # # OPTIONS_GHC -fno - warn - missing - fields # # OPTIONS_GHC -fno - warn - missing - signatures # # OPTIONS_GHC -fno - warn - name - shadowing # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # module Agent_Client(emitZipkinBatch,emitBatch) where...
63ea863b1e3ba9586dcc678c881a04b282c953ff58289b4f73f88ae63c00cde2
gwright83/Wheeler
Expr.hs
# OPTIONS_GHC -XGADTs # -- -- Expr.hs -- The datatype ; the base module imported by anything -- that operates on expressions. -- , 7 March 2011 . -- 3 June 2011 Changed from a test module to being the base module of the class . -- Copyright ( c ) 2011 , Antiope Associates , all rights rese...
null
https://raw.githubusercontent.com/gwright83/Wheeler/cfc8c66f019de92f087cc8157f2a9be22ae26cf7/src/Math/Symbolic/Wheeler/Expr.hs
haskell
Expr.hs that operates on expressions. Show instance for an expression. Note that we define non-commuting factors to always be positive, since this avoids ordering ambiguities. automatically derived instances of Show. Again, understand the parenthesization and fix up the display of integers and ra...
# OPTIONS_GHC -XGADTs # The datatype ; the base module imported by anything , 7 March 2011 . 3 June 2011 Changed from a test module to being the base module of the class . Copyright ( c ) 2011 , Antiope Associates , all rights reserved . module Math.Symbolic.Wheeler.Expr ( Expr (..)...
4b6bfede073ed6020b80a77fbc32d6c8270ee82ec3039b8f0e2aaba48bce94d9
d-cent/coracle
migration.clj
(ns coracle.migration (:require [monger.ragtime] ;; monger.ragtime required for ragtime migrations to work [monger.collection :as coll] [ragtime.core :as ragtime] [clojure.tools.logging :as log])) (def collection-name "activities") (defn update-reco...
null
https://raw.githubusercontent.com/d-cent/coracle/da10a7d4b557bb2ab6996e09d99cee5f1ba994e9/src/coracle/migration.clj
clojure
monger.ragtime required for ragtime migrations to work IMPORTANT DO *NOT* MODIFY THE EXISTING MIGRATION IDS IN THIS LIST
(ns coracle.migration [monger.collection :as coll] [ragtime.core :as ragtime] [clojure.tools.logging :as log])) (def collection-name "activities") (defn update-records [db coll f] (let [records (coll/find-maps db coll)] (doseq [record records] (coll/update-by-id db coll...
5e752e56c28adae19b7a5d1c2fd2c9352b89ca872e239856ee34dd9ee3e42d87
palletops/log-config
timbre_test.clj
(ns com.palletops.log-config.timbre-test (:require [clojure.test :refer :all] [taoensso.timbre :refer [example-config info log]] [com.palletops.log-config.timbre :refer :all])) (def v {:m 1}) (deftest context-test (testing "context via explicit add-var" (is (re-find #":m 1" (with-out...
null
https://raw.githubusercontent.com/palletops/log-config/ff924ac9ea900999324ce44645b2969781cf4b12/test/com/palletops/log_config/timbre_test.clj
clojure
(ns com.palletops.log-config.timbre-test (:require [clojure.test :refer :all] [taoensso.timbre :refer [example-config info log]] [com.palletops.log-config.timbre :refer :all])) (def v {:m 1}) (deftest context-test (testing "context via explicit add-var" (is (re-find #":m 1" (with-out...
a359f4e5bc186dc096b99f6f4473b7c375f16fb9bb3a593dffca95cd7cc53365
8thlight/hyperion
jdbc.clj
(ns hyperion.sql.jdbc (:require [hyperion.key :refer [generate-id]] [hyperion.log :as log] [hyperion.sql.connection :refer [connection]] [hyperion.sql.query :refer [query-str params]] [hyperion.sql.query-builder :refer :all ]) (:import [java.util ArrayList] ...
null
https://raw.githubusercontent.com/8thlight/hyperion/b1b8f60a5ef013da854e98319220b97920727865/sql/src/hyperion/sql/jdbc.clj
clojure
(ns hyperion.sql.jdbc (:require [hyperion.key :refer [generate-id]] [hyperion.log :as log] [hyperion.sql.connection :refer [connection]] [hyperion.sql.query :refer [query-str params]] [hyperion.sql.query-builder :refer :all ]) (:import [java.util ArrayList] ...
37f829899b6672520956262b31395c18cf6a93fd3cd7eca63e460b1adc6f7ae6
grin-compiler/ghc-wpc-sample-programs
HXmlParser.hs
-- ------------------------------------------------------------ | Module : HXmlParser Copyright : Copyright ( C ) 2005 - 2010 License : MIT Maintainer : Maintainer : Stability : experimental Portability : portable HXmlParser - Minimal Validating XML Parser ...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/hxt-9.3.1.18/examples/arrows/hparser/HXmlParser.hs
haskell
------------------------------------------------------------ ------------------------------------------------------------ import all stuff for parsing, validating, and transforming XML ------------------------------------------------------------ | get the commandline arguments and evaluate them, return a key-val...
| Module : HXmlParser Copyright : Copyright ( C ) 2005 - 2010 License : MIT Maintainer : Maintainer : Stability : experimental Portability : portable HXmlParser - Minimal Validating XML Parser of the Haskell XML Toolbox , no HTTP supported XML well - ...
f7fd39dc5a4c08d304848b38545f49751e9554a503ed55cdd1d816f521bb5d81
nextjournal/clerk-demo
logo.clj
;; # 🎨 Making a Clerk Logo ^{:nextjournal.clerk/visibility {:code :fold}} (ns logo "A notebook generating the Clerk's logo." (:require [nextjournal.clerk :as clerk])) The new Clerk header image is made from a fifth order [ Curve]( / wiki / Hilbert_curve ) , so we will first create a recursive function to g...
null
https://raw.githubusercontent.com/nextjournal/clerk-demo/45271b7060cd54b8298300d59a07dbec037dfeaf/notebooks/logo.clj
clojure
# 🎨 Making a Clerk Logo arbitrary order. These are the points for this curve: But they're much more interesting if we use the browser's built-in support for SVG to draw a path made from points to show the convert a sequence of points into an SVG path: And then we'll use that to visualize the curve: The trick t...
^{:nextjournal.clerk/visibility {:code :fold}} (ns logo "A notebook generating the Clerk's logo." (:require [nextjournal.clerk :as clerk])) The new Clerk header image is made from a fifth order [ Curve]( / wiki / Hilbert_curve ) , so we will first create a recursive function to generate curves of (defn hil...
b5f0b9f6d0e6f4b60b1d72652a0b2e6a6b7c17b7d5e601213f3f454875c2d2ec
sgbj/MaximaSharp
d9b1mp.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " ;;; "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/numerical/slatec/d9b1mp.lisp
lisp
Compiled by f2cl version: "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $" Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':simple-array) (:array-slicing nil) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl6.l , v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $ " " macros.l , v fceac53...
0f84f53743c4c57e01f34f94e7426fdbbc71ec4c811c2c70c6672a2298491caf
patricoferris/ocaml-multicore-monorepo
settings.ml
---------------------------------------------------------------------------- * Copyright ( c ) 2019 - 2020 * * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * ...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/src/vendor/h2/lib/settings.ml
ocaml
this means payload size From RFC7540§8.2: * Clients MUST reject any attempt to change the * SETTINGS_ENABLE_PUSH setting to a value other than 0 by * treating the message as a connection error (Section 5.4.1) of * type PROTOCOL_ERROR. Check incoming settings and report an error ...
---------------------------------------------------------------------------- * Copyright ( c ) 2019 - 2020 * * All rights reserved . * * Redistribution and use in source and binary forms , with or without * modification , are permitted provided that the following conditions are met : * ...
b211fef9eda002cbeaa2c9fd59fa6f1a6468e010f24301f3eeeba7b482e192ba
ml4tp/tcoq
formula.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/plugins/firstorder/formula.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** "_" cannot be parsed we have a co...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Hipattern open Names ope...
014c92c997971b3c6122c3f9ab8ee412d10e17f044ae1a0fd03b27c20e79d363
NorfairKing/smos
Gen.hs
# OPTIONS_GHC -fno - warn - orphans # module Smos.Server.Gen where import Data.GenValidity import Data.GenValidity.Persist () import Data.GenValidity.Time () import Data.GenValidity.UUID.Typed () import Smos.Server.DB instance GenValid Backup
null
https://raw.githubusercontent.com/NorfairKing/smos/82707699b446bc431f5233e5dc18c7ec3dd679fd/smos-server-gen/src/Smos/Server/Gen.hs
haskell
# OPTIONS_GHC -fno - warn - orphans # module Smos.Server.Gen where import Data.GenValidity import Data.GenValidity.Persist () import Data.GenValidity.Time () import Data.GenValidity.UUID.Typed () import Smos.Server.DB instance GenValid Backup
d7f3c6f9a7d587fabc11e7a35999d485fb457bb01758cb2c23f42228c84ccff9
bgamari/hs-usdt
USDT.hs
# LANGUAGE CPP # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # module System.USDT ( Tracepoint , tracepoint , mkTracepoint , mkTracepoint' , triggerTracepoint ) where import Data.Char import Language.Haskell.TH import Language.Haskell.TH.Syntax import Language.Haskell.TH.Quote import System.Proces...
null
https://raw.githubusercontent.com/bgamari/hs-usdt/904b4c6874eae56a97e3a2def9a6c52e6a5057e3/src/System/USDT.hs
haskell
| Register a new tracepoint and trigger it. | Register a new tracepoint. | Register a new tracepoint. | Trigger a tracepoint previously created using 'mkTracepoint'.
# LANGUAGE CPP # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # module System.USDT ( Tracepoint , tracepoint , mkTracepoint , mkTracepoint' , triggerTracepoint ) where import Data.Char import Language.Haskell.TH import Language.Haskell.TH.Syntax import Language.Haskell.TH.Quote import System.Proces...
8406e2bf9ac2ecba81492c021af5d8dd61ac4bce91b08d3d10968855b0ebc0dc
replikativ/superv.async
async_test.cljc
(ns superv.async-test (:require [clojure.test :refer [deftest is testing #?@(:cljs [async])]] [clojure.core.async :as async :refer [<! >! go chan close! alt! timeout chan close! take! to-chan! put! pub sub onto-chan! #?@(:clj [<!! >!!])]] [supe...
null
https://raw.githubusercontent.com/replikativ/superv.async/4f5b68be0e74822c098c141a25562106c7df9291/test/superv/async_test.cljc
clojure
alt? thread-try thread-super go-loop-try go-super go-loop-super go-for traditional for comprehension supervisor concurrent part which holds subscription a trick: test correct waiting with staleness in other part concurrent part which needs to free resources transducer embedding
(ns superv.async-test (:require [clojure.test :refer [deftest is testing #?@(:cljs [async])]] [clojure.core.async :as async :refer [<! >! go chan close! alt! timeout chan close! take! to-chan! put! pub sub onto-chan! #?@(:clj [<!! >!!])]] [supe...
477fd0ea2aa5098109b59ffd2cdc168b66689133b8bd1f197c82f7204363ca24
haskell-mafia/boris
Static.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Boris.Http.Resource.Static ( staticMiddleware ) where import Network.Wai.Application.Static (embeddedSettings, staticApp) import Data.FileEmbed (embedDir) import Network.Wai (App...
null
https://raw.githubusercontent.com/haskell-mafia/boris/fb670071600e8b2d8dbb9191fcf6bf8488f83f5a/boris-http/src/Boris/Http/Resource/Static.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NoImplicitPrelude # # LANGUAGE TemplateHaskell # module Boris.Http.Resource.Static ( staticMiddleware ) where import Network.Wai.Application.Static (embeddedSettings, staticApp) import Data.FileEmbed (embedDir) import Network.Wai (Application, Middleware, Request (..))...
357f6898686be4d3ba6a83ab2b2a4bf8df10336e51f3f1ac9d41d63e0136cf5c
slurmulon/bach
math.cljc
(ns bach.math) (def to-ratio #?(:clj rationalize :cljs float)) (def powers-of-two (iterate (partial * 2) 1)) (defn gcd "Determines the greatest common denominator between two numeric values." [a b] (if (zero? b) a (recur b (mod a b)))) (defn ratio-to-vector "Converts a ratio to a vector." [ratio] ...
null
https://raw.githubusercontent.com/slurmulon/bach/4e48e94e4020b24966026b671e68b879a8bea91a/src/bach/math.cljc
clojure
(ns bach.math) (def to-ratio #?(:clj rationalize :cljs float)) (def powers-of-two (iterate (partial * 2) 1)) (defn gcd "Determines the greatest common denominator between two numeric values." [a b] (if (zero? b) a (recur b (mod a b)))) (defn ratio-to-vector "Converts a ratio to a vector." [ratio] ...
5a52ae51f29b395eb951589cd4d76a4d2df92a6cbe659d281c53e2b881e2eeba
dnaeon/cl-jingle
package.lisp
Copyright ( c ) 2022 Nikolov < > ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions ;; are met: ;; 1 . Redistributions of source code must retain the above copyright ;; notice, this list of co...
null
https://raw.githubusercontent.com/dnaeon/cl-jingle/b8edf9a9caccffa599262caf6a77a7b3f542bd6f/src/package.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer in this position and unchanged. notice, this list of conditions and the fo...
Copyright ( c ) 2022 Nikolov < > 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S ) ` ` AS IS '' AND ANY EXPRESS OR INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES...
395629ede104326e2ddb299f7158197a371588b621efbadbb098136cae9c1dad
SquidDev/illuaminate
illuaminateParserMd.ml
open IlluaminateCore let spanned ~lines ~(lexbuf : Lexing.lexbuf) ~start value = { Span.span = Span.of_pos2 lines start lexbuf.lex_curr_p; value } let rec parse_attributes lines (lexbuf : Lexing.lexbuf) acc = let start = lexbuf.lex_curr_p in match Lexer.header lines lexbuf with | End | Malformed -> List.rev a...
null
https://raw.githubusercontent.com/SquidDev/illuaminate/da18b101b4710881b71c42554d70a3a7d17c3cd6/src/parser_md/illuaminateParserMd.ml
ocaml
open IlluaminateCore let spanned ~lines ~(lexbuf : Lexing.lexbuf) ~start value = { Span.span = Span.of_pos2 lines start lexbuf.lex_curr_p; value } let rec parse_attributes lines (lexbuf : Lexing.lexbuf) acc = let start = lexbuf.lex_curr_p in match Lexer.header lines lexbuf with | End | Malformed -> List.rev a...
1a73e9375c663f36a3812b99a8712913fea5bb29247ae16568ad3965a0963e78
cxphoe/SICP-solutions
5.13.rkt
(load "5.12a.rkt") ; just change the procedure lookup-register in the make-new-mahcine: (define (lookup-register name) (let ((val (assoc name register-table))) (if val (cadr val) (begin (allocate-register name) ; allocate register if reg isn't found (lookup-register name))))) (def...
null
https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%205-Computing%20with%20Register%20Machines/1%7E4/5.13.rkt
racket
just change the procedure lookup-register in the make-new-mahcine: allocate register if reg isn't found and there is no need to allocate registers at the beginning (for-each (lambda (register-name) ((machine 'allocate-register) register-name)) register-names) -----------update------...
(load "5.12a.rkt") (define (lookup-register name) (let ((val (assoc name register-table))) (if val (cadr val) (lookup-register name))))) (define (make-machine ops controller-text) (let ((machine (make-new-machine))) ((machine 'install-operations) ops) ((machine 'install-instruct...
88ddebde6ecc0020b457aeb01772703ef2a84a33ac532530d515986724dcaf5c
futurice/myRetroGenerator
MarkdownParser.hs
module MarkdownParser (parseMyRetro) where import Data (Future (..), MyRetro (..), NextMonths (..), PastMonths (..), Project (..), Retro (..), Slider) import Data.Char (isDigit) import Data.Text (isPrefixOf, pack, stripPrefix, toLower, unpack) import Parser (Parser, embed, get', head', runParser, takeWhile', takeWhile...
null
https://raw.githubusercontent.com/futurice/myRetroGenerator/c7d9ad554b144ea48143260b4667ffa1d38711ad/generator/src/MarkdownParser.hs
haskell
module MarkdownParser (parseMyRetro) where import Data (Future (..), MyRetro (..), NextMonths (..), PastMonths (..), Project (..), Retro (..), Slider) import Data.Char (isDigit) import Data.Text (isPrefixOf, pack, stripPrefix, toLower, unpack) import Parser (Parser, embed, get', head', runParser, takeWhile', takeWhile...
83ebd764dddd8191ef5c70b49c3821484988fb4f39e53db7865f923e4b3e4471
gedge-platform/gedge-platform
rabbit.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit). -ignore_xref({rabbit_direct, fo...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit.erl
erlang
for testing and mgmt-agent --------------------------------------------------------------------------- Boot steps. for tests rabbit_alarm currently starts memory and disk space monitors FHC needs memory monitor to be running --------------------------------------------------------------------------- 100 ms ----...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit). -ignore_xref({rabbit_direct, force_ev...
03e08d960db71567cedc941480afa4183b7be109e5a61b8cc5ab79e52e6446c3
patrikja/AFPcourse
NotAFunctor.hs
module NotAFunctor where -- Not a functor type NotAFunctor = Equal newtype Equal a = Equal {runEqual :: a -> a -> Bool} fmapEqual :: (a -> b) -> Equal a -> Equal b fmapEqual = error "Can't be done!?" -- Good exercise: work out some examples " in between " Functor , Applicative and Monad -- -examples-of-not-a-func...
null
https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L3/before/src/NotAFunctor.hs
haskell
Not a functor Good exercise: -examples-of-not-a-functor-functor-applicative-monad Functor, but not Applicative ((,) Void)
module NotAFunctor where type NotAFunctor = Equal newtype Equal a = Equal {runEqual :: a -> a -> Bool} fmapEqual :: (a -> b) -> Equal a -> Equal b fmapEqual = error "Can't be done!?" work out some examples " in between " Functor , Applicative and Monad Applicative , but not ZipList pure x ...
8f21bf397d3a7e14f7aa407f6a6c9b87d79aae00594fd60d37cf7aaca5095fa0
mzp/coq-ruby
editable_cells.ml
open GTree open Gobject let create l = let hbox = GPack.hbox () in let scw = GBin.scrolled_window ~hpolicy:`AUTOMATIC ~vpolicy:`AUTOMATIC ~packing:(hbox#pack ~expand:true) () in let columns = new GTree.column_list in let command_col = columns#add Data.string in let coq_col = column...
null
https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/ide/utils/editable_cells.ml
ocaml
populate the store Alternate colors for the rows
open GTree open Gobject let create l = let hbox = GPack.hbox () in let scw = GBin.scrolled_window ~hpolicy:`AUTOMATIC ~vpolicy:`AUTOMATIC ~packing:(hbox#pack ~expand:true) () in let columns = new GTree.column_list in let command_col = columns#add Data.string in let coq_col = column...
e6e07f0830a868511b383d5ecddb1db0f261f61aeecd62d8bc1c40f77fae7d37
just-sultanov/clj-monaco
js_interop_test.cljs
;;;; Copyright © 2019 - 2020 Ilshat . All rights reserved . ;; The use and distribution terms for this software are covered by the license which ;; can be found in the file license 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...
null
https://raw.githubusercontent.com/just-sultanov/clj-monaco/5f09a046879edf19611e528c3de368f2919ce577/src/test/clojure/monaco/js_interop_test.cljs
clojure
The use and distribution terms for this software are covered by the license which can be found in the file license at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
Copyright © 2019 - 2020 Ilshat . All rights reserved . (ns monaco.js-interop-test (:require [cljs.test :as t :include-macros true] [monaco.js-interop :as sut])) (t/deftest camel-case->kebab-case-test (doseq [k [:some-key :someKey :SomeKey]] (t/is (= "some-key" (sut/camel-case->kebab-case k)))) (t...
13c0599f7ee7f79ba7f5a5c58084534052b639decdae9861ed6cd9abfbbe95de
spechub/Hets
KnownProvers.hs
# LANGUAGE CPP # | Module : ./Comorphisms / KnownProvers.hs Description : provides a map of provers to their most useful composed comorphisms Copyright : ( c ) , Uni Bremen 2005 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portab...
null
https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/Comorphisms/KnownProvers.hs
haskell
hiding (top) hybrid | the default prover selected in the GUI | a map of known prover names implemanting a GUI interface | a map of known prover names for a specific prover kind to a list of simple (composed) comorphisms CASL HasCASL ModalCASL Propositional use translation to TPTP instead of one to SoftFOL h...
# LANGUAGE CPP # | Module : ./Comorphisms / KnownProvers.hs Description : provides a map of provers to their most useful composed comorphisms Copyright : ( c ) , Uni Bremen 2005 License : GPLv2 or higher , see LICENSE.txt Maintainer : Stability : provisional Portab...
0f527c3f62dbd201965bbdff6fdecc5b2555095a8ae8abacf376f8cca22a3eb4
emilaxelsson/dino
Diff.hs
# LANGUAGE UndecidableInstances # module Dino.AST.Diff where import Prelude import Control.Monad (guard, zipWithM) import Data.Coerce (coerce) import Data.Foldable (asum) import Data.Hashable (Hashable) import qualified Data.HashMap.Strict as HM import Data.List (sortOn) import Data.Text (Text) import qualified Data...
null
https://raw.githubusercontent.com/emilaxelsson/dino/3b3115a7fd694cbc3d4fca4d61b0166f4707173f/src/Dino/AST/Diff.hs
haskell
| Drop elements at the end of a list ------------------------------------------------------------------------------ * Types ------------------------------------------------------------------------------ | Edit operations on an optional element | Edit operations at the end of a list | Edit operations on lists Edit...
# LANGUAGE UndecidableInstances # module Dino.AST.Diff where import Prelude import Control.Monad (guard, zipWithM) import Data.Coerce (coerce) import Data.Foldable (asum) import Data.Hashable (Hashable) import qualified Data.HashMap.Strict as HM import Data.List (sortOn) import Data.Text (Text) import qualified Data...
08d19679620dafae747e944aebcf53f532e11d73653835f3988a80d8fcbd1b97
mbj/stratosphere
S3OutputProperty.hs
module Stratosphere.SageMaker.DataQualityJobDefinition.S3OutputProperty ( S3OutputProperty(..), mkS3OutputProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data S...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/DataQualityJobDefinition/S3OutputProperty.hs
haskell
module Stratosphere.SageMaker.DataQualityJobDefinition.S3OutputProperty ( S3OutputProperty(..), mkS3OutputProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data S...
4afb0ef262b83a1c330125a1cc52c18951d0aac3768e9b7fff212868de42414d
janestreet/memtrace_viewer_with_deps
enumeration.ml
open! Core_kernel open! Import type ('a, 'b) t = { all : 'a list } module type S = Enumeration_intf.S with type ('a, 'witness) enumeration := ('a, 'witness) t module type S_fc = Enumeration_intf.S_fc with type ('a, 'witness) enumeration := ('a, 'witness) t module Make (T : sig type t [@@deriving enumerate] ...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/core_kernel/total_map/src/enumeration.ml
ocaml
open! Core_kernel open! Import type ('a, 'b) t = { all : 'a list } module type S = Enumeration_intf.S with type ('a, 'witness) enumeration := ('a, 'witness) t module type S_fc = Enumeration_intf.S_fc with type ('a, 'witness) enumeration := ('a, 'witness) t module Make (T : sig type t [@@deriving enumerate] ...
0b5ab2d8de340aaf6ad41e395b64af674bdea0dabb80a74178eae4755259b8d4
fjames86/frpc2
package.lisp
Copyright ( c ) 2016 < > This code is licensed under the MIT license . (defpackage #:frpc2 (:use #:cl #:drx) (:export #:process-rpc-call ;; authentication providers #:make-auth-block #:client-provider #:client-authenticate #:client-verify ...
null
https://raw.githubusercontent.com/fjames86/frpc2/6b7ec2c7d57a0918ecc3755af75ff183e24d7e85/package.lisp
lisp
authentication providers some rpc structure accessors that may be required call and reply encoders errors and conditions auth structures server pollfds clients useful functions define clients and server programs rpcbind general server. only processes calls, does no networking simple server. Should be su...
Copyright ( c ) 2016 < > This code is licensed under the MIT license . (defpackage #:frpc2 (:use #:cl #:drx) (:export #:process-rpc-call #:make-auth-block #:client-provider #:client-authenticate #:client-verify #:client-modify-call #:client-mo...
ad374b80587bb22fea0b5e27c64511a8464f4675a522840bbca91450966cd06b
seanomlor/programming-in-haskell
replicate.hs
import Prelude hiding (replicate) replicate :: Int -> a -> [a] replicate 0 _ = [] replicate n x = x : replicate (n - 1) x
null
https://raw.githubusercontent.com/seanomlor/programming-in-haskell/e05142e6709eeba2e95cf86f376a32c9e629df88/06-recursive-functions/replicate.hs
haskell
import Prelude hiding (replicate) replicate :: Int -> a -> [a] replicate 0 _ = [] replicate n x = x : replicate (n - 1) x
9a222e51cc730b8a00015b5024fe7ff830a0c81b0bf12a2d535a56d8a79d1aab
ucsd-progsys/dsolve
demo_trunc.ml
let show x = () let abs x = if x > 0 then x else (0-x) let div a b = assert (b != 0); a/b let trunc i n = let i' = abs i in let n' = abs n in if i' <= n' then i else let _ = show i' in n' * (div i i')
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/proceedings-demos/demo/demo_trunc.ml
ocaml
let show x = () let abs x = if x > 0 then x else (0-x) let div a b = assert (b != 0); a/b let trunc i n = let i' = abs i in let n' = abs n in if i' <= n' then i else let _ = show i' in n' * (div i i')
2d2d5c407457cb262ea233d9bdd4358865b5f678ccb1f2dff78ba40682e9d5e4
racket/algol60
reader.rkt
#lang s-exp syntax/module-reader algol60/lang/algol60 #:read algol60-read #:read-syntax algol60-read-syntax #:info algol60-get-info #:whole-body-readers? #t (require "../parse.rkt" ;; Parses to generate an AST. Identifiers in the AST ;; are represented as syntax objects with source location. ...
null
https://raw.githubusercontent.com/racket/algol60/e4aebcaff66f121cf52a1f58f4f7bd285eded728/lang/reader.rkt
racket
Parses to generate an AST. Identifiers in the AST are represented as syntax objects with source location. and flattening `if' statements so they are always textual lexer and color scheme when editing algol programs.
#lang s-exp syntax/module-reader algol60/lang/algol60 #:read algol60-read #:read-syntax algol60-read-syntax #:info algol60-get-info #:whole-body-readers? #t (require "../parse.rkt" "../simplify.rkt" Desugars the AST , transforming ` for ' to ` if'+`goto ' , of the for ` if < exp > then goto < label > e...
1649d23bc0c3e5e4fc54a8fc6461ee1497b948b2f2f1125f8522e73c68ecd01b
enaeher/local-time-duration
duration.lisp
(in-package :ltd) (eval-when (:compile-toplevel :load-toplevel :execute) (defconstant +nsecs-per-second+ 1000000000) (defconstant +nsecs-per-minute+ (* +nsecs-per-second+ local-time:+seconds-per-minute+)) (defconstant +nsecs-per-hour+ (* +nsecs-per-second+ local-time:+seconds-per-hour+)) (defconstant +nsecs-pe...
null
https://raw.githubusercontent.com/enaeher/local-time-duration/fa20a4a03a1ee076eada649796e2f2345c930c21/duration.lisp
lisp
years
(in-package :ltd) (eval-when (:compile-toplevel :load-toplevel :execute) (defconstant +nsecs-per-second+ 1000000000) (defconstant +nsecs-per-minute+ (* +nsecs-per-second+ local-time:+seconds-per-minute+)) (defconstant +nsecs-per-hour+ (* +nsecs-per-second+ local-time:+seconds-per-hour+)) (defconstant +nsecs-pe...
4c45c6fc2460c10816e6794bfbd140e3a91b8a487a475b339c0538255b8a891e
BinaryAnalysisPlatform/bap
bap_disasm_target_factory.ml
open Core_kernel[@@warning "-D"] open Bap_types.Std open Bap_image_std include Bap_disasm_target_intf let create_stub_target arch = let module Lifter = struct let lift _ _ = Ok [] let addr_size = Arch.addr_size arch module CPU = struct let gpr = Var.Set.empty let nil = Var.create "nil" (Type...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_disasm/bap_disasm_target_factory.ml
ocaml
open Core_kernel[@@warning "-D"] open Bap_types.Std open Bap_image_std include Bap_disasm_target_intf let create_stub_target arch = let module Lifter = struct let lift _ _ = Ok [] let addr_size = Arch.addr_size arch module CPU = struct let gpr = Var.Set.empty let nil = Var.create "nil" (Type...
78870ce8c82e312d9decf4d4b68948214177f2dfcb2ee04e39f6d50b39a947b9
alanz/ghc-exactprint
T2632.hs
# LANGUAGE TemplateHaskell # -- Trac #2632 module MkData where import Language.Haskell.TH op :: Num v => v -> v -> v op a b = a + b decl1 = [d| func = 0 `op` 3 |] decl2 = [d| op x y = x func = 0 `op` 3 |]
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc86/T2632.hs
haskell
Trac #2632
# LANGUAGE TemplateHaskell # module MkData where import Language.Haskell.TH op :: Num v => v -> v -> v op a b = a + b decl1 = [d| func = 0 `op` 3 |] decl2 = [d| op x y = x func = 0 `op` 3 |]
580dbf9772c76a6d1d86a891271497243ebe9178b2a214b7233fffc24a2fe8f6
neel-krishnaswami/adjs
toplevel.ml
open Base open Ast open Poly open Context open Kinding open Subtype let map = List.map let mapM f xs = seq (map f xs) let rec iterM f = function | [] -> return () | v :: vs -> f v >> iterM f vs exception CompileError of string let rec ofilter = function | [] -> [] | None :: xs -> ofilter xs ...
null
https://raw.githubusercontent.com/neel-krishnaswami/adjs/8c892658d56461e0ee7135d6776db13c8d80c72d/toplevel.ml
ocaml
open Base open Ast open Poly open Context open Kinding open Subtype let map = List.map let mapM f xs = seq (map f xs) let rec iterM f = function | [] -> return () | v :: vs -> f v >> iterM f vs exception CompileError of string let rec ofilter = function | [] -> [] | None :: xs -> ofilter xs ...
1bbda951bc6243fc85eec6f44a79b5f83297699abea1c8726bc22d1e9a2c3289
cooldaemon/ermlia
mochijson.erl
@author < > @copyright 2006 Mochi Media , Inc. @doc Yet another JSON ( RFC 4627 ) library for Erlang . -module(mochijson). -author(''). -export([encoder/1, encode/1]). -export([decoder/1, decode/1]). -export([binary_encoder/1, binary_encode/1]). -export([binary_decoder/1, binary_decode/1]). -export([test/0])....
null
https://raw.githubusercontent.com/cooldaemon/ermlia/fa5f8acf5965893b33f405de048e6d570d4aba53/deps/mochiweb/src/mochijson.erl
erlang
This is a macro to placate syntax highlighters.. @type iolist() = [char() | binary() | iolist()] @type json_string() = atom | string() | binary() @type json_number() = integer() | float() @type json_array() = {array, [json_term()]} @type json_object() = {struct, [{json_string(), json_term()}]} @type json_term() ...
@author < > @copyright 2006 Mochi Media , Inc. @doc Yet another JSON ( RFC 4627 ) library for Erlang . -module(mochijson). -author(''). -export([encoder/1, encode/1]). -export([decoder/1, decode/1]). -export([binary_encoder/1, binary_encode/1]). -export([binary_decoder/1, binary_decode/1]). -export([test/0])....
6a77f8eac0bb73c1935746adab913470e700a07ac4aefd6a659d72e3be0d33b5
lopec/LoPEC
clientApp.erl
%%%------------------------------------------------------------------- @private @author < > ( C ) 2009 , Clusterbusters %%% @doc The client application module handles starting and stopping %%% of a node %%% @end Created : 29 Sep 2009 by < > %%%-------------------------------------------------------------...
null
https://raw.githubusercontent.com/lopec/LoPEC/29a3989c48a60e5990615dea17bad9d24d770f7b/branches/stable-1/lib/slave/src/clientApp.erl
erlang
------------------------------------------------------------------- @doc The client application module handles starting and stopping of a node @end ------------------------------------------------------------------- Application callbacks -------------------------------------------------------------------- @doc Th...
@private @author < > ( C ) 2009 , Clusterbusters Created : 29 Sep 2009 by < > -module(clientApp). -behaviour(application). -export([start/2, stop/1]). application : start/[1,2 ] , and should start the processes of the @spec start(StartType , ) - > { ok , Pid } | = term ( ) start(_Type, _Ar...
a050da5952aa7c85dc10336e1492248f48e2a2c385768b177e87c374b72320a5
elastic/runbld
schema_test.clj
(ns runbld.schema-test (:require [clj-time.core :as t] [clojure.test :refer :all] [runbld.schema.mapping :as m :refer [schema-walk mapping-walk]] [schema.core :as s] [schema.test])) (use-fixtures :once schema.test/validate-schemas) (deftest t-schema-walk (is (= {(s/optional-key :id) schema.core/Str...
null
https://raw.githubusercontent.com/elastic/runbld/7afcb1d95a464dc068f95abf3ad8a7566202ce28/test/runbld/schema_test.clj
clojure
need to figure out how to error properly when :schema-type is missing
(ns runbld.schema-test (:require [clj-time.core :as t] [clojure.test :refer :all] [runbld.schema.mapping :as m :refer [schema-walk mapping-walk]] [schema.core :as s] [schema.test])) (use-fixtures :once schema.test/validate-schemas) (deftest t-schema-walk (is (= {(s/optional-key :id) schema.core/Str...
bb7c3a53e2044b6f139006e9a6a9acc0d2911cf019da2e1d4d58ffdcbfcb1043
chaoxu/mgccl-haskell
indc.hs
import Math.Combinatorics.Exact.Binomial import Data.Ratio main :: IO () main = do c <- getLine putStrLn $ unwords $ map show $ binomial $ 2*(read c :: Integer) where binomial n = map (logBase 10 . fromRational) list where list = map (\x->(1%1) - (x * ((1%2)^n))) $ scanl1 (+) [(n `choose` ...
null
https://raw.githubusercontent.com/chaoxu/mgccl-haskell/bb03e39ae43f410bd2a673ac2b438929ab8ef7a1/rosalind/indc.hs
haskell
import Math.Combinatorics.Exact.Binomial import Data.Ratio main :: IO () main = do c <- getLine putStrLn $ unwords $ map show $ binomial $ 2*(read c :: Integer) where binomial n = map (logBase 10 . fromRational) list where list = map (\x->(1%1) - (x * ((1%2)^n))) $ scanl1 (+) [(n `choose` ...
ee0eb75b25c71f17d0d6aa1d760c7495bf3744343771f5720025e384256788a5
ekmett/adjunctions
Store.hs
# LANGUAGE CPP # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # ---------------------------------------------------------------------- -- | -- Module : Control.Comonad.Representa...
null
https://raw.githubusercontent.com/ekmett/adjunctions/ab933492d54493da9071a86a859a2ad6e09fbd85/src/Control/Comonad/Representable/Store.hs
haskell
-------------------------------------------------------------------- | Module : Control.Comonad.Representable.Store License : BSD3 Maintainer : Stability : experimental This is a generalized 'Store' 'Comonad', parameterized by a 'Representable' 'Functor'. The representation of that 'Functor' s...
# LANGUAGE CPP # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE UndecidableInstances # Copyright : ( c ) Sjoerd Visscher 2011 module Control.Comonad.Representable.Store ( Store , store , r...
a491415f01aedcdd67afdf67b9357694b53ecfb8cabffd47616fcd811d8ecd5b
hraberg/shen.clj
primitives.clj
(ns shen.primitives (:require [clojure.core :as c] [clojure.set :as set] [clojure.string :as s] [clojure.walk :as w] [clojure.java.io :as io] [clojure.java.shell :as sh]) (:import [java.io Reader Writer InputStream OutputStream PrintWriter OutputStreamWrit...
null
https://raw.githubusercontent.com/hraberg/shen.clj/41bf09e61dd3a9df03cf929f0e8415087b730396/src/shen/primitives.clj
clojure
last condition, but no :else in the form (call-ffi clj *clojure-version*) [[:major | 1] [:minor | 4] [:incremental | 0] [:qualifier | nil]] (call-ffi clj (System/currentTimeMillis))
(ns shen.primitives (:require [clojure.core :as c] [clojure.set :as set] [clojure.string :as s] [clojure.walk :as w] [clojure.java.io :as io] [clojure.java.shell :as sh]) (:import [java.io Reader Writer InputStream OutputStream PrintWriter OutputStreamWrit...
4b516a2136acbc2720d9cb8c35014583b446d1881c7cb8760267fb34a45e6e8f
Mallku2/lua-redex-model
executionEnvironment.rkt
#lang racket (require redex "./grammar.rkt" "./Relations/fullProgs.rkt") ; Definition of the execution environment as an evaluation context. (define-metafunction core-lang [(plugIntoExecutionEnvironment s) (in-hole (() : () : (((local (~ENV) = ((\{ \})) in (; Basic ...
null
https://raw.githubusercontent.com/Mallku2/lua-redex-model/13a1b8cacbdc72a1b5cb1a1f140f21cc974d71c3/executionEnvironment.rkt
racket
Definition of the execution environment as an evaluation context. Basic functions ; ; ; ; ; ; ;;;;;;; ;;; ;;;;;; ; ;;; ; ; ; ; ; ; ...
#lang racket (require redex "./grammar.rkt" "./Relations/fullProgs.rkt") (define-metafunction core-lang [(plugIntoExecutionEnvironment s) (in-hole (() : () : (((local (~ENV) = ((\{ \})) ($builtIn rawset (~ENV "assert" ...
b60bb4db1210b4c8736a6d561ce2205f63cd6eb22c53902a7c543b42e5bcd28b
siphiuel/luaclj
project.clj
(defproject luaclj "0.1.3" :description "A Lua-to-Clojure parser" :url "" :license {:name "MIT License" :url ""} :dependencies [[org.clojure/clojure "1.8.0"] [instaparse "1.4.3"] [com.taoensso/timbre "4.7.4"] [riddley "0.1.12"] [org...
null
https://raw.githubusercontent.com/siphiuel/luaclj/ad1ee046922e3cebdc3633a36ea39f0f2ae32369/project.clj
clojure
(defproject luaclj "0.1.3" :description "A Lua-to-Clojure parser" :url "" :license {:name "MIT License" :url ""} :dependencies [[org.clojure/clojure "1.8.0"] [instaparse "1.4.3"] [com.taoensso/timbre "4.7.4"] [riddley "0.1.12"] [org...
f3773e7ce13ea909ec018054dc61cd0d564c7d18bf162d1bcd2de277aee5469d
patrikja/AFPcourse
Interpreter1.hs
# LANGUAGE GeneralizedNewtypeDeriving # | Version 1 of the interpreter module Interpreter1 where import qualified Control.Applicative as CA (Applicative(..)) import qualified Control.Monad as CM import qualified Control.Monad.Identity as CMI import qualified Control.Monad.Reader as CMR -- new import D...
null
https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L5/before/src/Interpreter1.hs
haskell
new | A more interesting language with variables and let bindings. new new | An environment maps variables to values. Think of it as [(Name, Value)] or Name -> Maybe Value | The evaluation monad now keeps track of passing around the environment. Eval a ~= Env -> a > (env -> m a) ...
# LANGUAGE GeneralizedNewtypeDeriving # | Version 1 of the interpreter module Interpreter1 where import qualified Control.Applicative as CA (Applicative(..)) import qualified Control.Monad as CM import qualified Control.Monad.Identity as CMI import Data.Map (Map) import qualified Data.Map as Map import...
4fc6d8026292f8fdd760e358cb5bb2cf3903b25bd7f451e6c909f0198e271099
ucsd-progsys/dsolve
intro3.ml
DSOLVE -bare -dontminemlq let n1 = read_int () let n2 = read_int () let hz = fun x y -> assert (x > y) let _ = if n1 > n2 then hz n1 n2 else ()
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2010/intro3.ml
ocaml
DSOLVE -bare -dontminemlq let n1 = read_int () let n2 = read_int () let hz = fun x y -> assert (x > y) let _ = if n1 > n2 then hz n1 n2 else ()
361b5cd738dede5a20f5425f81dbf73d81e16e2872252ee43ce0cfa5297987da
BitGameEN/bitgamex
jsx_config.erl
%% The MIT License Copyright ( c ) 2010 - 2013 < > %% Permission is hereby granted, free of charge, to any person obtaining a copy %% of this software and associated documentation files (the "Software"), to deal in the Software without restriction , including without limitation the rights %% to use, copy, modi...
null
https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/jsx/src/jsx_config.erl
erlang
The MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal to use, copy, modify, merge, publish, distribute, sublicense, and/or sell furnished to do so, subject to the following conditions: The above co...
Copyright ( c ) 2010 - 2013 < > in the Software without restriction , including without limitation the rights copies of the Software , and to permit persons to whom the Software is all copies or substantial portions of the Software . THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E...
ed8db471154920476f1355e91e813658085b7bb6efa64e775b73f8420c29ddb3
racket/gui
filedialog.rkt
#lang racket/base (require ffi/unsafe "../../syntax.rkt" "../../lock.rkt" racket/class racket/match "types.rkt" "utils.rkt" "widget.rkt" "queue.rkt" "stddialog.rkt" "../common/handlers.rkt" "../common/queue.rkt") (provid...
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/gtk/filedialog.rkt
racket
our purposes ; these should really be _ GtkFileChooser but no subtyping always ignored no stock names for "Select"
#lang racket/base (require ffi/unsafe "../../syntax.rkt" "../../lock.rkt" racket/class racket/match "types.rkt" "utils.rkt" "widget.rkt" "queue.rkt" "stddialog.rkt" "../common/handlers.rkt" "../common/queue.rkt") (provid...
51208dd50bcb490c30359602e18343ea33ed6972df933e8d64ef523f9759da6b
davisp/couchdb
couch_index_updater.erl
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not % use this file except in compliance with the License. You may obtain a copy of % the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an " A...
null
https://raw.githubusercontent.com/davisp/couchdb/b0420f9006915149e81607615720f32f21c76725/src/couch_index/src/couch_index_updater.erl
erlang
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 WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations...
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not distributed under the License is distributed on an " AS IS " BASIS , WITHOUT -module(couch_index_updater). -behaviour(gen_server). -export([start_link/2, run/2, is_running/1, update/2, restart/2]). -export([init/1, terminate/2, co...
240c7963f3a23b4651232d48ece96364dd221280123d3c7dc3720bb3084d545c
resttime/cl-liballegro
physicsfs.lisp
(in-package #:cl-liballegro) ;;; PhysicsFS addon (defcfun ("al_set_physfs_file_interface" set-physfs-file-interface) :void) (defcfun ("al_get_allegro_physfs_version" get-allegro-physfs-version) :uint32)
null
https://raw.githubusercontent.com/resttime/cl-liballegro/0f8a3a77d5c81fe14352d9a799cba20e1a3a90b4/src/ffi-functions/addons/physicsfs.lisp
lisp
PhysicsFS addon
(in-package #:cl-liballegro) (defcfun ("al_set_physfs_file_interface" set-physfs-file-interface) :void) (defcfun ("al_get_allegro_physfs_version" get-allegro-physfs-version) :uint32)
edf1e636bfe3b5e60a9ab395a0fc05655d8a1e4c04a322cc07576c571c7f2e8d
cronokirby/haskell-in-haskell
STGTest.hs
module STGTest (tests) where import Lexer (lexer) import Ourlude import Parser (parser) import STG (stg) import Simplifier (simplifier) import Test.Tasty import Test.Tasty.HUnit import Typer (typer) doesCompile :: String -> Maybe Bool doesCompile str = do let eitherToMaybe = either (const Nothing) Just tokens <- ...
null
https://raw.githubusercontent.com/cronokirby/haskell-in-haskell/83cb8114c7a71f2fc530d1865dd22776a3779417/test/STGTest.hs
haskell
module STGTest (tests) where import Lexer (lexer) import Ourlude import Parser (parser) import STG (stg) import Simplifier (simplifier) import Test.Tasty import Test.Tasty.HUnit import Typer (typer) doesCompile :: String -> Maybe Bool doesCompile str = do let eitherToMaybe = either (const Nothing) Just tokens <- ...
5d40f65849f02673793d91adfde67fafae81026e1914523635fdae0fed94b16f
why-not-try-calmer/feedo
RequestsSpec.hs
# LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # module RequestsSpec where import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Aeson (ToJSON (toJSON), Value, eitherDecodeStrict', encode) import Data.ByteString.Char8 (ByteString) import Data.Maybe (catMaybes, fromJust...
null
https://raw.githubusercontent.com/why-not-try-calmer/feedo/61e0563fc456e8445d832d3eb655b25ecce0522e/test/RequestsSpec.hs
haskell
# LANGUAGE OverloadedStrings # case eitherDecodeStrict' $ responseBody body :: Either String APIPages of Left err -> trace err False Right _ -> True
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module RequestsSpec where import Control.Monad.IO.Class (MonadIO, liftIO) import Data.Aeson (ToJSON (toJSON), Value, eitherDecodeStrict', encode) import Data.ByteString.Char8 (ByteString) import Data.Maybe (catMaybes, fromJust, fromMaybe, mapMaybe) import quali...
8cb3c73ca48dfa13399ca21370941f42d377f2d41d67c689e29b102bdb5ab00f
AccelerateHS/accelerate-fft
TestNative.hs
-- | -- Module : TestNative Copyright : [ 2017 .. 2020 ] The Accelerate Team -- License : BSD3 -- Maintainer : < > -- Stability : experimental Portability : non - portable ( GHC extensions ) -- module TestNative where import Test.FFT import Test.Tasty import Data.Array.Accelerate.LLVM.Native...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-fft/3c195de6a4528071388d817f55b0a7adf0547cc6/test/TestNative.hs
haskell
| Module : TestNative License : BSD3 Stability : experimental
Copyright : [ 2017 .. 2020 ] The Accelerate Team Maintainer : < > Portability : non - portable ( GHC extensions ) module TestNative where import Test.FFT import Test.Tasty import Data.Array.Accelerate.LLVM.Native as CPU main :: IO () main = defaultMain (testFFT CPU.runN)
3fb0a7cfa3f1cf368282c4f698b30c1d43547151332bd6e917653036edd9ac28
monadbobo/ocaml-core
console.mli
open Core.Std * Printing on console 's (** Handling of ansi codes. *) module Ansi : sig val kill_line : unit -> unit val bell : unit -> unit val home_cursor : unit -> unit val save_cursor : unit -> unit val unsave_cursor : unit -> unit type color = [ | `Black | `Red | `Green | `Yellow | `Blue...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/extended/lib/console.mli
ocaml
* Handling of ansi codes. Create string with embedded formatting codes * The width in characters of the current output. Returns [None] if stdout is not connected to a tty. * print a list in a columnize way (like the output of ls)
open Core.Std * Printing on console 's module Ansi : sig val kill_line : unit -> unit val bell : unit -> unit val home_cursor : unit -> unit val save_cursor : unit -> unit val unsave_cursor : unit -> unit type color = [ | `Black | `Red | `Green | `Yellow | `Blue | `Magenta | `Cyan | `Wh...
d3f0cb4d40251ecb9e3a17d7e2c74d6cff9c1284334b834046c2baf1687a90e6
heraldry/heraldicon
bend_sinister.cljs
(ns heraldicon.heraldry.ordinary.type.bend-sinister (:require [heraldicon.context :as c] [heraldicon.heraldry.cottising :as cottising] [heraldicon.heraldry.line.core :as line] [heraldicon.heraldry.option.position :as position] [heraldicon.heraldry.ordinary.interface :as ordinary.interface] [heraldic...
null
https://raw.githubusercontent.com/heraldry/heraldicon/71126cfd7ba342dea0d1bb849be92cbe5290a6fd/src/heraldicon/heraldry/ordinary/type/bend_sinister.cljs
clojure
(ns heraldicon.heraldry.ordinary.type.bend-sinister (:require [heraldicon.context :as c] [heraldicon.heraldry.cottising :as cottising] [heraldicon.heraldry.line.core :as line] [heraldicon.heraldry.option.position :as position] [heraldicon.heraldry.ordinary.interface :as ordinary.interface] [heraldic...
619b265b62f7996d9b7fb9e6f976ef356dd0d73ba5edc92fead5cb1719a9e27f
ghc/ghc
Closure.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # module GHC.StgToJS.Closure ( closureInfoStat , closure , conClosure , Closure (..) , newClosure , assignClosure , CopyCC (..) , copyClosure , mkClosure -- $names , allocData , allocClsA , dataName , clsName , dataFieldName ...
null
https://raw.githubusercontent.com/ghc/ghc/5b0388880e10ce53565721a9569d009d4534cbc1/compiler/GHC/StgToJS/Closure.hs
haskell
# LANGUAGE OverloadedStrings # $names ^ debug: output symbol names ^ the object name ^ things in registers ^ layout of the object ^ closure type ^ object name, for printing ^ static refs ^ debug: output all symbol names ^ the thing to modify ^ closure type ^ object name, for printing ^ extra 'a' parameter,...
# LANGUAGE RecordWildCards # module GHC.StgToJS.Closure ( closureInfoStat , closure , conClosure , Closure (..) , newClosure , assignClosure , CopyCC (..) , copyClosure , mkClosure , allocData , allocClsA , dataName , clsName , dataFieldName , varName , jsClosureCount ) where import ...
0932ca9a04f9778a93f1ce6f2272dfd71267fda03f7775c87c9b5baf8aaead3e
gfour/gic
defunc-test.hs
-- c :: Int c = apply sq 2 ; sq :: Int -> Int sq a = a * a ; result :: Int result = 8 + 6 ; apply :: (Int -> Int) -> Int -> Int apply f x = f x
null
https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/Examples/Num/defunc-test.hs
haskell
c :: Int
c = apply sq 2 ; sq :: Int -> Int sq a = a * a ; result :: Int result = 8 + 6 ; apply :: (Int -> Int) -> Int -> Int apply f x = f x
edaadd647752a6796e3465e138f28f6a2e7f7d54bf28d6a2808742f41a7dae96
open-telemetry/opentelemetry-erlang
otel_otlp_metrics.erl
%%%------------------------------------------------------------------------ Copyright 2022 , OpenTelemetry Authors 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 %% %% Unl...
null
https://raw.githubusercontent.com/open-telemetry/opentelemetry-erlang/0c52e7136170e06c91d5b842340d657e1bda9669/apps/opentelemetry_experimental/src/otel_otlp_metrics.erl
erlang
------------------------------------------------------------------------ you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express o...
Copyright 2022 , OpenTelemetry Authors Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(otel_otlp_metrics). -export([to_proto/2]). -include_lib("kernel/include/logger.hrl"). -include_lib("opentelemetry_api/include/...
c5b61f52f274660b2e1068a5e31c34a2d2cea649f9be93663999f8b0a8a39704
Soostone/hs-d3
Transform.hs
------------------------------------------------------------------------------ -- | A DSL for generating SVG transform strings. ------------------------------------------------------------------------------ # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClas...
null
https://raw.githubusercontent.com/Soostone/hs-d3/fb319ba444e263d7bc9655436db2723115a01c46/src/Graphics/HSD3/D3/Transform.hs
haskell
---------------------------------------------------------------------------- | A DSL for generating SVG transform strings. ---------------------------------------------------------------------------- # LANGUAGE QuasiQuotes # ---------------------------------------------------------------------------- |...
# LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # module Graphics.HSD3.D3.Transform ( Transform() , rotate , scale , translate ) where import Control.Monad.State import Data.Monoid import Control.Applicative import Language.Javascrip...
224688be5156cf282784f5132aa83e151c5b629ac1a8baf7d894acda48e13134
acieroid/scala-am
race4.scm
(letrec ((counter 0) (inc (lambda () (set! counter (+ counter 1)))) (dec (lambda () (set! counter (- counter 1)))) (t1 (fork (inc))) (t2 (fork (dec))) (t3 (fork (inc))) (t4 (fork (dec)))) (join t1) (join t2) (join t3) (join t4...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/threads/variations/race4.scm
scheme
(letrec ((counter 0) (inc (lambda () (set! counter (+ counter 1)))) (dec (lambda () (set! counter (- counter 1)))) (t1 (fork (inc))) (t2 (fork (dec))) (t3 (fork (inc))) (t4 (fork (dec)))) (join t1) (join t2) (join t3) (join t4...
f4a7cbde1c5e11bd4994e18dd569443fa3495cd0a972ef129b8c162dcd53e3c4
gonzojive/elephant
query-algebra.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 -*- ;;; ;;; merge.lisp -- Implement efficient OID lists for merge-sort ;;; Copyright ( c ) 2007 by ;;; <ieslick at common-lisp.net> ;;; ;;; Elephant users are granted the rights to distribute and use this software as governed by the terms of the Li...
null
https://raw.githubusercontent.com/gonzojive/elephant/b29a012ab75ccea2fc7fc4f1e9d5e821f0bd60bf/src/contrib/eslick/query-sketch/query-algebra.lisp
lisp
Syntax : ANSI - Common - Lisp ; Base : 10 -*- merge.lisp -- Implement efficient OID lists for merge-sort <ieslick at common-lisp.net> Elephant users are granted the rights to distribute and use this software (), also known as the LLGPL.
Copyright ( c ) 2007 by as governed by the terms of the Lisp Limited General Public License (in-package :elephant)
59e655420b0a9860c04af2130dc84a789e4e052aaeb04b502b256d4e9e51e062
jbreindel/battlecraft
bc_map.erl
-module(bc_map). -include_lib("stdlib/include/qlc.hrl"). %% ets table options -define(ETS_OPTIONS(Heir), [set, public, {heir, Heir, []}, {write_concurrency, true}]). %% api exports -export([init/1, init/2, insert_collision/2, base_vertices/2, base1_vertices/1, base2_vertices/1,...
null
https://raw.githubusercontent.com/jbreindel/battlecraft/622131a1ad8c46f19cf9ffd6bf32ba4a74ef4137/apps/bc_map/src/bc_map.erl
erlang
ets table options api exports @doc map for graph and collisions @doc query result rows type exports ==================================================================== API functions ==================================================================== ==========================================================...
-module(bc_map). -include_lib("stdlib/include/qlc.hrl"). -define(ETS_OPTIONS(Heir), [set, public, {heir, Heir, []}, {write_concurrency, true}]). -export([init/1, init/2, insert_collision/2, base_vertices/2, base1_vertices/1, base2_vertices/1, base3_vertices/1, base4_verti...
4535e28431c6e1e3a77644ed7ee885f1d74251de827b6017946143e2d4216d71
mauny/the-functional-approach-to-programming
recognize_val.ml
(* +parsed+ *) type ('a, 'b) parsed = Returns of 'b * ('a list) | AnalyzeFails ;; (* +parsed+ *) (* +parser+ *) type ('a, 'b) parser == 'a list -> ('a,'b) parsed;; (* +parser+ *) (* +option+ *) type 'a option = Some of 'a | None ;; (* +option+ *) #uninfix "gives";; (* +gives+ *) let (gi...
null
https://raw.githubusercontent.com/mauny/the-functional-approach-to-programming/1ec8bed5d33d3a67bbd67d09afb3f5c3c8978838/cl-75/Syntaxe/recognize_val.ml
ocaml
+parsed+ +parsed+ +parser+ +parser+ +option+ +option+ +gives+ +gives+ +empty+ +empty+ +token+ +token+ +orelse+ +orelse+ +andalso+ +andalso+ +zero_or_more+ +zero_or_more+ +any+ +any+ +optional+ +optional+ +one_or_more+ +one_or_more+ +or_list+ +or_list+ +and_list+ +a...
type ('a, 'b) parsed = Returns of 'b * ('a list) | AnalyzeFails ;; type ('a, 'b) parser == 'a list -> ('a,'b) parsed;; type 'a option = Some of 'a | None ;; #uninfix "gives";; let (gives : ('a, 'b) parser -> ('b -> 'c) -> ('a, 'c) parser) = fun p f toks -> match p toks with ...
08b50e471e506de785ab5a35f5c2f882bbcc1e985c19d972edbed34dce0189c5
dbuenzli/carcass
info.mli
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2016 Daniel C. Bün...
null
https://raw.githubusercontent.com/dbuenzli/carcass/1221231b1e3d9ba5b7697707d0e7e901d51ac376/src-bin/info.mli
ocaml
* The [info] command.
--------------------------------------------------------------------------- Copyright ( c ) 2016 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . --------------------------------------------------------------------------- Copyright (c) 2016 Daniel C. Bün...
25a80edb20dc96afba46128380aba0a266b220f9c194cc26ef5d1368891f019c
arachne-framework/arachne-assets
assets_test.clj
(ns arachne.assets-test (:require [clojure.test :refer :all] [arachne.core :as core] [arachne.core.config :as cfg] [arachne.assets :as assets] [arachne.fileset :as fs] [arachne.fileset.tmpdir :as tmpdir] [com.stuartsierra.component :as c] ...
null
https://raw.githubusercontent.com/arachne-framework/arachne-assets/98ee04c6679f6320dccb03d4a7dddb0b0725fa47/test/arachne/assets_test.clj
clojure
Imperatively update working dir
(ns arachne.assets-test (:require [clojure.test :refer :all] [arachne.core :as core] [arachne.core.config :as cfg] [arachne.assets :as assets] [arachne.fileset :as fs] [arachne.fileset.tmpdir :as tmpdir] [com.stuartsierra.component :as c] ...
1ab5fcb78884ff216633e57b863179521ff17df0e4674ccbae29098a80a87bf2
ekmett/unpacked-containers
PtrEquality.hs
# LANGUAGE CPP # #ifdef __GLASGOW_HASKELL__ # LANGUAGE MagicHash # #endif {-# OPTIONS_HADDOCK hide #-} -- | Really unsafe pointer equality module Internal.PtrEquality (ptrEq, hetPtrEq) where #ifdef __GLASGOW_HASKELL__ import GHC.Exts ( reallyUnsafePtrEquality# ) import Unsafe.Coerce ( unsafeCoerce ) #if __GLASGOW_HA...
null
https://raw.githubusercontent.com/ekmett/unpacked-containers/7dc56993a57511b58257b5d389473e638a7082d2/unpacked-containers/utils/Internal/PtrEquality.hs
haskell
# OPTIONS_HADDOCK hide # | Really unsafe pointer equality no means maybe. The values should be forced to at least WHNF before comparison to get moderately reliable results. them to have the same type. The values should be forced to at least WHNF before comparison to get moderately reliable results.
# LANGUAGE CPP # #ifdef __GLASGOW_HASKELL__ # LANGUAGE MagicHash # #endif module Internal.PtrEquality (ptrEq, hetPtrEq) where #ifdef __GLASGOW_HASKELL__ import GHC.Exts ( reallyUnsafePtrEquality# ) import Unsafe.Coerce ( unsafeCoerce ) #if __GLASGOW_HASKELL__ < 707 import GHC.Exts ( (==#) ) #else import GHC.Exts ( i...
9ff8fe751ebf52acf9d62a6781d2345e5f1e8c1ffc2d6ec69617ec4c41463f96
atolab/apero-core
abytes.ml
open Identifiers module Id = NumId.Make(Int64) type byte = char type bigstring = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t type buffer = | Bytes of bytes | Bigstr of bigstring | Bufset of t list and t = { id : Id.t; mutable buffer : buffer; mutable offset : int; mutable capac...
null
https://raw.githubusercontent.com/atolab/apero-core/6e8b9bb8383de641396463fb4e5685b7f135755c/lib/abytes.ml
ocaml
open Identifiers module Id = NumId.Make(Int64) type byte = char type bigstring = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t type buffer = | Bytes of bytes | Bigstr of bigstring | Bufset of t list and t = { id : Id.t; mutable buffer : buffer; mutable offset : int; mutable capac...
d1f135af6406aeb815a1464c50f9045dcbc896967905c0fbed96ae87471b907d
asr/apia
Types.hs
| Translation of Agda internal types to the target logic . {-# LANGUAGE CPP #-} # LANGUAGE UnicodeSyntax # module Apia.Translation.Types ( agdaDomTypeToFormula , agdaTypeToFormula ) where ------------------------------------------------------------------------------ import Apia.Prelude import Ag...
null
https://raw.githubusercontent.com/asr/apia/a66c5ddca2ab470539fd68c42c4fbd45f720d682/src/Apia/Translation/Types.hs
haskell
# LANGUAGE CPP # ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- formula.
| Translation of Agda internal types to the target logic . # LANGUAGE UnicodeSyntax # module Apia.Translation.Types ( agdaDomTypeToFormula , agdaTypeToFormula ) where import Apia.Prelude import Agda.Syntax.Common ( ArgInfo(ArgInfo, argInfoHiding) , Dom(Dom, domInfo, unDom) , Hiding(NotHidden) ) i...
13a960d601e754f0df928de5de093c8ef62d8dac8f7fdff78f4ae7bbd9e67dbd
sjl/temperance
vm.lisp
(in-package :temperance) ;;;; Config (defvar *step* nil) (defvar *trace* nil) Utilities (declaim (inline functors-match-p constants-match-p)) (defun push-unbound-reference! (wam) "Push a new unbound reference cell onto the heap, returning its address." (wam-heap-push! wam +cell-type-referenc...
null
https://raw.githubusercontent.com/sjl/temperance/f7e68f46b7afaeecf643c009eb2e130500556e31/src/vm.lisp
lisp
Config "Ancillary" Functions (declaim (inline deref unbind! trail! backtrack!)) The book is, yet again, fucked. It just sets `i` to be the trail pointer from the choice point frame. But what if we just popped off the last choice point? If that's the case we need to look over the entire trail. unbound ref bo...
(in-package :temperance) (defvar *step* nil) (defvar *trace* nil) Utilities (declaim (inline functors-match-p constants-match-p)) (defun push-unbound-reference! (wam) "Push a new unbound reference cell onto the heap, returning its address." (wam-heap-push! wam +cell-type-reference+ (wam-heap...
d918015d744314326c1099ad6a6960719bef40fc2b0a54b88a5a644e9be63523
foreverbell/project-euler-solutions
1.hs
main = print $ sum $ filter (\x -> (x `mod` 3 == 0) || (x `mod` 5 == 0)) [1 .. 999]
null
https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/1.hs
haskell
main = print $ sum $ filter (\x -> (x `mod` 3 == 0) || (x `mod` 5 == 0)) [1 .. 999]
a0c3dbdfc9773a9e77861049396ce5cb8712834966301e64bd3f815c4d125483
aphyr/merkle
range.clj
(ns merkle.range "Functions over inclusive ranges, which are just pairs of comparable objects like [1 2] or (:a :b)." (:refer-clojure :exclude [< <= contains?])) ; For concision, override comparison here to work with all comparables. (defn- <= [a b] (clojure.core/< (compare a b) 1)) (defn- < [a b] (clojure.core/...
null
https://raw.githubusercontent.com/aphyr/merkle/4cb63269947f679551fbae277e8488b7406b18f6/src/merkle/range.clj
clojure
For concision, override comparison here to work with all comparables. [r1 r1] [r2 r2] [r2 r2] [r1 r1]
(ns merkle.range "Functions over inclusive ranges, which are just pairs of comparable objects like [1 2] or (:a :b)." (:refer-clojure :exclude [< <= contains?])) (defn- <= [a b] (clojure.core/< (compare a b) 1)) (defn- < [a b] (clojure.core/< (compare a b) 0)) (defn subset? "Is range1 a subset of range2?" [...
fee2e01a5c75db387122c07bfb14053f363f384b77a7d96fcb7f6e89f9bccbe5
khibino/haskell-relational-record
SQLite3.hs
-- | Module : Database . Custom . SQLite3 Copyright : 2019 -- License : BSD3 -- -- Maintainer : -- Stability : experimental -- Portability : unknown -- -- This module provides custom APIs with appropriate configuration for SQLite3 . module Database.Custom.SQLite3 ( module Database.Relational,...
null
https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/relational-schemas/src/Database/Custom/SQLite3.hs
haskell
| License : BSD3 Maintainer : Stability : experimental Portability : unknown This module provides custom APIs with appropriate configuration | From 'Relation' into typed 'Query' with suffix SQL words. ^ relation to finalize building ^ finalized query | Make 'Insert' from derived table and monadic bu...
Module : Database . Custom . SQLite3 Copyright : 2019 for SQLite3 . module Database.Custom.SQLite3 ( module Database.Relational, relationalQuery, insertValue, insertValueNoPH, insertQuery, update, updateNoPH, delete, deleteNoPH, ) where import Language.SQL.Keyword (Keyword) import Databa...
d3477b12d4d0682e005e11f218f7fd2e4ab0b9de3661995a57d88aabc3af12cf
kryonix/pg_cuckoo
GetTable.hs
| Module : GetTable Description : This module extracts data from PSQL Copyright : < > License : AllRightsReserved Maintainer : Module : GetTable Description : This module extracts data from PSQL Copyright : © Denis Hirn <> License : AllRightsReserved Maintainer : Denis Hirn...
null
https://raw.githubusercontent.com/kryonix/pg_cuckoo/755e3199b4831d99e716637fbbebbe794a9a7104/PgCuckoo/src/Database/PgCuckoo/GetTable.hs
haskell
| Transform a row into a Data.Map | Transform a table into a list of rows | Fetch tables from DB | Execute a query and return the result
| Module : GetTable Description : This module extracts data from PSQL Copyright : < > License : AllRightsReserved Maintainer : Module : GetTable Description : This module extracts data from PSQL Copyright : © Denis Hirn <> License : AllRightsReserved Maintainer : Denis Hirn...
0e27c189afae6429805dde636e18cc499301d923583c4ccc9a58e802fc2aed7e
MisakaCenter/OPG_Parser
OPG_core.hs
module Module.OPG_core where import qualified Prelude data Nat = O | S Nat fst :: ((,) a1 a2) -> a1 fst p = case p of { (,) x _ -> x} snd :: ((,) a1 a2) -> a2 snd p = case p of { (,) _ y -> y} length :: (([]) a1) -> Nat length l = case l of { ([]) -> O; (:) _ l' -> S (length l')} app :: (([]...
null
https://raw.githubusercontent.com/MisakaCenter/OPG_Parser/f1c3c3c4487aa5c7addc507740ab5fa4cbdcd002/Module/OPG_core.hs
haskell
module Module.OPG_core where import qualified Prelude data Nat = O | S Nat fst :: ((,) a1 a2) -> a1 fst p = case p of { (,) x _ -> x} snd :: ((,) a1 a2) -> a2 snd p = case p of { (,) _ y -> y} length :: (([]) a1) -> Nat length l = case l of { ([]) -> O; (:) _ l' -> S (length l')} app :: (([]...