_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
9dca08205bd9c12be3ce2ead7851a0c1fa6a93ff00d84d1a9c17d3ef7659084a
schell/ixshader
Swizzle.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE AllowAmbiguousTypes # {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # {-# LANGUAGE LambdaCase #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds ...
null
https://raw.githubusercontent.com/schell/ixshader/66e5302fa24bbdc7c948a79ee2422cae688b982f/src/Graphics/IxShader/Swizzle.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE RankNTypes # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeInType # # LANGUAGE TypeOperators # # OPTIONS_GHC -fprint-explicit-kinds #
# LANGUAGE AllowAmbiguousTypes # # LANGUAGE FlexibleInstances # # LANGUAGE GADTs # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # # LANGUAGE RebindableSyntax # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances ...
e4f0a5dfb888558b4a86b49660113f1824dc4ba32e7d196f6e3ed41651793f0c
martijnbastiaan/sprockell
DemoRandomOrder.hs
import Sprockell.System {- This program demonstrates how the ordering of access to the shared memory can vary. All the sprockells try to write their own letter to the screen at the same time. They will all be succeed, but the order in which this happens is undefined. -} loopCount = 10 prog :: [Instructi...
null
https://raw.githubusercontent.com/martijnbastiaan/sprockell/503c91b85f2ff1a6d3293a6691ea9799a7693bf2/src/DemoRandomOrder.hs
haskell
This program demonstrates how the ordering of access to the shared memory can vary. All the sprockells try to write their own letter to the screen at the same time. They will all be succeed, but the order in which this happens is undefined. sprockell id as ascii character (uppercase) (lowercase) write...
import Sprockell.System loopCount = 10 prog :: [Instruction] prog = [ Const (ord 'A') RegA , Const (ord 'a' - ord 'A') RegE , Const loopCount RegD , Const 1 RegE , Compute Sub RegD RegE RegD , Branch RegD (Rel (-3)) , EndProg ] main = run ...
141dff4bc723682ca12466ceb404db376de9cad2622f6b9977a0c3679c04d35d
openworkload/swm-core
wm_session.erl
-module(wm_session). -behaviour(gen_server). -export([start_link/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -export([handle_received_call/1, handle_received_cast/1]). -include("../lib/wm_log.hrl"). -record(mstate, {}). %% =======================================...
null
https://raw.githubusercontent.com/openworkload/swm-core/3938bff619452a51cb2340db56ee6beb634e9314/src/net/wm_session.erl
erlang
============================================================================ API ============================================================================ ============================================================================ Callbacks =====================================================================...
-module(wm_session). -behaviour(gen_server). -export([start_link/1]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -export([handle_received_call/1, handle_received_cast/1]). -include("../lib/wm_log.hrl"). -record(mstate, {}). -spec start_link([term()]) -> {ok, pid()}...
b8261b76a70bdfe40d5a1f8d21ee4122b0eecad37a7f858003c8f0839c9df194
serokell/qtah
QPen.hs
This file is part of Qtah . -- Copyright 2015 - 2018 The Qtah Authors . -- -- This program is free software: you can redistribute it and/or modify -- it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or -- (at your option) ...
null
https://raw.githubusercontent.com/serokell/qtah/abb4932248c82dc5c662a20d8f177acbc7cfa722/qtah-generator/src/Graphics/UI/Qtah/Generator/Interface/Gui/QPen.hs
haskell
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER...
This file is part of Qtah . Copyright 2015 - 2018 The Qtah Authors . the Free Software Foundation , either version 3 of the License , or GNU Lesser General Public License for more details . You should have received a copy of the GNU Lesser General Public License module Graphics.UI.Qtah.Generator.Interface.Gu...
f421067dbab23bdf18f869ef8f3ac5b0add58c3623d6fa2f203a04f4f79497d3
wdebeaum/step
employee.lisp
;;;; ;;;; W::employee ;;;; (define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::employee (SENSES ((meta-data :origin calo :entry-date 20031230 :change-date nil :wn ("employee%1:18:00") :comments html-purchasing-corpus) (LF-PARENT ONT::employee) ;professional) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/employee.lisp
lisp
W::employee professional)
(define-words :pos W::n :templ COUNT-PRED-TEMPL :words ( (W::employee (SENSES ((meta-data :origin calo :entry-date 20031230 :change-date nil :wn ("employee%1:18:00") :comments html-purchasing-corpus) ) ) ) ))
aa4909c533db6132db03b32e7db5801b320d4160a2660b9f7840cc5c16a43a7e
wdebeaum/DeepSemLex
stuck.lisp
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL :words ( (w::stuck (SENSES ((meta-data :origin adjective-reorganization :entry-date 20170403 :change-date nil :comments nil :wn nil :comlex nil) (lf-parent ont::not-free-val) ) ) )))
null
https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/stuck.lisp
lisp
(define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL :words ( (w::stuck (SENSES ((meta-data :origin adjective-reorganization :entry-date 20170403 :change-date nil :comments nil :wn nil :comlex nil) (lf-parent ont::not-free-val) ) ) )))
94b5c68d0997db31f9784033bf123cb7285784e468d5aaa97096edf6490ecd88
vikram/lisplibraries
color.lisp
Copyright ( c ) 2007 , All Rights Reserved ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; ;;; * Redistributions of source code must retain the above copyright ;;; notice, this list of conditions...
null
https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/vecto-1.1/color.lisp
lisp
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form ...
Copyright ( c ) 2007 , All Rights Reserved DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , $ I d : color.lisp , v 1.3 2007/09/20 17:42:03 xach Exp $ (in-package #:vecto) (defclass color () ()) (defclass rgba-color (color...
cba0a73462a25cb74a1f649f0f368fa7a02fc09e750be43794cb77fca6d9ab71
mbutterick/aoc-racket
12.rkt
#lang br (require racket/file sugar rackunit racket/set racket/bool) (define links (for/set ([line (file->lines "12.rktd")]) (list->set (string-split line "-")))) (define (is-downcase? loc) (equal? (string-downcase loc) loc)) (define (paths-from last-loc links [small-caves (set)]) (match last-loc ...
null
https://raw.githubusercontent.com/mbutterick/aoc-racket/af8752d29ecf8642dfc93bad7bed2ef2f9f62fd8/2021/12.rkt
racket
#lang br (require racket/file sugar rackunit racket/set racket/bool) (define links (for/set ([line (file->lines "12.rktd")]) (list->set (string-split line "-")))) (define (is-downcase? loc) (equal? (string-downcase loc) loc)) (define (paths-from last-loc links [small-caves (set)]) (match last-loc ...
d93711a6ab3fd20f600fcf7db3aecd9af6417eed74a7bc3a8b3ec8682fc8dac9
karimarttila/clojure
http.clj
(ns worldstat.backend.routes.http (:require [reitit.ring :as ring] [reitit.coercion.malli] [reitit.swagger :as swagger] [reitit.ring.coercion :as coercion] [reitit.ring.middleware.muuntaja :as muuntaja] [reitit.ring.middleware.exception :as exception] [reitit.ring.middleware.multipart :as ...
null
https://raw.githubusercontent.com/karimarttila/clojure/ee1261b9a8e6be92cb47aeb325f82a278f2c1ed3/statistics/worldstat/src/clj/worldstat/backend/routes/http.clj
clojure
enable spec validation for route data Use this to debug middleware handling: pretty exceptions malli default content negotiation swagger feature query-params & form-params content-negotiation encoding response body exception handling decoding request body coercing response bodys coercing request parameters...
(ns worldstat.backend.routes.http (:require [reitit.ring :as ring] [reitit.coercion.malli] [reitit.swagger :as swagger] [reitit.ring.coercion :as coercion] [reitit.ring.middleware.muuntaja :as muuntaja] [reitit.ring.middleware.exception :as exception] [reitit.ring.middleware.multipart :as ...
74f79c4570a1bc4598ace03b13643e14ba6821c6f353f244f2e13a70861db629
btmura/b1
MovingAverageLines.hs
module B1.Program.Chart.MovingAverageLines ( getVboSpecs ) where import Graphics.Rendering.OpenGL import B1.Data.Technicals.MovingAverage import B1.Data.Technicals.StockData import B1.Graphics.Rendering.OpenGL.Box import B1.Program.Chart.Colors import B1.Program.Chart.GraphUtils import B1.Program.Chart.Vbo get...
null
https://raw.githubusercontent.com/btmura/b1/9cf0514ba1e03e9f4da05be9231acde07b199864/src/B1/Program/Chart/MovingAverageLines.hs
haskell
module B1.Program.Chart.MovingAverageLines ( getVboSpecs ) where import Graphics.Rendering.OpenGL import B1.Data.Technicals.MovingAverage import B1.Data.Technicals.StockData import B1.Graphics.Rendering.OpenGL.Box import B1.Program.Chart.Colors import B1.Program.Chart.GraphUtils import B1.Program.Chart.Vbo get...
f767346846145fdf0ba66861059c76084f8958d38dbf662589cd1b9416527440
AbstractMachinesLab/caramel
gadt.ml
type _ term = | Int : int -> int term | Pair : 'a term * 'b term -> ('a * 'b) term | Fst : ('a * 'b) term -> 'a term | Snd : ('a * 'b) term -> 'b term let rec eval : type a . a term -> a = function | Int n -> n | Pair (a, b) -> eval a, eval b | Fst p -> fst (eval p) | Snd p -> snd (eval p)
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/ocaml-lsp-server/vendor/merlin/tests/test-dirs/type-enclosing/types/gadt.ml
ocaml
type _ term = | Int : int -> int term | Pair : 'a term * 'b term -> ('a * 'b) term | Fst : ('a * 'b) term -> 'a term | Snd : ('a * 'b) term -> 'b term let rec eval : type a . a term -> a = function | Int n -> n | Pair (a, b) -> eval a, eval b | Fst p -> fst (eval p) | Snd p -> snd (eval p)
fb7b4540720d74db6731cf4dd394bedffa886b8558f75ae58e186aa792ddfea8
lambdaisland/kaocha-cljs2
cljs2.clj
(ns kaocha.cljs2)
null
https://raw.githubusercontent.com/lambdaisland/kaocha-cljs2/cc9c12c6472fb411445827a399479762906ae4b4/src/kaocha/cljs2.clj
clojure
(ns kaocha.cljs2)
3e40f30ee0041ab23bb31ddb58d662018a129714b1a563da0587dc26cc1de156
gelisam/klister
Primitives.hs
# LANGUAGE BlockArguments # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # {-# OPTIONS -Wno-name-shadowing #-} module Expander.Primitives ( -- * Declaration primitives define , dataty...
null
https://raw.githubusercontent.com/gelisam/klister/795393ce4f8c17489b8ca4f855b462db409c5514/src/Expander/Primitives.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # # OPTIONS -Wno-name-shadowing # * Declaration primitives * Expression primitives * Pattern primitives * Module primitives * Anywhere primitives * Primitive values * Helpers -------------------------- Declaration primitives -- -------------------------- 'sc...
# LANGUAGE BlockArguments # # LANGUAGE FlexibleContexts # # LANGUAGE LambdaCase # # LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # module Expander.Primitives define , datatype , defineMacros , example , run , group , meta , app , integerLiteral , stringLiteral , bindMacro , consListS...
500dd324259112d0d0c535507736c35478b67d43edae0f0b93c3606f511d67c5
RNCryptor/rncryptor-hs
StreamingDecrypter.hs
{-# LANGUAGE OverloadedStrings #-} module Main where import Crypto.RNCryptor.V3.Decrypt import qualified System.IO.Streams as S import System.Environment import qualified Data.ByteString.Char8 as B main :: IO () main = do args <- getArgs case args of key:_ -> decryptStream (B.pack key) S.stdin S.stdout _ ...
null
https://raw.githubusercontent.com/RNCryptor/rncryptor-hs/2c4fdb41646eefc1675482f2564c780a548b655c/example/StreamingDecrypter.hs
haskell
# LANGUAGE OverloadedStrings #
module Main where import Crypto.RNCryptor.V3.Decrypt import qualified System.IO.Streams as S import System.Environment import qualified Data.ByteString.Char8 as B main :: IO () main = do args <- getArgs case args of key:_ -> decryptStream (B.pack key) S.stdin S.stdout _ -> putStrLn "usage: rncryptor-decry...
86831282ddcfb216ea05585153fd0888ca99ef704a793fc30d975b3e42c1e254
dryewo/cyrus
utils.clj
(ns {{namespace}}.utils) (defn implementation-version [] (or ;; When running in a REPL (System/getProperty "{{name}}.version") ;; When running as `java -jar ...` (-> (eval '{{package}}.core) .getPackage .getImplementationVersion)))
null
https://raw.githubusercontent.com/dryewo/cyrus/880c842e0baa11887854ec3d912c044a2a500449/resources/leiningen/new/cyrus/src/_namespace_/utils.clj
clojure
When running in a REPL When running as `java -jar ...`
(ns {{namespace}}.utils) (defn implementation-version [] (or (System/getProperty "{{name}}.version") (-> (eval '{{package}}.core) .getPackage .getImplementationVersion)))
359d80df10fe108e713c7d322f2a054e2736de5913117401dabd397e1695dd93
raml-org/api-modeling-framework
runner.cljs
(ns api-modeling-framework.runner (:require [doo.runner :refer-macros [doo-tests]] [api-modeling-framework.tck] [api-modeling-framework.integration-test] [api-modeling-framework.utils-test] [api-modeling-framework.parser.syntax.yaml-test] [api-modeling-frame...
null
https://raw.githubusercontent.com/raml-org/api-modeling-framework/34bb3b6c3e3f91b775e27f8e389e04eb2c36beb7/test/api_modeling_framework/runner.cljs
clojure
(ns api-modeling-framework.runner (:require [doo.runner :refer-macros [doo-tests]] [api-modeling-framework.tck] [api-modeling-framework.integration-test] [api-modeling-framework.utils-test] [api-modeling-framework.parser.syntax.yaml-test] [api-modeling-frame...
63ad2ee3301d26f7c6d87cffe27538985e35a576a27ad06005523cae314fce00
ftomassetti/civs
project.clj
(defproject civs "0.2.4-SNAPSHOT" :description "A simulator of civilizations evolution" :url "" :license {:name "Apache License v 2.0" :url "/"} :dependencies [ [org.clojure/clojure "1.6.0"] [com.github.lands/lands-java-lib "0.3-SNAPSHOT"] [org.c...
null
https://raw.githubusercontent.com/ftomassetti/civs/dc76bfff4241f67d4bc1081de3947a725ea75c39/project.clj
clojure
(defproject civs "0.2.4-SNAPSHOT" :description "A simulator of civilizations evolution" :url "" :license {:name "Apache License v 2.0" :url "/"} :dependencies [ [org.clojure/clojure "1.6.0"] [com.github.lands/lands-java-lib "0.3-SNAPSHOT"] [org.c...
7ba6f98292c23588f648baedd4f318ade8b78475bbdfa04ec437fdf2346c3aba
chetmurthy/ensemble
bypassr.mli
(**************************************************************) (* BYPASS: Optimized bypass router *) Author : , 3/97 (**************************************************************) val f : unit -> (Trans.rank -> Trans.seqno -> Iovecl.t -> unit) Route.t
null
https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/route/bypassr.mli
ocaml
************************************************************ BYPASS: Optimized bypass router ************************************************************
Author : , 3/97 val f : unit -> (Trans.rank -> Trans.seqno -> Iovecl.t -> unit) Route.t
7f207aeeb8a76c4a5613a5376a00892dc473c17cb9e4e2df1cb13aa21e17b925
aeternity/mnesia_rocksdb
mnesia_rocksdb_app.erl
-*- mode : erlang ; erlang - indent - level : 4 ; indent - tabs - mode : nil -*- %%---------------------------------------------------------------- Copyright ( c ) 2013 - 2016 Klarna AB %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in...
null
https://raw.githubusercontent.com/aeternity/mnesia_rocksdb/b0bf4b6b9c68b35e37df0fb56a8b5c6417d20e54/src/mnesia_rocksdb_app.erl
erlang
---------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissions an...
-*- mode : erlang ; erlang - indent - level : 4 ; indent - tabs - mode : nil -*- Copyright ( c ) 2013 - 2016 Klarna AB This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS ...
311037ba656833a8efdbb9cc802ce889cbce6d53242649deb2f762299cd065d1
theodormoroianu/SecondYearCourses
HaskellChurch_20210415163846.hs
{-# LANGUAGE RankNTypes #-} module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = "cBool " <> show (cIf b True False) The boolean constant true always ...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415163846.hs
haskell
# LANGUAGE RankNTypes # The boolean negation switches the alternatives The boolean conjunction can be built as a conditional The boolean disjunction can be built as a conditional a pair is a way to compute something based on the values contained within the pair. a function to be applied on the values, it will apply i...
module HaskellChurch where A boolean is any way to choose between two alternatives newtype CBool = CBool {cIf :: forall t. t -> t -> t} An instance to show as regular Booleans instance Show CBool where show b = "cBool " <> show (cIf b True False) The boolean constant true always chooses the first alternativ...
a173c792b6379c0b12efa8a1757c3987a7c857191668a1b41deded4d74dcf741
noss/ifastcgi
ifastcgi.erl
-module(ifastcgi). -compile(export_all). %% API -define(MASTER, ifastcgi_master). add_server(Name, Port, Callback, Args) -> Timeout = 120000, gen_server:call(?MASTER, {add_server, self(), Name, Port, {Callback, Args}}, Timeout). del_server(Name) -> gen_server:call(?MASTER, {del_se...
null
https://raw.githubusercontent.com/noss/ifastcgi/9971c7c349f614c926eb133b90fe5f037700366c/src/ifastcgi.erl
erlang
API
-module(ifastcgi). -compile(export_all). -define(MASTER, ifastcgi_master). add_server(Name, Port, Callback, Args) -> Timeout = 120000, gen_server:call(?MASTER, {add_server, self(), Name, Port, {Callback, Args}}, Timeout). del_server(Name) -> gen_server:call(?MASTER, {del_server, N...
98ea080f25ccb033c5f142fd0ebc2efeb6b945171862695cd0db88d7e1a9327d
alesaccoia/festival_flinger
voices.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; Centre for Speech Technology Research ; ; University of Edinburgh , UK ; ; ;;; ...
null
https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices.scm
scheme
;; ; ; Copyright (c) 1996,1997 ;; ; ;; Permission is hereby granted, free of charge, to use and distribute ;; this softwar...
(define current-voice nil "current-voice The name of the current voice.") (defvar system-voice-path '( ) "system-voice-path Additional directory not near the load path where voices can be found, this can be redefined in lib/sitevars.scm if desired.") (defvar system-voice-path-multisyn '( ) "system-vo...
be2723a678fb600d560493bcc434502cc46fdd1980126398a304fbdbb8b7f80b
janestreet/jane-street-build-server
config.mli
open Build_pkg_common.Std type t [@@deriving sexp] val create : base_dir:string -> opam_switch:Opam_switch.t -> t (** Base directory, everything happens inside *) val base_dir : t -> string (** Opam_switch used by this opam installation. *) val opam_switch : t -> Opam_switch.t
null
https://raw.githubusercontent.com/janestreet/jane-street-build-server/7dd5dacfae33a361ba10ea93c8b9b21a9ce812ef/server/config.mli
ocaml
* Base directory, everything happens inside * Opam_switch used by this opam installation.
open Build_pkg_common.Std type t [@@deriving sexp] val create : base_dir:string -> opam_switch:Opam_switch.t -> t val base_dir : t -> string val opam_switch : t -> Opam_switch.t
2f0006eda5871b433ca0bd95debf1348249acfba0b80ce2ce75221cab4cb5c69
BranchTaken/Hemlock
u128.mli
* 128 - bit unsigned integer type . See { ! module : ConvertIntf } for documentation on conversion functions . See {!module:ConvertIntf} for documentation on conversion functions. *) open RudimentsInt0 type t = u128 include IntwIntf.SFU with type t := t val trunc_of_zint: Zint.t -> t val extend_to_zint: ...
null
https://raw.githubusercontent.com/BranchTaken/Hemlock/53da5c0d9cf0c94d58b4391735d917518eec67fa/bootstrap/src/basis/u128.mli
ocaml
* 128 - bit unsigned integer type . See { ! module : ConvertIntf } for documentation on conversion functions . See {!module:ConvertIntf} for documentation on conversion functions. *) open RudimentsInt0 type t = u128 include IntwIntf.SFU with type t := t val trunc_of_zint: Zint.t -> t val extend_to_zint: ...
d4c3451a745ad308ef640268dd38d3afac1789d7b0c87f0ffd0dbae09cd14302
rob7hunter/leftparen
validate.scm
#lang scheme/base ;; form validation (require "util.scm" "record.scm" "contract-lp.ss") (provide validate ;; field-validate (via contract) ) ;; constructs a fn suitable for passing in to the #:validate keyword of a form call ;; the fn : rec -> content ;; ;; Usage ex: (validate (f...
null
https://raw.githubusercontent.com/rob7hunter/leftparen/169c896bda989b6a049fe49253a04d6f8b62402b/validate.scm
scheme
form validation field-validate (via contract) constructs a fn suitable for passing in to the #:validate keyword of a form call the fn : rec -> content Usage ex: (validate (field-validate 'name string?) (field-validate 'age (lambda (n) (and (integer? n) (>= n 13))))) field-validate
#lang scheme/base (require "util.scm" "record.scm" "contract-lp.ss") (provide validate ) (define (validate . validation-fns) (lambda (rec) (let ((errors (filter-map (lambda (f) (f rec)) validation-fns))) (if (empty? errors) #f (string-join errors "\n"))))) ...
5a4d4b78261924e595f33c642a13f05780d3b257d6e477ae532307591402d8e8
kappelmann/engaging-large-scale-functional-programming
Exercise07.hs
module Exercise07 where import Data.List import Data.Ord type Graph = [[Integer]] (#) :: Graph -> Graph -> Graph (#) = (++) emptyGraph :: Graph emptyGraph = [] isTree :: ([Integer], [(Integer,Integer)]) -> Bool isTree ([],[]) = True isTree g | graphRemoved == g = False | otherwise = isTree graphRemoved ...
null
https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/07/uploads/teamhaskel1337/Exercise07.hs
haskell
module Exercise07 where import Data.List import Data.Ord type Graph = [[Integer]] (#) :: Graph -> Graph -> Graph (#) = (++) emptyGraph :: Graph emptyGraph = [] isTree :: ([Integer], [(Integer,Integer)]) -> Bool isTree ([],[]) = True isTree g | graphRemoved == g = False | otherwise = isTree graphRemoved ...
708d1e560b80e27bdaad31df2fa8c77bbdbbcb68bc487638ade973f7b1bc2761
synrc/nitro
element_fieldset.erl
-module(element_fieldset). -author('Vladimir Galunshchikov'). -include_lib("nitro/include/nitro.hrl"). -compile(export_all). render_element(Record) when Record#fieldset.show_if==false -> [<<>>]; render_element(Record) -> List = [ %global {<<"accesskey">>, Record#fieldset.accesskey}, {<<"class">>,...
null
https://raw.githubusercontent.com/synrc/nitro/753b543626add2c014584546ec50870808a2eb90/src/elements/form/element_fieldset.erl
erlang
global spec
-module(element_fieldset). -author('Vladimir Galunshchikov'). -include_lib("nitro/include/nitro.hrl"). -compile(export_all). render_element(Record) when Record#fieldset.show_if==false -> [<<>>]; render_element(Record) -> List = [ {<<"accesskey">>, Record#fieldset.accesskey}, {<<"class">>, Record#fields...
b1c56d05171e7223969d080ce55220b5b7dd2bd91cd8a566fa1f99160338c2bb
archaelus/erlirc
irc_user.erl
%%%------------------------------------------------------------------- Geoff Ca nt @author nt < > %% @version {@vsn}, {@date} {@time} %% @doc %% @end %%%------------------------------------------------------------------- -module(irc_user). -include_lib("irc.hrl"). %% API -export([gproc_name/1, gproc...
null
https://raw.githubusercontent.com/archaelus/erlirc/b922b2004f0f9f58a6ccf8fe71313190dee081c6/src/irc_user.erl
erlang
------------------------------------------------------------------- @version {@vsn}, {@date} {@time} @doc @end ------------------------------------------------------------------- API ==================================================================== API ==========================================================...
Geoff Ca nt @author nt < > -module(irc_user). -include_lib("irc.hrl"). -export([gproc_name/1, gproc_name/2]). ( ) - > gproc_name(#user{net=Net,nick=Nick}) when is_list(Net), is_list(Nick) -> gproc:name({irc_user, Net, Nick}). gproc_name(Net, Nick) when is_list(Net), is_list(Nick) -> gpro...
4fb9444e2d73e8ed4bfd760c14456284b59bffe8d168d523816803c1f8c5e3ed
mmottl/aifad
c45_io.ml
AIFAD - Automated Induction of Functions over Author : email : WWW : Copyright ( C ) 2002 Austrian Research Institute for Artificial Intelligence Copyright ( C ) 2003- This library is free software ; you can redistribute it and/or modify it under the terms of t...
null
https://raw.githubusercontent.com/mmottl/aifad/b06786f5cd60992548405078a903ee3d962ea969/src/c45_io.ml
ocaml
makes matching faster impossible MV = 0! dummy_fdsum = MV! MV = 0! dummy_fdsum = MV! Read C4.5-rhs-data
AIFAD - Automated Induction of Functions over Author : email : WWW : Copyright ( C ) 2002 Austrian Research Institute for Artificial Intelligence Copyright ( C ) 2003- This library is free software ; you can redistribute it and/or modify it under the terms of t...
26d14a7a9c656aee24006c58ee98d0f1cc1dc6449f6ef32452b3665a63ce5846
ocaml-ppx/ocamlformat
type_and_constraint.ml
type 'a t = 'a list constraint 'a = [< `X]
null
https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/3d1c992240f7d30bcb8151285274f44619dae197/test/passing/tests/type_and_constraint.ml
ocaml
type 'a t = 'a list constraint 'a = [< `X]
c06dc64fdcc6b4ae529c45c99df14986e702595ec4cc7601770acdb3fbf62bc9
Clojure2D/clojure2d-examples
material.clj
(ns rt4.the-next-week.ch04c.material (:require [rt4.common :as common] [rt4.the-next-week.ch04c.ray :as ray] [rt4.the-next-week.ch04c.texture :as texture] [fastmath.vector :as v] [fastmath.core :as m] [fastmath.random :as r]) (:import [fastmath.vector Vec3...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch04c/material.clj
clojure
(ns rt4.the-next-week.ch04c.material (:require [rt4.common :as common] [rt4.the-next-week.ch04c.ray :as ray] [rt4.the-next-week.ch04c.texture :as texture] [fastmath.vector :as v] [fastmath.core :as m] [fastmath.random :as r]) (:import [fastmath.vector Vec3...
23bfe71a892c8c67ea102c719dd4af725e21710e3007b3c9a6e70123e75337fa
asakeron/cljs-webgl
string_name.cljs
(ns cljs-webgl.constants.string-name) (def vendor 0x1F00) (def renderer 0x1F01) (def version 0x1F02)
null
https://raw.githubusercontent.com/asakeron/cljs-webgl/f4554fbee6fbc6133a4eb0416548dabd284e735c/src/cljs/cljs_webgl/constants/string_name.cljs
clojure
(ns cljs-webgl.constants.string-name) (def vendor 0x1F00) (def renderer 0x1F01) (def version 0x1F02)
fd2ae751e2c2a93fb699de3622ad3ff5e7b48205b1daf5a6a072f3ff724ec8bb
notogawa/yesod-websocket-sample
Model.hs
module Model where import Prelude import Yesod import Data.Text (Text) import Database.Persist.Quasi -- You can define all of your database entities in the entities file. -- You can find more information on persistent and how to declare entities -- at: -- / share [mkPersist sqlSettings, mkMigrate "migrateAll"] $...
null
https://raw.githubusercontent.com/notogawa/yesod-websocket-sample/aa3eb38339830753a26ec68e130053ea01a80ff2/Model.hs
haskell
You can define all of your database entities in the entities file. You can find more information on persistent and how to declare entities at: /
module Model where import Prelude import Yesod import Data.Text (Text) import Database.Persist.Quasi share [mkPersist sqlSettings, mkMigrate "migrateAll"] $(persistFileWith lowerCaseSettings "config/models")
c3429e1a1e5a899f247e266261405b196bb390167499c0cd2666f9def8adfe01
kupl/VeriSmart-public
synthesizer.ml
open Lang open Vlang open MakeCfg open Component open Path open InvMap open Vocab open Options open VerifyUtils open Global let gen_conjunct ~kind : comps -> vformula list = fun comps -> let mvars = BatSet.to_list comps.mapvars in let pairs = BatSet.to_list comps.mapmems in let reads = ExpSet.to_list comps.reads...
null
https://raw.githubusercontent.com/kupl/VeriSmart-public/99be7ba88b61994f1ed4c0d3a8e6a6db0f790431/src/verify/synthesizer.ml
ocaml
x[y] = z x = y x >= y x >= n n = x n >= x @TU[addr] = True [] [] l17 make formulas to 'true' except for some specialized formulas loop inv => tran inv (excluding local, locks) trans_inv may be updated at each iteration extern inv => tran inv (excluding locks), extern loop inv extern inv wit...
open Lang open Vlang open MakeCfg open Component open Path open InvMap open Vocab open Options open VerifyUtils open Global let gen_conjunct ~kind : comps -> vformula list = fun comps -> let mvars = BatSet.to_list comps.mapvars in let pairs = BatSet.to_list comps.mapmems in let reads = ExpSet.to_list comps.reads...
029121d59011b34e06c30cdb5708f0b736d4b4f7c8d06293a571b4a8029b9a00
spawnfest/eep49ers
ssl_crl_hash_dir.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2016 - 2020 . 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/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/ssl/src/ssl_crl_hash_dir.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 2016 - 2020 . 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(ssl_crl_hash_dir). -include_lib("public_key/include/public_key.hrl"). -include_lib("kernel/include/logger.h...
69c100bbddfe86fc6fb95f708e246ccd2c2214759f78fe6e6cf4c250bbcf519b
matthiasn/systems-toolbox-sente
integration_test.clj
(ns matthiasn.systems-toolbox-sente.integration-test (:require [clojure.test :refer :all] [matthiasn.systems-toolbox-sente.test-server :as ts] [matthiasn.systems-toolbox-sente.test-store :as st] [clj-webdriver.taxi :as tx] [clojure.string :as s])) (deftest open-page ...
null
https://raw.githubusercontent.com/matthiasn/systems-toolbox-sente/edd0a8295f372063e507810c3fa92b23c0524f67/test/clj/matthiasn/systems_toolbox_sente/integration_test.clj
clojure
(ns matthiasn.systems-toolbox-sente.integration-test (:require [clojure.test :refer :all] [matthiasn.systems-toolbox-sente.test-server :as ts] [matthiasn.systems-toolbox-sente.test-store :as st] [clj-webdriver.taxi :as tx] [clojure.string :as s])) (deftest open-page ...
7e8273fbd5e6ba13a306166250d23c594fdc774a0007e0c35a786cc21c5136e0
xapi-project/xen-api
gen_api.ml
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
null
https://raw.githubusercontent.com/xapi-project/xen-api/e8c3575316226ac6324e94aa4f9e040a662e279a/ocaml/idl/ocaml_backend/gen_api.ml
ocaml
* Generate a single type declaration for simple types (eg not containing references to record objects) * Generate a list of modules for each record kind We treat options in records specially: if they are None, the field will be omitted, if they are Some, the field will be present. These records have the...
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published * by the Free Software Foundation ; version 2.1 only . with the special * exception on linking describe...
b76c324b35573780318d45f1767ceb26d11a68b3e66e66cad931fee27f5056f3
masateruk/micro-caml
list_func.ml
let rec iter f xs = match xs with | [] -> () | x :: xs -> f x; iter f xs let rec fold_right f xs accu = match xs with | [] -> accu | x :: xs -> f x (fold_right f xs accu) let rec map f xs = match xs with | [] -> [] | x :: xs -> f x :: (map f xs) let () = let rec suc x = x + 1 in let rec add x y...
null
https://raw.githubusercontent.com/masateruk/micro-caml/0c0bd066b87cf54ce33709355c422993a85a86a1/test/list_func.ml
ocaml
let rec iter f xs = match xs with | [] -> () | x :: xs -> f x; iter f xs let rec fold_right f xs accu = match xs with | [] -> accu | x :: xs -> f x (fold_right f xs accu) let rec map f xs = match xs with | [] -> [] | x :: xs -> f x :: (map f xs) let () = let rec suc x = x + 1 in let rec add x y...
86f72fa4deec5aab6e402ce4ff20baefeb8ac68793f3c52f3969030c5169b966
facebook/pyre-check
cfg.mli
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
null
https://raw.githubusercontent.com/facebook/pyre-check/aa66d2798dfdc4f4a170f003b787623cf0426c55/source/analysis/cfg.mli
ocaml
Control flow graph of a define body. Exposed for testing only
* Copyright ( c ) Meta Platforms , Inc. and affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in t...
36de7b999db7fe5ecfed7313cbf32a20a0a745d06aec28ef4ea1ea7a87860b6e
gwkkwg/trivial-backtrace
tests.lisp
(in-package #:trivial-backtrace-test) (deftestsuite generates-backtrace (trivial-backtrace-test) ()) (addtest (generates-backtrace) test-1 (let ((output nil)) (handler-case (let ((x 1)) (let ((y (- x (expt 1024 0)))) (declare (optimize (safety 3))) (/ 2 y))) (error (c) (setf output (pr...
null
https://raw.githubusercontent.com/gwkkwg/trivial-backtrace/6eb65bde7229413040c81d42ea22f0e4c9c8cfc9/test/tests.lisp
lisp
(in-package #:trivial-backtrace-test) (deftestsuite generates-backtrace (trivial-backtrace-test) ()) (addtest (generates-backtrace) test-1 (let ((output nil)) (handler-case (let ((x 1)) (let ((y (- x (expt 1024 0)))) (declare (optimize (safety 3))) (/ 2 y))) (error (c) (setf output (pr...
e19b985bd7c5d403a13694ee4198c94c812dbdae95760ef79ea81d28050a4b06
tweag/linear-base
Monoid.hs
# LANGUAGE DataKinds # # LANGUAGE DerivingVia # {-# LANGUAGE LinearTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -Wno - orphans # {-# OPTIONS_HADDOCK hide #-} | This module provides linear versions of ' Monoid ' . -- -- To learn about how these classic monoids work, go to th...
null
https://raw.githubusercontent.com/tweag/linear-base/3037bf9a44b3b4f22fd0fdc8670e964d97e26a4c/src/Data/Monoid/Linear/Internal/Monoid.hs
haskell
# LANGUAGE LinearTypes # # OPTIONS_HADDOCK hide # To learn about how these classic monoids work, go to this school of haskell [post](-tour). * Monoid operations | A linear monoid is a linear semigroup with an identity on the binary operation. # MINIMAL mempty # convenience redefine ------------- Instances -- -...
# LANGUAGE DataKinds # # LANGUAGE DerivingVia # # LANGUAGE ScopedTypeVariables # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -Wno - orphans # | This module provides linear versions of ' Monoid ' . module Data.Monoid.Linear.Internal.Monoid Monoid (..), mconcat, mappend, Can not export Data . Monoid.{Fi...
4a5e876d035a1cfcd2f9496dcae7698f0a1d913dd6794af7a3f30be733cc0a01
jacekschae/learn-reitit-course-files
test_system.clj
(ns cheffy.test-system (:require [clojure.test :refer :all] [integrant.repl.state :as state] [ring.mock.request :as mock] [muuntaja.core :as m] [cheffy.auth0 :as auth0] [clj-http.client :as http])) (defn get-test-token [email] (->> {:content-type :json ...
null
https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/48-auth0-refactor/test/cheffy/test_system.clj
clojure
(ns cheffy.test-system (:require [clojure.test :refer :all] [integrant.repl.state :as state] [ring.mock.request :as mock] [muuntaja.core :as m] [cheffy.auth0 :as auth0] [clj-http.client :as http])) (defn get-test-token [email] (->> {:content-type :json ...
f35d39e9ce441544765c1e1688e87f8f4d6a3b69102fc8352b8c9f71e456d79d
bobbypriambodo/ocaml-todo-api-example
migrate.ml
let migrate () = print_endline "creating todos table."; let%lwt _ = let module Todos = Todos.Make(Db) in let%lwt result = Todos.migrate () in match result with | Ok () -> print_endline "done." |> Lwt.return | Error _e -> print_endline "error." |> Lwt.return in Lwt.return_unit let () = Lwt_m...
null
https://raw.githubusercontent.com/bobbypriambodo/ocaml-todo-api-example/4b2f660a96b175066fa9cf83e999c45afca2a8dc/bin/migrate.ml
ocaml
let migrate () = print_endline "creating todos table."; let%lwt _ = let module Todos = Todos.Make(Db) in let%lwt result = Todos.migrate () in match result with | Ok () -> print_endline "done." |> Lwt.return | Error _e -> print_endline "error." |> Lwt.return in Lwt.return_unit let () = Lwt_m...
f39f863777e22102467922aa3f92cc87f499b1bb8143ce2f56b3d03fb15852c5
joodie/flutter
html5.clj
(ns flutter.html5 "HTML5 input type support") (defn wrap-html5-input-fields "provide html5 input types: :email :url :range :date :month :week :time :datetime :datetime-local :search and :color." [f] (fn [type attrs name opts value] (if (#{:email :url :range :date :month :week :time :datetime :d...
null
https://raw.githubusercontent.com/joodie/flutter/336e40386ff4e79ce9243ec8690e2a62c41f80a3/src/flutter/html5.clj
clojure
(ns flutter.html5 "HTML5 input type support") (defn wrap-html5-input-fields "provide html5 input types: :email :url :range :date :month :week :time :datetime :datetime-local :search and :color." [f] (fn [type attrs name opts value] (if (#{:email :url :range :date :month :week :time :datetime :d...
971054780ec10f607e48c6017d658728859ac52d1bb6a63786fda108298e8d06
yqrashawn/GokuRakuJoudo
froms_test.clj
(ns karabiner-configurator.froms-test (:require [clojure.test :as t] [karabiner-configurator.data :refer [conf-data init-conf-data update-conf-data]] [karabiner-configurator.froms :as sut])) (def example-froms {:1 {:key :d} :2 {:key :d :modi :1} :3 {:key :d :modi :left_command} :4 {:key :d :modi ...
null
https://raw.githubusercontent.com/yqrashawn/GokuRakuJoudo/2295ee42923d439ec5c60bb9ff1655becfad273d/test/karabiner_configurator/froms_test.clj
clojure
(ns karabiner-configurator.froms-test (:require [clojure.test :as t] [karabiner-configurator.data :refer [conf-data init-conf-data update-conf-data]] [karabiner-configurator.froms :as sut])) (def example-froms {:1 {:key :d} :2 {:key :d :modi :1} :3 {:key :d :modi :left_command} :4 {:key :d :modi ...
e5759c74c92bc422777c83a145048730a7b12429c23e11e687fc3d13ed748ea9
mirage/ocaml-cohttp
client_timeout.ml
open Eio open Cohttp_eio let () = Eio_main.run @@ fun env -> Switch.run @@ fun sw -> (* Increment/decrement this value to see success/failure. *) let timeout_s = 0.01 in Eio.Time.with_timeout env#clock timeout_s (fun () -> let host, port = ("www.example.org", 80) in let he = Unix.gethostbyname ho...
null
https://raw.githubusercontent.com/mirage/ocaml-cohttp/db2abd0eb526f2826e036ee5d9c6f3d24aa21d25/cohttp-eio/examples/client_timeout.ml
ocaml
Increment/decrement this value to see success/failure.
open Eio open Cohttp_eio let () = Eio_main.run @@ fun env -> Switch.run @@ fun sw -> let timeout_s = 0.01 in Eio.Time.with_timeout env#clock timeout_s (fun () -> let host, port = ("www.example.org", 80) in let he = Unix.gethostbyname host in let addr = `Tcp (Eio_unix.Ipaddr.of_unix he.h_addr_...
97139f8df8d3007795e93762ec189755ab4ddfa2ad6159ac0769b1732fd967e5
jariazavalverde/blog
MonadExpr.hs
module MonadExpr ( Expr(..), Parser(..), expr ) where import Parser ( Parser(..), sat, char ) import Data.Char ( isDigit ) import Control.Applicative ( Alternative((<|>), some) ) data Expr = K Int | Add Expr Expr | Mul Expr Expr deriving Show natural :: Parser Expr natural =...
null
https://raw.githubusercontent.com/jariazavalverde/blog/c8bbfc4394b077e8f9fc34593344d64f3a94153e/src/analizadores-sintacticos-monadicos/MonadExpr.hs
haskell
module MonadExpr ( Expr(..), Parser(..), expr ) where import Parser ( Parser(..), sat, char ) import Data.Char ( isDigit ) import Control.Applicative ( Alternative((<|>), some) ) data Expr = K Int | Add Expr Expr | Mul Expr Expr deriving Show natural :: Parser Expr natural =...
d5a3f1a7f1fee511f0823409649890ef22e652a77cf7be24ff1348033a39573d
ros/roslisp
rosout.lisp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Software License Agreement (BSD License) ;; Copyright ( c ) 2008 , Willow Garage , Inc. ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with ;; or without modification, are permitted provided that the ;; following cond...
null
https://raw.githubusercontent.com/ros/roslisp/559355a8d695e34e6dedae071a9af2c065411687/src/rosout.lisp
lisp
Software License Agreement (BSD License) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions...
Copyright ( c ) 2008 , Willow Garage , Inc. * Neither the name of Willow Garage , Inc. nor the names CONTRIBUTORS " AS IS " AND ANY EXPRESS OR COPYRIGHT OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CAUSED AND ON ANY THEORY OF LIABILITY , WHETHER IN (in-package :roslisp) (...
680b6708be8215c735e1bcbb5def7cc1c48d818b4713f794004ed9efd4625c02
crategus/cl-cffi-gtk
gdk.rgba.lisp
;;; ---------------------------------------------------------------------------- ;;; gdk.rgba.lisp ;;; The documentation of this file is taken from the 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GDK library . ;;; See <>. The API documentation of the Lisp binding is available...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/ba198f7d29cb06de1e8965e1b8a78522d5430516/gdk/gdk.rgba.lisp
lisp
---------------------------------------------------------------------------- gdk.rgba.lisp See <>. The API documentation of the Lisp binding is This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License for Lisp License, or (at your option) ...
The documentation of this file is taken from the 3 Reference Manual Version 3.24 and modified to document the Lisp binding to the GDK library . available from < -cffi-gtk/ > . Copyright ( C ) 2012 - 2021 as published by the Free Software Foundation , either version 3 of the the GNU Lesser General Public ...
4b4ab2d1864d8e3f96539d6fa46fbca30a1a96ee69cd17c3dbb69dc281c307c6
blindglobe/clocc
package.lisp
-*- Mode : Lisp ; Package : USER ; Syntax : COMMON - LISP ; ; Lowercase : T -*- ;;;----------------------------------------------------------------------------------+ ;;; | ;;; TEXAS INSTRUMENTS INCORPORATED ...
null
https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/gui/clue/clio/examples/package.lisp
lisp
Package : USER ; Syntax : COMMON - LISP ; ; Lowercase : T -*- ----------------------------------------------------------------------------------+ | TEXAS INSTRUMENTS INCORPORATED | ...
P.O. BOX 149149 | , TEXAS 78714 - 9149 | Copyright ( C ) 1989 , 1990 Texas Instruments Incorporated . | Texas Instruments Incorporated provides this software " a...
cbdb6906f376443100bbc8a1a97f8cce9f38418eb19918cdcb551d64f69a74f7
orthecreedence/ghostie
matrix.lisp
(in-package :ghostie-util) (defun nanp (v) "Make sure our matrices aren't getting infinity values." (not (ignore-errors (mod v 360)))) (defun id-matrix (dims) (let ((array (make-array (* dims dims) :initial-element 0.0 :element-type 'single-float))) (dotimes (d dims) (setf (aref array (* d (1+ dims)))...
null
https://raw.githubusercontent.com/orthecreedence/ghostie/6e6f77e1f33511d5311319db4656960de1c6f668/lib/matrix.lisp
lisp
(in-package :ghostie-util) (defun nanp (v) "Make sure our matrices aren't getting infinity values." (not (ignore-errors (mod v 360)))) (defun id-matrix (dims) (let ((array (make-array (* dims dims) :initial-element 0.0 :element-type 'single-float))) (dotimes (d dims) (setf (aref array (* d (1+ dims)))...
f156b3fb5e72de8675264658eaa5033040571c5c54356024d9936ed84e627ae6
richardharrington/robotwar
handler.clj
(ns robotwar.handler (:use [clojure.string :only [split]] [robotwar.constants]) (:require [ring.middleware.json :refer [wrap-json-response wrap-json-body]] [ring.middleware.file :refer [wrap-file]] [ring.middleware.params :refer [wrap-params]] [ring.util.response :refer [...
null
https://raw.githubusercontent.com/richardharrington/robotwar/5885ecc7b26e574a405d5aa137e8a16966011594/src/robotwar/handler.clj
clojure
(let [route (fn [acceptable-request-method re action] (when (= request-method acceptable-request-method) (when-let [[_ & url-params] (consistently-typed-re-matches re uri)] (apply action url-params))))] (or (fn [id n] (response (take...
(ns robotwar.handler (:use [clojure.string :only [split]] [robotwar.constants]) (:require [ring.middleware.json :refer [wrap-json-response wrap-json-body]] [ring.middleware.file :refer [wrap-file]] [ring.middleware.params :refer [wrap-params]] [ring.util.response :refer [...
41c248efb98342c23c528b43c2599f350282fe9a36ef4f1fec6a5ed2314aa61a
cmerrick/plainview
project.clj
(defproject plainview "0.1.0-SNAPSHOT" :description "A toolkit for building a data pipeline from your database's binary log stream." :url "" :license {:name "Apache License, Version 2.0" :url "-2.0.html"} :repositories [["conjars" {:url ""}]] :source-paths ["src/clj"] :test-paths ["test/clj/"] ...
null
https://raw.githubusercontent.com/cmerrick/plainview/388f9c0f63f1d0b4cb23bf7f5f0775d6c1e0f39c/project.clj
clojure
(defproject plainview "0.1.0-SNAPSHOT" :description "A toolkit for building a data pipeline from your database's binary log stream." :url "" :license {:name "Apache License, Version 2.0" :url "-2.0.html"} :repositories [["conjars" {:url ""}]] :source-paths ["src/clj"] :test-paths ["test/clj/"] ...
a95efe07d5431a6bf4ba0df54cc9364e4244ca9d813b11c9951726e1b98147ee
soegaard/pyffi
python-more-builtins.rkt
#lang racket/base (require "structs.rkt" "python-c-api.rkt" "python-delayed.rkt" "python-define-delayed.rkt" "python-environment.rkt" "python-evaluation.rkt" "python-initialization.rkt" "python-types.rkt" "python-attributes.rkt" ...
null
https://raw.githubusercontent.com/soegaard/pyffi/52f1e06c79f9be70b2fdd29b223ae0656b3e066b/pyffi-lib/pyffi/python-more-builtins.rkt
racket
allow symbol allow symbols allow symbols allow symbol allow symbol (define dir
#lang racket/base (require "structs.rkt" "python-c-api.rkt" "python-delayed.rkt" "python-define-delayed.rkt" "python-environment.rkt" "python-evaluation.rkt" "python-initialization.rkt" "python-types.rkt" "python-attributes.rkt" ...
3e2cd6a2e87580a72f9e0a2fa4e5cc7d7e093f2767a3b4101363e0fb2b444955
bennn/dissertation
run-t.rkt
#lang typed/racket (provide ;; String EOM DONE constants , regexps that match PATH , DISABLE , and ENABLE requests PATH DISABLE ENABLE ;; InputPort OutputPort -> Void ;; read FROM, DISABLE, and ENABLE requests input-port, write responses to output-port, loop run-t) ;; ===============================...
null
https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/mbta/typed/run-t.rkt
racket
String InputPort OutputPort -> Void read FROM, DISABLE, and ENABLE requests input-port, write responses to output-port, loop ===================================================================================================
#lang typed/racket (provide EOM DONE constants , regexps that match PATH , DISABLE , and ENABLE requests PATH DISABLE ENABLE run-t) (require require-typed-check) (require/typed/check "t-view.rkt" [manage% Manage]) (require "../base/t-view-types.rkt") (define PATH #rx"from (.*) to (.*)$") (define DISA...
7ced0e36f7783d577405e2671e3c1982a5c8b694e9c16d8b3f4a6ba97f47dd42
runtimeverification/haskell-backend
DebugUnifyBottom.hs
# LANGUAGE NoStrict # # LANGUAGE NoStrictData # | Copyright : ( c ) Runtime Verification , 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2021 License : BSD-3-Clause -} module Kore.Log.DebugUnifyBottom ( DebugUnifyBottom (..), mkDebugUnifyBottom, debugUnifyBottom,...
null
https://raw.githubusercontent.com/runtimeverification/haskell-backend/efeb976108a0baa202844386193695564a257540/kore/src/Kore/Log/DebugUnifyBottom.hs
haskell
# LANGUAGE NoStrict # # LANGUAGE NoStrictData # | Copyright : ( c ) Runtime Verification , 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2021 License : BSD-3-Clause -} module Kore.Log.DebugUnifyBottom ( DebugUnifyBottom (..), mkDebugUnifyBottom, debugUnifyBottom,...
525e8fdff3c380393cb53bfcf5f93e8eb5f13526b49e5065c9bd17bde7b8d224
clojure-interop/google-cloud-clients
ProductSearchStub.clj
(ns com.google.cloud.vision.v1p4beta1.stub.ProductSearchStub "Base stub class for Cloud Vision API. This class is for advanced usage and reflects the underlying API directly." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.vision.v1p4beta1.stub ProductSearchStub])) (defn ->product...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.vision/src/com/google/cloud/vision/v1p4beta1/stub/ProductSearchStub.clj
clojure
(ns com.google.cloud.vision.v1p4beta1.stub.ProductSearchStub "Base stub class for Cloud Vision API. This class is for advanced usage and reflects the underlying API directly." (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.vision.v1p4beta1.stub ProductSearchStub])) (defn ->product...
71e40c90219f22c63ecbf9bbf9b0dbc9a5300aa8f06386f0afac8456d761a94e
TheoVerhelst/OverPitch
pitch_shifting.clj
(ns overpitch.pitch-shifting (:require [overpitch.time-scaling :refer [time-scale]] [overpitch.resampling :refer [resample]])) (defn pitch-shift "Pitch-shifts the input data vector by the given scale" [input-data scale] (resample (time-scale input-data scale) (/ 1 scale)))
null
https://raw.githubusercontent.com/TheoVerhelst/OverPitch/645a15e74cf4a7a6d134bbe6940cb99ea2c98288/src/overpitch/pitch_shifting.clj
clojure
(ns overpitch.pitch-shifting (:require [overpitch.time-scaling :refer [time-scale]] [overpitch.resampling :refer [resample]])) (defn pitch-shift "Pitch-shifts the input data vector by the given scale" [input-data scale] (resample (time-scale input-data scale) (/ 1 scale)))
40f1137cf7262e8c999aee80eab5cab1c4c7d860fd47885a68457940ea3afeb2
nikodemus/SBCL
exhaust.impure.lisp
;;;; tests of the system's ability to catch resource exhaustion problems This software is part of the SBCL system . See the README file for ;;;; more information. ;;;; While most of SBCL is derived from the CMU CL system , the test ;;;; files (like this one) were written from scratch after the fork from CMU CL ....
null
https://raw.githubusercontent.com/nikodemus/SBCL/3c11847d1e12db89b24a7887b18a137c45ed4661/tests/exhaust.impure.lisp
lisp
tests of the system's ability to catch resource exhaustion problems more information. files (like this one) were written from scratch after the fork This software is in the public domain and is provided with absolutely no warranty. See the COPYING and CREDITS files for more information. Prior to sbcl-0.7.1.38,...
This software is part of the SBCL system . See the README file for While most of SBCL is derived from the CMU CL system , the test from CMU CL . (cl:in-package :cl-user) (load "test-util.lisp") (load "assertoid.lisp") (use-package "TEST-UTIL") (use-package "ASSERTOID") (defun recurse () (recurse) (rec...
7ebdcdb663bf8eefae54cc15fa5798190f2bd37d92bf0b997f2d72875e6973ca
mbj/stratosphere
AccessRulesProperty.hs
module Stratosphere.Lightsail.Bucket.AccessRulesProperty ( AccessRulesProperty(..), mkAccessRulesProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data AccessRule...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/lightsail/gen/Stratosphere/Lightsail/Bucket/AccessRulesProperty.hs
haskell
module Stratosphere.Lightsail.Bucket.AccessRulesProperty ( AccessRulesProperty(..), mkAccessRulesProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Value data AccessRule...
192c72312709084a3742e4fa404eb75235f764784748724d33ffb8bb97dedbd2
jeffshrager/biobike
java-parser-test.lisp
(defpackage "JAVA-PARSER-TEST" (:use "COMMON-LISP" "TEST" "PARSER")) (in-package "JAVA-PARSER-TEST") (defvar *cr* (string #\return)) (defvar *lf* (string #\newline)) (defvar *crlf* (concatenate 'string *cr* *lf*)) (defvar *space* (string #\space)) (defvar *tab* (string #\tab)) (defvar *form-feed* (string #\page)) ...
null
https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/ThirdParty/monkeylib/parser/java-parser-test.lisp
lisp
(defpackage "JAVA-PARSER-TEST" (:use "COMMON-LISP" "TEST" "PARSER")) (in-package "JAVA-PARSER-TEST") (defvar *cr* (string #\return)) (defvar *lf* (string #\newline)) (defvar *crlf* (concatenate 'string *cr* *lf*)) (defvar *space* (string #\space)) (defvar *tab* (string #\tab)) (defvar *form-feed* (string #\page)) ...
052b3101c4617e1c4f8cdc7a5a4def8badfbdc58c80b27b6ee5ee433fb9c87de
bcc32/projecteuler-ocaml
test_distribution.ml
open! Core open! Import module D = Distribution.Bignum let%test_unit "singleton" = let d = D.singleton (module Int) 0 in [%test_result: Bignum.t] ~expect:Bignum.one (D.find_exn d 0) ;; let%test_unit "scale" = Q.test D.Prob.quickcheck_generator ~f:(fun p -> let d = D.scale (D.singleton (module Int) 0) p in ...
null
https://raw.githubusercontent.com/bcc32/projecteuler-ocaml/712f85902c70adc1ec13dcbbee456c8bfa8450b2/test/test_distribution.ml
ocaml
open! Core open! Import module D = Distribution.Bignum let%test_unit "singleton" = let d = D.singleton (module Int) 0 in [%test_result: Bignum.t] ~expect:Bignum.one (D.find_exn d 0) ;; let%test_unit "scale" = Q.test D.Prob.quickcheck_generator ~f:(fun p -> let d = D.scale (D.singleton (module Int) 0) p in ...
5cd2f6044e735c1886ad15ae14e0039e80ae1e97e9cd5c7ac044754726f2ab71
headwinds/daterangepicker
project.clj
(defproject material-ui-reagent "0.6.0" :min-lein-version "2.5.3" :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/clojurescript "1.10.339"] [reagent "0.8.1"] [re-frame "0.9.4"] [cljs-ajax "0.7.3"] [figwheel "0.5.16"] ...
null
https://raw.githubusercontent.com/headwinds/daterangepicker/33cf0a0f5caec4365a5de612e3912360e07520d6/ranger/project.clj
clojure
(defproject material-ui-reagent "0.6.0" :min-lein-version "2.5.3" :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/clojurescript "1.10.339"] [reagent "0.8.1"] [re-frame "0.9.4"] [cljs-ajax "0.7.3"] [figwheel "0.5.16"] ...
26d06c957ba46a63ef182cb91f2e8a945832fa9c43cc7bf474e01eb2500437b5
cram2/cram
discrete.lisp
;; Discrete random variables , Sat Nov 11 2006 - 21:51 Time - stamp : < 2014 - 12 - 26 13:18:36EST discrete.lisp > ;; Copyright 2006 , 2007 , 2008 , 2009 , 2011 , 2012 , 2014 Distributed under the terms of the GNU General Public License ;; ;; This program is free software: you can redistribute it and/or mo...
null
https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/random/discrete.lisp
lisp
Discrete random variables This program is free software: you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ...
, Sat Nov 11 2006 - 21:51 Time - stamp : < 2014 - 12 - 26 13:18:36EST discrete.lisp > Copyright 2006 , 2007 , 2008 , 2009 , 2011 , 2012 , 2014 Distributed under the terms of the GNU General Public License it under the terms of the GNU General Public License as published by the Free Software Foundation ...
c93c554c3d19b2c6a64bafd0bc5ad1ff45a6e42426ea81d81d0356be5e62452b
DrTom/clj-pg-types
clj_time.clj
(ns pg-types.read-column.timestamp.clj-time (:require [pg-types.read-column :refer :all] [clj-time.coerce :as time-coerce] )) (defmethod convert-column [:timestamp java.sql.Timestamp] [_ val _ _] (time-coerce/from-sql-time val)) (defmethod convert-column [:timestamptz java.sql.Timestamp] [_ val _ ...
null
https://raw.githubusercontent.com/DrTom/clj-pg-types/d847735c46b2da173fd50a6ebe492bead0d75dd5/src/pg_types/read_column/timestamp/clj_time.clj
clojure
(ns pg-types.read-column.timestamp.clj-time (:require [pg-types.read-column :refer :all] [clj-time.coerce :as time-coerce] )) (defmethod convert-column [:timestamp java.sql.Timestamp] [_ val _ _] (time-coerce/from-sql-time val)) (defmethod convert-column [:timestamptz java.sql.Timestamp] [_ val _ ...
69e87491a8d20d3cc721691a4931a01335b30d6fb586537e2b978040db0c56b3
janestreet/ppx_type_directed_value
covariant.ml
open Core let type_directed_enumerate_bool = [ true; false ] let type_directed_enumerate_unit = [ () ] let type_directed_enumerate_option l = None :: List.map l ~f:(fun a -> Some a) type t = { f1 : bool ; f2 : bool } [@@deriving type_directed_enumerate] type t_var = | A | B of bool * bool [@@deriving type_...
null
https://raw.githubusercontent.com/janestreet/ppx_type_directed_value/f85693cc6d0ad8a9bc3bad55fed22a3d78e1fcaf/test/inline/covariant.ml
ocaml
open Core let type_directed_enumerate_bool = [ true; false ] let type_directed_enumerate_unit = [ () ] let type_directed_enumerate_option l = None :: List.map l ~f:(fun a -> Some a) type t = { f1 : bool ; f2 : bool } [@@deriving type_directed_enumerate] type t_var = | A | B of bool * bool [@@deriving type_...
620b26fa7b22d66c19bcc1d40261a15c33e993d431bf4c2ee0a0680e32367b6a
racket/typed-racket
define-new-subtype.rkt
#; (exn-pred #rx"expected: Radians.*given: Degrees") #lang typed/racket/base (require "../succeed/define-new-subtype.rkt") (sin (degrees 0))
null
https://raw.githubusercontent.com/racket/typed-racket/1c2da7b7fc3e4b8779cdc3bd670f2e08e460ed1b/typed-racket-test/external/fail/define-new-subtype.rkt
racket
(exn-pred #rx"expected: Radians.*given: Degrees") #lang typed/racket/base (require "../succeed/define-new-subtype.rkt") (sin (degrees 0))
0c55dedd85c41b02cd3b47e98c813d53e048ff8d398e84fca9da521986a643d0
crategus/cl-cffi-gtk
rtest-gtk-text-iter.lisp
(def-suite gtk-text-iter :in gtk-suite) (in-suite gtk-text-iter) (defvar *gtk-text-iter-sample-text* "Weit hinten, hinter den Wortbergen, fern der Länder Vokalien und Konsonantien leben die Blindtexte. Abgeschieden wohnen Sie in Buchstabenhausen an der Küste des Semantik, eines großen Sprachozeans. Ein kleines Bächl...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/test/rtest-gtk-text-iter.lisp
lisp
GtkTextIter gtk_text_iter_get_buffer gtk_text_iter_copy gtk_text_iter_assign gtk_text_iter_free gtk_text_iter_get_offset gtk_text_iter_set_offset gtk_text_iter_get_line gtk_text_iter_set_line gtk_text_iter_get_line_offset gtk_text_iter_set_line_offset gtk_text_iter...
(def-suite gtk-text-iter :in gtk-suite) (in-suite gtk-text-iter) (defvar *gtk-text-iter-sample-text* "Weit hinten, hinter den Wortbergen, fern der Länder Vokalien und Konsonantien leben die Blindtexte. Abgeschieden wohnen Sie in Buchstabenhausen an der Küste des Semantik, eines großen Sprachozeans. Ein kleines Bächl...
6b6bca49043cf3ca992fd109fd66c162e7afe78dafde664f220a18ae34a7f737
conscell/hugs-android
Tree.hs
----------------------------------------------------------------------------- -- | -- Module : Data.Tree Copyright : ( c ) The University of Glasgow 2002 -- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : -- Stability : experimental -- Portability : portable -- -- ...
null
https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/base/Data/Tree.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Tree License : BSD-style (see the file libraries/base/LICENSE) Maintainer : Stability : experimental Portability : portable Multi-way trees (/aka/ rose trees) and forests. ---------------------------...
Copyright : ( c ) The University of Glasgow 2002 module Data.Tree( Tree(..), Forest, * Two - dimensional drawing drawTree, drawForest, flatten, levels, unfoldTree, unfoldForest, unfoldTreeM, unfoldForestM, unfoldTreeM_BF, unfoldForestM_BF, ) where import Control.Applicative (Applicative(..), (<...
ebf8157de127ca6b9563f01b14a41a5d0f3e02a91d9d73034d405d5753c6ab15
cryptosense/pkcs11
p11_driver.ml
open P11 exception CKR of RV.t let () = Printexc.register_printer (function | CKR s -> Some (RV.to_string s) | _ -> None) module type S = sig val initialize : unit -> unit val initialize_nss : params:Pkcs11.Nss_initialize_arg.u -> unit val finalize : unit -> unit val get_info : unit -> Info.t ...
null
https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/driver/p11_driver.ml
ocaml
Order does not matter. Do not call c_FindObjectFinal. returns [public,private]
open P11 exception CKR of RV.t let () = Printexc.register_printer (function | CKR s -> Some (RV.to_string s) | _ -> None) module type S = sig val initialize : unit -> unit val initialize_nss : params:Pkcs11.Nss_initialize_arg.u -> unit val finalize : unit -> unit val get_info : unit -> Info.t ...
7827d7bf8c3a431969f511c6e13e8386c97e217f0aea229debbafb9798bc9da8
crategus/cl-cffi-gtk
text-view-insert.lisp
Text View Insert ( 2021 - 6 - 4 ) (in-package :gtk-example) (defvar *text-for-example-text-view-insert* "<html> <head><title>Title</title></head> <body> <h1>Heading</h1> ") (defun get-this-tag (iter buffer) (let* ((start-tag (gtk-text-iter-copy iter)) end-tag) (and (gtk-text-iter-find-ch...
null
https://raw.githubusercontent.com/crategus/cl-cffi-gtk/b613a266a5f8e7f477b66a33d4df84fbed3dc7bc/demo/gtk-example/text-view-insert.lisp
lisp
Insert text before and after the selection Insert start tag Insert end tag Add the anonymous mark with right gravity Do the insertion at the position of the mark Reselect the previous selection Delete the mark Insert at start and end of current line Move to the start of the line Move to the end of the line P...
Text View Insert ( 2021 - 6 - 4 ) (in-package :gtk-example) (defvar *text-for-example-text-view-insert* "<html> <head><title>Title</title></head> <body> <h1>Heading</h1> ") (defun get-this-tag (iter buffer) (let* ((start-tag (gtk-text-iter-copy iter)) end-tag) (and (gtk-text-iter-find-ch...
9d49129ed244a80c5b191237e2fb0fa551ac009bbdb3d4715fbe44716a4d0b9f
ocaml-flambda/ocaml-jst
polling_insertion.ml
(* TEST modules = "polling.c" compare_programs = "false" * poll-insertion ** arch64 *** native *) This set of tests examine poll insertion behaviour . We do this by requesting and checking the number of minor collections at various points to determine whether a poll was correctly added . The...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/1bb6c797df7c63ddae1fc2e6f403a0ee9896cc8e/testsuite/tests/asmcomp/polling_insertion.ml
ocaml
TEST modules = "polling.c" compare_programs = "false" * poll-insertion ** arch64 *** native This function tests that polls are added to loops This function should have no prologue poll but will have one in the loop. this function does not have indirect or 'forward' tail call nor does it c...
This set of tests examine poll insertion behaviour . We do this by requesting and checking the number of minor collections at various points to determine whether a poll was correctly added . There are some subtleties because [ caml_empty_minor_heap ] will not increment the minor_collections stat if ...
f415a214361b0100adec9d5fb257e2ff82e7161b9086b4711c5eec92dcd0a221
mattmundell/nightshade
support.lisp
;;; Machine specific support routines needed by the file assembler. (in-package "HPPA") (def-vm-support-routine generate-call-sequence (name style vop) (ecase style (:raw (let ((fixup (gensym "FIXUP-"))) (values `((let ((fixup (make-fixup ',name :assembly-routine))) (inst ldil fixup ,fixup) ...
null
https://raw.githubusercontent.com/mattmundell/nightshade/d8abd7bd3424b95b70bed599e0cfe033e15299e0/src/assembly/hppa/support.lisp
lisp
Machine specific support routines needed by the file assembler.
(in-package "HPPA") (def-vm-support-routine generate-call-sequence (name style vop) (ecase style (:raw (let ((fixup (gensym "FIXUP-"))) (values `((let ((fixup (make-fixup ',name :assembly-routine))) (inst ldil fixup ,fixup) (inst ble fixup lisp-heap-space ,fixup :nullify t)) (inst nop)...
e48061ffa62d09887cd87b656fa965f17c179efe1cc14dcb508f296424710a4f
uim/uim
tutcode-custom.scm
;;; tutcode-custom.scm: Customization variables for tutcode.scm ;;; Copyright ( c ) 2003 - 2013 uim Project ;;; ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: 1 . Redistributions...
null
https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/scm/tutcode-custom.scm
scheme
tutcode-custom.scm: Customization variables for tutcode.scm All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: notice, this list of conditions and the following disclaimer. notice, this list ...
Copyright ( c ) 2003 - 2013 uim Project 1 . Redistributions of source code must retain the above copyright 2 . Redistributions in binary form must reproduce the above copyright 3 . Neither the name of authors nor the names of its contributors THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR...
d1e528c58e81236a0ea905ab35af223adfe81a4378676d9f891d932a777af2c6
noinia/hgeometry
Properties.hs
{-# LANGUAGE ImpredicativeTypes #-} # LANGUAGE UnicodeSyntax # -------------------------------------------------------------------------------- -- | -- Module : Geometry.Properties Copyright : ( C ) -- License : see the LICENSE file Maintainer : -- Defines some generic geometric properties...
null
https://raw.githubusercontent.com/noinia/hgeometry/46084245edc2b335c809f6ebc04ff5e52731a436/hgeometry/src/Geometry/Properties.hs
haskell
# LANGUAGE ImpredicativeTypes # ------------------------------------------------------------------------------ | Module : Geometry.Properties License : see the LICENSE file Intersection types. ------------------------------------------------------------------------------ -------------------------------...
# LANGUAGE UnicodeSyntax # Copyright : ( C ) Maintainer : Defines some generic geometric properties e.g. Dimensions , NumType , and module Geometry.Properties( module Data.Intersection , Dimension , NumType )...
8815ef8e0344a78dbee8132852dda08a07e514371248cc3d38a280f67ddb5336
ghcjs/ghcjs-dom
RTCPeerConnectionIceEvent.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.RTCPeerConnectionIceEvent (js_getCandidate, getCandidate, getCandidateUnsafe, g...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/RTCPeerConnectionIceEvent.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.RTCPeerConnectionIceEvent (js_getCandidate, getCandidate, getCandidateUnsafe, getCandidateUnchecked, RTCPeerConnectionIceEvent(..), gTypeRTCPeerConnectionIceEvent) ...
cae4a514a0d3a913a62ba426971a5a32d4936eea662e12d27b5b282f19f8804d
CardanoSolutions/ogmios
Tracers.hs
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. # LANGUAGE TypeOperators # # OPTIONS_GHC -fno - warn - unticked - promoted - constructors # {-# OPTIONS_HADDOCK prune #-} -- | This module...
null
https://raw.githubusercontent.com/CardanoSolutions/ogmios/184bb9e9a66e30c7485482a530ad68c8851d317c/server/modules/contra-tracers/src/Data/Generics/Tracers.hs
haskell
# OPTIONS_HADDOCK prune # | This module provides a way to generically define and configure multiple tracers for multiple logging components. This is useful in order to associate separate configuration (e.g. minimum severity) to tracers corresponding to different parts of an application. For example, in a webserve...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. # LANGUAGE TypeOperators # # OPTIONS_GHC -fno - warn - unticked - promoted - constructors # boilerplate and repetitions . This module ma...
dfb4d0a1cbc7f83d4ec874c73723d8f580890c809f6172a42764587fdec10ebc
justinethier/cyclone
delay-promise.scm
TODO : support for concurrent delay and promise as implemented by Clojure ;; See: -concurrency/ (import (scheme write) (scheme base) (cyclone concurrent) (srfi 18)) (define-record-type <shared-delay> (%make-shared-delay done result lock) shared-delay? (done sd:done sd:set-done!) (value sd:value sd:set-value...
null
https://raw.githubusercontent.com/justinethier/cyclone/a1c2a8f282f37ce180a5921ae26a5deb04768269/libs/cyclone/delay-promise.scm
scheme
See: -concurrency/ Either thunk or result Exec thunk and store result Promises Blocks until given promise has a value, and returns that value. wait until value is ready Delivers `value` to shared promise `obj` and unblocks waiting threads. Has no effect if a value has already been delivered.
TODO : support for concurrent delay and promise as implemented by Clojure (import (scheme write) (scheme base) (cyclone concurrent) (srfi 18)) (define-record-type <shared-delay> (%make-shared-delay done result lock) shared-delay? (done sd:done sd:set-done!) (lock sd:lock sd:set-lock!)) (define (make-shared...
04ab38fd98ce4e2c595e9983b09014b0add510d747e806da64980a0c3eb0ff30
janestreet/core
linked_queue.ml
open! Import module Queue = Base.Linked_queue include Queue include Bin_prot.Utils.Make_iterable_binable1 (struct type 'a t = 'a Queue.t type 'a el = 'a [@@deriving bin_io] let caller_identity = Bin_prot.Shape.Uuid.of_string "800df9a0-4992-11e6-881d-ffe1a5c8aced" ;; let module_name = Some "...
null
https://raw.githubusercontent.com/janestreet/core/b0be1daa71b662bd38ef2bb406f7b3e70d63d05f/core/src/linked_queue.ml
ocaml
Bin_prot reads the elements in the same order they were written out, as determined by [iter]. So, we can ignore the index and just enqueue each element as it is read in.
open! Import module Queue = Base.Linked_queue include Queue include Bin_prot.Utils.Make_iterable_binable1 (struct type 'a t = 'a Queue.t type 'a el = 'a [@@deriving bin_io] let caller_identity = Bin_prot.Shape.Uuid.of_string "800df9a0-4992-11e6-881d-ffe1a5c8aced" ;; let module_name = Some "...
d00d133b35b87e6272ae48ab9afa39e4fa26fb75af42003863b16323d2343909
mirage/irmin
test.ml
* Copyright ( c ) 2013 - 2022 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
null
https://raw.githubusercontent.com/mirage/irmin/9bcce092a500e7e7e88dab3e0240091488e46abe/test/irmin-git/test.ml
ocaml
* Copyright ( c ) 2013 - 2022 < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . * * THE SOFTWARE IS PROVIDED " AS IS " AND...
17982b1274b684b58e74e214effd92b92930301836420697e5cdd381ddb94890
sbelak/huri
core_test.clj
(ns huri.core-test (:require [clojure.test :refer :all] [huri.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/sbelak/huri/a242d9d044dfa1c03691b5362bb94fc6fba20f30/test/huri/core_test.clj
clojure
(ns huri.core-test (:require [clojure.test :refer :all] [huri.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
417193e364603519800eddf4d45a24e473b6124e82f91ea1c5f3dc2dff855bda
r0man/netcdf-clj
datafy.clj
(ns netcdf.datafy (:require [clojure.core.protocols :refer [Datafiable]] [clojure.datafy :refer [datafy]])) (extend-type ucar.ma2.DataType Datafiable (datafy [data-type] (keyword (str data-type)))) (extend-type ucar.nc2.Attribute Datafiable (datafy [attribute] {:name (.getName attribute)...
null
https://raw.githubusercontent.com/r0man/netcdf-clj/ccca7047e849ca13266ad6bbbdc003eb52d6de16/src/netcdf/datafy.clj
clojure
(ns netcdf.datafy (:require [clojure.core.protocols :refer [Datafiable]] [clojure.datafy :refer [datafy]])) (extend-type ucar.ma2.DataType Datafiable (datafy [data-type] (keyword (str data-type)))) (extend-type ucar.nc2.Attribute Datafiable (datafy [attribute] {:name (.getName attribute)...
9b8d60ba5fcb96a935b892a46f743f95351c4f0f51ff21842d2bba768eabc925
maximedenes/native-coq
detyping.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/maximedenes/native-coq/3623a4d9fe95c165f02f7119c0e6564a83a9f4c9/pretyping/detyping.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** ************************************...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Pp open Errors open Util...
903995929bc30b607a40eb542e1d663c510852c45b0272cd1667c5dbab6c1e88
haskell-opengl/OpenGLRaw
TextureObject.hs
# LANGUAGE PatternSynonyms # -------------------------------------------------------------------------------- -- | -- Module : Graphics.GL.EXT.TextureObject Copyright : ( c ) 2019 -- License : BSD3 -- Maintainer : < > -- Stability : stable -- Portability : portable -- ------------------...
null
https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/EXT/TextureObject.hs
haskell
------------------------------------------------------------------------------ | Module : Graphics.GL.EXT.TextureObject License : BSD3 Stability : stable Portability : portable ------------------------------------------------------------------------------ * Extension Support * Enums * Functions
# LANGUAGE PatternSynonyms # Copyright : ( c ) 2019 Maintainer : < > module Graphics.GL.EXT.TextureObject ( glGetEXTTextureObject, gl_EXT_texture_object, pattern GL_TEXTURE_1D_BINDING_EXT, pattern GL_TEXTURE_2D_BINDING_EXT, pattern GL_TEXTURE_3D_BINDING_EXT, pattern GL_TEXTURE_PRIORITY_EX...
1a69e01e1ebd8b008b5ad5df57ba62e063ff17e785b4f9596560eed6eb395f87
facebook/duckling
Corpus.hs
Copyright ( c ) 2016 - present , Facebook , Inc. -- All rights reserved. -- -- This source code is licensed under the BSD-style license found in the -- LICENSE file in the root directory of this source tree. {-# LANGUAGE OverloadedStrings #-} module Duckling.Ordinal.DE.Corpus ( corpus , negativeCorpus ) wher...
null
https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Ordinal/DE/Corpus.hs
haskell
All rights reserved. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. # LANGUAGE OverloadedStrings #
Copyright ( c ) 2016 - present , Facebook , Inc. module Duckling.Ordinal.DE.Corpus ( corpus , negativeCorpus ) where import Prelude import Data.String import Duckling.Locale import Duckling.Ordinal.Types import Duckling.Resolve import Duckling.Testing.Types corpus :: Corpus corpus = (testContext {locale =...
b66431cffa712e3909b6c93b5c366a6556018516269563265a2790d8f098c073
marcoheisig/sealable-metaobjects
sealable-generic-function.lisp
(in-package #:sealable-metaobjects) (defclass sealable-generic-function (sealable-metaobject-mixin generic-function) ((%sealed-domains :initform '() :type list :reader sealed-domains :writer (setf %sealed-domains))) (:default-initargs :method-class (find-class 'potentially-sealable-method)) (:...
null
https://raw.githubusercontent.com/marcoheisig/sealable-metaobjects/e09ec97252e0844528f61abdc0c7ee256875f8ee/code/sealable-generic-function.lisp
lisp
Check that the supplied domain is sane. Ensure that we don't seal any domain more than once. Ensure that the generic function is sealed, and that the newly sealed domain is disjoint from other domains. Ensure that the length of the domain matches the number of mandatory arguments of the generic function. Attempt...
(in-package #:sealable-metaobjects) (defclass sealable-generic-function (sealable-metaobject-mixin generic-function) ((%sealed-domains :initform '() :type list :reader sealed-domains :writer (setf %sealed-domains))) (:default-initargs :method-class (find-class 'potentially-sealable-method)) (:...
5f2153418af076193400393e4e0fcb8ed27109cb08fabc93862bca5906c4a500
calyau/maxima
plotdf.lisp
plotdf.mac - Adds a function plotdf ( ) to Maxima , which draws a Direction Field for an ordinary 1st order differential equation , or for a system of two autonomous 1st order equations . ;; Copyright ( C ) 2004 , 2008 , 2011 < > ;; ;; This program is free software; you can redi...
null
https://raw.githubusercontent.com/calyau/maxima/9352a3f5c22b9b5d0b367fddeb0185c53d7f4d02/share/dynamics/plotdf.lisp
lisp
This program is free software; you can redistribute it and/or modify either version 2 of the License , or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTIC...
plotdf.mac - Adds a function plotdf ( ) to Maxima , which draws a Direction Field for an ordinary 1st order differential equation , or for a system of two autonomous 1st order equations . Copyright ( C ) 2004 , 2008 , 2011 < > it under the terms of the GNU General Public License ...
8f6f66fa704c0740ea5ba9e974b2346129fa2c12b436ac44971ee17581a1db7a
deadpendency/deadpendency
CheckRunCreateRequest.hs
module Common.Effect.GitHub.WriteChecks.Model.CheckRunCreateRequest ( CheckRunCreateRequest (..), ) where import Common.Aeson.Aeson import Common.Model.Git.GitSha import Common.Model.GitHub.GHAppInstallationId import Common.Model.GitHub.GHNodeId import Data.Aeson data CheckRunCreateRequest = CheckRunCreateRequest...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Effect/GitHub/WriteChecks/Model/CheckRunCreateRequest.hs
haskell
module Common.Effect.GitHub.WriteChecks.Model.CheckRunCreateRequest ( CheckRunCreateRequest (..), ) where import Common.Aeson.Aeson import Common.Model.Git.GitSha import Common.Model.GitHub.GHAppInstallationId import Common.Model.GitHub.GHNodeId import Data.Aeson data CheckRunCreateRequest = CheckRunCreateRequest...
cc803facd31faaff8875f72943e35566bfb5472c420422e47f005526d676598c
rd--/hsc3
Array.hs
{- | Array variants of "Sound.Sc3.Common.Buffer". These functions have the same names as the plain forms and are not re-exported by "Sound.Sc3.Common". -} module Sound.Sc3.Common.Buffer.Array where import qualified Data.Array as A {- array -} import qualified Sound.Sc3.Common.Buffer as Common.Buffer {- hsc3 -} -- |...
null
https://raw.githubusercontent.com/rd--/hsc3/65b0ae5422dfd9c6458c5a97dfb416ab80bd7a72/Sound/Sc3/Common/Buffer/Array.hs
haskell
| Array variants of "Sound.Sc3.Common.Buffer". These functions have the same names as the plain forms and are not re-exported by "Sound.Sc3.Common". array hsc3 | 'Common.Buffer.clipAt'.
module Sound.Sc3.Common.Buffer.Array where clipAt :: Int -> A.Array Int a -> a clipAt ix c = let (l,r) = A.bounds c f = (A.!) c in if ix < l then f l else if ix > r then f r else f ix | ' C.blendAtBy ' of ' clipAt ' . > Sound . Sc3.Common . Buffer . Array.blendAt 0 ( ( 0,2 ) [ 2,5,6 ] ) = = 2 ...
8d1182d88cab96dae5e2fa6b40b6926f7a602d05bb26164bb11bb2c0062c7983
factisresearch/mq-demo
SafeCopy.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # {-# LANGUAGE RankNTypes #-} # LANGUAGE CPP # module Mgw.Util.SafeCopy ( module Data.SafeCopy , safeEncode, safeEncode', safeDecode, safeDecode', safeDecodeLazy , vectorToOSMap, osMapToVector, seqToVector, vectorToSeq , get...
null
https://raw.githubusercontent.com/factisresearch/mq-demo/0efa1991ca647a86a8c22e516a7a1fb392ab4596/server/src/lib/Mgw/Util/SafeCopy.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE RankNTypes # -------------------------------------- LOCAL -------------------------------------- -------------------------------------- SITE-PACKAGES -------------------------------------- -------------------------------------- STDLIB -------------------------------------- _ <- ...
# LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # # LANGUAGE CPP # module Mgw.Util.SafeCopy ( module Data.SafeCopy , safeEncode, safeEncode', safeDecode, safeDecode', safeDecodeLazy , vectorToOSMap, osMapToVector, seqToVector, vectorToSeq , getMap, putMap , getOSMap, putOSMap , getSeq, putSeq ...
93a57de5dd61636a1dd24b5bcff3ae7c3527e2bfd7c9b2a3529b22e8666d5765
hannesm/duration
duration.ml
type t = int64 let of_us_64 m = if m < 0L then invalid_arg "negative" ; if Int64.compare m 0x4189374BC6A7EDL = 1 then invalid_arg "out of range" ; Int64.mul 1_000L m let of_us m = of_us_64 (Int64.of_int m) let of_ms_64 m = if m < 0L then invalid_arg "negative" ; if Int64.compare m 0x10C6F7A0B5E...
null
https://raw.githubusercontent.com/hannesm/duration/4df04ce6f2d8cb2f798d19e1d2da3ce9246d37ec/duration.ml
ocaml
if m > 0 then if us > 0 then
type t = int64 let of_us_64 m = if m < 0L then invalid_arg "negative" ; if Int64.compare m 0x4189374BC6A7EDL = 1 then invalid_arg "out of range" ; Int64.mul 1_000L m let of_us m = of_us_64 (Int64.of_int m) let of_ms_64 m = if m < 0L then invalid_arg "negative" ; if Int64.compare m 0x10C6F7A0B5E...
a0d55bc458f4e142235db736fed98e9e16c74f24cf13e970abb5a2ebfaa62811
ghc/hsc2hs
Flags.hs
module Flags where import System.Console.GetOpt data Mode = Help | Version | UseConfig (ConfigM Maybe) newtype Id a = Id { fromId :: a } type Config = ConfigM Id data ConfigM m = Config { cmTemplate :: m FilePath, cmCompiler :: m FilePath, ...
null
https://raw.githubusercontent.com/ghc/hsc2hs/0b44990f0282755b75091838363ad4a1f4cb245d/Flags.hs
haskell
module Flags where import System.Console.GetOpt data Mode = Help | Version | UseConfig (ConfigM Maybe) newtype Id a = Id { fromId :: a } type Config = ConfigM Id data ConfigM m = Config { cmTemplate :: m FilePath, cmCompiler :: m FilePath, ...
f8717145502badc4dc8ea365c644b3b74424a511c48c80b345eab890284ab63d
nallen05/djula
run.lisp
djula-test::!run-compile-tokens-test
null
https://raw.githubusercontent.com/nallen05/djula/331e2d5b0c9967b636e4df22e847ac98f16f6ba9/test/2-compile-tokens-group/run.lisp
lisp
djula-test::!run-compile-tokens-test
0a142d70db5995b6230ec1bce1c68de64a875e42b795c521795cf81747508e4c
melange-re/melange
test_is_js.ml
let v = #if BS then true #else false #end let suites : Mt.pair_suites ref = ref [] let test_id = ref 0 let eq loc x y = Mt.eq_suites ~test_id ~suites loc x y let b loc x = Mt.bool_suites ~test_id ~suites loc x;; #if 1 then b __LOC__ true;; #end #if 0 then b __LOC__ false ;; #end #if 1 > 0 then ...
null
https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/test/test_is_js.ml
ocaml
let v = #if BS then true #else false #end let suites : Mt.pair_suites ref = ref [] let test_id = ref 0 let eq loc x y = Mt.eq_suites ~test_id ~suites loc x y let b loc x = Mt.bool_suites ~test_id ~suites loc x;; #if 1 then b __LOC__ true;; #end #if 0 then b __LOC__ false ;; #end #if 1 > 0 then ...
99e8b3878530eda21d896eb940d96e640e9702360c6feb727909b290f0ab83cb
boris-ci/boris
Log.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} module Boris.Core.Data.Log ( Log (..) ) where import Boris.Prelude import Data.Text (Text) import Data.Time (UTCTime) data Log = LogEvent !UTCTime !Text | LogEOF deriving (Eq, Ord, Show)
null
https://raw.githubusercontent.com/boris-ci/boris/c321187490afc889bf281442ac4ef9398b77b200/boris-core/src/Boris/Core/Data/Log.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE NoImplicitPrelude # module Boris.Core.Data.Log ( Log (..) ) where import Boris.Prelude import Data.Text (Text) import Data.Time (UTCTime) data Log = LogEvent !UTCTime !Text | LogEOF deriving (Eq, Ord, Show)
e90576b163a6b290ce73c75af1cc789fd9a374b718ce8bcd0c6493625bfcc680
inconvergent/weird
canvas.lisp
(in-package :canvas) (defmacro -do-op ((canv size vals indfx) &body body) (declare (symbol canv size vals indfx)) (alexandria:with-gensyms (sname) `(let* ((,sname ,canv) (,size (canvas-size ,sname)) (,vals (canvas-vals ,sname)) (,indfx (canvas-indfx ,sname))) (declar...
null
https://raw.githubusercontent.com/inconvergent/weird/106d154ec2cd0e4ec977c3672ba717d6305c1056/src/draw/canvas.lisp
lisp
(in-package :canvas) (defmacro -do-op ((canv size vals indfx) &body body) (declare (symbol canv size vals indfx)) (alexandria:with-gensyms (sname) `(let* ((,sname ,canv) (,size (canvas-size ,sname)) (,vals (canvas-vals ,sname)) (,indfx (canvas-indfx ,sname))) (declar...
323573cfc0d08e3c5945b403c2ef707730a6bd85e466314009257720017dffe0
esl/MongooseIM
mongoose_client_api_rooms_config.erl
-module(mongoose_client_api_rooms_config). -behaviour(mongoose_client_api). -export([routes/0]). -behaviour(cowboy_rest). -export([trails/0, init/2, is_authorized/2, content_types_accepted/2, allowed_methods/2, from_json/2]). -ignore_xref([from_json/2, trails/0]). -impor...
null
https://raw.githubusercontent.com/esl/MongooseIM/a9ee17fc6d596c4b4cccaa47782c6bfcadfd2190/src/mongoose_client_api/mongoose_client_api_rooms_config.erl
erlang
@doc Called for a method of type "PUT"
-module(mongoose_client_api_rooms_config). -behaviour(mongoose_client_api). -export([routes/0]). -behaviour(cowboy_rest). -export([trails/0, init/2, is_authorized/2, content_types_accepted/2, allowed_methods/2, from_json/2]). -ignore_xref([from_json/2, trails/0]). -impor...
f247e6fb1aaaedb338339e2bac76ee6f1e0a5c8e99032c9e91a774cd40cf3dd1
ucsd-progsys/dsolve
demo_combinations.ml
let rec len xs = match xs with | [] -> 0 | x::xs -> 1 + len xs let rec zip xs ys = match xs, ys with | [], [] -> [] | x::xs, y::ys -> (x,y)::(zip xs ys) | [] ,_::_ -> assert (0=1); assert false | _::_, [] -> assert (0=1); assert false let rec clone x n = let _ = assert (n >= 0) in if ...
null
https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/proceedings-demos/demo/demo_combinations.ml
ocaml
let rec len xs = match xs with | [] -> 0 | x::xs -> 1 + len xs let rec zip xs ys = match xs, ys with | [], [] -> [] | x::xs, y::ys -> (x,y)::(zip xs ys) | [] ,_::_ -> assert (0=1); assert false | _::_, [] -> assert (0=1); assert false let rec clone x n = let _ = assert (n >= 0) in if ...
04f5b4940acd572aa1108702c9783de6c6a611f099770d848e8ff95fd5d69704
JeffreyBenjaminBrown/hode
Karpov.hs
by , with trivial modifications by jbb -- -simple-imperative-language.html # LANGUAGE ScopedTypeVariables # module Parse where import Control.Monad (void) import Control.Monad.Combinators.Expr import Data.List (intersperse) import Data.Void (Void) import Text.Meg...
null
https://raw.githubusercontent.com/JeffreyBenjaminBrown/hode/79a54a6796fa01570cde6903b398675c42954e62/_hiding/guidance/Karpov.hs
haskell
-simple-imperative-language.html | parses a semicolon `string` backtracks upon failure without `try`, expressions like many identifier would fail on such identifiers instead of just stopping. | does not accept the empty string | The top-level parser. (The language is called "while".) | = Parsing expressions
by , with trivial modifications by jbb # LANGUAGE ScopedTypeVariables # module Parse where import Control.Monad (void) import Control.Monad.Combinators.Expr import Data.List (intersperse) import Data.Void (Void) import Text.Megaparsec import Text.Megapa...
a22b62f5d6bb75ee41c30040afadd3cff83dd4fd862f18c2846677cb957fa949
solita/mnt-teet
itemlist.cljs
(ns teet.ui.itemlist (:require [herb.core :refer [<class]] [reagent.core :as r] [teet.common.common-styles :as common-styles] [teet.localization :refer [tr]] [teet.theme.itemlist-styles :as itemlist-styles] [teet.theme.theme-colors :as theme-colors] ...
null
https://raw.githubusercontent.com/solita/mnt-teet/7a5124975ce1c7f3e7a7c55fe23257ca3f7b6411/app/frontend/src/cljs/teet/ui/itemlist.cljs
clojure
(ns teet.ui.itemlist (:require [herb.core :refer [<class]] [reagent.core :as r] [teet.common.common-styles :as common-styles] [teet.localization :refer [tr]] [teet.theme.itemlist-styles :as itemlist-styles] [teet.theme.theme-colors :as theme-colors] ...