_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 |
|---|---|---|---|---|---|---|---|---|
0959bfef9ddbaa25c98c0cf80237a1fe037887d1b9dc27fdd3573010395a7e3b | dym/movitz | package.lisp | ;;;;------------------------------------------------------------------
;;;;
Copyright ( C ) 2001 - 2004 ,
Department of Computer Science , University of Tromso , Norway .
;;;;
;;;; For distribution policy, see the accompanying file COPYING.
;;;;
;;;; Filename: package.lisp
;;;; Description:
Au... | null | https://raw.githubusercontent.com/dym/movitz/56176e1ebe3eabc15c768df92eca7df3c197cb3d/losp/lib/package.lisp | lisp | ------------------------------------------------------------------
For distribution policy, see the accompanying file COPYING.
Filename: package.lisp
Description:
------------------------------------------------------------------
:lib/console
:lib/misc
:lib/named... | Copyright ( C ) 2001 - 2004 ,
Department of Computer Science , University of Tromso , Norway .
Author : < >
Created at : Fri Sep 27 17:24:11 2002
$ I d : package.lisp , v 1.6 2004/11/24 14:20:55 Exp $
(defpackage #:muerte.lib
(:nicknames #:lib)
(:use #:common-lisp #:muerte)
(:exp... |
02a42a9fa2a209395615bf02348fc417f900f8510dd63fd8fb860b6375aa988c | karamaan/karamaan-opaleye | Examples.hs | module Main where
import Manipulation ()
main :: IO ()
main = return ()
| null | https://raw.githubusercontent.com/karamaan/karamaan-opaleye/2863dc1dba9ea1e810cb0860a9b8de53f50af354/Examples/Examples.hs | haskell | module Main where
import Manipulation ()
main :: IO ()
main = return ()
| |
054ffda179816d3819026c74609324aa092dbad9aea6fac0ceb510a965eca2de | shentufoundation/deepsea | Coqlib.mli | open BinInt
open BinNums
open BinPos
open Datatypes
open List0
open Specif
open ZArith_dec
val peq : positive -> positive -> sumbool
val plt : positive -> positive -> sumbool
val zeq : coq_Z -> coq_Z -> sumbool
val zlt : coq_Z -> coq_Z -> sumbool
val zle : coq_Z -> coq_Z -> sumbool
val option_map : ('a1 -> 'a2) -... | null | https://raw.githubusercontent.com/shentufoundation/deepsea/970576a97c8992655ed2f173f576502d73b827e1/src/backend/extraction/Coqlib.mli | ocaml | open BinInt
open BinNums
open BinPos
open Datatypes
open List0
open Specif
open ZArith_dec
val peq : positive -> positive -> sumbool
val plt : positive -> positive -> sumbool
val zeq : coq_Z -> coq_Z -> sumbool
val zlt : coq_Z -> coq_Z -> sumbool
val zle : coq_Z -> coq_Z -> sumbool
val option_map : ('a1 -> 'a2) -... | |
e65c0b626836110968e873243a3279f9512b8c26e1f08ac4417facfd09d53214 | nuprl/gradual-typing-performance | data-world.rkt | #lang typed/racket/base
(provide (struct-out world))
(require benchmark-util
"data-tetra-adapted.rkt"
"data-block-adapted.rkt")
;; =============================================================================
(struct: world ([tetra : tetra]
[blocks : (Listof block)]))
| null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/micro/tetris/typed/data-world.rkt | racket | ============================================================================= | #lang typed/racket/base
(provide (struct-out world))
(require benchmark-util
"data-tetra-adapted.rkt"
"data-block-adapted.rkt")
(struct: world ([tetra : tetra]
[blocks : (Listof block)]))
|
fef5cee13bcc301cc07e1f7a0d765237e297eabc247188d3f383b7f54843df6e | sph-mn/sph-lib | atom.scm | (define-module (sph web atom))
(use-modules (sph) (sph time rfc3339)
((guile) #:select (filter identity)) ((sph other) #:select (remove-keyword-associations)))
(export atom-author atom-category
atom-content-source atom-content-text
atom-content-xhtml atom-contributor
atom-entry atom-feed
atom-link atom-pers... | null | https://raw.githubusercontent.com/sph-mn/sph-lib/c7daf74f42d6bd1304f49c2fef89dcd6dd94fdc9/modules/sph/web/atom.scm | scheme | (define-module (sph web atom))
(use-modules (sph) (sph time rfc3339)
((guile) #:select (filter identity)) ((sph other) #:select (remove-keyword-associations)))
(export atom-author atom-category
atom-content-source atom-content-text
atom-content-xhtml atom-contributor
atom-entry atom-feed
atom-link atom-pers... | |
f84d2f96479ff1dfe865363db22eb3a12802e4888d451515889bae77e33316c1 | oral-health-and-disease-ontologies/ohd-ontology | test-jdbc-iterator.lisp | (defun test-jdbc-iterator-1 ()
"Simple test using the jdbc resultset. note: the has-next method cannot be called."
(let ((it nil)
(rs nil)
(sql-string "select top 3 patient_id, sex, birth_date from patient")
( sql - string " select top 3 patient_id from patient where patient_id = 1208948557654 "
(jdbc-url (str+ ... | null | https://raw.githubusercontent.com/oral-health-and-disease-ontologies/ohd-ontology/ba3f502b86487c8ba5fa04ff8ba33312a1679570/src/vdw-translation/development-library/test-scripts/test-jdbc-iterator.lisp | lisp | this way of opening the iterator can only use the resultsets default properties
currently, the default resultset type is jdbc resultset
(print-db it)
(print-db (resultset it))
(print-db (contents (current-results (resultset it))))
(print-db (next it))
(pprint (#"getString" rs "patient_id"))
end progn
to use non-def... | (defun test-jdbc-iterator-1 ()
"Simple test using the jdbc resultset. note: the has-next method cannot be called."
(let ((it nil)
(rs nil)
(sql-string "select top 3 patient_id, sex, birth_date from patient")
( sql - string " select top 3 patient_id from patient where patient_id = 1208948557654 "
(jdbc-url (str+ ... |
6d87ca0e7f3b3d8d39de83f79712e8911a1e9d9fa2123a6fb750fb95da1f7d49 | macchiato-framework/macchiato-core | memory.cljs | (ns macchiato.middleware.session.memory
"A session storage engine that stores session data in memory."
(:require [macchiato.middleware.session.store :refer [SessionStore]]))
(deftype MemoryStore [session-map]
SessionStore
(read-session [_ key]
(@session-map key))
(write-session [_ key data]
(let [key... | null | https://raw.githubusercontent.com/macchiato-framework/macchiato-core/14eac3dbc561927ee61b6127f30ef0b0269b2af6/src/macchiato/middleware/session/memory.cljs | clojure | if supplied, the atom is used to hold the session data." | (ns macchiato.middleware.session.memory
"A session storage engine that stores session data in memory."
(:require [macchiato.middleware.session.store :refer [SessionStore]]))
(deftype MemoryStore [session-map]
SessionStore
(read-session [_ key]
(@session-map key))
(write-session [_ key data]
(let [key... |
3fc24426ece2717de6c278da3ea62b6f95bdb0879533e37fbec9738da9ba90a4 | crategus/cl-cffi-gtk | rtest-gtk-app-chooser.lisp | (def-suite gtk-app-chooser :in gtk-suite)
(in-suite gtk-app-chooser)
;;; --- Types and Values -------------------------------------------------------
;;; GtkAppChooser
(test gtk-app-chooser-interface
;; Type check
(is-true (g-type-is-interface "GtkAppChooser"))
;; Check the registered name
(is (eq 'gtk-a... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/22156e3e2356f71a67231d9868abcab3582356f3/test/rtest-gtk-app-chooser.lisp | lisp | --- Types and Values -------------------------------------------------------
GtkAppChooser
Type check
Check the registered name
Get the names of the interface properties.
Get the interface definition
--- Properties -------------------------------------------------------------
--- Functions -----------------... | (def-suite gtk-app-chooser :in gtk-suite)
(in-suite gtk-app-chooser)
(test gtk-app-chooser-interface
(is-true (g-type-is-interface "GtkAppChooser"))
(is (eq 'gtk-app-chooser
(registered-object-type-by-name "GtkAppChooser")))
(is (equal '("content-type")
(mapcar #'g-param-spec-name
... |
1cbf95134d96e62bbf7167b6a415c04a7463ce19aca0faa72c76c0211001de92 | ingolia-lab/RiboSeq | QExpr.hs | {-# LANGUAGE OverloadedStrings #-}
module Bio.RiboSeq.QExpr
where
import Control.Applicative
import Data.List (transpose)
import Control.Monad
import qualified Data.ByteString.Char8 as BS
import qualified Data.Attoparsec as AP (parseOnly)
import qualified Data.Attoparsec.Char8 as AP
import qualified Data.Vecto... | null | https://raw.githubusercontent.com/ingolia-lab/RiboSeq/a14390cd95528910a258434c7b84c787f5e1d119/src/Bio/RiboSeq/QExpr.hs | haskell | # LANGUAGE OverloadedStrings #
# SCC "f" #
# SCC "s" # | module Bio.RiboSeq.QExpr
where
import Control.Applicative
import Data.List (transpose)
import Control.Monad
import qualified Data.ByteString.Char8 as BS
import qualified Data.Attoparsec as AP (parseOnly)
import qualified Data.Attoparsec.Char8 as AP
import qualified Data.Vector as V
import qualified Data.Vector... |
d2de118faaf0715c44776b8f7c8f0c61f3ab93c04c2d9538d2a20ce8a0d557aa | mzp/scheme-abc | closureTransTest.ml | open Base
open Ast
open ClosureTrans
open AstUtil
open OUnit
let ok x y =
OUnit.assert_equal
x y
let _ =
("closureTrans.ml" >::: [
"arguments" >::
(fun () ->
let body =
block [
lambda ["x"]
(let_ ["x",var [] "x"]
(lambda ["y"]
(var [] "x")))] in
ok [`Define (`Pub... | null | https://raw.githubusercontent.com/mzp/scheme-abc/2cb541159bcc32ae4d033793dea6e6828566d503/scm/codegen/closureTransTest.ml | ocaml | open Base
open Ast
open ClosureTrans
open AstUtil
open OUnit
let ok x y =
OUnit.assert_equal
x y
let _ =
("closureTrans.ml" >::: [
"arguments" >::
(fun () ->
let body =
block [
lambda ["x"]
(let_ ["x",var [] "x"]
(lambda ["y"]
(var [] "x")))] in
ok [`Define (`Pub... | |
c20d7f398ab5644ad1c00892c11f7f2401cea71459a18f79a3a96671653697cb | lalzy/Lazyfoo-CL-SDL2 | main.lisp | Tutorial 17 : Mouse Events
(defpackage #:tutorial-17
(:use #:cl)
(:export :main))
(in-package #:tutorial-17)
(defun file-path (path file)
(let ((path-end (aref path (1- (length path)))))
(if (or (string-equal path-end #\\) (string-equal path-end #\/))
(concatenate 'string path file)
(concatenate 'stri... | null | https://raw.githubusercontent.com/lalzy/Lazyfoo-CL-SDL2/7bf0d255112e354672686d8ad3d6772ebde34c51/tutorial-17/main.lisp | lisp | Prevent slime from hanging if crashing
Slime doesn't like recompiling with ttf even though we close it. Unwind-protect fixes this | Tutorial 17 : Mouse Events
(defpackage #:tutorial-17
(:use #:cl)
(:export :main))
(in-package #:tutorial-17)
(defun file-path (path file)
(let ((path-end (aref path (1- (length path)))))
(if (or (string-equal path-end #\\) (string-equal path-end #\/))
(concatenate 'string path file)
(concatenate 'stri... |
af027298e26ff937b470a0ea1e619f18ea5a8b6373dac7ae28d2f628133be43e | wilkerlucio/pathom | simple_todo_demo.cljs | (ns com.wsscode.pathom.workspaces.graphql.simple-todo-demo
(:require [fulcro.client.primitives :as fp]
[nubank.workspaces.card-types.fulcro :as ct.fulcro]
[nubank.workspaces.lib.fulcro-portal :as f.portal]
[nubank.workspaces.core :as ws]
[fulcro.client.data-fetch :as df... | null | https://raw.githubusercontent.com/wilkerlucio/pathom/4ec25055d3d156241e9174d68ec438c93c971b9b/docs-src/modules/ROOT/examples/com/wsscode/pathom/workspaces/graphql/simple_todo_demo.cljs | clojure | (ns com.wsscode.pathom.workspaces.graphql.simple-todo-demo
(:require [fulcro.client.primitives :as fp]
[nubank.workspaces.card-types.fulcro :as ct.fulcro]
[nubank.workspaces.lib.fulcro-portal :as f.portal]
[nubank.workspaces.core :as ws]
[fulcro.client.data-fetch :as df... | |
f589e4ec7e65ef0c90ac35aeaf7f602cd3c008c102f4771df6a0586c9a821910 | rtrusso/scp | lvalue-operand.scm | (need sasm/parse/syntax)
(need sasm/sasm-ast)
(define (sasm-parse-lvalue-operand expression)
(sasm-parse-by-case
expression
(sasm-syntax-case
:pattern (?? ,sasm-parse-register-operand register)
:rewrite (register)
register)
(sasm-syntax-case
:pattern (temp (,integer? temp-numb... | null | https://raw.githubusercontent.com/rtrusso/scp/2051e76df14bd36aef81aba519ffafa62b260f5c/src/sasm/parse/lvalue-operand.scm | scheme | (need sasm/parse/syntax)
(need sasm/sasm-ast)
(define (sasm-parse-lvalue-operand expression)
(sasm-parse-by-case
expression
(sasm-syntax-case
:pattern (?? ,sasm-parse-register-operand register)
:rewrite (register)
register)
(sasm-syntax-case
:pattern (temp (,integer? temp-numb... | |
b0b39cb1fbc414f1a66f76882a46fc61d05909b4b001cbdcb278abdeed3a7e19 | qitab/ace.core | symbol-test.lisp | Copyright 2020 Google LLC
;;;
Use of this source code is governed by an MIT - style
;;; license that can be found in the LICENSE file or at
;;; .
;;;;
;;;; Test for macro helpers
;;;;
(ace.core.package:defpackage* #:ace.core.symbol-test
(:use #:common-lisp
#:ace.test)
(:use-alias (#:symbol #:ace.core.... | null | https://raw.githubusercontent.com/qitab/ace.core/e6eb21ff67b0c5eaec21c9b543b6dce18d7c8e6d/symbol-test.lisp | lisp |
license that can be found in the LICENSE file or at
.
Test for macro helpers
| Copyright 2020 Google LLC
Use of this source code is governed by an MIT - style
(ace.core.package:defpackage* #:ace.core.symbol-test
(:use #:common-lisp
#:ace.test)
(:use-alias (#:symbol #:ace.core.symbol)))
(in-package #:ace.core.symbol-test)
(deftest cat-test ()
(let ((*package* (symbol-package ... |
eba17373717775c520c71d2e3c58ba0b427cb6474be25598514a1f552366f480 | clojure/core.typed | finally.clj | (ns clojure.core.typed.test.finally
(:require [clojure.core.typed :as t]))
(t/ann f [-> String])
(defn f []
(try
"a"
(finally 1)))
| null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.jvm/test/clojure/core/typed/test/finally.clj | clojure | (ns clojure.core.typed.test.finally
(:require [clojure.core.typed :as t]))
(t/ann f [-> String])
(defn f []
(try
"a"
(finally 1)))
| |
39cffcd61815ed274182a0b30328e9adcd3b0cc844a309ac8eb81fc1502d4334 | DavidAlphaFox/RabbitMQ | rabbit_exchange_type_fanout.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/src/rabbit_exchange_type_fanout.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
| The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
fe6af57ad5c6f8f9466989a6b376d92e74416629cc6b3264b28c26e9e688d3f2 | originrose/cortex | javacpp_datatype.clj | (ns cortex.compute.javacpp-datatype
(:require [think.datatype.core :as dtype]
[think.datatype.base :as dtype-base]
[think.datatype.marshal :as marshal]
[clojure.core.matrix.protocols :as mp])
(:import [org.bytedeco.javacpp
BytePointer IntPointer LongPointer DoublePoin... | null | https://raw.githubusercontent.com/originrose/cortex/94b1430538e6187f3dfd1697c36ff2c62b475901/src/cortex/compute/javacpp_datatype.clj | clojure | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
is large compared to the maximum java heap size.
code for dealing with position is incorrect. | (ns cortex.compute.javacpp-datatype
(:require [think.datatype.core :as dtype]
[think.datatype.base :as dtype-base]
[think.datatype.marshal :as marshal]
[clojure.core.matrix.protocols :as mp])
(:import [org.bytedeco.javacpp
BytePointer IntPointer LongPointer DoublePoin... |
790ce3672596fed66fee0018287f101a9b73711524ce0cebfcfd6c83484671a1 | Simre1/haskell-game | BracketSpec.hs | module BracketSpec where
import Polysemy
import Polysemy.Error
import Polysemy.Output
import Polysemy.Resource
import Polysemy.State
import Polysemy.Trace
import Test.Hspec
runTest
:: Sem '[Error (), Resource, State [Char], Trace] a
-> ([String], ([Char], Either () a))
runTest = run
. runTraceList
... | null | https://raw.githubusercontent.com/Simre1/haskell-game/272a0674157aedc7b0e0ee00da8d3a464903dc67/polysemy/test/BracketSpec.hs | haskell | This doesn't run due to the thrown error above | module BracketSpec where
import Polysemy
import Polysemy.Error
import Polysemy.Output
import Polysemy.Resource
import Polysemy.State
import Polysemy.Trace
import Test.Hspec
runTest
:: Sem '[Error (), Resource, State [Char], Trace] a
-> ([String], ([Char], Either () a))
runTest = run
. runTraceList
... |
8427265ee0db2f78f0b8b42bec1b922b02e730ef317705ef354ce3acef60c149 | Oblosys/proxima | EvaluateTypes.hs | module EvaluateTypes where
import Evaluation.DocTypes
import DocTypes_Generated
import DocumentEdit_Generated
import DocUtils_Generated
import Common.CommonTypes
import Common.DebugLevels
evaluate has IO , so the unsafePerformIO is only temporary
import Data.Char
import Data.Maybe
import qualified Data.Map as Map
... | null | https://raw.githubusercontent.com/Oblosys/proxima/f154dff2ccb8afe00eeb325d9d06f5e2a5ee7589/helium-editor/src/EvaluateTypes.hs | haskell | Nothing is when identifier is from other module
debug Err ("EvaluateTypes.pathFromRange Incorrect range "++show pathStr)
return type is List so wrong Alt's can return a []
collect the expressions in helium items and bind them to unique function names
infix op does not correspond to tree path, so [-1]
... | module EvaluateTypes where
import Evaluation.DocTypes
import DocTypes_Generated
import DocumentEdit_Generated
import DocUtils_Generated
import Common.CommonTypes
import Common.DebugLevels
evaluate has IO , so the unsafePerformIO is only temporary
import Data.Char
import Data.Maybe
import qualified Data.Map as Map
... |
22258dfe0822c3e2199f2b089a24593d76a79a1053ff6d2cc97f99476c4768a5 | karlhof26/gimp-scheme | Snow Cover.scm | Snow Cover rel 0.02
Created by Graechan
; Comments directed to or
;
License :
; 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
... | null | https://raw.githubusercontent.com/karlhof26/gimp-scheme/2a1258bc3771287f83bd0ae94b6e7341a7bb4371/Snow%20Cover.scm | scheme | Comments directed to or
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A... | Snow Cover rel 0.02
Created by Graechan
License :
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
To view a copy of the GNU General Public License
Rel 0.01 - Initial Release
Rel 0.02 - Added ... |
24b05e474eebf6a679bf9a7c6995f50dd084afc3297814ca467630652ebd50e1 | cognitect-labs/vase | service_test.clj | (ns com.cognitect.vase.service-test
(:require [clojure.test :refer :all]
[io.pedestal.test :refer :all]
[com.cognitect.vase.test-helper :as helper]
[com.cognitect.vase :as vase]
[com.cognitect.vase.service-route-table :as srt]))
(defn selected-headers
"Return a map w... | null | https://raw.githubusercontent.com/cognitect-labs/vase/d882bc8f28e8af2077b55c80e069aa2238f646b7/test/com/cognitect/vase/service_test.clj | clojure | (ns com.cognitect.vase.service-test
(:require [clojure.test :refer :all]
[io.pedestal.test :refer :all]
[com.cognitect.vase.test-helper :as helper]
[com.cognitect.vase :as vase]
[com.cognitect.vase.service-route-table :as srt]))
(defn selected-headers
"Return a map w... | |
b1da268ace8164abcd65f367ac78d69de9594534c0eac5bb805e2dd652f23c84 | tisnik/clojure-examples | core.clj | ;
( C ) Copyright 2016 , 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 async6.core
(:gen-class))
... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/async6/src/async6/core.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:
precteme 1000 hodnot
vypis ziskane statistiky
chvili pockame | ( C ) Copyright 2016 , 2020
-v10.html
(ns async6.core
(:gen-class))
nacteme vsechny potrebne funkce , makra a symboly z
( schvalne se funkce , protoze by
takove , map apod . )
(require '[clojure.core.async :refer (go chan >! <! timeout alts!)])
(defn wait
"Pozastaveni hlav... |
b93eb6703b2bd7d75bf5fbb0ef2f9194718016385c838dfce20018f493089431 | ekmett/rcu | Internal.hs | # LANGUAGE CPP #
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE BangPatterns #-}
# LANGUAGE TypeFamilies #
# LANGUAGE DeriveFunctor #
# LANGUAGE NamedFieldPuns #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
# LANGUAGE MultiParamTypeClasses #
#... | null | https://raw.githubusercontent.com/ekmett/rcu/29fe0636826b40f218995491ed9b33aea685cd26/src/Control/Concurrent/RCU/QSBR/Internal.hs | haskell | # LANGUAGE Rank2Types #
# LANGUAGE BangPatterns #
---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
---------------------------------------------------------------------------
-------... | # LANGUAGE CPP #
# LANGUAGE TypeFamilies #
# LANGUAGE DeriveFunctor #
# LANGUAGE NamedFieldPuns #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE UndecidableInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE Generalize... |
18130ab556235857a7a830a94df64fe688d7ec79c4d00936643e7fd6a37baede | aryx/lfs | opt.ml | (** Make optional the use of a sub-logic formula. *)
open Logic
module type PARAM =
sig
val toks_none : Syntax.t_list (** List of tokens used to represent the 'void' case. *)
val toks_some : Syntax.t_list
end
module Make (Param : PARAM) (A : T) =
struct
include Default
Opt is equivalent to Sum_1... | null | https://raw.githubusercontent.com/aryx/lfs/b931530c7132b77dfaf3c99d452dc044fce37589/logfun/src/opt.ml | ocaml | * Make optional the use of a sub-logic formula.
* List of tokens used to represent the 'void' case. |
open Logic
module type PARAM =
sig
val toks_some : Syntax.t_list
end
module Make (Param : PARAM) (A : T) =
struct
include Default
Opt is equivalent to Sum_1
let props =
fixpoint
(fun () ->
let propsA = A.props () in
{(no_props "Opt") with
st' = propsA.st';
cs_entails = props... |
f02b44aa08d05adfc707b4c407458e9877aeb5f6d425785473acea1fd547f748 | tnelson/Forge | basic-example-surface.rkt | #lang forge/new-mode
sig A {
r : set B
}
sig B {}
example AnExample is A = A for {
A = `A0 + `A1
} | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/new-mode/examples/basic-example-surface.rkt | racket | #lang forge/new-mode
sig A {
r : set B
}
sig B {}
example AnExample is A = A for {
A = `A0 + `A1
} | |
1a876aa5deca90f83fbff53ed325e26fe51e1cc69cc04e2b5f4558758e8afe67 | flyingmachine/arenaverse | common.clj | (ns arenaverse.views.common
(:require [cemerick.friend :as friend])
(:use noir.core
hiccup.core
hiccup.page-helpers
arenaverse.views.routes))
(defpartial pub-nav []
[:ul#utility
[:li [:a {:href (url-for-r :users/shiny)} "Create Your Own Smackdown!"]]
[:li [:a {:href "/login"} "Sign... | null | https://raw.githubusercontent.com/flyingmachine/arenaverse/6742c4112f6ec83fb272b1b352868394a8879a07/src/arenaverse/views/common.clj | clojure |
ga.async = true ;
s.parentNode.insertBefore(ga, s);
| (ns arenaverse.views.common
(:require [cemerick.friend :as friend])
(:use noir.core
hiccup.core
hiccup.page-helpers
arenaverse.views.routes))
(defpartial pub-nav []
[:ul#utility
[:li [:a {:href (url-for-r :users/shiny)} "Create Your Own Smackdown!"]]
[:li [:a {:href "/login"} "Sign... |
409eec9e765e8f64a5e532cba90cf1024f5aae6ad9c5e1ac9f82e0ca450a3781 | quchen/generative-art | ApollonianGasket.hs | module Test.Geometry.Processes.ApollonianGasket (tests) where
import Data.Foldable
import Data.Tree.Extended
import Graphics.Rendering.Cairo as C
import Draw as D
import Geometry as G
import Geometry.Processes.ApollonianGasket
import Numerics.Interpolation
... | null | https://raw.githubusercontent.com/quchen/generative-art/85d26072ac847d05b88ef702efe2eb04abf178a6/test/testsuite/Test/Geometry/Processes/ApollonianGasket.hs | haskell | , [large]
the bottom-left circle of generation 1 needs (+) (-), otherwise that part
folds upwards-looking. I have no idea why. | module Test.Geometry.Processes.ApollonianGasket (tests) where
import Data.Foldable
import Data.Tree.Extended
import Graphics.Rendering.Cairo as C
import Draw as D
import Geometry as G
import Geometry.Processes.ApollonianGasket
import Numerics.Interpolation
... |
c9ef2a0725bcc432fbb56c2e221327a70935d480fe76c0c6f33603f8f28c93bf | racket/web-server | syntax.rkt | #lang racket/base
(require racket/list
racket/match
racket/stxparam
net/url
web-server/dispatchers/dispatch
web-server/dispatch/http-expanders
web-server/dispatch/bidi-match
(for-syntax racket/base
syntax/parse
web-... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/dispatch/syntax.rkt | racket | #lang racket/base
(require racket/list
racket/match
racket/stxparam
net/url
web-server/dispatchers/dispatch
web-server/dispatch/http-expanders
web-server/dispatch/bidi-match
(for-syntax racket/base
syntax/parse
web-... | |
33b7e3c20d61f671761f7f56be67a4005166fda64fe744c532388839a296c230 | kyleburton/sandbox | mysql.clj | (ns jdbc-example.mysql
(:require
[clojure.tools.logging :as log]
[clojure.data.json :as json]
[clojure.data.csv :as csv]
[clojure.java.jdbc :as sql]))
(comment
(def mysql-db
{:dbtype "mysql"
:dbname "mysql"
:user "root"
:password "password"})
(sql/query mysq... | null | https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/examples/clojure/jdbc-example/src/jdbc_example/mysql.clj | clojure | => ({:database() "mysql"})
({:database "mysql"}
{:database "information_schema"}
{:database "performance_schema"}
{:database "sys"}) | (ns jdbc-example.mysql
(:require
[clojure.tools.logging :as log]
[clojure.data.json :as json]
[clojure.data.csv :as csv]
[clojure.java.jdbc :as sql]))
(comment
(def mysql-db
{:dbtype "mysql"
:dbname "mysql"
:user "root"
:password "password"})
(sql/query mysq... |
04d00750c638e51698c22cfa52190dbd89ae61595466fc74026a0e0a634c8f34 | stjahns/ripple | core_test.clj | (ns ripple.core-test
(:require [clojure.test :refer :all]
[ripple.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/stjahns/ripple/fdb4a8a29141ad5b46ec0560c329033b893eb319/test/ripple/core_test.clj | clojure | (ns ripple.core-test
(:require [clojure.test :refer :all]
[ripple.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
9aa4db21bd7881ef5842f50ae3f2953c4fa79e23cc2fea3f6b7bec0511185ae7 | ranjitjhala/haddock-annot | ModuleTree.hs | -----------------------------------------------------------------------------
-- |
Module : .
Copyright : ( c ) 2003 - 2006 ,
2006
-- License : BSD-like
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
------------------------------------... | null | https://raw.githubusercontent.com/ranjitjhala/haddock-annot/ffaa182b17c3047887ff43dbe358c246011903f6/haddock-2.9.3/src/Haddock/ModuleTree.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-like
Maintainer :
Stability : experimental
Portability : portable
--------------------------------------------------------------------------- | Module : .
Copyright : ( c ) 2003 - 2006 ,
2006
module Haddock.ModuleTree ( ModuleTree(..), mkModuleTree ) where
import Haddock.Types ( Doc )
import GHC ( Name )
import Module ( Module, moduleNameString, moduleName, modulePackageId,
... |
2f8656825ece60bf8a75691ecdae19d89586cd6eaaed3649d251b90b00707c36 | ucsd-progsys/liquidhaskell | Sum.hs | {-@ LIQUID "--expect-any-error" @-}
module Sum where
{-@ ssum :: forall<p :: a -> Bool, q :: a -> Bool>.
{{v:a | v == 0} <: a<q>}
{x::a<p> |- {v:a | x <= v} <: a<q>}
xs:[{v:a<p> | 0 <= v}] -> {v:a<q> | len xs >= 0 && 0 <= v } @-}
ssum :: Num a => [a] -> a
ssum [] = 0
ssum [x]... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/terminate/neg/Sum.hs | haskell | @ LIQUID "--expect-any-error" @
@ ssum :: forall<p :: a -> Bool, q :: a -> Bool>.
{{v:a | v == 0} <: a<q>}
{x::a<p> |- {v:a | x <= v} <: a<q>}
xs:[{v:a<p> | 0 <= v}] -> {v:a<q> | len xs >= 0 && 0 <= v } @ | module Sum where
ssum :: Num a => [a] -> a
ssum [] = 0
ssum [x] = x
ssum (x:xs) = x + ssum (x:xs)
|
d188d36f277a71b0ac75b034ce197a01ea25b7a8f726d8531e2b6d8239abcd1c | ndmitchell/tagsoup | Supercompile.hs | # LANGUAGE PatternGuards , RecordWildCards , ViewPatterns #
# OPTIONS_GHC -fno - warn - overlapping - patterns #
module Supercompile(supercompiler) where
import Type
import Simplify
import Convert
import Data.Maybe
import qualified Data.Map as Map
import Control.Monad
import System.IO.Unsafe
import System.IO
import ... | null | https://raw.githubusercontent.com/ndmitchell/tagsoup/e116d3b965e4f149581bd55e45a05661b1113536/test/TagSoup/Generate/Supercompile.hs | haskell | -------------------------------------------------------------------
LOGGING
# NOINLINE logState #
-------------------------------------------------------------------
TYPE
all the bound redexes must be fully simple
none of the redexes may have a root let statement
----------------------------------------------------... | # LANGUAGE PatternGuards , RecordWildCards , ViewPatterns #
# OPTIONS_GHC -fno - warn - overlapping - patterns #
module Supercompile(supercompiler) where
import Type
import Simplify
import Convert
import Data.Maybe
import qualified Data.Map as Map
import Control.Monad
import System.IO.Unsafe
import System.IO
import ... |
255c6281b2e21cfbc5c4e3c88abd36e2d4c0b2e38dbcc9ee1a5d7be0349e855e | HealthSamurai/re-form | shared_test.cljc | (ns re-form.shared-test
(:require [re-form.shared :as sut]
[clojure.test :refer :all]
[matcho.core :refer [match]]))
(def data
{:resourceType "Patient"
:id "patient-id"
:contact [{:telecom [{:system "phone"
:value "8800100200"}
{:system... | null | https://raw.githubusercontent.com/HealthSamurai/re-form/810321d67e3946876c834998e3472d0693846953/test/cljc/re_form/shared_test.cljc | clojure | (ns re-form.shared-test
(:require [re-form.shared :as sut]
[clojure.test :refer :all]
[matcho.core :refer [match]]))
(def data
{:resourceType "Patient"
:id "patient-id"
:contact [{:telecom [{:system "phone"
:value "8800100200"}
{:system... | |
6775875ad6b9c1cfcfc01db9661e431adeaf8478949a2ce1443b6cf91bd68dd1 | yitzchak/common-lisp-jupyter | complete.lisp | (in-package #:jupyter/common-lisp)
(defun remove-if-not-match (partial-name matches)
(remove-if-not (lambda (match)
(alexandria:starts-with-subseq partial-name match))
matches))
(defgeneric complete-fragment (match-set frag)
(:method (match-set frag)
(declare (ignore matc... | null | https://raw.githubusercontent.com/yitzchak/common-lisp-jupyter/a1dc775e4116ab61b34530fe33f3e27291d937f4/src/cl-jupyter/complete.lisp | lisp | (in-package #:jupyter/common-lisp)
(defun remove-if-not-match (partial-name matches)
(remove-if-not (lambda (match)
(alexandria:starts-with-subseq partial-name match))
matches))
(defgeneric complete-fragment (match-set frag)
(:method (match-set frag)
(declare (ignore matc... | |
80189cfb06fe6f1a10d07843bd9dc829ac7806afafbbf22fdbb1f04b37a194db | mgajda/syntaxnet-haskell | ParseTree.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE ViewPatterns #-}
module NLP.SyntaxNet.Types.ParseTree where
import Control.Lens
import Data.Default
import Data.Text
import Data.Tree
import Data.Tree.Lens
import qualified Data.Ma... | null | https://raw.githubusercontent.com/mgajda/syntaxnet-haskell/c29f41721672f48bb8a308ca7e7a81ee84e279d4/src/NLP/SyntaxNet/Types/ParseTree.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveAnyClass #
# LANGUAGE ViewPatterns #
------------------------------------------------------------------------------
|A 'Tree' of 'SnConllToken Text's
|A 'Forest' of 'SnConllToken Text's
|A Map of text values the appropriate tree
| Neat 2-dimensional drawing of... |
module NLP.SyntaxNet.Types.ParseTree where
import Control.Lens
import Data.Default
import Data.Text
import Data.Tree
import Data.Tree.Lens
import qualified Data.Map as M
import Prelude as P
import Data.ConllToken
import Data . SyntaxTr... |
9bbeae7773b86e3343248b75bf567ac5a56e3ba57f0b36b297d927839741fa59 | DKurilo/hackerrank | testgenerator.hs | # LANGUAGE FlexibleInstances , UndecidableInstances , DuplicateRecordFields #
module Main where
import Control.Monad
import qualified Data.List as DL
import Data.List.Split
import qualified Data.Set as DS
import System.Environment
import System.IO
import qualified Data.Map.Strict as DM
import System.Random
import D... | null | https://raw.githubusercontent.com/DKurilo/hackerrank/37063170567b397b25a2b7123bc9c1299d34814a/friend-circle-queries/testgenerator.hs | haskell | # LANGUAGE FlexibleInstances , UndecidableInstances , DuplicateRecordFields #
module Main where
import Control.Monad
import qualified Data.List as DL
import Data.List.Split
import qualified Data.Set as DS
import System.Environment
import System.IO
import qualified Data.Map.Strict as DM
import System.Random
import D... | |
8393777efbff066502365593dadb45109694cb3bf8de999358a53a1ecce0ab35 | ocsigen/js_of_ocaml | recursive_module_init.ml | (* TEST *)
let check ~stub txt f =
let run mode f =
match f mode with
| n -> string_of_int n
| exception Undefined_recursive_module _ -> "__" in
Printf.printf "%5s[%s]: nonrec => %s, self => %s, mod => %s\n%!"
txt
(if f == stub then "stub" else "real")
(run `Nonrec f)
(run `Self f)
... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/58210fabc947c4839b6e71ffbbf353a4ede0dbb7/compiler/tests-ocaml/basic-modules/recursive_module_init.ml | ocaml | TEST |
let check ~stub txt f =
let run mode f =
match f mode with
| n -> string_of_int n
| exception Undefined_recursive_module _ -> "__" in
Printf.printf "%5s[%s]: nonrec => %s, self => %s, mod => %s\n%!"
txt
(if f == stub then "stub" else "real")
(run `Nonrec f)
(run `Self f)
(run `Mod f... |
3daa335ed2a47e0404692b8a910497788b0c9e0a69705cadbe10af5f17ec158e | BranchTaken/Hemlock | test_blit.ml | open! Basis.Rudiments
open! Basis
open Array
let test () =
(* Test on separate arrays. *)
let test_blit2 r0 arr0 r1 arr1 = begin
let _ =
File.Fmt.stdout
|> Fmt.fmt "blit "
|> Range.Uns.pp r0
|> Fmt.fmt " "
|> (fmt Uns.fmt) arr0
|> Fmt.fmt " "
|> Range.Uns.pp r1
|... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/ed397cf3294ca397024e69eb3b1ed5f1db773db6/bootstrap/test/basis/array/test_blit.ml | ocaml | Test on separate arrays.
Test on single array, with potential for overlap. | open! Basis.Rudiments
open! Basis
open Array
let test () =
let test_blit2 r0 arr0 r1 arr1 = begin
let _ =
File.Fmt.stdout
|> Fmt.fmt "blit "
|> Range.Uns.pp r0
|> Fmt.fmt " "
|> (fmt Uns.fmt) arr0
|> Fmt.fmt " "
|> Range.Uns.pp r1
|> Fmt.fmt " "
|> (fmt Uns.f... |
7f719f9d91ca81f0f1330e67a668c4e5219e3894713d0d3d52c263cbb5f31f93 | racket/drracket | marks.rkt | (module marks scheme/base
(require mzlib/list
racket/undefined
racket/contract
(prefix-in mz: mzscheme))
(define-struct full-mark-struct (module-name source label bindings values))
; CONTRACTS
(define mark? (-> ; no args
full-mark-struct?))
(define mark-list? (l... | null | https://raw.githubusercontent.com/racket/drracket/2d7c2cded99e630a69f05fb135d1bf7543096a23/drracket/gui-debugger/marks.rkt | racket | CONTRACTS
no args
( location tail - bound free label lifting ? - > mark - stx )
[make-top-level-mark (syntax? . -> . syntax?)]
lookup-binding-list
debug-key: this key will be used as a key for the continuation marks.
the 'varargs' creator is used to avoid an extra cons cell in every mark:
see module top for typ... | (module marks scheme/base
(require mzlib/list
racket/undefined
racket/contract
(prefix-in mz: mzscheme))
(define-struct full-mark-struct (module-name source label bindings values))
full-mark-struct?))
(define mark-list? (listof procedure?))
(provide/contract
... |
85708d41dc7f8b9516da2eaa8ecf8d892f5cb999ee8f0ee68ec38946cf3f4395 | wadehennessey/wcl | compiler-init.lisp | ( C ) Copyright 1990 - 2014 by . All rights reserved .
(defun installation-parameter (name)
(with-open-file (input (configuration-file-name))
(loop for line = (read-line input nil input)
until (eq line input)
when (string= name (string-right-trim
'(#\Space)
(subseq line 0 (position #... | null | https://raw.githubusercontent.com/wadehennessey/wcl/841316ffe06743d4c14b4ed70819bdb39158df6a/src/compiler/compiler-init.lisp | lisp | (def-nary logeqv logeqv/2)
(def-nary max max/2)
(def-nary min min/2)
Some other math macros are in the rtl files - really?????
HEY! Add check for constant dims here
Don't need this once we can do beta subst AFTER meta-eval.
This is a terrible hack until other parts of the compiler are smarter.
pre-adjust
post-ad... | ( C ) Copyright 1990 - 2014 by . All rights reserved .
(defun installation-parameter (name)
(with-open-file (input (configuration-file-name))
(loop for line = (read-line input nil input)
until (eq line input)
when (string= name (string-right-trim
'(#\Space)
(subseq line 0 (position #... |
b93ced515bc2fb3c096c3495c5b00902ae53d3010a78806c24f38808067cd9db | ocaml-multicore/tezos | test_tez_repr.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_012_Psithaca/lib_protocol/test/test_tez_repr.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... |
e233f1406ba18cbf345e7489730726d806267262a1935b045bff2e0a487a3aa2 | phadej/cabal-extras | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
-- |
Copyright :
-- License: GPL-2.0-or-later
module CabalStoreCheck.Main (main) where
import Peura
import Control.Applicative ((<**>))
import Data.List (intercalate, isPrefixOf)
import Data.Version ... | null | https://raw.githubusercontent.com/phadej/cabal-extras/378cac5495b829794d67f243b27a9317eeed0858/cabal-store-check/src/CabalStoreCheck/Main.hs | haskell | # LANGUAGE OverloadedStrings #
|
License: GPL-2.0-or-later
-----------------------------------------------------------------------------
Options parser
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
check ... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
Copyright :
module CabalStoreCheck.Main (main) where
import Peura
import Control.Applicative ((<**>))
import Data.List (intercalate, isPrefixOf)
import Data.Version (showVersion)
import qualified Cabal.Config ... |
d7478d48b7ee2218eb8922f8f6d421aaaa73dec47464ad39173a7b363c4c305e | malyn/figwheel-node-template | figwheel_node.clj | (ns leiningen.new.figwheel-node
(:require [leiningen.new.templates :refer [renderer name-to-path ->files]]))
(def render (renderer "figwheel-node"))
(defn figwheel-node [name]
(let [data {:name name
:sanitized (name-to-path name)}]
(->files data
["dev/user.clj" (render "user.clj" data)]
... | null | https://raw.githubusercontent.com/malyn/figwheel-node-template/87425ca0cca02462550bea9e66c035e6a412e664/src/leiningen/new/figwheel_node.clj | clojure | (ns leiningen.new.figwheel-node
(:require [leiningen.new.templates :refer [renderer name-to-path ->files]]))
(def render (renderer "figwheel-node"))
(defn figwheel-node [name]
(let [data {:name name
:sanitized (name-to-path name)}]
(->files data
["dev/user.clj" (render "user.clj" data)]
... | |
40a7831cb21528f881f5287b1170a69caaa3be616843edfc3dc16eadf14d1a3b | lixiangqi/medic | debug.rkt | #lang racket
(require medic/core)
(medic "find-path-medic.rkt")
(debug "find-path.rkt")
| null | https://raw.githubusercontent.com/lixiangqi/medic/0920090d3c77d6873b8481841622a5f2d13a732c/demos/find-path/debug.rkt | racket | #lang racket
(require medic/core)
(medic "find-path-medic.rkt")
(debug "find-path.rkt")
| |
da623c6233e12c79eb4c9dc3f6afd31064bdc56a295a7dc86627a7b6a40048d1 | silky/myth | tree_count_nodes.ml | #use "context.decls"
let tree_count_nodes : tree -> nat |>
{ Leaf => 0
| Node(Leaf, 0, Leaf) => 1
| Node(Node(Leaf, 0, Leaf), 0, Leaf) => 2
| Node(Leaf, 0, Node(Leaf, 0, Leaf)) => 2
| Node(Node(Leaf, 0, Node(Leaf, 0, Leaf)), 0, Leaf) => 3
| Node(Leaf, 0, Node(Leaf, 0, Node(Leaf, 0, Leaf))) => 3
} = ?
| null | https://raw.githubusercontent.com/silky/myth/b631edefb2a27a1d731daa6654517d91ca660b95/tests/pldi-2015-contexts/tree_count_nodes.ml | ocaml | #use "context.decls"
let tree_count_nodes : tree -> nat |>
{ Leaf => 0
| Node(Leaf, 0, Leaf) => 1
| Node(Node(Leaf, 0, Leaf), 0, Leaf) => 2
| Node(Leaf, 0, Node(Leaf, 0, Leaf)) => 2
| Node(Node(Leaf, 0, Node(Leaf, 0, Leaf)), 0, Leaf) => 3
| Node(Leaf, 0, Node(Leaf, 0, Node(Leaf, 0, Leaf))) => 3
} = ?
| |
22fbb52c99764530bddbabc78409f69687eae3cb89a8d6a6f03fb4779d9c492e | techascent/tvm-clj | target.clj | (ns tvm-clj.impl.fns.target
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "target") | null | https://raw.githubusercontent.com/techascent/tvm-clj/1088845bd613b4ba14b00381ffe3cdbd3d8b639e/src/tvm_clj/impl/fns/target.clj | clojure | (ns tvm-clj.impl.fns.target
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "target") | |
1cd0beb3fdb12bae014e1b348f903edb05b297f472b1416b3612343705a68bb9 | kseo/poly_constraints | Lexer.hs | module Lexer where
import Text.Parsec
import Text.Parsec.Text.Lazy
import qualified Data.Text.Lazy as L
import qualified Text.Parsec.Token as Tok
import qualified Text.Parsec.Expr as Ex
import Data.Functor.Identity
type Op a = Ex.Operator L.Text () Identity a
type Operators a = Ex.OperatorTable L.Text () Identity a
... | null | https://raw.githubusercontent.com/kseo/poly_constraints/897240cd56b5aefae6f46aa445db055652a18b5b/src/Lexer.hs | haskell | module Lexer where
import Text.Parsec
import Text.Parsec.Text.Lazy
import qualified Data.Text.Lazy as L
import qualified Text.Parsec.Token as Tok
import qualified Text.Parsec.Expr as Ex
import Data.Functor.Identity
type Op a = Ex.Operator L.Text () Identity a
type Operators a = Ex.OperatorTable L.Text () Identity a
... | |
a65c0265943e71eaf98669e13214929f0f27b57ad7cf3040e8baf2df0db4f707 | onedata/op-worker | permissions_test_utils.erl | %%%-------------------------------------------------------------------
@author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% Utility functions used in lfm_perm... | null | https://raw.githubusercontent.com/onedata/op-worker/b906c994c1bfefa28696399db15b3e9a3263c0f7/test_distributed/utils/permissions_test_utils.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
Utility functions used in lfm_permissions framework and tests.
@end
-------------------------------------------------------------------
See p1/p2_local_feed_luma.json
==... | @author
( C ) 2019 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(permissions_test_utils).
-author("Bartosz Walkowicz").
-include("modules/fslogic/fslogic_common.hrl").
-include("modules/logical_file_manager/lfm.hrl").
-include("permissions_test.hrl").
-i... |
069106694d20401f06e3fe7ba37b842751fc288db50f17ebc413e571576b06d6 | aeternity/aeternity | aec_pof.erl | %%%=============================================================================
2018 , Aeternity Anstalt
%%% @doc
%%% Module defining the Proof of Fraud transaction
%%% @end
%%%=============================================================================
-module(aec_pof).
-include("blocks.hrl").
%% Behavior A... | null | https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/apps/aecore/src/aec_pof.erl | erlang | =============================================================================
@doc
Module defining the Proof of Fraud transaction
@end
=============================================================================
Behavior API
Getters
===================================================================
Getters
=... | 2018 , Aeternity Anstalt
-module(aec_pof).
-include("blocks.hrl").
-export([deserialize/1,
new/3,
serialization_template/1,
serialize/1,
hash/1
]).
-export([header1/1,
header2/1,
pubkey/1
]).
Validators
-export([validate/1]).
-define(POF_V... |
0efa00d74239fd637dbc8521f1c7a296188ff4946a7c0b1d69ed890fe09b1cbb | byteally/dbrecord | RoundTrip.hs | # LANGUAGE TypeApplications #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE KindSignatures #
{-# LANGUAGE DataKinds #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE FlexibleContexts #-}
module Test.DBRecord.RoundTrip where
import ... | null | https://raw.githubusercontent.com/byteally/dbrecord/991efe9a293532ee9242b3e9a26434cf16f5b2a0/dbrecord-test/src/Test/DBRecord/RoundTrip.hs | haskell | # LANGUAGE ScopedTypeVariables #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
TODO: Handle pico | # LANGUAGE TypeApplications #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
module Test.DBRecord.RoundTrip where
import Test.Tasty
import Test.Tasty.HUnit
import Hedgehog
import qualified Hedgehog.Gen as Gen
import qu... |
5d087ae71927bcd9def0adffa22d284b7a386d315b5739c5df683aba7082f8f4 | clojurewerkz/archimedes | project.clj | (defproject clojurewerkz/archimedes "3.0.0.0-SNAPSHOT"
:description "Clojure wrapper for Tinkerpop Blueprints"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[potemkin "0.2.0"]
[com.tinkerpop.blueprint... | null | https://raw.githubusercontent.com/clojurewerkz/archimedes/f3300d3d71d35534acf7cc6f010e3fa503be0fba/project.clj | clojure | (defproject clojurewerkz/archimedes "3.0.0.0-SNAPSHOT"
:description "Clojure wrapper for Tinkerpop Blueprints"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.6.0"]
[potemkin "0.2.0"]
[com.tinkerpop.blueprint... | |
a3941dd1aa63c2db4415ee20801b425b1bd710cbe43a848a292983dcf61a04a1 | tenpureto/tenpureto | Messages.hs | module Tenpureto.Messages where
import Data.Text ( Text )
import qualified Data.Text as T
import Path
import Prettyprinter
import Tenpureto.Orphanage ( )
-- Commit messages
templateCommitMetadata :: Text -> [Text] -> Text
te... | null | https://raw.githubusercontent.com/tenpureto/tenpureto/3294b4e4063bbd8924485c05930bbe68723c7d14/src/Tenpureto/Messages.hs | haskell | Commit messages
Pull request messages
UI messages | module Tenpureto.Messages where
import Data.Text ( Text )
import qualified Data.Text as T
import Path
import Prettyprinter
import Tenpureto.Orphanage ( )
templateCommitMetadata :: Text -> [Text] -> Text
templateCommitMetadat... |
a72815477984342b3f770ccf06d81e71be3569d5b9d4419babbb44243bd097c4 | softwarelanguageslab/maf | counted.scm | ;; Example of actor that is only allowed to N messages.
(define N 5)
(define counted-mirror (mirror "mirror" (n)
(send (interpreter m)
(if (= n 0)
(begin (reply-to interpreter 'fail)
(error "could... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/be58e02c63d25cab5b48fdf7b737b68b882e9dca/test/concurrentScheme/actors/mirrors/counted.scm | scheme | Example of actor that is only allowed to N messages. |
(define N 5)
(define counted-mirror (mirror "mirror" (n)
(send (interpreter m)
(if (= n 0)
(begin (reply-to interpreter 'fail)
(error "could not send message"))
(begi... |
140a436c8c95842bf19c32af81cdc49992a99e714370f1a5bf13cd9ab716ea96 | geophf/1HaskellADay | Exercise.hs | {-# LANGUAGE OverloadedStrings #-}
module Y2018.M07.D17.Exercise where
-
Another day . Another JSON .
Remember , back in the day , when everything was all about XML ? This was back in
1996 and there was an XML - craze of all data had to be in XML or it was n't cool .
I get a similar vibe about [ the current... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M07/D17/Exercise.hs | haskell | # LANGUAGE OverloadedStrings #
}
How many articles are in the JSON?
How many articles have preview images? |
module Y2018.M07.D17.Exercise where
-
Another day . Another JSON .
Remember , back in the day , when everything was all about XML ? This was back in
1996 and there was an XML - craze of all data had to be in XML or it was n't cool .
I get a similar vibe about [ the current year ] and JSON .
So , anyway .... |
4fa458292e3c95b36fedd0f71d1c7f5280d5a689d071cdb6a26306726f6cf51e | yanatan16/fyra | project.clj | (defproject fyra "0.1.0-SNAPSHOT"
:description "An example implementation of Functional Relational Programming as described in Out of the Tar Pit"
:url ""
:license {:name "MIT"
:url ""}
:dependencies [[org.clojure/clojure "1.7.0"]
clj / cljs
[prismatic/schema "1.0.3"]]
:cljsbu... | null | https://raw.githubusercontent.com/yanatan16/fyra/50e7272fd5e704d41cd077fe4c8655584c8ce908/project.clj | clojure | :hooks [leiningen.cljsbuild] | (defproject fyra "0.1.0-SNAPSHOT"
:description "An example implementation of Functional Relational Programming as described in Out of the Tar Pit"
:url ""
:license {:name "MIT"
:url ""}
:dependencies [[org.clojure/clojure "1.7.0"]
clj / cljs
[prismatic/schema "1.0.3"]]
:cljsbu... |
eea6f20882999ab1ac75f1c23c280dfe5eb23e88d7dd5edef6d42702106a247e | ghc/packages-dph | Draw.hs | # LANGUAGE PatternGuards #
-- | Drawing the world as a gloss picture.
module Gloss.Draw
(drawWorld)
where
import Common.World
import Common.Body
import Graphics.Gloss
import qualified Solver.ListBH.Solver as L
import qualified Data.Vector.Unboxed as V
-- | Radius of the circle representing each body.
pointSize :: ... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-examples/examples/real/NBody/Gloss/Draw.hs | haskell | | Drawing the world as a gloss picture.
| Radius of the circle representing each body.
that's actually being used to calculate the accelerations.
To display the other trees we'd have to write draw functions for them,
or functions to convert them to the list version.
The bounding box
Draw ... | # LANGUAGE PatternGuards #
module Gloss.Draw
(drawWorld)
where
import Common.World
import Common.Body
import Graphics.Gloss
import qualified Solver.ListBH.Solver as L
import qualified Data.Vector.Unboxed as V
pointSize :: Float
pointSize = 4
| Draw the world , and optionally show the Barnes - Hut tree .
NO... |
8d345869b1df7a0fe44c809a199c2a87049ec846549a7723f97ead18acc44d01 | static-analysis-engineering/codehawk | xrewrite.mli | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Analyzer Infrastructure Utilities
Author : ------------------------------------------------------------------------------
The MIT License... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/45f39248b404eeab91ae225243d79ec0583c3331/CodeHawk/CH/xprlib/xrewrite.mli | ocaml | xprlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Analyzer Infrastructure Utilities
Author : ------------------------------------------------------------------------------
The MIT License... |
ba9467917c16c969d4d6424e9b1a849770432906b3a309b8021ce7317915dd14 | phantomics/april | setup.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Coding : utf-8 ; Package : AprilLib . Dfns . String -*-
;;;; setup.lisp
(in-package #:april-lib.dfns.string)
(april-create-workspace string-lib-space)
| null | https://raw.githubusercontent.com/phantomics/april/9d4701f33c66909b06ed4646aaa926abd5d58e9a/libraries/dfns/string/setup.lisp | lisp | Syntax : ANSI - Common - Lisp ; Coding : utf-8 ; Package : AprilLib . Dfns . String -*-
setup.lisp |
(in-package #:april-lib.dfns.string)
(april-create-workspace string-lib-space)
|
e9fe6c755916c3dd99cccb314c45c5e201139f4e40b0dcdb438d9b79ec48f3d3 | atolab/zenoh | mcodec.ml |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... | null | https://raw.githubusercontent.com/atolab/zenoh/32e311aae6be93c001fd725b4d918b2fb4e9713d/src/zenoh-proto/mcodec.ml | ocaml | We shoud compute the size and allocate accordingly |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... |
4d9b5815a792840c8e4474c356802d7e401474c11ac01c0ed6f9fd1a258c2cee | ocurrent/ocluster | process.mli | type error = [
| `Cancelled
| `Exit_code of int
| `Msg of string
]
val exec :
label:string ->
log:Log_data.t ->
switch:Lwt_switch.t ->
?env:string array ->
?stdin:string ->
?stderr:Lwt_process.redirection ->
?is_success:(int -> bool) ->
string list ->
(unit, [> error]) Lwt_result.t
val check_c... | null | https://raw.githubusercontent.com/ocurrent/ocluster/4094e5497199b8fb82edca7f25c42c49babc5722/worker/process.mli | ocaml | type error = [
| `Cancelled
| `Exit_code of int
| `Msg of string
]
val exec :
label:string ->
log:Log_data.t ->
switch:Lwt_switch.t ->
?env:string array ->
?stdin:string ->
?stderr:Lwt_process.redirection ->
?is_success:(int -> bool) ->
string list ->
(unit, [> error]) Lwt_result.t
val check_c... | |
3384814b6a367bc86b3fe96870dcd1b7cf4040f66b52b55b8b67db51f1c4482a | kwanghoon/polyrpc | CSSubst.hs | module CSSubst where
import Location
import Prim
import Literal
import CSType
import CSExpr
----------------
-- Substitutions
----------------
--
elim x subst = [(y,e) | (y,e)<-subst, y/=x]
elims xs subst = foldl (\subst0 x0 -> elim x0 subst0) subst xs
--
doSubstExpr :: [(String,Value)] -> Expr -> Expr
doSubstEx... | null | https://raw.githubusercontent.com/kwanghoon/polyrpc/6b68d7fd7f0743be55d467d4b722763dd49da474/app/cs/CSSubst.hs | haskell | --------------
Substitutions
--------------
let bindingDecls1 =
map (\(Binding istop x ty expr) ->
elimed_subst = elims (map (\(Binding _ x _ _) -> x) bindingDecls) subst
expr1 = doSubstExpr elimed_subst expr
let bindingDecls1 =
(map (\(Binding istop x ty bexpr) ->
let subst... | module CSSubst where
import Location
import Prim
import Literal
import CSType
import CSExpr
elim x subst = [(y,e) | (y,e)<-subst, y/=x]
elims xs subst = foldl (\subst0 x0 -> elim x0 subst0) subst xs
doSubstExpr :: [(String,Value)] -> Expr -> Expr
doSubstExpr subst (ValExpr v) = ValExpr (doSubstValue subst v)
do... |
9019f81f236e9d2c6ce626a0baa219d9c3cfd07af60993b7a38b419863a21b25 | EMSL-NMR-EPR/Haskell-MFAPipe-Executable | IsotopomerFractionVector.hs | module MFAPipe.Csv.Types.IsotopomerFractionVector
( IsotopomerFractionVectorRecords(..)
, IsotopomerFractionVectorRecord(..)
, encode
, encodeWith
, IndexedIsotopomerFractionVectorRecords(..)
, IndexedIsotopomerFractionVectorRecord(..)
, encodeIndexed
, encodeIndexedWith
) where
import Data.ByteString.Lazy (... | null | https://raw.githubusercontent.com/EMSL-NMR-EPR/Haskell-MFAPipe-Executable/8a7fd13202d3b6b7380af52d86e851e995a9b53e/MFAPipe/app/MFAPipe/Csv/Types/IsotopomerFractionVector.hs | haskell | # UNPACK #
# UNPACK # | module MFAPipe.Csv.Types.IsotopomerFractionVector
( IsotopomerFractionVectorRecords(..)
, IsotopomerFractionVectorRecord(..)
, encode
, encodeWith
, IndexedIsotopomerFractionVectorRecords(..)
, IndexedIsotopomerFractionVectorRecord(..)
, encodeIndexed
, encodeIndexedWith
) where
import Data.ByteString.Lazy (... |
fec55c65b8b5b83ba9862016e8992448cfc125cef0e9c69f51360a8d462494e0 | gfour/gic | hodata.hs | data Object = Object Int (Int -> Int) ;
result :: Int
result = use obj ;
obj :: Object
obj = Object 1 inc ;
use :: Object -> Int
use o = case o of Object field func -> func field ;
inc :: Int -> Int
inc a = a + 1
| null | https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/Examples/Data/hodata.hs | haskell | data Object = Object Int (Int -> Int) ;
result :: Int
result = use obj ;
obj :: Object
obj = Object 1 inc ;
use :: Object -> Int
use o = case o of Object field func -> func field ;
inc :: Int -> Int
inc a = a + 1
| |
8ac11b17119d709b295ccc97ee008e0de49f81039006dba764a45f232fa7be76 | pingles/clj-kafka | zk.clj | (ns clj-kafka.test.consumer.zk
(:use [expectations]
[clj-kafka.core :only (with-resource to-clojure)]
[clj-kafka.producer :only (producer send-messages message)]
[clj-kafka.test.utils :only (with-test-broker)])
(:require [clj-kafka.consumer.zk :as zk]))
(def producer-config {"metadata.broke... | null | https://raw.githubusercontent.com/pingles/clj-kafka/321f2d6a90a2860f4440431aa835de86a72e126d/test/clj_kafka/test/consumer/zk.clj | clojure | (ns clj-kafka.test.consumer.zk
(:use [expectations]
[clj-kafka.core :only (with-resource to-clojure)]
[clj-kafka.producer :only (producer send-messages message)]
[clj-kafka.test.utils :only (with-test-broker)])
(:require [clj-kafka.consumer.zk :as zk]))
(def producer-config {"metadata.broke... | |
c5fcb39b674a5e1e313003582750bcbd536e483b5dbd07ff1c8afe7259a9abbf | cbaggers/rtg-math | consing.lisp | (in-package :rtg-math.matrix4)
;;----------------------------------------------------------------
(defn identity () mat4
(declare (optimize (speed 3) (safety 1) (debug 1)))
(make-array 16 :element-type 'single-float
:initial-contents '(1f0 0f0 0f0 0f0
0f0 1f0 0f0 0f... | null | https://raw.githubusercontent.com/cbaggers/rtg-math/29fc5b3d0028a4a11a82355ecc8cca62662c69e0/matrices/matrix4/consing.lisp | lisp | ----------------------------------------------------------------
----------------------------------------------------------------
as you can see it is stored in column major order
----------------------------------------------------------------
----------------------------------------------------------------
---------... | (in-package :rtg-math.matrix4)
(defn identity () mat4
(declare (optimize (speed 3) (safety 1) (debug 1)))
(make-array 16 :element-type 'single-float
:initial-contents '(1f0 0f0 0f0 0f0
0f0 1f0 0f0 0f0
0f0 0f0 1f0 0f0
... |
df00316af3ebfc5b66eb24ecd816e4a9a0b8e082b2bcc1bd26efedb8b0921d18 | JHU-PL-Lab/jaylang | ddpa_pds_structure_types.ml | open Jhupllib
open Jayil
open Jay_utils
open Ast
open Ast_pp
open Ddpa_abstract_ast
open Ddpa_context_stack
open Interface_utils
module type Bounded_capture_size_sig = sig
include Decorated_type
val of_int : int -> t
val to_int : t -> int
end
module Make (C : Context_stack) = struct
module C = C
* This modu... | null | https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/src/ddpa-analysis/pds/ddpa_pds_structure_types.ml | ocaml | * The bottom of stack element is necessary as a sentinel. It's pushed
as the initial element on the continuation stack so we don't need to
check for empty continuation stacks. | open Jhupllib
open Jayil
open Jay_utils
open Ast
open Ast_pp
open Ddpa_abstract_ast
open Ddpa_context_stack
open Interface_utils
module type Bounded_capture_size_sig = sig
include Decorated_type
val of_int : int -> t
val to_int : t -> int
end
module Make (C : Context_stack) = struct
module C = C
* This modu... |
0dc9784c4ab695fd44c544288cf9bfa778f3aebd7eec60dfd9979a7429da73ff | glotcode/glot-www | Persistent.hs | module Util.Persistent
( RawQuery(..)
, GetEntitiesWithCountQuery(..)
, EntitiesWithCount(..)
, getEntitiesWithCount
, LimitOffset(..)
) where
import Import
import qualified Database.Persist.Sql as Sql
import Data.Function ((&))
data RawQuery = RawQuery
{ query :: Text
, queryValues :... | null | https://raw.githubusercontent.com/glotcode/glot-www/cef0d7d00c0b0501fa2fdc407a26d13b19b84bd9/Util/Persistent.hs | haskell | module Util.Persistent
( RawQuery(..)
, GetEntitiesWithCountQuery(..)
, EntitiesWithCount(..)
, getEntitiesWithCount
, LimitOffset(..)
) where
import Import
import qualified Database.Persist.Sql as Sql
import Data.Function ((&))
data RawQuery = RawQuery
{ query :: Text
, queryValues :... | |
b3afcc691a86f28dec490a42b12502b8053d6ef76dc34b8a55b42baa11b8f3a6 | askvortsov1/nittany_market | change_password.ml | open! Core
open! Bonsai_web
module Form = Bonsai_web_ui_form
module E = Form.Elements
module T = struct
type t = { current_password : string; new_password : string }
[@@deriving sexp_of, typed_fields]
let form_for_field : type a. a Typed_field.t -> a Form.t Computation.t =
function
| Current_password ->... | null | https://raw.githubusercontent.com/askvortsov1/nittany_market/08ffcad2bb2ead9aaeb85b22b88aa2af879e36ad/frontend/change_password.ml | ocaml | open! Core
open! Bonsai_web
module Form = Bonsai_web_ui_form
module E = Form.Elements
module T = struct
type t = { current_password : string; new_password : string }
[@@deriving sexp_of, typed_fields]
let form_for_field : type a. a Typed_field.t -> a Form.t Computation.t =
function
| Current_password ->... | |
88e3e3166e617f3d8104c930b93a6009d5fe6214f48aead1bf592809afd7d6da | hackwaly/ocamlearlybird | typenv.mli | type t
val from_summary :
get_search_dirs:(string -> string list) ->
Env.summary -> Subst.t -> t
val find_value : Path.t -> t -> Types.value_description
val find_value_by_name : Longident.t -> t -> Path.t * Types.value_description
val find_type : Path.t -> t -> Types.type_declaration
val find_constructor_by_name :... | null | https://raw.githubusercontent.com/hackwaly/ocamlearlybird/e483beb6e9080352234be45ab7309254ad7aaa37/src/typenv/typenv.mli | ocaml | type t
val from_summary :
get_search_dirs:(string -> string list) ->
Env.summary -> Subst.t -> t
val find_value : Path.t -> t -> Types.value_description
val find_value_by_name : Longident.t -> t -> Path.t * Types.value_description
val find_type : Path.t -> t -> Types.type_declaration
val find_constructor_by_name :... | |
03cc0fd8cd4fec602db6e3dfbc3b113cb2e40dab22d78102615f2af1bf3d8d8d | xvw/preface | arrow_apply.mli | (** Functor that generate a suite for an [Arrow Apply]. *)
module Suite
(R : Model.PROFUNCTORIAL)
(P : Preface_specs.ARROW_APPLY with type ('a, 'b) t = ('a, 'b) R.t)
(A : Model.T0)
(B : Model.T0)
(C : Model.T0)
(D : Model.T0) : Model.SUITE
| null | https://raw.githubusercontent.com/xvw/preface/84a297e1ee2967ad4341dca875da8d2dc6d7638c/lib/preface_qcheck/arrow_apply.mli | ocaml | * Functor that generate a suite for an [Arrow Apply]. |
module Suite
(R : Model.PROFUNCTORIAL)
(P : Preface_specs.ARROW_APPLY with type ('a, 'b) t = ('a, 'b) R.t)
(A : Model.T0)
(B : Model.T0)
(C : Model.T0)
(D : Model.T0) : Model.SUITE
|
73eb24e51dd13a9822aceaea375e3a12600e4f695d9576d5e1ed90ac1a42617f | abevoelker/haskellbook-solutions | vigenere.hs | module Vigenere where
import Control.Monad
import Data.Char
import System.Exit (exitSuccess)
infiniteUpper :: String
infiniteUpper = concat $ (repeat ['A'..'Z'])
infiniteLower :: String
infiniteLower = concat $ (repeat ['a'..'z'])
charIdx ' A ' = 0
charIdx ' B ' = 1
charIdx :: Char -> Int
charIdx x
| elem x ['... | null | https://raw.githubusercontent.com/abevoelker/haskellbook-solutions/9e2804940b3b45bdc1b04cfa5d536097629c9498/ch13/vigenere.hs | haskell | charShift 'Y' 2 = 'A'
charShift 'y' 2 = 'a' | module Vigenere where
import Control.Monad
import Data.Char
import System.Exit (exitSuccess)
infiniteUpper :: String
infiniteUpper = concat $ (repeat ['A'..'Z'])
infiniteLower :: String
infiniteLower = concat $ (repeat ['a'..'z'])
charIdx ' A ' = 0
charIdx ' B ' = 1
charIdx :: Char -> Int
charIdx x
| elem x ['... |
adb5550838eab509c0a88b2de1be0bae1024f4531c24f7042a465326b28f58bc | statebox/cql | Generator.hs |
SPDX - License - Identifier : AGPL-3.0 - only
This file is part of ` statebox / cql ` , the categorical query language .
Copyright ( C ) 2019 <
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 So... | null | https://raw.githubusercontent.com/statebox/cql/b155e737ef4977ec753e44790f236686ff6a4558/test/Language/CQL/Parser/Generator.hs | haskell |
SPDX - License - Identifier : AGPL-3.0 - only
This file is part of ` statebox / cql ` , the categorical query language .
Copyright ( C ) 2019 <
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 So... | |
4976dc17eaed6acf4623d093c11e92e971edc0a1e30e9cc92d8a41bed8971d3f | christiankissig/ocaml99 | problem67.ml | A string representation of binary trees
Somebody represents binary trees as strings of the following type ( see example opposite ):
a(b(d , e),c(,f(g , ) ) )
a ) Write a Prolog predicate which generates this string representation , if the tree is given as usual ( as nil or t(X , L , R ) term ) . ... | null | https://raw.githubusercontent.com/christiankissig/ocaml99/c25f1790f695f9dd68b23abb472dc7c860d840f8/problem67.ml | ocaml | A string representation of binary trees
Somebody represents binary trees as strings of the following type ( see example opposite ):
a(b(d , e),c(,f(g , ) ) )
a ) Write a Prolog predicate which generates this string representation , if the tree is given as usual ( as nil or t(X , L , R ) term ) . ... | |
d53b8494b442980e31d447656569fa33362f2b19023774f1c4a43fcd981f8f77 | racket/plai | no-collection-collector.rkt | #lang plai/collector
(define ptr 0)
(define (init-allocator) (void))
(define (gc:deref loc) #f)
(define (gc:alloc-flat hv) 0)
(define (gc:cons hd tl) 0)
(define (gc:first pr) 0)
(define (gc:rest pr) 0)
(define (gc:flat? loc) #t)
(define (gc:cons? loc) #f)
(define (gc:set-first! pr new) (void))
(define (gc:set-rest! ... | null | https://raw.githubusercontent.com/racket/plai/164f3b763116fcfa7bd827be511650e71fa04319/plai-lib/tests/gc/bad-collectors/no-collection-collector.rkt | racket | #lang plai/collector
(define ptr 0)
(define (init-allocator) (void))
(define (gc:deref loc) #f)
(define (gc:alloc-flat hv) 0)
(define (gc:cons hd tl) 0)
(define (gc:first pr) 0)
(define (gc:rest pr) 0)
(define (gc:flat? loc) #t)
(define (gc:cons? loc) #f)
(define (gc:set-first! pr new) (void))
(define (gc:set-rest! ... | |
83b3a3e842ee2433ac2987a5ab90fbc5a52e43414c1a8cd8827ff6dc62a77b31 | LaurentMazare/ocaml-torch | torch_toplevel.ml | let parse_and_execute str =
Lexing.from_string str
|> !Toploop.parse_toplevel_phrase
|> Toploop.execute_phrase true Format.err_formatter
|> fun (_ : bool) -> ()
let register_pp str = Printf.sprintf "#install_printer %s;;" str |> parse_and_execute
let register_all_pps () = register_pp "Torch.Tensor.pp"
let () =... | null | https://raw.githubusercontent.com/LaurentMazare/ocaml-torch/a82b906a22c7c23138af16fab497a08e5167d249/src/toplevel/torch_toplevel.ml | ocaml | let parse_and_execute str =
Lexing.from_string str
|> !Toploop.parse_toplevel_phrase
|> Toploop.execute_phrase true Format.err_formatter
|> fun (_ : bool) -> ()
let register_pp str = Printf.sprintf "#install_printer %s;;" str |> parse_and_execute
let register_all_pps () = register_pp "Torch.Tensor.pp"
let () =... | |
f3fa658fa904e06596a876aac86a5912881f1bee1fe53b5fe55774479ea057b2 | ddssff/refact-global-hse | M2.hs | module M2
( s3
, s2
) where
import M1 (s1)
import M1
s3 :: Int
s3 = s2 + 1
s2 = s1 + 1
| null | https://raw.githubusercontent.com/ddssff/refact-global-hse/519a017009cae8aa1a3db1b46eb560d76bd9895d/tests/input/simple4/M2.hs | haskell | module M2
( s3
, s2
) where
import M1 (s1)
import M1
s3 :: Int
s3 = s2 + 1
s2 = s1 + 1
| |
063e408123670c4187f9b5ef12eb0275371d12cb843bda4fd08995dc4ce7abb0 | Hexstream/enhanced-typep | main.lisp | (in-package #:enhanced-typep)
(declaim (inline typep %make-typep-wrapper)
(ftype (function (t &optional t t)
t)
typep))
(defun typep (object-or-type &optional (type nil type-supplied-p) environment)
(if type-supplied-p
(cl:typep object-or-type type environmen... | null | https://raw.githubusercontent.com/Hexstream/enhanced-typep/ce781bdadc4eb062f72631e490c9358cae01254e/main.lisp | lisp | (in-package #:enhanced-typep)
(declaim (inline typep %make-typep-wrapper)
(ftype (function (t &optional t t)
t)
typep))
(defun typep (object-or-type &optional (type nil type-supplied-p) environment)
(if type-supplied-p
(cl:typep object-or-type type environmen... | |
bf86e587c98dba2e3ef74d58ad737d61f07f3e851a3852819dd497b0cf1902c2 | blindglobe/clocc | union-find.lisp | ;;; -*- Mode: CLtL -*-
;;; union-find.lisp --
;;; Simple implementation of the well known UNION-FIND data structure
;;; (with weighted path compression).
;;; See file README for more info.
;;;
Author :
;;;
Copyright ( c ) 2000 . All rights reserved .
;;; This software is released under the terms of the GNU Les... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/ext/union-find/union-find.lisp | lisp | -*- Mode: CLtL -*-
union-find.lisp --
Simple implementation of the well known UNION-FIND data structure
(with weighted path compression).
See file README for more info.
This software is released under the terms of the GNU Lesser General
Public License (LGPL, see file COPYRIGHT for details).
Some error prevent... |
Author :
Copyright ( c ) 2000 . All rights reserved .
(unless (find-package "CL.UTIL.UNION-FIND")
(load "union-find-pkg"))
(in-package "CL.UTIL.UNION-FIND")
(defstruct (partition (:constructor %make-partition))
"The Union-Find Partion Structure.
The Partition structure serves as a collector of various a... |
9531f542f23d5a785043ea8da6915ab3dd27213ba20c60b3f1f93d5b347aa312 | erlware/resource_discovery | rd_sup.erl | %%%-------------------------------------------------------------------
%%% File : rd_sup.erl
Author : < >
%%% @doc The super.
%%%-------------------------------------------------------------------
-module(rd_sup).
-behaviour(supervisor).
%%--------------------------------------------------------------------... | null | https://raw.githubusercontent.com/erlware/resource_discovery/9460c5447f7f3209e01fd33b5239d3c361a2f5e7/src/rd_sup.erl | erlang | -------------------------------------------------------------------
File : rd_sup.erl
@doc The super.
-------------------------------------------------------------------
--------------------------------------------------------------------
Include files
-------------------------------------------------------------... | Author : < >
-module(rd_sup).
-behaviour(supervisor).
-export([
start_link/0
]).
-export([
init/1
]).
Macros
-define(SERVER, ?MODULE).
-define(HEART, heart).
Records
( ) - > { ok , Pid }
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
... |
59ebf1b35e37e107c5efbe1850ace170e38cdb42e2b61585c90336d69e634498 | tsloughter/kuberl | kuberl_v1_csi_persistent_volume_source.erl | -module(kuberl_v1_csi_persistent_volume_source).
-export([encode/1]).
-export_type([kuberl_v1_csi_persistent_volume_source/0]).
-type kuberl_v1_csi_persistent_volume_source() ::
#{ 'controllerExpandSecretRef' => kuberl_v1_secret_reference:kuberl_v1_secret_reference(),
'controllerPublishSecretRef' => kuber... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1_csi_persistent_volume_source.erl | erlang | -module(kuberl_v1_csi_persistent_volume_source).
-export([encode/1]).
-export_type([kuberl_v1_csi_persistent_volume_source/0]).
-type kuberl_v1_csi_persistent_volume_source() ::
#{ 'controllerExpandSecretRef' => kuberl_v1_secret_reference:kuberl_v1_secret_reference(),
'controllerPublishSecretRef' => kuber... | |
97116b5cb878702a267f9f64a0658e99dbff6ce4837e0527aa26a37c547a89eb | cedlemo/OCaml-GI-ctypes-bindings-generator | Binding_flags.ml | open Ctypes
open Foreign
type t = Default | Bidirectional | Sync_create | Invert_boolean
type t_list = t list
let of_value v =
if v = Unsigned.UInt32.of_int 0 then Default
else if v = Unsigned.UInt32.of_int 1 then Bidirectional
else if v = Unsigned.UInt32.of_int 2 then Sync_create
else if v = Unsigned.UInt32.... | null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/GObject/Binding_flags.ml | ocaml | open Ctypes
open Foreign
type t = Default | Bidirectional | Sync_create | Invert_boolean
type t_list = t list
let of_value v =
if v = Unsigned.UInt32.of_int 0 then Default
else if v = Unsigned.UInt32.of_int 1 then Bidirectional
else if v = Unsigned.UInt32.of_int 2 then Sync_create
else if v = Unsigned.UInt32.... | |
0c668f26d1fca2d9850cea8f7f6a7b3912021d0118fbb41f1d2b031e83214130 | bos/rwh | MVarExample.hs | {-- snippet communicate --}
import Control.Concurrent
communicate = do
m <- newEmptyMVar
forkIO $ do
v <- takeMVar m
putStrLn ("received " ++ show v)
putStrLn "sending"
putMVar m "wake up!"
{-- /snippet communicate --}
| null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch25/MVarExample.hs | haskell | - snippet communicate -
- /snippet communicate - | import Control.Concurrent
communicate = do
m <- newEmptyMVar
forkIO $ do
v <- takeMVar m
putStrLn ("received " ++ show v)
putStrLn "sending"
putMVar m "wake up!"
|
44b732101b90ec8f8f1230376ff320f685a37dd658bc1c32dca5900053a77a09 | comby-tools/comby | import.ml | open! Core
include Composition_infix
include struct
(* Modules directly exported from Patdiff_kernel *)
open Patdiff_kernel
module Ansi_output = Ansi_output
module Comparison_result = Comparison_result
module Diff_input = Diff_input
module File_name = File_name
module Float_tolerance = Float_tolerance
... | null | https://raw.githubusercontent.com/comby-tools/comby/fa71ea540855ba5bd48d948dd8c8ff034714348d/lib/app/vendored/patdiff/lib/src/import.ml | ocaml | Modules directly exported from Patdiff_kernel | open! Core
include Composition_infix
include struct
open Patdiff_kernel
module Ansi_output = Ansi_output
module Comparison_result = Comparison_result
module Diff_input = Diff_input
module File_name = File_name
module Float_tolerance = Float_tolerance
module Format = Format
module Hunks = Hunks
module... |
c1560d70158198eda366919f0ebf255c1bf66151984d14cf30189de8a775ffdd | Clozure/ccl | chud-metering.lisp | -*-Mode : LISP ; Package : ( CHUD (: USE CL CCL ) ) -*-
;;;
Copyright 2005 - 2009 Clozure Associates
;;;
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
;;;
;;; Unl... | null | https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/library/chud-metering.lisp | lisp | Package : ( CHUD (: USE CL CCL ) ) -*-
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 Licens... | Copyright 2005 - 2009 Clozure Associates
distributed under the License is distributed on an " AS IS " BASIS ,
Some of this is based on work done by and
(defpackage "CHUD"
(:use "CL" "CCL")
(:export "METER" "*SHARK-CONFIG-FILE*"))
(in-package "CHUD")
(eval-when (:compile-toplevel :load-toplevel :exec... |
df2752333191d80e288ac92a0584fd08e7345d03d1563a3d8f76ce48d356ffed | VitoVan/calm | calm.lisp | (in-package :calm)
(defun calm-quit ()
on Linux & Windows , uiop : quit will hang a while
;; don't know why, fix it recklessly.
#-darwin
(uiop:quit 0 nil)
#+darwin
(uiop:quit))
(defun draw ()
"default drawing function, user should override this"
(c:set-source-rgb (/ 12 255) (/ 55 255) (/ 132 255))
(... | null | https://raw.githubusercontent.com/VitoVan/calm/f4f1c297faf349e6d984b970b705341bb97c077e/src/calm.lisp | lisp | don't know why, fix it recklessly.
default window icon
set current context
set current surface
default background color
default font size
default font face
default color
default position
and the user double clicked the application,
then APP_DIR won't be able to be set correctly,
since the `pwd` will be give... | (in-package :calm)
(defun calm-quit ()
on Linux & Windows , uiop : quit will hang a while
#-darwin
(uiop:quit 0 nil)
#+darwin
(uiop:quit))
(defun draw ()
"default drawing function, user should override this"
(c:set-source-rgb (/ 12 255) (/ 55 255) (/ 132 255))
(c:paint)
(c:set-source-rgb 1 1 1)
(c... |
83367cc6126242ba12030c996f8a895ffd44eb5775b89eabd0d2303f4fb63991 | kayceesrk/Quelea | LWW_simple.hs | # LANGUAGE TemplateHaskell , ScopedTypeVariables , CPP #
import Quelea.Shim
import Quelea.ClientMonad
import Quelea.DBDriver
import Quelea.Contract
import Control.Concurrent (ThreadId, myThreadId, forkIO, threadDelay, killThread)
import Quelea.NameService.Types
import Quelea.Types (summarize)
import Quelea.Marshall
im... | null | https://raw.githubusercontent.com/kayceesrk/Quelea/73db79a5d5513b9aeeb475867a67bacb6a5313d0/tests/LWW/LWW_simple.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
Kind of process
Broker's address
Daemon Options
--------------
Client Options
--------------
Number of client rounds
Number of concurrent client threa... | # LANGUAGE TemplateHaskell , ScopedTypeVariables , CPP #
import Quelea.Shim
import Quelea.ClientMonad
import Quelea.DBDriver
import Quelea.Contract
import Control.Concurrent (ThreadId, myThreadId, forkIO, threadDelay, killThread)
import Quelea.NameService.Types
import Quelea.Types (summarize)
import Quelea.Marshall
im... |
2bfed074282dee935b630b3f7b32cb29319e4db564375c6d7464a6bad6666bc2 | WorksHub/client | db.cljc | (ns wh.profile.section-admin.db)
(def updating-user-status-key :updating-status)
(defn updating-status [db]
(get db updating-user-status-key))
(defn set-updating-status [db status]
(assoc db updating-user-status-key (if (= "approved" status)
:approving
... | null | https://raw.githubusercontent.com/WorksHub/client/a51729585c2b9d7692e57b3edcd5217c228cf47c/client/src/wh/profile/section_admin/db.cljc | clojure | (ns wh.profile.section-admin.db)
(def updating-user-status-key :updating-status)
(defn updating-status [db]
(get db updating-user-status-key))
(defn set-updating-status [db status]
(assoc db updating-user-status-key (if (= "approved" status)
:approving
... | |
aad2899b2c6f97c02893baeee06b83813d917087422453d521d69103021debe8 | ocaml-explore/explore | new.ml | open Cmdliner
open Explore
let run collection =
match collection with
| "workflow" ->
Collection.Workflow.build ();
0
| "user" ->
Collection.User.build ();
0
| "tool" ->
Collection.Tool.build ();
0
| "platform" ->
Collection.Tool.build ();
0
| "library" ->
... | null | https://raw.githubusercontent.com/ocaml-explore/explore/117768b378959f18a8d818f37779a750e90f3438/explore/bin/new.ml | ocaml | open Cmdliner
open Explore
let run collection =
match collection with
| "workflow" ->
Collection.Workflow.build ();
0
| "user" ->
Collection.User.build ();
0
| "tool" ->
Collection.Tool.build ();
0
| "platform" ->
Collection.Tool.build ();
0
| "library" ->
... | |
796a7ec5f8b2ae07c070c75de41c981bef0be778c6d93d9686bba8767f1d1667 | ocaml-opam/opam2web | o2wBlog.mli | (**************************************************************************)
(* *)
Copyright 2012 - 2019 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/ocaml-opam/opam2web/0797940ad5fa779555d34a5561dc288e10fca0b1/src/o2wBlog.mli | ocaml | ************************************************************************
All rights reserved.This file is distributed under the terms of the
exception. ... | Copyright 2012 - 2019 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 3.0 with linking
OPAM is distributed in the hope that it will be useful , but WITHOUT
or FITNESS FOR A P... |
870b6cd49ab13a4322c91343c3acccee7b9870f12797f24d1dea0f1ff3b21d94 | antifuchs/cl-stripe | sstruct.lisp | (in-package :stripe)
;;; A simple data structure for the JSON format.
st - json is nice , but its JSO objects print horribly and are
;; inconvenient to use if you are handling nested JSON objects. This
;; wraps them in an object such that I can use, e.g.:
;;
( sstruct - get response : card : ccv )
;;
;; As an ... | null | https://raw.githubusercontent.com/antifuchs/cl-stripe/9a857682a13dac1a392cbf635faa256630e40311/sstruct.lisp | lisp | A simple data structure for the JSON format.
inconvenient to use if you are handling nested JSON objects. This
wraps them in an object such that I can use, e.g.:
As an added bonus, it preserves the string keys in the json
response, but allows lookups that are case-insensitive and -/_
agnostic..
jso functions,
... | (in-package :stripe)
st - json is nice , but its JSO objects print horribly and are
( sstruct - get response : card : ccv )
completely cribbed from st - json , but using our own ,
underscore - agnostic string comparison instead of string= :
(progn
(defun char-equal/underscore (c1 c2)
(char-equal (... |
734b95fc87f4bae4763e39fbc6a977c9f6dfa9ba39552fd42c563fc295a33ee7 | zack-bitcoin/amoveo | contract_timeout_tx2.erl | -module(contract_timeout_tx2).
-export([go/4, make_dict/7, make_dict/6, make_dict/3]).
-include("../../records.hrl").
make_dict(From, ContractID, Fee) ->
make_dict(From, ContractID, Fee, 0, 0, 0).
make_dict(From, ContractID, Fee, Proof, CH, Row) ->
make_dict(From, ContractID, Fee, Proof, CH, Row, 0).
make_dict... | null | https://raw.githubusercontent.com/zack-bitcoin/amoveo/2d5755abd80f0852ab2faf3f1fda83c76de07f93/apps/amoveo_core/src/consensus/txs/contract_timeout_tx2.erl | erlang | true -> none
end,
move money to another contract
this is to verify that CH2 is correct. | -module(contract_timeout_tx2).
-export([go/4, make_dict/7, make_dict/6, make_dict/3]).
-include("../../records.hrl").
make_dict(From, ContractID, Fee) ->
make_dict(From, ContractID, Fee, 0, 0, 0).
make_dict(From, ContractID, Fee, Proof, CH, Row) ->
make_dict(From, ContractID, Fee, Proof, CH, Row, 0).
make_dict... |
1c4b53178555c05157c6877fff7e181bb6d9a5d34568adf9456615660715bb1d | jacquev6/General | Stringable.ml | #include "../Generated/Concepts/Stringable.ml"
module Tests = struct
include Tests_
module MakeExamples(M: Testable.S0)(E: Examples.S0 with type t := M.t) = E
module MakeTests(M: Testable.S0)(E: Examples.S0 with type t := M.t) = struct
let tests = []
end
include MakeMakers(MakeExamples)(MakeTests)
end... | null | https://raw.githubusercontent.com/jacquev6/General/5237123668e939c0cb83aa3e1c4756473336bc7e/src/Concepts/Stringable.ml | ocaml | #include "../Generated/Concepts/Stringable.ml"
module Tests = struct
include Tests_
module MakeExamples(M: Testable.S0)(E: Examples.S0 with type t := M.t) = E
module MakeTests(M: Testable.S0)(E: Examples.S0 with type t := M.t) = struct
let tests = []
end
include MakeMakers(MakeExamples)(MakeTests)
end... | |
4f128d67e32dd2d5ff7a1af0ae84d9cf1388eb037f8cbf2df50a5a703cb57584 | marcoheisig/Petalisp | protocol.lisp | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(in-package #:petalisp.graphviz)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Generic Functions
These first three generic functions compute Graphviz attributes for the
;;; entire graph, individual no... | null | https://raw.githubusercontent.com/marcoheisig/Petalisp/a1c85cf71da445ef9c7913cd9ddb5149373211a7/code/graphviz/protocol.lisp | lisp |
Generic Functions
entire graph, individual nodes, and individual edges, respectively.
key appears in the property lists of several applicable methods, only
the corresponding value in the property list of the most specific
applicable method is used. For example, consider the following
(defclass some-graph (gr... | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(in-package #:petalisp.graphviz)
These first three generic functions compute Graphviz attributes for the
Each method on any of these three generic functions must return a
property list of valid Graphviz attributes .
The method combinati... |
3539ddba0e93047f9e115e4fd1d29f2a913730825e383c17cfc5091a5a206dde | ff-notes/ron | Rocks.hs | module RON.Storage.Rocks () where
| null | https://raw.githubusercontent.com/ff-notes/ron/0df2b7985996ecc498808ea7247d0d8de471da4f/ron-storage/lib/RON/Storage/Rocks.hs | haskell | module RON.Storage.Rocks () where
| |
9c3c13d9cfde06eb8275ee81ea1d5a0a837e6f79ae6f5dc65b37aa084e36d38f | atomvm/atomvm_lib | i2c_bus.erl | %%
%% Copyright (c) dushin.net
%% All rights reserved.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing,... | null | https://raw.githubusercontent.com/atomvm/atomvm_lib/4e572b1a6a1d16774fe84673395b604a6a774e68/src/i2c_bus.erl | erlang |
Copyright (c) dushin.net
All rights reserved.
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... | Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(i2c_bus).
-behaviour(gen_server).
-export([start/1, start_link/1, stop/1, enqueue/3, write_bytes/3, write_bytes/4, read_bytes/3, read_bytes/4]).
-export([init/1, hand... |
33d0785afe6ba29a5a1d493237856a14cc239853cf5dbe4f6f7f0ad6d9de972f | Vaguery/klapaucius | dsl.clj | (ns push.instructions.dsl
(:require [push.util.stack-manipulation :as stack]
[push.util.code-wrangling :as util]
[push.util.numerics :as num]
[push.util.exceptions :as oops]
[push.interpreter.core :as i]
[push.type.defi... | null | https://raw.githubusercontent.com/Vaguery/klapaucius/17b55eb76feaa520a85d4df93597cccffe6bdba4/src/push/instructions/dsl.clj | clojure | The PushDSL uses the :scratch map in an Interpreter record
working with bindings
config variables
DSL instructions
keyword
The all-important calculate
| (ns push.instructions.dsl
(:require [push.util.stack-manipulation :as stack]
[push.util.code-wrangling :as util]
[push.util.numerics :as num]
[push.util.exceptions :as oops]
[push.interpreter.core :as i]
[push.type.defi... |
5d6b3227b7ad3a1bc0acd8579fa9f86cfe6b457b7c00bd6370c124976d674571 | frankiesardo/sicp-in-clojure | temp-2-82.clj | Exercise 2.77
(def proc-table (atom {}))
(defn pt-get [op type] (@proc-table [op type]))
(defn pt-put [op type item] (swap! proc-table #(assoc % [op type] item)))
(defn type-tag [datum]
(cond (number? datum) datum
(coll? datum) (first datum)
:else (throw (RuntimeException. (str "Wrong datum -- T... | null | https://raw.githubusercontent.com/frankiesardo/sicp-in-clojure/dc341617c2ab8eb34ac316175a56141a0c605421/src/sicp/temp-2-82.clj | clojure | imported procedures from rectangular and polar packages
This fails
a
apply-generic will go into infinite recursion.
b
apply-generic just works as it is.
c
coercing list to a type
applying to a list of multiple arguments
logic to prevent always coercing if there is already direct input entry
number -> rational -... | Exercise 2.77
(def proc-table (atom {}))
(defn pt-get [op type] (@proc-table [op type]))
(defn pt-put [op type item] (swap! proc-table #(assoc % [op type] item)))
(defn type-tag [datum]
(cond (number? datum) datum
(coll? datum) (first datum)
:else (throw (RuntimeException. (str "Wrong datum -- T... |
369f7634fc11d785c7d202d36bdbb7c12b145ed03d3d9e47178e9d7d65dc2194 | Sintrastes/xen-fret | Fretboard.hs |
module XenFret.Diagrams.Fretboard where
| null | https://raw.githubusercontent.com/Sintrastes/xen-fret/5f1f5ea20674d542009a59ab34cd047ff7d30afc/xen-fret/src/XenFret/Diagrams/Fretboard.hs | haskell |
module XenFret.Diagrams.Fretboard where
| |
cb397e0fe3291d0ea5a04a6f0f1e00aecbeb5933829d8fd5aecfd7a8ca88cbc0 | Heasummn/Crab-ML | location.ml | Inspired by the location system from Eff
type t =
{
filename: string;
s_line: int;
s_column: int;
e_line: int;
e_column: int;
}
let break pos =
let fname = pos.Lexing.pos_fname
and line = pos.Lexing.pos_lnum
and column = pos.Lexing.pos_cnum - pos.Lexing.pos_bol + 1 in
fname, line, column
let make start_... | null | https://raw.githubusercontent.com/Heasummn/Crab-ML/45a79373a620878b9c24464a7e009ecf3ea7f908/src/CrabCommon/location.ml | ocaml | Inspired by the location system from Eff
type t =
{
filename: string;
s_line: int;
s_column: int;
e_line: int;
e_column: int;
}
let break pos =
let fname = pos.Lexing.pos_fname
and line = pos.Lexing.pos_lnum
and column = pos.Lexing.pos_cnum - pos.Lexing.pos_bol + 1 in
fname, line, column
let make start_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.