_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 |
|---|---|---|---|---|---|---|---|---|
42f98c690c45d4fae7f508a2e98d2fd34ea90a316863b2c5db0012e59fcb5793 | lexi-lambda/racket-collections | info.rkt | #lang info
(define collection 'multi)
(define version "1.3.1")
(define deps
'(["base" #:version "6.3"]
"curly-fn-lib"
["functional-lib" #:version "0.3.1"]
"match-plus"
"static-rename"
"unstable-list-lib"))
(define build-deps
'())
| null | https://raw.githubusercontent.com/lexi-lambda/racket-collections/c4822fc200b0488922cd6e86b4f2ea7cf8c565da/collections-lib/info.rkt | racket | #lang info
(define collection 'multi)
(define version "1.3.1")
(define deps
'(["base" #:version "6.3"]
"curly-fn-lib"
["functional-lib" #:version "0.3.1"]
"match-plus"
"static-rename"
"unstable-list-lib"))
(define build-deps
'())
| |
81c38f324cf223415dd7d1c125b5ae97fa31dc819a0b3c11206b6a86226cb49e | bburdette/chordster | AddNoteSet.hs | module Handler.AddNoteSet where
import Import
import Handler.NoteSet
getAddNoteSetR :: Handler Html
getAddNoteSetR = do
(ndf,etype) <- generateFormPost $ ndForm Nothing
defaultLayout $ [whamlet|
<h1> Chord type
<form method=post enctype=#{etype}>
^{ndf}
<input type=submit value="OK">
|]
... | null | https://raw.githubusercontent.com/bburdette/chordster/70d235f1ca379e5ecd4a8f39dc1e734e2d50978b/Handler/AddNoteSet.hs | haskell | module Handler.AddNoteSet where
import Import
import Handler.NoteSet
getAddNoteSetR :: Handler Html
getAddNoteSetR = do
(ndf,etype) <- generateFormPost $ ndForm Nothing
defaultLayout $ [whamlet|
<h1> Chord type
<form method=post enctype=#{etype}>
^{ndf}
<input type=submit value="OK">
|]
... | |
55810bcf487899f1798ae9afd93c63872983408473eec4a9036e4ef8b74005da | clj-commons/rewrite-clj | parser.cljc | (ns rewrite-clj.parser
"Parse Clojure/ClojureScript/EDN source code to nodes.
Parsing includes all source code elements including whitespace.
After parsing, the typical next step is [[rewrite-clj.zip/edn]] to create zipper.
Alternatively consider parsing and zipping in one step from [[rewrite-clj.zip/of-stri... | null | https://raw.githubusercontent.com/clj-commons/rewrite-clj/6fe5b4bfbf4b3eb00c299c1ca781b007686699e2/src/rewrite_clj/parser.cljc | clojure | (ns rewrite-clj.parser
"Parse Clojure/ClojureScript/EDN source code to nodes.
Parsing includes all source code elements including whitespace.
After parsing, the typical next step is [[rewrite-clj.zip/edn]] to create zipper.
Alternatively consider parsing and zipping in one step from [[rewrite-clj.zip/of-stri... | |
5c18528ea4b4451ff25143223d858e35fcb0de2e94d08c14ba2418c920f2b802 | sile/logi | logi_builtin_sink_fun.erl | 2014 - 2016 < >
%%
%% @doc A built-in sink which consumes log messages by an arbitrary user defined function
%%
%% The default layout is `logi_builtin_layout_default:new()'.
%%
%% == NOTE ==
%% This module is provided for debuging/testing purposes only.
%%
%% A sink is stored into a logi_channel's ETS.
%% Then it... | null | https://raw.githubusercontent.com/sile/logi/1022fbc238a7d18765fe864a7174958142160ee8/src/logi_builtin_sink_fun.erl | erlang |
@doc A built-in sink which consumes log messages by an arbitrary user defined function
The default layout is `logi_builtin_layout_default:new()'.
== NOTE ==
This module is provided for debuging/testing purposes only.
A sink is stored into a logi_channel's ETS.
Then it will be loaded every time a log message i... | 2014 - 2016 < >
> WriteFun = fun ( _ , Format , Data ) - > io : format("[CONSUMED ] " + + Format + + " \n " , Data ) end .
> { ok , _ } = logi_channel : install_sink(logi_builtin_sink_fun : , WriteFun ) , info ) .
-module(logi_builtin_sink_fun).
-behaviour(logi_sink_writer).
-export([new/2]).
-export_type... |
fe20df84ef95cb1fedd4c1281bae2f080a1f0e3a817a1634806fcd7721b0ecca | exoscale/pithos | sig.clj | (ns io.pithos.sig
"Compute request signatures as described in
"
(:require [clojure.string :as s]
[clojure.tools.logging :refer [info debug]]
[clojure.data.codec.base64 :as base64]
[clj-time.core :refer [after? now]]
[clj-time.coerce ... | null | https://raw.githubusercontent.com/exoscale/pithos/54790f00fbfd330c6196d42e5408385028d5e029/src/io/pithos/sig.clj | clojure | (ns io.pithos.sig
"Compute request signatures as described in
"
(:require [clojure.string :as s]
[clojure.tools.logging :refer [info debug]]
[clojure.data.codec.base64 :as base64]
[clj-time.core :refer [after? now]]
[clj-time.coerce ... | |
e1f13b43da7587b14e3488576034d05dbfa70ea7d3abdc9e3bca05c1a103a60f | eslick/cl-registry | choose-patient.lisp | ;; -*- Mode:Lisp; tab-width:2; indent-tabs-mode:nil -*-
(in-package :registry)
(registry-proclamations)
(defwidget choose-patient ()
((hr-p :accessor choose-patient-hr-p :initarg :hr-p :initform t)
(mark-siblings-dirty-p :accessor mark-siblings-dirty-p :initarg :mark-siblings-dirty-p :initform nil)))
(defmetho... | null | https://raw.githubusercontent.com/eslick/cl-registry/d4015c400dc6abf0eeaf908ed9056aac956eee82/src/plugins/clinician-home/choose-patient.lisp | lisp | -*- Mode:Lisp; tab-width:2; indent-tabs-mode:nil -*-
Somebody deleted or renamed the patient |
(in-package :registry)
(registry-proclamations)
(defwidget choose-patient ()
((hr-p :accessor choose-patient-hr-p :initarg :hr-p :initform t)
(mark-siblings-dirty-p :accessor mark-siblings-dirty-p :initarg :mark-siblings-dirty-p :initform nil)))
(defmethod render-widget-body ((widget choose-patient) &rest args... |
4fc6fd4b0b7bb633b3d3fd5d95b9d8dc4fe6392c97b2c4a2727b4d6b90a0eee3 | input-output-hk/plutus | ParamName.hs | # LANGUAGE DerivingVia #
module PlutusLedgerApi.V3.ParamName
( ParamName (..)
, tagWithParamNames
) where
import Data.Ix
import GHC.Generics
import PlutusLedgerApi.Common.ParamName
{-| The enumeration of all possible cost model parameter names for this language version.
IMPORTANT: The order of appearance... | null | https://raw.githubusercontent.com/input-output-hk/plutus/c3918d6027a9a34b6f72a6e4c7bf2e5350e6467e/plutus-ledger-api/src/PlutusLedgerApi/V3/ParamName.hs | haskell | | The enumeration of all possible cost model parameter names for this language version.
IMPORTANT: The order of appearance of the data constructors here matters. DO NOT REORDER.
See Note [Quotation marks in cost model parameter constructors]
See Note [Cost model parameters from the ledger's point of view]
| # LANGUAGE DerivingVia #
module PlutusLedgerApi.V3.ParamName
( ParamName (..)
, tagWithParamNames
) where
import Data.Ix
import GHC.Generics
import PlutusLedgerApi.Common.ParamName
data ParamName =
AddInteger'cpu'arguments'intercept
| AddInteger'cpu'arguments'slope
| AddInteger'memory'arguments'in... |
8ebdd40f86d4c7b7e9e413378150cadf5f045b2665603f019fc1f79bd08cdc75 | DanielG/ghc-mod | CheckSpec.hs | # LANGUAGE CPP #
module CheckSpec where
import GhcMod
import Data.List
import System.Process
import Test.Hspec
import TestUtils
import Dir
spec :: Spec
spec = do
describe "checkSyntax" $ do
it "works even if an executable depends on the library defined in the same cabal file" $ do
withDirect... | null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/test/CheckSpec.hs | haskell | See -yamamoto/ghc-mod/issues/507 | # LANGUAGE CPP #
module CheckSpec where
import GhcMod
import Data.List
import System.Process
import Test.Hspec
import TestUtils
import Dir
spec :: Spec
spec = do
describe "checkSyntax" $ do
it "works even if an executable depends on the library defined in the same cabal file" $ do
withDirect... |
ad51014accb626f270169f0d41da7c173cd81a57fee43bf738be3455c30e1ad5 | spawnfest/eep49ers | wxColourData.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2021 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxColourData.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2008 - 2021 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(wxColourData).
-include("wxe.hrl").
-export([destroy/1,getChooseFull/1,getColour/1,getCustomColour/2,new/0,s... |
0d1f3408b561d8d0de1236b6056678d7c42c2d08192a4aa1ad19d47aa3bf408e | roman/Haskell-Reactive-Extensions | Types.hs | {-# LANGUAGE EmptyDataDecls #-}
module Rx.Scheduler.Types where
import Rx.Disposable (Disposable)
import Tiempo (TimeInterval)
data Async
data Sync
data Scheduler s
= Scheduler {
_immediateSchedule :: IO () -> IO Disposable
, _timedSchedule :: TimeInterval -> IO () -> IO Disposable
}
class IScheduler ... | null | https://raw.githubusercontent.com/roman/Haskell-Reactive-Extensions/0faddbb671be7f169eeadbe6163e8d0b2be229fb/rx-scheduler/src/Rx/Scheduler/Types.hs | haskell | # LANGUAGE EmptyDataDecls # | module Rx.Scheduler.Types where
import Rx.Disposable (Disposable)
import Tiempo (TimeInterval)
data Async
data Sync
data Scheduler s
= Scheduler {
_immediateSchedule :: IO () -> IO Disposable
, _timedSchedule :: TimeInterval -> IO () -> IO Disposable
}
class IScheduler scheduler where
immediateSched... |
7cbc6c9089c576aa9a1f9bc8210ed7ff347c5483bb86aaa3b3acb7f81e438433 | onedata/op-worker | connection.erl | %%%-------------------------------------------------------------------
@author
( C ) 2019 - 2020 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This module handles communi... | null | https://raw.githubusercontent.com/onedata/op-worker/a1970e588b702b959c379e21d89139445a56235c/src/modules/communication/connection/connection.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This module handles communication using clproto binary protocol.
- incoming - when it is initiated in response to peer (provider or client)
request. It awai... | @author
( C ) 2019 - 2020 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
Created connection can be one of the two possible types :
In order to do so , first http protocol upgrade request on
upgrade from http to clproto succeeded , t... |
905cf40084aac237a50535144bfb7a22a8e831d9437c949919ed1547bf5d59c8 | acieroid/scala-am | super-list-merge-n.scm | (define (super-merge-n lsts n)
(define (geef-n+rest lst n)
(cond ((or (= 0 n) (null? lst)) (cons '() lst))
(else (let* ((res (geef-n+rest (cdr lst) (- n 1)))
(first (car res))
(rest (cdr res)))
(cons (cons (car lst) first) rest)))))
(if... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/R5RS/scp1/super-list-merge-n.scm | scheme | (define (super-merge-n lsts n)
(define (geef-n+rest lst n)
(cond ((or (= 0 n) (null? lst)) (cons '() lst))
(else (let* ((res (geef-n+rest (cdr lst) (- n 1)))
(first (car res))
(rest (cdr res)))
(cons (cons (car lst) first) rest)))))
(if... | |
8099b63fa6108fe32ebf4b0a085ca669adb48805bd5984546f8bfecd5626819c | racket/db | dbsystem.rkt | #lang racket/base
(require racket/class
racket/match
db/private/generic/interfaces
db/private/generic/common
db/private/generic/sql-data
"../../util/private/geometry.rkt"
(only-in "message.rkt" length-code->bytes field-dvec->typeid field-dvec->flags))
(provide dbsys... | null | https://raw.githubusercontent.com/racket/db/0336d2522a613e76ebf60705cea3be4c237c447e/db-lib/db/private/mysql/dbsystem.rkt | racket | Just need to check params for legal values here
FIXME: for now, only possible param type is var-string;
when that changes, will need to refine check-param.
========================================
- v1, after check-param: All variable-length values are converted
to bytes here, so that connection can decide what... | #lang racket/base
(require racket/class
racket/match
db/private/generic/interfaces
db/private/generic/common
db/private/generic/sql-data
"../../util/private/geometry.rkt"
(only-in "message.rkt" length-code->bytes field-dvec->typeid field-dvec->flags))
(provide dbsys... |
4795aa7c5ddc28e8c719b9a4aabd3800d3bbf34857aa2a5bf260411ef1d5898d | nbloomf/webdriver-w3c | WebDriver.hs | |
Module : Web . Api . WebDriver
Description : A monad for expressing WebDriver interactions .
Copyright : 2018 , Automattic , Inc.
License : GPL-3
Maintainer : ( )
Stability : experimental
Portability : POSIX
Module : Web.Api.WebDriver
Description : A monad for expressing W... | null | https://raw.githubusercontent.com/nbloomf/webdriver-w3c/bfd974fde80847e77820db30ceeab4b6c50edaa5/src/Web/Api/WebDriver.hs | haskell | |
Module : Web . Api . WebDriver
Description : A monad for expressing WebDriver interactions .
Copyright : 2018 , Automattic , Inc.
License : GPL-3
Maintainer : ( )
Stability : experimental
Portability : POSIX
Module : Web.Api.WebDriver
Description : A monad for expressing W... | |
b7094f321fc6c06619bab458fa5ae638d6601e3819868dbae24337385af123ce | haskell/haskell-language-server | DestructSpec.hs | {-# LANGUAGE OverloadedStrings #-}
module CodeAction.DestructSpec where
import Wingman.Types
import Test.Hspec
import Utils
spec :: Spec
spec = do
let destructTest = goldenTest Destruct
describe "golden" $ do
destructTest "gadt" 7 17 "GoldenGADTDestruct"
destructTest "gadt" 8 17 "GoldenGADTDestructCo... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/CodeAction/DestructSpec.hs | haskell | # LANGUAGE OverloadedStrings #
test layouts that maintain user-written fixities |
module CodeAction.DestructSpec where
import Wingman.Types
import Test.Hspec
import Utils
spec :: Spec
spec = do
let destructTest = goldenTest Destruct
describe "golden" $ do
destructTest "gadt" 7 17 "GoldenGADTDestruct"
destructTest "gadt" 8 17 "GoldenGADTDestructCoercion"
destructTest "a" 7 ... |
95f2f2d670007d0efe783f8e795c66bd606ba34f8cf3338128e16e7f3ab70ebd | haskell-repa/repa | Target.hs |
module Data.Repa.Array.Internals.Target
( Target (..), TargetI
, empty, singleton
, fromList, fromListInto
, mapMaybeS, mapEitherS
, generateMaybeS, generateEitherS
, unfoldEitherOfLengthIO)
where
import Data.Repa.Arra... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-array/Data/Repa/Array/Internals/Target.hs | haskell | -------------------------------------------------------------------
| Class of manifest array representations that can be constructed
in a random-access manner.
| Mutable buffer for some array representation.
| Allocate a new mutable buffer for the given layout.
UNSAFE: The integer must be positive, but this... |
module Data.Repa.Array.Internals.Target
( Target (..), TargetI
, empty, singleton
, fromList, fromListInto
, mapMaybeS, mapEitherS
, generateMaybeS, generateEitherS
, unfoldEitherOfLengthIO)
where
import Data.Repa.Arra... |
17de33b49ff00ee14bc1e56b8a624ed10b6628e7cf9bf71d82841ee722aaf186 | russolsen/cloforth | compiler.clj | (ns cloforth.test.compiler
(:use [cloforth.compiler :as c])
(:use [cloforth.execute :as x])
(:use [clojure.test])
(:require [cloforth.environment :as env]))
(def starting-env (assoc (env/make-env) :counter 0))
(defn inc-counter [env] (update-in env [:counter] inc))
(defn dec-counter [env] (update-in env [:c... | null | https://raw.githubusercontent.com/russolsen/cloforth/226c5f7a648f0923e321bc858518a687e0496cf4/test/cloforth/test/compiler.clj | clojure | (ns cloforth.test.compiler
(:use [cloforth.compiler :as c])
(:use [cloforth.execute :as x])
(:use [clojure.test])
(:require [cloforth.environment :as env]))
(def starting-env (assoc (env/make-env) :counter 0))
(defn inc-counter [env] (update-in env [:counter] inc))
(defn dec-counter [env] (update-in env [:c... | |
fb198580a9d1a81b532ef14c1fbef485c471828fb359bd32c1de95809c4912ea | travitch/llvm-analysis | PointsTo.hs | -- | This module defines the interface to points-to analysis in this
-- analysis framework. Each points-to analysis returns a result
-- object that is an instance of the 'PointsToAnalysis' typeclass; the
-- results are intended to be consumed through this interface.
--
-- All of the points-to analysis implementations ... | null | https://raw.githubusercontent.com/travitch/llvm-analysis/090c3484650552e620d02c5ddc7885267e04ac62/src/LLVM/Analysis/PointsTo.hs | haskell | | This module defines the interface to points-to analysis in this
analysis framework. Each points-to analysis returns a result
object that is an instance of the 'PointsToAnalysis' typeclass; the
results are intended to be consumed through this interface.
All of the points-to analysis implementations expose a sin... | module LLVM.Analysis.PointsTo (
PointsToAnalysis(..),
) where
import LLVM.Analysis
class PointsToAnalysis a where
mayAlias :: a -> Value -> Value -> Bool
^ Check whether or not two values may alias
pointsTo :: a -> Value -> [Value]
^ Return the list of values that a LoadInst may return . May
resolveIn... |
1c9043483192f30ca9eba8d2004f13e17368a83d46078d272b91ef828312909a | open-company/open-company-web | routing.cljs | (ns oc.web.stores.routing
(:require [oc.web.lib.utils :as utils]
[oc.web.dispatcher :as dispatcher]))
(defn- clean-route [route-map]
(update route-map :route #(set (map keyword (remove nil? %)))))
(defmethod dispatcher/action :routing
[db [_ route]]
(assoc db dispatcher/router-key (clean-route rou... | null | https://raw.githubusercontent.com/open-company/open-company-web/700f751b8284d287432ba73007b104f26669be91/src/main/oc/web/stores/routing.cljs | clojure | (ns oc.web.stores.routing
(:require [oc.web.lib.utils :as utils]
[oc.web.dispatcher :as dispatcher]))
(defn- clean-route [route-map]
(update route-map :route #(set (map keyword (remove nil? %)))))
(defmethod dispatcher/action :routing
[db [_ route]]
(assoc db dispatcher/router-key (clean-route rou... | |
ff7a0c7a3b0ee012b4f5e9be65ccb6079f677fc4a19a777ebcbe09f05a87aaea | snmsts/cl-langserver | tcp.lisp | (in-package :langserver-base)
;;;; TCP Server
(defvar *communication-style* (preferred-communication-style))
(defvar *dont-close* nil
"Default value of :dont-close argument to start-server and
create-server.")
(defun start-server (port-file &key (style *communication-style*)
... | null | https://raw.githubusercontent.com/snmsts/cl-langserver/3b1246a5d0bd58459e7a64708f820bf718cf7175/src/tcp.lisp | lisp | TCP Server
necessary for tunnels
Event Decoding/Encoding
(slynk-reader-error (c)
`(:reader-error ,(slynk-reader-error.packet c)
,(slynk-reader-error.cause c))) | (in-package :langserver-base)
(defvar *communication-style* (preferred-communication-style))
(defvar *dont-close* nil
"Default value of :dont-close argument to start-server and
create-server.")
(defun start-server (port-file &key (style *communication-style*)
(dont-close *don... |
6e7e7a88252b41720d34ba975383ae2a06917d9281d68db4286eb4e84f27913c | unisonweb/unison | RemoteRepo.hs | # LANGUAGE RecordWildCards #
module Unison.Codebase.Editor.RemoteRepo where
import Control.Lens (Lens')
import qualified Control.Lens as Lens
import qualified Data.Text as Text
import Unison.Codebase.Path (Path)
import qualified Unison.Codebase.Path as Path
import Unison.Codebase.ShortCausalHash (ShortCausalHash)
imp... | null | https://raw.githubusercontent.com/unisonweb/unison/77e636320d9d886e561264e4df5511840af94cc0/parser-typechecker/src/Unison/Codebase/Editor/RemoteRepo.hs | haskell | |
>>> :set -XOverloadedLists
>>> import Data.Maybe (fromJust)
>>> displayShareCodeserver DefaultCodeserver "share" ["base", "List"]
"share.base.List"
>>> displayShareCodeserver DefaultCodeserver "share" []
"share"
>>> displayShareCodeserver (CustomCodeserver . fromJust $ parseURI "-next.unison-lang.org/api" >>=... | # LANGUAGE RecordWildCards #
module Unison.Codebase.Editor.RemoteRepo where
import Control.Lens (Lens')
import qualified Control.Lens as Lens
import qualified Data.Text as Text
import Unison.Codebase.Path (Path)
import qualified Unison.Codebase.Path as Path
import Unison.Codebase.ShortCausalHash (ShortCausalHash)
imp... |
eb783f3c7204841023b1adedf2d02a33a8731a6ab206322fcbacc0ec79db013c | philipcmonk/phlisped | run-code.rkt | #lang racket
(require "../core/common.rkt")
(require "../core/extractdata.rkt")
(require "../core/gnode.rkt")
(require "../core/compiler.rkt")
(provide data)
(define (run-code event)
(let ((code (reify G 0 #t))
(ns (make-base-namespace)))
(print code) (newline)
(eval '(require racket "graph.ss") ns)
(e... | null | https://raw.githubusercontent.com/philipcmonk/phlisped/ded1be5d9e7206cd3c71db49ccd250fa4381cf99/commands/run-code.rkt | racket | #lang racket
(require "../core/common.rkt")
(require "../core/extractdata.rkt")
(require "../core/gnode.rkt")
(require "../core/compiler.rkt")
(provide data)
(define (run-code event)
(let ((code (reify G 0 #t))
(ns (make-base-namespace)))
(print code) (newline)
(eval '(require racket "graph.ss") ns)
(e... | |
b5e550cb7122a4f8f74bd33a73189d8055acd707a78ad679cd28e508c829c4d3 | racket/typed-racket | gh-issue-144.rkt | #lang typed/racket
(define-type F (-> String F String))
(: f F)
(define (f x g) (string-append x))
| null | https://raw.githubusercontent.com/racket/typed-racket/0236151e3b95d6d39276353cb5005197843e16e4/typed-racket-test/succeed/gh-issue-144.rkt | racket | #lang typed/racket
(define-type F (-> String F String))
(: f F)
(define (f x g) (string-append x))
| |
0fd94b912ab61120f78872698b2de9ee375f403be3674bdb9d6a722dfe6b23af | Kakadu/fp2022 | tree.mli | * Copyright 2022 - 2023 , and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
(* binary search tree data sturcture *)
open Type
exception Duplicate
exception NotFound
val get : int -> 'a tree -> 'a
val size : 'a tree -> int
val insert : int * 'a -> 'a tree -> 'a tree
val delete : int -> 'a tre... | null | https://raw.githubusercontent.com/Kakadu/fp2022/0eb49bf60d173287607678159465c425cdf699be/SQLyd/lib/tree.mli | ocaml | binary search tree data sturcture
returns a list of the values in the tree, in order
bottom-up fold on tree
create a list containing values, sorted in ascending order | * Copyright 2022 - 2023 , and contributors
* SPDX - License - Identifier : LGPL-3.0 - or - later
open Type
exception Duplicate
exception NotFound
val get : int -> 'a tree -> 'a
val size : 'a tree -> int
val insert : int * 'a -> 'a tree -> 'a tree
val delete : int -> 'a tree -> 'a tree
val update : int -> 'a -> '... |
82cad8cf0ed7e1467b8331d70048248ede846ffbd5b7e9535077f65c161f78fb | brevis-us/brevis | single_bird.clj | (ns us.brevis.example.single-bird
(:gen-class)
(:require [brevis-utils.parameters :as parameters]
[us.brevis.vector :as vector]
[us.brevis.physics.utils :as physics]
[us.brevis.utils :as utils]
[us.brevis.shape.cone :as cone]
[us.brevis.core :as core]
... | null | https://raw.githubusercontent.com/brevis-us/brevis/de51c173279e82cca6d5990010144167050358a3/src/main/clojure/us/brevis/example/single_bird.clj | clojure |
new-acceleration
(physics/orient-object (physics/set-velocity
(physics/set-acceleration
(if (or (> (Math/abs (vector/x-val bird-pos)) boundary)
(> (Math/abs (vector/y-val bird-pos)) boundary)
... | (ns us.brevis.example.single-bird
(:gen-class)
(:require [brevis-utils.parameters :as parameters]
[us.brevis.vector :as vector]
[us.brevis.physics.utils :as physics]
[us.brevis.utils :as utils]
[us.brevis.shape.cone :as cone]
[us.brevis.core :as core]
... |
e88b2f9c149deaabc197c34a268a72aebab16f66c58bef8aa87986291ab0a435 | tweag/ormolu | prelude1.hs | {-# RULES
"map/map" forall f g xs. map f (map g xs) = map (f.g) xs
"map/append" forall f xs ys. map f (xs ++ ys) = map f xs ++ map f ys
#-}
# RULES
" map " [ ~1 ] forall f xs . map f xs = build ( \c n - > foldr ( mapFB c f ) n xs )
" mapList " [ 1 ] forall foldr ( mapFB ( :) ... | null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/rewrite-rule/prelude1.hs | haskell | # RULES
"map/map" forall f g xs. map f (map g xs) = map (f.g) xs
"map/append" forall f xs ys. map f (xs ++ ys) = map f xs ++ map f ys
#
# RULES
"map/map" [~2] forall f g xs.
map f (map g xs) = map (f.g) xs; "f" op True y = False;
"g" op True y = False
# |
# RULES
" map " [ ~1 ] forall f xs . map f xs = build ( \c n - > foldr ( mapFB c f ) n xs )
" mapList " [ 1 ] forall foldr ( mapFB ( :) f ) [ ] = map f
" mapFB " forall c f g. mapFB ( mapFB c f ) g = mapFB c ( f.g )
#
"map" [~1] forall f xs. map f x... |
a2eb4a1977300bdee5649be0c5a6e85811f08e9b27677d69560e2c5542517f89 | kennknowles/aspcc | php.ml |
(* Printing functions *)
open Printf
let trim_eol s =
try
ignore (String.index s '\n');
String.sub s 0 ((String.length s) - 1)
with
| Not_found -> s
(* Invalid_argument means the string has 0 length *)
| Invalid_argument _ -> s
let indent indentation str =
(Str.g... | null | https://raw.githubusercontent.com/kennknowles/aspcc/951a91cc21e291b1d3c750bbbca7fa79209edd08/output/php.ml | ocaml | Printing functions
Invalid_argument means the string has 0 length
===========================================================================
For managing a symbol table and class definitions
===========================================================================
Add all the built-in ... |
open Printf
let trim_eol s =
try
ignore (String.index s '\n');
String.sub s 0 ((String.length s) - 1)
with
| Not_found -> s
| Invalid_argument _ -> s
let indent indentation str =
(Str.global_replace (Str.regexp "^") indentation (trim_eol str)) ^ "\n"
TODO : this coul... |
c325029cef28adbb705aff37b37b6874d41b7bc598c131b253dcf99fc08176cd | wereHamster/mole | Image.hs | module Data.Mole.Builder.Image where
import Control.Concurrent.STM
import qualified Data.Set as S
import qualified Data.ByteString as BS
import qualified Data.Text as T
import Data.Maybe
import Data.Time
import Text.Printf
import Data.Mole.Types
import Dat... | null | https://raw.githubusercontent.com/wereHamster/mole/f9476a160d1e35fc720498334d292b41658f9d72/src/Data/Mole/Builder/Image.hs | haskell | module Data.Mole.Builder.Image where
import Control.Concurrent.STM
import qualified Data.Set as S
import qualified Data.ByteString as BS
import qualified Data.Text as T
import Data.Maybe
import Data.Time
import Text.Printf
import Data.Mole.Types
import Dat... | |
dc2b6f3379d2c3cf7f65a2d6ad316aa706007f27893d6757056bffe4cf4ac329 | tuura/pangraph | Main.hs | module Main where
import GraphML
import Show
import Containers
import TestPangraph
import FGL
import Gml
import Pajek
import Test.HUnit
main :: IO Counts
main = (runTestTT . TestList . concat) [containersTests, fglTests, graphmlTests, showTests, pangraphTests, gmlTests, pajekTests]
| null | https://raw.githubusercontent.com/tuura/pangraph/ca896f25e5b49e0f59b69367125d01a2aa42beb3/test/Main.hs | haskell | module Main where
import GraphML
import Show
import Containers
import TestPangraph
import FGL
import Gml
import Pajek
import Test.HUnit
main :: IO Counts
main = (runTestTT . TestList . concat) [containersTests, fglTests, graphmlTests, showTests, pangraphTests, gmlTests, pajekTests]
| |
ce59fd255de95c6f9e92cd544b86f38c537a44bda19b9f0582f2f73c9aeed9ee | oscoin/oscoin | Abstract.hs | -- | Types and type families used by all transaction types.
--
module Oscoin.Data.Tx.Abstract where
import Oscoin.Prelude
-- | A transaction validation error.
type family TxValidationError c tx
-- | The output of applying a transaction to the state.
type family TxOutput c tx
-- | The input and output of t... | null | https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/src/Oscoin/Data/Tx/Abstract.hs | haskell | | Types and type families used by all transaction types.
| A transaction validation error.
| The output of applying a transaction to the state.
| The input and output of transaction application. | module Oscoin.Data.Tx.Abstract where
import Oscoin.Prelude
type family TxValidationError c tx
type family TxOutput c tx
type family TxState c tx
| The validation function used by for example the ' ' .
type TxValidator c tx = tx -> Either (TxValidationError c tx) ()
|
113c90db54bc4317829f0d8c04b8337a18370b48bbef9035f8785c8227085272 | thi-ng/demos | project.clj | (defproject ws-ldn-8-ex06 "0.1.0-SNAPSHOT"
:description "thi.ng Clojurescript workshop WS-LDN-8"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.5.3"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescri... | null | https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/ws-ldn-8/day3/ex06/project.clj | clojure | :ring-handler hello_world.server/handler | (defproject ws-ldn-8-ex06 "0.1.0-SNAPSHOT"
:description "thi.ng Clojurescript workshop WS-LDN-8"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:min-lein-version "2.5.3"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/clojurescri... |
37baaab74fd6d7cb3504fffad5a2ed0fbf6763a032a752564e553accef788a26 | styx/Raincat | Graphics.hs | # LANGUAGE CPP #
module Nxt.Graphics
(begin,
end,
initWindow,
initGraphics,
toGLdouble,
fromGLdouble,
loadTexture,
freeTexture,
drawTexture,
drawTextureFlip,
drawString,
drawRect,
drawPoly,
worldTransform,
cycleTextures,
cycleTextures2,
... | null | https://raw.githubusercontent.com/styx/Raincat/49b688c73335c9a4090708bc75f6af9575a65670/src/Nxt/Graphics.hs | haskell | initWindow
initGraphics
begin
end
toGLdouble
fromGLdouble
loadTexture (only specified to load PNGs)
freeTexture
drawTexture
drawRect
drawPoly
cycleTextures
cycleTextures2
repeatTexturesN | # LANGUAGE CPP #
module Nxt.Graphics
(begin,
end,
initWindow,
initGraphics,
toGLdouble,
fromGLdouble,
loadTexture,
freeTexture,
drawTexture,
drawTextureFlip,
drawString,
drawRect,
drawPoly,
worldTransform,
cycleTextures,
cycleTextures2,
... |
e7024d513396034ff63faa5980223ad508dd1fae3d165417ee895cdeada34dbd | erlang/rebar3 | rebar_prv_app_discovery.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
-module(rebar_prv_app_discovery).
-behaviour(provider).
-export([init/1,
do/1,
format_error/1]).
-include("rebar.hrl").
-include_lib("providers/include/providers.hrl").
-define(PROVIDER, app_discovery).
-define(D... | null | https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/src/rebar_prv_app_discovery.erl | erlang | ex: ts=4 sw=4 et
===================================================================
Public API
===================================================================
Provide a slightly more informative error message for consult of app file failure | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
-module(rebar_prv_app_discovery).
-behaviour(provider).
-export([init/1,
do/1,
format_error/1]).
-include("rebar.hrl").
-include_lib("providers/include/providers.hrl").
-define(PROVIDER, app_discovery).
-define(DEPS, []).
-spec in... |
ff582d078ae0283f5211978a5c04bbcce7af1e72a38c6bfe0ca5eadd7098f88e | CardanoSolutions/kupo | ChainSync.hs | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
module Kupo.Data.ChainSync
( ForcedRollbackHandler (..)
, IntersectionNotFoundException (..)
, HandshakeException (..)
*
... | null | https://raw.githubusercontent.com/CardanoSolutions/kupo/aa4c4cc980579ee4d4146c1fc44b8c35a44e9df0/src/Kupo/Data/ChainSync.hs | haskell | | Exception thrown when creating a chain-sync client from an invalid list of
points.
^ Provided points for intersection.
^ Current known tip of the chain.
^ Forced intersection point
| A number of slots between the current cursor and the node's tip.
| Decision has to whether pipeline an extra message. This is me... | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
module Kupo.Data.ChainSync
( ForcedRollbackHandler (..)
, IntersectionNotFoundException (..)
, HandshakeException (..)
*
... |
e3522f2256d69e1ae6266a89aed7cfda597ba2bf686e561f2fca146e1020e489 | cirodrig/triolet | GenerateCHeader.hs | {-| Generation of header files for exported C symbols.
-}
module LowLevel.GenerateCHeader(generateCHeader) where
import Data.Maybe
import Language.C.Data.Ident
import Language.C.Data.Node
import Language.C.Pretty
import Language.C.Syntax.AST
import Language.C.Syntax.Constants
import Common.Error
import Export
impor... | null | https://raw.githubusercontent.com/cirodrig/triolet/e515a1dc0d6b3e546320eac7b71fb36cea5b53d0/src/program/LowLevel/GenerateCHeader.hs | haskell | | Generation of header files for exported C symbols.
| Get the declaration components to use to declare a function parameter.
A parameter might occupy multiple C parameters, hence a list is returned.
| Get the declaration components to use to declare a function return type.
The return type might occupy parameters ... |
module LowLevel.GenerateCHeader(generateCHeader) where
import Data.Maybe
import Language.C.Data.Ident
import Language.C.Data.Node
import Language.C.Pretty
import Language.C.Syntax.AST
import Language.C.Syntax.Constants
import Common.Error
import Export
import LowLevel.Syntax
import LowLevel.GenerateCUtils
exportPa... |
7eb8c2f40a573cfff65058950a0ca1af25e840f50326917faa67fd5051d3e4b3 | serokell/universum | Monad.hs | {-# LANGUAGE Safe #-}
-- | Reexporting useful monadic stuff.
module Universum.Monad
( module Universum.Monad.Container
, module Universum.Monad.Either
, module Universum.Monad.Maybe
, module Universum.Monad.Reexport
, module Universum.Monad.Trans
) where
import Universum.Mon... | null | https://raw.githubusercontent.com/serokell/universum/7fc5dd3951d1177d1873e36b0678c759aeb5dc08/src/Universum/Monad.hs | haskell | # LANGUAGE Safe #
| Reexporting useful monadic stuff. |
module Universum.Monad
( module Universum.Monad.Container
, module Universum.Monad.Either
, module Universum.Monad.Maybe
, module Universum.Monad.Reexport
, module Universum.Monad.Trans
) where
import Universum.Monad.Container
import Universum.Monad.Either
import Universum.M... |
394241d04ad7a4a11aed68eb605d97a2c7611d91f938d3019213e5ac2d779d43 | RamV13/scrabble | index.ml |
open Dom
open Lwt
open ScrabbleClient
(* [fail] is a failure callback *)
let fail = fun _ -> assert false
[ get_element_by_id i d ] gets a DOM element by [ i d ]
let get_element_by_id id =
Js.Opt.get Dom_html.document##getElementById (Js.string id) fail
[ get_input_by_id i d ] gets a DOM input element by [ i... | null | https://raw.githubusercontent.com/RamV13/scrabble/07731680eaadf51c6b5cb3fc329056743f015215/public/js/index.ml | ocaml | [fail] is a failure callback
[local_storage] is the localStorage javascript object
[save_game game_state] saves the game state [game_state] in local storage
[notify msg] displays a snackbar notification with a [msg] body
[handle_btn_join btn ()] is the callback to handle the click events of the
* join button... |
open Dom
open Lwt
open ScrabbleClient
let fail = fun _ -> assert false
[ get_element_by_id i d ] gets a DOM element by [ i d ]
let get_element_by_id id =
Js.Opt.get Dom_html.document##getElementById (Js.string id) fail
[ get_input_by_id i d ] gets a DOM input element by [ i d ]
let get_input_by_id id =
ma... |
8f1f42ceb73bfd5fe68b2fa6196957ae60c01e50aa82442bb4b52c7337bea002 | polyfy/polylith | toolsdeps2_test.clj | (ns polylith.clj.core.validator.datashape.toolsdeps2-test
(:require
[clojure.test :refer :all]
[malli.core :as m]
[polylith.clj.core.validator.datashape.toolsdeps2 :as sut]))
(defn validate-test-runner-config [v]
(m/validate sut/test-runner-config-schema v))
(deftest test-runner-config-is-optional
(is ... | null | https://raw.githubusercontent.com/polyfy/polylith/abd20bb656e2cdd712732d80e1238316d3ea1b7f/components/validator/test/polylith/clj/core/validator/datashape/toolsdeps2_test.clj | clojure | (ns polylith.clj.core.validator.datashape.toolsdeps2-test
(:require
[clojure.test :refer :all]
[malli.core :as m]
[polylith.clj.core.validator.datashape.toolsdeps2 :as sut]))
(defn validate-test-runner-config [v]
(m/validate sut/test-runner-config-schema v))
(deftest test-runner-config-is-optional
(is ... | |
05121b70915b0dbb37173ff6c60b30010ac70fde307853e8b7551c38ae70a40a | mariorz/covid19-mx-time-series | core_test.clj | (ns covid19-mx-time-series.core-test
(:require [clojure.test :refer :all]
[covid19-mx-time-series.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/mariorz/covid19-mx-time-series/dde1183e8be502a85f7d1abf3aff25abdb176156/test/covid19_mx_time_series/core_test.clj | clojure | (ns covid19-mx-time-series.core-test
(:require [clojure.test :refer :all]
[covid19-mx-time-series.core :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
e22107463535f05c99468ffee68cbed4dc4055e6d58d5edf19e39978a227d74f | lehins/primal | GC.hs | # LANGUAGE FlexibleContexts #
-- |
Module : Primal . Memory . GC
Copyright : ( c ) 2020 - 2022
-- License : BSD3
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
--
module Primal.Memory.GC
( -- * Garbage collection
performGC
, performMajorGC
, performMinor... | null | https://raw.githubusercontent.com/lehins/primal/c620bfd4f2a6475f1c12183fbe8138cf29ab1dad/primal/src/Primal/Memory/GC.hs | haskell | |
License : BSD3
Stability : experimental
Portability : non-portable
* Garbage collection
* Allocation counter and limits
| Lifted version of `Mem.performGC`
@since 1.0.0
@since 1.0.0
@since 1.0.0
@since 1.0.0
| Lifted version of `Mem.getAllocationCounter`
@since 1.0.0
| Lifted version of `Mem... | # LANGUAGE FlexibleContexts #
Module : Primal . Memory . GC
Copyright : ( c ) 2020 - 2022
Maintainer : < >
module Primal.Memory.GC
performGC
, performMajorGC
, performMinorGC
, setAllocationCounter
, getAllocationCounter
, enableAllocationLimit
, disableAllocationLimit
) where
i... |
68f8bfbe90e8636747cb826a59044f91f7b8998b2219392bd17428ebff95033b | pirapira/coq2rust | session.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/ide/session.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* A session is a script buffer + pro... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
class type ['a] page =
obj... |
afa819bb4d20a44ae119751ae4cddc533bb2128670ae0feaf173d2560573d2f6 | uw-unsat/leanette-popl22-artifact | quadrilateral-by-hand.rkt | #lang s-exp rosette
; Version of the quadrilateral demo with event handling written by hand.
; See reactive/quadrilateral.rkt for a version that uses 'when' and 'while' constraints for selection and dragging.
(require racket/draw)
(require "../core/wallingford.rkt")
(require "../applications/geothings.rkt")
(define ... | null | https://raw.githubusercontent.com/uw-unsat/leanette-popl22-artifact/80fea2519e61b45a283fbf7903acdf6d5528dbe7/rosette-benchmarks-4/wallingford/applications/quadrilateral-by-hand.rkt | racket | Version of the quadrilateral demo with event handling written by hand.
See reactive/quadrilateral.rkt for a version that uses 'when' and 'while' constraints for selection and dragging.
connect everything up
use explicit stays so that we can provide unambiguous behavior
initialize the locations of the sides (the mi... | #lang s-exp rosette
(require racket/draw)
(require "../core/wallingford.rkt")
(require "../applications/geothings.rkt")
(define picture (new thing%))
(define side1 (make-midpointline picture))
(define side2 (make-midpointline picture))
(define side3 (make-midpointline picture))
(define side4 (make-midpointline pictu... |
df9fc8220e8ab9c054e14688e64a8e49511d081862b5b2ce5e9e27b16b5c9e53 | leptonyu/salak | Val.hs | module Salak.Internal.Val where
import Data.ByteString (ByteString)
import Data.Heap (Heap)
import qualified Data.Heap as H
import Data.Int
import Data.List (intercalate)
import Data.Scientific
import Data.Text ... | null | https://raw.githubusercontent.com/leptonyu/salak/0976e3f0792913df259e9bcaaee02f13d2b501f7/salak/src/Salak/Internal/Val.hs | haskell | module Salak.Internal.Val where
import Data.ByteString (ByteString)
import Data.Heap (Heap)
import qualified Data.Heap as H
import Data.Int
import Data.List (intercalate)
import Data.Scientific
import Data.Text ... | |
bcdef48c430a957eb1e4ae36aaaac1fc896bd31a81d5fd3079db80e8494b7b60 | plops/cl-cpp-generator | test.lisp | / 16.3 sb - cover . load this file with C - c
;; C-l in slime if there are assert errors, the tests fail the section
" How to fix a broke test " in README.org explains how the tests can
;; be corrected.
;; if all tests run successfull, you can see a code coverage report in
;; coverage/*.html. This will tell which ... | null | https://raw.githubusercontent.com/plops/cl-cpp-generator/a0bba0a6e0e8f34e3e4459508ada1cd0036d9068/test.lisp | lisp | C-l in slime if there are assert errors, the tests fail the section
be corrected.
if all tests run successfull, you can see a code coverage report in
coverage/*.html. This will tell which code lines were
checked. Please note that highlighted green in this report not
necessarily means that all cases are checked, e... | / 16.3 sb - cover . load this file with C - c
" How to fix a broke test " in README.org explains how the tests can
(require :sb-cover)
(declaim (optimize sb-cover:store-coverage-data
(speed 0)
(safety 3)
(debug 3)))
#+nil(compile-file "cp.lisp")
#+nil(load "cp.fasl")
(in-package :cl-cpp-generato... |
4f587c49c03b1b02001cc73bba1cdd3397bfadb62e94bdc4ab339c95878c5119 | fare/fare-scripts | repl.lisp | ;;; REPL utilities
(uiop:define-package :fare-scripts/repl
(:use :cl :fare-utils :uiop :inferior-shell :optima :optima.ppcre :cl-scripting :cl-launch/dispatch)
(:import-from :swank)
(:export #:read-eval-print #:rep))
(in-package :fare-scripts/repl)
;; From -new-favorite-slimesbclccl-trick
#+sbcl
(push (lambda (... | null | https://raw.githubusercontent.com/fare/fare-scripts/fee32edbbe4ca486e63922d94305027a8b5603a5/repl.lisp | lisp | REPL utilities
From -new-favorite-slimesbclccl-trick | (uiop:define-package :fare-scripts/repl
(:use :cl :fare-utils :uiop :inferior-shell :optima :optima.ppcre :cl-scripting :cl-launch/dispatch)
(:import-from :swank)
(:export #:read-eval-print #:rep))
(in-package :fare-scripts/repl)
#+sbcl
(push (lambda (&rest args) (apply #'swank:ed-in-emacs args) t) sb-ext:*ed-f... |
4d6a402602cf6b61dfaebc2859d0b12968642e115802bc982a23f577b1a18e08 | CSCfi/rems | json.clj | (ns rems.json
(:require [clj-time.core :as time]
[clj-time.format :as time-format]
[clojure.test :refer [deftest is testing]]
[cognitect.transit :as transit]
[jsonista.core :as j]
[muuntaja.core :as muuntaja]
[schema.coerce :as coerce]
... | null | https://raw.githubusercontent.com/CSCfi/rems/644ef6df4518b8e382cdfeadd7719e29508a26f0/src/clj/rems/json.clj | clojure | decoding dates from JSON requires coercion, so it's passed through as just plain string
Utils for schema-based coercion | (ns rems.json
(:require [clj-time.core :as time]
[clj-time.format :as time-format]
[clojure.test :refer [deftest is testing]]
[cognitect.transit :as transit]
[jsonista.core :as j]
[muuntaja.core :as muuntaja]
[schema.coerce :as coerce]
... |
9e1940a123d93694c63aa13850365dff188069d7149e47d63cf3e46cd26b2984 | imandra-ai/ocaml-opentelemetry | logs_service_pb.mli | (** logs_service.proto Binary Encoding *)
* { 2 Protobuf Encoding }
val encode_export_logs_service_request : Logs_service_types.export_logs_service_request -> Pbrt.Encoder.t -> unit
(** [encode_export_logs_service_request v encoder] encodes [v] with the given [encoder] *)
val encode_export_logs_partial_success : Lo... | null | https://raw.githubusercontent.com/imandra-ai/ocaml-opentelemetry/3dc7d63c7d2c345ba13e50b67b56aff878b6d0bb/src/logs_service_pb.mli | ocaml | * logs_service.proto Binary Encoding
* [encode_export_logs_service_request v encoder] encodes [v] with the given [encoder]
* [encode_export_logs_partial_success v encoder] encodes [v] with the given [encoder]
* [encode_export_logs_service_response v encoder] encodes [v] with the given [encoder]
* [decode_export_log... |
* { 2 Protobuf Encoding }
val encode_export_logs_service_request : Logs_service_types.export_logs_service_request -> Pbrt.Encoder.t -> unit
val encode_export_logs_partial_success : Logs_service_types.export_logs_partial_success -> Pbrt.Encoder.t -> unit
val encode_export_logs_service_response : Logs_service_types.... |
09e3703b8c93cd82fdf9ff820d6c56bb52c40944beba1aab32b8a7d1d0263d55 | static-analysis-engineering/codehawk | bCHFunctionStub.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/f2891d9120d5a776ea9ac1feec7bf98cce335e12/CodeHawk/CHB/bchlib/bCHFunctionStub.ml | ocaml | bchlib | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Binary Analyzer
Author : ------------------------------------------------------------------------------
The MIT License ( MIT )
Co... |
c12a8be9f22eb21b936ce21c6cf8d27598a0b3419c4a588afa95fbfd595d35d3 | ChaosEternal/guile-scsh | syscalls.scm | ;;; POSIX system-call Scheme binding.
Copyright ( c ) 1993 by . See file COPYING .
;;; Scheme48 implementation.
;;; Need to rationalise names here. getgid. get-gid. "effective" as morpheme?
(define-module (scsh syscalls)
:use-module (scsh define-foreign-syntax)
:use-module (ice-9 receive)
:use-module (ice-... | null | https://raw.githubusercontent.com/ChaosEternal/guile-scsh/1a76e006e193a6a8c9f93d23bacb9e51a1ff6c4c/scsh/syscalls.scm | scheme | POSIX system-call Scheme binding.
Scheme48 implementation.
Need to rationalise names here. getgid. get-gid. "effective" as morpheme?
???
Not a function.
raise exceptions on errors.
errno for lose. If the error code is ERRNO/INTR (interrupted syscall),
we try again.
(define-errno-syscall (SYSCALL ARGS) SYSCAL... | Copyright ( c ) 1993 by . See file COPYING .
(define-module (scsh syscalls)
:use-module (scsh define-foreign-syntax)
:use-module (ice-9 receive)
:use-module (ice-9 optargs)
:use-module (scsh optional)
:use-module (srfi srfi-9)
:use-module (srfi srfi-9 gnu)
:use-module (scsh utilities)
:use-module... |
ee7bf19ff12ca31d4ed0c108fe24b975852d794edec982544cf734df16ea3662 | atgreen/wrapilator | wrapilator.lisp | ;;; wrapilator.lisp
Copyright ( C ) 2017 < >
Distrubuted under the terms of the MIT license .
(in-package #:wrapilator)
(defvar *directory* "obj_dir")
(defun read-file-into-string (filename)
(with-open-file (stream filename)
(let ((contents (make-string (file-length stream))))
(read-sequence co... | null | https://raw.githubusercontent.com/atgreen/wrapilator/890783971a157b7f615cb9a8bf300cf516be3d49/wrapilator.lisp | lisp | wrapilator.lisp
Read all of the template files into strings.
Sanity checks |
Copyright ( C ) 2017 < >
Distrubuted under the terms of the MIT license .
(in-package #:wrapilator)
(defvar *directory* "obj_dir")
(defun read-file-into-string (filename)
(with-open-file (stream filename)
(let ((contents (make-string (file-length stream))))
(read-sequence contents stream)
... |
6ebdf0fb7ea4efc6c455b50d03645cfbbaa724e46be4ffa2ed47e770efe47e6e | lispgames/glop | dwm.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*-
(in-package #:glop-win32)
(cffi:define-foreign-library dwm
(:windows "Dwmapi.dll"))
(cffi:use-foreign-library dwm)
(cffi:defcfun ("DwmFlush" dwm-flush) :int)
(cffi:defcfun ("DwmIsCompositionEnabled" %dwm-... | null | https://raw.githubusercontent.com/lispgames/glop/45e722ab4a0cd2944d550bf790206b3326041e38/src/win32/dwm.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*-
|
(in-package #:glop-win32)
(cffi:define-foreign-library dwm
(:windows "Dwmapi.dll"))
(cffi:use-foreign-library dwm)
(cffi:defcfun ("DwmFlush" dwm-flush) :int)
(cffi:defcfun ("DwmIsCompositionEnabled" %dwm-is-composition-enabled) :int32
(enabled (:pointer bool)))
(defun dwm-is-composition-enabled... |
87f5454f0dfa6c7545467e3f8600f768c7975079aa448c9d0deea7417ec5548a | basti1302/elm-lang-de | Validation.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Util.Validation
( HasOptionalEMail(..)
, HasOptionalURL(..)
, validate
, validateEMailEmptyOrWellformed
, validateURLEmptyOrWellformed
) where
import Database.StatementMap
import Control.Monad (foldM)... | null | https://raw.githubusercontent.com/basti1302/elm-lang-de/9654752fb6fb56bc4116483f3bbd412a774e9fb1/backend/app/Util/Validation.hs | haskell | # LANGUAGE OverloadedStrings #
|The 'validate' function takes a list of checks and executes them on anentity
value. Each check has the type
dbConnection -> entityType -> IO (Maybe Text, entityType)
that is, it takes a db connection and the entity value and returns an IO
action that might produce an error message... | # LANGUAGE ScopedTypeVariables #
module Util.Validation
( HasOptionalEMail(..)
, HasOptionalURL(..)
, validate
, validateEMailEmptyOrWellformed
, validateURLEmptyOrWellformed
) where
import Database.StatementMap
import Control.Monad (foldM)
import qualified Data.ByteString.Cha... |
a9875771819a308359349c3c792e55424699ee7b0e1ca22c558d1f916ea7b2f8 | ekmett/machines | Examples.hs | # LANGUAGE CPP #
{-# LANGUAGE RankNTypes #-}
module Examples where
#if !(MIN_VERSION_base(4,8,0))
import Control.Applicative
#endif
import Control.Exception
import Control.Monad.Trans
import Data.Machine
import Data.Machine.Group.General
import System.IO
-- this slurp slurps until an eof exception is raised.
slurpHa... | null | https://raw.githubusercontent.com/ekmett/machines/d76bb4cf5798b495f1648c5f5075209e81e11eac/examples/Examples.hs | haskell | # LANGUAGE RankNTypes #
this slurp slurps until an eof exception is raised.
this is the good slurp
it catches the exception, and cleans up.
read a file, returning each line in a list
| bad slurping machine
| here is a plan that yields all the lines at once.
| getFileLines reads each line out of the given file an... | # LANGUAGE CPP #
module Examples where
#if !(MIN_VERSION_base(4,8,0))
import Control.Applicative
#endif
import Control.Exception
import Control.Monad.Trans
import Data.Machine
import Data.Machine.Group.General
import System.IO
slurpHandleBad :: Handle -> IO [String]
slurpHandleBad h = do
s <- hGetLine h
(s:) <$>... |
06ca6f8f4aa50e1318c1df9badecf926eddeffceb0800abb650171099b340103 | freizl/dive-into-haskell | Filtering.hs | -- |
module Filtering where
import Data.List
myFilter = filter notArticles . words
notArticles xs = xs `notElem` ["a", "the", "an"]
| null | https://raw.githubusercontent.com/freizl/dive-into-haskell/b18a6bfe212db6c3a5d707b4a640170b8bcf9330/readings/haskell-book/09/Filtering.hs | haskell | | |
module Filtering where
import Data.List
myFilter = filter notArticles . words
notArticles xs = xs `notElem` ["a", "the", "an"]
|
f2d1b78e39cf7819b760db428d8faa3798ccabf95ee6d98a97b41d6d97a200ae | evidentsystems/converge | serialize.cljc | Copyright 2020 Evident Systems LLC
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;; -2.0
;; Unless required by applicable law or agreed to in writing, software
distributed ... | null | https://raw.githubusercontent.com/evidentsystems/converge/9954febb85d598042b3d195bdb696268689ea427/converge/src/converge/serialize.cljc | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permis... | Copyright 2020 Evident Systems LLC
distributed under the License is distributed on an " AS IS " BASIS ,
(ns converge.serialize
"Handlers for serializing to e.g. Transit."
(:require [converge.domain :as domain]
[converge.opset.interpret :as interpret]
[converge.opset.ref :as opset]
... |
75a67813fe477bd51694ef0f89083a17f1e37c42b8aacced6334cbaf4c57f7c2 | BillHallahan/G2 | Case1.hs | module Case1 where
data X = A | B | C
f :: Int -> X
f x
| x < 0 = A
| x < -1 = B
| otherwise = C
| null | https://raw.githubusercontent.com/BillHallahan/G2/dfd377793dcccdc7126a9f4a65b58249673e8a70/tests/TestFiles/Case1.hs | haskell | module Case1 where
data X = A | B | C
f :: Int -> X
f x
| x < 0 = A
| x < -1 = B
| otherwise = C
| |
33342b1eaf0a101fec7c8ee32b2e522a075431b04af1dd9fb3c38b369474165b | re-ops/re-cipes | backup.clj | (ns re-cipes.backup
(:require
[re-cipes.access :refer (permissions)]
[re-cog.common.recipe :refer (require-recipe)]
[re-cog.resources.download :refer (download)]
[re-cog.resources.file :refer (rename symlink chmod)]
[re-cog.resources.archive :refer (untar bzip2)]))
(require-recipe)
(def-inline {:depe... | null | https://raw.githubusercontent.com/re-ops/re-cipes/4d53506251e4a61dbd7130d470569fb468d5eba5/src/re_cipes/backup.clj | clojure | (ns re-cipes.backup
(:require
[re-cipes.access :refer (permissions)]
[re-cog.common.recipe :refer (require-recipe)]
[re-cog.resources.download :refer (download)]
[re-cog.resources.file :refer (rename symlink chmod)]
[re-cog.resources.archive :refer (untar bzip2)]))
(require-recipe)
(def-inline {:depe... | |
76ad4669549fe5e2c4d1a49ef9ebd7af1ee593610048e5de5b0d2c9cbc66d887 | gregr/experiments | test-basic.rkt | #lang racket/base
(require "dk.rkt" "evalo.rkt" racket/pretty)
(define-relation (appendo xs ys zs)
(conde ((== xs '()) (== zs ys))
((fresh (a d ws)
(== xs (cons a d))
(== zs (cons a ws))
(appendo d ys ws)))))
(define-relation (reverseo ys sy)
(conde
((== '() ys) (=... | null | https://raw.githubusercontent.com/gregr/experiments/1f476ff137eccd044b89545400d7eb04ee22bacb/mk-misc/micro-dkanren/test-basic.rkt | racket | With a typical search strategy, there is no refutationally complete
running in the forward direction, but not in the backward direction. | #lang racket/base
(require "dk.rkt" "evalo.rkt" racket/pretty)
(define-relation (appendo xs ys zs)
(conde ((== xs '()) (== zs ys))
((fresh (a d ws)
(== xs (cons a d))
(== zs (cons a ws))
(appendo d ys ws)))))
(define-relation (reverseo ys sy)
(conde
((== '() ys) (=... |
0ed829fe6b619fa4ddc2a40488baecacf21dd4e4c1584fd55570b1ba9d37e065 | ocurrent/ocurrent-skeleton | pipeline.mli | val v : repo:Current_git.Local.t -> unit -> unit Current.t
(** [v ~repo ()] is a pipeline that monitors Git repository [repo]. *)
| null | https://raw.githubusercontent.com/ocurrent/ocurrent-skeleton/327dc23cac5511070a022ae3d5933ef60b4e7b9b/src/pipeline.mli | ocaml | * [v ~repo ()] is a pipeline that monitors Git repository [repo]. | val v : repo:Current_git.Local.t -> unit -> unit Current.t
|
cb276be037fe446928722bec29a538b8796ee7f8106b3d94b920984ba17be28a | SahilKang/cl-avro | mop.lisp | Copyright 2021 - 2022 Google LLC
;;;
;;; This file is part of cl-avro.
;;;
;;; cl-avro is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
;;; (at your option) any later ver... | null | https://raw.githubusercontent.com/SahilKang/cl-avro/34f227936a303f34a94e46480a7172a6171835fa/src/mop.lisp | lisp |
This file is part of cl-avro.
cl-avro is free software: you can redistribute it and/or modify
(at your option) any later version.
cl-avro is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See t... | Copyright 2021 - 2022 Google LLC
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(in-package #:cl-user)
(defpackage #:cl-avro.internal.mop
(:use #:cl)
(... |
10bb40a785110f8a0aa465c54bab9e02642bda95b19764d6169c1a33c1ecc252 | fission-codes/fission | Types.hs | module Fission.Error.Mismatch.Types (Mismatch (..)) where
import Fission.Prelude
data Mismatch a = Mismatch
deriving (Eq, Show, Exception)
| null | https://raw.githubusercontent.com/fission-codes/fission/11d14b729ccebfd69499a534445fb072ac3433a3/fission-core/library/Fission/Error/Mismatch/Types.hs | haskell | module Fission.Error.Mismatch.Types (Mismatch (..)) where
import Fission.Prelude
data Mismatch a = Mismatch
deriving (Eq, Show, Exception)
| |
8f5141b6e01ecff38207dacad37f2e4a6f9bfb6693e29e8ae33e35525cde9fa1 | MaskRay/OJHaskell | 35.hs | import Control.Monad
import Data.List
primeFactors = loop primes
where loop ps@(p:ps') n
| p*p > n = [n]
| n `mod` p == 0 = p : loop ps (n `div` p)
| otherwise = loop ps' n
primes = 2 : filter ((== 1) . length . pri... | null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Project%20Euler/35.hs | haskell | import Control.Monad
import Data.List
primeFactors = loop primes
where loop ps@(p:ps') n
| p*p > n = [n]
| n `mod` p == 0 = p : loop ps (n `div` p)
| otherwise = loop ps' n
primes = 2 : filter ((== 1) . length . pri... | |
110572bda2fea10bcdc6fc24947061f9841ca6ae5ac10d7ae65d3489133296e2 | grin-compiler/ghc-wpc-sample-programs | Expr.hs | |
Module : . . Expr
Description : Parse Expressions .
License : : The Idris Community .
Module : Idris.Parser.Expr
Description : Parse Expressions.
License : BSD3
Maintainer : The Idris Community.
-}
# LANGUAGE FlexibleContexts , TupleSections #
module Idris.Parser.Expr where
impo... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/src/Idris/Parser/Expr.hs | haskell | | Allow implicit type declarations
| Disallow implicit type declarations
| Implicits hare are scoped rather than top level
| Allow scoped constraint arguments
| Parses an expression
@
Expr ::= Pi
@
Expression Parser with Operators based on Expr'
| Parses a user-defined expression
Fix non-highlighting FCs ... | |
Module : . . Expr
Description : Parse Expressions .
License : : The Idris Community .
Module : Idris.Parser.Expr
Description : Parse Expressions.
License : BSD3
Maintainer : The Idris Community.
-}
# LANGUAGE FlexibleContexts , TupleSections #
module Idris.Parser.Expr where
impo... |
6d4c85fc8dd933ac32989a41f938cca48adb330d3ec1697bfc9c25635ce0e36f | clojure/core.typed | bootstrap_cljs.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/clojure/core.typed/f5b7d00bbb29d09000d7fef7cca5b40416c9fa91/typed/checker.js/src/clojure/core/typed/bootstrap_cljs.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns ^:skip-wiki clojure.core.typed.bootstrap-cljs
(:require [clojure.set :as set]))
(def -base-aliases
'#{AnyInteger Integer Int Seqable NonEmptySeq Number String Boolean Seq Str
EmptySeqable NonEmptySeqable Option Coll NonEmptyColl NonEmptyASeq NonEmptyAVec
E... |
1f896c07aa5c8f1780d200f78304e308a68894462f504bdfddb560470a4f7307 | gldubc/cast-machine | exec.ml | # 1 "exec.cppo.ml"
open Primitives
open Utils
open Bytecode
open Types
open Types.Print
open Bytecode_Eager
open Syntax.Eager
(* #define MONITOR "1" *)
# define BENCH " 1 "
# define DEBUG " 1 "
module Env = struct
include . Make(struct
` type ` t = var
let equal = ( =)
let h... | null | https://raw.githubusercontent.com/gldubc/cast-machine/34d79c324cd0a9aff52865ead19e74126b96daaa/src/exec.ml | ocaml | #define MONITOR "1"
machine values
type nu = [
| `CST of b
| `CLS of var * bytecode * env * kappa * mark
| `PAIR of nu * nu ]
parameter functions
let () = print_endline "coucou" in
let () = print_endline "coucou" in
if !(run_params.monitor) then gather_metrics run_params state;
ru... | # 1 "exec.cppo.ml"
open Primitives
open Utils
open Bytecode
open Types
open Types.Print
open Bytecode_Eager
open Syntax.Eager
# define BENCH " 1 "
# define DEBUG " 1 "
module Env = struct
include . Make(struct
` type ` t = var
let equal = ( =)
let hash = Hashtbl.hash
e... |
299f819b6bc15bada800d2f8f100420178248e6d761da4ec7b9be10af9452793 | ijvcms/chuanqi_dev | service_base.erl | %%%-------------------------------------------------------------------
@author zhengsiying
( C ) 2015 , < COMPANY >
%%% @doc
%%% 基础服务:一般是每个节点都需要的服务
%%% @end
Created : 07 . 三月 2015 17:13
%%%-------------------------------------------------------------------
-module(service_base).
-include("common.hrl").
%% ... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/service/service_base.erl | erlang | -------------------------------------------------------------------
@doc
基础服务:一般是每个节点都需要的服务
@end
-------------------------------------------------------------------
API
====================================================================
API functions
=========================================================... | @author zhengsiying
( C ) 2015 , < COMPANY >
Created : 07 . 三月 2015 17:13
-module(service_base).
-include("common.hrl").
-export([
start/0
]).
start() ->
db:init(),
error_logger:add_report_handler(logger_handle),
ok = util:start_mod(permanent, ModList),
ok.
Internal functions |
8aad2403f737eed85ca57d1d4f673369c2ded8452e780e54237896885a64b995 | heyoka/faxe | esp_state_sequence.erl | %% Date: 15.07.2019 - 09:55
Ⓒ 2019 heyoka
%% @doc
%% This node takes a list of lambda expressions representing different states.
%% It is used to impose a strict sequence of events on the data, that is seen to be valid for further processing.
%%
%% The node will emit values only after each state has evaluated as true... | null | https://raw.githubusercontent.com/heyoka/faxe/a5d768e1c354e2e76761cd6bd4dd003a8d88339f/apps/faxe/src/components/esp_state_sequence.erl | erlang | Date: 15.07.2019 - 09:55
@doc
This node takes a list of lambda expressions representing different states.
It is used to impose a strict sequence of events on the data, that is seen to be valid for further processing.
The node will emit values only after each state has evaluated as true in the given order and, for... | Ⓒ 2019 heyoka
If a timeout occurs at any point the sequence will be reset and started from the first expression again .
Note that the sequence timeouts start after the first datapoint has satisfied the first lambda expression .
Therefore , if 3 lambda states are given , only 2 durations for the ' within ' param... |
dc7ee291e60c09ef61b831cec55cd74befb57ccc8bed5a1472cfe504b743818f | haskell/array | Internals.hs | # LANGUAGE DeriveDataTypeable , FlexibleInstances , MultiParamTypeClasses ,
CPP #
CPP #-}
# LANGUAGE RoleAnnotations #
{-# OPTIONS_HADDOCK hide #-}
-----------------------------------------------------------------------------
-- |
-- Module : Data.Array.IO.Internal
Copyright : ... | null | https://raw.githubusercontent.com/haskell/array/9d63218fd067ff4885c0efa43b388238421a5c89/Data/Array/IO/Internals.hs | haskell | # OPTIONS_HADDOCK hide #
---------------------------------------------------------------------------
|
Module : Data.Array.IO.Internal
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : experimental
Portability : non-portable (uses Data.Array.Base)
------------... | # LANGUAGE DeriveDataTypeable , FlexibleInstances , MultiParamTypeClasses ,
CPP #
CPP #-}
# LANGUAGE RoleAnnotations #
Copyright : ( c ) The University of Glasgow 2001 - 2012
Mutable boxed and unboxed arrays in the IO monad .
module Data.Array.IO.Internals (
instance of : ,
... |
781268076d7276fd32deabce287a5e4837b0c5aee70651ee847829f549c0a58d | naveensundarg/prover | closure1.lisp | ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
;;; File: closure1.lisp
The contents of this file are subject to the Mozilla Public License
;;; Version 1.1 (the "License"); you may not use this file except in
;;; compliance with the License. You may obtain a copy of the License at
;;; /
;;;
Software dis... | null | https://raw.githubusercontent.com/naveensundarg/prover/812baf098d8bf77e4d634cef4d12de94dcd1e113/snark-20120808r02/src/closure1.lisp | lisp | -*- Mode: Lisp; Syntax: Common-Lisp; Package: snark -*-
File: closure1.lisp
Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License at
/
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific lan... | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is SNARK .
The Initial Developer of the Original Code is SRI International .
Portions created by the Initial Developer are Copyright ( C ) 1981 - 2012 .
... |
ff69856feaa7742cb6e56805a7df7ccc6d23a7c1c8dff3409581090e6e2cb5ca | m4dc4p/haskelldb | WX.hs | -----------------------------------------------------------
-- |
Module : Database . HaskellDB.WX
Copyright : HWT Group 2003 ,
2005 - 2006
-- License : BSD-style
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
WxHaskell < / >
interfac... | null | https://raw.githubusercontent.com/m4dc4p/haskelldb/a1fbc8a2eca8c70ebe382bf4c022275836d9d510/driver-wx/Database/HaskellDB/WX.hs | haskell | ---------------------------------------------------------
|
License : BSD-style
Stability : experimental
Portability : non-portable
---------------------------------------------------------
^ user id
^ password
| Run an action and close the connection.
-----------------------------------------------... | Module : Database . HaskellDB.WX
Copyright : HWT Group 2003 ,
2005 - 2006
Maintainer :
WxHaskell < / >
interface for HaskellDB
module Database.HaskellDB.WX (
WXOptions(..), wxConnect,
DriverInterface(..), driver
) where
impo... |
233a1f470b88da13661bb85ea2ad0bce596c4c31637eb3bb764923bec555cb6d | dvingo/dv.fulcro-template | user.clj | (ns user
(:require
[clojure.spec.alpha :as s]
[clojure.tools.namespace.repl :as tools-ns]
[expound.alpha :as expound]
[mount.core :as mount]
[shadow.cljs.devtools.api :as shadow]
;; this is the top-level dependent component...mount will find the rest via ns requires
[{{namespace}}.server.s... | null | https://raw.githubusercontent.com/dvingo/dv.fulcro-template/3f143d9a06e00749ea7f33c16c002f416fe69415/resources/clj/new/dv.fulcro_template/src/dev/user.clj | clojure | this is the top-level dependent component...mount will find the rest via ns requires
==================== SERVER ====================
Change the default output of spec to be more readable
For shadow: start the shadow-cljs server using ./scripts/start-dev.sh
then you can start the watch processes here (ensure the c... | (ns user
(:require
[clojure.spec.alpha :as s]
[clojure.tools.namespace.repl :as tools-ns]
[expound.alpha :as expound]
[mount.core :as mount]
[shadow.cljs.devtools.api :as shadow]
[{{namespace}}.server.server :refer [http-server]]))
(tools-ns/set-refresh-dirs "src/main" "src/dev" "src/test")
... |
653bfc9c10a2d5f2960c6f1f447e2ffa53d3f42e787b254c13f4cb98f3de4101 | elastic/apm-agent-ocaml | reporter.mli | include Elastic_apm.Reporter_intf.S
module Log : Async.Log.Global_intf
module Host : sig
type t
val server_env_key : string
val token_env_key : string
val of_env : unit -> t option
val make : Uri.t -> token:string -> t
end
val create :
?client:Blue_http.Client.t ->
?max_messages_per_batch:int ->
... | null | https://raw.githubusercontent.com/elastic/apm-agent-ocaml/50247d756493c5c9700fc95b6f6645f1a6203e65/async_reporter/reporter.mli | ocaml | include Elastic_apm.Reporter_intf.S
module Log : Async.Log.Global_intf
module Host : sig
type t
val server_env_key : string
val token_env_key : string
val of_env : unit -> t option
val make : Uri.t -> token:string -> t
end
val create :
?client:Blue_http.Client.t ->
?max_messages_per_batch:int ->
... | |
85ba2aedc84b563df51886407234125d6c6806351e60e78337ec0bbc3de524f7 | freizl/hoauth2 | ZOHO.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
-- | [ZOHO oauth overview](-overview.html)
module Network.OAuth2.Provider.ZOHO where
import Data.Aeson
import Data.Map.Strict qualified as Map
import Data.Set qualified as Set
... | null | https://raw.githubusercontent.com/freizl/hoauth2/2337ba1affce5b60ee09e425988f15bc23e39147/hoauth2-providers/src/Network/OAuth2/Provider/ZOHO.hs | haskell | # LANGUAGE OverloadedStrings #
| [ZOHO oauth overview](-overview.html)
`oauth/user/info` url does not work and find answer from
-api-better-document-oauth-user-info | # LANGUAGE DeriveGeneric #
# LANGUAGE QuasiQuotes #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
module Network.OAuth2.Provider.ZOHO where
import Data.Aeson
import Data.Map.Strict qualified as Map
import Data.Set qualified as Set
import Data.Text.Lazy (Text)
import GHC.Generics
import Network.OAuth.OAuth2
i... |
5dd4718ef0da0eb0cb60d7ffb916cf53aadd2ddeaed657caac37dd6e9da46878 | scicloj/scicloj.ml-tutorials | nested_cv.clj | (ns scicloj.ml.nested-cv
(:require [tablecloth.api :as tc]
[scicloj.metamorph.ml :as ml]
[scicloj.metamorph.ml.classification :as clf]
[tech.v3.datatype :as dt]))
(defn nested-cv [data pipelines metric-fn loss-or-accuracy outer-k inner-k]
;;
(let [k-folds (tc/split->seq dat... | null | https://raw.githubusercontent.com/scicloj/scicloj.ml-tutorials/0ef90e5a7d5cb3aca1c2d2e59f35117b50e264bf/src/scicloj/ml/nested_cv.clj | clojure | (ns scicloj.ml.nested-cv
(:require [tablecloth.api :as tc]
[scicloj.metamorph.ml :as ml]
[scicloj.metamorph.ml.classification :as clf]
[tech.v3.datatype :as dt]))
(defn nested-cv [data pipelines metric-fn loss-or-accuracy outer-k inner-k]
(let [k-folds (tc/split->seq data :kfol... | |
fa83db69951552c181adec07d762c7a26ef54350fd73bd878d6f7d16e4c2015d | thlack/surfs | impl.clj | (ns ^:no-doc thlack.surfs.repl.impl
(:require [clojure.spec.alpha :as s]
[clojure.string :as string]
[thlack.surfs.render :as render]))
(defn- get-var
[tag]
(render/tags tag))
(defn- get-meta
[tag]
(some-> tag
(get-var)
(meta)
(select-keys [:doc :name]))... | null | https://raw.githubusercontent.com/thlack/surfs/e03d137d6d43c4b73a45a71984cf084d2904c4b0/src/thlack/surfs/repl/impl.clj | clojure | (ns ^:no-doc thlack.surfs.repl.impl
(:require [clojure.spec.alpha :as s]
[clojure.string :as string]
[thlack.surfs.render :as render]))
(defn- get-var
[tag]
(render/tags tag))
(defn- get-meta
[tag]
(some-> tag
(get-var)
(meta)
(select-keys [:doc :name]))... | |
041e4252826b16633fec84615f6c72e3ef21668ab720e9ca900a3f0fcc62c0dc | CatalaLang/catala | print.mli | This file is part of the Catala compiler , a specification language for tax
and social benefits computation rules . Copyright ( C ) 2022 , contributor :
< >
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/CatalaLang/catala/fced0fff54ddeacee74b357196bdac3151c4c0ef/compiler/scalc/print.mli | ocaml | This file is part of the Catala compiler , a specification language for tax
and social benefits computation rules . Copyright ( C ) 2022 , contributor :
< >
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
use this file except in compliance with the License . ... | |
5879910fdec693a312b1f481d07a443742f9f4ea783dfda77a54afdd0ede358f | LukaKurnjek/plutus-pioneer-program-book | Parameterized.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE Templ... | null | https://raw.githubusercontent.com/LukaKurnjek/plutus-pioneer-program-book/0e69b2719dc7412a412a546825a002be5209e733/code/week03/src/Week03/Parameterized.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators # | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - unused - imports #
module Week03.Parameterized where
import Control.Monad hiding (fmap)
impor... |
b97a140ad204ce5e0d3136a52dc6de4ad1e3b8d853c7004b13804124a0f9da46 | d-cent/mooncake | mongo.clj | (ns mooncake.integration.db.mongo
(:require
[midje.sweet :refer :all]
[mooncake.db.mongo :as mongo]
[mooncake.test.test-helpers.db :as dbh]))
(def collection-name "stuff")
(defn test-fetch [store]
(fact {:midje/name (str (type store) " -- creating mongo store from mongo uri creates a MongoStore which ... | null | https://raw.githubusercontent.com/d-cent/mooncake/eb16b7239e7580a73b98f7cdacb324ab4e301f9c/test/mooncake/integration/db/mongo.clj | clojure | (ns mooncake.integration.db.mongo
(:require
[midje.sweet :refer :all]
[mooncake.db.mongo :as mongo]
[mooncake.test.test-helpers.db :as dbh]))
(def collection-name "stuff")
(defn test-fetch [store]
(fact {:midje/name (str (type store) " -- creating mongo store from mongo uri creates a MongoStore which ... | |
6f6dea496fa24d3e8f92887cf80c23e84ffb3845dd47d16e8fa1c39bba1ee462 | gigasquid/clj-drone | simple.clj | (ns clj-drone.example.simple
(:require [clj-drone.core :refer :all]))
(drone-initialize)
;Use ip and port for non-standard drone ip/port
( drone - initialize : default ip )
(drone :take-off)
(Thread/sleep 10000)
(drone :land)
| null | https://raw.githubusercontent.com/gigasquid/clj-drone/b85320a0ab5e4d8589aaf77a0bd57e8a46e2905b/examples/simple.clj | clojure | Use ip and port for non-standard drone ip/port | (ns clj-drone.example.simple
(:require [clj-drone.core :refer :all]))
(drone-initialize)
( drone - initialize : default ip )
(drone :take-off)
(Thread/sleep 10000)
(drone :land)
|
cf1ecdbe3e47ff1caac5c1e21efcf0936e6ce2e9182a2fd21bebd91aae405cdf | zenhack/mule | pair.ml | module type Elt = sig
include Comparable.S
val sexp_of_t : t -> Sexp.t
val t_of_sexp : Sexp.t -> t
end
module Make(Left:Elt)(Right:Elt) = struct
module T = struct
type t = (Left.t * Right.t)
[@@deriving sexp, compare]
end
include T
include Comparator.Make(T)
end
| null | https://raw.githubusercontent.com/zenhack/mule/f3e23342906d834abb9659c72a67c1405c936a00/src/mule/lib/util/pair.ml | ocaml | module type Elt = sig
include Comparable.S
val sexp_of_t : t -> Sexp.t
val t_of_sexp : Sexp.t -> t
end
module Make(Left:Elt)(Right:Elt) = struct
module T = struct
type t = (Left.t * Right.t)
[@@deriving sexp, compare]
end
include T
include Comparator.Make(T)
end
| |
243a10c2b019d57d8269abbbc81790cacbec26dda9fb76769b1c0fcfa21c716d | soegaard/metapict | pointilism.rkt | #lang racket
(require metapict)
;;;
Pointilism
;;;
; Inspired by
;
The image shows on the moon saluting the american flag .
(def bm (read-bitmap "moonlanding.jpg")) ; read bitmap from disk
(defv (w h) (bitmap-size bm)) ; determine width and height
(define (draw-points n size) ; draw ... | null | https://raw.githubusercontent.com/soegaard/metapict/47ae265f73cbb92ff3e7bdd61e49f4af17597fdf/metapict/examples/pointilism.rkt | racket |
Inspired by
read bitmap from disk
determine width and height
draw n circles of radius size
generate random point (w,h)
use the color to draw a filled circle | #lang racket
(require metapict)
Pointilism
The image shows on the moon saluting the american flag .
(for/draw ([n n])
(def x (random w))
(def y (random h))
find color of the ( x , in the image
(def c (get-pixel bm x y))
(color c (fill (circle (pt x y) size)))))
(set-curve-pict-size 300 3... |
3b0fc6b77fdf03deb2a3e776780e24a43e6e4e4a521177dc9832d71932755969 | parenthesin/microservice-boilerplate-malli | http_test.clj | (ns unit.parenthesin.components.http-test
(:require [clojure.test :refer [deftest is testing use-fixtures]]
[com.stuartsierra.component :as component]
[matcher-combinators.test :refer [match?]]
[parenthesin.components.http :as components.http]
[parenthesin.utils :as u])... | null | https://raw.githubusercontent.com/parenthesin/microservice-boilerplate-malli/b4bd9fa95f3457dfac47b7b64e00e4f14ba7060c/test/unit/parenthesin/components/http_test.clj | clojure | (ns unit.parenthesin.components.http-test
(:require [clojure.test :refer [deftest is testing use-fixtures]]
[com.stuartsierra.component :as component]
[matcher-combinators.test :refer [match?]]
[parenthesin.components.http :as components.http]
[parenthesin.utils :as u])... | |
75975828f1165d880b530a5e20db72a5ad7b5690b2c3eb873bcea3ffbac2a541 | ocaml-flambda/ocaml-jst | misc.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/1bb6c797df7c63ddae1fc2e6f403a0ee9896cc8e/utils/misc.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
val fatal_error: string -> 'a
val fatal_errorf: ('a, Format.formatter, unit, 'b) format4 -> 'a
exception... |
d11b095e70eff7677302b66cdfc3f298e591c44b15973048aa35faa4e2a7db37 | xu-hao/QueryArrow | Local.hs | # LANGUAGE FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , OverloadedStrings , GADTs , ExistentialQuantification , TemplateHaskell , ForeignFunctionInterface #
module QueryArrow.FFI.C.Local where
import Foreign.StablePtr
import Foreign.Ptr
import Foreign.C.Types
import Foreign.C.String
import Foreign.S... | null | https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/QueryArrow-ffi-c-local/src/QueryArrow/FFI/C/Local.hs | haskell | # LANGUAGE FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , OverloadedStrings , GADTs , ExistentialQuantification , TemplateHaskell , ForeignFunctionInterface #
module QueryArrow.FFI.C.Local where
import Foreign.StablePtr
import Foreign.Ptr
import Foreign.C.Types
import Foreign.C.String
import Foreign.S... | |
743de67396406daddd50b37f91ca15c9391fe7463f66e99de5072c8607aa46b3 | facebook/infer | RacerDFileAnalysis.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/7f5c21d32d57578fe05aa1c1eef82ad1a101dc4f/infer/src/concurrency/RacerDFileAnalysis.ml | ocaml | * Type for deduplicating and storing reports.
* Reset recorded writes and reads, while maintaining the same [IssueLog.t].
* Create a set of reports containing the given [IssueLog.t] but otherwise having no records of
previous reports.
* Recover deduplicated [IssueLog.t] from [t].
* Deduplicate [f].
* Map con... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
8bb9954241d96c9496e9e67ac117b9a533b6e6679495a4fcd3d31b559bffd52f | GlideAngle/flare-timing | Goal.hs | module Flight.Gap.Fraction.Goal (NominalGoal(..)) where
import GHC.Generics (Generic)
import "newtype" Control.Newtype (Newtype(..))
import Data.Via.Scientific
( DecimalPlaces(..)
, deriveDecimalPlaces, deriveJsonViaSci, deriveShowValueViaSci
)
newtype NominalGoal = NominalGoal Rational
deriving (Eq, ... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/gap-allot/library/Flight/Gap/Fraction/Goal.hs | haskell | module Flight.Gap.Fraction.Goal (NominalGoal(..)) where
import GHC.Generics (Generic)
import "newtype" Control.Newtype (Newtype(..))
import Data.Via.Scientific
( DecimalPlaces(..)
, deriveDecimalPlaces, deriveJsonViaSci, deriveShowValueViaSci
)
newtype NominalGoal = NominalGoal Rational
deriving (Eq, ... | |
40997208a77a030ba05d5d297019a67ff41a1be7bc3a53bab18e6439aad220c3 | javalib-team/sawja | birA3.ml |
* This file is part of SAWJA
* Copyright ( c)2009 Delphine Demange ( INRIA )
* Copyright ( c)2009 ( INRIA )
* Copyright ( c)2010 ( INRIA )
* Copyright ( c)2016 ( ENS Rennes )
* Copyright ( c)2016 ( CNRS )
*
* This program is free software : you can redistribute it and/or
* modify it u... | null | https://raw.githubusercontent.com/javalib-team/sawja/8b09d26dd119b2cad6d3f469310881eaa6ceb403/src/birA3.ml | ocaml | var := class (parameters)
var := value_type[e1]...[e2]
let pc_bc2ir m = m.bir.Bir.bir_pc_bc2ir
************ PRINT ***********
************** FIELD Resolution *******************
************** FIELD Resolution END ******************* |
* This file is part of SAWJA
* Copyright ( c)2009 Delphine Demange ( INRIA )
* Copyright ( c)2009 ( INRIA )
* Copyright ( c)2010 ( INRIA )
* Copyright ( c)2016 ( ENS Rennes )
* Copyright ( c)2016 ( CNRS )
*
* This program is free software : you can redistribute it and/or
* modify it u... |
bec026a0f67a0127998ca241f47ac96ecd27be12b54be13657060383ced73cc5 | thizanne/snake | snake.ml | open Lwt.Infix
let flip f x y = f y x
let pi = 4.0 *. atan 1.0
let window = Dom_html.window
let str = Js.string
let alert s = window##alert (str s)
let ( %% ) n k =
(* Fixes modulo for negative n *)
if n < 0
then k + n mod k
else n mod k
let () = Random.self_init ()
let ( @> ) id coercion =
try
Dom_h... | null | https://raw.githubusercontent.com/thizanne/snake/0671810a2c43f2e58bea8384b00ad08050e63184/snake.ml | ocaml | Fixes modulo for negative n
***********************
Behaviour of the game
***********************
| Wall
| Mouse
Return the direction from which the head comes
Return the direction toward which or a body segment goes
Return the direction toward which the tail goes
Replace the head by a body segment
G... | open Lwt.Infix
let flip f x y = f y x
let pi = 4.0 *. atan 1.0
let window = Dom_html.window
let str = Js.string
let alert s = window##alert (str s)
let ( %% ) n k =
if n < 0
then k + n mod k
else n mod k
let () = Random.self_init ()
let ( @> ) id coercion =
try
Dom_html.getElementById id
|> coercio... |
3256ba11d33df587951285c0071bb37d3c64a8bc9d74d7b1ac989eee8bd77d0f | ucsd-progsys/dsolve | pervasives.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ucsd-progsys/dsolve/bfbbb8ed9bbf352d74561e9f9127ab07b7882c0c/stdlib/pervasives.mli | ocaml | *********************************************************************
Objective Caml
... | , 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 : pervasives.mli , v 1.108 2007... |
7dd2150506c74e5e4688eaa93b615c5a67a5ae62a38f2ca638b5ee82dee407bc | janestreet/jsonaf | jsonaf_kernel.ml | module Conv = Conv
module Expert = Expert
module Jsonafable = Jsonafable_intf
type t =
[ `Null
| `False
| `True
| `String of string
| `Number of string
| `Object of (string * t) list
| `Array of t list
]
constraint t = Type.t
module Parser = struct
let parse_number = Result.ok
let t_without_tra... | null | https://raw.githubusercontent.com/janestreet/jsonaf/45c4ebabd03dc099e6de76714d86c53e0879558c/kernel/src/jsonaf_kernel.ml | ocaml | module Conv = Conv
module Expert = Expert
module Jsonafable = Jsonafable_intf
type t =
[ `Null
| `False
| `True
| `String of string
| `Number of string
| `Object of (string * t) list
| `Array of t list
]
constraint t = Type.t
module Parser = struct
let parse_number = Result.ok
let t_without_tra... | |
c347b1e6a44902450b7b6114d60199895192f0d3786eaab2e8c14106a1fa14d8 | Eventuria/demonstration-gsd | Dependencies.hs | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
module Eventuria.GSD.Write.CommandSourcer.Server.Dependencies where
import Eventuria.Commons.Logger.Core
import Eventuria.Commons.Network.Core
import qualified Eventuria.Libraries.PersistedStreamEngine.Instances.EventStore.Client.Dependencies as EventStoreClient... | null | https://raw.githubusercontent.com/Eventuria/demonstration-gsd/5c7692b310086bc172d3fd4e1eaf09ae51ea468f/src/Eventuria/GSD/Write/CommandSourcer/Server/Dependencies.hs | haskell | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
module Eventuria.GSD.Write.CommandSourcer.Server.Dependencies where
import Eventuria.Commons.Logger.Core
import Eventuria.Commons.Network.Core
import qualified Eventuria.Libraries.PersistedStreamEngine.Instances.EventStore.Client.Dependencies as EventStoreClient... | |
33ca28639f13c7741325427dc002d2745a2932a2a5d9c8b3b6557d2baf7b6953 | skruger/ClusterSupervisor | cluster_supervisor_callback.erl |
-module(cluster_supervisor_callback).
%%
%% Include files
%%
-include("cluster_supervisor.hrl").
%%
%% Exported Functions
%%
-export([behaviour_info/1,add/3,remove/3]).
-export([vip_state/2]).
%%
%% API Functions
%%
behaviour_info(callbacks) ->
[{vip_state,3}];
behaviour_info(_) ->
undefined.
vip_state(Stat... | null | https://raw.githubusercontent.com/skruger/ClusterSupervisor/92db35944c3da1efdaa8b0b84cc701ad23ee1281/src/cluster_supervisor_callback.erl | erlang |
Include files
Exported Functions
API Functions
Adding the same module twice results in replacing the previously added version.
error_logger:error_msg("Callbacks: ~p~n",[CallBacks]),
Local Functions
|
-module(cluster_supervisor_callback).
-include("cluster_supervisor.hrl").
-export([behaviour_info/1,add/3,remove/3]).
-export([vip_state/2]).
behaviour_info(callbacks) ->
[{vip_state,3}];
behaviour_info(_) ->
undefined.
vip_state(State , )
vip_state(State,VipAddr) ->
CallBacks =
case application:get_... |
abc4b2aafa4e6bd5fbd35014d6351512fff563bdaa979c33529ff61792483e68 | idubrov/siperl | sip_idgen.erl | %%%----------------------------------------------------------------
@author < >
@doc Utilities to generate different identifiers ( branch , tags )
%%%
%%% @end
2011 - 2012 . See LICENSE file .
%%%----------------------------------------------------------------
-module(sip_idgen).
%% Exports
%% API
-expo... | null | https://raw.githubusercontent.com/idubrov/siperl/251daf3a0d7c7442f56f42cfd6c92764a4f475a7/apps/sip/src/syntax/sip_idgen.erl | erlang | ----------------------------------------------------------------
@end
----------------------------------------------------------------
Exports
API
Include files
-----------------------------------------------------------------
API functions
-----------------------------------------------------------------
@doc G... | @author < >
@doc Utilities to generate different identifiers ( branch , tags )
2011 - 2012 . See LICENSE file .
-module(sip_idgen).
-export([generate_tag/0, generate_branch/0, generate_call_id/0, generate_cseq/0]).
-export([generate_id/1]).
-include("../sip_common.hrl").
-include("sip.hrl").
When a... |
5082ec7fdfa34b8de3eadd21de5c309f41edb9ba049467f0b4563a12eb1d90ed | Vortecsmaster/EmurgoAcademyPlutusExamples | NFTBounty.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE OverloadedStrings #-}
mo... | null | https://raw.githubusercontent.com/Vortecsmaster/EmurgoAcademyPlutusExamples/184a00c1d53c24acfbe9ecf8c37ad4e09285c31b/V1/MathBounty/src/NFTBounty.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators #
# LANGUAGE OverloadedStrings #
Contract Monad
Ledger
"Normal " Haskell
"Normal" Haskell -}
THE ON-CHAIN CODE
New wrapper function for typed validators
Get the untyped validator script of the wrapped typ... | # LANGUAGE NoImplicitPrelude #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module NFTBounty where
PlutusTx
import PlutusTx (Data (..))
import qualified PlutusTx
import qualified PlutusTx.Built... |
f904fb7758105e96f741b1757d78fd322c736e95562ac610c60b0451b401fde2 | paines/cl-puyopuyo | package.lisp | package.lisp
(defpackage #:cl-puyopuyo
(:use #:cl))
| null | https://raw.githubusercontent.com/paines/cl-puyopuyo/8a7786d38be041027669658e6be46366d45eece2/package.lisp | lisp | package.lisp
(defpackage #:cl-puyopuyo
(:use #:cl))
| |
825edfe3ba0e2696e77b355c8bb512f7f8a954543008ddf041d6ae45d63000b9 | openbadgefactory/salava | registration_test.clj | (ns salava.user.registration-test
(:require [midje.sweet :refer :all]
[salava.core.migrator :as migrator]
[salava.test-utils :refer [test-api-request]]))
(def registration-data
{:first_name "Testing"
:last_name "Registration"
:email ""
:country "US"})
(facts "about user account re... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/test_old/clj/salava/user/registration_test.clj | clojure | (ns salava.user.registration-test
(:require [midje.sweet :refer :all]
[salava.core.migrator :as migrator]
[salava.test-utils :refer [test-api-request]]))
(def registration-data
{:first_name "Testing"
:last_name "Registration"
:email ""
:country "US"})
(facts "about user account re... | |
fcb962dc1936d73291e564e2ee41c4cefb173669ff26384da6343c15a0b69157 | BinaryAnalysisPlatform/bap-plugins | trim.mli | * A trim is a subgraph composed of unique source / sink pairs . One or
more trims may be produced from a cut group : one trim for each
unique source / sink pair .
more trims may be produced from a cut group: one trim for each
unique source/sink pair.
*)
open Bap.Std
open Cut
open Options
type tr... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap-plugins/2e9aa5c7c24ef494d0e7db1b43c5ceedcb4196a8/minos/trim.mli | ocaml | 'a is debug. 'b is highlight.
A given cut_group returns a sequence of trims (trim group) | * A trim is a subgraph composed of unique source / sink pairs . One or
more trims may be produced from a cut group : one trim for each
unique source / sink pair .
more trims may be produced from a cut group: one trim for each
unique source/sink pair.
*)
open Bap.Std
open Cut
open Options
type tr... |
e8b245cc6e7421063b1d66cccb6eb3c8b0495c851cd165b66eded9a93e2d0305 | facebook/duckling | Rules.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree.
{-# LANGUAGE OverloadedStrings #-}
module Duckling.TimeGrain.EN.Rules
( rules
) where
import Data.Stri... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/TimeGrain/EN/Rules.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
# LANGUAGE OverloadedStrings # | Copyright ( c ) 2016 - present , Facebook , Inc.
module Duckling.TimeGrain.EN.Rules
( rules
) where
import Data.String
import Data.Text (Text)
import Prelude
import Duckling.Dimensions.Types
import Duckling.Types
import qualified Duckling.TimeGrain.Types as TG
grains :: [(Text, String, TG.Grain)]
grains = [... |
252d628ba6854809c630cd5c0508bef32bb265c2d2393314a4795c51a5dad8bb | caiorss/Functional-Programming | actions.hs |
file : ch07 / actions.hs
str2action :: String -> IO ()
str2action input = putStrLn ("Data: " ++ input)
list2actions :: [String] -> [IO ()]
list2actions = map str2action
numbers :: [Int]
numbers = [1..10]
strings :: [String]
strings = map show numbers
actions :: [IO ()]
actions = list2actions strings
printitall ... | null | https://raw.githubusercontent.com/caiorss/Functional-Programming/ef3526898e3014e9c99bf495033ff36a4530503d/haskell/rwh/ch07/actions.hs | haskell | Take a list of actions, and execute each of them in turn. |
file : ch07 / actions.hs
str2action :: String -> IO ()
str2action input = putStrLn ("Data: " ++ input)
list2actions :: [String] -> [IO ()]
list2actions = map str2action
numbers :: [Int]
numbers = [1..10]
strings :: [String]
strings = map show numbers
actions :: [IO ()]
actions = list2actions strings
printitall ... |
10544084572b407fe20c8124f94e32e5795e2508e1059338259ac1c7694a15e3 | ghollisjr/cl-ana | package.lisp | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
;;;;
This file is part of cl - ana .
;;;;
;;;; cl-ana is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the ... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/clos-utils/package.lisp | lisp |
cl-ana is free software: you can redistribute it and/or modify it
(at your option) any later version.
cl-ana is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public Lice... | cl - ana is a Common Lisp data analysis library .
Copyright 2013 , 2014
This file is part of cl - ana .
under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.