_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 |
|---|---|---|---|---|---|---|---|---|
96c1da7aaa61e0c60383db0298fbbb04f203001b6bdafaff490345af8b6de184 | gasin/OCallo | color.ml | type color = int
let none = 0
let white = 1
let black = 2
let sentinel = 3
let opposite_color c = (2-c) + 1
let string_of_color c =
if c = white then "White"
else "Black"
let print_color c =
if c = white then print_string "O"
else if c = black then print_string "X"
else i... | null | https://raw.githubusercontent.com/gasin/OCallo/baba23488c8492fe7532ed4cd265a7277d6c1d2c/color.ml | ocaml | type color = int
let none = 0
let white = 1
let black = 2
let sentinel = 3
let opposite_color c = (2-c) + 1
let string_of_color c =
if c = white then "White"
else "Black"
let print_color c =
if c = white then print_string "O"
else if c = black then print_string "X"
else i... | |
d91147103ee8ac790fe57f8c0c79be3c2f06efbf492d02edd23635a89c816fbc | fosskers/aura | B.hs | # LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
-- |
Module : . Commands . B
Copyright : ( c ) , 2012 - 2021
-- License : GPL3
Maintainer : < >
--
-- Handle all @-B@ flags - those which involve saved package states.
module Aura.Commands.B
( saveState
, restoreState
, cleanStates
, lis... | null | https://raw.githubusercontent.com/fosskers/aura/08cd46eaa598094f7395455d66690d3d8c59e965/haskell/aura/exec/Aura/Commands/B.hs | haskell | |
License : GPL3
Handle all @-B@ flags - those which involve saved package states.
-
| The result of @-Bl@. | # LANGUAGE TupleSections #
# LANGUAGE ViewPatterns #
Module : . Commands . B
Copyright : ( c ) , 2012 - 2021
Maintainer : < >
module Aura.Commands.B
( saveState
, restoreState
, cleanStates
, listStates
) where
import Aura.Core (warn)
import Aura.IO
import Au... |
f81a3e2bd9720ae015fd687e428f541304495499d103ff6345e751783ec3ede9 | c-cube/trustee | VM.ml |
open Sigs
module K = Kernel
type 'a vec = 'a Vec.t
(* all types *)
module Types_ = struct
type vm = {
stack: value Vec.t;
(** Operand stack. *)
stack_offsets: int Vec.t;
(** End offset for each frame in `stack` *)
call_stack : chunk Vec.t;
(** Chunks currently being evaluated. The active ... | null | https://raw.githubusercontent.com/c-cube/trustee/037b4ddf2d8c969eed9b2bdb99ac560662719570/src/core/VM.ml | ocaml | all types
* Operand stack.
* End offset for each frame in `stack`
* Chunks currently being evaluated. The active chunk is the one
on top.
* Instruction pointer for topmost chunk in {!call_stack}
* IP for all items in [call_stack] except the last.
* Primitives currently being evaluated
* Stack of registe... |
open Sigs
module K = Kernel
type 'a vec = 'a Vec.t
module Types_ = struct
type vm = {
stack: value Vec.t;
stack_offsets: int Vec.t;
call_stack : chunk Vec.t;
mutable ip: int;
call_restore_ip : int Vec.t;
call_prim: primitive Vec.t;
regs: value Vec.t;
ctx: K.Ctx.t;
mutabl... |
46b41c5f470f72228fc92d8c882945db65c7a399853d95aef88502aee9f9cfa6 | privet-kitty/cl-competitive | trie.lisp | (defpackage :cp/trie
(:use :cl)
(:export #:trie-char-encode #:trie-node #:make-trie #:+null-trie+ #:+trie-alphabet-size+
#:trie-size #:trie-children #:trie-insert! #:trie-get)
(:documentation "Provides multiset structure with trie."))
(in-package :cp/trie)
;; ASCII code:
# \A : 65
# \a : 97
# \0... | null | https://raw.githubusercontent.com/privet-kitty/cl-competitive/657b6a1919ab83adb2dae5001732fbb151ce0e2c/module/trie.lisp | lisp | ASCII code:
| (defpackage :cp/trie
(:use :cl)
(:export #:trie-char-encode #:trie-node #:make-trie #:+null-trie+ #:+trie-alphabet-size+
#:trie-size #:trie-children #:trie-insert! #:trie-get)
(:documentation "Provides multiset structure with trie."))
(in-package :cp/trie)
# \A : 65
# \a : 97
# \0 : 48
(declaim ... |
f0dd93e9974a30fd920174649f5eae5de5ec5e4cdde37aa3eac0b169ddfc5747 | mtpearce/idyom | music-data.lisp | ;;;; ======================================================================
;;;; File: music-data.lisp
Author : < >
Created : < 2002 - 10 - 09 >
Time - stamp : < 2018 - 01 - 22 21:43:51 marcusp >
;;;; =======================================... | null | https://raw.githubusercontent.com/mtpearce/idyom/d0449a978c79f8ded74c509fdfad7c1a253c5a80/database/music-data.lisp | lisp | ======================================================================
File: music-data.lisp
======================================================================
DESCRIPTION
Provides a database structure for storing and querying melodic
data in an sql database. The database contains tables for
event-... | Author : < >
Created : < 2002 - 10 - 09 >
Time - stamp : < 2018 - 01 - 22 21:43:51 marcusp >
datasets , mtp - compositions and mtp - events where each event is identified
a unique set of three keys : dataset - id composition - id and
(cl:in-... |
ebbe8107931545757f9d51466fbea1390937d98a7dbc7ddf28c8f679add68c97 | fulcrologic/fulcro-rad-demo | connection_pools.clj | (ns com.example.components.connection-pools
(:require
[mount.core :refer [defstate]]
[com.example.model :refer [all-attributes]]
[com.example.components.config :refer [config]]
[com.fulcrologic.rad.database-adapters.sql.result-set :as rs]
[com.fulcrologic.rad.database-adapters.sql.connection :as p... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-rad-demo/28b8c2dd3cd9f9be66a621627d079bb19bd5e53b/src/sql/com/example/components/connection_pools.clj | clojure | (ns com.example.components.connection-pools
(:require
[mount.core :refer [defstate]]
[com.example.model :refer [all-attributes]]
[com.example.components.config :refer [config]]
[com.fulcrologic.rad.database-adapters.sql.result-set :as rs]
[com.fulcrologic.rad.database-adapters.sql.connection :as p... | |
670f00c3de59180a68c5774c0e30e897d10c5807d940b485b743b369d7c9d2c3 | urbanslug/graphite | test-graph.rkt | #lang racket
(require rackunit)
(require "../../graphite/algorithms/graph.rkt")
(require "../../graphite/structures/graph.rkt")
(define x (create-node "ABISD" #:offset 12))
(define y (create-node "ABOPD" #:offset 13))
(define z (create-node "OPYUD" #:offset 15))
(define dag (gen-directed-graph empty-graph (list (co... | null | https://raw.githubusercontent.com/urbanslug/graphite/bcac6bd61172c52d1cc89c0bd0abe8ad3c6a6576/tests/algorithms/test-graph.rkt | racket | #lang racket
(require rackunit)
(require "../../graphite/algorithms/graph.rkt")
(require "../../graphite/structures/graph.rkt")
(define x (create-node "ABISD" #:offset 12))
(define y (create-node "ABOPD" #:offset 13))
(define z (create-node "OPYUD" #:offset 15))
(define dag (gen-directed-graph empty-graph (list (co... | |
8c453730435efedeedde15cf2946c16b4b3549d053ab23443af801f51d7e3db3 | ejgallego/HOARe2 | whyTrans.ml | Copyright ( c ) 2013 , The Trustees of the University of Pennsylvania
Copyright ( c ) 2013 , The IMDEA Software Institute
All rights reserved .
LICENSE : 3 - clause BSD style .
See the LICENSE file for details on licensing .
Copyright (c) 2013, The IMDEA Software Institute
All rights rese... | null | https://raw.githubusercontent.com/ejgallego/HOARe2/48d8760696fdf4b8a3eda5a4d2a53eeba53072d8/src/whyTrans.ml | ocaml | Printing routines
Non-translatable things can be recovered
***********************************************************************
Translation environment
We could have used a list
Remove negative binders
We can flatten types to Why3 format if needed
We intro... | Copyright ( c ) 2013 , The Trustees of the University of Pennsylvania
Copyright ( c ) 2013 , The IMDEA Software Institute
All rights reserved .
LICENSE : 3 - clause BSD style .
See the LICENSE file for details on licensing .
Copyright (c) 2013, The IMDEA Software Institute
All rights rese... |
8e24784bdd548bcaa7797319c0523ac1f4045b75b9c814180bb2610a577cdcbb | acieroid/scala-am | cell.scm | (letrec ((cell
(actor "cell" (content)
(put (newcontent) (become cell newcontent))
(get (act) (send act value content) (become cell content))))
(display-actor
(actor "display" ()
(value (x) (if (= x 2) (terminate) (error "Error!")))))
... | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/concurrentScheme/actors/cell.scm | scheme | (letrec ((cell
(actor "cell" (content)
(put (newcontent) (become cell newcontent))
(get (act) (send act value content) (become cell content))))
(display-actor
(actor "display" ()
(value (x) (if (= x 2) (terminate) (error "Error!")))))
... | |
8fc4a15fee3dcf358c60f009d71c857f489408799bbf10fb13047b33058e6faf | drewc/druix | gerbil.scm | (define-module (druix build-system gerbil)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
#:use-module (guix build utils)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix derivations)
#:use-module (ice-9 match)
#:use-module (guix search-paths)
#:export (... | null | https://raw.githubusercontent.com/drewc/druix/5c187b3c69358e6239ac74630ed71840bfc2a276/druix/build-system/gerbil.scm | scheme | (define-module (druix build-system gerbil)
#:use-module (guix build-system)
#:use-module (guix build-system gnu)
#:use-module (guix build utils)
#:use-module (guix utils)
#:use-module (guix packages)
#:use-module (guix derivations)
#:use-module (ice-9 match)
#:use-module (guix search-paths)
#:export (... | |
f09476f7bf516fbf9bd53b2abae2b5a3734f6563b9bd8b957c7a78b21aca4ffe | LeiWangHoward/Common-Lisp-Playground | tconc.lisp | v 1.0 not working so well
(defstruct (tconc (:constructor create-tconc))
"a tail concatenate list for easy append"
(head nil) (tail nil))
(defun make-tconc (&optional l)
(let ( (tc (create-tconc)))
(apply #'tconc tc l)
tc))
(defun tconc (tconc-structure &rest items)
(unless (null items)
(if (null (... | null | https://raw.githubusercontent.com/LeiWangHoward/Common-Lisp-Playground/4130232954f1bbf8aa003d856ccb2ab382da0534/graham-exercise/General/tconc.lisp | lisp | (apply #'tconc tc l)
tc)) | v 1.0 not working so well
(defstruct (tconc (:constructor create-tconc))
"a tail concatenate list for easy append"
(head nil) (tail nil))
(defun make-tconc (&optional l)
(let ( (tc (create-tconc)))
(apply #'tconc tc l)
tc))
(defun tconc (tconc-structure &rest items)
(unless (null items)
(if (null (... |
d4d5ecbfddd81394402542588ae83c7281938f753e7f9f28e5538935304839cd | movio/spaceapps-streamgazer | dev.cljs | (ns ^:figwheel-no-load web.app
(:require [web.core :as core]
[figwheel.client :as figwheel :include-macros true]
[weasel.repl :as weasel]
[reagent.core :as r]))
(enable-console-print!)
(figwheel/watch-and-reload
:websocket-url "ws:3449/figwheel-ws"
:jsload-callback (fn [] (co... | null | https://raw.githubusercontent.com/movio/spaceapps-streamgazer/4a19a054c2198aceaadbebca85ea37712f96d855/web/env/dev/cljs/web/dev.cljs | clojure | (ns ^:figwheel-no-load web.app
(:require [web.core :as core]
[figwheel.client :as figwheel :include-macros true]
[weasel.repl :as weasel]
[reagent.core :as r]))
(enable-console-print!)
(figwheel/watch-and-reload
:websocket-url "ws:3449/figwheel-ws"
:jsload-callback (fn [] (co... | |
862732a2baa40ce2ee8b271985a43d9961809cc55a57be346e1020fe5cc62036 | brendanhay/amazonka | InsightsConfiguration.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived fr... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-xray/gen/Amazonka/XRay/Types/InsightsConfiguration.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
| The structure containing configurations related to insights.
/See:/ 'newInsightsConfiguration' smart constructor.
| Set the InsightsEnabled value to true to enable insights or false to
disable insights.
| Set the Notificatio... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
Derived from AWS service descriptions , licensed under Apache 2.0 .
Mo... |
e76e4f4edde7464813bb730806ba69754acfa580e4a68a03490700eacf6c7edc | bamos/snowglobe | Queries.hs | Execute analytics queries on lists of EnrichedEvents .
--
< >
-- 2015.05.08
module SnowGlobe.Queries(daySummary, dayReport, weekReport) where
import Data.Function(on)
import Data.List(group, groupBy, intercalate, sort, sortBy)
import Data.Maybe(fromMaybe)
import Data.Time(LocalTime, TimeZone)
import SnowGlobe... | null | https://raw.githubusercontent.com/bamos/snowglobe/b5211bbc2029b52339175af413aea52cf9ab2eb9/analysis/SnowGlobe/Queries.hs | haskell |
2015.05.08
events and visitors.
I use this to pipe a summary to my external LCD display,
but a concise summary is also useful on desktop-based status bars.
("Visitors", intercalate "\n\n" visitorInfo)]
High-level statistics about a list of events.
Detailed view of a visitor's interactions.
Reports are represen... | Execute analytics queries on lists of EnrichedEvents .
< >
module SnowGlobe.Queries(daySummary, dayReport, weekReport) where
import Data.Function(on)
import Data.List(group, groupBy, intercalate, sort, sortBy)
import Data.Maybe(fromMaybe)
import Data.Time(LocalTime, TimeZone)
import SnowGlobe.EnrichedEvent(En... |
5ab96305238e0de44d97186e917ae72eae6caf16ff5cd4dff4fa1824988c37a9 | chrisdone/sandbox | money-pennies.hs | # LANGUAGE GeneralizedNewtypeDeriving #
-- | Represent money as pennies.
module Money
( Pennies
, Pounds
, addPennies
, multPennies
, divPennies
, penniesToPounds
) where
import Text.Printf
newtype Pennies =
Pennies
{ penniesCount :: Int
}
deriving (Eq, Ord, Enum)
instance Show Pennies wh... | null | https://raw.githubusercontent.com/chrisdone/sandbox/c43975a01119a7c70ffe83c49a629c45f7f2543a/money-pennies.hs | haskell | | Represent money as pennies. | # LANGUAGE GeneralizedNewtypeDeriving #
module Money
( Pennies
, Pounds
, addPennies
, multPennies
, divPennies
, penniesToPounds
) where
import Text.Printf
newtype Pennies =
Pennies
{ penniesCount :: Int
}
deriving (Eq, Ord, Enum)
instance Show Pennies where
show (Pennies p) = show p +... |
667500872f9516ab9fa2bcd4c9731ed0f4c0dd80bff650037c241cb3428e350b | EgorDm/fp-pacman | SwitchRoom.hs | module Game.Context.SwitchRoom(
SwitchRoomMode(..),
SwitchRoom(..)
) where
{- Data structures -}
--this data is used to let the context know when to switch and how to switch room
data SwitchRoomMode = ResumeRoom | ReloadRoom deriving(Show)
data SwitchRoom = RoomStay | RoomReload | RoomSwitch String SwitchRoomM... | null | https://raw.githubusercontent.com/EgorDm/fp-pacman/19781c92c97641b0a01b8f1554f50f19ff6d3bf4/src/Game/Context/SwitchRoom.hs | haskell | Data structures
this data is used to let the context know when to switch and how to switch room | module Game.Context.SwitchRoom(
SwitchRoomMode(..),
SwitchRoom(..)
) where
data SwitchRoomMode = ResumeRoom | ReloadRoom deriving(Show)
data SwitchRoom = RoomStay | RoomReload | RoomSwitch String SwitchRoomMode deriving(Show) |
c25f0fc5a4233e328773141c2a6c7761aebd07cdf814f171e527c864c511c466 | dwayne/eopl3 | parser.rkt | #lang eopl
;; Program ::= Statement
;;
;; Statement ::= Identifier = Expression
;;
: : = print Expression
;;
;; ::= { {Statement}*(;) }
;;
: : = if Expression Statement Statement
;;
;; ::= while Expression Statement
;;
;; ::= do Statement while Expression
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/STATEMENTS-4.24/parser.rkt | racket | Program ::= Statement
Statement ::= Identifier = Expression
::= { {Statement}*(;) }
::= while Expression Statement
::= do Statement while Expression
::= var {Identifier}*(,) ; Statement
Expression ::= Number
::= Identifier
::= -(Ex... | #lang eopl
: : = print Expression
: : = if Expression Statement Statement
: : Expression
(provide
AST
program
a-program
statement
assign-stmt
print-stmt
block-stmt
if-stmt
while-stmt
do-while-stmt
var-stmt
expression expression?
const-exp
var-exp
d... |
d0f025c8ce5bfcd3429ea271174a1729a539f32c8f9586d21a09b95bde661ec6 | EligiusSantori/L2Apf | cancel.scm | (module logic racket/base
(require
racket/contract
"../packet/game/client/cancel.scm"
(only-in "../system/connection.scm" send-packet)
)
(provide cancel)
(define (cancel connection)
(send-packet connection (game-client-packet/cancel))
)
)
| null | https://raw.githubusercontent.com/EligiusSantori/L2Apf/30ffe0828e8a401f58d39984efd862c8aeab8c30/api/cancel.scm | scheme | (module logic racket/base
(require
racket/contract
"../packet/game/client/cancel.scm"
(only-in "../system/connection.scm" send-packet)
)
(provide cancel)
(define (cancel connection)
(send-packet connection (game-client-packet/cancel))
)
)
| |
3a37b3ed4f88ebcfd306f86a309953992c73d1ed07012ab98edabf95e531a632 | prometheusresearch-archive/action | Mutation.mli | (**
* A computation which modifies the database.
*)
type error = [`DatabaseError of string | QueryTyper.error ]
type ('v, 'err) t constraint [> error] = 'err
type ('v, 'err) comp = ('v, [> error ] as 'err) Run.t
val make : ('v -> (unit, 'err) Run.t) -> ('v, 'err) t
val execute : ('v, 'err) t -> 'v -> (unit, 'e... | null | https://raw.githubusercontent.com/prometheusresearch-archive/action/34e0a1058e3e3212066f732babc1bdd4f2eb1428/core/src/Mutation.mli | ocaml | *
* A computation which modifies the database.
|
type error = [`DatabaseError of string | QueryTyper.error ]
type ('v, 'err) t constraint [> error] = 'err
type ('v, 'err) comp = ('v, [> error ] as 'err) Run.t
val make : ('v -> (unit, 'err) Run.t) -> ('v, 'err) t
val execute : ('v, 'err) t -> 'v -> (unit, 'err) comp
val test : 'v -> bool
|
c28f09407822779adb62262dd9b5e67e5822d90926e1b661b98abb56d0893e60 | facundoolano/cljsbin | user.clj | (ns user
(:require [figwheel-sidecar.repl-api :as ra]))
(defn start-fw []
(ra/start-figwheel!))
(defn stop-fw []
(ra/stop-figwheel!))
(defn cljs []
(ra/cljs-repl))
| null | https://raw.githubusercontent.com/facundoolano/cljsbin/d48be25a9c57522f1dc29e1e520b43ea408cf864/env/dev/user.clj | clojure | (ns user
(:require [figwheel-sidecar.repl-api :as ra]))
(defn start-fw []
(ra/start-figwheel!))
(defn stop-fw []
(ra/stop-figwheel!))
(defn cljs []
(ra/cljs-repl))
| |
7973564fb0f52b6807250e2098a3ef8ce735224aea8ea51c6da9d3700e75c566 | janestreet/async_js | debug.mli | open Core
open Js_of_ocaml
* Output a [ Sexp.t ] value to the console , e.g. via the message extensions :
{ [
log_s [ % message " An example " ( of_using : Ppx_message.t ) ]
] }
{[
log_s [%message "An example" (of_using:Ppx_message.t)]
]}
*)
val log_s : Sexp.t -> unit
* [ log_s_as_... | null | https://raw.githubusercontent.com/janestreet/async_js/d0cff4bd7bababd2480d6e4bd9609ab5453cbb10/src/debug.mli | ocaml | open Core
open Js_of_ocaml
* Output a [ Sexp.t ] value to the console , e.g. via the message extensions :
{ [
log_s [ % message " An example " ( of_using : Ppx_message.t ) ]
] }
{[
log_s [%message "An example" (of_using:Ppx_message.t)]
]}
*)
val log_s : Sexp.t -> unit
* [ log_s_as_... | |
0d642a27f9c9db4b44534a5dc1d5973ebe1cefdd4c04f3aa61d9777dd05cc45d | janestreet/ecaml | eval.mli | open! Core
open! Import
(** [(describe-function 'eval-after-load)] *)
val after_load : Source_code_position.t -> Feature.t -> f:(unit -> unit) -> unit
| null | https://raw.githubusercontent.com/janestreet/ecaml/7c16e5720ee1da04e0757cf185a074debf9088df/src/eval.mli | ocaml | * [(describe-function 'eval-after-load)] | open! Core
open! Import
val after_load : Source_code_position.t -> Feature.t -> f:(unit -> unit) -> unit
|
7efed385cc32835e60295bd1b593ef53daaa424dc0098b1ed1df152e6e4d1738 | ranjitjhala/haddock-annot | ParseModuleHeader.hs | -----------------------------------------------------------------------------
-- |
-- Module : Haddock.Interface.ParseModuleHeader
Copyright : ( c ) 2006 , 2009
-- License : BSD-like
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
-----------------------------------... | null | https://raw.githubusercontent.com/ranjitjhala/haddock-annot/ffaa182b17c3047887ff43dbe358c246011903f6/haddock-2.9.3/src/Haddock/Interface/ParseModuleHeader.hs | haskell | ---------------------------------------------------------------------------
|
Module : Haddock.Interface.ParseModuleHeader
License : BSD-like
Maintainer :
Stability : experimental
Portability : portable
---------------------------------------------------------------------------
---------------... | Copyright : ( c ) 2006 , 2009
module Haddock.Interface.ParseModuleHeader (parseModuleHeader) where
import Haddock.Types
import Haddock.Lex
import Haddock.Parse
import RdrName
import DynFlags
import Data.Char
NB . The headers must be given in the order Module , Description ,
parseModuleHeader :: DynF... |
388744d9db73d9f7b6d649913c514ecd5367755c4713cece9c7783ec82cb0bfc | lisp/de.setf.xml | namespace.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*-
(in-package :xml-query-data-model)
(setq xml-query-data-model:*namespace*
(xml-query-data-model:defnamespace "-rdf-syntax-ns#"
(:use)
... | null | https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/www-w3-org/1999/02/22-rdf-syntax-ns/namespace.lisp | lisp | Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*-
(xqdm:find-namespace "-rdf-syntax-ns#" :if-does-not-exist :load) |
(in-package :xml-query-data-model)
(setq xml-query-data-model:*namespace*
(xml-query-data-model:defnamespace "-rdf-syntax-ns#"
(:use)
(:nicknames "rdf")
(:export
... |
6a635043a82e458d8d2422520762a648eda8b6ab6e3af21a2b3eb094bc060861 | oakmac/chessboard2 | js_api_test.cljs | (ns test.chessboard2.js-api-test
(:require
[cljs.test :refer [deftest is]]
[com.oakmac.chessboard2.constants :refer [animate-speed-strings->times start-position]]
[com.oakmac.chessboard2.js-api :refer [parse-constructor-second-arg parse-move-args parse-set-position-args]]
[com.oakmac.chessboard2.util.fen ... | null | https://raw.githubusercontent.com/oakmac/chessboard2/f6cca1d9e8a76b495147b95ced83e9beb48dbd11/src-cljs/test/chessboard2/js_api_test.cljs | clojure | TODO: more unit tests here
- test invalid config values | (ns test.chessboard2.js-api-test
(:require
[cljs.test :refer [deftest is]]
[com.oakmac.chessboard2.constants :refer [animate-speed-strings->times start-position]]
[com.oakmac.chessboard2.js-api :refer [parse-constructor-second-arg parse-move-args parse-set-position-args]]
[com.oakmac.chessboard2.util.fen ... |
b17539a604c2ed973c1a32d46a4eb97d936987f5ee3ee2442985cbff395b038e | tmcdonell/cuda | MatrixMul.hs | # LANGUAGE CPP #
--------------------------------------------------------------------------------
--
Module : MatrixMul
Copyright : ( c ) 2009
-- License : BSD
--
-- Matrix multiplication using runtime interface and execution control instead
of calling C functions via the FFI .
--
-----------------------... | null | https://raw.githubusercontent.com/tmcdonell/cuda/b80e277845b63e85495a641a9af7070ed4c30937/examples/src/matrixMul/MatrixMul.hs | haskell | ------------------------------------------------------------------------------
License : BSD
Matrix multiplication using runtime interface and execution control instead
------------------------------------------------------------------------------
Friends
--------------------------------------------------------... | # LANGUAGE CPP #
Module : MatrixMul
Copyright : ( c ) 2009
of calling C functions via the FFI .
module Main where
#include "matrix_mul.h"
import Time
import RandomVector
System
import Data.Array
import System.IO
import Foreign
import qualified Foreign.CUDA as CUDA
matMult :: (Num e, Storable e) =>... |
3855d68628aa5e69bbdd2d181f4c199e0e22cb752dbdf0566c30ea7f3b65be9a | mmottl/ocaml-prog-pats | arrow.mli | * { 6 Simple arrows }
module type SIMPLE_ARROW = sig
type ('a, 'b) t (** Representation of arrows *)
val arr : ('a -> 'b) -> ('a, 'b) t
(** [arr f] projects an OCaml-function to a morphism (arrow) in the
category of computations. *)
val (>>>) : ('a, 'b) t -> ('b, 'c) t -> ('a, 'c) t
* [ af > > > ag ] c... | null | https://raw.githubusercontent.com/mmottl/ocaml-prog-pats/cc01cad585743798213f82996acf423335dfde5d/arrows/arrow.mli | ocaml | * Representation of arrows
* [arr f] projects an OCaml-function to a morphism (arrow) in the
category of computations.
* [app ()] @return an arrow that represents a computation which takes
another arrow and a value as argument and returns the result of
applying the latter to the former.
* [run af x... | * { 6 Simple arrows }
module type SIMPLE_ARROW = sig
val arr : ('a -> 'b) -> ('a, 'b) t
val (>>>) : ('a, 'b) t -> ('b, 'c) t -> ('a, 'c) t
* [ af > > > ag ] composes the two computations [ af ] and [ ag ] .
val app : unit -> (('a, 'b) t * 'a, 'b) t
val run : ('a, 'b) t -> 'a -> 'b
end
module SimpleArrow ... |
137bd9638e0544a2896ee33bebe73ad0b8c29a30ad34081f6365dba61ee29869 | wdebeaum/DeepSemLex | store.lisp | ;;;;
;;;; W::store
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::store
(SENSES
((LF-PARENT ONT::commercial-facility)
(meta-data :origin caloy2 :entry-date 20050404 :change-date nil :wn ("store%1:06:00") :comments projector-purchasing)
)
)
)
))
(define-words :pos W::v
:... | null | https://raw.githubusercontent.com/wdebeaum/DeepSemLex/ce0e7523dd2b1ebd42b9e88ffbcfdb0fd339aaee/trips/src/LexiconManager/Data/new/store.lisp | lisp |
W::store
(TEMPL agent-neutral-xp-templ) |
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::store
(SENSES
((LF-PARENT ONT::commercial-facility)
(meta-data :origin caloy2 :entry-date 20050404 :change-date nil :wn ("store%1:06:00") :comments projector-purchasing)
)
)
)
))
(define-words :pos W::v
:words (
(W::store
(... |
98bf6dbe2b0bf0d0c215347abf18b7affb62fac23f43eccc377ae8c1fa56be76 | BitGameEN/bitgamex | erlcloud_sdb.erl | -module(erlcloud_sdb).
-type sdb_attribute() :: {string(), string() | {replace, string()}}.
-type sdb_attributes() :: [sdb_attribute()].
-type sdb_conditional() :: {string(), string() | exists | not_exists}.
-type sdb_conditionals() :: [sdb_conditional()].
-type sdb_delete_attribute() :: {string(), string()} | string(... | null | https://raw.githubusercontent.com/BitGameEN/bitgamex/151ba70a481615379f9648581a5d459b503abe19/src/deps/erlcloud/src/erlcloud_sdb.erl | erlang | Domains
Items
a token to retrieve the next page, if any.
These functions will make multiple requests until all
pages of results have been consumed.
Convert from microseconds to milliseconds
Not exactly random since we're relying on the
calling process to hold our PRNG state. | -module(erlcloud_sdb).
-type sdb_attribute() :: {string(), string() | {replace, string()}}.
-type sdb_attributes() :: [sdb_attribute()].
-type sdb_conditional() :: {string(), string() | exists | not_exists}.
-type sdb_conditionals() :: [sdb_conditional()].
-type sdb_delete_attribute() :: {string(), string()} | string(... |
c6da0335b527126511c66d83909264123d48fe7fd4067c79b343e75cc68a8b84 | LightAndLight/sized-hkts | C.hs | # language GeneralizedNewtypeDeriving #
{-# language OverloadedStrings #-}
module Codegen.C
( Ann(..)
, C(..)
, CDecl(..)
, CStatement(..)
, CType(..)
, CExpr(..)
, preamble
, render
, prettyCDecls
, prettyCStatement
, prettyCType
, prettyCExpr
)
where
import Data.Foldable (fold)
import quali... | null | https://raw.githubusercontent.com/LightAndLight/sized-hkts/d12fedb34e7ea82be66f200e9ecf7fcf611cce53/src/Codegen/C.hs | haskell | # language OverloadedStrings # | # language GeneralizedNewtypeDeriving #
module Codegen.C
( Ann(..)
, C(..)
, CDecl(..)
, CStatement(..)
, CType(..)
, CExpr(..)
, preamble
, render
, prettyCDecls
, prettyCStatement
, prettyCType
, prettyCExpr
)
where
import Data.Foldable (fold)
import qualified Data.List as List
import Data.... |
b7fd080c758a142c169e8e2831e424b0fac651af9f8227eaeb5c8857f023311b | osa1/sc-plugin | Process2.hs | # LANGUAGE GADTs , RankNTypes , GeneralizedNewtypeDeriving #
module Supercompile.Drive.Process2 (supercompile) where
import Supercompile.Drive.Match
import Supercompile.Drive.Split
import Supercompile.Drive.Process
import Supercompile.Core.FreeVars
import Supercompile.Core.Renaming
import Supercompile.Core.Syntax
imp... | null | https://raw.githubusercontent.com/osa1/sc-plugin/1969ad81f16ca8ed8110ca8dadfccf6f3d463635/src/Supercompile/Drive/Process2.hs | haskell | newtype I a = I { unI :: a }
and make some of the consumers simpler. I actually want this generalisation, though.
^ Chooses the evaluation strategy
NB : you ca n't implement this for all monad transformers
( in particular the continuation monad transformer ) .
But if you can , we can derive a delayStateT equival... | # LANGUAGE GADTs , RankNTypes , GeneralizedNewtypeDeriving #
module Supercompile.Drive.Process2 (supercompile) where
import Supercompile.Drive.Match
import Supercompile.Drive.Split
import Supercompile.Drive.Process
import Supercompile.Core.FreeVars
import Supercompile.Core.Renaming
import Supercompile.Core.Syntax
imp... |
35532097a36a6cf86d5279718497f98629f63517954579a7af35be0b9ce85376 | Chattered/proplcf | BootstrapDIY.hs | -- | Just enough theorems to get us going with conversions, proven using a tree
-- notation that allows us to make assumptions.
module BootstrapDIY where
import Data.Foldable
import Data.List
import Utils
| Proof terms with assumptions . In the notes , we write to denote a proof
-- with conclusion P and assump... | null | https://raw.githubusercontent.com/Chattered/proplcf/dddfb1f5717207c3c65bc6a31619d04db3c14c09/BootstrapDIY.hs | haskell | | Just enough theorems to get us going with conversions, proven using a tree
notation that allows us to make assumptions.
with conclusion P and assumptions Γ. Proofs are not guaranteed to be valid, and
are pushed through the kernel via verify.
| sequent (Γ ⊢ P) yields (Γ, P)
| concl (Γ ⊢ P) yields P
| concl (Γ ⊢... |
module BootstrapDIY where
import Data.Foldable
import Data.List
import Utils
| Proof terms with assumptions . In the notes , we write to denote a proof
data Proof a = Assume (Term a)
| UseTheorem (Theorem a)
| MP (Proof a) (Proof a)
deriving Eq
sequent :: (Ord a, Show a)... |
dd5017bbcd750130775a60bf46bbbbb62271b1040612bcdbf523e8c93f998571 | gar1t/lambdapad | lpad_log.erl | Copyright 2015 < >
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in compliance with the License.
%%% You may obtain a copy of the License at
%%%
%%% -2.0
%%%
%%% Unless required by applicable law or agreed to in writing, software
distributed ... | null | https://raw.githubusercontent.com/gar1t/lambdapad/483b67694723923a82fc699aa37d580d035bd420/src/lpad_log.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2015 < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(lpad_log).
-export([log_info/2, log_error/2, format_banner/2]).
log_info(Msg, Data) ->
io:format(Msg, Data).
log_error(Msg, Data) ->
... |
b19628bbe424ac862bf42b45db429e2bc130487aa5a3dc560b2042b950229740 | democracyworks/datomic-toolbox | query.clj | (ns datomic-toolbox.query
(:require [datomic.api :as d]))
(defn find-one
"Given a query that returns only entity ids, a db value and query
arguments, return the db entity that the query returns"
[query db & args]
(let [results (apply d/q query db args)]
(->> results
ffirst
(d/entity db)... | null | https://raw.githubusercontent.com/democracyworks/datomic-toolbox/670d6da7d8b3195df18616ad1e4c292146859ab5/src/datomic_toolbox/query.clj | clojure | (ns datomic-toolbox.query
(:require [datomic.api :as d]))
(defn find-one
"Given a query that returns only entity ids, a db value and query
arguments, return the db entity that the query returns"
[query db & args]
(let [results (apply d/q query db args)]
(->> results
ffirst
(d/entity db)... | |
6d3ff7da9175f621bf24231f66ac61a431ad31301954ac80b8ca46738a7a3c43 | slagyr/gaeshi | core_spec.clj | (ns gaeshi.kuzushi.core-spec
(:use [speclj.core]
[gaeshi.kuzushi.spec-helper]
[joodo.kuzushi.core]
[joodo.kuzushi.common :only (exit endl)]
[joodo.kuzushi.commands.help :only (all-commands)])
(:require [gaeshi.kuzushi.version]))
(describe "Gaeshi main"
(with-command-help)
(it... | null | https://raw.githubusercontent.com/slagyr/gaeshi/a5677ed1c8d9269d412f07a7ab33bbc40aa7011a/lein-gaeshi/spec/gaeshi/kuzushi/core_spec.clj | clojure | (ns gaeshi.kuzushi.core-spec
(:use [speclj.core]
[gaeshi.kuzushi.spec-helper]
[joodo.kuzushi.core]
[joodo.kuzushi.common :only (exit endl)]
[joodo.kuzushi.commands.help :only (all-commands)])
(:require [gaeshi.kuzushi.version]))
(describe "Gaeshi main"
(with-command-help)
(it... | |
57675f97630cd5d1e69463b5ab082c24d0c3af9257eeda90901a457ffc42f821 | lwhjp/rince | link.rkt | #lang racket/base
(require (for-syntax racket/base
racket/list
syntax/id-set
syntax/id-table
syntax/parse)
racket/contract
racket/match
racket/set)
(provide (all-defined-out))
; We'll use a really naive app... | null | https://raw.githubusercontent.com/lwhjp/rince/1a83bf0f72f8ca8352b8e115bbffce319619df56/link.rkt | racket | We'll use a really naive approach for now -- possibly an extension of
racket/unit would be better.
imports and exports are lists of symbols.
go is a procedure accepting boxes for (import ... export ...)
which sets the content of the export boxes.
FIXME: this will break if toplevel value initializers refer to impo... | #lang racket/base
(require (for-syntax racket/base
racket/list
syntax/id-set
syntax/id-table
syntax/parse)
racket/contract
racket/match
racket/set)
(provide (all-defined-out))
can we use linklets ?
(de... |
3ecb2f2e9fdf3e9ef62e504f7b5f16645ce245f9fc3d464d4ffabeede6623624 | moderninterpreters/markup | markup.lisp | Copyright 2019 , Modern Interpreters Inc
(uiop:define-package #:markup/markup
(:use #:cl
#:named-readtables)
(:import-from #:alexandria
#:assoc-value)
(:import-from #:markup/stream
#:markup-stream
#:read-so-far
#:wrap-stream)
(:import-fr... | null | https://raw.githubusercontent.com/moderninterpreters/markup/6de9ecfb896689be3928d1ee24d2fabb045f4c70/markup.lisp | lisp | deprecated
deprecated
to read #\>
now we reach the /name> part of this, so let's read it out
read the #\>
reduce the verbosity in the generated output
")
else we need to escape this before writing
deprecated wrappers for now | Copyright 2019 , Modern Interpreters Inc
(uiop:define-package #:markup/markup
(:use #:cl
#:named-readtables)
(:import-from #:alexandria
#:assoc-value)
(:import-from #:markup/stream
#:markup-stream
#:read-so-far
#:wrap-stream)
(:import-fr... |
619e7378fb12cbde877786a63c852b1f098e9a10878065a17807a6021d5dd1c3 | rescript-lang/rescript-editor-support | location_.ml | type point = {
line : int;
column : int;
}
type span = {
file : string;
start : point;
end_ : point;
}
type +'a with_location = {
location : span;
value : 'a;
}
let at : span -> 'a -> 'a with_location = fun location value ->
{location; value}
let location : 'a with_location -> span = fun {location; ... | null | https://raw.githubusercontent.com/rescript-lang/rescript-editor-support/f6afacf93194036fafcff050cdaff150a85ccbe0/src/vendor/odoc_parser/location_.ml | ocaml | type point = {
line : int;
column : int;
}
type span = {
file : string;
start : point;
end_ : point;
}
type +'a with_location = {
location : span;
value : 'a;
}
let at : span -> 'a -> 'a with_location = fun location value ->
{location; value}
let location : 'a with_location -> span = fun {location; ... | |
8a64bb1cd7bf5554bc401f91f0c8fca16ad55e1f3de061e48abc4581a0ddde3e | cartazio/tlaps | ls4.ml |
* backend / ls4.ml --- LS4 interaction
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* backend/ls4.ml --- LS4 interaction
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
(** LS4 backend *)
Revision.f "$Rev: 32466 $";;
open Ext
open Format
open Fmtutil
open Tla_pars... | null | https://raw.githubusercontent.com/cartazio/tlaps/562a34c066b636da7b921ae30fc5eacf83608280/src/backend/ls4.ml | ocaml | * LS4 backend
abbrev
nonatomic (cook "<>") [e]
abbrev
abbrev
treating infix binary pltl operators
atoms
nullary builtins
unary builtins
the main sequent
we negate the query as we try to refute it |
* backend / ls4.ml --- LS4 interaction
*
* Copyright ( C ) 2008 - 2010 INRIA and Microsoft Corporation
* backend/ls4.ml --- LS4 interaction
*
* Copyright (C) 2008-2010 INRIA and Microsoft Corporation
*)
Revision.f "$Rev: 32466 $";;
open Ext
open Format
open Fmtutil
open Tla_parser
open Property
o... |
ad548f3fdf887da95f0504db77aeda5f128430e5e941947a1e0bb1759328d6b8 | MyDataFlow/ttalk-server | ejabberd_auth_external.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_auth_external.erl
Author : < >
%%% Purpose : Authentification via LDAP external script
Created : 12 Dec 2004 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne
%%%
%%% This program is free sof... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/ejabberd_auth_external.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_auth_external.erl
Purpose : Authentification via LDAP external script
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope t... | Author : < >
Created : 12 Dec 2004 by < >
ejabberd , Copyright ( C ) 2002 - 2011 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License
Founda... |
d1ef78f126472505f5d584822e1f71b8ba316b0f6ce98ec31614827884694657 | sarabander/p2pu-sicp | Ex1.32.scm | ;; recursive
(define (accumulate combiner null-value term a next b)
(if (> a b)
null-value
(combiner (term a)
(accumulate combiner null-value term (next a) next b))))
;; iterative
(define (accumulate combiner null-value term a next b)
(define (iter a result)
(if (> a b)
result
(iter (next a) ... | null | https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/1.3/Ex1.32.scm | scheme | recursive
iterative | (define (accumulate combiner null-value term a next b)
(if (> a b)
null-value
(combiner (term a)
(accumulate combiner null-value term (next a) next b))))
(define (accumulate combiner null-value term a next b)
(define (iter a result)
(if (> a b)
result
(iter (next a) (combiner (term a) result)))... |
0f04ff38fc19dce2d2ddb6a8446f101c3163d8e1ca8542a960bad27831f4c2e3 | input-output-hk/ouroboros-network | Impl.hs | # DEPRECATED " Use Ouroboros . Consensus . " #
Mempool.openMempool
, Mempool.LedgerInterface (..)
, Mempool.chainDBLedgerInterface
, Mempool.openMempoolWithoutSyncThread
) where
import qualified Ouroboros.Consensus.Mempool as Mempool
| null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/d64a5d253b751d465c5c48799dea6b234c2a329a/ouroboros-consensus/src/Ouroboros/Consensus/Mempool/Impl.hs | haskell | # DEPRECATED " Use Ouroboros . Consensus . " #
Mempool.openMempool
, Mempool.LedgerInterface (..)
, Mempool.chainDBLedgerInterface
, Mempool.openMempoolWithoutSyncThread
) where
import qualified Ouroboros.Consensus.Mempool as Mempool
| |
88c6d135ba42d66eb076b2dbe33a95fe36811d95509ad4da9affd6f8092e2c10 | offby1/rudybot | tinyurl.rkt | #lang racket
(require
(only-in net/uri-codec current-alist-separator-mode alist->form-urlencoded)
(only-in net/url call/input-url string->url)
(only-in net/url-structs path/param url)
(only-in "http.rkt" get-pure-port/gack)
)
(module+ test (require rackunit rackunit/text-ui))
stolen from erc-button.el in Emac... | null | https://raw.githubusercontent.com/offby1/rudybot/74773ce9c1224813ee963f4d5d8a7748197f6963/tinyurl.rkt | racket | *groan* Now that I've added spam protection to teensy.info, these
(teensy.info requires a "Captcha" thing in order to accept
requests from other hosts) | #lang racket
(require
(only-in net/uri-codec current-alist-separator-mode alist->form-urlencoded)
(only-in net/url call/input-url string->url)
(only-in net/url-structs path/param url)
(only-in "http.rkt" get-pure-port/gack)
)
(module+ test (require rackunit rackunit/text-ui))
stolen from erc-button.el in Emac... |
5fa2e45db9a9078204932c2b2a13b837808d623f2fd14473366e4002324f814c | jiesoul/soul-talk | spec.clj | (ns soul-talk.category.spec
(:require [spec-tools.data-spec :as ds]
[soul-talk.spec.core :as spec]))
(def create-category
(ds/spec {:name :category/create-category
:spec {:name spec/non-empty-string?
:create_by spec/id
:update_by spec/id}}))
(def updat... | null | https://raw.githubusercontent.com/jiesoul/soul-talk/630de08c6549b206d59023764d5f2576d97d1030/api/src/soul_talk/category/spec.clj | clojure | (ns soul-talk.category.spec
(:require [spec-tools.data-spec :as ds]
[soul-talk.spec.core :as spec]))
(def create-category
(ds/spec {:name :category/create-category
:spec {:name spec/non-empty-string?
:create_by spec/id
:update_by spec/id}}))
(def updat... | |
30539b15ee9c7e9eedf0bb51abf4c9c8a9a379f1827018b02c6cb80a4a3005b3 | pflanze/chj-schemelib | cj-math.scm | Copyright 2013 - 2019 by < >
;;; This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
;;; (at your option) any later version.
(require srf... | null | https://raw.githubusercontent.com/pflanze/chj-schemelib/59ff8476e39f207c2f1d807cfc9670581c8cedd3/cj-math.scm | scheme | This file is free software; you can redistribute it and/or modify
(at your option) any later version.
just an alias for integer-length
can this calculation be optimized?
silently returns #f for values tuples! :( XX patch it! ?
Or "mean"?
For overflowing numbers like machine integers would have to
xx There... | Copyright 2013 - 2019 by < >
it under the terms of the GNU General Public License ( GPL ) as published
by the Free Software Foundation , either version 2 of the License , or
(require srfi-1
list-util
slib-sort
define-strict-and-lazy
(values values->vector letv)
... |
85a607fbe6122826cf7ee36fb559580522d8e1fa7549261a952da852bdd712dd | matthiasn/systems-toolbox | observe.cljc | (ns matthiasn.systems-toolbox.switchboard.observe
(:require [matthiasn.systems-toolbox.switchboard.helpers :as h]
#?(:clj [clojure.core.async :refer [sub]]
:cljs [cljs.core.async :refer [sub]])))
(defn observe-state
"Handler function for letting one component observe the state of another."
[{:keys [... | null | https://raw.githubusercontent.com/matthiasn/systems-toolbox/6bcc44af449b4a5d4e9128cd0f2129b58619a5dc/src/cljc/matthiasn/systems_toolbox/switchboard/observe.cljc | clojure | (ns matthiasn.systems-toolbox.switchboard.observe
(:require [matthiasn.systems-toolbox.switchboard.helpers :as h]
#?(:clj [clojure.core.async :refer [sub]]
:cljs [cljs.core.async :refer [sub]])))
(defn observe-state
"Handler function for letting one component observe the state of another."
[{:keys [... | |
2c8b7281275da527a752b8e20651d17552e7d6a96dc4c0d4868db0fe23ebd8c1 | haskell-works/avro | DoubleSpec.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
# LANGUAGE StrictData #
# LANGUAGE TemplateHaskell #
{-# OPTIONS_GHC -Wno-overflowed-literals #-}
module Avro.Codec.DoubleSpec (spec) where
import Avro.TestUtils
import HaskellWorks.Hspe... | null | https://raw.githubusercontent.com/haskell-works/avro/9eb4970fd72939a68aa6f947d3d2dc17280352f8/test/Avro/Codec/DoubleSpec.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes #
# OPTIONS_GHC -Wno-overflowed-literals # | # LANGUAGE DeriveGeneric #
# LANGUAGE StrictData #
# LANGUAGE TemplateHaskell #
module Avro.Codec.DoubleSpec (spec) where
import Avro.TestUtils
import HaskellWorks.Hspec.Hedgehog
import Hedgehog
import qualified Hedgehog.Gen as Gen
import qualified Hedgehog.... |
5bed7f800411fff3e81d2a245adea65ddd67443891f93c8be570dc1414cb3042 | grin-compiler/ghc-whole-program-compiler-project | JSON.hs | module Stg.JSON where
import Data.Aeson
import Stg.Syntax
import qualified Data.ByteString.Char8 as BS8
import qualified Data.Text.Lazy as Text
instance ToJSON BS8.ByteString where
toJSON = toJSON . Text.pack . BS8.unpack
instance ToJSON Unique
instance ToJSON RealSrcSpan
instance ToJSON BufSpan
instance ToJSON U... | null | https://raw.githubusercontent.com/grin-compiler/ghc-whole-program-compiler-project/6e75aaccf4df0d78786f5bb1a28778d54c09a7be/external-stg/lib/Stg/JSON.hs | haskell | module Stg.JSON where
import Data.Aeson
import Stg.Syntax
import qualified Data.ByteString.Char8 as BS8
import qualified Data.Text.Lazy as Text
instance ToJSON BS8.ByteString where
toJSON = toJSON . Text.pack . BS8.unpack
instance ToJSON Unique
instance ToJSON RealSrcSpan
instance ToJSON BufSpan
instance ToJSON U... | |
2ebfd5e0cc72a0698d27f4f6c23a9f952d99c7d541094106bf8c4d43609c907b | airalab/habit | Telegram.hs | # LANGUAGE TemplateHaskell #
-- |
-- Module : Web.Bot.Platform.Telegram
Copyright : 2016 - 2017
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
Telegram bot API support .
--
module Web.Bot.Platform.Telegram (Telegram) where
import Crypto.Hash (... | null | https://raw.githubusercontent.com/airalab/habit/a3fd757cc5a8dd9086df98ed8658535d063cd49e/src/Web/Bot/Platform/Telegram.hs | haskell | |
Module : Web.Bot.Platform.Telegram
License : BSD3
Maintainer :
Stability : experimental
Portability : portable
| Telegram Bot API 2.0 platform
So it should be large number, but less TCP timeout
| Infinity loop for getting updates from API
Take updates
Check for errors
Run handler for ... | # LANGUAGE TemplateHaskell #
Copyright : 2016 - 2017
Telegram bot API support .
module Web.Bot.Platform.Telegram (Telegram) where
import Crypto.Hash (hash, Digest, Keccak_256)
import qualified Web.Telegram.API.Bot as API
import Control.Monad.IO.Class (liftIO)
import Data.Text.Encoding (encodeUtf8)
import Co... |
1239eba53990e3024ac1181f14720d1a4ab8522eaded3f16ad3d9842582367b4 | patrikja/AFPcourse | EqInstances.hs | # LANGUAGE StandaloneDeriving ,
FlexibleInstances , FlexibleContexts #
FlexibleInstances, FlexibleContexts #-}
module Array.EqInstances where
import Array
deriving instance Eq (Array Int)
deriving instance Eq (Array Size)
deriving instance Eq (Array Index)
deriving instance (Eq (Array a), E... | null | https://raw.githubusercontent.com/patrikja/AFPcourse/1a079ae80ba2dbb36f3f79f0fc96a502c0f670b6/L13/src/Array/EqInstances.hs | haskell | # LANGUAGE StandaloneDeriving ,
FlexibleInstances , FlexibleContexts #
FlexibleInstances, FlexibleContexts #-}
module Array.EqInstances where
import Array
deriving instance Eq (Array Int)
deriving instance Eq (Array Size)
deriving instance Eq (Array Index)
deriving instance (Eq (Array a), E... | |
a7d2c5e7e40537aee102611ea2f1fd32a575361ca8d74840a1ca21e6b1dc0f6c | AntidoteDB/antidote | antidote_sup.erl | %% -------------------------------------------------------------------
%%
Copyright < 2013 - 2018 > <
Technische Universität Kaiserslautern , Germany
, France
Universidade NOVA de Lisboa , Portugal
Université catholique de Louvain ( UCL ) , Belgique
, Portugal
%% >
%%
This file is provided... | null | https://raw.githubusercontent.com/AntidoteDB/antidote/32a89d42be644d3ba616ebf705fce4fa43e781ab/apps/antidote/src/antidote_sup.erl | erlang | -------------------------------------------------------------------
>
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either expressed or implied. See the License for the
specific language governing perm... | Copyright < 2013 - 2018 > <
Technische Universität Kaiserslautern , Germany
, France
Universidade NOVA de Lisboa , Portugal
Université catholique de Louvain ( UCL ) , Belgique
, Portugal
This file is provided to you under the Apache License ,
except in compliance with the License . You... |
6289ea1753210579ed9d15577f4b471130d357b7ea8768e7c7c1d3bd35826d8d | puppetlabs/jruby-utils | jruby_service_test.clj | (ns puppetlabs.services.jruby-pool-manager.jruby-service-test
(:require [clojure.test :refer :all]
[puppetlabs.services.jruby-pool-manager.jruby-testutils :as jruby-testutils]
[puppetlabs.trapperkeeper.core :as tk]
[puppetlabs.trapperkeeper.services :as services]
[cloju... | null | https://raw.githubusercontent.com/puppetlabs/jruby-utils/7b53c3c6a0c61635362402313bcec809abf5a856/test/unit/puppetlabs/services/jruby_pool_manager/jruby_service_test.clj | clojure |
Tests
here even though it looks a bit strange, because that is what this
test is intended to cover.
the counter gets incremented when the instance is returned to the
`with-jruby-instance` twice.
We're making an empty call to `with-jruby-instance` here, because
we want to trigger a borrow/return via the same co... | (ns puppetlabs.services.jruby-pool-manager.jruby-service-test
(:require [clojure.test :refer :all]
[puppetlabs.services.jruby-pool-manager.jruby-testutils :as jruby-testutils]
[puppetlabs.trapperkeeper.core :as tk]
[puppetlabs.trapperkeeper.services :as services]
[cloju... |
8ac835e7a2d43fa5119bc57d57da86b50fee70ec299b0b4a0332d223f746c2c2 | jimcrayne/jhc | T2806.hs |
# LANGUAGE MagicHash #
# OPTIONS_GHC -Werror #
-- Trac #2806
module Foo where
import GHC.Base
foo :: Int
foo = 3
where (I# _x) = 4
| null | https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/1_typecheck/4_fail/ghc/T2806.hs | haskell | Trac #2806 |
# LANGUAGE MagicHash #
# OPTIONS_GHC -Werror #
module Foo where
import GHC.Base
foo :: Int
foo = 3
where (I# _x) = 4
|
5bb25fea15bd08b9088ca4e67389f82899c85e87d095d89c6e5b1110c44f8ab7 | flora-pm/flora-server | Metrics.hs | module FloraWeb.Server.Metrics
( prometheusMiddleware
)
where
import Data.Text (Text)
import Data.Text qualified as T
import Data.Text.Display
import Data.Text.Encoding
import Flora.Environment
import Network.HTTP.Types qualified as HTTP
import Network.Wai (Application, Request)
import Network.Wai qualified as Wai... | null | https://raw.githubusercontent.com/flora-pm/flora-server/c214c0b5d5db71a8330eb69326284be5a4d5e858/src/web/FloraWeb/Server/Metrics.hs | haskell | ^ handler
^ method
^ status
^ environment
^ Response filter
^ The app to instrument
^ The instrumented app | module FloraWeb.Server.Metrics
( prometheusMiddleware
)
where
import Data.Text (Text)
import Data.Text qualified as T
import Data.Text.Display
import Data.Text.Encoding
import Flora.Environment
import Network.HTTP.Types qualified as HTTP
import Network.Wai (Application, Request)
import Network.Wai qualified as Wai... |
6d27956a65ef867db6cfe85eee7b62606bde6f91d8feda97db2ae6aecf18a54f | Incubaid/baardskeerder | flog.ml |
* This file is part of Baardskeerder .
*
* Copyright ( C ) 2011 Incubaid BVBA
*
* Baardskeerder is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , o... | null | https://raw.githubusercontent.com/Incubaid/baardskeerder/3975cb7f0e92e1f35eeab17beeb906344e43dae0/src/flog.ml | ocaml | Entry handling helpers
Entry handling
TODO Use time argument!
If a database is `init`-ialised, we'll open it soon, most likely
TODO Make safe -> close handles!
TODO Read metadata
TODO Use 'best' metadata instead of checking it's value
TODO Choose correct last_metadata
TODO Write 'best' metadata into bo... |
* This file is part of Baardskeerder .
*
* Copyright ( C ) 2011 Incubaid BVBA
*
* Baardskeerder is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , o... |
56a7695bc8eafdf50fcb8a1dc395aea6b28d3d56e12a6113e89f0b3c7e0eedf4 | NorfairKing/cursor | TextFieldSpec.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Cursor.TextFieldSpec
( spec,
)
where
import Control.Monad
import Cursor.List.NonEmpty
import Cursor.TextField
import Cursor.TextField.Gen ()
import Cursor.Types
import qualified Data.List.... | null | https://raw.githubusercontent.com/NorfairKing/cursor/ff27e78281430c298a25a7805c9c61ca1e69f4c5/cursor-gen/test/Cursor/TextFieldSpec.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
Fine | # LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Cursor.TextFieldSpec
( spec,
)
where
import Control.Monad
import Cursor.List.NonEmpty
import Cursor.TextField
import Cursor.TextField.Gen ()
import Cursor.Types
import qualified Data.List.NonEmpty as NE
import qualified Data.Text as T
import Test.Hspe... |
bc87eaafdeb85b8f0afa52e680a76d0240be88b7441f6b6deea76793166456ce | TomLisankie/Learning-Lisp | aoc-2018-1a.lisp | ;; Dumps contents of a text file into a list.
(defun open-file (file-name)
(with-open-file (file-stream file-name)
(loop for line = (read-line file-stream nil)
while line
collect line)))
;; Takes a list containing string representations of integers and returns a parsed list of integers.
(defpara... | null | https://raw.githubusercontent.com/TomLisankie/Learning-Lisp/27f9843cbb0c325a6531fd1332c6f19bebfe5a4d/code/Dec2018/7/aoc-2018-1a.lisp | lisp | Dumps contents of a text file into a list.
Takes a list containing string representations of integers and returns a parsed list of integers. | (defun open-file (file-name)
(with-open-file (file-stream file-name)
(loop for line = (read-line file-stream nil)
while line
collect line)))
(defparameter int-list '(+))
(defun get-list-of-ints (list-from-file)
(dolist (an-int-string list-from-file)
(nconc int-list (list (parse-integer an-... |
82925f92e56da802ef47516ca69d84d397855ba9eae5872abdc3e0893422f592 | crategus/cl-cffi-gtk | gtk.cell-renderer-combo.lisp | ;;; ----------------------------------------------------------------------------
;;; gtk.cell-renderer-combo.lisp
;;;
;;; The documentation of this file is taken from the GTK 3 Reference Manual
Version 3.24 and modified to document the Lisp binding to the GTK library .
;;; See <>. The API documentation of the Lisp bi... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/7f5a09f78d8004a71efa82794265f2587fff98ab/gtk/gtk.cell-renderer-combo.lisp | lisp | ----------------------------------------------------------------------------
gtk.cell-renderer-combo.lisp
The documentation of this file is taken from the GTK 3 Reference Manual
See <>. The API documentation of the Lisp binding is
This program is free software: you can redistribute it and/or modify
it under th... | Version 3.24 and modified to document the Lisp binding to the GTK library .
available from < -cffi-gtk/ > .
Copyright ( C ) 2009 - 2011
Copyright ( C ) 2011 - 2021
as published by the Free Software Foundation , either version 3 of the
the GNU Lesser General Public License that clarifies the terms for us... |
4104d67009917d4087c8b7386dab318327251eb68477f9971912d4b30eef7d24 | clash-lang/clash-protocols | Extra.hs | {-|
Extras for module 'Test.Tasty.Hedgehog'. Functions in this module should be
upstreamed if possible.
-}
module Test.Tasty.Hedgehog.Extra (testProperty) where
import Prelude
import Hedgehog (Property)
import qualified Test.Tasty.Hedgehog as H
import Test.Tasty (TestTree)
import Data.String
-- | Like 'Test.Tasty.He... | null | https://raw.githubusercontent.com/clash-lang/clash-protocols/eea19dded896ae70b2c738274f809d45d109d6e6/src/Test/Tasty/Hedgehog/Extra.hs | haskell | |
Extras for module 'Test.Tasty.Hedgehog'. Functions in this module should be
upstreamed if possible.
| Like 'Test.Tasty.Hedgehog.testProperty', but inserts correct name |
module Test.Tasty.Hedgehog.Extra (testProperty) where
import Prelude
import Hedgehog (Property)
import qualified Test.Tasty.Hedgehog as H
import Test.Tasty (TestTree)
import Data.String
testProperty :: [Char] -> Property -> TestTree
testProperty nm = H.testPropertyNamed testName propName
where
testName = fromS... |
6ca1dd5504100f5b19e8fedc47e86f0ad4dc80c2b1a9f8ddd2e471aa7affca4b | tel/saltine | Utils.hs | module Crypto.Saltine.Core.Utils
( Crypto.Saltine.Internal.Util.randomByteString
, Crypto.Saltine.Internal.Util.bin2hex
) where
import qualified Crypto.Saltine.Internal.Util
| null | https://raw.githubusercontent.com/tel/saltine/b00e00fa8ce8bf4ee176a9d3deead57c590fc686/src/Crypto/Saltine/Core/Utils.hs | haskell | module Crypto.Saltine.Core.Utils
( Crypto.Saltine.Internal.Util.randomByteString
, Crypto.Saltine.Internal.Util.bin2hex
) where
import qualified Crypto.Saltine.Internal.Util
| |
4569accd3c71c364768b3944d26827c79269423887c141a2636d54c9e0ae1301 | axelarge/advent-of-code | day14_test.clj | (ns advent-of-code.y2015.day14-test
(:require [clojure.test :refer :all]
[advent-of-code.y2015.day14 :refer :all]))
(def test-input "Comet can fly 14 km/s for 10 seconds, but then must rest for 127 seconds.\nDancer can fly 16 km/s for 11 seconds, but then must rest for 162 seconds.")
(deftest test-solve... | null | https://raw.githubusercontent.com/axelarge/advent-of-code/4c62a53ef71605780a22cf8219029453d8e1b977/test/advent_of_code/y2015/day14_test.clj | clojure | (ns advent-of-code.y2015.day14-test
(:require [clojure.test :refer :all]
[advent-of-code.y2015.day14 :refer :all]))
(def test-input "Comet can fly 14 km/s for 10 seconds, but then must rest for 127 seconds.\nDancer can fly 16 km/s for 11 seconds, but then must rest for 162 seconds.")
(deftest test-solve... | |
477cf9abaadb7f7b3256a3647d2b09991dd79cecb08b27abd61b6fd43befca75 | LeventErkok/sbv | Tuples.hs | -----------------------------------------------------------------------------
-- |
Module : TestSuite . Queries . Tuples
Copyright : ( c )
-- License : BSD3
-- Maintainer :
-- Stability : experimental
--
-- Testing tuple queries
-------------------------------------------------------------... | null | https://raw.githubusercontent.com/LeventErkok/sbv/cfaa40b8c8ff8e1b7ff9ab71304654f6f531ba72/SBVTestSuite/TestSuite/Queries/Tuples.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Maintainer :
Stability : experimental
Testing tuple queries
---------------------------------------------------------------------------
# OPTIONS_GHC -Wall -Werror #
Test suite
# ANN module ("HLint: ignore Use... | Module : TestSuite . Queries . Tuples
Copyright : ( c )
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module TestSuite.Queries.Tuples (tests) where
import Data.SBV
import Data.SBV.Control
import Data.SBV.Tuple
import Utils.SBVTestFramework
tests :: TestTree
tests =
testG... |
0b35777341569fdeb8f3b5ca6ea52eceae00d2d23e6175040f9823cc3eb051b3 | wireapp/wire-server | One2One.hs | # LANGUAGE RecordWildCards #
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , e... | null | https://raw.githubusercontent.com/wireapp/wire-server/c27541d7456e3ea07ce5c8991585d0ffc4fac226/services/galley/src/Galley/API/One2One.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | # LANGUAGE RecordWildCards #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
mo... |
a348d0be3484a224ac3dd48fedd62a7c6ba68b690dc58f266b40870c008209ba | webnf/webnf | project.clj | (defproject webnf/server "0.1.19-SNAPSHOT"
:plugins [[lein-modules "0.3.11"]]
:description "Vhost functionality with servlets and a jetty runner"
:java-source-paths ["src/jvm"]
:source-paths ["src/clj"]
:dependencies [[org.clojure/clojure "_" :upgrade false]
[webnf/async-servlet "_" :upgrade ... | null | https://raw.githubusercontent.com/webnf/webnf/6a2ccaa755e6e40528eb13a5c36bae16ba4947e7/server/project.clj | clojure | (defproject webnf/server "0.1.19-SNAPSHOT"
:plugins [[lein-modules "0.3.11"]]
:description "Vhost functionality with servlets and a jetty runner"
:java-source-paths ["src/jvm"]
:source-paths ["src/clj"]
:dependencies [[org.clojure/clojure "_" :upgrade false]
[webnf/async-servlet "_" :upgrade ... | |
ad26036cbf6f04021a432db857f55c0cde99fb1fe4dc8bd278a55c55200008c3 | Raynes/refheap | server.clj | (ns refheap.server
(:require [refheap.config :refer [config]]
[noir.util.middleware :refer [wrap-strip-trailing-slash wrap-canonical-host wrap-force-ssl]]
[noir.session :refer [wrap-noir-session wrap-noir-flash]]
[monger.core :as mg]
[monger.collection :as mc]
... | null | https://raw.githubusercontent.com/Raynes/refheap/ad85097172a6d11dd9edaa97e2f2eb6d3296e94f/src/refheap/server.clj | clojure | View loading has to be done after mongo is available. | (ns refheap.server
(:require [refheap.config :refer [config]]
[noir.util.middleware :refer [wrap-strip-trailing-slash wrap-canonical-host wrap-force-ssl]]
[noir.session :refer [wrap-noir-session wrap-noir-flash]]
[monger.core :as mg]
[monger.collection :as mc]
... |
cffc43dd51b00ed21707c910fb70fb1befe24f1e18740392923f08b6215f4079 | realark/vert | game-object.lisp | (in-package :recurse.vert)
@export-class
(defclass game-object (event-publisher)
((object-id :initform (gensym "object-id-")
:initarg :object-id
:reader object-id
:documentation "id unique to each game-object instance in a scene as tested by EQUALP.
User may provide this, bu... | null | https://raw.githubusercontent.com/realark/vert/4cb88545abc60f1fba4a8604ce85e70cbd4764a2/src/core/game-object.lisp | lisp | object's world position, dimension, and rotation info.
will be implemented by physics component
object movement event publishing | (in-package :recurse.vert)
@export-class
(defclass game-object (event-publisher)
((object-id :initform (gensym "object-id-")
:initarg :object-id
:reader object-id
:documentation "id unique to each game-object instance in a scene as tested by EQUALP.
User may provide this, bu... |
40ddf75a84250125b3a204aefb0b080fa6cfbf96234485d060b6436b899da3d6 | ixy-languages/ixy.ml | iXGBE.mli | val default_mtu : int
module EIMC : sig
type t = int
val interrupt_disable : t
end
module SPEED : sig
type t = int
10 Gigabit / s
1 Gigabit / s
100 Megabit / s
end
module LINKS : sig
type t = int
val up : t
val speed_82599 : t
end
module CTRL : sig
type t = int
val lnk_rst : t
val rs... | null | https://raw.githubusercontent.com/ixy-languages/ixy.ml/e79dcc4a19afd8e531346c27624c54224f942dc9/lib/iXGBE.mli | ocaml | drop enable
transmit enable
link status
extended interrupt mask clear
device control
extended device control
EEPROM flash control
auto-negotiaton control
receive control
receive packet buffer size
filter control
split receive control
receive descriptor base address low
receive descriptor base... | val default_mtu : int
module EIMC : sig
type t = int
val interrupt_disable : t
end
module SPEED : sig
type t = int
10 Gigabit / s
1 Gigabit / s
100 Megabit / s
end
module LINKS : sig
type t = int
val up : t
val speed_82599 : t
end
module CTRL : sig
type t = int
val lnk_rst : t
val rs... |
c2f1a6313c86ac1ef43c9e8d00ec866027e2daf0fe3f641152d373cb5b51d9ff | yutopp/rill | rir_gen.ml |
* Copyright 2020 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2020 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )
*)
... | null | https://raw.githubusercontent.com/yutopp/rill/375b67c03ab2087d0a2a833bd9e80f3e51e2694f/rillc/lib/codegen/rir_gen.ml | ocaml |
TODO: support scope
receiver
To jump to end clause directly
then
else
receiver (unit always)
DO NOTHING
DO NOTHING
DO NOTHING
|
* Copyright 2020 - .
*
* Distributed under the Boost Software License , Version 1.0 .
* ( See accompanying file LICENSE_1_0.txt or copy at
* )
* Copyright yutopp 2020 - .
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* )
*)
... |
fa0c689d46b6d4580a6b1cbfacb4d2f055c5fe68f04f4d41bc3a931d9312dfcc | RefactoringTools/HaRe | USCC.hs | module USCC(decls) where
import UFree
import UAbstract(Decls,Def,defaNames,Var(..),decl')
import TiSCC
import FreeNames
import DefinedNames
import HsIdent(HsIdentI(..))
decls = map decl' . sccD :: [Def] -> Decls
instance FreeNames Var Def where
freeNames = map (flip (,) ValueNames . HsVar) . free
instance DefinedN... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/tools/hs2alfa/USCC.hs | haskell | module USCC(decls) where
import UFree
import UAbstract(Decls,Def,defaNames,Var(..),decl')
import TiSCC
import FreeNames
import DefinedNames
import HsIdent(HsIdentI(..))
decls = map decl' . sccD :: [Def] -> Decls
instance FreeNames Var Def where
freeNames = map (flip (,) ValueNames . HsVar) . free
instance DefinedN... | |
4f3f66d2ec409482968bd81fddabb439eb034cca7ee770217dbc2462960f7291 | xclerc/ocamljava | atomicMarkableReference.mli |
* This file is part of library .
* Copyright ( C ) 2007 - 2015 .
*
* library is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... | null | https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/library/concurrent/src/atomic/atomicMarkableReference.mli | ocaml | * Atomic containers for markable values.
* The type of marks.
* Returns a new container holding the passed value, with the passed
mark.
* [attempt_mark a e m] sets the mark to [m] if the current value is
[e]. Returns whether the value of [a] was equal to [e].
* [compare_and_set a er ur em um] atomically set... |
* This file is part of library .
* Copyright ( C ) 2007 - 2015 .
*
* library is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation ; either version 3 of the License , or
* ( at yo... |
7a4d2b7975ee1f1f93c9ebe94a2c36de98ba19973bf589793c17a1b719db2124 | ghcjs/ghcjs-base | Internal.hs | {-# LANGUAGE DeriveDataTypeable #-}
module JavaScript.Web.Storage.Internal where
import GHCJS.Types
import Data.Typeable
newtype Storage = Storage JSVal deriving Typeable
newtype StorageEvent = StorageEvent JSVal deriving Typeable
| null | https://raw.githubusercontent.com/ghcjs/ghcjs-base/18f31dec5d9eae1ef35ff8bbf163394942efd227/JavaScript/Web/Storage/Internal.hs | haskell | # LANGUAGE DeriveDataTypeable # |
module JavaScript.Web.Storage.Internal where
import GHCJS.Types
import Data.Typeable
newtype Storage = Storage JSVal deriving Typeable
newtype StorageEvent = StorageEvent JSVal deriving Typeable
|
3e1311dfad8d70e348f98cec24414198e7378f159d715a7520fd6224fca10455 | informatica-unica/lip | list-crush.ml | let crush1 l =
let rec crush1_rec z l = match l with
[] -> []
| [x] -> if x=z then [] else [x]
| x::y::l' -> if x=z
then crush1_rec z (y::l')
else if x=y then crush1_rec y l'
else x::(crush1_rec x (y::l'))
in match l with
[] -> []
| [x]... | null | https://raw.githubusercontent.com/informatica-unica/lip/6c700dacb376275ad7c4856f5b67e748fab0f552/ocaml-basics/list-crush/list-crush.ml | ocaml | let crush1 l =
let rec crush1_rec z l = match l with
[] -> []
| [x] -> if x=z then [] else [x]
| x::y::l' -> if x=z
then crush1_rec z (y::l')
else if x=y then crush1_rec y l'
else x::(crush1_rec x (y::l'))
in match l with
[] -> []
| [x]... | |
aa2da6f1625e3d0bd65ab2412f85325f546a1301b0bad39248a2b44cf67b05d8 | cryptosense/pkcs11 | pkcs11_CK_EC_KDF_TYPE.mli | * Parameters for EC key agreement schemes ( [ CK_EC_KDF_TYPE ] )
type t
val make : P11_ec_kdf.t -> t
val view : t -> P11_ec_kdf.t
val t : t Ctypes.typ
| null | https://raw.githubusercontent.com/cryptosense/pkcs11/93c39c7a31c87f68f0beabf75ef90d85a782a983/driver/pkcs11_CK_EC_KDF_TYPE.mli | ocaml | * Parameters for EC key agreement schemes ( [ CK_EC_KDF_TYPE ] )
type t
val make : P11_ec_kdf.t -> t
val view : t -> P11_ec_kdf.t
val t : t Ctypes.typ
| |
a08c41a7cf27c81c5301d3558bab119a2a221f9861e15c332de109685155f183 | draperlaboratory/VIBES | errors.ml | (***************************************************************************)
(* *)
Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
(* *)
(* This... | null | https://raw.githubusercontent.com/draperlaboratory/VIBES/7f978d66d0b022d1a9262fdfc608b7a2b7c95dff/tools/vibes-patch/lib/errors.ml | ocaml | *************************************************************************
This file is provided under the license found in the LICENSE file in
the top-level director... | Copyright ( C ) 2022/2023 The Charles Stark Draper Laboratory , Inc.
This research was developed with funding from the Defense Advanced
Research Projects Agency ( DARPA ) .
open Bap_core_theory
type KB.conflict +=
| Invalid_asm of string
| Invalid_address ... |
82dc70599eda2599c4dbdbae17c0885436341f50f9b80e0c32a1f9e816b30e05 | soulomoon/SICP | source.scm | ; #lang racket
Exercise 2.79 : Define a generic equality predicate equ ? that tests the equality of two numbers , and install it in the generic arithmetic package . This operation should work for ordinary numbers , rational numbers , and complex numbers .
(define (make-table)
(let ((local-table (list '*table*)))
... | null | https://raw.githubusercontent.com/soulomoon/SICP/1c6cbf5ecf6397eaeb990738a938d48c193af1bb/Chapter2/source.scm | scheme | #lang racket
internal procedures
interface to rest of the system
internal procedures
interface to the rest of the system
internal procedures
interface to the rest of the system
imported procedures from rectangular
and polar packages
internal procedures
interface to rest of the system
(define (apply-generic... | Exercise 2.79 : Define a generic equality predicate equ ? that tests the equality of two numbers , and install it in the generic arithmetic package . This operation should work for ordinary numbers , rational numbers , and complex numbers .
(define (make-table)
(let ((local-table (list '*table*)))
(define (look... |
30f356c0dc2f5b7bf171d0eef38e35231257d0db8f1c32a7f777121016978579 | pokepay/aws-sdk-lisp | api.lisp | ;; DO NOT EDIT: File is generated by AWS-SDK/GENERATOR.
(common-lisp:defpackage #:aws-sdk/services/cloudhsmv2/api
(:use)
(:nicknames #:aws/cloudhsmv2)
(:import-from #:aws-sdk/generator/shape)
(:import-from #:aws-sdk/generator/operation)
(:import-from #:aws-sdk/api)
(:import-from #:aws-sdk/request)
(:impo... | null | https://raw.githubusercontent.com/pokepay/aws-sdk-lisp/ad9a8f9294a9799cef5f4d85e0cd34eca418be24/services/cloudhsmv2/api.lisp | lisp | DO NOT EDIT: File is generated by AWS-SDK/GENERATOR. |
(common-lisp:defpackage #:aws-sdk/services/cloudhsmv2/api
(:use)
(:nicknames #:aws/cloudhsmv2)
(:import-from #:aws-sdk/generator/shape)
(:import-from #:aws-sdk/generator/operation)
(:import-from #:aws-sdk/api)
(:import-from #:aws-sdk/request)
(:import-from #:aws-sdk/error))
(common-lisp:in-package #:aws-... |
9bf7a0aa04f59f645d9423d29bbbb8bbebb73183a78c6606b35821406d78da52 | haskell-mafia/boris | Arbitrary.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fno - warn - orphans #
module Test.Boris.Core.Arbitrary where
import qualified Data.Text as T
import Disorder.Corpus
import Boris.Core.Data
import P
import Test.QuickCheck
import Test.... | null | https://raw.githubusercontent.com/haskell-mafia/boris/fb670071600e8b2d8dbb9191fcf6bf8488f83f5a/boris-core/test/Test/Boris/Core/Arbitrary.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - orphans #
module Test.Boris.Core.Arbitrary where
import qualified Data.Text as T
import Disorder.Corpus
import Boris.Core.Data
import P
import Test.QuickCheck
import Test.QuickCheck.Instances ()
data Build... |
0015a2852cc363aa2eccf10f8ac2a4e507bf6bc3487d67755bece006e14f065c | JoeKennedy/fantasy | HouseSpec.hs | module Handler.HouseSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getHouseR" $ do
error "Spec not implemented: getHouseR"
| null | https://raw.githubusercontent.com/JoeKennedy/fantasy/eb9dc9bf6074be5c5ca951e323c6497676424dda/test/Handler/HouseSpec.hs | haskell | module Handler.HouseSpec (spec) where
import TestImport
spec :: Spec
spec = withApp $ do
describe "getHouseR" $ do
error "Spec not implemented: getHouseR"
| |
0891edb71c7dc4f753d582df7ff79e471ddcf1f445f797914ca9894d1d0cc719 | c4-project/c4f | address.ml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fir/src/address.ml | ocaml | Addresses must have the same type as the entry for the variable in the
environment. | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
01f9adbf5645b53814d9a907a2803666fa0e83ab9574e0648ed49761674eebba | racket/racket7 | xexpr-core.rkt | #lang racket/base
(require racket/list
racket/contract/base
racket/contract/combinator
racket/pretty
"core.rkt")
(provide
(contract-out
[xexpr/c contract?]
[xexpr? (any/c . -> . boolean?)]
[validate-xexpr (any/c . -> . (one-of/c #t))]
[rename correct-xexpr/k? correct-xexpr... | null | https://raw.githubusercontent.com/racket/racket7/5dbb62c6bbec198b4a790f1dc08fef0c45c2e32b/racket/collects/xml/private/xexpr-core.rkt | racket | Xexpr ::= String
| Symbol
| Comment
| Processing-instruction
Attribute-srep ::= (list Symbol String)
;; ;; ;; ;; ;; ;
? helpers
correct-xexpr/k? : any (-> a) (exn -> a) -> a
Calls true-k if x is a correct-xexpr. Otherwise, calls the
failure continuation false-k with an exn:invalid-xe... | #lang racket/base
(require racket/list
racket/contract/base
racket/contract/combinator
racket/pretty
"core.rkt")
(provide
(contract-out
[xexpr/c contract?]
[xexpr? (any/c . -> . boolean?)]
[validate-xexpr (any/c . -> . (one-of/c #t))]
[rename correct-xexpr/k? correct-xexpr... |
e3d408a05c1ae0312c1163f1f9e70e063b11fc1f2c05a740c5510d2d89d8cdce | andrejbauer/plzoo | syntax.ml | (** Abstract syntax. *)
(** Arithmetical expressions. *)
type expression =
| Numeral of int (** non-negative integer constant *)
| Plus of expression * expression (** Addition [e1 + e2] *)
| Minus of expression * expression (** Difference [e1 - e2] *)
| Times of expression * expression (** Product [e1 * e2] *... | null | https://raw.githubusercontent.com/andrejbauer/plzoo/ae6041c65baf1eebf65a60617819efeb8dcd3420/src/calc/syntax.ml | ocaml | * Abstract syntax.
* Arithmetical expressions.
* non-negative integer constant
* Addition [e1 + e2]
* Difference [e1 - e2]
* Product [e1 * e2]
* Quotient [e1 / e2]
* Opposite value [-e]
* Conversion of expresions to strings. |
type expression =
let string_of_expression e =
let rec to_str n e =
let (m, str) = match e with
Numeral n -> (3, string_of_int n)
| Negate e -> (2, "-" ^ (to_str 2 e))
| Times (e1, e2) -> (1, (to_str 1 e1) ^ " * " ^ (to_str 2 e2))
| Divide (e1, e2) -> (1, (to_str 1 e... |
ba21dce0170e310c68ff8024f047563172e530d0d5d3ca513d3ead6925dbf1d5 | haskell/hackage-server | Core.hs | {-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE RecursiveDo #-}
module Distribution.Server.Features.Core (
CoreFeature(..),
CoreResource(..),
initCoreFeature,
-- * Change events
PackageUpdate(..),
PackageChange(..),
isPackageCh... | null | https://raw.githubusercontent.com/haskell/hackage-server/4d0bd17b1b90f495b59d3e3a6e88e04411b78024/src/Distribution/Server/Features/Core.hs | haskell | # LANGUAGE NamedFieldPuns #
# LANGUAGE RankNTypes #
# LANGUAGE RecursiveDo #
* Change events
* Misc other utils
stdlib
hackage
| The core feature, responsible for the main package index and all access
and modifications of it.
a source tarball.
| The core `HackageFeature`.
| Core package resources an... | # LANGUAGE RecordWildCards #
module Distribution.Server.Features.Core (
CoreFeature(..),
CoreResource(..),
initCoreFeature,
PackageUpdate(..),
PackageChange(..),
isPackageChangeAny,
isPackageAdd,
isPackageDelete,
isPackageIndexChange,
packageExists,
packageIdExists,
pa... |
c8476fb1c693e1746e5eefa690cfa0722d1a57ead35c5311a351f5e6497eb505 | TrustInSoft/tis-interpreter | eval_behaviors.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/value/legacy/eval_behaviors.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
b3fa707117a73774e0e9a8bc1202beb310651b120e67a4afc429b24c18561d50 | dvingo/cljs-styled-components | devcards_syntax_highlighter.cljs | (ns devcards-syntax-highlighter
(:require ["highlight.js" :as highlight]))
(js/goog.exportSymbol "DevcardsSyntaxHighlighter" highlight)
| null | https://raw.githubusercontent.com/dvingo/cljs-styled-components/804753d38f4b117c6270b58dedc11c16a10ea901/src/cards/devcards_syntax_highlighter.cljs | clojure | (ns devcards-syntax-highlighter
(:require ["highlight.js" :as highlight]))
(js/goog.exportSymbol "DevcardsSyntaxHighlighter" highlight)
| |
49132890d34de068cc7b75b44e9d2e52f532e29478212449c41ebdd66f5aaf56 | mzp/coq-ruby | vernac.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/toplevel/vernac.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Parsing of vernacular.
Set XML ho... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : vernac.mli 5920 2... |
c696787323c6a511ee912a448f1235ba4a89d45b2ab1550854570f4283abe6ae | venantius/yagni | namespace.clj | (ns yagni.namespace
"Functions for working with namespaces"
(:require [yagni.jvm :as jvm]))
(defn prepare-namespaces
"First, create all of our namespaces so that we dont' have to worry about
the order in which we load them. Then, load all of them."
[namespaces]
(doseq [n namespaces]
(create-ns n))
(... | null | https://raw.githubusercontent.com/venantius/yagni/54aa78d06279c3258c6bd932e75c9a2d91bb2fc6/src/yagni/namespace.clj | clojure | (ns yagni.namespace
"Functions for working with namespaces"
(:require [yagni.jvm :as jvm]))
(defn prepare-namespaces
"First, create all of our namespaces so that we dont' have to worry about
the order in which we load them. Then, load all of them."
[namespaces]
(doseq [n namespaces]
(create-ns n))
(... | |
743c7ea5c3a7a2e60d0fec82541a95cb1071b18aabf682e04e0dd17325d387cc | iu-parfunc/lvars | Bench.hs | # LANGUAGE RankNTypes , BangPatterns , DataKinds #
{-# LANGUAGE ImpredicativeTypes #-}
{-# LANGUAGE GADTs #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE OverlappingInstances #
import Control.LVish hiding (for_)
import qualified Control.LVish.Internal as L
import Control.LVish.DeepFrz (... | null | https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/lvish/tests/Bench.hs | haskell | # LANGUAGE ImpredicativeTypes #
# LANGUAGE GADTs #
insideOut -- OPTIONALLY do this... it can make them easier to view in the report.
bgroup "filtset" filtSetBench,
names become the groups.
This doesn't work yet... the list->set connversion gets optimized away.
Here we fill a larger and larger set. This is mainl... | # LANGUAGE RankNTypes , BangPatterns , DataKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE OverlappingInstances #
import Control.LVish hiding (for_)
import qualified Control.LVish.Internal as L
import Control.LVish.DeepFrz (runParThenFreeze, NonFrzn)
import Control.Par.EffectSigs
im... |
5a5efc5885f990c1a6c5b436da6eeaa0ab992bb7d3de62d5b9cd90c7ed0ccc74 | exercism/racket | phone-number-test.rkt | #lang racket/base
Tests adapted from ` problem - specifications / canonical - data.json v1.7.0
(require "phone-number.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(define suite
(test-suite
"phone number tests"
(test-equal? "cleans the number"
(nanp-clean "(223) 456-7... | null | https://raw.githubusercontent.com/exercism/racket/4110268ed331b1b4dac8888550f05d0dacb1865b/exercises/practice/phone-number/phone-number-test.rkt | racket | #lang racket/base
Tests adapted from ` problem - specifications / canonical - data.json v1.7.0
(require "phone-number.rkt")
(module+ test
(require rackunit rackunit/text-ui)
(define suite
(test-suite
"phone number tests"
(test-equal? "cleans the number"
(nanp-clean "(223) 456-7... | |
d63036c40f270a923459a6c35ef53d1b71237f0e8a5f9e2d6e4514c7aac4ac69 | DHSProgram/DHS-Indicators-SPSS | CM_tables1.sps | * Encoding: UTF-8.
*****************************************************************************************************
Program: CM_tables1.sps
Purpose: produce tables for child mortality and perinatal mortality
Author: Ivana Bjelic
Date last modified: December 12 2020 by Ivana Bjelic
*This do file will produ... | null | https://raw.githubusercontent.com/DHSProgram/DHS-Indicators-SPSS/578e6d40eff9edebda7cf0db0d9a0a52a537d98c/Chap08_CM/CM_tables1.sps | scheme | * Encoding: UTF-8.
*****************************************************************************************************
Program: CM_tables1.sps
Purpose: produce tables for child mortality and perinatal mortality
Author: Ivana Bjelic
Date last modified: December 12 2020 by Ivana Bjelic
*This do file will produ... | |
95828b59d9dde0ea34ab93514919acccaf5b96bb56d2dd166f748411c39ad5ea | afiniate/aws_async | awsa_creds.ml | open Core.Std
open Async.Std
open Async_unix.Std
open Deferred.Result.Monad_infix
let resolve_creds region creds =
match region with
| Some resolved_region ->
{creds with Awsa_base.region = resolved_region}
| None ->
creds
let tm_of_expiration =
Awsa_date.of_iso8601_string
let convert_to_cred region... | null | https://raw.githubusercontent.com/afiniate/aws_async/44c27bf9f18f76e9e6405c2252098c4aa3d9a8bc/lib/auth/awsa_creds.ml | ocaml | open Core.Std
open Async.Std
open Async_unix.Std
open Deferred.Result.Monad_infix
let resolve_creds region creds =
match region with
| Some resolved_region ->
{creds with Awsa_base.region = resolved_region}
| None ->
creds
let tm_of_expiration =
Awsa_date.of_iso8601_string
let convert_to_cred region... | |
db6abeeb118818078654346a4b64b1be250cd8e5249a96d47eba24cddc7e1644 | racket/libs | info.rkt | #lang setup/infotab
SPDX - License - Identifier : ( Apache-2.0 OR MIT )
;; THIS FILE IS AUTO-GENERATED FROM racket/src/native-libs/install.rkt
(define collection 'multi)
(define deps '("base"))
(define pkg-desc "native libraries for \"draw\" package")
(define pkg-authors '(mflatt))
(define license '((Apache-2.0 O... | null | https://raw.githubusercontent.com/racket/libs/ebcea119197dc0cb86be1ccbbfbe5806f7280976/draw-x11-x86_64-linux-natipkg/info.rkt | racket | THIS FILE IS AUTO-GENERATED FROM racket/src/native-libs/install.rkt | #lang setup/infotab
SPDX - License - Identifier : ( Apache-2.0 OR MIT )
(define collection 'multi)
(define deps '("base"))
(define pkg-desc "native libraries for \"draw\" package")
(define pkg-authors '(mflatt))
(define license '((Apache-2.0 OR MIT) AND X11))
|
a439bb2612a9495982f572c1197462982eaa062c0ecc9c49dbf61c7bdce933be | cjohansen/dumdom | test_helper.cljs | (ns dumdom.test-helper
(:require [clojure.string :as str]
[dumdom.core :as dumdom]
[dumdom.element :as e]))
(defn render
([el]
(render el [] {}))
([el path kmap]
(el path kmap)))
(defn render-str [& args]
(apply dumdom/render-string args))
(defn render-stripped-str [& args]
(s... | null | https://raw.githubusercontent.com/cjohansen/dumdom/4880f09563ff0ec9990adc49b642b8e28497dea8/test/dumdom/test_helper.cljs | clojure | (ns dumdom.test-helper
(:require [clojure.string :as str]
[dumdom.core :as dumdom]
[dumdom.element :as e]))
(defn render
([el]
(render el [] {}))
([el path kmap]
(el path kmap)))
(defn render-str [& args]
(apply dumdom/render-string args))
(defn render-stripped-str [& args]
(s... | |
831f04425c012541ac24deb00f820f92d21560d2217dd09c3e0cb5bbb11895bc | byorgey/bin | o.hs |
import Data.Char (toLower)
import Data.List
import Control.Applicative
import System.Environment
import System.FilePath
import System.Process
lower = map toLower
x ==> ys = (x, ys)
exts =
[ "em" ==>
[ "hs"
, "lhs"
, "txt"
, "t... | null | https://raw.githubusercontent.com/byorgey/bin/7370e6cc77be375c9e5e00718d15773169534c10/o.hs | haskell |
import Data.Char (toLower)
import Data.List
import Control.Applicative
import System.Environment
import System.FilePath
import System.Process
lower = map toLower
x ==> ys = (x, ys)
exts =
[ "em" ==>
[ "hs"
, "lhs"
, "txt"
, "t... | |
daad85e77ec40d5afeaf7fc87e683a7aae6ee89656ea0500fde9b41cce8d75ed | ocaml/ocamlfind | remdir.ml | #remove_directory ".";;
| null | https://raw.githubusercontent.com/ocaml/ocamlfind/678148e559cf207bee5d3836ac4d18ed4dffda6c/itest-aux/remdir.ml | ocaml | #remove_directory ".";;
| |
469c118c43720f4da600913903da32fde5be843ae6209e382401f8f7d9962157 | genmeblog/genuary | day23.clj | ;; Abstract vegetation.
(ns genuary.2022.day23
(:require [fastmath.vector :as v]
[fastmath.random :as r]
[fastmath.core :as m]
[clojure2d.core :as c2d]
[clojure2d.extra.utils :as utils]
[clojure2d.color :as c]
[clojure2d.extra.overlays :as o]))
... | null | https://raw.githubusercontent.com/genmeblog/genuary/f61a2b1e6f06518fefc7d4a263100995e3f28190/src/genuary/2022/day23.clj | clojure | Abstract vegetation. | (ns genuary.2022.day23
(:require [fastmath.vector :as v]
[fastmath.random :as r]
[fastmath.core :as m]
[clojure2d.core :as c2d]
[clojure2d.extra.utils :as utils]
[clojure2d.color :as c]
[clojure2d.extra.overlays :as o]))
(defn sprout []
(let [... |
2893bcfabe50583a538d4976b0e32a9c6c4fe177451744207d135339955ba18e | serokell/haskell-crypto | Internal.hs | # LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
SPDX - FileCopyrightText : 2020
--
SPDX - License - Identifier : MPL-2.0
-- | Key derivation/generation internals.
module Crypto.Sodium.Key.Internal
( Params (..)
, DerivationSlip
, derive
, rederive
, DerivationSlipData (... | null | https://raw.githubusercontent.com/serokell/haskell-crypto/e57b04d103b428b03c83565060a36da442663a5a/crypto-sodium/lib/Crypto/Sodium/Key/Internal.hs | haskell |
| Key derivation/generation internals.
| Opaque bytes that contain the salt and pwhash params.
| Data contained in a derivation slip.
This data type is used only internally within this module for
convenience. It is exported only for testing purposes.
used (for forward-compatibility).
algorithm marker for forw... | # LANGUAGE TupleSections #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
SPDX - FileCopyrightText : 2020
SPDX - License - Identifier : MPL-2.0
module Crypto.Sodium.Key.Internal
( Params (..)
, DerivationSlip
, derive
, rederive
, DerivationSlipData (..)
, derivationSlipEncode
, derivationSl... |
a426aecda8b0f8c3008211f3511c49edf6fcfa4971bdaef1908a06fef544a9fd | ocaml/odoc | f.mli | class type u = object end
val f : #u
| null | https://raw.githubusercontent.com/ocaml/odoc/3aca7eac014e69866694fa44f1c3915e5bb75872/test/xref2/classes.t/f.mli | ocaml | class type u = object end
val f : #u
| |
c6f07b12c5fc8c3eb495a567cc8c7c7c0631d67a7b61fe88927352c66723664b | apibot-org/apibot | project.clj | (defproject apibot "0.1.0-SNAPSHOT"
:description "The apibot server"
:url ""
:dependencies
[;
[aleph "0.4.3"]
[amalloy/ring-gzip-middleware "0.1.3"]
[clj-time "0.13.0"]
[cljsjs/papaparse "4.1.1-1"]
[com.auth0/java-jwt "3.2.0"]
[com.auth0/jwks-rsa "0.2.0"]
[com.google.guava/guava "20.0"]
... | null | https://raw.githubusercontent.com/apibot-org/apibot/26c77c688980549a8deceeeb39f01108be016435/project.clj | clojure | (defproject apibot "0.1.0-SNAPSHOT"
:description "The apibot server"
:url ""
:dependencies
[aleph "0.4.3"]
[amalloy/ring-gzip-middleware "0.1.3"]
[clj-time "0.13.0"]
[cljsjs/papaparse "4.1.1-1"]
[com.auth0/java-jwt "3.2.0"]
[com.auth0/jwks-rsa "0.2.0"]
[com.google.guava/guava "20.0"]
[co... | |
5b2f35e99a6292b07f9595a793d1eb3b38612a27e716a66694eb97c034040afd | mirage/ocaml-git | carton_lwt.ml | open Lwt_io
type lwt = Lwt_io.lwt
external inj : 'a Lwt.t -> ('a, lwt) Carton.io = "%identity"
external prj : ('a, lwt) Carton.io -> 'a Lwt.t = "%identity"
let lwt_bind x f =
let open Lwt.Infix in
inj (prj x >>= fun x -> prj (f x))
[@@inline]
let lwt_return x = inj (Lwt.return x) [@@inline]
let lwt = { Carton... | null | https://raw.githubusercontent.com/mirage/ocaml-git/37c9ef41944b5b19117c34eee83ca672bb63f482/src/carton-lwt/carton_lwt.ml | ocaml | XXX(dinosaure): [?visited] disappeared but it's only
* about internal use. | open Lwt_io
type lwt = Lwt_io.lwt
external inj : 'a Lwt.t -> ('a, lwt) Carton.io = "%identity"
external prj : ('a, lwt) Carton.io -> 'a Lwt.t = "%identity"
let lwt_bind x f =
let open Lwt.Infix in
inj (prj x >>= fun x -> prj (f x))
[@@inline]
let lwt_return x = inj (Lwt.return x) [@@inline]
let lwt = { Carton... |
7ff8a0d7608b30dabd48acdcdaf4d113f5b5d6977d54c3bd8b520873c6ad2343 | fakedata-haskell/fakedata | Camera.hs | # LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
| @since 1.0
module Faker.Camera where
import Data.Text (Text)
import Faker (Fake(..))
import Faker.Provider.Camera
import Faker.TH
$(generateFakeField "camera" "brand")
$(generateFakeField "camera" "model")
$(generateFakeField "camera" "brand_with_... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/ea938c38845b274e28abe7f4e8e342f491e83c89/src/Faker/Camera.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
| @since 1.0
module Faker.Camera where
import Data.Text (Text)
import Faker (Fake(..))
import Faker.Provider.Camera
import Faker.TH
$(generateFakeField "camera" "brand")
$(generateFakeField "camera" "model")
$(generateFakeField "camera" "brand_with_model")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.