_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 |
|---|---|---|---|---|---|---|---|---|
9ddf0366ed1a3418388ef645a8c6dd640cf6c3f5d25b793751862d8bbd32e778 | wfnuser/sicp-solutions | e4-19.scm | MIT - Scheme will throw error . It works like 's way . | null | https://raw.githubusercontent.com/wfnuser/sicp-solutions/2c94b28d8ee004dcbfe7311f866e5a346ee01d12/ch4/e4-19.scm | scheme | MIT - Scheme will throw error . It works like 's way . | |
9e70e5fb1255521917debcbd88faecfa8fe6c4f9d7fae10a0335c8a024d98aaf | reflex-frp/reflex-dom-contrib | Xhr.hs | # LANGUAGE CPP #
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE GADTs #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecursiveDo #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE GADTs #
{-# LANGUAGE FlexibleContexts #-}
... | null | https://raw.githubusercontent.com/reflex-frp/reflex-dom-contrib/09d1223a3eadda768a6701410b4532fda8c7033d/src/Reflex/Dom/Contrib/Xhr.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE RecursiveDo #
# LANGUAGE FlexibleContexts #
|
Convenience functions for dealing with XMLHttpRequest.
----------------------------------------------------------------------------
------------------... | # LANGUAGE CPP #
# LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE GADTs #
module Reflex.Dom.Contrib.Xhr where
import Control.Lens
import Control.Monad.Reader
import Data.Aeson
import Data.ByteString.Lazy (ByteString)
... |
c362d1b413b5906c5ad619f7ae271badb4e75ee7b1211d19f23d8f01b01c7ece | snoyberg/mono-traversable | Containers.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE CPP #
-- | Warning: This module should be considered highly experimental.
module Data.Containers where
import Prelude hiding (lookup)
import Data.Maybe (... | null | https://raw.githubusercontent.com/snoyberg/mono-traversable/224e4c014310e93877b39fa8c22a9d76492d42c4/mono-traversable/src/Data/Containers.hs | haskell | # LANGUAGE ConstraintKinds #
| Warning: This module should be considered highly experimental.
| The type of the key
| Check if there is a value with the supplied key
in the container.
| Check if there isn't a value with the supplied key
in the container.
when there are matching keys.
@since 1.0.0
| Get a list... | # LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE CPP #
module Data.Containers where
import Prelude hiding (lookup)
import Data.Maybe (fromMaybe)
import qualified Data.Map.Strict as Map
import qualified Data.IntMap.Strict as IntMap
impo... |
5c3e4917cc6ede9f23a58ee54f84ba987cf5ecc568b8cd3f8ffed89eb455537b | kpblc2000/KpblcLispLib | _kpblc-conv-value-to-bool.lsp | (defun _kpblc-conv-value-to-bool (value)
;|
* Ôóíêöèÿ ïðåîáðàçîâàíèÿ ïåðåäàííîãî çíà÷åíèÿ â ëèñïîâîå t|nil. Äëÿ îøèáî÷íûõ çíà÷åíèé âîçâðàùàåò nil.
* Ïàðàìåòðû âûçîâà:
value ; ïðåîáðàçîâûâàåìîå çíà÷åíèå
* Ïðèìåðû âûçîâà:
(_kpblc-conv-value-to-bool "0") ; nil... | null | https://raw.githubusercontent.com/kpblc2000/KpblcLispLib/49d1d9d29078b4167cc65dc881bea61b706c620d/lsp/conv/value/_kpblc-conv-value-to-bool.lsp | lisp | |
ïðåîáðàçîâûâàåìîå çíà÷åíèå
nil
T
T
_ end of and
_ end of cond
_ end of defun
| (defun _kpblc-conv-value-to-bool (value)
* Ôóíêöèÿ ïðåîáðàçîâàíèÿ ïåðåäàííîãî çíà÷åíèÿ â ëèñïîâîå t|nil. Äëÿ îøèáî÷íûõ çíà÷åíèé âîçâðàùàåò nil.
* Ïàðàìåòðû âûçîâà:
* Ïðèìåðû âûçîâà:
(cond ((and (= (type value) 'str) (= (vl-string-trim " 0" value) "")) nil)
((and (= (type value) 'str)
... |
5acf6d9c1300c5d32f364238971c3e7c5f6d7b1136ed9a70547453d64a211077 | sadiqj/ocaml-esp32 | pr7391.ml | class virtual child1 parent =
object
method private parent = parent
end
class virtual child2 =
object(_ : 'self)
constraint 'parent = < previous: 'self option; .. >
method private virtual parent: 'parent
end
Worked in 4.03
let _ =
object(self)
method previous = None
method child =
... | null | https://raw.githubusercontent.com/sadiqj/ocaml-esp32/33aad4ca2becb9701eb90d779c1b1183aefeb578/testsuite/tests/typing-gadts/pr7391.ml | ocaml | class virtual child1 parent =
object
method private parent = parent
end
class virtual child2 =
object(_ : 'self)
constraint 'parent = < previous: 'self option; .. >
method private virtual parent: 'parent
end
Worked in 4.03
let _ =
object(self)
method previous = None
method child =
... | |
3423e4c7752ba84a0ce3091d17493fb906fa057fe1617d9f504b9610175b3180 | gregwebs/Shelly.hs | RunSpec.hs | module RunSpec ( runSpec ) where
import TestInit
import qualified Data.Text as T
import Data.Text (Text)
import System.IO
runSpec :: Spec
runSpec = do
describe "run" $ do
it "simple command" $ do
res <- shelly $ run "echo" [ "wibble" ]
res @?= "wibble\n"
it "with escaping" $ do
res <- sh... | null | https://raw.githubusercontent.com/gregwebs/Shelly.hs/25a7884aa5a227707968b45b1336af71c1e627f6/test/src/RunSpec.hs | haskell | Check unit cases
Bash-related commands | module RunSpec ( runSpec ) where
import TestInit
import qualified Data.Text as T
import Data.Text (Text)
import System.IO
runSpec :: Spec
runSpec = do
describe "run" $ do
it "simple command" $ do
res <- shelly $ run "echo" [ "wibble" ]
res @?= "wibble\n"
it "with escaping" $ do
res <- sh... |
d41d65acfd24f4e27205e0b6a1d6edad072425638f7b88e0d3563247bd8d636e | ferd/ReVault | revault_tls.erl | %%% Shared definitions between revault_tls_serv and revault_tls_client.
%%% Both the client and the server implement a process with a reception
%%% loop to which this module can send messages and read from them.
%%%
There is one internal API to be used by revault_sync_fsm , and
one internal API to be used by the cl... | null | https://raw.githubusercontent.com/ferd/ReVault/340f237afe263a8c12062240fd4318b233bdbae1/apps/revault/src/revault_tls.erl | erlang | Shared definitions between revault_tls_serv and revault_tls_client.
Both the client and the server implement a process with a reception
loop to which this module can send messages and read from them.
shared functions related to data transport and serialization
shared functions related to TLS certs
-side-tls-cert... | There is one internal API to be used by revault_sync_fsm , and
one internal API to be used by the client and servers .
-module(revault_tls).
-include_lib("public_key/include/public_key.hrl").
-include("revault_tls.hrl").
-record(buf, {acc=[<<>>], seen=0, needed=0}).
callbacks from within the FSM
-export([callb... |
32e6702e8f03ab9bda559f586c89cba77aa181890fd0dd5ceff967f7d5514a50 | rtoy/ansi-cl-tests | make-load-form-saving-slots.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat May 17 11:54:54 2003
;;;; Contains: Tests of MAKE-LOAD-FORM-SAVING-SLOTS
(in-package :cl-test)
;;; These are tests of MAKE-LOAD-FORM-SAVING-SLOTS proper; tests involving
;;; file compilation will be located elsewhere.
(defstruct mlfss-01 a b c)
(deftest mak... | null | https://raw.githubusercontent.com/rtoy/ansi-cl-tests/9708f3977220c46def29f43bb237e97d62033c1d/make-load-form-saving-slots.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of MAKE-LOAD-FORM-SAVING-SLOTS
These are tests of MAKE-LOAD-FORM-SAVING-SLOTS proper; tests involving
file compilation will be located elsewhere.
If :slot-names is missing, all initialized slots are retained
If :slot-names is present, all initialized slots in the list are ret... | Author :
Created : Sat May 17 11:54:54 2003
(in-package :cl-test)
(defstruct mlfss-01 a b c)
(deftest make-load-form-saving-slots.1
(let* ((obj (make-mlfss-01))
(forms (multiple-value-list
(make-load-form-saving-slots obj))))
(values
(length forms)
(let ((newobj... |
82551c9b4a6d4b3f692e3da5ae5ea5e27c86f0fcd6d384e857b78fa0ff330b3a | szktty/starlight | seplist.mli | type ('a, 'b) t
val empty : ('a, 'b) t
val one : 'a -> ('a, 'b) t
val cons : 'a -> sep:'b -> ('a, 'b) t -> ('a, 'b) t
val hd : ('a, 'b) t -> 'a option
val hd_exn : ('a, 'b) t -> 'a
val tl : ('a, 'b) t -> ('b option * ('a, 'b) t) option
val tl_exn : ('a, 'b) t -> 'b option * ('a, 'b) t
val values : ('a, 'b) t -> 'a li... | null | https://raw.githubusercontent.com/szktty/starlight/0dec4d272c3ea5dd0f82940a24dfe758ab641ca5/compiler/seplist.mli | ocaml | type ('a, 'b) t
val empty : ('a, 'b) t
val one : 'a -> ('a, 'b) t
val cons : 'a -> sep:'b -> ('a, 'b) t -> ('a, 'b) t
val hd : ('a, 'b) t -> 'a option
val hd_exn : ('a, 'b) t -> 'a
val tl : ('a, 'b) t -> ('b option * ('a, 'b) t) option
val tl_exn : ('a, 'b) t -> 'b option * ('a, 'b) t
val values : ('a, 'b) t -> 'a li... | |
058c99b4b241e79ff30f076ff374ae71c2a0adae6808490384311cb40a80bbf6 | comby-tools/comby | test_rewrite_rule_omega.ml | open Core
open Match
open Rewriter
open Test_helpers
include Test_omega
let run_rule source match_template rewrite_template rule =
Generic.first ~configuration match_template source
|> function
| Error _ -> print_string "bad"
| Ok result ->
match result with
| ({ environment; _ } as m) ->
let ... | null | https://raw.githubusercontent.com/comby-tools/comby/5304b3118921d8ace346ca78cd8a5af30737b022/test/common/test_rewrite_rule_omega.ml | ocaml | open Core
open Match
open Rewriter
open Test_helpers
include Test_omega
let run_rule source match_template rewrite_template rule =
Generic.first ~configuration match_template source
|> function
| Error _ -> print_string "bad"
| Ok result ->
match result with
| ({ environment; _ } as m) ->
let ... | |
3da9b328682498ef6c3bcd45b6402d875de205f3f0c7554566c1979d0fe22536 | kraison/graph-utils | cut.lisp | (in-package :graph-utils)
(defmethod minimal-cut! ((graph graph))
(let ((removed-edges nil))
(labels ((cut (g)
(cond ((or (< (node-count g) 2)
(= 0 (edge-count g))
(>= (length (find-components g)) 2))
g)
(t
(push (first (cluster graph :edge-span
:edge-removal-coun... | null | https://raw.githubusercontent.com/kraison/graph-utils/ffc2864825a4771ea9a5d68857e0c86b6a2f239c/cut.lisp | lisp | (in-package :graph-utils)
(defmethod minimal-cut! ((graph graph))
(let ((removed-edges nil))
(labels ((cut (g)
(cond ((or (< (node-count g) 2)
(= 0 (edge-count g))
(>= (length (find-components g)) 2))
g)
(t
(push (first (cluster graph :edge-span
:edge-removal-coun... | |
db8bc87c336686d7c2e4e6f5477b736e964fa926113f7e6eb232a79fdbd4a871 | metrics-clojure/metrics-clojure | project.clj | (defproject metrics-clojure-riemann "3.0.0-SNAPSHOT"
:description "Riemann reporter integration for metrics-clojure"
:url "-clojure"
:license {:name "MIT"}
:profiles {:dev {:global-vars {*warn-on-reflection* true}}}
:dependencies [[metrics-clojure "3.0.0-SNAPSHOT"]
[io.riemann/metrics4-rieman... | null | https://raw.githubusercontent.com/metrics-clojure/metrics-clojure/a1dbacc748a1f8165f0094e2229c84f228efe29b/metrics-clojure-riemann/project.clj | clojure | (defproject metrics-clojure-riemann "3.0.0-SNAPSHOT"
:description "Riemann reporter integration for metrics-clojure"
:url "-clojure"
:license {:name "MIT"}
:profiles {:dev {:global-vars {*warn-on-reflection* true}}}
:dependencies [[metrics-clojure "3.0.0-SNAPSHOT"]
[io.riemann/metrics4-rieman... | |
60056da0d74aeb19d23dda13cc402a360dc2a797af94029d03ff5b66501d27cf | ctdean/backtick | migrate.clj | (ns backtick.db.migrate
(:require [conf.core :as conf]
[ragtime.jdbc :as jdbc]
[ragtime.repl :as repl]))
(defn load-config []
{:datastore (jdbc/sql-database (conf/get :database-url))
:migrations (jdbc/load-resources "backtick/migrations")})
(defn migrate []
(repl/migrate (load-config)... | null | https://raw.githubusercontent.com/ctdean/backtick/00f16405903fbd11b161b32572a199b3bc9c11b0/dev/backtick/db/migrate.clj | clojure | (ns backtick.db.migrate
(:require [conf.core :as conf]
[ragtime.jdbc :as jdbc]
[ragtime.repl :as repl]))
(defn load-config []
{:datastore (jdbc/sql-database (conf/get :database-url))
:migrations (jdbc/load-resources "backtick/migrations")})
(defn migrate []
(repl/migrate (load-config)... | |
5283df2637ed27223e055fd848b9c1b4a0404d87cd9f933d46b8780881155e97 | haskell-jp/makeMistakesToLearnHaskell | Core.hs | {-# OPTIONS_GHC -Wno-unused-imports #-}
module Education.MakeMistakesToLearnHaskell.Exercise.Core
( runHaskellExercise
, runHaskellExerciseWithStdin
, noVeirificationExercise
, notYetImplementedVeirificationExercise
, isInWords
, detailsForgetToWriteDo
, detailsDoConsistentWidth
, isInconsistentlyInden... | null | https://raw.githubusercontent.com/haskell-jp/makeMistakesToLearnHaskell/554e74ce09372d8b4c3c2d1158b9ca0784f2b571/src/Education/MakeMistakesToLearnHaskell/Exercise/Core.hs | haskell | # OPTIONS_GHC -Wno-unused-imports #
TODO: refactor with resultForUser
TODO: print stderr
TODO: pretty print
TODO: print stderr
TODO: pretty print
Against my expectaion,
'dropWhile (isInWords w . Text.words) ls' returns ls as is.
While this function should return an empty list
if 'ls' doesn't contain 'w'. |
module Education.MakeMistakesToLearnHaskell.Exercise.Core
( runHaskellExercise
, runHaskellExerciseWithStdin
, noVeirificationExercise
, notYetImplementedVeirificationExercise
, isInWords
, detailsForgetToWriteDo
, detailsDoConsistentWidth
, isInconsistentlyIndentedAfter
) where
#include <imports/ex... |
b2885d85cf2a6c45129ca73cdf7f9a61cafd7fd760be08643412a3a204c7231a | scheme/scsh | user-group.scm | ;;; User info
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (user-info uid/name)
((cond ((string? uid/name) name->user-info)
((integer? uid/name) (lambda (uid)
(user-id->user-info (integer->user-id uid))))
(else (error "user... | null | https://raw.githubusercontent.com/scheme/scsh/114432435e4eadd54334df6b37fcae505079b49f/scheme/user-group.scm | scheme | User info
Derived functions
(home-file [user] fname)
Group info
Derived functions |
(define (user-info uid/name)
((cond ((string? uid/name) name->user-info)
((integer? uid/name) (lambda (uid)
(user-id->user-info (integer->user-id uid))))
(else (error "user-info arg must be string or integer" uid/name)))
uid/name))
(define (user-info:name user-i... |
e28edd64d62bbc5c6c5ea9c74132dc66fac0b6d220a68d6ec854dff082d2c13e | haskell/stylish-haskell | Config.hs | --------------------------------------------------------------------------------
{-# LANGUAGE BlockArguments #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Language.Haskell.Stylish.Config
( Extensions
, Config (..)
, ExitCodeBehavior (..)
... | null | https://raw.githubusercontent.com/haskell/stylish-haskell/628cf06a6e8b55b56b36df33edc8f5f9f2415aa9/lib/Language/Haskell/Stylish/Config.hs | haskell | ------------------------------------------------------------------------------
# LANGUAGE BlockArguments #
# LANGUAGE OverloadedStrings #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
---------------------... | # LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
module Language.Haskell.Stylish.Config
( Extensions
, Config (..)
, ExitCodeBehavior (..)
, defaultConfigBytes
, configFilePath
, loadConfig
, parseConfig
) where
import Control.Applicative ... |
f1a8d2fb00f2074a6fd9cb0dd56b7510b9c16743d93bc16416ea0a2a414c874c | reflex-frp/reflex-todomvc | warp.hs | import qualified Reflex.TodoMVC
import Language.Javascript.JSaddle.Warp (run)
main :: IO ()
main = run 3702 Reflex.TodoMVC.main
| null | https://raw.githubusercontent.com/reflex-frp/reflex-todomvc/3facdd7fc1cc585611012c6fef1cafb77a2dfa7a/src-bin/warp.hs | haskell | import qualified Reflex.TodoMVC
import Language.Javascript.JSaddle.Warp (run)
main :: IO ()
main = run 3702 Reflex.TodoMVC.main
| |
505933a2a65f0175b451b2f1841ef970753f968ca9718ebbaed85435cd55cc9b | fukamachi/fukacl | list.lisp | (in-package :fukacl)
(defun flatten (x)
(labels ((rec (x acc)
(cond ((null x) acc)
((atom x) (cons x acc))
(t (rec
(car x)
(rec (cdr x) acc))))))
(rec x nil)))
(defun group (source n)
(if (not (listp source)) (err... | null | https://raw.githubusercontent.com/fukamachi/fukacl/c633005755c4273dbee3aef54a8d86a8fbecc6f5/list.lisp | lisp | (in-package :fukacl)
(defun flatten (x)
(labels ((rec (x acc)
(cond ((null x) acc)
((atom x) (cons x acc))
(t (rec
(car x)
(rec (cdr x) acc))))))
(rec x nil)))
(defun group (source n)
(if (not (listp source)) (err... | |
74012c0970e93a5886172772eb56496d124b09650bde33f6e1c3389bdbf666f2 | pedestal/samples | start.cljs | Copyright 2013 Relevance , Inc.
; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( )
; which can be found in the file epl-v10.html at the root of this distribution.
;
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this licens... | null | https://raw.githubusercontent.com/pedestal/samples/caaf04afe255586f8f4e1235deeb0c1904179355/helloworld-app/app/src/helloworld_app/start.cljs | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software. | Copyright 2013 Relevance , Inc.
Eclipse Public License 1.0 ( )
(ns helloworld-app.start
(:require [io.pedestal.app.protocols :as p]
[io.pedestal.app :as app]
[io.pedestal.app.render.push :as push-render]
[io.pedestal.app.render :as render]
[io.pedestal.app.messag... |
2e8499a11e0c5d461e2d005aa0e2a3c757582d04603f51791f5e23e2dd191840 | danielsz/certificaat | authorization.clj | (ns certificaat.acme4j.authorization
(:require [clojure.tools.logging :as log]
[certificaat.domain :refer [Certificaat]]
[certificaat.utils :refer [load-url]])
(:import [org.shredzone.acme4j Authorization]
[org.shredzone.acme4j.challenge Http01Challenge Dns01Challenge]
... | null | https://raw.githubusercontent.com/danielsz/certificaat/955429f6303da9a687cf636d93437281f43ddb71/src/certificaat/acme4j/authorization.clj | clojure | (ns certificaat.acme4j.authorization
(:require [clojure.tools.logging :as log]
[certificaat.domain :refer [Certificaat]]
[certificaat.utils :refer [load-url]])
(:import [org.shredzone.acme4j Authorization]
[org.shredzone.acme4j.challenge Http01Challenge Dns01Challenge]
... | |
b188f5cadb084bd6c4d5b9ed20d79ecce902975a9cd3bf79eb833cd9052e3fc5 | expipiplus1/vulkan | VK_NVX_multiview_per_view_attributes.hs | {-# language CPP #-}
-- | = Name
--
-- VK_NVX_multiview_per_view_attributes - device extension
--
-- == VK_NVX_multiview_per_view_attributes
--
-- [__Name String__]
-- @VK_NVX_multiview_per_view_attributes@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
98
--
-- [__... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Extensions/VK_NVX_multiview_per_view_attributes.hs | haskell | # language CPP #
| = Name
VK_NVX_multiview_per_view_attributes - device extension
== VK_NVX_multiview_per_view_attributes
[__Name String__]
@VK_NVX_multiview_per_view_attributes@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Depe... | 98
1
- Requires support for Vulkan 1.0
-
2017 - 01 - 13
- , NVIDIA
- , NVIDIA
Related SPIR - V and GLSL extensions
@SPV_NVX_multiview_per_view_attributes@ and
per - view attribute arrays are interpreted by Vulkan . Pipelines using
A subpass creation fl... |
55c285d2fed324df831ff03c5afb1b7fe7bc3c145abf978369d56cfa69d2d4f5 | Eventuria/demonstration-gsd | Event.hs | # LANGUAGE InstanceSigs , TypeApplications #
module Eventuria.GSD.Write.Model.Events.PropertyTesting.Event where
import Test.QuickCheck
import Test.QuickCheck.Instances.Text ()
import Test.QuickCheck.Instances.Time ()
import Test.QuickCheck.Instances.UUID ()
import Generic.Random
import Eventuria.GSD.Write.Model.Eve... | null | https://raw.githubusercontent.com/Eventuria/demonstration-gsd/5c7692b310086bc172d3fd4e1eaf09ae51ea468f/test/Eventuria/GSD/Write/Model/Events/PropertyTesting/Event.hs | haskell | # LANGUAGE InstanceSigs , TypeApplications #
module Eventuria.GSD.Write.Model.Events.PropertyTesting.Event where
import Test.QuickCheck
import Test.QuickCheck.Instances.Text ()
import Test.QuickCheck.Instances.Time ()
import Test.QuickCheck.Instances.UUID ()
import Generic.Random
import Eventuria.GSD.Write.Model.Eve... | |
2fb9b218fb3173576d664a5ccd4ac0effa8c2418c0882d9138503d4017bdd0e4 | cloudant/fabric | fabric_doc_attachments.erl | Copyright 2010 Cloudant
%
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the Lice... | null | https://raw.githubusercontent.com/cloudant/fabric/217d0b00bc4301bd834e76d902edf9c052e18b87/src/fabric_doc_attachments.erl | erlang |
use this file except in compliance with the License. You may obtain a copy of
the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitation... | Copyright 2010 Cloudant
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(fabric_doc_attachments).
-include("fabric.hrl").
-include_lib("couch/include/couch_db.hrl").
-export([receiver/2]).
rec... |
c188cdb87900c39c0d747075f1db68b18dce2ec2a24208a4ec3de596222643d7 | replikativ/chat42app | main.cljs | (ns env.ios.main
(:require [chat42app.ios.core :as core]))
(core/init)
| null | https://raw.githubusercontent.com/replikativ/chat42app/5d2caedf6509043823b946c44ceda51b078324b3/env/prod/env/ios/main.cljs | clojure | (ns env.ios.main
(:require [chat42app.ios.core :as core]))
(core/init)
| |
56f405b519fffb8f25782b676cebcc7d518a2ed36cad35c71a6b2d6e3ea0f380 | stamourv/optimization-coach | typed-racket.rkt | #lang racket/base
;; Typed Racket-specific optimization analysis.
(require racket/match
"structs.rkt" "causality-merging.rkt" "profiling.rkt")
(provide report-typed-racket)
(define (report-typed-racket TR-log profile hot-functions)
(log->report
(causality-merging
(prune-cold-TR-failures TR-log pro... | null | https://raw.githubusercontent.com/stamourv/optimization-coach/dbd6cf06613bf285b4540301ea86dd87239eab7d/optimization-coach/typed-racket.rkt | racket | Typed Racket-specific optimization analysis.
no source location, ignore
converts log-entry structs to report-entry structs for further
processing
--------------------------------------------------------------------
#f if no profiling info is available for this function
keep everything if we don't have profile inf... | #lang racket/base
(require racket/match
"structs.rkt" "causality-merging.rkt" "profiling.rkt")
(provide report-typed-racket)
(define (report-typed-racket TR-log profile hot-functions)
(log->report
(causality-merging
(prune-cold-TR-failures TR-log profile hot-functions))))
Returns a report - ent... |
2780260d80282c18de2996ddfbfc86364e983868df3aa537760b7f19ff48dde2 | hdbc/hdbc-odbc | Utils.hs | -*- mode : ; -*-
-}
module Database.HDBC.ODBC.Utils where
import Foreign.Ptr
import Control.Exception
import Foreign.Marshal.Array
withAnyArr0 :: (a -> IO (Ptr b)) -- ^ Function that transforms input data into pointer
-> (Ptr b -> IO ()) -- ^ Function that frees generated data
-> [a] ... | null | https://raw.githubusercontent.com/hdbc/hdbc-odbc/06833d77799f16634d2038bcdc308c35d4752cdd/Database/HDBC/ODBC/Utils.hs | haskell | ^ Function that transforms input data into pointer
^ Function that frees generated data
^ List of input data
^ Action to run with the C array
^ Return value | -*- mode : ; -*-
-}
module Database.HDBC.ODBC.Utils where
import Foreign.Ptr
import Control.Exception
import Foreign.Marshal.Array
withAnyArr0 input2ptract freeact inp action =
bracket (mapM input2ptract inp)
(\clist -> mapM_ freeact clist)
(\clist -> withArray0 nullPtr clist action)
|
ceb751c12a810c484c7a68f318360365843434a39ead6fcdb8863adfd6e467a5 | facebook/flow | exports.ml |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/a952bafb6f0965a92dc31359751c5461ee7bbb92/src/parser_utils/exports/exports.ml | ocaml | * e.g. `export default function() {}`
* `export const foo: string = "foo"`
* `export type T = string`
* `declare module "foo" { ... exports ... }`
* Looks up an object field by name. Returns [None] if the name doesn't
exist or isn't a field.
Accessors and methods don't have any sub-properties to contribute ... |
* Copyright ( c ) Meta Platforms , Inc. and affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
1ff44d16037e39a681ef56d20b9890ec61f0c3b2eb8891c65a06cf68cf25027e | icfpcontest2021/icfpcontest2021.github.io | Main.hs | module Main where
import qualified BrainWall.Database.Tests
import qualified BrainWall.Edge.Slope.Tests
import qualified BrainWall.Edge.Tests
import qualified BrainWall.Main.Prosecutor.Tests
import qualified BrainWall.Polygon.ContainsEdge.Tests
import qualified BrainWall.Polygon.ContainsPoint.Tests
import qualified Br... | null | https://raw.githubusercontent.com/icfpcontest2021/icfpcontest2021.github.io/fb23fea2a8ecec7740017d3dda78d921c1df5a26/toolchain/tests/Main.hs | haskell | module Main where
import qualified BrainWall.Database.Tests
import qualified BrainWall.Edge.Slope.Tests
import qualified BrainWall.Edge.Tests
import qualified BrainWall.Main.Prosecutor.Tests
import qualified BrainWall.Polygon.ContainsEdge.Tests
import qualified BrainWall.Polygon.ContainsPoint.Tests
import qualified Br... | |
883c07ae3f028574528f8fb6668be23c1d41794185afc8ea827d1fe77c6e5966 | ScottBrooks/Erlcraft | erlcraft_client_fsm.erl | -module(erlcraft_client_fsm).
-author('').
Based off of -blocking_TCP_server_using_OTP_principles
By < saleyn at gmail.com >
-behaviour(gen_fsm).
-export([start_link/0, set_socket/2, send_packet/2]).
%% gen_fsm callbacks
-export([init/1, handle_event/3,
handle_sync_event/4, handle_info/3, terminate/3... | null | https://raw.githubusercontent.com/ScottBrooks/Erlcraft/ed336eb8da4d83e937687ce34feecb76b4128288/src/erlcraft_client_fsm.erl | erlang | gen_fsm callbacks
client socket
client address
------------------------------------------------------------------------
API
------------------------------------------------------------------------
-------------------------------------------------------------------------
@doc To be called by the supervisor in order... | -module(erlcraft_client_fsm).
-author('').
Based off of -blocking_TCP_server_using_OTP_principles
By < saleyn at gmail.com >
-behaviour(gen_fsm).
-export([start_link/0, set_socket/2, send_packet/2]).
-export([init/1, handle_event/3,
handle_sync_event/4, handle_info/3, terminate/3, code_change/4]).
... |
ba1e962adc7c9f2db5edb900c03b02d5904092264c2717bdd5919dd3893ce00b | input-output-hk/ouroboros-network | Node.hs | # LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wno - orphans #
module Ouroboros.Consensus.Byron.Node (
PBftSignatureThreshold (..)
, ProtocolParamsByron (..)
, ... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/ebb34fa4d1ba1357e3b803a49f750d2ae3df19e5/ouroboros-consensus-byron/src/Ouroboros/Consensus/Byron/Node.hs | haskell | # LANGUAGE ScopedTypeVariables #
* Secrets
------------------------------------------------------------------------------
Credentials
------------------------------------------------------------------------------
| Only core nodes can produce blocks. The 'CoreNodeId' is used to
determine the order (round-robin) ... | # LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wno - orphans #
module Ouroboros.Consensus.Byron.Node (
PBftSignatureThreshold (..)
, ProtocolParamsByron (..)
, byronBlockForging
, defaultPBftSignat... |
fc4efe0e8b98178da9642905171f2fec0a85c449e78b17f3ec2d220a84762907 | haskell-hvr/hslogger | Formatter.hs | # LANGUAGE CPP #
Copyright ( c ) 2005 - 2011 :
Copyright (c) 2005-2011 John Goerzen
License: BSD3
-}
{- |
Definition of log formatter support
A few basic, and extendable formatters are defined.
Please see "System.Log.Logger" for extensive documentation on the
logging system.
-}
module System.Log.Formatt... | null | https://raw.githubusercontent.com/haskell-hvr/hslogger/4c3ca34ea91fc00774a505d8d2a2aca8ece7a76c/src/System/Log/Formatter.hs | haskell | |
Definition of log formatter support
A few basic, and extendable formatters are defined.
Please see "System.Log.Logger" for extensive documentation on the
logging system.
'Handler' to allow the formatter to use information specific to the handler
^ The LogHandler that the passed message came from
^ The log m... | # LANGUAGE CPP #
Copyright ( c ) 2005 - 2011 :
Copyright (c) 2005-2011 John Goerzen
License: BSD3
-}
module System.Log.Formatter( LogFormatter
, nullFormatter
, simpleLogFormatter
, tfLogFormatter
, va... |
15fd21fc4ab55db7c44fd1f15ef0470609e10da6087190c1ce4e6ff113bcbf0a | mewa/clojure-k8s | extensions_v_beta_.clj | (ns kubernetes.api.extensions-v-beta-
(:require [kubernetes.core :refer [call-api check-required-params with-collection-format]])
(:import (java.io File)))
(defn create-extensions-v1beta1-namespaced-daemon-set-with-http-info
"
create a DaemonSet"
([namespace body ] (create-extensions-v1beta1-namespaced-daemo... | null | https://raw.githubusercontent.com/mewa/clojure-k8s/a7e8d82f0e0bc47e5678c72d7d9b8216080ccffc/src/kubernetes/api/extensions_v_beta_.clj | clojure | (ns kubernetes.api.extensions-v-beta-
(:require [kubernetes.core :refer [call-api check-required-params with-collection-format]])
(:import (java.io File)))
(defn create-extensions-v1beta1-namespaced-daemon-set-with-http-info
"
create a DaemonSet"
([namespace body ] (create-extensions-v1beta1-namespaced-daemo... | |
7bc790ab65843f3ad795d5605c20d8deec22260350d47171cb747ae1b7bbfef0 | circuithub/fast-downward | Axiom.hs | {-# language OverloadedStrings #-}
# language RecordWildCards #
module FastDownward.SAS.Axiom ( Axiom(..), toSAS ) where
import Data.Sequence ( Seq )
import qualified Data.Sequence as Seq
import qualified Data.Text.Lazy.Builder
import qualified Data.Text.Lazy.Builder.Int
import FastDownward.SAS.DomainIndex ( DomainIn... | null | https://raw.githubusercontent.com/circuithub/fast-downward/9f6375af83f693076c957251e8ac0ab5c3dd63d7/FastDownward/SAS/Axiom.hs | haskell | # language OverloadedStrings # | # language RecordWildCards #
module FastDownward.SAS.Axiom ( Axiom(..), toSAS ) where
import Data.Sequence ( Seq )
import qualified Data.Sequence as Seq
import qualified Data.Text.Lazy.Builder
import qualified Data.Text.Lazy.Builder.Int
import FastDownward.SAS.DomainIndex ( DomainIndex )
import qualified FastDownward... |
37ff8b6b5521b61309484fc7afd6e2f2d9e6e7d333e59e59df2e5c19c75afc9d | geophf/1HaskellADay | Exercise.hs | module Y2017.M01.D05.Exercise where
import Data.Array
below imports available from 1HaskellADay git repository
import Data.SAIPE.USStates
import Graph.ScoreCard
import Y2016.M12.D21.Exercise
import Y2016.M12.D22.Exercise
import Y2017.M01.D04.Exercise
-
So , yesterday we looked at US State SAIPE data . The solu... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2017/M01/D05/Exercise.hs | haskell | }
really a poverty / population ration, but okay
will be used (read further down)
}
} | module Y2017.M01.D05.Exercise where
import Data.Array
below imports available from 1HaskellADay git repository
import Data.SAIPE.USStates
import Graph.ScoreCard
import Y2016.M12.D21.Exercise
import Y2016.M12.D22.Exercise
import Y2017.M01.D04.Exercise
-
So , yesterday we looked at US State SAIPE data . The solu... |
1cc965a39b3b489b20f5cf192a46a33f58821bbc4638e30325a969e2d48c9333 | hyperfiddle/electric | explorer.cljc | (ns hyperfiddle.hfql.explorer
(:require [hyperfiddle.photon :as p]
[hyperfiddle.explorer :as ex]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.hfql.ui :as ui]
[hyperfiddle.hfql :as hfql]
[hyperfiddle.spec :as spec]
[hyperfiddle.api :as hf]
... | null | https://raw.githubusercontent.com/hyperfiddle/electric/e633dc635cf84e0a2320b664ba722b696ce0067b/scratch/geoffrey/2022/explorer.cljc | clojure | card many | (ns hyperfiddle.hfql.explorer
(:require [hyperfiddle.photon :as p]
[hyperfiddle.explorer :as ex]
[hyperfiddle.photon-dom :as dom]
[hyperfiddle.hfql.ui :as ui]
[hyperfiddle.hfql :as hfql]
[hyperfiddle.spec :as spec]
[hyperfiddle.api :as hf]
... |
e0115f346f72c9c29edf6943a86a542afd8e729dd1cfd7d7b9515d97743b4125 | rowangithub/DOrder | instrument.ml | (** Insert sampling statements into the analyzing code *)
open Parsetree
open Typedtree
open Types
open Frame
open Longident
open Backwalker
let pp = Format.fprintf
let log_fname = "mllog"
let tempt_arr_prefix = "tmp_pre"
let tempt_arr_postfix = "temp_post"
(*If a function is a measure => do not instrument it*)
le... | null | https://raw.githubusercontent.com/rowangithub/DOrder/e0d5efeb8853d2a51cc4796d7db0f8be3185d7df/liquid/instrument.ml | ocaml | * Insert sampling statements into the analyzing code
If a function is a measure => do not instrument it
If a function is userdefined => may instrument it
* expression is from text; count how many arguments are specified
* Print out test harnesses if programmers specify them in a separate file
No test harnesses avai... |
open Parsetree
open Typedtree
open Types
open Frame
open Longident
open Backwalker
let pp = Format.fprintf
let log_fname = "mllog"
let tempt_arr_prefix = "tmp_pre"
let tempt_arr_postfix = "temp_post"
let is_measure se_env funname =
(String.compare funname "List.length" = 0) ||
(Hashtbl.fold (fun _ ms res ->
... |
7e13965e62d5801a1e2b0bee8c2b54908701f105a579083cd3affd6fe7e4b6cd | tnelson/Forge | multiplicityFormulas.rkt | #lang forge/core
(set-option! 'verbose 0)
(sig Color #:abstract)
(sig Red #:one #:extends Color)
(sig Green #:one #:extends Color)
(sig Blue #:one #:extends Color)
(sig Node #:abstract)
(sig N1 #:one #:extends Node)
(sig N2 #:one #:extends Node)
(sig N3 #:one #:extends Node)
(relation edges (Node Node Color))
(ins... | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/tests/forge-core/formulas/multiplicityFormulas.rkt | racket | These are treated as multiplicity formulas by ast.rkt,
rather than quantifier formulas.
no
no
o ne
no
CUURRENTLY BUGGED
#:bounds [test-inst]
#:expect theorem)
CUURRENTLY BUGGED
#:bounds [test-inst]
#:expect theorem) | #lang forge/core
(set-option! 'verbose 0)
(sig Color #:abstract)
(sig Red #:one #:extends Color)
(sig Green #:one #:extends Color)
(sig Blue #:one #:extends Color)
(sig Node #:abstract)
(sig N1 #:one #:extends Node)
(sig N2 #:one #:extends Node)
(sig N3 #:one #:extends Node)
(relation edges (Node Node Color))
(ins... |
aa73f476cb9cecbb92e3069af79280285a210986f20cca31bad8bb6bda629ccf | aeternity/aesim | aesim.erl | -module(aesim).
-behaviour(application).
%=== EXPORTS ===================================================================
-export([main/1]).
-export([start/2]).
-export([stop/1]).
%=== API FUNCTIONS =============================================================
-spec main(term()) -> no_return().
main(Args) ->
s... | null | https://raw.githubusercontent.com/aeternity/aesim/20d89621a0994e1b6cf2b766d188ec29283e77e1/src/aesim.erl | erlang | === EXPORTS ===================================================================
=== API FUNCTIONS =============================================================
Dialyzer don't like we create an anonymous function that doesn't return
=== INTERNAL FUNCTIONS ======================================================== | -module(aesim).
-behaviour(application).
-export([main/1]).
-export([start/2]).
-export([stop/1]).
-spec main(term()) -> no_return().
main(Args) ->
start_simulator(Args).
-dialyzer({nowarn_function, start/2}).
start(_StartType, StartArgs) ->
{ok, spawn(fun() -> start_simulator(StartArgs) end)}.
stop(_State... |
357077b88b193f6ea5808d0f8354b5ddd20cc8b1705a4802acb97f5d423e258e | racket/typed-racket | tc-lambda-unit.rkt | #lang racket/unit
(require "../utils/utils.rkt"
"../utils/plambda-utils.rkt"
racket/list syntax/parse syntax/stx
racket/match syntax/private/id-table
racket/sequence
(contract-req)
"../rep/type-rep.rkt"
"../rep/object-rep.rkt"
"../rep/rep-utils.rk... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-lib/typed-racket/typecheck/tc-lambda-unit.rkt | racket | rest: id or #f
syntax: syntax? - the improper syntax list of identifiers
(i.e. (append positional (or id '())) but syntax)
When expanding a keyword or optional lambda, Racket adds into the expanded
code more lambdas, where syntax objects for the original lambda's parameters
are reused. Since Typed Racket stores t... | #lang racket/unit
(require "../utils/utils.rkt"
"../utils/plambda-utils.rkt"
racket/list syntax/parse syntax/stx
racket/match syntax/private/id-table
racket/sequence
(contract-req)
"../rep/type-rep.rkt"
"../rep/object-rep.rkt"
"../rep/rep-utils.rk... |
46402dea8e3c75a1278a89e4302bbcba46fc0ff3b64fd65db94c2febd54f039a | rd--/hsc3 | Command.hs | -- | Collection of standard /command/ modules.
module Sound.Sc3.Server.Command (module S) where
import Sound.Sc3.Server.Command.Enum as S
import Sound.Sc3.Server.Command.Plain as S
| null | https://raw.githubusercontent.com/rd--/hsc3/7dc748106639999947548d0b3205a468cfc55fed/Sound/Sc3/Server/Command.hs | haskell | | Collection of standard /command/ modules. | module Sound.Sc3.Server.Command (module S) where
import Sound.Sc3.Server.Command.Enum as S
import Sound.Sc3.Server.Command.Plain as S
|
97b847294e1b2c5c0d7fa46ae113ac87815ec4fe601c07aecf9bbb31f05820c2 | racket/eopl | interp-tests.rkt | #lang eopl
(require eopl/tests/private/utils)
(require "data-structures.rkt") ; for expval constructors
(require "interp.rkt") ; for value-of-program
(require "cps-out-lang.rkt") ; for cps-program->string, cps-out-scan&parse
(require (only-in racket pretty-print))
(define instrument-cps (make-paramet... | null | https://raw.githubusercontent.com/racket/eopl/43575d6e95dc34ca6e49b305180f696565e16e0f/tests/chapter6/cps-side-effects-lang/interp-tests.rkt | racket | for expval constructors
for value-of-program
for cps-program->string, cps-out-scan&parse
this consists entirely of expressions that are already in cps.
exercise: for each expression that is marked "not in cps",
explain why it is not cps.
tests ;;;;;;;;;;;;;;;;
simple arithmetic
nested arithmetic
simple varia... | #lang eopl
(require eopl/tests/private/utils)
(require (only-in racket pretty-print))
(define instrument-cps (make-parameter #f))
run : String - > ExpVal
(define run
(lambda (string)
(value-of-program (cps-out-scan&parse string))))
(define equal-answer?
(lambda (ans correct-ans)
(equal? ans (sloppy... |
b68fe7dc92510b6bc4203d424a40cdc2d77ebfd11df4d4ecf1e424d312477071 | dmitryvk/sbcl-win32-threads | debug.lisp | (in-package "SB!VM")
(define-vop (debug-cur-sp)
(:translate sb!di::current-sp)
(:policy :fast-safe)
(:results (res :scs (sap-reg)))
(:result-types system-area-pointer)
(:generator 1
(move csp-tn res)))
(define-vop (debug-cur-fp)
(:translate sb!di::current-fp)
(:policy :fast-safe)
(:results (res :s... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/hppa/debug.lisp | lisp | (in-package "SB!VM")
(define-vop (debug-cur-sp)
(:translate sb!di::current-sp)
(:policy :fast-safe)
(:results (res :scs (sap-reg)))
(:result-types system-area-pointer)
(:generator 1
(move csp-tn res)))
(define-vop (debug-cur-fp)
(:translate sb!di::current-fp)
(:policy :fast-safe)
(:results (res :s... | |
83e89bb7cea97a4f9799be30620b3ff7a497fb680c3f6f8cff7d0b3990a87521 | auser/hermes | thrift_server.erl | %%%-------------------------------------------------------------------
%%% File : thrift_server.erl
%%% Author : <>
%%% Description :
%%%
Created : 28 Jan 2008 by < >
%%%-------------------------------------------------------------------
-module(thrift_server).
-behaviour(gen_server).
%% API
-export([start_... | null | https://raw.githubusercontent.com/auser/hermes/32741eb75398ebbcbf640e2c73dfd2a54f0d1241/deps/thrift/src/thrift_server.erl | erlang | -------------------------------------------------------------------
File : thrift_server.erl
Author : <>
Description :
-------------------------------------------------------------------
API
gen_server callbacks
====================================================================
API
=======================... | Created : 28 Jan 2008 by < >
-module(thrift_server).
-behaviour(gen_server).
-export([start_link/3, stop/1, take_socket/2]).
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
terminate/2, code_change/3]).
-define(SERVER, ?MODULE).
-record(state, {listen_socket, acceptor_ref, service, hand... |
7dfd7f3f21ad54df0b1ebc481c649fd07021b20cdc3b6ad845f8f224909713ce | greglook/blocks | project.clj | (defproject mvxcvi/blocks-tests "2.0.3"
:description "Generative tests for block storage implementations."
:url ""
:license {:name "Public Domain"
:url "/"}
:deploy-branches ["master"]
:pedantic? :abort
:dependencies
[[org.clojure/clojure "1.10.1"]
[org.clojure/test.check "0.10.0"]
[mv... | null | https://raw.githubusercontent.com/greglook/blocks/c962d4431c05ac686a0cd1145e05bc0a0e0c4d7d/blocks-tests/project.clj | clojure | (defproject mvxcvi/blocks-tests "2.0.3"
:description "Generative tests for block storage implementations."
:url ""
:license {:name "Public Domain"
:url "/"}
:deploy-branches ["master"]
:pedantic? :abort
:dependencies
[[org.clojure/clojure "1.10.1"]
[org.clojure/test.check "0.10.0"]
[mv... | |
329be9c1dffbe466362acfbd88a615e943182b7192f3c704589066cdd986ab54 | dwincort/UISF | Examples.hs | {-# LANGUAGE Arrows #-}
Last modified by :
Last modified on : 5/25/2013
-- This file is a set of various UI examples showing off the features
of the various widgets in UISF .
module FRP.UISF.Examples.Examples where
import FRP.UISF
import FRP.UISF.Graphics
import Numeric (showHex)
-- | This example disp... | null | https://raw.githubusercontent.com/dwincort/UISF/291a6155e41f351d938daed3d2be6f8baf832a19/FRP/UISF/Examples/Examples.hs | haskell | # LANGUAGE Arrows #
This file is a set of various UI examples showing off the features
| This example displays the time from the start of the GUI application.
| This example shows off 'button's and state by presenting a plus and
minus button with a counter that is adjusted by them.
| This example shows off the '... |
Last modified by :
Last modified on : 5/25/2013
of the various widgets in UISF .
module FRP.UISF.Examples.Examples where
import FRP.UISF
import FRP.UISF.Graphics
import Numeric (showHex)
timeEx :: UISF () ()
timeEx = title "Time" $ accumTime >>> display <<< spacer
buttonEx :: UISF () ()
buttonEx = titl... |
226d8b415bd922cddc02cac8258242d51f431a1e8a75711abe99ec15bacf57a1 | Hendekagon/iiiiioiooooo | event.cljs | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 ( -1.0.php )
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; ... | null | https://raw.githubusercontent.com/Hendekagon/iiiiioiooooo/f7c2ab0468798b2065bdff9c564ca10a966cfa79/public/js/clojure/browser/event.cljs | clojure | The use and distribution terms for this software are covered by the
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.... | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns ^{:doc "This namespace contains functions to work with browser
events. It is based on the Google Closure Library event system."
:author "Bobby Calderwood"}
clojure.browser.event
(:require [goog.events :as events])
... |
ab1ceac9816c53d6b21cee6956f816ffdb01ee8755aebd7de524c6e087e4bd12 | Zeta611/L | value_analyzer.mli | module HoleCoeffs : sig
type t = int list
val hole_count : 'a list -> int
end
type value =
| VNum of HoleCoeffs.t
| VPair of value * value
val value_of_plain_value :
([< `Num of int | `Pair of 'a * 'a ] as 'a) -> hole_cnt:int -> value
val count_holes : Shape_analyzer.ty -> L.number
val value_of_hole_type ... | null | https://raw.githubusercontent.com/Zeta611/L/5a2f6625bfab897946a56369665a11ef65fc5b92/lib/value_analyzer.mli | ocaml | module HoleCoeffs : sig
type t = int list
val hole_count : 'a list -> int
end
type value =
| VNum of HoleCoeffs.t
| VPair of value * value
val value_of_plain_value :
([< `Num of int | `Pair of 'a * 'a ] as 'a) -> hole_cnt:int -> value
val count_holes : Shape_analyzer.ty -> L.number
val value_of_hole_type ... | |
2530482e290ad8195399a6d20ec8316fee984dd5f07bf8686f73f19534a44a4a | wdanilo/haskell-logger | Drop.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE FunctionalDependencies #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
-- Module : System.Log.Logger.D... | null | https://raw.githubusercontent.com/wdanilo/haskell-logger/bdf3b64f50c0a8e26bd44fdb882e72ffbe19fd3f/src/System/Log/Logger/Drop.hs | haskell | # LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
|
Module : System.Log.Logger.Drop
License : Apache-2.0
Stability : stable
Portability : portable
---------------------------------------------------------------------------
--------------------... | # LANGUAGE TemplateHaskell #
# LANGUAGE FunctionalDependencies #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
# LANGUAGE NoMonomorphismRestriction #
Copyright : ( C ) 2015 Flowbox
Maintainer : < >
module System.Log.Logger.Drop where
import Data.Monoid
import Control... |
f77cd2e28d6e5956c94f07ddb3194d40d1b183a6521911c45c81cc044ff351eb | OCamlPro/opam-bin | commandInstall.ml | (**************************************************************************)
(* *)
Copyright 2020 OCamlPro & Origin Labs
(* *)
(* All rights ... | null | https://raw.githubusercontent.com/OCamlPro/opam-bin/322e46827280af0fdf6a24ac65893b67d3b9f269/src/opam_bin_lib/commandInstall.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2020 OCamlPro & Origin Labs
GNU Lesser General Public License version 2.1 , with the special
open Ezcmd.TYPES
open Ez_file.V1
open EzFile.OP
open EzConfig.OP
open Ez_opam_file.V1
module OpamParserTypes = OpamParserTypes.FullPos
let cmd_name = "install"
let add... |
54cf0eface93c1d2b9a35594b801e86394ec8b79db718f981d77d3cfbce4059e | Bogdanp/deta | operator.rkt | #lang racket/base
(require (for-syntax racket/base
racket/syntax)
racket/match
syntax/parse
syntax/parse/define)
(provide
define-ops)
(define-syntax (define-ops stx)
(syntax-parse stx
[(_ kind:id [op:id (~optional maybe-op-str:str)] ...)
#:with (op-str ...)... | null | https://raw.githubusercontent.com/Bogdanp/deta/503860156f5cb1dbecb4339e299ee86a10b66d32/deta-lib/private/dialect/operator.rkt | racket | #lang racket/base
(require (for-syntax racket/base
racket/syntax)
racket/match
syntax/parse
syntax/parse/define)
(provide
define-ops)
(define-syntax (define-ops stx)
(syntax-parse stx
[(_ kind:id [op:id (~optional maybe-op-str:str)] ...)
#:with (op-str ...)... | |
0ab8756726336205200a0f011d30155f977aa3d21e193f7f55ddfc42bb3f3eb7 | jiangpengnju/htdp2e | ex146.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex146) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/jiangpengnju/htdp2e/d41555519fbb378330f75c88141f72b00a9ab1d3/arbitrarily-large-data/designing-with-self-referential-data-dafinitions/ex146.rkt | racket | about the language level of this file in a form that our tools can easily process.
interpretation: non-empty lists of measured temperatures. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname ex146) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
Design sorted > ? . The function consumes a NEList - of - temper... |
89a646bd2c808d52fb4f7bcdeb728763fc5cbf86eccfa2bf77467940969ec670 | merlin-lang/merlin | Merlin_TC.ml | open Merlin_Types
open Merlin_Util
open Merlin_Error
open Frenetic_OpenFlow
open Frenetic_Packet
module NK = Frenetic_NetKAT
let major = ref 0
let fresh_major () : int =
incr major ; !major
module TC = struct
type tcdev = string
type tchandle = int * int
type tcrate = rate
type tcprio = TCPrio of int
type tcq... | null | https://raw.githubusercontent.com/merlin-lang/merlin/35a88bce024a8b8be858c796f1cd718e4a660529/lib/Merlin_TC.ml | ocaml | Utility functions
Qdisc handle only has a major number
raise (Unimplementable_tc_test f)
Only support adding new control settings for now | open Merlin_Types
open Merlin_Util
open Merlin_Error
open Frenetic_OpenFlow
open Frenetic_Packet
module NK = Frenetic_NetKAT
let major = ref 0
let fresh_major () : int =
incr major ; !major
module TC = struct
type tcdev = string
type tchandle = int * int
type tcrate = rate
type tcprio = TCPrio of int
type tcq... |
15f6aaf54568050169c4810dac0c88e613319e8aade7ec930f01c88fa49f8eec | rtoy/cmucl | composite.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : XLIB ; -*-
;;; ---------------------------------------------------------------------------
;;; Title: Composite Extension
Created : 2014 - 11 - 17
Author : < >
;;; ---------------------------------------------------------------------------
;;;
( c... | null | https://raw.githubusercontent.com/rtoy/cmucl/263e93982390688b10caead45e494825d10d5966/src/clx/extensions/composite.lisp | lisp | Syntax : Common - Lisp ; Package : XLIB ; -*-
---------------------------------------------------------------------------
Title: Composite Extension
---------------------------------------------------------------------------
Permission is granted to any individual or institution to use,
copy, modify, and di... | Created : 2014 - 11 - 17
Author : < >
( c ) copyright 2014 by
(in-package :xlib)
(export '(composite-query-version
composite-redirect-window
composite-redirect-subwindows
composite-unredirect-window
composite-unredirect-subwindows
composite-get-overlay... |
5b22ff43c0ece1d19ccdb5d5164f9e0521bf5547181ddbe6208734d7bab9033b | xavierleroy/ocamlmpi | mpi.mli | (***********************************************************************)
(* *)
(* The Caml/MPI interface *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/xavierleroy/ocamlmpi/29eae81935a39dd866edf088f1d61e780b3156c8/mpi.mli | ocaml | *********************************************************************
The Caml/MPI interface
... | , projet Cristal , INRIA Rocquencourt
Copyright 1998 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
* { 1 Caml bindings for the Message Pas... |
f1759c3eb19d535b99ff59de1fd1a1a0b4ce115b9214910634c688c1a45f0cd1 | jordanthayer/ocaml-search | sharedq.ml | $ I d : sharedq.ml , v 1.1 2003/06/20 16:30:46 ruml Exp $
shared queues
shared queues
*)
type 'a t = {
q : 'a Queue.t;
(* the right to access or modify q *)
mod_rights : Mutex.t;
(* signaled when something is added to q *)
addition : Condition.t;
}
let create () =
{ mod_rights = Mute... | null | https://raw.githubusercontent.com/jordanthayer/ocaml-search/57cfc85417aa97ee5d8fbcdb84c333aae148175f/wrthreads/sharedq.ml | ocaml | the right to access or modify q
signaled when something is added to q
unlocks mutex and blocks
mutex now locked again | $ I d : sharedq.ml , v 1.1 2003/06/20 16:30:46 ruml Exp $
shared queues
shared queues
*)
type 'a t = {
q : 'a Queue.t;
mod_rights : Mutex.t;
addition : Condition.t;
}
let create () =
{ mod_rights = Mutex.create ();
q = Queue.create ();
addition = Condition.create (); }
let mute... |
63407d7cd2d9e1a9b1c8baf13612b79d18a2ff585423d27e3133a755df30ddd1 | NorfairKing/smos | Report.hs | {-# LANGUAGE OverloadedStrings #-}
module Smos.Actions.Report where
import Smos.Actions.Browser
import Smos.Actions.File
import Smos.Actions.Report.Next
import Smos.Actions.Report.Stuck
import Smos.Actions.Report.Timestamps
import Smos.Actions.Report.Waiting
import Smos.Actions.Report.Work
import Smos.Types
allPlain... | null | https://raw.githubusercontent.com/NorfairKing/smos/f72b26c2e66ab4f3ec879a1bedc6c0e8eeb18a01/smos/src/Smos/Actions/Report.hs | haskell | # LANGUAGE OverloadedStrings #
Exit a Report
If there is a file open, go to it (this already works via another Action?)
If there is no file open, go to the browser in the workflow dir |
module Smos.Actions.Report where
import Smos.Actions.Browser
import Smos.Actions.File
import Smos.Actions.Report.Next
import Smos.Actions.Report.Stuck
import Smos.Actions.Report.Timestamps
import Smos.Actions.Report.Waiting
import Smos.Actions.Report.Work
import Smos.Types
allPlainReportActions :: [Action]
allPlainR... |
206f8c5d37d23b3825cc05b125cd122c1d8ecbd883b90d73f7110e39f4757c49 | rescript-association/genType | oprint.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/rescript-association/genType/c44251e969fb10d27a38d2bdeff6a5f4d778594f/src/compiler-libs-406/oprint.ml | ocaml | ************************************************************************
OCaml
... | Projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Format
open Outcometree
exception Ellipsis
let cautious f ppf arg =
try f ppf arg with... |
8ea3521600e09028d3425de7830b454248d1dd2b9944f6e9ca574ca9d767eb7b | hbr/fmlib | source_extractor.ml | open Fmlib_pretty
module Pretty = Fmlib_pretty.Print
type t = {
range: Position.range;
extra: int;
number_width: int;
pos: Position.t;
line: string;
doc: Print.doc;
}
let of_range
(extra: int)
(range: Position.range)
: t
=
assert (0 <= extra);
assert (Pos... | null | https://raw.githubusercontent.com/hbr/fmlib/0c7b923605a211e9c706d427fb33c5ba40248321/src/parse/source_extractor.ml | ocaml | open Fmlib_pretty
module Pretty = Fmlib_pretty.Print
type t = {
range: Position.range;
extra: int;
number_width: int;
pos: Position.t;
line: string;
doc: Print.doc;
}
let of_range
(extra: int)
(range: Position.range)
: t
=
assert (0 <= extra);
assert (Pos... | |
b275420f14d5df5bfe0fadc4e01ab17ed40c968d37b1494a7c939004d4e8f43c | abcdw/rde | ssh.scm | ;;; rde --- Reproducible development environment.
;;;
Copyright © 2021 , 2022 < >
Copyright © 2022 < >
;;;
;;; This file is part of rde.
;;;
;;; rde is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; e... | null | https://raw.githubusercontent.com/abcdw/rde/5b8605f421d0b8a9569e43cb6f7e651e7a8f7218/src/rde/features/ssh.scm | scheme | rde --- Reproducible development environment.
This file is part of rde.
rde is free software; you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
rde is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the im... | Copyright © 2021 , 2022 < >
Copyright © 2022 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(define-module (rde features ssh)
#:use-module (rde features)
#:use-module (rde features predicates)
#:use-module (gnu... |
1b6131966a61cb6ac93f908988960f314470c8d08d8100078f21193fc4f92988 | openbadgefactory/salava | routes.clj | (ns salava.oauth.routes
(:require [clojure.pprint :refer [pprint]]
[clojure.string :as string]
[compojure.api.sweet :refer :all]
[ring.util.http-response :refer :all]
[ring.util.response :refer [redirect]]
[salava.core.layout :as layout]
[schema.... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/clj/salava/oauth/routes.clj | clojure | (ns salava.oauth.routes
(:require [clojure.pprint :refer [pprint]]
[clojure.string :as string]
[compojure.api.sweet :refer :all]
[ring.util.http-response :refer :all]
[ring.util.response :refer [redirect]]
[salava.core.layout :as layout]
[schema.... | |
4f64dd3aaf18fed282878eb675cd470ba5bfc368fb860fe7b7bb32cac091c731 | pallet/alembic | profiles.clj | {:clojure-1.6.0 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:clojure-1.5.1 {:dependencies [[org.clojure/clojure "1.5.1"]]}
:clojure-1.5.0 {:dependencies [[org.clojure/clojure "1.5.0"]]}
:clojure-1.4.0 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:dev {:plugins [[lein-pallet-release "RELEASE"]]}}
| null | https://raw.githubusercontent.com/pallet/alembic/bff5478c1ddb990c03e41c03cd19fb21353fd064/profiles.clj | clojure | {:clojure-1.6.0 {:dependencies [[org.clojure/clojure "1.6.0"]]}
:clojure-1.5.1 {:dependencies [[org.clojure/clojure "1.5.1"]]}
:clojure-1.5.0 {:dependencies [[org.clojure/clojure "1.5.0"]]}
:clojure-1.4.0 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:dev {:plugins [[lein-pallet-release "RELEASE"]]}}
| |
a76a88d15e332e0931b46872524ca4b9ab22680c4586b759a79696dc70879382 | mfelleisen/Evolution | cards.rkt | #lang racket
;; ===================================================================================================
;; equips cards from ../ with serialization for GUI and dist. impl.
;; SERVICES
(provide
(all-from-out "../cards.rkt")
;; JSexpr -> Card
json->card
;; Card -> JSexpr
card->json)
;; =========... | null | https://raw.githubusercontent.com/mfelleisen/Evolution/cf5ef02696339f8e83cc831932206c6a4ead689e/Xternal/cards.rkt | racket | ===================================================================================================
equips cards from ../ with serialization for GUI and dist. impl.
SERVICES
JSexpr -> Card
Card -> JSexpr
===================================================================================================
DEPENDEN... | #lang racket
(provide
(all-from-out "../cards.rkt")
json->card
card->json)
(require "../traits.rkt" "../cards.rkt")
(module+ test
(require rackunit))
(define (card->json c)
`[,(card-food-points c) ,(trait->string (card-trait c))])
(define (json->card j)
(match j
[`(,(? integer? food) ,trait)
... |
1d7d1482a491463d3b2cb97f4c8662d37b2160f76e07b704bbad41d7f6d24277 | MaskRay/OJHaskell | 73.hs | import Data.Ratio
maxn = 12000
traverse a b c d
| b > maxn || d > maxn || c%d <= 1%3 || 1%2 <= a%b = 0
| otherwise = traverse a b m n + traverse m n c d + fromEnum (1%3 < m%n && m%n < 1%2 && n <= maxn)
where m = a+c
n = b+d
main = print $ traverse 0 1 1 1 | null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Project%20Euler/73.hs | haskell | import Data.Ratio
maxn = 12000
traverse a b c d
| b > maxn || d > maxn || c%d <= 1%3 || 1%2 <= a%b = 0
| otherwise = traverse a b m n + traverse m n c d + fromEnum (1%3 < m%n && m%n < 1%2 && n <= maxn)
where m = a+c
n = b+d
main = print $ traverse 0 1 1 1 | |
1708533fb47fccf446c066fd6929ddb181a845f050aed5e281e489a76228d63a | fendor/hsimport | Utils.hs |
module HsImport.Utils
( firstSrcLine
, lastSrcLine
, srcSpan
, declSrcLoc
, importDecls
) where
import qualified Language.Haskell.Exts as HS
import HsImport.Types
declSrcLoc :: Decl -> SrcLoc
declSrcLoc decl = HS.SrcLoc srcFile srcLine srcCol
where
declSrcSpan = srcSpan . HS.ann $ decl
... | null | https://raw.githubusercontent.com/fendor/hsimport/9be9918b06545cfd7282e4db08c2b88f1d8162cd/lib/HsImport/Utils.hs | haskell |
module HsImport.Utils
( firstSrcLine
, lastSrcLine
, srcSpan
, declSrcLoc
, importDecls
) where
import qualified Language.Haskell.Exts as HS
import HsImport.Types
declSrcLoc :: Decl -> SrcLoc
declSrcLoc decl = HS.SrcLoc srcFile srcLine srcCol
where
declSrcSpan = srcSpan . HS.ann $ decl
... | |
c2185901a97dcd35e76018ee9f424593cc0338fac9402998a2ab3f0f0e94b8a7 | RichiH/git-annex | Cost.hs | Remote costs .
-
- Copyright 2011 - 2013 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2011-2013 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Config.Cost where
We use a float for a cost to ensure that there is a cost in
- between any... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Config/Cost.hs | haskell | Some predefined default costs.
- Users setting costs in config files can be aware of these,
- and pick values relative to them. So don't change.
Adjusts a remote's cost to reflect it being encrypted.
avoid fractions unless needed
Make sure the remote cost numbers work out. | Remote costs .
-
- Copyright 2011 - 2013 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2011-2013 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Config.Cost where
We use a float for a cost to ensure that there is a cost in
- between any... |
f778b39e1e9eb7a4f3948bb30f019ea177c5b2ccb4372accffdc03de731e74dd | nineties/Choco | ArrayOpt.hs | -------------------------------------------------
Choco --
Chikadzume Oriented Compiler --
Copyright 2007 - 2008 by Basement fairy --
-------------------------------------------------
module ArrayOpt (
arrayOpt
) where
import Choco
import Const
i... | null | https://raw.githubusercontent.com/nineties/Choco/0081351d0b556ff74f096accb65c9ab45d29ddfe/src/ArrayOpt.hs | haskell | -----------------------------------------------
----------------------------------------------- | module ArrayOpt (
arrayOpt
) where
import Choco
import Const
import LamSyn
import Outputable
import Var
import Types
import Control.Monad.State
import qualified Data.Set as S
simplif :: Lambda -> ChocoM Lambda
simplif lam = case lam of
Lvar _ -> return lam
Llit _ -> return lam
Lapp f args p -> do
f' ... |
8bef7026be7647b996796110f086b09f0de8a3fa059a93b69d834894769a266c | mikesperber/icfp2020 | PolysemyUtil.hs | # LANGUAGE DataKinds , FlexibleContexts , GADTs , LambdaCase , PolyKinds , RankNTypes , ScopedTypeVariables , TypeApplications , TypeOperators , TypeFamilies , UnicodeSyntax #
# LANGUAGE FlexibleInstances #
# LANGUAGE MonoLocalBinds #
# LANGUAGE UndecidableInstances #
module PolysemyUtil where
import Polys... | null | https://raw.githubusercontent.com/mikesperber/icfp2020/974b8b7ca7ee8811f43398551c97c8ac7ae1cbb1/hearts/src/PolysemyUtil.hs | haskell | # LANGUAGE DataKinds , FlexibleContexts , GADTs , LambdaCase , PolyKinds , RankNTypes , ScopedTypeVariables , TypeApplications , TypeOperators , TypeFamilies , UnicodeSyntax #
# LANGUAGE FlexibleInstances #
# LANGUAGE MonoLocalBinds #
# LANGUAGE UndecidableInstances #
module PolysemyUtil where
import Polys... | |
d0a4a8feacbf67c599293e72667b63b660011520e79d530525b0f2b44941074d | xmonad/xmonad-contrib | AvoidFloats.hs | # LANGUAGE PatternGuards , FlexibleContexts , FlexibleInstances , MultiParamTypeClasses , TupleSections #
-----------------------------------------------------------------------------
-- |
Module : XMonad . Layout . AvoidFloats
-- Description : Avoid floats when placing tiled windows.
Copyright : ( c... | null | https://raw.githubusercontent.com/xmonad/xmonad-contrib/571d017b8259340971db1736eedc992a54e9022c/XMonad/Layout/AvoidFloats.hs | haskell | ---------------------------------------------------------------------------
|
Description : Avoid floats when placing tiled windows.
License : BSD3-style (see LICENSE)
Stability : unstable
Portability : unportable
Find a maximum empty rectangle around floating windows and use that area
to display non... | # LANGUAGE PatternGuards , FlexibleContexts , FlexibleInstances , MultiParamTypeClasses , TupleSections #
Module : XMonad . Layout . AvoidFloats
Copyright : ( c ) 2014 < >
Maintainer : ( c ) < >
module XMonad.Layout.AvoidFloats (
avoidFloats,
... |
9ddcd6789066ae7bf730ba765e9cc726d90c16db5b68e5b282e4dd56c25b6246 | janestreet/bonsai | util.mli | open! Core
open! Js_of_ocaml
(** [am_running_how] provides information on how the code is currently being run:
- [`Node_test] means that the code is being run using node as part of an expect_test
- [`Node_benchmark] means that the code is being run using node as part of a benchmark
- [`Node] means that the... | null | https://raw.githubusercontent.com/janestreet/bonsai/4baeedc75bf73a0915e04dc02d8a49b78779e9b0/web/util.mli | ocaml | * [am_running_how] provides information on how the code is currently being run:
- [`Node_test] means that the code is being run using node as part of an expect_test
- [`Node_benchmark] means that the code is being run using node as part of a benchmark
- [`Node] means that the code is being run using node, b... | open! Core
open! Js_of_ocaml
val am_running_how
: [ `Browser | `Browser_benchmark | `Node | `Node_benchmark | `Node_test ]
* [ am_within_disabled_fieldset ] traverses up the DOM to see whether an event occurred
within a fieldset element with the disabled attribute . As this function requires DOM
interac... |
83ad4aee06d7f650bb2bfa7943f17bad78bca8b944c1a52f75e23b30e9e13da7 | databrary/databrary | Document.hs | # LANGUAGE GeneralizedNewtypeDeriving , TemplateHaskell , OverloadedStrings #
module Solr.Document
( SolrDocument(..)
, SolrRecordMeasures(..)
, SolrSegment(..)
, metricField
) where
import qualified Data.Aeson as JSON
import qualified Data.Aeson.TH as JTH
import qualified Data.ByteString as BS
import Data.C... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Solr/Document.hs | haskell | slight hack because we actually index dates as datetimes
body
Slot
Slot
Use
force new decl group for splice: | # LANGUAGE GeneralizedNewtypeDeriving , TemplateHaskell , OverloadedStrings #
module Solr.Document
( SolrDocument(..)
, SolrRecordMeasures(..)
, SolrSegment(..)
, metricField
) where
import qualified Data.Aeson as JSON
import qualified Data.Aeson.TH as JTH
import qualified Data.ByteString as BS
import Data.C... |
07f949b34fd61809f624f90873ceefe012acfd144bf842765dd6d082f314977b | xmonad/xmonad-contrib | Spiral.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses #
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Layout.Spiral
-- Description : A spiral tiling layout.
Copyright : ( c ) < >
-- License : BSD3-style (see LICENSE)
--
Maintainer : <... | null | https://raw.githubusercontent.com/xmonad/xmonad-contrib/571d017b8259340971db1736eedc992a54e9022c/XMonad/Layout/Spiral.hs | haskell | ---------------------------------------------------------------------------
|
Module : XMonad.Layout.Spiral
Description : A spiral tiling layout.
License : BSD3-style (see LICENSE)
Stability : stable
Portability : portable
A spiral tiling layout.
-----------------------------------------------... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses #
Copyright : ( c ) < >
Maintainer : < >
module XMonad.Layout.Spiral (
spiral
, spiralWithDir
, Rotation (..)
, Direction (..)
... |
2b266d65209d378f27ba8e04bd31de0be436357b0359bb3eff5f578b67bbc97a | adnelson/nixfromnpm | Common.hs | # LANGUAGE LambdaCase #
# LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE ViewPatterns #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TypeFamilies #
module NixFromNpm.Commo... | null | https://raw.githubusercontent.com/adnelson/nixfromnpm/4ab773cdead920d2312e864857fabaf5f739a80e/src/NixFromNpm/Common.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances #
hiding (assert, )
| Indicates that the text is some identifier.
| Used to indicate something is meant for authentication.
| A record is a lookup table with string keys.
| Creates a new hashmap by applying a function to every key in it.
| Create a ha... | # LANGUAGE LambdaCase #
# LANGUAGE CPP #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE ViewPatterns #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TypeFamilies #
module NixFromNpm.Common (
module ClassyPrelude,
module Control.Applicative,
module ... |
1bf0864e0bab720ac4167e336f39c8db9cd20c38a0e33be9b1b001a20f346a20 | liqula/react-hs | TestClient.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
{-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE MagicHash #
# LANGUA... | null | https://raw.githubusercontent.com/liqula/react-hs/204c96ee3514b5ddec65378d37872266b05e8954/react-hs/test/client/TestClient.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE EmptyDataDecls #
# LANGUAGE OverloadedStrings #
log both to the console and to js_output
------------------------------------------------------------------------------
- Events
------------------------------------------------------------------------------
, logT $ focusRelatedTarge... | # LANGUAGE CPP #
# LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE FunctionalDependencies #
# LANGUAGE LambdaCase #
# LANGUAGE MagicHash #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE S... |
4c08eb554dbcaf60ab5a90d72653017d1c195acb648d8a2c8108c82d017e8296 | Beluga-lang/Beluga | session.ml | open Support
open Beluga
open Syntax.Int
module CompS = Store.Cid.Comp
module F = Fun
module P = Pretty.Int.DefaultPrinter
let dprintf, _, _ = Debug.(makeFunctions' (toFlags [15]))
open Debug.Fmt
type t =
{ theorems : Theorem.t DynArray.t
; finished_theorems: (Theorem.t * Comp.exp option) DynArray.t
; mutual_g... | null | https://raw.githubusercontent.com/Beluga-lang/Beluga/520c41534820e12a52d640f3151480e790baa17e/src/harpoon/session.ml | ocaml | * Gets the list of mutual declarations corresponding to the
currently loaded theorems in the active session.
* Constructs a list of all theorems in this session, both
incomplete and finished.
The incomplete theorems come before the complete theorems.
* Gets the next theorem from the interpreter sta... | open Support
open Beluga
open Syntax.Int
module CompS = Store.Cid.Comp
module F = Fun
module P = Pretty.Int.DefaultPrinter
let dprintf, _, _ = Debug.(makeFunctions' (toFlags [15]))
open Debug.Fmt
type t =
{ theorems : Theorem.t DynArray.t
; finished_theorems: (Theorem.t * Comp.exp option) DynArray.t
; mutual_g... |
94a011f7877cba0b67679ed8b659cf7a428d9c8eb70e761be3a9fcf06a5199eb | clojure-interop/java-jdk | SynthButtonUI.clj | (ns javax.swing.plaf.synth.SynthButtonUI
"Provides the Synth L&F UI delegate for
JButton."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.synth SynthButtonUI]))
(defn ->synth-button-ui
"Constructor."
(^SynthButtonUI []
(new SynthButtonUI )))
(defn *create-ui
"Creates a n... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/synth/SynthButtonUI.clj | clojure | (ns javax.swing.plaf.synth.SynthButtonUI
"Provides the Synth L&F UI delegate for
JButton."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.synth SynthButtonUI]))
(defn ->synth-button-ui
"Constructor."
(^SynthButtonUI []
(new SynthButtonUI )))
(defn *create-ui
"Creates a n... | |
b3845fa73401a645150277d5d8f75b2790571e29d35293ae82f9f18cc0bacbe7 | blajzer/dib | CDepScanner.hs | # LANGUAGE GeneralizedNewtypeDeriving , ExistentialQuantification , KindSignatures , FlexibleContexts #
Copyright ( c ) 2010 - 2018
-- See LICENSE for license information.
-- | C dependency scanner. Runs a stripped-down pre-processor to scan for
-- include files (recursively).
module Dib.Scanners.CDepScanner (
c... | null | https://raw.githubusercontent.com/blajzer/dib/750253c972668bb0d849239f94b96050bae74f2a/src/Dib/Scanners/CDepScanner.hs | haskell | See LICENSE for license information.
| C dependency scanner. Runs a stripped-down pre-processor to scan for
include files (recursively).
already read includes, list of include paths
intial pass, removes comments and leading whitespace, then filters out extra lines
side. | # LANGUAGE GeneralizedNewtypeDeriving , ExistentialQuantification , KindSignatures , FlexibleContexts #
Copyright ( c ) 2010 - 2018
module Dib.Scanners.CDepScanner (
cDepScanner
) where
import Dib.Types
import qualified Data.List as L
import qualified Data.Set as S
import qualified Data.Text as T
import quali... |
cf0951a2e102a3fb7abbcb5f235f27c3945dc0cbc258e846b0e3191566489666 | msp-strath/TypOS | Pretty.hs | {-|
Description: The internals of pretty-printing.
-}
{-# LANGUAGE OverloadedStrings #-}
module Pretty
( module Text.PrettyPrint.Compact
, module Doc.Annotations
, Pretty(..)
, Collapse(..)
, BracesList(..)
, asBlock
, indent
, keyword
, escape
, parenthesise
, pipe
) where
import Data.Void (Vo... | null | https://raw.githubusercontent.com/msp-strath/TypOS/f5345779b886eeadc8bd9d84b33cf9bf0bfba244/Src/Pretty.hs | haskell | |
Description: The internals of pretty-printing.
# LANGUAGE OverloadedStrings #
will be re-exported?
will be re-exported from here
| Class Pretty lets us declare what things are (nicely) printable.
| Indent by 'n' spaces
| asBlock n header lines
| @ n the indentation for the block's line
| @ header the t... | module Pretty
( module Text.PrettyPrint.Compact
, module Doc.Annotations
, Pretty(..)
, Collapse(..)
, BracesList(..)
, asBlock
, indent
, keyword
, escape
, parenthesise
, pipe
) where
import Data.Void (Void, absurd)
import ANSI hiding (withANSI)
import Bwd (Bwd(..),Cursor(..),(<>>))
class P... |
f010b9350f3715277b77687b2ac4389141e64a1b9e56612eab9c80543433676a | BillHallahan/G2 | KnownValues.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
We define a datatype to hol the names of other data types we know should
-- exist, and that we care about for some special reason
( for example : the type )
Try to avoid imports from G2 other than G2.Internal . Language . Syntax here !
module G2.Lan... | null | https://raw.githubusercontent.com/BillHallahan/G2/90c1f07c167d8b20dd4c591b138b8a427be559e3/src/G2/Language/KnownValues.hs | haskell | # LANGUAGE DeriveDataTypeable #
exist, and that we care about for some special reason | # LANGUAGE DeriveGeneric #
We define a datatype to hol the names of other data types we know should
( for example : the type )
Try to avoid imports from G2 other than G2.Internal . Language . Syntax here !
module G2.Language.KnownValues where
import G2.Language.Syntax
import Data.Data (Data, Typeable)
import D... |
d131d52b2207d279411483f6144f4035e12acdb25f2638d596fd6c1ba6c2c2b8 | cse-bristol/110-thermos-ui | monitoring.clj | This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021
Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details .
(ns thermos-backend.monitoring
"Some http endpoints for monitoring THERMOS using prometheus"
(:require [clojure.string :as string]
... | null | https://raw.githubusercontent.com/cse-bristol/110-thermos-ui/c6ae2781ac10df1d02e0d7589ba0f8148ebbe48b/src/thermos_backend/monitoring.clj | clojure | we want to know how old the oldest unfinished task is | This file is part of THERMOS , copyright © Centre for Sustainable Energy , 2017 - 2021
Licensed under the Reciprocal Public License v1.5 . See LICENSE for licensing details .
(ns thermos-backend.monitoring
"Some http endpoints for monitoring THERMOS using prometheus"
(:require [clojure.string :as string]
... |
d90cc3f3f615842b960eb42ae1dee7309a3ab85b94361abfe1f9e77d5e0417ac | haskell/hackage-server | State.hs | # LANGUAGE TemplateHaskell , StandaloneDeriving , GeneralizedNewtypeDeriving ,
DeriveDataTypeable , TypeFamilies , FlexibleInstances ,
MultiParamTypeClasses , BangPatterns #
DeriveDataTypeable, TypeFamilies, FlexibleInstances,
MultiParamTypeClasses, BangPatterns #... | null | https://raw.githubusercontent.com/haskell/hackage-server/8ec64a1a30b6d53e4e86235c50e398ec803f50f1/src/Distribution/Server/Features/DownloadCount/State.hs | haskell | -----------------------------------------------------------------------------
Data types
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Initial instances
-----------------------------------------------------... | # LANGUAGE TemplateHaskell , StandaloneDeriving , GeneralizedNewtypeDeriving ,
DeriveDataTypeable , TypeFamilies , FlexibleInstances ,
MultiParamTypeClasses , BangPatterns #
DeriveDataTypeable, TypeFamilies, FlexibleInstances,
MultiParamTypeClasses, BangPatterns #... |
34433f31df1fb042704b26e4af50fcd34a7483bdf3b9db563c97eb76323a260d | rescript-lang/rescript-compiler | belt_MapDict.mli | Copyright ( C ) 2017 Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version .... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/c3fcc430360079546a6aabd2b2770303480f8486/jscomp/others/belt_MapDict.mli | ocaml | * This module separates identity from data, it is a bit more verbose but
slightly more efficient due to the fact that there is no need to pack
identity and data back after each operation.
**_Advanced usage only_**
```res prelude
type t<'key, 'value, 'id>
type cmp<'key, 'id> = Belt_Id.cmp<'key, '... | Copyright ( C ) 2017 Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later version .... |
3023c9eceb7790ec077e67ad3de94b9fa4f37ce0889254d58971cba0d8b2d7fa | saltlang/saltlang | Monad.hs | Copyright ( c ) 2015 . All rights reserved .
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
--
1 . Redistributions of source code must retain the above copyright
-- notice, this list of conditions and ... | null | https://raw.githubusercontent.com/saltlang/saltlang/f3478904139f19373f23824f25d28e8be745dc60/test/library/Tests/Control/Monad.hs | haskell |
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
documentation and/or other ma... | Copyright ( c ) 2015 . All rights reserved .
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of the author nor the names of any contributors
THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTO... |
bb00a3d89c4c9cfbf99d526fecf400a907bb4caa5cdeb33ecafd7d6f70310b03 | mogenslund/liquid | tty_output.cljc | (ns liq.tty-output
(:require [liq.buffer :as buffer]
#?(:clj [clojure.java.io :as io])
#?(:clj [clojure.java.shell :as shell])
[liq.tty-shared :as shared]
; :cljs [lumo.io :as io]
[clojure.string :as str]))
(def settings (atom {::cursor-dra... | null | https://raw.githubusercontent.com/mogenslund/liquid/bc90dcf83a30c3b7a4ad50a1c5d440a86a0f999f/src/liq/tty_output.cljc | clojure | :cljs [lumo.io :as io]
cursor-draw-hack draws a block when cursors moves to avoid flicker
Kanji
Kanji Radicals
Symbols and Punctuation
Window top margin
Window left margin
Window rows
Window cols
Top of window
To make it look like the cursor is still there while drawing.
Hide cursor
Looping over the rows a... | (ns liq.tty-output
(:require [liq.buffer :as buffer]
#?(:clj [clojure.java.io :as io])
#?(:clj [clojure.java.shell :as shell])
[liq.tty-shared :as shared]
[clojure.string :as str]))
(def ^:private last-buffer (atom nil))
(def esc "\033[")
(defn rows
... |
a05417548b25bad4dba5405c1c8560440fa379679096c9789f61470a6086b023 | haskell-opengl/OpenGLRaw | SemaphoreFd.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.EXT.SemaphoreFd
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
--------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/EXT/SemaphoreFd.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.EXT.SemaphoreFd
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums
* Functions | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.EXT.SemaphoreFd (
glGetEXTSemaphoreFd,
gl_EXT_semaphore_fd,
pattern GL_HANDLE_TYPE_OPAQUE_FD_EXT,
glImportSemaphoreFdEXT
) where
import Graphics.GL.ExtensionPredicates
import Graphics.GL.Tokens
import Gra... |
8d3c6c9285883437c0ff36008ffa83d86ab0f8d426ac38118aa28393d66fb785 | Clozure/ccl-tests | oneminus.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Mon Sep 1 20:14:34 2003
;;;; Contains: Tests of 1-
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
;;; Error tests
(deftest 1-.error.1
(signals-error (1-) program-error)
t)
(deftest 1-.error.2
(signals-error (1- 0 0) program-error)
t)
(def... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/oneminus.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of 1-
Error tests
Non-error tests
Complex numbers | Author :
Created : Mon Sep 1 20:14:34 2003
(in-package :cl-test)
(compile-and-load "numbers-aux.lsp")
(deftest 1-.error.1
(signals-error (1-) program-error)
t)
(deftest 1-.error.2
(signals-error (1- 0 0) program-error)
t)
(deftest 1-.error.3
(signals-error (1- 0 nil nil) program-error)
t)... |
77e9f27e01b56d08aeafec64579a1d4c621881ff3cbf05f39aebc96a2c6cefe6 | pjones/playlists | PLSSpec.hs |
This file is part of the package playlists . It is subject to
the license terms in the LICENSE file found in the top - level directory
of this distribution and at git . No part
of playlists package , including this file , may be copied , modified ,
propagated , or distributed except according to the terms c... | null | https://raw.githubusercontent.com/pjones/playlists/35e4a91e599eac4a1c6f24500d120692e709fd1f/test/PLSSpec.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
----... |
This file is part of the package playlists . It is subject to
the license terms in the LICENSE file found in the top - level directory
of this distribution and at git . No part
of playlists package , including this file , may be copied , modified ,
propagated , or distributed except according to the terms c... |
4bc09fb638d9986a553db5edf3200d59baaec15d40229179ec73cbf0c8044155 | erlang/erlide_kernel | ttb_integration.erl | Author :
Created : Jul 29 , 2010
-module(ttb_integration).
%%
%% Exported Functions
%%
-export([start/3, stop/0, load/3, load_data/3, get_file_info/1, str2ms/1]).
start(NodesAndCookies, FileName, NetTicktime)->
ttbe:stop(),
net_kernel:set_net_ticktime(NetTicktime),
Nodes = set_cookies(NodesAndCookies),
tt... | null | https://raw.githubusercontent.com/erlang/erlide_kernel/763a7fe47213f374b59862fd5a17d5dcc2811c7b/common/apps/erlide_tools/src/ttb_integration.erl | erlang |
Exported Functions
| Author :
Created : Jul 29 , 2010
-module(ttb_integration).
-export([start/3, stop/0, load/3, load_data/3, get_file_info/1, str2ms/1]).
start(NodesAndCookies, FileName, NetTicktime)->
ttbe:stop(),
net_kernel:set_net_ticktime(NetTicktime),
Nodes = set_cookies(NodesAndCookies),
ttbe:tracer(Nodes, [{file,{loc... |
890d4c8d5599291a1a0b06f1e5215cb5e9b95c2ccc05f97b4cc2cdfa68a1c08f | suttonshire/ocaml-xsk | xsk.ml | type buffer = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
module Desc = struct
type t =
{ mutable addr : int
; mutable len : int
; mutable options : int
}
let create () = { addr = 0; len = 0; options = 0 }
end
exception Xsk_C_Failure of int
let _ = Callback.register_e... | null | https://raw.githubusercontent.com/suttonshire/ocaml-xsk/3b0de5e3ea92f3f6fb1856a429ae39c2dbd01490/src/xsk.ml | ocaml | src/libbpf_c/libbpf/include/uapi/linux/if_xdp.h
src/libbpf_c/libbpf/include/uapi/linux/if_link.h
src/libbpf_c/libbpf/src/xsk.h
src/libbpf_c/libbpf/include/uapi/linux/if_xdp.h | type buffer = (char, Bigarray.int8_unsigned_elt, Bigarray.c_layout) Bigarray.Array1.t
module Desc = struct
type t =
{ mutable addr : int
; mutable len : int
; mutable options : int
}
let create () = { addr = 0; len = 0; options = 0 }
end
exception Xsk_C_Failure of int
let _ = Callback.register_e... |
7292f7570bc725cddb15bef43ed34cbd0d03dfa02665d2301b4cf0919b9b6bf5 | jesperes/aoc_erlang | aoc2015_day12.erl | -module(aoc2015_day12).
-behavior(aoc_puzzle).
-export([parse/1, solve1/1, solve2/1, info/0]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2015,
day = 12,
name = "JSAbacusFramework.io",
e... | null | https://raw.githubusercontent.com/jesperes/aoc_erlang/ec0786088fb9ab886ee57e17ea0149ba3e91810a/src/2015/aoc2015_day12.erl | erlang | -module(aoc2015_day12).
-behavior(aoc_puzzle).
-export([parse/1, solve1/1, solve2/1, info/0]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{module = ?MODULE,
year = 2015,
day = 12,
name = "JSAbacusFramework.io",
e... | |
da2338fd44ee9150d9c1cd7ed3febf79521731283f34cff121cc195423367cd8 | janestreet/core | comparable_intf.ml | open! Import
module type Infix = Base.Comparable.Infix
module type Comparisons = Base.Comparable.Comparisons
module type With_compare = Base.Comparable.With_compare
module type Validate = sig
type t
val validate_lbound : min:t Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Maybe_bound.t -> t Val... | null | https://raw.githubusercontent.com/janestreet/core/f382131ccdcb4a8cd21ebf9a49fa42dcf8183de6/core/src/comparable_intf.ml | ocaml | * Inherit comparability from a component.
* The following module types and functors may be used to define stable modules: | open! Import
module type Infix = Base.Comparable.Infix
module type Comparisons = Base.Comparable.Comparisons
module type With_compare = Base.Comparable.With_compare
module type Validate = sig
type t
val validate_lbound : min:t Maybe_bound.t -> t Validate.check
val validate_ubound : max:t Maybe_bound.t -> t Val... |
322d357d19c9cdf623f703110fb12da7025ddd208a781d30df4f6d00f86ad70c | grin-compiler/ghc-wpc-sample-programs | Image.hs | {-# LANGUAGE OverloadedStrings, ScopedTypeVariables, CPP #-}
{-# LANGUAGE ViewPatterns #-}
|
Module : Text . Pandoc . Image
Copyright : Copyright ( C ) 2020
License : GNU GPL , version 2 or above
Maintainer : < >
Stability : alpha
Portability : portable
Functions for conve... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/pandoc-11df2a3c0f2b1b8e351ad8caaa7cdf583e1b3b2e/src/Text/Pandoc/Image.hs | haskell | # LANGUAGE OverloadedStrings, ScopedTypeVariables, CPP #
# LANGUAGE ViewPatterns #
| Convert svg image to png. rsvg-convert
is used and must be available on the path.
^ Input image as bytestring | |
Module : Text . Pandoc . Image
Copyright : Copyright ( C ) 2020
License : GNU GPL , version 2 or above
Maintainer : < >
Stability : alpha
Portability : portable
Functions for converting images .
Module : Text.Pandoc.Image
Copyright : Copyright (C) 2020 John MacFarlan... |
015251b2448ec42f995857274963bab3736f8f9b3eb22eb3a4d95e72ed43d125 | srid/emanote.obelisk | Pipeline.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE TypeApplications #
module Emanote.Pipeline (run, runNoMonitor) where
import qualified Algebra.Graph.Labelled.AdjacencyMap as AM
import qualified Algebra.Graph.Labelled.AdjacencyMap.Patch as G
import qualified Commonmark.Syntax as CM
import Data.Conflict (Conflict (..))
import qualifi... | null | https://raw.githubusercontent.com/srid/emanote.obelisk/de935cff82fc57085adef1904094c7129c02d995/lib/emanote/src/Emanote/Pipeline.hs | haskell | # LANGUAGE GADTs #
| Like `run`, but stops observing for file changes after the initial read
TODO: Deal with directory events sensibly, instead of ignoring them.
| How to flatten the file path.
Include monthDiff here, so as to 'lift' those ghost month zettels further.
target. | # LANGUAGE TypeApplications #
module Emanote.Pipeline (run, runNoMonitor) where
import qualified Algebra.Graph.Labelled.AdjacencyMap as AM
import qualified Algebra.Graph.Labelled.AdjacencyMap.Patch as G
import qualified Commonmark.Syntax as CM
import Data.Conflict (Conflict (..))
import qualified Data.Conflict as Con... |
ee7435a0fb4cee49cf32bc0d5e66559ea4a12f292fb49d2b19b38992fe7a3c5f | clj-kafka/franzy | deserializers.clj | (ns franzy.serialization.fressian.deserializers
(:require [clojure.data.fressian :as fressian])
(:import (org.apache.kafka.common.serialization Deserializer)))
(deftype FressianDeserializer [opts]
Deserializer
(configure [_ _ _])
(deserialize [_ _ data]
(when data
(with-open [bais (clojure.java.io/... | null | https://raw.githubusercontent.com/clj-kafka/franzy/6c2e2e65ad137d2bcbc04ff6e671f97ea8c0e380/fressian/src/franzy/serialization/fressian/deserializers.clj | clojure | (ns franzy.serialization.fressian.deserializers
(:require [clojure.data.fressian :as fressian])
(:import (org.apache.kafka.common.serialization Deserializer)))
(deftype FressianDeserializer [opts]
Deserializer
(configure [_ _ _])
(deserialize [_ _ data]
(when data
(with-open [bais (clojure.java.io/... | |
242c5fd9c12915fc63d2dfee6eed78debd0351f673e23b239f4f84c2e63bf3c9 | ceramic/ceramic | ql-patch.lisp | ;;;; Okay, so. So libraries use the sharpsign plus/minus macros to determine
whether Quicklisp is in the environment , and decide whether to use
;;;; `ql:quickload` or `asdf:load-system` to load a library. Libraries are
;;;; compiled with :quicklisp in *features* into fasl files. Then, when
;;;; compiling a Ceramic a... | null | https://raw.githubusercontent.com/ceramic/ceramic/5d81e2bd954440a6adebde31fac9c730a698c74b/src/ql-patch.lisp | lisp | Okay, so. So libraries use the sharpsign plus/minus macros to determine
`ql:quickload` or `asdf:load-system` to load a library. Libraries are
compiled with :quicklisp in *features* into fasl files. Then, when
compiling a Ceramic app, it loads those.
Then it fails with "package `quicklisp-client` not found". Why c... | whether Quicklisp is in the environment , and decide whether to use
what we do here is , we define the Quicklisp package and ` quickload ` to do
(defpackage quicklisp-client
(:use :cl)
(:nicknames :ql)
(:export :quickload)
(:documentation "Quicklisp look-alike fake package."))
(in-package :quicklisp-client... |
e37fdc987ff30f5c6cdabbc3b2d7b93cfe96c92ad858aa042cf5aa7bd22897de | yogthos/components-example | dev_middleware.clj | (ns components-example.dev-middleware
(:require [ring.middleware.reload :refer [wrap-reload]]
[selmer.middleware :refer [wrap-error-page]]
[prone.middleware :refer [wrap-exceptions]]))
(defn wrap-dev [handler]
(-> handler
wrap-reload
wrap-error-page
wrap-exceptions))
| null | https://raw.githubusercontent.com/yogthos/components-example/c369bde7916b6d15cb6a8b4ab05c562e16755b2a/env/dev/clj/components_example/dev_middleware.clj | clojure | (ns components-example.dev-middleware
(:require [ring.middleware.reload :refer [wrap-reload]]
[selmer.middleware :refer [wrap-error-page]]
[prone.middleware :refer [wrap-exceptions]]))
(defn wrap-dev [handler]
(-> handler
wrap-reload
wrap-error-page
wrap-exceptions))
| |
a1200bd201019748c522c43b48ccea8473a7db8c1640887f6777b87f704c4fb1 | exercism/erlang | example.erl | -module(example).
-export([rebase/3]).
rebase(_Input, SrcBase, _DstBase) when SrcBase < 2 ->
{error, "input base must be >= 2"};
rebase(_Input, _SrcBase, DstBase) when DstBase < 2 ->
{error, "output base must be >= 2"};
rebase(Input, SrcBase, DstBase) ->
case lists:any(fun (D) -> D<0 orelse D>=SrcBase end,... | null | https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/all-your-base/.meta/example.erl | erlang | -module(example).
-export([rebase/3]).
rebase(_Input, SrcBase, _DstBase) when SrcBase < 2 ->
{error, "input base must be >= 2"};
rebase(_Input, _SrcBase, DstBase) when DstBase < 2 ->
{error, "output base must be >= 2"};
rebase(Input, SrcBase, DstBase) ->
case lists:any(fun (D) -> D<0 orelse D>=SrcBase end,... | |
d364468176344aaaa237052d624c9e88627b0bfadb1b8918ec412bccf124d596 | iu-parfunc/haskell_dsl_tour | Parser.hs | Copyright 2008 < >
Portions of this were derived from haskell
tutorial " Write yourself a scheme in 48 hours " and are thus
Copyright ( but there is n't much of his stuff left ) .
This file is part of haskeem .
haskeem is free software ; you can redistribute it and/or modify
it under the terms of... | null | https://raw.githubusercontent.com/iu-parfunc/haskell_dsl_tour/f75a7e492a1e5d219a77fb128f70441d54a706eb/middle_end/nanopass/course_example/FrameworkHs/SExpReader/Parser.hs | haskell | "#!/some/path/to/executable" at the top of the file, to enable
scheme "shell" scripts: for the rest of the program, it's a comment
semicolon to end-of-line, the oldest style of lisp comment
This is not quite R6RS-compliant: R6RS allows '.'
This is a small extension to R6RS
This is not quite R6RS-compliant: R6RS r... | Copyright 2008 < >
Portions of this were derived from haskell
tutorial " Write yourself a scheme in 48 hours " and are thus
Copyright ( but there is n't much of his stuff left ) .
This file is part of haskeem .
haskeem is free software ; you can redistribute it and/or modify
it under the terms of... |
4ae63423217487315b194b53aee92520fbda37b2b00de153d62dd6cfc3dbfe2d | jeffshrager/biobike | package.lisp | ;;; -*- mode: Lisp; Syntax: Common-Lisp; Package: user; -*-
(in-package :cl-user)
;;; +=========================================================================+
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
;;; | |
;;; | Permission is... | null | https://raw.githubusercontent.com/jeffshrager/biobike/5313ec1fe8e82c21430d645e848ecc0386436f57/BioLisp/Webdefs/package.lisp | lisp | -*- mode: Lisp; Syntax: Common-Lisp; Package: user; -*-
+=========================================================================+
| |
| Permission is hereby granted, free of charge, to any person obtaining |
| a copy of this software and a... |
(in-package :cl-user)
| Copyright ( c ) 2002 , 2003 , 2004 JP , , |
| " Software " ) , to deal in the Software without restriction , including |
| distribute , sublicense , and/or sell copies of the Software , and to |
| permit persons to whom the Software is furnished to do so , subject t... |
68a564de130a70b9255fbce193197604b032ca66858f1e7f8152eb1568544e08 | mpickering/apply-refact | Structure17.hs | {-# LANGUAGE BangPatterns #-}
foo = case v of !True -> x
| null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Structure17.hs | haskell | # LANGUAGE BangPatterns # | foo = case v of !True -> x
|
d09514b918eef6fa26eb8179aec0eccc9652f1f2cbca682e3a6e374c361cb4d8 | stefanrusek/spdy_proxy | http_proxy.erl | -module(http_proxy).
-include("deps/espdy/include/espdy.hrl").
-export([preprocess_opts/1]).
-export([init/3, closed/2, headers_updated/3, handle_data/2, handle_info/2]). %% API
-define(HOST_RE, "(:\\d+)?$").
preprocess_opts(Opts) ->
[{http_proxy_host_re, re:compile(?HOST_RE)} | Opts].
header name for spdy vers... | null | https://raw.githubusercontent.com/stefanrusek/spdy_proxy/86eb796a7e48df5a2d56fdcae0eaa827b6440056/src/http_proxy.erl | erlang | API
Called when a HEADERS frame updated the headers
Called when we recieve a DATA frame | -module(http_proxy).
-include("deps/espdy/include/espdy.hrl").
-export([preprocess_opts/1]).
-define(HOST_RE, "(:\\d+)?$").
preprocess_opts(Opts) ->
[{http_proxy_host_re, re:compile(?HOST_RE)} | Opts].
header name for spdy version
host(_Version = 2, Headers) -> proplists:get_value(<<"host">>, Headers);
host(_Ve... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.