_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 |
|---|---|---|---|---|---|---|---|---|
b8142cc06034b3795c0599b561b191d8c4ca80a3854d0dcccd846b033f69f39c | hamler-lang/hamler | RPC.erl | %%---------------------------------------------------------------------------
%% |
%% Module : RPC
Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
%% License : BSD-style (see the LICENSE file)
%%
Maintainer : ,
,
%% Stability : experimental
%% Portability : p... | null | https://raw.githubusercontent.com/hamler-lang/hamler/3ba89dde3067076e112c60351b019eeed6c97dd7/lib/Control/Distributed/RPC.erl | erlang | ---------------------------------------------------------------------------
|
Module : RPC
License : BSD-style (see the LICENSE file)
Stability : experimental
Portability : portable
The RPC FFI module.
--------------------------------------------------------------------------- | Copyright : ( c ) 2020 - 2021 EMQ Technologies Co. , Ltd.
Maintainer : ,
,
-module('RPC').
-include("../../Foreign.hrl").
-export([ waitResponse/1
, waitResponseTimeout/2
]).
waitResponse(RequestId) ->
?IO(case erpc:wait_response(RequestId) of
{response, ... |
94395a3bf1673fc881db77ed1135d810a72c2ae284ae24dc4a634e812a59f652 | mukul-rathi/bolt | desugar_overloading.mli | * overloaded functions and methods
open Ast.Ast_types
open Typing
val name_mangle_overloaded_method : Method_name.t -> type_expr list -> Method_name.t
val name_mangle_if_overloaded_function :
Typed_ast.function_defn list -> Function_name.t -> type_expr list -> Function_name.t
| null | https://raw.githubusercontent.com/mukul-rathi/bolt/1faf19d698852fdb6af2ee005a5f036ee1c76503/src/frontend/desugaring/desugar_overloading.mli | ocaml | * overloaded functions and methods
open Ast.Ast_types
open Typing
val name_mangle_overloaded_method : Method_name.t -> type_expr list -> Method_name.t
val name_mangle_if_overloaded_function :
Typed_ast.function_defn list -> Function_name.t -> type_expr list -> Function_name.t
| |
280ce6e11a2167319d368d76678d88a317ce23a86f1a6ee8ede4b59e5a9a7ec7 | mzp/coq-for-ipad | program_loading.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet Cr... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/debugger/program_loading.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Objective Caml port by and
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
... |
88d791c09e04871a4080a9dd6cb9347e71ce7d8adf06cd643f454afb0d66f7ff | shortishly/haystack | haystack_docker_util.erl | Copyright ( c ) 2016 < >
%%
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... | null | https://raw.githubusercontent.com/shortishly/haystack/7ff0d737dcd90adf60c861b2cf755aee1355e555/src/haystack_docker_util.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissi... | Copyright ( c ) 2016 < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(haystack_docker_util).
-export([container_id/1]).
-export([docker_id/1]).
-export([request/2]).
-export([ssl/2]).
-export([system_time/1]... |
2359825bd603277ae378128720624f3946c240129828ade81a5cd97d32c322ca | ekmett/ekmett.github.com | THash.hs | {-# OPTIONS -fglasgow-exts #-}
-----------------------------------------------------------------------------
-- |
Module : Data .
Copyright : ( C ) 2006
-- License : BSD-style (see the file libraries/base/LICENSE)
--
Maintainer : < >
-- Stability : experimental
Portability : non... | null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/thash/src/Data/THash.hs | haskell | # OPTIONS -fglasgow-exts #
---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Stability : experimental
nesting these. The performance hit hasn't yet been measured.
---------------------------------------------------------... | Module : Data .
Copyright : ( C ) 2006
Maintainer : < >
Portability : non - portable ( requires STM )
A simple " STM " based transactional linear hash table based on Witold 1980 .
This wraps a " Data . THash . " in an simple container . It may be
more appropriate to use the under... |
27885192b6b5a32bf0adbc184a7ce44d9508b4a2f1eda59fea5d1fce204425a0 | yi-editor/yi | FriendlyPath.hs | module System.FriendlyPath
( userToCanonPath
, expandTilda
, isAbsolute'
) where
import System.CanonicalizePath (canonicalizePath)
import System.Directory (getHomeDirectory)
import System.FilePath (isAbsolute, normalise, pathSeparator)
import System.PosixCompat.User (getUserEntryForName, homeDir... | null | https://raw.githubusercontent.com/yi-editor/yi/58c239e3a77cef8f4f77e94677bd6a295f585f5f/yi-core/src/System/FriendlyPath.hs | haskell | canonicalizePath follows symlinks, and does not work if the directory does not exist.
| Turn a user-friendly path into a computer-friendly path by expanding the leading tilda.
| Is a user-friendly path absolute? | module System.FriendlyPath
( userToCanonPath
, expandTilda
, isAbsolute'
) where
import System.CanonicalizePath (canonicalizePath)
import System.Directory (getHomeDirectory)
import System.FilePath (isAbsolute, normalise, pathSeparator)
import System.PosixCompat.User (getUserEntryForName, homeDir... |
a5d0f2a4c3a730a147e6f7068391569d0b9eb43ca9eefd26feec6c04c312da04 | marijnh/pcall | queue.lisp | (cl:defpackage :pcall-queue
(:use :cl :bordeaux-threads)
(:export #:make-queue
#:queue-push
#:queue-pop #:queue-wait
#:queue-length #:queue-empty-p))
(cl:in-package :pcall-queue)
;;; A thread-safe wait queue.
(defclass queue ()
((lock :initform (make-lock) :reader queue-lock)
... | null | https://raw.githubusercontent.com/marijnh/pcall/0b4b98a45863b0f4437a8592c5630faa2d6437c5/queue.lisp | lisp | A thread-safe wait queue. | (cl:defpackage :pcall-queue
(:use :cl :bordeaux-threads)
(:export #:make-queue
#:queue-push
#:queue-pop #:queue-wait
#:queue-length #:queue-empty-p))
(cl:in-package :pcall-queue)
(defclass queue ()
((lock :initform (make-lock) :reader queue-lock)
(condition :initform (make-c... |
10d22a880516e90d032bfcaaa2068844012a73c91543d597e3d1377c42b9549d | achirkin/qua-view | Scenario.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE Strict #-}
# OPTIONS_GHC -fno - warn - orphans #
-- | Geometry Scenario
--
-- The main structure in qua-view!
--
module Model.Scenario
( Scen... | null | https://raw.githubusercontent.com/achirkin/qua-view/62626ead828889a1c7ef1fdba4d84324eb5420b3/src/Model/Scenario.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DataKinds #
# LANGUAGE Strict #
| Geometry Scenario
The main structure in qua-view!
^ Friendly name for a scenario
^ Longitude, Latitude, and Altitude of scenario reference point
^ We can explicitly specify srid
^ key-value of arbitrary JSO... | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
module Model.Scenario
( Scenario, Scenario' (..), getTransferables
, name, geoLoc, srid, properties, objects, objIdSeq, viewState, withoutObjects
, selectedDynamicColor, selectedStaticColor, selectedG... |
2353f2334047f96eddc36d506e5cb5cb75f2b8e1d50bfdf620a7763cb1b6ae37 | naproche/naproche | Unify.hs | -- |
Authors : ( 2017 - 2018 )
--
-- Unification of literals.
module SAD.Prove.Unify (unify) where
import Control.Monad
import SAD.Data.Formula
given two literals we check whether they are eligible for unification
( sign and symbol are the same ) and then try to unify their arguments
(sign and symbol are ... | null | https://raw.githubusercontent.com/naproche/naproche/6284a64b4b84eaa53dd0eb7ecb39737fb9135a0d/src/SAD/Prove/Unify.hs | haskell | |
Unification of literals.
implementation of a standard unification algorithm
we keep a list of already assigned variables
if both sides have a function symbol
occurs check
save the assignment and unify the rest under this assignment
------------------- auxiliary functions
update earlier assignments with late... | Authors : ( 2017 - 2018 )
module SAD.Prove.Unify (unify) where
import Control.Monad
import SAD.Data.Formula
given two literals we check whether they are eligible for unification
( sign and symbol are the same ) and then try to unify their arguments
(sign and symbol are the same) and then try to unify thei... |
2251bec45530564332de21fbb992bc16893bc980f8269b5439e6e6b1b1e9543a | myaosato/clcm | tree.lisp | (defpackage :clcm/tree
(:use :cl
:clcm/utils
:clcm/line
:clcm/node
:clcm/nodes/document)
(:shadow :reverse-children)
(:export :make-tree
:tree->html))
(in-package :clcm/tree)
;; API
(defun make-tree (cm-string)
(-> cm-string
(cm->block-tree)
(reverse-child... | null | https://raw.githubusercontent.com/myaosato/clcm/fd0390bedf00c5be3f5c2eb8176ff73bede797b0/src/tree.lisp | lisp | API
tree
cm -> block-tree
side effects !!
side effects !!
side effects !! | (defpackage :clcm/tree
(:use :cl
:clcm/utils
:clcm/line
:clcm/node
:clcm/nodes/document)
(:shadow :reverse-children)
(:export :make-tree
:tree->html))
(in-package :clcm/tree)
(defun make-tree (cm-string)
(-> cm-string
(cm->block-tree)
(reverse-children)))
... |
1b78e273defd44194752567c5f7541f7706a4d6ab1b7dbddda86abe9c180f3a0 | jwiegley/notes | Runner.hs | instance Typeable a => Typeable (Last a) where
typeOf (Last x) = typeOf x
instance (Data a, Typeable a) => Data (Last a) where
jww ( 2014 - 02 - 06 ): : Migrate : NYI
toConstr (Last x) = toConstr x
dataTypeOf (Last x) = dataTypeOf x
| null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/8851173/Runner.hs | haskell | instance Typeable a => Typeable (Last a) where
typeOf (Last x) = typeOf x
instance (Data a, Typeable a) => Data (Last a) where
jww ( 2014 - 02 - 06 ): : Migrate : NYI
toConstr (Last x) = toConstr x
dataTypeOf (Last x) = dataTypeOf x
| |
8049527c07c34394c8de91744a940daea8bc63200dbb7e9ced11ceeec9f81a44 | plexus/chestnut | httpclient.clj | (ns chestnut.httpclient
(:require [clojure.java.io :as io]
[clojure.java.shell :as sh]
[clojure.string :as str])
(:import java.lang.System
[java.nio.file Files OpenOption Paths]
java.security.cert.CertificateFactory
java.security.KeyStore
[javax.ne... | null | https://raw.githubusercontent.com/plexus/chestnut/684b668141586ed5ef4389f94a4dc7f4fde13112/src/chestnut/httpclient.clj | clojure | Not actually working :(
borrowed from ring
/borrowed from ring | (ns chestnut.httpclient
(:require [clojure.java.io :as io]
[clojure.java.shell :as sh]
[clojure.string :as str])
(:import java.lang.System
[java.nio.file Files OpenOption Paths]
java.security.cert.CertificateFactory
java.security.KeyStore
[javax.ne... |
6438ba90e838bef51d8f60bdeb084b0dfdefecfda5be7aee691fd17acdbe73ba | roburio/builder-web | m20210202.ml | let old_version = 1L and new_version = 1L
let identifier = "2021-02-02"
let migrate_doc = "add index job_build_idx on build"
let rollback_doc = "rollback index job_build_idx on build"
open Grej.Infix
let migrate _datadir (module Db : Caqti_blocking.CONNECTION) =
let job_build_idx =
Caqti_type.unit ->. Caqti_typ... | null | https://raw.githubusercontent.com/roburio/builder-web/a85be8730cece0bd78df580fb7d48aff94e060d2/bin/migrations/m20210202.ml | ocaml | let old_version = 1L and new_version = 1L
let identifier = "2021-02-02"
let migrate_doc = "add index job_build_idx on build"
let rollback_doc = "rollback index job_build_idx on build"
open Grej.Infix
let migrate _datadir (module Db : Caqti_blocking.CONNECTION) =
let job_build_idx =
Caqti_type.unit ->. Caqti_typ... | |
587ea74c07833f8132d4c844391238d6a582fd44e5238210f6efc2b1c93c7ac1 | petro-rudenko/cdr-analysis | project.clj | (defproject cdr-processing "0.1.0-SNAPSHOT"
:description "CDR data analysis on Storm, Hadoop, Spark and other clever words."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/data.json "0.2.2"]
... | null | https://raw.githubusercontent.com/petro-rudenko/cdr-analysis/5e583b0cca30c4faf474507998bd7a9a0380f569/project.clj | clojure | [org.apache.hadoop/hadoop-hdfs "2.0.6-alpha"] ; For deployment | (defproject cdr-processing "0.1.0-SNAPSHOT"
:description "CDR data analysis on Storm, Hadoop, Spark and other clever words."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[org.clojure/data.json "0.2.2"]
... |
ff79b8e7aeac3229294509d7a51bc2be46a36dba5f7beb5f6a015116ccbe4869 | Twinside/FontyFruity | Glyph.hs | # LANGUAGE TupleSections #
# LANGUAGE CPP #
module Graphics.Text.TrueType.Glyph
( GlyphHeader( .. )
, GlyphContour( .. )
, CompositeScaling( .. )
, GlyphComposition( .. )
, GlyphContent( .. )
, Glyph( .. )
, GlyphFlag( .. )
, extractFlatOutline
, emptyGlyph
) where
#if !MIN_VERS... | null | https://raw.githubusercontent.com/Twinside/FontyFruity/636eeff6547478ba304cdd7b85ecaa24acc65062/src/Graphics/Text/TrueType/Glyph.hs | haskell | import Text.Printf
import Debug.Trace
| If the number of contours is greater than or equal
a composite glyph.
# UNPACK #
| Minimum x for coordinate data.
# UNPACK #
| Minimum y for coordinate data.
# UNPACK #
| Maximum x for coordinate data.
# UNPACK #
| Maximum y for coordinate data.
# UNPACK #
| Transformation... | # LANGUAGE TupleSections #
# LANGUAGE CPP #
module Graphics.Text.TrueType.Glyph
( GlyphHeader( .. )
, GlyphContour( .. )
, CompositeScaling( .. )
, GlyphComposition( .. )
, GlyphContent( .. )
, Glyph( .. )
, GlyphFlag( .. )
, extractFlatOutline
, emptyGlyph
) where
#if !MIN_VERS... |
040d1c0a361dd782f2d05271aadbcbe5709acd88651f651a15512c30be30251f | slipstream/SlipStreamServer | notification.clj | (ns com.sixsq.slipstream.ssclj.resources.notification
"
Notification resources provide a timestamp for the occurrence of some action. These
are used within the SlipStream server to mark changes in the lifecycle of a
cloud application and for other important actions.
"
(:require
[com.sixsq.slipstream.auth.acl... | null | https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi-resources/src/com/sixsq/slipstream/ssclj/resources/notification.clj | clojure |
available operations
collection
initialization
| (ns com.sixsq.slipstream.ssclj.resources.notification
"
Notification resources provide a timestamp for the occurrence of some action. These
are used within the SlipStream server to mark changes in the lifecycle of a
cloud application and for other important actions.
"
(:require
[com.sixsq.slipstream.auth.acl... |
0b86f3c605324b5b44e4593d8d43588597ad4f6ef0aa116c93b065b318cc2634 | deadcode/Learning-CL--David-Touretzky | 6.14.lisp | (format t "~s = ~s~%" '(INTERSECTION '(LET US SEE) '(LET US SEE)) (INTERSECTION '(LET US SEE) '(LET US SEE)))
| null | https://raw.githubusercontent.com/deadcode/Learning-CL--David-Touretzky/b4557c33f58e382f765369971e6a4747c27ca692/Chapter%206/6.14.lisp | lisp | (format t "~s = ~s~%" '(INTERSECTION '(LET US SEE) '(LET US SEE)) (INTERSECTION '(LET US SEE) '(LET US SEE)))
| |
3776c1e8c19e11f434d1da611148ba490fda96d2ee0a9420d54869d12b75f4b4 | droundy/iolaus-broken | Colors.hs | module Iolaus.Colors ( Color, colorCode, resetCode, spaceColor,
colorMeta, colorOld, colorNew,
colorPlain, rainbow ) where
import System.IO.Unsafe ( unsafePerformIO )
import Git.Plumbing ( getColorWithDefault )
data Color = Color String String
deriving ( Show... | null | https://raw.githubusercontent.com/droundy/iolaus-broken/e40c001f3c5a106bf39f437d6349858e7e9bf51e/Iolaus/Colors.hs | haskell | module Iolaus.Colors ( Color, colorCode, resetCode, spaceColor,
colorMeta, colorOld, colorNew,
colorPlain, rainbow ) where
import System.IO.Unsafe ( unsafePerformIO )
import Git.Plumbing ( getColorWithDefault )
data Color = Color String String
deriving ( Show... | |
8e989f5edb37bee55e51f6bd0620f37b2b56bd603bdcf835b61b6b90471c73c1 | contested-space/seer | seer_sup.erl | -module(seer_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
SupFlags = #{strategy => one_for_all, intensity => 0, period => 1},
Poller = #{
id => seer_server,
... | null | https://raw.githubusercontent.com/contested-space/seer/f9879bce8632375d07b20443e8e3d7d88964b230/src/seer_sup.erl | erlang | -module(seer_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
SupFlags = #{strategy => one_for_all, intensity => 0, period => 1},
Poller = #{
id => seer_server,
... | |
82b8422bb9b751003de9bda0dded152bf66f5af37b4fba1c619cff0ba365c893 | OctopiChalmers/haski | Vec.hs | # LANGUAGE KindSignatures #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
{-# LANGUAGE GADTs #-}
-- needed for `++.`
{-# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #-}
module Haski.Vec ... | null | https://raw.githubusercontent.com/OctopiChalmers/haski/97835d6d90d0c82d29864db03955db0aaaf08c67/src/Haski/Vec.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
needed for `++.`
# OPTIONS_GHC -fplugin GHC.TypeLits.Normalise #
| Non-empty vector
Append vectors
Apply
gives definition for sequenceA | # LANGUAGE KindSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module Haski.Vec where
import Prelude hiding (zipWith, (++), unzip)
import GHC.TypeLits
data Vec (n :: Nat) a where
Last :: a -> Vec 1 a
... |
770dd1ba30420f5d88ab40279ee72172a0aad71c943af696ba53acbf701b331e | defaultxr/zoned | zoned-package.lisp | ;;;; zoned-package.lisp
(defpackage #:zoned
using alexandria causes a name conflict if we do n't do this ...
#:simple-parse-error)
(:shadow #:save-tileset)
(:use #:clim-lisp
#:clim
#:alexandria
#:mutility
#:zone)
(:import-from #:zone
#:w... | null | https://raw.githubusercontent.com/defaultxr/zoned/869f456302912085f898be9f25991aae5c2a79f4/src/zoned-package.lisp | lisp | zoned-package.lisp |
(defpackage #:zoned
using alexandria causes a name conflict if we do n't do this ...
#:simple-parse-error)
(:shadow #:save-tileset)
(:use #:clim-lisp
#:clim
#:alexandria
#:mutility
#:zone)
(:import-from #:zone
#:with-swank-output
... |
5d5643ea4a2ebed66ae8c818da1684fe2cf448fc62eee88bc39823fcc347b68e | clash-lang/clash-compiler | ReprCompact.hs | module ReprCompact
( testBench
, topEntity
) where
import Clash.Prelude
import Clash.Annotations.BitRepresentation
import RotateC (Color(..), MaybeColor(..), Top, tb)
import qualified RotateC
# ANN module (
DataReprAnn
$ ( liftQ [ t| Color | ] )
2
[ ConstrRepr
' Red
0b... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/b0e00ccb28f9a7c70e0ce1cfe3af5bb6ff88f93a/tests/shouldwork/CustomReprs/RotateC/ReprCompact.hs | haskell | Mask
Value
Mask
Value
Masks
Mask
Value
Mask
Value
Masks
# NOINLINE topEntity # | module ReprCompact
( testBench
, topEntity
) where
import Clash.Prelude
import Clash.Annotations.BitRepresentation
import RotateC (Color(..), MaybeColor(..), Top, tb)
import qualified RotateC
# ANN module (
DataReprAnn
$ ( liftQ [ t| Color | ] )
2
[ ConstrRepr
' Red
0b... |
cf7584a4498aeb4c1c29720c099413e3f5b8ea6f712d6669de6b023ce298356c | nokijp/pietc | TestUtils.hs | module TestUtils
( toVector2D
, withTempFile
) where
import Control.Exception
import Data.Vector (Vector)
import qualified Data.Vector.Generic as V
import System.Directory
import System.IO
toVector2D :: [[a]] -> Vector (Vector a)
toVector2D = V.fromList . fmap V.fromList
withTempFile :: String -> (FilePath -> ... | null | https://raw.githubusercontent.com/nokijp/pietc/da6699c286a7b428b01211c8e467ce4ec1f7967e/test/TestUtils.hs | haskell | module TestUtils
( toVector2D
, withTempFile
) where
import Control.Exception
import Data.Vector (Vector)
import qualified Data.Vector.Generic as V
import System.Directory
import System.IO
toVector2D :: [[a]] -> Vector (Vector a)
toVector2D = V.fromList . fmap V.fromList
withTempFile :: String -> (FilePath -> ... | |
078f8a2f910e4ac9b708867fb497f443062ae58c7749fd7934283cc30336ac2c | ayazhafiz/plts | systemf.ml | open Format
open Util
open Util.Error
open Language
open Typecheck
open Eval
let searchpath = ref [ "" ]
let argDefs =
[
( "-I",
Arg.String (fun f -> searchpath := f :: !searchpath),
"Append a directory to the search path" );
]
let parseArgs () =
let inFile = ref (None : string option) in
Arg... | null | https://raw.githubusercontent.com/ayazhafiz/plts/59b3996642f4fd5941c96a4987643303acc3dee6/tapl/25-systemf/systemf.ml | ocaml | Values in the store must be updated to reflect the insertion of the new binding.
This is not necessary during evaluation, as in that case there are no
free variables being added to the global scope, but there are during an
arbitrary bind command. | open Format
open Util
open Util.Error
open Language
open Typecheck
open Eval
let searchpath = ref [ "" ]
let argDefs =
[
( "-I",
Arg.String (fun f -> searchpath := f :: !searchpath),
"Append a directory to the search path" );
]
let parseArgs () =
let inFile = ref (None : string option) in
Arg... |
a7945daef8d49b147395061db52885efd866578a35d4497e48bae88d4b45e47e | ekmett/category-extras | Derivative.hs | -----------------------------------------------------------------------------
-- |
-- Module : Control.Functor.Derivative
Copyright : ( C ) 2008
-- License : BSD-style (see the file LICENSE)
--
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable (rank-2 polymorphi... | null | https://raw.githubusercontent.com/ekmett/category-extras/f0f3ca38a3dfcb49d39aa2bb5b31b719f2a5b1ae/Control/Functor/Derivative.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Functor.Derivative
License : BSD-style (see the file LICENSE)
Stability : experimental
Portability : non-portable (rank-2 polymorphism)
-------------------------------------------------------------------... | Copyright : ( C ) 2008
Maintainer : < >
module Control.Functor.Derivative where
|
af7a4657849a547c23e28bc5b45c42334dbc1d2275c21cda269fd835ad8bf218 | marigold-dev/chusai | chusai_tezos.mli | MIT License
Copyright ( c ) 2022 Marigold < >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal in
the Software without restriction , including without limitation the rights to
u... | null | https://raw.githubusercontent.com/marigold-dev/chusai/09f798c585121d3b02bf3fed0f52f15c3bdc79a1/layer2/lib/chusai_tezos/chusai_tezos.mli | ocaml | MIT License
Copyright ( c ) 2022 Marigold < >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal in
the Software without restriction , including without limitation the rights to
u... | |
0588ab0ef587a1ffe049c7a47dcda6f20792d686586297d28f68a9c637937f3b | stchang/macrotypes | turnstile-lang.rkt | #lang turnstile
(provide #%module-begin)
| null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-test/tests/turnstile/load-time-tests/turnstile-lang.rkt | racket | #lang turnstile
(provide #%module-begin)
| |
e8e275e8bf5e819dd7c3d1f6a92165c581810e7b464300320e6fea9f4a4ff74b | ghcjs/ghcjs-dom | StorageInfo.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.StorageInfo
(js_queryUsageAndQuota, queryUsageAndQuota, js_requestQuota,
reques... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/StorageInfo.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.StorageInfo
(js_queryUsageAndQuota, queryUsageAndQuota, js_requestQuota,
requestQuota, pattern TEMPORARY, pattern PERSISTENT,
StorageInfo(..), gTypeStorageInfo)
wh... |
44fab6b3330f9a1714411f799f8bb895147e208b7ed337af298ff50ccc3ace9a | ds-wizard/engine-backend | Component.hs | module Shared.Model.Component.Component where
import Data.Time
import GHC.Generics
data Component = Component
{ name :: String
, version :: String
, builtAt :: UTCTime
, createdAt :: UTCTime
, updatedAt :: UTCTime
}
deriving (Generic, Eq, Show)
| null | https://raw.githubusercontent.com/ds-wizard/engine-backend/b87f6d481205dd7f0f00fd770145f8ee5c4be193/engine-shared/src/Shared/Model/Component/Component.hs | haskell | module Shared.Model.Component.Component where
import Data.Time
import GHC.Generics
data Component = Component
{ name :: String
, version :: String
, builtAt :: UTCTime
, createdAt :: UTCTime
, updatedAt :: UTCTime
}
deriving (Generic, Eq, Show)
| |
6dd4b60432043a635cafd7d32936db39b5e13cb19fe6fbcce4af3e6663628da6 | raviksharma/bartosz-basics-of-haskell | segment.hs | makeSegment p1 p2 = (p1, p2)
main = print $ makeSegment (1, 2) (3, 4)
| null | https://raw.githubusercontent.com/raviksharma/bartosz-basics-of-haskell/86d40d831f61415ef0022bff7fe7060ae6a23701/02-my-first-program/segment.hs | haskell | makeSegment p1 p2 = (p1, p2)
main = print $ makeSegment (1, 2) (3, 4)
| |
fbba81f8e73c4eeaca8c4532b0e75f4720d86304a846ebcf4af82d90c39004db | ta0kira/zeolite | TrackedErrors.hs | -----------------------------------------------------------------------------
Copyright 2020 - 2021 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 applic... | null | https://raw.githubusercontent.com/ta0kira/zeolite/6741e1fa38bdb7feaad10780290275cd5282fcbc/src/Test/TrackedErrors.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
--------------------------------------------------------------------------- -}
# LANGUAGE Safe # | Copyright 2020 - 2021 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 di... |
f5ba25e58239f069f10148c87d73b9da3c6dbac0ebcb3a11c85cd48eb84d2b6a | Kappa-Dev/KappaTools | eval.mli | (******************************************************************************)
(* _ __ * The Kappa Language *)
| |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
(* | ' / ********************************************************************... | null | https://raw.githubusercontent.com/Kappa-Dev/KappaTools/a7e166d671286d4fa951b07a60a1dd452d60e242/core/grammar/eval.mli | ocaml | ****************************************************************************
_ __ * The Kappa Language
| ' / ********************************************************************
| . \ * This file is distributed under the terms of the
|_|\_\ * GN... | | |/ / * Copyright 2010 - 2020 CNRS - Harvard Medical School - INRIA - IRIF
val compile_bool:
debugMode:bool -> compileModeOn:bool -> ?origin:Operator.rev_dep ->
Contact_map.t -> Pattern.PreEnv.t ->
(LKappa.rule_mixture, int) Alg_expr.bool Locality.annot ->
Pattern.PreEnv.t *
(Pattern.id array list,in... |
1fb2483ba87352205cc8921cd631094485351121d5a5f81b2ea3e49eca26a8cb | TrustInSoft/tis-kernel | design.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/plugins/gui/design.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
d89dcefe3e7aa79a78acc74d76a638384f6c801406bdfd3785a2086222d4c05c | ptal/AbSolute | event_loop.ml | Copyright 2019
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 version .
This program is distr... | null | https://raw.githubusercontent.com/ptal/AbSolute/469159d87e3a717499573c1e187e5cfa1b569829/src/transformers/event_loop/event_loop.ml | ocaml | if has_changed then Printf.printf "E.closure: has_changed\n" else Printf.printf "E.closure: NOT has_changed\n";
This abstract domain is totally functional. | Copyright 2019
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 version .
This program is distr... |
46e1ff1b65d4cff41fb77e939899d158acaad465443702e880251079ee0c1d87 | mirage/ocaml-rpc | markdowngen.ml | open Rpc.Types
open Idl
open Codegen
let get_description desc =
let escape =
let translate = function
(* Escape special XML (and HTML) chars that might become tags *)
| '<' -> Some "<"
| '>' -> Some ">"
| '&' -> Some "&"
(* Escape some special markdown chars - these are no... | null | https://raw.githubusercontent.com/mirage/ocaml-rpc/fdbf7f5c3e4f0c75837f0a96d5d4d6458805fd57/src/lib/markdowngen.ml | ocaml | Escape special XML (and HTML) chars that might become tags
Escape some special markdown chars - these are not part of ocamldoc markup language
Slightly more convenient to have columns sometimes. This
also ensures each row has the correct number of entries.
Function inputs and outputs in a table
* We also d... | open Rpc.Types
open Idl
open Codegen
let get_description desc =
let escape =
let translate = function
| '<' -> Some "<"
| '>' -> Some ">"
| '&' -> Some "&"
| ('*' | '_' | '[' | ']' | '(' | ')' | '#' | '!') as c ->
Some ("\\" ^ String.make 1 c)
| _ -> None
in
... |
55764179d3a25209ca14c5adc11397b6c0f1301feff3d1453bfb8d1f9d59b1af | LexiFi/menhir | LALR.ml | (******************************************************************************)
(* *)
(* *)
... | null | https://raw.githubusercontent.com/LexiFi/menhir/794e64e7997d4d3f91d36dd49aaecc942ea858b7/src/LALR.ml | ocaml | ****************************************************************************
file LICEN... |
, Paris
, PPS , Université Paris Diderot
. All rights reserved . This file is distributed under the
terms of the GNU General Public License version 2 , as... |
cb41795bea41fb8bb15f6d87963915c2b297d1f9a5f894145c1b7a62b1b93576 | martijnbastiaan/doctest-parallel | Foo.hs | # LANGUAGE TemplateHaskell #
module Foo where
import Bar
-- | some documentation
foo :: Int
foo = $(bar)
| null | https://raw.githubusercontent.com/martijnbastiaan/doctest-parallel/f70d6a1c946cc0ada88571b90a39a7cd4d065452/test/extract/th/Foo.hs | haskell | | some documentation | # LANGUAGE TemplateHaskell #
module Foo where
import Bar
foo :: Int
foo = $(bar)
|
8f548596eb615ae62d9cc4a01ab0e185ac844a5c8d1d9d79463e792c7a7c1536 | korya/efuns | wX_port.ml | (***********************************************************************)
(* *)
(* ____ *)
(* *)
Fabrice Le Fessa... | null | https://raw.githubusercontent.com/korya/efuns/78b21d9dff45b7eec764c63132c7a564f5367c30/toolkit/wX_port.ml | ocaml | *********************************************************************
____
... | Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Xtypes
open WX_types
class t parent attributes =
object (self)
inherit WX_object.t par... |
03607402d3d5c0570d029051b479bf0fec18bf4d46e1d552ff34f85c0338dd86 | vikram/lisplibraries | specials.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : TBNL ; Base : 10 -*-
$ Header : /usr / local / cvsrep / tbnl / specials.lisp , v 1.92 2006/09/30 13:20:25 edi Exp $
Copyright ( c ) 2004 - 2006 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; modifica... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/tbnl-0.11.4/specials.lisp | lisp | Syntax : COMMON - LISP ; Package : TBNL ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the foll... | $ Header : /usr / local / cvsrep / tbnl / specials.lisp , v 1.92 2006/09/30 13:20:25 edi Exp $
Copyright ( c ) 2004 - 2006 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package #:tb... |
ea1fca4699d1f066c0a46f4e6612241a42aa7ad218cc111bc92bed273a020832 | ryepup/cl-opencv | imgproc.lisp | ;;;; -*- mode: lisp; indent-tabs: nil -*-
;;;; imgproc.lisp
OpenCV bindings for SBCL
;;;; Image processing
(in-package :cl-opencv)
;;; Histograms
;;; Image Filtering
(cffi:defctype ipl-conv-kernel :pointer)
TODO test cvCopyMakeBorder
void cvCopyMakeBorder(const CvArr * src , CvArr * dst , ,
... | null | https://raw.githubusercontent.com/ryepup/cl-opencv/571215d60e963f53aaa87f3a5ee90f94176ddb00/imgproc.lisp | lisp | -*- mode: lisp; indent-tabs: nil -*-
imgproc.lisp
Image processing
Histograms
Image Filtering
IplConvKernel*
cvCreateStructuringElementEx(int cols, int rows, int anchorX, int anchorY,
int shape, int* values=NULL)
void cvDilate(const CvArr* src, CvArr* dst, IplConvKernel* element ... | OpenCV bindings for SBCL
(in-package :cl-opencv)
(cffi:defctype ipl-conv-kernel :pointer)
TODO test cvCopyMakeBorder
void cvCopyMakeBorder(const CvArr * src , CvArr * dst , ,
int bordertype , CvScalar value = cvScalarAll(0 ) )
(defanonenum
+ipl-border-constant+
+ipl-border-re... |
6ed0b6380e1923ad3b5d56cf09de14d2493a315a8807e5ec6c09ff324524b84a | cl-axon/shop2 | problem-converter.lisp | (in-package :common-lisp-user)
(defparameter *debug-mode* t)
(defun convert-problems (L)
(dolist (fn L)
(problem-converter fn (concatenate 'string fn ".lisp") fn)
)
)
(defun write-SHOP2-problem (shop2-problem-filename
problem-name
domain-name
... | null | https://raw.githubusercontent.com/cl-axon/shop2/9136e51f7845b46232cc17ca3618f515ddcf2787/examples/IPC-2002/Depots/SimpleTime/easy_probs/problem-converter.lisp | lisp | (do* ((ol objects-list (cdddr ol))
((null ol))
))
problem-name
| (in-package :common-lisp-user)
(defparameter *debug-mode* t)
(defun convert-problems (L)
(dolist (fn L)
(problem-converter fn (concatenate 'string fn ".lisp") fn)
)
)
(defun write-SHOP2-problem (shop2-problem-filename
problem-name
domain-name
... |
7328f775cdd529402cc3a3868ab84793dbf8623522e99bc3c7dd579c8c805370 | ghc/packages-base | IO.hs | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
-- Module : System.IO
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-... | null | https://raw.githubusercontent.com/ghc/packages-base/52c0b09036c36f1ed928663abb2f295fd36a88bb/System/IO.hs | haskell | ---------------------------------------------------------------------------
|
Module : System.IO
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : stable
Portability : portable
---------------------------------------------------------------------------
* Fil... | # LANGUAGE Trustworthy #
# LANGUAGE CPP , NoImplicitPrelude #
Copyright : ( c ) The University of Glasgow 2001
The standard IO library .
module System.IO (
* The IO monad
IO,
fixIO,
FilePath,
| GHC note : a ' Handle ' will be automatically closed when the garbage
an explicit ' ' to cl... |
b73ff5786f25ad1a0426525f5358401e8f57c0c4c83a169cf9dc27192dba844c | comby-tools/comby | test_generic.ml | open Core
open Test_helpers
open Comby_kernel
open Matchers
let run
(module E : Engine.S)
?(configuration = configuration)
source
match_template
rewrite_template
=
E.Generic.first ~configuration match_template source
|> function
| Ok result ->
Rewrite.all ~source ~rewrite_template [ result ]
... | null | https://raw.githubusercontent.com/comby-tools/comby/a36c63fb1e686adaff3e90aed00e88404f8cda78/test/common/test_generic.ml | ocaml | this is too annoying to fix every time the grammar changes.
FIXME: this should fail. also test case where separators do or do not need
whitespace. e.g., strict about strcpy(src,dst) matching a template
strcpy(:[1],:[2]) versus strcpy(:[1], :[2])
Unimplemented: Has no effect | open Core
open Test_helpers
open Comby_kernel
open Matchers
let run
(module E : Engine.S)
?(configuration = configuration)
source
match_template
rewrite_template
=
E.Generic.first ~configuration match_template source
|> function
| Ok result ->
Rewrite.all ~source ~rewrite_template [ result ]
... |
a6ff77f9cff563a809fa81f4a0695c9e71c9f2ac636b07fc7007bddb64701429 | haskell-tools/haskell-tools | B.hs | module B where
x = () | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/daemon/examples/Project/multi-packages/package2/B.hs | haskell | module B where
x = () | |
42264ecb0862736a717a53dfcb6fb29edddefb607c74d0fa0d5e049368814119 | arrdem/shelving | common_test.clj | (ns shelving.common-test
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as sgen]
[clojure.string :as str]
[clojure.set :as set]
[clojure.test :as t]
[clojure.test.check :as tc]
[clojure.test.check.properties :as prop]
[... | null | https://raw.githubusercontent.com/arrdem/shelving/27439bfcb2f3438d5b23fcd468360bda491002f1/src/test/clj/shelving/common_test.clj | clojure | Relations are bidirectional on read, unidirectional on write.
Relations are bidirectional on read, unidirectional on write.
Now perform a write which should invalidate the above properties
The old values should no longer be associated as baz has changed.
But only if foo and foo' are distinct.
The new values shoul... | (ns shelving.common-test
(:require [clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as sgen]
[clojure.string :as str]
[clojure.set :as set]
[clojure.test :as t]
[clojure.test.check :as tc]
[clojure.test.check.properties :as prop]
[... |
e18a1665d1fd76ea26c06020c6a1eacd363d9e6b3ae341774294e892b6d704f8 | maranget/hevea | simpleRope.ml | (***********************************************************************)
(* *)
(* HEVEA *)
(* *)
, , projet , ... | null | https://raw.githubusercontent.com/maranget/hevea/226eac8c506f82a600d453492fbc1b9784dd865f/simpleRope.ml | ocaml | *********************************************************************
HEVEA
... | , , projet ,
Copyright 2012 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
open Printf
exception Out_of_bounds
module type Config = sig
val small_length : int
end
module Make(C:Config) = struct
open C
type t =
... |
5ad7a8fc08e713626c9889e4fb4f16fd7475394773bb0b9ee53315e3cd786cb0 | input-output-hk/cardano-addresses | Utils.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
module Test.Utils
( cli
, describeCmd
, validateJSON
, SchemaRef
) where
import Prelude
import Data.String
( IsString )
import Data.Text
( Text )
#ifdef HJSONSCHEMA
import... | null | https://raw.githubusercontent.com/input-output-hk/cardano-addresses/d22a9aa986391642d4fc398c84305c42d3c77c34/command-line/test/Test/Utils.hs | haskell |
cli
^ arguments
^ output, either stdout or (stdout, stderr)
| Return the exe name and args for a CLI invocation.
describeCmd
| Wrap HSpec 'describe' into a friendly command description. So that, we get
a very satisfying result visually from running the tests, and can inspect
what each command help text look... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
module Test.Utils
( cli
, describeCmd
, validateJSON
, SchemaRef
) where
import Prelude
import Data.String
( IsString )
import Data.Text
( Text )
#ifdef HJSONSCHEMA
import... |
deff6be8455eb62c1bfe464a32a73ffaae4fd736f36e54de96cde15d169ccd14 | reactiveml/rml | lwt_js_events.mli | Js_of_ocaml library
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* 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 , with linking ... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/lib/lwt_js_events.mli | ocaml | * Programming mouse or keyboard events handlers using Lwt
* [async_loop] is similar to [seq_loop], but each handler runs
independently. No event is thus missed, but since several
instances of the handler can be run concurrently, it is up to the
programmer to ensure that they interact correctly.
Cancel... | Js_of_ocaml library
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* 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 , with linking ... |
f7baf3a5071f1335fa4b28f1066024af1aca6c5b9a66071b08d27ca88168d6fd | mzuther/MoccaFaux | tray.clj | ;; MoccaFaux
;; =========
;; Adapt power management to changes in the environment
;;
Copyright ( c ) 2020 - 2021 ( / ) and
;; contributors
;;
;; This program and the accompanying materials are made available under
the terms of the Eclipse Public License 2.0 which is available at
;; -2.0.
;;
This Source Code may... | null | https://raw.githubusercontent.com/mzuther/MoccaFaux/c0f4ed8538a08d460c039140c412ca535223a707/src/de/mzuther/moccafaux/tray.clj | clojure | MoccaFaux
=========
Adapt power management to changes in the environment
contributors
This program and the accompanying materials are made available under
-2.0.
Secondary Licenses when the conditions for such availability set forth
. | Copyright ( c ) 2020 - 2021 ( / ) and
the terms of the Eclipse Public License 2.0 which is available at
This Source Code may also be made available under the following
in the Eclipse Public License , v. 2.0 are satisfied : GNU General
Public License as published by the Free Software Foundation , either
ve... |
592e95df724c9d73aa13bae51ebd58b61bcc701202de9c5db557dd7dfa9f33d0 | ocaml-multicore/ocaml-tsan | nativeint.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/stdlib/nativeint.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Processor - native integers .
This module provides operations on the type [ nativeint ] of
s... |
79d7861f4e10caa50756c850a701bedb0f694f60b52df1dfeca47e4cbd293fcf | mbj/stratosphere | UriPathRouteInputProperty.hs | module Stratosphere.RefactorSpaces.Route.UriPathRouteInputProperty (
UriPathRouteInputProperty(..), mkUriPathRouteInputProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/refactorspaces/gen/Stratosphere/RefactorSpaces/Route/UriPathRouteInputProperty.hs | haskell | module Stratosphere.RefactorSpaces.Route.UriPathRouteInputProperty (
UriPathRouteInputProperty(..), mkUriPathRouteInputProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Stratosphere... | |
52678767847224b8184dc5bda8c4a1696f718c586ba3021658444c50a764a705 | brendanhay/gogol | Product.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/8cbceeaaba36a3c08712b2e272606161500fbe91/lib/services/gogol-file/gen/Gogol/File/Internal/Product.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Backup
* Backup_Labels
* CancelOperationRequest
* Date
* DenyMaintenancePeriod
* Empty
* FileShareConfig
* GoogleCloudSaasacceleratorManagementProvidersV1Instance
* GoogleCloudSaasacceleratorManagementProvidersV1Instance_... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
7836e83611b5d74d9bdf27e170fb33ba2efabd4e76c2f4add0204faeadc1f5f7 | jumarko/clojure-experiments | logging.clj | (ns clojure-experiments.logging
(:require [clojure.spec.alpha :as s]
[clojure.tools.logging :as log]
[clojure.tools.logging.impl :as log-impl]
[taoensso.timbre :as log-timbre])
(:import (org.apache.logging.log4j Level LogManager)
(org.apache.logging.log4j.core.config C... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/0ba4f8da824da2da59e88cf0157239ead88744df/src/clojure_experiments/logging.clj | clojure | clojure.tools.logging and dynamic log level setting
copied from `clojure.tools.logging.impl/find-factory` and making `log4j2-factory
How do I set a logger's level programmaticaly? -2.4/faq.html#reconfig_level_from_code
finally, we need to update logger-factory used internally by clojure.tools.logging
otherwise i... | (ns clojure-experiments.logging
(:require [clojure.spec.alpha :as s]
[clojure.tools.logging :as log]
[clojure.tools.logging.impl :as log-impl]
[taoensso.timbre :as log-timbre])
(:import (org.apache.logging.log4j Level LogManager)
(org.apache.logging.log4j.core.config C... |
7be7ae27e6d668ed00b7ec08b4e147065ddaacb0be6287f2e8ed34ea883a528f | meain/evil-textobj-tree-sitter | textobjects.scm | inherits :
| null | https://raw.githubusercontent.com/meain/evil-textobj-tree-sitter/d67bdd55ae0d70978232e952020f6e8300b5c7bb/queries/cuda/textobjects.scm | scheme | inherits :
| |
440a702b527f8b7d101c81d3b79468d567eddf707eccbf592b60b4910f17e5eb | muqiuhan/MLisp | mlisp.ml | (****************************************************************************)
(* MLisp *)
Copyright ( C ) 2022 Muqiu Han
(* *)
(* Th... | null | https://raw.githubusercontent.com/muqiuhan/MLisp/5d79cf6731910d77cde674fb77d71d3ddad38e3c/test/mlisp.ml | ocaml | **************************************************************************
MLisp
This program is free software: you can redistribute it and/or modify
(at your option) an... | Copyright ( C ) 2022 Muqiu Han
it under the terms of the GNU Affero 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 Affero General Public License
let exec_path... |
304a14a31b4b158353811dac81e9a42389cd7a74b7586dc0f7ad02fe662aeaf3 | RefactoringTools/HaRe | Dd1.hs | module DeleteDef.Dd1 where
--simple bind
c :: Integer
c = 5
remove5s :: [Integer] -> [Integer]
remove5s [] = []
remove5s (5:xs) = remove5s xs
remove5s (x:xs) = x: (remove5s xs)
funcWithLet :: (Num a) => a -> a
funcWithLet x = let c = 12 in
c * x
funcWithWhere :: (Num a) => a -> a
funcWithWhere x = x + c
where ... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/DeleteDef/Dd1.hs | haskell | simple bind | module DeleteDef.Dd1 where
c :: Integer
c = 5
remove5s :: [Integer] -> [Integer]
remove5s [] = []
remove5s (5:xs) = remove5s xs
remove5s (x:xs) = x: (remove5s xs)
funcWithLet :: (Num a) => a -> a
funcWithLet x = let c = 12 in
c * x
funcWithWhere :: (Num a) => a -> a
funcWithWhere x = x + c
where c = 12
fact :... |
c342145aa09afb19bc3a735dc8da8ec35380f7bd94117259c5f186417f9e5f07 | xvw/muhokama | lib_test.mli | * { 1 Test definition }
open Lib_common
(** An helper for test definition.*)
val test
: ?speed:Alcotest.speed_level
-> about:string
-> desc:string
-> ('a -> unit)
-> 'a Alcotest.test_case
val integration_test
: ?migrations_path:string
-> ?speed:Alcotest.speed_level
-> about:string
-> desc:string
... | null | https://raw.githubusercontent.com/xvw/muhokama/fc0879ec44e7bbb99f140950191e2a883fe60597/test/util/lib_test.mli | ocaml | * An helper for test definition.
* An helper for checking equalities.
* [delayed ~time f] will perform [f] after awaiting [time].
* {1 Testables} | * { 1 Test definition }
open Lib_common
val test
: ?speed:Alcotest.speed_level
-> about:string
-> desc:string
-> ('a -> unit)
-> 'a Alcotest.test_case
val integration_test
: ?migrations_path:string
-> ?speed:Alcotest.speed_level
-> about:string
-> desc:string
-> (Env.t -> Caqti_lwt.connection ->... |
9c7c2dcc20f6e65479bdc8abe4729b24a98e33d05d76d5c51aeb484391ec16a2 | dmitryvk/sbcl-win32-threads | mop-9.impure-cload.lisp | miscellaneous side - effectful tests of the MOP
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after the fork
from CMU CL .
;;;;
;;;; This softwar... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tests/mop-9.impure-cload.lisp | lisp | more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
GENERIC-FUNCTION-NAME) | miscellaneous side - effectful tests of the MOP
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
this file contains tests of ( SETF CLASS - NAME ) and ( SETF
(defpackage "MOP-9"
(:use "CL" "SB-MOP" "TEST-UTIL"... |
4cb38d3b48197ae52baa9a784c2ada6abae98f50afc440de9e33bd131cb0b50d | steshaw/PLAR | intro.ml | (* ========================================================================= *)
(* Simple algebraic expression example from the introductory chapter. *)
(* *)
Copyright ( c ) 2003 - 2007 , . ( See " LICENSE.txt " for details . )
(* =... | null | https://raw.githubusercontent.com/steshaw/PLAR/c143b097d1028963f4c1d24f45a1a56c8b65b838/intro.ml | ocaml | =========================================================================
Simple algebraic expression example from the introductory chapter.
=========================================================================
---------------... | Copyright ( c ) 2003 - 2007 , . ( See " LICENSE.txt " for details . )
type expression =
Var of string
| Const of int
| Add of expression * expression
| Mul of expression * expression;;
START_INTERACTIVE;;
Add(Mul(Const 2,Var "x"),Var "y");;
END_INTERACTIVE;;
let simplify1 expr =
match expr with
A... |
987a8c790dc3ba4cf9d93c6364c182d82d4a628f06f246e0e9ca1cae25df3a55 | well-typed/large-records | R070.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
module Experiment.Generics_LR.Sized.R070 where
import Data.Aeson (Value)
import Bench.HList
import Experiment.Generics_LR
import Common.H... | null | https://raw.githubusercontent.com/well-typed/large-records/551f265845fbe56346988a6b484dca40ef380609/large-records-benchmarks/bench/experiments/Experiment/Generics_LR/Sized/R070.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings # | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.Generics_LR.Sized.R070 where
import Data.Aeson (Value)
import Bench.HList
import Experiment.Generics_LR
import Common.HListOfSize.HL070
hlistToJSON :: HList ExampleFields -> Value
hlistToJSON = gtoJSON |
c0d3fbf64efea713a826fd34da20be0c9a68daba146b618fe84fba14c5e6b945 | fakedata-haskell/fakedata | Food.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Faker.Provider.Food where
import Config
import Control.Monad.Catch
import Control.Monad.IO.Class
import Data.Map.Strict (Map)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Yaml
import Faker
import Faker.... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/src/Faker/Provider/Food.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Faker.Provider.Food where
import Config
import Control.Monad.Catch
import Control.Monad.IO.Class
import Data.Map.Strict (Map)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Yaml
import Faker
import Faker.Internal
import Faker.Provider.TH
i... |
ce3a500f8cc5a530f45451ce3165d82bc2c7d2674d255e6e316b7810f63f8bae | ghc/nofib | nbody.hs |
- Intel Concurrent Collections for ( c ) 2010 , Intel Corporation .
-
- This program is free software ; you can redistribute it and/or modify it
- under the terms and conditions of the GNU Lesser General Public License ,
- version 2.1 , as published by the Free Software Foundation .
-
- This pr... | null | https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/parallel/nbody/nbody.hs | haskell | This step generates the bodies in the system.
Only doing the O(N^2) part in parallel:
This step computes the accelerations of the bodies.
Making this much leCss haskell like to avoid allocation:
Manually inlining to see if the tuples unbox:
The same tag collection prescribes the two step collections .
run :: Int ... |
- Intel Concurrent Collections for ( c ) 2010 , Intel Corporation .
-
- This program is free software ; you can redistribute it and/or modify it
- under the terms and conditions of the GNU Lesser General Public License ,
- version 2.1 , as published by the Free Software Foundation .
-
- This pr... |
13b5bea705ad47a46437dfb488b2ad060f2571e76ce7b9326610c9fb5de184e0 | Bodigrim/arithmoi | Primes.hs | -- |
Module : Math . . Primes
Copyright : ( c ) 2016 - 2018 Andrew . Lelechenko
Licence : MIT
Maintainer : < >
--
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# OPTIONS_GHC -fno - warn - orphans #
module Math.NumberTheory.Primes
( Prime
, unPrime
, toPrimeInt... | null | https://raw.githubusercontent.com/Bodigrim/arithmoi/df789d23341247e9cdb4f690595ea99c89836d09/Math/NumberTheory/Primes.hs | haskell | |
* Old interface
| A class for unique factorisation domains.
following invariants hold:
[]
[]
This function is a replacement
If you were looking for the latter, please import
__Warning:__ there are no guarantees of any particular
[(Prime 101701,1),(Prime 100801,1)]
| Check whether an argument is prime... | Module : Math . . Primes
Copyright : ( c ) 2016 - 2018 Andrew . Lelechenko
Licence : MIT
Maintainer : < >
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# OPTIONS_GHC -fno - warn - orphans #
module Math.NumberTheory.Primes
( Prime
, unPrime
, toPrimeIntegral
... |
47478e997f6c62486c64c42c4ee5f259306112b0a04b31cbff7318ab08163386 | modular-macros/ocaml-macros | pr6899_first_bad.ml | let should_reject =
let table = Hashtbl.create 1 in
fun x y -> Hashtbl.add table x y
| null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/typing-modules-bugs/pr6899_first_bad.ml | ocaml | let should_reject =
let table = Hashtbl.create 1 in
fun x y -> Hashtbl.add table x y
| |
3e6dd4809b48a209bfe35481b5680b89c0d611fe7db3dd72a096a1521738e858 | freizl/dive-into-haskell | nimgame.hs | module Main where
import Control.Monad
type Board = [Int]
main :: IO ()
main = do showBoard (reverse [1..5])
showBoard :: Board -> IO ()
showBoard b = forM_ (map wrapRow b) (\x -> putStrLn x)
wrapRow :: Int -> String
wrapRow n = [ '*' | x <- [1..n] ]
| null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/codes/sandbox/nimgame.hs | haskell | module Main where
import Control.Monad
type Board = [Int]
main :: IO ()
main = do showBoard (reverse [1..5])
showBoard :: Board -> IO ()
showBoard b = forM_ (map wrapRow b) (\x -> putStrLn x)
wrapRow :: Int -> String
wrapRow n = [ '*' | x <- [1..n] ]
| |
65604f8a503281f20f16813262ce86077a2d7acf4c71a17cd6792c92b3eb81a2 | falsetru/htdp | 37.1.5.scm | 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-advanced-reader.ss" "lang")((modname 37.1.5) (read-case-sensitive #t) (teachpacks ((lib "gui.ss" "teachpack" "htdp"))) (htdp-settings #(#t... | null | https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/37/37.1.5.scm | scheme | about the language level of this file in a form that our tools can easily process. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-advanced-reader.ss" "lang")((modname 37.1.5) (read-case-sensitive #t) (teachpacks ((lib "gui.ss" "teachpack" "htdp"))) (htdp-settings #(#t constructor repeating-decimal #t #t none #f ((lib "gui.ss" "teachpack" "htdp")))))
(d... |
331267f4a08c571793191ef0cfe9b0b1cb8c56c2ffd0c6dba491f4ab5193353b | Ptival/chick | Instantiable.hs | # LANGUAGE FlexibleInstances #
module Instantiable where
import Control.Monad.Reader.Class (MonadReader)
import Control.Monad.State.Class (MonadState)
import Inductive.Inductive (Constructor (..))
import qualified Term.TypeChecked as C
import Term.Variable (Variable)
import Typing.GlobalEnvironment (GlobalEnvironment... | null | https://raw.githubusercontent.com/Ptival/chick/a5ce39a842ff72348f1c9cea303997d5300163e2/backend/lib/Instantiable.hs | haskell | # LANGUAGE FlexibleInstances #
module Instantiable where
import Control.Monad.Reader.Class (MonadReader)
import Control.Monad.State.Class (MonadState)
import Inductive.Inductive (Constructor (..))
import qualified Term.TypeChecked as C
import Term.Variable (Variable)
import Typing.GlobalEnvironment (GlobalEnvironment... | |
0ba48b40ee4ed19ba5988593506b25128c463356facfd80195dda725c8df7551 | ocaml/opam | opamPath.ml | (**************************************************************************)
(* *)
Copyright 2012 - 2020 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/ocaml/opam/9e287777ebd14fb52130aa945f792861ec034cd5/src/format/opamPath.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2020 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
open OpamTypes
open OpamFilename.Op
type t = dirname
let ( /- ) dir f = OpamFile.make (dir /... |
d6e20bf5ca93a10fedb808b3604b52949ca8314809bfb008808bc2370178d3d1 | mfoemmel/erlang-otp | xmerl_xpath_parse.erl | -module(xmerl_xpath_parse).
-export([parse/1, parse_and_scan/1, format_error/1]).
-file("xmerl_xpath_parse.yrl", 301).
% token({Token, _Line}) ->
% Token;
% token({Token, _Line, _Value}) ->
% Token.
value({Token, _Line}) ->
Token;
value({_Token, _Line, Value}) ->
Value.
-file("/net/isildur/ldisk/daily_build/otp_... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/xmerl/src/xmerl_xpath_parse.erl | erlang | token({Token, _Line}) ->
Token;
token({Token, _Line, _Value}) ->
Token.
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or i... | -module(xmerl_xpath_parse).
-export([parse/1, parse_and_scan/1, format_error/1]).
-file("xmerl_xpath_parse.yrl", 301).
value({Token, _Line}) ->
Token;
value({_Token, _Line, Value}) ->
Value.
-file("/net/isildur/ldisk/daily_build/otp_prebuild_r13b02.2009-09-21_11/otp_src_R13B02/bootstrap/lib/parsetools/include/yecc... |
ed7bcfdda95257a369cc34dc633fd8fea11152203d5e27d1b07eca9fe01de2e4 | samsergey/formica | formal.rkt | #lang racket/base
;;______________________________________________________________
;; ______
;; ( // _____ ____ . __ __
;; ~//~ ((_)// // / / // ((_ ((_/_
;; (_//
;;..............................................................
; Provides form... | null | https://raw.githubusercontent.com/samsergey/formica/b4410b4b6da63ecb15b4c25080951a7ba4d90d2c/private/formal/formal.rkt | racket | ______________________________________________________________
______
( // _____ ____ . __ __
~//~ ((_)// // / / // ((_ ((_/_
(_//
..............................................................
Provides formal functions.
=================... | #lang racket/base
(require racket/match
racket/contract
racket/syntax
racket/provide-syntax
racket/require-syntax
(for-syntax racket/base
racket/match
racket/list
racket/syntax
"../tools/ta... |
f117cabc19f93a10e5b64cbc24d079971fc97c913a2afbacbe7c9e2147b69dd1 | unnohideyuki/bunny | sample151.hs | main = do
print $ LT == LT
print $ LT == EQ
print $ LT == GT
print $ EQ == LT
print $ EQ == EQ
print $ EQ == GT
print $ GT == LT
print $ GT == EQ
print $ GT == GT
print $ LT /= LT
print $ LT /= EQ
print $ LT /= GT
print $ EQ /= LT
print $ EQ /= EQ
print $ EQ /= GT
print $ GT /= LT
pri... | null | https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample151.hs | haskell | main = do
print $ LT == LT
print $ LT == EQ
print $ LT == GT
print $ EQ == LT
print $ EQ == EQ
print $ EQ == GT
print $ GT == LT
print $ GT == EQ
print $ GT == GT
print $ LT /= LT
print $ LT /= EQ
print $ LT /= GT
print $ EQ /= LT
print $ EQ /= EQ
print $ EQ /= GT
print $ GT /= LT
pri... | |
0fce6d1960d8317eadff49b13665d3b7f24853ae8cc6df8afdc5f5e97dc91ced | meain/evil-textobj-tree-sitter | textobjects.scm | (class_declaration
body: (class_body . "{" . (_) @class.inner._start @class.inner._end (_)? @class.inner._end . "}"
)) @class.outer
(class_declaration
body: (enum_class_body . "{" . (_) @class.inner._start @class.inner._end (_)? @class.inner._end . "}"
)) @class.outer
(function_declaration
body: (functi... | null | https://raw.githubusercontent.com/meain/evil-textobj-tree-sitter/866928d3ee6b4623addc2324f2eebe55e95dd778/queries/swift/textobjects.scm | scheme | (class_declaration
body: (class_body . "{" . (_) @class.inner._start @class.inner._end (_)? @class.inner._end . "}"
)) @class.outer
(class_declaration
body: (enum_class_body . "{" . (_) @class.inner._start @class.inner._end (_)? @class.inner._end . "}"
)) @class.outer
(function_declaration
body: (functi... | |
72087b1da32a4694a9831d3fd3394a3fde7af9444773abf3bd6d12875531d200 | mzp/scheme-abc | codegen.ml | open Base
open Ast
open Node
open Swflib
open MethodType
module QName = struct
let join xs =
String.concat "." xs
let of_stmt_name =
function
`Public {Node.value=(ns,name)} ->
`QName (`Namespace (join ns),name)
| `Internal {Node.value=(ns,name)} ->
`QName (`PackageInternalNamespace (join ns),... | null | https://raw.githubusercontent.com/mzp/scheme-abc/2cb541159bcc32ae4d033793dea6e6828566d503/scm/codegen/codegen.ml | ocaml | class
init class
add to scope | open Base
open Ast
open Node
open Swflib
open MethodType
module QName = struct
let join xs =
String.concat "." xs
let of_stmt_name =
function
`Public {Node.value=(ns,name)} ->
`QName (`Namespace (join ns),name)
| `Internal {Node.value=(ns,name)} ->
`QName (`PackageInternalNamespace (join ns),... |
5033448e972ecc81b6d10c524a5f90abdca2a7decf11ab64a1d1823b06f31835 | haskell/ghcup-hs | Config.hs | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
# LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DuplicateRecordFields #
{-# LANGUAGE RankNTypes #-}
module GHCup.OptParse.Conf... | null | https://raw.githubusercontent.com/haskell/ghcup-hs/e57a8abd3ddebffe08bb05d9cd92589cca216a61/app/ghcup/GHCup/OptParse/Config.hs | haskell | # LANGUAGE QuasiQuotes #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
--------------
[ Commands ]--
--------------
-------------
-------------
add show for a single option
------------
[ Footer ]--
------------
---------------
[ Utilities ]--
---------------
----------------
[ Entrypoint ]--
---------... | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE TypeApplications #
# LANGUAGE FlexibleContexts #
# LANGUAGE TemplateHaskell #
# LANGUAGE DuplicateRecordFields #
module GHCup.OptParse.Config where
import GHCup.Errors
import GHCup.Types
import GHCup.Utils... |
c3e6572e66b4a56856e8b7b46e53bfc2a16a39aa92e6e20bb242aa4fd296deb7 | well-typed-lightbulbs/ocaml-esp32 | harness.ml | external reset_instrumentation : bool -> unit = "caml_reset_afl_instrumentation"
external sys_exit : int -> 'a = "caml_sys_exit"
let name n =
fst (Test.tests.(int_of_string n - 1))
let run n =
snd (Test.tests.(int_of_string n - 1)) ()
let orig_random = Random.get_state ()
let () =
(* Random.set_state orig_rand... | null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/afl-instrumentation/harness.ml | ocaml | Random.set_state orig_random;
Random.set_state orig_random; | external reset_instrumentation : bool -> unit = "caml_reset_afl_instrumentation"
external sys_exit : int -> 'a = "caml_sys_exit"
let name n =
fst (Test.tests.(int_of_string n - 1))
let run n =
snd (Test.tests.(int_of_string n - 1)) ()
let orig_random = Random.get_state ()
let () =
reset_instrumentation true;
... |
4ecce258b47d3f2c9618a2bdee4eb83c1845485aae4d7269838c99b9979cacb6 | anmonteiro/websocket-httpaf | websocket_lwt_io.ml | { { { Copyright ( c ) 2012 - 2014 Anil Madhavapeddy < >
*
* 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 PROVI... | null | https://raw.githubusercontent.com/anmonteiro/websocket-httpaf/3308726f81dbf204657c225b29e88c642b0706d2/lwt/websocket_lwt_io.ml | ocaml |
* Adapted from:
* -cohttp/blob/master/cohttp-lwt-unix/src/io.ml
| { { { Copyright ( c ) 2012 - 2014 Anil Madhavapeddy < >
*
* 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 PROVI... |
65a1147de5b4b1a31dbc3bb58e82a5e7414dcc36d3e362be3a258ce4e5578afa | cj1128/sicp-review | queue.scm | ;; Implements queue abstract data structure
(define (front-ptr queue) (car queue))
(define (rear-ptr queue) (cdr queue))
(define (set-front-ptr! queue item)
(set-car! queue item))
(define (set-rear-ptr! queue item)
(set-cdr! queue item))
(define (empty-queue? queue)
(null? (front-ptr? queue)))
(define (make-que... | null | https://raw.githubusercontent.com/cj1128/sicp-review/efaa2f863b7f03c51641c22d701bac97e398a050/chapter-3/queue.scm | scheme | Implements queue abstract data structure |
(define (front-ptr queue) (car queue))
(define (rear-ptr queue) (cdr queue))
(define (set-front-ptr! queue item)
(set-car! queue item))
(define (set-rear-ptr! queue item)
(set-cdr! queue item))
(define (empty-queue? queue)
(null? (front-ptr? queue)))
(define (make-queue)
(cons '() '()))
(define (front-queue ... |
08b57cac8b67d5ae0799286fa3893660487543db293083d15f980614a564e2c4 | rabbitmq/rabbitmq-common | worker_pool.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(worker_pool).
Generic worker pool mana... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-common/67c4397ffa9f51d87f994aa4db4a68e8e95326ab/src/worker_pool.erl | erlang |
Submitted jobs are functions. They can be executed synchronously
We typically use the worker pool if we want to limit the maximum
parallelism of some job. We are not trying to dodge the cost of
'single' and 'reuse'. Jobs executed in 'single' mode are invoked in
worker process out of the pool. Nested jobs are ... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(worker_pool).
Generic worker pool manager .
... |
7b4274167113c79e53c75bba7f00a271c940fbae7e743b5ed71f830ae3d301bb | freizl/dive-into-haskell | max-two-dim-array.hs | module Main where
import Test.QuickCheck
maximumArrayOfArray :: [[Int]] -> (Int, Int)
maximumArrayOfArray [] = (0, 0)
maximumArrayOfArray xss = (j, k)
where ((_, k), j) = maximumWithIndex $ map maximumWithIndex xss
maximumWithIndex :: Ord a =>
[a]
^ ( MaxValue , its In... | null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/codes/sandbox/max-two-dim-array.hs | haskell | module Main where
import Test.QuickCheck
maximumArrayOfArray :: [[Int]] -> (Int, Int)
maximumArrayOfArray [] = (0, 0)
maximumArrayOfArray xss = (j, k)
where ((_, k), j) = maximumWithIndex $ map maximumWithIndex xss
maximumWithIndex :: Ord a =>
[a]
^ ( MaxValue , its In... | |
5b46b966dd2ce6b0be36803b24c80894a91246ee81baab957e7adb2fd41cfd43 | tamarin-prover/tamarin-prover | Batch.hs | # LANGUAGE FlexibleContexts #
-- |
Copyright : ( c ) 2010 , 2011 &
-- License : GPL v3 (see LICENSE)
--
Maintainer : < >
Portability : GHC only
--
Main module for the Tamarin prover .
module Main.Mode.Batch (
batchMode
) where
import Control.Basics
import Data.List
imp... | null | https://raw.githubusercontent.com/tamarin-prover/tamarin-prover/a8107748bd57d80b41f2f8bf8a756f2cbb4c5049/src/Main/Mode/Batch.hs | haskell | |
License : GPL v3 (see LICENSE)
| Batch processing mode.
[ flagNone ["html"] (addEmptyArg "html")
"generate HTML visualization of proofs"
| Process a theory file.
handles to arguments
---------------------
output generation
------------------
^ Input file name.
^ Output file name.
automatically ge... | # LANGUAGE FlexibleContexts #
Copyright : ( c ) 2010 , 2011 &
Maintainer : < >
Portability : GHC only
Main module for the Tamarin prover .
module Main.Mode.Batch (
batchMode
) where
import Control.Basics
import Data.List
import Data.Bitraversable (bi... |
186881e9acffaea1631f1f573f223c94eda134a9df1b1cc14ab61d8f009702f1 | rbonichon/smtpp | logic.mli | type arith_sort = Integer | Real | Mixed ;;
(* The basic sort upon which arithmetic can be based *)
type arith_kind = Difference | Linear | NonLinear ;;
Kind of arithmetics used in SMT - LIB benchmarks .
They form a simple lattice .
They form a simple lattice.
*)
val max_kind_opt : arith_kind option -> ar... | null | https://raw.githubusercontent.com/rbonichon/smtpp/57eb74bccbb0f30293ee058ded4b01baa1067756/src/logic.mli | ocaml | The basic sort upon which arithmetic can be based
Array theory on / off ? | type arith_sort = Integer | Real | Mixed ;;
type arith_kind = Difference | Linear | NonLinear ;;
Kind of arithmetics used in SMT - LIB benchmarks .
They form a simple lattice .
They form a simple lattice.
*)
val max_kind_opt : arith_kind option -> arith_kind option -> arith_kind option
type t = {
smt... |
d7d504cec9a69304c15b525e8c7f8282d1ae897a10d37856339c0d3f99fbafbb | darcy-shen/dotTeXmacs | init-graph.scm | ; basic functions and macros
(define-macro (foreach i . b)
`(for-each (lambda (,(car i))
,(cons 'begin b))
,(cadr i)))
(define-macro (foreach-number i . b)
`(do ((,(car i) ,(cadr i)
(,(if (memq (caddr i) '(> >=)) '- '+) ,(car i) 1)))
((,(if (eq? (caddr i) '>)
... | null | https://raw.githubusercontent.com/darcy-shen/dotTeXmacs/27833efb9020ba158021cce15c2192c75a152778/legacy-code/graph/progs/init-graph.scm | scheme | basic functions and macros
functions for table
functions for graphics
but in the exported TeXmacs Scheme source file, they are different
functions for struct graph
calculate flag
calculate table content
calculate result
calculate the self geometry and group geometry
get the position of the struct body
input:... | (define-macro (foreach i . b)
`(for-each (lambda (,(car i))
,(cons 'begin b))
,(cadr i)))
(define-macro (foreach-number i . b)
`(do ((,(car i) ,(cadr i)
(,(if (memq (caddr i) '(> >=)) '- '+) ,(car i) 1)))
((,(if (eq? (caddr i) '>)
'<=
(if (eq?... |
260b28f2db154067c60a44c6562b5adcc4b00beeb229d230ef3ea8460460ac1c | synduce/Synduce | test.ml | (* Non-empty lists type. *)
type list = Elt of int * int | Cons of int * int * list
(* A binary search tree with integer keys and positive natural numbers as values. *)
type bst_map = KeyValue of int * int | Node of int * bst_map * bst_map
let rec min_key = function KeyValue (k, v) -> k | Node (a, l, r) -> min (min_k... | null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/benchmarks/constraints/bst/test.ml | ocaml | Non-empty lists type.
A binary search tree with integer keys and positive natural numbers as values.
Return most frequent element with its count. | type list = Elt of int * int | Cons of int * int * list
type bst_map = KeyValue of int * int | Node of int * bst_map * bst_map
let rec min_key = function KeyValue (k, v) -> k | Node (a, l, r) -> min (min_key l) (min_key r)
let rec max_key = function KeyValue (k, v) -> k | Node (a, l, r) -> max (max_key l) (max_key r... |
0723d77c40cbe7e6647cc98df5cdf896224d881e83ed18ac28cb81d850a4d6a6 | lispgames/perfectstorm | quadtree.lisp | (in-package :storm)
(defparameter *quadtree-default-depth* 6)
(defparameter *quadtree-epsilon* 0.0000023)
; new generics
(defgeneric localize (object1 object2))
; for vertices
(defgeneric lines (vertex)) ;
(defgeneric add-neighbour (vertex1 vertex2)) ;
(defgeneric remove-neighbour (vertex1 v... | null | https://raw.githubusercontent.com/lispgames/perfectstorm/a21e0420deb3ec83e9d776241ab37e78c5f29b94/perfectstorm/quadtree.lisp | lisp | new generics
for vertices
for edges
some functions for debugging
build up tree
ATTENTION: possible numerical problems here!
due to numerical inaccuracies it might happen that the bounding-box check below fails
this solution is much faster and seems to work perfectly.
... | (in-package :storm)
(defparameter *quadtree-default-depth* 6)
(defparameter *quadtree-epsilon* 0.0000023)
(defgeneric localize (object1 object2))
returns the interection of the margins of vertex1 and ( as ` line ` object )
(defgeneric weight (edge))
(defgeneric opposite-vertex (edge vertex))
(defgeneric connect... |
14fc808d35f726a6b09eeeb91c7622872aaf175d083beb3932e90a5e4461cd53 | slovnicki/pLam | Config.hs | module Config where
importPath = "import/"
| null | https://raw.githubusercontent.com/slovnicki/pLam/459589cf08fb53051215442ec7b0669106bbf225/src/Config.hs | haskell | module Config where
importPath = "import/"
| |
018a7d3d2ee52326a2369aa9a9c1044b80f65efbe7fb84555c48b84df396d9aa | spechub/Hets | CASL2VSEImport.hs | # LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
|
Module : ./Comorphisms / CASL2VSEImport.hs
Description : embedding from CASL to VSE , plus wrapping procedures
with default implementations
Copyright : ( c ) M.Codescu , DFKI Bremen 2008
License ... | null | https://raw.githubusercontent.com/spechub/Hets/f582640a174df08d4c965d7c0a1ab24d1a31000d/Comorphisms/CASL2VSEImport.hs | haskell | | The identity of the comorphism
default definition is okay
end seq
end block
end procedure body | # LANGUAGE MultiParamTypeClasses , TypeSynonymInstances , FlexibleInstances #
|
Module : ./Comorphisms / CASL2VSEImport.hs
Description : embedding from CASL to VSE , plus wrapping procedures
with default implementations
Copyright : ( c ) M.Codescu , DFKI Bremen 2008
License ... |
5e00b4ce6735ae7e841345a692586844e3f36ca443694732c0828ed418cf6902 | tfausak/patrol | MachException.hs | module Patrol.Type.MachException where
import qualified Data.Aeson as Aeson
import qualified Data.Text as Text
import qualified Patrol.Extra.Aeson as Aeson
-- | <-payloads/types/#machexception>
data MachException = MachException
{ code :: Maybe Int,
exception :: Maybe Int,
name :: Text.Text,
subcode :: ... | null | https://raw.githubusercontent.com/tfausak/patrol/1cae55b3840b328cda7de85ea424333fcab434cb/source/library/Patrol/Type/MachException.hs | haskell | | <-payloads/types/#machexception> | module Patrol.Type.MachException where
import qualified Data.Aeson as Aeson
import qualified Data.Text as Text
import qualified Patrol.Extra.Aeson as Aeson
data MachException = MachException
{ code :: Maybe Int,
exception :: Maybe Int,
name :: Text.Text,
subcode :: Maybe Int
}
deriving (Eq, Show)
i... |
9cde7143bcee3f759dc8f848c85424c27a3a1a67853049102c1e05585cbe8fb7 | reiddraper/knockbox | internal.clj | ;; -------------------------------------------------------------------
Copyright ( c ) 2011 Basho Technologies , 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 with the License . You may obtai... | null | https://raw.githubusercontent.com/reiddraper/knockbox/ed22221759d0d3dbe4f1b1f83355e95e945de729/src/knockbox/internal.clj | clojure | -------------------------------------------------------------------
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 permission... | Copyright ( c ) 2011 Basho Technologies , 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 distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
(ns kno... |
b0bdbc196ab964ea5b83c086d34317bc0c1f06923e3de92f32d8b3e1aecdfd5d | haskell/haskell-language-server | DestructAllNonVarTopMatch.expected.hs | and :: (a, b) -> Bool -> Bool -> Bool
and (a, b) False False = _w0
and (a, b) False True = _w1
and (a, b) True False = _w2
and (a, b) True True = _w3
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/DestructAllNonVarTopMatch.expected.hs | haskell | and :: (a, b) -> Bool -> Bool -> Bool
and (a, b) False False = _w0
and (a, b) False True = _w1
and (a, b) True False = _w2
and (a, b) True True = _w3
| |
ac2704ea82fd641cc4fec27cda4a1da10c49401004c53feb88ecfc9489498821 | dparis/phzr-demo | macros.clj | (ns phzr-demo.macros
(:refer-clojure :exclude [slurp]))
(defmacro slurp [file]
(clojure.core/slurp file))
| null | https://raw.githubusercontent.com/dparis/phzr-demo/9679dc697709bfbba5f1993821ba78b6ccba2a94/src/phzr_demo/macros.clj | clojure | (ns phzr-demo.macros
(:refer-clojure :exclude [slurp]))
(defmacro slurp [file]
(clojure.core/slurp file))
| |
cd4d6aaa3682fa3da6b05601fac76786cc30bdc612ebaecb0b678c24b8e3b7a0 | janestreet/learn-ocaml-workshop | parser.ml | open Core
module Angstrom = struct
include Angstrom
include Base.Monad.Make(struct
type nonrec 'a t = 'a t
let bind t ~f = t >>= f
let map = `Define_using_bind
let return = return
end)
end
open Angstrom
open Angstrom.Let_syntax
module P = struct
let is_space = function | ' ' -> true... | null | https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/solutions/irc-bot/lib/parser.ml | ocaml | open Core
module Angstrom = struct
include Angstrom
include Base.Monad.Make(struct
type nonrec 'a t = 'a t
let bind t ~f = t >>= f
let map = `Define_using_bind
let return = return
end)
end
open Angstrom
open Angstrom.Let_syntax
module P = struct
let is_space = function | ' ' -> true... | |
a0ec71e563d831d9bc167b7bd2e4f5944a657f50cd8a176da3906dda00d04a1d | k00mi/mqtt-hs | keepalive.hs | # Language OverloadedStrings , GADTs #
module Keepalive where
import Control.Concurrent
import Control.Concurrent.STM
import Data.ByteString (ByteString)
import Data.Word (Word16)
import Network.MQTT
import Network.MQTT.Internal
import System.Timeout (timeout)
t :: Topic
t = "topic"
p :: ByteString
p = "payload"
tou... | null | https://raw.githubusercontent.com/k00mi/mqtt-hs/8bade1e192fb4b15db751de70185eac83c2a878d/tests/keepalive.hs | haskell | seconds
dup cmds, publish, wait for timeout, check for keepalive msg | # Language OverloadedStrings , GADTs #
module Keepalive where
import Control.Concurrent
import Control.Concurrent.STM
import Data.ByteString (ByteString)
import Data.Word (Word16)
import Network.MQTT
import Network.MQTT.Internal
import System.Timeout (timeout)
t :: Topic
t = "topic"
p :: ByteString
p = "payload"
tou... |
ff9771bfaad2faaf93ab4ca7e4fb36fde713eeccdee7a32719bf21b47996c765 | gator1/jepsen | comments.clj | (ns jepsen.cockroach.comments
"Checks for a strict serializability anomaly in which T1 < T2, but T2 is
visible without T1.
We perform concurrent blind inserts across n tables, and meanwhile, perform
reads of both tables in a transaction. To verify, we replay the history,
tracking the writes which were known ... | null | https://raw.githubusercontent.com/gator1/jepsen/1932cbd72cbc1f6c2a27abe0fe347ea989f0cfbb/cockroachdb/src/jepsen/cockroach/comments.clj | clojure | Done
We know this value is definitely written
Write is beginning; record precedence
Write is completing; we can now expect to see
it | (ns jepsen.cockroach.comments
"Checks for a strict serializability anomaly in which T1 < T2, but T2 is
visible without T1.
We perform concurrent blind inserts across n tables, and meanwhile, perform
reads of both tables in a transaction. To verify, we replay the history,
tracking the writes which were known ... |
0632d8bba944e9181831237467a9e20147bdaef2e0b41539b3c266ebb2f39af8 | FlowerWrong/mblog | socket_examples.erl | %% ---
Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
%% Copyrights apply to this code. It may not be used to create training material,
%% courses, books, articles, and the like. Contact us if you are in doubt.
%% We make no guarantees that this code is fit for... | null | https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/socket_examples.erl | erlang | ---
Copyrights apply to this code. It may not be used to create training material,
courses, books, articles, and the like. Contact us if you are in doubt.
We make no guarantees that this code is fit for any purpose.
Visit for more book information.
---
(8) | Excerpted from " Programming Erlang , Second Edition " ,
published by The Pragmatic Bookshelf .
-module(socket_examples).
-compile(export_all).
-import(lists, [reverse/1]).
nano_get_url() ->
nano_get_url("www.google.com").
nano_get_url(Host) ->
( 1 )
( 2 )
receive_data(Socket, []).
receive_data(Soc... |
5aefa3c26138543ffd2d2a2baa75ad8c77e8ed10bdd7bfac956485e66f7fbbd8 | tnelson/Forge | reader.rkt | #lang racket/base
(require forge/lang/alloy-syntax/parser)
(require forge/lang/alloy-syntax/tokenizer)
(require (only-in forge/lang/reader
coerce-ints-to-atoms))
(define (read-syntax path port)
(define parse-tree (parse path (make-tokenizer port)))
(define ints-coerced (coerce-ints-to-atoms pars... | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/new-mode/lang/reader.rkt | racket | Only necessary if you run custom stuff here
(require forge/sigs)
Auto-provide all defined values
Used for evaluator
Enable new-mode commands
Only necessary if you run custom stuff here
(require forge/new-mode/library) | #lang racket/base
(require forge/lang/alloy-syntax/parser)
(require forge/lang/alloy-syntax/tokenizer)
(require (only-in forge/lang/reader
coerce-ints-to-atoms))
(define (read-syntax path port)
(define parse-tree (parse path (make-tokenizer port)))
(define ints-coerced (coerce-ints-to-atoms pars... |
39fea6e5e085eaed08f2e867e80b0bf253dfadd0833fb4ea04f61af44913f6e6 | Decentralized-Pictures/T4L3NT | frozen_deposits_storage.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2021 Nomadic Labs < >
(* ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_012_Psithaca/lib_protocol/frozen_deposits_storage.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2021 Nomadic Labs < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN... |
b4b8280daa039a80f20f6aecd15918a1dcc538097b01c5d11c8061e57693c7b7 | jaredly/belt | belt_Id.ml | type ('a,'id) hash = 'a -> int
type ('a,'id) eq = 'a -> 'a -> bool
type ('a,'id) cmp = 'a -> 'a -> int
let getHashInternal: ('a,'id) hash -> 'a -> int = Obj.magic
let getEqInternal: ('a,'id) eq -> 'a -> 'a -> bool = Obj.magic
let getCmpInternal: ('a,'id) cmp -> 'a -> 'a -> int = Obj.magic
module type Comparable =
si... | null | https://raw.githubusercontent.com/jaredly/belt/4d07f859403fdbd3fbfc5a9547c6066d657a2131/belt/belt_Id.ml | ocaml | type ('a,'id) hash = 'a -> int
type ('a,'id) eq = 'a -> 'a -> bool
type ('a,'id) cmp = 'a -> 'a -> int
let getHashInternal: ('a,'id) hash -> 'a -> int = Obj.magic
let getEqInternal: ('a,'id) eq -> 'a -> 'a -> bool = Obj.magic
let getCmpInternal: ('a,'id) cmp -> 'a -> 'a -> int = Obj.magic
module type Comparable =
si... | |
e3b0f2aed3c8aa8fe3dc5f1be5803f451c8dc9014e3aba01399b19eea464d163 | sanette/bogue | b_utils.ml | (** Utilities *)
(* Function names should be unambiguous enough to make it safe to open this
module anywhere. *)
open Tsdl
exception Sdl_error of string
let nop _ = ()
let debug =
let d = try
match Sys.getenv "BOGUE_DEBUG" |> String.capitalize_ascii with
| "YES"
| "1"
| "TRUE" -> true
... | null | https://raw.githubusercontent.com/sanette/bogue/abf8f294855d8f46fd4f68bb33b2c2907f0ec07a/lib/b_utils.ml | ocaml | * Utilities
Function names should be unambiguous enough to make it safe to open this
module anywhere.
set to false for production
messages that can be of interest to the (non developer)
user
use this to disable the debug message
debug_code := !debug_code lor debug_thread;;
TODO: u... | open Tsdl
exception Sdl_error of string
let nop _ = ()
let debug =
let d = try
match Sys.getenv "BOGUE_DEBUG" |> String.capitalize_ascii with
| "YES"
| "1"
| "TRUE" -> true
| _ -> false
| e -> raise e in
ref d
let log_channel = ref stdout
let close_log () = close_out !log_ch... |
4fb0cc1d25d7661ea8b2c387e96d6749f30381f0cc6bfd93b9660fd3664db522 | alan-turing-institute/advent-of-code-2021 | day_10.rkt | #lang racket
; define as const
(define LHS-RHS-MAP (hash #\( #\)
#\[ #\]
#\{ #\}
#\< #\>))
(define (parse-input input-str)
(map string->list (string-split input-str)))
; stack operations
(define (stack-push stack item)
(cons it... | null | https://raw.githubusercontent.com/alan-turing-institute/advent-of-code-2021/525029fba3230ed88deaf61c9f3eb10a3ff35908/day-10/racket_lannelin/day_10.rkt | racket | define as const
stack operations
otherwise error, set illegal item
otherwise is RHS bracket, check match
will always be odd number of items
--------- PARTS ---------
points map provided by puzzle
use chars
no error
else
--------- MAIN ---------
--------- TEST --------- | #lang racket
(define LHS-RHS-MAP (hash #\( #\)
#\[ #\]
#\{ #\}
#\< #\>))
(define (parse-input input-str)
(map string->list (string-split input-str)))
(define (stack-push stack item)
(cons item stack))
(define (stack-pop stack)... |
0383c0a6e8af9b01c05e10dc37d302b8cdcef91f571438c35264f793aaf963d4 | owainlewis/digital-ocean | images.clj | (ns digitalocean.v1.images
(require [digitalocean.v1.core :as core]))
;; GET /images
(defn all-images
"List all Digital Ocean images"
[client-id api-key]
(core/get-for "images" client-id api-key))
(def images (memoize all-images))
(defn ubuntu-images [client-id api-key]
(->> (images client-id api-key)
... | null | https://raw.githubusercontent.com/owainlewis/digital-ocean/25ce510a369429b191ea5b18f0eef77b618ee88d/src/digitalocean/v1/images.clj | clojure | GET /images
GET /images/[image_id]
GET /images/[image_id]/destroy
GET /images/[image_id]/transfer | (ns digitalocean.v1.images
(require [digitalocean.v1.core :as core]))
(defn all-images
"List all Digital Ocean images"
[client-id api-key]
(core/get-for "images" client-id api-key))
(def images (memoize all-images))
(defn ubuntu-images [client-id api-key]
(->> (images client-id api-key)
(filter #(b... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.