_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
980731a0f0d6da2294585d1c1e11765b569e5270faf37aa4a1917eaedb84da89
HealthSamurai/igpop
schema.clj
(ns igpop.schema (:require [flatland.ordered.map :refer :all] [igpop.site.utils :as utils])) (defn keys-in [m] (letfn [(children [node] (let [v (get-in m node)] (if (map? v) (map (fn [x] (conj node x)) (keys v)) []))) (branch? [...
null
https://raw.githubusercontent.com/HealthSamurai/igpop/d4e6f6100b78c20a1706add125e90ff7d912e3d4/src/igpop/schema.clj
clojure
(ns igpop.schema (:require [flatland.ordered.map :refer :all] [igpop.site.utils :as utils])) (defn keys-in [m] (letfn [(children [node] (let [v (get-in m node)] (if (map? v) (map (fn [x] (conj node x)) (keys v)) []))) (branch? [...
28e58fad2906983eb913e690118aed19b143656598e2e3c92b3c68be6447c4de
rtoy/cmucl
puzzle.lisp
;;;; -*- Mode: Lisp; Package: User -*- ;;;; (in-package "USER") (proclaim '(optimize (safety 0) (speed 3))) PUZZLE -- Forest Baskett 's Puzzle benchmark , originally written in . (defconstant size 511) (defconstant classmax 3) (defconstant typemax 12) (defvar iii 0) (defvar kount 0) (defconstant dee 8) (procla...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/benchmarks/gabriel/puzzle.lisp
lisp
-*- Mode: Lisp; Package: User -*- (terpri)
(in-package "USER") (proclaim '(optimize (safety 0) (speed 3))) PUZZLE -- Forest Baskett 's Puzzle benchmark , originally written in . (defconstant size 511) (defconstant classmax 3) (defconstant typemax 12) (defvar iii 0) (defvar kount 0) (defconstant dee 8) (proclaim '(type fixnum size classmax typemax iii k...
2bf4000b4a7cbd1c49fe6ed212134a3bdad97376d62808d4abd5e8228a78dc1f
talw/crisp-compiler
Lexer.hs
{-# Options_GHC -fno-warn-missing-signatures #-} module Lexer where import Syntax import Text.Parsec.Language (emptyDef) import qualified Text.Parsec.Token as Tok import Text.Parsec.Char (letter, oneOf) import Data.Functor ((<$)) import Control.Applicative ((<|>)) lexer :: Tok.TokenParser () lexer = Tok.makeTokenP...
null
https://raw.githubusercontent.com/talw/crisp-compiler/1c4d6e9897520e8089ae329d961aeeeadc4648a4/src/Lexer.hs
haskell
# Options_GHC -fno-warn-missing-signatures #
module Lexer where import Syntax import Text.Parsec.Language (emptyDef) import qualified Text.Parsec.Token as Tok import Text.Parsec.Char (letter, oneOf) import Data.Functor ((<$)) import Control.Applicative ((<|>)) lexer :: Tok.TokenParser () lexer = Tok.makeTokenParser style where style = emptyDef ...
69f65c9f1880130c35029d3271cc49a7b1a260ce602dec1981ce79c95bad35f5
Mayvenn/storefront
core.cljc
(ns mayvenn.stylist-pay.core (:require api.stylist [storefront.component :as c] [storefront.components.footer-links :as footer-links] [storefront.components.ui :as ui] [storefront.config :as config] [storefront.keypaths :as k] [storefront.platfor...
null
https://raw.githubusercontent.com/Mayvenn/storefront/d44547d169b2c50baa5fd5d62a47f4427c4890c3/src-cljc/mayvenn/stylist_pay/core.cljc
clojure
(ns mayvenn.stylist-pay.core (:require api.stylist [storefront.component :as c] [storefront.components.footer-links :as footer-links] [storefront.components.ui :as ui] [storefront.config :as config] [storefront.keypaths :as k] [storefront.platfor...
29c498ba6185fc772c0bc36801b59dce0f5309f72c634036869abf5d1e9a559a
masaomi-yamaguchi/synbit
EnvLike.hs
# LANGUAGE FunctionalDependencies , FlexibleInstances # module EnvLike ( EnvLike(..) , pprEnvLike , showEnvLike ) where import Control.Arrow ( second ) import qualified Data.Map as M import Text.PrettyPrint.HughesPJ import Text.PrettyPrint.Hu...
null
https://raw.githubusercontent.com/masaomi-yamaguchi/synbit/4553ae090dfcda4965a16b09130c1d6874b5a849/src/EnvLike.hs
haskell
# LANGUAGE FunctionalDependencies , FlexibleInstances # module EnvLike ( EnvLike(..) , pprEnvLike , showEnvLike ) where import Control.Arrow ( second ) import qualified Data.Map as M import Text.PrettyPrint.HughesPJ import Text.PrettyPrint.Hu...
a7cd16423ae8533e96bddd92330846b68abd32e1734d64c8f08c34893f073fe7
didibus/clj-ddd-example
domain_services.clj
(ns clj-ddd-example.domain-services "This namespace contains our domain services for our bounded context. In my example, my entire project is one bounded context, it doesn't have to be that way, you could have multiple bounded contexts in a monolith, as separate sets of namespaces, each having an application s...
null
https://raw.githubusercontent.com/didibus/clj-ddd-example/e99aa7b7013529e669ce06d400765ddd10b7214f/src/clj_ddd_example/domain_services.clj
clojure
(ns clj-ddd-example.domain-services "This namespace contains our domain services for our bounded context. In my example, my entire project is one bounded context, it doesn't have to be that way, you could have multiple bounded contexts in a monolith, as separate sets of namespaces, each having an application s...
82845d14c3461f2d650c3d82eca636b6e635cd2ca74e0e3af7f3a82862d0b92c
robashton/cravendb
recent-documents.cljs
(ns admin.recent-documents (:require-macros [cljs.core.async.macros :refer [go]] [dommy.macros :refer [node]]) (:require [goog.dom :as dom] [goog.events :as events] [cljs.core.async :refer [put! chan <! alts! timeout]] [admin.http :as http] [dommy.c...
null
https://raw.githubusercontent.com/robashton/cravendb/461e80c7c028478adb4287922db6ee4d2593a880/src-cljs/admin/recent-documents.cljs
clojure
(ns admin.recent-documents (:require-macros [cljs.core.async.macros :refer [go]] [dommy.macros :refer [node]]) (:require [goog.dom :as dom] [goog.events :as events] [cljs.core.async :refer [put! chan <! alts! timeout]] [admin.http :as http] [dommy.c...
62abbafc753ef8b6ca82b2ec4571756a66113faa6cac5dc8d7c0c6bedc305a3a
adamdoupe/find_ear_rails
type_progs.ml
open Ast open Parse_helper open OUnit open Config module TypeProgs = struct let dir = "typing" let success_dir = "typing/succeed" let fail_dir = "typing/fail" let setup _ = () let teardown _ = () end module AnnotProgs = struct let dir = "typing" let success_dir = "typing/annot_succeed" let fail_dir =...
null
https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/tests/typing/type_progs.ml
ocaml
open Ast open Parse_helper open OUnit open Config module TypeProgs = struct let dir = "typing" let success_dir = "typing/succeed" let fail_dir = "typing/fail" let setup _ = () let teardown _ = () end module AnnotProgs = struct let dir = "typing" let success_dir = "typing/annot_succeed" let fail_dir =...
a27a0a291791cbd3a829c9cafd5a5e881877f0abf2493fd73c6027cb53e92ba5
willtim/Atavachron
Config.hs
# LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # -- | Support for an Expresso-based configuration file. -- -- The configuration file can hold "profiles" containing commonly used sets of backup parameters. -- It also allow...
null
https://raw.githubusercontent.com/willtim/Atavachron/bbf9a93eac0e096ee4595e23067c912af865601e/src/Atavachron/Config.hs
haskell
# LANGUAGE OverloadedStrings # | Support for an Expresso-based configuration file. The configuration file can hold "profiles" containing commonly used sets of backup parameters. It also allows us to change/tweak various runtime parameters. | Type synonyms used in the schema definition. | Values that have (potent...
# LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # # LANGUAGE RecordWildCards # # LANGUAGE PatternSynonyms # module Atavachron.Config ( Config(..) , Profile(..) , Pruning(..) , PruneSettings(..) , Overridable(..) , URL(..) , findProfileByName , overridableToMaybe , tryLoadingCo...
07a4236432b9cb600d58af1bcabe7f4fcb9983a8e06291117bee123896bff1d2
Eelis/geordi
Basics.hs
# LANGUAGE UnicodeSyntax , MultiParamTypeClasses , PatternGuards , FlexibleInstances , TypeSynonymInstances , OverlappingInstances , ViewPatterns , FlexibleContexts , RecordWildCards , NamedFieldPuns , GeneralizedNewtypeDeriving # module Editing.Basics (Pos(Pos, pos), positionIn, Anchor(..), Side(..), StickyRange, Ran...
null
https://raw.githubusercontent.com/Eelis/geordi/d23ae7ab1f7dfd9c456a0da9bd7abbd0695e46d4/src/Editing/Basics.hs
haskell
Offset Positions The 'a' phantom parameter denotes the element type for the position. This prevents accidental mix-ups of different kinds of positions. The Pos constructor should be used as little as possible. Ranges Sticky positions and ranges Edits MoveEdit's Int is an offset. If it is a nonnegative number n, ...
# LANGUAGE UnicodeSyntax , MultiParamTypeClasses , PatternGuards , FlexibleInstances , TypeSynonymInstances , OverlappingInstances , ViewPatterns , FlexibleContexts , RecordWildCards , NamedFieldPuns , GeneralizedNewtypeDeriving # module Editing.Basics (Pos(Pos, pos), positionIn, Anchor(..), Side(..), StickyRange, Ran...
433729c5edffd09143c3b6a451f849699f9dee5b231e1a3f21baabe23eb69605
gedge-platform/gedge-platform
rabbit_trace.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . %% -module(rabbit_trace). -export([init/1, enabled/...
null
https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/rabbit_trace.erl
erlang
---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ----------------------------------------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved . -module(rabbit_trace). -export([init/1, enabled/1, tap...
d69b3cf660de5b5ee29d489fe42a1ea7fb50166bdd15c26f6a3d6a846e7bb39a
mokus0/junkbox
Sensorium.hs
# LANGUAGE GADTs , , KindSignatures # GADTs, GeneralizedNewtypeDeriving, KindSignatures #-} module Experiments.Sensorium where import Control.Applicative import Control.Monad.State import Control.Monad.Operational data Stream s = Chunks [s] | EOF ...
null
https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Experiments/Sensorium.hs
haskell
The desired interface (rough sketch):
# LANGUAGE GADTs , , KindSignatures # GADTs, GeneralizedNewtypeDeriving, KindSignatures #-} module Experiments.Sensorium where import Control.Applicative import Control.Monad.State import Control.Monad.Operational data Stream s = Chunks [s] | EOF ...
2a84e3a5e17a522e6c495f88cf56ba6a19f3167109bff7eeb4ba356a5a46a6db
namin/reflection-schemes
load_tests.scm
(load "eg.scm") (define (test_load fn) (format #t ";; LOADING ~a\n" fn) (load fn)) (test_load "lang_tests.scm") (test_load "os_tests.scm") (test_load "metalang_tests.scm") (test_load "tower_tests.scm") (test_load "metaenvtower_tests.scm") (test_load "metatower_tests.scm")
null
https://raw.githubusercontent.com/namin/reflection-schemes/d3fd61aa7edc8af5f7f2c9783b4e3c5356cd2bd5/02-toyos-failed-towers/load_tests.scm
scheme
(load "eg.scm") (define (test_load fn) (format #t ";; LOADING ~a\n" fn) (load fn)) (test_load "lang_tests.scm") (test_load "os_tests.scm") (test_load "metalang_tests.scm") (test_load "tower_tests.scm") (test_load "metaenvtower_tests.scm") (test_load "metatower_tests.scm")
1a06db7291b446a907b0a109f23c62562a8a189e16ca73a1a04b4d74a71aa639
machellerogden/edn-to-js
fs.cljs
(ns edn-to-js.fs (:require [cljs.nodejs :as nodejs] [cljs.reader :as r] [edn-to-js.translate :refer [json-stringify json->clj]] ["fs" :as fs])) (defn write-file [filename data] (.writeFileSync fs filename data "utf-8")) (defn read-file [filename] (.readFileSync fs filename "u...
null
https://raw.githubusercontent.com/machellerogden/edn-to-js/c5506b739d1cf97a6323b39018a32ee89c414341/src/edn_to_js/fs.cljs
clojure
(ns edn-to-js.fs (:require [cljs.nodejs :as nodejs] [cljs.reader :as r] [edn-to-js.translate :refer [json-stringify json->clj]] ["fs" :as fs])) (defn write-file [filename data] (.writeFileSync fs filename data "utf-8")) (defn read-file [filename] (.readFileSync fs filename "u...
0a4e5c6645f586dd8c2fc86bcbf9a50dc3dac8b66c87649cf1db222e68c954e9
thangngoc89/denu
main.ml
let verbose = ref false let exec = Utils.execute ~verbose:!verbose let print_build_order build_order = if !verbose then Printf.printf "Build order: %s\n" (String.concat " -> " build_order) else () let ext_none name = name |> String.trim |> Filename.remove_extension let ext_ensure ~ext name = Printf.sprintf ...
null
https://raw.githubusercontent.com/thangngoc89/denu/41fc8637c048616f5549687de456b1c803156c72/src/main.ml
ocaml
Example output * depend_on_main.cmx : edge.cmx edge.cmx : main.cmx : depend_on_main.cmx abc.cmx
let verbose = ref false let exec = Utils.execute ~verbose:!verbose let print_build_order build_order = if !verbose then Printf.printf "Build order: %s\n" (String.concat " -> " build_order) else () let ext_none name = name |> String.trim |> Filename.remove_extension let ext_ensure ~ext name = Printf.sprintf ...
477a4d696ad48b06a8024fbf24ec7dde71af82a6cc5f26b232feb57251e56729
fbellomi/crossclj
reader.clj
Copyright ( c ) , Rich Hickey & contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be b...
null
https://raw.githubusercontent.com/fbellomi/crossclj/7630270ebe9ea3df89fe3d877b2571e6eae1062b/src/cloned/clojure/tools/reader.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , Rich Hickey & contributors . (ns ^{:doc "A clojure reader in clojure" :author "Bronsa"} cloned.clojure.tools.reader (:refer-clojure :exclude [read read-line read-string char default-data-readers *default-data-reader-fn* *read-eva...
95c1a8ec874836b75e569be08a607c492d3f73a1b272c0303d41f1a979908f95
initc3/SaUCy
Pattern.hs
# OPTIONS_GHC -Wall # ------------------------------------------------------------------------------ -- | Module : Language . . Pattern Copyright : ( C ) 2018 -- License : BSD-style (see LICENSE) Maintainer : ( ) -- Stability : experimental -- -- Pattern parser -- ------------------...
null
https://raw.githubusercontent.com/initc3/SaUCy/199154c1f488af4561e4bf1f7f5f3ef8876dfa6b/src/Language/ILC/Parser/Pattern.hs
haskell
---------------------------------------------------------------------------- | License : BSD-style (see LICENSE) Stability : experimental Pattern parser ------------------------------------------------------------------------------
# OPTIONS_GHC -Wall # Module : Language . . Pattern Copyright : ( C ) 2018 Maintainer : ( ) module Language.ILC.Parser.Pattern ( pat ) where import Text.Parsec import Text.Parsec.String (Parser) import Language.ILC.Lexer import Language.ILC.Syntax pVar :: Parser Pattern pVar = mklex...
c489046fae5e12279c4a4363a8b751f59fa05e4ae599358cd77b720e6876355e
philnguyen/soft-contract
m2.rkt
#lang racket (require "m1.rkt") (provide (struct-out posn))
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/unsafe/issues/struct-out-twice/m2.rkt
racket
#lang racket (require "m1.rkt") (provide (struct-out posn))
bcdcf2e6e210e728dff9acb45c96268330774b9dbcde7f882524651aa2b224eb
ates/radius
radius_app.erl
-module(radius_app). -behaviour(application). %% application callbacks -export([start/2, stop/1]). start(_Type, _Args) -> radius_sup:start_link(). stop(_State) -> ok.
null
https://raw.githubusercontent.com/ates/radius/2145a5f79aef8b81b3b77b5beccb29d31044e272/src/radius_app.erl
erlang
application callbacks
-module(radius_app). -behaviour(application). -export([start/2, stop/1]). start(_Type, _Args) -> radius_sup:start_link(). stop(_State) -> ok.
28a5093b4a9838c9900fb97158cd477f5fba8e30eba713b8bb89479903ff61a0
jqueiroz/lojban.io
NotFound.hs
{-# LANGUAGE OverloadedStrings #-} module Server.Website.Views.NotFound ( displayNotFoundHome ) where import Server.Core import Server.Website.Views.Core import qualified Data.Text as T import qualified Text.Blaze as B import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A displayNo...
null
https://raw.githubusercontent.com/jqueiroz/lojban.io/68c3e919f92ea1294f32ee7772662ab5667ecef6/haskell/src/Server/Website/Views/NotFound.hs
haskell
# LANGUAGE OverloadedStrings #
module Server.Website.Views.NotFound ( displayNotFoundHome ) where import Server.Core import Server.Website.Views.Core import qualified Data.Text as T import qualified Text.Blaze as B import qualified Text.Blaze.Html5 as H import qualified Text.Blaze.Html5.Attributes as A displayNotFoundHome :: ServerConfiguration -...
d90a1c74af62db24ca9021fa3752afd7cddcc9c5db24e99898ab6d3d48a3301b
tweag/ormolu
TextSpec.hs
# LANGUAGE TemplateHaskell # module Ormolu.Diff.TextSpec (spec) where import Ormolu.Diff.Text import Ormolu.Terminal import Ormolu.Utils.IO import Path import qualified System.FilePath as FP import Test.Hspec spec :: Spec spec = describe "printTextDiff" $ do stdTest "one-line-added" "empty" "one-line" stdT...
null
https://raw.githubusercontent.com/tweag/ormolu/4e8fc16479664c845c381d2c8e6cfd952814ffc7/tests/Ormolu/Diff/TextSpec.hs
haskell
| Test diff printing. | Name of the test case | Location of input A | Location of input B
# LANGUAGE TemplateHaskell # module Ormolu.Diff.TextSpec (spec) where import Ormolu.Diff.Text import Ormolu.Terminal import Ormolu.Utils.IO import Path import qualified System.FilePath as FP import Test.Hspec spec :: Spec spec = describe "printTextDiff" $ do stdTest "one-line-added" "empty" "one-line" stdT...
434c5a9a336f6c2fe6f9fe342b1717fee9f7632c3abb50f79ab87ae78782a4ee
drewt/scmus
base.scm
;; Copyright 2014 - 2020 ;; ;; 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 version. ;; ;; This program is distributed in ...
null
https://raw.githubusercontent.com/drewt/scmus/5041ec376cb17db463117b8fa212b16b23fe770d/src/base.scm
scheme
This program is free software; you can redistribute it and/or either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOS...
Copyright 2014 - 2020 modify it under the terms of the GNU General Public License as You should have received a copy of the GNU General Public License (module scmus.base * (import (chicken module)) (reexport (except scheme string-length string-ref string-set! ...
3c2f9db81e33ad1b8c3b7037db82e72649232452be0de4842003e7b49de70c5e
clojure-interop/aws-api
AbstractAWSSecurityHubAsync.clj
(ns com.amazonaws.services.securityhub.AbstractAWSSecurityHubAsync "Abstract implementation of AWSSecurityHubAsync. Convenient method forms pass through to the corresponding overload that takes a request object and an AsyncHandler, which throws an UnsupportedOperationException." (:refer-clojure :only [require c...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.securityhub/src/com/amazonaws/services/securityhub/AbstractAWSSecurityHubAsync.clj
clojure
(ns com.amazonaws.services.securityhub.AbstractAWSSecurityHubAsync "Abstract implementation of AWSSecurityHubAsync. Convenient method forms pass through to the corresponding overload that takes a request object and an AsyncHandler, which throws an UnsupportedOperationException." (:refer-clojure :only [require c...
39851758f9636941095e23d76307587315638fe38ac80ea9aff3c33c1db3c3d6
Idorobots/spartan
main.rkt
#lang racket ;; Top level for tests. (require "testing.rkt") Compiler unit tests : (require "compiler/utils.rkt") (require "compiler/freevars.rkt") (require "compiler/substitute.rkt") (require "compiler/propagate.rkt") (require "compiler/peggen.rkt") (require "compiler/ast.rkt") (require "compiler/pass.rkt") (requ...
null
https://raw.githubusercontent.com/Idorobots/spartan/01c6b5c30e87ba9cd5587a6ffcdc0979d7e4bff5/test/main.rkt
racket
Top level for tests. Runtime unit tests: Some integration tests: Performance tests: Actual test running. NOTE This is required for the code fragment evaluation. NOTE These ones for the parser generator tests.
#lang racket (require "testing.rkt") Compiler unit tests : (require "compiler/utils.rkt") (require "compiler/freevars.rkt") (require "compiler/substitute.rkt") (require "compiler/propagate.rkt") (require "compiler/peggen.rkt") (require "compiler/ast.rkt") (require "compiler/pass.rkt") (require "compiler/parser.rkt...
a59ee9b37eff076d06975fe39e8da704f025d6eace91e0ea678fc957308be616
nowl/detome
image.lisp
(in-package #:blackfish) (defparameter *image-cache* (make-hash-table :test #'equal)) (defparameter *tile-cache* (make-hash-table :test #'equal)) (defun clear-image-caches () (setf *image-cache* (make-hash-table :test #'equal)) (setf *tile-cache* (make-hash-table :test #'equal))) (defparameter *image-cache* (mak...
null
https://raw.githubusercontent.com/nowl/detome/108ed05427a34a7d42de8ecac384aca63a8ab9e0/blackfish/misc/image.lisp
lisp
XXX: in the past we had the locked surface version here, but this seems to not be required in the newer svn versions of (with-locked-surface (surf new-surface)
(in-package #:blackfish) (defparameter *image-cache* (make-hash-table :test #'equal)) (defparameter *tile-cache* (make-hash-table :test #'equal)) (defun clear-image-caches () (setf *image-cache* (make-hash-table :test #'equal)) (setf *tile-cache* (make-hash-table :test #'equal))) (defparameter *image-cache* (mak...
44b6de42b4b222e8d25e02e49a75e40a9ad3f5823f2e3ec7d54a4cb74c1ef75f
ml4tp/tcoq
modintern.ml
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/interp/modintern.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 - 2017 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * open Declarations open Libnam...
94056446ac9b63bd459db1c346af1c646a209ce23df0b8bbc32012a9f8c86ac1
0install/0install
add_feed.ml
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) (** The "0install add-feed" command *) open Options open Zeroinstall open Zeroinstall.General open Support open Support.Common module F = Zeroinstall.Feed module G = Generic_select module FC ...
null
https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/cli/add_feed.ml
ocaml
* The "0install add-feed" command Display the options to the user If the feed is remote and missing, download it. Shouldn't happen
Copyright ( C ) 2013 , the README file for details , or visit . * See the README file for details, or visit . *) open Options open Zeroinstall open Zeroinstall.General open Support open Support.Common module F = Zeroinstall.Feed module G = Generic_select module FC = Zeroinstall.Feed_cache let edit_feed...
8516062a14477d3c9ededa25243b2e4cfccb509d52d04692bb1dd83da954d221
let-def/menhir
inliner.mli
(**************************************************************************) (* *) Menhir (* *) , INRIA Ro...
null
https://raw.githubusercontent.com/let-def/menhir/e8ba7bef219acd355798072c42abbd11335ecf09/src/inliner.mli
ocaml
************************************************************************ et en Automatique. All rig...
Menhir , INRIA Rocquencourt , PPS , Université Paris Diderot Copyright 2005 - 2008 Institut National de Recherche en Informatique under the terms of the Q Public License versi...
07a27b666fd4a90a2267017a01886d69067919622740ca9ef59cce0a01f93de8
haskell-jp/makeMistakesToLearnHaskell
5.hs
main = do line1 <- getLine let principal = read line1 line2 <- getLine let interestRate = read line2 line3 <- getLine let years = read line3 print (principal * (1 + interestRate / 100) ^ years)
null
https://raw.githubusercontent.com/haskell-jp/makeMistakesToLearnHaskell/1174d5c6bb82e57622be8033607a4d049e30ae7e/assets/5.hs
haskell
main = do line1 <- getLine let principal = read line1 line2 <- getLine let interestRate = read line2 line3 <- getLine let years = read line3 print (principal * (1 + interestRate / 100) ^ years)
ad4000cb422932901c5293db343990c95e97edca283403926767af99ab7cb1cf
pgj/mirage-kfreebsd
filename.ml
(***********************************************************************) (* *) (* Objective Caml *) (* *) and , INR...
null
https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/mirage-stdlib/src/filename.ml
ocaml
********************************************************************* Objective Caml ...
and , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with let generic_quote quotequote s = let l = String.le...
84a242b3cc3d3bd4e588047d5e8a11f5be56ae41fe666945a18dee0a3e43fc52
rowangithub/DOrder
sendmail-close-angle.ml
let rec loop (inf:int) (buf:int) (buflim:int) (bufferlen:int) (inlen:int) = if (Random.bool ()) then if (buf == buflim) then (assert(0<=buf); assert(buf<bufferlen); buf) else let _ = assert(0<=buf) in let _ = assert(buf<bufferlen) in buf = cur ; let buf = buf + 1 in let inf = ...
null
https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/tests/folprograms/invgen/sendmail-close-angle.ml
ocaml
cur = *in;
let rec loop (inf:int) (buf:int) (buflim:int) (bufferlen:int) (inlen:int) = if (Random.bool ()) then if (buf == buflim) then (assert(0<=buf); assert(buf<bufferlen); buf) else let _ = assert(0<=buf) in let _ = assert(buf<bufferlen) in buf = cur ; let buf = buf + 1 in let inf = ...
7a3bfc1c7bcc349c6dd046f6618c8c5fb37e3b2484f11137027ccb513494bad4
Deducteam/CoqInE
inductives.mli
(** Structure with informations on an inductive constructions *) type ind_infos * Extract inductive infos from Coq representation val get_infos : Declarations.mutual_inductive_body -> int -> ind_infos * Translate the given inductive type . Handles both regular inductive type ( no polymorphism ): I : p1 : ||P...
null
https://raw.githubusercontent.com/Deducteam/CoqInE/c38cca7fa27ee56c3ab2e8712d904b1620f8546d/src/inductives.mli
ocaml
* Structure with informations on an inductive constructions * Translate the global universe level for given template inductive type.
type ind_infos * Extract inductive infos from Coq representation val get_infos : Declarations.mutual_inductive_body -> int -> ind_infos * Translate the given inductive type . Handles both regular inductive type ( no polymorphism ): I : p1 : ||P1|| - > ... - > pr : ||Pr|| - > x1 : ||A1|| - > ... - >...
50fa928af833c1af89b4b93601d141cd1956713562c4add289856355f9c06a67
pfdietz/ansi-test
hash-table-test.lsp
;-*- Mode: Lisp -*- Author : Created : Fri Nov 28 05:56:22 2003 ;;;; Contains: Tests for HASH-TABLE-TEST (deftest hash-table-test.1 (hash-table-test (make-hash-table)) eql) (deftest hash-table-test.2 (loop for test in '(eq eql equal equalp) unless (eq (hash-table-test (make-hash-table :...
null
https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/hash-tables/hash-table-test.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for HASH-TABLE-TEST Error cases
Author : Created : Fri Nov 28 05:56:22 2003 (deftest hash-table-test.1 (hash-table-test (make-hash-table)) eql) (deftest hash-table-test.2 (loop for test in '(eq eql equal equalp) unless (eq (hash-table-test (make-hash-table :test test)) test) collect test) nil) (deftest hash-tab...
670d40125feefd29a163442e9ee4b779cfc9334685e90d81e6b4baf95a4ce17c
peti/postmaster
Error.hs
| Module : Postmaster . Error Copyright : ( C ) 2004 - 2019 License : GNU AFFERO GPL v3 or later Maintainer : Stability : experimental Portability : non - portable Module: Postmaster.Error Copyright: (C) 2004-2019 Peter Simons License: GNU AF...
null
https://raw.githubusercontent.com/peti/postmaster/65867f01fa5084b2895340e7d98c601a5e0ab1e3/src/Postmaster/Error.hs
haskell
# LANGUAGE OverloadedStrings #
| Module : Postmaster . Error Copyright : ( C ) 2004 - 2019 License : GNU AFFERO GPL v3 or later Maintainer : Stability : experimental Portability : non - portable Module: Postmaster.Error Copyright: (C) 2004-2019 Peter Simons License: GNU AF...
edb555d024521217cfc40bb54a88312a5f24d4ba71e6b9186a5d6dc6741af253
ivankelly/gambit
fig16-17.scm
#!/usr/bin/env gsi-script ; File: "fig16-17.scm" Copyright ( c ) 1997 - 2007 by , All Rights Reserved . Translation into Scheme of Figure 16.17 from Chapter 16 of Ousterhout 's " Tcl and the Tk Toolkit " . import Tcl / Tk procedures and variables (load "tcltk") (define (undo) (display "undo") (newl...
null
https://raw.githubusercontent.com/ivankelly/gambit/7377246988d0982ceeb10f4249e96badf3ff9a8f/examples/tcltk/fig16-17.scm
scheme
File: "fig16-17.scm" menubutton .mbar.file -text File -underline 0 -menu .mbar.file.menu menubutton .mbar.edit -text Edit -underline 0 -menu .mbar.edit.menu -menu .mbar.graphics.menu menubutton .mbar.text -text Text -underline 0 -menu .mbar.text.menu menubutton .mbar.view -text View -underline 0 -men...
#!/usr/bin/env gsi-script Copyright ( c ) 1997 - 2007 by , All Rights Reserved . Translation into Scheme of Figure 16.17 from Chapter 16 of Ousterhout 's " Tcl and the Tk Toolkit " . import Tcl / Tk procedures and variables (load "tcltk") (define (undo) (display "undo") (newline)) (define (redo) ...
efce8a5e7c48d3163611c7578da4faf4cf916d889d5dd2860364865bf209f815
racket/scribble
autobib.rkt
#lang racket/base (require rackunit scriblib/autobib scribble/base scribble/core) (test-case "define-cite" ;; Check that `define-cite` binds the expected identifiers (let () (define-cite cite citet gen-bib) (check-pred values (void cite citet gen-bib))) (let () (define-cite cite citet gen-bib ...
null
https://raw.githubusercontent.com/racket/scribble/beb2d9834169665121d34b5f3195ddf252c3c998/scribble-test/tests/scriblib/autobib.rkt
racket
Check that `define-cite` binds the expected identifiers Define authors, make a bibliography
#lang racket/base (require rackunit scriblib/autobib scribble/base scribble/core) (test-case "define-cite" (let () (define-cite cite citet gen-bib) (check-pred values (void cite citet gen-bib))) (let () (define-cite cite citet gen-bib #:cite-author cite-author #:cite-year cite-year) ...
91187fa8feb7eb6f7ad96beab9ffeac74bd81c4506635b6b87d07292f8f84ecf
binaryage/chromex
system_private.cljs
(ns chromex.ext.system-private (:require-macros [chromex.ext.system-private :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn get-incognito-mode-availability* [config] (gen-wrap :func...
null
https://raw.githubusercontent.com/binaryage/chromex/33834ba5dd4f4238a3c51f99caa0416f30c308c5/src/exts_private/chromex/ext/system_private.cljs
clojure
(ns chromex.ext.system-private (:require-macros [chromex.ext.system-private :refer [gen-wrap]]) (:require [chromex.core])) -- functions -------------------------------------------------------------------------------------------------------------- (defn get-incognito-mode-availability* [config] (gen-wrap :func...
be1c109c83d68bc04cab48da6a703ecbcca6e88fa068c0c034737552006458b3
thautwarm/RBNF.hs
Symbols.hs
module RBNF.Symbols where import RBNF.Utils import GHC.Generics (Generic) import qualified Data.Map as M import qualified Data.Set as S import qualified Data.List as L import Control.Monad.State import Control.Arrow data MiniLang = MTerm String | MApp MiniLang [MiniLang] deriving (Eq, Ord, Generic) in...
null
https://raw.githubusercontent.com/thautwarm/RBNF.hs/c95838e68d5121b9e9661cc726cd1752345b3f53/src/RBNF/Symbols.hs
haskell
Parsing symbols stack-based VM instruction semantics. PNonTerm symbol is_grammar_node advanced: PPack TopN_of_stack Reduce_func String for debugging String for debugging productions advanced: modify current context
module RBNF.Symbols where import RBNF.Utils import GHC.Generics (Generic) import qualified Data.Map as M import qualified Data.Set as S import qualified Data.List as L import Control.Monad.State import Control.Arrow data MiniLang = MTerm String | MApp MiniLang [MiniLang] deriving (Eq, Ord, Generic) in...
1a88e73ff9c0639159349a463cf1429e546baa7f8425ab3cede24bac0ec3ca45
haskell/ghcup-metadata
Validate.hs
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE QuasiQuotes #-} # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # {-# LANGUAGE OverloadedStrings #-} module Validate where import GHCup import GHC...
null
https://raw.githubusercontent.com/haskell/ghcup-metadata/12cb639ca16b824db3792d306258d464f78eb4b7/ghcup-gen/Validate.hs
haskell
# LANGUAGE QuasiQuotes # # LANGUAGE OverloadedStrings # verify binary downloads -- unique tags required platforms exit alpine needs to be set explicitly, because (although it could be static) download/verify all tarballs exit
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE TemplateHaskell # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # module Validate where import GHCup import GHCup.Download import GHCup.Errors import GHCup.Type...
9755a849588416213c601c777d852fb488cdc27f0713433955e429b9fcb86d77
atgreen/lisp-openshift
ssl.lisp
-*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*- Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved . ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions ;;; are met: ;;; * Redistrib...
null
https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/hunchentoot-1.2.3/ssl.lisp
lisp
Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the...
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved . DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY , (in-package :hunchentoot) (defclass ssl-acceptor (acceptor) ((ssl-certificate-file :initarg :ssl-certificate...
c495ccebf5ace5d7455fb6fe10c705345fbea5b30d9722e53cbbc13f7a218014
benzap/flyer.js
window.cljs
(ns flyer.window (:require [clojure.string :as str] [flyer.storage :as storage] [flyer.utils :as utils] [goog.events :as events])) (def this-window js/window) (def external-window-list "based on the current window, it will store references to any external windows that are opened using the 'open' fun...
null
https://raw.githubusercontent.com/benzap/flyer.js/3f9a1ce9d56cc2c369864b3c04c69694bf95595b/src-cljs/flyer/window.cljs
clojure
(ns flyer.window (:require [clojure.string :as str] [flyer.storage :as storage] [flyer.utils :as utils] [goog.events :as events])) (def this-window js/window) (def external-window-list "based on the current window, it will store references to any external windows that are opened using the 'open' fun...
56c3e7d465133b512e0707dfcafd8ce8b74939a61ed85e7ca03d0c7188c02df1
mirage/mirage-lambda
lambda_protobuf.ml
module Types = Lambda_types module Pb = Lambda_pb module Rpc = Lambda_rpc type error = [`Msg of string] type ('a, 'b) either = ('a, 'b) Lambda.Value.either = | L of 'a | R of 'b let opt_eq ~eq a b = match a, b with | Some a, Some b -> eq a b | None, None -> true | _, _ -> false let lst_eq ~eq a b = try ...
null
https://raw.githubusercontent.com/mirage/mirage-lambda/a89b265b552f8b63ff725fc942f41a276fabb4f5/proto/lambda_protobuf.ml
ocaml
Client automatically unwrap toplevel lwt values.
module Types = Lambda_types module Pb = Lambda_pb module Rpc = Lambda_rpc type error = [`Msg of string] type ('a, 'b) either = ('a, 'b) Lambda.Value.either = | L of 'a | R of 'b let opt_eq ~eq a b = match a, b with | Some a, Some b -> eq a b | None, None -> true | _, _ -> false let lst_eq ~eq a b = try ...
cd5983161f218860ec0fb88e65bd9df394c76d756a35724b886167d6157860fb
lispcord/lispcord
message.lisp
(in-package :lispcord.classes) (deftype message-type () `(integer 0 7)) (defclass attachment () ((id :initarg :id :type snowflake :accessor id) (filename :initarg :file :type string :accessor file) (size :initarg :size :type f...
null
https://raw.githubusercontent.com/lispcord/lispcord/448190cc503a0d7e59bdc0ffddb2e9dba0a706af/src/classes/message.lisp
lisp
(in-package :lispcord.classes) (deftype message-type () `(integer 0 7)) (defclass attachment () ((id :initarg :id :type snowflake :accessor id) (filename :initarg :file :type string :accessor file) (size :initarg :size :type f...
0a432fce1b032bb7b96a2824f85176f5d7d9a17a9a8453747e7b840f89194801
i-am-tom/holmes
Boolean.hs
# LANGUAGE BlockArguments # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # {-# LANGUAGE MultiWayIf #-} | Module : Data . JoinSemilattice . Class . Boolean Description : Relationships between boolean variables . Copyright : ( c ) , 2020 License : MIT Module : Data.JoinSemilatt...
null
https://raw.githubusercontent.com/i-am-tom/holmes/ecbb6da0c7a73f839ea2c4d00cdb902fe7080981/src/Data/JoinSemilattice/Class/Boolean.hs
haskell
# LANGUAGE MultiWayIf # | Rather than the 'not', 'and', and 'or' functions we know and love, the 'BooleanR' class presents /relationships/ that are analogous to these. The inputs are, even if your computer can't. The implementations of 'BooleanR' should be such that all directions of inference are considered. | An...
# LANGUAGE BlockArguments # # LANGUAGE FlexibleInstances # # LANGUAGE KindSignatures # | Module : Data . JoinSemilattice . Class . Boolean Description : Relationships between boolean variables . Copyright : ( c ) , 2020 License : MIT Module : Data.JoinSemilattice.Class.Boolean Descriptio...
31de5f062fdfb8e82e6238422db7376e0bee6f19e0a74ce2bd840e8ba2c5857f
mhwombat/creatur
CachedFileSystemQC.hs
------------------------------------------------------------------------ -- | Module : ALife . . Database . CachedFileSystemQC Copyright : ( c ) 2014 - 2022 -- License : BSD-style -- Maintainer : -- Stability : experimental -- Portability : portable -- -- QuickCheck tests. -- ----------...
null
https://raw.githubusercontent.com/mhwombat/creatur/c715f4de16d29b646b27f3185d1d073df0fc9cb6/test/ALife/Creatur/Database/CachedFileSystemQC.hs
haskell
---------------------------------------------------------------------- | License : BSD-style Maintainer : Stability : experimental Portability : portable QuickCheck tests. ---------------------------------------------------------------------- We didn't create a file for the record, but as long as t...
Module : ALife . . Database . CachedFileSystemQC Copyright : ( c ) 2014 - 2022 # LANGUAGE DeriveGeneric # module ALife.Creatur.Database.CachedFileSystemQC ( test ) where import ALife.Creatur.Database (Record, ...
9843b9a3298c80a32840a618994c3ff89d617734933d64263fdb6536bd42e65e
jrm-code-project/LISP-Machine
bn.lisp
-*- Mode : LISP ; Package : USER ; ; : ZL -*- 28 - Oct-86 09:56:43 -gjc ;;; simplest possible bignum runtime support. ;;; primitives ;;; (b-radix-plus <x> <y>) => <x+y> <carry> ;;; (b-radix-times <x> <y>) => <high> <low> ;;; (b-radix-haulong <x>) => <n> (defvar *b-radix* 10) (defun b-radix-plus (x y) (l...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/gjcx/bn.lisp
lisp
Package : USER ; ; : ZL -*- simplest possible bignum runtime support. primitives (b-radix-plus <x> <y>) => <x+y> <carry> (b-radix-times <x> <y>) => <high> <low> (b-radix-haulong <x>) => <n> a simple way to deal with division is via an iterative approximation.
28 - Oct-86 09:56:43 -gjc (defvar *b-radix* 10) (defun b-radix-plus (x y) (let ((r (+ x y))) (if (< r *b-radix*) (values r 0) (values (- r *b-radix*) 1)))) (defun b-radix-times (x y) (floor (* x y) *b-radix*)) (defun b-radix-haulong (x) (haulong x)) (defun b-radix-lessp (a b) (< a b)...
ec00f960fedcf9b9fdbff85e122eaecec633de1bc06a2a664355442054255114
trez/LazyNES
Main.hs
# LANGUAGE MultiParamTypeClasses , BangPatterns # module Main ( -- * Main main ) where import System.Environment (getArgs) import Control.Monad import Debug.Trace import Helpers import CPU.Types import CPU.Definition import CPU.Addressing import CPU.Instructions -- | Main function main :: IO () m...
null
https://raw.githubusercontent.com/trez/LazyNES/8f2572e6bb60d1c0ab2c94c584144220ff9e05d1/src/Main.hs
haskell
* Main | Main function --------------------------------------------------------------------------- Execute instruction Execute instruction again. Execute instruction again. +125 trace ) --------------------------------------------------------------------------- ADC ABS JMP ABS
# LANGUAGE MultiParamTypeClasses , BangPatterns # module Main ( main ) where import System.Environment (getArgs) import Control.Monad import Debug.Trace import Helpers import CPU.Types import CPU.Definition import CPU.Addressing import CPU.Instructions main :: IO () main = do putStrLn "Running Lazy...
16b36d0087a566bd4d74431ac30d61287bd2333e173f0b9b0436a9396a7f614e
cirodrig/triolet
Raft.hs
| Rafts are a data structure used when restructuring expressions into simpler forms that are easier to optimize . They are a special case of \"contexts\ " , or expressions with one hole to be filled in by additional code . Like expressions , rafts include variable references and bindings . ...
null
https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/SystemF/Raft.hs
haskell
| The hole | A let binding | A letrec binding | Put 'y' into the hole of 'x' | Split a raft into those parts that depend on the given variables and those parts that do not. Check the free variables to decide whether this part of the raft | Add a raft's bound variables to the environment
| Rafts are a data structure used when restructuring expressions into simpler forms that are easier to optimize . They are a special case of \"contexts\ " , or expressions with one hole to be filled in by additional code . Like expressions , rafts include variable references and bindings . ...
576e1ff96894435ef859b8031564d04ca68dfd33a89bb32bb1eca2cce832f187
cxphoe/SICP-solutions
expression.rkt
(define (tagged-list? exp tag) (if (pair? exp) (eq? (car exp) tag) false)) ; predicate tests (define (true? x) (not (eq? x false))) (define (false? x) (eq? x false)) ; procedure expression (define (make-procedure parameters body env) (list 'procedure parameters body env)) ;; primitive procedure (defi...
null
https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%205-Computing%20with%20Register%20Machines/5.%20Compile/ev-operations/expression.rkt
racket
predicate tests procedure expression primitive procedure compound procedure self-evaluating: number or string variable quote: (quote <text-of-quotation>) assignment: (set! <var> <value>) definition: (define <var> <value>) or (define (<var> <parameter1> ... <parametern>) <body>)) which is ...
(define (tagged-list? exp tag) (if (pair? exp) (eq? (car exp) tag) false)) (define (true? x) (not (eq? x false))) (define (false? x) (eq? x false)) (define (make-procedure parameters body env) (list 'procedure parameters body env)) (define (primitive-procedure? proc) (tagged-list? proc 'primitive))...
b16dddb5bd32eecfff52f9612fcbe5ab383593dd94be80194b88bf4b6521de59
duct-framework/module.ataraxy
ataraxy.clj
(ns duct.router.ataraxy (:require [ataraxy.core :as ataraxy] [ataraxy.response :as resp] [clojure.set :as set] [clojure.java.io :as io] [duct.core.resource] [integrant.core :as ig])) (def ^:private default-handlers {:ataraxy.error/unmatched-path (ig/ref...
null
https://raw.githubusercontent.com/duct-framework/module.ataraxy/d347c4cef5ba173cb026f8ea0e84a2a57016134e/src/duct/router/ataraxy.clj
clojure
(ns duct.router.ataraxy (:require [ataraxy.core :as ataraxy] [ataraxy.response :as resp] [clojure.set :as set] [clojure.java.io :as io] [duct.core.resource] [integrant.core :as ig])) (def ^:private default-handlers {:ataraxy.error/unmatched-path (ig/ref...
118fb2fbee028f3e6dcdccbb2223d1499ba449f705ea87e30eb0dd3ff19fee11
lispnik/iup
canvas.lisp
(eval-when (:compile-toplevel :load-toplevel :execute) (ql:quickload '("iup" "iup-cd"))) (defpackage #:iup-examples.canvas (:use #:common-lisp #:alexandria) (:export #:canvas)) (in-package #:iup-examples.canvas) (defparameter *canvas* nil) (defun canvas-redraw (handle x y) (declare (ignore handle x y)) (...
null
https://raw.githubusercontent.com/lispnik/iup/c642317305dbb2df808f319a06a6a9e002765516/examples/canvas.lisp
lisp
(eval-when (:compile-toplevel :load-toplevel :execute) (ql:quickload '("iup" "iup-cd"))) (defpackage #:iup-examples.canvas (:use #:common-lisp #:alexandria) (:export #:canvas)) (in-package #:iup-examples.canvas) (defparameter *canvas* nil) (defun canvas-redraw (handle x y) (declare (ignore handle x y)) (...
62edece43514d3afb1b4c56d249a83e4c0744633acaada4d907d26527d638cc6
korya/efuns
wX_types.ml
(***********************************************************************) (* *) (* ____ *) (* *) Fabrice Le Fessa...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/toolkit/wX_types.ml
ocaml
********************************************************************* ____ ...
Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt Copyright 1999 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . open Xtypes let max (x : int) (y : int) = if x>y then x else y let min (x : int) (y : int) = if ...
73c6c5e218c562f402b63dbd6e59f1a3fb191271c5cd6c92ac39aa93f0e1bf2d
Stvad/goodreads2roam
core.cljs
(ns goodreads2roam.core (:require [goodreads2roam.node :refer [read-file write-file exit]] [goodreads2roam.goodreads :refer [read-books book->roam shelves filter-by-shelves read-books-string]] [clojure.tools.cli :refer [parse-opts]] [clojure.string :as string])) (defn usage [options-summary] (->> [...
null
https://raw.githubusercontent.com/Stvad/goodreads2roam/f5643e4695f70865d830f8f1eccf1c2cabe8559b/src/main/goodreads2roam/core.cljs
clojure
(ns goodreads2roam.core (:require [goodreads2roam.node :refer [read-file write-file exit]] [goodreads2roam.goodreads :refer [read-books book->roam shelves filter-by-shelves read-books-string]] [clojure.tools.cli :refer [parse-opts]] [clojure.string :as string])) (defn usage [options-summary] (->> [...
4a613fa2afa52b3d1935bc5e5d62e8ddee965306fe7492ee364364b85079c4c5
opencog/pln
present-deduction.scm
;; ============================================================================= ;; Crisp deduction rules ;; ;; Inheritance ;; A ;; B ;; Inheritance ;; B ;; C ;; |- ;; Inheritance ;; A ;; C ;; ;; For now only the following rule is implemented ;; ;; present-deduction-inheritance-rule ;; ;; No precondit...
null
https://raw.githubusercontent.com/opencog/pln/ea6c9bbe47cb315aded20db0fa765c3a9de82461/opencog/pln/rules/term/present-deduction.scm
scheme
============================================================================= Crisp deduction rules Inheritance A B Inheritance B C |- Inheritance A C For now only the following rule is implemented present-deduction-inheritance-rule No precondition exists on the TV, only the mere pr...
(use-modules (opencog logger)) the type of each variable ( the same for all 3 ) . (define (gen-present-deduction-rule link-type var-type) (let* ((A (Variable "$A")) (B (Variable "$B")) (C (Variable "$C")) (AB (link-type A B)) (BC (link-type B C)) (AC (link-type A C))) ...
2f0967ebbe0d8b0f3fbf0288e2d773999f37217f22c47b9d5e35b8a4ce62cb5d
lisp/de.setf.amqp
data-wire-coding.lisp
-*- Package : DE.SETF.AMQP.IMPLEMENTATION ; -*- (in-package "DE.SETF.AMQP.IMPLEMENTATION") (:documentation "This file defines buffer accessors for AMPQ version 0.9r1 components of the `de.setf.amqp` library." (copyright "Copyright 2010 [james anderson](mailto:) All Rights Reserved" "'de.setf.amqp' is free so...
null
https://raw.githubusercontent.com/lisp/de.setf.amqp/03181135ddf15cb3866fbf4285c8b6d3eeeb660e/amqp-1-1-0-9-1/data-wire-coding.lisp
lisp
-*- without even the nb. the spec has several type errors: channel-max, frame-max and heartbeat are type short, which means promoted due to typecase ... pertains to argument types, which are not table fields
(in-package "DE.SETF.AMQP.IMPLEMENTATION") (:documentation "This file defines buffer accessors for AMPQ version 0.9r1 components of the `de.setf.amqp` library." (copyright "Copyright 2010 [james anderson](mailto:) All Rights Reserved" "'de.setf.amqp' is free software: you can redistribute it and/or modify it u...
52afe74e7b2631956a93087f12eff81894a2f7fa791707ba9d1fe13086b44b23
melisgl/mgl-mat
cublas.lisp
;;;; CUBLAS support. ;;;; ;;;; Similarly to DEFINE-BLAS-FUNCTION in blas.lisp, the main thing ;;;; here is DEFINE-CUBLAS-FUNCTION. In addition to that, there is ;;;; just a tiny bit of code for initialization of cublas handles and ;;;; error handling. ;;;; ;;;; All CUBLAS functions take a HANDLE keyword argument that d...
null
https://raw.githubusercontent.com/melisgl/mgl-mat/550369aaac5aeafe563b6dc8e3cc6bf4b74a1cc5/src/cublas.lisp
lisp
CUBLAS support. Similarly to DEFINE-BLAS-FUNCTION in blas.lisp, the main thing here is DEFINE-CUBLAS-FUNCTION. In addition to that, there is just a tiny bit of code for initialization of cublas handles and error handling. All CUBLAS functions take a HANDLE keyword argument that defaults to *CUBLAS-HANDLE*. WIT...
(in-package :mgl-mat) (defsection @mat-cublas (:title "CUBLAS") "In a WITH-CUDA* @MAT-BLAS will automatically use CUBLAS. No need to use these at all." (cublas-error condition) (cublas-error-function-name (reader cublas-error)) (cublas-error-status (reader cublas-error)) (*cublas-handle* variable) (cubl...
51676bba4b8eb55be849dec9361292ec7f355beb9826f8094539767f4d516170
IBM-Watson/kale
watson_service_test.clj
;; ( C ) Copyright IBM Corp. 2016 All Rights Reserved . ;; (ns kale.watson-service-test (:require [kale.watson-service :as sut] [kale.common :refer [new-line set-language]] [org.httpkit.fake :refer [with-fake-http]] [slingshot.test :refer :all] [clojure.test :refer [...
null
https://raw.githubusercontent.com/IBM-Watson/kale/f1c5e312e5db0e3fc01c47dfb965f175b5b0a5b6/test/kale/watson_service_test.clj
clojure
( C ) Copyright IBM Corp. 2016 All Rights Reserved . (ns kale.watson-service-test (:require [kale.watson-service :as sut] [kale.common :refer [new-line set-language]] [org.httpkit.fake :refer [with-fake-http]] [slingshot.test :refer :all] [clojure.test :refer [deftes...
a58f9df7d4e43f42ab4ba6e85fa5e77cd1339491597fe42e5238cb910437d7bb
evertedsphere/silica
PrismTH.hs
# LANGUAGE CPP # #ifdef TRUSTWORTHY # if MIN_VERSION_template_haskell(2,12,0) # else # LANGUAGE Trustworthy # # endif #endif #ifndef MIN_VERSION_template_haskell #define MIN_VERSION_template_haskell(x,y,z) 1 #endif ----------------------------------------------------------------------------- -- | -- Module : Sil...
null
https://raw.githubusercontent.com/evertedsphere/silica/346006f7b58142c6479395e93338134f541034cc/src/Silica/Internal/PrismTH.hs
haskell
--------------------------------------------------------------------------- | Module : Silica.Internal.PrismTH License : BSD-style (see the file LICENSE) Stability : experimental Portability : non-portable --------------------------------------------------------------------------- | Generate a 'Pr...
# LANGUAGE CPP # #ifdef TRUSTWORTHY # if MIN_VERSION_template_haskell(2,12,0) # else # LANGUAGE Trustworthy # # endif #endif #ifndef MIN_VERSION_template_haskell #define MIN_VERSION_template_haskell(x,y,z) 1 #endif Copyright : ( C ) 2014 - 2016 and Maintainer : < > module Silica.Internal.PrismTH ...
4df90600ae34a45c0f31b9e5190f44ed16dbedd44ddf42c561db8eebf0e00e78
andorp/bead
Data.hs
# LANGUAGE OverloadedStrings , CPP # module Bead.View.Content.Home.Data where import Data.Map (Map) import qualified Data.Map as Map import Data.Time import Bead.View.Content hiding (userState) import Bead.View.Content.SubmissionTable type ActiveAssignment = (AssignmentKey, As...
null
https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/src/Bead/View/Content/Home/Data.hs
haskell
Returns True if the student is not registered in any courses otherwise False True if the user has administrated courses True if the user has administrated groups Empty map means that the user is not registrated in any courses ^ The convertes function that convert a given utc time into the users local timezone
# LANGUAGE OverloadedStrings , CPP # module Bead.View.Content.Home.Data where import Data.Map (Map) import qualified Data.Map as Map import Data.Time import Bead.View.Content hiding (userState) import Bead.View.Content.SubmissionTable type ActiveAssignment = (AssignmentKey, As...
7dbf21b27e32cf06030bf9161f1c1b00fc529b141c72c597ea3483cec2945b75
qfpl/reflex-tutorial
Component.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # # LANGUAGE RecursiveDo # {-# LANGUAGE GADTs #-} module Posts.Component ( componentPostExamples ) where import Control.Monad (void, join) import Control.Lens import Data.Text (Text) import qualified Data.Text as Text import Reflex.Dom.Core import ...
null
https://raw.githubusercontent.com/qfpl/reflex-tutorial/07c1e6fab387cbeedd031630ba6a5cd946cc612e/code/basics/src/Posts/Component.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE GADTs # Options: D a -> E a D (TodoItem B T) and break apart, if you need a complete model D (TodoItem (D B) (D T)) if you don't need to break it apart look at how this interfaces with Workflow for read/edit look at the case where you don't need to pass the m...
# LANGUAGE TemplateHaskell # # LANGUAGE RecursiveDo # module Posts.Component ( componentPostExamples ) where import Control.Monad (void, join) import Control.Lens import Data.Text (Text) import qualified Data.Text as Text import Reflex.Dom.Core import GHCJS.DOM.Types (MonadJSM) import Util.Attach import Util...
d6ce45117a6779c2c5b70ce0ebfbca61fa1073c7beca7181d8a29be446b4d94c
logicmoo/logicmoo_nlu
packages.lisp
-*- mode : lisp;coding : utf-8 -*- ;;;;************************************************************************** FILE : packages.lisp ;;;;LANGUAGE: Common-Lisp ;;;;SYSTEM: Common-Lisp USER - INTERFACE : ;;;;DESCRIPTION ;;;; + max - of - trail+ package definition fo...
null
https://raw.githubusercontent.com/logicmoo/logicmoo_nlu/c066897f55b3ff45aa9155ebcf799fda9741bf74/ext/e2c/pjb-micro-prolog-ii/packages.lisp
lisp
coding : utf-8 -*- ************************************************************************** LANGUAGE: Common-Lisp SYSTEM: Common-Lisp DESCRIPTION LEGAL GPL This program is free software; you can redistribute it and/or either version This program is distribut...
FILE : packages.lisp USER - INTERFACE : + max - of - trail+ package definition for < PJB > < > MODIFICATIONS 2010 - 01 - 16 < PJB > Created . Copyright 2010 - 2010 modify it under the terms of the GNU General Public License 2 of the License , or ( at your opt...
46ead69987220182f4c0272157bbff749f958caf93525b8ec06e7dad46140416
timbertson/passe
password_form.ml
open Js_of_ocaml open Js_of_ocaml_lwt open Vdoml open Passe open Passe_js open Common open React_ext open Js_util module Log = (val Logging.log_module "password_form") module Keycode = Keycode_ext type input_target = [ `domain | `password ] type domain_suggestions = { suggestions : string list; selected : int option...
null
https://raw.githubusercontent.com/timbertson/passe/467a79ea0cd7b08a97b52be3bd1307a3bdf55799/src/www/password_form.ml
ocaml
don't bother deep equality checking explicit focus request used for command only: cancels this branch because the other one is waiting * on `password_input_data` changes attr is attached to element before the result is inserted into the document, * so delay until next tick give a bit of UI feedback ...
open Js_of_ocaml open Js_of_ocaml_lwt open Vdoml open Passe open Passe_js open Common open React_ext open Js_util module Log = (val Logging.log_module "password_form") module Keycode = Keycode_ext type input_target = [ `domain | `password ] type domain_suggestions = { suggestions : string list; selected : int option...
a9185c706d38b06f92780c3578b1a9bc84a2a280b4443159112c7466c4cce3e3
Bubbler-4/StepULC
Main.hs
import ULC import Examples import Criterion.Main main = defaultMain [ bgroup "sem1" [ bench "fac 4" $ nf semantic1 (facN 4) ] , bgroup "sem1-1" [ bench "fac 4" $ nf semantic1_1 (facN 4) ] , bgroup "sem1-2" [ bench "fac 4" $ nf semantic1_2 (facN 4) ] , bgr...
null
https://raw.githubusercontent.com/Bubbler-4/StepULC/e9d7b0c75708d2b429f43a2d756eec7b6518df51/StepULC/benchmark/Main.hs
haskell
import ULC import Examples import Criterion.Main main = defaultMain [ bgroup "sem1" [ bench "fac 4" $ nf semantic1 (facN 4) ] , bgroup "sem1-1" [ bench "fac 4" $ nf semantic1_1 (facN 4) ] , bgroup "sem1-2" [ bench "fac 4" $ nf semantic1_2 (facN 4) ] , bgr...
915f056c95bc2139acbf6cb8698f8e0aaa218204a114d2d793ca045b64fdf7aa
philnguyen/soft-contract
measure.rkt
#lang racket/base (provide load-text-cache-file update-text-cache-file round-float measure-text measure-ascent ) ;; ----------------------------------------------------------------------------- (require require-typed-check "../base/core.rkt" (only-in racket/class new send) (only-in math/flonum fl) (o...
null
https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/gradual-typing-benchmarks/quadMB/measure.rkt
racket
----------------------------------------------------------------------------- ============================================================================= (define-type Measurement-Result-Type (List Float Float Float Float)) (define mrt? (make-predicate Measurement-Result-Type)) (current-text-cache-changed? #t) avoi...
#lang racket/base (provide load-text-cache-file update-text-cache-file round-float measure-text measure-ascent ) (require require-typed-check "../base/core.rkt" (only-in racket/class new send) (only-in math/flonum fl) (only-in racket/file write-to-file file->value) (only-in racket/draw record-dc% fo...
99869db13adfaffa6efedae8597b5db73f8c46b385f7095ea4677e48152b3cc2
jimpil/jedi-time
tools.clj
(ns jedi-time.datafied.tools (:require [jedi-time.protocols :as jp] [jedi-time.core :as jdt] [clojure.datafy :as d] [clojure.core.protocols :as p])) (defmacro ^:private with-meta-check [[fsym datafied & more]] `(if (contains? (meta ~datafied) '~fsym) (~fsym ~datafied ~@mo...
null
https://raw.githubusercontent.com/jimpil/jedi-time/7224780812308b70df10a68b949c70758b80b32a/src/jedi_time/datafied/tools.clj
clojure
has to be a fully qualified call has to be a fully qualified call has to be a fully qualified call has to be a fully qualified call has to be a fully qualified call
(ns jedi-time.datafied.tools (:require [jedi-time.protocols :as jp] [jedi-time.core :as jdt] [clojure.datafy :as d] [clojure.core.protocols :as p])) (defmacro ^:private with-meta-check [[fsym datafied & more]] `(if (contains? (meta ~datafied) '~fsym) (~fsym ~datafied ~@mo...
ff9e11289d5cbe420bd60410b1a345c7cfe5e9c05820b7ff9f3a5aa78d6efd29
karamellpelle/grid
GLFW.hs
grid is a game written in Haskell Copyright ( C ) 2018 -- -- This file is part of grid. -- -- grid 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 optio...
null
https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/MEnv/Screen/GLFW.hs
haskell
This file is part of grid. grid is free software: you can redistribute it and/or modify (at your option) any later version. grid is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
grid is a game written in Haskell Copyright ( C ) 2018 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 module MEnv.Screen.GLFW ( screenBegin, sc...
048243ff4a33ac4cb3227f489b31ea98069e2c0b6220c89fe1de928c6f6ac2a6
enikulenkov/ErlNNTP
sequence_srv.erl
-module(sequence_srv). -include("log_macros.hrl"). -export([get_next_number/1, update/0, start_link/0]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). start_link () -> gen_server:start_link ({local, sequence},?MODULE, [], []). init ([]) -> Dict = ets:new(dict, [])...
null
https://raw.githubusercontent.com/enikulenkov/ErlNNTP/e69b3b61e956f729cadc3f4afb8ef861e2aff854/src/sequence_srv.erl
erlang
-module(sequence_srv). -include("log_macros.hrl"). -export([get_next_number/1, update/0, start_link/0]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]). start_link () -> gen_server:start_link ({local, sequence},?MODULE, [], []). init ([]) -> Dict = ets:new(dict, [])...
e84a764da7534c74ad8560b3287e292e44b173c9b685b9281a578c0d736a9d29
mbacarella/portmidi
function_gen.ml
let () = let concurrency = Cstubs.unlocked in let prefix = Sys.argv.(2) in match Sys.argv.(1) with | "ml" -> Cstubs.write_ml ~concurrency Format.std_formatter ~prefix (module Portmidi_c_function_descriptions.Functions) | "c" -> print_endline "#include <portmidi.h>"; Cstubs....
null
https://raw.githubusercontent.com/mbacarella/portmidi/d80458a52d04edaebdf9e48d4248fb308758cef6/c/function_gen.ml
ocaml
let () = let concurrency = Cstubs.unlocked in let prefix = Sys.argv.(2) in match Sys.argv.(1) with | "ml" -> Cstubs.write_ml ~concurrency Format.std_formatter ~prefix (module Portmidi_c_function_descriptions.Functions) | "c" -> print_endline "#include <portmidi.h>"; Cstubs....
0a02ea44363a397740c3ce9c7f5edc64b8c5c894468589cfbcdd5f9b4bfccde9
imrehg/ypsilon
colormap.scm
#!nobacktrace Ypsilon Scheme System Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited . See license.txt for terms and conditions of use . (library (ypsilon gdk colormap) (export gdk_colormap_alloc_color gdk_colormap_alloc_colors gdk_colormap_free_colors gdk_colorm...
null
https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/gdk/colormap.scm
scheme
GdkColormap* gdk_colormap_get_system (void) [end]
#!nobacktrace Ypsilon Scheme System Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited . See license.txt for terms and conditions of use . (library (ypsilon gdk colormap) (export gdk_colormap_alloc_color gdk_colormap_alloc_colors gdk_colormap_free_colors gdk_colorm...
ba4bd069142aa23f305f07130e288640970ffac02c4033f9ab4553d9d061b7b3
logseq/logseq
log.cljs
(ns frontend.log "System-component-like ns that encapsulates logging functionality" (:require [lambdaisland.glogi :as log] [lambdaisland.glogi.console :as glogi-console] [frontend.config :as config])) ;; TODO: Move code below into a fn to behave like a system component ;; instead of having ...
null
https://raw.githubusercontent.com/logseq/logseq/9c7b4ea2016fb28b16ee42a7136c73dd52d8ce4b/src/main/frontend/log.cljs
clojure
TODO: Move code below into a fn to behave like a system component instead of having no control over its behavior at require time
(ns frontend.log "System-component-like ns that encapsulates logging functionality" (:require [lambdaisland.glogi :as log] [lambdaisland.glogi.console :as glogi-console] [frontend.config :as config])) (glogi-console/install!) (if config/dev? (log/set-levels {:glogi/root :info}) (log/se...
7c5808769e3f1cb99ae851e711cc862c8a80deaf6deb9523d10617348037a8f0
janestreet/core
test_time_ns.ml
open! Core open Expect_test_helpers_core type time_ns = Time_ns.t [@@deriving compare] let sexp_of_time_ns = Time_ns.Alternate_sexp.sexp_of_t let quickcheck_generator = let open Quickcheck.Generator.Let_syntax in let%map ns_since_epoch = Int63.gen_incl (Time_ns.to_int63_ns_since_epoch Time_ns.min_value...
null
https://raw.githubusercontent.com/janestreet/core/36053c38f9cfb7391b1f7dd37231861700e3599e/core/test/test_time_ns.ml
ocaml
stable checks for values that round-trip stable checks for values that do not precisely round-trip make sure [of_int63_exn] allows all values randomly round spans to make sure we round-trip at various precisions, since it affects number of decimal places normal times lower boundary case upper boun...
open! Core open Expect_test_helpers_core type time_ns = Time_ns.t [@@deriving compare] let sexp_of_time_ns = Time_ns.Alternate_sexp.sexp_of_t let quickcheck_generator = let open Quickcheck.Generator.Let_syntax in let%map ns_since_epoch = Int63.gen_incl (Time_ns.to_int63_ns_since_epoch Time_ns.min_value...
63eff453f706cb1c6b19a836366733b4aacc363624a31f75e631afb0c717d627
CloudI/CloudI
epgsql_cmd_describe_portal.erl
%% @doc Asks the server to provide description of portal's results columns %% %% ``` %% > Describe(PORTAL) %% < RowDescription | NoData %% ''' -module(epgsql_cmd_describe_portal). -behaviour(epgsql_command). -export([init/1, execute/2, handle_message/4]). -export_type([response/0]). -include("epgsql.hrl"). -include("e...
null
https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_epgsql/src/epgsql_cmd_describe_portal.erl
erlang
@doc Asks the server to provide description of portal's results columns ``` > Describe(PORTAL) < RowDescription | NoData '''
-module(epgsql_cmd_describe_portal). -behaviour(epgsql_command). -export([init/1, execute/2, handle_message/4]). -export_type([response/0]). -include("epgsql.hrl"). -include("epgsql_protocol.hrl"). -type response() :: {ok, [epgsql:column()]} | {error, epgsql:query_error()}. -record(desc_portal, {name :: ioda...
8e4d5d96c6a0f482a7672060a3aa1aaec87fcafc849c50bb8da4c7f0abc6f82e
russelldb/aws_ec2
aws_ec2.erl
%%%------------------------------------------------------------------- %%% File : aws_ec2.erl Author : < > %%% Description : A gen_server to talk at AWS EC2 %%% Created : 19 Aug 2009 by < > %%%------------------------------------------------------------------- -module(aws_ec2). -behaviour(gen_server)....
null
https://raw.githubusercontent.com/russelldb/aws_ec2/2eb0b30f1b62c286b728f19f74f6f90dd49ac8f6/src/aws_ec2.erl
erlang
------------------------------------------------------------------- File : aws_ec2.erl Description : A gen_server to talk at AWS EC2 ------------------------------------------------------------------- API gen_server callbacks ==================================================================== API ============...
Author : < > Created : 19 Aug 2009 by < > -module(aws_ec2). -behaviour(gen_server). -export([start_link/0, run_instance/5, run_instances/7, terminate_instance/3, terminate_instances/3, describe_instance/3, describe_instances/3]). -export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate...
22e02a82d766eb12d1792fe36313534863d3a9e87573f217ee71626adbe090b1
input-output-hk/cardano-ledger
Epoch.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Byron.Spec.Chain.STS.Rule.Epoch where import Byron.Spec.Ledger.Core import Byron.Spec.Ledger.GlobalParams (slotsPerEpoch) import Byron.Spec.Ledger.Update import Control.State.Transitio...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/31c0bb1f5e78e40b83adfd1a916e69f47fdc9835/eras/byron/chain/executable-spec/src/Byron/Spec/Chain/STS/Rule/Epoch.hs
haskell
# LANGUAGE DeriveDataTypeable # | Compute the epoch for the given _absolute_ slot and chain stability parameter. Chain stability paramter; this is a global constant in the formal specification, which we put in this environment so that we can test with different values of it.
# LANGUAGE MultiParamTypeClasses # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Byron.Spec.Chain.STS.Rule.Epoch where import Byron.Spec.Ledger.Core import Byron.Spec.Ledger.GlobalParams (slotsPerEpoch) import Byron.Spec.Ledger.Update import Control.State.Transition import Data.Data (Data, Typeable) ...
219bee2ed95dfd549e0a287d612eb03df6c12e4f168dd81838d8996e07ea0ad5
armedbear/abcl
documentation.lisp
documentation.lisp ;;; Copyright ( C ) 2003 - 2007 Copyright ( C ) 2010 - 2013 ;;; ;;; 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 o...
null
https://raw.githubusercontent.com/armedbear/abcl/36a4b5994227d768882ff6458b3df9f79caac664/src/org/armedbear/lisp/documentation.lisp
lisp
This program is free software; you can redistribute it and/or either version 2 This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details...
documentation.lisp Copyright ( C ) 2003 - 2007 Copyright ( C ) 2010 - 2013 modify it under the terms of the GNU General Public License of the License , or ( at your option ) any later version . You should have received a copy of the GNU General Public License Foundation , Inc. , 51 Franklin Street , F...
36b2092d85cfe00ccabe7eaf5f60a91e32db01a621cd627f4115d13b5f320b76
erlang/rebar3
app.erl
%%%------------------------------------------------------------------- %% @doc {{name}} public API %% @end %%%------------------------------------------------------------------- -module({{name}}_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> {{name}}_sup:start_link()...
null
https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/priv/templates/app.erl
erlang
------------------------------------------------------------------- @doc {{name}} public API @end ------------------------------------------------------------------- internal functions
-module({{name}}_app). -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> {{name}}_sup:start_link(). stop(_State) -> ok.
ebf6b547eeab599c7ec59e4d8fbf91a3b777623dae7d1ec89619ab1939e1165c
rabbitmq/rabbitmq-peer-discovery-consul
rabbitmq_peer_discovery_consul_health_check_helper.erl
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. %% Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . %% %% This gen_server starts a periodic timer on beh...
null
https://raw.githubusercontent.com/rabbitmq/rabbitmq-peer-discovery-consul/a3658321cee1c811990bcf0ccff2251319f910bb/src/rabbitmq_peer_discovery_consul_health_check_helper.erl
erlang
This gen_server starts a periodic timer on behalf of a short lived process that kicks off peer discovery. This is so that the timer is not automatically canceled and cleaned up by the timer server when the short lived process terminates. API Implementation because this function is executed in a short live...
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved . -module(rabbitmq_peer_discovery_consul_health_check_he...
346f480a7084f4def033ec127cc99a9b5d2c31065e8f534bff2f237e29166d9e
ocaml/oasis
OASISFindlib.mli
(******************************************************************************) OASIS : architecture for building OCaml libraries and applications (* *) Copyright ( C ) 2011 - 2016 , Copyrig...
null
https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/src/oasis/OASISFindlib.mli
ocaml
**************************************************************************** This library is free software; you can redistribute it and/or modify it under the t...
OASIS : architecture for building OCaml libraries and applications Copyright ( C ) 2011 - 2016 , Copyright ( C ) 2008 - 2011 , OCamlCore SARL the Free Software Foundation ; either version 2.1 of the License , or ( at You s...
bb6e6dfdc7d917eaac4b49acf9051aabf1fe13b38c4ee11d2a5af010a59e656e
lisp-mirror/clpm
default-source.lisp
Definitions for using the default values as a CLPM config source . ;;;; This software is part of CLPM . See README.org for more information . See ;;;; LICENSE for license information. (uiop:define-package #:clpm/config/default-source (:use #:cl #:clpm/config/defs #:clpm/config/source-defs) ...
null
https://raw.githubusercontent.com/lisp-mirror/clpm/ad9a704fcdd0df5ce30ead106706ab6cc5fb3e5b/clpm/config/default-source.lisp
lisp
LICENSE for license information.
Definitions for using the default values as a CLPM config source . This software is part of CLPM . See README.org for more information . See (uiop:define-package #:clpm/config/default-source (:use #:cl #:clpm/config/defs #:clpm/config/source-defs) (:export #:config-default-source)) (in-p...
1667c7633847f3ab8e3b22fdb4b907f1e524ba3566d1514d91bc58207e0036bd
sfrank/minheap
pairing-heap-listbased.lisp
MINHEAP is by < > , 2007 - 2012 . ;;;; ;;;; Permission is hereby granted, free of charge, to any person obtaining ;;;; a copy of this software and associated documentation files (the " Software " ) , to deal in the Software without restriction , including ;;;; without limitation the rights to use, copy, modify, ...
null
https://raw.githubusercontent.com/sfrank/minheap/51cc9edcbbe13d9132fe12b0b197848f31513232/pairing-heap-listbased.lisp
lisp
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the without limitation the rights to use, copy, modify, merge, publish, the following conditions: The above copyright notice and this permission notice shall be included EXPRESS OR ...
MINHEAP is by < > , 2007 - 2012 . " Software " ) , to deal in the Software without restriction , including distribute , sublicense , and/or sell copies of the Software , and to permit persons to whom the Software is furnished to do so , subject to in all copies or substantial portions of the Software . T...
76addcf4b387ded29f8be8f3c771d30478e5905f8a6cac12c5287eb3fdc5cdc1
o1-labs/snarkette
bowe_gabizon.ml
open Core_kernel open Fold_lib let ( = ) = `Don't_use_polymorphic_equality module type Backend_intf = sig module N : Nat_intf.S module Fq : Fields.Fp_intf with type nat := N.t module Fqe : Fields.Extension_intf with type base = Fq.t module G1 : sig type t [@@deriving sexp, bin_io] val zero : t ...
null
https://raw.githubusercontent.com/o1-labs/snarkette/c4af4a5f654497183871b5f2ee99005020be20d8/src/bowe_gabizon.ml
ocaml
open Core_kernel open Fold_lib let ( = ) = `Don't_use_polymorphic_equality module type Backend_intf = sig module N : Nat_intf.S module Fq : Fields.Fp_intf with type nat := N.t module Fqe : Fields.Extension_intf with type base = Fq.t module G1 : sig type t [@@deriving sexp, bin_io] val zero : t ...
ccc7e87918c48fd3e11dbbb5eb443367a1af3145d6a8d44d79892a9403417ab8
blindglobe/clocc
ms-dos.lisp
;;; -*- Mode: CLtL -*- ms-dos.lisp -- MS - DOS dependencies . Copyright ( c ) 2000 , all rights reserved . ;;; This software is released under the terms of the GNU Lesser General ;;; Public License (LGPL, see file COPYING for details). (in-package "CL.EXT.CONFIGURATION") (defmethod wild-inferior-directories...
null
https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/port/configuration/impl-dependent/ms-dos.lisp
lisp
-*- Mode: CLtL -*- This software is released under the terms of the GNU Lesser General Public License (LGPL, see file COPYING for details). end of file -- unix.lisp --
ms-dos.lisp -- MS - DOS dependencies . Copyright ( c ) 2000 , all rights reserved . (in-package "CL.EXT.CONFIGURATION") (defmethod wild-inferior-directories ((os cl.env:ms-dos)) "**\\")
fac7d3c8f0c7c98e973149f666825e6db5009243a37383c98f1bf5084b101c85
cbaggers/cepl
docs.lisp
(in-package :cepl.gpu-arrays) (docs:define-docs (defstruct gpu-array " `GPU-ARRAY` is a structure that represents an array in gpu-memory. Depending on how the array was created it is said that the gpu-array is either 'buffer-backed' or 'texture-backed'. - buffer-backed: Means it was created with `make-gpu-arra...
null
https://raw.githubusercontent.com/cbaggers/cepl/d1a10b6c8f4cedc07493bf06aef3a56c7b6f8d5b/core/gpu-arrays/docs.lisp
lisp
(in-package :cepl.gpu-arrays) (docs:define-docs (defstruct gpu-array " `GPU-ARRAY` is a structure that represents an array in gpu-memory. Depending on how the array was created it is said that the gpu-array is either 'buffer-backed' or 'texture-backed'. - buffer-backed: Means it was created with `make-gpu-arra...
794eb66664b330ded31b9aa28c642e3fef243dfe100254b23484afdb9d0e4c9c
dpiponi/Moodler
bass_drum.hs
do (x0, y0) <- mouse let (x, y) = quantise2 quantum (x0, y0) root <- currentPlane audio_id9 <- new' "audio_id" audio_saw10 <- new' "audio_saw" audio_sin11 <- new' "audio_sin" audio_square12 <- new' "audio_square" audio_triangle13 <- new' "audio_triangle" butterbp14 <- new...
null
https://raw.githubusercontent.com/dpiponi/Moodler/a0c984c36abae52668d00f25eb3749e97e8936d3/Moodler/scripts/bass_drum.hs
haskell
do (x0, y0) <- mouse let (x, y) = quantise2 quantum (x0, y0) root <- currentPlane audio_id9 <- new' "audio_id" audio_saw10 <- new' "audio_saw" audio_sin11 <- new' "audio_sin" audio_square12 <- new' "audio_square" audio_triangle13 <- new' "audio_triangle" butterbp14 <- new...
a041ca0904fd24133ff12341d049ab93b69e95b4038e3b6198999c93f4501e4c
zed-throben/erlangeos
eos_gensvrobj.erl
-module(eos_gensvrobj). -compile(export_all). -include("eos.hrl"). invoke(?eos(eos_gensvrobj,Pid),Method,Params)-> gen_server:call(Pid,{Method,Params}).
null
https://raw.githubusercontent.com/zed-throben/erlangeos/44e50e442f5d396c69ae90db530b0b60b01d692a/src/eos_gensvrobj.erl
erlang
-module(eos_gensvrobj). -compile(export_all). -include("eos.hrl"). invoke(?eos(eos_gensvrobj,Pid),Method,Params)-> gen_server:call(Pid,{Method,Params}).
5640de64cf646a0d42ded19e8768e53982aacf31472cb4d955372f8fd93ce797
Tritlo/PropR
TastyMix.hs
module TastyMix where import Test.Tasty import Test.Tasty.HUnit (testCase, (@?=)) x :: Int x = 2 -- We scan mix and match now prop_bigEnough :: Bool prop_bigEnough = x > 2 test :: TestTree test = testCase "Test 1" (x @?= 3) ---- EXPECTED ---- -- diff --git a/tests/cases/TastyMix.hs b/tests/cases/TastyMix.hs -- ---...
null
https://raw.githubusercontent.com/Tritlo/PropR/2a3654ad07f809fb6021ef4b3805d2032a5c7826/tests/cases/TastyMix.hs
haskell
We scan mix and match now -- EXPECTED ---- diff --git a/tests/cases/TastyMix.hs b/tests/cases/TastyMix.hs --- a/tests/cases/TastyMix.hs +++ b/tests/cases/TastyMix.hs diff --git a/tests/cases/TastyMix.hs b/tests/cases/TastyMix.hs --- a/tests/cases/TastyMix.hs +++ b/tests/cases/TastyMix.hs -- END EXPECTED ----
module TastyMix where import Test.Tasty import Test.Tasty.HUnit (testCase, (@?=)) x :: Int x = 2 prop_bigEnough :: Bool prop_bigEnough = x > 2 test :: TestTree test = testCase "Test 1" (x @?= 3) @@ -7,1 +7,1 @@ x = 2 -x = 2 + x = ( succ ( 2 ) ) @@ -7,1 +7,1 @@ x = 2 -x = 2 + x = 3
0ec438abadeb86c7339c7cc301e5d256432cdee08cb643d7e43ddb37f4a4d440
fossas/fossa-cli
Converter.hs
# LANGUAGE RecordWildCards # module Srclib.Converter ( toSourceUnit, depTypeToFetcher, fetcherToDepType, verConstraintToRevision, ) where import Prelude import Algebra.Graph.AdjacencyMap qualified as AM import App.Fossa.Analyze.Project (ProjectResult (..)) import Control.Applicative ((<|>)) import Data.Set q...
null
https://raw.githubusercontent.com/fossas/fossa-cli/41f1fbb99658e09c0b0b176acc637aad0217b04b/src/Srclib/Converter.hs
haskell
core can't handle subprojects we can't represent this in a locator ugh ugh ugh ugh we can't represent this in a locator
# LANGUAGE RecordWildCards # module Srclib.Converter ( toSourceUnit, depTypeToFetcher, fetcherToDepType, verConstraintToRevision, ) where import Prelude import Algebra.Graph.AdjacencyMap qualified as AM import App.Fossa.Analyze.Project (ProjectResult (..)) import Control.Applicative ((<|>)) import Data.Set q...
a8032a449a1fa9e8034f7899c1e805f20acb797d632bdf2af066f896702318c3
jimcrayne/jhc
tc176.hs
{-# OPTIONS -fglasgow-exts #-} # LANGUAGE OverlappingInstances # With " hugs -98 + o test.hs " gives me : ERROR " test.hs":8 - Can not justify constraints in instance member binding * * * Expression : fromStr * * * Type : [ a ] = > String - > [ a ] * * * Given context : [ a ]...
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/2_pass/ghc/tc176.hs
haskell
# OPTIONS -fglasgow-exts # expected-failure See Note [Subtle interaction of recursion and overlap] in TcInstDcls
# LANGUAGE OverlappingInstances # With " hugs -98 + o test.hs " gives me : ERROR " test.hs":8 - Can not justify constraints in instance member binding * * * Expression : fromStr * * * Type : [ a ] = > String - > [ a ] * * * Given context : [ a ] * * * Constraints : ...
c262791d72b44a30f7ce7258e71eeb6bc48defcd2c4a73b7c8befe73ca06ea05
l-x/deeperl
deeperl.erl
-module(deeperl). -behaviour(gen_server). -type error() :: {error, Reason :: atom(), Info :: term()}. -type nonempty_str_or_binary() :: nonempty_string() | nonempty_binary(). -type language() :: nonempty_string(). -type glossary_id() :: nonempty_string(). -type glossary_name() :: nonempty_str_or_binary(). -type g...
null
https://raw.githubusercontent.com/l-x/deeperl/54f9dcc3deaf67f75c8d4f59be5e89baf6b2a1a2/src/deeperl.erl
erlang
API gen_server callbacks =================================================================== API =================================================================== @doc Set the DeepL authentication key @doc Set the inets httpc profile to be used @doc List all glossaries @doc Get detailed information for a speci...
-module(deeperl). -behaviour(gen_server). -type error() :: {error, Reason :: atom(), Info :: term()}. -type nonempty_str_or_binary() :: nonempty_string() | nonempty_binary(). -type language() :: nonempty_string(). -type glossary_id() :: nonempty_string(). -type glossary_name() :: nonempty_str_or_binary(). -type g...
2ffbbd6808e07e723ad63ac579fa61f46bb423299d2c1e077b3cf8a984dded72
AbstractMachinesLab/caramel
table.mli
* Hashtable with a simple polymorphic type , but without the polymorphic equality . This module re - wraps the hashtable implementation provided by [ . Make ] under a different interface : we just have a single type [ ( ' k , ' v ) t ] , similar to a polymorphic hashtable . This means t...
null
https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/vendor/stdune/table.mli
ocaml
* Hashtable with a simple polymorphic type , but without the polymorphic equality . This module re - wraps the hashtable implementation provided by [ . Make ] under a different interface : we just have a single type [ ( ' k , ' v ) t ] , similar to a polymorphic hashtable . This means t...
7317cd8661b596de16d36bdb53693ef4fa7f80d74f929aef68951d81a81b28cd
bsansouci/bsb-native
generative.ml
(* Using generative functors *) (* Without type *) module type S = sig val x : int end;; let v = (module struct let x = 3 end : S);; module F() = (val v);; (* ok *) module G (X : sig end) : S = F ();; (* ok *) module H (X : sig end) = (val v);; (* ok *) (* With type *) module type S = sig type t val x : t end;; let v...
null
https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/testsuite/tests/typing-modules/generative.ml
ocaml
Using generative functors Without type ok ok ok With type ok fail ok ok fail Cannot coerce between applicative and generative fail fail tests for shortened functor notation ()
module type S = sig val x : int end;; let v = (module struct let x = 3 end : S);; module type S = sig type t val x : t end;; let v = (module struct type t = int let x = 3 end : S);; module U = struct end;; module F1 (X : sig end) = struct end;; module F3 () = struct end;; module X (X: sig end) (Y: sig end) = fu...
f44421bbca6991ccafddfdb0496c29bd4427405c7c70750df1e60957065da660
input-output-hk/smash
Delete.hs
# LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # module Cardano.SMASH.DBSync.Db.Delete ( deleteDelistedPool , deleteRetiredPool , deleteAdminUser , deleteCascadeSlotNo ) where import Cardano.Prelude hiding (Meta) import Database.Persist.Sql (SqlBacke...
null
https://raw.githubusercontent.com/input-output-hk/smash/a089c53f7477eb2c301e60cb546d6181262ec966/smash/src/Cardano/SMASH/DBSync/Db/Delete.hs
haskell
| Delete a delisted pool if it exists. Returns 'True' if it did exist and has been deleted and 'False' if it did not exist. | Delete a retired pool if it exists. Returns 'True' if it did exist and has been deleted and 'False' if it did not exist.
# LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # module Cardano.SMASH.DBSync.Db.Delete ( deleteDelistedPool , deleteRetiredPool , deleteAdminUser , deleteCascadeSlotNo ) where import Cardano.Prelude hiding (Meta) import Database.Persist.Sql (SqlBacke...
f72b3943148721b69dfd1d55c7022e159af6c6534f4d61c3c97363ce791129ab
BinaryAnalysisPlatform/bap
dwarf_data.ml
open Core_kernel[@@warning "-D"] open Bap.Std open Dwarf_types module Buffer = struct type 'a t = { data : 'a; pos : int; } [@@deriving sexp, bin_io, compare, fields] let with_pos t pos = { t with pos } let with_off t off = { t with pos = t.pos + off} let create ?(pos=0) data = { data; pos } end ...
null
https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_dwarf/dwarf_data.ml
ocaml
open Core_kernel[@@warning "-D"] open Bap.Std open Dwarf_types module Buffer = struct type 'a t = { data : 'a; pos : int; } [@@deriving sexp, bin_io, compare, fields] let with_pos t pos = { t with pos } let with_off t off = { t with pos = t.pos + off} let create ?(pos=0) data = { data; pos } end ...
cce81d4c11cf570eeeb6602ffda5546c019469732fe9973d960241f0527096a6
icicle-lang/icicle-ambiata
Value.hs
-- | Values that are common across all languages {-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveGeneric # # LANGUAGE NoImplicitPrelude # module Icicle.Common.Value ( Heap , Value (..) , getBaseValue ) where import Icicle.Common.Base import Icicle.Common.NanEq import ...
null
https://raw.githubusercontent.com/icicle-lang/icicle-ambiata/9b9cc45a75f66603007e4db7e5f3ba908cae2df2/icicle-data/src/Icicle/Common/Value.hs
haskell
| Values that are common across all languages # LANGUAGE DeriveAnyClass # | A heap is just a mapping from names to values. | A top-level value can be a function/closure or a base value | A function carries its own heap, the name of its argument, and the expression to apply. Actually - we might want the type of the...
# LANGUAGE DeriveGeneric # # LANGUAGE NoImplicitPrelude # module Icicle.Common.Value ( Heap , Value (..) , getBaseValue ) where import Icicle.Common.Base import Icicle.Common.NanEq import Icicle.Common.Exp.Exp import Icicle.Internal.Pretty impo...
7f51d579025862d0f58e57dd3af2626ffce3c33fcae463365820422151914d1b
patricoferris/ocaml-multicore-monorepo
test_branch.ml
let exit_success = 0 let exit_failure = 1 First computation wants to count operations needed by - one_if_not_zero - zero_if_not_zero - select_int For each /assembly instructions/ , we update a counter . This way is not totally true . Even if we check by hands that bitwise operations do n't ...
null
https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/eqaf/test/test_branch.ml
ocaml
let exit_success = 0 let exit_failure = 1 First computation wants to count operations needed by - one_if_not_zero - zero_if_not_zero - select_int For each /assembly instructions/ , we update a counter . This way is not totally true . Even if we check by hands that bitwise operations do n't ...
344246c0a1bab5f12fb3cfc6e504758fc4bbea33330a1ba61e7a52a0f9c405a8
biocom-uib/vpf-tools
Hash.hs
module VPF.Util.Hash ( hashFile , hashFileSHA512t_256 , digestToHex ) where import Control.Monad (when) import Data.Function (fix) import qualified Data.ByteString as BS import Data.ByteArray.Encoding as Enc import Crypto.Hash as Crypto import Crypto.Hash.IO as Crypto import System.IO hashFile :: forall...
null
https://raw.githubusercontent.com/biocom-uib/vpf-tools/dd88a543f28eb339cf0dcb89f34479c84b3a8056/src/VPF/Util/Hash.hs
haskell
module VPF.Util.Hash ( hashFile , hashFileSHA512t_256 , digestToHex ) where import Control.Monad (when) import Data.Function (fix) import qualified Data.ByteString as BS import Data.ByteArray.Encoding as Enc import Crypto.Hash as Crypto import Crypto.Hash.IO as Crypto import System.IO hashFile :: forall...
ce13015d2beca83bf4e4e129dfb549181e8cac0bcb57918d550563d57782062b
mtgred/netrunner
identities.clj
(ns game.core.identities (:require [game.core.card :refer [active?]] [game.core.card-defs :refer [card-def]] [game.core.effects :refer [register-constant-effects unregister-constant-effects]] [game.core.eid :refer [make-eid]] [game.core.engine :refer [register-default-events resolve-ability unregi...
null
https://raw.githubusercontent.com/mtgred/netrunner/c6b8d71f1ca4bd9ed7f6156398e93387d6d04f0d/src/clj/game/core/identities.clj
clojure
(ns game.core.identities (:require [game.core.card :refer [active?]] [game.core.card-defs :refer [card-def]] [game.core.effects :refer [register-constant-effects unregister-constant-effects]] [game.core.eid :refer [make-eid]] [game.core.engine :refer [register-default-events resolve-ability unregi...
32fc032c58347e5528f3c2bbad26a1310e89a337a58b3f92cf55a852f508536a
cedlemo/OCaml-GLib2
Sequence.ml
* Copyright 2020 , * This file is part of . * * OCaml - GLib2 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 * any later version . * * ...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GLib2/084a148faa4f18d0ddf78315d57c1d623aa9522c/lib/Sequence.ml
ocaml
* Copyright 2020 , * This file is part of . * * OCaml - GLib2 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 * any later version . * * ...
8ef28cf2706f14aa13fe21f88b08958d530146fb7d953ea992990822b6bfe237
rsnikhil/Forvis_RISCV-ISA-Spec
Main_Run_Program.hs
Copyright ( c ) 2018 -- See LICENSE for license details module Main_Run_Program where -- ================================================================ -- This is the 'main' function for the use-case where we simply -- want to load an ELF file and run it sequentially to completion: -- - Reads a list of filen...
null
https://raw.githubusercontent.com/rsnikhil/Forvis_RISCV-ISA-Spec/0c5590a12f4b39644d0497fa6285ad5e33003dfc/ZZ_OLD/v3/Main_Run_Program.hs
haskell
See LICENSE for license details ================================================================ This is the 'main' function for the use-case where we simply want to load an ELF file and run it sequentially to completion: - Reads a list of filenames on the command-line (RISC-V ELF executable files, or h...
Copyright ( c ) 2018 module Main_Run_Program where Standard Haskell imports import System.IO import System.Environment getOpt , usageInfo , OptDescr import System.Exit import Control.Monad import Data.Int import Data.List import Data.Bits import Data.Char (toLower, ord) import Numeric (showHex, readHex, r...
b085610647a14421aaa5b13c314263d4d75b2c01d303c4dfd944932a7d84a1e1
3b/3bil
3b-swf-write.lisp
(in-package :avm2-compiler) porting writer - hack to 3b - swf ;; fixme: should probably switch to using the same data structures in both assembler and 3b - swf if this end up being the primary ;; writer... ;; or at least add direct writer methods for asm stuff... ;;~ assemble-function ;;~ assemble-class ;;~ new...
null
https://raw.githubusercontent.com/3b/3bil/c852181848bedf476373e901869ca29471f926ee/file/3b-swf-write.lisp
lisp
fixme: should probably switch to using the same data structures in writer... or at least add direct writer methods for asm stuff... ~ assemble-function ~ assemble-class ~ new-class+scopes storing namespace_info as (kind name_index) for now namespace-set (ns_set_info) = (ns1 ns2 ... nsN) ugly, but don't want to dup...
(in-package :avm2-compiler) porting writer - hack to 3b - swf both assembler and 3b - swf if this end up being the primary (defun translate-namespace (ns) (make-instance '%swf:abc-namespace '%swf:kind (first ns) '%swf:name (second ns))) (defun translate-ns-set (ns) (make-i...