_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 |
|---|---|---|---|---|---|---|---|---|
309dac7745e9fb48b781aae2bba8dc0e0654fe85608e5b078633fa6362850b37 | nandor/llir-ocaml | t06ok.ml | (* TEST
flags = " -w a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
*)
(* OK (t = <m:t>) *)
module rec A : sig type t = <m:B.t> end = struct type t = <m:B.t> end
and B : sig type t = A.t end = struct type t = A.t end;;
| null | https://raw.githubusercontent.com/nandor/llir-ocaml/9c019f15c444e30c825b1673cbe827e0497868fe/testsuite/tests/typing-recmod/t06ok.ml | ocaml | TEST
flags = " -w a "
* setup-ocamlc.byte-build-env
** ocamlc.byte
*** check-ocamlc.byte-output
OK (t = <m:t>) |
module rec A : sig type t = <m:B.t> end = struct type t = <m:B.t> end
and B : sig type t = A.t end = struct type t = A.t end;;
|
6bf2a45a8a87920a6b921fb3b943b9f620efdf7b09d0e85e6161132fa7c702d1 | RobYang1024/OCaMOSS | main1.ml | open Ast
(* [is_value e] is whether [e] is a syntactic value *)
let is_value : expr -> bool = function
| I _ | B _ -> true
| Bop _ | Var _ | Let _ | If _ -> false
(* [subst e v x] is e{v/x}, that is, [e] with [v]
* substituted for [x]. *)
let rec subst e v x = match e with
| Var y -> if x=y then v else e... | null | https://raw.githubusercontent.com/RobYang1024/OCaMOSS/090d31e8c4498ac3b9b74768fe011b924b2105ab/tests/test2/main1.ml | ocaml | [is_value e] is whether [e] is a syntactic value
[subst e v x] is e{v/x}, that is, [e] with [v]
* substituted for [x].
NEW
NEW
NEW
A single step of evaluation.
NEW
NEW
NEW
NEW
[eval e] is the [e -->* v] judgement. That is,
* keep applying [step] until a value is produced.
Extract a value from... | open Ast
let is_value : expr -> bool = function
| I _ | B _ -> true
| Bop _ | Var _ | Let _ | If _ -> false
let rec subst e v x = match e with
| Var y -> if x=y then v else e
| I n -> I n
| Let(y,ebind,ebody) ->
let ebind' = subst ebind v x in
if x=y
then Let(y, ebind', ebody)
... |
b677177a27eac071649245b15add5d2cbb6420451bdf59d358f547db26f78c2b | lingnand/VIMonad | Square.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses #
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.Square
Copyright : ( c ) < >
-- License : BSD3-style (see LICENSE)
--
-- Maintainer : none
-- Stability : unstable
-- Portability... | null | https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/XMonadContrib/XMonad/Layout/Square.hs | haskell | ---------------------------------------------------------------------------
|
Module : XMonad.Layout.Square
License : BSD3-style (see LICENSE)
Maintainer : none
Stability : unstable
Portability : unportable
A layout that splits the screen into a square area and the rest of the
screen.
This i... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses #
Copyright : ( c ) < >
" XMonad . Layout . Combo " .
It sticks one window in a square region , and makes the rest
module XMonad.Layout.Square (
Square(..) ) where
import XMonad
import XMonad.StackSet ( integrate )
> ... |
eed4a808a6ae6de5b590c4823f0dca3fcb37d38940e2383694d390e3f54e831e | c4-project/c4f | abstract_prim.ml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/litmus_c/src/abstract_prim.ml | ocaml | for Fqueue | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
1299f64b27cfc8b3b1c9b3f4fd27bc67e6c792db8016d3aa27f339dbae3f363d | mage2tv/magento-cache-clean | static_content.cljs | (ns magento.static-content
(:require [file.system :as fs]
[log.log :as log]))
(defn static-content-base-dir [base-dir]
(str base-dir "pub/static/"))
(defn static-content-area-dir [base-dir area]
(str (static-content-base-dir base-dir) area))
(defn view-preprocessed-base-dir [base-dir]
(str base-d... | null | https://raw.githubusercontent.com/mage2tv/magento-cache-clean/67d4ce3f06cb42eccceff436580cdfe0ddfc5deb/src/magento/static_content.cljs | clojure | (ns magento.static-content
(:require [file.system :as fs]
[log.log :as log]))
(defn static-content-base-dir [base-dir]
(str base-dir "pub/static/"))
(defn static-content-area-dir [base-dir area]
(str (static-content-base-dir base-dir) area))
(defn view-preprocessed-base-dir [base-dir]
(str base-d... | |
c5064cc745b83361f0f2da11b1aa4137bec95fb926eba1ac5ebec8563171ef80 | threatgrid/ctia | static_auth_anonymous_test.clj | (ns ctia.http.handler.static-auth-anonymous-test
(:require [ctia.test-helpers.core :as helpers :refer [GET with-properties]]
[ctia.test-helpers.es :as es-helpers]
[clojure.test :refer [deftest is use-fixtures]]
[schema.test :refer [validate-schemas]]))
(defn fixture-anonymous-read... | null | https://raw.githubusercontent.com/threatgrid/ctia/ae7d940e323a99dde747e37e2be2898d7705dcaa/test/ctia/http/handler/static_auth_anonymous_test.clj | clojure | (ns ctia.http.handler.static-auth-anonymous-test
(:require [ctia.test-helpers.core :as helpers :refer [GET with-properties]]
[ctia.test-helpers.es :as es-helpers]
[clojure.test :refer [deftest is use-fixtures]]
[schema.test :refer [validate-schemas]]))
(defn fixture-anonymous-read... | |
f46e1b1d41b88fc7983805fc36c729413cd4fbecf285e2b7faba6fa263b1df53 | expipiplus1/vulkan | Promoted_From_VK_KHR_shader_float16_int8.hs | {-# language CPP #-}
No documentation found for Chapter " Promoted_From_VK_KHR_shader_float16_int8 "
module Vulkan.Core12.Promoted_From_VK_KHR_shader_float16_int8 ( PhysicalDeviceShaderFloat16Int8Features(..)
, StructureType(..)
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/src/Vulkan/Core12/Promoted_From_VK_KHR_shader_float16_int8.hs | haskell | # language CPP #
| VkPhysicalDeviceShaderFloat16Int8Features - Structure describing
= Members
This structure describes the following features:
= Description
If the 'PhysicalDeviceShaderFloat16Int8Features' structure is included
in the @pNext@ chain of the
structure passed to
it is filled in to indicate whet... | No documentation found for Chapter " Promoted_From_VK_KHR_shader_float16_int8 "
module Vulkan.Core12.Promoted_From_VK_KHR_shader_float16_int8 ( PhysicalDeviceShaderFloat16Int8Features(..)
, StructureType(..)
... |
f777c9bcbfe9485ad6cfcdc162f11c182523dcfc3d5c3282e6c39e973e31ffd1 | mindreframer/clojure-stuff | project.clj | (defproject io.hoplon/twitter.bootstrap "0.2.0"
:description "Hoplon wrapper for Twitter's Bootstrap framework."
:url "-util/hoplon/twitter.bootstrap"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[tailrec... | null | https://raw.githubusercontent.com/mindreframer/clojure-stuff/1e761b2dacbbfbeec6f20530f136767e788e0fe3/github.com/tailrecursion/hoplon/contrib/twitter.bootstrap/project.clj | clojure | (defproject io.hoplon/twitter.bootstrap "0.2.0"
:description "Hoplon wrapper for Twitter's Bootstrap framework."
:url "-util/hoplon/twitter.bootstrap"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[tailrec... | |
fe2f8249621eb90ea4b2992b25e27db59da27b7d167bb719e6f1cc4b0319c15f | scalaris-team/scalaris | rm_leases_SUITE.erl | 2012 - 2016 Zuse Institute Berlin
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
di... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/test/rm_leases_SUITE.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2012 - 2016 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(rm_leases_SUITE).
-author('').
-vsn('$Id').
-compile(export_all).
-include("scalaris.hrl").
-include("unitt... |
748dfe253976ffd57cc54370b440e766cddc56c3567fc7aaa14d2e1fa1245fc8 | bos/rwh | RandomSupply.hs | module RandomSupply (randomsIO) where
{-- snippet randomsIO --}
import Supply
import System.Random hiding (next)
randomsIO :: Random a => IO [a]
randomsIO =
getStdRandom $ \g ->
let (a, b) = split g
in (randoms a, b)
{-- /snippet randomsIO --}
| null | https://raw.githubusercontent.com/bos/rwh/7fd1e467d54aef832f5476ebf5f4f6a898a895d1/examples/ch15/RandomSupply.hs | haskell | - snippet randomsIO -
- /snippet randomsIO - | module RandomSupply (randomsIO) where
import Supply
import System.Random hiding (next)
randomsIO :: Random a => IO [a]
randomsIO =
getStdRandom $ \g ->
let (a, b) = split g
in (randoms a, b)
|
a33d65566780b58f7ce1c5c793eb860c34a557f9a99fd3463a6ee26effd4c3bf | input-output-hk/offchain-metadata-tools | Server.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module Test.Cardano.Metadata.Server
( tests
) where
import Data.Aeson ( ToJSON )
import qualified Data.Aeson as Aeso... | null | https://raw.githubusercontent.com/input-output-hk/offchain-metadata-tools/794f08cedbf555e9d207bccc45c08abbcf98add9/metadata-lib/test/Test/Cardano/Metadata/Server.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes # | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
module Test.Cardano.Metadata.Server
( tests
) where
import Data.Aeson ( ToJSON )
import qualified Data.Aeson as Aeson
import qualified Data.ByteString.Char8 as BC
import qualified Data.ByteString.Lazy.C... |
01792367c3dd1b726b9fa31962762c8800147e68cdc006c8467fc7964f180a1c | grafi-tt/tatsuki | Binary.hs | -- | This module exports a quasiquoter for binary integer literals.
--
-- Example usage:
--
-- @
import Language . Literals . Binary
import Data . Word
--
not : : Word32
not [ b| 0 | ] = [ b| 1 | ]
not [ b| 1 | ] = [ b| 0 | ]
-- @
module Language.Literals.Binary where
import Language.Haskell.TH.Quote
imp... | null | https://raw.githubusercontent.com/grafi-tt/tatsuki/2f85835c5aab83c3c60999a37a51fa4794c84285/Language/Literals/Binary.hs | haskell | | This module exports a quasiquoter for binary integer literals.
Example usage:
@
@ | import Language . Literals . Binary
import Data . Word
not : : Word32
not [ b| 0 | ] = [ b| 1 | ]
not [ b| 1 | ] = [ b| 0 | ]
module Language.Literals.Binary where
import Language.Haskell.TH.Quote
import Language.Haskell.TH.Syntax
import Data.Bits
b = QuasiQuoter
{ quoteExp = return . LitE . Integer... |
157417b35ad0c78fccf4abd16064a8f7fa08d9f46b46714c6208e0c752a0f001 | EFanZh/EOPL-Exercises | exercise-2.5-test.rkt | #lang racket/base
(require rackunit)
(require "../solutions/exercise-2.5.rkt")
(check-eqv? (apply-env (extend-env 'a 7 (empty-env)) 'a) 7)
(check-eqv? (apply-env (extend-env 'a
5
(extend-env 'a
7
... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/tests/exercise-2.5-test.rkt | racket | #lang racket/base
(require rackunit)
(require "../solutions/exercise-2.5.rkt")
(check-eqv? (apply-env (extend-env 'a 7 (empty-env)) 'a) 7)
(check-eqv? (apply-env (extend-env 'a
5
(extend-env 'a
7
... | |
3023575c605c59675af9d71bd3cd3367b552ded1cecdab5bbe0b1c0b6414ac3c | brainly/flood | flood_fsm.erl | -module(flood_fsm).
-author('').
-behaviour(gen_fsm).
-export([start_link/3, init/1, terminate/3]).
-export([connected/2, connected/3, disconnected/2, disconnected/3]).
-export([handle_info/3, handle_sync_event/4, code_change/4]).
-export([status/1, connect/1, disconnect/1, kill/1]).
-record(fsm_data, {url, transport... | null | https://raw.githubusercontent.com/brainly/flood/0ee7f436d3ca5e9b89e608e60ca3486ecd3689c4/src/flood_fsm.erl | erlang | Gen Server callbacks
So we can clean up later.
TODO Use this instead of handle_sync_event
Transition to disconnected state and make sure
it handles attempts to reconnect.
TODO Use this instead of handle_sync_event
Cancel an ongoing request (if any) before starting a new one.
FIXME This is fuuugly. Defuglyfy
NO... | -module(flood_fsm).
-author('').
-behaviour(gen_fsm).
-export([start_link/3, init/1, terminate/3]).
-export([connected/2, connected/3, disconnected/2, disconnected/3]).
-export([handle_info/3, handle_sync_event/4, code_change/4]).
-export([status/1, connect/1, disconnect/1, kill/1]).
-record(fsm_data, {url, transport... |
4387b741e2fa59cb9b5ff1f92a1fa812a7b89b72737ac2d3d7cd06f082c3fe28 | leviroth/ocaml-reddit-api | uri_with_string_sexp.mli | * [ Uri_with_string_sexp ] is { ! module : Uri_sexp } with a different sexp
serialization :
[ sexp_of_t t = Atom ( Uri.to_string t ) ]
serialization:
[sexp_of_t t = Atom (Uri.to_string t)]
*)
open! Core
include module type of struct
include Uri_sexp
end
| null | https://raw.githubusercontent.com/leviroth/ocaml-reddit-api/972e6a03e2fe59d8e3f469a643eef41e44a4fc97/reddit_api_kernel/uri_with_string_sexp.mli | ocaml | * [ Uri_with_string_sexp ] is { ! module : Uri_sexp } with a different sexp
serialization :
[ sexp_of_t t = Atom ( Uri.to_string t ) ]
serialization:
[sexp_of_t t = Atom (Uri.to_string t)]
*)
open! Core
include module type of struct
include Uri_sexp
end
| |
019f9b178c325d908b00cdafcbd462dd4ae4bbe275ec2b8afc1e56e21e08aca3 | exoscale/clojure-kubernetes-client | v1_config_map_projection.clj | (ns clojure-kubernetes-client.specs.v1-config-map-projection
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-key-to-path :refer :all]
)
(:import (java.io File)))
(declare v1-config-map-projection-data v1-config-map-projecti... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_config_map_projection.clj | clojure | (ns clojure-kubernetes-client.specs.v1-config-map-projection
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-key-to-path :refer :all]
)
(:import (java.io File)))
(declare v1-config-map-projection-data v1-config-map-projecti... | |
a03ffd6c985b8f0039dcdc542535f649ea06ceb0803ac74c1c015ef953866c97 | TomerAberbach/programming-in-haskell-exercises | 6.hs | and :: [Bool] -> Bool
and [] = True
and (b:bs) = b && Main.and bs
concat :: [[a]] -> [a]
concat [] = []
concat (xs:xss) = xs ++ Main.concat xss
replicate :: Int -> a -> [a]
replicate 0 _ = []
replicate n v = v : Main.replicate (n - 1) v
(!!) :: [a] -> Int -> a
(x:xs) !! 0 = x
xs !! n = (tail xs) Main.!! (n - 1)
ele... | null | https://raw.githubusercontent.com/TomerAberbach/programming-in-haskell-exercises/a66830529ebc9c4d84d0e4c6e0ad58041b46bc32/parts/1/chapters/6/6.hs | haskell | and :: [Bool] -> Bool
and [] = True
and (b:bs) = b && Main.and bs
concat :: [[a]] -> [a]
concat [] = []
concat (xs:xss) = xs ++ Main.concat xss
replicate :: Int -> a -> [a]
replicate 0 _ = []
replicate n v = v : Main.replicate (n - 1) v
(!!) :: [a] -> Int -> a
(x:xs) !! 0 = x
xs !! n = (tail xs) Main.!! (n - 1)
ele... | |
4a50c272bd5930b794ee65982197ab2271ee47c123012ab2f3596f04c3110f36 | agocorona/TCache | Triggers.hs | # LANGUAGE ExistentialQuantification , DeriveDataTypeable #
module Data.TCache.Triggers(DBRef(..),Elem(..),Status(..),addTrigger,applyTriggers) where
import Data.TCache.IResource
import Data.TCache.Defs
import Data.Typeable
import Data.IORef
import System.IO.Unsafe
import Unsafe.Coerce
import GHC.Conc (STM, unsafeIOTo... | null | https://raw.githubusercontent.com/agocorona/TCache/72158de657f72c3b480cea1878b5cebfbfd65d13/Data/TCache/Triggers.hs | haskell | import Debug.Trace | # LANGUAGE ExistentialQuantification , DeriveDataTypeable #
module Data.TCache.Triggers(DBRef(..),Elem(..),Status(..),addTrigger,applyTriggers) where
import Data.TCache.IResource
import Data.TCache.Defs
import Data.Typeable
import Data.IORef
import System.IO.Unsafe
import Unsafe.Coerce
import GHC.Conc (STM, unsafeIOTo... |
0180190f545bb7f3a01da37a46791085ec446c94e1d719f314d6c0a83a768dc7 | startalkIM/ejabberd | node_flat_sql.erl | %%%----------------------------------------------------------------------
File : node_flat_sql.erl
Author :
Purpose : Standard PubSub node plugin with ODBC backend
Created : 1 Dec 2007 by
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
%%%
%%% This program is free software; you ... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/node_flat_sql.erl | erlang | ----------------------------------------------------------------------
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | File : node_flat_sql.erl
Author :
Purpose : Standard PubSub node plugin with ODBC backend
Created : 1 Dec 2007 by
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version... |
423cefa131a1222ecd75614c0fcf2c07b583047a96e695e3a727a7306b52cd80 | coq/coq | ppextend.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/f66b58cc7e6a8e245b35c3858989181825c591ce/printing/ppextend.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
a6d521013ec47b9e740a46bab9eb58df32c621e7be700c3b7e80ffa251092ebf | processone/ejabberd-contrib | mod_filter.erl | %%%----------------------------------------------------------------------
%%% File : mod_filter.erl
Author : < >
%%% Purpose : flexible filtering by server policy
Created : 21 Sep 2005 by < >
%%%----------------------------------------------------------------------
-module(mod_filter).
-author('').
-be... | null | https://raw.githubusercontent.com/processone/ejabberd-contrib/037c3749f331c8783666d45157e857ef5e7df42c/mod_filter/src/mod_filter.erl | erlang | ----------------------------------------------------------------------
File : mod_filter.erl
Purpose : flexible filtering by server policy
----------------------------------------------------------------------
Return drop to drop the packet, or the original input to let it through.
From and To are jid records.
... | Author : < >
Created : 21 Sep 2005 by < >
-module(mod_filter).
-author('').
-behaviour(gen_mod).
-export([start/2, stop/1, depends/2, mod_options/1, filter_packet/1, mod_doc/0]).
-include("logger.hrl").
-include_lib("xmpp/include/xmpp.hrl").
-dialyzer({no_match, [check_stanza_type/2, check_access/1]}).... |
ef23c84a21287dbecab2cf0fd38b943df2a1270d104d37da184154c61bbb2bb0 | lasp-lang/partisan | partisan_app.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2015 Helium Systems , Inc. All Rights Reserved .
Copyright ( c ) 2016 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
excep... | null | https://raw.githubusercontent.com/lasp-lang/partisan/3bb12965f5e84e7856a1718b48dc9d644f6ab1aa/src/partisan_app.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2015 Helium Systems , Inc. All Rights Reserved .
Copyright ( c ) 2016 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , W... |
33c1bdc0b0c940377e7bc64082bc69859eaf34435881fabc5c31e571f4734f28 | gsakkas/rite | 1990.ml |
let rec myAppend l n = match l with | [] -> [n] | h::t -> h :: (myAppend t n);;
let explode s =
let rec go i =
if i >= (String.length s) then [] else (s.[i]) :: (go (i + 1)) in
go 0;;
let rec listCompare l k =
if ((List.hd l) = []) && ((List.hd k) = [])
then true
else
if (List.hd l) = (List.hd k)
... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14_min/1990.ml | ocaml |
let rec myAppend l n = match l with | [] -> [n] | h::t -> h :: (myAppend t n);;
let explode s =
let rec go i =
if i >= (String.length s) then [] else (s.[i]) :: (go (i + 1)) in
go 0;;
let rec listCompare l k =
if ((List.hd l) = []) && ((List.hd k) = [])
then true
else
if (List.hd l) = (List.hd k)
... | |
f071d336515a9cdb39a8511e94b16331e1a1c53c3c601405a31f0c56e77654c7 | cloudant-labs/couchdb-erlfdb | erlfdb_subspace.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/cloudant-labs/couchdb-erlfdb/510664facbc28c946960db2d12b3baf33923f4ea/src/erlfdb_subspace.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
-module(erlfdb_subspace).
-record(erlfdb_subspace, {
prefix
}).
-export([
create/1,
create/2,
add/2,
key/1,
pack/1,
pack/... |
c568d715c142cc6c984913515d7346dbb4fd7c944e44d1f20916909b0a5e2682 | savonet/ocaml-posix | posix_uname_types.mli | open Ctypes
* types for < sys / utsname.h >
module Def (S : Cstubs.Types.TYPE) : sig
* type for [ struct utsname ]
module Utsname : sig
type t
val t : t structure S.typ
val sysname : (char carray, t structure) S.field
val nodename : (char carray, t structure) S.field
val release : (char carra... | null | https://raw.githubusercontent.com/savonet/ocaml-posix/d46d011de16154b34324eae6ee6e7010138cf4af/posix-uname/src/types/posix_uname_types.mli | ocaml | open Ctypes
* types for < sys / utsname.h >
module Def (S : Cstubs.Types.TYPE) : sig
* type for [ struct utsname ]
module Utsname : sig
type t
val t : t structure S.typ
val sysname : (char carray, t structure) S.field
val nodename : (char carray, t structure) S.field
val release : (char carra... | |
8d974d7afd8da921c2be0652d6ab87a10ffdaa0bcfd500349af6c11cc14ab952 | codedownio/sandwich | Main.hs | # LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
# LANGUAGE CPP #
module Main where
import Control.Concurrent
import Control.Exception.Safe
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Logger (LogLevel(..))
import Data.String.Interpolate
import Data.Time.Clock
import Test.Sandwich
import T... | null | https://raw.githubusercontent.com/codedownio/sandwich/80c5244a47a29c3ec20d68afec89297e014847b9/sandwich/app/Main.hs | haskell | pending
pending
* Util | # LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
# LANGUAGE CPP #
module Main where
import Control.Concurrent
import Control.Exception.Safe
import Control.Monad
import Control.Monad.IO.Class
import Control.Monad.Logger (LogLevel(..))
import Data.String.Interpolate
import Data.Time.Clock
import Test.Sandwich
import T... |
ec2b6aefc3111621d82df386b1a3be69321c77313cf014b902b6345ccd2bcf77 | mirage/irmin | snapshot_intf.ml |
* Copyright ( c ) 2018 - 2022 Tarides < >
*
* 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... | null | https://raw.githubusercontent.com/mirage/irmin/39afb7bad3c5fbdfb22409d92a04e3f225a96cd2/src/irmin-pack/unix/snapshot_intf.ml | ocaml |
* Copyright ( c ) 2018 - 2022 Tarides < >
*
* 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... | |
11f5d4f5b363021957365949c0a092e8b92fb0a966724d8bdff25644dc9005c6 | gafiatulin/codewars | Palindrome.hs | Palindrome for your Dome
--
module Codewars.Kata.Palindrome where
import Prelude hiding (reverse)
import Data.Char (toLower, isAlphaNum)
import Control.Arrow ((&&&))
isPalindrome :: String -> Bool
isPalindrome = uncurry (==) . (id &&& reverse') . map toLower . filter isAlphaNum
where reverse' [] = []
re... | null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/6%20kyu/Palindrome.hs | haskell | Palindrome for your Dome
module Codewars.Kata.Palindrome where
import Prelude hiding (reverse)
import Data.Char (toLower, isAlphaNum)
import Control.Arrow ((&&&))
isPalindrome :: String -> Bool
isPalindrome = uncurry (==) . (id &&& reverse') . map toLower . filter isAlphaNum
where reverse' [] = []
revers... | |
7e351c52fb579ccc60a44f8b479c0937b6d35024312d1d0d26385c5b1be4369c | fission-codes/fission | Types.hs | module Fission.CLI.Parser.Command.Generate.Credentials.Types (Options (..)) where
import Fission.Prelude
data Options = CommandOnly
deriving (Show, Eq) | null | https://raw.githubusercontent.com/fission-codes/fission/849c935ff990bee16d68e6151ff120579afbced6/fission-cli/library/Fission/CLI/Parser/Command/Generate/Credentials/Types.hs | haskell | module Fission.CLI.Parser.Command.Generate.Credentials.Types (Options (..)) where
import Fission.Prelude
data Options = CommandOnly
deriving (Show, Eq) | |
60c80974028eda07e506089494393654630188d8ce6ae337b5106916e0824a56 | EMSL-NMR-EPR/Haskell-MFAPipe-Executable | Constants.hs | -----------------------------------------------------------------------------
-- |
-- Module : Language.INCA.Constants
Copyright : 2016 - 17 Pacific Northwest National Laboratory
-- License : ECL-2.0 (see the LICENSE file in the distribution)
--
-- Maintainer :
-- Stability : experimental
-- Por... | null | https://raw.githubusercontent.com/EMSL-NMR-EPR/Haskell-MFAPipe-Executable/8a7fd13202d3b6b7380af52d86e851e995a9b53e/MFAPipe/src/Language/INCA/Constants.hs | haskell | ---------------------------------------------------------------------------
|
Module : Language.INCA.Constants
License : ECL-2.0 (see the LICENSE file in the distribution)
Maintainer :
Stability : experimental
Portability : portable
-------------------------------------------------------------... | Copyright : 2016 - 17 Pacific Northwest National Laboratory
This module exports constants for the representation of INCA syntax .
module Language.INCA.Constants
cINCAFluxVarSeparator
, cINCAFluxVarExchange , cINCAFluxVarTransport
, cINCAFluxVarDirectionForwards , cINCAFluxVarDirectionBackwards
, cINCAMetabo... |
fabfb4d25a37c2fc7db75c0c06758e7169fc73b8d68ff6a53314d91f192fcff4 | MMagueta/MMaguetaGuix | install.scm | Copyright © 2019 < >
Copyright © 2019 < >
;;;
;;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;;; (at your option) any later version.
;;;
;;; Th... | null | https://raw.githubusercontent.com/MMagueta/MMaguetaGuix/0490ffc33bc7d269e2b586637a76e7fe7914fbfb/nongnu/system/install.scm | scheme |
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 Public... | Copyright © 2019 < >
Copyright © 2019 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
$ guix system disk - image nongnu / system / install.scm... |
9c778f9e46a60d5323d9b258b49078ccdf490417d65ba7aaa2e175fe26c6bb1b | Ptival/yugioh | CurseOfDragon.hs | module YuGiOh.Card.CurseOfDragon
( curseOfDragon,
)
where
import YuGiOh.Attribute
import YuGiOh.Card
import YuGiOh.Type
curseOfDragon :: Card
curseOfDragon =
Card
{ _name = "Curse of Dragon",
_attribute = Dark,
_level = 5,
_monsterType = Dragon,
_description = "A wicked dragon that t... | null | https://raw.githubusercontent.com/Ptival/yugioh/855e8f22c3ff322c7ca1d0a1fa96c50a54724aeb/lib/YuGiOh/Card/CurseOfDragon.hs | haskell | module YuGiOh.Card.CurseOfDragon
( curseOfDragon,
)
where
import YuGiOh.Attribute
import YuGiOh.Card
import YuGiOh.Type
curseOfDragon :: Card
curseOfDragon =
Card
{ _name = "Curse of Dragon",
_attribute = Dark,
_level = 5,
_monsterType = Dragon,
_description = "A wicked dragon that t... | |
4ee3633963b73826a6259bb09536a07aaabd07638edff7327157ac7b0badd9e2 | ahrefs/devkit | daemon.ml | (** daemon utilities *)
module U = ExtUnix.Specific
let log = Log.from "daemon"
let logfile = ref None
let pidfile = ref None
let runas = ref None
let foreground = ref false
let managed = ref false
* global flag indicating that process should exit ,
[ manage ] will automatically set this flag on SIGTERM unle... | null | https://raw.githubusercontent.com/ahrefs/devkit/559c2df8f6eacb091e0eac38f508c45b6567bdd8/daemon.ml | ocaml | * daemon utilities
* [should_exit_lwt] usage is discouraged.
Use [wait_exit] instead, which makes it harder to ignore "should exit" state and loop infinitely
* exception to be raised by functions that wish to signal premature termination due to [!should_exit = true]
invariant: should_exit_ = (Lwt.state should_e... |
module U = ExtUnix.Specific
let log = Log.from "daemon"
let logfile = ref None
let pidfile = ref None
let runas = ref None
let foreground = ref false
let managed = ref false
* global flag indicating that process should exit ,
[ manage ] will automatically set this flag on SIGTERM unless default signal handli... |
64a87a8efdd83616d23061838c154a1763857e120682e6bc62c783ae299823ac | Shinmera/vpetjam | strings.lisp | go-backwards-in-ui "Back"
new-game "New Game"
credits-menu "View Credits"
wishlist-cta "Check out Kandria on Steam!"
exit-game "Quit Game"
basic-seed "Basic Seed"
personal-seed "Hypo Sensoron 2"
hued-seed "Rainbow+ Infusion"
slow-seed "Kalmson Type-B"
fast-seed "Greeneron"
hat-seed "Accessory Genome"
settings-menu "Set... | null | https://raw.githubusercontent.com/Shinmera/vpetjam/6919704aecb42d3c27cb920b641da69bcc5dca66/lang/eng/strings.lisp | lisp | go-backwards-in-ui "Back"
new-game "New Game"
credits-menu "View Credits"
wishlist-cta "Check out Kandria on Steam!"
exit-game "Quit Game"
basic-seed "Basic Seed"
personal-seed "Hypo Sensoron 2"
hued-seed "Rainbow+ Infusion"
slow-seed "Kalmson Type-B"
fast-seed "Greeneron"
hat-seed "Accessory Genome"
settings-menu "Set... | |
6ae60aa2e65032f5b3fc0f2045373d81d35bf10d0437c722fcc37a8d81b914ee | bhauman/certifiable | sha.clj | (ns certifiable.sha
(:require [clojure.string :as string])
(:import [java.security MessageDigest]
[java.nio.charset StandardCharsets]))
;; taken from -digest/blob/master/src/digest.clj
(defn- signature
[^MessageDigest algorithm]
(let [size (* 2 (.getDigestLength algorithm))
sig (.toString (B... | null | https://raw.githubusercontent.com/bhauman/certifiable/ccf40e29d56dff3ce3592e6cc8fc45b40c569ea0/src/certifiable/sha.clj | clojure | taken from -digest/blob/master/src/digest.clj | (ns certifiable.sha
(:require [clojure.string :as string])
(:import [java.security MessageDigest]
[java.nio.charset StandardCharsets]))
(defn- signature
[^MessageDigest algorithm]
(let [size (* 2 (.getDigestLength algorithm))
sig (.toString (BigInteger. 1 (.digest algorithm)) 16)
pad... |
e74ff63566c6801e66b3f2a8316802c015228236594e0f9bca02a5483c3f0de8 | proglang/ldgv | PrettySyntax.hs | # OPTIONS_GHC -Wno - orphans #
# OPTIONS_GHC -Wno - incomplete - patterns #
# LANGUAGE LambdaCase #
module PrettySyntax (Pretty(), pretty, pshow) where
import Kinds
import Syntax
import ProcessEnvironment
import Data.Text.Prettyprint.Doc
import qualified Data.Set as Set
pshow :: Pretty a => a -> String
pshow x = sh... | null | https://raw.githubusercontent.com/proglang/ldgv/cabb502b81e831eece1c80ee70d520ac85e908c7/src/PrettySyntax.hs | haskell | pretty "'" <> -- seem built into the lab string
the bool indicates whether the type needs to be dualized
print as a telescope | # OPTIONS_GHC -Wno - orphans #
# OPTIONS_GHC -Wno - incomplete - patterns #
# LANGUAGE LambdaCase #
module PrettySyntax (Pretty(), pretty, pshow) where
import Kinds
import Syntax
import ProcessEnvironment
import Data.Text.Prettyprint.Doc
import qualified Data.Set as Set
pshow :: Pretty a => a -> String
pshow x = sh... |
82c4c0202522a18e287ce51ddd86e98261789a06de42b9609ba773ca7eebf2f9 | pa-ba/compdata-param | Ordering.hs | {-# LANGUAGE TemplateHaskell, FlexibleInstances, IncoherentInstances,
ScopedTypeVariables #-}
--------------------------------------------------------------------------------
-- |
Module : Data . Comp . . Multi . Derive . Ordering
Copyright : ( c ) 2011 ,
-- License : BSD3
Maintainer : ... | null | https://raw.githubusercontent.com/pa-ba/compdata-param/5d6b0afa95a27fd3233f86e5efc6e6a6080f4236/src/Data/Comp/Param/Multi/Derive/Ordering.hs | haskell | # LANGUAGE TemplateHaskell, FlexibleInstances, IncoherentInstances,
ScopedTypeVariables #
------------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
Automatically derive instances of @OrdHD@.
--------------------------------------------------... | Module : Data . Comp . . Multi . Derive . Ordering
Copyright : ( c ) 2011 ,
Maintainer : < >
Portability : non - portable ( GHC Extensions )
module Data.Comp.Param.Multi.Derive.Ordering
(
OrdHD(..),
makeOrdHD
) where
import Data.Comp.Param.Multi.FreshM hiding (Name)... |
8e99cf5f2489aca5cfaacdb70433b6d8144a2296fef78e57ad3a45364e882072 | PacktPublishing/Haskell-High-Performance-Programming | top-level.hs |
import Data.IORef
import System.IO.Unsafe (unsafePerformIO)
import Control.Concurrent.STM
globalVar :: IORef Int
globalVar = unsafePerformIO (newIORef 0)
| null | https://raw.githubusercontent.com/PacktPublishing/Haskell-High-Performance-Programming/2b1bfdb8102129be41e8d79c7e9caf12100c5556/Chapter07/top-level.hs | haskell |
import Data.IORef
import System.IO.Unsafe (unsafePerformIO)
import Control.Concurrent.STM
globalVar :: IORef Int
globalVar = unsafePerformIO (newIORef 0)
| |
60f9234e4becd2557805eeb158bd71e35e3f9f65cca1daa6e9f206d4ecac8c76 | rollacaster/sketches | particle_force.cljs | (ns sketches.nature-of-code.particle-systems.particle-force
(:require [quil.core :as q :include-macros true]
[quil.middleware :as md]
[sketches.vector :as v]))
(defn create-particle [location]
{:location location
:velocity [(- (rand 2) 1) (- (rand 2) 2)]
:acceleration [0 0.05]
:lif... | null | https://raw.githubusercontent.com/rollacaster/sketches/ba79fccf2a37139de9193ed2ea7a6cc04b63fad0/src/sketches/nature_of_code/particle_systems/particle_force.cljs | clojure | (ns sketches.nature-of-code.particle-systems.particle-force
(:require [quil.core :as q :include-macros true]
[quil.middleware :as md]
[sketches.vector :as v]))
(defn create-particle [location]
{:location location
:velocity [(- (rand 2) 1) (- (rand 2) 2)]
:acceleration [0 0.05]
:lif... | |
99d2976eea9952ffe4dc7576b67c9efba7270923c352802ad069ef87fb2202a0 | BranchTaken/Hemlock | test_hypot.ml | open! Basis.Rudiments
open! Basis
open Real
let test () =
let rec fn xys = begin
match xys with
| [] -> ()
| (x, y) :: xys' -> begin
File.Fmt.stdout
|> Fmt.fmt "x="
|> pp x
|> Fmt.fmt " y="
|> pp y
|> Fmt.fmt ": hypot="
|> pp (hypot x y)
|> ... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/real/test_hypot.ml | ocaml | open! Basis.Rudiments
open! Basis
open Real
let test () =
let rec fn xys = begin
match xys with
| [] -> ()
| (x, y) :: xys' -> begin
File.Fmt.stdout
|> Fmt.fmt "x="
|> pp x
|> Fmt.fmt " y="
|> pp y
|> Fmt.fmt ": hypot="
|> pp (hypot x y)
|> ... | |
90decafb6d6d93b96311a7d8ae16a50ad633a8ae68080a269e8e3b75ff2161a7 | ucsd-progsys/dsolve | cbv.ml | datatype lamexp with nat =
{n:nat} One(n+1)
| {n:nat} Shift(n+1) of lamexp(n)
| {n:nat | n > 0} Lam(n-1) of lamexp(n)
| {n:nat} App(n) of lamexp(n) * lamexp(n)
datatype closure = {n:nat} Clo of lamexp(n) * closure list(n)
fun evaluate (e) =
let
fun eval (One, c :: _) = c
| eval (Shift ... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/tests/POPL2008/xiog/DMLex/cbv.ml | ocaml | datatype lamexp with nat =
{n:nat} One(n+1)
| {n:nat} Shift(n+1) of lamexp(n)
| {n:nat | n > 0} Lam(n-1) of lamexp(n)
| {n:nat} App(n) of lamexp(n) * lamexp(n)
datatype closure = {n:nat} Clo of lamexp(n) * closure list(n)
fun evaluate (e) =
let
fun eval (One, c :: _) = c
| eval (Shift ... | |
8f293b53b3286f1fa924b58d0c79d554836fcbe44b08c9e5c248f968044d8f51 | ocaml-community/obus | monitor.ml |
* monitor.ml
* ----------
* Copyright : ( c ) 2008 , < >
* Licence : BSD3
*
* This file is a part of obus , an ocaml implementation of D - Bus .
* monitor.ml
* ----------
* Copyright : (c) 2008, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a part of obus, an ocaml implementatio... | null | https://raw.githubusercontent.com/ocaml-community/obus/8d38ee6750587ae6519644630b75d53a0a011acd/examples/monitor.ml | ocaml | This sample illustrate the use of threads in D-Bus + use of
filters. Filters are part of the lowlevel api.
Drop the message so we do not respond to method call |
* monitor.ml
* ----------
* Copyright : ( c ) 2008 , < >
* Licence : BSD3
*
* This file is a part of obus , an ocaml implementation of D - Bus .
* monitor.ml
* ----------
* Copyright : (c) 2008, Jeremie Dimino <>
* Licence : BSD3
*
* This file is a part of obus, an ocaml implementatio... |
9a45fec25ff5f18abc9556a58b2ab6adb7b0756dc822cbb0052537ffa664b026 | nikita-volkov/rebase | Enum.hs | module Rebase.GHC.Enum
(
module GHC.Enum
)
where
import GHC.Enum
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/GHC/Enum.hs | haskell | module Rebase.GHC.Enum
(
module GHC.Enum
)
where
import GHC.Enum
| |
742fcb4121b0e22aded7a911b4c3d8e0bb7a731ec87a2983a2d7ce2269503ef9 | mbuczko/revolt | clean.clj | (ns revolt.tasks.clean
(:require [revolt.utils :as utils]
[clojure.tools.logging :as log]))
(defn delete-files-recursively
[fname & [silently]]
(letfn [(delete-f [file]
(when (.isDirectory file)
(doseq [child-file (.listFiles file)]
(delete-f child-file)))
... | null | https://raw.githubusercontent.com/mbuczko/revolt/65ef8de68d7aa77d1ced40e7d669ebcbba8a340e/src/revolt/tasks/clean.clj | clojure | (ns revolt.tasks.clean
(:require [revolt.utils :as utils]
[clojure.tools.logging :as log]))
(defn delete-files-recursively
[fname & [silently]]
(letfn [(delete-f [file]
(when (.isDirectory file)
(doseq [child-file (.listFiles file)]
(delete-f child-file)))
... | |
cd4bb5ab628257d75d61844ff7bde61e46c3ef80a9a8a1257525e3263fac2aed | kelamg/HtDP2e-workthrough | ex378.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex378) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-... | null | https://raw.githubusercontent.com/kelamg/HtDP2e-workthrough/ec05818d8b667a3c119bea8d1d22e31e72e0a958/HtDP/Intertwined-Data/ex378.rkt | racket | about the language level of this file in a form that our tools can easily process.
data examples
[X Y] [List-of [List X Y]] X -> Y
finds the matching Y for the given X in alist | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex378) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/image)
(require 2htdp/universe)
An F... |
b4af06b173fc84daacd4c08a26d1510cda6427aac13d5e9f4d3828531a3ba2a0 | tonyg/pi-nothing | elf-hash.rkt | #lang racket/base
(provide elf-hash)
;; Per the SYSV ELF specification.
(define (elf-hash symbol-bytes)
(for/fold [(h 0)] [(b (in-bytes symbol-bytes))]
(let* ((h (bitwise-and #xffffffff (+ (arithmetic-shift h 4) b)))
(g (bitwise-and #xf0000000 h)))
(bitwise-and #xffffffff
(if... | null | https://raw.githubusercontent.com/tonyg/pi-nothing/4b2b59d42babd72cfd007cb71ed295dcdbf53d4a/nothingc/elf-hash.rkt | racket | Per the SYSV ELF specification.
--------------------------------------------------------------------------- | #lang racket/base
(provide elf-hash)
(define (elf-hash symbol-bytes)
(for/fold [(h 0)] [(b (in-bytes symbol-bytes))]
(let* ((h (bitwise-and #xffffffff (+ (arithmetic-shift h 4) b)))
(g (bitwise-and #xf0000000 h)))
(bitwise-and #xffffffff
(if (zero? g)
h... |
8abf0d86d2f68cee0582535b975cdbec043294f39762e5d86e5dfd97925ccb65 | ollef/Bidirectional | Type.hs | {-# LANGUAGE GADTs #-}
-- | Bidirectional typechecking for higher-rank polymorphism
-- Implementation of -sws.org/~neelk/bidir.pdf
module Type where
import Control.Applicative
import Control.Monad
import Data.Maybe
import Data.Monoid
import qualified Data.Set as S
import AST
import Context
import NameGen
import Pre... | null | https://raw.githubusercontent.com/ollef/Bidirectional/06b4dc4d5810446f3c9cbc9dc21a749a090c77cd/Type.hs | haskell | # LANGUAGE GADTs #
| Bidirectional typechecking for higher-rank polymorphism
Implementation of -sws.org/~neelk/bidir.pdf
| Algorithmic subtyping:
subtype Γ A B = Δ <=> Γ |- A <: B -| Δ
<:Unit
<:Exvar
<:->
<:forallR
Do alpha conversion to avoid clashes
<:forallL
Do alpha conversion to avoid clashes
<:Ins... | module Type where
import Control.Applicative
import Control.Monad
import Data.Maybe
import Data.Monoid
import qualified Data.Set as S
import AST
import Context
import NameGen
import Pretty
subtype :: Context -> Polytype -> Polytype -> NameGen Context
subtype gamma typ1 typ2 =
traceNS "subtype" (gamma, typ1, typ2) ... |
372942d61c42dc2f9f0d3217ad5e978d57794dbf7b87b8823c16aeba4e88373e | ucsd-progsys/mist | omega.hs | ----------------------------------------------------------------------------
-- | The ST Monad ----------------------------------------------------------
----------------------------------------------------------------------------
measure mNil :: List [>Int] -> Bool
measure mCons :: List [>Int] -> Bool
measure mLength... | null | https://raw.githubusercontent.com/ucsd-progsys/mist/0a9345e73dc53ff8e8adb8bed78d0e3e0cdc6af0/tests/Tests/Integration/pos/omega.hs | haskell | --------------------------------------------------------------------------
| The ST Monad ----------------------------------------------------------
--------------------------------------------------------------------------
bind as rforall a, b. forall s.
bw1:s ~> bw2:s ~> bw3:s ~>
ST <{v:s | v = bw1} >{v:s | v... |
measure mNil :: List [>Int] -> Bool
measure mCons :: List [>Int] -> Bool
measure mLength :: List [>Int] -> Int
empty as x:(List >Int) -> {v: Bool | v == mNil x}
empty = (0)
nil as {v: List >Int | (mNil v) /\ (mLength v = 0)}
nil = (0)
cons as x:Int -> xs:(List >Int) -> {v: List >Int | (mCons v) /\ (mLength v = mLen... |
edeff6305a7f55608e8835ddfe3e2d28bf12d98939a721cf2522f108211c99cb | brownplt/LambdaS5 | convert_assignment_test.ml | open Prelude
open Util
open OUnit2
open Ljs_convert_assignment
let suite =
let cmp before after = cmp before convert_assignment after in
let no_change code = no_change code convert_assignment in
"Test Less Mutation" >:::
[
"transform SetBang to Let" >::
(cmp
"x := 2; let (y = x) y"
"let ... | null | https://raw.githubusercontent.com/brownplt/LambdaS5/f0bf5c7baf1daa4ead4e398ba7d430bedb7de9cf/src/optimization/test/convert_assignment_test.ml | ocaml | todo setbang and recursive function
a in b's scope is the top-level a | open Prelude
open Util
open OUnit2
open Ljs_convert_assignment
let suite =
let cmp before after = cmp before convert_assignment after in
let no_change code = no_change code convert_assignment in
"Test Less Mutation" >:::
[
"transform SetBang to Let" >::
(cmp
"x := 2; let (y = x) y"
"let ... |
af3a6ae08aa9a7d3032ab9aef0f6273518f41d56d915675c61b020f089fb3ebd | HunterYIboHu/htdp2-solution | ex98-answer.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex98-answer) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "univer... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter1/Section6/ex98-answer.rkt | racket | about the language level of this file in a form that our tools can easily process.
physical constants
graphical constants
A UFO is Posn
interpreattion (make-posn x y) is the UFO's current location
examples:
A Tank is (make-tank Number Number)
interpretation (make-tank x dx) means the tank is at position
(x, TA... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex98-answer) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t write repeating-decimal #f #t none ... |
60114bae7dbaa6792163aaff46e155d270af88100e5d15738112d9b140e94923 | Ferada/cl-mock | package.lisp | -*- mode : lisp ; syntax : common - lisp ; coding : utf-8 - unix ; package : cl - user ; -*-
(in-package #:cl-user)
(defpackage #:cl-mock
(:use #:closer-common-lisp #:alexandria)
(:export
;; regular functions
#:maybe-fdefinition
#:set-fdefinition
#:set-or-unbind-fdefinition
#:call-with-function-... | null | https://raw.githubusercontent.com/Ferada/cl-mock/714a4122970d836e65a5a33f6bf6c6d99116325c/src/package.lisp | lisp | syntax : common - lisp ; coding : utf-8 - unix ; package : cl - user ; -*-
regular functions
mocking of regular functions
mocking of generic functions |
(in-package #:cl-user)
(defpackage #:cl-mock
(:use #:closer-common-lisp #:alexandria)
(:export
#:maybe-fdefinition
#:set-fdefinition
#:set-or-unbind-fdefinition
#:call-with-function-bindings
#:progf
#:dflet
#:*previous*
#:*arguments*
#:call-previous
#:register-mock
#:invocation... |
543649be8a675a453831c1796d4638125460d57d31370061064ac839f9b8f3fe | malyn/lein-whimrepl | whimrepl.clj | (ns leiningen.whimrepl
"Start a repl session in a Vim-targetable server."
(:import (com.michaelalynmiller.jnaplatext.win32 CmdExeTyper ProcessUtils)
(com.michaelalynmiller.vimserver IVimDataHandler VimServer))
(:require [leiningen.repl :as lein.repl]
[whimrepl.version]))
List of ' repl ... | null | https://raw.githubusercontent.com/malyn/lein-whimrepl/69d69f6bc260a1d1f44d69a8a8f84f593ed7a1ae/src/leiningen/whimrepl.clj | clojure | (ns leiningen.whimrepl
"Start a repl session in a Vim-targetable server."
(:import (com.michaelalynmiller.jnaplatext.win32 CmdExeTyper ProcessUtils)
(com.michaelalynmiller.vimserver IVimDataHandler VimServer))
(:require [leiningen.repl :as lein.repl]
[whimrepl.version]))
List of ' repl ... | |
dd66b30a03695e896be9055864f5aa14790ea24a299839a48da69a991a36c8af | hercules-ci/hercules-ci-agent | Vector.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - unused - matches #
-- | @std::vector@
--
Original author
module Hercules.CNix.Std.Vector
( stdVectorCtx,
instanceStdVector,
i... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/ff5ab7f4db65a339849d91120c6028a5d2f13e34/hercules-ci-cnix-store/src/Hercules/CNix/Std/Vector.hs | haskell | # LANGUAGE OverloadedStrings #
| @std::vector@
| Helper for defining templated instances | # LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fno - warn - unused - matches #
Original author
module Hercules.CNix.Std.Vector
( stdVectorCtx,
instanceStdVector,
instanceStdVectorCopyable,
CStdVector,
StdVector (... |
008f26e74d93dee9afe9b29a1295936fd3a35ead2428f6879de3c1ee0a77bacd | adventuring/tootsville.net | messaging.lisp | ;;;; -*- lisp -*-
;;;
src / messaging.lisp is part of
;;;
Copyright © 2008 - 2017 Bruce - Robert Pocock ; © 2018 - 2021 The
Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) .
;;;
This program is Free Software : you can redistribute it and/or
modify it under the ... | null | https://raw.githubusercontent.com/adventuring/tootsville.net/985c11a91dd1a21b77d7378362d86cf1c031b22c/src/messaging.lisp | lisp | -*- lisp -*-
© 2018 - 2021 The
either version 3 of
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 Public License for more det... | src / messaging.lisp is part of
Corporation for Inter - World Tourism and Adventuring ( ciwta.org ) .
This program is Free Software : you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
the License , or ( at your option ) any later version .
You s... |
e35debdde6b1a971b14f0e9cbf77487803e9d0358d9af5d0e469b854574fed3a | mikeball/foundation | foundation_test.clj | (ns taoclj.foundation-test
(:require [clojure.test :refer :all]
[taoclj.foundation :refer :all]
[taoclj.foundation.tests-config :refer [tests-db]]
[taoclj.foundation.execution :refer [execute]]))
(deftest can-connect
(is (= (with-open [cnx (.getConnection tests-db)]
... | null | https://raw.githubusercontent.com/mikeball/foundation/a0376f49759b1552f2f70e7585029b592b6fb346/test/taoclj/foundation_test.clj | clojure | nil may be bad choice for result on nothing found.
nil may be bad choice for result on nothing found.
qry-> returns false on errors
********** Select Tests ***********************
(run-tests *ns*)
(run-tests 'taoclj.foundation-test)
(trx-> datasource
(insert :user-roles (with-rs 1 {:user-id (first rs)
... | (ns taoclj.foundation-test
(:require [clojure.test :refer :all]
[taoclj.foundation :refer :all]
[taoclj.foundation.tests-config :refer [tests-db]]
[taoclj.foundation.execution :refer [execute]]))
(deftest can-connect
(is (= (with-open [cnx (.getConnection tests-db)]
... |
cfde3bc8e0f029ae47ef7c9514549608730e16186e79d8971dd4be551917b460 | imrehg/ypsilon | color.scm | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon pango color)
(export pango_color_copy
pango_color_free
pango_color_get_type
pango_color_parse
pang... | null | https://raw.githubusercontent.com/imrehg/ypsilon/e57a06ef5c66c1a88905b2be2fa791fa29848514/sitelib/ypsilon/pango/color.scm | scheme | PangoColor* pango_color_copy (const PangoColor* src)
void pango_color_free (PangoColor* color)
gboolean pango_color_parse (PangoColor* color, const char* spec)
gchar* pango_color_to_string(const PangoColor* color)
[end] | #!nobacktrace
Ypsilon Scheme System
Copyright ( c ) 2004 - 2009 Y.FUJITA / LittleWing Company Limited .
See license.txt for terms and conditions of use .
(library (ypsilon pango color)
(export pango_color_copy
pango_color_free
pango_color_get_type
pango_color_parse
pang... |
35bfeaff7ce6c445574587d75bd1ad3f319a80889d3e64bd14338f74ac863d6e | FlowForwarding/loom | simple_ne_logic.erl | %%------------------------------------------------------------------------------
Copyright 2014 FlowForwarding.org
%%
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
%%... | null | https://raw.githubusercontent.com/FlowForwarding/loom/86a9c5aa8b7d4776062365716c9a3dbbf3330bc5/simple_ne/apps/simple_ne/src/simple_ne_logic.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, eithe... | Copyright 2014 FlowForwarding.org
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author Erlang Solutions Ltd. < >
2014 FlowForwarding.org
Simple Network executive logic .
-module(simple_ne_logic).
-behaviour(g... |
987c036bed6b75f87adea296e1382601db4883c74744acc9cf9544e41999d8d8 | rescript-association/genType | ext_bytes.mli | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/rescript-association/genType/c44251e969fb10d27a38d2bdeff6a5f4d778594f/src/compiler-libs-406/ext_bytes.mli | ocaml | * Port the {!Bytes.escaped} from trunk to make it not locale sensitive | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
c7055f391fdce4c6a4c3dd3b14a4ac0f835ddb87edfccc8c8665fc125f63be09 | haskell/process | Common.hs | # LANGUAGE CPP #
# LANGUAGE RecordWildCards #
module System.Process.Common
( CreateProcess (..)
, CmdSpec (..)
, StdStream (..)
, ProcessHandle(..)
, ProcessHandle__(..)
, ProcRetHandles (..)
, withFilePathException
, PHANDLE
, GroupID
, UserID
, modifyProcessHandle
, wit... | null | https://raw.githubusercontent.com/haskell/process/e8fb187e793a6d47b34766c4a6b30c20c45e2a00/System/Process/Common.hs | haskell | Define some missing types for Windows compatibility. Note that these values
will never actually be used, as the setuid/setgid system calls are not
^ Optional path to the working directory for the new process
^ Optional environment (otherwise inherit from the current process)
^ How to determine stdout
^ How to det... | # LANGUAGE CPP #
# LANGUAGE RecordWildCards #
module System.Process.Common
( CreateProcess (..)
, CmdSpec (..)
, StdStream (..)
, ProcessHandle(..)
, ProcessHandle__(..)
, ProcRetHandles (..)
, withFilePathException
, PHANDLE
, GroupID
, UserID
, modifyProcessHandle
, wit... |
5b7c42b2faad8efeb1c18ca3c3ab698eb260c746308db2e8d39ea17626a4e592 | Haskell-Things/ImplicitCAD | ArgParser.hs | {- ORMOLU_DISABLE -}
Implicit CAD . Copyright ( C ) 2011 , ( )
Copyright ( C ) 2016 , ( )
-- Released under the GNU AGPLV3+, see LICENSE
-- FIXME: why is this required?
# LANGUAGE ScopedTypeVariables #
-- Allow us to use string literals for Text
{-# LANGUAGE OverloadedStrings #-}
module Graphics.Implicit.E... | null | https://raw.githubusercontent.com/Haskell-Things/ImplicitCAD/87f2aee4b3c958d11e988022f512d065b812f6b0/Graphics/Implicit/ExtOpenScad/Util/ArgParser.hs | haskell | ORMOLU_DISABLE
Released under the GNU AGPLV3+, see LICENSE
FIXME: why is this required?
Allow us to use string literals for Text
# LANGUAGE OverloadedStrings #
** argument and combinators
| Builds an argparser for the type that is expected from it.
FIXME: make a version of this that accepts multiple symbol na... | Implicit CAD . Copyright ( C ) 2011 , ( )
Copyright ( C ) 2016 , ( )
# LANGUAGE ScopedTypeVariables #
module Graphics.Implicit.ExtOpenScad.Util.ArgParser (argument, doc, defaultTo, example, test, eulerCharacteristic, argMap) where
imported twice , once qualified . null from Data . Map conflicts with nul... |
40e2265bd99ddae28b04100879fe74aae74d513124c8dc6f67631bf088a5d255 | camsaul/toucan2 | select.clj | (ns toucan2.select
"Implementation of [[select]] and variations.
The args spec used by [[select]] lives in [[toucan2.query]], specifically `:toucan2.query/default-args`.
Code for building Honey SQL for a SELECT lives in [[toucan2.map-backend.honeysql2]].
### Functions that return primary keys
Functions th... | null | https://raw.githubusercontent.com/camsaul/toucan2/ac4bf71dc5ae34207d08197ec269af5043a657a1/src/toucan2/select.clj | clojure | A model with a compound primary key, [:id :name]
=>
=>
models with compound primary keys (i.e., more
models with compound primary keys (i.e., more | (ns toucan2.select
"Implementation of [[select]] and variations.
The args spec used by [[select]] lives in [[toucan2.query]], specifically `:toucan2.query/default-args`.
Code for building Honey SQL for a SELECT lives in [[toucan2.map-backend.honeysql2]].
### Functions that return primary keys
Functions th... |
3dc96dfee632f5b64a6e3405ee9ea0ed5219b5e3c094cfcf45485cf785b9a97e | VisionsGlobalEmpowerment/webchange | views.cljs | (ns webchange.admin.pages.class-profile.views
(:require
[re-frame.core :as re-frame]
[webchange.admin.pages.class-profile.state :as state]
[webchange.admin.pages.class-profile.course-assign.views :refer [assign-class-course]]
[webchange.admin.pages.class-profile.students-add.views :refer [class-studen... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/2b14cfa0b116034312a382763e6aebd67e2f25a7/src/cljs/webchange/admin/pages/class_profile/views.cljs | clojure | (ns webchange.admin.pages.class-profile.views
(:require
[re-frame.core :as re-frame]
[webchange.admin.pages.class-profile.state :as state]
[webchange.admin.pages.class-profile.course-assign.views :refer [assign-class-course]]
[webchange.admin.pages.class-profile.students-add.views :refer [class-studen... | |
9fd360666b7da7bc8dfeb8c3a2b600e9158f429ac3e8c1f010c35232674d95f5 | stabilized/clojurescript | closure.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/stabilized/clojurescript/f38f141525576b2a89cde190f25f9cf2fc4c418a/src/clj/cljs/closure.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns cljs.closure
"Compile ClojureScript to JavaScript with optimizations from Google
Closure Compiler producing runnable JavaScript.
The Closure Compiler (compiler.jar) must be on the classpath.
Use the 'build' function for end-to-end compilation.
build = ... |
5c86a5ca4723063b61a3a944c9bf2aaa8cf18728f6fa33a9615c7491b6094514 | amosr/folderol | Conduit.hs | module Bench.Append2.Conduit where
import Bench.Plumbing.Conduit
import qualified Data.Conduit as C
runAppend2 :: FilePath -> FilePath -> FilePath -> IO Int
runAppend2 in1 in2 out =
C.runConduit (sources C..| sinks)
where
sources = sourceFile in1 >> sourceFile in2
sinks = do
(i,_) <- C.fuseBoth (countin... | null | https://raw.githubusercontent.com/amosr/folderol/9b8c0cd30cfb798dadaa404cc66404765b1fc4fe/bench/Bench/Append2/Conduit.hs | haskell | module Bench.Append2.Conduit where
import Bench.Plumbing.Conduit
import qualified Data.Conduit as C
runAppend2 :: FilePath -> FilePath -> FilePath -> IO Int
runAppend2 in1 in2 out =
C.runConduit (sources C..| sinks)
where
sources = sourceFile in1 >> sourceFile in2
sinks = do
(i,_) <- C.fuseBoth (countin... | |
e9474a2cfba18bf6f9cbdeea324a234b77a3d55ff189fd69c83f518410eaaa39 | ejgallego/coq-serapi | ser_proof_bullet.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * INRIA , CNRS and contributors - Copyright 1999 - 2018
(* <O___,, * (see CREDITS file for the list of authors) *)
\VV/ * * * *... | null | https://raw.githubusercontent.com/ejgallego/coq-serapi/61d2a5c092c1918312b8a92f43a374639d1786f9/serlib/ser_proof_bullet.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
<O___,, * (see CREDITS file for the list of authors)
// * This file is distributed under the terms of the
* (see LICENSE file for... | v * INRIA , CNRS and contributors - Copyright 1999 - 2018
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser General Public License Version 2.1
Copyright 2016 - 2018 MINES ParisT... |
1b635e94e2b825ff6b8546f0dfac7bfd9724169d95bcbc96f6f74527f95f1ba7 | OCamlPro/ezjs | ezjs_tyxml.ml | This file is part of Learn - OCaml .
*
* Copyright ( C ) 2015 OCamlPro : , .
* Copyright ( C ) 2012 , ( for the ' Manip ' module )
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as published by
* the... | null | https://raw.githubusercontent.com/OCamlPro/ezjs/5e9ce77f1fc0efbb13f649f03d8d4f982f21b6d1/libs/utils/ezjs_tyxml.ml | ocaml | let loc = Js.Unsafe.variable "location"
let is_hidden div =
div##style##display = string "none"
For workers... | This file is part of Learn - OCaml .
*
* Copyright ( C ) 2015 OCamlPro : , .
* Copyright ( C ) 2012 , ( for the ' Manip ' module )
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as published by
* the... |
a50ab3158a7974c8941305e453df2aa8754d7cba9d221a9686045cb70a5e85a1 | jeapostrophe/exp | foo-stx.rkt | #lang racket/base
(require syntax/parse
(for-template racket/base))
(struct method (id)
#:property prop:procedure
(λ (m stx)
(with-syntax ([m-id (method-id m)])
(syntax-parse
stx
[f:id
; XXX keywords
(syntax/loc stx (λ ... | null | https://raw.githubusercontent.com/jeapostrophe/exp/43615110fd0439d2ef940c42629fcdc054c370f9/foo/foo-stx.rkt | racket | XXX keywords | #lang racket/base
(require syntax/parse
(for-template racket/base))
(struct method (id)
#:property prop:procedure
(λ (m stx)
(with-syntax ([m-id (method-id m)])
(syntax-parse
stx
[f:id
(syntax/loc stx (λ (obj . args) (apply obj m-id ... |
433f644fb66636868484e38dd3f2826b4fa0577d7e8d3e0346f09e4f6e4ef783 | bakul/s9fes | mean.scm | Scheme 9 from Empty Space , Function Library
By , 2015
; Placed in the Public Domain
;
; (mean list) ==> real
;
; (load-from-library "mean.scm")
;
; Mean (average) function, returns the arithmetic mean value of a
; list of reals.
;
Example : ( mean ' ( 1 2 3 4 5 6 ) ) = = > 3.5
(define (mean set)
(... | null | https://raw.githubusercontent.com/bakul/s9fes/74c14c0db5f07f5bc6d94131e9e4ee15a29275aa/lib/mean.scm | scheme | Placed in the Public Domain
(mean list) ==> real
(load-from-library "mean.scm")
Mean (average) function, returns the arithmetic mean value of a
list of reals.
| Scheme 9 from Empty Space , Function Library
By , 2015
Example : ( mean ' ( 1 2 3 4 5 6 ) ) = = > 3.5
(define (mean set)
(/ (apply + set) (length set)))
|
e3524c73c3513b123d27d988c71e3ce8ed988919e9b6d54b56e8db79ce49bcdf | lukexi/halive | TestCompileExpr.hs | {-# LANGUAGE OverloadedStrings #-}
import Control.Concurrent.STM
import Halive
main :: IO ()
main = do
ghc <- startGHC defaultGHCSessionConfig
resultChan <- compileExpression ghc
"main = print 123456789"
"main"
result <- atomically (readTChan resultChan)
putStrLn "Got result:"
pri... | null | https://raw.githubusercontent.com/lukexi/halive/cae5b327730bcea5ef25bb05e5a12a283eade97d/test/TestCompileExpr.hs | haskell | # LANGUAGE OverloadedStrings # | import Control.Concurrent.STM
import Halive
main :: IO ()
main = do
ghc <- startGHC defaultGHCSessionConfig
resultChan <- compileExpression ghc
"main = print 123456789"
"main"
result <- atomically (readTChan resultChan)
putStrLn "Got result:"
print result
|
a3629e4823cc6c59e5bf477486cda92373d072be1f349c6d43c8e2813b09053c | daveliepmann/vdquil | figure1.clj | , Chapter 4 ( Time Series ) , figure 1 :
One set of points over time
Converted from Processing to Quil as an exercise by
(ns vdquil.chapter4.figure1
(:use [quil.core]
[vdquil.util]
[vdquil.chapter4.ch4data]))
(def year-min (apply min (map first (rest milk-tea-coffee-data))))
(def year... | null | https://raw.githubusercontent.com/daveliepmann/vdquil/f40788ff7634870a9a5f1dc4ca3df8543beaf00b/src/vdquil/chapter4/figure1.clj | clojure | , Chapter 4 ( Time Series ) , figure 1 :
One set of points over time
Converted from Processing to Quil as an exercise by
(ns vdquil.chapter4.figure1
(:use [quil.core]
[vdquil.util]
[vdquil.chapter4.ch4data]))
(def year-min (apply min (map first (rest milk-tea-coffee-data))))
(def year... | |
cc91279d2eb3f4fb91f23079ef970ecd5a0f13caacda207e889808b9d2220bfc | CIFASIS/QuickFuzz | Utils.hs | module Utils
( module Utils.Generation
, module Utils.Patch
, module Utils.Console
, module Utils.Shrink
, module Utils.Unique
) where
import Utils.Generation
import Utils.Decoding
import Utils.Mutation
import Utils.Patch
import Utils.Console
import Utils.Shrink
import Utils.Unique
| null | https://raw.githubusercontent.com/CIFASIS/QuickFuzz/a1c69f028b0960c002cb83e8145f039ecc0e0a23/app/Utils.hs | haskell | module Utils
( module Utils.Generation
, module Utils.Patch
, module Utils.Console
, module Utils.Shrink
, module Utils.Unique
) where
import Utils.Generation
import Utils.Decoding
import Utils.Mutation
import Utils.Patch
import Utils.Console
import Utils.Shrink
import Utils.Unique
| |
80897302e2fac3e611eeb8277b31ff57304a047bd55c55fb78530ae7770cb381 | NoRedInk/haskell-libraries | Settings.hs | module Kafka.Worker.Settings
( Settings (..),
decoder,
MaxMsgsPerSecondPerPartition (..),
MaxMsgsPerPartitionBufferedLocally (..),
MaxPollIntervalMs (..),
SkipOrNot (..),
)
where
import qualified Environment
import qualified Kafka.Consumer as Consumer
import qualified Kafka.Settings.Internal as... | null | https://raw.githubusercontent.com/NoRedInk/haskell-libraries/fd3482318d0ae7e54ad753b473aef24951de7d2f/nri-kafka/src/Kafka/Worker/Settings.hs | haskell | | Settings required to process kafka messages
| broker addresses. See hw-kafka's documentation for more info
| Provides backpressure from message-workers to the queue-reader worker.
Ensures that the thread responsible for pulling messages off of kafka
doesn't race ahead / steal resources from the threads executing... | module Kafka.Worker.Settings
( Settings (..),
decoder,
MaxMsgsPerSecondPerPartition (..),
MaxMsgsPerPartitionBufferedLocally (..),
MaxPollIntervalMs (..),
SkipOrNot (..),
)
where
import qualified Environment
import qualified Kafka.Consumer as Consumer
import qualified Kafka.Settings.Internal as... |
176b57bcae17d6b603096260d3b6aa3e91f488ba3871d5a44f6a9dc8795d7b35 | ndmitchell/rattle | Shared.hs |
module Development.Rattle.Shared(
Shared, withShared,
getSpeculate, setSpeculate,
getFile, setFile,
getCmdTraces, addCmdTrace,
nextRun, lastRun,
dump
) where
import General.Extra
import Development.Rattle.Types
import Development.Rattle.Hash
import General.FileName
import System.Directory.... | null | https://raw.githubusercontent.com/ndmitchell/rattle/f1f10504ef175dd005c8affdddfc1fb615c040f2/src/Development/Rattle/Shared.hs | haskell | -------------------------------------------------------------------
PRIMITIVES
-------------------------------------------------------------------
SPECIAL SUPPORT FOR FILES
-------------------------------------------------------------------
TYPE SAFE WRAPPERS
Intermediate data type which puts spaces in the right pl... |
module Development.Rattle.Shared(
Shared, withShared,
getSpeculate, setSpeculate,
getFile, setFile,
getCmdTraces, addCmdTrace,
nextRun, lastRun,
dump
) where
import General.Extra
import Development.Rattle.Types
import Development.Rattle.Hash
import General.FileName
import System.Directory.... |
1569cd64314849426591533bf902960bbf36d56488dd6a60b4a35c8bf07b7c6c | danlentz/clj-uuid | util.clj | (ns clj-uuid.util
(:import (java.util UUID)))
(defn indexed
"Returns a lazy sequence of [index, item] pairs, where items come
from 's' and indexes count up from zero.
(indexed '(a b c d)) => ([0 a] [1 b] [2 c] [3 d])"
[s]
;; (map vector (iterate inc 0) s))
(map #(clojure.lang.MapEntry. %1 %2) (range... | null | https://raw.githubusercontent.com/danlentz/clj-uuid/5cbd2662dd3fce90ec0b8354e794ca6a1b5ce44c/src/clj_uuid/util.clj | clojure | (map vector (iterate inc 0) s))
Conditional Compilation
Timing and Performance Metric
Debugging
IO
Condition Handling
| (ns clj-uuid.util
(:import (java.util UUID)))
(defn indexed
"Returns a lazy sequence of [index, item] pairs, where items come
from 's' and indexes count up from zero.
(indexed '(a b c d)) => ([0 a] [1 b] [2 c] [3 d])"
[s]
(map #(clojure.lang.MapEntry. %1 %2) (range) s))
PROG1 but with more idiomat... |
c5dc0b5fa9abe216825d9a4a726462a4a188420aa071139c28068b0e499c2bd2 | chef/chef-server | bksw_conf.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
%% ex: ts=4 sw=4 et
@author < >
Copyright Chef Software , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance... | null | https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/bookshelf/src/bksw_conf.erl | erlang | ex: ts=4 sw=4 et
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
API
Export... | -*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*-
@author < >
Copyright Chef Software , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is ... |
0250269376d36b97663e3e9eb885522fd2ed4abd8444ed6795aee6545d9d2246 | ninenines/cowboy | upload_h.erl | %% Feel free to use, reuse and abuse the code in this file.
%% @doc Upload handler.
-module(upload_h).
-export([init/2]).
init(Req, Opts) ->
{ok, Headers, Req2} = cowboy_req:read_part(Req),
{ok, Data, Req3} = cowboy_req:read_part_body(Req2),
{file, <<"inputfile">>, Filename, ContentType}
= cow_multipart:form_da... | null | https://raw.githubusercontent.com/ninenines/cowboy/8795233c57f1f472781a22ffbf186ce38cc5b049/examples/upload/src/upload_h.erl | erlang | Feel free to use, reuse and abuse the code in this file.
@doc Upload handler. |
-module(upload_h).
-export([init/2]).
init(Req, Opts) ->
{ok, Headers, Req2} = cowboy_req:read_part(Req),
{ok, Data, Req3} = cowboy_req:read_part_body(Req2),
{file, <<"inputfile">>, Filename, ContentType}
= cow_multipart:form_data(Headers),
io:format("Received file ~p of content-type ~p as follow:~n~p~n~n",
... |
67e004992bb567d785f971431edfa11270cbf015dc902fd05246389cdb453553 | basho/basho_bench | basho_bench_driver_shortcut.erl | %% -------------------------------------------------------------------
%%
%% basho_bench: Benchmarking Suite
%%
Copyright ( c ) 2009 - 2012 Basho Techonologies
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License... | null | https://raw.githubusercontent.com/basho/basho_bench/aa66398bb6a91645dbb97e91a236f3cdcd1f188f/src/basho_bench_driver_shortcut.erl | erlang | -------------------------------------------------------------------
basho_bench: Benchmarking Suite
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
spe... | Copyright ( c ) 2009 - 2012 Basho Techonologies
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(basho_bench_driver_shor... |
85f8d6d8593b134e472451a1d955bfdb6edc3fd1effd900713a43c618e03a01f | borodust/claw | packages.lisp | (cl:defpackage :iffi
(:use :cl :alexandria)
(:export #:*allocator*
#:*allocator-expander*
#:*extricator*
#:*extricator-expander*
#:defifun
#:defitype
#:defirecord
#:defistruct
#:defiunion
#:deficlass
#:i... | null | https://raw.githubusercontent.com/borodust/claw/213ebd94c48019c62c9bf130566ec06d7ad1675a/src/iffi/packages.lisp | lisp | (cl:defpackage :iffi
(:use :cl :alexandria)
(:export #:*allocator*
#:*allocator-expander*
#:*extricator*
#:*extricator-expander*
#:defifun
#:defitype
#:defirecord
#:defistruct
#:defiunion
#:deficlass
#:i... | |
4bf0d317d27be87abfe72b2c637130cbad53d23fd1c27119fda81a5735f17293 | angavrilov/ecl-compute | thread-core.lisp | ;;; -*- mode:lisp; indent-tabs-mode: nil; -*-
(in-package fast-compute)
#+linux
(progn
(ffi:clines "#include <unistd.h>")
(defun get-cpu-count ()
(max 1
(ffi:c-inline () () :int
"sysconf(_SC_NPROCESSORS_ONLN)"
:one-liner t)))
(ffi:clines "#include <sched.h>")
(ffi:clines "... | null | https://raw.githubusercontent.com/angavrilov/ecl-compute/466f0d287f8b6ab0e2b5c2ac03693ad4f4df6a3f/thread-core.lisp | lisp | -*- mode:lisp; indent-tabs-mode: nil; -*-
Transfer errors from worker threads if we succeeded |
(in-package fast-compute)
#+linux
(progn
(ffi:clines "#include <unistd.h>")
(defun get-cpu-count ()
(max 1
(ffi:c-inline () () :int
"sysconf(_SC_NPROCESSORS_ONLN)"
:one-liner t)))
(ffi:clines "#include <sched.h>")
(ffi:clines "#include <errno.h>")
(ffi:clines "#include <... |
f856957441871deee90564aa8a3f75df7b32098cb5c46b17cc7d98a2bc6b4e18 | nasa/Common-Metadata-Repository | project.clj | (defn get-banner
[]
(try
(str
(slurp "resources/text/banner.txt"))
;(slurp "resources/text/loading.txt")
;; If another project can't find the banner, just skip it.
(catch Exception _ "")))
(defn get-prompt
[ns]
(str "\u001B[35m[\u001B[34m"
ns
"\u001B[35m]\u001B[33m λ\u001... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/63001cf021d32d61030b1dcadd8b253e4a221662/other/cmr-exchange/http-kit-support/project.clj | clojure | (slurp "resources/text/loading.txt")
If another project can't find the banner, just skip it.
The following pull required deps that have been either been
explicitly or implicitly excluded above due to CVEs and need
Dev & Testing Aliases
["eastwood"]
Build tasks
Installing
Publishing | (defn get-banner
[]
(try
(str
(slurp "resources/text/banner.txt"))
(catch Exception _ "")))
(defn get-prompt
[ns]
(str "\u001B[35m[\u001B[34m"
ns
"\u001B[35m]\u001B[33m λ\u001B[m=> "))
(defproject gov.nasa.earthdata/cmr-http-kit "0.2.0"
:description "Utilities, wrappers, middlew... |
cc973826ca8f461784465531ac7c3f6e1f165bcf2c20376dbcd511e24336c256 | exoscale/clojure-kubernetes-client | v1alpha1_runtime_class.clj | (ns clojure-kubernetes-client.specs.v1alpha1-runtime-class
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.v1alpha1-runtime-class-spec :refer :all]
)
(:imp... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1alpha1_runtime_class.clj | clojure | (ns clojure-kubernetes-client.specs.v1alpha1-runtime-class
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-object-meta :refer :all]
[clojure-kubernetes-client.specs.v1alpha1-runtime-class-spec :refer :all]
)
(:imp... | |
267205e93c4bce43f86f632d22d9dbb013607b812bdc59e878ae4c197357512c | dvv/stable | cowboy_resource.erl | %%% ----------------------------------------------------------------------------
%%%
@doc for a HTTP resource .
%%%
%%% ----------------------------------------------------------------------------
-module(cowboy_resource).
-author('Vladimir Dronnikov <>').
-behaviour(cowboy_sub_protocol).
-export([
upgrade/4
... | null | https://raw.githubusercontent.com/dvv/stable/4897e4abeec7d3c0cc65f7cfe1e5586c428babc7/src/cowboy_resource.erl | erlang | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
-behaviour(cowboy_rest_handler).
resource_available/2,
malformed_request/2,
options/2,
getters
setters
enable CORS
extract request info
distinguish webso... | @doc for a HTTP resource .
-module(cowboy_resource).
-author('Vladimir Dronnikov <>').
-behaviour(cowboy_sub_protocol).
-export([
upgrade/4
]).
-export([
rest_init/2,
rest_terminate/3,
allowed_methods/2,
is_authorized/2,
forbidden/2,
resource_exists/2,
content_types_accepted/2,
... |
bfc54b739bcad16171a210a7c18482bb1f65bb4ef630a8102e95648a7f722226 | webyrd/normalization-by-evaluation | nbe.scm | (load "../faster-miniKanren/mk-vicare.scm")
(load "../faster-miniKanren/mk.scm")
(load "../faster-miniKanren/test-check.scm")
(define lookupo
(lambda (x env val)
(fresh (y v env^)
(== `((,y . ,v) . ,env^) env)
(symbolo x)
(symbolo y)
(conde
((== x y) (== v val))
((=/= x y)... | null | https://raw.githubusercontent.com/webyrd/normalization-by-evaluation/07e56763d67cfd8e84d4252a6a4d80b04cde1373/miniKanren-version/naive/nbe.scm | scheme | Rather than compute a renamed variable, we just describe the constraints.
=> | (load "../faster-miniKanren/mk-vicare.scm")
(load "../faster-miniKanren/mk.scm")
(load "../faster-miniKanren/test-check.scm")
(define lookupo
(lambda (x env val)
(fresh (y v env^)
(== `((,y . ,v) . ,env^) env)
(symbolo x)
(symbolo y)
(conde
((== x y) (== v val))
((=/= x y)... |
10cd8989e0a3925387fac3dda9d94afe3b6dce6e72bcb01a6350533441048b51 | 1Jajen1/Brokkr | Utils.hs | {-# LANGUAGE ImpredicativeTypes #-}
module Network.Utils (
encodePackets
) where
import qualified Data.ByteString as BS
import Network.Effect.Packet (toStrictSizePrefixedByteString)
import qualified Mason.Builder as B
encodePackets :: [[B.Builder]] -> [BS.ByteString]
encodePackets toSend = foldMap (\x -> toStrictSi... | null | https://raw.githubusercontent.com/1Jajen1/Brokkr/fe56efaf450f29a5571cc34fa01f7301678f3eaf/test/Network/Utils.hs | haskell | # LANGUAGE ImpredicativeTypes # | module Network.Utils (
encodePackets
) where
import qualified Data.ByteString as BS
import Network.Effect.Packet (toStrictSizePrefixedByteString)
import qualified Mason.Builder as B
encodePackets :: [[B.Builder]] -> [BS.ByteString]
encodePackets toSend = foldMap (\x -> toStrictSizePrefixedByteString 128 x) <$> toSe... |
99f02b1921bb81e6ea558ba1b5e6c467ca4d1e119468d51f7c66a8f4a85d2215 | polymeris/cljs-aws | direct_connect.cljs | (ns cljs-aws.direct-connect
(:require [cljs-aws.base.requests])
(:require-macros [cljs-aws.base.service :refer [defservice]]))
(defservice "DirectConnect" "directconnect-2012-10-25.min.json")
| null | https://raw.githubusercontent.com/polymeris/cljs-aws/3326e7c4db4dfc36dcb80770610c14c8a7fd0d66/src/cljs_aws/direct_connect.cljs | clojure | (ns cljs-aws.direct-connect
(:require [cljs-aws.base.requests])
(:require-macros [cljs-aws.base.service :refer [defservice]]))
(defservice "DirectConnect" "directconnect-2012-10-25.min.json")
| |
944c38956fea031d64994c106e358900457c2f9d8076dba51ab1335d76e0407a | kmi/irs | emergency-gis-domain.lisp | Mode : Lisp ; Package :
File created in WebOnto
(in-package "OCML")
(in-ontology emergency-gis-domain)
;; method
(def-class method ())
(def-instance getRestCentresInRadius method)
(def-instance getHotelsInRadius method)
(def-instance getInnsInRadius method)
(def-instance getHospitalsInRadius method)
(def... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/apps/emerges/emergency-gis-domain.lisp | lisp | Package :
method
results
results' elements |
File created in WebOnto
(in-package "OCML")
(in-ontology emergency-gis-domain)
(def-class method ())
(def-instance getRestCentresInRadius method)
(def-instance getHotelsInRadius method)
(def-instance getInnsInRadius method)
(def-instance getHospitalsInRadius method)
(def-instance getSupermarketsInRadius met... |
76e2611c547268a4edd0ff2d23199550e816e5dc15dba7bfb672d6d7ccd73be8 | well-typed/cborg | Term.hs | # LANGUAGE CPP #
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - orphans #
module Tests.Term (
Term
, serialise
, deserialise
, toRefTerm
, fromRefTerm
, eqTerm
, canonicaliseTerm
, prop_fromToRefTerm
, prop_toFromRefTerm
) where
im... | null | https://raw.githubusercontent.com/well-typed/cborg/9be3fd5437f9d2ec1df784d5d939efb9a85fd1fb/cborg/tests/Tests/Term.hs | haskell | # LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
----------------------------------------------------------------------------
----------------------------------------------------------------------------
= Ref.TBigInt n
| Compare terms for equality.
It does exact bit for bit equality of floats. This mea... | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - orphans #
module Tests.Term (
Term
, serialise
, deserialise
, toRefTerm
, fromRefTerm
, eqTerm
, canonicaliseTerm
, prop_fromToRefTerm
, prop_toFromRefTerm
) where
import qualified Data.ByteString as BS
import qualified Data.ByteSt... |
13cb1c9f67bed1087047f0b1f955f4fa2f57b7e286978a68ea16b18ccc8df693 | gotthardp/lorawan-server | lorawan_backend_sup.erl | %
Copyright ( c ) 2016 - 2019 < >
% All rights reserved.
Distributed under the terms of the MIT License . See the LICENSE file .
%
-module(lorawan_backend_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-spec start_link() -> {ok, pid()}.
start_link() ->
supervisor:start_link(?MODU... | null | https://raw.githubusercontent.com/gotthardp/lorawan-server/13b1409b57e079499a633bca20a33eb5acdf05ee/src/lorawan_backend_sup.erl | erlang |
All rights reserved.
end of file | Copyright ( c ) 2016 - 2019 < >
Distributed under the terms of the MIT License . See the LICENSE file .
-module(lorawan_backend_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-spec start_link() -> {ok, pid()}.
start_link() ->
supervisor:start_link(?MODULE, []).
init([]) ->
{... |
53424a9a9fb788d913b0e37d399b9154105ad0a93825c39447b5ffbd3795d37f | ocaml-multicore/ocaml-tsan | odoc_exception.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/f54002470cc6ab780963cc81b11a85a820a40819/ocamldoc/odoc_exception.mli | ocaml | ************************************************************************
OCaml
... | , projet Cambium , INRIA Paris
Copyright 2022 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
module Name = Odoc_name
type exception_alias = {
ea_name : Name.t;
mutable ea_ex : t_exception option;
}... |
fa9ae3e2a70581056a29ecc1b1e69098b253049cc388331f6986f9459094abb3 | uim/sigscheme | test-define.scm | ;; Filename : test-define.scm
About : unit test for R5RS ' define '
;;
Copyright ( C ) 2005 - 2006 < mover AT hct.zaq.ne.jp >
Copyright ( c ) 2007 - 2008 SigScheme Project < uim - en AT googlegroups.com >
;;
;; All rights reserved.
;;
;; Redistribution and use in source and binary forms, with or witho... | null | https://raw.githubusercontent.com/uim/sigscheme/ccf1f92d6c2a0f45c15d93da82e399c2a78fe5f3/test/test-define.scm | scheme | Filename : test-define.scm
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the fol... | About : unit test for R5RS ' define '
Copyright ( C ) 2005 - 2006 < mover AT hct.zaq.ne.jp >
Copyright ( c ) 2007 - 2008 SigScheme Project < uim - en AT googlegroups.com >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above ... |
cff23e62ceeda7dd96f9187a77a4933bd004f6c6aee47362e50fdb09c5f781ba | openmusic-project/OMChroma | stereo-2.lisp | (in-package :om)
;;;===================================
SPAT CLASSES
;;;===================================
(defclass! stereo-2
(cs-spat-evt)
(
(source-code :initform
(load-buffer-textfile
(get-orc-source (get-orc "stereo-2"))
'textfile "append")
... | null | https://raw.githubusercontent.com/openmusic-project/OMChroma/5ded34f22b59a1a93ea7b87e182c9dbdfa95e047/sources/om6/cs-events/csound/classes/Panning/stereo-2.lisp | lisp | ===================================
===================================
=============================================================================
STEREO-2.ORC
-----------------------------------------------------------------------------
p1 = instrument number
p4 = input (file)
AFIL = filename
CHANNEL2 = amp... | (in-package :om)
SPAT CLASSES
(defclass! stereo-2
(cs-spat-evt)
(
(source-code :initform
(load-buffer-textfile
(get-orc-source (get-orc "stereo-2"))
'textfile "append")
:allocation :class :type textfile :accessor source-code)
(numch... |
b95367988614702877ddbf6ec0f0e072cf1c8134e0bd7514f4cc1fa3c280f073 | input-output-hk/cardano-wallet | DBVar.hs | {-# OPTIONS_GHC -Wno-redundant-constraints#-}
-- We intentionally specify more constraints than necessary for some exports.
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Data.DBVar (
-- * Synopsis
-- | 'DBVar' re... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/10a35cbeae31779069832dff01401e4ad0e39226/lib/dbvar/src/Data/DBVar.hs | haskell | # OPTIONS_GHC -Wno-redundant-constraints#
We intentionally specify more constraints than necessary for some exports.
# LANGUAGE RankNTypes #
* Synopsis
| 'DBVar' represents a mutable variable whose value is kept in memory,
but which is written to the hard drive on every update.
This provides a convenient interface... | # LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Data.DBVar (
' Store ' represent a storage facility to which the ' DBVar '
DBVar
, readDBVar, updateDBVar, modifyDBVar, modifyDBMaybe
, initDBVar, loadDBVar
, Store (..)
, newS... |
fe8fd8708c39476df01a54e43ba46e3a563b568f60b7d0b366a8702d6d38b404 | janestreet/bonsai | main.ml | open! Core
open Bonsai_web
open Bonsai.Let_syntax
module User_info = struct
type t =
{ name : string
; int_id : int
}
[@@deriving compare, equal, fields, sexp]
let sample_data =
List.mapi [ "prod"; "dev"; "test" ] ~f:(fun i suffix ->
List.mapi [ "bonsai"; "incremental"; "app" ] ~f:(fun j ... | null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/examples/search_bar/main.ml | ocaml | open! Core
open Bonsai_web
open Bonsai.Let_syntax
module User_info = struct
type t =
{ name : string
; int_id : int
}
[@@deriving compare, equal, fields, sexp]
let sample_data =
List.mapi [ "prod"; "dev"; "test" ] ~f:(fun i suffix ->
List.mapi [ "bonsai"; "incremental"; "app" ] ~f:(fun j ... | |
bc2b5a01bbebda8ca00ccdf489bda0867ccf724e706beac4a6930422c2a93012 | ntoronto/drbayes | split.rkt | #lang typed/racket/base
(require racket/list
"../set.rkt"
"../flonum.rkt")
(provide (all-defined-out))
(: interval-split (-> Nonempty-Prob-Interval (Listof Nonempty-Prob-Interval)))
(define (interval-split I)
(define-values (a b a? b?) (prob-interval-fields I))
(define c (prob-midpoint a b))
... | null | https://raw.githubusercontent.com/ntoronto/drbayes/e59eb7c7867118bf4c77ca903e133c7530e612a3/drbayes/private/search/split.rkt | racket | #lang typed/racket/base
(require racket/list
"../set.rkt"
"../flonum.rkt")
(provide (all-defined-out))
(: interval-split (-> Nonempty-Prob-Interval (Listof Nonempty-Prob-Interval)))
(define (interval-split I)
(define-values (a b a? b?) (prob-interval-fields I))
(define c (prob-midpoint a b))
... | |
7f87498cbb2bd7b811a9b5191bdda29f17f093e974780256f568ea677aa8ef07 | vlstill/hsExprTest | hiord-compiled.q.hs | -- @ compiled: true
expr = "f"
f :: (a -> a -> a) -> a -> [a] -> a
f = foldl
| null | https://raw.githubusercontent.com/vlstill/hsExprTest/391fc823c1684ec248ac8f76412fefeffb791865/test/hiord-compiled.q.hs | haskell | @ compiled: true |
expr = "f"
f :: (a -> a -> a) -> a -> [a] -> a
f = foldl
|
18de158aa74a1cf70077f943b870b422f840bbef67ad5eae493654baa5ecaefb | jeluard/cljc-ethereum | json.cljc | (ns ethereum.utils.json
"JSON utils functions"
#?(:clj (:require [jsonista.core :as jsonista])))
(defn map->json
"Converts a map into a JSON string."
[o]
#?(:clj (jsonista/write-value-as-string o)
:cljs (js/JSON.stringify (clj->js o))))
(defn json->map
"Converts a JSON string into a map. Keys are st... | null | https://raw.githubusercontent.com/jeluard/cljc-ethereum/41fb6e1fc5cd870eca7daa690c2a19e4db08db9c/src/ethereum/utils/json.cljc | clojure | (ns ethereum.utils.json
"JSON utils functions"
#?(:clj (:require [jsonista.core :as jsonista])))
(defn map->json
"Converts a map into a JSON string."
[o]
#?(:clj (jsonista/write-value-as-string o)
:cljs (js/JSON.stringify (clj->js o))))
(defn json->map
"Converts a JSON string into a map. Keys are st... | |
4d27211ce57a99fddba4a5c75d061076d36f91d64040726515b726b89c78388a | GRACeFUL-project/haskelzinc | FZSolutionParser.hs | # LANGUAGE FlexibleInstances #
|
Module : FZSolutionParser
Description : FlatZinc solutions parser
License : < >
Stability : experimental
This module defines a parser for the default format of the output of the two solvers
integrated in haskelzinc ( G12 / FD and choco3 ) . It also pr... | null | https://raw.githubusercontent.com/GRACeFUL-project/haskelzinc/e00684428f4e2072c9b1912c7036f686314b1824/src/Interfaces/FZSolutionParser.hs | haskell | * Parsing values
* Solutions
** Default parsers
** Custom
| The following functions can be used when a MiniZinc @output@ item, which alters the
default output format of the solver, is present in the model.
| A Solution consists of a list of pairs. Each pair represents an assignment of a
value to a decision va... | # LANGUAGE FlexibleInstances #
|
Module : FZSolutionParser
Description : FlatZinc solutions parser
License : < >
Stability : experimental
This module defines a parser for the default format of the output of the two solvers
integrated in haskelzinc ( G12 / FD and choco3 ) . It also pr... |
1ea85227e0698d1c3945199aca7198573f2f30a33b2908b05916d68533df405b | gedge-platform/gedge-platform | amqp_channel_sup.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
@private
-module(amqp_channel_sup).
-include("... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/amqp_client/src/amqp_channel_sup.erl | erlang |
---------------------------------------------------------------------------
---------------------------------------------------------------------------
---------------------------------------------------------------------------
---------------------------------------------------------------------------
--------------... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
@private
-module(amqp_channel_sup).
-include("amqp_c... |
bcb7bcdc3f471408d7dc8e7e07f2db753064862723fa3e078e6544d5ebfa9d3e | 2600hz/kazoo | kzd_fax_box.erl | %%%-----------------------------------------------------------------------------
( C ) 2014 - 2020 , 2600Hz
%%% @doc Device document manipulation
@author
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 ... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_documents/src/kzd_fax_box.erl | erlang | -----------------------------------------------------------------------------
@doc Device document manipulation
@end
----------------------------------------------------------------------------- | ( C ) 2014 - 2020 , 2600Hz
@author
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 /.
-module(kzd_fax_box).
-export([new/0
,type/0
,owner_id/1, owner_id/2
,timezon... |
6e37b6d7f17bf78866806f3bcfcdea87e936c58af5159a7ee9e706ded809e815 | hunt-framework/hunt | Crawler.hs | # OPTIONS #
-- ------------------------------------------------------------
module Holumbus.Crawler
( module Holumbus.Crawler.BasicTypes
, module Holumbus.Crawler.Constants
, module Holumbus.Crawler.Core
, module Holumbus.Crawler.Html
, module Holumbus.Crawler.Logger
, module Holumbus.Crawler.... | null | https://raw.githubusercontent.com/hunt-framework/hunt/d692aae756b7bdfb4c99f5a3951aec12893649a8/hunt-crawler/src/Holumbus/Crawler.hs | haskell | ------------------------------------------------------------
------------------------------------------------------------ | # OPTIONS #
module Holumbus.Crawler
( module Holumbus.Crawler.BasicTypes
, module Holumbus.Crawler.Constants
, module Holumbus.Crawler.Core
, module Holumbus.Crawler.Html
, module Holumbus.Crawler.Logger
, module Holumbus.Crawler.Robots
, module Holumbus.Crawler.RobotTypes
, module Hol... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.