_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 |
|---|---|---|---|---|---|---|---|---|
ff992001056d6330221ce2ca57c53ea0db473ef6d4d9326a699a37a2fd59e352 | pallet/stevedore | stevedore_test.clj | (ns pallet.stevedore-test
(:require
[clojure.test :refer :all]
[pallet.script :refer [defscript]]
[pallet.stevedore :refer :all]))
(defmacro line [] (:line (meta &form)))
(defmacro file [] *file*)
(deftest quasiquote-test
(binding [*apply-form-meta* false]
(is (= `[(list '~'var '~'a '~'b)] (quasiquot... | null | https://raw.githubusercontent.com/pallet/stevedore/735530a4d21a119d6bc29e6982eaa9c4840b1d54/test/pallet/stevedore_test.clj | clojure | (ns pallet.stevedore-test
(:require
[clojure.test :refer :all]
[pallet.script :refer [defscript]]
[pallet.stevedore :refer :all]))
(defmacro line [] (:line (meta &form)))
(defmacro file [] *file*)
(deftest quasiquote-test
(binding [*apply-form-meta* false]
(is (= `[(list '~'var '~'a '~'b)] (quasiquot... | |
d8e58e26da40268fc45548c352908f2f69cd5c89057a3b9b3fe1069d59a5047a | amccausl/Swish | URITest.hs | --------------------------------------------------------------------------------
$ I d : URITest.hs , v 1.2 2004/01/22 19:52:27 graham Exp $
--
Copyright ( c ) 2003 , . All rights reserved .
-- See end of this file for licence information.
--------------------------------------------------------------... | null | https://raw.githubusercontent.com/amccausl/Swish/9a7356300960c62e3f0468067bda0c34ee3606bd/Swish/HaskellUtils/URITest.hs | haskell | ------------------------------------------------------------------------------
See end of this file for licence information.
------------------------------------------------------------------------------
|
Stability : provisional
Portability : H98 + multi-parameter classes
This Module contains t... | $ I d : URITest.hs , v 1.2 2004/01/22 19:52:27 graham Exp $
Copyright ( c ) 2003 , . All rights reserved .
Module : URITest
Copyright : ( c ) 2003 ,
License : GPL V2
Maintainer :
WNH RIP OUT module Swish . HaskellUtils . URITest where
import Test.HUn... |
eeb7383a4dea4f2a1f5924bc99dd8900574cc0f63ef7dfcfcc52375f253f4e87 | mathiasbourgoin/SPOC | Bitonic_sort.ml |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2 , December 2004
Copyright ( C ) 2004 < >
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document , and changing it is allowed as long
as the name is changed .
... | null | https://raw.githubusercontent.com/mathiasbourgoin/SPOC/9014d26b6d64261d1ace97db7f3fe2256a7c459c/SpocLibs/Samples/Bitonic_sort/Bitonic_sort.ml | ocaml | fill vectors with random values... |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2 , December 2004
Copyright ( C ) 2004 < >
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document , and changing it is allowed as long
as the name is changed .
... |
0900513436dc5fae23081c1cd774718c341795d8151e28cfd0728a38e8f2222b | ocaml/ocamlbuild | util.mli | (** A module containing some utility functions. *)
(** join strings together using command and "and" for the last element *)
val join: string list -> string
| null | https://raw.githubusercontent.com/ocaml/ocamlbuild/792b7c8abdbc712c98ed7e69469ed354b87e125b/examples/06-ocamldoc/lib/util.mli | ocaml | * A module containing some utility functions.
* join strings together using command and "and" for the last element |
val join: string list -> string
|
2ab97703e5579a906d35f4f2d3dd14c36c2a312ed70e7e43bd47e37242599ab0 | wireapp/wire-server | Conversation.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE StrictData #-}
# LANGUAGE TemplateHaskell #
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero Gener... | null | https://raw.githubusercontent.com/wireapp/wire-server/be524fac7eb46d5419c319d5f8161f0c518a7f69/libs/wire-api/src/Wire/API/Event/Conversation.hs | haskell | # LANGUAGE StrictData #
This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TemplateHaskell #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU... |
d378f827d99f1f24e85eba88ae01a4de2f48d0d8a971e7087dd4f70a973638a8 | jwiegley/linearscan-hoopl | AsmTest.hs | {-# LANGUAGE GADTs #-}
module AsmTest where
import Assembly
import Compiler.Hoopl as Hoopl hiding ((<*>))
import Control.Exception
import Data.List (intercalate)
import LinearScan
import LinearScan.Hoopl
import LinearScan.Hoopl.DSL
import Normal ()
import Test.Hspec
asmTestLiteral :: UseVerifier -> Int -> Program (N... | null | https://raw.githubusercontent.com/jwiegley/linearscan-hoopl/f654adf64cba4b3af1f42f06112c9225b1369c74/test/AsmTest.hs | haskell | # LANGUAGE GADTs # |
module AsmTest where
import Assembly
import Compiler.Hoopl as Hoopl hiding ((<*>))
import Control.Exception
import Data.List (intercalate)
import LinearScan
import LinearScan.Hoopl
import LinearScan.Hoopl.DSL
import Normal ()
import Test.Hspec
asmTestLiteral :: UseVerifier -> Int -> Program (Node IRVar) -> Maybe Str... |
0c8acb8301b00042190b084dfc176d7ad75be30d9ecdd76ce86d75100f243a80 | vbrankov/hdf5-ocaml | read_ref_reg.ml | open Bigarray
open Hdf5_raw
let _FILE2 = "trefer2.h5"
let _NPOINTS = 10
let _SPACE1_NAME = "Space1"
let _SPACE1_DIM1 = 4
let _SPACE2_NAME = "Space2"
let _SPACE2_DIM1 = 10
let _SPACE2_DIM2 = 10
let () =
let rbuf = H5r.Hdset_reg_ref.Bigarray.create _SPACE1_DIM1 in
let drbuf = Array1.create int32 c_layout ... | null | https://raw.githubusercontent.com/vbrankov/hdf5-ocaml/7abc763189767cd6c92620f29ce98f6ee23ba88f/examples/h5_intro/read_ref_reg.ml | ocaml | open Bigarray
open Hdf5_raw
let _FILE2 = "trefer2.h5"
let _NPOINTS = 10
let _SPACE1_NAME = "Space1"
let _SPACE1_DIM1 = 4
let _SPACE2_NAME = "Space2"
let _SPACE2_DIM1 = 10
let _SPACE2_DIM2 = 10
let () =
let rbuf = H5r.Hdset_reg_ref.Bigarray.create _SPACE1_DIM1 in
let drbuf = Array1.create int32 c_layout ... | |
bf9e3ad726198dbd29d8f4a38c0281d36f4b0020308ba274cd083c2703315323 | gelisam/hyzzy | C1.hs | {-# LANGUAGE OverloadedStrings #-}
module Rooms.C1 where
import Hyzzy.Command
look :: Command
look = "More foliage walls. This place is a maze..."
north :: Command
north = Command $ goToRoom "B1"
south :: Command
south = Command $ goToRoom "D1"
-- 1 2 3 4 5 6 7
-- +-+-+ +-+-+-+-+
-- A| | |
-- ... | null | https://raw.githubusercontent.com/gelisam/hyzzy/c5c861d5556ed3ca82fbb583d6928fac40d0d8df/games/maze/Rooms/C1.hs | haskell | # LANGUAGE OverloadedStrings #
1 2 3 4 5 6 7
+-+-+ +-+-+-+-+
A| | |
+ +-+-+-+-+-+ +
B| | | |
+ + +-+-+ + +-+
C|*| | | |
+ + +-+ +-+ + +
D| | | | |
+ + + + + + + +
E| | | | | |
+ + +-+ + +-+ +
F| | | |
+ +-+-+ +-+-+ +
+-+-+-+-+-+-+-+ | module Rooms.C1 where
import Hyzzy.Command
look :: Command
look = "More foliage walls. This place is a maze..."
north :: Command
north = Command $ goToRoom "B1"
south :: Command
south = Command $ goToRoom "D1"
|
|
5eda53693c3c607b122765b6fd9d02ce22952a347f207a4b14c056b337e7c33b | RefactoringTools/wrangler | wrangler_preview_server.erl | Copyright ( c ) 2010 , ,
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions are met:
%% %% Redistributions of source code must retain the above copyright
%% notice, this list of conditions... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/1c33ad0e923bb7bcebb6fd75347638def91e50a8/src/wrangler_preview_server.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
%% Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
%% Redi... | Copyright ( c ) 2010 , ,
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
-module(wrangler_preview_server).
-behaviour(gen_server).
-export([commit/0, abort/0,add_files/1, start_preview_server/0]).
-export... |
8f19a4eb53a35db75b903de4b4400c8232a901a1edbf7eb386cfc5d9d0e43863 | basho/riak_kv | replrtq_eqc.erl | @author < >
( C ) 2019 ,
@doc The replrtq_src server is started with a one - to - one strategy in the
%%% supervisor tree riak_kv_sup. In other words, it should handle the
%%% cases in which one of its communication parties is down for a while.
%%%
%%% Since we do want to test fault tolerance... | null | https://raw.githubusercontent.com/basho/riak_kv/0a5f60faeb11a59ce15acf249c9464f58853c609/eqc/replrtq_eqc.erl | erlang | supervisor tree riak_kv_sup. In other words, it should handle the
cases in which one of its communication parties is down for a while.
Since we do want to test fault tolerance w.r.t. the other modules,
we model stopping, starting and crashing here.
@end
-- State -----------------------------... | @author < >
( C ) 2019 ,
@doc The replrtq_src server is started with a one - to - one strategy in the
Created : 27 May 2019 by < >
-module(replrtq_eqc).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eqc/include/eqc_component.hrl").
-compile([export_all, nowarn_export_all]).
initial_state() ->
... |
14f5b2e8b63bbfe2cff2e58ba09249b00c34435d6e031755b0069005608a0166 | CodyReichert/cl-ses | cl-ses.lisp | (in-package :cl-user)
(defpackage cl-ses-test
(:use :cl
:cl-ses
:prove))
(in-package :cl-ses-test)
;; NOTE: To run this test file, execute `(asdf:test-system :cl-ses)' in your Lisp.
(plan nil)
;; blah blah blah.
(finalize)
| null | https://raw.githubusercontent.com/CodyReichert/cl-ses/1f58ebfa2e020649161d603b7c92c8901aad7326/t/cl-ses.lisp | lisp | NOTE: To run this test file, execute `(asdf:test-system :cl-ses)' in your Lisp.
blah blah blah. | (in-package :cl-user)
(defpackage cl-ses-test
(:use :cl
:cl-ses
:prove))
(in-package :cl-ses-test)
(plan nil)
(finalize)
|
563bc27a395a0bb427315317a9995f5adb45e9f6069c54bf8ece41f134a7d04d | sternenseemann/spacecookie | Systemd.hs | # LANGUAGE BlockArguments #
{-# LANGUAGE OverloadedStrings #-}
module Network.Spacecookie.Systemd
( systemdSocket
, notifyReady
, notifyStopping
, systemdStoreOrClose
, SystemdException (..)
) where
import Control.Concurrent.MVar (newMVar, swapMVar, mkWeakMVar)
import Control.Exception.Base
import Control.... | null | https://raw.githubusercontent.com/sternenseemann/spacecookie/687bc78c1e9355468bf4eb480750b819e520f20e/server/Network/Spacecookie/Systemd.hs | haskell | # LANGUAGE OverloadedStrings #
| Close a 'Fd' using close(1). Throws an 'IOException' on error.
contained within it.
the 'Socket' appear to System.Socket as if it were closed
| Create an 'Socket' from an 'Fd'. This action is unsafe
since the type of the socket is not checked meaning that
whatever type the r... | # LANGUAGE BlockArguments #
module Network.Spacecookie.Systemd
( systemdSocket
, notifyReady
, notifyStopping
, systemdStoreOrClose
, SystemdException (..)
) where
import Control.Concurrent.MVar (newMVar, swapMVar, mkWeakMVar)
import Control.Exception.Base
import Control.Monad (when)
import Data.Maybe (fro... |
31ba89ee5c5d0c49ca052fddf54c4d11b9b1887857dd824089b48dd2ec06cb10 | pliant/lein-package | install.clj | (ns leiningen.package.hooks.install
"Allows for the addition of files to be installed in the local repository."
(:require [leiningen.package :as package]
[leiningen.package.artifact :as artifact]
[robert.hooke]
[leiningen.install]
[leiningen.jar :as jar]
[... | null | https://raw.githubusercontent.com/pliant/lein-package/aef327e4698b13f1cf0986f5eaa23968e90b458b/src/leiningen/package/hooks/install.clj | clojure | (ns leiningen.package.hooks.install
"Allows for the addition of files to be installed in the local repository."
(:require [leiningen.package :as package]
[leiningen.package.artifact :as artifact]
[robert.hooke]
[leiningen.install]
[leiningen.jar :as jar]
[... | |
25ceec81ae94021179fc4248624c7e2f5820a07ba5cdc6fe47285c3041f6db25 | cram2/cram | ntuple.lisp | Regression test NTUPLE for GSLL , automatically generated
;;
Copyright 2009 , 2011
Distributed under the terms of the GNU General Public 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 ... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/tests/ntuple.lisp | lisp |
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 PARTICULAR PURPOSE. See the
GNU General Publi... | Regression test NTUPLE for GSLL , automatically generated
Copyright 2009 , 2011
Distributed under the terms of the GNU General Public 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
You should have received a... |
a68806759a24ed21b17a7b5e9147295c5642c5550216b95bfc660a7e2140061c | default-kramer/plisqin | info.rkt | #lang info
(define collection 'multi)
(define deps '("base" "db-lib" "morsel-lib"))
(define build-deps '("at-exp-lib"
"db-doc"
"doc-coverage"
"racket-doc"
"rackunit-lib"
"sandbox-lib"
"scribble... | null | https://raw.githubusercontent.com/default-kramer/plisqin/26421c7c42656c873c4e0a4fc7f48c0a3ed7770f/info.rkt | racket | #lang info
(define collection 'multi)
(define deps '("base" "db-lib" "morsel-lib"))
(define build-deps '("at-exp-lib"
"db-doc"
"doc-coverage"
"racket-doc"
"rackunit-lib"
"sandbox-lib"
"scribble... | |
fc245ea717218dee97a60a098246ed9047284259ef727213da5a7607eff13a00 | rbkmoney/cds | cds_hash.erl | -module(cds_hash).
-export([hash/3]).
-type scrypt_options() :: {
N :: integer(),
R :: integer(),
P :: integer()
}.
-export_type([scrypt_options/0]).
-spec hash(binary(), binary(), scrypt_options()) -> Hash :: binary().
hash(Plain, Salt, {N, R, P}) ->
scrypt:scrypt(Plain, Salt, N, R, P, 16).
| null | https://raw.githubusercontent.com/rbkmoney/cds/7daa88e44a95de6ba0404ff492344d73fae64a95/apps/cds/src/cds_hash.erl | erlang | -module(cds_hash).
-export([hash/3]).
-type scrypt_options() :: {
N :: integer(),
R :: integer(),
P :: integer()
}.
-export_type([scrypt_options/0]).
-spec hash(binary(), binary(), scrypt_options()) -> Hash :: binary().
hash(Plain, Salt, {N, R, P}) ->
scrypt:scrypt(Plain, Salt, N, R, P, 16).
| |
20eb10144d95444d5aa91db1cc1d8d0ae9639d91ffe6101485327bebc93e4182 | den1k/vimsical | core.cljs | (ns vimsical.frontend.code-editor.core
(:require [vimsical.frontend.code-editor.config :refer [configure-editor]]
[vimsical.frontend.code-editor.util :as util]))
(defn require-monaco [cb]
(js/require.config (clj->js {:paths {"vs" "/js/vs"}}))
(js/require
(array "vs/editor/editor.main")
(fn []
... | null | https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/src/frontend/vimsical/frontend/code_editor/core.cljs | clojure | (ns vimsical.frontend.code-editor.core
(:require [vimsical.frontend.code-editor.config :refer [configure-editor]]
[vimsical.frontend.code-editor.util :as util]))
(defn require-monaco [cb]
(js/require.config (clj->js {:paths {"vs" "/js/vs"}}))
(js/require
(array "vs/editor/editor.main")
(fn []
... | |
c6b603e98f1ff541b84195010835788f8165f9d84649a5dd8ff932478f21ca71 | rafaeldelboni/graphmosphere | http_out.clj | (ns graphmosphere.http-out
(:require [cheshire.core]
[clj-http.client :as http]))
(set! *warn-on-reflection* true)
(defn request!
[{:keys [url body] :as payload} headers]
(http/check-url! url)
(http/request (-> payload
(merge {:as :json
:form-params ... | null | https://raw.githubusercontent.com/rafaeldelboni/graphmosphere/965546f5b02c049516a35d74e1593ac085b12c84/src/graphmosphere/http_out.clj | clojure | (ns graphmosphere.http-out
(:require [cheshire.core]
[clj-http.client :as http]))
(set! *warn-on-reflection* true)
(defn request!
[{:keys [url body] :as payload} headers]
(http/check-url! url)
(http/request (-> payload
(merge {:as :json
:form-params ... | |
94266e6ce6ae0fc8ad80bcff9199066bfdf1e981c89ef75847c0f6521b0a11cc | aratare-jp/shinsetsu | parser.clj | (ns shinsetsu.parser
(:require
[com.fulcrologic.fulcro.server.api-middleware :refer [handle-api-request]]
[com.wsscode.pathom.connect :as pc]
[com.wsscode.pathom.core :as p]
[edn-query-language.core :as eql]
[mount.core :as m]
[shinsetsu.mutations.bookmark :as bookmark-mutations]
[shinsets... | null | https://raw.githubusercontent.com/aratare-jp/shinsetsu/984f40a67ad2bac1e25e3067318d99bf7ae9e1e7/src/clj/shinsetsu/parser.clj | clojure | (ns shinsetsu.parser
(:require
[com.fulcrologic.fulcro.server.api-middleware :refer [handle-api-request]]
[com.wsscode.pathom.connect :as pc]
[com.wsscode.pathom.core :as p]
[edn-query-language.core :as eql]
[mount.core :as m]
[shinsetsu.mutations.bookmark :as bookmark-mutations]
[shinsets... | |
6fe9874b3a2804253f3266f928a42c053d5fb4e98a8de4b8c7a1ba5e6ffec2bd | dtgoitia/civil-autolisp | CIVIL - Road Levels.lsp | (defun C:RDL ( / *error* )
; RoaD Levels
; SET - Error handling function
(defun *error* ( msg )
(if (not (member msg '("Function cancelled" "quit / exit abort")))
(princ (strcat "\nError: " msg))
)
; RESET to original "osmode" and "cmdecho".
(setvar "osmode" oldosmode)
(setvar "cmdec... | null | https://raw.githubusercontent.com/dtgoitia/civil-autolisp/72d68139d372c84014d160f8e4918f062356349f/CIVIL%20-%20Road%20Levels.lsp | lisp | RoaD Levels
SET - Error handling function
RESET to original "osmode" and "cmdecho".
SAVE "osmode" and "cmdecho"
CHANGE "osmode" and "cmdecho"
END if
LOOP infinito
END cond else
END cond
END while
OPERATION - Check if its an underlined text or an FFL
OPERATION - Cut the extracted text
OPERATION - Convert th... | (defun C:RDL ( / *error* )
(defun *error* ( msg )
(if (not (member msg '("Function cancelled" "quit / exit abort")))
(princ (strcat "\nError: " msg))
)
(setvar "osmode" oldosmode)
(setvar "cmdecho" oldcmdecho)
(princ)
)
(setq oldosmode (getvar "osmode"))
(setq oldcmdecho (getvar... |
5e785e44293724fc98df4987191a6647535f6f97270922617028f9593f8f670e | arenadotio/ocaml-mssql | db_field.ml | open Core
open Freetds
type t =
| Bignum of Bignum.t
| Bool of bool
| Float of float
| Int of int
| Int32 of int32
| Int64 of int64
| String of string
| Date of Time.t
| Array of t list
[@@deriving compare, sexp]
* [ recode ~src ~dst str ] decodes [ str ] from the character set given by [ ~src ] ,
... | null | https://raw.githubusercontent.com/arenadotio/ocaml-mssql/28963720dfa095d00837cfef3af94e954343998f/src/db_field.ml | ocaml | skip characters that can't be translated
len * 2 will always hold the resulting string unless it has null
chars, so this should make the standard case fast without wasting much
memory. | open Core
open Freetds
type t =
| Bignum of Bignum.t
| Bool of bool
| Float of float
| Int of int
| Int32 of int32
| Int64 of int64
| String of string
| Date of Time.t
| Array of t list
[@@deriving compare, sexp]
* [ recode ~src ~dst str ] decodes [ str ] from the character set given by [ ~src ] ,
... |
cc9675d8ee8eb1bfbe7b74ca34ace0a0d76a69742682312774393fd79f070633 | janestreet/async_ssl | version.ml | open! Core
open! Import
type t =
| Sslv23
| Tls
| Sslv3
| Tlsv1
| Tlsv1_1
| Tlsv1_2
| Tlsv1_3
[@@deriving sexp, compare]
let default = Tls
| null | https://raw.githubusercontent.com/janestreet/async_ssl/2cc103c0648f5eec8717cd6b09b48bfff21cf3e9/src/version.ml | ocaml | open! Core
open! Import
type t =
| Sslv23
| Tls
| Sslv3
| Tlsv1
| Tlsv1_1
| Tlsv1_2
| Tlsv1_3
[@@deriving sexp, compare]
let default = Tls
| |
6fffad1c2eecdeab7c52d6b62ee158f822f32eb17d6cff46dd85eeeb0c583750 | mirage/ocaml-github | delete_all_hooks.ml |
* Copyright ( c ) 2013 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/mirage/ocaml-github/5ff0db61fe034e2bb9c76eb633727fca67960ecd/lib_test/delete_all_hooks.ml | ocaml |
* Copyright ( c ) 2013 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | |
2d4689967b236af3e4b5bcc5b6c0a26ddf2f109308b555b28f11c52403bd24fc | racketscript/racketscript | macro-intrduced-binding.rkt | #lang racket
(require "private/macro-introduced-binding.rkt")
(define (execute)
(invoke-macro))
(define (execute-elsewhere)
(invoke-macro-with-function-elsewhere))
(execute)
(execute-elsewhere)
| null | https://raw.githubusercontent.com/racketscript/racketscript/f94006d11338a674ae10f6bd83fc53e6806d07d8/tests/modules/macro-intrduced-binding.rkt | racket | #lang racket
(require "private/macro-introduced-binding.rkt")
(define (execute)
(invoke-macro))
(define (execute-elsewhere)
(invoke-macro-with-function-elsewhere))
(execute)
(execute-elsewhere)
| |
6963a93fda425a2491500ca67499959e10da630315866ea5f5da1bc0eae92170 | leviroth/ocaml-reddit-api | inbox_item.ml | open! Core
module Comment = struct
include Json_object.Utils
include Json_object.Make_kinded_simple (struct
let kind = "t1"
end)
module Type = struct
type t =
| Comment_reply
| Link_reply
[@@deriving sexp]
end
let id = required_field "id" (string >> Thing.Comment.Id.of_string)
... | null | https://raw.githubusercontent.com/leviroth/ocaml-reddit-api/6519697a39d68d675c3c36fd54add8ba35e939f3/reddit_api_kernel/inbox_item.ml | ocaml | open! Core
module Comment = struct
include Json_object.Utils
include Json_object.Make_kinded_simple (struct
let kind = "t1"
end)
module Type = struct
type t =
| Comment_reply
| Link_reply
[@@deriving sexp]
end
let id = required_field "id" (string >> Thing.Comment.Id.of_string)
... | |
61ce288677c078fcc3de883befb514aa737932d9ca31f1c7a65fa961d5727da4 | TheLortex/mirage-monorepo | migrate_403_404.ml | (**************************************************************************)
(* *)
(* OCaml Migrate Parsetree *)
(* *)
... | null | https://raw.githubusercontent.com/TheLortex/mirage-monorepo/b557005dfe5a51fc50f0597d82c450291cfe8a2a/duniverse/ppxlib/astlib/migrate_403_404.ml | ocaml | ************************************************************************
OCaml Migrate Parsetree
... |
, LexiFi
Copyright 2017 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module From = Ast_403
module To = Ast_404
l... |
63b517cef6e32d6e5f50c5782150dfb18a8ea78b18d52e7f74dfc6f61128e66b | casperschipper/ocaml-cisp | steno.ml | open Parser
(** start of actual steno program *)
let pattElem = char 'x'
type pattern = Rest | Emphasis | Normal | FadeIn | FadeOut | Never
let pat_of_char = function
| 'x' -> Emphasis
| '.' -> Rest
| '-' -> Normal
| '/' -> FadeIn
| '\\' -> FadeOut
| _ -> Never
let bool_of_char = function 'x' -> true |... | null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/aa2c75ba08259108401d6a11ebfd1d525225b239/src/steno/steno.ml | ocaml | * start of actual steno program
1,3,2
3 2 1
*
program = int | expr
expr = int <|> range <|> announcement
range = int (symbol "..") int
| open Parser
let pattElem = char 'x'
type pattern = Rest | Emphasis | Normal | FadeIn | FadeOut | Never
let pat_of_char = function
| 'x' -> Emphasis
| '.' -> Rest
| '-' -> Normal
| '/' -> FadeIn
| '\\' -> FadeOut
| _ -> Never
let bool_of_char = function 'x' -> true | '.' -> false | _ -> false
let steno... |
67eef578e61d23d4de0ae0ce158f5b672b3ec41b6270ca1e17060f1b0419817a | Axarva/todo | View.hs | module View (displayToDo) where
import Remove (Container (numberedContents))
displayToDo :: Container -> IO ()
displayToDo container = do
putStrLn "Here are your TODOs! :"
mapM_ putStrLn (numberedContents container)
| null | https://raw.githubusercontent.com/Axarva/todo/77b7cedaa1719d593cd4a0c07b3f50f860a96fee/app/View.hs | haskell | module View (displayToDo) where
import Remove (Container (numberedContents))
displayToDo :: Container -> IO ()
displayToDo container = do
putStrLn "Here are your TODOs! :"
mapM_ putStrLn (numberedContents container)
| |
9aaf832fff6aa78683f19698f32e6a5dcfd2128dcd99899e74cb2552ac1a62b8 | VERIMAG-Polyhedra/VPL | Test.mli | type stateT
val stateZ : stateT
type t = unit -> stateT -> stateT
val succeed: stateT -> stateT
val fail: string -> string -> stateT -> stateT
val skip: stateT -> stateT
val suite: string -> (stateT -> stateT) list -> (stateT -> stateT)
(* equals name to_string equal expected_result actual_result state*)
val equ... | null | https://raw.githubusercontent.com/VERIMAG-Polyhedra/VPL/cd78d6e7d120508fd5a694bdb01300477e5646f8/test/Test.mli | ocaml | equals name to_string equal expected_result actual_result state
val run: testT -> string
| type stateT
val stateZ : stateT
type t = unit -> stateT -> stateT
val succeed: stateT -> stateT
val fail: string -> string -> stateT -> stateT
val skip: stateT -> stateT
val suite: string -> (stateT -> stateT) list -> (stateT -> stateT)
val equals : string -> ('a -> string) -> ('a -> 'a -> bool) -> 'a -> 'a -> s... |
b77023fde16b5abbf6488ccd998e997325f92b2185457da74e97f309b59c8f74 | skanev/playground | 20.scm | EOPL exercise 3.20
;
In PROC , procedures have only one argument , but one can get the effect of
; multiple argument procedures by using procedures that return other
; procedures. For example, one might write code like
;
; let f = proc (x) proc (y) ...
in ( ( f 3 ) 4 )
;
; The trick is called currying, an... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/eopl/03/20.scm | scheme |
multiple argument procedures by using procedures that return other
procedures. For example, one might write code like
let f = proc (x) proc (y) ...
The trick is called currying, and the procedure is said to be curried. Write
write x + y in our language by writing -(x, -(0, y)). | EOPL exercise 3.20
In PROC , procedures have only one argument , but one can get the effect of
in ( ( f 3 ) 4 )
a curried procedure that takes two arguments and returns their sum . You can
(load-relative "cases/proc/all.scm")
(define two-plus-three
"let add = proc (x) proc (y) -(x, -(0, y))
in ((... |
41a36951737011225ec16055192afbe2cacae04086ed491df652407757e928dd | justinmeiners/exercises | 2_57.scm | (load "2_56.scm")
(define (augend e)
(if (not (null? (cdddr e)))
(cons '+ (cddr e))
(caddr e)))
(define (multiplicand e)
(if (not (null? (cdddr e)))
(cons '* (cddr e))
(caddr e)))
5.57
(display (derive '(* x y (+ x 3)) 'x))
(newline)
| null | https://raw.githubusercontent.com/justinmeiners/exercises/9491bc16925eae12e048ccd3f424b870ebdc73aa/sicp/2/2_57.scm | scheme | (load "2_56.scm")
(define (augend e)
(if (not (null? (cdddr e)))
(cons '+ (cddr e))
(caddr e)))
(define (multiplicand e)
(if (not (null? (cdddr e)))
(cons '* (cddr e))
(caddr e)))
5.57
(display (derive '(* x y (+ x 3)) 'x))
(newline)
| |
8655389481b6cb5f8deac40d03a877f39a68e1427d4fc188ea698c7351acd18a | contested-space/seer | seer_test.erl | -module(seer_test).
-include_lib("eunit/include/eunit.hrl").
counter_inc_test() ->
ok = seer:counter_inc(<<"bob_the_counter">>),
ok = seer:counter_inc(<<"bob_the_counter">>, 10),
?assertEqual({ok, 11}, seer:read(counter, <<"bob_the_counter">>)),
?assertEqual({ok, 0}, seer:read(counter, <<"bob_the_coun... | null | https://raw.githubusercontent.com/contested-space/seer/f9879bce8632375d07b20443e8e3d7d88964b230/test/seer_test.erl | erlang | -module(seer_test).
-include_lib("eunit/include/eunit.hrl").
counter_inc_test() ->
ok = seer:counter_inc(<<"bob_the_counter">>),
ok = seer:counter_inc(<<"bob_the_counter">>, 10),
?assertEqual({ok, 11}, seer:read(counter, <<"bob_the_counter">>)),
?assertEqual({ok, 0}, seer:read(counter, <<"bob_the_coun... | |
67377b216e69664f06352411146eb32ece1f023b4c129ff13bec8db500b7bd27 | timrichardt/stern-brocot-tree | tree.clj | (ns stern-brocot.tree)
;; This file implements the core structure of the unsigned and signed
;; Stern-Brocot tree.
A node of the tree is represented as a 4 - vector of integers .
(def I
"Root node of the tree."
[1N 0N
0N 1N])
(defn L "Given a node, returns the left child."
[[a b c d]]
[(+ a b) b
(+ ... | null | https://raw.githubusercontent.com/timrichardt/stern-brocot-tree/b6a641850fa3ebc81a1c0bc307254e565ca54c91/src/stern_brocot/tree.clj | clojure | This file implements the core structure of the unsigned and signed
Stern-Brocot tree.
lazy sequence of the elements L and R
[L R L L L R]
SB can be extended to include non-positive rational numbers by
introducing a sign information. We represent elements of the signed
number in the zeroth place.
[1 L ... | (ns stern-brocot.tree)
A node of the tree is represented as a 4 - vector of integers .
(def I
"Root node of the tree."
[1N 0N
0N 1N])
(defn L "Given a node, returns the left child."
[[a b c d]]
[(+ a b) b
(+ c d) d])
(defn R "Given a node, returns the right child"
[[a b c d]]
[a (+ a b)
c (+... |
ef171145826ca6c807bfaf4f967ff82238aae6406232c3ed27e8beaacde24351 | reactiveml/rml | rmltop_implem.ml | (**********************************************************************)
(* *)
(* ReactiveML *)
(* *)
(* ... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel/rmltop_implem.ml | ocaml | ********************************************************************
ReactiveML
... | Copyright 2002 , 2007 . All rights reserved .
version 1.0 .
- theme SPI , Laboratoire d'Informatique de Paris 6 ( 2002 - 2005 )
- Verimag , CNRS Grenoble ( 2005 - 2006 )
- projet , ( 2006 - 2007 ) ... |
9d927e2277a0009516e4febb11b47bcb9c762929511328f8c86b61cb620a8252 | mzp/coq-ide-for-ios | lemmas.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/toplevel/lemmas.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
A hook start_proof calls on the... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : lemmas.mli 13323 20... |
dee9a17ba25c654b77710b653ba49cefb74ae0fb023963b3f32b9c92901e59e9 | Kakadu/fp2022 | monadic.mli | * Copyright 2021 - 2022 ,
* SPDX - License - Identifier : LGPL-3.0 - or - later
val return : 'a -> 'b -> 'a * 'b
val swap : ('b -> 'a -> 'c * 'd) -> 'a -> 'b -> 'd * 'c
val ( >>= ) : ('a -> 'b * 'c) -> ('b -> 'c -> 'd) -> 'a -> 'd
val ( let* ) : ('a -> 'b * 'c) -> ('b -> 'c -> 'd) -> 'a -> 'd
val ( => ) : ('a -> 'b... | null | https://raw.githubusercontent.com/Kakadu/fp2022/132b0dc58bc19e25007c40eebdff82cbe855160c/Pascal/lib/monadic.mli | ocaml | * Copyright 2021 - 2022 ,
* SPDX - License - Identifier : LGPL-3.0 - or - later
val return : 'a -> 'b -> 'a * 'b
val swap : ('b -> 'a -> 'c * 'd) -> 'a -> 'b -> 'd * 'c
val ( >>= ) : ('a -> 'b * 'c) -> ('b -> 'c -> 'd) -> 'a -> 'd
val ( let* ) : ('a -> 'b * 'c) -> ('b -> 'c -> 'd) -> 'a -> 'd
val ( => ) : ('a -> 'b... | |
9447b1bd2c477f56ff383ece3c35b58164917058399a550cdc5bc738ae646737 | magnars/optimus | add_last_modified_headers.clj | (ns optimus.optimizations.add-last-modified-headers
(:require [optimus.time :as time]))
(defn- add-last-modified-headers-1
[asset]
(if (:last-modified asset)
(assoc-in asset [:headers "Last-Modified"]
(time/format-http-date
(time/from-millis (:last-modified asset))))
asset))
... | null | https://raw.githubusercontent.com/magnars/optimus/2e235a0d15b02c5ec8d7c106df6070a76cda645c/src/optimus/optimizations/add_last_modified_headers.clj | clojure | (ns optimus.optimizations.add-last-modified-headers
(:require [optimus.time :as time]))
(defn- add-last-modified-headers-1
[asset]
(if (:last-modified asset)
(assoc-in asset [:headers "Last-Modified"]
(time/format-http-date
(time/from-millis (:last-modified asset))))
asset))
... | |
3e844d60a43e7aa81f06dd42f1d0516ad6d633cb14acc16bb48d2bfc918af745 | mwand/eopl3 | check-modules.scm | (module check-modules (lib "eopl.ss" "eopl")
(require "drscheme-init.scm")
(require "lang.scm")
(require "static-data-structures.scm")
(require "expand-type.scm")
(require "checker.scm")
(require "renaming.scm")
(require "subtyping.scm")
(provide type-of-program)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/mwand/eopl3/b50e015be7f021d94c1af5f0e3a05d40dd2b0cbf/chapter8/full-system/check-modules.scm | scheme |
type-of-program : Program -> Type
add-module-defns-to-tenv : Listof(ModuleDefn) * Tenv -> Tenv
ok, continue in extended tenv
no, raise error
interface-of : ModuleBody * Tenv -> Iface
add the formal parameter to the tenv as if it had been a
top-level module.
defns-to-decls : Listof(Defn) * Tenv -> Listof(Decl)
... | (module check-modules (lib "eopl.ss" "eopl")
(require "drscheme-init.scm")
(require "lang.scm")
(require "static-data-structures.scm")
(require "expand-type.scm")
(require "checker.scm")
(require "renaming.scm")
(require "subtyping.scm")
(provide type-of-program)
Page : 286
(define type-of-pro... |
c4478ec90fbe5a742c85c438459766ff1a73b776099d8a012906d4072e433ad1 | karlll/kjell | kjell_profile_SUITE.erl | %%%-------------------------------------------------------------------
%%% @author karl l <>
%%% @doc
%%%
%%% @end
%%%-------------------------------------------------------------------
-module(kjell_profile_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
%%---------------------------------... | null | https://raw.githubusercontent.com/karlll/kjell/2efef6dd0bb85b11b0e79a1236ac09d281961c6e/test/kjell_profile_SUITE.erl | erlang | -------------------------------------------------------------------
@author karl l <>
@doc
@end
-------------------------------------------------------------------
--------------------------------------------------------------------
Info = [tuple()]
@end
-----------------------------------------------------------... | -module(kjell_profile_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
@spec suite ( ) - > Info
suite() ->
[{timetrap,{seconds,30}}].
@spec init_per_suite(Config0 ) - >
Config1 | { skip , Reason } | { skip_and_save , Reason , Config1 }
init_per_suite(Config) ->
Config.
... |
2cc9bf2cb6a76f8efbd078a428941988c84a4499ca80017e8ff927f0b030b5fa | pedropramos/PyonR | fib.rkt | #lang racket
(define (fib n)
(cond
[(= n 0) 0]
[(= n 1) 1]
[else (+ (fib (- n 1))
(fib (- n 2)))]))
(time (fib 30)) | null | https://raw.githubusercontent.com/pedropramos/PyonR/16edd14f3950fd5a01f8b0237e023536ef48d17b/examples/fibonacci/fib.rkt | racket | #lang racket
(define (fib n)
(cond
[(= n 0) 0]
[(= n 1) 1]
[else (+ (fib (- n 1))
(fib (- n 2)))]))
(time (fib 30)) | |
a7710dc7283d87244214cff8d6fc33d4895ecdfa7c220ecce2005559e82ab62e | Frechmatz/cl-synthesizer | frequency-counter.lisp | (in-package :cl-synthesizer-test)
(defun frequency-counter (&key sample-rate update-fn get-output-fn)
"Determines the frequency in Hz of a signal by counting the zero-crossings."
(let ((seconds 2)
(trigger (zero-crossing-trigger))
(zero-crossing-count 0))
(dotimes (i (* seconds sample-rate))
(funcall u... | null | https://raw.githubusercontent.com/Frechmatz/cl-synthesizer/ba2e4003448829078187013f6723eb5c8ce8adbc/test/test-util/frequency-counter.lisp | lisp | (in-package :cl-synthesizer-test)
(defun frequency-counter (&key sample-rate update-fn get-output-fn)
"Determines the frequency in Hz of a signal by counting the zero-crossings."
(let ((seconds 2)
(trigger (zero-crossing-trigger))
(zero-crossing-count 0))
(dotimes (i (* seconds sample-rate))
(funcall u... | |
db013e571b84e965588c3e14c3f157ebda580d4f7049dbb8f05d880d36b476b7 | pjones/playlists | Format.hs |
This file is part of the package playlists . It is subject to
the license terms in the LICENSE file found in the top - level directory
of this distribution and at git . No part
of playlists package , including this file , may be copied , modified ,
propagated , or distributed except according to the terms c... | null | https://raw.githubusercontent.com/pjones/playlists/35e4a91e599eac4a1c6f24500d120692e709fd1f/src/Text/Playlist/Internal/Format.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
| T... |
This file is part of the package playlists . It is subject to
the license terms in the LICENSE file found in the top - level directory
of this distribution and at git . No part
of playlists package , including this file , may be copied , modified ,
propagated , or distributed except according to the terms c... |
208f3f72f9a416897804b57fe329e44e6f5f646374ae81d95ccb231235af6ae6 | arttuka/reagent-material-ui | time_field.cljs | (ns reagent-mui.x.time-field
"Imports @mui/x-date-pickers/TimeField as a Reagent component.
Original documentation is at -pickers/time-field/ ."
(:require [reagent.core :as r]
["@mui/x-date-pickers/TimeField" :as MuiTimeField]))
(def time-field (r/adapt-react-class MuiTimeField/TimeField))
| null | https://raw.githubusercontent.com/arttuka/reagent-material-ui/4fc4b44891919d2b84160eb411d52227dd89e0a5/src/x/reagent_mui/x/time_field.cljs | clojure | (ns reagent-mui.x.time-field
"Imports @mui/x-date-pickers/TimeField as a Reagent component.
Original documentation is at -pickers/time-field/ ."
(:require [reagent.core :as r]
["@mui/x-date-pickers/TimeField" :as MuiTimeField]))
(def time-field (r/adapt-react-class MuiTimeField/TimeField))
| |
441b12ee1f7c1a8339a8fa8bcd4d32a8afe651fd96b17e28454b8771493742f2 | igorhvr/bedlam | sxml-tools.scm | Copyright ( c ) 2005 , 2006 LShift Ltd. < >
;;;
;;; Permission is hereby granted, free of charge, to any person obtaining
;;; a copy of this software and associated documentation files (the
" Software " ) , to deal in the Software without restriction , including
;;; without limitation the rights to use, copy, modi... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/siscweb/siscweb-src-0.5/opt/sxml/scm/lshift/sxml-tools.scm | scheme |
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall be
EXPRESS OR IMPLIED, ... | Copyright ( c ) 2005 , 2006 LShift Ltd. < >
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
included in all copies or substantial portions of t... |
d4e877bb31a686c0204187a95b7fe1c38a0a689bfe406ae8144b610b26d070c1 | district0x/district-server-smart-contracts | lib_version.clj | (ns lib-version)
(def lib 'district0x/district-server-smart-contracts) ; ends up as <group-id>/<artifact-id> in pom.xml
(def version "1.4.2-SNAPSHOT")
| null | https://raw.githubusercontent.com/district0x/district-server-smart-contracts/cc7a0ef736ee286412a8b9c7d8d0de79d98c691c/lib_version.clj | clojure | ends up as <group-id>/<artifact-id> in pom.xml | (ns lib-version)
(def version "1.4.2-SNAPSHOT")
|
c3adeddebeaeea942078a3fe440a9157f51cf96fde80e28938818c14512481c8 | mfelleisen/Evolution | common.rkt | #lang racket
;; ===================================================================================================
;; this file provides json testing for serialization
;; SERVICES
(provide
(all-from-out "../common.rkt"))
(module+ test
(provide
(all-from-out (submod "../common.rkt" test))
# : result... | null | https://raw.githubusercontent.com/mfelleisen/Evolution/cf5ef02696339f8e83cc831932206c6a4ead689e/Xternal/common.rkt | racket | ===================================================================================================
this file provides json testing for serialization
SERVICES
runs (testing) on a JSON version of inputs and checks that it is jsexpr-equal? to out0
if result is not *special, the function also tests equality on the r... | #lang racket
(provide
(all-from-out "../common.rkt"))
(module+ test
(provide
(all-from-out (submod "../common.rkt" test))
# : result Any - > Void
run-json-testing
SYNTAX : ( run - json - exn - testing msg : string inputs : jsexpr exn?:predicate )
run-json-exn-testing))
(require "../comm... |
aed98ed6fb720249431661e3ebc8bca975ce837202a071d7a96a0810ae93c825 | OCamlPro/typerex-lint | plugin_parsing.raw_syntax.1.ml | if (some_boolean) then
expr
else
expr
| null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/tools/ocp-lint-doc/examples/plugin_parsing.raw_syntax.1.ml | ocaml | if (some_boolean) then
expr
else
expr
| |
ec3725ebb62b80f1608b2ef7ee3fff12ddbdc2a0a0720f9be7169dce63ef26e7 | gfour/gic | myex6.hs | result = f inc 2;
f g y = g y * apply g 5;
apply h x = h x;
inc a = a + 1
" result " = CALL ( " ) CALL ( 0,"f_y__0 " ) ( " f " )
" f " = " * " [ CALL ( 0,"f_g_0__0 " ) ( ARG 1 0),CALL ( 1,"apply_h__0 " ) CALL ( 0,"apply_x__0 " ) ( " apply " ) ]
" apply " = CALL ( 0,"apply_h_0__0 " ) ( ARG 1 0 )
" inc... | null | https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/Examples/Num/myex6.hs | haskell | result = f inc 2;
f g y = g y * apply g 5;
apply h x = h x;
inc a = a + 1
" result " = CALL ( " ) CALL ( 0,"f_y__0 " ) ( " f " )
" f " = " * " [ CALL ( 0,"f_g_0__0 " ) ( ARG 1 0),CALL ( 1,"apply_h__0 " ) CALL ( 0,"apply_x__0 " ) ( " apply " ) ]
" apply " = CALL ( 0,"apply_h_0__0 " ) ( ARG 1 0 )
" inc... | |
2a99ad9e73ef08aabdc830b89eb15d9f0aa3710fb5343cc81d17e2f68eb2290e | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.book-library.pages.library.views
(:require
[re-frame.core :as re-frame]
[webchange.book-library.components.categories.views :refer [book-categories category-image]]
[webchange.book-library.components.loading-indicator.views :refer [loading-indicator]]
[webchange.book-library.layout.views... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/e5747e187937d85e9c92c728d52a704f323f00ef/src/cljs/webchange/book_library/pages/library/views.cljs | clojure | (ns webchange.book-library.pages.library.views
(:require
[re-frame.core :as re-frame]
[webchange.book-library.components.categories.views :refer [book-categories category-image]]
[webchange.book-library.components.loading-indicator.views :refer [loading-indicator]]
[webchange.book-library.layout.views... | |
c406310d29beea4e79de88a87f3ddf52300c01ad748017ada128908ddf0e31b9 | herd/herdtools7 | model.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/ad65c6cb9e62962cf81b7f7e6c8196b2094a5cec/herd/model.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2012 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
2eb504b34e399c56670d8900a3f25e17ddb9050ff9c89437d4c5cebf71d057e5 | KaroshiBee/weevil | dap_request_message.mli | open Dap_message_types
include REQUEST_T
module MakeRO : functor (REQ:REQUEST_T) ->
REQUEST_READONLY_T with type ('cmd, 'args, 'presence) t = ('cmd, 'args, 'presence) REQ.t
| null | https://raw.githubusercontent.com/KaroshiBee/weevil/1b166ba053062498c1ec05c885e04fba4ae7d831/lib/dapper/dap_request_message.mli | ocaml | open Dap_message_types
include REQUEST_T
module MakeRO : functor (REQ:REQUEST_T) ->
REQUEST_READONLY_T with type ('cmd, 'args, 'presence) t = ('cmd, 'args, 'presence) REQ.t
| |
9c7cfe09e0ea460523d3e6df1d07d104c24ba3043556c61eac5d27357b44970c | xcoo/proton | diff.cljc | (ns proton.diff
"Helpful diff functions like `diff -u`"
(:require
[clojure.data :refer [diff]]
[clojure.string :as string]
#?(:clj [clojure.pprint :refer [pprint]]
:cljs [cljs.pprint :refer [pprint]])))
(defn- blank-padding [origin size]
(into origin (take size (repeat ""))))
(defn- align-length ... | null | https://raw.githubusercontent.com/xcoo/proton/2259d38e1103c5f9f307d52bc802c56ebe5a4313/src/cljc/proton/diff.cljc | clojure | (ns proton.diff
"Helpful diff functions like `diff -u`"
(:require
[clojure.data :refer [diff]]
[clojure.string :as string]
#?(:clj [clojure.pprint :refer [pprint]]
:cljs [cljs.pprint :refer [pprint]])))
(defn- blank-padding [origin size]
(into origin (take size (repeat ""))))
(defn- align-length ... | |
416c741078891a7623181e73df3f606298b7f5fa78fe40dd82fc2c43aa439e57 | fpco/stackage-curator | BuildPlanSpec.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE OverloadedStrings , NoImplicitPrelude #
module Stackage.BuildPlanSpec (spec) where
import qualified Data.Map as Map
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import Data.Yaml
import qualified Data.Yaml as Y
import Distribution.V... | null | https://raw.githubusercontent.com/fpco/stackage-curator/c25cf6959a1d1b3129b18855ddbc7974324cc422/test/Stackage/BuildPlanSpec.hs | haskell | | Checking should be considered a bad build plan.
| Check build plan with the given package set getter.
| Make a package set from a convenient data structure.
| This exact version is required.
| Accept any version.
| Test plan.
| Test package set with versions. | # LANGUAGE ScopedTypeVariables #
# LANGUAGE OverloadedStrings , NoImplicitPrelude #
module Stackage.BuildPlanSpec (spec) where
import qualified Data.Map as Map
import qualified Data.Map.Strict as M
import qualified Data.Set as S
import Data.Yaml
import qualified Data.Yaml as Y
import Distribution.V... |
9c5288b2b2f5f7e4de382e6f494990a5031dd1084d6a54c57b37bc8841bf9dee | nikita-volkov/rerebase | Handle.hs | module GHC.IO.Handle
(
module Rebase.GHC.IO.Handle
)
where
import Rebase.GHC.IO.Handle
| null | https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/GHC/IO/Handle.hs | haskell | module GHC.IO.Handle
(
module Rebase.GHC.IO.Handle
)
where
import Rebase.GHC.IO.Handle
| |
84452db8d3bb87df57cd97bd8a20fdf36b34332868e31355c689da838b9d3266 | thizanne/cormoran | env.ml | TODO : write mli
open Batteries
module L = Location
module Ty = Types
type ty =
| Int
| Bool
let print_ty output = function
| Int -> String.print output "Int"
| Bool -> String.print output "Bool"
type origin = Ty.origin (* To change if origin is made a gadt *)
type t = (ty * origin) Sym.Map.t
let are_co... | null | https://raw.githubusercontent.com/thizanne/cormoran/46d13330ebd1c8224a0603fd473d8e6bed48bf53/src/env.ml | ocaml | To change if origin is made a gadt | TODO : write mli
open Batteries
module L = Location
module Ty = Types
type ty =
| Int
| Bool
let print_ty output = function
| Int -> String.print output "Int"
| Bool -> String.print output "Bool"
type t = (ty * origin) Sym.Map.t
let are_compatible_types : type a. ty -> a Ty.t -> bool =
fun t1 t2 ->
... |
8ee9245aa3a16ed6a88b432bfea6722fc2f0dab90195244134ec72bf7e2ad229 | BitGameEN/bitgamex | recon_web_uuids.erl | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an " A... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/recon_web/src/recon_web_uuids.erl | erlang | 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
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
( c ) Apache / CouchDB
-module(recon_web_uuids).
-behaviour(gen_server).
-define(DEFAULT_ALGORITHM, random).
-export([start_link/0, stop/0]).
-export([n... |
268ccf5ececad537efe7c5cd0e94c2f7393882003e8305369372772c95a2eb94 | aantron/luv | DNS.mli | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
* DNS queries .
See { { : #querying-dns } { i
Querying DNS } } in the user guide and
{ { : } { i DNS utility functions } } in
libuv .
This module expo... | null | https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/src/DNS.mli | ocaml | * Optional flags and request objects for use with {!Luv.DNS.getnameinfo}. | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
* DNS queries .
See { { : #querying-dns } { i
Querying DNS } } in the user guide and
{ { : } { i DNS utility functions } } in
libuv .
This module expo... |
69916a9439aab75b765ccbc45a27a90acb997be821cc552335d966fa7ef4414e | heraldry/heraldicon | position.cljs | (ns heraldicon.frontend.element.position
(:require
[heraldicon.context :as c]
[heraldicon.frontend.element.core :as element]
[heraldicon.frontend.element.ordinary-group-options :as ordinary-group-options]
[heraldicon.frontend.element.submenu :as submenu]
[heraldicon.frontend.language :refer [tr]]
[h... | null | https://raw.githubusercontent.com/heraldry/heraldicon/344b0a9efad48a4bee1f140385f552e19095d6d9/src/heraldicon/frontend/element/position.cljs | clojure | TODO: probably can be improved with better subscriptions | (ns heraldicon.frontend.element.position
(:require
[heraldicon.context :as c]
[heraldicon.frontend.element.core :as element]
[heraldicon.frontend.element.ordinary-group-options :as ordinary-group-options]
[heraldicon.frontend.element.submenu :as submenu]
[heraldicon.frontend.language :refer [tr]]
[h... |
ce07a129face4a51fe9b573fa35721c22a47e9fe87f9cc9bbef550d85575b193 | circuithub/ch-hs-format | Main.hs | # language ApplicativeDo #
# language GADTs #
# language LambdaCase #
# language NamedFieldPuns #
# language RecordWildCards #
{-# language ScopedTypeVariables #-}
module Main where
import Control.Applicative
import Data.Foldable ( for_ )
import Control.Monad ( (>=>), when )
import Data.Data
import Language.Haskell.G... | null | https://raw.githubusercontent.com/circuithub/ch-hs-format/442520d2260a291acc085fecda31d9b4815cffc3/src/Main.hs | haskell | # language ScopedTypeVariables #
Continue formatting children | # language ApplicativeDo #
# language GADTs #
# language LambdaCase #
# language NamedFieldPuns #
# language RecordWildCards #
module Main where
import Control.Applicative
import Data.Foldable ( for_ )
import Control.Monad ( (>=>), when )
import Data.Data
import Language.Haskell.GHC.ExactPrint
import Language.Haskell... |
d544f0f077fc30e404d69c6ae8c05302f01a55845d26bfd6a5bdaeae4d7d346a | endobson/racket-llvm | functions.rkt | #lang racket/base
(require
racket/contract
unstable/contract
"../ffi/safe.rkt"
"parameters.rkt"
"predicates.rkt"
"convertible.rkt"
"types.rkt")
(provide
(contract-out
(llvm:function-pointer? predicate/c)
(llvm-add-function
(->* (llvm:function-type? string?)
(#:module llvm:module?) llv... | null | https://raw.githubusercontent.com/endobson/racket-llvm/3eb557b0fe4bddfdfce8e8f4659d218535daa061/private/simple/functions.rkt | racket | #lang racket/base
(require
racket/contract
unstable/contract
"../ffi/safe.rkt"
"parameters.rkt"
"predicates.rkt"
"convertible.rkt"
"types.rkt")
(provide
(contract-out
(llvm:function-pointer? predicate/c)
(llvm-add-function
(->* (llvm:function-type? string?)
(#:module llvm:module?) llv... | |
a64250774943d91f6ed92af8760c06f5dae62ed5eb64232b439b1309c0a24f67 | ruedigergad/bowerick | client_benchmark.clj | ;;;
Copyright 2021
;;;
This software is released under the terms of the Eclipse Public License
( EPL ) 1.0 . You can find a copy of the EPL at :
;;; -1.0.php
;;;
(ns
^{:author "Ruediger Gad",
:doc "Tests for benchmark client"}
bowerick.test.client-benchmark
(:require
[bowerick.jms :as jm... | null | https://raw.githubusercontent.com/ruedigergad/bowerick/80b48ebec19f5f9a225d4cf43eb9b484c5f98afa/test/bowerick/test/client_benchmark.clj | clojure |
-1.0.php
| Copyright 2021
This software is released under the terms of the Eclipse Public License
( EPL ) 1.0 . You can find a copy of the EPL at :
(ns
^{:author "Ruediger Gad",
:doc "Tests for benchmark client"}
bowerick.test.client-benchmark
(:require
[bowerick.jms :as jms]
[bowerick.main :as m... |
e45052d2b9fa277525f442477c273b27599f7d335265ac31b55483fcf9782574 | SimSaladin/rnfssp | DatabaseTools.hs | # LANGUAGE NoImplicitPrelude #
-- | Some tools to use database with media
module MediaSub.DatabaseTools where
import Control.Arrow (second)
import qualified Data.ByteString.Char8 as BC
import Data.Ord (comparing)
import Data.Conduit
import qualified Data.Conduit.List as CL
import ... | null | https://raw.githubusercontent.com/SimSaladin/rnfssp/d04993524d13ed5d993e4b85e604c824ef7283ba/rnfssp-media/MediaSub/DatabaseTools.hs | haskell | | Some tools to use database with media
| three fields: 'isfile', 'path', 'maybe desc' | # LANGUAGE NoImplicitPrelude #
module MediaSub.DatabaseTools where
import Control.Arrow (second)
import qualified Data.ByteString.Char8 as BC
import Data.Ord (comparing)
import Data.Conduit
import qualified Data.Conduit.List as CL
import Data.List hiding (ins... |
8d984ebc30fc27c9d811a2b625e71509e0ee8513183420e39b43a88d7ce17439 | grin-compiler/ghc-grin | sorting.hs | module Main(main) where
import RTS
main = print_int (result (l ++ l ++ l ++ l ++ l ++ l))
where l :: [Int]
l = upto 1 400
result :: [Int] -> Int
result xs = sum (heapSort xs) +
sum (insertSort xs) +
sum (mergeSort xs) +
sum (quickSort xs) +
sum (quickSor... | null | https://raw.githubusercontent.com/grin-compiler/ghc-grin/ebc4dca2e1f5b3581d4b84726730564ce909d786/ghc-grin-benchmark/boq-custom/sorting.hs | haskell | module Sort where
trying various sorts
the same thing, w/ "partition" [whose implementation I don't trust]
-----------------------------------------------------------
-----------------------------------------------------------
try it w/ bushier trees
-----------------------------------------------------------
------... | module Main(main) where
import RTS
main = print_int (result (l ++ l ++ l ++ l ++ l ++ l))
where l :: [Int]
l = upto 1 400
result :: [Int] -> Int
result xs = sum (heapSort xs) +
sum (insertSort xs) +
sum (mergeSort xs) +
sum (quickSort xs) +
sum (quickSor... |
2572df165454d53efba8b07d246ccea0ba4c26ea73f3e92fb1841de936c94797 | GaloisInc/jvm-verifier | Common.hs | |
Module : Tests . Common
Description :
License : BSD3
Stability : provisional
Point - of - contact : atomb , jhendrix
Module : Tests.Common
Description :
License : BSD3
Stability : provisional
Point-of-contact : atomb, jhendrix
-}
# OPTIO... | null | https://raw.githubusercontent.com/GaloisInc/jvm-verifier/3905dda18d0bdd5c595eef49804780f4a48c22f5/test/src/Tests/Common.hs | haskell | # LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE CPP #
| Parse a string using the 'Read' instance.
| Bake a particular verbosity level into all simulator calls for
the test suite. Configurable using the environment variable
@VERBOSITY@.
include 'commonJars'.
primitiv... | |
Module : Tests . Common
Description :
License : BSD3
Stability : provisional
Point - of - contact : atomb , jhendrix
Module : Tests.Common
Description :
License : BSD3
Stability : provisional
Point-of-contact : atomb, jhendrix
-}
# OPTIO... |
4a0ee2780690f96e8b0d90c1e866d96b190694c370c7ec869c368ca1673ac037 | alaricsp/chicken-scheme | ctak.scm | ;;; ctak.scm
(define (ctak x y z)
(call-with-current-continuation
(lambda (k)
(ctak-aux k x y z))))
(define (ctak-aux k x y z)
xy
(k z))
(else (call-with-current-continuation
(lambda (k) ; (was missing)
(ctak-aux
k
(call-with-current-continuation
(lambda (k)
... | null | https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/benchmarks/ctak.scm | scheme | ctak.scm
(was missing) |
(define (ctak x y z)
(call-with-current-continuation
(lambda (k)
(ctak-aux k x y z))))
(define (ctak-aux k x y z)
xy
(k z))
(else (call-with-current-continuation
(ctak-aux
k
(call-with-current-continuation
(lambda (k)
(ctak-aux k
(- x 1)
y
... |
a69f95814a120825f337c17eb5bc792c744e93feffbb9b06dd95e8a69dde29b5 | GaloisInc/renovate | Repr.hs | # LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE KindSignatures #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeInType #-}
# LANGUAGE UndecidableInstances #
module Renovate.Arch.AArch32.Repr (
ARMKind,
A32,
T3... | null | https://raw.githubusercontent.com/GaloisInc/renovate/df24c65c45ea95588c08e3d36a40cfd0ad90f8d9/renovate-aarch32/src/Renovate/Arch/AArch32/Repr.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE TypeInType # | # LANGUAGE DataKinds #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Renovate.Arch.AArch32.Repr (
ARMKind,
A32,
T32,
ARMRepr(..)
) where
import Data.P... |
4bb3df2f58c8db654944853ea615af4a82a775b7a46d51dbcf10a04633b0938b | rabbitmq/rabbitmq-management | rabbit_mgmt_wm_operator_policy.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_mgmt_wm_operator_policy).
-export... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-management/543906f01ccd0344aff648f21bb6b5156b2a2ca2/src/rabbit_mgmt_wm_operator_policy.erl | erlang |
--------------------------------------------------------------------
-------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mgmt_wm_operator_policy).
-export([init... |
7908bdbbe8fdd24ce6e2f113387efd536b4dd147f20aa4fbfce46d5357e39db0 | rjnw/sham | transform.rkt | #lang racket
(require racket/stxparam)
(require "identifier.rkt")
(provide (all-defined-out))
;; (define transform-procedure (lambda (c . args) ((transform-func c) c args)))
;; (struct transform [func] #:property prop:procedure (struct-field-index func))
(define-syntax-parameter ^ #f)
;; (define-syntax-parameter wi... | null | https://raw.githubusercontent.com/rjnw/sham/6e0524b1eb01bcda83ae7a5be6339da4257c6781/sham-sam/sham/sam/runtime/transform.rkt | racket | (define transform-procedure (lambda (c . args) ((transform-func c) c args)))
(struct transform [func] #:property prop:procedure (struct-field-index func))
(define-syntax-parameter with #f) | #lang racket
(require racket/stxparam)
(require "identifier.rkt")
(provide (all-defined-out))
(define-syntax-parameter ^ #f)
(define (identifier->syntax ident) (ast-id-stxid ident))
(define (compile-identifier-def ident (scope default-id-scope))
(define stxid ident)
(define gen-stxid (car (generate-temporarie... |
34b2de7eb267ca4e3cfae42ca1d445a83370120e1dc7c5e7e327da123ce697b5 | RolfRolles/PandemicML | X86RandomTest.ml | open X86
exception Internal
let ei () = raise Internal
let marshall_out (i: X86.x86instrpref) s =
let oc = open_out_bin "c:\\paframework\\instr.bin" in
Marshal.to_channel oc i [Marshal.No_sharing];
close_out oc;
print_endline ("Marshalled an instruction "^s)
let get_disasm i s =
try X86Disasm.string_of_x8... | null | https://raw.githubusercontent.com/RolfRolles/PandemicML/9c31ecaf9c782dbbeb6cf502bc2a6730316d681e/Test/X86RandomTest.ml | ocaml | open X86
exception Internal
let ei () = raise Internal
let marshall_out (i: X86.x86instrpref) s =
let oc = open_out_bin "c:\\paframework\\instr.bin" in
Marshal.to_channel oc i [Marshal.No_sharing];
close_out oc;
print_endline ("Marshalled an instruction "^s)
let get_disasm i s =
try X86Disasm.string_of_x8... | |
7c760371c31fc09df6dea8044f32db9a18f9cb0f7a6d7b5fe0d722cfa651e09f | TyOverby/mono | import.ml | open! Core
include Module_types
include Annotate_incr
module Effect = Ui_effect
| null | https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-bonsai/src/import.ml | ocaml | open! Core
include Module_types
include Annotate_incr
module Effect = Ui_effect
| |
db9fd58d0dd6616becb32437b4566fdb789b9aa1982e5fff20592dff8375da41 | fourmolu/fourmolu | splice-pattern-out.hs | # LANGUAGE TemplateHaskell #
singleLine = case () of
$x -> ()
$(y "something") -> ()
multiline = case () of
$( x
+ y
) -> ()
$( y
"something"
) -> ()
| null | https://raw.githubusercontent.com/fourmolu/fourmolu/1f8903a92c8d5001dc1ec8ecfd4a04a3b61c3283/data/examples/declaration/value/function/pattern/splice-pattern-out.hs | haskell | # LANGUAGE TemplateHaskell #
singleLine = case () of
$x -> ()
$(y "something") -> ()
multiline = case () of
$( x
+ y
) -> ()
$( y
"something"
) -> ()
| |
f10fa405d736df23e1af914489c013d2e29d111884cd9b9953745acdacef45a3 | quil-lang/quilc | smt-tests.lisp | ;; smt-tests.lisp
;;
Author :
(fiasco:define-test-package #:cl-quil.smt-tests
(:use #:cl-quil #:cl-quil.smt)
(:export
#:run-smt-tests)
(:shadowing-import-from #:cl-quil #:pi))
(in-package #:cl-quil.smt-tests)
(defun run-smt-tests (&key (verbose nil) (headless nil))
"Run all SMT tests. If VERBOSE is T... | null | https://raw.githubusercontent.com/quil-lang/quilc/b5716ab3fccf7ee16fd569cd679ace007333ec98/tests/smt-tests.lisp | lisp | smt-tests.lisp
this is akin to what we do in the addressing tests, but duplicated here so as not to depend on them
ditto
no blocks specified
not enough blocks
general case: same logical matrices, but chip constraints are met | Author :
(fiasco:define-test-package #:cl-quil.smt-tests
(:use #:cl-quil #:cl-quil.smt)
(:export
#:run-smt-tests)
(:shadowing-import-from #:cl-quil #:pi))
(in-package #:cl-quil.smt-tests)
(defun run-smt-tests (&key (verbose nil) (headless nil))
"Run all SMT tests. If VERBOSE is T, print out lots of t... |
1816d2b5281dd4b568a800faa116c3b95a1bf5f53ea2c5117240b795c0a48cbe | amnh/poy5 | unaligned_benchmark.ml | A program to benchmark different algorithms of POY for various datasets .
let () =
FileStream.do_broadcast := false
let run_command_get_tree_cost commands =
Phylo.parsed_run (PoyCommand.of_parsed false commands);
match Phylo.Runtime.trees () with
| [tree] ->
let tree =
... | null | https://raw.githubusercontent.com/amnh/poy5/da563a2339d3fa9c0110ae86cc35fad576f728ab/src/utils/unaligned_benchmark.ml | ocaml | First prepare the data | A program to benchmark different algorithms of POY for various datasets .
let () =
FileStream.do_broadcast := false
let run_command_get_tree_cost commands =
Phylo.parsed_run (PoyCommand.of_parsed false commands);
match Phylo.Runtime.trees () with
| [tree] ->
let tree =
... |
0603286dc368299ab06a1b924176d27e07b573b26065fe4473bd0ebc36aa63ff | spurious/snd-mirror | bess1.scm | bess1.scm -- some examples from clm-2 / rt.lisp and clm-2 / bess5.cl
Author : < >
Created : Thu May 29 04:14:35 CEST 2003
Last : Sun Jun 15 03:50:21 CEST 2003
changed slightly 14 - Jun-06 Bill to match bess.scm , fix pitch problem in make - oscil .
then again 18 - Dec-09 to use s7 rather than
chang... | null | https://raw.githubusercontent.com/spurious/snd-mirror/8e7a643c840592797c29384ffe07c87ba5c0a3eb/bess1.scm | scheme | Commentary:
frequency, amplitude, and FM index can be controlled via sliders.
clm-2/bess5.cl.
tests.
; 22050
:sample-type *clm-sample-type*) ;; mus-lshort
Code:
set up our user-interface
toggle named "play"
carrier freq
amp
fm index
tempo
--------------------------------
go-away button
add sc... | bess1.scm -- some examples from clm-2 / rt.lisp and clm-2 / bess5.cl
Author : < >
Created : Thu May 29 04:14:35 CEST 2003
Last : Sun Jun 15 03:50:21 CEST 2003
changed slightly 14 - Jun-06 Bill to match bess.scm , fix pitch problem in make - oscil .
then again 18 - Dec-09 to use s7 rather than
chang... |
0dd64aa7254fd33c8e66a1b9260edafc5e5d796d2df843988d3850f4030a9cb9 | lmdexpr/ocaml_jvm | instruction.ml | open Classfile
(* utils *)
let ( let* ) = Result.bind
let ( let+ ) x k = Result.map k x
let not_implemented ~name = Result.error @@ Failure ("not_implemented " ^ name)
let to_signed byte1 byte2 =
let value = (byte1 lsl 8) lor byte2 in
if value land 0b1000_0000_0000_0000 = 0 then value else value - 0x10000
except... | null | https://raw.githubusercontent.com/lmdexpr/ocaml_jvm/549271581f6fd894059cb0769757099bee0bfa97/src/jvm/instruction.ml | ocaml | utils
mnemonics
todo
todo
todo | open Classfile
let ( let* ) = Result.bind
let ( let+ ) x k = Result.map k x
let not_implemented ~name = Result.error @@ Failure ("not_implemented " ^ name)
let to_signed byte1 byte2 =
let value = (byte1 lsl 8) lor byte2 in
if value land 0b1000_0000_0000_0000 = 0 then value else value - 0x10000
exception Requirem... |
35e610688cdf6dbe109a863a0e76d9a3795997d897d958efd27f6a207b54f19e | deadtrickster/prometheus.cl | dummy.lisp | (in-package :prometheus.formats.text.test)
(plan 1)
(subtest "Dummy, sanity check"
(ok :t "T is T"))
(finalize)
| null | https://raw.githubusercontent.com/deadtrickster/prometheus.cl/60572b793135e8ab5a857d47cc1a5fe0af3a2d53/t/formats/text/dummy.lisp | lisp | (in-package :prometheus.formats.text.test)
(plan 1)
(subtest "Dummy, sanity check"
(ok :t "T is T"))
(finalize)
| |
b45d3d0c72d402e3de8f22330c99faf7a639c2e3d1f227f606615609ef6d162b | tqtezos/minter-sdk | Burn.hs | -- | Tests on the swaps contract.
module Test.Swaps.Burn where
import Prelude hiding (swap)
import GHC.Exts (fromList)
import GHC.Integer (negateInteger)
import Hedgehog (Property, forAll, property)
import Test.Tasty (TestTree, testGroup)
import Morley.Nettest
import Morley.Nettest.Tasty (nettestScenarioCaps)
imp... | null | https://raw.githubusercontent.com/tqtezos/minter-sdk/6239f6ee8435977085c00c194224d4223386841a/packages/minter-contracts/test-hs/Test/Swaps/Burn.hs | haskell | | Tests on the swaps contract.
HELPERS -- | module Test.Swaps.Burn where
import Prelude hiding (swap)
import GHC.Exts (fromList)
import GHC.Integer (negateInteger)
import Hedgehog (Property, forAll, property)
import Test.Tasty (TestTree, testGroup)
import Morley.Nettest
import Morley.Nettest.Tasty (nettestScenarioCaps)
import Lorentz.Contracts.Swaps.Allowl... |
3650bbca7ba8462fd00de325f1f0a0492b4e1447ee84f1ccc5f7cc82f32bf6b0 | goldfirere/video-resources | Mono.hs | # LANGUAGE MonoLocalBinds , GADTs , ScopedTypeVariables #
module Mono where
GADTs implies MonoLocalBinds
TypeFamilies implies MonoLocalBinds
GADTs implies MonoLocalBinds
TypeFamilies implies MonoLocalBinds
-}
import GADT
f : : a - > G a - > Int
f x MkGInt = x
f _ MkGOther = 5
f :: a -> G a -> Int
f x Mk... | null | https://raw.githubusercontent.com/goldfirere/video-resources/59db79284afd4111511d13cc3ebba714f104b688/2021-10-14-monolocalbinds/Mono.hs | haskell | f x = let g y = (x, y) in (g 'x', g False) | # LANGUAGE MonoLocalBinds , GADTs , ScopedTypeVariables #
module Mono where
GADTs implies MonoLocalBinds
TypeFamilies implies MonoLocalBinds
GADTs implies MonoLocalBinds
TypeFamilies implies MonoLocalBinds
-}
import GADT
f : : a - > G a - > Int
f x MkGInt = x
f _ MkGOther = 5
f :: a -> G a -> Int
f x Mk... |
9a57818fd186b533c4989112b5b00ce6e11e27b6e2df7a6fbffe885687fbc470 | smimram/saml | config.ml | (** Configuration options. *)
module Debug = struct
module Typing = struct
(** Show links in variables. *)
let show_links = ref false
(** Show levels of variables. *)
let show_levels = ref false
(** Show assignations of type variables. *)
let show_assignations = ref false
end
module La... | null | https://raw.githubusercontent.com/smimram/saml/f7607ac91182e8604e9b66c64c88356e555a96f2/src/config.ml | ocaml | * Configuration options.
* Show links in variables.
* Show levels of variables.
* Show assignations of type variables.
* Optimize the code. |
module Debug = struct
module Typing = struct
let show_links = ref false
let show_levels = ref false
let show_assignations = ref false
end
module Lang = struct
let show_let = ref true
let show_seq = ref true
end
end
module Compiler = struct
let optimize = ref false
end
|
b9897489ff7216ce09b2e3c4c2e915f380ecb81ccd4bdf901f077d547cc6f9d8 | quephird/fun-with-quil | orb-spiral.clj | (ns fun-with-quil.animations.orb-spiral
(:use quil.core))
(def screen-w 800)
(def screen-h screen-w)
(defn setup []
(smooth)
(color-mode :hsb 1))
(defn draw []
(let [num-circles 150 ; Needs to be even for perfect animation loop
num-frames (* num-circles 1.818)
inner-r (* screen-w 0.1... | null | https://raw.githubusercontent.com/quephird/fun-with-quil/3b3a6885771f5a1a4cffeb8379f05a28048a1616/src/fun_with_quil/animations/orb-spiral.clj | clojure | Needs to be even for perfect animation loop
This also needs to be even | (ns fun-with-quil.animations.orb-spiral
(:use quil.core))
(def screen-w 800)
(def screen-h screen-w)
(defn setup []
(smooth)
(color-mode :hsb 1))
(defn draw []
num-frames (* num-circles 1.818)
inner-r (* screen-w 0.1)
outer-r (* screen-w 0.5)
max-circle-r (* screen-w... |
d13a4f6f2b66109ddd560fcea09734d35d1cdb65915cbe216c4a5ea05123db7b | Clozure/ccl-tests | cons-test-03.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Mar 28 07:32:20 1998
Contains : Testing of CL Features related to " CONS " , part 3
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; (typep <obj> 'list)
;;; These tests are now somewhat redundant
(deftes... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/cons-test-03.lsp | lisp | -*- Mode: Lisp -*-
(typep <obj> 'list)
These tests are now somewhat redundant | Author :
Created : Sat Mar 28 07:32:20 1998
Contains : Testing of CL Features related to " CONS " , part 3
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest typep-nil-list
(notnot-mv (typep nil 'list))
t)
(deftest typep-symbol-list
(typep 'a 'list)
nil)
(deftest typep-singleto... |
072c81eed67eeb1f7cbc63e78416745d4f0212bc6f422ab2220bd08203a0c2db | ostinelli/misultin | misultin_websocket_event_example.erl | % ==========================================================================================================
MISULTIN - Example : Shows With an event support .
%
% >-|-|-(°>
%
Copyright ( C ) 2011 , < >
% All rights reserved.
%
% BSD License
%
% Redistribution and use in source and binary forms, with or with... | null | https://raw.githubusercontent.com/ostinelli/misultin/b9fe3125cf17f4415a6d7fc60642b670f5e18eb8/examples/misultin_websocket_event_example.erl | erlang | ==========================================================================================================
>-|-|-(°>
All rights reserved.
BSD License
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:
* Redistribu... | MISULTIN - Example : Shows With an event support .
Copyright ( C ) 2011 , < >
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS OR
PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT HOLDER OR FOR
ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL... |
b2cc71db0906a82ca846ba57df50de0c6c38530baf6f8bd9cea2c0d65e6cc413 | geo2a/redfin-lib | ACTL.hs | |
Module : ISA.Types . Symbolic . ACTL
Copyright : ( c ) 2021
License : MIT ( see the file LICENSE )
Maintainer :
Stability : experimental
ACTL formulas ( universal fragment of CTL ) for specification of safety
properties of programs
Module : ISA.Types.Symbolic.ACTL
Copyr... | null | https://raw.githubusercontent.com/geo2a/redfin-lib/644cf14838f3bac3977e0fea081849334dd61da2/src/ISA/Types/Symbolic/ACTL.hs | haskell | | All Globally, must hold in all states
| All Finally, must hold in all paths from some point
| Conjunction
| Negation is only allowed for atomic state predicates
| Atomic propositions about a program state
| Assess the value of a specific 'ISA.Types.Key' in the state
| Embed a symbolic value into an 'Atom'
| N... | |
Module : ISA.Types . Symbolic . ACTL
Copyright : ( c ) 2021
License : MIT ( see the file LICENSE )
Maintainer :
Stability : experimental
ACTL formulas ( universal fragment of CTL ) for specification of safety
properties of programs
Module : ISA.Types.Symbolic.ACTL
Copyr... |
278fff6761cf3ec1a51cbe2b2da3c66d133fce276ab9724485fa597e6108b40b | kaos/ecapnp | ecapnp_ref_tests.erl | %%
Copyright 2013 , < >
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software... | null | https://raw.githubusercontent.com/kaos/ecapnp/f351c07730ba134b41b137dd6a6b93069a0908fc/test/ecapnp_ref_tests.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lang... | Copyright 2013 , < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ecapnp_ref_tests).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
-include("include/ecapnp.hrl").
-import(ecapnp_test_utils, [da... |
e39615f94664c117038fe24d6bd5dab79f94036940335a7a9b12b393224b4096 | haskell-works/hw-koans | List.hs | module Koan.List where
import Koan.Applicative as K
import Koan.Functor as K
import Koan.Monad as K
import Prelude (Bool (..), Int, Num (..), flip, otherwise)
import qualified Prelude as P
enrolled :: Bool
enrolled = False
head :: [a] -> a
head (x:_) = x
tail :: [a] -> [a]
tail (_:xs) = xs
last... | null | https://raw.githubusercontent.com/haskell-works/hw-koans/a807e72513d91ddf1c8aa445371b94bb169f22fd/solution/Koan/List.hs | haskell | Note that those are square brackets, not round brackets. | module Koan.List where
import Koan.Applicative as K
import Koan.Functor as K
import Koan.Monad as K
import Prelude (Bool (..), Int, Num (..), flip, otherwise)
import qualified Prelude as P
enrolled :: Bool
enrolled = False
head :: [a] -> a
head (x:_) = x
tail :: [a] -> [a]
tail (_:xs) = xs
last... |
2e882bfda4cdd421cd47f1260a7a301954fc025a68b643181a5424f86a4daf32 | inhabitedtype/ocaml-aws | releaseHosts.mli | open Types
type input = ReleaseHostsRequest.t
type output = ReleaseHostsResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/ec2/lib/releaseHosts.mli | ocaml | open Types
type input = ReleaseHostsRequest.t
type output = ReleaseHostsResult.t
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
8717ccd2b7e06bdc64662774d53addbddf07b7fd48c4ed8cca59871921cea945 | pirapira/coq2rust | subtyping.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/checker/subtyping.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Cic
open Environ
* Inva... |
6a1f116e07d2c5d8fb3712dc82ea28f264c6a69b8e1d023e55266b13f8d280b9 | Commonfare-net/macao-social-wallet | qrcode.clj | Freecoin - digital social currency toolkit
part of Decentralized Citizen Engagement Technologies ( D - CENT )
R&D funded by the European Commission ( FP7 / CAPS 610349 )
Copyright ( C ) 2017 Dyne.org foundation
designed , written and maintained by
< >
;; This program is free software: you can redist... | null | https://raw.githubusercontent.com/Commonfare-net/macao-social-wallet/d3724d6c706cdaa669c59da439fe48b0373e17b7/test/freecoin/test/handlers/qrcode.clj | clojure | 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 PARTICULAR PURPOSE. See the
GNU Affero General P... | Freecoin - digital social currency toolkit
part of Decentralized Citizen Engagement Technologies ( D - CENT )
R&D funded by the European Commission ( FP7 / CAPS 610349 )
Copyright ( C ) 2017 Dyne.org foundation
designed , written and maintained by
< >
it under the terms of the GNU Affero General P... |
693816910f054f26d8f79baf1a91f3962d173f6caff7765a20ba50afb4454e42 | zwizwa/staapl | sig.rkt | #lang racket/base
(require "../sig.rkt")
(provide (all-defined-out))
;; PIC18 specific wordsets
Assembler embedded as macros .
(define-macro-set pic18-assembler^
(movf xorwf andwf iorwf subwf subfwb addwf addwfc comf rrcf rlcf rrncf rlncf
cpfseq cpfsgt cpfslt clrf setf movwf mulwf
addlw iorlw xorlw andlw
... | null | https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/pic18/sig.rkt | racket | PIC18 specific wordsets
Machine flags, special operations, and ram/flash index registers.
banked access
use of carry flag is considered low-level
non-dropping binary conditionals
hardware return stack
This is a minimal set of constants necessary to support the pic18
compiler and library.
compiler
Chip/Board-s... | #lang racket/base
(require "../sig.rkt")
(provide (all-defined-out))
Assembler embedded as macros .
(define-macro-set pic18-assembler^
(movf xorwf andwf iorwf subwf subfwb addwf addwfc comf rrcf rlcf rrncf rlncf
cpfseq cpfsgt cpfslt clrf setf movwf mulwf
addlw iorlw xorlw andlw
push pop sleep reset clr... |
df5967370a30908612a28bb65af59bfab2fe805b0afef3318758b29360953521 | naveensundarg/prover | functions.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
;;; File: functions.lisp
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 di... | null | https://raw.githubusercontent.com/naveensundarg/prover/812baf098d8bf77e4d634cef4d12de94dcd1e113/snark-20120808r02/src/functions.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
File: functions.lisp
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 la... | 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 SNARK .
The Initial Developer of the Original Code is SRI International .
Portions created by the Initial Developer are Copyright ( C ) 1981 - 2012 .
... |
4a39fbc41af8437895a1d595046be4369b469e0d7653ce3db5553b6eed14007b | lambe-lang/nethra | t02_reduction.ml | open Common
open Nethra.Lang.Ast.Hypothesis.Construct
open Nethra.Lang.Ast.Hypothesis.Access
open Nethra.Lang.Ast.Term.Construct
open Nethra.Lang.Basic.Reduction
let reduce_type0 () =
let term = kind 1 in
let term' = reduce create term in
Alcotest.(check string) "type0" (render term) (render term')
let reduce_i... | null | https://raw.githubusercontent.com/lambe-lang/nethra/8d9e584e08ad5850eb8d66006d57c78ebac66564/test/nethra/lang/basic/t02_reduction.ml | ocaml | open Common
open Nethra.Lang.Ast.Hypothesis.Construct
open Nethra.Lang.Ast.Hypothesis.Access
open Nethra.Lang.Ast.Term.Construct
open Nethra.Lang.Basic.Reduction
let reduce_type0 () =
let term = kind 1 in
let term' = reduce create term in
Alcotest.(check string) "type0" (render term) (render term')
let reduce_i... | |
bc28cd3da73ba50394083b8222848ae51b8c9e811de5a9052d64a4538c23ca7e | gafiatulin/codewars | Animals.hs | -- Heads and Legs
module Animals where
animals :: Int -> Int -> Maybe (Int,Int)
animals h l | h < 0 || l < 0 = Nothing
| otherwise = if g (l-2*h) || g (4*h-l) then Nothing else Just ((4*h-l) `div` 2, (l-2*h) `div` 2)
where g x = odd x || x < 0
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/8%20kyu/Animals.hs | haskell | Heads and Legs |
module Animals where
animals :: Int -> Int -> Maybe (Int,Int)
animals h l | h < 0 || l < 0 = Nothing
| otherwise = if g (l-2*h) || g (4*h-l) then Nothing else Just ((4*h-l) `div` 2, (l-2*h) `div` 2)
where g x = odd x || x < 0
|
4749fa4ecd7828a233406f65f01dc0b8241eef8ae2ffb9ea9554e1769ff2c6a0 | haskell-suite/haskell-src-exts | GenericTree.hs | {-# LANGUAGE RankNTypes #-}
module GenericTree where
import Data.Typeable
dynRep :: (Typeable a) => a -> (TypeRep, forall b. (Typeable b) => b -> (Maybe b))
dynRep a = (typeOf a, \_ -> cast a)
| null | https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/GenericTree.hs | haskell | # LANGUAGE RankNTypes # | module GenericTree where
import Data.Typeable
dynRep :: (Typeable a) => a -> (TypeRep, forall b. (Typeable b) => b -> (Maybe b))
dynRep a = (typeOf a, \_ -> cast a)
|
9176348f6861058ea9c911495cfa00c3986f2dc7b70e124225ee5e9790c556e4 | careercup/CtCI-6th-Edition-Clojure | chapter_10_q1_test.clj | (ns chapter-10.chapter-10-q1-test
(:require [clojure.test :refer :all]
[chapter-10.chapter-10-q1 :refer :all]))
(deftest sorted-merge-test
(is (= [10 22 34 47 61 84 90 100] (sorted-merge [22 34 61 84 100 nil nil nil]
[10 47 90])))
(is (= [1 2 3 4 5 6 7 8 ... | null | https://raw.githubusercontent.com/careercup/CtCI-6th-Edition-Clojure/ef151b94978af82fb3e0b1b0cd084d910870c52a/test/chapter_10/chapter_10_q1_test.clj | clojure | (ns chapter-10.chapter-10-q1-test
(:require [clojure.test :refer :all]
[chapter-10.chapter-10-q1 :refer :all]))
(deftest sorted-merge-test
(is (= [10 22 34 47 61 84 90 100] (sorted-merge [22 34 61 84 100 nil nil nil]
[10 47 90])))
(is (= [1 2 3 4 5 6 7 8 ... | |
6ec13f7b05ddde5766dd8d4eb8b4650fc181792a1185eca2ff75711c2a98f211 | dcSpark/fracada | script-dump.hs |
{-# LANGUAGE OverloadedStrings #-}
import Prelude
import System.Environment
import Cardano.Api
import Cardano.Api.Shelley
import Codec.Serialise
import qualified Cardano.Ledger.Alonzo.Data as Alonzo
import qualified Plutus.V1.Ledger.Api as Plutus
import qualified ... | null | https://raw.githubusercontent.com/dcSpark/fracada/8da585575313b1c8e4fc8d30dcaf21d11ad6197c/exe/script-dump.hs | haskell | # LANGUAGE OverloadedStrings #
test data
nftCurrencySymbol = fromString "6b8d07d69639e9413dd637a1a815a7323c69c86abbafb66dbfdb1aa7"
nftTokenName = "" |
import Prelude
import System.Environment
import Cardano.Api
import Cardano.Api.Shelley
import Codec.Serialise
import qualified Cardano.Ledger.Alonzo.Data as Alonzo
import qualified Plutus.V1.Ledger.Api as Plutus
import qualified Data.ByteString.Short as SBS
import q... |
d41590ff1b6f740d4e87ee1449af58673374ff5014f7ad49f1c43ac99dbb185d | OCamlPro/typerex-lint | lint_sempatch.ml | (**************************************************************************)
(* *)
(* OCamlPro Typerex *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/plugins/ocp-lint-plugin-sempatch/lint_sempatch.ml | ocaml | ************************************************************************
OCamlPro Typerex
This file is distributed ... | Copyright OCamlPro 2011 - 2016 . All rights reserved .
( GNU General Public Licence version 3.0 ) .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE... |
c09be39651b559fc5be813d0c78514c1901254e685b88c0ba223c5aeaca6e8a7 | HealthSamurai/dojo.clj | 23_meta_test.clj | (ns koans.23-meta-test
(:require [koans.engine :refer :all]))
(def giants
(with-meta 'Giants
{:league "National League"}))
(meditations
"Some objects can be tagged using the with-meta function"
(= __ (meta giants))
"Or more succinctly with a reader macro"
(= __ (meta '^{:division "West"} Giants))
... | null | https://raw.githubusercontent.com/HealthSamurai/dojo.clj/94922640f534897ab2b181c608b54bfbb8351d7b/test/koans/23_meta_test.clj | clojure | (ns koans.23-meta-test
(:require [koans.engine :refer :all]))
(def giants
(with-meta 'Giants
{:league "National League"}))
(meditations
"Some objects can be tagged using the with-meta function"
(= __ (meta giants))
"Or more succinctly with a reader macro"
(= __ (meta '^{:division "West"} Giants))
... | |
918d0b844fc99dc466d833671b6cf866e7b2920495be25ca2fba455c1541fe32 | semerdzhiev/fp-2020-21 | ex02-20201020-solutions.rkt | ; Зад.1
; Естественото рекурсивно решение
(define (toBinary n)
(if (= n 0) 0
(+ (remainder n 2) (* 10 (toBinary (quotient n 2))))))
42 0 - > 0
21 1 - > 10 ( + res ( * ( remainder n 2 ) ( expt 10 pos ) ) )
10 - > 010
5 - > 1010
Итеративно решение
(define (toBinary* n)
: pos е инд... | null | https://raw.githubusercontent.com/semerdzhiev/fp-2020-21/64fa00c4f940f75a28cc5980275b124ca21244bc/group-g/ex02-20201020-solutions.rkt | racket | Зад.1
Естественото рекурсивно решение
Зад.2
Алтернативен синтаксис за дефиниция на функции
(define (fma x y z) (+ x (* y z)))
Зад.3
Зад.4
Зад.5
Зад.6
(define (^2 x) (* x x))
Зад.7
Забележка: по-добре
вместо
алтернативно - (if (= n 1) f ...)
алтернативно: (lambda (x) (f ((repeat (- n 1) f) x)))
Зад.8
За... | (define (toBinary n)
(if (= n 0) 0
(+ (remainder n 2) (* 10 (toBinary (quotient n 2))))))
42 0 - > 0
21 1 - > 10 ( + res ( * ( remainder n 2 ) ( expt 10 pos ) ) )
10 - > 010
5 - > 1010
Итеративно решение
(define (toBinary* n)
: pos е индекса на този бит от резултата ,
който ще... |
01a171829d69a134b4975b99850c9e203e73a6c1a900720781b1c51c22bd34c0 | 97jaz/hamt | info.rkt | #lang setup/infotab
(define version "0.2")
(define collection 'multi)
(define deps '("base" "r6rs-lib" "collections-lib"))
(define build-deps '("racket-doc" "rackunit-lib" "scribble-lib" "collections-lib"))
| null | https://raw.githubusercontent.com/97jaz/hamt/561cb6a447e9766dcb8abf2c01b30b87d91135f5/info.rkt | racket | #lang setup/infotab
(define version "0.2")
(define collection 'multi)
(define deps '("base" "r6rs-lib" "collections-lib"))
(define build-deps '("racket-doc" "rackunit-lib" "scribble-lib" "collections-lib"))
| |
0dffd58c02e09a976bce467e35c497a973b07fee752578977d140567aa092513 | comby-tools/comby | statistics.mli | module Time = Time
module Timer = Timer
type t =
{ number_of_files : int
; lines_of_code : int
; number_of_matches : int
; total_time : float
}
[@@deriving yojson]
val empty : t
val merge : t -> t -> t
| null | https://raw.githubusercontent.com/comby-tools/comby/a36c63fb1e686adaff3e90aed00e88404f8cda78/lib/app/statistics/statistics.mli | ocaml | module Time = Time
module Timer = Timer
type t =
{ number_of_files : int
; lines_of_code : int
; number_of_matches : int
; total_time : float
}
[@@deriving yojson]
val empty : t
val merge : t -> t -> t
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.