_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
7c029f254848614c7daa43ee08e840c9f8b4e95dfb233628778dc3a36299d802
ekmett/reactor
Observer.hs
{-# LANGUAGE DeriveDataTypeable #-} module Reactor.Observer ( Observer(..) , (?!) ) where import Prelude hiding (filter) import Control.Monad import Control.Exception hiding (handle) import Control.Monad.Error import Data.Monoid import Data.Functor.Contravariant import Data.Data import Reactor.Filtered import Re...
null
https://raw.githubusercontent.com/ekmett/reactor/c071e639eb6070e6923cfc131d640161fdf6a1a9/Reactor/Observer.hs
haskell
# LANGUAGE DeriveDataTypeable #
module Reactor.Observer ( Observer(..) , (?!) ) where import Prelude hiding (filter) import Control.Monad import Control.Exception hiding (handle) import Control.Monad.Error import Data.Monoid import Data.Functor.Contravariant import Data.Data import Reactor.Filtered import Reactor.Task data Observer a = Observ...
50bb2cf3efa232b472384fb301da8ab829ef7e5b6707f667189e1394e91925c4
JAremko/spacetools
fetch_test.clj
(ns spacetools.contributors.fetch-test (:require [cats.monad.exception :as exc :refer [failure? success?]] [clojure.test :refer :all] [orchestra.spec.test :as st] [org.httpkit.fake :refer :all] [spacetools.contributors.fetch :as f])) (st/instrument) (deftest *first-...
null
https://raw.githubusercontent.com/JAremko/spacetools/d047e99689918b5a4ad483022f35802b2015af5f/components/contributors/test/spacetools/contributors/fetch_test.clj
clojure
(ns spacetools.contributors.fetch-test (:require [cats.monad.exception :as exc :refer [failure? success?]] [clojure.test :refer :all] [orchestra.spec.test :as st] [org.httpkit.fake :refer :all] [spacetools.contributors.fetch :as f])) (st/instrument) (deftest *first-...
917778434856511b89e5e1214ba938a59a9ec1bce208e4981ab75b2dcc8c9da0
xoken/xoken-node
Chain.hs
{-# LANGUAGE ConstraintKinds #-} # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MonoLocalBinds # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE...
null
https://raw.githubusercontent.com/xoken/xoken-node/99124fbe1b1cb9c2fc442c788c7c2bac06f5e900/node/src/Network/Xoken/Node/Service/Chain.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE OverloadedStrings # # LANGUAGE BangPatterns #
# LANGUAGE DeriveGeneric # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MonoLocalBinds # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TupleSections # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # module Network.Xoken.Node.Service.Chain where import Arivi.P2P.MessageHandler....
09dc1f4e733d23c82bff54a6f677783ddef48b05b7a3158d95cfffb2d226b0bd
jserot/lascar
fsm_action.mli
(**********************************************************************) (* *) LASCAr (* *) Copyright ( c ) 2017 - prese...
null
https://raw.githubusercontent.com/jserot/lascar/79bd11cd0d47545bccfc3a3571f37af065915c83/src/lib/fsm_action.mli
ocaml
******************************************************************** This source code is licensed under the lic...
LASCAr Copyright ( c ) 2017 - present , . All rights reserved . * { 2 Actions for FSM transitions } module type T = sig module Expr : Fsm_expr.T type t = [@@deriving show {with_path=false}] val to_string: t -> string val of_string:...
81bb74ab4d4f21fb96dbb47d082bb2b7f2b1d6e2eb7da91c13756fd0d2e4dda4
clj-easy/graalvm-clojure
main.clj
(ns simple.main (:require [cheshire.core :as json]) (:gen-class)) (defn -main [] (prn (json/generate-string {:foo "bar" :baz 5})) (prn (json/parse-string "{\"foo\":\"bar\"}")))
null
https://raw.githubusercontent.com/clj-easy/graalvm-clojure/5de155ad4f95d5dac97aac1ab3d118400e7d186f/cheshire/src/simple/main.clj
clojure
(ns simple.main (:require [cheshire.core :as json]) (:gen-class)) (defn -main [] (prn (json/generate-string {:foo "bar" :baz 5})) (prn (json/parse-string "{\"foo\":\"bar\"}")))
e26d61344a3486d9480931133e5b31cc624b516eef19d3e667136d4a084a9461
darrenldl/ProVerif-ATP
rules.mli
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
null
https://raw.githubusercontent.com/darrenldl/ProVerif-ATP/7af6cfb9e0550ecdb072c471e15b8f22b07408bd/proverif2.00/src/rules.mli
ocaml
[reorder hyp] reorders the elements of the hypothesis [hyp] to speed up the subsumption test. [sound_bad_derivable clauses] returns the set of clauses that derive bad from the initial clauses [clauses]. It is sound, that is, if it returns a clause, then bad is derivable from this clause. It restores t...
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
68d113bfff78c2748afe413a48a994b918b618a907bb6df4168bcc09d3baa1c1
juspay/atlas
DriverTrackingHealthcheckMain.hs
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
null
https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/atlas-transport/server/DriverTrackingHealthcheckMain.hs
haskell
| Copyright 2022 Juspay Technologies Pvt Ltd Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not use this file except in compliance with the License . You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing , software dis...
f6b081873664db15519671a6b743ac8f954ea39ed07569a8b4abc554aa2e39e8
ds-wizard/engine-backend
LocaleMigration.hs
module Registry.Database.Migration.Development.Locale.LocaleMigration where import Registry.Model.Context.AppContext import Registry.Model.Context.ContextLenses () import Registry.S3.Locale.LocaleS3 import Registry.Util.Logger import Shared.Database.DAO.Locale.LocaleDAO import Shared.Database.Migration.Development.Loc...
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/0ec94a4b0545f2de8a4e59686a4376023719d5e7/engine-registry/src/Registry/Database/Migration/Development/Locale/LocaleMigration.hs
haskell
module Registry.Database.Migration.Development.Locale.LocaleMigration where import Registry.Model.Context.AppContext import Registry.Model.Context.ContextLenses () import Registry.S3.Locale.LocaleS3 import Registry.Util.Logger import Shared.Database.DAO.Locale.LocaleDAO import Shared.Database.Migration.Development.Loc...
d841b5ea9cb35de31a6f6c613b1c4a18bbde9de93d30ab5cd2a0e6a8f4a0f84a
emina/rosette
reporter.rkt
#lang racket (require rosette/base/core/reporter "data.rkt") (provide (struct-out profiler-reporter) make-profiler-reporter get-current-metrics/call get-call-time get-sample-event metrics-ref diff-metrics metrics->hash) ; The profiler reporter keeps a cumulative count of several metrics, ; ...
null
https://raw.githubusercontent.com/emina/rosette/a64e2bccfe5876c5daaf4a17c5a28a49e2fbd501/rosette/lib/profile/reporter.rkt
racket
The profiler reporter keeps a cumulative count of several metrics, as an association list, and reports them when requested to insert into a profile node. (Performance note: an association list is slightly faster than a hash table shortcut to get time from a get-current-metrics/call instance; make sure to update i...
#lang racket (require rosette/base/core/reporter "data.rkt") (provide (struct-out profiler-reporter) make-profiler-reporter get-current-metrics/call get-call-time get-sample-event metrics-ref diff-metrics metrics->hash) for workloads that clone the current metrics state a lot , such as Me...
ca2958b489e841d388cea1e1ab95561e6c36aa63de36fafceace527d1d5466c1
processone/xmpp
xep0260.erl
Created automatically by XML generator ( fxml_gen.erl ) %% Source: xmpp_codec.spec -module(xep0260). -compile(export_all). do_decode(<<"transport">>, <<"urn:xmpp:jingle:transports:s5b:1">>, El, Opts) -> decode_jingle_s5b_transport(<<"urn:xmpp:jingle:transports:s5b:1">>, ...
null
https://raw.githubusercontent.com/processone/xmpp/88c43c3cf5843a8a0f76eac390980a3a39c972dd/src/xep0260.erl
erlang
Source: xmpp_codec.spec
Created automatically by XML generator ( fxml_gen.erl ) -module(xep0260). -compile(export_all). do_decode(<<"transport">>, <<"urn:xmpp:jingle:transports:s5b:1">>, El, Opts) -> decode_jingle_s5b_transport(<<"urn:xmpp:jingle:transports:s5b:1">>, Opts, ...
da7a4d2ac15207580aba91d90a280519f66f3149992af10ea053bee349ca5929
mcgizzle/haxchange
Api.hs
{-# LANGUAGE OverloadedStrings #-} module <newmodule>.Api where import Types ( Api , Ticker(..) , Currency(..) , Currency'(..) , Markets(..) , Balance(..) , Order(..)) import qualified Types as T import <newmodule>.Types import <newmodule>...
null
https://raw.githubusercontent.com/mcgizzle/haxchange/620a4c93ae28abdd637b7c1fd8b018628b3bd0e9/templates/Api.hs
haskell
# LANGUAGE OverloadedStrings #
module <newmodule>.Api where import Types ( Api , Ticker(..) , Currency(..) , Currency'(..) , Markets(..) , Balance(..) , Order(..)) import qualified Types as T import <newmodule>.Types import <newmodule>.Internal defaultOpts = Opts mempt...
97b8a74c3297dddbb9715e0eab49b2603df699ebf2a64c44518bcc532b3d4155
clojure-interop/java-jdk
core.clj
(ns javax.xml.stream.events.core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[javax.xml.stream.events.Attribute]) (require '[javax.xml.stream.events.Characters]) (require '[javax.xml.stream.events.Comment]) (require '[javax.xml.stream.events.DTD]) (require '[javax.xml.stream.events.EndDo...
null
https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.xml/src/javax/xml/stream/events/core.clj
clojure
(ns javax.xml.stream.events.core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[javax.xml.stream.events.Attribute]) (require '[javax.xml.stream.events.Characters]) (require '[javax.xml.stream.events.Comment]) (require '[javax.xml.stream.events.DTD]) (require '[javax.xml.stream.events.EndDo...
5aa89ae0a8d8750c03abf245d0cf4cbe25460e0ffc59b04ec38e4ad7b714a361
schell/gelatin
Shader.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TemplateHaskell #-} # LANGUAGE TypeFamilies # {-# LANGUAGE TypeOper...
null
https://raw.githubusercontent.com/schell/gelatin/04c1c83d4297eac4f4cc5e8e5c805b1600b3ee98/gelatin-gl/src/Gelatin/GL/Shader.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE TypeOperators # # LANGUAGE TypeSynonymInstances # # OPTIONS_GHC -fprint-explicit-kinds # * Compiling and loading shaders --------------------------------------...
# LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE OverloadedStrings # # LANGUAGE TypeFamilies # # OPTIONS_GHC -fno - warn - orphans # module Gelatin.GL.Shader ( Simple2DShader , compileOGLShader , compileOGLProgram , loadSourcePaths , compileSources , c...
e31fdc6b4dfe687578f50dd7f3093c963bfec9e1cd456d105a1846e0366e3cc3
arichiardi/replumb
runner.cljs
(ns launcher.runner (:require [doo.runner :as doo :refer-macros [doo-tests]] replumb.core-test replumb.repl-test replumb.common-test replumb.load-test replumb.options-test replumb.macro-test TODO browser test TODO browser test TODO port it ...
null
https://raw.githubusercontent.com/arichiardi/replumb/dde2228f2e364c3bafdf6585bb1bc1c27a3e336c/test/browser/launcher/runner.cljs
clojure
Or doo will exit with an error, see: #issuecomment-165498172
(ns launcher.runner (:require [doo.runner :as doo :refer-macros [doo-tests]] replumb.core-test replumb.repl-test replumb.common-test replumb.load-test replumb.options-test replumb.macro-test TODO browser test TODO browser test TODO port it ...
d310d010802cd9328fc4c1351376d09f9944b5d117f0207e512601bb31a8a3aa
ankushdas/Nomos
typecheck.ml
module P = Print type context = (string * Ast.ocamlTP) list exception TypeError of string let format_err (e : Ast.ocamlTP Ast.aug_expr) = let a : string = P.print_ast(e.structure) in let b : string = P.print_type(e.data) in Printf.sprintf "expression %s did not have type %s" a b let rec ge...
null
https://raw.githubusercontent.com/ankushdas/Nomos/db678f3981e75a1b3310bb55f66009bb23430cb1/redundant/functional/typecheck.ml
ocaml
Should add check for duplicate variables
module P = Print type context = (string * Ast.ocamlTP) list exception TypeError of string let format_err (e : Ast.ocamlTP Ast.aug_expr) = let a : string = P.print_ast(e.structure) in let b : string = P.print_type(e.data) in Printf.sprintf "expression %s did not have type %s" a b let rec ge...
cce526a1d88eac768ff408c7caadf3c24e788cbdbefe56d0ed741a84ea312cb1
tisnik/clojure-examples
core_test.clj
; ( C ) Copyright 2018 , 2020 ; ; All rights reserved. This program and the accompanying materials ; are made available under the terms of the Eclipse Public License v1.0 ; which accompanies this distribution, and is available at -v10.html ; ; Contributors: ; (ns cucumber+expect2.core-test (:r...
null
https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/cucumber%2Bexpect2/test/cucumber%2Bexpect2/core_test.clj
clojure
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at Contributors:
( C ) Copyright 2018 , 2020 -v10.html (ns cucumber+expect2.core-test (:require [clojure.test :refer :all] [cucumber+expect2.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
013f968cc7e30375931f53d535e42297b4b33e35b07925ad8755ec03496f5674
zenspider/schemers
exercise.2.13.scm
#lang racket/base Exercise 2.13 : ;; Show that under the assumption of small percentage tolerances there ;; is a simple formula for the approximate percentage tolerance of the product of two intervals in terms of the tolerances of the factors . ;; You may simplify the problem by assuming that all numbers are ;; p...
null
https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_2/exercise.2.13.scm
scheme
Show that under the assumption of small percentage tolerances there is a simple formula for the approximate percentage tolerance of the You may simplify the problem by assuming that all numbers are positive. no
#lang racket/base Exercise 2.13 : product of two intervals in terms of the tolerances of the factors .
4a70ccb8a85d596a24aa468aa5de57de2e47a511090a0d6ecc7e4fdb05350aa6
mattboehm/dottask
project.clj
(defproject dottask "0.1.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.170"] [binaryage/devtools "0.5.2"] [funcool/tubax "0.2.0"] [historian "1.1.1"] [reagent "0.5.1"] [sabl...
null
https://raw.githubusercontent.com/mattboehm/dottask/0e481424a6a1f2fa60620af99e73e2efe218ca88/project.clj
clojure
(defproject dottask "0.1.0-SNAPSHOT" :dependencies [[org.clojure/clojure "1.7.0"] [org.clojure/clojurescript "1.7.170"] [binaryage/devtools "0.5.2"] [funcool/tubax "0.2.0"] [historian "1.1.1"] [reagent "0.5.1"] [sabl...
e6547c36664b1f3d309485ddbcedfbcc354b605029189a63909a73f7c2028b3e
Helium4Haskell/helium
ClassInstaneError16.hs
class X a where f :: a -> Int instance Y a => X (Maybe a) where f _ = 3
null
https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeClasses/ClassInstaneError16.hs
haskell
class X a where f :: a -> Int instance Y a => X (Maybe a) where f _ = 3
fb7ddb3df90b157944198b525772d4048ad3b6f7216b07bf80a89dac793ddbea
ocaml-multicore/tezos
script_cache.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs < > (* ...
null
https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/tezt/long_tests/script_cache.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2021 Nomadic Labs < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETHER IN AN...
53f911f05be8ddcd2928fd44baf1ccfe456f0bb24f177ffb75e6055c5e72e926
jwiegley/notes
Folds.hs
foldr' :: (b -> a -> a) -> a -> [b] -> a foldr' c n xs = run (fold xs c n) data Fold a b = forall x. Fold (x -> a -> x) x (x -> b) instance Functor (Fold a) where fmap f (Fold step begin done) = Fold step begin (f . done) instance Applicative (Fold a) where pure b = Fold (\() _ -> ()) () (\() -> b) (F...
null
https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/haskell/Folds.hs
haskell
foldr' :: (b -> a -> a) -> a -> [b] -> a foldr' c n xs = run (fold xs c n) data Fold a b = forall x. Fold (x -> a -> x) x (x -> b) instance Functor (Fold a) where fmap f (Fold step begin done) = Fold step begin (f . done) instance Applicative (Fold a) where pure b = Fold (\() _ -> ()) () (\() -> b) (F...
8b4e8b44d7e4f7aaeea86742903b7ba80e9ea3e20cf5f8810c2232c47a6a388b
spacegangster/space-ui
video.cljc
(ns space-ui.video) (defn face [{:media/keys [alt title lazy? eager? loop? srcset src sources sizes css-class]}] ; -tricks.com/a-native-lazy-load-for-the-web-platform/ (let [loading (cond lazy? "lazy" eager? "eager" :else "auto")] (cond src [:video {:title title :class css-class ...
null
https://raw.githubusercontent.com/spacegangster/space-ui/74825c904b6b456d845c3b3d669ce795b33f5ba9/src/space_ui/video.cljc
clojure
-tricks.com/a-native-lazy-load-for-the-web-platform/ :controls true}
(ns space-ui.video) (defn face [{:media/keys [alt title lazy? eager? loop? srcset src sources sizes css-class]}] (let [loading (cond lazy? "lazy" eager? "eager" :else "auto")] (cond src [:video {:title title :class css-class :loop loop? :playsinline tru...
59fd3985142544c85dcb2e578207d37ca3d1f58738b535c9782d3f0e4e4bff14
laurencer/confluence-sync
PipeliningSnippet.hs
-- -- HTTP client for use with io-streams -- Copyright © 2012 - 2014 Operational Dynamics Consulting , Pty Ltd -- -- The code in this file, and the program it is a part of, is made -- available to you by its authors as open source software: you can redistribute it and/or modify it under a BSD licence . -- {-# LANG...
null
https://raw.githubusercontent.com/laurencer/confluence-sync/442fdbc84fe07471f323af80d2d4580026f8d9e8/vendor/http-streams/tests/PipeliningSnippet.hs
haskell
HTTP client for use with io-streams The code in this file, and the program it is a part of, is made available to you by its authors as open source software: you can # LANGUAGE OverloadedStrings # # OPTIONS -fno-warn-unused-imports # Otherwise redundent imports, but useful for testing in GHCi.
Copyright © 2012 - 2014 Operational Dynamics Consulting , Pty Ltd redistribute it and/or modify it under a BSD licence . module Snippet where import Control.Concurrent (threadDelay) import Control.Exception (bracket) import Network.Http.Client import Blaze.ByteString.Builder (Builder) import qualified Blaze.By...
3010588cb439193e25562a34a348c5d9980b88e63b59db8af07154f3f2a4798b
informatimago/commands
script-test.lisp
-*- mode : lisp ; coding : utf-8 -*- (command :use-systems (:cffi)) (cffi:defcvar (environ "environ") :pointer) (defun environment () (loop :for i :from 0 :for s := (print (cffi:mem-aref environ :pointer i)) :until (cffi:null-pointer-p s) :collect (cffi:foreign-string-to-lisp s))) ;;;;----------...
null
https://raw.githubusercontent.com/informatimago/commands/65d0d6385269f3e210aed4943aefdbb5372706b9/sources/commands/script-test.lisp
lisp
coding : utf-8 -*- -------------------------------------------------------------------- (apropos "*" "UIOP") (print uiop:*COMMAND-LINE-ARGUMENTS*) THE END ;;;;
(command :use-systems (:cffi)) (cffi:defcvar (environ "environ") :pointer) (defun environment () (loop :for i :from 0 :for s := (print (cffi:mem-aref environ :pointer i)) :until (cffi:null-pointer-p s) :collect (cffi:foreign-string-to-lisp s))) (defun main (arguments) (declare (ignore arguments...
fc72b44333e36cb6fbb44f2b3f0828c9d3822d5fd6bb5f43a0fcfe8b8397493f
elastic/eui-cljs
field_text.cljs
(ns eui.field-text (:require ["classnames" :default classNames] [eui.form-control-layout :refer [EuiFormControlLayout]] [eui.validatable-control :refer [EuiValidatableControl]] [reagent.core :as r])) (def custom-props [:id :name :placeholder :value :className :ico...
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/field_text.cljs
clojure
(ns eui.field-text (:require ["classnames" :default classNames] [eui.form-control-layout :refer [EuiFormControlLayout]] [eui.validatable-control :refer [EuiValidatableControl]] [reagent.core :as r])) (def custom-props [:id :name :placeholder :value :className :ico...
064fad8d0557d37093771e9020c6c10eabf7f36178a29f689991120fd61de68e
Palmik/wai-sockjs
EventSource.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE FlexibleContexts # module Network.Sock.Handler.EventSource ( EventSource ) where ------------------------------------------------------------------------------ import Data.Monoid ((<>)) -----------------------------------------------------...
null
https://raw.githubusercontent.com/Palmik/wai-sockjs/d1037cb00450a362b7e593a76d6257d06ecb2405/src/Network/Sock/Handler/EventSource.hs
haskell
# LANGUAGE OverloadedStrings # ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- ----------------------------------------------------------...
# LANGUAGE FlexibleContexts # module Network.Sock.Handler.EventSource ( EventSource ) where import Data.Monoid ((<>)) import qualified Network.HTTP.Types as H (status200) import qualified Network.HTTP.Types.Extra as H import Network.Sock.Types.Handler import ...
090cce3576844e080455d31092c1e7aafd68e298dbe44e2b9a536e0cc6656813
ninjudd/cake
test.clj
(ns cake.tasks.test (:use cake cake.core [cake.file :only [file]] [cake.classloader :only [reload-test-classes with-test-classloader]] [bake.core :only [with-timing]] [bake.find-namespaces :only [find-namespaces-in-dir]] [useful.utils :only [adjoin]] [useful.map :only [...
null
https://raw.githubusercontent.com/ninjudd/cake/3a1627120b74e425ab21aa4d1b263be09e945cfd/src/cake/tasks/test.clj
clojure
this is a hack of clj-stacktrace.repl/pst-on
(ns cake.tasks.test (:use cake cake.core [cake.file :only [file]] [cake.classloader :only [reload-test-classes with-test-classloader]] [bake.core :only [with-timing]] [bake.find-namespaces :only [find-namespaces-in-dir]] [useful.utils :only [adjoin]] [useful.map :only [...
ac532a975e98767a03945b65d733297b0a1f77080acc8030ecfe4cf1b9a63d44
kingcons/advent-of-code
day06.lisp
(mgl-pax:define-package :aoc.2020.06 (:nicknames :2020.06) (:use :cl :aoc.util :mgl-pax) (:import-from :serapeum :~>>)) (in-package :2020.06) (defsummary (:title "Custom Customs") "**Part 1** - Count any yes answers" (parse-group function) "**Part 2** - Count all yes answers" (count-groups function)) (...
null
https://raw.githubusercontent.com/kingcons/advent-of-code/ef8dfb86dda085f5f733c9909aedde476ea498e2/src/2020/day06.lisp
lisp
(mgl-pax:define-package :aoc.2020.06 (:nicknames :2020.06) (:use :cl :aoc.util :mgl-pax) (:import-from :serapeum :~>>)) (in-package :2020.06) (defsummary (:title "Custom Customs") "**Part 1** - Count any yes answers" (parse-group function) "**Part 2** - Count all yes answers" (count-groups function)) (...
348dc7edb09d42c2257229d30c30b263d103a52dad5766c3cce8fc087cc63a58
TrustInSoft/tis-interpreter
exn_flow.ml
Modified by TrustInSoft (**************************************************************************) (* *) This file is part of Frama - C. (* ...
null
https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/kernel_services/analysis/exn_flow.ml
ocaml
************************************************************************ alternatives) ...
Modified by TrustInSoft This file is part of Frama - C. Copyright ( C ) 2007 - 2015 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Softwa...
a63ca0c5c2bd2e043cdd9ae70dbb84d75581fcb45f8ba960fe5e077e40f09e85
synduce/Synduce
from_list_max.ml
let xi_0 x6 = x6 let xi_1 x7 x8 = x8 let rec target = function Leaf(a) -> xi_0 a | Node(a, l, r) -> xi_1 a (target r)
null
https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/extras/solutions/constraints/bst/from_list_max.ml
ocaml
let xi_0 x6 = x6 let xi_1 x7 x8 = x8 let rec target = function Leaf(a) -> xi_0 a | Node(a, l, r) -> xi_1 a (target r)
0e469847a2dbabd37a97542356644ea5a6c68f7dc238747cd2a813621571a51f
generateme/fastmath
s.clj
(ns fastmath.fields.s (:require [fastmath.core :as m] [fastmath.random :as r] [fastmath.vector :as v] [fastmath.fields.utils :as u] [fastmath.complex :as c]) (:import [fastmath.vector Vec2])) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defn s...
null
https://raw.githubusercontent.com/generateme/fastmath/9281fd6fb7668c180e12acb3763ecc7f8c977e40/src/fastmath/fields/s.clj
clojure
TODO: add more
(ns fastmath.fields.s (:require [fastmath.core :as m] [fastmath.random :as r] [fastmath.vector :as v] [fastmath.fields.utils :as u] [fastmath.complex :as c]) (:import [fastmath.vector Vec2])) (set! *unchecked-math* :warn-on-boxed) (m/use-primitive-operators) (defn s...
722b5980fbb5fad5d8505b75ef6c821a6af35ee982a640d6db017d366c0a9e5e
wireapp/wire-server
Conversation.hs
{-# LANGUAGE OverloadedStrings #-} -- This file is part of the Wire Server implementation. -- Copyright ( C ) 2022 Wire Swiss GmbH < > -- -- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundati...
null
https://raw.githubusercontent.com/wireapp/wire-server/7f6a2903f2435736b9a498a853a48c3c5abdfb8d/libs/api-client/src/Network/Wire/Client/API/Conversation.hs
haskell
# LANGUAGE OverloadedStrings # This file is part of the Wire Server implementation. This program is free software: you can redistribute it and/or modify it under later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANT...
Copyright ( C ) 2022 Wire Swiss GmbH < > the terms of the GNU Affero General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any You should have received a copy of the GNU Affero General Public License along module Network.Wire.Client.API....
2f68c1ec458dbe6d5c605a217bd9b667e7123667429b361efcf2cbabddc81492
exercism/haskell
Roman.hs
module Roman (numerals) where numerals :: Int -> Maybe String numerals = Just . go numeralMap where go pairs@((value, digits):pairs') n | n >= value = digits ++ go pairs (n - value) | otherwise = go pairs' n go [] _ = "" numeralMap = [ (1000, "M"), (900, "CM") , (500, "D"), ...
null
https://raw.githubusercontent.com/exercism/haskell/ae17e9fc5ca736a228db6dda5e3f3b057fa6f3d0/exercises/practice/roman-numerals/.meta/examples/success-standard/src/Roman.hs
haskell
module Roman (numerals) where numerals :: Int -> Maybe String numerals = Just . go numeralMap where go pairs@((value, digits):pairs') n | n >= value = digits ++ go pairs (n - value) | otherwise = go pairs' n go [] _ = "" numeralMap = [ (1000, "M"), (900, "CM") , (500, "D"), ...
d0824324f9f52519fb2065c0d182e76c326f59d2910f94aeba4b930bfbc0fed0
sgbj/MaximaSharp
marray.lisp
-*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; The data in this file contains enhancments. ;;;;; ;;; ;;;;; ...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/marray.lisp
lisp
Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ; The data in this file contains enhancments. ;;;;; ;;;;; ; ; ; ; All rights reserved ;;;;; ; ; Note that on...
(in-package :maxima) (macsyma-module array) User array utilities originally due to CFFK . ( 1 ) a symbol whose ARRAY property is a common lisp array ( 2 ) a common lisp array . ( 1 m ) a symbol whose ARRAY mproperty is of type ( 1 ) ( 2 m ) it is of type ( 2 ) ( and then called a ` fast ' array )...
b4ed0436eb8165c9db899c0ba21da3995518cb4f23024cae2198eff2780515d2
jimcrayne/jhc
read016.hs
-- !!! Checking that both import lists and 'hiding' lists might -- !!! be empty. module ShouldCompile where import List () import List hiding () x :: Int x = 1
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/0_parse/2_pass/ghc/read016.hs
haskell
!!! Checking that both import lists and 'hiding' lists might !!! be empty.
module ShouldCompile where import List () import List hiding () x :: Int x = 1
58a152a4236e901419672435fe497507b67e8832741a7a66b13f19bcd3e59bd7
theodormoroianu/SecondYearCourses
examen.hs
import Control.Monad import Data.Maybe type Name = String data Term = Var Name | Con Integer | Term :+: Term | Term :/: Term | Lam Name Term | App Term Term | Out Term deriving Show pgm1 = App (Lam "x" (Var "x" :+: Var "x")) (Out (Con 10) :+: Out (Con 3)) newtype Writer a = Wr...
null
https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/90807f90572912424ac9c7b3a12b47172d7f494c/FLP/ExamenHaskell/SimulareExamen/examen.hs
haskell
import Control.Monad import Data.Maybe type Name = String data Term = Var Name | Con Integer | Term :+: Term | Term :/: Term | Lam Name Term | App Term Term | Out Term deriving Show pgm1 = App (Lam "x" (Var "x" :+: Var "x")) (Out (Con 10) :+: Out (Con 3)) newtype Writer a = Wr...
877599bf94b20b5eb1b9a57e080a2276f67f75ad4373c8dafa58cc1e12d80219
fakedata-haskell/fakedata
VForVendetta.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TemplateHaskell # module Faker.Provider.VForVendetta where import Config import Control.Monad.Catch import Control.Monad.IO.Class import Data.Map.Strict (Map) import Data.Monoid ((<>)) import Data.Text (Text) import Data.Vector (Vector) import Data.Yaml import Faker impor...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/src/Faker/Provider/VForVendetta.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.Provider.VForVendetta where import Config import Control.Monad.Catch import Control.Monad.IO.Class import Data.Map.Strict (Map) import Data.Monoid ((<>)) import Data.Text (Text) import Data.Vector (Vector) import Data.Yaml import Faker import Faker.Internal import Faker.Provi...
a8a8afaf7162b3392417c5ae34e8df1542272aaac5a89f160f4b7e109daef45c
dharmatech/psilab
urman-tutorial-paint.sps
(import (rnrs) (ypsilon cairo) (psilab cairo with-cairo)) (let ((surface (cairo_image_surface_create CAIRO_FORMAT_ARGB32 120 120))) (let ((cr (cairo_create surface))) (with-cairo cr (scale 120 120) (set_source_rgb 0 0 0) (paint_with_alpha 0.5) (destroy))) (cairo_...
null
https://raw.githubusercontent.com/dharmatech/psilab/16b60e4ae63e3405d74117a50cd9ea313c179b33/cairo/examples/urman-tutorial-paint.sps
scheme
(import (rnrs) (ypsilon cairo) (psilab cairo with-cairo)) (let ((surface (cairo_image_surface_create CAIRO_FORMAT_ARGB32 120 120))) (let ((cr (cairo_create surface))) (with-cairo cr (scale 120 120) (set_source_rgb 0 0 0) (paint_with_alpha 0.5) (destroy))) (cairo_...
44689e2554c19273e9cf4be435d3e4fa5405cba27b53c0cc271a3e4d209eb7db
aionescu/dynasty
Parser.hs
module Language.Dynasty.Parser(parse, varOpChars) where import Control.Monad.Combinators.Expr(Operator(..), makeExprParser) import Data.Bifunctor(first) import Data.Foldable(foldl') import Data.Function(on, (&)) import Data.Functor((<&>), ($>)) import Data.List(foldl1') import Data.Text(Text) import Data.Text qualifie...
null
https://raw.githubusercontent.com/aionescu/dynasty/aac0e7ae563e4c8ae7aede69498193e694efcf96/src/Language/Dynasty/Parser.hs
haskell
module Language.Dynasty.Parser(parse, varOpChars) where import Control.Monad.Combinators.Expr(Operator(..), makeExprParser) import Data.Bifunctor(first) import Data.Foldable(foldl') import Data.Function(on, (&)) import Data.Functor((<&>), ($>)) import Data.List(foldl1') import Data.Text(Text) import Data.Text qualifie...
4a63e32e5d27004f921aa771f45ae3b173e4012d11c14d4ac1a460316e15cbd0
kappamodeler/kappa
fragments.ml
(** Implementation of fragments for ODE *) open Tools open Config_complx open Data_structures open Annotated_contact_map open Views open Pb_sig open Rooted_path open Fragments_sig open Error_handler open Ode_print (** Set this boolean to true to dump more debugging information *) let trace = false let debug = f...
null
https://raw.githubusercontent.com/kappamodeler/kappa/de63d1857898b1fc3b7f112f1027768b851ce14d/complx_rep/ODE/fragments.ml
ocaml
* Implementation of fragments for ODE * Set this boolean to true to dump more debugging information * definition of the empty fragment for the new type definition * Pretty-print function for new fragment type * optional pretty print function for new fragment, it only pretty print when the compilation has been made ...
open Tools open Config_complx open Data_structures open Annotated_contact_map open Views open Pb_sig open Rooted_path open Fragments_sig open Error_handler open Ode_print let trace = false let debug = false let cannonical_debug = false let merge_debug = false let map_debug = false let complete_debug = false let...
4d0fd39a23b95123dcca14d99b17faafc0c31c6433345fa0cce34817bf0bbe71
LeventErkok/sbv
AOC_2021_24.hs
----------------------------------------------------------------------------- -- | -- Module : Documentation.SBV.Examples.Puzzles.AOC_2021_24 Copyright : ( c ) -- License : BSD3 -- Maintainer: -- Stability : experimental -- A solution to the advent - of - code problem , 2021 , day 24 : < > . -- -- Here is ...
null
https://raw.githubusercontent.com/LeventErkok/sbv/9cd3662cb6ae31a95b99570f91ae4639807dc1ab/Documentation/SBV/Examples/Puzzles/AOC_2021_24.hs
haskell
--------------------------------------------------------------------------- | Module : Documentation.SBV.Examples.Puzzles.AOC_2021_24 License : BSD3 Maintainer: Stability : experimental Here is a high-level summary: We are essentially modeling the ALU of a fictional You are given a program (hilariously c...
Copyright : ( c ) A solution to the advent - of - code problem , 2021 , day 24 : < > . computer with 4 integer registers ( w , x , y , z ) , and 6 instructions ( inp , add , , div , mod , eql ) . register z ends up with the value 1 . Please refer to the above link for the full description . While there ar...
085268034601b53b6f3f7f584b462cb25666ddca62526c53dfc834b1cd6b6a97
MLanguage/mlang
parse_utils.mli
Copyright ( C ) 2019 - 2021 Inria , contributor : < > This program is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later ...
null
https://raw.githubusercontent.com/MLanguage/mlang/a8749761a48b47e28ecc4a0390b3873615d2a9b5/src/mlang/m_frontend/parse_utils.mli
ocaml
* Helpers for parsing * {1 Frontend variable names} * A parsed variable can be a regular variable or an integer literal * Checks whether the variable contains parameters * Checks whether the string is entirely capitalized * Removes the quotes * Table index can be integer or [X], the generic table index variable *...
Copyright ( C ) 2019 - 2021 Inria , contributor : < > This program is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later ...
058ae1d829cde9d96e38731783ef0d33c0842b8e67d7131e2dd3c0e172b6a12e
finnishtransportagency/harja
vkm_komponentti.clj
(ns harja.palvelin.integraatiot.vkm.vkm-komponentti (:require [com.stuartsierra.component :as component] [hiccup.core :refer [html]] [taoensso.timbre :as log] [harja.palvelin.integraatiot.integraatiotapahtuma :as integraatiotapahtuma] [harja.palvelin.integraatiot.api.ty...
null
https://raw.githubusercontent.com/finnishtransportagency/harja/aa5c64044e47d65c85ca2fdb18f08a61f21a3548/src/clj/harja/palvelin/integraatiot/vkm/vkm_komponentti.clj
clojure
(ns harja.palvelin.integraatiot.vkm.vkm-komponentti (:require [com.stuartsierra.component :as component] [hiccup.core :refer [html]] [taoensso.timbre :as log] [harja.palvelin.integraatiot.integraatiotapahtuma :as integraatiotapahtuma] [harja.palvelin.integraatiot.api.ty...
696c8299952177c8402e7c6e7cf9a1180c35d3922483132a0891d4ff42f34d05
ayato-p/kuuga
project.clj
(defproject example "0.1.0-SNAPSHOT" :description "FIXME: write description" :dependencies [[ayato_p/kuuga "0.1.0-SNAPSHOT"] [hiccup "2.0.0-alpha1"] [org.clojure/clojure "1.8.0"] [ring "1.6.2"]] :main ^:skip-aot example.core :target-path "target/%s" :profiles...
null
https://raw.githubusercontent.com/ayato-p/kuuga/37035f30a0a17251109f88bad6cf14e060687ed7/examples/bootstrap/project.clj
clojure
(defproject example "0.1.0-SNAPSHOT" :description "FIXME: write description" :dependencies [[ayato_p/kuuga "0.1.0-SNAPSHOT"] [hiccup "2.0.0-alpha1"] [org.clojure/clojure "1.8.0"] [ring "1.6.2"]] :main ^:skip-aot example.core :target-path "target/%s" :profiles...
e1e6dadd11d482566313cf801a25f8e2d9648b34c1b199cf8119a0fb466374dd
wdebeaum/step
wide.lisp
;;;; W::WIDE ;;;; (define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL :words ( (W::WIDE (wordfeats (W::MORPH (:FORMS (-ER)))) (SENSES ((meta-data :origin calo :entry-date 20031222 :change-date 20090731 :wn ("wide%3:00:00") :comments html-purchasing-cfellorpus) (EXAMPLE "a wide road") (LF-PARENT...
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/wide.lisp
lisp
)
W::WIDE (define-words :pos W::adj :templ CENTRAL-ADJ-TEMPL :words ( (W::WIDE (wordfeats (W::MORPH (:FORMS (-ER)))) (SENSES ((meta-data :origin calo :entry-date 20031222 :change-date 20090731 :wn ("wide%3:00:00") :comments html-purchasing-cfellorpus) (EXAMPLE "a wide road") (LF-PARENT ONT::BROA...
aec4099a7284623cf73a73824d25fbdbb71136756d928d6e8b53856add7051ee
emilaxelsson/ag-graph
Variables.hs
# LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # -- | A generic interface to constructs that bind or represent variables module Variables ( IsVar (..) , HasVars (..) , EqConstr (..) , alphaEq ) where import qualified Data.Foldable as Foldable import Data.Set (Set) import qual...
null
https://raw.githubusercontent.com/emilaxelsson/ag-graph/50fb1ebb819e1ed0bd3b97e8a9f82bb9310e782f/src/Variables.hs
haskell
| A generic interface to constructs that bind or represent variables | Construct a variable from a fresh identifier | Construct a variable expression for each argument of the constructor. Free variables | Alpha-equivalence
# LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # module Variables ( IsVar (..) , HasVars (..) , EqConstr (..) , alphaEq ) where import qualified Data.Foldable as Foldable import Data.Set (Set) import qualified Data.Set as Set import Tree import Mapping class IsVar v where...
88311f15f1f26412bff8fe8f46cd7308efddafda85f8d9899c496dd0f2184974
lfe/lfe
lfe_internal.erl
Copyright ( c ) 2016 - 2021 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, software distributed...
null
https://raw.githubusercontent.com/lfe/lfe/f333690822f696c4884726038dee3ce446c1c016/src/lfe_internal.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing perm...
Copyright ( c ) 2016 - 2021 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , File : Author : Purpose : Define Lisp Flavoured Erlang internals . Define LFE internal , guards and other internal stuff . -...
981f8a8e8f5dca42539d61ce0af43b88418c26f57eb251c0c114d45fd870ba2d
camlp5/camlp5
papr_phony_macro.ml
(* camlp5r *) q_phony.ml , v Copyright ( c ) INRIA 2007 - 2017 #directory "."; #load "pa_extend.cmo"; #load "pa_extprint.cmo"; #load "q_MLast.cmo"; #load "pa_pprintf.cmo"; open Pcaml; EXTEND GLOBAL: str_item expr; str_item: FIRST [ [ x = macro_def -> <:str_item< $exp:x$ >> ] ] ; expr: FIRST [ [ x...
null
https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/etc/papr_phony_macro.ml
ocaml
camlp5r
q_phony.ml , v Copyright ( c ) INRIA 2007 - 2017 #directory "."; #load "pa_extend.cmo"; #load "pa_extprint.cmo"; #load "q_MLast.cmo"; #load "pa_pprintf.cmo"; open Pcaml; EXTEND GLOBAL: str_item expr; str_item: FIRST [ [ x = macro_def -> <:str_item< $exp:x$ >> ] ] ; expr: FIRST [ [ x = macro_def -...
28514b798f5abb9c44cf6aaab4a849e78aed5e703562e05597cb9df1caefc3b2
input-output-hk/cardano-wallet
Logging.hs
{-# LANGUAGE DeriveAnyClass #-} # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - orphans #...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet/7b541e0b11fdd69b30d94104dbd5fa633ff1d5c3/lib/wallet/src/Cardano/Wallet/Logging.hs
haskell
# LANGUAGE DeriveAnyClass # # LANGUAGE RankNTypes # | License: Apache-2.0 This module contains utility functions for logging and mapping trace data. * Formatting typed messages as plain text * Logging helpers * Logging and timing IO actions * Tracer conversions instance. representation is empty, then no traci...
# LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE TupleSections # # LANGUAGE TypeFamilies # # LANGUAGE ViewPatterns # # OPTIONS_GHC -fno - warn - orphans # Copyright : © 2018 - 2020 IOHK module Cardano.Wallet.Lo...
3d3b7a142136ff7ba5925f4dfb0b5e269362404adc723dc1adefbe6e7fd69018
well-typed/optics
Magic.hs
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE UndecidableInstances # # OPTIONS_HADDOCK not - home # -- | This module is intended for internal use only, and may change without -- warning in subsequent releases. module Optics.Internal.Magic where -- | How about a magic trick? I'm gonna make the coverage cond...
null
https://raw.githubusercontent.com/well-typed/optics/7cc3f9c334cdf69feaf10f58b11d3dbe2f98812c/optics-core/src/Optics/Internal/Magic.hs
haskell
| This module is intended for internal use only, and may change without warning in subsequent releases. | How about a magic trick? I'm gonna make the coverage condition disappear. | Show something useful when type inference goes into a loop and stops with "reduction stack overflow" message (sometimes happens when ...
# LANGUAGE DataKinds # # LANGUAGE PolyKinds # # LANGUAGE UndecidableInstances # # OPTIONS_HADDOCK not - home # module Optics.Internal.Magic where class Dysfunctional field k s t a b | field s -> k t a b , field t -> k s a b instance ( TypeInferenceLoop "Type inference for th...
55f1f1c338901f45e1eb2f0c8df9968db34a0a65bc898473deb298cdb2fa6f41
jumarko/clojure-experiments
day_06.clj
(ns clojure-experiments.advent-of-code.advent-2022.day-06 " Input: Parsing signal - looking for start-of-packet marker (4 unique characters) " (:require [clojure-experiments.advent-of-code.advent-2022.utils :as utils] [clojure-experiments.macros.macros :refer [assert=]])) (def input (first (utils/rea...
null
https://raw.githubusercontent.com/jumarko/clojure-experiments/6ef2589bd6415a56581169a94d98beb2a4796400/src/clojure_experiments/advent_of_code/advent_2022/day_06.clj
clojure
Part 1 they are all unique some more examples: let's modify `packet-start` slightly to make the length of the prefix dynamic they are all unique some more examples: Try an alternative implementation map-indexed with multiple arguments could work, right? - except that `map-indexed` doesn't take multiple collect...
(ns clojure-experiments.advent-of-code.advent-2022.day-06 " Input: Parsing signal - looking for start-of-packet marker (4 unique characters) " (:require [clojure-experiments.advent-of-code.advent-2022.utils :as utils] [clojure-experiments.macros.macros :refer [assert=]])) (def input (first (utils/rea...
53dd04664ad0b1baacf7cfce03e30610705eea741adeb0cf2bf2f65dff360529
lpgauth/httpc_bench
httpc_bench.erl
-module(httpc_bench). -include("httpc_bench.hrl"). -export([ run/0 ]). -define(N, 2048000). -define(CLIENTS, [ httpc_bench_buoy, httpc_bench_dlhttpc, httpc_bench_hackney, httpc_bench_httpc, httpc_bench_ibrowse, httpc_bench_katipo ]). -define(CONCURENCIES, [32, 64, 128, 512, 2048, 4096]). ...
null
https://raw.githubusercontent.com/lpgauth/httpc_bench/5430ddd569dcecf2c120ca424493c336df44284f/src/httpc_bench.erl
erlang
public private
-module(httpc_bench). -include("httpc_bench.hrl"). -export([ run/0 ]). -define(N, 2048000). -define(CLIENTS, [ httpc_bench_buoy, httpc_bench_dlhttpc, httpc_bench_hackney, httpc_bench_httpc, httpc_bench_ibrowse, httpc_bench_katipo ]). -define(CONCURENCIES, [32, 64, 128, 512, 2048, 4096]). ...
ff60197ca84ee50055e5b1b79b59a4c4105763ee24478e03cef3c598ccd4f1a4
foreverbell/project-euler-solutions
249.hs
import Common.Numbers.Primes (primesTo, testPrime) import qualified Data.Vector.Unboxed as V import Data.Vector.Unboxed ((!)) import Data.List (foldl') dynamic :: Int -> [Int] -> V.Vector Int -> V.Vector Int dynamic _ [] dp = dp dynamic modulo (x:xs) dp = dynamic modulo xs dp' where dp' = V.fromList $ map (\i -> ...
null
https://raw.githubusercontent.com/foreverbell/project-euler-solutions/c0bf2746aafce9be510892814e2d03e20738bf2b/src/249.hs
haskell
import Common.Numbers.Primes (primesTo, testPrime) import qualified Data.Vector.Unboxed as V import Data.Vector.Unboxed ((!)) import Data.List (foldl') dynamic :: Int -> [Int] -> V.Vector Int -> V.Vector Int dynamic _ [] dp = dp dynamic modulo (x:xs) dp = dynamic modulo xs dp' where dp' = V.fromList $ map (\i -> ...
a24bfba928e610dc8349cf111f2b566169ba59b8c8831ee871c708ce025745b2
ygmpkk/house
Prep.hs
Preprocess a module to normalize it in the following ways : ( 1 ) Saturate all constructor and primop applications . ( 2 ) Arrange that any non - trivial expression of unlifted kind ( ' # ' ) is turned into the scrutinee of a Case . After these preprocessing steps , Core can be interpreted ( o...
null
https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/ghc/utils/ext-core/Prep.hs
haskell
Return false for those expressions for which Interp.suspendExp buidds a thunk.
Preprocess a module to normalize it in the following ways : ( 1 ) Saturate all constructor and primop applications . ( 2 ) Arrange that any non - trivial expression of unlifted kind ( ' # ' ) is turned into the scrutinee of a Case . After these preprocessing steps , Core can be interpreted ( o...
40685ffc45791cb4ed327e52d02f6bfb2829ba9c529b8182bbe5367c94b723a3
manuel-serrano/hop
xml.scm
;*=====================================================================*/ * serrano / prgm / project / hop/3.5.x / runtime / xml.scm * / ;* ------------------------------------------------------------- */ * Author : * / * Creation : ...
null
https://raw.githubusercontent.com/manuel-serrano/hop/6fc069a4f8b60c4e76f34c3d77df56bf8787b6cb/runtime/xml.scm
scheme
*=====================================================================*/ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * Simple XML producer/writer for HOP. */ *===========================...
* serrano / prgm / project / hop/3.5.x / runtime / xml.scm * / * Author : * / * Creation : We d Dec 8 05:43:46 2004 * / * Last change : Thu Jan 20 09:19:18 2022 ( serrano ) * / * Copy...
11574210cbf1cd78ca78cae2cf8dea17c9c1ce5b742c1be307332004ec7c0a61
HaskellZhangSong/Introduction_to_Haskell_2ed_source
SpawnSupervised.hs
# LANGUAGE TemplateHaskell # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveAnyClass #-} module Main where import GHC.Generics import Data.Binary import Data.Rank1Typeable import Control.Monad import Control.Distributed.Process import Control.Distri...
null
https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell_2ed_source/140c50fdccfe608fe499ecf2d8a3732f531173f5/C21/SpawnSupervised.hs
haskell
# LANGUAGE DeriveDataTypeable # # LANGUAGE DeriveAnyClass #
# LANGUAGE TemplateHaskell # # LANGUAGE ScopedTypeVariables # # LANGUAGE DeriveGeneric # module Main where import GHC.Generics import Data.Binary import Data.Rank1Typeable import Control.Monad import Control.Distributed.Process import Control.Distributed.Process.Closure import Control.Distributed.Process.Node (initR...
bb26779a1b5af0fbc5e5d17c6a83e52bff0710a14c5e51a27d64316e0f894c16
ocamllabs/ocaml-modular-implicits
test.ml
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Crista...
null
https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/lib-num/test.ml
ocaml
********************************************************************* OCaml ...
, projet Cristal , 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 Q Public License version 1.0 . open Printf;; let flush_all () = flush stdout; f...
3b5b6e4cc8d316407fc98e36561d22e6441b1ac4ed778cd9820fc37ce43efbd2
stevenvar/OMicroB
avr.mli
(*******************************************************************************) (* *) (* Generic avr pin communication library *) (* ...
null
https://raw.githubusercontent.com/stevenvar/OMicroB/99a2e781f9511137090aaba3c09e2e920c0dbc77/targets/avr/avr.mli
ocaml
***************************************************************************** Generic avr pin communication library ********...
type level = HIGH | LOW type mode = INPUT | OUTPUT | INPUT_PULLUP module type AvrPins = sig type 'a pin type register type bit val port_of_pin: 'a pin -> register val ddr_of_pin: 'a pin -> register val input_of_pin: 'a pin -> register val port_bit_of_pin : 'a pin -> bit val ddr_bit_of_pin : 'a pin -> ...
bd3f1aef1d4e513809c1e0d0bba8b521d25e19f3983fb9abbf3a9ab7f82a2f35
Decentralized-Pictures/T4L3NT
data.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > (* ...
null
https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_000_Ps9mPmXa/lib_protocol/data.ml
ocaml
*************************************************************************** Open Source License Permission is h...
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < > to deal in the Software without restriction , including without limitation and/or sell copies of the Software , and to permit persons to whom the THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR LIABILITY , WHETH...
fff836bdfc3702feeecd7d40a994439de8fc7fc039e5140b36a7e4f2435d2d45
kumarshantanu/ring-sse-middleware
immutant_test.clj
Copyright ( c ) . All rights reserved . ; 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 LICENSE at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; the ...
null
https://raw.githubusercontent.com/kumarshantanu/ring-sse-middleware/67dae006cfda2fa2fef93eea92557aeffff0b6a7/test/ring_sse_middleware/immutant_test.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 LICENSE 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 this ...
Copyright ( c ) . All rights reserved . (ns ring-sse-middleware.immutant-test (:require [ring-sse-middleware.test-util :as tu] [ring-sse-middleware.core :as r] [ring-sse-middleware.adapter.immutant :as adapter] [immutant.web :as immutant])) (def wra...
d2d8808a7c619f0909dc6b88b5b2fd7511fbde674fb6c87b7c896ea4d57da299
sjl/temperance
circle.lisp
(in-package :temperance.test.circle) (defmacro is-circle-contents (circle values) `(is (equal ,values (circle-to-list ,circle)))) (define-test empty-circles (is (circle-empty-p (make-empty-circle))) (is (circle-empty-p (make-circle-with nil))) (is (not (circle-empty-p (make-circle-with (list 1)...
null
https://raw.githubusercontent.com/sjl/temperance/f7e68f46b7afaeecf643c009eb2e130500556e31/test/circle.lisp
lisp
(in-package :temperance.test.circle) (defmacro is-circle-contents (circle values) `(is (equal ,values (circle-to-list ,circle)))) (define-test empty-circles (is (circle-empty-p (make-empty-circle))) (is (circle-empty-p (make-circle-with nil))) (is (not (circle-empty-p (make-circle-with (list 1)...
3cad2623c10c1b820a46d2b18b60a9c5b3536aea35cfae2c234c479cd425eb9d
HealthSamurai/stresty
core.cljc
(ns app.users.core (:require [zframes.re-frame :as zrf] [anti.button] [app.routes :refer [href]] [stylo.core :refer [c]] [app.pages :as pages] [app.users.form])) (zrf/reg-sub db (fn [db _] (get db ::db))) (zrf/reg-event-fx load-users [(zrf/path ::db)] (fn [_ _] {:http/fetch [{:...
null
https://raw.githubusercontent.com/HealthSamurai/stresty/130cedde6bf53e07fe25a6b0b13b8bf70846f15a/src-ui/app/users/core.cljc
clojure
(ns app.users.core (:require [zframes.re-frame :as zrf] [anti.button] [app.routes :refer [href]] [stylo.core :refer [c]] [app.pages :as pages] [app.users.form])) (zrf/reg-sub db (fn [db _] (get db ::db))) (zrf/reg-event-fx load-users [(zrf/path ::db)] (fn [_ _] {:http/fetch [{:...
170c7ca25c4f011e063c4975d42b8ae637d9d824eba5c709564be8ee547abfad
ruhler/smten
Functor.hs
# LANGUAGE NoImplicitPrelude # module Smten.Base.Data.Functor ( Functor(fmap), (<$), (<$>), ) where import GHC.Base(Functor(..)) infixl 4 <$> (<$>) :: Functor f => (a -> b) -> f a -> f b (<$>) = fmap
null
https://raw.githubusercontent.com/ruhler/smten/16dd37fb0ee3809408803d4be20401211b6c4027/smten-base/Smten/Base/Data/Functor.hs
haskell
# LANGUAGE NoImplicitPrelude # module Smten.Base.Data.Functor ( Functor(fmap), (<$), (<$>), ) where import GHC.Base(Functor(..)) infixl 4 <$> (<$>) :: Functor f => (a -> b) -> f a -> f b (<$>) = fmap
2d2b56595dbb80598482c16855399ebf63b176951001a5bed425a7cee01c5b40
ocaml-sf/learn-ocaml-corpus
prelude.ml
type var = int type formula = | FConst of bool | FConn of bool * formula * formula | FNeg of formula | FVar of var type env = var -> bool
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/sat/prelude.ml
ocaml
type var = int type formula = | FConst of bool | FConn of bool * formula * formula | FNeg of formula | FVar of var type env = var -> bool
a4f15964b78f1a85ba3a3b182726a7b4a9c5238a4e4d14b608e1239bed878e94
janestreet/learn-ocaml-workshop
bot.ml
open! Core open! Async * This is a simple client which takes a variety of command - line parameters for the purpose of connecting to a single channel on an IRC server , sending one message , and then disconnecting . No validation is done of the parameters . There are various TODO items below that ar...
null
https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/04-bigger-projects/irc-bot/bin/bot.ml
ocaml
Convenience wrapper to ensure we don't forget to end lines in \r\n. TODO: In practice, you'll want to check that the replies you receive in response to sending each of the messages below indicate success before continuing on to additional commands.
open! Core open! Async * This is a simple client which takes a variety of command - line parameters for the purpose of connecting to a single channel on an IRC server , sending one message , and then disconnecting . No validation is done of the parameters . There are various TODO items below that ar...
3a6a4c1a555aaa6aa4959230841f766ad227aa875f68433b5a204bb18594fac5
GillianPlatform/Gillian
MonadicSVal.ml
include SVal open Gil_syntax open Monadic open Delayed.Syntax module DO = Delayed_option module DR = Delayed_result exception NotACompCertValue of Expr.t module Patterns = struct open Formula.Infix let number e = let open Expr in (typeof e) #== (type_ NumberType) let integer e = let open Expr in ...
null
https://raw.githubusercontent.com/GillianPlatform/Gillian/42d0e2aae9fa6b0992a5bc300525cc8d360c3c96/Gillian-C/lib/MonadicSVal.ml
ocaml
* the parameter should be a list representing a *NON-EMPTY* list * This already assumes the value is a number and not a pointer Assuming that the chunk is correct already * This assumes chunks are properly respected outside of the call of this function Should be completed later type nonrec t = Conc of t list | ...
include SVal open Gil_syntax open Monadic open Delayed.Syntax module DO = Delayed_option module DR = Delayed_result exception NotACompCertValue of Expr.t module Patterns = struct open Formula.Infix let number e = let open Expr in (typeof e) #== (type_ NumberType) let integer e = let open Expr in ...
6a8a22e9c008bc8263bba5852b70d6fb5370e3dca2085158ec14f8aafdabee2b
borgeby/jarl
strings_test.cljc
(ns jarl.builtins.strings-test (:require [test.utils :refer [testing-builtin]] #?(:clj [clojure.test :refer [deftest]] :cljs [cljs.test :refer [deftest]]))) (deftest builtin-concat-test (testing-builtin "concat" [", " ["a" "b" "c"]] "a, b, c" ["🙂" ["🙃" "🙃" "�...
null
https://raw.githubusercontent.com/borgeby/jarl/2659afc6c72afb961cb1e98b779beb2b0b5d79c6/core/src/test/cljc/jarl/builtins/strings_test.cljc
clojure
concat sets regex escape code points negative offset (deftest builtin-sprintf-test ["ab%s%s" ["c" "d"]] "abcd"
(ns jarl.builtins.strings-test (:require [test.utils :refer [testing-builtin]] #?(:clj [clojure.test :refer [deftest]] :cljs [cljs.test :refer [deftest]]))) (deftest builtin-concat-test (testing-builtin "concat" [", " ["a" "b" "c"]] "a, b, c" ["🙂" ["🙃" "🙃" "�...
008d88445a23e87ecda630c12f6958e4ab246161c106944577a09f548be8e19b
pyr/cyanite
config.clj
(ns io.cyanite.config "Yaml config parser, with a poor man's dependency injector" (:require [com.stuartsierra.component :as component] [clj-yaml.core :refer [parse-string]] [clojure.tools.logging :refer [error info debug]])) (def default-logging "Default logging configur...
null
https://raw.githubusercontent.com/pyr/cyanite/2b9a1f26df808abdad3465dd1946036749b93000/src/io/cyanite/config.clj
clojure
(ns io.cyanite.config "Yaml config parser, with a poor man's dependency injector" (:require [com.stuartsierra.component :as component] [clj-yaml.core :refer [parse-string]] [clojure.tools.logging :refer [error info debug]])) (def default-logging "Default logging configur...
7f255ebdfd4e5633e9c90ce4fe0c955e3fdd9e2663d13128e9869f53f76d91de
brendanhay/gogol
Add.hs
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # {-# LANGUAGE St...
null
https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-webmaster-tools/gen/Gogol/WebmasterTools/Webmasters/Sites/Add.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated /See:/ <-tools/ Search Console API Reference> for @webmasters.sites.add@. * Resource ** Constructing a Request 'WebmastersSitesAdd' request conforms to. /See:/ 'newWebmastersSitesAdd' smart constructor. | The URL of the sit...
# LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE DerivingStrategies # # LANGUAGE DuplicateRecordFields # # LANGUAGE FlexibleInstances # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE LambdaCase # # LANGUAGE PatternSynonyms # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators...
0f0388b1e2b5c3022f4393fdae8d8176cc030395f1dbde95ca3cc1039b3ab1c6
haroldcarr/learn-haskell-coq-ml-etc
TimWilliamsStreaming.hs
# LANGUAGE DeriveFunctor # # LANGUAGE InstanceSigs # {-# LANGUAGE LambdaCase #-} module TimWilliamsStreaming where -- ListT done right -- list elements 'a' interleaved with effect 'm' newtype ListT m a = ListT { runListT :: m (Step m a) } deriving Functor data Step m a = Cons a (ListT m a) | Nil deriving...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/ghc-extensions/src/TimWilliamsStreaming.hs
haskell
# LANGUAGE LambdaCase # ListT done right list elements 'a' interleaved with effect 'm'
# LANGUAGE DeriveFunctor # # LANGUAGE InstanceSigs # module TimWilliamsStreaming where newtype ListT m a = ListT { runListT :: m (Step m a) } deriving Functor data Step m a = Cons a (ListT m a) | Nil deriving Functor instance Monad m => Semigroup (ListT m a) where (<>) = undefined instance Monad m => Mo...
f589afbf6567b0bde25c3cf23f93836242c0b83e79fc3833a891838be416764a
ConsenSysMesh/Fae
Collect.hs
import Blockchain.Fae.Contracts import Blockchain.Fae.Currency import Blockchain.Fae.Transactions.TX$aucTX.Auction body :: AuctionResult Coin String -> FaeTX String body (Remit c) = do deposit c "self" return "Collected" body _ = error "unexpected result"
null
https://raw.githubusercontent.com/ConsenSysMesh/Fae/3ff023f70fa403e9cef80045907e415ccd88d7e8/demos/Auction/Collect.hs
haskell
import Blockchain.Fae.Contracts import Blockchain.Fae.Currency import Blockchain.Fae.Transactions.TX$aucTX.Auction body :: AuctionResult Coin String -> FaeTX String body (Remit c) = do deposit c "self" return "Collected" body _ = error "unexpected result"
bc615703fc95be11d53107f8ab6295af233d1a85273cc702354889b9854f5123
jgoerzen/hsh
ShellEquivs.hs
# LANGUAGE ScopedTypeVariables # Shell Equivalents Copyright ( C ) 2004 - 2009 < > Please see the COPYRIGHT file Copyright (C) 2004-2009 John Goerzen <> Please see the COPYRIGHT file -} | Module : HSH.ShellEquivs Copyright : Copyright ( C ) 2009 License : GNU LGPL , version 2.1...
null
https://raw.githubusercontent.com/jgoerzen/hsh/047197b789bf2ab63c87dcf7acf78db5f7687cf1/HSH/ShellEquivs.hs
haskell
| Return the absolute path of the arg. Raises an error if the computation is impossible. This is a thin wrapper around System.Path.absNormPath. Unix/Linux users note: System.Path.absNormPath is known to produce odd results when a tilde expansion is requested; you might prefer 'glob' to this function if you know your...
# LANGUAGE ScopedTypeVariables # Shell Equivalents Copyright ( C ) 2004 - 2009 < > Please see the COPYRIGHT file Copyright (C) 2004-2009 John Goerzen <> Please see the COPYRIGHT file -} | Module : HSH.ShellEquivs Copyright : Copyright ( C ) 2009 License : GNU LGPL , version 2.1...
eba1f6c10240b69cdbd4292ace14609c80eaf927474a0c64809a4ca0ae862231
ocaml/odoc
type_of.ml
Type_of.ml (* Deals with expanding `module type of` expressions *) open Odoc_model open Lang module Id = Odoc_model.Paths.Identifier let again = ref false let rec signature : Env.t -> Signature.t -> Signature.t = fun env sg -> let items, _ = signature_items env sg.items in { sg with items } and signature_it...
null
https://raw.githubusercontent.com/ocaml/odoc/7acd9d9be85a299c1c3a532013199f1838eb194a/src/xref2/type_of.ml
ocaml
Deals with expanding `module type of` expressions
Type_of.ml open Odoc_model open Lang module Id = Odoc_model.Paths.Identifier let again = ref false let rec signature : Env.t -> Signature.t -> Signature.t = fun env sg -> let items, _ = signature_items env sg.items in { sg with items } and signature_items : Env.t -> Signature.item list -> _ = fun initial_e...
8c929296133777a5b0f777b47f33aac31fc4c392df45ea13383f5d4bd1d0a4d3
helvm/helma
Symbol.hs
module HelVM.HelMA.Automata.SubLeq.Symbol where type Symbol = Int type SymbolList = [Symbol]
null
https://raw.githubusercontent.com/helvm/helma/cf220d7db1441780ba7fcc4f29cf1eec7b6f1e73/hs/src/HelVM/HelMA/Automata/SubLeq/Symbol.hs
haskell
module HelVM.HelMA.Automata.SubLeq.Symbol where type Symbol = Int type SymbolList = [Symbol]
8b082306bcf5d8d95b810120cb89a07e66cee0a0a3ea69b82b20a3140696e1c6
manutter51/woolybear
icons.cljs
(ns woolybear.ad.catalog.icons "Catalog and demonstrations of available icon components." (:require [woolybear.ad.catalog.utils :as acu] [woolybear.ad.layout :as layout] [woolybear.ad.containers :as containers] [woolybear.ad.icons :as icons] [woolybear.ad.images :as i...
null
https://raw.githubusercontent.com/manutter51/woolybear/a7f820dfb2f51636122d56d1500baefe5733eb25/src/cljs/woolybear/ad/catalog/icons.cljs
clojure
(ns woolybear.ad.catalog.icons "Catalog and demonstrations of available icon components." (:require [woolybear.ad.catalog.utils :as acu] [woolybear.ad.layout :as layout] [woolybear.ad.containers :as containers] [woolybear.ad.icons :as icons] [woolybear.ad.images :as i...
185a73d6241c0358de269709232459238505bc89cabfbfab11c93a67a6843f91
v-kolesnikov/sicp
2_35.clj
(ns sicp.chapter02.2-35) (defn count-leaves [tree] (let [f #(if (list? %) (count-leaves %) 1)] (->> tree (map f) (reduce + 0))))
null
https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/src/sicp/chapter02/2_35.clj
clojure
(ns sicp.chapter02.2-35) (defn count-leaves [tree] (let [f #(if (list? %) (count-leaves %) 1)] (->> tree (map f) (reduce + 0))))
66a151765e5d6862a7cf1c9da6fdb21b0b63b2baa939c4f302a798d9babd24d2
zack-bitcoin/verkle
verkle_app.erl
-module(verkle_app). -behaviour(application). -include("constants.hrl"). %% Application callbacks -export([start/2, stop/1]). start(_StartType , _ ) - > start(normal, []) -> Size = 2, , ID = tree01, KeyLength = 5,%in bytes KeyLength = ?nwidth div ?nindex,%in bytes Amount = 1000000, %Mode = ra...
null
https://raw.githubusercontent.com/zack-bitcoin/verkle/cdcae51abb9a9cb7db3fda4afcef49e2673fe15d/src/verkle_app.erl
erlang
Application callbacks in bytes in bytes Mode = ram,
-module(verkle_app). -behaviour(application). -include("constants.hrl"). -export([start/2, stop/1]). start(_StartType , _ ) - > start(normal, []) -> Size = 2, , ID = tree01, Amount = 1000000, Mode = hd, Meta = 1, verkle_sup:start_link(KeyLength, Size, ID, Amount, Meta, Mode, ""). stop(_S...
7972b3645e09b6ac2735392a302cdcbfa6fd25a7327860c9c2c5ecaae795179d
quek/paiprolog
unify.lisp
;;; -*- Mode: Lisp; Syntax: Common-Lisp; -*- ;;; Code from Paradigms of Artificial Intelligence Programming Copyright ( c ) 1991 ;;;; File unify.lisp: Unification functions (in-package "PAIPROLOG") (defparameter *occurs-check* t "Should we do the occurs check?") (defun unify (x y &optional (bindings no-bindings...
null
https://raw.githubusercontent.com/quek/paiprolog/012d6bb255d8af7f1c8b1d061dcd8a474fb3b57a/unify.lisp
lisp
-*- Mode: Lisp; Syntax: Common-Lisp; -*- Code from Paradigms of Artificial Intelligence Programming File unify.lisp: Unification functions ============================== ==============================
Copyright ( c ) 1991 (in-package "PAIPROLOG") (defparameter *occurs-check* t "Should we do the occurs check?") (defun unify (x y &optional (bindings no-bindings)) "See if x and y match with given bindings." (cond ((eq bindings fail) fail) ((eql x y) bindings) ((variable-p x) (unify-variable ...
a5611e4b0b3609a3b5122d2d180878991020e0f4a25c2b3d4076605184747e3c
cenary-lang/cenary
StackTL.hs
{-# LANGUAGE DataKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE RebindableSyntax # # LANGUAGE TupleSections # {-# LANGUAGE TypeFamilies #-} # LANGUAGE TypeOperators # # LANGUAGE UndecidableIns...
null
https://raw.githubusercontent.com/cenary-lang/cenary/bf5ab4ac6bbc2353b072d32de2f3bc86cbc88266/src/Cenary/EvmAPI/StackTL.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE KindSignatures # # LANGUAGE PolyKinds # # LANGUAGE RankNTypes # # LANGUAGE TypeFamilies # wow :: IO () wow = do pure ()
# LANGUAGE RebindableSyntax # # LANGUAGE TupleSections # # LANGUAGE TypeOperators # # LANGUAGE UndecidableInstances # module Cenary.EvmAPI.StackTL where import Control.Monad.Indexed import GHC.TypeLits import Prelude hiding ((>>)) data StackElem = Jumpdest data Sta...
089e3a7af0eb238e0bdfe0a7383fb5b1a8750de56e77bc7193344d36f06db36e
PacktPublishing/Haskell-High-Performance-Programming
tuples.hs
-- file: tuples.hs import Data.Array.Accelerate as A import Data.Array.Accelerate.CUDA f1 :: (Exp Int, Exp Int) -> Acc (Scalar Int) f1 (x, y) = unit (x + y) f2 :: Exp (Int, Int) -> Acc (Scalar Int) f2 e = let (x, y) = unlift e :: (Exp Int, Exp Int) in unit (x + y) main = let xs = [run $ f1 (x, y) | ...
null
https://raw.githubusercontent.com/PacktPublishing/Haskell-High-Performance-Programming/2b1bfdb8102129be41e8d79c7e9caf12100c5556/Chapter11/tuples.hs
haskell
file: tuples.hs
import Data.Array.Accelerate as A import Data.Array.Accelerate.CUDA f1 :: (Exp Int, Exp Int) -> Acc (Scalar Int) f1 (x, y) = unit (x + y) f2 :: Exp (Int, Int) -> Acc (Scalar Int) f2 e = let (x, y) = unlift e :: (Exp Int, Exp Int) in unit (x + y) main = let xs = [run $ f1 (x, y) | x <- [1..10], y <- ...
21578bac1546e1ae29934cc0aaf611a6e3008308920ed3c5c2a6975edcc6c7d8
jimcrayne/jhc
Show.hs
# OPTIONS_JHC -fno - prelude # module Jhc.Show where import Jhc.Int import Jhc.Basics type ShowS = String -> String class Show a where showsPrec :: Int -> a -> ShowS show :: a -> String showList :: [a] -> ShowS complete definition : -- show or showsPrec ...
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/lib/jhc/Jhc/Show.hs
haskell
show or showsPrec # INLINE showChar, showString #
# OPTIONS_JHC -fno - prelude # module Jhc.Show where import Jhc.Int import Jhc.Basics type ShowS = String -> String class Show a where showsPrec :: Int -> a -> ShowS show :: a -> String showList :: [a] -> ShowS complete definition : showsPrec _ x s = show x ++ s...
63be6a6231f914d9761fac84a7c4622e6a1d421731b71542ae5f5431d1093f82
robert-strandh/Cluster
neg.lisp
(cl:in-package #:cluster) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; Mnemonic NEG ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Negate a 32 - bit GPR or memory location . Negate a 32 - bit GPR . (define-instruction "NEG" :modes (32 64) :operands ((gpr 32)) :opco...
null
https://raw.githubusercontent.com/robert-strandh/Cluster/370410b1c685f2afd77f959a46ba49923a31a33c/x86-instruction-database/neg.lisp
lisp
Mnemonic NEG
(cl:in-package #:cluster) Negate a 32 - bit GPR or memory location . Negate a 32 - bit GPR . (define-instruction "NEG" :modes (32 64) :operands ((gpr 32)) :opcodes (#xF7) :opcode-extension 3 :encoding (modrm)) Negate a 32 - bit memory location (define-instruction "NEG" :modes (32 ) :operands ((m...
2b2735f4f035f68675ac00cf00b5c22bc259520e487efa6e15ed8604c5e2e6b3
helins/binf.cljc
leb128.cljc
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. (ns helins.binf.test.leb128 "Testing LEB128 utilities." {:author "Adam Helins"} (:require [clojure.test :as T] ...
null
https://raw.githubusercontent.com/helins/binf.cljc/202abed33c3ebc3a323253f4f4c731595e21366e/src/test/helins/binf/test/leb128.cljc
clojure
int32 Generative testing
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 /. (ns helins.binf.test.leb128 "Testing LEB128 utilities." {:author "Adam Helins"} (:require [clojure.test :as T] ...
15579f3b66d56dcf304a0f85a2af3d03b30183f9bc86303c529ec284d77c13b8
nutanix/papiea-clj
engine_test.clj
(ns papiea.engine-test (:require [clojure.test :refer :all] [papiea.engine :as c])) (deftest merge-entities-status (testing "merging the same data should make no difference" (let [old [{:metadata {:uuid "12"} :status {:name "test1" :state "started"}} ...
null
https://raw.githubusercontent.com/nutanix/papiea-clj/dd842703cf034d93b8651542892c7bd4ac204e29/test/papiea/engine_test.clj
clojure
(ns papiea.engine-test (:require [clojure.test :refer :all] [papiea.engine :as c])) (deftest merge-entities-status (testing "merging the same data should make no difference" (let [old [{:metadata {:uuid "12"} :status {:name "test1" :state "started"}} ...
3c86052087a1cf5a9c5deea8ea8e9429c439c30c944dd961f7e03dde1da30601
simmone/racket-simple-xlsx
sheet-lib.rkt
#lang racket (require "../xlsx/xlsx.rkt") (require "../sheet/sheet.rkt") (require "dimension.rkt") (provide (contract-out [get-sheet-dimension (-> string?)] [get-rows-count (-> natural?)] [get-sheet-ref-rows-count (-> natural? natural?)] [get-sheet-name-rows-count (-> string? ...
null
https://raw.githubusercontent.com/simmone/racket-simple-xlsx/b6b1598aa493c2a625b9e4afe6b343480a62b816/simple-xlsx/lib/sheet-lib.rkt
racket
#lang racket (require "../xlsx/xlsx.rkt") (require "../sheet/sheet.rkt") (require "dimension.rkt") (provide (contract-out [get-sheet-dimension (-> string?)] [get-rows-count (-> natural?)] [get-sheet-ref-rows-count (-> natural? natural?)] [get-sheet-name-rows-count (-> string? ...
a632f4eaad927f5d8ceb5ef72441683773d880979bd70503e73ca6cf1da11144
LesBoloss-es/xoshiro
libCrusher.mli
val run : name:string -> (unit -> int) -> unit
null
https://raw.githubusercontent.com/LesBoloss-es/xoshiro/a2719c6108afb308bd37c0eb65deb9dba45cf9d1/utils/crusher/libCrusher.mli
ocaml
val run : name:string -> (unit -> int) -> unit
9eb2e229fc13bc5408b85a3f42e5643eba1e4fe81c823cd4ec381375b0c561a9
cobaweel/piffle
PifflePiffle.hs
Piffle , Copyright ( C ) 2007 , . 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 i...
null
https://raw.githubusercontent.com/cobaweel/piffle/7c4cfb5301c5c55c229098d3938d3b023d69cde4/src/PifflePiffle.hs
haskell
Piffle , Copyright ( C ) 2007 , . 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 i...
1d1c82e0d5fe3b2b242a25e2933f41d4576b9cc346b678267f4fc92530d46110
fluree/ledger
sql_query.clj
(ns fluree.db.ledger.docs.query.sql-query (:require [clojure.test :refer :all] [clojure.stacktrace :refer [root-cause]] [fluree.db.test-helpers :as test] [fluree.db.ledger.docs.getting-started.basic-schema :as basic] [fluree.db.api :as fdb] [fluree.db.util.c...
null
https://raw.githubusercontent.com/fluree/ledger/31f3e11a0648501b0a8cc6148177e54c67420042/test/fluree/db/ledger/docs/query/sql_query.clj
clojure
the keys for every chat should be _id, message, person, instant, or comments favNums, handle, fullName
(ns fluree.db.ledger.docs.query.sql-query (:require [clojure.test :refer :all] [clojure.stacktrace :refer [root-cause]] [fluree.db.test-helpers :as test] [fluree.db.ledger.docs.getting-started.basic-schema :as basic] [fluree.db.api :as fdb] [fluree.db.util.c...
0d97718e7fe5cb3d9e4c2bc31f5b3e1356020d0058c03c28896636ba8f716958
sunng87/diehard
circuit_breaker.clj
(ns diehard.circuit-breaker (:require [diehard.util :as u]) (:import [java.time Duration] [java.util List] [dev.failsafe CircuitBreaker] [dev.failsafe.function CheckedBiPredicate])) (def ^{:const true :no-doc true} allowed-circuit-breaker-option-keys #{:failure-threshold :failu...
null
https://raw.githubusercontent.com/sunng87/diehard/53d16f2e43e796239c58d4f0976c147c29932a6d/src/diehard/circuit_breaker.clj
clojure
(ns diehard.circuit-breaker (:require [diehard.util :as u]) (:import [java.time Duration] [java.util List] [dev.failsafe CircuitBreaker] [dev.failsafe.function CheckedBiPredicate])) (def ^{:const true :no-doc true} allowed-circuit-breaker-option-keys #{:failure-threshold :failu...
5080a2a73e58621e48cbc71e5b69a224b240c1aa6ab877589b427d0f035add4c
cirodrig/triolet
Print.hs
module SystemF.Print (PrintFlags(..), defaultPrintFlags, pprLit, pprVar, pprPat, pprExp, pprFun, pprFDef, pprModule, pprVarFlags, pprPatFlags, pprExpFlags, pprFunFlags, pprFDefFlags ) where import Data.Maybe import Text.PrettyPrint.HughesPJ import Common.Error import Common.Identifier ...
null
https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/SystemF/Print.hs
haskell
Helper function for printing tuple syntax Precedences for expression printing. If an expression has precedence P, and it's shown in a context with precedence Q > P, then it needs parentheses. Outermost precedence; commas; parentheses Type annotation (x : t) Type application (f @ x) Application (f x) UTF-8 for ...
module SystemF.Print (PrintFlags(..), defaultPrintFlags, pprLit, pprVar, pprPat, pprExp, pprFun, pprFDef, pprModule, pprVarFlags, pprPatFlags, pprExpFlags, pprFunFlags, pprFDefFlags ) where import Data.Maybe import Text.PrettyPrint.HughesPJ import Common.Error import Common.Identifier ...
d01ed6b18006b1077df18b5e639302a17d5380a1b4cca60d4b8e897ae344bd4e
ULTRAKID/emqx_plugin_kafka
emqx_plugin_kafka_app.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2019 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the L...
null
https://raw.githubusercontent.com/ULTRAKID/emqx_plugin_kafka/0ef6cd954e53be63b786725b6b39ec3016c527db/src/emqx_plugin_kafka_app.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2019 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_plugin_kafka_app). -behaviour(application). -emqx_plugin(?MODULE). -export([ start/2 ...
837d5d49338735538c04e7580ba270d56c89cf87b50802fa2884bb2bfcf82821
kowainik/colourista
Colourista.hs
# LANGUAGE ImplicitParams # module Test.Colourista ( colouristaSpec ) where import Data.ByteString (ByteString) import Data.Text (Text) import Test.Hspec (Spec, describe, it, shouldBe) import Colourista (formatWith, italic, red, reset, yellow) import Colourista.Short (b, i, u) colouristaSpec :: Spec colour...
null
https://raw.githubusercontent.com/kowainik/colourista/704c2f1c1ffb4f96a863d36922c0fddec42043e7/test/Test/Colourista.hs
haskell
# LANGUAGE ImplicitParams # module Test.Colourista ( colouristaSpec ) where import Data.ByteString (ByteString) import Data.Text (Text) import Test.Hspec (Spec, describe, it, shouldBe) import Colourista (formatWith, italic, red, reset, yellow) import Colourista.Short (b, i, u) colouristaSpec :: Spec colour...
b31958f09ce732f7ecc43ddbdd3b1171c946ca73ac8855e9c19cfb0365f2353d
GaloisInc/macaw
PersistentState.hs
| Copyright : ( c ) Galois , Inc 2015 - 2017 Maintainer : < > This defines the monad used to map Reopt blocks to Crucible . Copyright : (c) Galois, Inc 2015-2017 Maintainer : Joe Hendrix <> This defines the monad used to map Reopt blocks to Crucible. -} {-# LANGUAGE ConstraintKi...
null
https://raw.githubusercontent.com/GaloisInc/macaw/fbd7bce2176ff6ccd22c5d185309bde49d267534/symbolic/src/Data/Macaw/Symbolic/PersistentState.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # * CrucPersistentState * Types * Register index map * Values ---------------------------------------------------------------------- Type mappings Most values are of type 'M.BVType' (bitvectors) - these are repre...
| Copyright : ( c ) Galois , Inc 2015 - 2017 Maintainer : < > This defines the monad used to map Reopt blocks to Crucible . Copyright : (c) Galois, Inc 2015-2017 Maintainer : Joe Hendrix <> This defines the monad used to map Reopt blocks to Crucible. -} # LANGUAGE DataKinds # # ...
c201a0d626affebb5859c2198cb7a7fd9996e3db61d9de29c8293c7c493e06b9
Frama-C/Frama-C-snapshot
inout_domain.mli
(**************************************************************************) (* *) This file is part of Frama - C. (* *) Copyright ...
null
https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/value/domains/inout_domain.mli
ocaml
************************************************************************ alternatives) ...
This file is part of Frama - C. Copyright ( C ) 2007 - 2019 CEA ( Commissariat à l'énergie atomique et aux énergies Lesser General Public License as published by the Free Software Foundation , v...
7f158c8206c2253b92c0c8bc1fdbc05cabfe78e7ef4853b39688feeafb740f05
nasa/Common-Metadata-Repository
user.clj
(ns user "A dev namespace that supports Proto-REPL. It seems that Proto-REPL doesn't support the flexible approach that lein uses: any configurable ns can be the starting ns for a REPL. As such, this minimal ns was created for Proto-REPL users, so they too can have an env that supports startup and shutdown."...
null
https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/metadata-proxy/dev-resources/src/user.clj
clojure
(ns user "A dev namespace that supports Proto-REPL. It seems that Proto-REPL doesn't support the flexible approach that lein uses: any configurable ns can be the starting ns for a REPL. As such, this minimal ns was created for Proto-REPL users, so they too can have an env that supports startup and shutdown."...
74f4edd816035340e0dd0bb5fffd58124b5b48cbd7c787574b5a7fe826067049
tonymorris/geo-gpx
TextL.hs
module Data.Geo.GPX.Lens.TextL where import Data.Lens.Common class TextL a where textL :: Lens a (Maybe String)
null
https://raw.githubusercontent.com/tonymorris/geo-gpx/526b59ec403293c810c2ba08d2c006dc526e8bf9/src/Data/Geo/GPX/Lens/TextL.hs
haskell
module Data.Geo.GPX.Lens.TextL where import Data.Lens.Common class TextL a where textL :: Lens a (Maybe String)
747b9d6b9e849f600e517a2663c81ab0e955f206dcad017eeeb2b8000d4e1e4d
emqx/emqx
emqx_delayed.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy o...
null
https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx_modules/src/emqx_delayed.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_delayed). -behaviour(gen_server). -include_lib("emqx/include/emqx.hrl"). -include...
57102c4f468191eb7ce2c85bfb616ec896d048a518a7dc54f5c4ce7dfb93688d
onyx-platform/onyx
zookeeper.clj
(ns onyx.mocked.zookeeper (:require [com.stuartsierra.component :as component] [taoensso.timbre :refer [info error warn fatal]] [onyx.log.replica] [onyx.checkpoint :as checkpoint] [onyx.extensions :as extensions]) (:import [org.apache.zookeeper KeeperException$BadVers...
null
https://raw.githubusercontent.com/onyx-platform/onyx/74f9ae58cdbcfcb1163464595f1e6ae6444c9782/test/onyx/mocked/zookeeper.clj
clojure
Always show true - we will always manually leave synchronous write means it's already completed zookeeper connection is shared with peer group, so we don't want to stop it
(ns onyx.mocked.zookeeper (:require [com.stuartsierra.component :as component] [taoensso.timbre :refer [info error warn fatal]] [onyx.log.replica] [onyx.checkpoint :as checkpoint] [onyx.extensions :as extensions]) (:import [org.apache.zookeeper KeeperException$BadVers...
3959b9f976c6893d1aacb332b831a3622d0d29673fd1c3029714607510e26315
bugarela/GADTInference
nested2.hs
data T a where {TInt :: (a ~ Int) => a -> T a; TBool :: (a ~ Bool) => a -> T a; TAny :: a -> T a} e = let f = (\z -> case z of {(TInt x, y) -> (case y of {TBool _ -> True; TInt _ -> 1});(TBool x, y) -> (case y of {TBool _ -> 1; TInt _ -> True})}) in f
null
https://raw.githubusercontent.com/bugarela/GADTInference/dd179f6df2cd76055c25c33da3187a60815688d1/examples/notInferred/nested2.hs
haskell
data T a where {TInt :: (a ~ Int) => a -> T a; TBool :: (a ~ Bool) => a -> T a; TAny :: a -> T a} e = let f = (\z -> case z of {(TInt x, y) -> (case y of {TBool _ -> True; TInt _ -> 1});(TBool x, y) -> (case y of {TBool _ -> 1; TInt _ -> True})}) in f
5f1b948f921942f035eb26aa6780bd0af45e3047042be46ed94f9c5fc7f394e2
earl-ducaine/cl-garnet
line-constraint.lisp
-*- Mode : LISP ; Syntax : Common - Lisp ; Package : GARNET - GADGETS ; Base : 10 -*- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; The Garnet User Interface Development Environment . ; ; ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; This code ...
null
https://raw.githubusercontent.com/earl-ducaine/cl-garnet/f0095848513ba69c370ed1dc51ee01f0bb4dd108/src/lapidary/line-constraint.lisp
lisp
Syntax : Common - Lisp ; Package : GARNET - GADGETS ; Base : 10 -*- ; ; This code was written as part of the Garnet project at ;;; ; ; ; ; please contact to be put on the mailing list. ;;; This file contains the functions that implement the line constraint menu functionality. ...
CHANGE LOG 07/14/93 amickish - Removed gadget from list of ignored variables in (in-package :garnet-gadgets) (defun attach-line-constraint (interactor obj) (declare (ignore interactor obj)) (declare (special *constraint-gadget*)) (let ((p (g-value *constraint-gadget* :obj-to-constrain)) (s (g-value *constr...