_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
faa9f2faa19e7e380667f04a33abd850a4d17f52f735d0abd40eda3f2d07ff95
facebook/infer
PulseResult.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/facebook/infer/12a7b8501c61a29a7c1f9a93e43bfa7cd4487490/infer/src/pulse/PulseResult.ml
ocaml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
33a2ecd19f79451b7ea42e066de8ef751ca1a10a42b26e2a8f80dc1324ffdeb1
greglook/clj-pgp
core.clj
(ns clj-pgp.core "Core functions for handling PGP objects." (:require [byte-streams :as bytes] [clj-pgp.error :as error] [clj-pgp.tags :as tags] [clojure.java.io :as io] [clojure.string :as str]) (:import (java.io ByteArrayOutputStream InputStream) java.util.Date (org.b...
null
https://raw.githubusercontent.com/greglook/clj-pgp/aa4e499ff62562fa65bbb2bee100c6ed2230bf2a/src/clj_pgp/core.clj
clojure
## Supported Algorithms ## Public Key Coercion ## Private Key Coercion
(ns clj-pgp.core "Core functions for handling PGP objects." (:require [byte-streams :as bytes] [clj-pgp.error :as error] [clj-pgp.tags :as tags] [clojure.java.io :as io] [clojure.string :as str]) (:import (java.io ByteArrayOutputStream InputStream) java.util.Date (org.b...
cdc2e7ac204bffef9e3a972752c99bb576d363d6a4e57dee444f0234e039dfac
Tritlo/PropR
unnamed.hs
prop_is5 :: Bool prop_is5 = x == 5 x :: Int x = 4 main :: IO () main = putStrLn "hello, world" ---- EXPECTED ---- -- diff --git a/tests/cases/unnamed.hs b/tests/cases/unnamed.hs -- --- a/tests/cases/unnamed.hs -- +++ b/tests/cases/unnamed.hs @@ -5,1 +5,1 = 4 -x = 4 + x = 5 -- -- diff --git a/tests/cases/unna...
null
https://raw.githubusercontent.com/Tritlo/PropR/2a3654ad07f809fb6021ef4b3805d2032a5c7826/tests/cases/unnamed.hs
haskell
-- EXPECTED ---- diff --git a/tests/cases/unnamed.hs b/tests/cases/unnamed.hs --- a/tests/cases/unnamed.hs +++ b/tests/cases/unnamed.hs diff --git a/tests/cases/unnamed.hs b/tests/cases/unnamed.hs --- a/tests/cases/unnamed.hs +++ b/tests/cases/unnamed.hs -- END EXPECTED ----
prop_is5 :: Bool prop_is5 = x == 5 x :: Int x = 4 main :: IO () main = putStrLn "hello, world" @@ -5,1 +5,1 = 4 -x = 4 + x = 5 @@ -5,1 +5,1 = 4 -x = 4 + x = ( succ ( 4 ) )
25f9d481fd42bea548c4d208fb7942c1e09627f9663e9b95f672da6334cbc5b5
rpav/cl-xcb-xlib
cffi-util.lisp
(in-package :xcb) ;; cffi-fsbv changes mem-aref semantics (defun mem-pref (ptr type &optional (index 0)) (inc-pointer ptr (* index (foreign-type-size type)))) (define-compiler-macro mem-pref (&whole whole ptr type &optional (index 0)) (if (constantp type) (if (constantp index) `(inc-pointer ,pt...
null
https://raw.githubusercontent.com/rpav/cl-xcb-xlib/1b00c44d4723b3a8334f36e731906d4679341c0e/src/cffi-util.lisp
lisp
cffi-fsbv changes mem-aref semantics memory cstruct accessors
(in-package :xcb) (defun mem-pref (ptr type &optional (index 0)) (inc-pointer ptr (* index (foreign-type-size type)))) (define-compiler-macro mem-pref (&whole whole ptr type &optional (index 0)) (if (constantp type) (if (constantp index) `(inc-pointer ,ptr ,(* (eval index) (foreign-type-size (eva...
5a1076e69f7480e80e95c1495b7ffa6c12ff064aef6f6e1329c2b1db1d845a47
ghc/packages-Cabal
LicenseListVersion.hs
module Distribution.SPDX.LicenseListVersion ( LicenseListVersion (..), cabalSpecVersionToSPDXListVersion, ) where import Distribution.CabalSpecVersion -- | SPDX License List version @Cabal@ is aware of. data LicenseListVersion = LicenseListVersion_3_0 | LicenseListVersion_3_2 | LicenseListVers...
null
https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/Distribution/SPDX/LicenseListVersion.hs
haskell
| SPDX License List version @Cabal@ is aware of.
module Distribution.SPDX.LicenseListVersion ( LicenseListVersion (..), cabalSpecVersionToSPDXListVersion, ) where import Distribution.CabalSpecVersion data LicenseListVersion = LicenseListVersion_3_0 | LicenseListVersion_3_2 | LicenseListVersion_3_6 | LicenseListVersion_3_9 deriving (Eq,...
06efe01ea88dc1ba9205f4dcff2d41efc7dcd08deb60d78233f420fa15aeb586
phronmophobic/membrane-re-frame-example
term_view.clj
(ns membrane-re-frame-example.term-view (:require [membrane.lanterna :as lanterna] [membrane.component :as component] [membrane.re-frame :as memframe] [membrane.ui :as ui :refer [horizontal-layout vertical-layout on]] ...
null
https://raw.githubusercontent.com/phronmophobic/membrane-re-frame-example/9015b3dc4cd441da4144b80aee22ad502b53476b/src/membrane_re_frame_example/term_view.clj
clojure
(ns membrane-re-frame-example.term-view (:require [membrane.lanterna :as lanterna] [membrane.component :as component] [membrane.re-frame :as memframe] [membrane.ui :as ui :refer [horizontal-layout vertical-layout on]] ...
38a23897ba6e0ef8ff410e7eb082025021bc121cb169e77dbee618115c2654a5
sjl/advent
day-03.lisp
(advent:defpackage* :advent/2017/03) (in-package :advent/2017/03) (defun neighbors (coord) (iterate (for (dx dy) :within-radius 1 :skip-origin t) (collect (+ coord (complex dx dy))))) (define-problem (2017 3) (data read) (552 330785) (values (manhattan-distance #c(0 0) (advent/spiral:number-coordi...
null
https://raw.githubusercontent.com/sjl/advent/dc3debda9bd1a0570a6ab06919b1af7b285413dc/src/2017/days/day-03.lisp
lisp
(advent:defpackage* :advent/2017/03) (in-package :advent/2017/03) (defun neighbors (coord) (iterate (for (dx dy) :within-radius 1 :skip-origin t) (collect (+ coord (complex dx dy))))) (define-problem (2017 3) (data read) (552 330785) (values (manhattan-distance #c(0 0) (advent/spiral:number-coordi...
7c9dbdb1051339d6957266dd02770705605e51d7c40138dbd1cdcdf8b6b68bb5
riemann/riemann
datadog.clj
(ns riemann.datadog "Forward events to Datadog." (:use [clojure.string :only [join split]]) (:require [clj-http.client :as client] [cheshire.core :refer [generate-string]])) (def ^:private gateway-url "") (defn datadog-metric-name "Constructs a metric-name from an event." [event] (let [service...
null
https://raw.githubusercontent.com/riemann/riemann/1649687c0bd913c378701ee0b964a9863bde7c7c/src/riemann/datadog.clj
clojure
A name for the forwarder Minimum 5 threads Maxium 100 threads
(ns riemann.datadog "Forward events to Datadog." (:use [clojure.string :only [join split]]) (:require [clj-http.client :as client] [cheshire.core :refer [generate-string]])) (def ^:private gateway-url "") (defn datadog-metric-name "Constructs a metric-name from an event." [event] (let [service...
c49d5a967964334a3a77127c1290a4c0bb458b38b15f8f8208b2ed9b0575d602
tezos/tezos-mirror
interpreter_model.ml
(*****************************************************************************) (* *) (* Open Source License *) Copyright ( c ) 2021 Nomadic Labs , < > (* ...
null
https://raw.githubusercontent.com/tezos/tezos-mirror/cdc7a4382ef6dfcd6c73f86d9a29b829b33d18d4/src/proto_015_PtLimaPt/lib_benchmarks_proto/interpreter_model.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 A...
b5f7f98292cda1d04550fb7d4ae2692245b2a08514898820c984903159cc1ae1
coccinelle/coccinelle
int32.mli
val zero : int32 val one : int32 val minus_one : int32 external neg : int32 -> int32 = "%int32_neg" external add : int32 -> int32 -> int32 = "%int32_add" external sub : int32 -> int32 -> int32 = "%int32_sub" external mul : int32 -> int32 -> int32 = "%int32_mul" external div : int32 -> int32 -> int32 = "%int32_div" val ...
null
https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.14/int32.mli
ocaml
val zero : int32 val one : int32 val minus_one : int32 external neg : int32 -> int32 = "%int32_neg" external add : int32 -> int32 -> int32 = "%int32_add" external sub : int32 -> int32 -> int32 = "%int32_sub" external mul : int32 -> int32 -> int32 = "%int32_mul" external div : int32 -> int32 -> int32 = "%int32_div" val ...
7e787cbd13cad0d2b09000bab6dadfd51270fd267334eb0409e87080c4fe9698
chaoxu/fancy-walks
D.hs
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances # {-# OPTIONS_GHC -O2 #-} import Data.List import Data.Maybe import Data.Char import Data.Array.IArray import Data.Array.Unboxed (UArray) import Data.Int import Data.Ratio import Data.Bits import Data.Function import Data.Ord import Control ...
null
https://raw.githubusercontent.com/chaoxu/fancy-walks/952fcc345883181144131f839aa61e36f488998d/codeforces.com/95/D.hs
haskell
# OPTIONS_GHC -O2 # calculate the answer for [0,n) -------------------------------------------------------------------- -------------------------------------------------------------------- --------------------------------------------------------------------
# LANGUAGE MultiParamTypeClasses , FunctionalDependencies , FlexibleInstances # import Data.List import Data.Maybe import Data.Char import Data.Array.IArray import Data.Array.Unboxed (UArray) import Data.Int import Data.Ratio import Data.Bits import Data.Function import Data.Ord import Control . Monad . State import C...
097b8bb5d0f49722e74aacd79a8ad1786b3dcfa0d2ea600bcdf6fd418510e4e8
Apress/practical-webdev-haskell
AesonHelper.hs
module Adapter.HTTP.API.Types.AesonHelper where import ClassyPrelude import Data.Aeson.TH import Data.Aeson.Types import Language.Haskell.TH.Syntax withSmartConstructor :: (a -> Either [Text] b) -> a -> Parser b withSmartConstructor constructor a = case constructor a of Left errs -> fail $ intercalate ". " . ma...
null
https://raw.githubusercontent.com/Apress/practical-webdev-haskell/17b90c06030def254bb0497b9e357f5d3b96d0cf/09/src/Adapter/HTTP/API/Types/AesonHelper.hs
haskell
module Adapter.HTTP.API.Types.AesonHelper where import ClassyPrelude import Data.Aeson.TH import Data.Aeson.Types import Language.Haskell.TH.Syntax withSmartConstructor :: (a -> Either [Text] b) -> a -> Parser b withSmartConstructor constructor a = case constructor a of Left errs -> fail $ intercalate ". " . ma...
988f5fcac67b2d58a3443aa3a882e79b443abd74a14ba63d01ee336a95ff557a
icicle-lang/zebra-ambiata
Data.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # {-# LANGUAGE DeriveTraversable #-} # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE NoImplicitPrelude # {-# OPTIONS_GHC -funbox-strict-fields #-} module Zebra.Table.Data ( Field(..) , FieldName(..) ...
null
https://raw.githubusercontent.com/icicle-lang/zebra-ambiata/394ee5f98b4805df2c76abb52cdaad9fd7825f81/zebra-core/src/Zebra/Table/Data.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE DeriveTraversable # # OPTIONS_GHC -funbox-strict-fields # be able to default to empty lists/maps and 'none' enum values, so we go for a simpler approach where the default value is implied. ^ Table/column can NOT be replaced by a default value if missing. ^ Table/column can be ...
# LANGUAGE DeriveFoldable # # LANGUAGE DeriveFunctor # # LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE NoImplicitPrelude # module Zebra.Table.Data ( Field(..) , FieldName(..) , Variant(..) , VariantName(..) , Tag(..) , Default(..) , hasVariant , lookupVariant , forVari...
f2b6ca31589ae32a94d8574f720744e21eb65c75e11155ca20b03443cd81906f
gwathlobal/CotD
mission.lisp
(in-package :cotd) (defclass mission () ((mission-type-id :initarg :mission-type-id :accessor mission-type-id) (x :initarg :x :accessor x) (y :initarg :y :accessor y) (world-sector :initarg :world-sector :accessor world-sector) (faction-list :initform () :initarg :faction-list :accessor faction-list) ;; ...
null
https://raw.githubusercontent.com/gwathlobal/CotD/d01ef486cc1d3b21d2ad670ebdb443e957290aa2/src/mission.lisp
lisp
list of faction-type-id list of level-modifier-id serves the id of the player specific faction placement function ======================= Auxiliary funcs ======================= prepare the list of cells north east south west iterate through the list of cells if the loop is not over - increase the boundarie...
(in-package :cotd) (defclass mission () ((mission-type-id :initarg :mission-type-id :accessor mission-type-id) (x :initarg :x :accessor x) (y :initarg :y :accessor y) (world-sector :initarg :world-sector :accessor world-sector) (player-specific-faction :initarg :player-specific-faction :accessor player-s...
c70a133aba87e5f6aa1cdcc0f052531202edf9ded69e06a26038ea59b75377f3
EuAndreh/cl-BSON
cl-bson.lisp
(defpackage cl-bson-test (:import-from arrow-macros ->) (:import-from babel string-to-octets) (:import-from intbytes int32->octets octets->int32) (:import-from local-time now nsec-of timestamp ...
null
https://raw.githubusercontent.com/EuAndreh/cl-BSON/4854aa9d64beaedeb1c2d0af16ec3ffe69447829/t/cl-bson.lisp
lisp
NOTE: To run this test file, execute `(asdf:test-system :cl-bson)' in your Lisp.
(defpackage cl-bson-test (:import-from arrow-macros ->) (:import-from babel string-to-octets) (:import-from intbytes int32->octets octets->int32) (:import-from local-time now nsec-of timestamp ...
22a20f61fb7669534d8c670497a3782f01881fd8f8b70752d5c0c0b373a5f44d
fourmolu/fourmolu
promotion-1-four-out.hs
type S2 = Proxy ('[ '[], '[]]) type S4 = Proxy ('( 'Just, ' T'T)) type S5 = Proxy ('[ 'Just, 'TT'T]) type S6 = Proxy ('( '(), '())) type S7 = Proxy ('( 'a, 'b)) type S8 = Proxy ('[Int, Bool]) type E = TypeError ('Text "Some text") type G = '[ '( 'Just, 'Bool)] type X = () '`PromotedInfix` ()
null
https://raw.githubusercontent.com/fourmolu/fourmolu/c305baac7a6fc10f27939d101837f717e4e23252/data/examples/declaration/type/promotion-1-four-out.hs
haskell
type S2 = Proxy ('[ '[], '[]]) type S4 = Proxy ('( 'Just, ' T'T)) type S5 = Proxy ('[ 'Just, 'TT'T]) type S6 = Proxy ('( '(), '())) type S7 = Proxy ('( 'a, 'b)) type S8 = Proxy ('[Int, Bool]) type E = TypeError ('Text "Some text") type G = '[ '( 'Just, 'Bool)] type X = () '`PromotedInfix` ()
d8195ae92c953c0096885d9ec895ce9bbcec08c2d03d36f2ac83ad83b15f0b25
bsansouci/bsb-native
ratio.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Crista...
null
https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/otherlibs/num/ratio.mli
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 GNU Library General Public License , with * Operation on rational numbers . This mod...
2b3e217f64a724c301653ddd135d71ea6acbc32a2a45a86a17613eb0b5ab02e1
fyquah/hardcaml_zprize
zprize_ntt.ml
module For_vitis = For_vitis module Load_sm = Load_sm module Memory_layout = Memory_layout module Store_sm = Store_sm module Top = Top module Top_config = Top_config
null
https://raw.githubusercontent.com/fyquah/hardcaml_zprize/553b1be10ae9b977decbca850df6ee2d0595e7ff/zprize/ntt/hardcaml/src/zprize_ntt.ml
ocaml
module For_vitis = For_vitis module Load_sm = Load_sm module Memory_layout = Memory_layout module Store_sm = Store_sm module Top = Top module Top_config = Top_config
fea893ccc677e0123fa4057bbd27e92b3732965435edfd07df862fcd42f723af
LPCIC/matita
notationEnv.mli
Copyright ( C ) 2004 - 2005 , HELM Team . * * This file is part of HELM , an Hypertextual , Electronic * Library of Mathematics , developed at the Computer Science * Department , University of Bologna , Italy . * * is free software ; you can redistribute it and/or * modify it under the terms of ...
null
https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/content/notationEnv.mli
ocaml
* {2 Types} the level of the expected term * looked up value not found in environment * looked up value has the wrong type * parameters are value name and value type in environment * @raise Invalid_argument * {2 Environment lookup} v -> Some v v -> None None binding [] binding t -> OptType t t -> L...
Copyright ( C ) 2004 - 2005 , HELM Team . * * This file is part of HELM , an Hypertextual , Electronic * Library of Mathematics , developed at the Computer Science * Department , University of Bologna , Italy . * * is free software ; you can redistribute it and/or * modify it under the terms of ...
aba36b72c8991d4813414bda117df002c307e97a5073acd29decf1e32d9334d3
mathinstitut/goemaxima
errortostring.lisp
;; Custom version of erromsg() to collect the error as ;; a string after it has been formatted Matti Harjula 2019 (defmfun $errormsgtostring () "errormsgtostring() returns the maxima-error message as string." (apply #'aformat nil (cadr $error) (caddr (process-error-argl (cddr $error)))) )
null
https://raw.githubusercontent.com/mathinstitut/goemaxima/2850e0d6af503fc8602d80340a0557f6f14affd2/stack/2023010400/maxima/errortostring.lisp
lisp
Custom version of erromsg() to collect the error as a string after it has been formatted
Matti Harjula 2019 (defmfun $errormsgtostring () "errormsgtostring() returns the maxima-error message as string." (apply #'aformat nil (cadr $error) (caddr (process-error-argl (cddr $error)))) )
2e5208d39bae578fbe45c1d367aa3662e917ee349648753ae878d4ea834bbcf5
monadbobo/ocaml-core
test.mli
(* sample mli showing everything that 'with fields' introduces *) NOTES : ( 1 ) this file was hand generated and can therefore get out of sync with the actual interface of the generated code . ( 2 ) The file generated_test.mli does not have this problem as it is generated by ocamlp4...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/fieldslib/sample/test.mli
ocaml
sample mli showing everything that 'with fields' introduces symbol : string;
NOTES : ( 1 ) this file was hand generated and can therefore get out of sync with the actual interface of the generated code . ( 2 ) The file generated_test.mli does not have this problem as it is generated by ocamlp4o from the file test.mli ( 3 ) The types we list here are ac...
22ab290b9bccbfb24cc010a044b6cade8ea208a57f5bae5ca1ad685787f88892
mzp/coq-ide-for-ios
typeclasses_errors.mli
(************************************************************************) v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/pretyping/typeclasses_errors.mli
ocaml
********************************************************************** // * This file is distributed under the terms of the * GNU Lesser General Public License Version 2.1 ********************************************************************** i i Class name, method found, exp...
v * The Coq Proof Assistant / The Coq Development Team < O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010 \VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * i $ I d : typeclasses_errors....
95d341e5b6bc776c4e24fc44aefe01ba1e5175166690d13f74015854eb100267
eigenhombre/clj-org
test_util.clj
(ns clj-org.test-util (:require [clojure.test :refer [are deftest is]])) (defn should= [& args] (is (apply = args))) (def ^:private counter (atom 0)) (defn test-name-symbol [] (let [ret (format "examples-%d-test" @counter)] (swap! counter inc) (symbol ret))) (defmacro describe-examples [right-fn left-...
null
https://raw.githubusercontent.com/eigenhombre/clj-org/46a1ead7ec28e931ff489c1d0b2b47d3d4a479be/test/clj_org/test_util.clj
clojure
(ns clj-org.test-util (:require [clojure.test :refer [are deftest is]])) (defn should= [& args] (is (apply = args))) (def ^:private counter (atom 0)) (defn test-name-symbol [] (let [ret (format "examples-%d-test" @counter)] (swap! counter inc) (symbol ret))) (defmacro describe-examples [right-fn left-...
d20227091616689491ba55c146a141fca096f2cd0740941defead107ee3fadfa
rnons/lord
main.hs
{-# LANGUAGE OverloadedStrings #-} import Data.Maybe (fromJust) import Test.Hspec import Test.HUnit import Web.Radio (getPlaylist, readToken) import qualified Web.Radio.Cmd as Cmd import Web.Radio.EightTracks import Web.Radio.Douban import Web.Radio.Jing import qualified Web.Radio.Reddit as Reddit main :: IO () main...
null
https://raw.githubusercontent.com/rnons/lord/31d632306c3a972da2c3fd1f5359277543bfa669/test/main.hs
haskell
# LANGUAGE OverloadedStrings #
import Data.Maybe (fromJust) import Test.Hspec import Test.HUnit import Web.Radio (getPlaylist, readToken) import qualified Web.Radio.Cmd as Cmd import Web.Radio.EightTracks import Web.Radio.Douban import Web.Radio.Jing import qualified Web.Radio.Reddit as Reddit main :: IO () main = hspec spec spec :: Spec spec = ...
de31a3d0a7406c28c2cef2c15766000fe741516df63eeb7ac942b339f59f8336
brownplt/Resugarer
macro.rkt
(module macros racket (provide define-macro lookup-macro expand-pattern unexpand-pattern ; testing: unchecked-unexpand NotUnexpandable? Macro Macro-cases MacroCase expand-macro) (require "utility.rkt") (require "pattern.rkt") Defining Macros ; ; ; (struct MacroCase (left right) #:tr...
null
https://raw.githubusercontent.com/brownplt/Resugarer/1353b4309c101f0f1ac2df2cba7f3cba1f0a3a37/prototype/macro.rkt
racket
testing: ; ; { macro-name -> macro } why (p ...)? ; ; TODO: check that each var on the rhs appears under at least as many TODO: Figure out duplicate rhs variables. Expanding & Unexpanding Macros ;;; Fail to unexpand if a macro is tainted
(module macros racket (provide define-macro lookup-macro expand-pattern unexpand-pattern unchecked-unexpand NotUnexpandable? Macro Macro-cases MacroCase expand-macro) (require "utility.rkt") (require "pattern.rkt") (struct MacroCase (left right) #:transparent) (struct Macro (name cases...
80b139587b2d47af9df5a767ebef874d49bc13f816ef79eb7374c87e714f1061
evilmartians/foundry
test_foundry.ml
open OUnit Collect the tests of different modules into one test suite let suite = "Foundry" >::: [Test_big_int_conv.suite] let _ = run_test_tt_main suite
null
https://raw.githubusercontent.com/evilmartians/foundry/ce947c7dcca79ab7a7ce25870e9fc0eb15e9c2bd/unittest/test_foundry.ml
ocaml
open OUnit Collect the tests of different modules into one test suite let suite = "Foundry" >::: [Test_big_int_conv.suite] let _ = run_test_tt_main suite
c045a166b5755bb2cad0e59fd83772a35b0207f86c40bed739a596fe0b12b36e
Octachron/babilim
escape.ml
let string s = (* Escape only C0 control characters (bytes <= 0x1F), DEL(0x7F), '\\' and '"' *) let n = ref 0 in for i = 0 to String.length s - 1 do n := !n + (match String.unsafe_get s i with | '\"' | '\\' | '\n' | '\t' | '\r' | '\b' -> 2 | '\x00' .. '\x1F' | '\x7F' -> 4 | ...
null
https://raw.githubusercontent.com/Octachron/babilim/46b0412cd6efef5efe26bfd379566688bf7ab571/po/escape.ml
ocaml
Escape only C0 control characters (bytes <= 0x1F), DEL(0x7F), '\\' and '"'
let string s = let n = ref 0 in for i = 0 to String.length s - 1 do n := !n + (match String.unsafe_get s i with | '\"' | '\\' | '\n' | '\t' | '\r' | '\b' -> 2 | '\x00' .. '\x1F' | '\x7F' -> 4 | _ -> 1) done; if !n = String.length s then s else begin let s' = Bytes.crea...
0c33dd96bdea6e30c7e70565e6cc8230b7dd3d1879814580d6d85b9e30c5fbe1
kimim/re-echarts
browser.cljs
(ns starter.browser (:require [reagent.dom :as rdom] [re-echarts.core :refer [ECharts]])) (defn myechart [] [:> ECharts {:style {:width "800px" :height "600px"} :theme "dark" :option {:title {:text "Echarts is here"} :dataset {:dimention [:Week :Value] ...
null
https://raw.githubusercontent.com/kimim/re-echarts/c5ee516e222095213be1a50d0139fa140742eb9f/example/src/starter/browser.cljs
clojure
start is called by init and after code reloading finishes init is called ONCE when the page loads this is called in the index.html and must be exported so it is available even in :advanced release builds this is called before any code is reloaded
(ns starter.browser (:require [reagent.dom :as rdom] [re-echarts.core :refer [ECharts]])) (defn myechart [] [:> ECharts {:style {:width "800px" :height "600px"} :theme "dark" :option {:title {:text "Echarts is here"} :dataset {:dimention [:Week :Value] ...
0880df3c482510adcdca7a4de8b6b2ae1d092cc1a1e4bd1d511d11689c624445
hipsleek/hipsleek
cvpermUtils.ml
#include "xdebug.cppo" open VarGen open Gen open Globals open Cpure let remove_dups = Gen.BList.remove_dups_eq eq_spec_var_ident let check_dups = Gen.BList.check_dups_eq eq_spec_var_ident let diff = Gen.BList.difference_eq eq_spec_var_ident let intersect = Gen.BList.intersect_eq eq_spec_var_ident let overlap = Gen.BLi...
null
https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/src/cvpermUtils.ml
ocaml
To store vperm of variables vperm_frac_vars: (Frac.frac * spec_var list) list; simpler unused cos of ivperm? else { vp with vperm_unprimed_flag = true; } let vperm_rm_prime vps = let pr = !print_vperm_sets in is_empty xs (is_empty vps.vperm_zero_vars) && is_empty xs @zero[x] * @z...
#include "xdebug.cppo" open VarGen open Gen open Globals open Cpure let remove_dups = Gen.BList.remove_dups_eq eq_spec_var_ident let check_dups = Gen.BList.check_dups_eq eq_spec_var_ident let diff = Gen.BList.difference_eq eq_spec_var_ident let intersect = Gen.BList.intersect_eq eq_spec_var_ident let overlap = Gen.BLi...
8df8cecd3f0712d26e078220f88b0a17ee50892910635fee7739bc5da3352f05
hasktorch/hasktorch
Training.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # {-# LANGUAGE RankNTypes #-} # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Torch.GraduallyTyped.NN.Training where import Control.Monad.IO.Class (MonadIO (..)) import qualified Pipes as P import qualified Pipes.Prelude as P import Torch.GraduallyTyped.N...
null
https://raw.githubusercontent.com/hasktorch/hasktorch/c34996b0a401a5b1b98b5774e892fde88adaa079/experimental/gradually-typed/src/Torch/GraduallyTyped/NN/Training.hs
haskell
# LANGUAGE RankNTypes # | optimizer for the model | model specification | stream of training examples | random generator | returned is either the original generator or the average training loss and a new generator | Evaluate the model on the given examples. | model | stream of examples | random generator | re...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE TypeFamilies # # LANGUAGE TypeOperators # module Torch.GraduallyTyped.NN.Training where import Control.Monad.IO.Class (MonadIO (..)) import qualified Pipes as P import qualified Pipes.Prelude as P import Torch.GraduallyTyped.NN.Class (HasForward (..), Ha...
92f0ad45640385267d967347752208ffcf1e0aa2c80763e584aa8374a1dc9d59
TyOverby/mono
hash_queue_intf.ml
open! Import (** The key is used for the hashtable of queue elements. *) module type Key = Hashtbl.Key_plain module type S1 = sig type 'key create_arg type 'key create_key (** A hash-queue, where the values are of type ['data]. *) type ('key, 'data) t [@@deriving sexp_of] include Container.S1_phantom_inva...
null
https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-core/core/src/hash_queue_intf.ml
ocaml
* The key is used for the hashtable of queue elements. * A hash-queue, where the values are of type ['data]. * [invariant t] checks the invariants of the queue. * Clears the queue. * Makes a fresh copy of the queue with identical contents to the original. * [mem q k] returns true iff there is some (k, v) in the qu...
open! Import module type Key = Hashtbl.Key_plain module type S1 = sig type 'key create_arg type 'key create_key type ('key, 'data) t [@@deriving sexp_of] include Container.S1_phantom_invariant with type ('data, 'key) t := ('key, 'data) t val invariant : ('key, 'data) t -> unit * [ create ( ) ] returns ...
dc5b6ca479743284f50911b536e4158423f184e12d45246a33cf8bc164c22997
mbj/stratosphere
RuleActionProperty.hs
module Stratosphere.WAFv2.WebACL.RuleActionProperty ( module Exports, RuleActionProperty(..), mkRuleActionProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.WAFv2.WebACL.AllowActionProperty as ...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/wafv2/gen/Stratosphere/WAFv2/WebACL/RuleActionProperty.hs
haskell
# SOURCE # # SOURCE # # SOURCE # # SOURCE # # SOURCE #
module Stratosphere.WAFv2.WebACL.RuleActionProperty ( module Exports, RuleActionProperty(..), mkRuleActionProperty ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties data RuleActionProperty = Rule...
ec38242c145ff808d14ee2bf54bb687ae2b58e9b690af64c78eb7b3cfe447350
WorksHub/client
video_player.cljc
(ns wh.components.video-player (:require [clojure.string :as str] [wh.interop :as interop])) (defn open-on-click [youtube-id] (interop/on-click-fn (interop/open-video-player youtube-id)))
null
https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/common/src/wh/components/video_player.cljc
clojure
(ns wh.components.video-player (:require [clojure.string :as str] [wh.interop :as interop])) (defn open-on-click [youtube-id] (interop/on-click-fn (interop/open-video-player youtube-id)))
362e816bdecc34aa03f54de27eee81d0e2ca303d12a8153c2d1a22a1b1fd8b68
janestreet/sexp
located.ml
open Core module X = Lazy_list let of_list (xs : 'a list) : 'a X.t = X.of_list xs type 'a t = | Stdin of string option * 'a | Files of (string * 'a) X.t let map t ~f = match t with | Stdin (label, x) -> Stdin (label, f x) | Files fs -> Files (X.map fs ~f:(fun (label, x) -> label, f x)) ;; let iter t ~f = ...
null
https://raw.githubusercontent.com/janestreet/sexp/56e485b3cbf8a43e1a8d7647b0df31b27053febf/bin/located.ml
ocaml
open Core module X = Lazy_list let of_list (xs : 'a list) : 'a X.t = X.of_list xs type 'a t = | Stdin of string option * 'a | Files of (string * 'a) X.t let map t ~f = match t with | Stdin (label, x) -> Stdin (label, f x) | Files fs -> Files (X.map fs ~f:(fun (label, x) -> label, f x)) ;; let iter t ~f = ...
f25875567d9a41ad5359ba586d8b78736345f8f18faf0f7fbfcee34106199437
janestreet/ppx_css
parser.mli
val parse_stylesheet : ?container_lnum:int -> ?pos:Lexing.position -> string -> Types.Stylesheet.t val parse_declaration_list : ?container_lnum:int -> ?pos:Lexing.position -> string -> Types.Declaration_list.t
null
https://raw.githubusercontent.com/janestreet/ppx_css/5848e1dc76b0ecf504e3b01d07d05741759cee72/vendor/css_parser/src/parser.mli
ocaml
val parse_stylesheet : ?container_lnum:int -> ?pos:Lexing.position -> string -> Types.Stylesheet.t val parse_declaration_list : ?container_lnum:int -> ?pos:Lexing.position -> string -> Types.Declaration_list.t
6c97e91df9489ef5eb317814f695516d2bc20a7c44422aaf26d43e8310704a61
metaocaml/ber-metaocaml
ocamlprof.ml
(**************************************************************************) (* *) (* OCaml *) (* *) an...
null
https://raw.githubusercontent.com/metaocaml/ber-metaocaml/4992d1f87fc08ccb958817926cf9d1d739caf3a2/tools/ocamlprof.ml
ocaml
************************************************************************ OCaml ...
and , INRIA Rocquencourt Ported to Caml Special Light by Copyright 1996 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Printf open Location open Parsetree let idprefix = "...
0e9ba7ab9e275b54a78736f2a11612a6664bdd6a265280470be4c8c47b6704f3
RichiH/git-annex
Tor.hs
git - remote - daemon , tor hidden service server and transport - - Copyright 2016 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2016 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module RemoteDaemon.Transport.Tor (server, transport) where import...
null
https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/RemoteDaemon/Transport/Tor.hs
haskell
Run tor hidden service. On reload, the configuration may have changed to enable the tor hidden service. If it was not enabled before, start it, We can ignore all other messages; no need to restart the hidden service when the network changes as tor takes care of all that. How many clients to serve at a time, max...
git - remote - daemon , tor hidden service server and transport - - Copyright 2016 < > - - Licensed under the GNU GPL version 3 or higher . - - Copyright 2016 Joey Hess <> - - Licensed under the GNU GPL version 3 or higher. -} module RemoteDaemon.Transport.Tor (server, transport) where import...
0a6b3f7e757e5bcc5d1f64c79d8e5cc43ec75b948fbee0513a2012ecbf735d9c
randomseed-io/bankster
registry.clj
(ns io.randomseed.bankster.registry ^{:doc "Bankster, registry management." :author "Paweł Wilk" :added "1.0.0"} (:refer-clojure :exclude [new get set! update]) (:require [clojure.string :as str] [io.randomseed.bankster :as bankster] ...
null
https://raw.githubusercontent.com/randomseed-io/bankster/15fc1de1889a760a5fc3d1180c91ee5878b81c47/src/io/randomseed/bankster/registry.clj
clojure
Registry version generator. Dynamic registry. Registry state getter. Registry constructor. Registry operations. Contextual macro. Getters and helpers. Printing.
(ns io.randomseed.bankster.registry ^{:doc "Bankster, registry management." :author "Paweł Wilk" :added "1.0.0"} (:refer-clojure :exclude [new get set! update]) (:require [clojure.string :as str] [io.randomseed.bankster :as bankster] ...
701cafe1e69b420a0db4c7ecdc56b9e7258e98981b18a95eed875f8f1d778fd1
Elzair/nazghul
amy.scm
;;---------------------------------------------------------------------------- ;; Constants ;;---------------------------------------------------------------------------- (define amy-lvl 1) (define amy-species sp_human) (define amy-occ oc_wright) ;;----------------------------------------------------------------------...
null
https://raw.githubusercontent.com/Elzair/nazghul/8f3a45ed6289cd9f469c4ff618d39366f2fbc1d8/worlds/haxima-1.002/amy.scm
scheme
---------------------------------------------------------------------------- Constants ---------------------------------------------------------------------------- ---------------------------------------------------------------------------- Schedule ------------------------------------------------------------------...
(define amy-lvl 1) (define amy-species sp_human) (define amy-occ oc_wright) In the Poor House ( at least until such time as she joins the ) . (define amy-bed poorh-bed2) (define amy-mealplace poorh-sup2) (define amy-workplace poorh-pasture) (define amy-leisureplace poorh-dining) (kern-mk-sched 'sch_amy ...
8842fe92f9ad4394130b2644ab6651a104a6e0894d0d6f1ae9165441a99e65a0
Lupino/haskell-periodic
Worker.hs
module Periodic.Worker ( WorkerM , startWorkerM , ping , addFunc , broadcast , removeFunc , work , close ) where import Metro.TP.Socket (Socket, socket) import Periodic.Trans.Worker type WorkerM = WorkerT Socket IO startWorkerM :: String -> WorkerM () -> IO () startWorkerM...
null
https://raw.githubusercontent.com/Lupino/haskell-periodic/c04517bb9195b39c8ddc8839d367f9adf219c6bc/periodic-client/src/Periodic/Worker.hs
haskell
module Periodic.Worker ( WorkerM , startWorkerM , ping , addFunc , broadcast , removeFunc , work , close ) where import Metro.TP.Socket (Socket, socket) import Periodic.Trans.Worker type WorkerM = WorkerT Socket IO startWorkerM :: String -> WorkerM () -> IO () startWorkerM...
07b640617bc635a4f63672e848752bc747cd7d9c046caa36a82a41eb9e66a1b5
Mesabloo/nihil
MissingFieldsInRecord.hs
module Nihil.TypeChecking.Errors.MissingFieldsInRecord where import Nihil.Utils.Source import Text.PrettyPrint.ANSI.Leijen import Prelude hiding ((<$>)) missingFieldsInRecord :: [String] -> SourcePos -> Doc missingFieldsInRecord fs pos = nest 4 (text "> Record is missing fields:" <$> description) where descript...
null
https://raw.githubusercontent.com/Mesabloo/nihil/3821052ca5691a6492b23bd8a46bfe70567d374f/src/typechecker/Nihil/TypeChecking/Errors/MissingFieldsInRecord.hs
haskell
module Nihil.TypeChecking.Errors.MissingFieldsInRecord where import Nihil.Utils.Source import Text.PrettyPrint.ANSI.Leijen import Prelude hiding ((<$>)) missingFieldsInRecord :: [String] -> SourcePos -> Doc missingFieldsInRecord fs pos = nest 4 (text "> Record is missing fields:" <$> description) where descript...
987159117afa288345da8ba9fd6b30ae62c71c1472fd3ce9564cf6b5a7534682
janestreet/universe
splittable_random.ml
* This module implements " Fast Splittable Pseudorandom Number Generators " by et . al . ( 1 ) . The paper 's algorithm provides decent randomness for most purposes , but sacrifices cryptographic - quality randomness in favor of performance . The original implementation was tested with DieHarder ...
null
https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/splittable_random/src/splittable_random.ml
ocaml
[perturb] is not from any external source, but provides a way to mix in external entropy with a pseudo-random state. We abuse terminology and refer to individual values as biased or unbiased. More properly, what is unbiased is the sampler that results if we keep only these "unbiased" values. This imple...
* This module implements " Fast Splittable Pseudorandom Number Generators " by et . al . ( 1 ) . The paper 's algorithm provides decent randomness for most purposes , but sacrifices cryptographic - quality randomness in favor of performance . The original implementation was tested with DieHarder ...
ce1021b4de3e650946a948c0ab8a19bb04818a15f566b2560eb779076e7eeedb
stevana/hot-swapping-state-machines
Interpreter.hs
{-# LANGUAGE GADTs #-} module Interpreter where import StateMachine ------------------------------------------------------------------------ eval1 :: FreeFunc s i o -> (i -> s -> (s, o)) eval1 func i s = case func of Id -> (s, i) Compose g f -> let (s', o) = eval1 f i s in eval1 g o s' Copy -> (s, (i, i)) C...
null
https://raw.githubusercontent.com/stevana/hot-swapping-state-machines/c00cf5cb962a436aff92a390e39b406f020e438a/src/Interpreter.hs
haskell
# LANGUAGE GADTs # ----------------------------------------------------------------------
module Interpreter where import StateMachine eval1 :: FreeFunc s i o -> (i -> s -> (s, o)) eval1 func i s = case func of Id -> (s, i) Compose g f -> let (s', o) = eval1 f i s in eval1 g o s' Copy -> (s, (i, i)) Consume -> (s, ()) Par f g -> let (s', o) = eval1 f (fst i) s ...
0a6331f22853c869959b21d94b01bfae7e797e5917a284239a3c2f375196c02b
zkincaid/duet
transition.mli
(** Transition formulas. *) open Syntax module type Var = sig type t val pp : Format.formatter -> t -> unit val show : t -> string val typ : t -> [ `TyInt | `TyReal ] val compare : t -> t -> int val symbol_of : t -> symbol val of_symbol : symbol -> t option end module Make (C : sig type t ...
null
https://raw.githubusercontent.com/zkincaid/duet/d204e01acc3662477abe664e8c24ce4e8abc73e9/srk/src/transition.mli
ocaml
* Transition formulas. * Guarded parallel assignment * [assume phi] is a transition that doesn't modify any variables, but can only be executed when [phi] holds * [assign v t] is a transition that assigns the term [t] to the variable [v]. * Parallel assignment of a list of terms to a list of variables. ...
open Syntax module type Var = sig type t val pp : Format.formatter -> t -> unit val show : t -> string val typ : t -> [ `TyInt | `TyReal ] val compare : t -> t -> int val symbol_of : t -> symbol val of_symbol : symbol -> t option end module Make (C : sig type t val context : t context ...
1fc80e2686149ec6b5d706dc990a4d25112309d04a8a40913aa6f7c97050da7f
larrychristensen/orcpub
weapons.cljc
(ns orcpub.dnd.e5.weapons (:require [orcpub.common :as common])) (def weapons [{:name "Crossbow, light", ::damage-type :piercing, ::damage-die 8, ::type :simple, ::damage-die-count 1, ::ranged? true, ::range {::min 80, ::max 320}, :key :crossbow-light ::two-handed? true ::ammuni...
null
https://raw.githubusercontent.com/larrychristensen/orcpub/e83995857f7e64af1798009a45a0b03abcd3a4be/src/cljc/orcpub/dnd/e5/weapons.cljc
clojure
(ns orcpub.dnd.e5.weapons (:require [orcpub.common :as common])) (def weapons [{:name "Crossbow, light", ::damage-type :piercing, ::damage-die 8, ::type :simple, ::damage-die-count 1, ::ranged? true, ::range {::min 80, ::max 320}, :key :crossbow-light ::two-handed? true ::ammuni...
e72b942744885f9ddf5722d5d591481a7892f97a5bb4df000284da2ae5437681
danoctavian/bit-smuggler
Server.hs
{-# LANGUAGE RecordWildCards, TupleSections #-} module Network.BitSmuggler.Server where import Prelude as P hiding (read) import Network.BitSmuggler.Crypto as Crypto import System.Log.Logger import Data.Word import Control.Monad.Trans.Resource import qualified Data.ByteString.Lazy as BSL import Data.ByteString as BS i...
null
https://raw.githubusercontent.com/danoctavian/bit-smuggler/4385ed67f1fec4ed441832fc9a119de632b796aa/BitSmuggler/src/Network/BitSmuggler/Server.hs
haskell
# LANGUAGE RecordWildCards, TupleSections # SERVER. run single torrent client - running many potentially blows the cover a normal peer in the bittorrent network runs a single instance of some torrent client the files on which the server is "listening" start torrent client (with config) setup the files on wh...
module Network.BitSmuggler.Server where import Prelude as P hiding (read) import Network.BitSmuggler.Crypto as Crypto import System.Log.Logger import Data.Word import Control.Monad.Trans.Resource import qualified Data.ByteString.Lazy as BSL import Data.ByteString as BS import Control.Monad.IO.Class import Control.Appl...
909a46db5ffab29601fe95dab053a45d9465598b29cf6238b7dd4f8639eeceb0
clojure-interop/google-cloud-clients
core.clj
(ns core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[com.google.cloud.spanner.core]) (require '[com.google.cloud.spanner.admin.database.v1.core]) (require '[com.google.cloud.spanner.admin.database.v1.stub.core]) (require '[com.google.cloud.spanner.admin.instance.v1.core]) (require '[com...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/core.clj
clojure
(ns core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[com.google.cloud.spanner.core]) (require '[com.google.cloud.spanner.admin.database.v1.core]) (require '[com.google.cloud.spanner.admin.database.v1.stub.core]) (require '[com.google.cloud.spanner.admin.instance.v1.core]) (require '[com...
445f0ef548e4256ed3e76bbd806a44fb2f36364a00eacf19bc4b98cd7531fa5d
hopv/MoCHi
BRA_state.ml
open BRA_types let rec default_val t = {Syntax.desc = default_val' t; Syntax.typ = t; attr=[]} and default_val' = let open Syntax in let open Type in function | TBase TUnit -> Const Unit | TBase TBool -> Const False | TBase TInt -> Const (Int 0) | TBase (TPrim _) -> invalid_arg "default_val: not ye...
null
https://raw.githubusercontent.com/hopv/MoCHi/b0ac0d626d64b1e3c779d8e98cb232121cc3196a/src/BRA_state.ml
ocaml
remove variables of functional type
open BRA_types let rec default_val t = {Syntax.desc = default_val' t; Syntax.typ = t; attr=[]} and default_val' = let open Syntax in let open Type in function | TBase TUnit -> Const Unit | TBase TBool -> Const False | TBase TInt -> Const (Int 0) | TBase (TPrim _) -> invalid_arg "default_val: not ye...
1f79f0c4b121b1e95c6cdecbbe500becabb56ff8135d64d393aa9954d8a668ee
haskell-opengl/GLUT
BezMesh.hs
( adapted from bezmesh.c which is ( c ) Silicon Graphics , Inc ) Copyright ( c ) 2002 - 2018 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE This program renders a lighted , filled surface , using two - dimensional ...
null
https://raw.githubusercontent.com/haskell-opengl/GLUT/36207fa51e4c1ea1e5512aeaa373198a4a56cad0/examples/RedBook4/BezMesh.hs
haskell
for lighted version only
( adapted from bezmesh.c which is ( c ) Silicon Graphics , Inc ) Copyright ( c ) 2002 - 2018 < > This file is part of HOpenGL and distributed under a BSD - style license See the file libraries / GLUT / LICENSE This program renders a lighted , filled surface , using two - dimensional ...
1994bae3674563b659b0c7d9d869180c77e5a2b46e830fec0d10f33697a34ea9
PureIso/ErlangCodes
server_supervisor.erl
%% Copyright -module(server_supervisor). -author("LAB314"). %% Supervisor restarts the process that fails -behaviour(supervisor). %% API -export([start_link_shell/0,start_link/0]). %% supervisor -export([init/1]). %%% convenience method for startup start_link_shell() -> %%% supervisor process is linked to the she...
null
https://raw.githubusercontent.com/PureIso/ErlangCodes/20066f54079946fcb469dde975d79e8923e8ed96/gen_server/src/server_supervisor.erl
erlang
Copyright Supervisor restarts the process that fails API supervisor convenience method for startup supervisor process is linked to the shell process. When gen_server process crashes the exit signal is propagated up to the shell which crashes and get restarted. supervisor callback supervisor:which_children(ser...
-module(server_supervisor). -author("LAB314"). -behaviour(supervisor). -export([start_link_shell/0,start_link/0]). -export([init/1]). start_link_shell() -> {ok, Pid} = supervisor:start_link({global, ?MODULE}, ?MODULE, []), unlink(Pid). start_link() -> supervisor:start_link({global,?MODULE}, ?MODULE, []). in...
908e69ee2d471161aa4876c80a58cbedae88c62b74b65d22f88dda26ccd2d567
henrygarner/glittering
pregel.clj
(ns glittering.pregel (:require [glittering.core :as g] [t6.from-scala.core :refer [$] :as $]) (:import [org.apache.spark.graphx EdgeDirection])) (defn pregel [{:keys [initial-message max-iterations vertex-fn message-fn combiner direction] :o...
null
https://raw.githubusercontent.com/henrygarner/glittering/09ec9b6e29ae92154ec2421e86ce380c90d7b90f/src/clojure/glittering/pregel.clj
clojure
We must realise the messages
(ns glittering.pregel (:require [glittering.core :as g] [t6.from-scala.core :refer [$] :as $]) (:import [org.apache.spark.graphx EdgeDirection])) (defn pregel [{:keys [initial-message max-iterations vertex-fn message-fn combiner direction] :o...
963d43a148fb01d09b87537a482e2292f579330cecc1a33184d96fbc622522fb
bomberstudios/mtasc
swfZip.ml
* This file is part of SwfLib * Copyright ( c)2004 * * 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 ...
null
https://raw.githubusercontent.com/bomberstudios/mtasc/d7c2441310248776aa89d60f9c8f98d539bfe8de/src/swflib/swfZip.ml
ocaml
* This file is part of SwfLib * Copyright ( c)2004 * * 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 ...
9f09c17a7cf75e624f4d600356768843e5632970a7da80a2984a85f58b4e3e6e
dinosaure/ocaml-maildir
maildir_unix.ml
module IO : Maildir.IO with type +'a t = 'a = struct type +'a t = 'a let bind v f = f v let map f v = f v let return v = v let (>>=) = bind let (>>|) v f = map f v end module FS : Maildir.FS with type +'a io = 'a IO.t and type t = unit and type key = Fpath.t = struct type key = Fpath.t type t...
null
https://raw.githubusercontent.com/dinosaure/ocaml-maildir/8b408f35854d1be5d15f09413a11c104d6438058/lib-unix/maildir_unix.ml
ocaml
should never occur.
module IO : Maildir.IO with type +'a t = 'a = struct type +'a t = 'a let bind v f = f v let map f v = f v let return v = v let (>>=) = bind let (>>|) v f = map f v end module FS : Maildir.FS with type +'a io = 'a IO.t and type t = unit and type key = Fpath.t = struct type key = Fpath.t type t...
854d0168d07e39473a4f7969cf8a79f76c2d21a81fd64aaab7d1ac81b9307d96
songyahui/AlgebraicEffect
files.ml
effect Open : int effect Close : int -> unit let open_file () (*@ requires _^* @*) (*@ ensures Open @*) = perform Open let close_file s (*@ requires (_^* ) .Open . ((~Close)^* ) @*) (*@ ensures Close(s) @*) = perform (Close s) let file () (*@ requires emp @*) (*@ ensures Open.Close @*) = let fd = open_f...
null
https://raw.githubusercontent.com/songyahui/AlgebraicEffect/27688952b598a101a27523be796e8011d70b02de/src/programs.t/files.ml
ocaml
@ requires _^* @ @ ensures Open @ @ requires (_^* ) .Open . ((~Close)^* ) @ @ ensures Close(s) @ @ requires emp @ @ ensures Open.Close @ @ requires emp @ @ ensures Open.Close @ @ requires emp @ @ ensures _^* @ @ requires emp @ @ ensures _^* @ fails as expected ; close_file fd @ requires emp @ @ ensures _^* @ fails...
effect Open : int effect Close : int -> unit let open_file () = perform Open let close_file s = perform (Close s) let file () = let fd = open_file () in let fd = open_file () in close_file fd let main () = match file () with | r -> () | effect (Close s1) k -> continue k () | effect Open k -> ...
ecdf5dab25c07a6afe4c174fcdb2db4c1f13cdb73c7516ced38429243c7a571a
skanev/playground
03.scm
EOPL exercise 2.03 ; ; Define a representation of all the integers (negative and nonnegative) as ; diff-trees, where a diff-tree is a list defined by the grammar ; Diff - tree : : = ( one ) | ( diff Diff - tree Diff - tree ) ; The list ( one ) represents 1 . If t₁ represents n₁ and t₂ represents n₂ , then ( d...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/02/03.scm
scheme
Define a representation of all the integers (negative and nonnegative) as diff-trees, where a diff-tree is a list defined by the grammar (diff (diff (one) (one)) (one)) is a representation of -1. system. procedures should take as input any of the multiple legal representations of an integer in this...
EOPL exercise 2.03 Diff - tree : : = ( one ) | ( diff Diff - tree Diff - tree ) The list ( one ) represents 1 . If t₁ represents n₁ and t₂ represents n₂ , then ( diff t₁ t₂ ) is a representation of n₁ - n₂. 1 . Show that every number has infinitely many representations in this 2 . Turn this representation...
453f037099b8cbaca937b9fea4e51e456f963eb6b793ca7aa8a3891ede750f04
scymtym/architecture.builder-protocol
mixins.lisp
;;;; mixins.lisp --- Unit tests for builder mixins. ;;;; Copyright ( C ) 2016 - 2022 Jan Moringen ;;;; Author : < > (cl:in-package #:architecture.builder-protocol.test) (in-suite :architecture.builder-protocol) (test forwarding-mixin.smoke "Smoke test for the `forwarding-mixin' class." (let* ((target ...
null
https://raw.githubusercontent.com/scymtym/architecture.builder-protocol/294c45debf8908d8c83b7d09320d4e82960a343b/test/mixins.lisp
lisp
mixins.lisp --- Unit tests for builder mixins. Test return value, i.e. produce tree plus additional return values.
Copyright ( C ) 2016 - 2022 Jan Moringen Author : < > (cl:in-package #:architecture.builder-protocol.test) (in-suite :architecture.builder-protocol) (test forwarding-mixin.smoke "Smoke test for the `forwarding-mixin' class." (let* ((target 'list) (delegating (make-instance 'forwarding-mixin :...
485d8782ac90d65a7fecffc90205be6d6d3b67b82183f0429ddc2de3d1148b34
josephburnett/hive-jam
core.cljs
(ns hive-jam.core (:require-macros [cljs.core.async.macros :refer [go-loop]] [cljs.core.async.macros :refer [go]]) (:require [om.core :as om :include-macros true] [om.dom :as dom :include-macros true] [cljs.core.async :refer [chan put! <! >!]] [chord.client :re...
null
https://raw.githubusercontent.com/josephburnett/hive-jam/67f21e13f4af92be791f4b16d31f04827a467747/cljs/src/hive_jam/core.cljs
clojure
Solarized Dark custom color cursor is not on this cell
(ns hive-jam.core (:require-macros [cljs.core.async.macros :refer [go-loop]] [cljs.core.async.macros :refer [go]]) (:require [om.core :as om :include-macros true] [om.dom :as dom :include-macros true] [cljs.core.async :refer [chan put! <! >!]] [chord.client :re...
ac65d5698336b260b7b3d6ba2d63fe5830fa2f33a7f2707be8c68022a4aca1cd
mikelevins/folio2
maps-types.lisp
;;;; *********************************************************************** ;;;; Name : ;;;; Project: folio2 - Functional idioms for Common Lisp ;;;; Purpose: map type definitions ;;;; Author: mikel evins Copyright : 2015 by mikel evins ;;;; ;;;; *********************************...
null
https://raw.githubusercontent.com/mikelevins/folio2/a96052f78f0e0358376a498c6351342ece6a9b7b/src/maps-types.lisp
lisp
*********************************************************************** Project: folio2 - Functional idioms for Common Lisp Purpose: map type definitions Author: mikel evins *********************************************************************** -----------------------------------------------...
Name : Copyright : 2015 by mikel evins (in-package :net.bardcode.folio2.maps) for the purposes of , an alist is a list all of whose (defmethod alist? (thing) (declare (ignore thing)) nil) (defmethod alist? ((thing cons)) (and thing (every 'consp thing))) (deftype alist () `(a...
102a0ed16790b4113ad2ce68c632a857be6a88ee27bb649afadcbc116e12bb7c
soegaard/sketching
sketch-mandelbrot.rkt
#lang sketching (define xmin -2.5) (define xmax 1.0) (define ymin -1.0) (define ymax 1.0) (define dx (- xmax xmin)) (define dy (- ymax ymin)) (define aspect (/ dx dy)) (define max-iterations 50) ; what is reasonable here? (define (setup) (define h 200) (size (int (* h aspect)) h) (color-mode 'hsb ...
null
https://raw.githubusercontent.com/soegaard/sketching/99892486efad866eabe6ab34515fb3951b2a7858/sketching-examples/examples/sketch-mandelbrot.rkt
racket
what is reasonable here? make sure draw updates the image
#lang sketching (define xmin -2.5) (define xmax 1.0) (define ymin -1.0) (define ymax 1.0) (define dx (- xmax xmin)) (define dy (- ymax ymin)) (define aspect (/ dx dy)) (define (setup) (define h 200) (size (int (* h aspect)) h) (color-mode 'hsb 360 100 100) (frame-rate 1) (no-loop)) (define (o...
172ab01f0d4dd742cc9204127992eab9dacf31d9c37c0b7418a37574808afbda
quil-lang/magicl
complex-single-float.lisp
;;;; complex-single-float.lisp ;;;; Author : (in-package #:magicl) (deftensor tensor/complex-single-float (complex single-float)) (defmatrix matrix/complex-single-float (complex single-float) tensor/complex-single-float) (defvector vector/complex-single-float (complex single-float) tensor/complex-single-float) ...
null
https://raw.githubusercontent.com/quil-lang/magicl/a10a6c8ce7c7910029d247bbc170c09d3a1e79fd/src/high-level/types/complex-single-float.lisp
lisp
complex-single-float.lisp
Author : (in-package #:magicl) (deftensor tensor/complex-single-float (complex single-float)) (defmatrix matrix/complex-single-float (complex single-float) tensor/complex-single-float) (defvector vector/complex-single-float (complex single-float) tensor/complex-single-float) (defcompatible (lambda (tensor)...
2e7ae302c7f85509fa63c2e8549d4cf81beede60c52c2ecd5842f327a8b10f60
xtdb/xtdb
bench.clj
(ns xtdb.bench (:require [clojure.data.json :as json] [clojure.java.io :as io] [clojure.string :as string] [clojure.tools.logging :as log] [juxt.clojars-mirrors.clj-http.v3v12v2.clj-http.client :as client] [xtdb.api :as xt] [xtdb.bench.cloudwatch...
null
https://raw.githubusercontent.com/xtdb/xtdb/b038f2e215b2c74898930056859162ab3c3fad03/bench/src/xtdb/bench.clj
clojure
From #Clojure
(ns xtdb.bench (:require [clojure.data.json :as json] [clojure.java.io :as io] [clojure.string :as string] [clojure.tools.logging :as log] [juxt.clojars-mirrors.clj-http.v3v12v2.clj-http.client :as client] [xtdb.api :as xt] [xtdb.bench.cloudwatch...
e75d30c271deb04917d04f68e7487f75ee67146d9de95c27f2c575ee3a011434
thlack/surfs
input.clj
(ns ^:no-doc thlack.surfs.blocks.spec.input (:require [clojure.spec.alpha :as s] [thlack.surfs.composition.spec :as comp.spec] [thlack.surfs.elements.spec :as elements.spec] [thlack.surfs.strings.spec :refer [deftext]])) (s/def ::type #{:input}) (deftext ::label ::comp.spec/plain...
null
https://raw.githubusercontent.com/thlack/surfs/e03d137d6d43c4b73a45a71984cf084d2904c4b0/src/thlack/surfs/blocks/spec/input.clj
clojure
(ns ^:no-doc thlack.surfs.blocks.spec.input (:require [clojure.spec.alpha :as s] [thlack.surfs.composition.spec :as comp.spec] [thlack.surfs.elements.spec :as elements.spec] [thlack.surfs.strings.spec :refer [deftext]])) (s/def ::type #{:input}) (deftext ::label ::comp.spec/plain...
cc3775ec60c8323ea23c535d9deb7fece650a4f56963be7852df5fa60be709f5
ds-wizard/engine-backend
LocaleList.hs
module Wizard.Database.Mapping.Locale.LocaleList where import Database.PostgreSQL.Simple import Wizard.Database.Mapping.Locale.LocaleState () import Wizard.Model.Locale.LocaleList instance FromRow LocaleList
null
https://raw.githubusercontent.com/ds-wizard/engine-backend/0ec94a4b0545f2de8a4e59686a4376023719d5e7/engine-wizard/src/Wizard/Database/Mapping/Locale/LocaleList.hs
haskell
module Wizard.Database.Mapping.Locale.LocaleList where import Database.PostgreSQL.Simple import Wizard.Database.Mapping.Locale.LocaleState () import Wizard.Model.Locale.LocaleList instance FromRow LocaleList
4cd95175bf66ce4a09c77913ac2128b4b0fd865058bf6c91ba31bbd5630fae5f
arttuka/reagent-material-ui
no_adult_content_sharp.cljs
(ns reagent-mui.icons.no-adult-content-sharp "Imports @mui/icons-material/NoAdultContentSharp as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def no-adult-conte...
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/icons/reagent_mui/icons/no_adult_content_sharp.cljs
clojure
(ns reagent-mui.icons.no-adult-content-sharp "Imports @mui/icons-material/NoAdultContentSharp as a Reagent component." (:require-macros [reagent-mui.util :refer [create-svg-icon e]]) (:require [react :as react] ["@mui/material/SvgIcon" :as SvgIcon] [reagent-mui.util])) (def no-adult-conte...
43c036b17bd7b6abafe4869dfb20ef7fdc8cfe03252563ddbeb9457b67977ea6
clojure/clojurescript
node.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 epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be bound by ; ...
null
https://raw.githubusercontent.com/clojure/clojurescript/a4673b880756531ac5690f7b4721ad76c0810327/src/main/clojure/cljs/server/node.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 ) . All rights reserved . (ns cljs.server.node (:require [cljs.env :as env] [cljs.repl :as repl] [cljs.repl.node :as node] [cljs.core.server :as server]) (:import [java.net Socket])) (defonce envs (atom {})) (defn env-opts->key [{:keys [host port]}] [host...
d954256ebc748f49cdd80d6f78bf773e08f04c9bcdec0dbc723586f42805cd86
YoEight/lambda-database-experiment
Main.hs
-- Tasty makes it easy to test your code. It is a test framework that can combine many different types of tests into one suite . See its website for -- help: <>. import qualified Test.Tasty Hspec is one of the providers for Tasty . It provides a nice syntax for -- writing tests. Its website has more info: <>. impor...
null
https://raw.githubusercontent.com/YoEight/lambda-database-experiment/da4fab8bd358fb8fb78412c805d6f5bc05854432/lambda-bus/test-suite/Main.hs
haskell
Tasty makes it easy to test your code. It is a test framework that can help: <>. writing tests. Its website has more info: <>.
combine many different types of tests into one suite . See its website for import qualified Test.Tasty Hspec is one of the providers for Tasty . It provides a nice syntax for import Test.Tasty.Hspec main :: IO () main = do test <- testSpec "lambda-bus" spec Test.Tasty.defaultMain test spec :: Spec spec = ...
1099fedac301b1c6e1d41711e42f9823ad6f6c84bbe3c9d747e07840d51f0bd1
TeMPOraL/alice
frequencies.lisp
(in-package #:alice) (defvar *frequencies* '(("467.550" . "Taxi Barbakan, to z Jedyneczką :).") ("145.650" . "Pokój i dobro, wita przemiennik na Koskowej Górze.") ("145.550" . "Krakowska wywoławcza."))) (define-constant +freq-extraction-regexp+ "(\\d{3}\\.\\d{3})" :test...
null
https://raw.githubusercontent.com/TeMPOraL/alice/4621a53ccd459bebf0b34c531dab49f7b42f35c7/grimoire/frequencies.lisp
lisp
(in-package #:alice) (defvar *frequencies* '(("467.550" . "Taxi Barbakan, to z Jedyneczką :).") ("145.650" . "Pokój i dobro, wita przemiennik na Koskowej Górze.") ("145.550" . "Krakowska wywoławcza."))) (define-constant +freq-extraction-regexp+ "(\\d{3}\\.\\d{3})" :test...
700e89c4cd6003605fd40209f58c6d5b1ec7fa18d0fff0e11832ec92b3117aa7
OCamlPro/ocp-build
ocpCompat.ml
(**************************************************************************) (* *) (* Typerex Tools *) (* *) Copyrigh...
null
https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-pp/compat/4.00.0/ocpCompat.ml
ocaml
************************************************************************ Typerex Tools ...
Copyright 2011 - 2017 OCamlPro SAS the GNU General Public License version 3 described in the file type bytes = string module Bytes = struct include String let to_string t = String.copy t let of_string t = String.copy t let unsafe_to_string t = t let unsafe...
5db8aa847f96b61090c2fd140064fa6b1dffc4fbf216bf4be6744b76dfbfaaf9
kowainik/stan
Pretty.hs
| Copyright : ( c ) 2020 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Pretty printing of 's analysis . Copyright: (c) 2020 Kowainik SPDX-License-Identifier: MPL-2.0 Maintainer: Kowainik <> Pretty printing of Stan's analysis. -} module Stan.Analysis.Pretty ( prettyShowAnalysis ...
null
https://raw.githubusercontent.com/kowainik/stan/da36eac741466fe6f46dc3e56fca7806f8b41816/src/Stan/Analysis/Pretty.hs
haskell
* Numbers all inspections ignored or no observations display without decimal part | Enum to describe project health depending on the value of 'anHealth'.
| Copyright : ( c ) 2020 Kowainik SPDX - License - Identifier : MPL-2.0 Maintainer : < > Pretty printing of 's analysis . Copyright: (c) 2020 Kowainik SPDX-License-Identifier: MPL-2.0 Maintainer: Kowainik <> Pretty printing of Stan's analysis. -} module Stan.Analysis.Pretty ( prettyShowAnalysis ...
4430c31fca947ddabe61059ab1992bf5a12c5d55e896c222e0cd05a091e96722
lisp-mirror/clpm
package.lisp
The CLPM client ;;;; This software is part of CLPM . See README.org for more information . See ;;;; LICENSE for license information. (uiop:define-package #:clpm-client (:use #:cl) (:export #:*activate-asdf-integration* #:*asdf-system-not-found-behavior* #:*cleanup-on-dump-p* ...
null
https://raw.githubusercontent.com/lisp-mirror/clpm/ad9a704fcdd0df5ce30ead106706ab6cc5fb3e5b/clpm-client/package.lisp
lisp
LICENSE for license information. Register the fact that the clpm client is available by adding :clpm-client to *FEATURES*.
The CLPM client This software is part of CLPM . See README.org for more information . See (uiop:define-package #:clpm-client (:use #:cl) (:export #:*activate-asdf-integration* #:*asdf-system-not-found-behavior* #:*cleanup-on-dump-p* #:*clpm-dribble* #:*clpm-dribble...
5f738767c9f50ac3d10471a4aa1465e8e4467fc08ca68c0485a3b50fa69e2b16
haskell-gi/haskell-gi
Struct.hs
-- | Parsing of structs. module Data.GI.GIR.Struct ( Struct(..) , parseStruct ) where import Data.Text (Text) import Data.GI.GIR.Allocation (AllocationInfo(..), unknownAllocationInfo) import Data.GI.GIR.Field (Field, parseFields) import Data.GI.GIR.Method (Method, MethodType(..), parseMethod) import Data....
null
https://raw.githubusercontent.com/haskell-gi/haskell-gi/bff8f3b92bf2594ea3d6745c346a8de594fc3709/lib/Data/GI/GIR/Struct.hs
haskell
| Parsing of structs.
module Data.GI.GIR.Struct ( Struct(..) , parseStruct ) where import Data.Text (Text) import Data.GI.GIR.Allocation (AllocationInfo(..), unknownAllocationInfo) import Data.GI.GIR.Field (Field, parseFields) import Data.GI.GIR.Method (Method, MethodType(..), parseMethod) import Data.GI.GIR.Parser import Data...
9ab5caa67f3550e82d379aa03e01e19e0d4bdbacc3bca165106336b64af46f25
static-analysis-engineering/codehawk
jCHIntervalArray.mli
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) ...
null
https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchpoly/jCHIntervalArray.mli
ocaml
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = CodeHawk Java Analyzer Author : ------------------------------------------------------------------------------ The MIT License ( MIT ) ...
18ba04f48f588e44702f394ad33af547294bd1a9a88b2ccb66e05cc71322f235
haskell/lsp
Simple.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE LambdaCase # import Language.LSP.Server import Language.LSP.Types import Control.Monad.IO.Class import qualified Data.Text as T handlers :: Handlers (LspM ()) handlers = mconcat [ notificationHandler SInitialized $ \_not -> do let params = ShowMessageRequestParams...
null
https://raw.githubusercontent.com/haskell/lsp/51a04d9bb660b5ca69e9bb4ba6f2e45e2cb129fe/lsp/example/Simple.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE LambdaCase # import Language.LSP.Server import Language.LSP.Types import Control.Monad.IO.Class import qualified Data.Text as T handlers :: Handlers (LspM ()) handlers = mconcat [ notificationHandler SInitialized $ \_not -> do let params = ShowMessageRequestParams MtInfo "Turn on code lenses?" ...
b0c5b1baf2be414de66f796fad3568bb43d9f612c197ae1c4b93db2911fec37d
iokasimov/pandora
Morphism.hs
module Pandora.Pattern.Morphism (module Exports, Opposite) where import Pandora.Pattern.Morphism.Trip as Exports import Pandora.Pattern.Morphism.Flip as Exports import Pandora.Pattern.Morphism.Tensor as Exports import Pandora.Pattern.Morphism.Tensor as Exports import Pandora.Pattern.Morphism.Lifted as Exports import P...
null
https://raw.githubusercontent.com/iokasimov/pandora/dc0a50cb02f3fd77e8ab523582011a53d325f852/Pandora/Pattern/Morphism.hs
haskell
module Pandora.Pattern.Morphism (module Exports, Opposite) where import Pandora.Pattern.Morphism.Trip as Exports import Pandora.Pattern.Morphism.Flip as Exports import Pandora.Pattern.Morphism.Tensor as Exports import Pandora.Pattern.Morphism.Tensor as Exports import Pandora.Pattern.Morphism.Lifted as Exports import P...
3df4379adb8db4df4c6946a5ba611ccaaf548a3f0822a887761bc961d6628488
thumphries/hgrep
Data.hs
# LANGUAGE ExistentialQuantification # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} # LANGUAGE CPP # module Language.Haskell.HGrep.Internal.Data ( ParsedSource (..) , ParseError (..) , Query (..) , Regex (..) , compileR...
null
https://raw.githubusercontent.com/thumphries/hgrep/1d3e49724ef6fba545762bc9c5d5d2cf03455e49/src/Language/Haskell/HGrep/Internal/Data.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes #
# LANGUAGE ExistentialQuantification # # LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE NoImplicitPrelude # # LANGUAGE CPP # module Language.Haskell.HGrep.Internal.Data ( ParsedSource (..) , ParseError (..) , Query (..) , Regex (..) , compileRegex , SearchResult (..) , PrintOpts (..) , defaultPrintO...
02e3196c364a88427fd762aff0b96e2faaf0eaff13371e9ed2e7d85dcc27b097
McCLIM/McCLIM
simple-draw.lisp
(cl:eval-when (:compile-toplevel :load-toplevel :execute) (ql:quickload :mcclim)) (cl:in-package #:clim-user) (define-application-frame hello-frame () () (:pane (make-instance 'hello-data-pane :hs 200 :hs+ +fill+ :vs 200 :vs+ +fill+)) (:settings :title "Hello from Lisp")) (define-applic...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/7c890f1ac79f0c6f36866c47af89398e2f05b343/Documentation/Guided-Tour/simple-draw.lisp
lisp
inherits basic-clim-pane by default ()) Center the label
(cl:eval-when (:compile-toplevel :load-toplevel :execute) (ql:quickload :mcclim)) (cl:in-package #:clim-user) (define-application-frame hello-frame () () (:pane (make-instance 'hello-data-pane :hs 200 :hs+ +fill+ :vs 200 :vs+ +fill+)) (:settings :title "Hello from Lisp")) Behavior de...
45bb82cd6a45ee0e5c40199e83bddea0988e430947b08c78532a1f90a65aee8e
McCLIM/McCLIM
text-style.lisp
;;; --------------------------------------------------------------------------- ;;; License: LGPL-2.1+ (See file 'Copyright' for details). ;;; --------------------------------------------------------------------------- ;;; ( c ) copyright 1998 - 2000 by < > ( c ) copyright 2002 - 2003 by < > ( c ) copy...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/d49fef5c2bb1307a006cdadfc4061e0a6b0fff79/Core/drawing/text-style.lisp
lisp
--------------------------------------------------------------------------- License: LGPL-2.1+ (See file 'Copyright' for details). --------------------------------------------------------------------------- --------------------------------------------------------------------------- - *UNDEFINED-TEXT-STYLE* i...
( c ) copyright 1998 - 2000 by < > ( c ) copyright 2002 - 2003 by < > ( c ) copyright 2014 by < > ( c ) copyright 2020 by < > Implementation of the 11.1 Text Styles . (in-package #:clim-internals) TODO - Why is ( EQ ( MAKE - TEXT - STYLE NIL NIL 10 ) ( MAKE - TEXT - STYLE NIL NIL 10.000...
ed4e547db7787c6faf219be85c81a4020f028bb67fafa731efac5ab9790788ea
fragnix/fragnix
GHC.Integer.Compat.hs
{-# LANGUAGE Haskell2010 #-} # LINE 1 " src / GHC / Integer / Compat.hs " # # LANGUAGE CPP # module GHC.Integer.Compat (divInteger) where import GHC.Integer (divInteger)
null
https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/GHC.Integer.Compat.hs
haskell
# LANGUAGE Haskell2010 #
# LINE 1 " src / GHC / Integer / Compat.hs " # # LANGUAGE CPP # module GHC.Integer.Compat (divInteger) where import GHC.Integer (divInteger)
819a3a49a4f76a351ee7bba7c3fe2a26b44aa263e96424bb268a1deb06e7b970
sgbj/MaximaSharp
dmzsol.lisp
;;; Compiled by f2cl version: ( " f2cl1.l , v 1.221 2010/05/26 19:25:52 " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.204 2010/02/23 05:21:30 " " f2cl6.l , v 1.48 2008/08/...
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/colnew/lisp/dmzsol.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " f2cl1.l , v 1.221 2010/05/26 19:25:52 " " f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ " " f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ " " f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ " " f2cl5.l , v 1.204 2010/02/23 05:21:30 " " f2cl6.l , v 1.48 2008/08/24 00:56:27 rtoy Exp $ " " ...
d047dccf3b66c483a20114930bed424666ef5e248d7e21fd20cdcd860acec583
den1k/vimsical
handlers.cljc
(ns vimsical.frontend.vims.handlers (:require [vimsical.subgraph :as sg] [re-frame.core :as re-frame] [vimsical.common.util.core :as util] [vimsical.common.uuid :refer [uuid]] [vimsical.frontend.util.subgraph :as util.sg] [vimsical.frontend.util.re-frame :as util.re-frame] [vimsical.frontend.vcs....
null
https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/frontend/vimsical/frontend/vims/handlers.cljc
clojure
* New vims Could parametrize the user prefs here? This is a bit low-level, we could just conj the vims onto the owner and add that, but we'd have to make sure we're passed the full app/user, not sure if that'd be inconvenient. * Delete vims * Title * Snapshots Dispatch an event per file to update their...
(ns vimsical.frontend.vims.handlers (:require [vimsical.subgraph :as sg] [re-frame.core :as re-frame] [vimsical.common.util.core :as util] [vimsical.common.uuid :refer [uuid]] [vimsical.frontend.util.subgraph :as util.sg] [vimsical.frontend.util.re-frame :as util.re-frame] [vimsical.frontend.vcs....
37f42efc26f654eeb997e9a86a2ee3c9d48fe64ebedc0962ac9fec47d8cdabf4
vydd/sketch
sketch.lisp
;;;; sketch.lisp (in-package #:sketch) ;;; "sketch" goes here. Hacks and glory await! ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; ;;; _|_|...
null
https://raw.githubusercontent.com/vydd/sketch/aea3f9509182749fa80bcc993dc0f284559b2392/src/sketch.lisp
lisp
sketch.lisp "sketch" goes here. Hacks and glory await! ;;; _|_|_| _| _| _|_|_|_| _|_|_|_|_| _|_|_| _| _| ;;; _| _| _| _| _| _| _| _| ;;; _|_| _|_| _|_|_| _| _| ...
(in-package #:sketch) (defparameter *sketch* nil "The current sketch instance.") (eval-when (:compile-toplevel :load-toplevel :execute) (defparameter *default-slots* '((title :initform "Sketch" :reader sketch-title :initarg :title) (width :initform 400 :reader sketch-width :initarg :width) (he...
8fb114a11783e74935844d821d2dbb846f6505405da9a1180b2723e7b0cfac9a
Dept24c/vivo
commands.cljc
(ns com.dept24c.vivo.commands (:require [com.dept24c.vivo.utils :as u] [deercreeklabs.async-utils :as au] [deercreeklabs.capsule.logging :as log])) (defn throw-bad-path-key [path k] (let [disp-k (or k "nil")] (throw (ex-info (str "Illegal key `" disp-k "` in path `" path "`. Only integers,...
null
https://raw.githubusercontent.com/Dept24c/vivo/89e2533883641a711d9bcbd5c3f54df09b509095/src/com/dept24c/vivo/commands.cljc
clojure
(ns com.dept24c.vivo.commands (:require [com.dept24c.vivo.utils :as u] [deercreeklabs.async-utils :as au] [deercreeklabs.capsule.logging :as log])) (defn throw-bad-path-key [path k] (let [disp-k (or k "nil")] (throw (ex-info (str "Illegal key `" disp-k "` in path `" path "`. Only integers,...
6c5c3723fb9d7435842f5352ce93ef49b93fce8d2a6cc64b86632b8bc86dd20e
rtoy/cmucl
clxcom.lisp
;;; -*- Package: USER -*- ;;; ;;; ********************************************************************** ;;; (ext:file-comment "$Header: src/tools/clxcom.lisp $") ;;; ;;; ********************************************************************** ;;; (in-package "CL-USER") #+bootstrap (unless (find-package "OLD-XLIB") ...
null
https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/tools/clxcom.lisp
lisp
-*- Package: USER -*- ********************************************************************** ********************************************************************** load setup.lisp before clxcom.lisp. (comf "target:clx/defsystem" :load t) these are just macros these are just macros
(ext:file-comment "$Header: src/tools/clxcom.lisp $") (in-package "CL-USER") #+bootstrap (unless (find-package "OLD-XLIB") (when (find-package "XLIB") (rename-package (find-package "XLIB") "OLD-XLIB")) (make-package "XLIB" :use '("COMMON-LISP"))) #+(and (not pcl) (not no-pcl-clx)) (progn (load "target:...
ac1e4c68f9bb46435b71775c0f4d41d3edf9022d3f52b0f29ac36341ddea0a4b
cdfa/frugel
Model.hs
# LANGUAGE FlexibleContexts # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # module Frugel.Web.Model ( module Frugel.Web.Model , Model(Model) , EvaluationStatus(..) , EvaluationOutput(EvaluationOutput) ) where import qualified Data....
null
https://raw.githubusercontent.com/cdfa/frugel/9c59f2281c06bfa5e13bd575866d165dbc0ce411/app/Frugel/Web/Model.hs
haskell
pretty print twice, because program may not be fully parsed (and then it's only parsed but not pretty-printed) Assumes program terminates force errors to force full evaluation
# LANGUAGE FlexibleContexts # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeApplications # # LANGUAGE ViewPatterns # module Frugel.Web.Model ( module Frugel.Web.Model , Model(Model) , EvaluationStatus(..) , EvaluationOutput(EvaluationOutput) ) where import qualified Data....
156b81ed07522966cc977c2393c95910784dc05097aa7fdf53e80e18dc91065b
ghilesZ/picasso
hello.ml
open Picasso open Colors open Apronext let env = Environmentext.make_s [||] [|"x1"; "x2"; "x3"; "x4"|] let gens = [ Generatorext.of_float_point env [120.; 0.; 100.; 88.] ; Generatorext.of_float_point env [105.; 100.; 150.; 55.] ; Generatorext.of_float_point env [150.; 200.; 220.; 11.] ; Generatorext.of_float_...
null
https://raw.githubusercontent.com/ghilesZ/picasso/e3f6e32d79552157be3f7853a82e2afd8d90c266/examples/hello.ml
ocaml
open Picasso open Colors open Apronext let env = Environmentext.make_s [||] [|"x1"; "x2"; "x3"; "x4"|] let gens = [ Generatorext.of_float_point env [120.; 0.; 100.; 88.] ; Generatorext.of_float_point env [105.; 100.; 150.; 55.] ; Generatorext.of_float_point env [150.; 200.; 220.; 11.] ; Generatorext.of_float_...
fe4d40ebd63ee5df9c0d981bce4310b621e7cfddd55f62d1f6ede778235111de
dgiot/dgiot
dgiot_tdengine_handler.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 - 2021 DGIOT 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...
null
https://raw.githubusercontent.com/dgiot/dgiot/b74f33aa83a36ca07aabf3c2c890905ea324c661/apps/dgiot_device/src/handler/dgiot_tdengine_handler.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 - 2021 DGIOT 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(dgiot_tdengine_handler). -author("dgiot"). -behavior(dgiot_rest). -dgiot_rest(all). -i...
615b7dc0f888bc65b13c7439dbae1b97e18809ef110b3eb8ee2ec36a5c525341
haskell-tools/haskell-tools
Mode.hs
-- | Defines different working modes for the daemon. It can work by using a socket connection -- or channels to communicate with the client. When the daemon is used by CLI, it uses channel if -- it communicates with an editor plugin it uses the socket connection. module Language.Haskell.Tools.Daemon.Mode where import ...
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/daemon/Language/Haskell/Tools/Daemon/Mode.hs
haskell
| Defines different working modes for the daemon. It can work by using a socket connection or channels to communicate with the client. When the daemon is used by CLI, it uses channel if it communicates with an editor plugin it uses the socket connection. | An abstraction over the connection to the client. TODO: co...
module Language.Haskell.Tools.Daemon.Mode where import Control.Concurrent.Chan import qualified Data.Aeson as A () import Data.Aeson hiding ((.=)) import Data.ByteString.Lazy.Char8 (ByteString) import Data.ByteString.Lazy.Char8 (unpack) import qualified Data.ByteString.Lazy.Char8 as BS import Data.Maybe (Maybe(..), ca...
0b3d21cd7191a8c55c5f5e20ff9dd5f7e549979615458d80f86d5b940cb76c61
ocaml-flambda/ocaml-jst
pr10338.ml
(* TEST *) (* exercise push_defaults *) let s = 42;; let f ?(s="hello") = function x when (print_endline s; true) -> x;; let () = f ();; let f ?(y = assert false) (lazy e) = () in try f (lazy (print_endline "hello")) with _ -> print_endline "failed";; type empty = |;; let f : empty -> int = function _ -> .;; le...
null
https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/1bb6c797df7c63ddae1fc2e6f403a0ee9896cc8e/testsuite/tests/basic-more/pr10338.ml
ocaml
TEST exercise push_defaults push_defaults should push past the module pattern so partial application of the module doesn't raise
let s = 42;; let f ?(s="hello") = function x when (print_endline s; true) -> x;; let () = f ();; let f ?(y = assert false) (lazy e) = () in try f (lazy (print_endline "hello")) with _ -> print_endline "failed";; type empty = |;; let f : empty -> int = function _ -> .;; let f ?y : empty -> int = function _ -> .;...
eb30a134c27b18b77cdb219b24136e1209879764f04ea13a9553f7ffd9c4119c
korya/efuns
ebuffer.ml
(***********************************************************************) (* *) xlib for (* *) Fabrice Le Fessant , projet Para / SOR , INRIA Rocq...
null
https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/efuns/ebuffer.ml
ocaml
********************************************************************* ...
xlib for Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt Copyright 1998 Institut National de Recherche en Informatique et Automatique . Distributed only by permission . open Utils open Efuns open Text let create_buf_hook = Local...
57ac04804f6c2bfc36edce1fb998ef7fdf5721b78836e6f59990594a14230bdf
ublubu/shapes
Double.hs
# LANGUAGE TemplateHaskell # # LANGUAGE MagicHash # module Shapes.Linear.Double where import GHC.Prim import GHC.Types (Double(..)) import Shapes.Linear.Template import Shapes.Linear.MatrixTemplate import Shapes.Linear.ValueInfos (doubleInfo) $(makeVectorType doubleInfo 2) $(makeMatrixType doubleInfo (2, 2)) $(defi...
null
https://raw.githubusercontent.com/ublubu/shapes/fa5d959c17224a851d517826deeae097f1583392/shapes-math/src/Shapes/Linear/Double.hs
haskell
# LANGUAGE TemplateHaskell # # LANGUAGE MagicHash # module Shapes.Linear.Double where import GHC.Prim import GHC.Types (Double(..)) import Shapes.Linear.Template import Shapes.Linear.MatrixTemplate import Shapes.Linear.ValueInfos (doubleInfo) $(makeVectorType doubleInfo 2) $(makeMatrixType doubleInfo (2, 2)) $(defi...
e7048545a9602ae04724edf47644d428817d134fc08f460aa326df2284f5c0d1
K2InformaticsGmbH/egambo
egambo_tictac_win_3_3_3_p.erl
-module(egambo_tictac_win_3_3_3_p). -export([win/2]). % generated in egambo_tictac_wip win(<<P:8, P:8, P:8, _/binary>>, P) -> true; win(<<P:8, _:16, P:8, _:16, P:8, _/binary>>, P) -> true; win(<<P:8, _:24, P:8, _:24, P:8, _/binary>>, P) -> true; win(<<P:8, _:32, P:8, _:8, P:8, _/binary>>, P) -> true; win(<<_:8, P:8,...
null
https://raw.githubusercontent.com/K2InformaticsGmbH/egambo/e8bdf971f188a2139db52712ab5b9d87b2f11520/src/egambo_tictac_win_3_3_3_p.erl
erlang
generated in egambo_tictac_wip
-module(egambo_tictac_win_3_3_3_p). -export([win/2]). win(<<P:8, P:8, P:8, _/binary>>, P) -> true; win(<<P:8, _:16, P:8, _:16, P:8, _/binary>>, P) -> true; win(<<P:8, _:24, P:8, _:24, P:8, _/binary>>, P) -> true; win(<<P:8, _:32, P:8, _:8, P:8, _/binary>>, P) -> true; win(<<_:8, P:8, _:8, P:8, _:32, P:8, _/binary>>,...
0f7941b49409795cef5f7e86abf0cb50622b77acaa163adfcfe508349fdf0995
GumTreeDiff/cgum
commands.ml
* Copyright 2014 , INRIA * * This file is part of Cgen . Much of it comes from Coccinelle , which is * also available under the GPLv2 license * * Cgen 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 So...
null
https://raw.githubusercontent.com/GumTreeDiff/cgum/8521aa80fcf4873a19e60ce8c846c886aaefb41b/commons/commands.ml
ocaml
configured default commands
* Copyright 2014 , INRIA * * This file is part of Cgen . Much of it comes from Coccinelle , which is * also available under the GPLv2 license * * Cgen 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 So...
c162483c8da9c071dd752297b535723f90a0630c8fa589c91238a8065289f2a0
jordwalke/rehp
test_dynlink.ml
let _ = print_endline "Dynlink OK" let f () = print_endline "Test_dynlink.f Ok"
null
https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/toplevel/examples/lwt_toplevel/test_dynlink.ml
ocaml
let _ = print_endline "Dynlink OK" let f () = print_endline "Test_dynlink.f Ok"
3e0b34d56317753a1339d3e10b14483e051d72ab63e844ffe54b60286d78f4c2
cedlemo/OCaml-GI-ctypes-bindings-generator
Window_position.ml
open Ctypes open Foreign type t = None | Center | Mouse | Center_always | Center_on_parent let of_value v = if v = Unsigned.UInt32.of_int 0 then None else if v = Unsigned.UInt32.of_int 1 then Center else if v = Unsigned.UInt32.of_int 2 then Mouse else if v = Unsigned.UInt32.of_int 3 then Center_always else ...
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Window_position.ml
ocaml
open Ctypes open Foreign type t = None | Center | Mouse | Center_always | Center_on_parent let of_value v = if v = Unsigned.UInt32.of_int 0 then None else if v = Unsigned.UInt32.of_int 1 then Center else if v = Unsigned.UInt32.of_int 2 then Mouse else if v = Unsigned.UInt32.of_int 3 then Center_always else ...
a8cee4f1b6ee89efc46096df79f139fe334d4c4eaa5b5c52408da728215295f5
michaelw/cl-dot
sb-c-example.lisp
(in-package cl-dot) (defun list-no-nil (&rest args) (remove nil args)) ;; COMPONENT (defmethod graph-object-node ((graph (eql 'sb-c-example)) (object sb-c:component)) nil) (defmethod graph-object-knows-of ((graph (eql 'sb-c-example)) (c sb-c:component)) (list* (sb-c::component-head c) (sb-c::component...
null
https://raw.githubusercontent.com/michaelw/cl-dot/d32808109952faf8e4d342c0ff4f5a2587b315cb/examples/sb-c-example.lisp
lisp
COMPONENT CTRAN CONSTANT ENTRY cleanup COMBINATION
(in-package cl-dot) (defun list-no-nil (&rest args) (remove nil args)) (defmethod graph-object-node ((graph (eql 'sb-c-example)) (object sb-c:component)) nil) (defmethod graph-object-knows-of ((graph (eql 'sb-c-example)) (c sb-c:component)) (list* (sb-c::component-head c) (sb-c::component-lambdas c)))...
5d4115b588aaf92debf9be52e2d6f7a16642378a7d30b54a2f3caf6414b3f402
ghcjs/jsaddle-dom
ApplePayPaymentMethodSelectedEvent.hs
# LANGUAGE PatternSynonyms # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.ApplePayPaymentMethodSelectedEvent (getPaymentMethod, ApplePayPaymentMethodSelectedEvent(..), gTypeApplePay...
null
https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/ApplePayPaymentMethodSelectedEvent.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
# LANGUAGE PatternSynonyms # # OPTIONS_GHC -fno - warn - unused - imports # module JSDOM.Generated.ApplePayPaymentMethodSelectedEvent (getPaymentMethod, ApplePayPaymentMethodSelectedEvent(..), gTypeApplePayPaymentMethodSelectedEvent) where import Prelude ((.), (==), (>>=), return, IO, Int, Float, ...
14c03a5fdf2ca57a5d075b97937b77c286d95ef06a4f4965b22e2086753bcdbe
dterei/SafeHaskellExamples
Main.hs
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE StandaloneDeriving # module Main where -- import Sub ( T() ) import Sub ( T(..) ) import Data.Coerce class Default a where def :: a instance Default Int where def = 0 > Can only derive ( i.e. , coerce : : Int - > T ) when ` MkT ` constructor is in -- > scope....
null
https://raw.githubusercontent.com/dterei/SafeHaskellExamples/0f7bbb53cf1cbb8419ce3a4aa4258b84be30ffcc/gnd1/Main.hs
haskell
import Sub ( T() ) > scope. def = coerce (def :: Int) -- coerce :: Int -> T
# LANGUAGE GeneralizedNewtypeDeriving # # LANGUAGE StandaloneDeriving # module Main where import Sub ( T(..) ) import Data.Coerce class Default a where def :: a instance Default Int where def = 0 > Can only derive ( i.e. , coerce : : Int - > T ) when ` MkT ` constructor is in deriving instance Default T ins...
68aafda9b646984b9d01332b0fdd3cf5a1e8190bf5725c08ff29afefc6fe53f5
squaresLab/genprog-code
asm_test.ml
open Global Load and compile an ASM .s file , return 0 on success let main () = begin let rep = new Asmrep.asmRep in rep#from_source "gcd.s"; rep#output_source "temp.s" ; let compile_success = rep#compile "temp.s" "gcd" in if compile_success then exit 0 else exit 1; end ;; main () ;;
null
https://raw.githubusercontent.com/squaresLab/genprog-code/7982415b347529efee02190ab9ba6bd7eda6195e/test/asm_test.ml
ocaml
open Global Load and compile an ASM .s file , return 0 on success let main () = begin let rep = new Asmrep.asmRep in rep#from_source "gcd.s"; rep#output_source "temp.s" ; let compile_success = rep#compile "temp.s" "gcd" in if compile_success then exit 0 else exit 1; end ;; main () ;;
904242df2c02f3b42893c93d740b43e0d1b24bb15aad2613f14850e6b8816ad3
axelarge/advent-of-code
day06_test.clj
(ns advent-of-code.y2019.day06-test (:require [clojure.test :refer :all] [advent-of-code.y2019.day06 :refer :all])) (def test-input "COM)B\nB)C\nC)D\nD)E\nE)F\nB)G\nG)H\nD)I\nE)J\nJ)K\nK)L") (def test-input2 "COM)B\nB)C\nC)D\nD)E\nE)F\nB)G\nG)H\nD)I\nE)J\nJ)K\nK)L\nK)YOU\nI)SAN") (deftest test-solve1 ...
null
https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/test/advent_of_code/y2019/day06_test.clj
clojure
(ns advent-of-code.y2019.day06-test (:require [clojure.test :refer :all] [advent-of-code.y2019.day06 :refer :all])) (def test-input "COM)B\nB)C\nC)D\nD)E\nE)F\nB)G\nG)H\nD)I\nE)J\nJ)K\nK)L") (def test-input2 "COM)B\nB)C\nC)D\nD)E\nE)F\nB)G\nG)H\nD)I\nE)J\nJ)K\nK)L\nK)YOU\nI)SAN") (deftest test-solve1 ...
33bbd6190b65b4ca72abfcb305e3a8c4108dfa5ea8b325fa862b16ee01a4e3a3
locusmath/locus
lattice_equation.clj
(ns locus.order.lattice.term.lattice-equation (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.mapping.general.core.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.copresheaf.structu...
null
https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/order/lattice/term/lattice_equation.clj
clojure
A lattice equation consists of a pair of lattice terms that are equated this lattice equation class is to represent some of the individual equations that togethe make up a system of lattice equations. Distributive laws for lattices Determine equality using joins and meets with a fixed element Lattice inequalities...
(ns locus.order.lattice.term.lattice-equation (:require [locus.set.logic.core.set :refer :all] [locus.set.logic.limit.product :refer :all] [locus.set.mapping.general.core.object :refer :all] [locus.set.logic.structure.protocols :refer :all] [locus.set.copresheaf.structu...