_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
9013578204a9ef032fe84697c73b60627053cde841ac12185cadee67852f61d2
let-def/grenier
physh.mli
* and sets using objects addresses and physical equality , and * behave well with OCaml GC . * * This is useful to observe sharing , traverse cyclic structures , ... * Highly experimental , this relies on a lot of GC internals ! * * Hashtables and sets using objects addresses and physical equalit...
null
https://raw.githubusercontent.com/let-def/grenier/3391e5e31db88e587100436e9407881fb8ef7873/physh/physh.mli
ocaml
* and sets using objects addresses and physical equality , and * behave well with OCaml GC . * * This is useful to observe sharing , traverse cyclic structures , ... * Highly experimental , this relies on a lot of GC internals ! * * Hashtables and sets using objects addresses and physical equalit...
a0108ae25e38ce1b4eb3bb8fa1407de98e0904f00105e4e1bf288119f54b96e6
dterei/SafeHaskellExamples
TypeClassSafe.hs
{-# LANGUAGE Safe #-} -- | Module defining a new typeclass that has a safe interface. Also define the Int and instances . module TypeClassSafe where -- | Safe interface but can still do an unsafe implementation. class SafeClass a where same :: a -> a instance SafeClass Int where same = id instance SafeC...
null
https://raw.githubusercontent.com/dterei/SafeHaskellExamples/0f7bbb53cf1cbb8419ce3a4aa4258b84be30ffcc/typeclasses/TypeClassSafe.hs
haskell
# LANGUAGE Safe # | Module defining a new typeclass that has a safe interface. Also define the | Safe interface but can still do an unsafe implementation.
Int and instances . module TypeClassSafe where class SafeClass a where same :: a -> a instance SafeClass Int where same = id instance SafeClass Char where same = id
689c7c9be82b05ec5a072dbb2872608985d3a2c9da308a9f718a2d36538646b5
nuprl/gradual-typing-performance
matrix.rkt
#lang racket/base (require htdp/matrix) (provide (all-from-out htdp/matrix))
null
https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/pre-benchmark/ecoop/htdp-lib/teachpack/htdp/matrix.rkt
racket
#lang racket/base (require htdp/matrix) (provide (all-from-out htdp/matrix))
1ec70a1d9fc6cc2c8122363e6f90b09c207b1d39ebf3a7afbb29afb5bfc187e8
schell/aeson-tiled
ParseObjectSpec.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeApplications # module ParseObjectSpec where import Data.Aeson (encode, eitherDecode) import Test.Hspec import Data.Either (isRight) import Control.Monad (forM_) import qualified Data.ByteString.Lazy.Char8 as C8 import Data.Aeson.Tiled file :: FilePath file = "maps...
null
https://raw.githubusercontent.com/schell/aeson-tiled/e782189f222bae594cf8424d3d892e7217ab7c75/test/ParseObjectSpec.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeApplications # module ParseObjectSpec where import Data.Aeson (encode, eitherDecode) import Test.Hspec import Data.Either (isRight) import Control.Monad (forM_) import qualified Data.ByteString.Lazy.Char8 as C8 import Data.Aeson.Tiled file :: FilePath file = "maps/objects/obj1.json" spec :: Spec s...
41544340de07eaa9ea7f84d4e07821fbb9de3dfec147baa745734e6d1eef14c8
S8A/htdp-exercises
ex209.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex209) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "univers...
null
https://raw.githubusercontent.com/S8A/htdp-exercises/578e49834a9513f29ef81b7589b28081c5e0b69f/ex209.rkt
racket
about the language level of this file in a form that our tools can easily process. A Word is ... A List-of-words is ... Word -> List-of-words finds all rearrangements of word List-of-strings -> Boolean String -> List-of-strings finds all words that the letters of some given word spell (check-member-of (alternat...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-beginner-abbr-reader.ss" "lang")((modname ex209) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp") (lib "batch-io.rkt" "teachpack" "2htdp") (lib "itunes.rkt"...
2f65e1f98d1e8c851e1d7dcbb58f8e262746bf311adeb26c0d3e7310aca863ec
stuhlmueller/jschurch
tuplespace.scm
;;; ;;; tuplespace.scm ;;; (define-module tuplespace (use util.match) (use srfi-1) (use gauche.threads) (export tuplespace-unsafe-query? <tuplespace> tuplespace-init tuplespace-write tuplespace-read tuplespace-readp tuplespace-read-async tuplespace-take tuplespace-takep tuplespace-take-a...
null
https://raw.githubusercontent.com/stuhlmueller/jschurch/58a94802ba987c92cb81e556341f86dba66a8fd1/external/biwascheme/tuplespace/tuplespace.scm
scheme
tuplespace.scm class () = no super class () = no super class methods utility init write read take wait will be called when a tuple is found blocks until mutex is unlocked dump clear
(define-module tuplespace (use util.match) (use srfi-1) (use gauche.threads) (export tuplespace-unsafe-query? <tuplespace> tuplespace-init tuplespace-write tuplespace-read tuplespace-readp tuplespace-read-async tuplespace-take tuplespace-takep tuplespace-take-async tuplespace-dump tup...
1ac4708d78b58c7556de595f7c1fedb8c975bd0ce94f53fea28adaddd3095504
alan-j-hu/ocaml-textmate-language
tmLanguage.mli
type t * The collection of TextMate grammars . type grammar (** A TextMate grammar. *) exception Error of string [@ocaml.warn_on_literal_pattern] (** The error message is purely informational and is not to be matched on. *) type plist = [ `Bool of bool | `Data of string | `Date of float * float option | `Flo...
null
https://raw.githubusercontent.com/alan-j-hu/ocaml-textmate-language/4a75f7b8f41ab9d5f38598987f35a2991e0c3452/src/tmLanguage.mli
ocaml
* A TextMate grammar. * The error message is purely informational and is not to be matched on. * A JSON document. This is the same type as [value] defined in the {{:/} [ezjsonm]} package (as of version 1.2.0), but is reproduced here as not to depend on [ezjsonm]. * Creates an empty collection of grammars. *...
type t * The collection of TextMate grammars . type grammar exception Error of string [@ocaml.warn_on_literal_pattern] type plist = [ `Bool of bool | `Data of string | `Date of float * float option | `Float of float | `Int of int | `String of string | `Array of plist list | `Dict of (string * plist) ...
cf52808c781fdca7deef658e7ef097bdd28d9c9e54c1ac93c56d29b7f6562853
tonymorris/geo-gpx
MinlatL.hs
module Data.Geo.GPX.Lens.MinlatL where import Data.Geo.GPX.Type.Latitude import Data.Lens.Common class MinlatL a where minlatL :: Lens a Latitude
null
https://raw.githubusercontent.com/tonymorris/geo-gpx/526b59ec403293c810c2ba08d2c006dc526e8bf9/src/Data/Geo/GPX/Lens/MinlatL.hs
haskell
module Data.Geo.GPX.Lens.MinlatL where import Data.Geo.GPX.Type.Latitude import Data.Lens.Common class MinlatL a where minlatL :: Lens a Latitude
3e7b6eed7281eb9399a8a0de9492a29dca8e7889a3eff6838b3656f7205dd28c
andyhd/asteroids
asteroids.lisp
;;;; ASTeroids ; vim: ts=2 sts=2 sw=2 et ai (ql:quickload "lispbuilder-sdl") (ql:quickload "lispbuilder-sdl-gfx") (defpackage :asteroids (:use :cl :sdl) (:export main)) (in-package :asteroids) (defparameter *map-width* 640) (defparameter *map-height* 480) (defparameter *window* nil) (defparameter *window-width...
null
https://raw.githubusercontent.com/andyhd/asteroids/1584646a21cdecfdcef38903d7cef6239ea5522a/asteroids.lisp
lisp
ASTeroids vim: ts=2 sts=2 sw=2 et ai distance between point a and point b represents an object on the game map gradually reduce the probability of powerups appearing if a collision destroyed the ship, stop checking for collisions game over title screen game world pause text
(ql:quickload "lispbuilder-sdl") (ql:quickload "lispbuilder-sdl-gfx") (defpackage :asteroids (:use :cl :sdl) (:export main)) (in-package :asteroids) (defparameter *map-width* 640) (defparameter *map-height* 480) (defparameter *window* nil) (defparameter *window-width* 640) (defparameter *deceleration* 0.99) ...
b6a31095ebc0a18f5bdbeaf39b6a408c1bcff54577b60ca927e995b8bfefde11
rudymatela/conjure
Conjure.hs
-- | -- Module : Conjure Copyright : ( c ) 2021 License : 3 - Clause BSD ( see the file LICENSE ) Maintainer : < > -- -- A library for Conjuring function implementations -- from tests or partial definitions. -- (a.k.a.: functional inductive programming) -- -- This is currently an experimenta...
null
https://raw.githubusercontent.com/rudymatela/conjure/9d2167e758e72b6be5970bc33f6b9e893fc5874f/src/Conjure.hs
haskell
| Module : Conjure A library for Conjuring function implementations from tests or partial definitions. (a.k.a.: functional inductive programming) This is currently an experimental tool in its early stages, don't expect much from its current version. It is just a piece of curiosity in its current state. ...
Copyright : ( c ) 2021 License : 3 - Clause BSD ( see the file LICENSE ) Maintainer : < > Step 1 : declare your partial function > square 0 = 0 > square 1 = 1 > square 2 = 4 Step 2 : declare a list with the potential building blocks : Step 3 : call conjure and see your gen...
e15ecc378ede84e9bb1caaf5ad8d88fcee7049f25fcdaa78fdfe353e75848d81
lolepezy/rpki-prover
Time.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DerivingStrategies # # LANGUAGE DerivingVia # # LANGUAGE GeneralizedNewtypeDeriving # module RPKI.Time where import Data.Int import Data.Semigroup import Control.Monad.IO.Class (MonadIO, liftIO) import GHC.Generics (Generic) import ...
null
https://raw.githubusercontent.com/lolepezy/rpki-prover/63ca8911d72ebac48f4c3df3fab95f9e0278e933/src/RPKI/Time.hs
haskell
# LANGUAGE DeriveAnyClass # | Current time that is to be passed into the environment of validating functions cpuTime ::
# LANGUAGE DerivingStrategies # # LANGUAGE DerivingVia # # LANGUAGE GeneralizedNewtypeDeriving # module RPKI.Time where import Data.Int import Data.Semigroup import Control.Monad.IO.Class (MonadIO, liftIO) import GHC.Generics (Generic) import Data.Hourglass ...
b3c0f98f5f051f86c4673a32acdc11b0b523fd8099d6b0707287e39f430f3060
poroh/ersip
ersip_trans_se.erl
%% Copyright ( c ) 2017 , 2018 Dmitry Poroh %% All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . %% %% Side effects of transaction handlers %% -module(ersip_trans_se). -export([clear_trans/1, send_request/1, send_response/1, tu_result/1, ...
null
https://raw.githubusercontent.com/poroh/ersip/f1b0d3c5713fb063a6cc327ea493f06cff6a6e5e/src/transaction/ersip_trans_se.erl
erlang
All rights reserved. Side effects of transaction handlers =================================================================== Types =================================================================== =================================================================== API =========================================...
Copyright ( c ) 2017 , 2018 Dmitry Poroh Distributed under the terms of the MIT License . See the LICENSE file . -module(ersip_trans_se). -export([clear_trans/1, send_request/1, send_response/1, tu_result/1, set_timer/2 ]). -export_type([effect/0, clear_r...
a7ab1ae2ecd89d48dbf7f19a55eb5d6c74c1e66ef2cd06104af180033ff50789
hengchu/tiger-haskell
tigercanon.hs
-- Much of the code in this file is adapted from the ML version at here : /~appel/modern/ml/chap8/canon.sml module TigerCanon ( linearize , basicblocks , tracesched , canonicalize ) where import qualified TigerTemp as Tmp import TigerITree import TigerGenSymLabTmp import qualified Data.Map as Map im...
null
https://raw.githubusercontent.com/hengchu/tiger-haskell/ec6809500c245ea99d2329e8255a67bdb57cf579/src/tigercanon.hs
haskell
Much of the code in this file is adapted from
the ML version at here : /~appel/modern/ml/chap8/canon.sml module TigerCanon ( linearize , basicblocks , tracesched , canonicalize ) where import qualified TigerTemp as Tmp import TigerITree import TigerGenSymLabTmp import qualified Data.Map as Map import Control.Monad.Identity import Prelude hiding...
8e4e32690afff1d9b3260de8ac96624004df01f8b0198826a46bb4adc642666e
VictorNicollet/Ohm
configure.mli
Ohm is © 2011 type path = [ `Log | `Templates | `Resources ] exception Locked of path * string val root : string val get : path -> string val set : path -> string -> unit val lock : path -> string
null
https://raw.githubusercontent.com/VictorNicollet/Ohm/ca90c162f6c49927c893114491f29d44aaf71feb/src/configure.mli
ocaml
Ohm is © 2011 type path = [ `Log | `Templates | `Resources ] exception Locked of path * string val root : string val get : path -> string val set : path -> string -> unit val lock : path -> string
2f7a166c328b3ef71f9528df88afe610972ccd2b8cccc01ccbef209e87821ec1
fosskers/aura
O.hs
-- | Module : . Commands . O Copyright : ( c ) , 2012 - 2021 -- License : GPL3 Maintainer : < > -- -- Handle all @-O@ flags - those which involve orphan packages. module Aura.Commands.O ( displayOrphans, adoptPkg ) where import Aura.Core (Env(..), orphans, sudo) import Aura.IO (putTextLn) import Aur...
null
https://raw.githubusercontent.com/fosskers/aura/08cd46eaa598094f7395455d66690d3d8c59e965/haskell/aura/exec/Aura/Commands/O.hs
haskell
| License : GPL3 Handle all @-O@ flags - those which involve orphan packages. - | Print the result of @pacman -Qqdt@ | Identical to @-D --asexplicit@.
Module : . Commands . O Copyright : ( c ) , 2012 - 2021 Maintainer : < > module Aura.Commands.O ( displayOrphans, adoptPkg ) where import Aura.Core (Env(..), orphans, sudo) import Aura.IO (putTextLn) import Aura.Pacman (pacman) import Aura.Settings import Aura.Types import RIO displayOrphans :: Envi...
74d049565b8516b3a3a1c2b531409b293e289165cea84dc7864a6c21abf5d369
brandonchinn178/persistent-migration
Postgres.hs
| Module : Database . Persist . Migration . Postgres Maintainer : < > Stability : experimental Portability : portable Defines the migration backend for PostgreSQL . Module : Database.Persist.Migration.Postgres Maintainer : Brandon Chinn <> Stability : experimental Portabili...
null
https://raw.githubusercontent.com/brandonchinn178/persistent-migration/dd25379a9ba23e529dcaabc5947c3ad9a4f55110/src/Database/Persist/Migration/Postgres.hs
haskell
# LANGUAGE OverloadedStrings # The CREATE query with the default specified by AddColumn{colDefault} Helpers | Get the default value from the given ColumnProps. | Show a 'Column'.
| Module : Database . Persist . Migration . Postgres Maintainer : < > Stability : experimental Portability : portable Defines the migration backend for PostgreSQL . Module : Database.Persist.Migration.Postgres Maintainer : Brandon Chinn <> Stability : experimental Portabili...
cf71d42e3fff3e0e2c557c60b2f613061c25f1d9f66740acbd2997269e9f0847
deadpendency/deadpendency
PublishSimpleResultC.hs
module Common.Effect.PublishSimpleResult.Carrier.PublishSimpleResultC ( PublishSimpleResultIOC (..), ) where import Common.Effect.AppEventEmit.AppEventEmit import Common.Effect.AppEventEmit.Model.AppEventMessage import Common.Effect.PublishSimpleResult.Model.SimpleResult import Common.Effect.PublishSimpleResult.Pu...
null
https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Effect/PublishSimpleResult/Carrier/PublishSimpleResultC.hs
haskell
module Common.Effect.PublishSimpleResult.Carrier.PublishSimpleResultC ( PublishSimpleResultIOC (..), ) where import Common.Effect.AppEventEmit.AppEventEmit import Common.Effect.AppEventEmit.Model.AppEventMessage import Common.Effect.PublishSimpleResult.Model.SimpleResult import Common.Effect.PublishSimpleResult.Pu...
cd9d2229a30497287e909ec570bd58a4be813e9d099dc544a6e77e18c9762a58
elm-lang/elm-reactor
StaticFiles.hs
# OPTIONS_GHC -Wall # # LANGUAGE TemplateHaskell # module StaticFiles ( errors , index, indexPath , notFound, notFoundPath , favicon, faviconPath , waiting, waitingPath ) where import qualified Data.ByteString as BS import Data.FileEmbed (bsToExp) import Language.Haskell.TH (runIO) import S...
null
https://raw.githubusercontent.com/elm-lang/elm-reactor/6f15395aa307aaaf287919a326f4ffb31bb5eb4a/src/backend/StaticFiles.hs
haskell
PATHS RAW RESOURCES
# OPTIONS_GHC -Wall # # LANGUAGE TemplateHaskell # module StaticFiles ( errors , index, indexPath , notFound, notFoundPath , favicon, faviconPath , waiting, waitingPath ) where import qualified Data.ByteString as BS import Data.FileEmbed (bsToExp) import Language.Haskell.TH (runIO) import S...
644869411bf874fc74dfdccfb905a4acd5a45c9cfffe666975ad58f86a1d7416
joinr/spork
primitive.clj
An implementation of segmented paths and primitive . Used as a ;;primitive facility for defining shapes and constructive geometry. Work in progress , should free us from J2d entirely ... (ns spork.graphics2d.primitive (:require [spork.util [vectors :as v]]) (:import [spork.util.vectors vec2 vec3])) (d...
null
https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/src/spork/graphics2d/primitive.clj
clojure
primitive facility for defining shapes and constructive geometry. adapted from j2d, not sure i'll need it though. a path is defined as a sequence of segments. so...anything can be a path if it can provide a sequence of segments... In progress if p2 is a cubic, or a quad, we need to flatten it. so a general path ...
An implementation of segmented paths and primitive . Used as a Work in progress , should free us from J2d entirely ... (ns spork.graphics2d.primitive (:require [spork.util [vectors :as v]]) (:import [spork.util.vectors vec2 vec3])) (defn ^vec2 ->point ([^double x ^double y] (v/->vec2 x y)) ([p] (...
8142caf18975405adc527d855f84d78e16ccd1e33a2d4177f519ef960597eb74
mpickering/eventlog-live
Main.hs
module Main where import qualified MyLib (someFunc) main :: IO () main = do putStrLn "Hello, Haskell!" MyLib.someFunc
null
https://raw.githubusercontent.com/mpickering/eventlog-live/e13f2bc32a9cc66a0a8b7c88241b70fe785dc5a7/ekg-eventlog-influxdb/Main.hs
haskell
module Main where import qualified MyLib (someFunc) main :: IO () main = do putStrLn "Hello, Haskell!" MyLib.someFunc
8c9c4a89d17c19bec76e8662cf4009ebe57dc75edbdec6a6482a965234e7a42e
emqx/emqx
emqx_connector_ldap.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. 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 o...
null
https://raw.githubusercontent.com/emqx/emqx/370b6b0d2f00c2fcc202104a5c117d8fd5a0e9da/apps/emqx_connector/src/emqx_connector_ldap.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. 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(emqx_connector_ldap). -include("emqx_connector.hrl"). -include_lib("typerefl/include/typ...
f0c549c231fb44e4a530668b6615d878a056d018bf4610da01c34256e350d406
jjhenkel/lsee
executionTree.ml
open Abstractions;; open Expressions;; module SS = Set.Make(String) open BatString;; module ExecutionTree = struct type t = { mutable a: (Abstractions.t list); mutable pr: (int, SS.t) Hashtbl.t; d: int; i: Z.t; mutable c: (t list); mutable p: bool; } let empty () = { a = [];...
null
https://raw.githubusercontent.com/jjhenkel/lsee/3255b4f61197e0fd816ac2e9ac1c97dbb72726a6/lib/executionTree.ml
ocaml
Todo: try a version that only keeps N parents of context when writing a trace to disk. This will remove the crazy buildup of shared prefixes that can be detrimental to the models.
open Abstractions;; open Expressions;; module SS = Set.Make(String) open BatString;; module ExecutionTree = struct type t = { mutable a: (Abstractions.t list); mutable pr: (int, SS.t) Hashtbl.t; d: int; i: Z.t; mutable c: (t list); mutable p: bool; } let empty () = { a = [];...
628b4ce6b2625ece9ec9a2aa25cff75a6035a411e66dfeff296a40f8dc5a4ed0
jamis/rtc-ocaml
RTCConic.ml
let parameters_of (shape:RTCShape.t) = match shape.shape with | Cylinder (minimum, maximum, closed) -> (minimum, maximum, closed) | Cone (minimum, maximum, closed) -> (minimum, maximum, closed) | _ -> failwith "expected a cylinder or cone" let intersect_caps trail shape min max closed (ray:RTCRay.t) radius_at xs...
null
https://raw.githubusercontent.com/jamis/rtc-ocaml/f5ba04e874ef0b54d100cdabfe9a67c2b80a643f/src/RTCConic.ml
ocaml
let parameters_of (shape:RTCShape.t) = match shape.shape with | Cylinder (minimum, maximum, closed) -> (minimum, maximum, closed) | Cone (minimum, maximum, closed) -> (minimum, maximum, closed) | _ -> failwith "expected a cylinder or cone" let intersect_caps trail shape min max closed (ray:RTCRay.t) radius_at xs...
32fc87b753738e3a08f40b22e6fef5b567c34b33bc5def4c03a00f8c9c9b30ee
ghc/nofib
Displacement.hs
Glasow Haskell 0.403 : FINITE ELEMENT PROGRAM V2 -- ********************************************************************** -- * * * FILE NAME : displacement.hs DATE : 13 - 3 - 1991 * -- * ...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/real/fem/Displacement.hs
haskell
********************************************************************** * * * * * CONTENTS : Compute nodal displacement of the structure. * * ...
Glasow Haskell 0.403 : FINITE ELEMENT PROGRAM V2 * FILE NAME : displacement.hs DATE : 13 - 3 - 1991 * module Displacement ( uvw, getnuvw ) where import Basics import Vector import Matrix import VBmatrix import VBlldecomp import DB_interface import Degrees import Pre_assemble import Assembl...
ba9be9cb027b444d3009efd15b40795022dd91be45f551eb9e4ccfe0f98ae58d
rtoy/cmucl
move.lisp
;;; -*- Package: HPPA -*- ;;; ;;; ********************************************************************** This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . ;;; (ext:file-comment "$Header: src/compiler/hppa/move.lisp $") ;;; ;;; *...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/hppa/move.lisp
lisp
-*- Package: HPPA -*- ********************************************************************** ********************************************************************** This file contains the HPPA VM definition of operand loading/saving and it is a hairy type. This also allows checking of a few of the values...
This code was written as part of the CMU Common Lisp project at Carnegie Mellon University , and has been placed in the public domain . (ext:file-comment "$Header: src/compiler/hppa/move.lisp $") the Move VOP . Written by . (in-package "HPPA") (define-move-function (load-immediate 1) (vop x y) ((null ze...
ef381a48c7ccda11eeb5a9ff5ca2304dc60de8020a3ed82bb5b2f6eca210aea7
AlexeyRaga/azure-functions-haskell-worker
Utils.hs
module Templates.Utils where import Control.Monad (unless, when) import Data.Either.Combinators (fromRight') import Data.Text (Text) import qualified Data.Text.IO as Text import Prelude hiding (writeFile) import System...
null
https://raw.githubusercontent.com/AlexeyRaga/azure-functions-haskell-worker/a2fd35c5c4661e6255016bc004681c451b8beb46/azure-functions-tools/app/Templates/Utils.hs
haskell
module Templates.Utils where import Control.Monad (unless, when) import Data.Either.Combinators (fromRight') import Data.Text (Text) import qualified Data.Text.IO as Text import Prelude hiding (writeFile) import System...
15ad0c63e70539f2b9c7281046a9b3eafacd9dd65423a03584999b98bcac6eae
lspitzner/brittany
Test117.hs
func = case x of {}
null
https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test117.hs
haskell
func = case x of {}
6c8975caeadc8b8e236810fc33f1a504969c22ee7b8b7bf26e9a091bf7c0be04
mpickering/apply-refact
Default82.hs
main = let (first, rest) = (takeWhile p l, dropWhile p l) in rest
null
https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Default82.hs
haskell
main = let (first, rest) = (takeWhile p l, dropWhile p l) in rest
f80b85758f16ccec0bc00c1f631e9b91b6eea2a4e2712750f501bc5b2c97a008
facebookarchive/duckling_old
duration.clj
; Durations / Periods ( "seconde (unit-of-duration)" #"(?i)seg(undo)?s?" {:dim :unit-of-duration :grain :second} "minute (unit-of-duration)" #"(?i)min(uto)?s?" {:dim :unit-of-duration :grain :minute} "hour (unit-of-duration)" #"(?i)h(ora)?s?" {:dim :unit-of-duration :grain :hour} "day (...
null
https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/es/rules/duration.clj
clojure
Durations / Periods prevent negative duration... [#"(?i)une?" (dim :unit-of-duration)] {:dim :duration
( "seconde (unit-of-duration)" #"(?i)seg(undo)?s?" {:dim :unit-of-duration :grain :second} "minute (unit-of-duration)" #"(?i)min(uto)?s?" {:dim :unit-of-duration :grain :minute} "hour (unit-of-duration)" #"(?i)h(ora)?s?" {:dim :unit-of-duration :grain :hour} "day (unit-of-duration)" #...
d2aa7c506a2bd093c3439f10d7acf384a7ba4d4c872de231705049701456be52
prg-titech/baccaml
syntax.ml
type t = MinCamlの構文を表現するデータ型 ( caml2html : syntax_t ) | Unit | Bool of bool | Int of int | Float of float | String of string | Not of t | Neg of t | Add of t * t | Sub of t * t | Mul of t * t | Div of t * t | Mod of t * t | FNeg of t | FAdd of t * t | FSub of t * t | FMul of t * t | ...
null
https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/base/syntax.ml
ocaml
type t = MinCamlの構文を表現するデータ型 ( caml2html : syntax_t ) | Unit | Bool of bool | Int of int | Float of float | String of string | Not of t | Neg of t | Add of t * t | Sub of t * t | Mul of t * t | Div of t * t | Mod of t * t | FNeg of t | FAdd of t * t | FSub of t * t | FMul of t * t | ...
8870734cbf5be34aa579ad66de0573062593ccfac8fc47d2041b1209c6c4efbe
brendanhay/amazonka
SizeConstraintSetUpdate.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # Derived fr...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-waf/gen/Amazonka/WAF/Types/SizeConstraintSetUpdate.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated | This is __AWS WAF Classic__ documentation. For more information, see in the developer guide. __For the latest version of AWS WAF__, use the AWS WAFV2 API and see the <-chapter.html AWS WAF Developer Guide>. With the latest v...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # Derived from AWS service descriptions , licensed under Apache 2.0 . Mo...
6ca20f5ee5531dd783b4d8182b9887472ccbdf7f7b426dcb5ef6e2442627b214
awslabs/s2n-bignum
bignum_tomont_p256k1_alt.ml
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) (* =================================================================...
null
https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/x86/proofs/bignum_tomont_p256k1_alt.ml
ocaml
========================================================================= ========================================================================= *** print_literal_from_elf "x86/secp256k1/bignum_tomont_p256k1_alt.o";; *** XOR (% r10) (% r10) ADD (% r9) (% rax) ADC (% r10) (% rdx) ADD (% r10) (% rax) ADD...
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved . * SPDX - License - Identifier : Apache-2.0 OR ISC * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0 OR ISC *) Conversion of a 4 - word ( 256 - bit ) bignum to Montgomery form m...
304fd2d1d88362e64c9fbd547726591f52a3101b3f480762e551df0d3cc1689d
babashka/sci.configs
test.cljs
(ns sci.configs.clojure.test (:require [sci.configs.impl.clojure.test :as t] [sci.core :as sci])) (def tns t/tns) ;; TODO: 'test-all-vars 'test-ns #_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]} (defn new-var [var-sym f] (sci/new-var var-sym f {:ns tns})) (def clojure-test-namespace {:obj tns '...
null
https://raw.githubusercontent.com/babashka/sci.configs/2bdbd4a65b2b7db738d9f580eea69a1f4c8fba17/src/sci/configs/clojure/test.cljs
clojure
TODO: 'test-all-vars 'test-ns assertion utilities assertion methods assertion macros defining tests fixtures running tests: low level TODO: 'test-all-vars (new-var 'test-all-vars (contextualize t/test-all-vars)) TODO: 'test-ns (new-var 'test-ns (contextualize t/test-ns)) running tests: high level 'run-all-te...
(ns sci.configs.clojure.test (:require [sci.configs.impl.clojure.test :as t] [sci.core :as sci])) (def tns t/tns) #_{:clj-kondo/ignore [:clojure-lsp/unused-public-var]} (defn new-var [var-sym f] (sci/new-var var-sym f {:ns tns})) (def clojure-test-namespace {:obj tns 'async (sci/copy-var t/async tns) ...
95de47c138c07ebb725d0217f49fe9e7da22ea30838ed2a5c179b6e798355166
robert-stuttaford/bridge
edit.clj
(ns bridge.event.data.edit (:require [bridge.data.datomic :as datomic] [bridge.data.edit :as data.edit] [bridge.event.spec :as event.spec])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Edit (def event-for-editing-pull-spec [:event/id :e...
null
https://raw.githubusercontent.com/robert-stuttaford/bridge/867d81354457c600cc5c25917de267a8e267c853/src/bridge/event/data/edit.clj
clojure
Edit :event/status :event/organisers
(ns bridge.event.data.edit (:require [bridge.data.datomic :as datomic] [bridge.data.edit :as data.edit] [bridge.event.spec :as event.spec])) (def event-for-editing-pull-spec [:event/id :event/title :event/slug :event/status {:event/chapter [:chapter/slug]} {:event/organisers...
0870d27d772c62a2a36b884a751eb423566d045b20f93e6d872fe51b6c3c9dc4
racehub/om-bootstrap
disabled.cljs
#_ (:require [om-bootstrap.pagination :as pg]) (pg/pagination {} (pg/previous {:disabled? true}) (pg/page {} "1") (pg/page {} "2") (pg/page {} "3") (pg/next {}))
null
https://raw.githubusercontent.com/racehub/om-bootstrap/18fb7f67c306d208bcb012a1b765ac1641d7a00b/dev/snippets/pagination/disabled.cljs
clojure
#_ (:require [om-bootstrap.pagination :as pg]) (pg/pagination {} (pg/previous {:disabled? true}) (pg/page {} "1") (pg/page {} "2") (pg/page {} "3") (pg/next {}))
7a9d636144362d81d2da44a9519cfd074b2a96a82e681ba3f4ce6c9d05207fd8
twosigma/Cook
cors.clj
(ns cook.test.rest.cors (:require [clojure.string :as str] [clojure.test :refer :all] [cook.rest.cors :as cors])) (deftest test-is-preflight? (is (cors/preflight? {:request-method :options})) (is (not (cors/preflight? {:request-method :get}))) (is (not (cors/preflight? {:request-method...
null
https://raw.githubusercontent.com/twosigma/Cook/9e561b847827adf2a775220d1fc435d8089fc41d/scheduler/test/cook/test/rest/cors.clj
clojure
(ns cook.test.rest.cors (:require [clojure.string :as str] [clojure.test :refer :all] [cook.rest.cors :as cors])) (deftest test-is-preflight? (is (cors/preflight? {:request-method :options})) (is (not (cors/preflight? {:request-method :get}))) (is (not (cors/preflight? {:request-method...
b9c0c231ea14ca722b2df74b44b38a3d3c0fbd4bb3d5981d1ec51e9571d0401f
denibertovic/denv
LibSpec.hs
{-# LANGUAGE OverloadedStrings #-} module Test.Lib.LibSpec where import RIO import Data.List (isPrefixOf) import qualified Data.Text as T import qualified Data.Text.IO as TIO import System.Environment (setEnv) import System.FilePath ((</>)) import System.Directory (setCurrentDirectory, createDirectory) import Test.H...
null
https://raw.githubusercontent.com/denibertovic/denv/86a3d612d8207daad75ad38a1711ad048e8f6113/test/Test/Lib/LibSpec.hs
haskell
# LANGUAGE OverloadedStrings # | Required for auto-discovery
module Test.Lib.LibSpec where import RIO import Data.List (isPrefixOf) import qualified Data.Text as T import qualified Data.Text.IO as TIO import System.Environment (setEnv) import System.FilePath ((</>)) import System.Directory (setCurrentDirectory, createDirectory) import Test.Hspec (Spec, describe, it, shouldBe)...
99311f0150a152ad010e037281318b59babb988ea7e57bbd305654e8d181b1cd
jumarko/clojure-experiments
intro_to_sequences.clj
(ns four-clojure.intro-to-sequences) (= 3 (first '(3 2 1))) (= 3 (second [2 3 4])) (= 3 (last (list 1 2 3)))
null
https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/four_clojure/intro_to_sequences.clj
clojure
(ns four-clojure.intro-to-sequences) (= 3 (first '(3 2 1))) (= 3 (second [2 3 4])) (= 3 (last (list 1 2 3)))
188e5222d1ac252548c5fad43fa63330d34c0411306eb34cefa6ab75ac20e73d
sgbj/MaximaSharp
dqwgts.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " ;;; "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/numerical/slatec/dqwgts.lisp
lisp
Compiled by f2cl version: "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $" Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ " " f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ " " f2cl6.l , v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $ " " macros.l , v fceac53...
fdfb1799f4108d7cb85b2b3e6463d5f61267d1c241aebdb0f72fd0de6c6e7e15
xapi-project/xen-api
gen_api_main.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/47fae74032aa6ade0fc12e867c530eaf2a96bf75/ocaml/idl/ocaml_backend/gen_api_main.ml
ocaml
Add all implicit messages to the API directly
* 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...
05e99c1db9072cb8d996233bcf6d80948b5a6638c4141430515886ba6f7d0e59
Bannerets/camlproto
Types.ml
open! Base type tl_section = Functions | Types type name_with_loc = Ast.name Loc.annot and tl_type_ident' = | TypeIdBoxed of Ast.name | TypeIdBare of Ast.name and tl_type_ident = tl_type_ident' Loc.annot and tl_type_param = ParamNat of string | ParamType of string and tl_type = Type of Ast.name * tl_type_param...
null
https://raw.githubusercontent.com/Bannerets/camlproto/0b31083b8c0103079ec2881176f63f8cb12abb73/src/tl/lib/Types.ml
ocaml
TODO: remove loc? TODO: merge tl_constructor and tl_function?
open! Base type tl_section = Functions | Types type name_with_loc = Ast.name Loc.annot and tl_type_ident' = | TypeIdBoxed of Ast.name | TypeIdBare of Ast.name and tl_type_ident = tl_type_ident' Loc.annot and tl_type_param = ParamNat of string | ParamType of string and tl_type = Type of Ast.name * tl_type_param...
4c952c6e7898daa26f6bac104bc9766c34f922bd61efadcaf15a5b24fa3bc50f
thheller/shadow-cljs
bootstrap_script.cljs
(ns demo.bootstrap-script (:require [cljs.js :as cljs] [cljs.env :as env] [shadow.cljs.bootstrap.node :as boot])) (defn print-result [{:keys [error value] :as result}] (prn [:result result])) (def code "(prn ::foo) (+ 1 2)") (defonce compile-state-ref (env/default-compiler-env)) (defn compile-it [] ...
null
https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/dev/demo/bootstrap_script.cljs
clojure
(ns demo.bootstrap-script (:require [cljs.js :as cljs] [cljs.env :as env] [shadow.cljs.bootstrap.node :as boot])) (defn print-result [{:keys [error value] :as result}] (prn [:result result])) (def code "(prn ::foo) (+ 1 2)") (defonce compile-state-ref (env/default-compiler-env)) (defn compile-it [] ...
dccb4c4e155d277970b765fbe4a9b00a1058e20bf0ed2cb707ffe7883403865e
muyinliu/cl-fswatch
cl-fswatch.lisp
(in-package :fsw) ;;; condition (define-condition fsw-status-error (error) ((code :initarg :code :reader code)) (:report (lambda (condition stream) (format stream "fswatch C function returned error ~S(~A)" (cffi:foreign-enum-keyword '%fsw-error-codes ...
null
https://raw.githubusercontent.com/muyinliu/cl-fswatch/b39120ff0cf94b20717da6196e36245c2cf89741/cl-fswatch.lisp
lisp
condition fswatch-session /** * callback to provide information about received events. The callback is * passed the following arguments: * - events, a const pointer to an array of events of type const fsw_cevent. * - event_num, the size of the *events array. * - data, optional persisted data for a c...
(in-package :fsw) (define-condition fsw-status-error (error) ((code :initarg :code :reader code)) (:report (lambda (condition stream) (format stream "fswatch C function returned error ~S(~A)" (cffi:foreign-enum-keyword '%fsw-error-codes ...
41950100206d93ab585f3eea335d0350033939237276acac10113a0c72bb595d
yesodweb/yesod
English.hs
{-# LANGUAGE OverloadedStrings #-} module Yesod.Form.I18n.English where import Yesod.Form.Types (FormMessage (..)) import Data.Monoid (mappend) import Data.Text (Text) englishFormMessage :: FormMessage -> Text englishFormMessage (MsgInvalidInteger t) = "Invalid integer: " `Data.Monoid.mappend` t englishFormMessage (M...
null
https://raw.githubusercontent.com/yesodweb/yesod/48d05fd6ab12ad440e1f2aa32684ed08b23f0613/yesod-form/Yesod/Form/I18n/English.hs
haskell
# LANGUAGE OverloadedStrings #
module Yesod.Form.I18n.English where import Yesod.Form.Types (FormMessage (..)) import Data.Monoid (mappend) import Data.Text (Text) englishFormMessage :: FormMessage -> Text englishFormMessage (MsgInvalidInteger t) = "Invalid integer: " `Data.Monoid.mappend` t englishFormMessage (MsgInvalidNumber t) = "Invalid numbe...
76b16f8bda7070cf2923a38d6cca22cd5213ed444964d2277fae3a5664918c36
dgiot/dgiot
emqx_broker_helper.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2018 - 2022 EMQ Technologies Co. , Ltd. 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 o...
null
https://raw.githubusercontent.com/dgiot/dgiot/c601555e45f38d02aafc308b18a9e28c543b6f2c/src/emqx_broker_helper.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2018 - 2022 EMQ Technologies Co. , Ltd. 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(emqx_broker_helper). -behaviour(gen_server). -include("logger.hrl"). -include("types.h...
21182b74bb0e5f24b65de954083255014dadd52aab685b90805b1c41cf34793c
broom-lang/broom
ToJs.mli
val emit : bool -> Cfg.Program.t -> PPrint.document
null
https://raw.githubusercontent.com/broom-lang/broom/e817d0588ae7ac881f61654503910852238d6297/compiler/lib/Js/ToJs.mli
ocaml
val emit : bool -> Cfg.Program.t -> PPrint.document
0c514bbbdfeb42cdbca4a797f957a91886e064766d5eff344e5d3306e5f8cc91
dgiot/dgiot
emqx_access_control.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2017 - 2022 EMQ Technologies Co. , Ltd. 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 o...
null
https://raw.githubusercontent.com/dgiot/dgiot/c601555e45f38d02aafc308b18a9e28c543b6f2c/src/emqx_access_control.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2017 - 2022 EMQ Technologies Co. , Ltd. 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(emqx_access_control). -include("emqx.hrl"). -export([authenticate/1]). -export([ chec...
bc4adef27c5aef4da73b76c0e239b94e68e522853129528e0dc668c868c2f034
brendanhay/amazonka
DuplicateRegistrationAction.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # {-# LANGUAGE StrictData #-} # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # Derived from AWS service...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-voice-id/gen/Amazonka/VoiceId/Types/DuplicateRegistrationAction.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated # COMPLETE DuplicateRegistrationAction_REGISTER_AS_NEW, DuplicateRegistrationAction_SKIP, DuplicateRegistrationAction' #
# LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - imports # Derived from AWS service descriptions , licensed under Apache 2.0 . Module : A...
aa3fa57c667a7dc0bdf86879c54704e16dc059f8ba7aa03c9c3e53889bcc529c
softwarelanguageslab/maf
R5RS_ad_qsort-5.scm
; Changes: * removed : 1 * added : 3 * swaps : 0 * negated predicates : 1 ; * swapped branches: 0 * calls to i d fun : 3 (letrec ((quick-sort (lambda (vector) (letrec ((swap (lambda (v index1 index2) (let ((temp (vector-ref v index1))) ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_ad_qsort-5.scm
scheme
Changes: * swapped branches: 0
* removed : 1 * added : 3 * swaps : 0 * negated predicates : 1 * calls to i d fun : 3 (letrec ((quick-sort (lambda (vector) (letrec ((swap (lambda (v index1 index2) (let ((temp (vector-ref v index1))) (ve...
7db0f97df6ac0091f776bee5a01724ef74d4830c796267df4f4edd8175e968c1
tweag/asterius
T5785.hs
module Main where import Data.Int import Data.Word Test case for bug # 5785 . The cause of this was that the backend converted all Int constants using ( fromInteger : : Int ) and so on 32bit a Int64 or would be truncated to 32bit ! value before printing out . main :: IO () main = do first two should print a...
null
https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/codeGen/T5785.hs
haskell
module Main where import Data.Int import Data.Word Test case for bug # 5785 . The cause of this was that the backend converted all Int constants using ( fromInteger : : Int ) and so on 32bit a Int64 or would be truncated to 32bit ! value before printing out . main :: IO () main = do first two should print a...
0c37a2768a67fde55ef687c4345250bd6fa4c8b50a25f07e390dff7ab505b266
exercism/racket
acronym-test.rkt
#lang racket/base Tests adapted from ` problem - specifications / canonical - data.json v1.7.0 (require "acronym.rkt") (module+ test (require rackunit rackunit/text-ui) (define suite (test-suite "acronym tests" (test-equal? "basic" (acronym "Portable Network Graphics") ...
null
https://raw.githubusercontent.com/exercism/racket/4110268ed331b1b4dac8888550f05d0dacb1865b/exercises/practice/acronym/acronym-test.rkt
racket
#lang racket/base Tests adapted from ` problem - specifications / canonical - data.json v1.7.0 (require "acronym.rkt") (module+ test (require rackunit rackunit/text-ui) (define suite (test-suite "acronym tests" (test-equal? "basic" (acronym "Portable Network Graphics") ...
cb02268803858a13c550d3966cccd60c43022eb0d505a0de1460549be6061635
BinaryAnalysisPlatform/bap
graphlib_regular.mli
open Core_kernel[@@warning "-D"] open Regular.Std open Graphlib_intf open Graphlib_graph open Graphlib_regular_intf module Make(Node : Opaque.S)(Label : T) : Graph with type node = Node.t and type Node.label = Node.t and type Edge.label = Label.t module Labeled(Node : Opaque.S)(NL : T)(EL : T) : Graph with ...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/graphlib/graphlib_regular.mli
ocaml
open Core_kernel[@@warning "-D"] open Regular.Std open Graphlib_intf open Graphlib_graph open Graphlib_regular_intf module Make(Node : Opaque.S)(Label : T) : Graph with type node = Node.t and type Node.label = Node.t and type Edge.label = Label.t module Labeled(Node : Opaque.S)(NL : T)(EL : T) : Graph with ...
14f27be1e22847d9a8d2c951b16339ba3b82dad50f3542e88669b392a3e9cfd2
libguestfs/supermin
mode_build.mli
supermin 5 * Copyright ( C ) 2009 - 2016 Red Hat Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( at your option ) any later ...
null
https://raw.githubusercontent.com/libguestfs/supermin/fd9f17c7eb63979af882533a0d234bfc8ca42de3/src/mode_build.mli
ocaml
* Implements the [--build] subcommand. * [build debug (args...) inputs outputdir] performs the [supermin --build] subcommand. * [get_outputs (args...) inputs] gets the potential outputs for the appliance.
supermin 5 * Copyright ( C ) 2009 - 2016 Red Hat Inc. * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License , or * ( at your option ) any later ...
c253c8dff1e1ba6486ab1dd9a943c3ce69ea97759a1ade06cc3ebc761e3a2f57
bortexz/graphcom
graphcom_test.cljc
(ns bortexz.graphcom-test (:require [clojure.test :refer [deftest is testing]] [bortexz.graphcom :as g])) (deftest base-test (let [input (g/input-node) sum-node (g/compute-node {:source input} (fn [val {:keys [source]}] (+ (or ...
null
https://raw.githubusercontent.com/bortexz/graphcom/5679e4c3562b8d968eb74b18272a1962efa82c81/test/bortexz/graphcom_test.cljc
clojure
(ns bortexz.graphcom-test (:require [clojure.test :refer [deftest is testing]] [bortexz.graphcom :as g])) (deftest base-test (let [input (g/input-node) sum-node (g/compute-node {:source input} (fn [val {:keys [source]}] (+ (or ...
d85af65efc5b95a9a95d0bb95e779057ed2d1c035af3379df7e48c2af5f06d3d
wingo/fibers
timers.scm
;; Fibers: cooperative, event-driven user-space threads. Copyright ( C ) 2016 Free Software Foundation , Inc. ;;;; ;;;; This library is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either versi...
null
https://raw.githubusercontent.com/wingo/fibers/8f4ce08cd009926061d6ebfc55e4fa1e0b80ddd3/fibers/timers.scm
scheme
Fibers: cooperative, event-driven user-space threads. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ME...
Copyright ( C ) 2016 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public License (define-module (fibers timers) #:use-module (fibers scheduler) #:use-module (fibers operations) #:use-module (i...
167e017566462d02198ae143c4586042a3c02159e74c03947c74d0ca2d00ab53
pangloss/pattern
predicator.clj
(ns pattern.match.predicator (:require [clojure.walk :as walk])) (def ^:dynamic *pattern-replace* "Add maps used by postwalk-replace or functions that return a transformed pattern here, and they will be applied to each rule pattern with [[do-pattern-replace]] before the rule is compiled." []) (defn match-ab...
null
https://raw.githubusercontent.com/pangloss/pattern/6d0c7130bf6f9e74610223fc2f1a4c0fd97b01fa/src/pattern/match/predicator.clj
clojure
abbr must match, and matcher must be short-form:
(ns pattern.match.predicator (:require [clojure.walk :as walk])) (def ^:dynamic *pattern-replace* "Add maps used by postwalk-replace or functions that return a transformed pattern here, and they will be applied to each rule pattern with [[do-pattern-replace]] before the rule is compiled." []) (defn match-ab...
fd8257ac6863c9a33af1f66a56b76d601b03b13915203ed255f0af43878eb7e5
k-bx/protocol-buffers
Main.hs
module Main where import Test.QuickCheck import Arb.UnittestProto main :: IO () main = do cs mapM_ (\(name,test) -> putStrLn name >> quickCheck test) tests_TestAllExtensions mapM_ (\(name,test) -> putStrLn name >> quickCheck test) tests_TestAllTypes
null
https://raw.githubusercontent.com/k-bx/protocol-buffers/89425795ac2d560c5d690714e7d206ba9f97aff2/tests/Main.hs
haskell
module Main where import Test.QuickCheck import Arb.UnittestProto main :: IO () main = do cs mapM_ (\(name,test) -> putStrLn name >> quickCheck test) tests_TestAllExtensions mapM_ (\(name,test) -> putStrLn name >> quickCheck test) tests_TestAllTypes
ace5fa931245fb549571d86414f9f5ae6a15ce0e0ba3395df84219192ad0651b
jrh13/hol-light
integer.ml
(* ========================================================================= *) (* Basic divisibility notions over the integers. *) (* *) This is similar to stuff in Library / prime.ml etc . for natural numbers . ...
null
https://raw.githubusercontent.com/jrh13/hol-light/f25b1592a72d8c1c2666231645cff4809aed1ce4/Library/integer.ml
ocaml
========================================================================= Basic divisibility notions over the integers. ========================================================================= ---------------...
This is similar to stuff in Library / prime.ml etc . for natural numbers . prioritize_int();; let INT_DIVIDES_REFL = INTEGER_RULE `!d. d divides d`;; let INT_DIVIDES_TRANS = INTEGER_RULE `!x y z. x divides y /\ y divides z ==> x divides z`;; let INT_DIVIDES_ADD = INTEGER_RULE `!d a b. d divides a /\ d ...
6aced61b508d2e946b8ad3a5144d9ae23f683cc257ebc9f61b066d13ae8c79a9
jchavarri/rebind
estree_translator.ml
* * Copyright ( c ) 2013 - present , Facebook , Inc. * All rights reserved . * * This source code is licensed under the BSD - style license found in the * LICENSE file in the " flow " directory of this source tree . An additional grant * of patent rights can be found in the PATENTS file in the same di...
null
https://raw.githubusercontent.com/jchavarri/rebind/ccfa1725ff5b16574daf4d0044c49dbf719aa105/vendor/flow/estree_translator.ml
ocaml
this should've been handled by callers, since this represents an ExportAllDeclaration, not a specifier. node "FunctionTypeRestParam" loc [| "argument", function_type_param argument; |]
* * Copyright ( c ) 2013 - present , Facebook , Inc. * All rights reserved . * * This source code is licensed under the BSD - style license found in the * LICENSE file in the " flow " directory of this source tree . An additional grant * of patent rights can be found in the PATENTS file in the same di...
95d030b503ea9528859f8141ecb33865c6890cfbf3b0445f75f279aa1c197cdf
jellea/muuuuu
musicplayer.cljs
(ns muuuuu.components.musicplayer (:require [goog.events :as events] [om.core :as om :include-macros true] [sablono.core :as html :refer-macros [html]] [om.dom :as dom :include-macros true])) (defn toggle-play-pause [state] (om/transact! state #(assoc % :is-playing (not (:...
null
https://raw.githubusercontent.com/jellea/muuuuu/d3536949c8dcec51dd4451243c1b8d42acfabac5/src/muuuuu/components/musicplayer.cljs
clojure
(ns muuuuu.components.musicplayer (:require [goog.events :as events] [om.core :as om :include-macros true] [sablono.core :as html :refer-macros [html]] [om.dom :as dom :include-macros true])) (defn toggle-play-pause [state] (om/transact! state #(assoc % :is-playing (not (:...
6b32ecbb698cd157d6cd74938d20acfce318f663a856ff76e540026f5a463754
lispbuilder/lispbuilder
cffi-translate.lisp
SDL library using CFFI for foreign function interfacing ... ( C)2006 < > ;; see COPYING for license (in-package #:lispbuilder-sdl-cffi) (defctype sdl-surface :pointer) (defctype sdl-rectangle :pointer) (defctype sdl-string (:wrapper :string :to-c to-sdl-string)) ( defctype SDL - RWops : pointer ) ( defmeth...
null
https://raw.githubusercontent.com/lispbuilder/lispbuilder/589b3c6d552bbec4b520f61388117d6c7b3de5ab/lispbuilder-sdl/cffi/cffi-translate.lisp
lisp
see COPYING for license (unless (is-valid-ptr value) (error "Error: sdl-surface must be a valid pointer")) value) (if (is-valid-ptr value) value nil)) (unless (is-valid-ptr value) (error "Error: SDL-RWops must be a valid, non-NULL pointer")) value) (if value (let ((rect...
SDL library using CFFI for foreign function interfacing ... ( C)2006 < > (in-package #:lispbuilder-sdl-cffi) (defctype sdl-surface :pointer) (defctype sdl-rectangle :pointer) (defctype sdl-string (:wrapper :string :to-c to-sdl-string)) ( defctype SDL - RWops : pointer ) ( defmethod translate - to - foreign...
c2669b2f4e75e50856ec398ebdf6d781b0f42c577d423954f3393d8e1e0483ea
GracielaUSB/graciela
Assertion.hs
# LANGUAGE NamedFieldPuns # module Language.Graciela.Parser.Assertion ( assertion , bound , precond , postcond , invariant , repInv , coupInv ) where -------------------------------------------------------------------------------- import Language.Graciela.AST.Expression import Langua...
null
https://raw.githubusercontent.com/GracielaUSB/graciela/db69c8b225d6172aaa0ff90a67f4a997e4d8a0c6/src/Haskell/Language/Graciela/Parser/Assertion.hs
haskell
------------------------------------------------------------------------------ ------------------------------------------------------------------------------ ------------------------------------------------------------------------------
# LANGUAGE NamedFieldPuns # module Language.Graciela.Parser.Assertion ( assertion , bound , precond , postcond , invariant , repInv , coupInv ) where import Language.Graciela.AST.Expression import Language.Graciela.AST.Type import Language.Graciela.Error as PE ...
b2cfabcfde2ce287b945c0d97110390a2f554f7485afc0c39fc6f1a9ceadb086
dyzsr/ocaml-selectml
is_expansive.ml
(* TEST * expect *) match [] with x -> (fun x -> x);; [%%expect{| - : 'a -> 'a = <fun> |}];; match [] with x -> (fun x -> x) | _ -> .;; [%%expect{| - : 'a -> 'a = <fun> |}];;
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/typing-misc/is_expansive.ml
ocaml
TEST * expect
match [] with x -> (fun x -> x);; [%%expect{| - : 'a -> 'a = <fun> |}];; match [] with x -> (fun x -> x) | _ -> .;; [%%expect{| - : 'a -> 'a = <fun> |}];;
82a560b23ef636b28763dff64f06badb292a68fdc365b2275cd0cc64373a8cd8
mfussenegger/mkjson
Cli.hs
# LANGUAGE TupleSections # {-# LANGUAGE OverloadedStrings #-} module Cli ( Args(..) , Amount(..) , parseArgs , Field ) where import Data.Bifunctor (bimap) import qualified Data.Text as T import qualified Expr as E import Options.Applicative hiding (Const) i...
null
https://raw.githubusercontent.com/mfussenegger/mkjson/312750647a71903a29f28948e314041e02bf3596/src/Cli.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TupleSections # module Cli ( Args(..) , Amount(..) , parseArgs , Field ) where import Data.Bifunctor (bimap) import qualified Data.Text as T import qualified Expr as E import Options.Applicative hiding (Const) import Text.Read ...
f1ef3e5e1a2f3c788d417d87bc1800c7545e44b27e31222ec0581b2b90cc3e30
albertoruiz/easyVision
probability.hs
# LANGUAGE FlexibleContexts , UndecidableInstances # import Util.Probability import Control.Monad import Text.Printf import Control.Applicative((<$>),(<*>),pure) die = uniform [1..6] :: Prob Int coin = uniform ['-','+'] :: Prob Char --------------------------------------------- -- joint dist using explicit monadic...
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/patrec/probability.hs
haskell
------------------------------------------- joint dist using explicit monadic/do style ---------------------------------------- using joint a conditioned distribution on urn ----------------------------------------- ----------------------------------------- need same type in the list -------------------------------...
# LANGUAGE FlexibleContexts , UndecidableInstances # import Util.Probability import Control.Monad import Text.Printf import Control.Applicative((<$>),(<*>),pure) die = uniform [1..6] :: Prob Int coin = uniform ['-','+'] :: Prob Char enfer :: Prob (String, String) enfer = do state <- bernoulli (1/1000) "infecte...
e3df9d688e87546ecb4566458c35acb430ecd77b52665befdbd70b9e37facdc8
ThoughtWorksInc/stonecutter
handler.clj
(ns stonecutter.handler (:require [ring.middleware.defaults :as ring-mw] [ring.middleware.content-type :as ring-mct] [ring.util.response :as r] [ring.adapter.jetty :as ring-jetty] [ring.middleware.json :as ring-json] [ring.middleware.multipart-params :as rin...
null
https://raw.githubusercontent.com/ThoughtWorksInc/stonecutter/37ed22dd276ac652176c4d880e0f1b0c1e27abfe/src/stonecutter/handler.clj
clojure
(ns stonecutter.handler (:require [ring.middleware.defaults :as ring-mw] [ring.middleware.content-type :as ring-mct] [ring.util.response :as r] [ring.adapter.jetty :as ring-jetty] [ring.middleware.json :as ring-json] [ring.middleware.multipart-params :as rin...
87a602ac92356fc665a406fb9515c21f7085b6ef5000a279672abfb47f25bdaa
whostolebenfrog/rest-cljer
core.clj
(ns rest-cljer.test.core (:require [cheshire.core :as json] [clj-http.client :as http] [environ.core :refer [env]] [clojure.test :refer :all] [rest-cljer.core :refer [*rest-driver-port* json-capture rest-driven string-capture]]) (:import [com.github.restdriver.clientd...
null
https://raw.githubusercontent.com/whostolebenfrog/rest-cljer/6f5f25a433d9177949e2c6c32eb428197fdf4eae/test/rest_cljer/test/core.clj
clojure
(ns rest-cljer.test.core (:require [cheshire.core :as json] [clj-http.client :as http] [environ.core :refer [env]] [clojure.test :refer :all] [rest-cljer.core :refer [*rest-driver-port* json-capture rest-driven string-capture]]) (:import [com.github.restdriver.clientd...
88ceb009c13cdc26ca27efd91c9e6c622c076ea7d7d22eb63039e814a3ea496f
thlack/surfs
conversations_select.clj
(ns ^:no-doc thlack.surfs.elements.spec.conversations-select (:require [clojure.spec.alpha :as s] [thlack.surfs.strings.spec :as strings.spec])) (s/def ::type #{:conversations_select}) (s/def ::initial_conversation ::strings.spec/id) (s/def ::default_to_current_conversation boolean?)
null
https://raw.githubusercontent.com/thlack/surfs/e03d137d6d43c4b73a45a71984cf084d2904c4b0/src/thlack/surfs/elements/spec/conversations_select.clj
clojure
(ns ^:no-doc thlack.surfs.elements.spec.conversations-select (:require [clojure.spec.alpha :as s] [thlack.surfs.strings.spec :as strings.spec])) (s/def ::type #{:conversations_select}) (s/def ::initial_conversation ::strings.spec/id) (s/def ::default_to_current_conversation boolean?)
bf44c5d95fe5d92efc0b60df49e49e27dfe55201d1677ac887c8aa93e1100737
mzp/coq-ide-for-ios
prettyp.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/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/parsing/prettyp.ml
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** ************ * Utilities add a bla...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Changed by ( and thus parts...
62a6bcedca03d31baf3ddd7d507522c9a617bbd70e8f9329aa03d044764d3f8d
timbertson/vdoml
test_diff.ml
open Test_util include Init open Vdoml open Vdom_ open Html open Sexplib open Diff open Log_ module Html_gen = struct let rand = lazy ( let seed = try let seed = int_of_string (Unix.getenv "RANDOM_SEED") in Printf.eprintf "Used existing RANDOM_SEED=%d\n" seed; seed with Not_found -> Initialize just to ...
null
https://raw.githubusercontent.com/timbertson/vdoml/fcbf81e89df989206bdad4a92327e593078525b2/test/test_diff.ml
ocaml
open Test_util include Init open Vdoml open Vdom_ open Html open Sexplib open Diff open Log_ module Html_gen = struct let rand = lazy ( let seed = try let seed = int_of_string (Unix.getenv "RANDOM_SEED") in Printf.eprintf "Used existing RANDOM_SEED=%d\n" seed; seed with Not_found -> Initialize just to ...
8644e68b4d9ef26b6c897733360b72900bb44da8dda6137c864d28c01b7b13fe
ghc/ghc
T4437.hs
| A test for ensuring that GHC 's supporting language extensions remains in sync with Cabal 's own extension list . -- -- If you have ended up here due to a test failure, please see Note [ Adding a language extension ] in compiler / GHC / Driver / Session.hs . module Main (main) where import Control.Monad impor...
null
https://raw.githubusercontent.com/ghc/ghc/083f701553852c4460159cd6deb2515d3373714d/testsuite/tests/driver/T4437.hs
haskell
If you have ended up here due to a test failure, please see
| A test for ensuring that GHC 's supporting language extensions remains in sync with Cabal 's own extension list . Note [ Adding a language extension ] in compiler / GHC / Driver / Session.hs . module Main (main) where import Control.Monad import Data.List ( (\\) ) import GHC.Driver.Session import Language.Has...
583c209055ba29a8e46c6d694b8183bb612a778fb4096cb1b6e851d6d0a47495
kiranlak/austin-sbst
options.ml
Copyright : , University College London , 2011 open Cil open ConfigFile let hashtblInitSize = 10000 let maxSymbolicStatements = 100000 let austinOutDir = ref "" let austinLibDir = ref "" let mkFileName (name:string) = let exists = try Sys.is_directory !austinOutDir with | _ -> false in if not(exist...
null
https://raw.githubusercontent.com/kiranlak/austin-sbst/9c8aac72692dca952302e0e4fdb9ff381bba58ae/AustinOcaml/options.ml
ocaml
Copyright : , University College London , 2011 open Cil open ConfigFile let hashtblInitSize = 10000 let maxSymbolicStatements = 100000 let austinOutDir = ref "" let austinLibDir = ref "" let mkFileName (name:string) = let exists = try Sys.is_directory !austinOutDir with | _ -> false in if not(exist...
c6a2bb8cc4f88e22d642ab1da6ba891d1d929af84ce548caaf4eb9ef4351dd8c
ankushdas/Nomos
ErrorMsg.ml
module F = RastFlags (* Initial values of compiler state variables *) let anyErrors = ref false;; let reset () = ( anyErrors := false );; type error_cat = Lex | Parse | Type | Pragma | Runtime;; let err_string cat = match cat with Lex -> "lex" | Parse -> "parse" | Type -> "type" | Pragma -> "p...
null
https://raw.githubusercontent.com/ankushdas/Nomos/db678f3981e75a1b3310bb55f66009bb23430cb1/rast/ErrorMsg.ml
ocaml
Initial values of compiler state variables verbosity < 0: don't print error messages! Print the given error message and then abort compilation
module F = RastFlags let anyErrors = ref false;; let reset () = ( anyErrors := false );; type error_cat = Lex | Parse | Type | Pragma | Runtime;; let err_string cat = match cat with Lex -> "lex" | Parse -> "parse" | Type -> "type" | Pragma -> "pragma" | Runtime -> "runtime";; We turn tabs...
01734705922867b3e033dd662a8cf0a52d9473e85088ef46c27309172ebf40a9
Zert/amqp-erlang-sample
client_iface.erl
-module(client_iface). -author('Maxim Treskin'). -behaviour(gen_server). -include("client.hrl"). -include_lib("amqp_client/include/amqp_client.hrl"). -export([start_link/0]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -r...
null
https://raw.githubusercontent.com/Zert/amqp-erlang-sample/db6619a78a5eb1c3fe6b241b96b147f56de65f41/client/src/client_iface.erl
erlang
Fanout
-module(client_iface). -author('Maxim Treskin'). -behaviour(gen_server). -include("client.hrl"). -include_lib("amqp_client/include/amqp_client.hrl"). -export([start_link/0]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). -r...
f1eb65117a4a1f938db3a41b302973c899b578520c2514293045474509c56b37
15Galan/asignatura-204
StackOnList.hs
------------------------------------------------------------------------------- -- Stacks implemented using lists -- Data Structures . en Informática . UMA . , 2011 ------------------------------------------------------------------------------- module DataStructures.Stack.StackOnList ( Stack , empty , isE...
null
https://raw.githubusercontent.com/15Galan/asignatura-204/894f33ff8e0f52a75d8f9ff15155c656f1a8f771/Recursos/data.structures/haskell/DataStructures/Stack/StackOnList.hs
haskell
----------------------------------------------------------------------------- Stacks implemented using lists ----------------------------------------------------------------------------- Showing a stack Stack equality uses list predefined equality
Data Structures . en Informática . UMA . , 2011 module DataStructures.Stack.StackOnList ( Stack , empty , isEmpty , push , pop , top ) where import Data.List(intercalate) import Test.QuickCheck data Stack a = SonL [a] empty :: Stack a empty = SonL [] isEmpty :: Stack a -> Bool isEmpty (SonL ...
8a0a07dc1572f9249ff2b74f3da8863c0fb3a84733397b4d96e60abffdeaa241
bufferswap/ViralityEngine
line2d.lisp
(in-package #:cl-user) ;;; NOTE: Line2d represents a 2D line segment, not an infinite line in the mathematical sense. Since ;;; line segments are so common in physics, we have chosen to use this convention (as many other ;;; game physics libraries do). (defpackage #:vorigin.geometry.line2d (:local-nicknames (#:p...
null
https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/support/vorigin/src/geometry/shapes/line2d.lisp
lisp
NOTE: Line2d represents a 2D line segment, not an infinite line in the mathematical sense. Since line segments are so common in physics, we have chosen to use this convention (as many other game physics libraries do).
(in-package #:cl-user) (defpackage #:vorigin.geometry.line2d (:local-nicknames (#:point2d #:vorigin.geometry.point2d) (#:u #:vutils) (#:v2 #:vorigin.vec2)) (:use #:cl) (:shadow #:length) (:export #:direction #:end #:length #:length-squared #:line #:midpoint #:start)) (in-pack...
5334b63ebfd94d6a26a61a424158ed27965de0ef05894f98dd9d513de57c5181
kevsmith/giza
giza_t_005.erl
-module(giza_t_005). -export([start/0]). start() -> etap:plan(9), Update = giza_update:new("foo"), etap:is("localhost", giza_update:host(Update), "Can get host"), etap:is(3312, giza_update:port(Update), "Can get port"), etap:is([], giza_update:attributes(Update), "Update fields default to empty list"), U1...
null
https://raw.githubusercontent.com/kevsmith/giza/576eada45ccff8d7fb688b8abe3a33c25d34028d/t/giza_t_005.erl
erlang
-module(giza_t_005). -export([start/0]). start() -> etap:plan(9), Update = giza_update:new("foo"), etap:is("localhost", giza_update:host(Update), "Can get host"), etap:is(3312, giza_update:port(Update), "Can get port"), etap:is([], giza_update:attributes(Update), "Update fields default to empty list"), U1...
8a13de677c761e8b6eb94c5ff2184025b2c87c3e3ec7a41c62850eb1526d2a9f
jubnzv/iec-checker
unused_variable.mli
(** Detect unused variables in the source code. *) open IECCheckerCore module S = Syntax val run : S.iec_library_element list -> Warn.t list
null
https://raw.githubusercontent.com/jubnzv/iec-checker/666cd8a28cb1211465a900862df84d70460c2742/src/analysis/unused_variable.mli
ocaml
* Detect unused variables in the source code.
open IECCheckerCore module S = Syntax val run : S.iec_library_element list -> Warn.t list
61ffa04850bded88d472c3e943c2fe7412a6ffca309f7e61ff0e6b8dbc3116c0
ku-fpg/hermit
AST.hs
# LANGUAGE CPP # # LANGUAGE LambdaCase # | Output the raw constructors . Helpful for writing pattern matching rewrites . module HERMIT.PrettyPrinter.AST * HERMIT 's AST Pretty - Printer for GHC Core externals , pretty , ppCoreTC , ppModGuts , ppCoreProg , ppCoreBind , ppCoreExpr , ppCoreAlt , ...
null
https://raw.githubusercontent.com/ku-fpg/hermit/3e7be430fae74a9e3860b8b574f36efbf9648dec/src/HERMIT/PrettyPrinter/AST.hs
haskell
------------------------------------------------------------------------- ------------------------------------------------------------------------- This displays the tree of constructors using nested indentation. that we are eliding infomation here. ------------------------------------------------------------------...
# LANGUAGE CPP # # LANGUAGE LambdaCase # | Output the raw constructors . Helpful for writing pattern matching rewrites . module HERMIT.PrettyPrinter.AST * HERMIT 's AST Pretty - Printer for GHC Core externals , pretty , ppCoreTC , ppModGuts , ppCoreProg , ppCoreBind , ppCoreExpr , ppCoreAlt , ...
5ab5031a034a946c37271286e8bc6083d9ae9c34a1dcdbd32e2b734b5bd5f2d9
abhinav/language-thrift
Main.hs
module Main (main) where import Test.Hspec.Runner import qualified Spec main :: IO () main = hspecWith defaultConfig { configQuickCheckMaxSize = Just 30 } Spec.spec
null
https://raw.githubusercontent.com/abhinav/language-thrift/48e98348cdd49aec2898b9e399d52ac5a5f17fe3/test/Main.hs
haskell
module Main (main) where import Test.Hspec.Runner import qualified Spec main :: IO () main = hspecWith defaultConfig { configQuickCheckMaxSize = Just 30 } Spec.spec
4922d41cd7d9e47a50c034938101fe43eefd1069279b348a9ec465018d3a11c4
erlang/otp
f_include_3.erl
-module(f_include_3). -feature(experimental_ftr_1, enable). -ifdef(end_prefix). -record(constant, {value = 42}). -endif. %% Enable feature inside include file -include("enable.hrl"). %% At this point the prefix will definitely end, if it has not already -export([foo/1]). -if(?FEATURE_ENABLED(experimental_ftr_2)). ...
null
https://raw.githubusercontent.com/erlang/otp/018277451bc9d6fa249cd1d62b416b8721ce43ee/erts/test/erlc_SUITE_data/src/f_include_3.erl
erlang
Enable feature inside include file At this point the prefix will definitely end, if it has not already
-module(f_include_3). -feature(experimental_ftr_1, enable). -ifdef(end_prefix). -record(constant, {value = 42}). -endif. -include("enable.hrl"). -export([foo/1]). -if(?FEATURE_ENABLED(experimental_ftr_2)). foo(1) -> exp2_enabled. -else. foo(1) -> exp2_disabled. -endif.
aac71aaeb7edcad3315f900d5c95f068256a5808ebb9138cd479ff8a1e5be948
aeternity/aeternity
aesc_close_solo_tx.erl
%%%============================================================================= 2018 , Aeternity Anstalt %%% @doc Module defining the State Channel close solo transaction %%% @end %%%============================================================================= -module(aesc_close_solo_tx). -behavior(aetx). %%...
null
https://raw.githubusercontent.com/aeternity/aeternity/a3df5ba31e089c292a662a49b1ffffdef003707c/apps/aechannel/src/aesc_close_solo_tx.erl
erlang
============================================================================= @doc @end ============================================================================= Behavior API aesc_signable_transaction callbacks =================================================================== Types ==========================...
2018 , Aeternity Anstalt Module defining the State Channel close solo transaction -module(aesc_close_solo_tx). -behavior(aetx). -export([new/1, type/0, fee/1, gas/1, ttl/1, nonce/1, origin/1, check/3, payload/1, process/3, ...
aa09016adbbb6a204a45eb2f7a26449300b18e3291cee0b6b31f4af029278b88
technomancy/leiningen
main.clj
(ns leiningen.core.test.main (:use [clojure.test] [leiningen.core.main])) ;; Shamelessly stolen from #L28 (defmacro with-err-str "Evaluates exprs in a context in which *err* is bound to a fresh StringWriter. Returns the string created by any nested printing calls." [& body] `(let [s# (new java.i...
null
https://raw.githubusercontent.com/technomancy/leiningen/24fb93936133bd7fc30c393c127e9e69bb5f2392/leiningen-core/test/leiningen/core/test/main.clj
clojure
Shamelessly stolen from
(ns leiningen.core.test.main (:use [clojure.test] [leiningen.core.main])) #L28 (defmacro with-err-str "Evaluates exprs in a context in which *err* is bound to a fresh StringWriter. Returns the string created by any nested printing calls." [& body] `(let [s# (new java.io.StringWriter) p#...
36248f068215876fa7aa5bded310f244ee18fb1e8de2726939b5e23fbd38891d
komadori/HsQML
Objects.hs
{-# LANGUAGE ScopedTypeVariables, TypeFamilies, FlexibleContexts, FlexibleInstances, LiberalTypeSynonyms #-} -- | Facilities for defining new object types which can be marshalled between and . module Graphics.QML.Objects ( -- * Object References ObjRef, newObject, newObjectDC, fromO...
null
https://raw.githubusercontent.com/komadori/HsQML/f57cffe4e3595bdf743bdbe6f44bf45a4001d35f/src/Graphics/QML/Objects.hs
haskell
# LANGUAGE ScopedTypeVariables, TypeFamilies, FlexibleContexts, FlexibleInstances, LiberalTypeSynonyms # | Facilities for defining new object types which can be marshalled between * Object References * Dynamic Object References * Class Definition * Methods * Signals * Properties Class ...
and . module Graphics.QML.Objects ( ObjRef, newObject, newObjectDC, fromObjRef, AnyObjRef, anyObjRef, fromAnyObjRef, Class, newClass, DefaultClass ( classMembers), Member, defMethod, defMethod', MethodSuffix, defSignal, defSignalNamedParams, fireSignal, SignalKey, newS...
8a3b4dad198ba4a7dac92e53049357efb01a1cf953389448d33e8faecf067abe
coq-tactician/coq-tactician
dijkstra_iterative_search.ml
open Tactician_util open Search_strategy open Proofview open Notations exception DepthEnd of float let tclFoldPredictions max_reached tacs = let rec aux tacs depth = let open Proofview in match IStream.peek tacs with | IStream.Nil -> tclZERO ( match depth with | None -> Predict...
null
https://raw.githubusercontent.com/coq-tactician/coq-tactician/9608491ed6294f50929bad1c2aaa29d1ae053965/src/dijkstra_iterative_search.ml
ocaml
TODO: max_reached is a hack, remove TODO: At some point we should start using the focus let () = register_search_strategy "dijkstra iterative search" (tclSearchDijkstraIterative 0.)
open Tactician_util open Search_strategy open Proofview open Notations exception DepthEnd of float let tclFoldPredictions max_reached tacs = let rec aux tacs depth = let open Proofview in match IStream.peek tacs with | IStream.Nil -> tclZERO ( match depth with | None -> Predict...
45c54e59da59606f9f96a3c1f307e51f9527713667737ef8aa6904d948f753cf
kirasystems/views
hash.clj
(ns views.hash (:require [hasch.benc :refer [-coerce magics PHashCoercion]] [hasch.core :refer [edn-hash]] [hasch.platform :refer [encode md5-message-digest]])) (extend-protocol PHashCoercion java.math.BigDecimal (-coerce [this md-create-fn write-handlers] (encode (:number magics) (.getBytes (.to...
null
https://raw.githubusercontent.com/kirasystems/views/16746454cf32041b70ed269b7836290dabbc0bb1/src/views/hash.clj
clojure
(ns views.hash (:require [hasch.benc :refer [-coerce magics PHashCoercion]] [hasch.core :refer [edn-hash]] [hasch.platform :refer [encode md5-message-digest]])) (extend-protocol PHashCoercion java.math.BigDecimal (-coerce [this md-create-fn write-handlers] (encode (:number magics) (.getBytes (.to...
33bfcc73676f24a26048f5fd4fad2ab54112930ce7908761dd6a23f5c5ed8087
jfischoff/twitch
Rule.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE BangPatterns # module Tests.Twitch.Rule where import Test.Hspec import Twitch.Rule import Data.IORef import Data.Default testSetter sel setter = do ref <- newIORef "" let rule = def `setter` writeIORef ref expected = "yo" sel rule expected actual <- readI...
null
https://raw.githubusercontent.com/jfischoff/twitch/9ed10b0aaff8aace3b8b2eb47d605d9107194b95/tests/Tests/Twitch/Rule.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE BangPatterns # module Tests.Twitch.Rule where import Test.Hspec import Twitch.Rule import Data.IORef import Data.Default testSetter sel setter = do ref <- newIORef "" let rule = def `setter` writeIORef ref expected = "yo" sel rule expected actual <- readIORef ref actual `shouldBe` expect...
51a4201561453ce0ff8d76b9d9f81ac2c10026660d51019f61d35f2811cab070
madvas/emojillionaire
db.cljs
(ns emojillionaire.db (:require [cljs-web3.core :as web3] [cljs.spec :as s] [cljsjs.bignumber] [emojillionaire.emojis :refer [emojis]])) (def default-db {:web3 (or (aget js/window "web3") (if goog.DEBUG (web3/create-web3 ":8545/") Let 's borrow this ;) Thanks MetaMask ...
null
https://raw.githubusercontent.com/madvas/emojillionaire/ee47e874db0c88b91985b6f9e72221f12d3010ff/src/cljs/emojillionaire/db.cljs
clojure
) Thanks MetaMask guys ! :network :privnet testnet
(ns emojillionaire.db (:require [cljs-web3.core :as web3] [cljs.spec :as s] [cljsjs.bignumber] [emojillionaire.emojis :refer [emojis]])) (def default-db {:web3 (or (aget js/window "web3") (if goog.DEBUG (web3/create-web3 ":8545/") :provides-web3? (or (aget js/window "...
b67677f396165e2e24cfd57140c9eccecf3389ef52e8790c813cded4c72631e2
clojurians-org/haskell-example
MinIO.hs
# LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE LambdaCase # # LANGUAGE RecursiveDo # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # module Frontend.Page.DataSource.SQLCursor (dataSource_sqlCursor_handle, dataSource_sqlCursor) where import Common.WebSocketMessage import Prelude im...
null
https://raw.githubusercontent.com/clojurians-org/haskell-example/c96b021bdef52a121e04ea203c8c3e458770a25a/conduit-ui/frontend/src/Frontend/Page/DataSandbox/DataService/FileService/MinIO.hs
haskell
name type host database table
# LANGUAGE NoImplicitPrelude # # LANGUAGE ScopedTypeVariables # # LANGUAGE LambdaCase # # LANGUAGE RecursiveDo # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # module Frontend.Page.DataSource.SQLCursor (dataSource_sqlCursor_handle, dataSource_sqlCursor) where import Common.WebSocketMessage import Prelude im...
5575e8a7b1cb0179eac8b1918d2745257b7c3b8212e3bbf54b13534613c4e3f1
ucsd-progsys/mist
SimpleTypes.hs
# LANGUAGE PatternSynonyms # module Tests.SimpleTypes ( T.Prim (..) , T.Id , T.Type (..), T.TVar (..), T.Ctor (..) , T.RType (..) -- * Abstract syntax of Mist , T.Expr , pattern Number , pattern AnnNumber , pattern Boolean , pattern AnnBoolean , pattern Unit , pattern AnnUnit , pattern I...
null
https://raw.githubusercontent.com/ucsd-progsys/mist/0a9345e73dc53ff8e8adb8bed78d0e3e0cdc6af0/tests/Tests/SimpleTypes.hs
haskell
* Abstract syntax of Mist
# LANGUAGE PatternSynonyms # module Tests.SimpleTypes ( T.Prim (..) , T.Id , T.Type (..), T.TVar (..), T.Ctor (..) , T.RType (..) , T.Expr , pattern Number , pattern AnnNumber , pattern Boolean , pattern AnnBoolean , pattern Unit , pattern AnnUnit , pattern Id , pattern AnnId , pattern...
1985ad0ac3ea765e56f12dcec55ee33766c582595ebca98186213c7747c0f8f9
zcaudate/hara
wagon_test.clj
(ns hara.lib.aether.wagon-test (:use hara.test) (:require [hara.lib.aether.wagon :refer :all])) ^{:refer hara.lib.aether.wagon/add-factory :added "3.0"} (fact "registers a wagon factory for creating transports") ^{:refer hara.lib.aether.wagon/remove-factory :added "3.0"} (fact "removes the registered wagon factor...
null
https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/lib/aether/wagon_test.clj
clojure
(ns hara.lib.aether.wagon-test (:use hara.test) (:require [hara.lib.aether.wagon :refer :all])) ^{:refer hara.lib.aether.wagon/add-factory :added "3.0"} (fact "registers a wagon factory for creating transports") ^{:refer hara.lib.aether.wagon/remove-factory :added "3.0"} (fact "removes the registered wagon factor...
efc475c4bc69b970c48ccfca312159766ac97dd8bc167f10decbaa56edb70774
threatgrid/ctim
campaign_test.clj
(ns ctim.generators.campaign-test (:require [clj-momo.test-helpers.core :as mth] [clojure.test :refer [use-fixtures]] [clojure.test.check.clojure-test :refer [defspec]] [ctim.schemas.campaign :as campaign] [ctim.test-helpers [core :as th] [prop...
null
https://raw.githubusercontent.com/threatgrid/ctim/2ecae70682e69495cc3a12fd58a474d4ea57ae9c/test/ctim/generators/campaign_test.clj
clojure
Campaign New Campaign
(ns ctim.generators.campaign-test (:require [clj-momo.test-helpers.core :as mth] [clojure.test :refer [use-fixtures]] [clojure.test.check.clojure-test :refer [defspec]] [ctim.schemas.campaign :as campaign] [ctim.test-helpers [core :as th] [prop...
75f8cc854bf891d6c9e981bbe751345a355a23fff7f1801f823f76b364ae6499
facebook/infer
Pulse.ml
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/f0f4fc1f34a3ef8bddeaa25af0d842fe11cb1f42/infer/src/pulse/Pulse.ml
ocaml
* raised when we detect that pulse is using too much memory to stop the analysis of the current procedure TODO: Default is set to true for now because we can't get the attributes of library calls right now. [needed_specialization] = current function already needs specialization before the upcoming ca...
* Copyright ( c ) Facebook , Inc. and its 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) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
4d9183bd28bf44325c88e20eeccd4b432ae08def7b78097b765e3be09a7a8bf6
wireapp/wire-server
ConversationsIntra.hs
-- This file is part of the Wire Server implementation. -- -- Copyright (C) 2023 Wire Swiss GmbH <> -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , ...
null
https://raw.githubusercontent.com/wireapp/wire-server/bd9d33f7650f1bc47700601a029df2672d4998a6/libs/wire-api/src/Wire/API/Routes/Internal/Galley/ConversationsIntra.hs
haskell
This file is part of the Wire Server implementation. Copyright (C) 2023 Wire Swiss GmbH <> This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of ...
the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module Wire.API.Routes.Internal.Galley.ConversationsIntra ( DesiredMembers...
e4f3dc949f034d6adbf0ae1eff11894852a614251e6ae0d048a2624b3da1e9ab
radicle-dev/radicle-alpha
Eval.hs
module Radicle.Lang.Eval ( eval , baseEval , callFn , ($$) , createModule ) where import Protolude hiding (Constructor, Handle, TypeError, (<>)) import qualified Data.List.NonEmpty as NonEmpty import qualified Data.Map as Map import Data.Semigroup ((<>)) import qualified Da...
null
https://raw.githubusercontent.com/radicle-dev/radicle-alpha/b38a360d9830a938fa83fc066c1d131ec903b5e1/radicle-lang/src/Radicle/Lang/Eval.hs
haskell
| The built-in, original, eval. | The buck-passing eval. Uses whatever 'eval' is in scope. runs the rest of the forms in a new scope, and then defs the module value according to the name in the declaration. @argumenst@ are not evaluated. indicates a special form that special form is processed. Otherwise
module Radicle.Lang.Eval ( eval , baseEval , callFn , ($$) , createModule ) where import Protolude hiding (Constructor, Handle, TypeError, (<>)) import qualified Data.List.NonEmpty as NonEmpty import qualified Data.Map as Map import Data.Semigroup ((<>)) import qualified Da...
6629243bfe8b396bac680d6c2fcb461f8c6acfb058c6bfa0b9f24cd150c4ea30
ocaml-multicore/ocaml-tsan
str.mli
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/otherlibs/str/str.mli
ocaml
************************************************************************ OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the * { 1 Regular expressions } * The { ! } library provides regular expressions on sequences of byte...
1c8ed910ce1911f066a165bb8e65db2d356ef6907f5f3fb3e565b38dd5e00e8e
esl/MongooseIM
mongoose_router.erl
-module(mongoose_router). -define(TABLE, ?MODULE). -export([start/0, default_routing_modules/0]). -export([get_all_domains/0, lookup_route/1, is_registered_route/1, register_route/2, unregister_route/1]). -spec get_all_domains() -> [jid:lserver()]. get_all_domains() -> ets:select(?TABLE, [{{'$1', '_'},...
null
https://raw.githubusercontent.com/esl/MongooseIM/4f6a8451705389e3de9c95e951bad42a97d7f681/src/mongoose_router.erl
erlang
start/stop
-module(mongoose_router). -define(TABLE, ?MODULE). -export([start/0, default_routing_modules/0]). -export([get_all_domains/0, lookup_route/1, is_registered_route/1, register_route/2, unregister_route/1]). -spec get_all_domains() -> [jid:lserver()]. get_all_domains() -> ets:select(?TABLE, [{{'$1', '_'},...
5fb086766a87dadc62686c457cb605ab515b30734b93f694f0f86d36c3981ba9
dgtized/shimmers
_svg_template.cljs
(ns shimmers.sketches._svg-template (:require [shimmers.common.svg :as csvg :include-macros true] [shimmers.common.ui.controls :as ctrl] [shimmers.sketch :as sketch :include-macros true] [shimmers.view.sketch :as view-sketch] [thi.ng.geom.vector :as gv])) (def width 800) (def height 600) (defn rv [x y...
null
https://raw.githubusercontent.com/dgtized/shimmers/a56f1f4d711bef182fd32030cc5d0d5b18d33f73/src/shimmers/sketches/_svg_template.cljs
clojure
(ns shimmers.sketches._svg-template (:require [shimmers.common.svg :as csvg :include-macros true] [shimmers.common.ui.controls :as ctrl] [shimmers.sketch :as sketch :include-macros true] [shimmers.view.sketch :as view-sketch] [thi.ng.geom.vector :as gv])) (def width 800) (def height 600) (defn rv [x y...
dc97369b3172ebd980d975b598e2a35bcce700b66ccdc04a5d91c388c7e4e0d8
ericcervin/getting-started-with-sketching
pg064.rkt
#lang sketching (define (setup) (size 240 120) (smoothing 'smoothed) (set-frame-rate! 60) ) (define x 80) (define y 30) (define w 80) (define h 60) (define (draw) (background 204) (if (and (> mouse-x x) (< mouse-x (+ x w)) (> mouse-y y) (< mouse-y (+ y h))) (fill 0) (fill 255)) (rect x y ...
null
https://raw.githubusercontent.com/ericcervin/getting-started-with-sketching/aa6107bc2ba6caf12f5d14c395d2e7eb173c1ba7/pg064.rkt
racket
#lang sketching (define (setup) (size 240 120) (smoothing 'smoothed) (set-frame-rate! 60) ) (define x 80) (define y 30) (define w 80) (define h 60) (define (draw) (background 204) (if (and (> mouse-x x) (< mouse-x (+ x w)) (> mouse-y y) (< mouse-y (+ y h))) (fill 0) (fill 255)) (rect x y ...
364728549b761067aa4383090065cf935f542387f08cfa71e704a3ee16824cbd
adamdoupe/find_ear_rails
merge_tp.ml
open Merge_tp_parser open Merge_tp_lexer open Parse_tree let () = Printf.printf " Example of disambiguation with a merge function Prints a parse tree Grammar : S -> E E -> int E -> E + E E -> E * E example : 1+2*3 yields (1+(2*3)) 'q' to quit " let () = flush stdout let lexbuf = Lexing.from_channel stdin let _ =...
null
https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/dypgen-20070627/demos/merge_times_plus/merge_tp.ml
ocaml
open Merge_tp_parser open Merge_tp_lexer open Parse_tree let () = Printf.printf " Example of disambiguation with a merge function Prints a parse tree Grammar : S -> E E -> int E -> E + E E -> E * E example : 1+2*3 yields (1+(2*3)) 'q' to quit " let () = flush stdout let lexbuf = Lexing.from_channel stdin let _ =...