_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 |
|---|---|---|---|---|---|---|---|---|
088678b2269f9aa2dd27df3c4e9677cf9725f8446375ff4e3e4f3511dedf5964 | nvim-treesitter/nvim-treesitter | folds.scm | [
(xact)
] @fold
| null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/ddc0f1b606472b6a1ab85ee9becfd4877507627d/queries/ledger/folds.scm | scheme | [
(xact)
] @fold
| |
5a3a35214b4c494e06714cca4eb412337a81bfd96f1bf6db1ebf9214039c05e1 | re-ops/re-gent | loop.clj | (ns re-gent.zero.loop
(:require
[taoensso.nippy :as nippy :refer (thaw)]
[taoensso.timbre :refer (refer-timbre)]
[re-gent.zero.reply :refer (setup-reply reset-reply! peek-send)]
[re-gent.zero.management :refer (process)])
(:import
[org.zeromq ZMsg ZMQ ZMQ$PollItem ZMQ$Poller]))
(refer-timbre)
(defn... | null | https://raw.githubusercontent.com/re-ops/re-gent/78bcd22011a31ca3f19a7221e87a6a7afd7682a5/src/re_gent/zero/loop.clj | clojure | (ns re-gent.zero.loop
(:require
[taoensso.nippy :as nippy :refer (thaw)]
[taoensso.timbre :refer (refer-timbre)]
[re-gent.zero.reply :refer (setup-reply reset-reply! peek-send)]
[re-gent.zero.management :refer (process)])
(:import
[org.zeromq ZMsg ZMQ ZMQ$PollItem ZMQ$Poller]))
(refer-timbre)
(defn... | |
33bb19a30aa16354d3e6bdf7d8c4ef6f795b0a4e643d3769498d9a1bcae4d42a | bravit/hid-examples | AppRWST.hs | module AppRWST where
import Control.Monad.RWS
import AppTypes
type MyApp logEntry state = RWST AppEnv [logEntry] state IO
runMyApp :: MyApp logEntry state a -> AppConfig -> state -> IO (a, [logEntry])
runMyApp app config st = evalRWST app (initialEnv config) st
| null | https://raw.githubusercontent.com/bravit/hid-examples/913e116b7ee9c7971bba10fe70ae0b61bfb9391b/du/AppRWST.hs | haskell | module AppRWST where
import Control.Monad.RWS
import AppTypes
type MyApp logEntry state = RWST AppEnv [logEntry] state IO
runMyApp :: MyApp logEntry state a -> AppConfig -> state -> IO (a, [logEntry])
runMyApp app config st = evalRWST app (initialEnv config) st
| |
f1cb7b9436cc0dfbf222af914bd9ab29a1e97c00b3cf2fef0e98b13f311d1a2e | KeenWill/coat | cfg.ml | open Ll_lib.Ll
open Ll_lib
open Datastructures
(* control flow graphs ------------------------------------------------------ *)
This representation of control - flow graphs is more suited for dataflow
analysis than the abstract syntax defined in fdecl
- a cfg has :
blocks - a map of labels to ... | null | https://raw.githubusercontent.com/KeenWill/coat/b1b179fa3c9feacc0ec4898a4df0264066b46b30/lib/optimizer/cfg.ml | ocaml | control flow graphs ------------------------------------------------------
compute a block's successors ---------------------------------------------
compute a map from block labels to predecessors --------------------------
lookup operations --------------------------------------------------------
convert an ... | open Ll_lib.Ll
open Ll_lib
open Datastructures
This representation of control - flow graphs is more suited for dataflow
analysis than the abstract syntax defined in fdecl
- a cfg has :
blocks - a map of labels to Ll basic block , and
set of labels containing the blocks predece... |
31dbac80e5b5922522ba3d9845ffc5beb201a1cf2ce0aac5f1d013152d79612f | bytekid/mkbtt | transducer.ml | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... | null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/automata/src/transducer.ml | ocaml | ** OPENS *******************************************************************
** MODULES *****************************************************************
** MODULES ****************************************************************
** OPENS ******************************************************************
** TYPES *****... | Copyright 2008 , Christian Sternagel ,
* GNU Lesser General Public License
*
* This file is part of TTT2 .
*
* TTT2 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 ve... |
3d745bc615341239a43f858cdaa9185e51164d9c51bca9b8d304b2703b0d6562 | aman-dureja/arm-cpu-emu | cpu.ml | (* The main CPU class *)
open Binary_operations;;
Central Processing Unit
class cpu =
object (self)
(* General Setup *)
val minReg = 0
val maxReg = 15
Program counter
Stack pointer
val lr = 14 (* Link register *)
val mutable dest : int = 0
val mutable generalRegisters : ... | null | https://raw.githubusercontent.com/aman-dureja/arm-cpu-emu/570c5584d21629b9147768b0d0a33b80c7e7e96b/cpu.ml | ocaml | The main CPU class
General Setup
Link register
Condition code array: [|N; Z; C; V|]
Interstage Registers
Methods and Instruction Execution Stages
Getters and setters exclusively for testing!
N
Z
C
V
Add/Sub instruction
ALU Operations
Hi Register Operations / Branch Exchange
PC Relative Load... |
open Binary_operations;;
Central Processing Unit
class cpu =
object (self)
val minReg = 0
val maxReg = 15
Program counter
Stack pointer
val mutable dest : int = 0
val mutable generalRegisters : bool array array = Array.make 16 (Array.make 32 false)
val mutable memory : bool ar... |
9b19b4c5476fb2b66bac0616e07ba3e3a3c5dc5add1f6e0ee320cf8c968d8ee9 | rleonid/oml | oml_solvers.mli |
Copyright 2015 :
< >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
... | null | https://raw.githubusercontent.com/rleonid/oml/a857d67708827ed00df3f175a942044601ca50cf/src/unc/oml_solvers.mli | ocaml | * Numerically find the roots of passed functions.
* [bisection epsilon lower upper f] iteratively finds the root of [f] between
[lower] and [upper] using the bisection method.
@raise Invalid_argument If the function does not take opposite signs at the
supplied bounds. |
Copyright 2015 :
< >
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
... |
5b096e5018757cf2a71f0349cb1b72c46862448bbe6785f1e0c713734f05f436 | kudu-dynamics/blaze | AddWillCarryOp.hs | module Blaze.Types.Pil.Op.AddWillCarryOp where
-- This module is generated. Please use app/gen_pil_ops/Main.hs to modify.
import Blaze.Prelude
data AddWillCarryOp expr = AddWillCarryOp
{ left :: expr
, right :: expr
} deriving (Eq, Ord, Show, Functor, Foldable, Traversable, Generic, FromJSON, ToJSON)
instance... | null | https://raw.githubusercontent.com/kudu-dynamics/blaze/2220a07d372a817e79525ec2707984b189fe98c9/src/Blaze/Types/Pil/Op/AddWillCarryOp.hs | haskell | This module is generated. Please use app/gen_pil_ops/Main.hs to modify. | module Blaze.Types.Pil.Op.AddWillCarryOp where
import Blaze.Prelude
data AddWillCarryOp expr = AddWillCarryOp
{ left :: expr
, right :: expr
} deriving (Eq, Ord, Show, Functor, Foldable, Traversable, Generic, FromJSON, ToJSON)
instance Hashable a => Hashable (AddWillCarryOp a)
|
52d76c1a32cafcb99a5056cafc2799aa43656ff992a5710a7531741869baa53c | simplegeo/erlang | ssl_broker.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1999 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/ssl/src/ssl_broker.erl | erlang |
%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 implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1999 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(ssl_broker).
-behaviour(gen_serv... |
3f032fee641a660662e03ae77c75162addf69d807f2a72578dfcb4ff60e3fd3a | MinaProtocol/mina | mina_metrics.ml | [%%import "/src/config.mlh"]
open Core_kernel
(* We re-export a constrained subset of prometheus to keep consumers of this
module abstract over implementation.
*)
include Prometheus
open Prometheus
open Namespace
open Metric_generators
open Async_kernel
let time_offset_sec = 1609459200.
[%%inject "block_window_d... | null | https://raw.githubusercontent.com/MinaProtocol/mina/3cece748c078b9d63020e7eed5114f87dd167f68/src/lib/mina_metrics/prometheus_metrics/mina_metrics.ml | ocaml | We re-export a constrained subset of prometheus to keep consumers of this
module abstract over implementation.
textformat serialization and runtime metrics taken from github.com/mirage/prometheus:/app/prometheus_app.ml | [%%import "/src/config.mlh"]
open Core_kernel
include Prometheus
open Prometheus
open Namespace
open Metric_generators
open Async_kernel
let time_offset_sec = 1609459200.
[%%inject "block_window_duration", block_window_duration]
module TextFormat_0_0_4 = struct
let re_unquoted_escapes = Re.compile @@ Re.set "\\\... |
2507473380f5cf4afc729343246917a6dfb3c9e1d7a68930c0ac384f92193b0a | ragkousism/Guix-on-Hurd | databases.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 < >
Copyright © 2015 , 2016 < >
Copyright © 2016 < >
Copyright © 2017 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public ... | null | https://raw.githubusercontent.com/ragkousism/Guix-on-Hurd/e951bb2c0c4961dc6ac2bda8f331b9c4cee0da95/gnu/services/databases.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2015 < >
Copyright © 2015 , 2016 < >
Copyright © 2016 < >
Copyright © 2017 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu services ... |
3b057cd32e81417cc9bab539cd7191fbc44b958495ad44e7b960c2a645bf84b7 | hercules-ci/hercules-ci-agent | Secret.hs | # LANGUAGE ApplicativeDo #
# LANGUAGE BlockArguments #
module Hercules.CLI.Secret where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as A
import qualified Data.Map as M
import qualified Data.Text as T
import Hercules.CLI.Common (exitMsg, runAuthenticated)
import Hercules.CLI.JSON as JSON
import ... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/6e298a833dc5321f7f9ff25bc243e4d7c65d928d/hercules-ci-cli/src/Hercules/CLI/Secret.hs | haskell | # LANGUAGE ApplicativeDo #
# LANGUAGE BlockArguments #
module Hercules.CLI.Secret where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as A
import qualified Data.Map as M
import qualified Data.Text as T
import Hercules.CLI.Common (exitMsg, runAuthenticated)
import Hercules.CLI.JSON as JSON
import ... | |
6a4dbbb507a347cd9990c9a881a15f0942cd01d71b4728928622b7bec48acca8 | herd/herdtools7 | CAstUtils.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/lib/CAstUtils.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2014 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
b41aa53f71207ca543ee59d3814f4668c9e172ac48eedf30c526b0a1f56b7649 | erlymon/erlymon | em_wialon_protocol.erl | %%%-------------------------------------------------------------------
@author
( C ) 2015 , < >
%%% @doc
Erlymon is an open source GPS tracking system for various GPS tracking devices .
%%%
Copyright ( C ) 2015 , < > .
%%%
This file is part of Erlymon .
%%%
Erlymon is free software : yo... | null | https://raw.githubusercontent.com/erlymon/erlymon/2250619783d6da1e33a502911a8fa52ce016c094/apps/erlymon/src/em_hardware/protocols/em_wialon_protocol.erl | erlang | -------------------------------------------------------------------
@doc
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
along with this program. If not, see </>.
@end
-------------------------------------------------------... | @author
( C ) 2015 , < >
Erlymon is an open source GPS tracking system for various GPS tracking devices .
Copyright ( C ) 2015 , < > .
This file is part of Erlymon .
Erlymon is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Publ... |
be771a9473dc564e648f6078a10ac309894a8920b31aabf6440bbb50d65d23dc | rd--/hsc3 | wrapIndex.help.hs | wrapIndex ; c.f . index
let b = asLocalBufId 'α' [200,300,400,500,600,800]
x = mouseX kr 0 18 Linear 0.1
f = wrapIndex b x
in sinOsc ar f 0 * 0.1
| null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/wrapIndex.help.hs | haskell | wrapIndex ; c.f . index
let b = asLocalBufId 'α' [200,300,400,500,600,800]
x = mouseX kr 0 18 Linear 0.1
f = wrapIndex b x
in sinOsc ar f 0 * 0.1
| |
dba8531786db7d81e9857e179a305935d4ae2dc73b02432268216a433e27f96d | ijp/guildhall | port-tracker.scm | #!r6rs
(library (guildhall ext trc-testing port-tracker)
(export make-port-tracker
port-tracker-port
port-tracker-column
port-tracker-row
port-tracker-fresh-line
port-tracker-flush)
(import (rnrs base)
(rnrs control)
(rnrs io ports)
(s... | null | https://raw.githubusercontent.com/ijp/guildhall/2fe2cc539f4b811bbcd69e58738db03eb5a2b778/guildhall/ext/trc-testing/port-tracker.scm | scheme | Port tracker | #!r6rs
(library (guildhall ext trc-testing port-tracker)
(export make-port-tracker
port-tracker-port
port-tracker-column
port-tracker-row
port-tracker-fresh-line
port-tracker-flush)
(import (rnrs base)
(rnrs control)
(rnrs io ports)
(s... |
750f5d0492d865c8bdb3f0a1826acf7fc01890ae98a28f0108c663cf152590de | grin-compiler/ghc-wpc-sample-programs | TermCheck.hs | # LANGUAGE BangPatterns #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ImplicitParams #
{-# LANGUAGE NondecreasingIndentation #-}
Checking for Structural recursion
Authors : , , ,
and others
Created : 2... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/Termination/TermCheck.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE NondecreasingIndentation #
| Call graph with call info for composed calls.
| The result of termination checking a module.
| Entry point: Termination check a single declaration.
Precondition: 'envMutualBlock' must be set correctly.
| Termination check a single... | # LANGUAGE BangPatterns #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ImplicitParams #
Checking for Structural recursion
Authors : , , ,
and others
Created : 2007 - 05 - 28
Source : . Rules . Decl
Authors: Andreas Abel, Nils Anders Dan... |
f51d7697d9a8d7c776e1689bf02c8d0de92263a10418ca8ac176855cdb96cd40 | chiroptical/thinking-with-types | Lib.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Lib where
import GHC.TypeLits
instance
( TypeError
( Text "Attempting to interpret a number as a function "
:$$: Text "in the type `"
:<>: ShowType (a -> b)
:<>: Text "'"
:$$: Text ... | null | https://raw.githubusercontent.com/chiroptical/thinking-with-types/781f90f1b08eb94ef3600c5b7da92dfaf9ea4285/Chapter12/src/Lib.hs | haskell | This will never compile! It will always emit the type level
error!
foo :: TypeError (Text "This should trigger always, yes?") => a
foo = undefined | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Lib where
import GHC.TypeLits
instance
( TypeError
( Text "Attempting to interpret a number as a function "
:$$: Text "in the type `"
:<>: ShowType (a -> b)
:<>: Text "'"
:$$: Text ... |
9f9f8ba2d3e851958354111942f65c35458ad6d690a1d876930107c7d48adf03 | skruger/ClusterSupervisor | service_manager.erl | %%% -------------------------------------------------------------------
Author : skruger
%%% Description :
%%%
Created : Mar 4 , 2011
%%% -------------------------------------------------------------------
-module(service_manager).
-behaviour(gen_server).
%% ------------------------------------------------------... | null | https://raw.githubusercontent.com/skruger/ClusterSupervisor/92db35944c3da1efdaa8b0b84cc701ad23ee1281/src/service_manager.erl | erlang | -------------------------------------------------------------------
Description :
-------------------------------------------------------------------
--------------------------------------------------------------------
Include files
--------------------------------------------------------------------
----------... | Author : skruger
Created : Mar 4 , 2011
-module(service_manager).
-behaviour(gen_server).
-export([]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
-record(state, {}).
{ ok , State , Timeout } |
init([]) ->
{ok, #state{}}.
Function : handle_... |
e9c0b88c12f1bd68fbba4bf772ca101aa2f9c1cc2fdf3b581fb6af016851d18a | pedestal/samples | dev.clj | Copyright 2013 Relevance , Inc.
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( )
; 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 licens... | null | https://raw.githubusercontent.com/pedestal/samples/caaf04afe255586f8f4e1235deeb0c1904179355/cors/dev/dev.clj | clojure | The use and distribution terms for this software are covered by the
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 this notice, or any other, from this software.
d... | Copyright 2013 Relevance , Inc.
Eclipse Public License 1.0 ( )
(ns dev
(:require [io.pedestal.service.http :as bootstrap]
[cors.service :as service]
[cors.server :as server]))
(def service (-> service/service
(merge {:env :dev
::bootstrap/joi... |
4794164604d14399468388e02bba293d1d7eead640383d9693966fe7ec2747a3 | yrashk/erlang | wxe_server.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/wx/src/wxe_server.erl | erlang |
%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 implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
Author :
Created : 17 Jan 2007 b... |
115fc8d6c0ce77aee198968bd759513d89abb8f26c35ef2b9d8161cd860e6de7 | lspitzner/brittany | Test398.hs | -- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
func = ($)
where
# INLINE ( $ ) #
($) = id
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test398.hs | haskell | brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } | func = ($)
where
# INLINE ( $ ) #
($) = id
|
96ebe31c2d6b5ea25c207c262eab2e17149bda7ea6b3c4f8683445b446d0da61 | erlymon/erlymon | em_http_utils.erl | %%%-------------------------------------------------------------------
@author
( C ) 2015 , < >
%%% @doc
Erlymon is an open source GPS tracking system for various GPS tracking devices .
%%%
Copyright ( C ) 2015 , < > .
%%%
This file is part of Erlymon .
%%%
Erlymon is free software : yo... | null | https://raw.githubusercontent.com/erlymon/erlymon/2250619783d6da1e33a502911a8fa52ce016c094/apps/erlymon/src/em_http/em_http_utils.erl | erlang | -------------------------------------------------------------------
@doc
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
along with this program. If not, see </>.
@end
-------------------------------------------------------... | @author
( C ) 2015 , < >
Erlymon is an open source GPS tracking system for various GPS tracking devices .
Copyright ( C ) 2015 , < > .
This file is part of Erlymon .
Erlymon is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Publ... |
b33998bc27a108e650a766a380f5fd78b29ee5112b5581c932763e5ea34a29b6 | haskell-repa/repa | Sel.hs |
module Data.Array.Repa.Series.Sel
( Sel1 (..)
, mkSel1)
where
import Data.Array.Repa.Series.Process
import Data.Array.Repa.Series.Vector as V
import Data.Array.Repa.Series.Series as S
import Data.Vector.Primitive as P
import System.IO.Unsafe
import Data.Word
import GHC.Exts
-- | Sele... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/icebox/abandoned/repa-series/Data/Array/Repa/Series/Sel.hs | haskell | | Selectors.
| Create a new selector from a series of flags. |
module Data.Array.Repa.Series.Sel
( Sel1 (..)
, mkSel1)
where
import Data.Array.Repa.Series.Process
import Data.Array.Repa.Series.Vector as V
import Data.Array.Repa.Series.Series as S
import Data.Vector.Primitive as P
import System.IO.Unsafe
import Data.Word
import GHC.Exts
data Sel1... |
2d797e204af52549bb95bda2f9f9e46aa107e4f8a506bd9ea878e41a0f851d08 | aiya000/haskell-examples | Main.hs | # LANGUAGE DefaultSignatures #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators #
import Data.Bits ((.&.), shiftR)
import Data.Char (ord)
import Data.Semigroup ((<>))
import GHC.Generics
data Sugar = Sugar
{ sweet :: String
, moon :: Int
} deriving (Generic, Show)
instance Seri... | null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Language/Haskell/Extension/DeriveGeneric/Main.hs | haskell | # LANGUAGE DefaultSignatures #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators #
import Data.Bits ((.&.), shiftR)
import Data.Char (ord)
import Data.Semigroup ((<>))
import GHC.Generics
data Sugar = Sugar
{ sweet :: String
, moon :: Int
} deriving (Generic, Show)
instance Seri... | |
37d2efb42c24c1aac4ae4d8864e84a47b20773995560dc3337033d704aa75340 | RefactoringTools/HaRe | B.hs | module B where
import A(T)
g = T
| null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/base/Modules/tests/4/B.hs | haskell | module B where
import A(T)
g = T
| |
5b0b1bfefb54c7b7811b5718641f74bccd9e2e5bea54205442dc15ef9413b80f | ricardobcl/DottedDB | dotted_db_coverage_fsm_sup.erl | @doc Supervise the dotted_db_coverage FSM .
-module(dotted_db_coverage_fsm_sup).
-behavior(supervisor).
-export([start_link/0,
start_coverage_fsm/1]).
-export([init/1]).
start_coverage_fsm(Args) ->
supervisor:start_child(?MODULE, Args).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MOD... | null | https://raw.githubusercontent.com/ricardobcl/DottedDB/e3b96a9ec77439af90f94a80b875a01732c1425e/src/dotted_db_coverage_fsm_sup.erl | erlang | @doc Supervise the dotted_db_coverage FSM .
-module(dotted_db_coverage_fsm_sup).
-behavior(supervisor).
-export([start_link/0,
start_coverage_fsm/1]).
-export([init/1]).
start_coverage_fsm(Args) ->
supervisor:start_child(?MODULE, Args).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MOD... | |
c3fc121f810bc04665becd5aefafa02e8fb349bbc076596fdc748b403163adf7 | satori-com/mzbench | mzb_metrics.erl | -module(mzb_metrics).
-export([start_link/4,
declare_metric/5,
declare_metrics/1,
local_declare_metrics/1,
notify/2,
get_value/1,
get_by_wildcard/1,
get_local_values/1,
final_trigger/0,
get_failed_asserts/0,
build_metric_groups/1... | null | https://raw.githubusercontent.com/satori-com/mzbench/02be2684655cde94d537c322bb0611e258ae9718/node/apps/mzbench/src/mzb_metrics.erl | erlang | ===================================================================
API
===================================================================
director is supposed to send Metric value back with Ref
(which is callback function). Director is not supposed to call
callback directly.
=====================================... | -module(mzb_metrics).
-export([start_link/4,
declare_metric/5,
declare_metrics/1,
local_declare_metrics/1,
notify/2,
get_value/1,
get_by_wildcard/1,
get_local_values/1,
final_trigger/0,
get_failed_asserts/0,
build_metric_groups/1... |
8a13bf4a36bf465d16031821ac5d91d85fd71607bab378bfb8bfe2935d8811a2 | sboehler/beans | Infer.hs | module Beans.Command.Infer
( run,
Options (..),
)
where
import qualified Beans.Account as Account
import Beans.Command (Command (..), Directive (..))
import qualified Beans.Infer as Infer
import Beans.Parser (directives, parseFile, parseSource)
import qualified Beans.Transaction as Transaction
import Control.M... | null | https://raw.githubusercontent.com/sboehler/beans/897fc30a602f49906eb952c4fd5c8c0bf05a6beb/src/Beans/Command/Infer.hs | haskell | module Beans.Command.Infer
( run,
Options (..),
)
where
import qualified Beans.Account as Account
import Beans.Command (Command (..), Directive (..))
import qualified Beans.Infer as Infer
import Beans.Parser (directives, parseFile, parseSource)
import qualified Beans.Transaction as Transaction
import Control.M... | |
92d48aa5019e0c85759d9285d2100c62a4ff31d3dce4fdb9f036cc09910df42b | commsor/titanoboa | server.clj | Copyright ( c ) Commsor Inc. All rights reserved .
; The use and distribution terms for this software are covered by the
; GNU Affero General Public License v3.0 (/#AGPL)
; which can be found in the LICENSE at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; th... | null | https://raw.githubusercontent.com/commsor/titanoboa/32d9df41c654dc1c9dbf9a0be299742a96efa33f/src/clj/titanoboa/server.clj | clojure | The use and distribution terms for this software are covered by the
GNU Affero General Public License v3.0 (/#AGPL)
which can be found in the LICENSE 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 this notice,... | Copyright ( c ) Commsor Inc. All rights reserved .
(ns titanoboa.server
(:gen-class)
(:require [clojure.repl]
[clojure.tools.namespace.find :as ns.find]
[clojure.java.io :as io]
[clojure.java.classpath :as cp]
[titanoboa.handler :as handler]
[ring.adapt... |
146f6e23556b0bd118778a8145ae733de57c329999db58d4e4227242a10b363a | jvf/scalaris | yaws_xmlrpc.erl | %% -*- coding: Latin-1 -*-
Copyright ( C ) 2003 < > .
%% All rights reserved.
%%
Copyright ( C ) 2006 < >
< >
%% All rights reserved.
%%
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions
%% a... | null | https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/contrib/yaws/src/yaws_xmlrpc.erl | erlang | -*- coding: Latin-1 -*-
All rights reserved.
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.
copyright notice, this list of ... | Copyright ( C ) 2003 < > .
Copyright ( C ) 2006 < >
< >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ` ` AS IS '' AND ANY EXPRESS
DIRECT , INDIRECT , INCI... |
451cea5c965302db5328e08e64a3c2d139916b6254d5a2f62350a84b424c4b3f | ocsigen/eliom | eliom_request_info.client.ml | Ocsigen
*
* Module eliom_sessions.ml
* Copyright ( C ) 2009
*
* 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 exception ;
* either version 2.1 ... | null | https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/lib/eliom_request_info.client.ml | ocaml | TODO: add missing functions to get
(almost) the same interface as server side
- Part of sp is reconstructed client side
- Another part is sent as application parameter (sitedata)
- Antother part is sent with each request
returns current path, not the one when application started
The request data used wh... | Ocsigen
*
* Module eliom_sessions.ml
* Copyright ( C ) 2009
*
* 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 exception ;
* either version 2.1 ... |
42ce528db6a5a9ce0fdd51d7d6cd7aeb5db83f75767213de4ed342790709453b | kim/opentracing | Propagation.hs | |
Module : OpenTracing . Propagation
Types and functions for serializing and deserializing ` SpanContext`s across
process boundaries .
One of the big motiviating use cases for propagation is for tracing distributed
executions through RPC calls .
Module: OpenTracing.Propagation
Types and functions for ser... | null | https://raw.githubusercontent.com/kim/opentracing/2d71afa9c5688acf3fca0ff08c1775083440d4f7/opentracing/OpenTracing/Propagation.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
, Binary
* Re-exports from 'Data.Vinyl'
type Binary = Lazy.ByteS... | |
Module : OpenTracing . Propagation
Types and functions for serializing and deserializing ` SpanContext`s across
process boundaries .
One of the big motiviating use cases for propagation is for tracing distributed
executions through RPC calls .
Module: OpenTracing.Propagation
Types and functions for ser... |
5fc84d5521facd8577bd1b4f6f19d6d0b84fb93e12e07daa97b98b7a645a3a3a | f-o-a-m/kepler | ClientUtils.hs | module Tendermint.Utils.ClientUtils where
import Control.Monad (unless)
import Data.Aeson (ToJSON)
import Data.Aeson.Encode.Pretty (encodePretty)
import Data.Proxy
import Data.String.Conversions ... | null | https://raw.githubusercontent.com/f-o-a-m/kepler/6c1ad7f37683f509c2f1660e3561062307d3056b/hs-abci-test-utils/src/Tendermint/Utils/ClientUtils.hs | haskell | ------------------------------------------------------------------------------
| Tx helpers
------------------------------------------------------------------------------
get the logged events from a deliver response,
check for a specific check response code
check for a specific check response code
----------------... | module Tendermint.Utils.ClientUtils where
import Control.Monad (unless)
import Data.Aeson (ToJSON)
import Data.Aeson.Encode.Pretty (encodePretty)
import Data.Proxy
import Data.String.Conversions ... |
b572ce38acfcb08228aa8fee61dea87c153c5410ec8f049e3c285ea949eb7a6c | UChicago-PL/smyth | desugar.ml | open Lang
let annotate_rec_name : string -> exp -> exp =
fun rec_name exp ->
match exp with
| EFix (_, param, body) ->
EFix (Some rec_name, param, body)
| _ ->
exp
let lett : typ -> string -> exp -> exp -> exp =
fun the_typ name binding body ->
EApp
( false
, E... | null | https://raw.githubusercontent.com/UChicago-PL/smyth/08fea281f70d3ee604fde9dde140c8a570d6905d/lib/smyth/desugar.ml | ocaml | open Lang
let annotate_rec_name : string -> exp -> exp =
fun rec_name exp ->
match exp with
| EFix (_, param, body) ->
EFix (Some rec_name, param, body)
| _ ->
exp
let lett : typ -> string -> exp -> exp -> exp =
fun the_typ name binding body ->
EApp
( false
, E... | |
48ddf24a947d16b7fd3142d2a86931e3df65a4a2bf913f87bc75eedfaf2ee086 | tov/dssl2 | map.rkt | #lang dssl2
let v = [0, 1, 2, 3]
assert v.map(proc()) == v
let w = v.map(lambda x: x + 2)
assert w == [2, 3, 4, 5]
| null | https://raw.githubusercontent.com/tov/dssl2/105d18069465781bd9b87466f8336d5ce9e9a0f3/test/dssl2/map.rkt | racket | #lang dssl2
let v = [0, 1, 2, 3]
assert v.map(proc()) == v
let w = v.map(lambda x: x + 2)
assert w == [2, 3, 4, 5]
| |
2e7b60486fe1e5e972bc0bbd2437edb7211d4ac2348e47fa4a1e10d05e86b5fc | alexbs01/OCaml | shortest.ml | no
let notMem l e =
not (List.mem e l)
let rec intTree tree (x, y) =
match tree with
[] -> false
| h::t ->
if h = (x, y)
then true
else intTree t (x, y)
legal
let legalMoves visited s tree =
let (x, y) = List.hd visited
in let rec all_moves t =
if t > 0
then [x ... | null | https://raw.githubusercontent.com/alexbs01/OCaml/c71ccf1289e7b158847ec2a3a8209ddb126b834c/p10/shortest.ml | ocaml | no
let notMem l e =
not (List.mem e l)
let rec intTree tree (x, y) =
match tree with
[] -> false
| h::t ->
if h = (x, y)
then true
else intTree t (x, y)
legal
let legalMoves visited s tree =
let (x, y) = List.hd visited
in let rec all_moves t =
if t > 0
then [x ... | |
0d0653d12fa614bd78a78610f5a36c9012a6563712debce7835a8713b92f59fa | fission-codes/fission | Types.hs | module Fission.CLI.Parser.Types (Options (..)) where
import qualified RIO.Text as Text
import Fission.Prelude
import Fission.Web.API.Remote
import Web.DID.Types
import Fission.CLI.Parser.Command.Types
import Fission.CLI.Parser.Verbose.Types
... | null | https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/fission-cli/library/Fission/CLI/Parser/Types.hs | haskell | ^ The actual command
^ Show verbose output
^ Remote environment
^ DID of remote server | module Fission.CLI.Parser.Types (Options (..)) where
import qualified RIO.Text as Text
import Fission.Prelude
import Fission.Web.API.Remote
import Web.DID.Types
import Fission.CLI.Parser.Command.Types
import Fission.CLI.Parser.Verbose.Types
... |
aaed5a38d4dbf83a876f527e655b815a76da30ceaccb3d26000dfd72c33bff2b | dym/movitz | eval.lisp | ;;;;------------------------------------------------------------------
;;;;
Copyright ( C ) 2000 - 2005 ,
Department of Computer Science , University of Tromso , Norway
;;;;
;;;; Filename: eval.lisp
;;;; Description:
Author : < >
Created at : Thu Nov 2 17:45:05 2000
;;;; Distri... | null | https://raw.githubusercontent.com/dym/movitz/56176e1ebe3eabc15c768df92eca7df3c197cb3d/eval.lisp | lisp | ------------------------------------------------------------------
Filename: eval.lisp
Description:
Distribution: See the accompanying file COPYING.
------------------------------------------------------------------
anything else is self-evaluating.
(defun isconst (x)
... | Copyright ( C ) 2000 - 2005 ,
Department of Computer Science , University of Tromso , Norway
Author : < >
Created at : Thu Nov 2 17:45:05 2000
$ I d : eval.lisp , v 1.13 2008 - 04 - 27 19:17:17 ffjeld Exp $
(in-package movitz)
(defun in-package-form-p (form)
(and (consp form)
... |
f6858b53cc11ec7f6f7cfaa09835522878939c512eab6ffe0f138c2a6f9dcc6c | rabbitmq/rabbitmq-management | rabbit_mgmt_wm_node_memory_ets.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_mgmt_wm_node_memory_ets).
-export... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-management/543906f01ccd0344aff648f21bb6b5156b2a2ca2/src/rabbit_mgmt_wm_node_memory_ets.erl | erlang |
--------------------------------------------------------------------
-------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_mgmt_wm_node_memory_ets).
-export([init... |
4ca84417a4ee0965cf693dd9f5cb5c579e2d8ec8166360e76bb4814d50227817 | Vortecsmaster/EmurgoAcademyPlutusExamples | Utils.hs | # LANGUAGE NoImplicitPrelude #
module Common.Utils where
import Ledger
import PlutusTx.Prelude
import Plutus.V1.Ledger.Value
# INLINABLE info #
info :: ScriptContext -> TxInfo
info = scriptContextTxInfo
# INLINABLE hasUTxO #
hasUTxO :: TxOutRef -> ScriptContext -> Bool
hasUTxO utxo ctx = any (\i -> txInInfoOutRe... | null | https://raw.githubusercontent.com/Vortecsmaster/EmurgoAcademyPlutusExamples/7a360ac043e9ceb6146cf73cbd2a546af492c984/V1/LendingPlatform/src/Common/Utils.hs | haskell | # INLINEABLE valuePaidToAddress # | # LANGUAGE NoImplicitPrelude #
module Common.Utils where
import Ledger
import PlutusTx.Prelude
import Plutus.V1.Ledger.Value
# INLINABLE info #
info :: ScriptContext -> TxInfo
info = scriptContextTxInfo
# INLINABLE hasUTxO #
hasUTxO :: TxOutRef -> ScriptContext -> Bool
hasUTxO utxo ctx = any (\i -> txInInfoOutRe... |
67d3410ae7685fbc28b7d34fbf1ceb75f2ef02d58d8ff51b0ba826d5828a2945 | qkrgud55/ocamlmulti | ratio.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Crista... | null | https://raw.githubusercontent.com/qkrgud55/ocamlmulti/74fe84df0ce7be5ee03fb4ac0520fb3e9f4b6d1f/otherlibs/num/ratio.mli | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : ratio.mli 12301 2012 - 03 - 31 22:10:34... |
7a404e9f6c80a715cd5b6f9858e80401b3c2edbd95514265c78e2a613f7227eb | quek/paiprolog | krep1.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; -*-
;;; Code from Paradigms of Artificial Intelligence Programming
Copyright ( c ) 1991
krep1.lisp : Knowledge representation code ; first version .
(requires "prolog")
;;; ==============================
;; An nlist is implemented as a (count . elements) pair:
(defun ... | null | https://raw.githubusercontent.com/quek/paiprolog/012d6bb255d8af7f1c8b1d061dcd8a474fb3b57a/krep1.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; -*-
Code from Paradigms of Artificial Intelligence Programming
first version .
==============================
An nlist is implemented as a (count . elements) pair:
==============================
==============================
==============================
don't index on ... | Copyright ( c ) 1991
(requires "prolog")
(defun make-empty-nlist ()
"Create a new, empty nlist."
(cons 0 nil))
(defun nlist-n (x) "The number of elements in an nlist." (car x))
(defun nlist-list (x) "The elements in an nlist." (cdr x))
(defun nlist-push (item nlist)
"Add a new element to an nlist."
(... |
ab63cf8c45d6482b064cc1461050b730d87afbd451815be8e392e5dcab774368 | exercism/common-lisp | meetup-test.lisp | ;; Ensures that meetup.lisp and the testing library are always loaded
(eval-when (:compile-toplevel :load-toplevel :execute)
(load "meetup")
(quicklisp-client:quickload :fiveam))
;; Defines the testing package with symbols from meetup and FiveAM in scope
;; The `run-tests` function is exported for use by both the ... | null | https://raw.githubusercontent.com/exercism/common-lisp/f3cdf6cf7e607138d1bb4d26c57999d4364af243/exercises/practice/meetup/meetup-test.lisp | lisp | Ensures that meetup.lisp and the testing library are always loaded
Defines the testing package with symbols from meetup and FiveAM in scope
The `run-tests` function is exported for use by both the user and test-runner
Enter the testing package
Define and enter a new FiveAM test-suite | (eval-when (:compile-toplevel :load-toplevel :execute)
(load "meetup")
(quicklisp-client:quickload :fiveam))
(defpackage :meetup-test
(:use :cl :fiveam)
(:export :run-tests))
(in-package :meetup-test)
(def-suite* meetup-suite)
(test monteeth-of-may-2013
(is (equal '(2013 5 13) (meetup:meetup 5 2013 :monday... |
f6b924810316d24fb203089a3666a2886afdc64d3ef45d914264cd8f3ae4ee8e | brendanhay/gogol | Types.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/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-texttospeech/gen/Gogol/TextToSpeech/Types.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
* Configuration
* Types
** Xgafv
** AudioConfig_AudioEncoding
** ListVoicesResponse
** SynthesisInput
** Voice
** Voice_SsmlGender
** VoiceSelectionParams_SsmlGender | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
e53e0171b363c1dfc877c62bdcbcaca0fec261f8ad62f617e298698f89c1c444 | thheller/shadow-cljs | common.clj | (ns shadow.cljs.devtools.server.web.common
(:require [shadow.server.assets :as assets]
[hiccup.page :refer (html5)]
[hiccup.core :refer (html)]
[clojure.java.io :as io]
[shadow.core-ext :as core-ext]
[cljs.compiler :as cljs-comp]))
(defn not-found
([req]
... | null | https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/main/shadow/cljs/devtools/server/web/common.clj | clojure | not-acceptable | (ns shadow.cljs.devtools.server.web.common
(:require [shadow.server.assets :as assets]
[hiccup.page :refer (html5)]
[hiccup.core :refer (html)]
[clojure.java.io :as io]
[shadow.core-ext :as core-ext]
[cljs.compiler :as cljs-comp]))
(defn not-found
([req]
... |
f0d72b4bd292e6e86a1e14508afb4691ed7de98af48568aa0ac3038504782f98 | uwplse/coq-plugin-lib | funutils.ml | (*
* Utilities for functions (lambda) and function types (prod)
*)
open Constr
(* --- Constructing functions and function types --- *)
(* Recursively turn a product into a function *)
let rec prod_to_lambda trm =
match kind trm with
| Prod (n, t, b) ->
mkLambda (n, t, prod_to_lambda b)
| _ ->
trm
... | null | https://raw.githubusercontent.com/uwplse/coq-plugin-lib/b249fc1954e2f1bc0b776e2d06e8ec1fc4d48ad9/src/coq/termutils/funutils.ml | ocaml |
* Utilities for functions (lambda) and function types (prod)
--- Constructing functions and function types ---
Recursively turn a product into a function
Recursively turn a function into a product
--- Basic questions about functions or function types ---
* Get the arity of a function or function type
|
open Constr
let rec prod_to_lambda trm =
match kind trm with
| Prod (n, t, b) ->
mkLambda (n, t, prod_to_lambda b)
| _ ->
trm
let rec lambda_to_prod trm =
match kind trm with
| Lambda (n, t, b) ->
mkProd (n, t, lambda_to_prod b)
| _ ->
trm
let rec arity p =
match kind p with
| ... |
3e5896d8a3c6142732a4e89dec5bdf0499d0d2e23619889e07d72f54825a0b18 | PacktWorkshops/The-Clojure-Workshop | testing_randomness.clj | (ns packt-clj.testing-randomness)
;;; In REPL
(def random-ints (doall
(take 10000000
(repeatedly (partial rand-int 1000)))))
;;; In REPL
(defn int-count [i xs]
(count (filter #(= % i) xs)))
;;; In REPL
(map #(int-count % random-ints) [0 1 2 45 788 500 999 ])
;;; In RE... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter12/Exercise12.01/testing_randomness.clj | clojure | In REPL
In REPL
In REPL
In REPL
In REPL | (ns packt-clj.testing-randomness)
(def random-ints (doall
(take 10000000
(repeatedly (partial rand-int 1000)))))
(defn int-count [i xs]
(count (filter #(= % i) xs)))
(map #(int-count % random-ints) [0 1 2 45 788 500 999 ])
(time (doall (map #(int-count % random-ints) ... |
26552823264615460befef13260f4d29f5489cc849a20724dcb31a458120e1ec | cxphoe/SICP-solutions | 1.42.rkt | (define (compose f g)
(lambda (x)
(f (g x))))
( ( compose ( lambda ( x ) ( * x x ) ) ( lambda ( x ) ( + x 1 ) ) ) 6 ) | null | https://raw.githubusercontent.com/cxphoe/SICP-solutions/d35bb688db0320f6efb3b3bde1a14ce21da319bd/Chapter%201-Building%20Abstractions%20with%20Procedures/1.42.rkt | racket | (define (compose f g)
(lambda (x)
(f (g x))))
( ( compose ( lambda ( x ) ( * x x ) ) ( lambda ( x ) ( + x 1 ) ) ) 6 ) | |
69624505439931d5aed7b72a2c71da81dfd5c1293362ffd2e4a8a428fdabe472 | turquoise-hexagon/euler | solution.scm | (import
(chicken io)
(chicken string)
(euler)
(srfi 1))
(define digits (range 1 9))
(define (import-input)
(map
(lambda (s)
(map char->integer (string->list s)))
(string-split (read-line) "\",")))
(define-syntax helper!
(syntax-rules ()
((_ acc l i)
(for-each
(lambda (c)
... | null | https://raw.githubusercontent.com/turquoise-hexagon/euler/3566bf9cd30f822354c93cdd37bbe15d92cf1102/src/098/solution.scm | scheme | (import
(chicken io)
(chicken string)
(euler)
(srfi 1))
(define digits (range 1 9))
(define (import-input)
(map
(lambda (s)
(map char->integer (string->list s)))
(string-split (read-line) "\",")))
(define-syntax helper!
(syntax-rules ()
((_ acc l i)
(for-each
(lambda (c)
... | |
1cc56a8160310f29660b2b283ab0f9ed06b201311ed2a3b7cd49e969b816514c | HunterYIboHu/htdp2-solution | ex22.2-render-xenum-v1.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 ex22.2-render-xenum-v1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t const... | null | https://raw.githubusercontent.com/HunterYIboHu/htdp2-solution/6182b4c2ef650ac7059f3c143f639d09cd708516/Chapter4/Section22-the-commerce-of-XML/ex22.2-render-xenum-v1.rkt | racket | about the language level of this file in a form that our tools can easily process.
data difinitions
An XEnum.v1 is one of:
– (cons 'ul [List-of XItem.v1])
– (cons 'ul (cons [List-of Attribute] [List-of XItem.v1]))
An XItem.v1 is one of:
(cons Symbol (cons String '()))
An Xexpr.v2 is a list:
– (cons Symbo... | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname ex22.2-render-xenum-v1) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
(require 2htdp/image)
– ( cons ' li ... |
2065d3403061107efcdf73ab8b078215bc3d7c564f5a0a3ba0464789efa7136e | janestreet/ppx_css | style_element_strategy.mli | open! Core
module Into_head : Strategy_intf.S
module Into_body : Strategy_intf.S
module Into_root_element : Strategy_intf.S
| null | https://raw.githubusercontent.com/janestreet/ppx_css/55296423f273d6d475a273c33c0d8d4cfa304660/inline_css/src/style_element_strategy.mli | ocaml | open! Core
module Into_head : Strategy_intf.S
module Into_body : Strategy_intf.S
module Into_root_element : Strategy_intf.S
| |
440bade4616ccc45923b31aace1d70486b856d0e26dcb2e0193bd9c2c7dca308 | granule-project/granule | Monad.hs |
# LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ImplicitParams #
# options_ghc -fno - warn - incomplete - uni - patterns #
| Defines the ' Check... | null | https://raw.githubusercontent.com/granule-project/granule/c27c3a609ad05a5d623f0cf03115877319986682/frontend/src/Language/Granule/Checker/Monad.hs | haskell | # LANGUAGE GADTs #
| and various interfaces for working within this monad
| Repeat a checker action for every input value and only fail at the end if
any action failed.
everything succeeded, so `put` the state and carry on
combine all errors and fail
| Types of discharged coeffects
# OVERLAPS #
Describes where a... |
# LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DataKinds #
# LANGUAGE RecordWildCards #
# LANGUAGE ImplicitParams #
# options_ghc -fno - warn - incomplete - uni - patterns #
| Defines the ' Checker ' monad used in the ... |
a65086adcee0f7a73566778985c520873a10e62d2005627315aa1af7edcaddea | theodormoroianu/SecondYearCourses | HaskellChurch_20210415163357.hs | {-# LANGUAGE RankNTypes #-}
module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = "cBool " <> show (cIf b True False)
The boolean constant true always ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/HaskellChurch_20210415163357.hs | haskell | # LANGUAGE RankNTypes #
The boolean negation switches the alternatives
The boolean conjunction can be built as a conditional
The boolean disjunction can be built as a conditional
a pair is a way to compute something based on the values
contained within the pair.
a function to be applied on the values, it will apply i... | module HaskellChurch where
A boolean is any way to choose between two alternatives
newtype CBool = CBool {cIf :: forall t. t -> t -> t}
An instance to show as regular Booleans
instance Show CBool where
show b = "cBool " <> show (cIf b True False)
The boolean constant true always chooses the first alternativ... |
60bb9cff04aa05126335ac57bb0235c61bdf80e6392197db9454582618ae7a6a | scrintal/heroicons-reagent | rectangle_group.cljs | (ns com.scrintal.heroicons.outline.rectangle-group)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "round"... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/outline/rectangle_group.cljs | clojure | (ns com.scrintal.heroicons.outline.rectangle-group)
(defn render []
[:svg {:xmlns ""
:fill "none"
:viewBox "0 0 24 24"
:strokeWidth "1.5"
:stroke "currentColor"
:aria-hidden "true"}
[:path {:strokeLinecap "round"
:strokeLinejoin "round"... | |
2bba92ad41367753887f6cb8f2c1dc1e95fb5763d6f9e0bb883286fc1a60e31b | vseloved/cl-nlp | package.lisp | ( c ) 2013 Vsevolod Dyomkin
(cl:defpackage #:cnlang
(:use #:common-lisp #:rutil #:nlp-user)) | null | https://raw.githubusercontent.com/vseloved/cl-nlp/f180b6c3c0b9a3614ae43f53a11bc500767307d0/coursera-nlang/package.lisp | lisp | ( c ) 2013 Vsevolod Dyomkin
(cl:defpackage #:cnlang
(:use #:common-lisp #:rutil #:nlp-user)) | |
f3a466157e1356102de60b51ef647ef5cad402b507787bb8f71a7a36856ac7e4 | tfausak/rattletrap | Byte.hs | module Rattletrap.Type.Property.Byte where
import qualified Rattletrap.ByteGet as ByteGet
import qualified Rattletrap.BytePut as BytePut
import qualified Rattletrap.Schema as Schema
import qualified Rattletrap.Type.Str as Str
import qualified Rattletrap.Utility.Json as Json
import qualified Rattletrap.Utility.Monad as... | null | https://raw.githubusercontent.com/tfausak/rattletrap/cc6d6aba923d840f23de7673cab9a043096d3099/src/lib/Rattletrap/Type/Property/Byte.hs | haskell | module Rattletrap.Type.Property.Byte where
import qualified Rattletrap.ByteGet as ByteGet
import qualified Rattletrap.BytePut as BytePut
import qualified Rattletrap.Schema as Schema
import qualified Rattletrap.Type.Str as Str
import qualified Rattletrap.Utility.Json as Json
import qualified Rattletrap.Utility.Monad as... | |
0f07d0a7f112612f036bf151c4ae1bd6276ba633094d05aecd977d5f07665199 | ZHaskell/z-yaml | Spec.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeApplications #
module Main where
import GHC.Generics (Generic)
import Test.Hspec
import qualified Z.Data.Text as T
import qualified Z.Data.YAML as YAML
main :: IO ()
main = hs... | null | https://raw.githubusercontent.com/ZHaskell/z-yaml/8c8bc16dec93cb329d457d61eb3f7139ed9de62f/test/Spec.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings # | # LANGUAGE DeriveGeneric #
# LANGUAGE TypeApplications #
module Main where
import GHC.Generics (Generic)
import Test.Hspec
import qualified Z.Data.Text as T
import qualified Z.Data.YAML as YAML
main :: IO ()
main = hspec $ smokeSpec
data Person = Person
{ name :: T.Text
, age :: I... |
6ef5e7ecea02e27eb7ea074f575e3dfa2fb89039ce287a9cb09e52bf8e44128e | c4-project/c4f | atomic_fetch.mli | 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/fuzz_actions/src/atomic_fetch.mli | ocaml | * Actions that generate fetch statements.
* Shorthand type for fetch insertion actions.
* {1 Insertion of conditionals based on arbitrary fetches}
* Conditional-insert payloads.
* Type of conditional-insert payloads.
* Shorthand for action modules doing conditional inserts.
* Conditional-insert action where the g... | 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... |
ba026a2094cd946328d96aef85c3c94f328d8d6556cb8042b0923224650f5f51 | Stratus3D/programming_erlang_exercises | prime_tester_load_balancer.erl | %%%-------------------------------------------------------------------
@author
( C ) 2020 ,
%%% @doc
%%% The queue server to handle queuing sending individual
%%% @end
%%%-------------------------------------------------------------------
-module(prime_tester_load_balancer).
-behaviour(gen_server).
%% API
-exp... | null | https://raw.githubusercontent.com/Stratus3D/programming_erlang_exercises/e4fd01024812059d338facc20f551e7dff4dac7e/chapter_23/exercise_5/src/prime_tester_load_balancer.erl | erlang | -------------------------------------------------------------------
@doc
The queue server to handle queuing sending individual
@end
-------------------------------------------------------------------
API
gen_server callbacks
id field is needed as an Mnesia ID
======================================================... | @author
( C ) 2020 ,
-module(prime_tester_load_balancer).
-behaviour(gen_server).
-export([start_link/2, is_prime/1]).
-export([init/1,
handle_call/3,
handle_cast/2,
handle_info/2,
terminate/2,
code_change/3]).
-define(SERVER, ?MODULE).
-record(state, {id=1,
... |
645915c853836ac0e340b2a133f9d7b99ff77c182c48a50a5daa419fe9d9c33f | kansetsu7/awesome_name | faq.cljs | (ns awesome-name.views.faq
(:require
[reagent-mui.components :as mui]
[reagent-mui.icons.expand-more :as icon-expand-more]
[reagent.core :as r]))
(defn main
[]
[mui/grid {:container true :spacing 2 :sx {:margin-top "10px"}}
[mui/grid {:item true :xs 12}
[mui/accordion
[mui/accordion-summa... | null | https://raw.githubusercontent.com/kansetsu7/awesome_name/32d6d0f4c9a957d4739bb79d584d6298b4f6364e/src/awesome_name/views/faq.cljs | clojure | (ns awesome-name.views.faq
(:require
[reagent-mui.components :as mui]
[reagent-mui.icons.expand-more :as icon-expand-more]
[reagent.core :as r]))
(defn main
[]
[mui/grid {:container true :spacing 2 :sx {:margin-top "10px"}}
[mui/grid {:item true :xs 12}
[mui/accordion
[mui/accordion-summa... | |
1be517744d37e6223e8279c59ca2165e53916eebe4aa14613282a1c8f5b4649d | johnlawrenceaspden/hobby-code | gravity.clj | (ns gravity.core
(:refer-clojure :exclude [+ - * =])
(:use (clojure.contrib.generic [arithmetic :only [+ - *]]
[comparison :only [=]]))
(:use [vector-2d.core]))
(defn gravity-vector [u v]
(let [force (/ 2000 (Math/pow (magnitude (- u v)) 2))
angle (bearing u v)]
(vector-2d (* (Math/sin angle) force)... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/nakkaya_anti_gravity/src/main/clojure/gravity.clj | clojure | (ns gravity.core
(:refer-clojure :exclude [+ - * =])
(:use (clojure.contrib.generic [arithmetic :only [+ - *]]
[comparison :only [=]]))
(:use [vector-2d.core]))
(defn gravity-vector [u v]
(let [force (/ 2000 (Math/pow (magnitude (- u v)) 2))
angle (bearing u v)]
(vector-2d (* (Math/sin angle) force)... | |
d8cb38bc36a57ad57d983b42791c3fec0b12d1e2e9849511ea61cd8e093fb8bc | gedge-platform/gedge-platform | ra_server.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 ) 2017 - 2020 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(ra_server).
-include("ra.hrl").
-include(... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/ra/src/ra_server.erl | erlang |
properties
TODO: hide behind a handle_leader
persistent
used for tracking valid leader messages
The machine configuration.
This is how ra knows which module to use to invoke the ra_machine callbacks
and the config to pass to the {@link ra_machine:init/1} implementation.
The simple machine config is version th... | 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 ) 2017 - 2020 VMware , Inc. or its affiliates . All rights reserved .
-module(ra_server).
-include("ra.hrl").
-include("ra_se... |
f903a5f3704f03792a5c60dcf45f8a186e4e708b99ce44d7c4b272016055ba2d | nyu-acsys/drift | call_back.ml |
let mk_adder (x:int) =
let adder (i:int) = i + x in
adder
let main_p (mx:int) (mi:int) =
let addr = mk_adder mx in
assert (addr mi = mi + mx)
let main (w:unit) =
let _ = main_p 10 3 in
let _ = main_p 30 2 in
let _ =
for i = 1 to 1000000 do
main ( Random.int 1000 ) ( Random.int 1000 )
... | null | https://raw.githubusercontent.com/nyu-acsys/drift/51a3160d74b761626180da4f7dd0bb950cfe40c0/tests/benchmarks_call/DRIFT/high/call_back.ml | ocaml |
let mk_adder (x:int) =
let adder (i:int) = i + x in
adder
let main_p (mx:int) (mi:int) =
let addr = mk_adder mx in
assert (addr mi = mi + mx)
let main (w:unit) =
let _ = main_p 10 3 in
let _ = main_p 30 2 in
let _ =
for i = 1 to 1000000 do
main ( Random.int 1000 ) ( Random.int 1000 )
... | |
586aa9660d54aa7712312c3391dc7fa332d0a8d12aa0015cd1d88a68b288bce4 | mzp/coq-ide-for-ios | subtac_classes.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/CoqIDE/coq-8.2pl2/plugins/subtac/subtac_classes.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : subtac_classes.mli ... |
2952173c13817c249b0c2e4a8820893995634816c3b10cb22a0908e9d365cf57 | athas/Sindre | Widgets.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TupleSections #
{-# LANGUAGE ImpredicativeTypes #-}
-----------------------------------------------------------------------------
-- |
Module : . Widgets
License : M... | null | https://raw.githubusercontent.com/athas/Sindre/34e46e61e100e8d09d2ee0748be9582eb316b66e/Sindre/Widgets.hs | haskell | # LANGUAGE RankNTypes #
# LANGUAGE ImpredicativeTypes #
---------------------------------------------------------------------------
|
Stability : provisional
Portability : portable
any backend.
---------------------------------------------------------------------------
| A widget that arranges its children ... | # LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TupleSections #
Module : . Widgets
License : MIT - style ( see LICENSE )
gadgets and helper functions that can be used by
module Sindre.Widgets ( mkHorizontally
, mkVe... |
96292d3ccfe8a86733bacb5ddf8ad6ea2b81238cc63691592bcbfd608941bb4a | eopb/git-backup | Main.hs | module Main where
import Lib
main :: IO ()
main = mainTask
| null | https://raw.githubusercontent.com/eopb/git-backup/d8d5d65a725324380bbbff05c0900fafe70b649e/app/Main.hs | haskell | module Main where
import Lib
main :: IO ()
main = mainTask
| |
fe720f7ad2859f66553d45f6fec3e52ef1b32c061c0562e9d900255512d95a4d | mtolly/rail | Run.hs | | A direct interpreter for Rail programs .
module Language.Rail.Run
( Memory(..)
, emptyMemory
, Rail
, runRail
, runPure
, runIO
, run
, call
, compile
, runMemory
) where
import Control.Arrow (second)
import qualified Control.Exception (catch)
import Control.Monad (liftM, liftM2)
import System.IO (isEOF, hPutStr, ... | null | https://raw.githubusercontent.com/mtolly/rail/0fdd7fc1061d3b5ee18766aff0e71dbba20843b1/src/Language/Rail/Run.hs | haskell | ^ The function which executes each 'Command' in the chosen monad.
| A memory state with no defined variables or functions, and an empty stack.
Non-pure I/O commands are performed in the 'IO' monad.
(for crash messages) with 'StateT' (for the stack and variables).
| Unwraps the 'Rail' monad into 'IO'. Crash message... | | A direct interpreter for Rail programs .
module Language.Rail.Run
( Memory(..)
, emptyMemory
, Rail
, runRail
, runPure
, runIO
, run
, call
, compile
, runMemory
) where
import Control.Arrow (second)
import qualified Control.Exception (catch)
import Control.Monad (liftM, liftM2)
import System.IO (isEOF, hPutStr, ... |
eaf3228d92cb0e8542aa3b47c6d50ccf5442e61e5035f05a2142ebd4400c7219 | chenyukang/rubytt | global.ml | open Def;;
module TypeSetT =
struct
type t = Type.type_t
let compare t1 t2 =
Type.compare_type_t t1 t2
end
module TypeSet = Set.Make(TypeSetT)
let refs: (Type.binding_ty list) NodeHashtbl.t = NodeHashtbl.create 1;;
let resolved = ref NodeSet.empty;;
let unresolved = ref NodeSet.empty;;
let callstac... | null | https://raw.githubusercontent.com/chenyukang/rubytt/3b9898cd9e180594ee30fb74cea9a8356a6e0c14/src/global.ml | ocaml | open Def;;
module TypeSetT =
struct
type t = Type.type_t
let compare t1 t2 =
Type.compare_type_t t1 t2
end
module TypeSet = Set.Make(TypeSetT)
let refs: (Type.binding_ty list) NodeHashtbl.t = NodeHashtbl.create 1;;
let resolved = ref NodeSet.empty;;
let unresolved = ref NodeSet.empty;;
let callstac... | |
8383c1f88d3fec32931c37ec26c63cae9164eedb7c453a8054118a4bde37a5f3 | atolab/zenoh | zn_storage.ml |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... | null | https://raw.githubusercontent.com/atolab/zenoh/32e311aae6be93c001fd725b4d918b2fb4e9713d/example/zenoh-net/zn_storage.ml | ocaml |
* Copyright ( c ) 2017 , 2020 ADLINK Technology Inc.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* -2.0 , or the Apache License , Version 2.0
* which is available at -2.0 .
*
* SPDX - License - Ident... | |
e5a8a40bdd0617b0ffff180807081812fe2f3f1ba3e9ffb54e6f41ca061630dc | input-output-hk/cardano-ledger-byron | Orphans.hs | {-# LANGUAGE StandaloneDeriving #-}
# OPTIONS_GHC -fno - warn - orphans #
module Test.Cardano.Crypto.Orphans
()
where
import Cardano.Prelude
import qualified Data.ByteArray as BA
import qualified Crypto.PubKey.Ed25519 as Ed25519
import Cardano.Crypto
( SigningKey(..)
... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger-byron/d309449e6c303a9f0dcc8dcf172df6f0b3195ed5/crypto/test/Test/Cardano/Crypto/Orphans.hs | haskell | # LANGUAGE StandaloneDeriving #
The crypto libraries encourage using key /hashes/ not keys for things
like sets, map etc. | # OPTIONS_GHC -fno - warn - orphans #
module Test.Cardano.Crypto.Orphans
()
where
import Cardano.Prelude
import qualified Data.ByteArray as BA
import qualified Crypto.PubKey.Ed25519 as Ed25519
import Cardano.Crypto
( SigningKey(..)
)
import Cardano.Crypto.H... |
fd9eefbe80eaa9167287d7724c01df8e3a71b3749c0cccd880d5d26ed9640113 | thierry-martinez/stdcompat | sort.mli | val list : ('a -> 'a -> bool) -> 'a list -> 'a list
val array : ('a -> 'a -> bool) -> 'a array -> unit
val merge : ('a -> 'a -> bool) -> 'a list -> 'a list -> 'a list
| null | https://raw.githubusercontent.com/thierry-martinez/stdcompat/83d786cdb17fae0caadf5c342e283c3dcfee2279/interfaces/3.08/sort.mli | ocaml | val list : ('a -> 'a -> bool) -> 'a list -> 'a list
val array : ('a -> 'a -> bool) -> 'a array -> unit
val merge : ('a -> 'a -> bool) -> 'a list -> 'a list -> 'a list
| |
513ff4abc61f47eace828739e52def08797f7395c142b65fd3518ed6af03b008 | mhuebert/re-view | util.cljs | (ns app.util
(:require [goog.net.XhrIo :as xhr]))
(def cache {})
(defn GET [format url cb]
(if-let [value (get cache url)]
(cb {:value value})
(xhr/send url (fn [e]
(let [target (.-target e)]
(cb (if (.isSuccess target)
(let [value (ca... | null | https://raw.githubusercontent.com/mhuebert/re-view/ba38cd09b78b3c6db6a2983f3e2cf1bd6294564f/website/src/app/util.cljs | clojure | (ns app.util
(:require [goog.net.XhrIo :as xhr]))
(def cache {})
(defn GET [format url cb]
(if-let [value (get cache url)]
(cb {:value value})
(xhr/send url (fn [e]
(let [target (.-target e)]
(cb (if (.isSuccess target)
(let [value (ca... | |
725d8d440eae7fcabe5bfdd0f6aa37a4a3cb866e940cf2783330bf62fadb7afc | bmeurer/ocamljit2 | consistbl.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/utils/consistbl.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2002 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 .
$ Id$
Consistency tables : for che... |
7b6c21865fca3df417a2a84c93885343651b82961b4946526d84fdd3f8b4e06b | erszcz/learning | rel1_SUITE.erl | -module(rel1_SUITE).
-compile([export_all]).
suite() -> [].
all() -> [just_a_test].
just_a_test(_Config) ->
ct:fail("ooopsie").
| null | https://raw.githubusercontent.com/erszcz/learning/b21c58a09598e2aa5fa8a6909a80c81dc6be1601/erlang-rel1/apps/rel1/test/rel1_SUITE.erl | erlang | -module(rel1_SUITE).
-compile([export_all]).
suite() -> [].
all() -> [just_a_test].
just_a_test(_Config) ->
ct:fail("ooopsie").
| |
578accbb09b497f5457c446a0767f401d6a5f95aa3ad0f043ba4f3113eebe36a | Fresheyeball/Shpadoinkle | Dropdown.hs | {-# LANGUAGE CPP #-}
# LANGUAGE DataKinds #
{-# LANGUAGE DeriveFoldable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE ExtendedDefaultRules #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances ... | null | https://raw.githubusercontent.com/Fresheyeball/Shpadoinkle/ac0cb351042d076741120a9695174f6a9cbe1853/widgets/Shpadoinkle/Widgets/Form/Dropdown.hs | haskell | # LANGUAGE CPP #
# LANGUAGE DeriveFoldable #
# LANGUAGE ExtendedDefaultRules #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
[ onCli... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
#... |
ca65bebd37c9f724f171a7302b44e5694e895643a2da44b0304715487899fc27 | avatar29A/hs-aitubots-api | Peer.hs | {-# LANGUAGE OverloadedStrings #-}
module Aitu.Bot.Types.Peer (Peer(..)
, PeerType(..)
, mkPeerWithDefaults
, mkUserWithDefaults
, mkGroupWithDefaults
, mkBotWithDefaults
, mkChannelWithDefaults) where
import Data.Aeson
import qualified Data.Aeson.Types as JSONTypes
import Data.Text
import Data.UUID.Types
import qua... | null | https://raw.githubusercontent.com/avatar29A/hs-aitubots-api/9cc3fd1e4e9e81491628741a6bbb68afbb85704e/src/Aitu/Bot/Types/Peer.hs | haskell | # LANGUAGE OverloadedStrings #
doc: -api-contract/peer.html
mkPeerWithoutOptional makes a new Peer with Nothing value
for whole optional fields |
module Aitu.Bot.Types.Peer (Peer(..)
, PeerType(..)
, mkPeerWithDefaults
, mkUserWithDefaults
, mkGroupWithDefaults
, mkBotWithDefaults
, mkChannelWithDefaults) where
import Data.Aeson
import qualified Data.Aeson.Types as JSONTypes
import Data.Text
import Data.UUID.Types
import qualified Data.ByteString.Lazy.Char8 a... |
bb6e09314b2f55f6060f82371db92b1cc654864638d62401898baaa2af6741f0 | glguy/advent2020 | Day01.hs | {-# Language QuasiQuotes #-}
|
Module : Main
Description : Day 1 solution
Copyright : ( c ) , 2020
License : ISC
Maintainer :
< >
Find entries in an /expense report/ that sum up to 2020 and return their
product .
Module : Main
Description : Day 1 solution
Copyright : (c) ... | null | https://raw.githubusercontent.com/glguy/advent2020/ed247131684efa699bd34b846b5d939e9db749fc/execs/Day01.hs | haskell | # Language QuasiQuotes #
| >>> :main
| Given a list of integer inputs, find the product of @count@
entries that sum up to @2020@.
^ inputs
^ count
^ product
^ sorted inputs
^ count
^ target sum
^ current product
^ next alternative
^ final product | |
Module : Main
Description : Day 1 solution
Copyright : ( c ) , 2020
License : ISC
Maintainer :
< >
Find entries in an /expense report/ that sum up to 2020 and return their
product .
Module : Main
Description : Day 1 solution
Copyright : (c) Eric Mertens, 2020
License ... |
99b134442fdc01f32946d4fe046185405b23b77fa7b96fa9155f3bbcca1b8f30 | ijvcms/chuanqi_dev | mail_lib.erl | %%%-------------------------------------------------------------------
%%% @author tuhujia
( C ) 2015 , < COMPANY >
%%% @doc
%%%
%%% @end
Created : 05 . 八月 2015 17:17
%%%-------------------------------------------------------------------
-module(mail_lib).
-include("common.hrl").
-include("record.hrl").
-include("... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/mail/mail_lib.erl | erlang | -------------------------------------------------------------------
@author tuhujia
@doc
@end
-------------------------------------------------------------------
默认邮件保存7天
全服邮件到期时间
系统
其他
全服
----------------------------------------------------------------------------
对外接口
-------------------------------------... | ( C ) 2015 , < COMPANY >
Created : 05 . 八月 2015 17:17
-module(mail_lib).
-include("common.hrl").
-include("record.hrl").
-include("config.hrl").
-include("cache.hrl").
-include("db_record.hrl").
-include("uid.hrl").
-include("proto.hrl").
-include("language_config.hrl").
-include("log_type_config.hrl").
-export([... |
f32cf16f931f4ebfe40d0e7aabf0182e454ed5e723949bebabb21ab7936bf87f | BranchTaken/Hemlock | test_foldi2_until.ml | open! Basis.Rudiments
open! Basis
open List
let test () =
let list_pairs = [
([], []);
([100L], [200L]);
([100L; 110L], [200L; 210L]);
([100L; 110L; 120L], [200L; 210L; 220L]);
] in
iter list_pairs ~f:(fun (a, b) ->
let f i accum a_elm b_elm = begin
let len = length a in
let limi... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/f3604ceda4f75cf18b6ee2b1c2f3c5759ad495a5/bootstrap/test/basis/list/test_foldi2_until.ml | ocaml | open! Basis.Rudiments
open! Basis
open List
let test () =
let list_pairs = [
([], []);
([100L], [200L]);
([100L; 110L], [200L; 210L]);
([100L; 110L; 120L], [200L; 210L; 220L]);
] in
iter list_pairs ~f:(fun (a, b) ->
let f i accum a_elm b_elm = begin
let len = length a in
let limi... | |
1612e68ad30d1f06e465ecb3690f2a4cbca177120d6c47db1721f8c6f15c37b8 | zk/clojuredocs | entry.clj | (ns clojuredocs.entry
(:use [ring.middleware
file
file-info
session
params
nested-params
multipart-params
keyword-params]
[ring.middleware.session.cookie :only (cookie-store)]
[ring.util.response :only (response content-type)])
(:require... | null | https://raw.githubusercontent.com/zk/clojuredocs/28f5ee500f4349039ee81c70d7ac40acbb19e5d8/src/clj/clojuredocs/entry.clj | clojure | Extend hiccup to support rendering of hiccup vectors
Redirect old urls | (ns clojuredocs.entry
(:use [ring.middleware
file
file-info
session
params
nested-params
multipart-params
keyword-params]
[ring.middleware.session.cookie :only (cookie-store)]
[ring.util.response :only (response content-type)])
(:require... |
fe6450558681193cd015e4d33ce501444d9843a3fa3cd3b68198c5a82eb99ada | jcomellas/ephone | ephone_dial_rules.erl | %%%-------------------------------------------------------------------
@author < >
@author < >
@author < >
( C ) 2012 Juan Jose Comellas , ,
%%% @doc
%%% Country dialing rules.
%%% @end
%%%-------------------------------------------------------------------
-module(ephone... | null | https://raw.githubusercontent.com/jcomellas/ephone/c2f8879ca7e416e1d968aa279bd0c4dddfa24dfc/src/ephone_dial_rules.erl | erlang | -------------------------------------------------------------------
@doc
Country dialing rules.
@end
-------------------------------------------------------------------
API
gen_server callbacks
compiled regular expression
===================================================================
API
===================... | @author < >
@author < >
@author < >
( C ) 2012 Juan Jose Comellas , ,
-module(ephone_dial_rules).
-behaviour(gen_server).
-export([start_link/2]).
-export([registered_name/1]).
-export([iso_code/1, international_prefix/1, trunk_prefix/1]).
-export([parse_destination/3]... |
5600a10cd9d73b051337459ce32d3c82803713b9a2fbc5e12e6f69fbb9434446 | jwiegley/notes | Blockchain.hs | {-# LANGUAGE RankNTypes #-}
What is Consensus ?
Consensus fairly distributes work to a pool of compensated participants
who agree upon the results of that result ;
data = BlockProposal {
parent : : Finalized BlockProposal
}
What is Consensus?
Consensus fairly distributes work to a pool of compensa... | null | https://raw.githubusercontent.com/jwiegley/notes/6f9a0214a907cc7140fc3da5062a855f26de86d9/haskell/Blockchain.hs | haskell | # LANGUAGE RankNTypes #
----------------------------------------------------------------------
Where m is an instance of the Distribution monad
Operationally, a network is lazy distributed speculative execution. But we
commutative addition, meaning they can arrive in any order (commutativity)
and any time (associa... |
What is Consensus ?
Consensus fairly distributes work to a pool of compensated participants
who agree upon the results of that result ;
data = BlockProposal {
parent : : Finalized BlockProposal
}
What is Consensus?
Consensus fairly distributes work to a pool of compensated participants
who agree u... |
5bfae3ceea54fe8bc4428e4ee4c3295ec7906bec5215d4ad9a138c96092bccf6 | prg-titech/baccaml | mul.ml | ;;
let rec mul x1 x2 x3 x4 x5 x6 = x1 * x2 * x3 * x4 * x5 * x6 in
print_int (mul 2 3 4 5 6 7)
| null | https://raw.githubusercontent.com/prg-titech/baccaml/a3b95e996a995b5004ca897a4b6419edfee590aa/etc/example/mul.ml | ocaml | ;;
let rec mul x1 x2 x3 x4 x5 x6 = x1 * x2 * x3 * x4 * x5 * x6 in
print_int (mul 2 3 4 5 6 7)
| |
429b0ad1d872b46c2a1f923d6a6fc32923ea83c57280f0b483a6dc3cc1e33d41 | the-dr-lazy/cascade | User.hs | |
Module : Cascade . Api . Network . Anatomy . Api . User
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE LONG DE... | null | https://raw.githubusercontent.com/the-dr-lazy/cascade/014a5589a2763ce373e8c84a211cddc479872b44/cascade-api/src/Cascade/Api/Network/Anatomy/Api/User.hs | haskell | |
Module : Cascade . Api . Network . Anatomy . Api . User
Description : ! ! ! INSERT MODULE SHORT DESCRIPTION ! ! !
Copyright : ( c ) 2020 - 2021 Cascade
License : MPL 2.0
Maintainer : < > ( the-dr-lazy.github.io )
Stability : Stable
Portability : POSIX
! ! ! INSERT MODULE LONG DE... | |
b20815da9f07570e6a95643c38ed8aab97d80bb14258932ca5e6685a1ba96d68 | gedge-platform/gedge-platform | supervised_lifecycle.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 .
%%
%% Invoke callbacks on startup and termination.
%... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit/src/supervised_lifecycle.erl | erlang |
Invoke callbacks on startup and termination.
Simply hook this process into a supervision hierarchy, to have the
callbacks invoked at a precise point during the establishment and
teardown of that hierarchy, respectively.
Or launch the process independently, and link to it, to have the
callbacks invoked on star... | 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 .
-module(supervised_lifecycle).
-behavior(gen_server).... |
333070c88f01a1efd5f5e4aecd6f923b52e156bee05eb110ff34e14308677d9e | vincenthz/hs-connection | Connection.hs | # LANGUAGE CPP #
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE ScopedTypeVariables #
-- |
-- Module : Network.Connection
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
-- Simple connection abstraction
--
module Network.Co... | null | https://raw.githubusercontent.com/vincenthz/hs-connection/48ea143afea8c60f00e46f82ae9f160739c858ec/Network/Connection.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE DeriveDataTypeable #
|
Module : Network.Connection
License : BSD-style
Stability : experimental
Portability : portable
Simple connection abstraction
* Type for a connection
* Exceptions
* Library initialization
* Connection operation
* Sending and receiving d... | # LANGUAGE CPP #
# LANGUAGE ScopedTypeVariables #
Maintainer : < >
module Network.Connection
(
Connection
, connectionID
, ConnectionParams(..)
, TLSSettings(..)
, ProxySettings(..)
, SockSettings
, LineTooLong(..)
, HostNotResolved(..)
, HostCannotConnect(..)
, in... |
4c74db976dc2b58adf99d87286ac53e6320d84e1f8d4e369c7a579ae6f4bb9ca | bmeurer/ocamljit2 | depend.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/tools/depend.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1999 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 .
$ Id$
module StringSet : Set.S with... |
ab790202780f9d25224252142f14fdc51c845b95dd8e7c31af6d320e96ab2636 | Wavenet/http_proxy | http_proxy_ua_connect_fsm.erl | %%% http_proxy_ua_connect_fsm.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@author < >
2013 - 2015 Global Wavenet ( Pty ) Ltd
%%% @end
Licensed 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/Wavenet/http_proxy/a66bbf5607fd8610a66355467378c171f8f65ce8/src/http_proxy_ua_connect_fsm.erl | erlang | http_proxy_ua_connect_fsm.erl
@end
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 f... | @author < >
2013 - 2015 Global Wavenet ( Pty ) Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
module handles incoming TCP connections from user agents ( UA ) .
-module(http_proxy_ua_connect_fsm).
-copyright('C... |
c8f72b9a1fb03dc6b537f59fbb81c7117b31546281dcdc41f85777ea777b4eca | deercreeklabs/lancaster | doo_perf_runner.cljs | (ns deercreeklabs.doo-test-runner
(:require
[doo.runner :refer-macros [doo-tests]]
[deercreeklabs.perf-test]))
(enable-console-print!)
(doo-tests 'deercreeklabs.perf-test)
| null | https://raw.githubusercontent.com/deercreeklabs/lancaster/6b47b9e3d17e62db2f3b878453cafbf4564efb72/test/deercreeklabs/doo_perf_runner.cljs | clojure | (ns deercreeklabs.doo-test-runner
(:require
[doo.runner :refer-macros [doo-tests]]
[deercreeklabs.perf-test]))
(enable-console-print!)
(doo-tests 'deercreeklabs.perf-test)
| |
468ab9fe936f0ad45d552277527e452759c75f1736bce9f92cdfcf8e7db5457e | TyOverby/mono | compose_message.ml | open! Core
open! Async_kernel
open! Bonsai_web
open Bonsai.Let_syntax
module Style =
[%css.raw
{|
.compose {
display: flex;
flex-direction:row;
}
.compose button {
width:40px;
}
.compose input {
flex: 1;
}
|}]
let component ~send_message =
let%sub textbox_state = Bons... | null | https://raw.githubusercontent.com/TyOverby/mono/7666c0328d194bf9a569fb65babc0486f2aaa40d/vendor/janestreet-bonsai/examples/rpc_chat/client/compose_message.ml | ocaml | open! Core
open! Async_kernel
open! Bonsai_web
open Bonsai.Let_syntax
module Style =
[%css.raw
{|
.compose {
display: flex;
flex-direction:row;
}
.compose button {
width:40px;
}
.compose input {
flex: 1;
}
|}]
let component ~send_message =
let%sub textbox_state = Bons... | |
306e1b61a1e5877ac8ad4707317f9b297dd21512ca210f3bb2f59b31f44161f1 | takikawa/racket-ppa | defn-known.rkt | #lang racket/base
(require racket/list
racket/match
"../common/set.rkt"
"../run/status.rkt"
"../compile/side-effect.rkt"
"../compile/known.rkt")
(provide add-defn-known!)
(struct struct-shape (num-fields num-parent-fields op-types))
(define (add-defn-known! seen-defns all-... | null | https://raw.githubusercontent.com/takikawa/racket-ppa/caff086a1cd48208815cec2a22645a3091c11d4c/src/expander/extract/defn-known.rkt | racket | Don't record anything more specific for a mutated definition
Recognize structure declarations
Recognize structure-property declaration
Allow a self-call as pure, as long as the number of arguments
grows. We'll only conclude that the function is pure overall if
that assumption now as justified, but we require the ... | #lang racket/base
(require racket/list
racket/match
"../common/set.rkt"
"../run/status.rkt"
"../compile/side-effect.rkt"
"../compile/known.rkt")
(provide add-defn-known!)
(struct struct-shape (num-fields num-parent-fields op-types))
(define (add-defn-known! seen-defns all-... |
57b02a29ca18a5a06d82ced8eb154967244a86a1b87ca6866e6f242b0c7ea992 | brendanhay/gogol | Patch.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/77394c4e0f5bd729e6fe27119701c45f9d5e1e9a/lib/services/gogol-file/gen/Gogol/File/Projects/Locations/Instances/Patch.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Updates the settings of a specific instance.
* Resource
** Constructing a Request
| A resource alias for @file.projects.locations.instances.patch@ method which the
'FileProjectsLocationsInstancesPatch' request conforms to.
|... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
9d7cadef3c512d2a8bd04dc9e2f1fa51db622eb2974c5a47ff77f0890547ff1a | picty/parsifal | pkcs1.ml | open Parsifal
open BasePTypes
open Asn1Engine
open Asn1PTypes
(*********)
(* Types *)
(*********)
asn1_struct rsa_private_key = {
pkcs1_version : der_smallint;
modulus : der_integer;
publicExponent : der_integer;
privateExponent : der_integer;
prime1 : der_integer;
prime2 : der_integer;
exponent1 : der_... | null | https://raw.githubusercontent.com/picty/parsifal/767a1d558ea6da23ada46d8d96a057514b0aa2a8/crypto/pkcs1.ml | ocaml | *******
Types
*******
************
Exceptions
************
****************
Hash functions
****************
******************
PKCS#1 functions
******************
TODO: block_type should be optional
TODO: This is rather ugly. Could it be a little cleaner
TODO: Handle this differently
******************
P... | open Parsifal
open BasePTypes
open Asn1Engine
open Asn1PTypes
asn1_struct rsa_private_key = {
pkcs1_version : der_smallint;
modulus : der_integer;
publicExponent : der_integer;
privateExponent : der_integer;
prime1 : der_integer;
prime2 : der_integer;
exponent1 : der_integer;
exponent2 : der_integer;
... |
7e6cc2e8e89c8bd97e2a01a61c0f3e671f6f598c73e91f365ddde0058b2957ed | mfikes/coal-mine | problem_10.cljc | (ns coal-mine.problem-10
(:require [coal-mine.checks :refer [defcheck-10] :rename {defcheck-10 defcheck}]
[clojure.test]))
(defcheck solution-11c29ef3
20 20)
(defcheck solution-13ba94c6
({:a 10, :b 20, :c 30} :b ) (:b (hash-map :a 10, :b 20, :c 30)))
(defcheck solution-17716ea8
20 20)
(defcheck ... | null | https://raw.githubusercontent.com/mfikes/coal-mine/0961d085b37f4e59489a8cf6a2b8fef0a698d8fb/src/coal_mine/problem_10.cljc | clojure | (ns coal-mine.problem-10
(:require [coal-mine.checks :refer [defcheck-10] :rename {defcheck-10 defcheck}]
[clojure.test]))
(defcheck solution-11c29ef3
20 20)
(defcheck solution-13ba94c6
({:a 10, :b 20, :c 30} :b ) (:b (hash-map :a 10, :b 20, :c 30)))
(defcheck solution-17716ea8
20 20)
(defcheck ... | |
ca68e75aae62fcbb1a21962a799fecda19040ec11e892affce3efefa846dc5ad | nfrisby/invariant-functors | TH.hs | # LANGUAGE CPP #
# LANGUAGE PatternGuards #
|
Module : Data . Functor . Invariant . TH
Copyright : ( C ) 2012 - 2017 , ( C ) 2015 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Portability : Template Haskell
Functions to mechanically derive ' Data . Functor . Inva... | null | https://raw.githubusercontent.com/nfrisby/invariant-functors/e37d331c57b69a3112778982e7c096f34ca804ac/src/Data/Functor/Invariant/TH.hs | haskell | $deriveInvariant2
$make
* 'Options'
-----------------------------------------------------------------------------
User-facing API
-----------------------------------------------------------------------------
| Options that further configure how the functions in
^ If 'True', derived instances for empty data types ... | # LANGUAGE CPP #
# LANGUAGE PatternGuards #
|
Module : Data . Functor . Invariant . TH
Copyright : ( C ) 2012 - 2017 , ( C ) 2015 - 2017
License : BSD - style ( see the file LICENSE )
Maintainer :
Portability : Template Haskell
Functions to mechanically derive ' Data . Functor . Inva... |
1be88a559024c81ca20d0fea04afbf8a3fd3ff84edd1255f4e3f4fa65fc82f68 | expipiplus1/vulkan | XR_KHR_opengl_es_enable.hs | {-# language CPP #-}
-- | = Name
--
XR_KHR_opengl_es_enable - instance extension
--
-- = Specification
--
-- See
-- <#XR_KHR_opengl_es_enable XR_KHR_opengl_es_enable>
-- in the main specification for complete information.
--
-- = Registered Extension Number
--
25
--
-- = Revision
--
7
--
-- = Extension and Versi... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/openxr/src/OpenXR/Extensions/XR_KHR_opengl_es_enable.hs | haskell | # language CPP #
| = Name
= Specification
See
<#XR_KHR_opengl_es_enable XR_KHR_opengl_es_enable>
in the main specification for complete information.
= Registered Extension Number
= Revision
= Extension and Version Dependencies
= See Also
'SwapchainImageOpenGLESKHR', 'getOpenGLESGraphicsRequirement... | XR_KHR_opengl_es_enable - instance extension
25
7
- Requires OpenXR 1.0
' GraphicsBindingOpenGLESAndroidKHR ' , ' ' ,
< #XR_KHR_opengl_es_enable OpenXR Specification >
module OpenXR.Extensions.XR_KHR_opengl_es_enable ( getOpenGLESGraphicsRequirementsKHR
... |
0eeea6384253fcb915180b18f0743260f2faa7aa1422be72f6bf7bb927e9cec7 | ecraven/r7rs-benchmarks | dynamic.scm | (import (scheme base) (scheme cxr) (scheme file) (scheme read) (scheme write) (scheme time))
DYNAMIC -- Obtained from .
's dynamic type inferencer , set up to run on itself
;; (see the end of this file).
;;----------------------------------------------------------------------------
;; Environment management
... | null | https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/b0910c4759629fcd2fb84a323a4eeef3b6ffc6bf/src/dynamic.scm | scheme | (see the end of this file).
----------------------------------------------------------------------------
Environment management
----------------------------------------------------------------------------
general environment operations
empty-env: Env
gen-binding: Key x Value -> Binding
binding-key: Binding -> Ke... | (import (scheme base) (scheme cxr) (scheme file) (scheme read) (scheme write) (scheme time))
DYNAMIC -- Obtained from .
's dynamic type inferencer , set up to run on itself
environments are lists of pairs , the first component being the key
(define gen-binding cons)
(define binding-key car)
(define ... |
31fe9ba40eca1923c9fbd8aa6ba864c0a1d6bed5f051675c835fd0738f6b49b9 | slagyr/speclj | stub_spec.cljc | (ns speclj.stub-spec
(#?(:clj :require :cljs :require-macros)
[speclj.core :refer [around before context describe it should= should-throw should-invoke should-have-invoked should-not-invoke should-not-have-invoked with with-stubs stub -new-exception]]
[speclj.spec-helper :refer [should-fail! should-pass! failur... | null | https://raw.githubusercontent.com/slagyr/speclj/bd15239870a44761993f3aa2538b6353604f70bc/spec/speclj/stub_spec.cljc | clojure | (ns speclj.stub-spec
(#?(:clj :require :cljs :require-macros)
[speclj.core :refer [around before context describe it should= should-throw should-invoke should-have-invoked should-not-invoke should-not-have-invoked with with-stubs stub -new-exception]]
[speclj.spec-helper :refer [should-fail! should-pass! failur... | |
59790c79fa78a01064c8d356ca71c0532721969f72d4890a7f8152ebd02e2b81 | TerrorJack/ghc-alter | NonEmpty.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
ca n't use Safe due to IsList instance
# LANGUAGE TypeFamilies #
-----------------------------------------------------------------------------
-- |
Module : Data . List . NonEmpty
Copyright : ( C ) 2011 - 2015 ,
( C ) ... | null | https://raw.githubusercontent.com/TerrorJack/ghc-alter/db736f34095eef416b7e077f9b26fc03aa78c311/ghc-alter/boot-lib/base/Data/List/NonEmpty.hs | haskell | # LANGUAGE DeriveDataTypeable #
---------------------------------------------------------------------------
|
License : BSD-style (see the file LICENSE)
Maintainer :
Stability : provisional
Portability : portable
is otherwise identical to the traditional list type in complexity
and in terms of API.... | # LANGUAGE DeriveGeneric #
ca n't use Safe due to IsList instance
# LANGUAGE TypeFamilies #
Module : Data . List . NonEmpty
Copyright : ( C ) 2011 - 2015 ,
( C ) 2010 , ,
A ' NonEmpty ' list is one which always has at least one element , but
@since 4.9.0.0
module Data... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.