_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 |
|---|---|---|---|---|---|---|---|---|
696274d182796ec52a927c66440ebad306634b7a207afdd4ed230e6963e2150e | twosigma/waiter | instability_test.clj | ;;
Copyright ( c ) Two Sigma Open Source , LLC
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software... | null | https://raw.githubusercontent.com/twosigma/waiter/8d3cdaed90078c188095ae1e65714edc72f9122c/waiter/integration/waiter/instability_test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permi... | Copyright ( c ) Two Sigma Open Source , LLC
distributed under the License is distributed on an " AS IS " BASIS ,
(ns waiter.instability-test
(:require [clojure.test :refer :all]
[waiter.status-codes :refer :all]
[waiter.util.client-tools :refer :all]))
(deftest ^:parallel ^:integration-fa... |
46eb4221637c55966e148ea54f82cba52ef9f82e2827a876104337b2c82c751a | babashka/obb | gui.cljs | #!/usr/bin/env obb
(.import js/ObjC "Cocoa")
(doto (js/$.NSWindow.alloc.initWithContentRectStyleMaskBackingDefer
(js/$.NSMakeRect 0 0 200 200)
(bit-or js/$.NSTitledWindowMask
js/$.NSClosableWindowMask
js/$.NSResizableWindowMask
js/$.NSMiniaturizableWindowMask... | null | https://raw.githubusercontent.com/babashka/obb/25f93782216fdb91049bec852374343ea2f88abe/examples/gui.cljs | clojure | #!/usr/bin/env obb
(.import js/ObjC "Cocoa")
(doto (js/$.NSWindow.alloc.initWithContentRectStyleMaskBackingDefer
(js/$.NSMakeRect 0 0 200 200)
(bit-or js/$.NSTitledWindowMask
js/$.NSClosableWindowMask
js/$.NSResizableWindowMask
js/$.NSMiniaturizableWindowMask... | |
be19480b17792c9442cca3fb1b19727b118b27b4f4298d45165f2e775865a35a | appleshan/cl-http | lambda-ir-22-3.lisp | -*- Mode : LISP ; Syntax : ansi - common - lisp ; Package : USER ; Base : 10 ; Patch - File : T -*-
Patch file for LAMBDA - IR version 22.3
;;; Reason: Function (CLOS:METHOD LR::DOCUMENT-MASK-FROM-LOGICAL-SEARCH (LR:DOCUMENT-CONTEXT LR::SEARCH-CONSTRAINT T)): new bit-vector oriented text search.
Written by JCMa ... | null | https://raw.githubusercontent.com/appleshan/cl-http/a7ec6bf51e260e9bb69d8e180a103daf49aa0ac2/lispm/lambda-ir/patch/lambda-ir-22/lambda-ir-22-3.lisp | lisp | Syntax : ansi - common - lisp ; Package : USER ; Base : 10 ; Patch - File : T -*-
Reason: Function (CLOS:METHOD LR::DOCUMENT-MASK-FROM-LOGICAL-SEARCH (LR:DOCUMENT-CONTEXT LR::SEARCH-CONSTRAINT T)): new bit-vector oriented text search.
Local flavor function patch (from EOP:LOCAL-PATCHES;GENERA;8-5;8-5-GENERA-LOCAL-P... | Patch file for LAMBDA - IR version 22.3
Written by JCMa , 9/24/1999 03:08:33
while running on Publications Y2 K Testbed from HOST6:/usr / lib / symbolics / eop - pub6 - no - subs-19990923.vlod
with Open Genera 2.0 , Genera 8.5 , Logical Pathnames Translation Files NEWEST ,
Lock Simple 437.0 , Version Control ... |
b70013c0cce7737b8f3b1bf48f01eb8bf1eea478fa1a919f36975d1e5d065789 | kmi/irs | load.lisp | Mode : Lisp ; Package :
File created in WebOnto
(in-package "OCML")
(def-ontology wsmo
:type :domain
:files ("wsmo" "irs" "orchestration" "utilities" "new")
:author "john" :allowed-editors ("liliana" "farshad" "enrico"))
| null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/wsmo/load.lisp | lisp | Package : |
File created in WebOnto
(in-package "OCML")
(def-ontology wsmo
:type :domain
:files ("wsmo" "irs" "orchestration" "utilities" "new")
:author "john" :allowed-editors ("liliana" "farshad" "enrico"))
|
754a7366c9867752579602bd15dcb579b4ea548ecf1a0967491a02ff80bb8e41 | racket/gui | messagebox.rkt | #lang racket/base
(require racket/class
racket/string
racket/snip/private/style
racket/draw
(prefix-in wx: "kernel.rkt")
"const.rkt"
"check.rkt"
"helper.rkt"
"editor.rkt"
"mrtop.rkt"
"mrcanvas.rkt"
"mrpopup.rkt"
... | null | https://raw.githubusercontent.com/racket/gui/23cd8c9fef328abdfbbf1a8d4390a41ba20a1280/gui-lib/mred/private/messagebox.rkt | racket | In the right thread:
Not in the right thread:
to get panel's centering
Match text-panel margin based on `single?` and `check?`.
Try without scrollbar
Check whether it actually fits
Didn't fit; try again with a scrollbar | #lang racket/base
(require racket/class
racket/string
racket/snip/private/style
racket/draw
(prefix-in wx: "kernel.rkt")
"const.rkt"
"check.rkt"
"helper.rkt"
"editor.rkt"
"mrtop.rkt"
"mrcanvas.rkt"
"mrpopup.rkt"
... |
9babdfb673bd412eabd8896fd62ff504b81f7997608853e2c6fc0dc2ce16048b | Lovesan/doors | rectangles.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
Copyright ( C ) 2010 - 2011 , < >
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;; restriction, including without lim... | null | https://raw.githubusercontent.com/Lovesan/doors/12a2fe2fd8d6c42ae314bd6d02a1d2332f12499e/gdi/rectangles.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
furnished to do... |
Copyright ( C ) 2010 - 2011 , < >
files ( the " Software " ) , to deal in the Software without
of the Software , and to permit persons to whom the Software is
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-packag... |
67452f92c7d87308a20743e05229857cebee7ba2f693c578e2ba1f7b30507910 | openvstorage/alba | kinetic_client_test.ml |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Lwt.Infix
open Slice
open Kinetic_client
open Osd
open Checksum
let te... | null | https://raw.githubusercontent.com/openvstorage/alba/459bd459335138d6b282d332fcff53a1b4300c29/ocaml/src/kinetic_client_test.ml | ocaml | clean up, delete
only update if No value was there
only opdate if value matches |
Copyright ( C ) iNuron -
This file is part of Open vStorage . For license information , see < LICENSE.txt >
Copyright (C) iNuron -
This file is part of Open vStorage. For license information, see <LICENSE.txt>
*)
open! Prelude
open Lwt.Infix
open Slice
open Kinetic_client
open Osd
open Checksum
let te... |
3c3bd7e0ad08570bf983661408eb9919b4302e2f45cc3f678006fdbc663be90a | ghcjs/jsaddle-dom | IDBRequest.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.IDBRequest
(getResult, getResultUnsafe, getResultUnchecked, getError,
getErrorUnsafe, getErrorUnchecked, ge... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/IDBRequest.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #
| <-US/docs/Web/API/IDBRequest.readyState Mozilla IDBRequest.readyState documentation> | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.IDBRequest
(getResult, getResultUnsafe, getResultUnchecked, getError,
getErrorUnsafe, getErrorUnchecked, getSource, getSourceUnsafe,
getSourceUnchecked, getTransaction, getReadyState, success, error... |
957b711e7d3fb19092528f3977ce68e0cd0eba374aa8f590ac2cd77d21e8adfe | satori-com/mzbench | bad_loop_rate.erl | Ramp from 30 to 150 rps using 3 workers
[
{pool, [{size, 3},
{worker_type, dummy_worker}],
[]},
{pool, [{size, 3},
{worker_type, dummy_worker}],
[{loop, [{time, {100, ms}}, {rate, zomg_fast}], []}]}
]. | null | https://raw.githubusercontent.com/satori-com/mzbench/02be2684655cde94d537c322bb0611e258ae9718/acceptance_tests/invalid_scripts/bad_loop_rate.erl | erlang | Ramp from 30 to 150 rps using 3 workers
[
{pool, [{size, 3},
{worker_type, dummy_worker}],
[]},
{pool, [{size, 3},
{worker_type, dummy_worker}],
[{loop, [{time, {100, ms}}, {rate, zomg_fast}], []}]}
]. | |
8b082070569b5233ac2d69f6577256c7790a125977fe2eb30333d5b9d6709dbd | fragnix/fragnix | Data.Text.Encoding.hs | # LANGUAGE Haskell98 #
# LINE 1 " Data / Text / Encoding.hs " #
# LANGUAGE BangPatterns , CPP , ForeignFunctionInterface , , MagicHash ,
UnliftedFFITypes #
UnliftedFFITypes #-}
# LANGUAGE Trustworthy #
-- |
-- Module : Data.Text.Encoding
... | null | https://raw.githubusercontent.com/fragnix/fragnix/b9969e9c6366e2917a782f3ac4e77cce0835448b/tests/packages/scotty/Data.Text.Encoding.hs | haskell | |
Module : Data.Text.Encoding
License : BSD-style
Maintainer :
Stability : experimental
Portability : portable
using several standard encodings.
To gain access to a much larger family of encodings, use the
$strict
** Controllable error handling
** Stream oriented decoding
$stream
$strict
... | # LANGUAGE Haskell98 #
# LINE 1 " Data / Text / Encoding.hs " #
# LANGUAGE BangPatterns , CPP , ForeignFunctionInterface , , MagicHash ,
UnliftedFFITypes #
UnliftedFFITypes #-}
# LANGUAGE Trustworthy #
Copyright : ( c ) 2009 , 2010 , 2011 ... |
f101582c3e4ed7a443ef42ebd90aeadb2e9f8946aa9b68285b6667efeec2dc1b | TrustInSoft/tis-interpreter | locals_scoping.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/value/domains/cvalue/locals_scoping.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
1d8c50da7c8bb4cddaa9e2e327a0452888d101ccee1ea141e7d5eab99140c557 | jkk/clojuresphere | project_model.clj | (ns clojuresphere.project-model
(:use [clojuresphere.util :only [read-resource]])
(:import [org.apache.maven.artifact.versioning DefaultArtifactVersion])
(:require [clojure.java.io :as io]
[sundry.io :as sio]
[clj-http.client :as http]))
;; we don't need no stinkin database
(def graph-ur... | null | https://raw.githubusercontent.com/jkk/clojuresphere/a2b53ed2d9d37d194df3827b64665b3afd1873d2/src/clojuresphere/project_model.clj | clojure | we don't need no stinkin database
penalize projects using old clojure, small bonus for cutting-edge
| (ns clojuresphere.project-model
(:use [clojuresphere.util :only [read-resource]])
(:import [org.apache.maven.artifact.versioning DefaultArtifactVersion])
(:require [clojure.java.io :as io]
[sundry.io :as sio]
[clj-http.client :as http]))
(def graph-url "")
(let [[g lu] (if-let [res (io/... |
6497e230582f3b2a9f91c5f302458d7042547f32ba6bc579c46aae9b9ab84f57 | danr/hipspec | Simple.hs | # LANGUAGE DeriveFunctor , , , ScopedTypeVariables , ViewPatterns #
# LANGUAGE ExplicitForAll , FlexibleInstances , TemplateHaskell , MultiParamTypeClasses #
| The Simple expression language , a subset of GHC Core
--
-- It is Simple because it lacks lambdas, let and only allows a cascade of
-- cases at the top leve... | null | https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/src/HipSpec/Lang/Simple.hs | haskell |
It is Simple because it lacks lambdas, let and only allows a cascade of
cases at the top level.
language. It is unclear how this could be remedied.
Patterns are resued from the rich language
# ANN module "HLint: ignore Use camelCase" #
| Function definition,
There are no lambdas so the arguments to the functi... | # LANGUAGE DeriveFunctor , , , ScopedTypeVariables , ViewPatterns #
# LANGUAGE ExplicitForAll , FlexibleInstances , TemplateHaskell , MultiParamTypeClasses #
| The Simple expression language , a subset of GHC Core
There is some code duplication between this and the
module HipSpec.Lang.Simple
( Function(..)
... |
d2b9c13ce7fc7690bee3ae463711ff9dcf5ef82826203e3c401de6fc7df90672 | xh4/web-toolkit | vector.lisp | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
(in-package :split-sequence)
(declaim (inline
split-vector split-vector-if split-vector-if-not
split-vector-from-end split-vector-from-start))
(deftype array-index (&optional (length array-dimension-limit))
`(integer 0 (,length)))
(declaim (ftype ... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/split-sequence-v2.0.0/vector.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*- |
(in-package :split-sequence)
(declaim (inline
split-vector split-vector-if split-vector-if-not
split-vector-from-end split-vector-from-start))
(deftype array-index (&optional (length array-dimension-limit))
`(integer 0 (,length)))
(declaim (ftype (function (&rest t) (values list unsigned-byte)... |
93744bbb5e35dda7d8f9740e429643aeeed6a2b055b52e03402a876c24f4d344 | aaltodsg/instans | make-executable.lisp | (require (quote sb-bsd-sockets))
(require (quote sb-posix))
(require (quote sb-introspect))
(require (quote sb-cltl2))
(require (quote asdf))
(push (probe-file ".") asdf:*central-registry*)
(asdf:compile-system :instans)
(asdf:load-system :instans)
(in-package :instans) | null | https://raw.githubusercontent.com/aaltodsg/instans/5ffc90e733e76ab911165f205ba57a7b3b200945/init/make-executable.lisp | lisp | (require (quote sb-bsd-sockets))
(require (quote sb-posix))
(require (quote sb-introspect))
(require (quote sb-cltl2))
(require (quote asdf))
(push (probe-file ".") asdf:*central-registry*)
(asdf:compile-system :instans)
(asdf:load-system :instans)
(in-package :instans) | |
3b99ee823ac5cbc3a1f13761bbbbfe372db6569f243a10861bba76322da471a7 | franks42/cljs-info | ns.clj | 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 COPYING at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms ... | null | https://raw.githubusercontent.com/franks42/cljs-info/70a2e46905cb558e21ae02077eb7707467e8112e/src/cljs_info/ns.clj | clojure | The use and distribution terms for this software are covered by the
which can be found in the file COPYING 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.
filte... | Copyright ( c ) . All rights reserved .
Eclipse Public License 1.0 ( -1.0.php )
(ns cljs-info.ns
"Clojure-library for the ClojureScript resolution environment that gives
the equivalent functionality of some of the namespace specific resolution
and info functions, like all-ns, ns-map, ns-resolve, apropos, e... |
4bcddb3449f325354dec9eadadbb6a0ae0ee1daf476eca7b4c59a86da247ab61 | mjmeintjes/cljs-react-native-tictactoe | db.cljs | (ns tictactoe-app.db
(:require [schema.core :as s :include-macros true]
[cljs.test :refer-macros [deftest testing is]]))
(def CellState (s/enum 0 1 2))
(def GameBoard
"A schema for tictactoe game board"
{:state [CellState]})
(def Db
"A schema for tictactoe game"
{:current-player (s/enum 1 2)
... | null | https://raw.githubusercontent.com/mjmeintjes/cljs-react-native-tictactoe/b41ead9ac3982b139a315b3e60c149342f7c345e/src/tictactoe_app/db.cljs | clojure | (ns tictactoe-app.db
(:require [schema.core :as s :include-macros true]
[cljs.test :refer-macros [deftest testing is]]))
(def CellState (s/enum 0 1 2))
(def GameBoard
"A schema for tictactoe game board"
{:state [CellState]})
(def Db
"A schema for tictactoe game"
{:current-player (s/enum 1 2)
... | |
e5ebdf03c5962cb331034a0d876fcf7ccd1c97e3d84aa5dc1180ba759d8d202f | jyh/metaprl | shell_rule.mli |
* Commands for editing a rewrite .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / html... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/support/shell/shell_rule.mli | ocaml |
* Make an editable rule/rewrite.
* -*-
* Local Variables:
* Caml-master: "refiner"
* End:
* -*-
|
* Commands for editing a rewrite .
*
* ----------------------------------------------------------------
*
* This file is part of MetaPRL , a modular , higher order
* logical framework that provides a logical programming
* environment for OCaml and other languages .
*
* See the file doc / html... |
552da2f7094068128d072a534a93b7fe87999bcfd003e00d7a38c5dd6964ac68 | noinia/hgeometry | Dart.hs | # LANGUAGE TemplateHaskell #
--------------------------------------------------------------------------------
-- |
-- Module : Data.PlanarGraph.Dart
Copyright : ( C )
-- License : see the LICENSE file
Maintainer :
--
-- Data type for representing Darts (edges) in a planar graph.
------------... | null | https://raw.githubusercontent.com/noinia/hgeometry/a6abecb1ce4a7fd96b25cc1a5c65cd4257ecde7a/hgeometry-combinatorial/src/Data/PlanarGraph/Dart.hs | haskell | ------------------------------------------------------------------------------
|
Module : Data.PlanarGraph.Dart
License : see the LICENSE file
Data type for representing Darts (edges) in a planar graph.
------------------------------------------------------------------------------
$setup
>>> :{
let d... | # LANGUAGE TemplateHaskell #
Copyright : ( C )
Maintainer :
module Data.PlanarGraph.Dart where
import Control.DeepSeq
import Control.Lens hiding ((.=))
import GHC.Generics (Generic)
import Test.QuickCheck (Arbitrary(..),suchThat)
newtype Arc s = Arc { _unArc :: Int } deriving (Eq,Ord,Enum,Bounded,G... |
cbf27b78aa8db1b223e7a65425e7c870e0bfd80e01191b9f8bb55552c022be38 | msantos/pkt | pkt_igmp.erl | Copyright ( c ) 2009 - 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:
%%
%% Redistributions of source code must retain the above copyright
%% notice, this list of condition... | null | https://raw.githubusercontent.com/msantos/pkt/8c826b25098b06db8c24805fb1da2d65c14abe06/src/pkt_igmp.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
Redistributions in bi... | Copyright ( c ) 2009 - 2015 , < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT ,
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING ,
BUT NOT LIMITED TO , PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ;
LOSS OF U... |
be9ce8013febaa94831b0cdb3fe95f76ba1d3d8cbb5cc35cfb6a7942f30e1a8c | khibino/haskell-relational-record | Model.hs | # LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances , DataKinds , DeriveGeneric #
module Test.Relational.QuickCheck.Model (
A (..), a0', a1', a2', relA,
B (..), b0', b1', b2', relB,
) where
import GHC.Generics (Generic)
import Data.Int (Int64)
import qualified Database.Relational.Table as Tab... | null | https://raw.githubusercontent.com/khibino/haskell-relational-record/759b3d7cea207e64d2bd1cf195125182f73d2a52/rr-quickcheck/src/Test/Relational/QuickCheck/Model.hs | haskell | # LANGUAGE TemplateHaskell , MultiParamTypeClasses , FlexibleInstances , DataKinds , DeriveGeneric #
module Test.Relational.QuickCheck.Model (
A (..), a0', a1', a2', relA,
B (..), b0', b1', b2', relB,
) where
import GHC.Generics (Generic)
import Data.Int (Int64)
import qualified Database.Relational.Table as Tab... | |
c8876906f63d3c9ea66a7767662fba30737238322dbdfaf7e4fc7e487e027ee4 | AbstractMachinesLab/caramel | bytes.mli | include module type of struct
include StdLabels.Bytes
end
| null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/vendor/stdune/bytes.mli | ocaml | include module type of struct
include StdLabels.Bytes
end
| |
db73812a72afde3516fbcdbc30de7c7ddf1ea5b14ff544c53c592e89ead59782 | tel/saltine | Box.hs | -- |
-- Module : Crypto.Saltine.Core.Box
Copyright : ( c ) 2013
License : MIT
--
Maintainer :
-- Stability : experimental
-- Portability : non-portable
--
-- Public-key cryptography abstraction:
-- "Crypto.Saltine.Core.Box"
--
This module consists of functions dealing with two public - key
... | null | https://raw.githubusercontent.com/tel/saltine/b00e00fa8ce8bf4ee176a9d3deead57c590fc686/src/Crypto/Saltine/Core/Box.hs | haskell | |
Module : Crypto.Saltine.Core.Box
Stability : experimental
Portability : non-portable
Public-key cryptography abstraction:
"Crypto.Saltine.Core.Box"
scheme, the 'box' function encrypts and authenticates a message
key, and a nonce. The 'boxOpen' function verifies and decrypts a
sender's public key, ... | Copyright : ( c ) 2013
License : MIT
Maintainer :
This module consists of functions dealing with two public - key
cryptography concepts in libsodium .
The first one is an authenticated encryption scheme . In this
' ByteString ' using the sender 's secret key , the receiver 's public
ciphert... |
609c2a24cac5245076a46e29971c3c1cdeae9a768c750b49e65853bdc642846a | McCLIM/McCLIM | cache.lisp | ;;; ---------------------------------------------------------------------------
;;; License: LGPL-2.1+ (See file 'Copyright' for details).
;;; ---------------------------------------------------------------------------
;;;
( c ) Copyright 2002 by < >
( c ) Copyright 2002 - 2004 by < >
( c ) Copyright 2... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/d49fef5c2bb1307a006cdadfc4061e0a6b0fff79/Core/extended-output/incremental-redisplay/cache.lisp | lisp | ---------------------------------------------------------------------------
License: LGPL-2.1+ (See file 'Copyright' for details).
---------------------------------------------------------------------------
---------------------------------------------------------------------------
This file contains the unde... | ( c ) Copyright 2002 by < >
( c ) Copyright 2002 - 2004 by < >
( c ) Copyright 2014 by < >
( c ) Copyright 2021 by < >
(in-package #:clim-internals)
(defclass updating-output-map-mixin ()
((id-map :accessor id-map :initform nil)
(id-counter :accessor id-counter
:documentati... |
3d836f967902d4c4aeabc3278ef03f0d7ff521ba29b9abd1304a4d357f6806ad | grin-compiler/grin | GenerateEval.hs | # LANGUAGE LambdaCase , OverloadedStrings #
module Transformations.ExtendedSyntax.GenerateEval where
import Data.Set (Set)
import qualified Data.Set as Set
import Control.Monad
import Grin.ExtendedSyntax.Grin
import Transformations.ExtendedSyntax.Names
generateEval :: Program -> (Program, ExpChanges)
generateEval pr... | null | https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/Transformations/ExtendedSyntax/GenerateEval.hs | haskell | # LANGUAGE LambdaCase , OverloadedStrings #
module Transformations.ExtendedSyntax.GenerateEval where
import Data.Set (Set)
import qualified Data.Set as Set
import Control.Monad
import Grin.ExtendedSyntax.Grin
import Transformations.ExtendedSyntax.Names
generateEval :: Program -> (Program, ExpChanges)
generateEval pr... | |
c8216653ef55f2a9339ffae593aa3570b7a966732bac02cc8de5e78c3ec09f97 | cjdev/haskell-fundamentals | Stubs.hs | # LANGUAGE DeriveFunctor #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
module Maintainability.MTL.Stubs where
import qualified Data.Text as T
import Control.Monad.Reader (ReaderT(..), ask)
import Control.Monad.State (StateT, evalStateT, get, put)
import Control.Monad.Writer (WriterT(..), tell)
im... | null | https://raw.githubusercontent.com/cjdev/haskell-fundamentals/03982d7b3ca140bfecc69fa4873fcc0e4fa54044/test/Maintainability/MTL/Stubs.hs | haskell | ------------------------------------------------------------------------------
Arguments
| Runs a computation with access to a set of command-line arguments.
------------------------------------------------------------------------------
File System
| Runs a computation that may interact with the file system, given ... | # LANGUAGE DeriveFunctor #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
module Maintainability.MTL.Stubs where
import qualified Data.Text as T
import Control.Monad.Reader (ReaderT(..), ask)
import Control.Monad.State (StateT, evalStateT, get, put)
import Control.Monad.Writer (WriterT(..), tell)
im... |
534f98e378c19e1cf440b8241a3259f1c0eaaa49375dc03039b9434170bfea72 | BrunoBonacci/mulog | user.clj | (ns user
(:require [com.brunobonacci.mulog :as u]
[clojure.java.io :as io]
[clojure.string :as str]
[com.brunobonacci.mulog.buffer :as rb]
[com.brunobonacci.mulog.utils :as ut]
[com.brunobonacci.mulog.flakes :refer [flake]]
[com.brunobonacci.mulo... | null | https://raw.githubusercontent.com/BrunoBonacci/mulog/40a10ce3a5953ee922288aaca9fae3e8231f6f6c/mulog-core/dev/user.clj | clojure |
;;
----==| μ / L O G |==---- ;;
;;
... do something
... do something
stop publishers
list registered publishers
... | (ns user
(:require [com.brunobonacci.mulog :as u]
[clojure.java.io :as io]
[clojure.string :as str]
[com.brunobonacci.mulog.buffer :as rb]
[com.brunobonacci.mulog.utils :as ut]
[com.brunobonacci.mulog.flakes :refer [flake]]
[com.brunobonacci.mulo... |
76718a187994743163e205ef2a9d6585642660cbf075ef26171e0baa279293e3 | Andromedans/andromeda | hint.mli |
(** Prepare a type so that it can be stored as a hint. Complain if
the type is not a universally quantified equality. *)
val prepare : Syntax.ty -> (int * Syntax.ty * Syntax.term * Syntax.term) option
(** Instantiate a hint against an equality. Assumes all inputs are normalized. *)
val instantiate : int * Syntax.... | null | https://raw.githubusercontent.com/Andromedans/andromeda/a5c678450e6c6d4a7cd5eee1196bde558541b994/archive/old-andromeda/hint.mli | ocaml | * Prepare a type so that it can be stored as a hint. Complain if
the type is not a universally quantified equality.
* Instantiate a hint against an equality. Assumes all inputs are normalized.
* Instantiate as a rewrite rule. Assumes all inputs are normalized. |
val prepare : Syntax.ty -> (int * Syntax.ty * Syntax.term * Syntax.term) option
val instantiate : int * Syntax.ty * Syntax.term * Syntax.term ->
Syntax.ty -> Syntax.term -> Syntax.term -> bool
val rewrite : int * Syntax.ty * Syntax.term * Syntax.term ->
Syntax.ty -> Syntax.term ->... |
44feac071dba9d059292ade1f5b402cb5164ec9851398198633e9ef156ae358b | alexandroid000/improv | PoseArray.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Geometry_msgs.PoseArray where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinar... | null | https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Geometry_msgs/Ros/Geometry_msgs/PoseArray.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable # | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Geometry_msgs.PoseArray where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
import Ros.Internal.Msg.MsgInfo
import qualified GHC.Generics as G
im... |
f7877eefe8ca8a7bf7f957f4cc8072f502235b1a59ef13dfe00cdfb442579065 | discus-lang/ddc | BindStruct.hs | {-# OPTIONS_HADDOCK hide #-}
# LANGUAGE TypeFamilies #
module DDC.Core.Exp.Generic.BindStruct where
import DDC.Core.Exp.Generic.Exp
import DDC.Core.Collect.FreeX
import DDC.Core.Collect.BindStruct
import qualified DDC.Type.Exp as T
import Data.Maybe
instance (GBind l ~ T.Bind l, GBound l ~ T.Bound l)
... | null | https://raw.githubusercontent.com/discus-lang/ddc/2baa1b4e2d43b6b02135257677671a83cb7384ac/src/s1/ddc-core/DDC/Core/Exp/Generic/BindStruct.hs | haskell | # OPTIONS_HADDOCK hide # | # LANGUAGE TypeFamilies #
module DDC.Core.Exp.Generic.BindStruct where
import DDC.Core.Exp.Generic.Exp
import DDC.Core.Collect.FreeX
import DDC.Core.Collect.BindStruct
import qualified DDC.Type.Exp as T
import Data.Maybe
instance (GBind l ~ T.Bind l, GBound l ~ T.Bound l)
=> BindStruct (GExp l) l whe... |
b153bdb06ecba3022fde88de0a109c420a5015c1c32baf56ae1cbc9cbd529b70 | ayato-p/bulkhead | bulkhead_test.clj | (ns org.panchromatic.bulkhead-test
(:require [clojure.test :as t]
[integrant.core :as ig]
[org.panchromatic.bulkhead :as sut]))
(defmethod ig/init-key ::comp [_ opts] opts)
(doseq [c [::comp-a ::comp-b ::comp-c]]
(derive c ::comp)
(doseq [n (range 3)]
(-> (namespace c)
(keywo... | null | https://raw.githubusercontent.com/ayato-p/bulkhead/64c9571d6fb33860b8079f06e2db54b02d779b41/test/org/panchromatic/bulkhead_test.clj | clojure | (ns org.panchromatic.bulkhead-test
(:require [clojure.test :as t]
[integrant.core :as ig]
[org.panchromatic.bulkhead :as sut]))
(defmethod ig/init-key ::comp [_ opts] opts)
(doseq [c [::comp-a ::comp-b ::comp-c]]
(derive c ::comp)
(doseq [n (range 3)]
(-> (namespace c)
(keywo... | |
aa623ed894fefc8d45dfaac5f0143449bf239bbb346e9551d088ebd2e2ae2b85 | nuprl/gradual-typing-performance | data-node.rkt | #lang typed/racket/base
(provide (struct-out node))
;; -----------------------------------------------------------------------------
(require "data-label-adapted.rkt")
;; =============================================================================
;; up-label: label
;; parent: (union #f node)
children : ( listo... | null | https://raw.githubusercontent.com/nuprl/gradual-typing-performance/35442b3221299a9cadba6810573007736b0d65d4/experimental/micro/suffixtree/typed/data-node.rkt | racket | -----------------------------------------------------------------------------
=============================================================================
up-label: label
parent: (union #f node)
suffix-link: (union #f node) | #lang typed/racket/base
(provide (struct-out node))
(require "data-label-adapted.rkt")
children : ( listof node )
(struct node
([up-label : label]
[parent : (U #f node)]
[children : (Listof node)]
[suffix-link : (U #f node)])
#:mutable)
|
19f070f5d90ecf1c4c72e2772a8c86eda46ae4ede036a290c24dde7cfd3c0c8c | koka-lang/koka | Divergent.hs | -----------------------------------------------------------------------------
Copyright 2012 - 2021 , Microsoft Research , .
--
-- This is free software; you can redistribute it and/or modify it under the
terms of the Apache License , Version 2.0 . A copy of the License can be
-- found in the LICENSE file ... | null | https://raw.githubusercontent.com/koka-lang/koka/2909df715aebf57966fbdd4afdc7a477f55f239e/src/Core/Divergent.hs | haskell | ---------------------------------------------------------------------------
This is free software; you can redistribute it and/or modify it under the
found in the LICENSE file at the root of this distribution.
---------------------------------------------------------------------------
Analyse divergence of ... | Copyright 2012 - 2021 , Microsoft Research , .
terms of the Apache License , Version 2.0 . A copy of the License can be
module Core.Divergent( analyzeDivergence ) where
import Lib . Trace
import Control.Applicative
import Control.Monad
import Data.List( transpose, permutations )
import Common.Name... |
4795a3a23546a2d165e35253906c32e790387ed4e1a8506742f77cb72111bbb5 | srikumarks/df | dual.hs | module Dual where
" Dual " is the " Dual Number " type . The first part is a normal value ,
and the second part holds the derivative 's value . By defining
-- operations on dual numbers carefully, we're able to simultaneously
-- calculate a function's value as well as its derivate's value at
-- a given point. The ... | null | https://raw.githubusercontent.com/srikumarks/df/0fa66a78752bdfe5d51df4145885d950796a457b/dual.hs | haskell | operations on dual numbers carefully, we're able to simultaneously
calculate a function's value as well as its derivate's value at
a given point. The advantage of this over dmath.hs is that you can
use dual numbers with normal functions, though you cannot use them
to calculate higher order derivatives.
f adn = th... | module Dual where
" Dual " is the " Dual Number " type . The first part is a normal value ,
and the second part holds the derivative 's value . By defining
data Dual x = Dual x x deriving (Show)
f (Dual f0 _) = f0
df (Dual _ df0) = df0
x :: (Num a) => a -> Dual a
x a = Dual a 1
instance (Num n) => Num (Dual n) ... |
297acad3450581572919e686c84e5e2deab0cba41c392635410d3cd12278bc40 | meooow25/haccepted | DijkstraSpec.hs | # LANGUAGE ScopedTypeVariables #
module DijkstraSpec where
import Control.Monad
import Control.Monad.ST
import Data.Array.ST
import Data.Array.Unboxed
import Data.Graph
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck
import Dijkstra ( Weight, dijkstra, dijkstraH )
import LabelledGraph ( LGraph,... | null | https://raw.githubusercontent.com/meooow25/haccepted/8e4c36edc75e28666944f721ff791861b4afb70b/tests/DijkstraSpec.hs | haskell | # LANGUAGE ScopedTypeVariables #
module DijkstraSpec where
import Control.Monad
import Control.Monad.ST
import Data.Array.ST
import Data.Array.Unboxed
import Data.Graph
import Test.Hspec
import Test.Hspec.QuickCheck
import Test.QuickCheck
import Dijkstra ( Weight, dijkstra, dijkstraH )
import LabelledGraph ( LGraph,... | |
aba5cba80ee9a366425e5647276f05c8c7d6a6459d880106ca25724a72ffbef0 | biocaml/biocaml | wig.ml | open CFStream
type comment = [ `comment of string ] [@@deriving sexp]
type variable_step =
[ `variable_step_state_change of string * int option (* name x span *)
| `variable_step_value of int * float ]
[@@deriving sexp]
type fixed_step =
[ `fixed_step_state_change of string * int * int * int option
| (* name... | null | https://raw.githubusercontent.com/biocaml/biocaml/ac619539fed348747d686b8f628e80c1bb8bfc59/lib/unix/wig.ml | ocaml | name x span
name, start, step, span
`module_error` should progressively allow to “tag” error values.
Pos.t * string list *string option
Pos.t * string
Pos.t * string
Pos.t * string
Pos.t * string
Pos.t * string
Pos.t * string list
Pos.t * string
Pos.t * string
Pos.t * string
Pos.t * string | open CFStream
type comment = [ `comment of string ] [@@deriving sexp]
type variable_step =
| `variable_step_value of int * float ]
[@@deriving sexp]
type fixed_step =
[ `fixed_step_state_change of string * int * int * int option
`fixed_step_value of float ]
[@@deriving sexp]
type bed_graph_value = string * ... |
a586bf2a2a685417f7e70bef63af2bd7a58c0243b5d80cc51f3b3304e71f81e7 | namin/biohacker | nd-pathway-rules.lisp | ;; nd-pathway-rules.lisp
(rule ((:INTERN (enzyme ?enzyme . ?genes)))
(dolist (?gene ?genes)
(rassert! (gene ?gene) :GENE-OF-ENZYME))
(assert! `(:IMPLIES
(:AND ,@(list-of 'gene-on ?genes))
(enzyme-present ,?enzyme))
:ENZYME-FORMED)
(assert! `(:IMPLIES
(:NOT (:AND ,@(list-of 'gene-on ... | null | https://raw.githubusercontent.com/namin/biohacker/6b5da4c51c9caa6b5e1a68b046af171708d1af64/network-debugger/nd-pathway-rules.lisp | lisp | nd-pathway-rules.lisp
keep uncatalyzed pathways open for growth experiment abduction | (rule ((:INTERN (enzyme ?enzyme . ?genes)))
(dolist (?gene ?genes)
(rassert! (gene ?gene) :GENE-OF-ENZYME))
(assert! `(:IMPLIES
(:AND ,@(list-of 'gene-on ?genes))
(enzyme-present ,?enzyme))
:ENZYME-FORMED)
(assert! `(:IMPLIES
(:NOT (:AND ,@(list-of 'gene-on ?genes)))
(:NOT (enzym... |
e19c24cff2df45be9cb273c98f96fc23c199e3f7cb66c42583037ad89555036f | smucclaw/dsl | Types.hs | # LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE DeriveGeneric , DeriveAnyClass #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
{-|
Types used by the Legal Spreadsheets parser, interpreter, and transpilers.
-}
... | null | https://raw.githubusercontent.com/smucclaw/dsl/64ac1d2f4b9e6e89768c5812903518435af0dddb/lib/haskell/natural4/src/LS/Types.hs | haskell | # LANGUAGE OverloadedStrings #
|
Types used by the Legal Spreadsheets parser, interpreter, and transpilers.
A parser generates a list of rules (in the "appendix", representing nested rules defined inline) and optionally some other value
- so really there are multiple Values
- | apple | orange | banana | :: | Fruit ... | # LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE DeriveGeneric , DeriveAnyClass #
# LANGUAGE DerivingStrategies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
module LS.Types ( module LS.BasicTypes
, module LS.Types) where
import qualified Data.Text as Text
... |
856f0b6b3732252066cd158b0d187d682b310a28041fc095eefb36b9ade9c964 | falsetru/htdp | 14.2.3.scm | (define-struct node (ssn name left right))
(define (inorder bt)
(cond [(false? bt) '()]
[else (append
(inorder (node-left bt))
(list (node-ssn bt))
(inorder (node-right bt)))]))
(require rackunit)
(require rackunit/text-ui)
(define inorder-tests
(test-suite... | null | https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/14/14.2.3.scm | scheme | (define-struct node (ssn name left right))
(define (inorder bt)
(cond [(false? bt) '()]
[else (append
(inorder (node-left bt))
(list (node-ssn bt))
(inorder (node-right bt)))]))
(require rackunit)
(require rackunit/text-ui)
(define inorder-tests
(test-suite... | |
c885532dc366d12cde8ec4de27da76a652c6cd814648928290dec232acb0d5f2 | rtoy/cmucl | generalock.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : PROCESS ; Base : 10 ; Lowercase : Yes -*-
Copyright ( C ) 1990 Symbolics , Inc.
;;;
;;; Permission is granted to any individual or institution to use, copy, modify,
;;; and distribute this software, provided that this complete copyright and
;;; permission notice... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/clx/generalock.lisp | lisp | Syntax : Common - lisp ; Package : PROCESS ; Base : 10 ; Lowercase : Yes -*-
Permission is granted to any individual or institution to use, copy, modify,
and distribute this software, provided that this complete copyright and
permission notice is maintained, intact, in all copies and supporting
documentation.
e... |
Copyright ( C ) 1990 Symbolics , Inc.
Symbolics , Inc. provides this software " as is " without
(defflavor xlib::clx-lock () (simple-recursive-normal-lock)
(:init-keywords :flavor))
(defwhopper (lock-internal xlib::clx-lock) (lock-argument)
(catch 'timeout
(continue-whopper lock-argument)))
(defmethod (... |
d864b870faecf99703bc5cd908acbb177ab8a770acfc5dc44260254b149390a0 | rbkmoney/fistful-server | ff_deposit_revert_codec.erl | -module(ff_deposit_revert_codec).
-behaviour(ff_codec).
-include_lib("fistful_proto/include/ff_proto_deposit_revert_thrift.hrl").
-export([marshal/2]).
-export([unmarshal/2]).
%% Data transform
-define(to_session_event(SessionID, Payload),
{session, #{id => SessionID, payload => Payload}}
).
%% API
-spec mar... | null | https://raw.githubusercontent.com/rbkmoney/fistful-server/60b964d0e07f911c841903bc61d8d9fb20a32658/apps/ff_server/src/ff_deposit_revert_codec.erl | erlang | Data transform
API
Internals
TESTS | -module(ff_deposit_revert_codec).
-behaviour(ff_codec).
-include_lib("fistful_proto/include/ff_proto_deposit_revert_thrift.hrl").
-export([marshal/2]).
-export([unmarshal/2]).
-define(to_session_event(SessionID, Payload),
{session, #{id => SessionID, payload => Payload}}
).
-spec marshal(ff_codec:type_name()... |
df5c80b01609d204894b892083b4d295412134a72f1720791b06d4c4976136e6 | portnov/wacom-intuos-pro-scripts | Daemon.hs | {-# LANGUAGE OverloadedStrings #-}
module System.Wacom.Daemon
where
import Control.Monad
import Data.List
import Control.Concurrent
import System.UDev hiding (isEmpty)
import System.Posix.IO.Select
import System.Posix.IO.Select.Types hiding (Result)
import System.Wacom.Types
import System.Wacom.Internal
import ... | null | https://raw.githubusercontent.com/portnov/wacom-intuos-pro-scripts/78b85c09888d7031af73ede686f68cf97cea8a77/xmonad/hswcmd/System/Wacom/Daemon.hs | haskell | # LANGUAGE OverloadedStrings #
| Detect tablet devices by using udev
C8.putStrLn $ "Device: " `B.append` new
| To be called before starting udevMonitor.
To be called in separate thread (by forkIO).
This daemon implements the following functionality:
* Detects attached tablet at startup (via udev).
* Detects ... |
module System.Wacom.Daemon
where
import Control.Monad
import Data.List
import Control.Concurrent
import System.UDev hiding (isEmpty)
import System.Posix.IO.Select
import System.Posix.IO.Select.Types hiding (Result)
import System.Wacom.Types
import System.Wacom.Internal
import System.Wacom.Util
import System.Wac... |
86a6d02d967db4b787860b29aa0189eff67fc40cf6c3a4b891f0dd51fe215f9b | krdlab/haskell-oidc-client | Internal.hs | {-# LANGUAGE OverloadedStrings #-}
module Spec.Client.Internal where
import Data.Aeson (eitherDecode)
import Data.Either (isLeft)
import Jose.Jwt (Jwt (..))
import Test.Hspec (Spec, describe, it, shouldBe,
... | null | https://raw.githubusercontent.com/krdlab/haskell-oidc-client/b92736ba7d458b4d8571d378ad750b3e1ddaa7c4/test/Spec/Client/Internal.hs | haskell | # LANGUAGE OverloadedStrings #
see also: #appendix-A.14 | module Spec.Client.Internal where
import Data.Aeson (eitherDecode)
import Data.Either (isLeft)
import Jose.Jwt (Jwt (..))
import Test.Hspec (Spec, describe, it, shouldBe,
shouldSa... |
dbf6dc796577891639b693981158e2d5ac121437f1b01697595fae3e543f0ad4 | realworldocaml/book | out_channel.mli | * An output channel for doing blocking writes to destinations like files and sockets .
Note that an [ Out_channel.t ] is a custom block with a finalizer , and so is allocated
directly to the major heap . Creating a lot of out_channels can result in many major
collections and poor performance .
... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/stdio/src/out_channel.mli | ocaml | * defaults to [true]
* defaults to [false]
* defaults to [false]
* [close_no_err] tries to flush and close [t]. It does not raise.
* OCaml's internal Marshal format
* Outputs a list of lines, each terminated by a newline character
* Formatted printing to an out channel. This is the same as [Printf.sprintf] except... | * An output channel for doing blocking writes to destinations like files and sockets .
Note that an [ Out_channel.t ] is a custom block with a finalizer , and so is allocated
directly to the major heap . Creating a lot of out_channels can result in many major
collections and poor performance .
... |
ad9832cd2ea16999078bcadcf4825dfd9b203cb6addbcbdb32624b3c02bbc79c | APTE/APTE | length_equivalence.ml | module Length = Length
module Algorithm = Length_algorithm
| null | https://raw.githubusercontent.com/APTE/APTE/d5f1bbd29c2fc324a6015ac50173a0cc8ad66623/Source/length_equivalence/length_equivalence.ml | ocaml | module Length = Length
module Algorithm = Length_algorithm
| |
4613e084456c3b033ec7c6d5eb4f0bde57ee83c73dd3a5cd6adf16bf534e25a6 | seckcoder/course-compiler | s2_10.rkt | ;; A very simple test to trigger allocation and deletion of vectors
use the test suite option --heap - size 1024 and this test should
;; easily cause an collection.
;; Conservative estimate:
50 words per vector * 8 bytes per word * 3 vectors = 1200 bytes
(let ([v0 (vector 0 1 2 3 4 5 6 7 8 9
10 11... | null | https://raw.githubusercontent.com/seckcoder/course-compiler/4363e5b3e15eaa7553902c3850b6452de80b2ef6/tests/s2_10.rkt | racket | A very simple test to trigger allocation and deletion of vectors
easily cause an collection.
Conservative estimate: | use the test suite option --heap - size 1024 and this test should
50 words per vector * 8 bytes per word * 3 vectors = 1200 bytes
(let ([v0 (vector 0 1 2 3 4 5 6 7 8 9
10 11 12 13 14 15 16 17 18 19
20 21 22 23 24 25 26 27 28 29
30 31 32 33 34 35 36 37 38 39
... |
e9553e3a436d5d9b9a27189704349ae65817617ac92a6c6ee246b2b9049ec0e8 | den1k/vimsical | branch_pointers_test.cljc | (ns vimsical.vcs.state.branch-pointers-test
#?@(:clj
[(:require
[clojure.test :as t :refer [deftest is]]
[orchestra.spec.test :as st]
[vimsical.vcs.examples :as examples]
[vimsical.vcs.state.branch-pointers :as sut])]
:cljs
[(:require
[clojure.spec.test.alpha ... | null | https://raw.githubusercontent.com/den1k/vimsical/1e4a1f1297849b1121baf24bdb7a0c6ba3558954/test/vcs/vimsical/vcs/state/branch_pointers_test.cljc | clojure | (ns vimsical.vcs.state.branch-pointers-test
#?@(:clj
[(:require
[clojure.test :as t :refer [deftest is]]
[orchestra.spec.test :as st]
[vimsical.vcs.examples :as examples]
[vimsical.vcs.state.branch-pointers :as sut])]
:cljs
[(:require
[clojure.spec.test.alpha ... | |
4db0fba7a60e90b64e57db3c7476bfe006f5a274630dc6820f2170c52eb40004 | RefactoringTools/wrangler | refac_new_fun.erl | Copyright ( c ) 2010 , ,
%% All rights reserved.
%%
%% Redistribution and use in source and binary forms, with or without
%% modification, are permitted provided that the following conditions are met:
%% %% Redistributions of source code must retain the above copyright
%% notice, this list of conditions... | null | https://raw.githubusercontent.com/RefactoringTools/wrangler/7f4c120e4bf06a39d8762caa60b4c88ef03086b0/src/refac_new_fun.erl | erlang | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
%% Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
%% Redi... | Copyright ( c ) 2010 , ,
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
@private
-module(refac_new_fun).
-export([fun_extraction/6, fun_extraction_1/6, fun_extraction_eclipse/5, fun_extraction_1_eclipse... |
17c4d1804265af1bd7beacc0c6260bc7ad63be7f7736a0b8f8d323dad0f65452 | flipstone/orville | SequenceIdentifier.hs | module Orville.PostgreSQL.Internal.SequenceIdentifier
( SequenceIdentifier,
unqualifiedNameToSequenceId,
setSequenceIdSchema,
sequenceIdQualifiedName,
sequenceIdUnqualifiedName,
sequenceIdSchemaName,
sequenceIdToString,
sequenceIdUnqualifiedNameString,
sequenceIdSchemaNameString,
)
w... | null | https://raw.githubusercontent.com/flipstone/orville/a018288c5d3fe8c567b156b980d9f8aab2d06b28/orville-postgresql-libpq/src/Orville/PostgreSQL/Internal/SequenceIdentifier.hs | haskell | |
Constructs a 'SequenceIdentifier' where the sequence's name will not be qualified
by a particular schema.
|
Sets the schema of the 'SequenceIdentifier'. Wherever applicable, references to
the sequence will be qualified by the given scheme name.
|
Returns the 'Expr.Qualified Expr.SequenceName' that shou... | module Orville.PostgreSQL.Internal.SequenceIdentifier
( SequenceIdentifier,
unqualifiedNameToSequenceId,
setSequenceIdSchema,
sequenceIdQualifiedName,
sequenceIdUnqualifiedName,
sequenceIdSchemaName,
sequenceIdToString,
sequenceIdUnqualifiedNameString,
sequenceIdSchemaNameString,
)
w... |
fe2c451aa385b9830e92e84cf4598ae809a56866c258cd650e2833cc4491e064 | conal/shady-graphics | CompileImageSimple.hs | # LANGUAGE TypeOperators #
# OPTIONS_GHC -Wall #
{ - # OPTIONS_GHC -fno - warn - unused - imports # - } -- TEMP
{ - # OPTIONS_GHC -fno - warn - unused - binds # - } -- TEMP
----------------------------------------------------------------------
-- |
Module : . CompileImageSimple
Copyright : ( ... | null | https://raw.githubusercontent.com/conal/shady-graphics/cb062d59e327b882f54537559062ac3eecc2c28d/src/Shady/CompileImageSimple.hs | haskell | TEMP
TEMP
--------------------------------------------------------------------
|
Maintainer :
Stability : experimental
Compile a parametrized image. For now, just animated, i.e., time-dependent.
--------------------------------------------------------------------
TODO: explicit exports
,compile
| 2D ... | # LANGUAGE TypeOperators #
# OPTIONS_GHC -Wall #
Module : . CompileImageSimple
Copyright : ( c ) 2015 Tabula , Inc.
module Shady.CompileImageSimple (ImageB, imageBProg) where
import Control.Applicative (liftA2)
import TypeUnary . Vec((<+>),vec4 )
import Shady.Complex(Complex(..))
import Shady... |
bbdef22aae51db5ffe34af0afea6a5c981935b0ab10108e1fb63fc1c3cd3edfe | postspectacular/rnd.farm | core.cljs | (ns rndfarm.core
(:require
[thi.ng.domus.core :as dom :refer [->px]]
[thi.ng.domus.utils :as utils]
[thi.ng.domus.log :refer [debug info warn]]
[thi.ng.common.stringformat :as f]
[cljs.core.async :refer [chan <! >! put! timeout close!]]
[cljs.reader :as reader]
[goog.object])
(:require-macros
... | null | https://raw.githubusercontent.com/postspectacular/rnd.farm/80cf1d0def59d4cf24b4926ab4da1b2841cdc7da/src-cljs/rndfarm/core.cljs | clojure | (info msg) | (ns rndfarm.core
(:require
[thi.ng.domus.core :as dom :refer [->px]]
[thi.ng.domus.utils :as utils]
[thi.ng.domus.log :refer [debug info warn]]
[thi.ng.common.stringformat :as f]
[cljs.core.async :refer [chan <! >! put! timeout close!]]
[cljs.reader :as reader]
[goog.object])
(:require-macros
... |
f04db22da1567cbdece593202cadbe66337211aa9b7aba263a5860641efd1e94 | bobbae/gosling-emacs | killring.ml | ; This emacs macro file defines commands for killing and unkilling text.
; Commands to delete words. lines, and regions actually send the text to a
; ring of killbuffers, where they can be yanked back. Multiple killing
; commands in succession will concatenate text to the same buffer, so a
; single unkill can bring i... | null | https://raw.githubusercontent.com/bobbae/gosling-emacs/8fdda532abbffb0c952251a0b5a4857e0f27495a/lib/maclib/utah/std/killring.ml | ocaml | ; This emacs macro file defines commands for killing and unkilling text.
; Commands to delete words. lines, and regions actually send the text to a
; ring of killbuffers, where they can be yanked back. Multiple killing
; commands in succession will concatenate text to the same buffer, so a
; single unkill can bring i... | |
89de8b1998440a25d93f00c37098d1361a83ca10369a9a11fe7c52c9d479db6d | rksm/clj-org-analyzer | main.cljs | (ns ^:figwheel-hooks org-analyzer.view.main
(:require [org-analyzer.view.app :as app]
[reagent.core :as r]
[cljs.reader :as reader]))
(enable-console-print!)
(def known-org-files (reader/read-string (js/localStorage.getItem "org-analyzer-files")))
(defonce app-state (app/empty-app-state know... | null | https://raw.githubusercontent.com/rksm/clj-org-analyzer/19da62aa4dcf1090be8f574f6f2d4c7e116163a8/src/org_analyzer/view/main.cljs | clojure | (ns ^:figwheel-hooks org-analyzer.view.main
(:require [org-analyzer.view.app :as app]
[reagent.core :as r]
[cljs.reader :as reader]))
(enable-console-print!)
(def known-org-files (reader/read-string (js/localStorage.getItem "org-analyzer-files")))
(defonce app-state (app/empty-app-state know... | |
7605e70ec4e9b4f31e03703d969299725d749a76b140c1a643940c8944729bb5 | m4b/bin2json | B2J_Json.ml | exception Escape of ((int * int) * (int * int)) * Jsonm.error
type t =
[ `Null | `Bool of bool | `Float of float| `String of string
| `A of t list | `O of (string * t) list ]
let to_hex i =
let hex = Printf.sprintf "0x%x" i in
`String hex
let i64_to_hex i =
let hex = Printf.sprintf "0x%Lx" i in
`Strin... | null | https://raw.githubusercontent.com/m4b/bin2json/9aeeef017a4446cfc134e593aca76e8ac573b7f7/lib/json/B2J_Json.ml | ocaml | exception Escape of ((int * int) * (int * int)) * Jsonm.error
type t =
[ `Null | `Bool of bool | `Float of float| `String of string
| `A of t list | `O of (string * t) list ]
let to_hex i =
let hex = Printf.sprintf "0x%x" i in
`String hex
let i64_to_hex i =
let hex = Printf.sprintf "0x%Lx" i in
`Strin... | |
a943fca1ed96f4ef8136662e026ddffeadcaeb53839f630cf30253187e4d9d2c | input-output-hk/smash | Metrics.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Cardano.SMASH.DBSync.Metrics
( Metrics (..)
, makeMetrics
, withMetricSetters
, withMetricsServer
) where
import Cardano.Prelude
import Cardano.Slotting.Slot (SlotNo (..))
import Cardano.Sync.Types (Metr... | null | https://raw.githubusercontent.com/input-output-hk/smash/4b71cf933d70c4b2dcbeb7f79f314f6abe99e6ee/smash/src/Cardano/SMASH/DBSync/Metrics.hs | haskell | # LANGUAGE OverloadedStrings #
^ The block tip number of the remote node.
^ The number of @DbAction@ remaining for the database.
^ The block tip number in the database.
^ The slot tip number in the database.
This enables us to be much more flexibile with what we actually measure.
Using both `RegistryT` and `brack... | # LANGUAGE NoImplicitPrelude #
module Cardano.SMASH.DBSync.Metrics
( Metrics (..)
, makeMetrics
, withMetricSetters
, withMetricsServer
) where
import Cardano.Prelude
import Cardano.Slotting.Slot (SlotNo (..))
import Cardano.Sync.Types (MetricSetters (..))
import O... |
853a305076cd408606a1536199408162838576b2bbaada1813f03e72d7004b7a | mnasoft/math | coord.lisp | ;;;; ./src/coord/coordinate-system.lisp
(defpackage #:math/coord
(:use #:cl #:math/core)
(:export dtr
rtd
polar->cartesian
cartesian->polar
spherical->cartesian
cartesian->spherical
)
(:export point-3d->4d
point-4d->3d
)
(... | null | https://raw.githubusercontent.com/mnasoft/math/9bdd318a8653e14694236d79b6d2bd4b6c3f2cee/src/coord/coord.lisp | lisp | ./src/coord/coordinate-system.lisp
)
) |
(defpackage #:math/coord
(:use #:cl #:math/core)
(:export dtr
rtd
polar->cartesian
cartesian->polar
spherical->cartesian
cartesian->spherical
)
(:export point-3d->4d
point-4d->3d
)
(:export double-float-list
sin... |
93f7db3fe952c9e945c700467de9f1e39793a2f3020b9771c2ae29478fc92293 | HealthSamurai/stresty | routes.cljc | (ns app.routes
(:require [clojure.string :as str]
[re-frame.core :as rf]
[route-map.core :as route-map]))
(def global-contexts {})
(def routes {:. :app.scenario.core/index
"anti" {:. :app.anti/index}
"reagent" {:. :app.reagent/ctx}
"reframe" {... | null | https://raw.githubusercontent.com/HealthSamurai/stresty/36765772e6c40f893b4ef16f16a9f7be61f9f84c/src-ui/app/routes.cljc | clojure | (ns app.routes
(:require [clojure.string :as str]
[re-frame.core :as rf]
[route-map.core :as route-map]))
(def global-contexts {})
(def routes {:. :app.scenario.core/index
"anti" {:. :app.anti/index}
"reagent" {:. :app.reagent/ctx}
"reframe" {... | |
b6bae4536457ad81d031361bc61cbf924b15a6d6b98993928acb81580b5be43b | cfcs/ofetch | ofetch_cli.ml | (* Enable cancellation of all downloads to fs that is out of space *)
type fs_id = int * int
let fs_id_of_fd fd : fs_id =
let open UnixLabels in
let stat = fstat fd in
stat.st_dev , stat.st_rdev
type unix_handle =
{ fs: fs_id ;
download_file : Unix.file_descr ;
peer_fd : Ofetch_wrap.t ref ;
}
let is... | null | https://raw.githubusercontent.com/cfcs/ofetch/5173331d5afda41850c06eb8ce8fbba472e77262/ofetch_cli.ml | ocaml | Enable cancellation of all downloads to fs that is out of space
helper for failing downloads to full disk
let open Unix.LargeFile in
fast track
update generation/weight to reflect that it was recently used:
we're going to add a new domain, but the cache is full,
so we evict the least recently used:
... | type fs_id = int * int
let fs_id_of_fd fd : fs_id =
let open UnixLabels in
let stat = fstat fd in
stat.st_dev , stat.st_rdev
type unix_handle =
{ fs: fs_id ;
download_file : Unix.file_descr ;
peer_fd : Ofetch_wrap.t ref ;
}
fs_id = handle.fs
let try_chroot () =
let open Unix in
try chroot "."... |
a2ff6264417b08cdacde5b5d3d69a3598d87fcb2de70141524c62c913823c659 | mokus0/bitvec | Bit.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE BangPatterns #
# LANGUAGE CPP #
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
#else
#define safe
#endif
module Data.Vector.Unboxed.Bit
( module Data.Bit
, module U
, wordSize
, wordLeng... | null | https://raw.githubusercontent.com/mokus0/bitvec/abca33007838309043a352815f9f83ee86d9dbaf/src/Data/Vector/Unboxed/Bit.hs | haskell | TODO: eliminate this extra traversal
|Flip every bit in the given vector
| Given a vector of bits and a vector of things, extract those things for which the corresponding bit is set.
| Given a vector of bits and a vector of things, extract those things for which the corresponding bit is unset.
|return the numb... | # LANGUAGE FlexibleContexts #
# LANGUAGE BangPatterns #
# LANGUAGE CPP #
#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 702
# LANGUAGE Trustworthy #
#else
#define safe
#endif
module Data.Vector.Unboxed.Bit
( module Data.Bit
, module U
, wordSize
, wordLeng... |
8b659ca07d8886544afa1aa1221f9fa636342ca98caec019ac6933dd801539d3 | IndecisionTree/adventofcode2022 | Solutions.hs | module Solutions (solutions) where
import qualified Data.IntMap.Strict as M
import AOC (Solution)
import Days.Day01 (day01)
import Days.Day02 (day02)
import Days.Day03 (day03)
import Days.Day04 (day04)
import Days.Day05 (day05)
import Days.Day06 (day06)
import Days.Day07 (day07)
import Days.Day08 (day08)
import Days.... | null | https://raw.githubusercontent.com/IndecisionTree/adventofcode2022/9fce98a2cd0b18d26d2d369f8933b9abba0109ba/solutions/Solutions.hs | haskell | module Solutions (solutions) where
import qualified Data.IntMap.Strict as M
import AOC (Solution)
import Days.Day01 (day01)
import Days.Day02 (day02)
import Days.Day03 (day03)
import Days.Day04 (day04)
import Days.Day05 (day05)
import Days.Day06 (day06)
import Days.Day07 (day07)
import Days.Day08 (day08)
import Days.... | |
50bfd40534465bfad347bb513272d6029e0ef4cf04e621259b214404053a8500 | dinosaure/blaze | mdir.ml | open Rresult
let rec transmit ic oc =
let tmp = Bytes.create 0x1000 in
go tmp ic oc
and go tmp ic oc =
let len = input ic tmp 0 (Bytes.length tmp) in
if len > 0
then (
output oc tmp 0 len ;
go tmp ic oc)
let random g () = Random.State.int64 g Int64.max_int
let get _ g hostname maildir new_message ... | null | https://raw.githubusercontent.com/dinosaure/blaze/97cd9fe95fffc9a9ab1d38068cb1568f15179141/bin/mdir.ml | ocaml | open Rresult
let rec transmit ic oc =
let tmp = Bytes.create 0x1000 in
go tmp ic oc
and go tmp ic oc =
let len = input ic tmp 0 (Bytes.length tmp) in
if len > 0
then (
output oc tmp 0 len ;
go tmp ic oc)
let random g () = Random.State.int64 g Int64.max_int
let get _ g hostname maildir new_message ... | |
58d2cd02b6a63ba7358349d101cb59e687567fa1aefb9965083fd59fff122aa1 | commercialhaskell/stack | Lib.hs | module Lib
( someFunc
, someOtherFunc
, cyclicOutput
) where
import Cyclic
someFunc :: IO ()
someFunc = putStrLn "someFunc"
someOtherFunc :: IO ()
someOtherFunc = putStrLn "someOtherFunc"
cyclicOutput :: IO ()
cyclicOutput = putStrLn cyclic
| null | https://raw.githubusercontent.com/commercialhaskell/stack/255cd830627870cdef34b5e54d670ef07882523e/test/integration/tests/multi-test/files/src/Lib.hs | haskell | module Lib
( someFunc
, someOtherFunc
, cyclicOutput
) where
import Cyclic
someFunc :: IO ()
someFunc = putStrLn "someFunc"
someOtherFunc :: IO ()
someOtherFunc = putStrLn "someOtherFunc"
cyclicOutput :: IO ()
cyclicOutput = putStrLn cyclic
| |
ad1e54b443441ae32d7748938598a627dde9b269e2aee0d384370c88029ad9b4 | UnkindPartition/bert | Server.hs | | BERT - RPC server ( < -rpc.org/ > ) . This implements the
-- client RPC call/reply logic. Only synchronous requests are
-- supported at this time.
# LANGUAGE CPP #
module Network.BERT.Server
(
-- * Example
-- $example
-- * Documentation
serve
, DispatchResult(..)
, tcpServer
) where
impor... | null | https://raw.githubusercontent.com/UnkindPartition/bert/c61f14b621e3eddc41a337fa881245e43defeb66/src/Network/BERT/Server.hs | haskell | client RPC call/reply logic. Only synchronous requests are
supported at this time.
* Example
$example
* Documentation
| Serve from the given transport (forever), handling each request
with the given dispatch function in a new thread.
socket.
Ignore caching requests.
$example
To serve requests, create a serv... | | BERT - RPC server ( < -rpc.org/ > ) . This implements the
# LANGUAGE CPP #
module Network.BERT.Server
(
serve
, DispatchResult(..)
, tcpServer
) where
import Control.Concurrent
import Control.Monad.Trans
import Control.Exception
import Network.BERT.Transport
import Network.Socket
import Data.ByteStri... |
0d3783f690795b375292217f84c286404ce9ab3fb41ebb3b3bc64cb637be5632 | fpco/schoolofhaskell.com | ExportAllTutorials.hs | module Handler.ExportAllTutorials where
import Blaze.ByteString.Builder (Builder)
import Blaze.ByteString.Builder.ByteString (fromByteString)
import Control.Monad.Trans.Resource (allocate)
import qualified Data.Conduit.List as CL
import Filesystem (listDirectory, createTree, rem... | null | https://raw.githubusercontent.com/fpco/schoolofhaskell.com/15ec1a03cb9d593ee9c0d167dc522afe45ba4f8e/src/Handler/ExportAllTutorials.hs | haskell | Write tutorials to the temporary directory.
Make a .tar.gz of all the tutorials.
Serve the resulting tarball.
Make sure that either the user is the author, or
don't think this is really necessary. But I think
it's better to check!
NOTE: Doesn't guarantee that files will only be written into the
directory.
I ... | module Handler.ExportAllTutorials where
import Blaze.ByteString.Builder (Builder)
import Blaze.ByteString.Builder.ByteString (fromByteString)
import Control.Monad.Trans.Resource (allocate)
import qualified Data.Conduit.List as CL
import Filesystem (listDirectory, createTree, rem... |
0a8b40b802c57cd681f89054b0ad8953e338943f2ff35ca5d9039cf82c617e7c | ankushdas/Nomos | SafeIO.mli | (* Interface for SafeIO *)
type 'a result = Value of 'a | Exception of exn
val withOpenIn : string -> (in_channel -> 'a) -> 'a
| null | https://raw.githubusercontent.com/ankushdas/Nomos/db678f3981e75a1b3310bb55f66009bb23430cb1/rast/SafeIO.mli | ocaml | Interface for SafeIO |
type 'a result = Value of 'a | Exception of exn
val withOpenIn : string -> (in_channel -> 'a) -> 'a
|
f97393dbfd9a961d6bd5aa517e24f6fe3d2e712b0f6b4287919d243a78548992 | informatica-unica/lip | main.ml | open Ast
open Types
let parse (s : string) : cmd =
let lexbuf = Lexing.from_string s in
let ast = Parser.prog Lexer.read lexbuf in
ast
(******************************************************************************)
(* Big-step semantics of expressions *)
(************... | null | https://raw.githubusercontent.com/informatica-unica/lip/2ef000a48e6da3a9ab1fd0334ba958a9470c0716/imp/while/lib_bart/main.ml | ocaml | ****************************************************************************
Big-step semantics of expressions
****************************************************************************
****************************************************************************
... | open Ast
open Types
let parse (s : string) : cmd =
let lexbuf = Lexing.from_string s in
let ast = Parser.prog Lexer.read lexbuf in
ast
let rec eval_expr st = function
True -> Bool true
| False -> Bool false
| Var x -> st x
| Const n -> Nat n
| Not(e) -> (match eval_expr st e with
Bool b -... |
2438e5f8a18bb5d71a1dbdeea9a5eaec9b80fcbf1b492a4184ce13a29dcfd0ac | tlaplus/tlapm | schedule.ml |
* Copyright ( C ) 2012 Inria and Microsoft Corporation
* Copyright (C) 2012 Inria and Microsoft Corporation
*)
(* scheduler for back-end provers *)
open Unix
type task = int * (unit -> computation) list
and computation =
| Immediate of bool (* already computed, argument is success *)
| Todo of comma... | null | https://raw.githubusercontent.com/tlaplus/tlapm/158386319f5b6cd299f95385a216ade2b85c9f72/src/backend/schedule.ml | ocaml | scheduler for back-end provers
already computed, argument is success
must launch process
shell command line
delay before running timec
function to call after timeout
function to call when finished;
float is time used;
returns success
Take a computation, launch the process and return the c... |
* Copyright ( C ) 2012 Inria and Microsoft Corporation
* Copyright (C) 2012 Inria and Microsoft Corporation
*)
open Unix
type task = int * (unit -> computation) list
and computation =
and command = {
donec: result -> float -> bool;
}
and timeout_cont = unit -> continue
and continue =
| Timeout
... |
ef63295d56f76fa614cb712fa2b3b4876dba3c3c126c4ec5d9d4ada79bb7527f | goldfirere/singletons | GenDefunSymbols.hs | module Promote.GenDefunSymbols where
import Data.Singletons (Apply, type (~>))
import Data.Singletons.TH (genDefunSymbols)
import GHC.TypeLits hiding (type (*))
import Data.Kind (Type)
type family LiftMaybe (f :: a ~> b) (x :: Maybe a) :: Maybe b where
LiftMaybe f Nothing = Nothing
LiftMaybe f (Just a) = Just... | null | https://raw.githubusercontent.com/goldfirere/singletons/70d622645b960d60411ab8f31d16ffb91e69379e/singletons-base/tests/compile-and-dump/Promote/GenDefunSymbols.hs | haskell | module Promote.GenDefunSymbols where
import Data.Singletons (Apply, type (~>))
import Data.Singletons.TH (genDefunSymbols)
import GHC.TypeLits hiding (type (*))
import Data.Kind (Type)
type family LiftMaybe (f :: a ~> b) (x :: Maybe a) :: Maybe b where
LiftMaybe f Nothing = Nothing
LiftMaybe f (Just a) = Just... | |
9e950ec950e35ddf5a255428006d66f930592eb3caeff2bb91db87ed9bde055f | dbuenzli/brr | brr_ocaml_poke.mli | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The brr programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2... | null | https://raw.githubusercontent.com/dbuenzli/brr/3d1a0edd964a1ddfbf2be515fc3a3803d27ad707/src/ocaml_poke/brr_ocaml_poke.mli | ocaml | * [ocaml_poke] object for OCaml console.
See the {{!page-ocaml_console}OCaml console manual}
for more information.
* The type for OCaml poke objects. Note that the actual object
may live in another global context.
* [version p] is the version of the poke object interface.
* [ocaml_version p] is the OCam... | ---------------------------------------------------------------------------
Copyright ( c ) 2020 The brr programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2... |
bb7d28b781f55c44c409ebfaae32bcbd8c48aa0aa46e44c5786f823e78f05e5d | lateio/kurremkarmerruk | kurremkarmerruk_cache.erl | % ------------------------------------------------------------------------------
%
Copyright © 2018 - 2019 , < >
%
The ISC License
%
% Permission to use, copy, modify, and/or distribute this software for any
% purpose with or without fee is hereby granted, provided that the above
% copyright notice and this perm... | null | https://raw.githubusercontent.com/lateio/kurremkarmerruk/7743cb75e92ed6ffe0f147f96148299df47c9dcf/src/handlers/kurremkarmerruk_cache/kurremkarmerruk_cache.erl | erlang | ------------------------------------------------------------------------------
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SO... | Copyright © 2018 - 2019 , < >
The ISC License
THE SOFTWARE IS PROVIDED “ AS IS ” AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(kurremkarmerruk_cache).
-behavio... |
643467f450796246b21369c14ee62b7e4bad409cebef613117ac53c5c972a7c2 | sschauss/wracket | main.rkt | (module
(define- (fib n)
(if (<= n 2)
1
(+ (fib (- n 1)) (fib (- n 2)))))
(define+ (main n) (fib n)))
| null | https://raw.githubusercontent.com/sschauss/wracket/3bf5105715a27a4eb1c8cebfa676ed520a1927a3/assets/main.rkt | racket | (module
(define- (fib n)
(if (<= n 2)
1
(+ (fib (- n 1)) (fib (- n 2)))))
(define+ (main n) (fib n)))
| |
bc5be39497dc74274034d38fb10650b72704849b46457431a3931b5efc1cd97a | clojure-interop/java-jdk | DiagnosticCollector.clj | (ns javax.tools.DiagnosticCollector
"Provides an easy way to collect diagnostics in a list."
(:refer-clojure :only [require comment defn ->])
(:import [javax.tools DiagnosticCollector]))
(defn ->diagnostic-collector
"Constructor."
(^DiagnosticCollector []
(new DiagnosticCollector )))
(defn report
"Des... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.tools/src/javax/tools/DiagnosticCollector.clj | clojure | (ns javax.tools.DiagnosticCollector
"Provides an easy way to collect diagnostics in a list."
(:refer-clojure :only [require comment defn ->])
(:import [javax.tools DiagnosticCollector]))
(defn ->diagnostic-collector
"Constructor."
(^DiagnosticCollector []
(new DiagnosticCollector )))
(defn report
"Des... | |
d41f04a42834cec95e251db2cdcdcf7a0abacbf6537047cd6a863229c4b86cbe | s-cerevisiae/leetcode-racket | 337-house-robber-iii.rkt | #lang racket
(require "tree-node.rkt")
(define/match (to-rob node)
[(#f) 0]
[((tree-node val left right))
(+ val (not-to-rob left) (not-to-rob right))])
(define/match (not-to-rob node)
[(#f) 0]
[((tree-node val left right))
(+ (rob left) (rob right))])
(define (rob node)
(max (to-rob node) (not-to-r... | null | https://raw.githubusercontent.com/s-cerevisiae/leetcode-racket/520b9f450f943e070805230dabe98e4e4829ae97/337-house-robber-iii.rkt | racket | #lang racket
(require "tree-node.rkt")
(define/match (to-rob node)
[(#f) 0]
[((tree-node val left right))
(+ val (not-to-rob left) (not-to-rob right))])
(define/match (not-to-rob node)
[(#f) 0]
[((tree-node val left right))
(+ (rob left) (rob right))])
(define (rob node)
(max (to-rob node) (not-to-r... | |
2ff1ec4c120eadf61e7805d7d835f86a2edd1abdc924d0750276f7464befaa96 | gonimo/gonimo | Internal.hs | # LANGUAGE RecursiveDo #
# LANGUAGE TupleSections #
# LANGUAGE RecordWildCards #
module Gonimo.Client.Reflex.Dom.WebSocket.Internal where
import Prelude hiding (all, concat, concatMap, div, mapM, mapM_, sequence, span)
import Reflex.Class
import Reflex.PerformEvent.Class
import Reflex.TriggerEvent.Class
import Contr... | null | https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/front/src/Gonimo/Client/Reflex/Dom/WebSocket/Internal.hs | haskell | | Send messages over the WebSocket
| Close the Config. (It will be re-opened!)
| Timeout after close, until close is forced.
Nothing: No timeout, on configOnClose we will simply tell the WebSocket to
close and wait for it to finish.
Just x: We tell the websocket to close, but after x seconds we will
simp... | # LANGUAGE RecursiveDo #
# LANGUAGE TupleSections #
# LANGUAGE RecordWildCards #
module Gonimo.Client.Reflex.Dom.WebSocket.Internal where
import Prelude hiding (all, concat, concatMap, div, mapM, mapM_, sequence, span)
import Reflex.Class
import Reflex.PerformEvent.Class
import Reflex.TriggerEvent.Class
import Contr... |
b7616e49069e2d09019a341ddfcfe28d00d9266f8fc9e0a3f6bb4a4cd5c4265e | philnguyen/soft-contract | index-huh.rkt | #lang racket/base
(require (only-in typed/racket/base index?)
racket/contract/base)
(define (f x) (if (index? x) (+ 1 x) 42.0))
(provide
(contract-out
[f (any/c . -> . (not/c exact?))]))
| null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/unsafe/issues/index-huh.rkt | racket | #lang racket/base
(require (only-in typed/racket/base index?)
racket/contract/base)
(define (f x) (if (index? x) (+ 1 x) 42.0))
(provide
(contract-out
[f (any/c . -> . (not/c exact?))]))
| |
523d7b2ddbfb93a12021b81c27815470b2b4eb0ddb4cb35d2570bf6588065cd1 | brendanhay/gogol | Speech.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-speech/gen/Gogol/Speech.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Converts audio to text by applying powerful neural network models.
* Configuration
* Resources
** speech.projects.locations.operations.get
** speech.projects.locations.operations.list
* Types
** Xgafv
** ListOperationsResp... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
340b4668d2605914f0a81fadafeded466980af82009c9136e3e75d540198519a | gas2serra/mcclim-desktop | parameters.lisp | (in-package :desktop-task-manager)
| null | https://raw.githubusercontent.com/gas2serra/mcclim-desktop/f85d19c57d76322ae3c05f98ae43bfc8c0d0a554/Apps/task-manager/gui/parameters.lisp | lisp | (in-package :desktop-task-manager)
| |
f8930550021b5be072a9a1bb046de02ae1baa5008ecbd726850612fd3296ebba | GracielaUSB/graciela | Program.hs | # LANGUAGE NamedFieldPuns #
{-# LANGUAGE TupleSections #-}
module Language.Graciela.LLVM.Program where
--------------------------------------------------------------------------------
import Language.Graciela.AST.Definition
import Language.Graciela.AST.Instruction (Instruction)
import ... | null | https://raw.githubusercontent.com/GracielaUSB/graciela/db69c8b225d6172aaa0ff90a67f4a997e4d8a0c6/src/Haskell/Language/Graciela/LLVM/Program.hs | haskell | # LANGUAGE TupleSections #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
^ Files for read instructions
^ Declared types
^ AST... | # LANGUAGE NamedFieldPuns #
module Language.Graciela.LLVM.Program where
import Language.Graciela.AST.Definition
import Language.Graciela.AST.Instruction (Instruction)
import Language.Graciela.AST.Program
import qualified Language.Graciela.AST.Program as P (structs)
import ... |
0f6256d8df7e772454dc74a42b2fbff2b5dbb11b8dd0322db0d047fdc96b66a2 | jcurbo/functionally-reactive-solar-system | OpenGLTest.hs | module Main (main) where
import qualified Graphics.UI.Gtk as Gtk
import Graphics.UI.Gtk (AttrOp((:=)))
import qualified Graphics.UI.Gtk.OpenGL as GtkGL
import Graphics.Rendering.OpenGL as GL
main :: IO ()
main = do
Gtk.initGUI
Initialise the Gtk+ OpenGL extension
-- (including reading various command lin... | null | https://raw.githubusercontent.com/jcurbo/functionally-reactive-solar-system/4dd4fcc4ac822e7ff7e8d7fe7ce50e991077cc0f/misc/OpenGLTest.hs | haskell | (including reading various command line parameters)
We need a OpenGL frame buffer configuration to be able to create other
OpenGL objects.
Create an OpenGL drawing area widget
we are using wouldn't heve been setup yet)
Set the repaint handler
Setup the animation
------------------------------
Setup the rest of ... | module Main (main) where
import qualified Graphics.UI.Gtk as Gtk
import Graphics.UI.Gtk (AttrOp((:=)))
import qualified Graphics.UI.Gtk.OpenGL as GtkGL
import Graphics.Rendering.OpenGL as GL
main :: IO ()
main = do
Gtk.initGUI
Initialise the Gtk+ OpenGL extension
GtkGL.initGL
glconfig <- GtkGL.glConf... |
b92e9f7165a9f919f35c6a5ededfcb5826d67a447cfb81ae61c9214bb2890684 | cbaggers/rtg-math | consing.lisp | (in-package :rtg-math.region.axis-aligned-box)
(defn-inline maxima ((aab axis-aligned-box)) vec3
(declare (optimize (speed 3) (safety 1) (debug 1)))
(axis-aligned-box-maxima aab))
(defn-inline minima ((aab axis-aligned-box)) vec3
(declare (optimize (speed 3) (safety 1) (debug 1)))
(axis-aligned-box-minima aab... | null | https://raw.githubusercontent.com/cbaggers/rtg-math/29fc5b3d0028a4a11a82355ecc8cca62662c69e0/regions/aab/consing.lisp | lisp | ------------------------------------------------------------
------------------------------------------------------------
{TODO} - change this to work on sequences
- dont use loop so that we can declare types
------------------------------------------------------------
-----------------------------------------... | (in-package :rtg-math.region.axis-aligned-box)
(defn-inline maxima ((aab axis-aligned-box)) vec3
(declare (optimize (speed 3) (safety 1) (debug 1)))
(axis-aligned-box-maxima aab))
(defn-inline minima ((aab axis-aligned-box)) vec3
(declare (optimize (speed 3) (safety 1) (debug 1)))
(axis-aligned-box-minima aab... |
71c331070a85d6dcbaf12ec069620e44aa674a6d413058175d91474e8330ee9e | philnguyen/soft-contract | ex-01.rkt | #lang racket
(require soft-contract/fake-contract)
(define (f x)
(if (number? x) (add1 x) #|HERE|# (add1 x)))
(provide/contract [f (any/c . -> . number?)])
| null | https://raw.githubusercontent.com/philnguyen/soft-contract/5e07dc2d622ee80b961f4e8aebd04ce950720239/soft-contract/test/programs/unsafe/octy/ex-01.rkt | racket | HERE | #lang racket
(require soft-contract/fake-contract)
(define (f x)
(provide/contract [f (any/c . -> . number?)])
|
7b0d5724289825411106415ee317fd181b42b260a19f50983b96fd8fddefd7e3 | anoma/juvix | Pretty.hs | module Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.Scoping.Error.Pretty
( module Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.Scoping.Error.Pretty,
module Juvix.Data.CodeAnn,
)
where
import Juvix.Compiler.Concrete.Pretty.Base qualified as Scoped
import Juvix.Data.CodeAnn
import Juvix.Dat... | null | https://raw.githubusercontent.com/anoma/juvix/098c256da83556f8b32a831468a8d38783a967e8/src/Juvix/Compiler/Concrete/Translation/FromParsed/Analysis/Scoping/Error/Pretty.hs | haskell | module Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.Scoping.Error.Pretty
( module Juvix.Compiler.Concrete.Translation.FromParsed.Analysis.Scoping.Error.Pretty,
module Juvix.Data.CodeAnn,
)
where
import Juvix.Compiler.Concrete.Pretty.Base qualified as Scoped
import Juvix.Data.CodeAnn
import Juvix.Dat... | |
a1c4fd6350ddb79e83a5f2755dbf6efa0b2efd92565dac2f9728d01dbe5ea749 | clojure-emacs/clj-suitable | js_introspection.cljs | (ns suitable.js-introspection
(:require [clojure.string :refer [starts-with?]]
[goog.object :refer [get] :rename {get oget}]))
(def own-property-descriptors
(if (js-in "getOwnPropertyDescriptors" js/Object)
;; ES 6+ version
(fn [obj] (js/Object.getOwnPropertyDescriptors obj))
;; ES 5.1 vers... | null | https://raw.githubusercontent.com/clojure-emacs/clj-suitable/ced9e834666510154de794821ecd9f2e680af2c8/src/main/suitable/js_introspection.cljs | clojure | ES 6+ version
ES 5.1 version
(-> js/console property-names-and-types pprint) | (ns suitable.js-introspection
(:require [clojure.string :refer [starts-with?]]
[goog.object :refer [get] :rename {get oget}]))
(def own-property-descriptors
(if (js-in "getOwnPropertyDescriptors" js/Object)
(fn [obj] (js/Object.getOwnPropertyDescriptors obj))
(fn [obj] (->> obj
... |
efc16f7a8e812ad05d081a161271c9f58ed2e139e1de7709519f9001c068be06 | thi-ng/geom | heatmap.clj | (require '[thi.ng.geom.viz.core :as viz] :reload)
(require '[thi.ng.geom.svg.core :as svg])
(require '[thi.ng.geom.vector :as v])
(require '[thi.ng.color.core :as col])
(require '[thi.ng.math.core :as m :refer [PI TWO_PI]])
(require '[thi.ng.color.gradients :as grad])
(require '[thi.ng.geom.core :as g])
(require '[thi.... | null | https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/examples/viz/heatmap.clj | clojure | using custom shape function applied for each matrix cell | (require '[thi.ng.geom.viz.core :as viz] :reload)
(require '[thi.ng.geom.svg.core :as svg])
(require '[thi.ng.geom.vector :as v])
(require '[thi.ng.color.core :as col])
(require '[thi.ng.math.core :as m :refer [PI TWO_PI]])
(require '[thi.ng.color.gradients :as grad])
(require '[thi.ng.geom.core :as g])
(require '[thi.... |
58c3727d233fddb811621ed148df3744f582ca4aa45c9375d1a217f3c4b57771 | ulrikstrid/ocaml-jose | Helpers.ml | type 'a error_t =
[> `Msg of string
| `Expired
| `Json_parse_failed of string
| `Unsupported_kty
| `Invalid_signature
| `Invalid_JWE
| `Invalid_JWK
| `Decrypt_cek_failed
| `Unsafe
| `Not_json
| `Not_supported ]
as
'a
let result_t : _ error_t Alcotest.testable =
let pp ppf = function
| `... | null | https://raw.githubusercontent.com/ulrikstrid/ocaml-jose/5163635d0732a6a621baa0afeb6d7dfc8d81688c/test/Helpers.ml | ocaml | type 'a error_t =
[> `Msg of string
| `Expired
| `Json_parse_failed of string
| `Unsupported_kty
| `Invalid_signature
| `Invalid_JWE
| `Invalid_JWK
| `Decrypt_cek_failed
| `Unsafe
| `Not_json
| `Not_supported ]
as
'a
let result_t : _ error_t Alcotest.testable =
let pp ppf = function
| `... | |
071d4a622ee3f11e664ed35c621be67cc1d1081b2f3867854327db1292de4fb3 | VisionsGlobalEmpowerment/webchange | core.clj | (ns webchange.test.fixtures.core
(:require [clojure.test :refer :all]
[webchange.db.core :refer [*db*] :as db]
[webchange.auth.core :as auth]
[webchange.accounts.core :as accounts]
[webchange.assets.core :as assets]
[webchange.handler :as handler]
... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/8b64c57a4ba384d08d2f078648c36b6f70039d5d/test/clj/webchange/test/fixtures/core.clj | clojure | (ns webchange.test.fixtures.core
(:require [clojure.test :refer :all]
[webchange.db.core :refer [*db*] :as db]
[webchange.auth.core :as auth]
[webchange.accounts.core :as accounts]
[webchange.assets.core :as assets]
[webchange.handler :as handler]
... | |
ddf702df7917be22bfc8ca6d9d6d90822938086af5ec10fe1b773e0b3e1f3c83 | nubank/vessel | credentials.clj | (ns vessel.jib.credentials
(:require [clojure.string :as string]
[cognitect.aws.client.api :as aws]
[vessel.jib.helpers :as jib.helpers])
(:import [com.google.cloud.tools.jib.api Credential CredentialRetriever ImageReference]
com.google.cloud.tools.jib.frontend.CredentialRetriever... | null | https://raw.githubusercontent.com/nubank/vessel/40036928d20cfd07b31b99bb2389d5421c49d26d/src/vessel/jib/credentials.clj | clojure | (ns vessel.jib.credentials
(:require [clojure.string :as string]
[cognitect.aws.client.api :as aws]
[vessel.jib.helpers :as jib.helpers])
(:import [com.google.cloud.tools.jib.api Credential CredentialRetriever ImageReference]
com.google.cloud.tools.jib.frontend.CredentialRetriever... | |
3ed06c93cbb1634b45d0fd163583672ab28f9f8c59fd84eff1c83047b3255252 | funkenblatt/figwheel-test | snake_levels.cljs | (ns figwheel-test.snake-levels)
(def levels
[
;; Level 1
[{:type :figwheel-test.snake/line, :p1 [-415 44], :p2 [-415 -313]}
{:type :figwheel-test.snake/line, :p1 [-415 -313], :p2 [-55 -313]}
{:type :figwheel-test.snake/line, :p1 [-51 246], :p2 [377 246]}
{:type :figwheel-test.snake/line, :p1 [377 2... | null | https://raw.githubusercontent.com/funkenblatt/figwheel-test/03ca55406fde1f01b21c904f63840c3e1d6d8809/cljs/figwheel_test/snake_levels.cljs | clojure | Level 1
Level 2
Level 3
Level 4
Level 5
Level 6
Level 7
Level 8 | (ns figwheel-test.snake-levels)
(def levels
[
[{:type :figwheel-test.snake/line, :p1 [-415 44], :p2 [-415 -313]}
{:type :figwheel-test.snake/line, :p1 [-415 -313], :p2 [-55 -313]}
{:type :figwheel-test.snake/line, :p1 [-51 246], :p2 [377 246]}
{:type :figwheel-test.snake/line, :p1 [377 246], :p2 [377 ... |
d0b1dde1293f83d076207b574b77a3b79aa355cd36684baca7933a9ff79525c3 | janestreet/vcaml | test_keyboard_interrupts.ml | open Core
open Async
open Import
open Vcaml
open Vcaml_test_helpers
[%%import "config_ext.h"]
[%%if defined JSC_LINUX_EXT && defined JSC_UNIX_PTY]
let posix_openpt = ok_exn Unix_pseudo_terminal.posix_openpt
let grantpt = ok_exn Unix_pseudo_terminal.grantpt
let unlockpt = ok_exn Unix_pseudo_terminal.unlockpt
let ptsn... | null | https://raw.githubusercontent.com/janestreet/vcaml/64d205c2d6eee4a7e57abd2d452f5979dc6cd797/test/semantics/test_keyboard_interrupts.ml | ocaml | There is some undocumented internal limit for the socket length (it doesn't
appear in `:h limits`) so to ensure we create a socket we set the working dir
to [tmp_dir] and create the socket with a relative path.
We do *not* want to run with --headless here. | open Core
open Async
open Import
open Vcaml
open Vcaml_test_helpers
[%%import "config_ext.h"]
[%%if defined JSC_LINUX_EXT && defined JSC_UNIX_PTY]
let posix_openpt = ok_exn Unix_pseudo_terminal.posix_openpt
let grantpt = ok_exn Unix_pseudo_terminal.grantpt
let unlockpt = ok_exn Unix_pseudo_terminal.unlockpt
let ptsn... |
70db3ab4ef614f481855c1eed152cc2321921d939ae5d2172fc09983723d32ae | alexandroid000/improv | Unregister.hs | -- |Helper to unregister all ROS-related packages known by @ghc-pkg@.
module Unregister (unregisterInteractive) where
import Control.Applicative
import Data.Char
import Data.List
import Data.Maybe
import PkgBuilder (myReadProcess, toolPaths, ToolPaths(..))
import System.Exit (ExitCode(..))
import System.IO (hFlush, std... | null | https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/src/executable/Unregister.hs | haskell | |Helper to unregister all ROS-related packages known by @ghc-pkg@. | module Unregister (unregisterInteractive) where
import Control.Applicative
import Data.Char
import Data.List
import Data.Maybe
import PkgBuilder (myReadProcess, toolPaths, ToolPaths(..))
import System.Exit (ExitCode(..))
import System.IO (hFlush, stdout)
import System.Process
findROSPackages :: ToolPaths -> IO [String... |
83fc6eb065e1f642ba3c061f916006a34df3f1d2d46f52e3f9a8722e8e58451c | luc-tielen/eclair-lang | BTree.hs | # OPTIONS_GHC -Wno - incomplete - uni - patterns #
# LANGUAGE RecursiveDo , FlexibleContexts , ScopedTypeVariables #
module Eclair.LLVM.BTree
( Meta(..)
, SearchIndex
, SearchType(..)
, codegen
) where
import Prelude hiding (void, swap)
import Control.Monad.Morph
import qualified Data.Map as Map
import Ecla... | null | https://raw.githubusercontent.com/luc-tielen/eclair-lang/fc07f28252ae26dc81e4fc7925dcc74e22c8c1f7/lib/Eclair/LLVM/BTree.hs | haskell | Amount of columns each node has
Which columns are used to index values
Number of bytes per btree node
Search strategy used in a single node
TODO: use "withCommas"
parent
position_in_parent
num_elements
node type
Note: used to be size_t/i64
parent
position_in_parent
num_elements
node type
meta
values
ba... | # OPTIONS_GHC -Wno - incomplete - uni - patterns #
# LANGUAGE RecursiveDo , FlexibleContexts , ScopedTypeVariables #
module Eclair.LLVM.BTree
( Meta(..)
, SearchIndex
, SearchType(..)
, codegen
) where
import Prelude hiding (void, swap)
import Control.Monad.Morph
import qualified Data.Map as Map
import Ecla... |
edc966e07a2f15726123e268693f5df59a1b234979dfe45c653f6605f8c898e6 | andrewthad/sockets | AddrLength.hs | # language DuplicateRecordFields #
module Socket.AddrLength
( Buffer
, advance
, length
, sendOnce
, receiveOnce
) where
import Prelude hiding (length)
import Data.Bytes.Types (UnmanagedBytes(UnmanagedBytes))
import Posix.Socket (uninterruptibleSend,noSignal)
import Posix.Socket (uninterruptibleReceive)
... | null | https://raw.githubusercontent.com/andrewthad/sockets/90d314bd2ec71b248a90da6ad964c679f75cfcca/src-internal/Socket/AddrLength.hs | haskell | # inline advance #
# inline intToCSize # | # language DuplicateRecordFields #
module Socket.AddrLength
( Buffer
, advance
, length
, sendOnce
, receiveOnce
) where
import Prelude hiding (length)
import Data.Bytes.Types (UnmanagedBytes(UnmanagedBytes))
import Posix.Socket (uninterruptibleSend,noSignal)
import Posix.Socket (uninterruptibleReceive)
... |
518b79c2d1c1902a352b647d5e8bc0ada9d916ffec640cf12ae198e50ae622f9 | osa1/sc-plugin | FreeVars.hs | {-# LANGUAGE Rank2Types #-}
# OPTIONS_GHC -fno - warn - missing - signatures #
module Supercompile.Core.FreeVars (
module Supercompile.Core.FreeVars,
module VarSet,
tyVarsOfType, tyVarsOfTypes, tyCoVarsOfCo
) where
import Supercompile.Core.Syntax
import Supercompile.Utilities
import Supercompilation.Sho... | null | https://raw.githubusercontent.com/osa1/sc-plugin/1969ad81f16ca8ed8110ca8dadfccf6f3d463635/src/Supercompile/Core/FreeVars.hs | haskell | # LANGUAGE Rank2Types #
We have our own version of idFreeVars so we can treat global variables as free
No global tyvars, so no problem
No global tyvars, so no problem
Returns the most tightly binding variable last | # OPTIONS_GHC -fno - warn - missing - signatures #
module Supercompile.Core.FreeVars (
module Supercompile.Core.FreeVars,
module VarSet,
tyVarsOfType, tyVarsOfTypes, tyCoVarsOfCo
) where
import Supercompile.Core.Syntax
import Supercompile.Utilities
import Supercompilation.Show
import Coercion (tyCoVars... |
d9cbed9c83e618381981f8eb0952bfc715803735ae5562ac66b64b5bac3c90ef | WormBase/wormbase_rest | sequences.clj | (ns rest-api.classes.protein.widgets.sequences
(:require
[clojure.java.jdbc :as jdbc]
[clojure.string :as str]
[rest-api.db.sequence :as wb-seq]
[rest-api.classes.generic-fields :as generic])
(:import (org.biojava.nbio.core.sequence ProteinSequence DNASequence)
(org.biojava.nbio.aapropert... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/protein/widgets/sequences.clj | clojure | (ns rest-api.classes.protein.widgets.sequences
(:require
[clojure.java.jdbc :as jdbc]
[clojure.string :as str]
[rest-api.db.sequence :as wb-seq]
[rest-api.classes.generic-fields :as generic])
(:import (org.biojava.nbio.core.sequence ProteinSequence DNASequence)
(org.biojava.nbio.aapropert... | |
640091363479416686a3b0639998cd9d5287b35feef0d0c6b59fdaaa3af3d7b1 | CloudI/CloudI | ranch_ct_hook.erl | Copyright ( c ) 2015 - 2016 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_ranch1/test/ranch_ct_hook.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2015 - 2016 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(ranch1_ct_hook).
-export([init/2]).
init(_,... |
e2a4854fa0cc2ffc7663e99c97e8fde24ff047c9952071da8f572dee1e26d9fd | deadpendency/deadpendency | RunPreparerHandler.hs | # LANGUAGE DataKinds #
module RP.Handler.RunPreparerHandler
( runPreparerHandler,
RunPreparerRoute,
)
where
import Common.Effect.AppEventEmit.AppEventEmit
import Common.Effect.AppEventEmit.Model.AppEventAdditional
import Common.Effect.AppEventEmit.Model.AppEventMessage
import Common.Effect.InterchangeEventLoa... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/run-preparer/src/RP/Handler/RunPreparerHandler.hs | haskell | decode queue event and log and put in state
in the future this will throw a processing failure
retrieve config
the run is pulled from state for queue publishing as well, so we need to update it with the config here
finish up | # LANGUAGE DataKinds #
module RP.Handler.RunPreparerHandler
( runPreparerHandler,
RunPreparerRoute,
)
where
import Common.Effect.AppEventEmit.AppEventEmit
import Common.Effect.AppEventEmit.Model.AppEventAdditional
import Common.Effect.AppEventEmit.Model.AppEventMessage
import Common.Effect.InterchangeEventLoa... |
2131b496b84af93bbba5cf3b5d1cb71ad220b70306f61856427b013803b647f5 | well-typed/large-records | R010.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
{-# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #-}
module Experiment.ConstructNoTypeLet.Sized.R010 where
import Data.Record.Anon.Simple ... | null | https://raw.githubusercontent.com/well-typed/large-records/78d0966e4871847e2c17a0aa821bacf38bdf96bc/large-records-benchmarks/bench/large-anon/Experiment/ConstructNoTypeLet/Sized/R010.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings #
# OPTIONS_GHC -fplugin=Data.Record.Anon.Plugin #
00 .. 09 | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
module Experiment.ConstructNoTypeLet.Sized.R010 where
import Data.Record.Anon.Simple (Record)
import Bench.Types
import Common.RowOfSize.Row010
record :: Word -> Record ExampleRow
record x = ANON {
t00 = MkT x
, t01 = MkT x
, t02 = MkT x
, t03... |
469d8bd3c6c0e3a23f000b945fb8f5b973f0069b9b9f235beac2f201589fab51 | w3ntao/programming-in-haskell | Exercise_4_8_1.hs | # OPTIONS_GHC -Wall #
module Exercise_4_8_1 where
halve :: [a] -> ([a], [a])
halve xs = (take n xs, drop n xs)
where n = length xs `div` 2 | null | https://raw.githubusercontent.com/w3ntao/programming-in-haskell/c2769fa19d8507aad209818c83f67e82c3698f07/Chapter-4/Exercise_4_8_1.hs | haskell | # OPTIONS_GHC -Wall #
module Exercise_4_8_1 where
halve :: [a] -> ([a], [a])
halve xs = (take n xs, drop n xs)
where n = length xs `div` 2 | |
cea0ac98069ba466365715142b148e87d0d0aba87fc023d87b4a0c531161a40c | aleator/CV | PyramidNoise.hs | # LANGUAGE ScopedTypeVariables #
module Main where
import CV.Image
import CV.MultiresolutionSpline
import CV.ImageOp
import CV.Drawing
import CV.Filters
import CV.ImageMathOp
import Control.Applicative
import Data.Maybe
import qualified CV.ImageMath as IM
import CV.Transforms
import System.Environment
absTresh :: D3... | null | https://raw.githubusercontent.com/aleator/CV/1e2c9116bcaacdf305044c861a1b36d0d8fb71b7/examples/PyramidNoise.hs | haskell | # LANGUAGE ScopedTypeVariables #
module Main where
import CV.Image
import CV.MultiresolutionSpline
import CV.ImageOp
import CV.Drawing
import CV.Filters
import CV.ImageMathOp
import Control.Applicative
import Data.Maybe
import qualified CV.ImageMath as IM
import CV.Transforms
import System.Environment
absTresh :: D3... | |
d5b821d67261f5fd2174e8369671b6381c2c5e17edde249be785c506f3dd17eb | jrclogic/SMCDEL | SimpleS5.hs | module SMCDEL.Examples.SimpleS5 where
import Data.List ((\\))
import SMCDEL.Explicit.S5
import SMCDEL.Translations.S5
import SMCDEL.Symbolic.S5
import SMCDEL.Language
myStart :: KnowScene
myStart = (KnS [P 0] (boolBddOf Top) [("Alice",[]),("Bob",[P 0])],[P 0])
publicMakeFalse :: [Agent] -> Prp -> Event
publicMakeFa... | null | https://raw.githubusercontent.com/jrclogic/SMCDEL/10bd5ba2f1f3cc85e4b0f23d5eddbb26f05df5bf/src/SMCDEL/Examples/SimpleS5.hs | haskell | module SMCDEL.Examples.SimpleS5 where
import Data.List ((\\))
import SMCDEL.Explicit.S5
import SMCDEL.Translations.S5
import SMCDEL.Symbolic.S5
import SMCDEL.Language
myStart :: KnowScene
myStart = (KnS [P 0] (boolBddOf Top) [("Alice",[]),("Bob",[P 0])],[P 0])
publicMakeFalse :: [Agent] -> Prp -> Event
publicMakeFa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.