_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
7d2c1c760e32513b7934191eeb8ce92b34a7885e82747f39c2c3c1463a0a7ade
AdaCore/why3
cfg_stackify.ml
(********************************************************************) (* *) The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University (* ...
null
https://raw.githubusercontent.com/AdaCore/why3/be1023970d48869285e68f12d32858c3383958e0/plugins/cfg/cfg_stackify.ml
ocaml
****************************************************************** This software is distributed under the terms of the GNU Lesser on linking described in file LICENSE. ...
The Why3 Verification Platform / The Why3 Development Team Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University General Public License version 2.1 , with the special exception open Why3 open Stackify open Cfg_ast open Ptree let debug = Debug.register_flag "cfg" ~desc:"CFG plugin...
d48d34e9b71770a592a461497056972b7dd91ffa81a19f58a712676f4a8cd377
2600hz/kazoo
pqc_cb_response.erl
%%%----------------------------------------------------------------------------- ( C ) 2010 - 2020 , 2600Hz %%% @doc @author %%% 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 /. %%% %%% ...
null
https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_proper/src/pqc_cb_response.erl
erlang
----------------------------------------------------------------------------- @doc @end -----------------------------------------------------------------------------
( C ) 2010 - 2020 , 2600Hz @author This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. -module(pqc_cb_response). Accessors -export([account_id/1 ,number_state/1 ,error_co...
039e533423c9270b1b352a6dbc185c7193f8c3271d06829c68563b690fd97211
helvm/helma
Automaton.hs
module HelVM.HelMA.Automata.Zot.Automaton ( evalParams, evalWithFormat, ) where import HelVM.HelMA.Automata.Zot.Evaluator import HelVM.HelMA.Automata.Zot.Expression import HelVM.HelMA.Automata.Zot.Parser import HelVM.HelMA.Automaton.API.EvalParams import HelVM.Hel...
null
https://raw.githubusercontent.com/helvm/helma/ca7f0c7fe08b5d6614875319d8d14110395f038a/hs/src/HelVM/HelMA/Automata/Zot/Automaton.hs
haskell
module HelVM.HelMA.Automata.Zot.Automaton ( evalParams, evalWithFormat, ) where import HelVM.HelMA.Automata.Zot.Evaluator import HelVM.HelMA.Automata.Zot.Expression import HelVM.HelMA.Automata.Zot.Parser import HelVM.HelMA.Automaton.API.EvalParams import HelVM.Hel...
e05f34bd6add180d009ced3d67f7eb2657d2e98a94511b5d7a6e9d3dda731c02
reenberg/xmonad
StackSet.hs
# LANGUAGE ScopedTypeVariables # module Properties.StackSet where import Test.QuickCheck import Instances import Utils import XMonad.StackSet hiding (filter) import Data.Maybe import Data.List (nub) -- --------------------------------------------------------------------- QuickCheck properties for the StackSet ...
null
https://raw.githubusercontent.com/reenberg/xmonad/c4f471bfb6ffe70741fe76c3b154f6bae920da7f/tests/Properties/StackSet.hs
haskell
--------------------------------------------------------------------- idempotent, or both. ---------------------------------------------------------------------- issue: the data structure enforces focus by construction. But we still need to ensure there are no duplicates, and master/and -- keys sho...
# LANGUAGE ScopedTypeVariables # module Properties.StackSet where import Test.QuickCheck import Instances import Utils import XMonad.StackSet hiding (filter) import Data.Maybe import Data.List (nub) QuickCheck properties for the StackSet Some general hints for creating StackSet properties : * ops that muta...
696fdd09ac63680c82207365b151947152c24ff5711d0ed509ad4c37ba545f7a
open-company/open-company-web
project.clj
(defproject open-company-web "3.0.0-SNAPSHOT" :description "OpenCompany Web: webapp, electron app (iOS and Android) and static HTML site." :url "-company/open-company-web" :license { :name "GNU Affero General Public License Version 3" :url "-3.0.en.html" } :min-lein-version "2.9.1" ;; JVM memory ...
null
https://raw.githubusercontent.com/open-company/open-company-web/246cccb2818cc3bb9f05adeea4364ffa7171a586/project.clj
clojure
JVM memory Source paths All profile dependencies ************************************************************************ ****************** NB: don't go under 0.17.29-alpha60 ****************** ******* -company/open-company-lib/pull/82) ****** ********************************************************************...
(defproject open-company-web "3.0.0-SNAPSHOT" :description "OpenCompany Web: webapp, electron app (iOS and Android) and static HTML site." :url "-company/open-company-web" :license { :name "GNU Affero General Public License Version 3" :url "-3.0.en.html" } :min-lein-version "2.9.1" :jvm-opts ^:rep...
7afaa947f13544dd30c654d9e46e845259eb6d5990f0633fd95b89f9a2c39192
haesbaert/rawlink
rawlink.mli
* Copyright ( c ) 2015 - 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 " AN...
null
https://raw.githubusercontent.com/haesbaert/rawlink/8c705a242ea0abca55dee19bb8f1e3b9c6572f83/lib/rawlink.mli
ocaml
* Type of a rawlink. * [close_link]. Closes a rawlink. * [read_packet t]. Reads a full packet, may raise Unix.Unix_error. * [send_packet t]. Sends a full packet, may raise Unix.Unix_error.
* Copyright ( c ) 2015 - 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 " AN...
d90911a0768624a9dc316326ce88aecb10ede8a008ab16920931e3b56c9590b7
mfelleisen/7GUI
task-2.rkt
#! /usr/bin/env gracket #lang racket/gui a bi - directional temperature converter ( vs Celsius ) (define *C 0) (define *F 0) (define ((callback setter) field _evt) (define-values (field:num last) (string->number* (send field get-value))) (cond [(and field:num (rational? field:num)) (define inexact-n ...
null
https://raw.githubusercontent.com/mfelleisen/7GUI/e3631e78ab12306ad81b560443913afa4b156dec/task-2.rkt
racket
#! /usr/bin/env gracket #lang racket/gui a bi - directional temperature converter ( vs Celsius ) (define *C 0) (define *F 0) (define ((callback setter) field _evt) (define-values (field:num last) (string->number* (send field get-value))) (cond [(and field:num (rational? field:num)) (define inexact-n ...
f253413d9a42dde67834096d6968d5536ee579b4de20ceaaf58c0c5d5d7660fd
MLstate/opalang
bslPluginInterface.ml
Copyright © 2011 , 2012 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
null
https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/compiler/libbsl/bslPluginInterface.ml
ocaml
* OcamlUtils.module_name * the implementation name, expressed as concrete syntax of the target language * the string version of the bsl key * the extension, like ["ml", "js", "c"] * a uniq id for identifying the plugin * Dealing with external primitives for opa. * When the plugin asks for registering thin...
Copyright © 2011 , 2012 MLstate This file is part of . is free software : you can redistribute it and/or modify it under the terms of the GNU Affero General Public License , version 3 , as published by the Free Software Foundation . is distributed in the hope that it will be us...
b0826f7f9f4b77918454f8c5ba3fb50d9465c2349115d22d1a8f2fa13d19d35b
ConsenSysMesh/Fae
Escrow1TX1.hs
body :: Transaction Void () body _ = newContract [] c where c :: Contract String String c s = do eID <- newEscrow [] $ \() -> spend s result <- useEscrow eID () spend result
null
https://raw.githubusercontent.com/ConsenSysMesh/Fae/3ff023f70fa403e9cef80045907e415ccd88d7e8/txs/Escrow1TX1.hs
haskell
body :: Transaction Void () body _ = newContract [] c where c :: Contract String String c s = do eID <- newEscrow [] $ \() -> spend s result <- useEscrow eID () spend result
e03a75d66f586eec09e29d64da9fe7cc72a5feca7e150f517f60568832f321c3
binghe/cl-net-snmp
lispworks-mib.lisp
;;;; -*- Mode: Lisp -*- Generated from MIB : LISP;LISPWORKS - MIB.TXT by CL - NET - SNMP (in-package :asn.1) (eval-when (:load-toplevel :execute) (setf *current-module* '|LispWorks-MIB|)) (defpackage :|ASN.1/LispWorks-MIB| (:nicknames :|LispWorks-MIB|) (:use :common-lisp :asn.1) (:import-from :|ASN.1/SNMPv2...
null
https://raw.githubusercontent.com/binghe/cl-net-snmp/3cf053bce75734097f0d7e2245a53fa0c45f5e05/compiled-mibs/lispworks-mib.lisp
lisp
-*- Mode: Lisp -*- LISPWORKS - MIB.TXT by CL - NET - SNMP
(in-package :asn.1) (eval-when (:load-toplevel :execute) (setf *current-module* '|LispWorks-MIB|)) (defpackage :|ASN.1/LispWorks-MIB| (:nicknames :|LispWorks-MIB|) (:use :common-lisp :asn.1) (:import-from :|ASN.1/SNMPv2-SMI| module-identity object-type object-identity notification-type |enterp...
2e2c3c98ff364520736b22ee485363205612f4cc944ee015c9cad75a66d2b07e
patricoferris/meio
burn.ml
open Eio let woops_sleepy ~clock = Switch.run @@ fun sw -> Fiber.fork ~sw (fun () -> (* Woops! Wrong sleep function, we blocked the fiber *) traceln "Woops! Blocked by Unix.sleepf"; Unix.sleepf 5.; Time.sleep clock 10.) let spawn ~clock min max = Some GC action for _i = 0 to 100 do ...
null
https://raw.githubusercontent.com/patricoferris/meio/e9094ba0b91323f0a1eb161f1a084f8350273920/example/burn.ml
ocaml
Woops! Wrong sleep function, we blocked the fiber A long running task
open Eio let woops_sleepy ~clock = Switch.run @@ fun sw -> Fiber.fork ~sw (fun () -> traceln "Woops! Blocked by Unix.sleepf"; Unix.sleepf 5.; Time.sleep clock 10.) let spawn ~clock min max = Some GC action for _i = 0 to 100 do ignore (Sys.opaque_identity @@ Array.init 1000000 float_of_in...
4698b74f43010d6780c7f614a63593943fdce50f3bb0270824dd55b91593c315
heraldry/heraldicon
core.cljs
(ns heraldicon.util.core (:require [cljs-time.core :as time] [cljs-time.format :as format])) (defn deep-merge-with [f & maps] (apply (fn m [& maps] (if (every? map? maps) (apply merge-with m maps) (apply f maps))) maps)) (defn xor [a b] (or (and a (not b)) (and (not a) b))) ...
null
https://raw.githubusercontent.com/heraldry/heraldicon/f742958ce1e85f47c8222f99c6c594792ac5a793/src/heraldicon/util/core.cljs
clojure
(ns heraldicon.util.core (:require [cljs-time.core :as time] [cljs-time.format :as format])) (defn deep-merge-with [f & maps] (apply (fn m [& maps] (if (every? map? maps) (apply merge-with m maps) (apply f maps))) maps)) (defn xor [a b] (or (and a (not b)) (and (not a) b))) ...
56892e1c40f70d2bb21b51941558ec0639d42688aab97a1744faf72eaa4139a0
LambdaScientist/CLaSH-by-example
Dflop_en_clr.hs
# LANGUAGE DataKinds # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE NoImplicitPrelude # module ClocksAndRegisters.Models.Dflop_en_clr where import CLaSH.Prelude import Control.Lens hiding ((:>)) import Text.PrettyPrint.HughesPJClass import SAFE.TestingTools import SAFE.CommonC...
null
https://raw.githubusercontent.com/LambdaScientist/CLaSH-by-example/e783cd2f2408e67baf7f36c10398c27036a78ef3/HaskellClashExamples/src/ClocksAndRegisters/Models/Dflop_en_clr.hs
haskell
inputs Outputs and state data
# LANGUAGE DataKinds # # LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # # LANGUAGE NoImplicitPrelude # module ClocksAndRegisters.Models.Dflop_en_clr where import CLaSH.Prelude import Control.Lens hiding ((:>)) import Text.PrettyPrint.HughesPJClass import SAFE.TestingTools import SAFE.CommonC...
bd2b7b13c3bd05e9710474c4738a5fa30fe63070b4bed7328f997959d75cfd02
RefactoringTools/HaRe
tiTest0.hs
module TiTest0 where default(Int) newtype Id = Id String newtype F f = F (f Prelude.Int) newtype F2 f = F2 (f Int Int) liftM : : = > ( a->b ) - > m a - > m b liftM f m = do x<-m; return (f x) lnil = length [] data Tags f1 f2 a = (f1 a) :&: (f2 a) hello = "Hello, world!\n" hello_again = fmap id hello -- unific...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/base/tests/tiTest0.hs
haskell
unification when type synonyms are present? bla = blaha {- } id :: a -> a dup :: a -> (a,a) (id1,id2) = dup id nomatch = fromJust Nothing :: a ::String
module TiTest0 where default(Int) newtype Id = Id String newtype F f = F (f Prelude.Int) newtype F2 f = F2 (f Int Int) liftM : : = > ( a->b ) - > m a - > m b liftM f m = do x<-m; return (f x) lnil = length [] data Tags f1 f2 a = (f1 a) :&: (f2 a) hello = "Hello, world!\n" lmap f xs = [f x|x<-xs] a = Id "a" ...
56dad4f9a0fec71c444545932b9187f3f1ae43d7ea68b5967e1970cf21aac524
TrustInSoft/tis-interpreter
intmap.mli
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of WP plug - in of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/qed/src/intmap.mli
ocaml
************************************************************************ alternatives) ...
Modified by TrustInSoft This file is part of WP plug - in of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat a l'energie atomique et aux energies Lesser General Public License as published by the Free Soft...
2c76cae7b33296fcf1ba889c56f41946244ea7c38466742a8dc8e7ceafe80f7d
twosigma/Cook
testutil.clj
;; Copyright ( c ) Two Sigma Open Source , LLC ;; Licensed under the Apache License , Version 2.0 ( the " License " ) ; ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -2.0 ;; ;; Unless required by applicable law or agreed to in writing, software...
null
https://raw.githubusercontent.com/twosigma/Cook/3107c206e1bae4e51e723b43a0e6c7f14679eb0f/scheduler/src/cook/test/testutil.clj
clojure
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 language governing permi...
Copyright ( c ) Two Sigma Open Source , LLC distributed under the License is distributed on an " AS IS " BASIS , (ns cook.test.testutil (:require [clj-logging-config.log4j :as log4j-conf] [clj-time.core :as t] [clojure.core.async :as async] [clojure.core.cache :as cache] ...
40fcae7b0778036d26e054aa9a636cf78a4329b864f864705f2324377030f55f
TerrorJack/yuuenchi
DeBruijn.hs
# LANGUAGE FlexibleInstances # {-# LANGUAGE RankNTypes #-} module DeBruijn ( Expr(..) , DBI(..) , toDBI ) where import Control.Applicative class Expr t where lam :: (t -> t) -> t app :: t -> t -> t data DBI = Var Int | Lam DBI | App DBI DBI deriving (Eq, Show) instance Expr (Int -> DBI)...
null
https://raw.githubusercontent.com/TerrorJack/yuuenchi/f2af8d8c2c71c93c1ddb61e87629ae53851dd2e6/src/DeBruijn.hs
haskell
# LANGUAGE RankNTypes #
# LANGUAGE FlexibleInstances # module DeBruijn ( Expr(..) , DBI(..) , toDBI ) where import Control.Applicative class Expr t where lam :: (t -> t) -> t app :: t -> t -> t data DBI = Var Int | Lam DBI | App DBI DBI deriving (Eq, Show) instance Expr (Int -> DBI) where lam f i = Lam (f (\...
abded70a4ce707d6a34fade6f64e155b89694a20e76479678a0fdd6f255e2e83
ejgallego/coq-serapi
ser_hints.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2016 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/serlib/ser_hints.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 - 2016 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Copyright 2016 - 2018 MINES...
660dc63318b0085dde6cc53f73b89353d1a1e9d2cd2040b724336ef11d45df2b
michiari/ppl
2020-11-05.hs
module ES20201105 where -- Let's make some data types data RegionStatus = Yellow | Orange | Red instance Show RegionStatus where show Yellow = "Yellow region" show Orange = "Orange region" show Red = "Red region" instance Eq RegionStatus where Yellow == Yellow = True Orange == Orange = True Red == Red = ...
null
https://raw.githubusercontent.com/michiari/ppl/af5c60c10fc5cac59ab5d3bf2a00e871737b37c1/2020/2020-11-05.hs
haskell
Let's make some data types Point x y -> (x,y) Some other ways of declaring it Yet another binary tree zip finctions for lists we can make them for trees as well a map for binary trees Functor laws: Indeed: and foldr for binary trees Infinite trees
module ES20201105 where data RegionStatus = Yellow | Orange | Red instance Show RegionStatus where show Yellow = "Yellow region" show Orange = "Orange region" show Red = "Red region" instance Eq RegionStatus where Yellow == Yellow = True Orange == Orange = True Red == Red = True _ == _ = False instanc...
bd77c22cd5e2a0e96ffdeb3b080acb5c6e26d18e70aa844b39ab5294e8fe9f74
clj-commons/rewrite-cljs
project.clj
(defproject rewrite-cljs "0.4.6-SNAPSHOT" :description "Comment-/Whitespace-preserving rewriting of EDN documents." :url "-commons/rewrite-cljs" :license {:name "MIT License" :url "" :year 2015 :key "mit"} :dependencies [[org.clojure/clojure "1.10.0"] [org.cl...
null
https://raw.githubusercontent.com/clj-commons/rewrite-cljs/5b0fdea43a6748519d0b0ad3d7eaa98aa541de35/project.clj
clojure
(defproject rewrite-cljs "0.4.6-SNAPSHOT" :description "Comment-/Whitespace-preserving rewriting of EDN documents." :url "-commons/rewrite-cljs" :license {:name "MIT License" :url "" :year 2015 :key "mit"} :dependencies [[org.clojure/clojure "1.10.0"] [org.cl...
58683ea64f86c5e44d742931dc8a9db2c1b1f9e72509eeca13cddfced0e37be0
bobbae/gosling-emacs
mh-resend.ml
; This autoloaded file implements the "y" command of mhe ; If an argument is provided, it will be used as the buffer to send. (defun (&mh-resend actn rebuffer #draft #draft-fn (setq #draft (if (= (recursion-depth) 1) "redraft" (concat "redraft-" (recursion-depth)))) (setq #draft-fn (concat mh-path "/redraf...
null
https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/maclib/mh-resend.ml
ocaml
; This autoloaded file implements the "y" command of mhe ; If an argument is provided, it will be used as the buffer to send. (defun (&mh-resend actn rebuffer #draft #draft-fn (setq #draft (if (= (recursion-depth) 1) "redraft" (concat "redraft-" (recursion-depth)))) (setq #draft-fn (concat mh-path "/redraf...
009c0d8c0fc219146f33ca020d4fbd6cf1ee21a9e35569abf403183c34115c41
ml4tp/tcoq
coq.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/ide/coq.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** * Return the imperative computation ...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Coq : Interaction with the ...
305787d7441cd140a43b3d26acb6882a53dcfefa662c3e5aec96555faca68a44
owlbarn/actor
actor_paramserver.ml
* Actor - Parallel & Distributed Engine of Owl System * Copyright ( c ) 2016 - 2018 < > * Actor - Parallel & Distributed Engine of Owl System * Copyright (c) 2016-2018 Liang Wang <> *) Model Parallel : Parameter server module open Actor_types (* the global context: master, worker, etc. *) let _co...
null
https://raw.githubusercontent.com/owlbarn/actor/878f4588f4ee235994bbc4e77648858bb562bdd2/lib/actor_paramserver.ml
ocaml
the global context: master, worker, etc. default schedule function * TODO: fix scheduler ... default pull function default stopping function default barrier function unmarshal the schedule and pull functions loop to process messages synchronisation barrier check schecule the passed at every message ar...
* Actor - Parallel & Distributed Engine of Owl System * Copyright ( c ) 2016 - 2018 < > * Actor - Parallel & Distributed Engine of Owl System * Copyright (c) 2016-2018 Liang Wang <> *) Model Parallel : Parameter server module open Actor_types let _context = ref (Actor_utils.empty_param_context ()...
d1188763cd83e646cd58b19dd6946feb737b42a6b67e2d26a5d6079be386c2c7
haskell-tools/haskell-tools
InfixOperator.hs
module Refactor.DollarApp.InfixOperator where import Refactor.DollarApp.Defs x = f (g 3) + 3
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/experimental-refactorings/examples/Refactor/DollarApp/InfixOperator.hs
haskell
module Refactor.DollarApp.InfixOperator where import Refactor.DollarApp.Defs x = f (g 3) + 3
07483e09076c42c8aa6d8ed7c61c56154575e21e78c6130936eb1ab262824426
tfausak/monadoc-5
UserId.hs
module Monadoc.Type.GitHub.UserId where import qualified Data.Aeson as Aeson import qualified Database.SQLite.Simple.FromField as Sql import qualified Database.SQLite.Simple.ToField as Sql import Monadoc.Prelude | A GitHub user 's integral ID . This is n't normally surfaced through their -- UI, but it's a stable id...
null
https://raw.githubusercontent.com/tfausak/monadoc-5/5361dd1870072cf2771857adbe92658118ddaa27/src/lib/Monadoc/Type/GitHub/UserId.hs
haskell
UI, but it's a stable identifier. Note that people can change their
module Monadoc.Type.GitHub.UserId where import qualified Data.Aeson as Aeson import qualified Database.SQLite.Simple.FromField as Sql import qualified Database.SQLite.Simple.ToField as Sql import Monadoc.Prelude | A GitHub user 's integral ID . This is n't normally surfaced through their usernames , which are cal...
c65a9c7d8ffa1992c2bac6c3c30374f634c1eee265384a48d09a8cefb5f73c31
GrantMatejka/rasm
lambda.rkt
#lang racket (provide func) (define (func) (((lambda (x) (lambda () (+ 15 (x)))) (lambda () 12))))
null
https://raw.githubusercontent.com/GrantMatejka/rasm/2364003985ba2f2070aaba512d66c585951e2455/examples/lambda.rkt
racket
#lang racket (provide func) (define (func) (((lambda (x) (lambda () (+ 15 (x)))) (lambda () 12))))
a752b37139cc260c477d7ed7d1c1a3ba0bc67cffaf2215c677772f0b162418ff
tari3x/csec-modex
template.mli
Copyright ( c ) ( ) . This file is distributed as part of csec - tools under a BSD license . See LICENSE file for copyright notice . Copyright (c) Mihhail Aizatulin (). This file is distributed as part of csec-tools under a BSD license. See LICENSE file for copyright notice. *) open Common open...
null
https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/src/symtrace/template.mli
ocaml
Take the types of variables and functions from CV and the rest from PV.
Copyright ( c ) ( ) . This file is distributed as part of csec - tools under a BSD license . See LICENSE file for copyright notice . Copyright (c) Mihhail Aizatulin (). This file is distributed as part of csec-tools under a BSD license. See LICENSE file for copyright notice. *) open Common open...
91fca6bec3a8c52b4c39e591b799073d149d930ff520c313dfdbfb8ba743175c
ermine-language/ermine
Parser.hs
# LANGUAGE TemplateHaskell # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # {-# LANGUAGE DeriveTraversable #-} module Ermine.Parser where import Control.Applicative import Control.Lens import Control.Monad import Data.Foldable import Data.Monoid import qualified Data.Set as Set import Data.Set (Set) import Dat...
null
https://raw.githubusercontent.com/ermine-language/ermine/bd58949ab56311be9e0d2506a900f3d77652566b/src/Ermine/Parser.hs
haskell
# LANGUAGE DeriveTraversable # # UNPACK # # UNPACK # # UNPACK # # UNPACK # old state old state old state fall through old state fall through carefully avoid flagging this as a mutation if we don't change state so we can backtrack. satisfaction without changing beginning of line flag fall through fall through ...
# LANGUAGE TemplateHaskell # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveFoldable # module Ermine.Parser where import Control.Applicative import Control.Lens import Control.Monad import Data.Foldable import Data.Monoid import qualified Data.Set as Set import Data.Set (Set) import Data.Traversable import Data.Void impo...
a78505f3bbe530024dcd3ce988aa94ce0b7737c2909d6530ff9f0c8391d0b316
samply/blaze
util_spec.clj
(ns blaze.interaction.search.util-spec (:require [blaze.fhir.spec.spec] [blaze.http.spec] [blaze.interaction.search.util :as search-util] [blaze.spec] [clojure.spec.alpha :as s] [reitit.core :as reitit])) (s/fdef search-util/entry :args (s/cat :context (s/keys :req [:blaze/base-url ::reiti...
null
https://raw.githubusercontent.com/samply/blaze/cbf6431a254f347a704f1abe1de4f4fe8a249ac9/modules/interaction/test/blaze/interaction/search/util_spec.clj
clojure
(ns blaze.interaction.search.util-spec (:require [blaze.fhir.spec.spec] [blaze.http.spec] [blaze.interaction.search.util :as search-util] [blaze.spec] [clojure.spec.alpha :as s] [reitit.core :as reitit])) (s/fdef search-util/entry :args (s/cat :context (s/keys :req [:blaze/base-url ::reiti...
0a2d0f5f5dd0150ad46f02ac2e695c41523c90decde5748fa68518f775cd6c86
ekmett/ad
Identity.hs
# LANGUAGE CPP # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # OPTIONS_HADDOCK not - home # -------------------------------------------------------------------------...
null
https://raw.githubusercontent.com/ekmett/ad/6454d35d1aa6e2af04db9e549146c9cfe8d8bd3b/src/Numeric/AD/Internal/Identity.hs
haskell
# LANGUAGE DeriveDataTypeable # --------------------------------------------------------------------------- | License : BSD3 Maintainer : Stability : experimental ---------------------------------------------------------------------------
# LANGUAGE CPP # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeFamilies # # OPTIONS_HADDOCK not - home # Copyright : ( c ) 2010 - 2021 Portability : GHC only module Numeric.AD.Internal.Identity ( Id(...
41f1e44c1e4746ce5de84b3132847ed3e3710a15d324e689f90b5bee1c35ea12
erlang/otp
appendable.erl
%% %CopyrightBegin% %% Copyright Ericsson AB 1997 - 2023 . 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 applicable ...
null
https://raw.githubusercontent.com/erlang/otp/b52652deb54b247ab924b2f0fb12cf4286af6d7d/lib/compiler/test/beam_ssa_check_SUITE_data/appendable.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 lang...
Copyright Ericsson AB 1997 - 2023 . 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(appendable). -export([make_empty/0, t0/0, t1/0, t2/0, t3/0, t4/0, t5/0, t6/0, t7/0, t8/1, t9/1, t10/1, t11/...
e3cfde4632c0ffa7ce038c816ac8c254e25263d84720c737ed8f2f33919c6d1b
ntrocado/cl-collider-examples
5-2-granular.lisp
(defpackage #:5-2-granular (:use #:cl+qt #:sc) (:export #:main)) (in-package :5-2-granular) (named-readtables:in-readtable :qtools) (defun rrand (n1 n2) (if (= n1 n2) n1 (let ((mi (min n1 n2)) (ma (max n1 n2))) (+ mi (random (- ma mi)))))) (defun exp-rand (mi ma) (lin-exp (...
null
https://raw.githubusercontent.com/ntrocado/cl-collider-examples/67eec426ea45f5423eefd9391d9a7e8ba41f8b51/nick-collins-tutorial/5-2-granular.lisp
lisp
Audio GUI
(defpackage #:5-2-granular (:use #:cl+qt #:sc) (:export #:main)) (in-package :5-2-granular) (named-readtables:in-readtable :qtools) (defun rrand (n1 n2) (if (= n1 n2) n1 (let ((mi (min n1 n2)) (ma (max n1 n2))) (+ mi (random (- ma mi)))))) (defun exp-rand (mi ma) (lin-exp (...
76cbc8d46dd44301a2c35349662d6dd1c7857fc931dde21bd3eb806c1febaf79
deadtrickster/prometheus.cl
package.lisp
(in-package #:cl-user) (defpackage #:prometheus.formats.text (:use #:cl #:alexandria) (:nicknames #:prom.text) (:export #:+content-type+ #:marshal))
null
https://raw.githubusercontent.com/deadtrickster/prometheus.cl/60572b793135e8ab5a857d47cc1a5fe0af3a2d53/src/formats/text/package.lisp
lisp
(in-package #:cl-user) (defpackage #:prometheus.formats.text (:use #:cl #:alexandria) (:nicknames #:prom.text) (:export #:+content-type+ #:marshal))
418b809053e2fd5e57bf4728afb9128c709e6fc0357d99501b7e4b1b0b1c75aa
Gbury/mSAT
Heap.ml
module type RANKED = Heap_intf.RANKED module type S = Heap_intf.S module Make(Elt : RANKED) = struct type elt = Elt.t type t = { heap : elt Vec.t; } [@@unboxed] let _absent_index = -1 let create () = { heap = Vec.create(); } let[@inline] left i = (i lsl 1) + 1 (* i*2 + 1 *) let[@inline] rig...
null
https://raw.githubusercontent.com/Gbury/mSAT/b6ea55e7abb71e8fca294a167bf7d8091cbd82a5/src/core/Heap.ml
ocaml
i*2 + 1 (i+1)*2 [elt] is above or at its expected position. Move it up the heap (towards high indices) to restore the heap property heap.last() enforce heap property again
module type RANKED = Heap_intf.RANKED module type S = Heap_intf.S module Make(Elt : RANKED) = struct type elt = Elt.t type t = { heap : elt Vec.t; } [@@unboxed] let _absent_index = -1 let create () = { heap = Vec.create(); } ( i-1 ) / 2 let rec heap_property cmp ( { heap = heap } as s ) ...
7b3b9eed9958a64eb1ebd5a9903a507fd2fc96077fc4d24cf32285a982c1099d
altsun/My-Lisps
(FA) FieldArithmeticV1-2.lsp
;;------------------------=={ Field Arithmetic }==----------------------;; ;; ;; ;; ----------------------------------- ;; ;; Program Overview ;; ;; ----------------...
null
https://raw.githubusercontent.com/altsun/My-Lisps/85476bb09b79ef5e966402cc5158978d1cebd7eb/Field/(FA)%20FieldArithmeticV1-2.lsp
lisp
------------------------=={ Field Arithmetic }==----------------------;; ;; ----------------------------------- ;; Program Overview ;; --------------------------...
(defun c:FA ( / *error* fmt ini itm lst msg nst opr tag tmp ) (setq Field formatting for result ( " " for no formatting ) fmt "%lu6%qf1" nst t tag nil ) (defun *error* ( msg ) (LM:endundo (LM:acdoc)) (if (not (wcmatch (strcase msg t) "*break,*cancel*,*exi...
445e5ad829626f7b05aa908bfada609191a886a67c911c36140a992734257f48
ekmett/suspension
Doctests.hs
module Main where import Build_doctests (flags, pkgs, module_sources) import Test.DocTest (doctest) main :: IO () main = doctest $ flags ++ pkgs ++ module_sources
null
https://raw.githubusercontent.com/ekmett/suspension/b49deabec837838759999887a9a667b373227718/Doctests.hs
haskell
module Main where import Build_doctests (flags, pkgs, module_sources) import Test.DocTest (doctest) main :: IO () main = doctest $ flags ++ pkgs ++ module_sources
36f685c951228c6843ca77b78cbb577525a879651af06f43559188ecefeed39a
travelping/ppp
ppp_sup.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright 2010 - 2012 , Travelping GmbH < > -module(ppp_sup). -behaviour(supervisor). %% API -export([start_link/0]). %% Supervisor call...
null
https://raw.githubusercontent.com/travelping/ppp/c1e03ee93ef333b5eb8aadd14b1290cfc1001089/src/ppp_sup.erl
erlang
API Supervisor callbacks Helper macro for declaring children of supervisor =================================================================== API functions =================================================================== =================================================================== Supervisor callback...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright 2010 - 2012 , Travelping GmbH < > -module(ppp_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -defi...
62017c04efe32618d1d75dbd77a401458b00f1f205c922a586de0ceeda6128ec
clj-commons/iapetos
subsystem_test.clj
(ns iapetos.core.subsystem-test (:require [clojure.test.check [generators :as gen] [properties :as prop] [clojure-test :refer [defspec]]] [clojure.string :as string] [iapetos.test.generators :as g] [iapetos.core :as prometheus] [ia...
null
https://raw.githubusercontent.com/clj-commons/iapetos/0fecedaf8454e17e41b05e0e14754a311b9f4ce2/test/iapetos/core/subsystem_test.clj
clojure
## Helpers
(ns iapetos.core.subsystem-test (:require [clojure.test.check [generators :as gen] [properties :as prop] [clojure-test :refer [defspec]]] [clojure.string :as string] [iapetos.test.generators :as g] [iapetos.core :as prometheus] [ia...
ce4b8224e2558a665d044bc0c1af25f332c9dc5755071a21093b9450254215ad
hemmi/coq2scala
contradiction.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/tactics/contradiction.mli
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 - 2012 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Names open Term open Pro...
35e31a865dbb18f8af055cbf5fecc5ce6db82e4fdd0323fca651c640762ddc3d
rudymatela/speculate
trilean.hs
bench / trilean.hs -- Speculate example on trileans -- Copyright ( C ) 2021 -- Distributed under the 3-Clause BSD licence (see the file LICENSE). -- -- -- If used correctly, Speculate deals with Trileans just fine producing correct equations . -- -- -- The point of this example is to make Speculate produce in...
null
https://raw.githubusercontent.com/rudymatela/speculate/9af38bb837274c4e73a947cd4810816e8ab0c6fe/bench/trilean.hs
haskell
Speculate example on trileans Distributed under the 3-Clause BSD licence (see the file LICENSE). If used correctly, The point of this example is to make Speculate produce incorrect equations here we fail to enumerate @M@. This ultimately causes Speculate print: > p == M How does that happen? > p &&& ...
Copyright ( C ) 2021 Speculate deals with Trileans just fine producing correct equations . by failing to include all possible values on the ' ' enumeration . Of the three possible values ( @M@ , @F@ and @T@ ) , We first test to discover that : Which , using the correct equation @ M & & & p = = M @...
97841e096e0d10eaae5b28da704949910efb2819418f8e319399c4babca4e079
picrin-scheme/picrin
r5rs.scm
(define-library (scheme r5rs) (import (scheme base) (scheme inexact) (scheme write) (scheme read) (scheme file) (scheme cxr) (scheme lazy) (scheme eval) (scheme load)) (define-library (scheme null) (import (scheme base)) (expor...
null
https://raw.githubusercontent.com/picrin-scheme/picrin/2af16bc88fbfca2efafd27ca9e5006d73c06f6fb/contrib/20.r7rs/scheme/r5rs.scm
scheme
angle denominator imag-part interaction-environment real-part string-ci<=? string-ci=? string-ci>? make-polar numerator rationalize magnitude make-rectangular string-ci<? string-ci>=?
(define-library (scheme r5rs) (import (scheme base) (scheme inexact) (scheme write) (scheme read) (scheme file) (scheme cxr) (scheme lazy) (scheme eval) (scheme load)) (define-library (scheme null) (import (scheme base)) (expor...
2d2d8c7d45312bbb3af697f33096a6c6d0fa838d0a4e387000bfe2a488d18f5f
nd/sicp
4.2.scm
;; a - it will be endless loop ;; b (define (application? exp) (tagged-list? exp 'call)) (define (operator exp) (cadr exp)) (define (operands exp) (cddr exp)) (define (no-operands? ops) (null? ops)) (define (first-operand ops) (car ops)) (define (rest-operands ops) (cdr ops))
null
https://raw.githubusercontent.com/nd/sicp/d8587a0403d95af7c7bcf59b812f98c4f8550afd/ch04/4.2.scm
scheme
a - it will be endless loop b
(define (application? exp) (tagged-list? exp 'call)) (define (operator exp) (cadr exp)) (define (operands exp) (cddr exp)) (define (no-operands? ops) (null? ops)) (define (first-operand ops) (car ops)) (define (rest-operands ops) (cdr ops))
eba48cf7676d24f2e813d90c74077e646093ad49f846ed72621cb81a04888e38
auser/hermes
mapreduce.erl
-module (mapreduce). -include ("hermes.hrl"). -export ([submit/4, submit/5]). submit(M, F, A, Value) -> ?TRACE("Submit", [M,F,A,Value]), Nodes = athens:nodes(), submit(M, F, A, Value, Nodes). submit(M, F, A, Comparison, NodeList) -> S = self(), Acc = 0.0, Nodes = ensure_are_nodes(NodeList), Pid = spaw...
null
https://raw.githubusercontent.com/auser/hermes/32741eb75398ebbcbf640e2c73dfd2a54f0d1241/src/athens/ballots/mapreduce.erl
erlang
Collect the map reduce Reduce the values Compute the average over the nodes ==================================================================== REDUCTION ==================================================================== -------------------------------------------------------------------- Description: Collect t...
-module (mapreduce). -include ("hermes.hrl"). -export ([submit/4, submit/5]). submit(M, F, A, Value) -> ?TRACE("Submit", [M,F,A,Value]), Nodes = athens:nodes(), submit(M, F, A, Value, Nodes). submit(M, F, A, Comparison, NodeList) -> S = self(), Acc = 0.0, Nodes = ensure_are_nodes(NodeList), Pid = spaw...
e52f02356d6d3ebe06e801c7ece7bdb098778ca9637de3b8183c5b4803573475
lispnik/cl-http
tokens.lisp
;;; -*- mode: LISP; package: "XML-PARSER"; -*- ;;; this version ( C ) mecom gmbh 24.10.98 ;;; available only from the cl-http repository and NOT to be REdistributed ;;; in ANY form. see cl-xml.html. " <DOCUMENTATION> <COPYRIGHT HREF='defsystem.lisp|root().descendant(1,COPYRIGHT)'/> <DESCRIPTION> </DESCRIPTION> <...
null
https://raw.githubusercontent.com/lispnik/cl-http/84391892d88c505aed705762a153eb65befb6409/contrib/janderson/xml-1999-05-03/tokens.lisp
lisp
-*- mode: LISP; package: "XML-PARSER"; -*- available only from the cl-http repository and NOT to be REdistributed in ANY form. see cl-xml.html. this 'cause of load order end eval-when
this version ( C ) mecom gmbh 24.10.98 " <DOCUMENTATION> <COPYRIGHT HREF='defsystem.lisp|root().descendant(1,COPYRIGHT)'/> <DESCRIPTION> </DESCRIPTION> <CHRONOLOGY> <DELTA><DATE>19971205</DATE> added markers. they are instances, and thus unique, which the reader and parser uses as special tags. they are ...
371b8456e72a5cc2efe1672d31dd98cb8ebc2eaa017489d8c5120a44f9276d27
erlangonrails/devdb
exmpp_client_disco.erl
Copyright ProcessOne 2006 - 2010 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public License along with this s...
null
https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/exmpp-0.9.5/src/client/exmpp_client_disco.erl
erlang
compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the Licens...
Copyright ProcessOne 2006 - 2010 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " @author < > -module(exmpp_client_disc...
53909ef1daf806ad150f09937c08da5b462e1b53dbbd0b41ca7656c7513dbc89
janestreet/core_kernel
pooled_hashtbl.ml
open! Core open! Import open Hashtbl_intf open With_return let failwiths = Error.failwiths module Hashable = Hashtbl_intf.Hashable module Merge_into_action = Hashtbl_intf.Merge_into_action module Pool = Tuple_pool let hash_param = Hashable.hash_param let hash = Hashable.hash module Entry : sig module Pool : sig ...
null
https://raw.githubusercontent.com/janestreet/core_kernel/597299d11c2ee99f219592d89a5890f8f0b6dfe7/pooled_hashtbl/src/pooled_hashtbl.ml
ocaml
It is OK to use [Pool.Unsafe] because entries are never exposed to user code. Thus, we can convince ourselves solely from looking at the implementation of [Pooled_hashtbl] that an entry is never used after it is freed. Ensure we can fit size elements in the table. we assume here that [Entry.create] will...
open! Core open! Import open Hashtbl_intf open With_return let failwiths = Error.failwiths module Hashable = Hashtbl_intf.Hashable module Merge_into_action = Hashtbl_intf.Merge_into_action module Pool = Tuple_pool let hash_param = Hashable.hash_param let hash = Hashable.hash module Entry : sig module Pool : sig ...
23065fc3b98a2c4008feb0e61c11927b48d5f77aa1f58361f1ea7f670aee5571
lokedhs/containers
list-queue.lisp
(in-package :receptacle) (defclass list-queue (generic-sequence) ((head :type t :initarg :head :initform nil :accessor list-queue/head) (tail :type t :initarg :tail :initform nil :accessor list-queue/tail)) (:documentation "Queue that is backed by a double-l...
null
https://raw.githubusercontent.com/lokedhs/containers/5d4ce688bddd51ee34a4259e37b698b84f650bdf/src/list-queue.lisp
lisp
ELSE: Queue is empty
(in-package :receptacle) (defclass list-queue (generic-sequence) ((head :type t :initarg :head :initform nil :accessor list-queue/head) (tail :type t :initarg :tail :initform nil :accessor list-queue/tail)) (:documentation "Queue that is backed by a double-l...
8d5b681b49d93fe6fd47ca278497cc2c5cc5cb1a00b0f02de3a888aec661f2a6
jiangpengnju/htdp2e
similarities-in-data-definitions.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-intermediate-reader.ss" "lang")((modname similarities-in-data-definitions) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t co...
null
https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/abstraction/similarities-everywhere/similarities-in-data-definitions.rkt
racket
about the language level of this file in a form that our tools can easily process. List-of-numbers A Lon is one of: - '() - (cons Number Lon) List-of-String - '() - (cons String Los) "parametric data definitions" ;;;; - '() - (cons ITEM [List-of ITEM]) "instantiation" ;;;; [List-of Number] [List-of String...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-reader.ss" "lang")((modname similarities-in-data-definitions) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f))) A Los is one of : A [ Li...
7afd1141c7cad3e4806b161650ae12b969bb4dec30830039280b48390d1b4083
mfejzer/knuth-bendix-completion
DiagramWrapper.hs
# LANGUAGE NoMonomorphismRestriction , OverloadedStrings , CPP , DeriveDataTypeable , FlexibleContexts , module DiagramWrapper where import Data.Tree import Diagrams.Prelude import Diagrams.TwoD.Layout.Tree import Diagrams.TwoD.Text import Diagrams.Size import Diagrams.Backend.Cairo import Diagrams.Backend.Cairo.Cmd...
null
https://raw.githubusercontent.com/mfejzer/knuth-bendix-completion/585d7fcb86b552d412df0c519c52eb0bd517dfc0/DiagramWrapper.hs
haskell
# LANGUAGE NoMonomorphismRestriction , OverloadedStrings , CPP , DeriveDataTypeable , FlexibleContexts , module DiagramWrapper where import Data.Tree import Diagrams.Prelude import Diagrams.TwoD.Layout.Tree import Diagrams.TwoD.Text import Diagrams.Size import Diagrams.Backend.Cairo import Diagrams.Backend.Cairo.Cmd...
0288466d9f229397d803d05dbe3689c40408ff440e2490cc0cab2e95f7f96e3a
danieljharvey/mimsa
Parser.hs
{-# LANGUAGE OverloadedStrings #-} module Repl.Parser ( replParser, ) where import Data.Functor import qualified Data.List.NonEmpty as NE import qualified Data.Set as S import Language.Mimsa.Backend.Types import Language.Mimsa.Core import Repl.Types import Text.Megaparsec type ReplActionAnn = ReplAction Annotati...
null
https://raw.githubusercontent.com/danieljharvey/mimsa/564c32cc28d990c9e686f63533a9e30c3736aee4/repl/repl/Repl/Parser.hs
haskell
# LANGUAGE OverloadedStrings # return very basic error
module Repl.Parser ( replParser, ) where import Data.Functor import qualified Data.List.NonEmpty as NE import qualified Data.Set as S import Language.Mimsa.Backend.Types import Language.Mimsa.Core import Repl.Types import Text.Megaparsec type ReplActionAnn = ReplAction Annotation replParser :: Parser ReplAction...
e3b7fe3b62d5f7014ce75f3590065e94c3c1b3333cc191026fd403ba0d419e4f
rmloveland/scheme48-0.53
contin.scm
Copyright ( c ) 1993 - 1999 by and . See file COPYING . ; Continuations implemented as vectors. (define *continuation-marker* (list '*continuation-marker*)) (define (make-continuation len init) (let ((c (make-vector (+ len 1) init))) (vector-set! c 0 *continuation-marker*) c)) (define (continuation...
null
https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/alt/contin.scm
scheme
Continuations implemented as vectors.
Copyright ( c ) 1993 - 1999 by and . See file COPYING . (define *continuation-marker* (list '*continuation-marker*)) (define (make-continuation len init) (let ((c (make-vector (+ len 1) init))) (vector-set! c 0 *continuation-marker*) c)) (define (continuation? obj) (and (vector? obj) (> (v...
a51708d3c85c4bf2d7b9ffa289d421f20b3a3a83a61c74ce1ac9a03ea82c473c
skanev/playground
75.scm
SICP exercise 2.75 ; ; Implement the constructor make-from-mag-ang in message-passing style. This ; procedure should be analogousto the make-from-real-imag procedure given ; above. (define (apply-generic op arg) (arg op)) (define (magnitute imag) (apply-generic 'magnitute imag)) (define (angle imag) (apply-generic ...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/02/75.scm
scheme
Implement the constructor make-from-mag-ang in message-passing style. This procedure should be analogousto the make-from-real-imag procedure given above.
SICP exercise 2.75 (define (apply-generic op arg) (arg op)) (define (magnitute imag) (apply-generic 'magnitute imag)) (define (angle imag) (apply-generic 'angle imag)) (define (real-part imag) (apply-generic 'real-part imag)) (define (imag-part imag) (apply-generic 'imag-part imag)) (define (make-from-mag-ang mag ...
c872c0cba1414b37b7f36f54474531a46e1619da93bdafe491f04530ca003f95
TrustInSoft/tis-interpreter
state.mli
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/libraries/project/state.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
3265c00289ab2254f19e9632a021920adf36b9889bd9c532a69054c160f7a90a
crisptrutski/boot-cljs-test
core_test.clj
(ns crisptrutski.boot-error.core-test (:require [clojure.test :refer :all] [crisptrutski.boot-error.core :refer :all])) (deftest pure-test (testing "Errors can be read/written to fileset without using environment" (is (= [1 :b {'c "d"}] (-> {:a 1} (track-error 1) ...
null
https://raw.githubusercontent.com/crisptrutski/boot-cljs-test/307bc13a8b250d9583dd890c961cdec832238180/test/crisptrutski/boot_error/core_test.clj
clojure
(ns crisptrutski.boot-error.core-test (:require [clojure.test :refer :all] [crisptrutski.boot-error.core :refer :all])) (deftest pure-test (testing "Errors can be read/written to fileset without using environment" (is (= [1 :b {'c "d"}] (-> {:a 1} (track-error 1) ...
19c226e9fdd8b199894ff87a9a48c9f345e53cd6efdf1c9e5fba373ef4cc5548
nomeata/incredible
JSInterface.hs
{-# LANGUAGE OverloadedStrings #-} import Control.Applicative import Control.Monad import GHCJS.Marshal import GHCJS.Foreign hiding (Object) import GHCJS.Foreign.Callback import GHCJS.Types import Data.JSString import JavaScript.Object import JavaScript.Object.Internal (Object(..)) import JavaScript.Cast import System....
null
https://raw.githubusercontent.com/nomeata/incredible/d18ada4ae7ce1c7ca268c050ee688b633a307c2e/logic/js/JSInterface.hs
haskell
# LANGUAGE OverloadedStrings #
import Control.Applicative import Control.Monad import GHCJS.Marshal import GHCJS.Foreign hiding (Object) import GHCJS.Foreign.Callback import GHCJS.Types import Data.JSString import JavaScript.Object import JavaScript.Object.Internal (Object(..)) import JavaScript.Cast import System.IO import Control.Concurrent import...
f9ffa3e2e1ce558a1aef54b3dbf37eb9319dd8c5b23265f31cf0d9122ea32232
babashka/sci
namespaces.cljc
(ns sci.impl.namespaces {:no-doc true} (:refer-clojure :exclude [ex-message ex-cause eval read read-string require use load-string *1 *2 *3 *e #?(:cljs type) bound-fn* with-bindings* ...
null
https://raw.githubusercontent.com/babashka/sci/1f8128cd26754c6d1ac99c9c9db20bccbcebddda/src/sci/impl/namespaces.cljc
clojure
Namespaces / vars protects :aliases, :imports, :obj, etc. remove lingering var that may have been nil marks the imported class as unmapped in this case the var will become unbound End eval and read-string Require + resolve End require + resolve Binding vars important: outside try important: outside try End ...
(ns sci.impl.namespaces {:no-doc true} (:refer-clojure :exclude [ex-message ex-cause eval read read-string require use load-string *1 *2 *3 *e #?(:cljs type) bound-fn* with-bindings* ...
af9ce0f25db4317fe52992458de54d1691f73c097d6c92fa82762f362087f68d
anuragsoni/snabbdom-ml
snabbdom.mli
module M : sig type t val attributes_module : t val class_module : t val props_module : t val event_listeners_module : t val style_module : t val dataset_module : t end module Vnode = Vnode val init : M.t list -> [< `Element of Brr.El.t | `Vnode of Vnode.t ] -> Vnode.t -> unit
null
https://raw.githubusercontent.com/anuragsoni/snabbdom-ml/1ce151b0989d4795ee02666376c09ab27b52ee71/lib/snabbdom.mli
ocaml
module M : sig type t val attributes_module : t val class_module : t val props_module : t val event_listeners_module : t val style_module : t val dataset_module : t end module Vnode = Vnode val init : M.t list -> [< `Element of Brr.El.t | `Vnode of Vnode.t ] -> Vnode.t -> unit
03ed596a61ff0aa1961bb0daab2314584cfa25a3e7b4a9ddf116f0188ec169de
artlaman/chalice-icon-theme
vscode.cljs
(ns chalice.vscode) (def vscode (js/require "vscode")) (defn register-command! [id f] (.registerCommand (.. vscode -commands) id f)) (defn push-subscription! [context disp] (.push (.. context -subscriptions) disp)) (defn on-config-change [f] (.onDidChangeConfiguration (.. vscode -workspace) f)) (defn a...
null
https://raw.githubusercontent.com/artlaman/chalice-icon-theme/1d63ebe87b6af1da68fa3263b1f4592f203b46b2/src/chalice/vscode.cljs
clojure
(ns chalice.vscode) (def vscode (js/require "vscode")) (defn register-command! [id f] (.registerCommand (.. vscode -commands) id f)) (defn push-subscription! [context disp] (.push (.. context -subscriptions) disp)) (defn on-config-change [f] (.onDidChangeConfiguration (.. vscode -workspace) f)) (defn a...
1f78e58a1fe8cee27773767bf8693534d2d6dfa99e71bf91eef293f84bdb56f7
dinosaure/blaze
make.ml
open Mrmime open Rresult let stream_of_filename_with_crlf filename = let ic = open_in (Fpath.to_string filename) in fun () -> match input_line ic with | line -> Some (line ^ "\r\n", 0, String.length line + 2) | exception End_of_file -> close_in ic ; None let stream_of_stdin_with_crlf (...
null
https://raw.githubusercontent.com/dinosaure/blaze/4b823268d804b2a8363f741b95db8b9f5e7437c7/bin/make.ml
ocaml
open Mrmime open Rresult let stream_of_filename_with_crlf filename = let ic = open_in (Fpath.to_string filename) in fun () -> match input_line ic with | line -> Some (line ^ "\r\n", 0, String.length line + 2) | exception End_of_file -> close_in ic ; None let stream_of_stdin_with_crlf (...
c71ee150288127e7633d1cb33f9e691a1b1fc4d8181e377eff1e4b2561df5d6f
fujita-y/digamma
read.scm
Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited . ;;; See LICENSE file for terms and conditions of use. (define-library (scheme read) (import (core primitives)) (export read))
null
https://raw.githubusercontent.com/fujita-y/digamma/58cccd77bd2c208ec58d3cd634cbe65e32b3c7ec/stdlib/scheme/read.scm
scheme
See LICENSE file for terms and conditions of use.
Copyright ( c ) 2004 - 2022 Yoshikatsu Fujita / LittleWing Company Limited . (define-library (scheme read) (import (core primitives)) (export read))
f98173b228e39d91db732024cca5ad46292b11742ddfcb64cc5d1de65896bb95
dyoo/whalesong
sample-run.rkt
#lang racket (require whalesong/get-module-bytecode whalesong/parser/parse-bytecode whalesong/compiler/compiler whalesong/compiler/compiler-structs whalesong/js-assembler/assemble) (define bytecode (get-module-bytecode (open-input-string (string-append "#lang whalesong\n...
null
https://raw.githubusercontent.com/dyoo/whalesong/636e0b4e399e4523136ab45ef4cd1f5a84e88cdc/whalesong/sandbox/sample-run.rkt
racket
#lang racket (require whalesong/get-module-bytecode whalesong/parser/parse-bytecode whalesong/compiler/compiler whalesong/compiler/compiler-structs whalesong/js-assembler/assemble) (define bytecode (get-module-bytecode (open-input-string (string-append "#lang whalesong\n...
41542aaef1d820a9daff7cbab94e7092f70414e5ed85e07be545c587ebb7df76
HaskellCNOrg/snap-web
Types.hs
{-# LANGUAGE OverloadedStrings #-} module Views.Types where import Application import Heist import qualified Heist.Interpreted as I import Models.Exception -- | This class is born because when do MonadIO.try with models functions, -- its return type is `Either exception data`. Hence m...
null
https://raw.githubusercontent.com/HaskellCNOrg/snap-web/f104fd9b8fc5ae74fc7b8002f0eb3f182a61529e/src/Views/Types.hs
haskell
# LANGUAGE OverloadedStrings # | This class is born because when do MonadIO.try with models functions, its return type is `Either exception data`. Hence make a generic render. See also the helper @eitherToSplices@. ------------------------------------------------------------ | FIXME: What if at some exception ...
module Views.Types where import Application import Heist import qualified Heist.Interpreted as I import Models.Exception class SpliceRenderable a where toSplice :: a -> I.Splice AppHandler eitherToSplices :: SpliceRenderable a => Either UserException a -> Splices (I.Splice AppHand...
0b8453805691e21cc53d0a8da2daed154373159c753ca704def42bdae14babab
mitchellwrosen/planet-mitchell
Partial.hs
module Text.Short.Partial ( module Data.Text.Short.Partial ) where import Data.Text.Short.Partial
null
https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Text/Short/Partial.hs
haskell
module Text.Short.Partial ( module Data.Text.Short.Partial ) where import Data.Text.Short.Partial
769f9d3f9e640ce63301e39a661d6984143aa2274a052f6299746a90b1bd594d
green-coder/vrac
core.cljc
(ns vrac.core (:require [clojure.set :as set] [minimallist.core :as m] [vrac.model :as vm] [vrac.util :refer [map-vals tag-id-class]]) #?(:cljs (:require-macros vrac.core))) ;; A macro for writing the templates more like a function. ;; Note: in the end, the component is still j...
null
https://raw.githubusercontent.com/green-coder/vrac/911051e855aa4da7a36e61bd477e60f7bc381aee/src/vrac/core.cljc
clojure
A macro for writing the templates more like a function. Note: in the end, the component is still just a map of data.
(ns vrac.core (:require [clojure.set :as set] [minimallist.core :as m] [vrac.model :as vm] [vrac.util :refer [map-vals tag-id-class]]) #?(:cljs (:require-macros vrac.core))) (defmacro defc [& params] (let [desc (m/describe vm/defc-args-model params)] (when (= desc :invali...
14f887a79e39d87c0efc9e39ce9982dff84cf477dabb599bbebbff638b57b876
bufferswap/ViralityEngine
region-defs.lisp
(in-package #:virality) (defclass region () ((%center :accessor center :initarg :center :initform (v3:zero)))) (defclass region-cuboid (region) ((%minx :accessor minx :initarg :minx :initform -.5f0) (%maxx :accessor maxx :initarg :maxx :initform ....
null
https://raw.githubusercontent.com/bufferswap/ViralityEngine/df7bb4dffaecdcb6fdcbfa618031a5e1f85f4002/src/datatype/region-defs.lisp
lisp
A specific type to make math faster when it is KNOWN one is using a sphere for something. positive distances of each principal axis.
(in-package #:virality) (defclass region () ((%center :accessor center :initarg :center :initform (v3:zero)))) (defclass region-cuboid (region) ((%minx :accessor minx :initarg :minx :initform -.5f0) (%maxx :accessor maxx :initarg :maxx :initform ....
b628f96100c1c72dade245e3d584929c212335645c60d02b43094c0863944345
WormBase/wormbase_rest
references.clj
(ns rest-api.classes.construct.widgets.references (:require [rest-api.classes.generic-fields :as generic])) (def widget {:name generic/name-field :references generic/references})
null
https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/construct/widgets/references.clj
clojure
(ns rest-api.classes.construct.widgets.references (:require [rest-api.classes.generic-fields :as generic])) (def widget {:name generic/name-field :references generic/references})
9228e76ec61488049f4ead6744e5f6e130d1fd2efd686f3b12e15d7eb0528dc0
sol/doctest
Foo.hs
module Foo where -- | Some documentation foo :: Int foo =
null
https://raw.githubusercontent.com/sol/doctest/ec6498542986b659f50e961b02144923f6f41eba/test/integration/parse-error/Foo.hs
haskell
| Some documentation
module Foo where foo :: Int foo =
623ef719d403537c9a4d9a7b83d3c582c440f9bc3103142ca4ae58fdf78f792e
juspay/atlas
Status.hs
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/public-transport-bap/src/Core/Spec/API/Status.hs
haskell
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
b81c7cb2b8672cb7adb9cbca944ea5f9d27d7ef55de2fcadbaa171c2af9d50c8
modular-macros/ocaml-macros
constraints.ml
type 'a t = [`A of 'a t t] as 'a;; (* fails *) [%%expect{| Line _, characters 0-32: Error: The definition of t contains a cycle: 'a t t as 'a |}, Principal{| Line _, characters 0-32: Error: The definition of t contains a cycle: [ `A of 'a t t ] as 'a |}];; type 'a t = [`A of 'a t t];; (* fails *) [%%expec...
null
https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/typing-misc/constraints.ml
ocaml
fails fails fails ok PR#6505 fails fails fails
[%%expect{| Line _, characters 0-32: Error: The definition of t contains a cycle: 'a t t as 'a |}, Principal{| Line _, characters 0-32: Error: The definition of t contains a cycle: [ `A of 'a t t ] as 'a |}];; [%%expect{| Line _, characters 0-26: Error: In the definition of t, type 'a t t should be 'a t |...
96b0d800a94e2e085ae89f1dccc7e0ebd59da4d3cf37f98ff8cfc5e3941f88e4
mihaimaruseac/hindent
HIndent.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # -- | Haskell indenter. module HIndent ( -- * Formatting functions. reformat , prettyPrint , -- * Testing testAst ) where import Control.Monad.State.Strict import Control.Monad.Trans.Maybe i...
null
https://raw.githubusercontent.com/mihaimaruseac/hindent/626d651b26ee97fd38202d9bc6c5e663e39bc94d/src/HIndent.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # | Haskell indenter. * Formatting functions. * Testing | Format the given source. | Generate an AST from the given module for debugging. | Does the strict bytestring have a trailing newline? | Print the module. | Pretty print the given printable thing.
# LANGUAGE CPP # # LANGUAGE ScopedTypeVariables # module HIndent reformat , prettyPrint testAst ) where import Control.Monad.State.Strict import Control.Monad.Trans.Maybe import Data.ByteString (ByteString) import qualified Data.ByteString as S import Data.ByteString.Builder (Builder) import qualified Dat...
81014cd3dc995d71a66c7d0f46f38ab224ba6a99cb14f2dd02da88b463522bdd
Ejhfast/Clogger
routes.clj
(ns site.routes (:use [compojure]) (:use [site.mvc views controllers]) (:use [site.setup]) (:use [site.extras.atom])) (defroutes blog-routes (GET "/" (home-view params session flash)) (GET "/index" (index-view params)) (GET "/index/:num" (index-view params)) (GET "/login" (login-view params session)) ...
null
https://raw.githubusercontent.com/Ejhfast/Clogger/302070ed092824b0e62fac45823d0446bbc04d19/src/site/routes.clj
clojure
(ns site.routes (:use [compojure]) (:use [site.mvc views controllers]) (:use [site.setup]) (:use [site.extras.atom])) (defroutes blog-routes (GET "/" (home-view params session flash)) (GET "/index" (index-view params)) (GET "/index/:num" (index-view params)) (GET "/login" (login-view params session)) ...
e20858b99e5658826a5463214b5dff88f5645882be087b3efb2313b4778e3dbd
deverl-ide/deverl
deverl_sup.erl
%% ===================================================================== %% 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 3 of the License , or %% (at your option) any later vers...
null
https://raw.githubusercontent.com/deverl-ide/deverl/69216c7720ce2a32344711f5526c0eb9676bcae0/deverl/src/deverl_sup.erl
erlang
===================================================================== 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 MERCHANTAB...
it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU General Public License @author < > @author < > , 2014 -module(deverl_sup). -behaviour(supervisor). -export([start_...
75e497bf57b543622a63288c2e8e72f9905e37ee33fec6de5f1340a8a7abfcee
danlentz/clj-uuid
v3_test.clj
(ns clj-uuid.v3-test (:refer-clojure :exclude [uuid?]) (:require [clojure.test :refer :all] [clj-uuid :refer :all])) (deftest check-v3-special-cases (testing "v3 special case correctness..." (is (= (v3 +null+ "") #uuid "4ae71336-e44b-39bf-b9d2-752e234818a5")) (is ...
null
https://raw.githubusercontent.com/danlentz/clj-uuid/5cbd2662dd3fce90ec0b8354e794ca6a1b5ce44c/test/clj_uuid/v3_test.clj
clojure
" #uuid "A52D645C-B81C-3DD9-8AC7-E3B9E27B7399") " #uuid "3E5E99E8-0EFB-3F3F-B8A6-873B8EF8F95B")
(ns clj-uuid.v3-test (:refer-clojure :exclude [uuid?]) (:require [clojure.test :refer :all] [clj-uuid :refer :all])) (deftest check-v3-special-cases (testing "v3 special case correctness..." (is (= (v3 +null+ "") #uuid "4ae71336-e44b-39bf-b9d2-752e234818a5")) (is ...
f82d2a53a07bc53d716e513b465a17233712497bef983599d9c000aa934debc2
day8/re-frame-10x
styles.cljs
(ns day8.re-frame-10x.styles (:require-macros [day8.re-frame-10x.inlined-deps.garden.v1v3v10.garden.selectors :refer [defpseudoclass defpseudoelement]]) (:require [day8.re-frame-10x.inlined-deps.garden.v1v3v10.garden.compiler :r...
null
https://raw.githubusercontent.com/day8/re-frame-10x/d00d4f1d686b3d92701353fbe7e42b0a32785e1e/src/day8/re_frame_10x/styles.cljs
clojure
(at-import at-media at-keyframes) ==== -and-palettes === Snow Storm Frost Extras === Base Classes === protocol fn custom-printing /*! abridged from normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */ [:.hljs-built_in :.hljs-type {:color nord7}] ["::selection" {:background (if (= :br...
(ns day8.re-frame-10x.styles (:require-macros [day8.re-frame-10x.inlined-deps.garden.v1v3v10.garden.selectors :refer [defpseudoclass defpseudoelement]]) (:require [day8.re-frame-10x.inlined-deps.garden.v1v3v10.garden.compiler :r...
c598dacee4074b73fbb1660faa883105e637e58791761b878548d2e80d3c3f63
dalaing/little-languages
Gen.hs
# LANGUAGE FlexibleContexts # module Term.Gen where import Control.Lens (preview, review) import Data.Foldable (asum) import Data.Maybe (fromMaybe) import Text.Trifecta.Rendering (Span) import Test.QuickCheck (Gen, Arbitrary(..), oneof, sized) import Type import Type.Gen import Loc import Term genTmZero :: Gen (T...
null
https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/old/multityped/nb-srcloc/src/Term/Gen.hs
haskell
this will produce a term that is ill typed at the outermost constructor use genTermContaining to nest it elsewhere?
# LANGUAGE FlexibleContexts # module Term.Gen where import Control.Lens (preview, review) import Data.Foldable (asum) import Data.Maybe (fromMaybe) import Text.Trifecta.Rendering (Span) import Test.QuickCheck (Gen, Arbitrary(..), oneof, sized) import Type import Type.Gen import Loc import Term genTmZero :: Gen (T...
507cd6c41d3517e88f2bd6e899b3ced92b34f709f2111ca5bf5342bfbf016c9a
jwiegley/categorical
Main.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE MagicHash # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PartialTypeSignatures # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # # ...
null
https://raw.githubusercontent.com/jwiegley/categorical/dc2b5e55a3c953db97d035b6c7768d46de23e9f9/test/Main.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # # OPTIONS_GHC -fplugin=ConCat.Plugin # # OPTIONS_GHC -fsimpl-tick-factor=1000 # # OPTIONS_GHC -fexpose-all-unfoldings # # OPTIONS_GHC -funfolding-creation-threshold=450 # # OPTIONS_GHC -funfolding-use-threshold=80 # {-# OPTIONS_GHC -dverbose-core2core #-} # OPTIONS_GHC -Wno-n...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MagicHash # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PartialTypeSignatures # # LANGUAGE ScopedTypeVariables # # LANGUAGE TupleSections # # LANGUAGE TypeApplications # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInst...
6b905fccdee9622ebd0db48cc91294e37d507d4ec351b7b0c3ba3fbc74514bd9
GaloisInc/renovate
Layout.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE StandaloneDeriving # # LANGUAGE UndecidableInstances # module Renovate.Core.Layout ( LayoutStrategy(..), Allocator(..), CompactOrdering(..), Grouping(....
null
https://raw.githubusercontent.com/GaloisInc/renovate/550f64c1119f6804967e3077dcf0cb7c57ddb603/renovate/src/Renovate/Core/Layout.hs
haskell
# LANGUAGE TypeSynonymInstances # | A type for selecting the which addresses are available for laying out basic blocks in rewritten binaries. ^ Lay instrumented blocks out in parallel with the original basic blocks. The excess space in the original blocks will be filled with trap instructions. section. ^ Lay in...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # # LANGUAGE StandaloneDeriving # # LANGUAGE UndecidableInstances # module Renovate.Core.Layout ( LayoutStrategy(..), Allocator(..), CompactOrdering(..), Grouping(..), TrampolineStrategy(..), Rewrit...
20347bd93e36c71780e38eeac8f00f45f8e4d2055a27a0f0f792bf64a06683a7
ticean/clara-rules-shopping-examples
facts.clj
(ns ticean.clara.facts "Base system facts." (:require [ticean.clara.fact :refer [deffact]])) ;;;; Fact Types (deffact Customer [status]) (deffact Discount [code name description type value]) (deffact Order [timestamp shipping-address]) (deffact OrderLineItem [sku cost attributes]) (deffact OrderPromoCode [code]) ...
null
https://raw.githubusercontent.com/ticean/clara-rules-shopping-examples/d6251b1ad5ae40d6f6b78755c89ca39ce381587c/src/ticean/clara/facts.clj
clojure
Fact Types Shipping Methods Promotions Validation
(ns ticean.clara.facts "Base system facts." (:require [ticean.clara.fact :refer [deffact]])) (deffact Customer [status]) (deffact Discount [code name description type value]) (deffact Order [timestamp shipping-address]) (deffact OrderLineItem [sku cost attributes]) (deffact OrderPromoCode [code]) (deffact OrderLi...
5e622823ad660c8634a17445c036ae1a86c67171ae396835193bebb32a8f514c
jackfirth/rebellion
descriptor.rkt
#lang racket/base (require racket/contract/base) (provide (contract-out [enum-descriptor? predicate/c] [initialized-enum-descriptor? predicate/c] [uninitialized-enum-descriptor? predicate/c] [make-enum-implementation (->* (enum-type?) (#:inspector inspector? #:property-maker (-> uninitial...
null
https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/type/enum/descriptor.rkt
racket
@------------------------------------------------------------------------------
#lang racket/base (require racket/contract/base) (provide (contract-out [enum-descriptor? predicate/c] [initialized-enum-descriptor? predicate/c] [uninitialized-enum-descriptor? predicate/c] [make-enum-implementation (->* (enum-type?) (#:inspector inspector? #:property-maker (-> uninitial...
dd060d6adb5f680221d50ca178e5ea2967dc708c66ae7155641870bcfd0597bf
JonasDuregard/BNFC-meta
CFtoLayout.hs
# LANGUAGE TemplateHaskell # BNF Converter : Layout handling Generator Copyright ( C ) 2004 Author : Aarne Ranta Copyright ( C ) 2005 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 t...
null
https://raw.githubusercontent.com/JonasDuregard/BNFC-meta/1526a2fbd7b01d374ebe2e49f78494f46d7472b8/Language/LBNF/CFtoLayout.hs
haskell
TODO: avoid using SYB Dummy data types and functions Hack to make haddock work
# LANGUAGE TemplateHaskell # BNF Converter : Layout handling Generator Copyright ( C ) 2004 Author : Aarne Ranta Copyright ( C ) 2005 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 t...
656eb77f91cdb807b30467b3ad35e054bee828ac23c63bf46416d895724c9bcb
camllight/camllight
intf.ml
(* Write .mli for widgets *) #open "tables";; #open "compile";; let write_create_p w wname = w "value create : widget -> options list -> widget ;;\n"; w " (* [create p options] creates a new widget with parent p.\n"; w " Options are restricted to the widget class subset,\n"; w " ...
null
https://raw.githubusercontent.com/camllight/camllight/0cc537de0846393322058dbb26449427bfc76786/sources/contrib/camltk4/compiler/intf.ml
ocaml
Write .mli for widgets
#open "tables";; #open "compile";; let write_create_p w wname = w "value create : widget -> options list -> widget ;;\n"; w " (* [create p options] creates a new widget with parent p.\n"; w " Options are restricted to the widget class subset,\n"; w " and checked dynami...
816844d212472fea124809b906790b1d809a7a28c9ed2325ce96463ff8ba0225
capsjac/opengles
windows.hs
| > ghc -threaded windows.hs & & windows.exe Plain red screen will appear . module Main where import System.Win32.DLL (getModuleHandle) import Graphics.Win32 import Graphics.Win32.Message import Graphics.Win32.Window import Data.Int import Data.Maybe import Control.Monad import Foreign.C.String import Graphics.EG...
null
https://raw.githubusercontent.com/capsjac/opengles/23b78e5d1b058349a778a49310d867164ea1a529/examples/windows.hs
haskell
Nothing also works stopGL cS_DBLCLKS, HINSTANCE Maybe HICON when (isJust mAtom) $ do OpenGL ES Rendering GDI Rendering invalidateRect (Just ) (const (return ()))
| > ghc -threaded windows.hs & & windows.exe Plain red screen will appear . module Main where import System.Win32.DLL (getModuleHandle) import Graphics.Win32 import Graphics.Win32.Message import Graphics.Win32.Window import Data.Int import Data.Maybe import Control.Monad import Foreign.C.String import Graphics.EG...
98fbbb4c0fb9451a310268763b392a0b8acc5523e6f3496faa0fcd1cc39f3b8c
yetibot/core
middleware.clj
(ns yetibot.core.webapp.middleware (:require [yetibot.core.webapp.session :as session] [yetibot.core.webapp.layout :refer [*servlet-context*]] [taoensso.timbre :as timbre] [environ.core :refer [env]] [clojure.java.io :as io] [selmer.middleware :refer [wrap-e...
null
https://raw.githubusercontent.com/yetibot/core/e35cc772622e91aec3ad7f411a99fff09acbd3f9/src/yetibot/core/webapp/middleware.clj
clojure
If we're not inside a serlvet environment (for example when using mock requests), then .getContextPath might not exist
(ns yetibot.core.webapp.middleware (:require [yetibot.core.webapp.session :as session] [yetibot.core.webapp.layout :refer [*servlet-context*]] [taoensso.timbre :as timbre] [environ.core :refer [env]] [clojure.java.io :as io] [selmer.middleware :refer [wrap-e...
5f7a9e11b46600324b9a8c63423775d4a2ef3a7fcfe0d4f7b38699d2582063cf
msgpack/msgpack-erlang
msgpack_ext_tests.erl
%% MessagePack for Erlang %% Copyright ( C ) 2009 - 2013 UENISHI Kota %% 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 appli...
null
https://raw.githubusercontent.com/msgpack/msgpack-erlang/f1e1b98a5fc5fa8ea72bff834f145c7d0854c027/test/msgpack_ext_tests.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. limitations under the License. typ...
MessagePack for Erlang Copyright ( C ) 2009 - 2013 UENISHI Kota Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , See the License for the specific language governing permissions and -module(msgpack_ext_tests). ...
21ae48eb7428cfd97c20306e8af37e249fb033f5f5be3e40b9306244d959a98e
klarna/circuit_breaker
circuit_breaker_tests.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright 2012 Klarna AB %%% 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 %%% %%%...
null
https://raw.githubusercontent.com/klarna/circuit_breaker/e984a88309ed24ce48d9f31ee675435d1f5d45a4/test/circuit_breaker_tests.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
Copyright 2012 Klarna AB Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , 2012 Klarna AB -module(circuit_breaker_tests). -include_lib("eunit/include/eunit.hrl"). -include("circuit_breaker.hrl"). -define(SERVICE, servic...
9b3f7e68294ef0d9da464e1da21ced3eea9f77932e7e1476f8e2ac10b13dc9f2
dmitryvk/sbcl-win32-threads
custom-sysinit.lisp
;;;; loaded by init.test.sh 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 . ;;;; ;;;; This software is in the public dom...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tests/custom-sysinit.lisp
lisp
loaded by init.test.sh 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.
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 . (write-line "/loading custom sysinit") (defun sysinit-21 () 21)
14b64fa0ac6fc763417d95e3096fe75dc1b3dc55a294daa6f8295aa9fc5ae546
metabase/metabase
impl.clj
(ns metabase.driver.impl "Internal implementation functions for [[metabase.driver]]. These functions live in a separate namespace to reduce the clutter in [[metabase.driver]] itself." (:require [metabase.plugins.classloader :as classloader] [metabase.util :as u] [metabase.util.i18n :refer [trs tru]] [...
null
https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/src/metabase/driver/impl.clj
clojure
--------------------------------------------------- Hierarchy ---------------------------------------------------- -------------------------------------------- Loading Driver Namespace -------------------------------------------- it is handled automatically when dispatching on a driver and by driver may have become...
(ns metabase.driver.impl "Internal implementation functions for [[metabase.driver]]. These functions live in a separate namespace to reduce the clutter in [[metabase.driver]] itself." (:require [metabase.plugins.classloader :as classloader] [metabase.util :as u] [metabase.util.i18n :refer [trs tru]] [...
6ee31579aebd0f5f0faeac41883f33c622bdafcd6a0f6c954a1defc077db0262
Paczesiowa/virthualenv
Process.hs
module Process ( externalGhcPkgDb , outsideGhcPkg , insideGhcPkg , runProcess , ghcPkgDbPathLocation ) where import Types import MyMonad import Paths import Util.IO (readProcessWithExitCodeInEnv, Environment) import Control.Monad (forM_) impo...
null
https://raw.githubusercontent.com/Paczesiowa/virthualenv/aab89dad9de7dac5268472eaa50c11eb40b02380/src/Process.hs
haskell
but only when not run from the terminal returns value of GHC_PACKAGE_PATH that should be used inside virtual environment
module Process ( externalGhcPkgDb , outsideGhcPkg , insideGhcPkg , runProcess , ghcPkgDbPathLocation ) where import Types import MyMonad import Paths import Util.IO (readProcessWithExitCodeInEnv, Environment) import Control.Monad (forM_) impo...
ff65b547cc0bd9adbcba9e08d175f97fbf8dfc59150e2f71cebc151f06f6aac6
Autodesk-AutoCAD/AutoLispExt
unFormatted1.lsp
(defun c:formatTest (/ a b) (setq a 3) (setq b "test") (princ a) (princ b) )
null
https://raw.githubusercontent.com/Autodesk-AutoCAD/AutoLispExt/13574b27b76fe521a3e5c7914f16c9a1d9978eac/extension/src/test/SourceFile/unFormatted1.lsp
lisp
(defun c:formatTest (/ a b) (setq a 3) (setq b "test") (princ a) (princ b) )
acb303d9be3371dc902c1ea441e4913423c916b28de41e0733880a5ceed6dfbd
objecthub/swift-lispkit
Math.scm
;;; Math tools ;;; Author : Copyright © 2017 - 2021 . 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 applicabl...
null
https://raw.githubusercontent.com/objecthub/swift-lispkit/813edbffc50eb1be436061b3d2bf1e6f0a4de93e/Sources/LispKit/Resources/Examples/Math.scm
scheme
Math tools you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software distributed under the either express or implied. See the License for the specific language governing permissions and l...
Author : Copyright © 2017 - 2021 . All rights reserved . License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND , (import (lispkit base)) (define (factors n) (cond ((negative? n) (cons -1 (factors (- n)))) ((< n 3) (list n)) ((even? n) (cons 2...
b87659e98190b0badd704d774e97413d7201025c5398c16287989ae832c82196
avsm/platform
test.ml
--------------------------------------------------------------------------- Copyright ( c ) 2012 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/uutf.1.0.2%2Bdune/test/test.ml
ocaml
encoded length. will hold everything in any encoding. Test with various sizes to increase condition coverage. UTF-16BE guess Proof by exhaustiveness...
--------------------------------------------------------------------------- Copyright ( c ) 2012 . All rights reserved . Distributed under the ISC license , see terms at the end of the file . % % NAME%% % % --------------------------------------------------------------------------- Copyright (c) ...
9e88182d6d0a2be36089942e2eebc055ee1f5a52a2fd57be0e13ced6a0352e3d
winny-/aoc
day9.rkt
#lang racket (module+ test (require rackunit)) (define (read-garbage ip) (match (peek-char ip) [(? eof-object?) eof] [(and c (not #\<)) (error 'read-garbage "Expected first char to be `<', got ~a" c)] [_ (read-char ip) (let loop ([garbage '()]) (match (read-char ip) [(? eof-o...
null
https://raw.githubusercontent.com/winny-/aoc/d508caae19899dcab57ac665ef5d1a05b0a90c0c/2017/day9/day9.rkt
racket
#lang racket (module+ test (require rackunit)) (define (read-garbage ip) (match (peek-char ip) [(? eof-object?) eof] [(and c (not #\<)) (error 'read-garbage "Expected first char to be `<', got ~a" c)] [_ (read-char ip) (let loop ([garbage '()]) (match (read-char ip) [(? eof-o...
0400e247459bb0e5c1567e763b82d878c8b64988b1d77a93eff3d3d6f6787cee
patricoferris/ocaml-multicore-monorepo
caqti_sql.ml
Copyright ( C ) 2015 < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any later version , with the ...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/ocaml-caqti/lib/caqti_sql.ml
ocaml
Copyright ( C ) 2015 < > * * This library is free software ; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation , either version 3 of the License , or ( at your * option ) any later version , with the ...
b4f96f7864859c99f710ab97ac4e6ee3d53663ff55f778f205df5caf276f511d
michiari/ppl
2021-11-16.hs
module Main where We use as the module name so that we can compile this to -- a stand-alone executable with ghc --make 2021-11-16.hs fact :: Integer -> Integer fact 0 = 1 fact n = n * (fact $ n-1) main :: IO () main = putStrLn " Hello world ! " main = do putStrLn "Write a number: " numStr <- getLine let ...
null
https://raw.githubusercontent.com/michiari/ppl/24cbe365dde1d09bb113218ac447f31081349c53/2021/2021-11-16.hs
haskell
a stand-alone executable with make 2021-11-16.hs putStr (show f) Just x Logger Monad (a -> b) -> Logger a -> Logger b Binary tree
module Main where We use as the module name so that we can compile this to fact :: Integer -> Integer fact 0 = 1 fact n = n * (fact $ n-1) main :: IO () main = putStrLn " Hello world ! " main = do putStrLn "Write a number: " numStr <- getLine let n = read numStr :: Integer f = fact n putStr (show n...
b8aef2aec545e77e98e471b7cd2dea44ab1b8923dd8d081a52665d0f40a6f80b
maybevoid/casimir
Env.hs
module Casimir.Ops.Env ( module Casimir.Ops.Env.Base ) where import Casimir.Ops.Env.Base
null
https://raw.githubusercontent.com/maybevoid/casimir/ebbfa403739d6f258e6ac6793549006a0e8bff42/casimir/src/lib/Casimir/Ops/Env.hs
haskell
module Casimir.Ops.Env ( module Casimir.Ops.Env.Base ) where import Casimir.Ops.Env.Base
1d0fd7cecaa96d6dde075053de63a62c6558fe1f5cc626341ea24cc953da3581
bsansouci/bsb-native
c2.mli
(***********************************************************************) (* *) (* ocamlbuild *) (* *) , , projet Galliu...
null
https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/ocamlbuild/test/test7/c2.mli
ocaml
********************************************************************* ocamlbuild ...
, , projet Gallium , INRIA Rocquencourt Copyright 2007 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . val c2 : int
3d88d4fe68013196e5eda032904df69080614264d9a32edf4620ef20c574a5e1
huangjs/cl
grind.lisp
-*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; The data in this file contains enhancments. ;;;;; ;;; ;;;;; ...
null
https://raw.githubusercontent.com/huangjs/cl/96158b3f82f82a6b7d53ef04b3b29c5c8de2dbf7/lib/maxima/src/grind.lisp
lisp
Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; The data in this file contains enhancments. ;;;;; ;;;;; ; ; ; ; All rights reserved ;;;;; ; ; in the printed...
(in-package :maxima) (macsyma-module grind) (declare-top (special lop rop *grind-charlist* chrps $aliases aliaslist linel)) (defun chrct* () (- linel chrps)) (defvar fortranp nil) (defmspec $grind (x) (setq x (cdr x)) (let (y) (fresh-line) (cond ((null x)) ((cdr x) (mapc #'(lambda (xx) (fu...
c731ad3dc188e0cf5f07f39f3e27bb3ff6129888be46e4f3ba96086e8197314a
JHU-PL-Lab/jaylang
parser_support.ml
open Lexing;; open Source_origin;; open Uid;; let uid_table = ref @@ [];; let reset () = uid_table := [];; let put (uid : uid) file_region = uid_table := (uid, file_region)::!uid_table ;; let get_all () = List.fold_right (fun (key,value) acc -> Uid_map.add key value acc) !uid_table Uid_map.empty ;; let nex...
null
https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/src/ddpa-utils/parser_support.ml
ocaml
open Lexing;; open Source_origin;; open Uid;; let uid_table = ref @@ [];; let reset () = uid_table := [];; let put (uid : uid) file_region = uid_table := (uid, file_region)::!uid_table ;; let get_all () = List.fold_right (fun (key,value) acc -> Uid_map.add key value acc) !uid_table Uid_map.empty ;; let nex...
101d38ebbb3cd24ef977e58da733a591f98fb404776b744b60bee8ac5a744647
aiya000/haskell-examples
Main.hs
import Data.HashSet (empty) import Text.Parser.Char (lower, letter) import Text.Parser.Token (TokenParsing, IdentifierStyle(..), ident) import Text.Parser.Token.Highlight (Highlight(..)) import Text.Trifecta.Parser (Parser(..), parseTest) identifier :: String identifier = "koNoKo" partial :: String partial = "sugar +...
null
https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Text/Parser/Token/Main.hs
haskell
-- {output} "koNoKo" "sugar" (interactive):1:1: error: expected: camelCase <><EOF> ^
import Data.HashSet (empty) import Text.Parser.Char (lower, letter) import Text.Parser.Token (TokenParsing, IdentifierStyle(..), ident) import Text.Parser.Token.Highlight (Highlight(..)) import Text.Trifecta.Parser (Parser(..), parseTest) identifier :: String identifier = "koNoKo" partial :: String partial = "sugar +...
b264b031b89f0d7b52e97baad8338031cedebc3269666ce86c214d5b5f528045
acieroid/scala-am
indexer8.scm
(let* ((size 128) (max 4) (table (make-vector size 0)) (thread (lambda (tid) (letrec ((hash (lambda (w) (modulo (* w 7) size))) (process (lambda (m) (if (< m max) (letrec ((w (+ ...
null
https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/threads/variations/indexer8.scm
scheme
(let* ((size 128) (max 4) (table (make-vector size 0)) (thread (lambda (tid) (letrec ((hash (lambda (w) (modulo (* w 7) size))) (process (lambda (m) (if (< m max) (letrec ((w (+ ...