_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
13d78db35286d08ce340004e07579425f79e926caba52ae434d31ebf4b13bfbf
mpickering/500-sql-haskell
LMS.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # # LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE KindSignatures # # LANGUAGE DataKinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeApplications # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE InstanceSigs # # LANGUAGE Flexib...
null
https://raw.githubusercontent.com/mpickering/500-sql-haskell/b2beb269de21f37bc3c014ceb8233eec86c678d1/src/LMS.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE GADTs # # LANGUAGE ConstraintKinds # # LANGUAGE DeriveLift # As |span| is not stage aware, it is more dynamic an necessary. Splitting the implementation up means that we can skip over entire rows if necessary in the generated code. We can't use the standard |BC.split| funct...
# LANGUAGE TemplateHaskell # # LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE KindSignatures # # LANGUAGE DataKinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeApplications # # LANGUAGE AllowAmbiguousTypes # # LANGUAGE InstanceSigs # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleIns...
b8e9cecdd3722ce70a937cee4fe747889a95b06531394dc3ba52c2120e88a0fb
haskell-opengl/GLUT
ReadImage.hs
ReadImage.hs ( adapted from readImage.c which is ( c ) Silicon Graphics , Inc. ) Copyright ( c ) 2002 - 2018 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE Support for reading a file of raw RGB data : 4 bytes big ...
null
https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/examples/RedBook4/ReadImage.hs
haskell
This is probably overkill, but anyway... This is the reason for all this stuff above... Closing a file is nice, even when an error occurs during reading.
ReadImage.hs ( adapted from readImage.c which is ( c ) Silicon Graphics , Inc. ) Copyright ( c ) 2002 - 2018 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE Support for reading a file of raw RGB data : 4 bytes big ...
8a8d51da038ee78070915f15d12ada96cce66f1d166c37c9fe1d22e483c2a8ee
uhc/uhc
IORef.hs
# LANGUAGE NoImplicitPrelude , CPP # # OPTIONS_GHC -XNoImplicitPrelude # ----------------------------------------------------------------------------- -- | -- Module : Data.IORef Copyright : ( c ) The University of Glasgow 2001 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Mainta...
null
https://raw.githubusercontent.com/uhc/uhc/8eb6914df3ba2ba43916a1a4956c6f25aa0e07c5/EHC/ehclib/uhcbase/Data/IORef.hs
haskell
--------------------------------------------------------------------------- | Module : Data.IORef License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : portable ---------------------------------------------------------------------------...
# LANGUAGE NoImplicitPrelude , CPP # # OPTIONS_GHC -XNoImplicitPrelude # Copyright : ( c ) The University of Glasgow 2001 Mutable references in the IO monad . module Data.IORef ( * IORefs abstract , instance of : , #if !defined(__PARALLEL_HASKELL__) && defined(__GLASGOW_HASKELL__) #endif ) w...
0e535643872df48a78b24ab66353a51d07e3c9c2eec5154ff41c904d668beb3f
code54/buildversion-plugin
mojo.clj
(ns buildversion-plugin.mojo "Buildversion Maven Plugin" (:use clojure.maven.mojo.defmojo) (:require [clojure.maven.mojo.log :as log] [buildversion-plugin.git :as git])) (defn- eval-custom-script [properties snippet-str] (let [props-as-bindings (vec (mapcat (fn [[k ...
null
https://raw.githubusercontent.com/code54/buildversion-plugin/c4666f4c4e22a9b8b572b97962fdec4ddd8f11de/src/main/clojure/buildversion_plugin/mojo.clj
clojure
Mojo parameters Goal execution injecting project version does not work well :-( (if-let [ver (:build-tag final-props)] (.setVersion project))
(ns buildversion-plugin.mojo "Buildversion Maven Plugin" (:use clojure.maven.mojo.defmojo) (:require [clojure.maven.mojo.log :as log] [buildversion-plugin.git :as git])) (defn- eval-custom-script [properties snippet-str] (let [props-as-bindings (vec (mapcat (fn [[k ...
55eb415149770be33b79582d6a855b3c4a101d2005a4eeaeedf3340d521bc6d5
stathissideris/spec-provider
merge_test.cljc
(ns spec-provider.merge-test (:require [spec-provider.merge :as m] [clojure.test :refer [deftest testing is]] [clojure.spec.alpha :as s] [clojure.spec.test.alpha :as stest] [spec-provider.stats :as st])) (stest/instrument [`merge-with-fns `merge-pred...
null
https://raw.githubusercontent.com/stathissideris/spec-provider/f9e4b3a9a54752a1c2c8df0291ff517679442a1a/test/spec_provider/merge_test.cljc
clojure
(alias 'stc 'clojure.spec.test.check) (deftest test-check (stest/check [`merge-with-fns `merge-pred-stats `merge-pred-map `merge-stats]
(ns spec-provider.merge-test (:require [spec-provider.merge :as m] [clojure.test :refer [deftest testing is]] [clojure.spec.alpha :as s] [clojure.spec.test.alpha :as stest] [spec-provider.stats :as st])) (stest/instrument [`merge-with-fns `merge-pred...
68cfbd29236b36f24c46d3a350a9276c8d23d306022b54cbfae9fb7f5ec069f7
Abhiroop/okasaki
FloydWarshall.hs
module FloydWarshall where import Data.IntMap.Strict as Map hiding (foldl',foldr) import Data.List This is n't a purely functional data structure . But contains a purely functional implementation of the Floyd Warshall 's shortest path algorithm . -- The representation of the graph is a map of each node to a map of ...
null
https://raw.githubusercontent.com/Abhiroop/okasaki/b4e8b6261cf9c44b7b273116be3da6efde76232d/src/FloydWarshall.hs
haskell
The representation of the graph is a map of each node to a map of its adjacent node to its weight.
module FloydWarshall where import Data.IntMap.Strict as Map hiding (foldl',foldr) import Data.List This is n't a purely functional data structure . But contains a purely functional implementation of the Floyd Warshall 's shortest path algorithm . type Vertex = Int type Weight = Int type Graph = IntMap (IntMap Wei...
f273fa7d5fbf832bc0767b1efa4651f39e43488a2dca2b29f050aa5eff74d96c
elben/neblen
Tests.hs
module Neblen.Eval.Tests where import Test.Framework (Test, testGroup) import Test.Framework.Providers.HUnit (testCase) import Test.HUnit ((@?=)) import Control.Monad.Trans.State import Control.Monad.Trans.Except import qualified Data.Map.Strict as M import Neblen.Eval import Neblen.Data import Neblen.Parser tests ...
null
https://raw.githubusercontent.com/elben/neblen/3a586c212613cd5e731788605b4f8ae1e86ed9f5/tests/Neblen/Eval/Tests.hs
haskell
module Neblen.Eval.Tests where import Test.Framework (Test, testGroup) import Test.Framework.Providers.HUnit (testCase) import Test.HUnit ((@?=)) import Control.Monad.Trans.State import Control.Monad.Trans.Except import qualified Data.Map.Strict as M import Neblen.Eval import Neblen.Data import Neblen.Parser tests ...
363ec252b62f7343125d75fecbc78dbfe40444a508f412b685b8140165255b6b
osa1/sc-plugin
Foldr.hs
module Main where -- optimizes fine (with -O) sum_foldr :: [Int] -> Int sum_foldr = foldr (+) 0 -- optimizes fine (with -O) and_foldr :: [Bool] -> Bool and_foldr = foldr (&&) True -- decimal_foldr :: Int -> Int decimal_foldr = foldr ( \d x - > ( fromInteger d + x ) / 10 ) 0 this is pretty awesome...
null
https://raw.githubusercontent.com/osa1/sc-plugin/1969ad81f16ca8ed8110ca8dadfccf6f3d463635/examples/Foldr.hs
haskell
optimizes fine (with -O) optimizes fine (with -O) decimal_foldr :: Int -> Int multiple passes involved in this, but I'm not sure exactly which passes. optimizes fine with -O optimizes fine with -O optimizes fine with -O optimizes fine with -O optimizes fine, but quadratic. TODO: Is it possible to improve this ...
module Main where sum_foldr :: [Int] -> Int sum_foldr = foldr (+) 0 and_foldr :: [Bool] -> Bool and_foldr = foldr (&&) True decimal_foldr = foldr ( \d x - > ( fromInteger d + x ) / 10 ) 0 this is pretty awesome , GHC optimizes this to i d with -O. I think there are id_foldr :: [a] -> [a] id_foldr...
4b23c1ed750ebaf385c71db58cd6c7c0fdf81e1af5dca2ca1752423a695bb0c6
blockapps/eth-pruner
Prune.hs
# OPTIONS_GHC -fno - warn - orphans # {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ScopedTypeVariables # module Prune where import Control.Exception hiding (catch) import ...
null
https://raw.githubusercontent.com/blockapps/eth-pruner/513fcc884c93974a29b380ca80669dc0aebec125/src_backup_withthreads/Prune.hs
haskell
# LANGUAGE FlexibleContexts # # LANGUAGE OverloadedStrings # transactionMetadata: hash(32) + txMetaSuffix(1) privateRoot: privateRootPrefix(1) + hash(32)
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # module Prune where import Control.Exception hiding (catch) import Control.Monad (when) import ...
cc9a66df96d5b9283849d03585ee518a9b57966082d3c60c573d336d49365781
2600hz/kazoo
knm_search.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc 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 /. %%% %%% @end %%%--------...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_numbers/src/knm_search.erl
erlang
----------------------------------------------------------------------------- @doc @end ----------------------------------------------------------------------------- FIXME: knm_managed.erl:76: can never evaluate to `true' Same dialyzer warning ----------------------------------------------------------------------...
( C ) 2010 - 2020 , 2600Hz 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 /. -module(knm_search). -behaviour(gen_listener). -export([start_link/0]). -export([init/1 ,handle_call/3 ...
f1ac34fa1d1dd9899726fee245ce8033ba9d2d2311a584d6f2e958d14d1fc66d
bvaugon/ocapic
mac.ml
(*************************************************************************) (* *) (* OCaPIC *) (* *) ...
null
https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/tests/mac/mac.ml
ocaml
*********************************************************************** OCaPIC ...
This file is distributed under the terms of the CeCILL license . open Pic;; open Lcd;; let disp = connect ~bus_size:Lcd.Four ~e:LATD0 ~rs:LATD2 ~rw:LATD1 ~bus:PORTB;; disp.init ();; disp.config ();; disp.print_string "Hello world";; Sys.sleep 4;; ...
5cd3de7934e1c63a4f01ef670803e0aa21631810f6c0f6b7e719f0a5db396752
haskell-opengl/OpenGLRaw
TimerQuery.hs
# LANGUAGE PatternSynonyms # -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.EXT.TimerQuery Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- ---------------------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/EXT/TimerQuery.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.GL.EXT.TimerQuery License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ * Extension Support * Enums * Functions
# LANGUAGE PatternSynonyms # Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.EXT.TimerQuery ( glGetEXTTimerQuery, gl_EXT_timer_query, pattern GL_TIME_ELAPSED_EXT, glGetQueryObjecti64vEXT, glGetQueryObjectui64vEXT ) where import Graphics.GL.ExtensionPredicates import Graphics.GL....
98023f2eaea8d8569592e38a878a542ce356a887ff9c1ddea9b66ed885dcb89a
huangz1990/real-world-haskell-cn
myFilter.hs
-- file: ch04/myFilter.hs myFilter p xs = foldr step [] xs where step x ys | p x = x : ys | otherwise = ys
null
https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch04/myFilter.hs
haskell
file: ch04/myFilter.hs
myFilter p xs = foldr step [] xs where step x ys | p x = x : ys | otherwise = ys
b570cc286528f46af921644d2b57d69270260b62230b32e0d8a5282b8fe39320
ocaml/ocaml
location.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml/ocaml/d71ea3d089ae3c338b8b6e2fb7beb08908076c7a/parsing/location.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the * Source code locations ( ranges of positions ) , used in parsetree . { b Warning :} this module is ...
7b1057d90ea2c9ad0e002515f5c409ef1c64c74182867739f9459137a64c7526
nh2/conduit-concurrent-map
ConcurrentMap.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # | Functions for concurrent mapping over Conduits . module Data.Conduit.ConcurrentMap ( -- * Explicit number of threads concurrentMapM_ -- * CPU-bound use case , concurrentMapM_numCaps ) where import Contro...
null
https://raw.githubusercontent.com/nh2/conduit-concurrent-map/5dd839f01b3207e3dcb99a099c5aee6540adbe33/src/Data/Conduit/ConcurrentMap.hs
haskell
# LANGUAGE BangPatterns # * Explicit number of threads * CPU-bound use case Concurrent, order-preserving conduit mapping function. Like `Data.Conduit.mapM`, but runs in parallel with the given number of threads, maintain high parallelism despite head-of-line blocking. Because of the no-reordering guarantee, th...
# LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # | Functions for concurrent mapping over Conduits . module Data.Conduit.ConcurrentMap concurrentMapM_ , concurrentMapM_numCaps ) where import Control.Monad (when) import Control.Monad.IO.Class (liftIO) import Control.Monad...
c0d47806109c192ec79b38b0314a42a2fa06e73fec2742bdae67c9e51f163d06
camlp5/camlp5
pa_rp.ml
(* camlp5r *) (* pa_rp.ml,v *) Copyright ( c ) INRIA 2007 - 2017 #load "pa_extend.cmo"; #load "q_MLast.cmo"; open Asttools; open Exparser; open Pcaml; Syntax extensions in Revised Syntax grammar EXTEND GLOBAL: expr ipatt ext_attributes; expr: LEVEL "top" [ [ "parser"; po = OPT ipatt; "["; pcl = LIST0 pa...
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/meta/pa_rp.ml
ocaml
camlp5r pa_rp.ml,v
Copyright ( c ) INRIA 2007 - 2017 #load "pa_extend.cmo"; #load "q_MLast.cmo"; open Asttools; open Exparser; open Pcaml; Syntax extensions in Revised Syntax grammar EXTEND GLOBAL: expr ipatt ext_attributes; expr: LEVEL "top" [ [ "parser"; po = OPT ipatt; "["; pcl = LIST0 parser_case SEP "|"; "]" -> ...
4439ce8aac9cdc0f0780eeee0badcd3caa5f02006c06937f8ddebb58e4771342
ocaml/ocaml
typeclass.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml/ocaml/7e5e7127ffcd688c27f683e048ade3a849b9a24f/typing/typeclass.ml
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Parsetree open Asttypes open Path open Types open Typecore open Typetexp open Format type 'a class_inf...
e0fe8ef731c58080d4336963d9aeec5a581f76b8776394d7fbffd2dd975f2d7a
HunterYIboHu/htdp2-solution
ex154-add-balloons.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex154-add-balloons) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor rep...
null
https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter2/Section10-list-design-recipe/ex154-add-balloons.rkt
racket
about the language level of this file in a form that our tools can easily process. Graphic constants - 0 - (add1 N) interpretation represents the natural numbers or counting numbers N Image -> Image N Image -> Image Physical constants List-of-posns is one of: - '() - (cons Posn List-of-posns) the x coordina...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex154-add-balloons) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) (require 2htdp/image) (define TEST (rectangle ...
b3d55225e277da6793101a93441d9900df532a5ac803ed1d8338c1ede37f2e4d
Verites/verigraph
Monad.hs
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} module GrLang.Monad ( MonadGrLang(..) , ExceptT , importIfNeeded_ , makeVisible , Result , Error , ...
null
https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/src/library/GrLang/Monad.hs
haskell
# LANGUAGE OverloadedStrings # | Given the path to a module and an action that imports it, executes the action unless the module was already imported. Makes the imported module visible, as well as its transitive imports. When running the import action, the only visible module will be the one being import...
# LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # module GrLang.Monad ( MonadGrLang(..) , ExceptT , importIfNeeded_ , makeVisible , Result , Error , prettyError , throwError , getOrError ...
5c6f96808be40eddc41747734ece6b21ca4f08016492a323f4e55809758680c9
kazu-yamamoto/http2
Internal.hs
module Network.HTTP2.Client.Internal ( Request(..) , Response(..) ) where import Network.HTTP2.Client.Types
null
https://raw.githubusercontent.com/kazu-yamamoto/http2/3c29763be147a3d482eff28f427ad80f1d4df706/Network/HTTP2/Client/Internal.hs
haskell
module Network.HTTP2.Client.Internal ( Request(..) , Response(..) ) where import Network.HTTP2.Client.Types
6f20e4427bf20515b9bdfe1cbeeb0ec8b8df9d5237033e07cbbc99819abe78a5
mpickering/apply-refact
Monad2.hs
no = do foo ; mapM print a
null
https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Monad2.hs
haskell
no = do foo ; mapM print a
a0c240ad9389c2cd49b06d59a9f9950e2611637e8eed3d1b2541ae30cf1d461a
janestreet/hardcaml_c
hardcaml_c.ml
include Simulator module Cyclesim = Cyclesim
null
https://raw.githubusercontent.com/janestreet/hardcaml_c/1bf2468801ba9f6a935ffcd08887d9da87bee3f1/lib/hardcaml_c.ml
ocaml
include Simulator module Cyclesim = Cyclesim
ea152613f70f379db188be5655cd028c7b1ac4ea73d7d5da89b2f438dfbd189f
haskell/ghcide
Logger.hs
Copyright ( c ) 2019 The DAML Authors . All rights reserved . SPDX - License - Identifier : Apache-2.0 {-# LANGUAGE RankNTypes #-} -- | This is a compatibility module that abstracts over the -- concrete choice of logging framework so users can plug in whatever -- framework they want to. module Development.IDE.Type...
null
https://raw.githubusercontent.com/haskell/ghcide/3ef4ef99c4b9cde867d29180c32586947df64b9e/src/Development/IDE/Types/Logger.hs
haskell
# LANGUAGE RankNTypes # | This is a compatibility module that abstracts over the concrete choice of logging framework so users can plug in whatever framework they want to. instance ^ Events that are useful for gathering user metrics. ^ Useful information in case an error has to be understood. ^ These error messa...
Copyright ( c ) 2019 The DAML Authors . All rights reserved . SPDX - License - Identifier : Apache-2.0 module Development.IDE.Types.Logger ( Priority(..) , Logger(..) , logError, logWarning, logInfo, logDebug, logTelemetry , noLogging ) where import qualified Data.Text as T data Priority Do n't chan...
fc74cc5c67ac319ef5823c4613d45a0f3d78aed116982d24afb6ac9cee690a39
francescoc/scalabilitywitherlangotp
bsc.erl
-module(bsc). -behaviour(application). -behaviour(supervisor). -export([start/2, stop/1, init/1]). %% Application callbacks start(_Type, _Args) -> {ok, _Pid} = supervisor:start_link({local,?MODULE}, ?MODULE, []). stop(_Data) -> ok. %% Supervisor callbacks init(_) -> ChildSpecList = [child(freq_overloa...
null
https://raw.githubusercontent.com/francescoc/scalabilitywitherlangotp/961de968f034e55eba22eea9a368fe9f47c608cc/ch9/combining/bsc.erl
erlang
Application callbacks Supervisor callbacks
-module(bsc). -behaviour(application). -behaviour(supervisor). -export([start/2, stop/1, init/1]). start(_Type, _Args) -> {ok, _Pid} = supervisor:start_link({local,?MODULE}, ?MODULE, []). stop(_Data) -> ok. init(_) -> ChildSpecList = [child(freq_overload), child(frequency), child(simple_phone_sup)], ...
d2d75e824c6481bc45c9d1ec573a698eb0e41a960121c4288dc46fad5a5cbd74
johnwhitington/ocamli
if.ml
let _ = if 42 = 40 + 2 then 1 + 2 else 6 * 4
null
https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/newtype/programs/if.ml
ocaml
let _ = if 42 = 40 + 2 then 1 + 2 else 6 * 4
48845c84787328bbabd7cfcebe567d3c9cf901a02d5023a002e1ff76925dc21c
missingfaktor/akar
core_test.clj
(ns akar-exceptions.core-test (:require [clojure.test :refer :all] [akar-exceptions.core :refer :all]) (:import [clojure.lang ExceptionInfo])) (deftest akar-exceptions-core-test (testing "attempt" (testing "returns value on successful computation" (is (= :ok (attempt (do ...
null
https://raw.githubusercontent.com/missingfaktor/akar/66403b735cafab4e9fb971b4bf56e899ee84962f/akar-exceptions/test/akar_exceptions/core_test.clj
clojure
(ns akar-exceptions.core-test (:require [clojure.test :refer :all] [akar-exceptions.core :refer :all]) (:import [clojure.lang ExceptionInfo])) (deftest akar-exceptions-core-test (testing "attempt" (testing "returns value on successful computation" (is (= :ok (attempt (do ...
014472dd792d515ad1243c0711f7a91653903000b1f7cf501b05031a701faacb
bobzhang/ocaml-book
batch.ml
open Match module G = Mikmatch.Glob open BatPervasives let syscall cmd = let ic,oc = Unix.open_process cmd in let buf = Buffer.create 16 in (try while true do Buffer.add_channel buf ic 1 done with End_of_file -> () ); let _ = Unix.close_process (ic,oc) in Buffer.contents buf let _ ...
null
https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/util/batch.ml
ocaml
open Match module G = Mikmatch.Glob open BatPervasives let syscall cmd = let ic,oc = Unix.open_process cmd in let buf = Buffer.create 16 in (try while true do Buffer.add_channel buf ic 1 done with End_of_file -> () ); let _ = Unix.close_process (ic,oc) in Buffer.contents buf let _ ...
4aa297bbcf02f89d56a3a2f37c72ae0bf3153789aeff6ade4675c73269d4614c
lindig/lua-ml
luabaselib.ml
module Add (MakeParser : Luaparser.MAKER) (I : Luainterp.S) = struct module Parser = MakeParser (I.Ast) module P = Parser module V = I.Value let lex map buf = Luascanner.token buf map let do_lexbuf ~sourcename:filename g buf = let map = Luasrcmap.mk () in let _ = Luasrcmap.sync map 0 (filename, 1, 1) in t...
null
https://raw.githubusercontent.com/lindig/lua-ml/c9fa490331ce22b9df03130be3fceac40a09877e/src/luabaselib.ml
ocaml
module Add (MakeParser : Luaparser.MAKER) (I : Luainterp.S) = struct module Parser = MakeParser (I.Ast) module P = Parser module V = I.Value let lex map buf = Luascanner.token buf map let do_lexbuf ~sourcename:filename g buf = let map = Luasrcmap.mk () in let _ = Luasrcmap.sync map 0 (filename, 1, 1) in t...
b85339c3be0bce720830490bb88583947cd3c3b63cdfc0443573bddc083ecc5f
clojupyter/clojupyter
history_test.clj
(ns clojupyter.kernel.history-test (:require [clojupyter.kernel.history :as sut] [clojupyter.test-shared :as ts] [midje.sweet :refer [against-background after around before fact facts =>]] [clojure.java.i...
null
https://raw.githubusercontent.com/clojupyter/clojupyter/b54b30b5efa115937b7a85e708a7402bd9efa0ab/test/clojupyter/kernel/history_test.clj
clojure
(ns clojupyter.kernel.history-test (:require [clojupyter.kernel.history :as sut] [clojupyter.test-shared :as ts] [midje.sweet :refer [against-background after around before fact facts =>]] [clojure.java.i...
5ab581100bd7a69f90263620ee5217fb668905f1cc82a484d990c918afb9ff68
cedlemo/OCaml-GI-ctypes-bindings-generator
Tool_item_group.mli
open Ctypes type t val t_typ : t typ val create : string -> Widget.t ptr val get_collapsed : t -> bool val get_drop_item : t -> int32 -> int32 -> Tool_item.t ptr val get_ellipsize : t -> Ellipsize_mode.t val get_header_relief : t -> Relief_style.t val get_item_position : t -> Tool_item.t ptr -> int32 val ...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Tool_item_group.mli
ocaml
open Ctypes type t val t_typ : t typ val create : string -> Widget.t ptr val get_collapsed : t -> bool val get_drop_item : t -> int32 -> int32 -> Tool_item.t ptr val get_ellipsize : t -> Ellipsize_mode.t val get_header_relief : t -> Relief_style.t val get_item_position : t -> Tool_item.t ptr -> int32 val ...
ea3e458952264519203916df1c6656828f7cc99f637f9425d32f74adbca6549b
Clojure2D/clojure2d
color_test.clj
(ns clojure2d.color-test (:require [clojure.test :refer [deftest is are]] [clojure2d.color :as c] [clojure2d.color.blend :as b] [fastmath.core :as m] [fastmath.random :as r] [fastmath.vector :as v])) ;; color protocol (def cv3 (v/vec3 245.0 245.0 220.0)) (...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d/608f646ff57d9c1d4146a246ba64dd1c424bf7cb/test/clojure2d/color_test.clj
clojure
color protocol => "#f5f5dc" test blends test color converters color conversion #colour-models-colour-models ; = > 358.5741984 chroma.js tests different than chroma, shortest path differs a little bit from original, due to rounding test iq palette generator test nearest color distance
(ns clojure2d.color-test (:require [clojure.test :refer [deftest is are]] [clojure2d.color :as c] [clojure2d.color.blend :as b] [fastmath.core :as m] [fastmath.random :as r] [fastmath.vector :as v])) (def cv3 (v/vec3 245.0 245.0 220.0)) (def cv4 (v/vec4 2...
06b226fe663da70e22aac5861882d864b279a2428638fe203893e63450037a69
S8A/htdp-exercises
ex060.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex060) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex060.rkt
racket
about the language level of this file in a form that our tools can easily process. – 0 interpretation the traffic light shows red N-TrafficLight -> N-TrafficLight yields the next state, given current state cs Q: Does the tl-next function convey its intention more clearly than the tl-next-numeric function? A: Ye...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-reader.ss" "lang")((modname ex060) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t ...
505a5cc64b2f7f13344003641f8631f483a1224d5e2d0edd2cc4b74507cc8126
manuel-serrano/bigloo
tools.scm
;*=====================================================================*/ * serrano / prgm / project / bigloo / bdb / bdb / Gdb / tools.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation ...
null
https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/bdb/bdb/Gdb/tools.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * facilities to gather small informations about expressions. */ *===========================...
* serrano / prgm / project / bigloo / bdb / bdb / Gdb / tools.scm * / * Author : * / * Creation : We d Jul 28 15:41:13 1999 * / * Last change : We d Aug 9 17:17:05 2000 ( serrano ) * / * ...
8da1a5ccec09e9eaf0f433c6c232a1b003590c3ae5df62ecc6eb0c5d2bad6507
clojupyter/clojupyter
core.clj
(ns clojupyter.kernel.core (:gen-class) (:require [clojupyter.kernel.cljsrv :as cljsrv] [clojupyter.kernel.comm-atom :as ca] [clojupyter.kernel.config :as config] [clojupyter.kernel.handle-event-process :as hep :refer [start-handle-event-process]] [clojupyter.kernel.i...
null
https://raw.githubusercontent.com/clojupyter/clojupyter/0bb113e467cbe607661a86809e52b459f1127e32/src/clojupyter/kernel/core.clj
clojure
------------------------------------------------------------------------------------------------------------------------ CHANNEL TRANSDUCTION ------------------------------------------------------------------------------------------------------------------------ leave plenty of space - we don't want blocking on ter...
(ns clojupyter.kernel.core (:gen-class) (:require [clojupyter.kernel.cljsrv :as cljsrv] [clojupyter.kernel.comm-atom :as ca] [clojupyter.kernel.config :as config] [clojupyter.kernel.handle-event-process :as hep :refer [start-handle-event-process]] [clojupyter.kernel.i...
7b57788f246b48e2a19062824f0830f9128a8a7f9d91e8ac66b0ef33131a639d
goblint/analyzer
setDomain.ml
(** Abstract domains representing sets. *) module Pretty = GoblintCil.Pretty open Pretty (* Exception raised when the set domain can not support the requested operation. * This will be raised, when trying to iterate a set that has been set to Top *) exception Unsupported of string let unsupported s = raise (Unsuppor...
null
https://raw.githubusercontent.com/goblint/analyzer/12276b68682f48bf540ae832fa8b7f27c1b8404a/src/domains/setDomain.ml
ocaml
* Abstract domains representing sets. Exception raised when the set domain can not support the requested operation. * This will be raised, when trying to iterate a set that has been set to Top * A set domain must support all the standard library set operations. They have been copied instead of included since ou...
module Pretty = GoblintCil.Pretty open Pretty exception Unsupported of string let unsupported s = raise (Unsupported s) module type S = sig include Lattice.S type elt val empty: unit -> t val is_empty: t -> bool val mem: elt -> t -> bool val add: elt -> t -> t val singleton: elt -> t val remove: elt...
2b1786cdb9e6769366cda51b2d960f1ac38da188d5208120e99d9378f23c4ba9
Kappa-Dev/KappaTools
tab_log.ml
(******************************************************************************) (* _ __ * The Kappa Language *) | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF (* | ' / ********************************************************************...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/1e8c9c55e743510eb070ed8b6f2363a166936277/gui/tab_log.ml
ocaml
**************************************************************************** _ __ * The Kappa Language | ' / ******************************************************************** | . \ * This file is distributed under the terms of the |_|\_\ * GN...
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF module Html = Tyxml_js.Html5 open Lwt.Infix let tab_is_active, set_tab_is_active = React.S.create false let tab_was_active = ref false let line_count state = match state with | None -> 0 | Some state -> let open Api_types_t in ...
15bbd226132fbe65ab526989bc010953b40d63913a18b489bdd6d731953f3d28
parapluu/Concuerror
ets_heir.erl
-module(ets_heir). -compile(export_all). scenarios() -> [{T, inf, dpor} || T <- [?MODULE, test, test1, test2]]. ets_heir() -> Heir = spawn(fun() -> ok end), ets:new(table, [named_table, {heir, Heir, heir}]), spawn(fun() -> ets:lookup(table, x), throw(too_bad) ...
null
https://raw.githubusercontent.com/parapluu/Concuerror/152a5ccee0b6e97d8c3329c2167166435329d261/tests/suites/basic_tests/src/ets_heir.erl
erlang
-module(ets_heir). -compile(export_all). scenarios() -> [{T, inf, dpor} || T <- [?MODULE, test, test1, test2]]. ets_heir() -> Heir = spawn(fun() -> ok end), ets:new(table, [named_table, {heir, Heir, heir}]), spawn(fun() -> ets:lookup(table, x), throw(too_bad) ...
4c8f85047165ddf8a8aa20a6a582b094745a3925aea51dd3f87bfeefbe4a8a21
GaloisInc/semmc
Explicit.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE GADTs #-} # LANGUAGE ScopedTypeVariables # module SemMC.Stochastic.IORelation.Explicit ( generateExplicitInstruction, classifyExplicitOperands ) where import qualified GHC.Err.Located as L import Control.Monad ( replicateM ) import ...
null
https://raw.githubusercontent.com/GaloisInc/semmc/17f3ac6238377f833b04f291b07bc31d6266b1a1/semmc-learning/src/SemMC/Stochastic/IORelation/Explicit.hs
haskell
# LANGUAGE GADTs # | Make a random instruction that does not reference any implicit operands. This could be made more efficient - right now, it just tries to generate random instructions until it gets a match. The operands are all distinct and no operands are implicit | Generate test cases and send them off to th...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # module SemMC.Stochastic.IORelation.Explicit ( generateExplicitInstruction, classifyExplicitOperands ) where import qualified GHC.Err.Located as L import Control.Monad ( replicateM ) import Control.Monad.Tra...
ecc69eff9e55028acbd708176008c66951c5c06172567aa10136dd9771b941cc
cmsc430/www
regexp-defun.rkt
#lang racket (provide accepts) type Regexp = | ' zero | ' one | ` ( char , ) | ` ( times , Regexp , Regexp ) | ` ( plus , Regexp , Regexp ) | ` ( star , Regexp ) ;; type K = ;; | '(k0) | ` ( k1 , Regexp , K ) | ` ( k2 , K , Regexp ) ;; Regexp String -> Boolean (define (accepts r s) (matcher r (s...
null
https://raw.githubusercontent.com/cmsc430/www/fcc64c41d1b96cce6dbda49509d2f2ab8ee9f404/langs/loot/regexp-defun.rkt
racket
type K = | '(k0) Regexp String -> Boolean
#lang racket (provide accepts) type Regexp = | ' zero | ' one | ` ( char , ) | ` ( times , Regexp , Regexp ) | ` ( plus , Regexp , Regexp ) | ` ( star , Regexp ) | ` ( k1 , Regexp , K ) | ` ( k2 , K , Regexp ) (define (accepts r s) (matcher r (string->list s) '(k0))) Regexp ( ) K - > Bool (...
dd600c7c18470aacbb96b684ff94bdab5acb13e6bdfe226e03611b38cf6a30fe
GrammaTech/sel
clang-syntactic-contexts.lisp
clang-syntactic-contexts.lisp --- Clang syntactic contexts . (defpackage :software-evolution-library/test/clang-syntactic-contexts (:nicknames :sel/test/clang-syntactic-contexts) (:use :gt/full #+gt :testbot :software-evolution-library/test/util :software-evolution-library/test/util-clang :stefil+ ...
null
https://raw.githubusercontent.com/GrammaTech/sel/cd6975ad9f61a060e77d8aea0c8f74698cf8ff3e/test/clang-syntactic-contexts.lisp
lisp
Tests of basic clang mutation operators function))) free-floating text. Note -- this is no longer a good mutation, since there's a ; missing Cutting statements from non-compound statement should introduce a semicolon (or this should be fixed up) Was some->> Was some->> function)))))) struct)))))) str...
clang-syntactic-contexts.lisp --- Clang syntactic contexts . (defpackage :software-evolution-library/test/clang-syntactic-contexts (:nicknames :sel/test/clang-syntactic-contexts) (:use :gt/full #+gt :testbot :software-evolution-library/test/util :software-evolution-library/test/util-clang :stefil+ ...
d6a219f413bbaa3cd628b797f0fd864d991c2b0545ed259b2284d872d14aaeaa
leandrosilva/cameron
eh_supervisor.erl
@author < > 2011 . %% @doc Utility functions to supervisor modules. -module(eh_supervisor). -author('Leandro Silva <>'). % public api -export([upgrade/1]). %% %% Public API ------------------------------------------------------------------------------------- %% ) - > ok %% @doc Remover and add proces...
null
https://raw.githubusercontent.com/leandrosilva/cameron/34051395b620d2c3cb2cb63c854e65234786a176/deps/erl_helpers/src/eh_supervisor.erl
erlang
@doc Utility functions to supervisor modules. public api Public API ------------------------------------------------------------------------------------- @doc Remover and add processes if necessary. kill children processes that doesn't exists anymore I mean, they exist in the Old spec but no longer in the New s...
@author < > 2011 . -module(eh_supervisor). -author('Leandro Silva <>'). -export([upgrade/1]). ) - > ok upgrade(Supervisor) -> {ok, {_, Specs}} = Supervisor:init([]), Old = sets:from_list([Name || {Name, _, _, _} <- supervisor:which_children(Supervisor)]), New = sets:from_list([Name || {Name, _...
f41c8c09d39299d514907a11a5f1d79e79f430c6493759a51e0d6bee6b14cefe
funcool/promesa
util.cljc
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 ) < > (ns promesa.util (:require [promesa.protocols :as pt]) #?(:clj (:import java.lang.reflect.Method ...
null
https://raw.githubusercontent.com/funcool/promesa/19491a4ea476f80ae741c6d8072c1a4612b1b654/src/promesa/util.cljc
clojure
java.util.function.BiFunction java.util.function.Consumer java.util.function.Function java.util.function.Supplier Explains the use of ^:once metadata
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 ) < > (ns promesa.util (:require [promesa.protocols :as pt]) #?(:clj (:import java.lang.reflect.Method ...
5f16df6f7b8d3fd8078147cafeda92792f5c3895b22d0b04411b7ca56800e2b3
pokepay/aws-sdk-lisp
api.lisp
;; DO NOT EDIT: File is generated by AWS-SDK/GENERATOR. (common-lisp:defpackage #:aws-sdk/services/codecommit/api (:use) (:nicknames #:aws/codecommit) (:import-from #:aws-sdk/generator/shape) (:import-from #:aws-sdk/generator/operation) (:import-from #:aws-sdk/api) (:import-from #:aws-sdk/request) (:impo...
null
https://raw.githubusercontent.com/pokepay/aws-sdk-lisp/ad9a8f9294a9799cef5f4d85e0cd34eca418be24/services/codecommit/api.lisp
lisp
DO NOT EDIT: File is generated by AWS-SDK/GENERATOR.
(common-lisp:defpackage #:aws-sdk/services/codecommit/api (:use) (:nicknames #:aws/codecommit) (:import-from #:aws-sdk/generator/shape) (:import-from #:aws-sdk/generator/operation) (:import-from #:aws-sdk/api) (:import-from #:aws-sdk/request) (:import-from #:aws-sdk/error)) (common-lisp:in-package #:aws-...
54f41a6eaaab06f991bb09bc36bdbe8cc289e12aac157404e497f2c7f211ea29
chenyukang/eopl
define-datatype.scm
;; define-datatype.scm this line must be within 8 lines of the top of the file ( let ( ( time - stamp " Time - stamp : < 2002 - 01 - 02 10:55:10 dfried > " ) ) ;; (display (string-append " define-datatype.scm version J3 " ( substring time - stamp 13 29 ) ;; (string #\ne...
null
https://raw.githubusercontent.com/chenyukang/eopl/0406ff23b993bfe020294fa70d2597b1ce4f9b78/libs/define-datatype.scm
scheme
define-datatype.scm (display (string-append (string #\newline)))) This is an r5rs-compliant datatype system. exports define-datatype, isa, cases, list-of?, always? test with (define-datatype:test-all) All other procedures are prefixed with define-datatype: Any other exports are unintentional. (d...
this line must be within 8 lines of the top of the file ( let ( ( time - stamp " Time - stamp : < 2002 - 01 - 02 10:55:10 dfried > " ) ) " define-datatype.scm version J3 " ( substring time - stamp 13 29 ) writes ( 4/2000 ): * Removed tests ERR20 , ERR22 , and ERR27 from D...
b94a3c895a2bd938c6727e369c459d509a97234d3f7c718e1d745a6fd1921a8c
bennn/trivial
regexp-fail.rkt
#lang racket/base (require trivial/private/test-common (only-in typed/racket/base ann : -> String Listof List U Bytes)) ;; Ill-typed `regexp:` expressions TODO why ca n't I catch errors for ( ... ( List String ) ) ? WhydoI need # f ? (module+ test (test-compile-error #:require trivial/regexp trivial/defi...
null
https://raw.githubusercontent.com/bennn/trivial/c8fb9dcc377d1bf40ca167e34072bec90d2651e1/test/regexp-fail.rkt
racket
Ill-typed `regexp:` expressions bg; ill-typed in untyped Racket --- Can't handle |, yet --- can't handle starred groups -- expected String, given Bytes -- return type assumed to be String, but really is Bytes (ugly, but at least we catch it statically) (with-input-from-file "test/regexp-fail.rkt" (lambda () ...
#lang racket/base (require trivial/private/test-common (only-in typed/racket/base ann : -> String Listof List U Bytes)) TODO why ca n't I catch errors for ( ... ( List String ) ) ? WhydoI need # f ? (module+ test (test-compile-error #:require trivial/regexp trivial/define #:exn #rx"Type Checker" (ann...
baacf27aa5aa41a111fc524afa12d3e5d44de73dbf0462ea43233f051d92948b
smallmelon/sdzmmo
lib_send.erl
%%%----------------------------------- %%% @Module : lib_send @Author : xyao %%% @Email : @Created : 2010.05.05 @Description : %%%----------------------------------- -module(lib_send). -include("record.hrl"). -include("common.hrl"). -export([ send_one/2, send_to_sid/2, ...
null
https://raw.githubusercontent.com/smallmelon/sdzmmo/254ff430481de474527c0e96202c63fb0d2c29d2/src/lib/lib_send.erl
erlang
----------------------------------- @Module : lib_send @Email : ----------------------------------- 发送信息给指定socket玩家. 发送信息给指定玩家ID. Uid:玩家ID 发送信息到情景 Q:场景ID Q:帮派ID TeamId:组队ID Q:场景ID X,Y坐标 发送信息到世界 对列表中的所有socket进行广播
@Author : xyao @Created : 2010.05.05 @Description : -module(lib_send). -include("record.hrl"). -include("common.hrl"). -export([ send_one/2, send_to_sid/2, send_to_all/1, send_to_local_all/1, send_to_nick/2, send_to_uid/2, send_to_scene/...
0cf10a168d19ceb61407a3894ac308227dc49bc2934069cafe92df291de95512
yesodweb/wai
Buffer.hs
{-# LANGUAGE BangPatterns #-} module Network.Wai.Handler.Warp.Buffer ( createWriteBuffer , allocateBuffer , freeBuffer , toBuilderBuffer , bufferIO ) where import Data.IORef (IORef, readIORef) import qualified Data.Streaming.ByteString.Builder.Buffer as B (Buffer (..)) import Foreign.ForeignPtr import F...
null
https://raw.githubusercontent.com/yesodweb/wai/549be57fe0e088c895eeda0309accc8eb9503227/warp/Network/Wai/Handler/Warp/Buffer.hs
haskell
# LANGUAGE BangPatterns # -------------------------------------------------------------- | Allocate a buffer of the given size and wrap it in a 'WriteBuffer' containing that size and a finalizer. -------------------------------------------------------------- | Allocating a buffer with malloc(). | Releasing a buffer...
module Network.Wai.Handler.Warp.Buffer ( createWriteBuffer , allocateBuffer , freeBuffer , toBuilderBuffer , bufferIO ) where import Data.IORef (IORef, readIORef) import qualified Data.Streaming.ByteString.Builder.Buffer as B (Buffer (..)) import Foreign.ForeignPtr import Foreign.Marshal.Alloc (mallocBy...
1807dc2ea63a6d0a42f614dc987891662c4247431487ea28212d4110c61de15e
adventuring/tootsville.net
http-status-messages.lisp
;;;; -*- lisp -*- ;;; src / http - status - messages.lisp is part of ;;; Copyright © 2008 - 2017 Bruce - Robert Pocock ; © 2018 - 2021 The Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) . ;;; This program is Free Software : you can redistribute it and/or modif...
null
https://raw.githubusercontent.com/adventuring/tootsville.net/985c11a91dd1a21b77d7378362d86cf1c031b22c/src/http-status-messages.lisp
lisp
-*- lisp -*- © 2018 - 2021 The either version 3 of This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more det...
src / http - status - messages.lisp is part of Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) . This program is Free Software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License the License , or ( at your option ) any later ve...
7b05a0c8c91239ccf3fc94391597a8fb8dc4f38e3064b26a0e7ba41e2ccf1014
hellonico/origami-sources
test_seq.clj
(ns origami.test-seq (:require [origami.lazyseqs :as lazy] [clojure.test :refer [deftest is]])) (deftest zip-test (let [zip (lazy/zip-seq "resources-dev/photos.zip")] (is (not (nil? (first zip)))))) (deftest github-test (let [url "-fun/tree/master/resources/cat_photos" zip (lazy/github-seq ur...
null
https://raw.githubusercontent.com/hellonico/origami-sources/923db398f90521f7692e4c5655972b7b0d5a9c2f/test/origami/test_seq.clj
clojure
(def ws (lazy/dropbox-seq)) (->> ["猫"] (flickr-seq)
(ns origami.test-seq (:require [origami.lazyseqs :as lazy] [clojure.test :refer [deftest is]])) (deftest zip-test (let [zip (lazy/zip-seq "resources-dev/photos.zip")] (is (not (nil? (first zip)))))) (deftest github-test (let [url "-fun/tree/master/resources/cat_photos" zip (lazy/github-seq ur...
e58470e5d989490f669195580014a3bbf5820067f4c2119a2f3bc5418f76004a
morpheusgraphql/morpheus-graphql
Resolution.hs
{-# LANGUAGE DeriveLift #-} {-# LANGUAGE DeriveTraversable #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # # LANGUAGE NoImplicitPrelude # module Data.Mergeable.Internal.Resolution ( Indexed (..), indexed, fromListT, resolveWith, runResolutionT, ...
null
https://raw.githubusercontent.com/morpheusgraphql/morpheus-graphql/3ffec58dfb7a53cee018bc4a3fb5a7192c672acd/morpheus-graphql-core/src/Data/Mergeable/Internal/Resolution.hs
haskell
# LANGUAGE DeriveLift # # LANGUAGE DeriveTraversable #
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # # LANGUAGE NoImplicitPrelude # module Data.Mergeable.Internal.Resolution ( Indexed (..), indexed, fromListT, resolveWith, runResolutionT, ResolutionT, ) where import qualified Data.HashMap.Lazy as H...
2156c469e5d48061eef09f12bae7d725c79334567bd878e349809e2295aee1ef
vereis/jarlang
re.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2008 - 2017 . 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/vereis/jarlang/72105b79c1861aa6c4f51c3b50ba695338aafba4/src/erl/lib/stdlib/re.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 2008 - 2017 . 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(re). -export([grun/3,urun/3,ucompile/2,replace/3,replace/4,split/2,split/3]). -type mp() :: {re_pattern, _, ...
75817eb065078ee146ffdb61cc16fcbbb04c70517013b3ce3ef474d9716eaed9
lixiangqi/medic
debug.rkt
#lang racket (require medic/core) (medic "src5-medic.rkt") (debug "src5.rkt")
null
https://raw.githubusercontent.com/lixiangqi/medic/0920090d3c77d6873b8481841622a5f2d13a732c/demos/demo5/debug.rkt
racket
#lang racket (require medic/core) (medic "src5-medic.rkt") (debug "src5.rkt")
3f483bcae97ef4c071ddf2d5b746be2ad831b42780a0531c2d07258ff26f32b0
seantempesta/cljs-react-navigation
base.cljs
(ns cljs-react-navigation.base (:require [cljs.spec.alpha :as s :include-macros true] [goog.object :as gobj] [reagent.core :as r] [reagent.impl.component :as ric])) (defonce React (js/require "react")) (defonce ReactNavigation (js/require "react-navigation")) (defonce isValidEleme...
null
https://raw.githubusercontent.com/seantempesta/cljs-react-navigation/d8f6f998543608e930de8d565e7b48221ecfbe8a/src/cljs_react_navigation/base.cljs
clojure
Navigators Views React RouteConfigs DrawerNavigator DrawerNavigatorConfig Navigators
(ns cljs-react-navigation.base (:require [cljs.spec.alpha :as s :include-macros true] [goog.object :as gobj] [reagent.core :as r] [reagent.impl.component :as ric])) (defonce React (js/require "react")) (defonce ReactNavigation (js/require "react-navigation")) (defonce isValidEleme...
141a38074217ac5622463f1e26adfb0d0d9876d5e071e98c40e4e04a78285f13
jimpil/annotator-clj
core.clj
(ns PAnnotator.core #^{:author "Dimitrios Piliouras 2012 ()" :doc "PAnnotator's core namespace. Strings in this namespace know how to stem themselves (Porter's stemmer), allign themselves (Smith-Waterman) with other strings and also compare compute the edit-distance (Levenshtein) between the...
null
https://raw.githubusercontent.com/jimpil/annotator-clj/40390d46e9da83d1a4b4296c9f84263ce3afa501/src/PAnnotator/core.clj
clojure
get some basic syllable statistics (drugen :alt-trail "ine") (drugen :alt-lead "card") do echo $ TOKEN ; done do echo -e $ TOKEN ' \tO ' > > some-file.txt.tok ; done +1 cost for deletion +1 cost for insertion do not skip tha last character do not skip tha last character very quick already but maybe some memoizati...
(ns PAnnotator.core #^{:author "Dimitrios Piliouras 2012 ()" :doc "PAnnotator's core namespace. Strings in this namespace know how to stem themselves (Porter's stemmer), allign themselves (Smith-Waterman) with other strings and also compare compute the edit-distance (Levenshtein) between the...
609e7c1b363d52ffa93e8d3a43f2c681ca28fc4d8ad6cd04dd36a3b3b04c7def
berke/jsure
minefield.ml
(* Minefield *) module SS = Set.Make(String);; module SM = Map.Make(String);; type t = { mutable mf_words : int SM.t; } module L = Levenshtein.Levenshtein_string;; let create () = { mf_words = SM.empty };; let add_word mf u = mf.mf_words <- SM.add u 0 mf.mf_words;; let check_proximity mf u = if SM.mem u mf.mf...
null
https://raw.githubusercontent.com/berke/jsure/f7c32e21602cd8d8f18e90a608cfc59b1172be57/minefield.ml
ocaml
Minefield
module SS = Set.Make(String);; module SM = Map.Make(String);; type t = { mutable mf_words : int SM.t; } module L = Levenshtein.Levenshtein_string;; let create () = { mf_words = SM.empty };; let add_word mf u = mf.mf_words <- SM.add u 0 mf.mf_words;; let check_proximity mf u = if SM.mem u mf.mf_words then ...
2508052157a48b2a35eb4fe9527d7c987e2191a004a28a84584775ecfc0b4539
gonzojive/sbcl
arith.lisp
;;;; the VM definition of arithmetic VOPs for the x86 This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the ;;;; public domain. The software is in the p...
null
https://raw.githubusercontent.com/gonzojive/sbcl/3210d8ed721541d5bba85cbf51831238990e33f1/src/compiler/x86/arith.lisp
lisp
the VM definition of arithmetic VOPs for the x86 more information. public domain. The software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. unary operations binary fixnum operations is optimized away as an identity somewhere -C/SI...
This software is part of the SBCL system . See the README file for This software is derived from the CMU CL system , which was written at Carnegie Mellon University and released into the (in-package "SB!VM") (define-vop (fast-safe-arith-op) (:policy :fast-safe) (:effects) (:affected)) (define-vop (fix...
b43d31beb31b6b2f9896b8768968581cd32b3dbcf252347fdc11ac15c1bbcbd9
ssadler/piped
Compose.hs
-- | Pipe composition can be supply or demand driven, which refers to how the pipeline is initiated . Supply driven initiates the left side first . -- When a pipe terminates , one side must return a value . Unless the pipeline is run -- in resumable mode, the other sides may never "complete" in that they do ...
null
https://raw.githubusercontent.com/ssadler/piped/036c064d93f3d37f834c522a6e59c5baf44fdb6e/piped/src/Piped/Compose.hs
haskell
| Pipe composition can be supply or demand driven, which refers to how the pipeline is in resumable mode, the other sides may never "complete" in that they do not Right hand termination works by indicating that no more values are available. In a mode where either side can return a value, no special termina...
initiated . Supply driven initiates the left side first . When a pipe terminates , one side must return a value . Unless the pipeline is run return a value . If they allocate resources , MonadResource or similar should be used to handle cleanup ( see ' Piped . Extras.bracketPipe ' ) . execution end...
5ed733cec8b43e03709a289da92ef693b206a3a98fa18b0b58624d482818475a
mbuczko/revolt
task.clj
(ns revolt.task "A home namespace for built-in tasks along with initialization functions." (:require [io.aviso.ansi] [revolt.context :as context] [revolt.tasks.aot :as aot] [revolt.tasks.jar :as jar] [revolt.tasks.cljs :as cljs] [revolt.tasks.sass :as sas...
null
https://raw.githubusercontent.com/mbuczko/revolt/65ef8de68d7aa77d1ced40e7d669ebcbba8a340e/src/revolt/task.clj
clojure
this is a case where no context was given, and it should be created automatically. this is a case where context was given either directly along with input, eg. `(info {:version} app-ctx)` or task has partially defined input, like: (partial capsule {:version 0.0.2}) and has been composed...
(ns revolt.task "A home namespace for built-in tasks along with initialization functions." (:require [io.aviso.ansi] [revolt.context :as context] [revolt.tasks.aot :as aot] [revolt.tasks.jar :as jar] [revolt.tasks.cljs :as cljs] [revolt.tasks.sass :as sas...
56e0850a5f3cba0a044996ddb13a31045e76e828456c94468938dee34f0889e1
alanb2718/wallingford
always-dynamic-tests.rkt
#lang s-exp rosette (require rackunit rackunit/text-ui rosette/lib/roseunit) (require "../core/wallingford.rkt") (provide always-dynamic-tests) ;; Additional tests of always constraints -- dynamically re-assign something (define (assign-always-test) (test-case "test reassiging a variable using always (constrai...
null
https://raw.githubusercontent.com/alanb2718/wallingford/9dd436c29f737d210c5b87dc1b86b2924c0c5970/tests/always-dynamic-tests.rkt
racket
Additional tests of always constraints -- dynamically re-assign something so we should get x=y=4 at this point so we should get x=y=4 at this point the always constraint on the struct applies to the current contents of fld clear assertions, since they are in an unsatisfiable state at this point
#lang s-exp rosette (require rackunit rackunit/text-ui rosette/lib/roseunit) (require "../core/wallingford.rkt") (provide always-dynamic-tests) (define (assign-always-test) (test-case "test reassiging a variable using always (constraint should apply to new binding)" (define c (new thing%)) (define-symbol...
5cb4eba05a262532aa44008d45c3bc31367d4dd163c474d2d44725b558521491
0x0f0f0f/gobba
typecheck.ml
open Types open Errors let terr e f = traise ("expected a value of type: " ^ e ^ ", found a value of type: " ^ f ) let typeof e = match e with | EvtVect (t, a) -> TVect ((Array.length a), t) | EvtUnit -> TUnit | EvtInt _ -> TInt | EvtFloat _ -> TFloat | EvtComplex _ -> TComplex | EvtBool _ -> TBool | Ev...
null
https://raw.githubusercontent.com/0x0f0f0f/gobba/61092207438fb102e36245c46c27a711b8f357cb/lib/typecheck.ml
ocaml
* Get the lowest (most inclusive set) number type from a list of numbers * Accept a list of numbers and flatten out their kind on the numerical tower hierarchy Dynamic typechecking * Unpacking functions: extract a value or throw an err
open Types open Errors let terr e f = traise ("expected a value of type: " ^ e ^ ", found a value of type: " ^ f ) let typeof e = match e with | EvtVect (t, a) -> TVect ((Array.length a), t) | EvtUnit -> TUnit | EvtInt _ -> TInt | EvtFloat _ -> TFloat | EvtComplex _ -> TComplex | EvtBool _ -> TBool | Ev...
239e8cd98e02a626997a115302fd641e980d9a575a3bc6fe28de428a9f40d2a2
discljord/discljord
snowflakes.clj
(ns discljord.snowflakes "Contains utility functions to parse, deconstruct and create [snowflake ids](#snowflakes)." (:require [discljord.util :refer [parse-if-str]])) (def ^:const discord-epoch "The Discord epoch - the number of milliseconds that had passed since January 1, 1970, on January 1, 2015." 14200704...
null
https://raw.githubusercontent.com/discljord/discljord/2e321cee59d8a627dedc0c460c3266698e018b34/src/discljord/snowflakes.clj
clojure
(ns discljord.snowflakes "Contains utility functions to parse, deconstruct and create [snowflake ids](#snowflakes)." (:require [discljord.util :refer [parse-if-str]])) (def ^:const discord-epoch "The Discord epoch - the number of milliseconds that had passed since January 1, 1970, on January 1, 2015." 14200704...
0e68efbbbd2aba95b1fd5b8ed476b3690443d279f9cd71811908b946b65788c5
ghcjs/ghcjs-dom
WebGLContextEvent.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.WebGLContextEvent (js_newWebGLContextEvent, newWebGLContextEvent, js_getStatusM...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/WebGLContextEvent.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.WebGLContextEvent (js_newWebGLContextEvent, newWebGLContextEvent, js_getStatusMessage, getStatusMessage, WebGLContextEvent(..), gTypeWebGLContextEvent) where impor...
2aaa5331ebdb82e78acc95e0db55275293e6ccf12d288140b26b6407a8e8f9b8
sbcl/sbcl
unix.lisp
This file contains Unix support that SBCL needs to implement itself . It 's derived from unix-glibc2.lisp for CMU CL , which was derived from CMU CL unix.lisp 1.56 . But those ;;;; files aspired to be complete Unix interfaces exported to the end ;;;; user, while this file aims to be as simple as possible and ...
null
https://raw.githubusercontent.com/sbcl/sbcl/22398b178e11533aeeb38c3c1253a75d62cde103/src/code/unix.lisp
lisp
files aspired to be complete Unix interfaces exported to the end user, while this file aims to be as simple as possible and is not intended for the end user. transcriptions from Unix headers into Lisp. It appears that this was as unmaintainable in practice as you'd expect in theory, so I really really don't want...
This file contains Unix support that SBCL needs to implement itself . It 's derived from unix-glibc2.lisp for CMU CL , which was derived from CMU CL unix.lisp 1.56 . But those FIXME : The old CMU CL unix.lisp code was implemented as hand interface back to SBCL code be characterized by things like " 32 - b...
86232914be138002a51a940982257980a520458652a4d64ca43f0e36772da05e
liqula/react-hs
LambdaViews.hs
# OPTIONS_GHC -fno - warn - orphans # | The views for the TODO app module LambdaViews where import React.Flux import qualified Data.Set as Set import qualified Data.Text as T import qualified Data.List as List import LambdaAST import LambdaFBAnn import import LambdaStore import LambdaSVG -- | The controller view...
null
https://raw.githubusercontent.com/liqula/react-hs/204c96ee3514b5ddec65378d37872266b05e8954/react-hs-examples/lambda/src/LambdaViews.hs
haskell
| The controller view and also the top level of the LAMBDA app. This controller view registers with the store and will be re-rendered whenever the store changes.
# OPTIONS_GHC -fno - warn - orphans # | The views for the TODO app module LambdaViews where import React.Flux import qualified Data.Set as Set import qualified Data.Text as T import qualified Data.List as List import LambdaAST import LambdaFBAnn import import LambdaStore import LambdaSVG lambdaApp :: View '[] la...
4c19ac356a365e89f23244b9791aba994fc907e23a45c6d3c824781d63ebd9b9
Oblosys/proxima
Patterns.hs
UUAGC 0.9.10 ( ) module Patterns where -- Patterns.ag imports import UU.Scanner.Position(Pos) import CommonTypes (ConstructorIdent,Identifier) -- Pattern ----------------------------------------------------- visit 0 : synthesized attribute : copy : SELF alternatives :...
null
https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/uuagc/src-derived/Patterns.hs
haskell
Patterns.ag imports Pattern ----------------------------------------------------- Patterns ----------------------------------------------------
UUAGC 0.9.10 ( ) module Patterns where import UU.Scanner.Position(Pos) import CommonTypes (ConstructorIdent,Identifier) visit 0 : synthesized attribute : copy : SELF alternatives : alternative : child field : { Identifier } chi...
b2296dbc4debe7167613f8200a2632fa29b65e8b73cbf5ed59654daedb0b53a4
jtobin/declarative
Anneal.hs
# OPTIONS_GHC -fno - warn - type - defaults # # LANGUAGE RecordWildCards # -- | -- Module: Numeric.MCMC.Anneal Copyright : ( c ) 2015 License : MIT -- Maintainer : < > -- Stability: unstable Portability : ghc -- -- Transition operators can easily be tweaked to operate over an /annealed/ -- parameter space...
null
https://raw.githubusercontent.com/jtobin/declarative/60f4c19cc74dee3fffb284de2daee497b38541fb/lib/Numeric/MCMC/Anneal.hs
haskell
| Module: Numeric.MCMC.Anneal Stability: unstable Transition operators can easily be tweaked to operate over an /annealed/ parameter space, which can be useful when sampling from bumpy landscapes with isolated modes. This library exports a single 'anneal' function that allows one to run a /declarative/-compa...
# OPTIONS_GHC -fno - warn - type - defaults # # LANGUAGE RecordWildCards # Copyright : ( c ) 2015 License : MIT Maintainer : < > Portability : ghc > import Numeric . MCMC > anneal 0.70 ( metropolis 1 ) > anneal 0.05 ( metropolis 1 ) > anneal 0.05 ( metropolis 1 ) > anneal 0.70 ( metr...
cb433a3c700bb37cf374a35a3fa3ff37950c4f9e2f9f2cc7aec59276c46a4d4a
hsyl20/haskus-system
Size.hs
# LANGUAGE LambdaCase # -- | Sizes module Haskus.Arch.X86_64.ISA.Size ( Size(..) , sizeInBits , AddressSize(..) , SizedValue(..) , toSizedValue , fromSizedValue , OperandSize(..) , opSizeInBits , getSize , getSize64 , getOpSize64 ) where import Haskus.Format.Binary.Get import Hasku...
null
https://raw.githubusercontent.com/hsyl20/haskus-system/2f389c6ecae5b0180b464ddef51e36f6e567d690/haskus-system/src/lib/Haskus/Arch/X86_64/ISA/Size.hs
haskell
| Sizes | Size | Get a size in bits | Address size | Sized value | Operand size | Operand size in bits | Read a value in a Word64 | Read a value in a Word64
# LANGUAGE LambdaCase # module Haskus.Arch.X86_64.ISA.Size ( Size(..) , sizeInBits , AddressSize(..) , SizedValue(..) , toSizedValue , fromSizedValue , OperandSize(..) , opSizeInBits , getSize , getSize64 , getOpSize64 ) where import Haskus.Format.Binary.Get import Haskus.Format.Bi...
b019e36a23e9ef204c83851450207b6a50331cc417313b592f20387bf3d30332
Enecuum/Node
Interpreter.hs
module Enecuum.Core.ControlFlow.Interpreter where import Enecuum.Prelude import qualified Enecuum.Core.ControlFlow.Language as L import qualified Enecuum.Runtime as Rt interpretControlFlowF :: Rt.CoreRuntime -> L.ControlFlowF a -> IO a interpretControlFlowF _ (L.Delay i next) = do threadDelay i pure...
null
https://raw.githubusercontent.com/Enecuum/Node/3dfbc6a39c84bd45dd5f4b881e067044dde0153a/src/Enecuum/Core/ControlFlow/Interpreter.hs
haskell
module Enecuum.Core.ControlFlow.Interpreter where import Enecuum.Prelude import qualified Enecuum.Core.ControlFlow.Language as L import qualified Enecuum.Runtime as Rt interpretControlFlowF :: Rt.CoreRuntime -> L.ControlFlowF a -> IO a interpretControlFlowF _ (L.Delay i next) = do threadDelay i pure...
fdd61e1521370f493b1c3cd9aa64861332d5a178e97927f16d7263790b9abf3c
pkel/cpr
bk.ml
open Cpr_lib let incentive_schemes = [ `Block; `Constant ] module type Parameters = sig (** number of votes (= puzzle solutions) per block *) val k : int val incentive_scheme : [ `Block | `Constant ] end module Make (Parameters : Parameters) = struct open Parameters let key = Format.asprintf "bk-%i-%a" k...
null
https://raw.githubusercontent.com/pkel/cpr/92bebe4abf723a2ab875f6a1891df1f2fc1ce275/simulator/protocols/bk.ml
ocaml
* number of votes (= puzzle solutions) per block * better is bigger happens for genesis node fast path fast path TODO maybe use received_at?
open Cpr_lib let incentive_schemes = [ `Block; `Constant ] module type Parameters = sig val k : int val incentive_scheme : [ `Block | `Constant ] end module Make (Parameters : Parameters) = struct open Parameters let key = Format.asprintf "bk-%i-%a" k Options.pp incentive_scheme let description = Fo...
e82d445de228cf781574587fc291ee72e27c324875eba63282e38a680a5aaed6
mzp/coq-for-ipad
useunix.mli
(*************************************************************************) (* *) (* Objective Caml LablTk library *) (* *) ,...
null
https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/otherlibs/labltk/browser/useunix.mli
ocaml
*********************************************************************** Objective Caml LablTk library ...
, Kyoto University RIMS Copyright 1999 Institut National de Recherche en Informatique et en Automatique and Kyoto University . All rights reserved . This file is distributed under the terms of the GNU Library $ I d : useunix.mli 5094 2002 - 08 -...
9b566a4ac3c530583b311543c5418d2465fc774dca90519f34c08fd387fc68a9
linoscope/caml8
memory.ml
open Base open Ints type t = bytes let create () = Bytes.create 4096 let of_bytes b = b let size t = Bytes.length t let load t ~src ~dst_pos = Bytes.blito ~src ~dst:t ~dst_pos:(Uint16.to_int dst_pos) () let read_uint16 t ~pos = pos |> Uint16.to_int |> Caml.Bytes.get_int16_be t |> Uint16.of_int let read_uint8 t ~...
null
https://raw.githubusercontent.com/linoscope/caml8/03c2f6d788ea430457a0d65872d4d142094147ce/lib/memory.ml
ocaml
open Base open Ints type t = bytes let create () = Bytes.create 4096 let of_bytes b = b let size t = Bytes.length t let load t ~src ~dst_pos = Bytes.blito ~src ~dst:t ~dst_pos:(Uint16.to_int dst_pos) () let read_uint16 t ~pos = pos |> Uint16.to_int |> Caml.Bytes.get_int16_be t |> Uint16.of_int let read_uint8 t ~...
a89e910fb2733bffdd59a97605091c6085d42bd8d71c0bc8175b58ce521734a4
kwanghoon/polyrpc
Literal.hs
# LANGUAGE DeriveDataTypeable , DeriveGeneric # module Literal where import Type import Text.JSON.Generic import qualified Data.Aeson as DA import GHC.Generics import Data.Text.Prettyprint.Doc hiding (Pretty) import Data.Text.Prettyprint.Doc.Util data Literal = IntLit Int | StrLit String | BoolLit Bool |...
null
https://raw.githubusercontent.com/kwanghoon/polyrpc/49ba773bd3f1b22dce1ad64cda44683553d27c89/app/ast/Literal.hs
haskell
deriving (Show, Generic) -
# LANGUAGE DeriveDataTypeable , DeriveGeneric # module Literal where import Type import Text.JSON.Generic import qualified Data.Aeson as DA import GHC.Generics import Data.Text.Prettyprint.Doc hiding (Pretty) import Data.Text.Prettyprint.Doc.Util data Literal = IntLit Int | StrLit String | BoolLit Bool |...
f1038733962ebb143154b532275d501c04e1b7921d764bc1e5e8bca29554e56e
grin-compiler/ghc-wpc-sample-programs
AbsURIs.hs
-- ------------------------------------------------------------ | Module : AbsURIs Copyright : Copyright ( C ) 2005 License : MIT Maintainer : Maintainer : Stability : experimental Portability : portable AbsURIs - Conversion references into absolute URIs in...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/hxt-9.3.1.18/examples/arrows/absurls/AbsURIs.hs
haskell
------------------------------------------------------------ ------------------------------------------------------------ import all stuff for parsing, validating, and transforming XML ------------------------------------------------------------ | get the commandline arguments and evaluate them, return a key-val...
| Module : AbsURIs Copyright : Copyright ( C ) 2005 License : MIT Maintainer : Maintainer : Stability : experimental Portability : portable AbsURIs - Conversion references into absolute URIs in HTML pages The commandline interface Module : AbsUR...
249754e8ccbc53d9237520f4bc2ca99875d3efb7aa435468b1018b717d9c3939
idris-hackers/idris-java
CodegenJava.hs
# LANGUAGE PatternGuards # # LANGUAGE ViewPatterns # module IRTS.CodegenJava (codegenJava) where import Idris.Core.TT hiding (mkApp) import IRTS.CodegenCommon import IRTS.Java.ASTBuilding import IRTS.Java.JTypes import IRTS.Java.Mangling import IR...
null
https://raw.githubusercontent.com/idris-hackers/idris-java/c1ed11c4c3014ec3e8a4bfdd294826f1b6937d5c/src/IRTS/CodegenJava.hs
haskell
--------------------------------------------------------------------- Main function initialization of globals decls output file name headers --------------------------------------------------------------------- initialization of globals definitions headers Source dir output target flatIndent . prettyPrint) w...
# LANGUAGE PatternGuards # # LANGUAGE ViewPatterns # module IRTS.CodegenJava (codegenJava) where import Idris.Core.TT hiding (mkApp) import IRTS.CodegenCommon import IRTS.Java.ASTBuilding import IRTS.Java.JTypes import IRTS.Java.Mangling import IR...
b17f6a802296fa65f004d8cb92c232134f4929d4bae982bae7650c7d49abc533
avsm/mirage-duniverse
ast_convenience_405.ml
open Ast_405 (* This file is part of the ppx_tools package. It is released *) under the terms of the MIT license ( see LICENSE file ) . Copyright 2013 and LexiFi open Parsetree open Asttypes open Location open Ast_helper module Label = struct type t = Asttypes.arg_label ...
null
https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/ppx_tools_versioned/ast_convenience_405.ml
ocaml
This file is part of the ppx_tools package. It is released
open Ast_405 under the terms of the MIT license ( see LICENSE file ) . Copyright 2013 and LexiFi open Parsetree open Asttypes open Location open Ast_helper module Label = struct type t = Asttypes.arg_label type desc = Asttypes.arg_label = Nolabel | Labelled of ...
c0a7c9b8747c472bb407a8c2ba3a5f54e106acb0117d4a4e9c2fa7b87071b1bc
dalaing/little-languages
Pretty.hs
module Term.Pretty where import Control.Applicative ((<|>)) import Control.Lens (preview) import Data.Foldable (asum) import Data.Maybe (fromMaybe) import Text.PrettyPrint.ANSI.Leijen hiding ((<$>)) import Text.Parser.Expression (Assoc(..)) import Term -- | > > > prettyString text ( TmVar " x " ) -- "x" printVar ...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/unityped/lc/src/Term/Pretty.hs
haskell
| "x" | "(x) @ (y)" | "\ x -> (x) (y)" TODO come back here and deal with associativity and precedence properly probably worth dealing with prefix and postfix ops at the same time, for parity with the expression parser TODO tag App as high or low precedence so we know how to print it maybe just start with the...
module Term.Pretty where import Control.Applicative ((<|>)) import Control.Lens (preview) import Data.Foldable (asum) import Data.Maybe (fromMaybe) import Text.PrettyPrint.ANSI.Leijen hiding ((<$>)) import Text.Parser.Expression (Assoc(..)) import Term > > > prettyString text ( TmVar " x " ) printVar :: (n -> Doc...
c750a53bf025a1e2dd6eddc1f1796ca019e0f9e175df9d1735add037809f61a6
taylorwood/advent-of-code
23.clj
(ns advent-of-code.2017.23 (:refer-clojure :exclude [set]) (:require [advent-of-code.2017.18 :refer [parse-instruction inc-ip reg-val]] [clojure.java.io :as io] [clojure.string :as cs])) (def raw-input (slurp (io/resource "data_2017/23.txt"))) (def instructions (->> (cs/split-lines raw-inp...
null
https://raw.githubusercontent.com/taylorwood/advent-of-code/c6b08f4b618875a45c8083a04ae2c669626c43bf/src/advent_of_code/2017/23.clj
clojure
I did some printf tracing of the program and noticed the loops then went about looking at the instruction branches, then assumed an easy approach would be to reassemble the instructions... c = b c = b; while(true): f = false; d ! = b ; d++ ) { e ! = b ; e++ ) { if (d * e == b) { // checking fo...
(ns advent-of-code.2017.23 (:refer-clojure :exclude [set]) (:require [advent-of-code.2017.18 :refer [parse-instruction inc-ip reg-val]] [clojure.java.io :as io] [clojure.string :as cs])) (def raw-input (slurp (io/resource "data_2017/23.txt"))) (def instructions (->> (cs/split-lines raw-inp...
d3a3a5c061d3c390aea6f6899b7fcf952c1f77b404c321c00bfdb7f00cf857ae
kmonad/kmonad
DeviceSource.hs
{-# LANGUAGE DeriveAnyClass #-} | Module : KMonad . Keyboard . IO.Linux . DeviceSource Description : Load and acquire a linux /dev / input device Copyright : ( c ) , 2019 License : MIT Maintainer : Stability : experimental Portability : portable Module : KMonad.Keyboard.IO.Li...
null
https://raw.githubusercontent.com/kmonad/kmonad/3413f1be996142c8ef4f36e246776a6df7175979/src/KMonad/Keyboard/IO/Linux/DeviceSource.hs
haskell
# LANGUAGE DeriveAnyClass # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ $ffi ^ Descriptor to open keyboard file (like /dev/input/eventXX) ^ True to grab, False to ungrab ^ Return the exit code ---------...
| Module : KMonad . Keyboard . IO.Linux . DeviceSource Description : Load and acquire a linux /dev / input device Copyright : ( c ) , 2019 License : MIT Maintainer : Stability : experimental Portability : portable Module : KMonad.Keyboard.IO.Linux.DeviceSource Description : L...
654a8615e19209551bd3d8c4776c62b57eca4dcb6796f75405a02f77fd339683
bobzhang/fan
gtools.ml
let empty_entry ename _ = raise (Streamf.Error ("entry [" ^ ename ^ "] is empty")) (* let is_level_labelled n l = *) (* match (l:Gdefs.level) with *) (* | {lname=Some n1 ; _ } -> n = n1 *) (* | _ -> false *) try to decouple the node [ x ] into ( terminals , node , son ) triple , the length of...
null
https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/treeparser/gtools.ml
ocaml
let is_level_labelled n l = match (l:Gdefs.level) with | {lname=Some n1 ; _ } -> n = n1 | _ -> false (#Tokenf.terminal as tok) FIXME? * used in [Delete], the delete API may be deprecated in the future | (Self, Self) -> true used in [Insert] | `Keyword s -> [s ] (\* FIXME *\) tree processing ...
let empty_entry ename _ = raise (Streamf.Error ("entry [" ^ ename ^ "] is empty")) try to decouple the node [ x ] into ( terminals , node , son ) triple , the length of terminals should have at least length [ 2 ] , otherwise , it does not make sense { [ ] } try to decouple the no...
58ddb0b2609bce417ca7b68ca44bd03e466537b14e8a9ed451550d245e15b4f2
joelmccracken/reddup
Git.hs
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE DeriveAnyClass #-} module Git where import Data.Text (concat) import Turtle import Prelude hiding (FilePath, concat) import qualified Control.Foldl as Fold import GitParse gitStatus :: Shell GitStatus gitStatus = do let statusStream = inshell "git status --porcelain...
null
https://raw.githubusercontent.com/joelmccracken/reddup/1bce9371d79c410b30b91c10bf040777260777ad/src/Git.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE DeriveAnyClass #
module Git where import Data.Text (concat) import Turtle import Prelude hiding (FilePath, concat) import qualified Control.Foldl as Fold import GitParse gitStatus :: Shell GitStatus gitStatus = do let statusStream = inshell "git status --porcelain" Turtle.empty fmap parseGitStatusLine statusStream gitBranches ...
9949163db417d298f94866e319df15d3fb6115fe6e3a24e7545f3d2a9df80776
kapok-lang/kapok
kapok_trans_special_form.erl
%% special form -module(kapok_trans_special_form). -export([translate_attribute/4, translate_let/4, translate_dot_let/4, translate_let_args/2, translate_do/3, translate_case/5, translate_fn/3, translate_fn/4, translate_fn/5, translate_fn/6...
null
https://raw.githubusercontent.com/kapok-lang/kapok/4272f990fe495e595d2afe38605dbca560bbe072/lib/kapok/src/kapok_trans_special_form.erl
erlang
special form attribute let dot let Otherwise if there is a call of the pattern in the value part, it will is the variable name of the translated pattern. do case fn send receive translate receive try catch after block notice that case clauses are always empty Error
-module(kapok_trans_special_form). -export([translate_attribute/4, translate_let/4, translate_dot_let/4, translate_let_args/2, translate_do/3, translate_case/5, translate_fn/3, translate_fn/4, translate_fn/5, translate_fn/6, trans...
1ca3d0b56b3b2a3fa507c382242d4c45a34baa3310add3e7b95cac414fe14512
metabase/metabase
last_edit.clj
(ns metabase.models.revision.last-edit "A namespace to handle getting the last edited information about items that satisfy the revision system. The revision system is a 'reversion' system, built to easily revert to previous states and can compute on demand a changelog. The revision system works through events and...
null
https://raw.githubusercontent.com/metabase/metabase/2cd0bb399bb9c4d1ed2b8de0c5fd05cb499aa02b/src/metabase/models/revision/last_edit.clj
clojure
these are all maybes as sometimes revisions don't exist, or users might be missing the names, etc keys are "Card" and "Dashboard" (model in revision table) back to keywords
(ns metabase.models.revision.last-edit "A namespace to handle getting the last edited information about items that satisfy the revision system. The revision system is a 'reversion' system, built to easily revert to previous states and can compute on demand a changelog. The revision system works through events and...
3f0698848e5639a1d0f9bf6a801241a343ea27067b285935d8a84aebebb57e69
tsikov/clerk
clerk.lisp
(in-package #:cl-user) (defpackage #:clerk (:use #:cl) (:export #:*jobs* #:empty-jobs-queue #:job #:job-fn #:start #:stop #:calendar)) (in-package #:clerk) (defparameter *jobs* nil "All scheduled jobs") (defparameter *main-thread* nil) (defclass ...
null
https://raw.githubusercontent.com/tsikov/clerk/96eef1ec4ea6ae7144a4e13be8d5fdbc00ced29d/src/clerk.lisp
lisp
jobs in the queue.
(in-package #:cl-user) (defpackage #:clerk (:use #:cl) (:export #:*jobs* #:empty-jobs-queue #:job #:job-fn #:start #:stop #:calendar)) (in-package #:clerk) (defparameter *jobs* nil "All scheduled jobs") (defparameter *main-thread* nil) (defclass ...
8a821855bdd276e93b7e7d8657d75a74d7a2aa0f431181f82d2a1b291f2165c7
RBornat/jape
alert.mli
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either ver...
null
https://raw.githubusercontent.com/RBornat/jape/afe9f207e89e965636b43ef8fad38fd1f69737ae/distrib/camlengine/alert.mli
ocaml
this demoted to a thing which sets a comment line this just pops up a window
Copyright ( C ) 2003 - 19 This file is part of the proof engine , which is part of . is free software ; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation ; either ver...
fb353bc7d64029a4c1f70f895dd42f789851a05ea92b95e9659b645fb613b4b5
facebookarchive/pfff
token_helpers_css.ml
* * Copyright ( C ) 2011 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file licens...
null
https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_css/parsing/token_helpers_css.ml
ocaml
*************************************************************************** Token Helpers *************************************************************************** *************************************************************************** Visitors *****************************************************************...
* * Copyright ( C ) 2011 Facebook * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file licens...
87c3106d7fb8b36f1611c8146fdcf91f7eac796b80e729d34b214a2591d783ac
khasm-lang/khasmc
process.ml
open Args let rec normalise files = match files with | [] -> [] | x :: xs -> ( try (Filename.basename x |> Filename.chop_extension |> Batteries.String.capitalize) :: normalise xs with _ -> Batteries.String.capitalize x :: normalise xs) let compile names asts args = print_end...
null
https://raw.githubusercontent.com/khasm-lang/khasmc/e190cad60ba66e701ad0ae9d288ddb9a55e63a12/lib/process.ml
ocaml
typcheck stage
open Args let rec normalise files = match files with | [] -> [] | x :: xs -> ( try (Filename.basename x |> Filename.chop_extension |> Batteries.String.capitalize) :: normalise xs with _ -> Batteries.String.capitalize x :: normalise xs) let compile names asts args = print_end...
50b8e03ea2e5747860f1b5d61627b6c7555adfea8af2d9019f1c2a24bdf39770
xvw/muhokama
category_services.ml
open Lib_common open Lib_service open Util open Middlewares let topics_count_by_categories = Service.failable_with ~:Endpoints.Category.list [ user_authenticated ] ~attached:user_required (fun user request -> let open Lwt_util in let+? count_topics_by_categories = Dream.sql reques...
null
https://raw.githubusercontent.com/xvw/muhokama/dcfa488169677ff7f1a3ed71182524aeb0b13c53/app/services/category_services.ml
ocaml
open Lib_common open Lib_service open Util open Middlewares let topics_count_by_categories = Service.failable_with ~:Endpoints.Category.list [ user_authenticated ] ~attached:user_required (fun user request -> let open Lwt_util in let+? count_topics_by_categories = Dream.sql reques...
ec7b8ffc6d572b1244b8696c394678599c8f8139809d1ef8c431aeafec138a38
clojure-interop/google-cloud-clients
RpcBatch$Callback.clj
(ns com.google.cloud.storage.spi.v1.RpcBatch$Callback "An interface for batch callbacks." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.storage.spi.v1 RpcBatch$Callback])) (defn on-success "This method will be called upon success of the batch operation. response - `T`" ([^Rpc...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.storage/src/com/google/cloud/storage/spi/v1/RpcBatch%24Callback.clj
clojure
(ns com.google.cloud.storage.spi.v1.RpcBatch$Callback "An interface for batch callbacks." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.storage.spi.v1 RpcBatch$Callback])) (defn on-success "This method will be called upon success of the batch operation. response - `T`" ([^Rpc...
b2d3814882fedadcef452a7480acb6b5920d52436e1d6755e6f6d770302557c6
ocaml-community/ISO8601.ml
ISO8601.mli
* { 2 ISO 8601 and RFC 3339 parsing and printing } * Version 0.2.5 module Permissive : sig (** {2 Date parsing} [date], [time] and [datetime] parse a [string] and return the corresponding timestamp (as [float]). Times are {b always} converted to UTC representation. For each of ...
null
https://raw.githubusercontent.com/ocaml-community/ISO8601.ml/4c6820de3098a5e0b00503b899456297706dc0a5/src/ISO8601.mli
ocaml
* {2 Date parsing} [date], [time] and [datetime] parse a [string] and return the corresponding timestamp (as [float]). Times are {b always} converted to UTC representation. For each of these functions, a [_lex] suffixed function read from a [Lexing.lexbuf] instead of a [string...
* { 2 ISO 8601 and RFC 3339 parsing and printing } * Version 0.2.5 module Permissive : sig val date_lex : Lexing.lexbuf -> float val date : string -> float val time_tz_lex : Lexing.lexbuf -> (float * float option) val time_lex : Lexing.lexbuf -> float val time_tz : string -> (float * float opti...
3860dd648bc89d4a79a5f306cd38344cc1ca7a92fb286719469ce58fcc591d71
CryptoKami/cryptokami-core
CLI.hs
# LANGUAGE ApplicativeDo # {-# LANGUAGE CPP #-} # LANGUAGE NamedFieldPuns # -- following Pos.Util.UserSecret #if !defined(mingw32_HOST_OS) #define POSIX #endif -- | Command line interface for specifying the network config module Pos.Network.CLI ( NetworkConfigOpts(..) , NetworkConf...
null
https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/infra/Pos/Network/CLI.hs
haskell
# LANGUAGE CPP # following Pos.Util.UserSecret | Command line interface for specifying the network config * Exported primilary for testing -------------------------------------------------------------------------- Command line arguments --------------------------------------------------------------------...
# LANGUAGE ApplicativeDo # # LANGUAGE NamedFieldPuns # #if !defined(mingw32_HOST_OS) #define POSIX #endif module Pos.Network.CLI ( NetworkConfigOpts(..) , NetworkConfigException(..) , networkConfigOption , externalNetworkAddressOption , listenNetworkAddressOption ,...
2a22240f2f25d544374da88ae421316c28f2d8b3fc7460e30774b7c55ce29cc6
waymonad/waymonad
Output.hs
waymonad A wayland compositor in the spirit of xmonad Copyright ( C ) 2017 This library is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your op...
null
https://raw.githubusercontent.com/waymonad/waymonad/18ab493710dd54c330fb4d122ed35bc3a59585df/src/Waymonad/Output.hs
haskell
# LANGUAGE OverloadedStrings # TODO: I think wlroots made this simpler
waymonad A wayland compositor in the spirit of xmonad Copyright ( C ) 2017 This library is free software ; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2.1 of the License , or ( at your op...
60a5b05b78f201ee3ee1b6d0d0e1e2cd1fbf79f1d9241a862f590973422ae6e7
termite-analyser/termite
algo1.mli
* First ( non - terminating ) algorithm First (non-terminating) algorithm *) open Smt.ZZ (** Exception raised when the algorithm makes too much iterations *) exception Timeout * [ algo1 block_dict invariant tau timeout verbose ] returns the linear component [ l ] of a weak ranking function , ...
null
https://raw.githubusercontent.com/termite-analyser/termite/285d92215a28fcce55614f6d04b44886f253a894/src/algo1.mli
ocaml
* Exception raised when the algorithm makes too much iterations
* First ( non - terminating ) algorithm First (non-terminating) algorithm *) open Smt.ZZ exception Timeout * [ algo1 block_dict invariant tau timeout verbose ] returns the linear component [ l ] of a weak ranking function , such that [ pi(l ) ] is maximal . - [ block_dict ] and [ var_...
16f12df30a24b9da9f824fff9b2ca7d45197a27a33ec776591166928c665ddd6
digitallyinduced/ihp
ViewErrorMessages.hs
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module IHP.ViewErrorMessages where instance TypeError ( Text " Can not ' Show ' functions . " : $ $ : Text " Perhaps there is a missing argument ? " ) = > Show ( a - > b ) where -- showsPrec = error "unreachable"
null
https://raw.githubusercontent.com/digitallyinduced/ihp/62ca014a3d986e35da0fb05a4b1e84e5831e87cf/IHP/ViewErrorMessages.hs
haskell
showsPrec = error "unreachable"
# LANGUAGE DataKinds # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module IHP.ViewErrorMessages where instance TypeError ( Text " Can not ' Show ' functions . " : $ $ : Text " Perhaps there is a missing argument ? " ) = > Show ( a - > b ) where
0099162dce1c5e103221b605f728e2ac0f0c8c4986c4f367cb32526001a2d477
objectionary/try-phi
Setup.hs
# LANGUAGE CPP # # OPTIONS_GHC -Wall # module Main (main) where #ifndef MIN_VERSION_cabal_doctest #define MIN_VERSION_cabal_doctest(x,y,z) 0 #endif #if MIN_VERSION_cabal_doctest(1,0,0) import Distribution.Extra.Doctest ( defaultMainWithDoctests ) main :: IO () main = defaultMainWithDoctests "doctests" #else #i...
null
https://raw.githubusercontent.com/objectionary/try-phi/9eb9879c46decc4eb1e6f34beaa6a2736224b649/back/language-utils/Setup.hs
haskell
If the macro is defined, we have new cabal-install, but for some reason we don't have cabal-doctest in package-db Probably we are running cabal sdist, when otherwise using new-build workflow
# LANGUAGE CPP # # OPTIONS_GHC -Wall # module Main (main) where #ifndef MIN_VERSION_cabal_doctest #define MIN_VERSION_cabal_doctest(x,y,z) 0 #endif #if MIN_VERSION_cabal_doctest(1,0,0) import Distribution.Extra.Doctest ( defaultMainWithDoctests ) main :: IO () main = defaultMainWithDoctests "doctests" #else #i...
ea4bc5650b4345da585f5f8bbc447787783f4249dd9e218977257751549d9196
softwarelanguageslab/maf
R5RS_WeiChenRompf2019_the-little-schemer_ch2-1.scm
; Changes: * removed : 2 * added : 0 * swaps : 0 ; * negated predicates: 0 ; * swapped branches: 0 ; * calls to id fun: 0 (letrec ((atom? (lambda (x) (if (not (pair? x)) (not (null? x)) #f))) (lat? (lambda (l) (if (null? l) #t (if...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_WeiChenRompf2019_the-little-schemer_ch2-1.scm
scheme
Changes: * negated predicates: 0 * swapped branches: 0 * calls to id fun: 0
* removed : 2 * added : 0 * swaps : 0 (letrec ((atom? (lambda (x) (if (not (pair? x)) (not (null? x)) #f))) (lat? (lambda (l) (if (null? l) #t (if (atom? (car l)) (lat? (cdr l)) #f))))) (lat? (__toplevel_cons 'Ja...
3a7283b6134fef65f7e4bd3342c2f62992d3198fbd22595efc7651231ef0b135
threatgrid/ctim
target_records.cljc
(ns ctim.examples.target-records (:require [ctim.schemas.common :as c])) (def target-record-maximal {:id "-record/target-record-7d3e0f0c-6ee7-4578-8e1a-f45a750bb37b" :type "target-record" :schema_version c/ctim-schema-version :revision 1 :external_ids ...
null
https://raw.githubusercontent.com/threatgrid/ctim/2ecae70682e69495cc3a12fd58a474d4ea57ae9c/src/ctim/examples/target_records.cljc
clojure
(ns ctim.examples.target-records (:require [ctim.schemas.common :as c])) (def target-record-maximal {:id "-record/target-record-7d3e0f0c-6ee7-4578-8e1a-f45a750bb37b" :type "target-record" :schema_version c/ctim-schema-version :revision 1 :external_ids ...
040b7fcec075b32f28725f7451c1f8a08f9a665068e8ed81a51ed080c2ca0fd9
tekul/jose-jwt
JwkSpec.hs
# LANGUAGE OverloadedStrings , CPP # module Tests.JwkSpec where import Test.Hspec import Test.HUnit hiding (Test) import Data.Aeson #if MIN_VERSION_aeson(2,0,0) import qualified Data.Aeson.KeyMap as KM #else import qualified Data.HashMap.Strict as H #endif import qualified Data.ByteString.Char8 as B import Data.Word...
null
https://raw.githubusercontent.com/tekul/jose-jwt/342cc23c75ae429049821c7198d92aa8c4364d96/tests/Tests/JwkSpec.hs
haskell
Only the RSA Private key
# LANGUAGE OverloadedStrings , CPP # module Tests.JwkSpec where import Test.Hspec import Test.HUnit hiding (Test) import Data.Aeson #if MIN_VERSION_aeson(2,0,0) import qualified Data.Aeson.KeyMap as KM #else import qualified Data.HashMap.Strict as H #endif import qualified Data.ByteString.Char8 as B import Data.Word...
fbbc495d200e2f9ee26b76a2ba3ac419f2652014996374f4515399449020e6a5
ruanpienaar/goanna
goanna_node_tests.erl
-module(goanna_node_tests). -include_lib("eunit/include/eunit.hrl"). -behaviour(goanna_forward_callback_mod). -export([ forward_init/1, forward/2 ]). -include_lib("goanna.hrl"). -spec forward_init(atom()) -> {ok, pid() | atom()} | {error, term()}. forward_init(_ChildId) -> {ok, self()}. -spec forward(_...
null
https://raw.githubusercontent.com/ruanpienaar/goanna/52d75566fd6f9760fbdebe53b2ca3c82fdb44e01/test/goanna_node_tests.erl
erlang
Setup ?debugFmt("----------> SELF SETUP 1 <----------- ~p\n", [self()]), Cleanup Tests Mocks Mocks done in tests Scenario 1 - Forward module is not compatible Scenario 2 - Forward module forward_init crashed Scenario 1 - Forward module is not compatible Scenario 2 - Forward module forward_init crashed
-module(goanna_node_tests). -include_lib("eunit/include/eunit.hrl"). -behaviour(goanna_forward_callback_mod). -export([ forward_init/1, forward/2 ]). -include_lib("goanna.hrl"). -spec forward_init(atom()) -> {ok, pid() | atom()} | {error, term()}. forward_init(_ChildId) -> {ok, self()}. -spec forward(_...
25d65a6941e64a50a7d95369825e1bb924a41441f8ce727485992758448e6a9b
dergraf/epmdpxy
epmdpxy_session_sup.erl
-module(epmdpxy_session_sup). -behaviour(supervisor). %% API -export([start_link/0, start_session/2, connection_created/3, connection_deleted/3, status/0]). %% Supervisor callbacks -export([init/1]). -define(CHILD(Id, Mod, Type, Args), {Id, {Mod, start_link, Args}, ...
null
https://raw.githubusercontent.com/dergraf/epmdpxy/646506ba2117cb5ac81b9d37c2fe5cb7f042b043/src/epmdpxy_session_sup.erl
erlang
API Supervisor callbacks =================================================================== API functions =================================================================== -------------------------------------------------------------------- @doc Starts the supervisor @end -------------------------------------...
-module(epmdpxy_session_sup). -behaviour(supervisor). -export([start_link/0, start_session/2, connection_created/3, connection_deleted/3, status/0]). -export([init/1]). -define(CHILD(Id, Mod, Type, Args), {Id, {Mod, start_link, Args}, temporar...
e627ffe44526548d8844f7b53d6cd4581f559e04e89162946efeb1b37b757b33
ocaml-multicore/tezos
test_baking.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > Copyright ( c...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_protocol/test/test_baking.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > Copyright ( c ) 2020 Metastate AG < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " ,...