_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 |
|---|---|---|---|---|---|---|---|---|
2f71fcafbfd607b967b8fca7fcd24a3671e887bffe7792b7bfc562ffd3de3f8e | janestreet/universe | sexp_conv.mli | (** Utility Module for S-expression Conversions *)
(** Dummy definitions for "optional" options, lists, and for opaque types *)
type sexp_bool = bool
[@@deprecated "[since 2019-03] use [@sexp.bool] instead"]
type 'a sexp_option = 'a option
[@@deprecated "[since 2019-03] use [@sexp.option] instead"]
type 'a sexp_list =... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/sexplib0/src/sexp_conv.mli | ocaml | * Utility Module for S-expression Conversions
* Dummy definitions for "optional" options, lists, and for opaque types
* [default_string_of_float] reference to the default function used
to convert floats to strings.
Initially set to [fun n -> sprintf "%.20G" n].
* [read_old_option_format] reference for the d... |
type sexp_bool = bool
[@@deprecated "[since 2019-03] use [@sexp.bool] instead"]
type 'a sexp_option = 'a option
[@@deprecated "[since 2019-03] use [@sexp.option] instead"]
type 'a sexp_list = 'a list
[@@deprecated "[since 2019-03] use [@sexp.list] instead"]
type 'a sexp_array = 'a array
[@@deprecated "[since 2019-03] ... |
cfd0a1afba3cdb671b034fa89ec768c21df531c86a4a271866f335e459cf3f19 | gtk2hs/gtk2hs | CNames.hs | C->Haskell Compiler : C name analysis
--
Author :
Created : 16 October 99
--
Version $ Revision : 1.2 $ from $ Date : 2005/07/29 01:26:56 $
--
Copyright ( c ) 1999
--
-- This file is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as p... | null | https://raw.githubusercontent.com/gtk2hs/gtk2hs/0f90caa1dae319a0f4bbab76ed1a84f17c730adf/tools/c2hs/c/CNames.hs | haskell |
This file is free software; you can redistribute it and/or modify
(at your option) any later version.
This file is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Pub... | C->Haskell Compiler : C name analysis
Author :
Created : 16 October 99
Version $ Revision : 1.2 $ from $ Date : 2005/07/29 01:26:56 $
Copyright ( c ) 1999
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or... |
a1d3e29ce8db52ff9232befc61331b46f7200eb33d7049134d3a235385e3448f | ashwinbhaskar/kafka-util | spec.clj | (ns kafka-util.spec
(:require [clojure.spec.alpha :as s]
[kafka-util.utils :as u]))
(s/def ::broker (s/and string? u/not-nil? not-empty))
(s/def ::port pos-int?)
(s/def ::security-protocol #{"SSL" "PLAINTEXT" "SASL_PLAINTEXT" "SASL_SSL"})
(s/def ::key-deserializer #{:string :long})
(s/def ::decode-va... | null | https://raw.githubusercontent.com/ashwinbhaskar/kafka-util/9284c43856911749a22a036508b3538fe869b60f/src/kafka_util/spec.clj | clojure | (ns kafka-util.spec
(:require [clojure.spec.alpha :as s]
[kafka-util.utils :as u]))
(s/def ::broker (s/and string? u/not-nil? not-empty))
(s/def ::port pos-int?)
(s/def ::security-protocol #{"SSL" "PLAINTEXT" "SASL_PLAINTEXT" "SASL_SSL"})
(s/def ::key-deserializer #{:string :long})
(s/def ::decode-va... | |
f967637727e5980618ebd61edf2e1054719aa32f1097b7dbc767491dc738cece | broadinstitute/firecloud-ui | create_notebook.cljs | (ns broadfcui.page.workspace.notebooks.create-notebook
(:require
[dmohs.react :as react]
[broadfcui.common.components :as comps]
[broadfcui.common.input :as input]
[broadfcui.common.style :as style]
[broadfcui.components.blocker :refer [blocker]]
[broadfcui.components.foundation-tooltip :refer [Foun... | null | https://raw.githubusercontent.com/broadinstitute/firecloud-ui/8eb077bc137ead105db5665a8fa47a7523145633/src/cljs/main/broadfcui/page/workspace/notebooks/create_notebook.cljs | clojure | fail if a notebook already exists with the same name | (ns broadfcui.page.workspace.notebooks.create-notebook
(:require
[dmohs.react :as react]
[broadfcui.common.components :as comps]
[broadfcui.common.input :as input]
[broadfcui.common.style :as style]
[broadfcui.components.blocker :refer [blocker]]
[broadfcui.components.foundation-tooltip :refer [Foun... |
0901a600a234f57f0a3bcdcc168e7909a5a491cf184d1a973e2038ce588defd4 | pbogdan/nvs | Main.hs | module Main where
import Protolude
import Nvs.Cli
main :: IO ()
main = defaultMain
| null | https://raw.githubusercontent.com/pbogdan/nvs/d9705b34a4385e64700c4f4f54171b65bc73b1ee/app/Main.hs | haskell | module Main where
import Protolude
import Nvs.Cli
main :: IO ()
main = defaultMain
| |
46bd9e45ded5f180195e86d85047cba1dcd5c8e602c5a6193636cf8b5236e26f | marigold-dev/deku | external_vm_client.mli | open Deku_crypto
open Deku_stdlib
open External_vm_protocol
exception Vm_lifecycle_error of string
exception Vm_execution_error of string
val get_initial_state : unit -> State.t
val set_initial_state : State.t -> unit
val start_vm_ipc : named_pipe_path:string -> unit
type ledger_api =
< take_tickets : Deku_ledger.... | null | https://raw.githubusercontent.com/marigold-dev/deku/6d11a7de26dbbdec54439503e81def45ed19b45e/deku-p/src/core/external_vm/external_vm_client.mli | ocaml | open Deku_crypto
open Deku_stdlib
open External_vm_protocol
exception Vm_lifecycle_error of string
exception Vm_execution_error of string
val get_initial_state : unit -> State.t
val set_initial_state : State.t -> unit
val start_vm_ipc : named_pipe_path:string -> unit
type ledger_api =
< take_tickets : Deku_ledger.... | |
c02646e2d763da851c2b8e71d328d1e01ce76901c957e18e4025187e5b557928 | dgiot/dgiot | emqx_broker_bench.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/dgiot/dgiot/c601555e45f38d02aafc308b18a9e28c543b6f2c/src/emqx_broker_bench.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2021 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_broker_bench).
-ifdef(EMQX_BENCHMARK).
-export([run/1, run1/0, run1/4]).
-define... |
1ce5088e381d3f4b2978f165d3f5159ccedbbcf8c54845589d3ec0eaa7e37351 | fadbadml-dev/FADBADml | exampleBADFAD1.ml | (**************************************************************************)
(* *)
(* FADBADml *)
(* *)
... | null | https://raw.githubusercontent.com/fadbadml-dev/FADBADml/bd5668433b8ad297aa70e91a032953d55923b533/example/exampleBADFAD1.ml | ocaml | ************************************************************************
FADBADml
... | OCaml port by and
Based on FADBAD++ , written by and
Copyright 2019 - 2020
This file is distributed under the terms of the CeCILL - C license .
module Op = Fadbad.OpFloat
module F = Fadbad.F(Op)
module BF = Fadbad.B(... |
3b9bbbb1cc7803065a32abff4e2165e6eaf37d5b213227621b232a31e1e35969 | quicklisp/quicklisp-client | network.lisp | ;;;
;;; Low-level networking implementations
;;;
(in-package #:ql-network)
(definterface host-address (host)
(:implementation t
host)
(:implementation sbcl
(ql-sbcl:host-ent-address (ql-sbcl:get-host-by-name host))))
(definterface open-connection (host port)
(:documentation "Open and return a network c... | null | https://raw.githubusercontent.com/quicklisp/quicklisp-client/e5c4345296387b630c0002ecf5e6b37ac13beb32/quicklisp/network.lisp | lisp |
Low-level networking implementations
|
(in-package #:ql-network)
(definterface host-address (host)
(:implementation t
host)
(:implementation sbcl
(ql-sbcl:host-ent-address (ql-sbcl:get-host-by-name host))))
(definterface open-connection (host port)
(:documentation "Open and return a network connection to HOST on the
given PORT.")
(:impl... |
d1bbdd6f499947ac67aabdd95ada2aa09aafc9822d58ef6e58a7eb42acc99492 | pallet/pallet-aws | ami_test.clj | (ns pallet.compute.ec2.ami-test
(:require
[clojure.test :refer :all]
[pallet.compute.ec2.ami :refer [parse]]))
(deftest parse-test
(is (= {:os-family :amzn-linux
:os-version "2013.09.0"
:user {:username "ec2-user"}}
(parse {:owner-id "137112412989"
:name "amzn-am... | null | https://raw.githubusercontent.com/pallet/pallet-aws/6f650ca93c853f8a574ad36875f4d164e46e8e8d/test/pallet/compute/ec2/ami_test.clj | clojure | (ns pallet.compute.ec2.ami-test
(:require
[clojure.test :refer :all]
[pallet.compute.ec2.ami :refer [parse]]))
(deftest parse-test
(is (= {:os-family :amzn-linux
:os-version "2013.09.0"
:user {:username "ec2-user"}}
(parse {:owner-id "137112412989"
:name "amzn-am... | |
50ff888251a3b352b85d12fd0cfc49c314e0b0fb26e4af60ac68d61da5cca5b3 | sbcl/sbcl | simd-fndb.lisp | This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
;;;; provided with absolutely no wa... | null | https://raw.githubusercontent.com/sbcl/sbcl/64245708810072990d9f054820e85bd8c618257f/src/code/simd-fndb.lisp | lisp | more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information. | This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB-VM")
(deftype 128-element ()
#+x86-64 '(simd-pack (unsigned-byte 32))
#+arm64 'complex-double-float)
(de... |
09ab4c5919686c52a527c5afbad31acf9d9ebd8d1d8df4ad6324745324bf6c23 | kframework/semantic-approaches | State.hs | # LANGUAGE NamedFieldPuns #
module Language.ImpPP.State
{- ( ImpPPEnv(..)
, initialEnv
, lookupEnv
, insertEnv
, pushEnv
, popEnv
, writeOut
) -}
where
TODO : lens tomfoolery , but does that make this ?
import Prelude hiding ( lookup )
import Data.Map.Strict ( Map, lookup, insert, empty, fromList,... | null | https://raw.githubusercontent.com/kframework/semantic-approaches/6f64eac09e005fe4eae7141e3c0e0f5711da0647/haskell/semantic-styles/src/Language/ImpPP/State.hs | haskell | ( ImpPPEnv(..)
, initialEnv
, lookupEnv
, insertEnv
, pushEnv
, popEnv
, writeOut
)
non-total should be unreachable | # LANGUAGE NamedFieldPuns #
module Language.ImpPP.State
where
TODO : lens tomfoolery , but does that make this ?
import Prelude hiding ( lookup )
import Data.Map.Strict ( Map, lookup, insert, empty, fromList, union)
import Language.ImpPP.Syntax.Abstract ( Id )
data ImpPPEnv
= ImpPPEnv
{ varEnv :: Map Id ... |
554a17f55ef71975003f9b1f413e90dea8af452c5549dee5d7fb3e78c52847b4 | haskell/cabal | Lens.hs | module Distribution.Types.ForeignLib.Lens (
ForeignLib,
module Distribution.Types.ForeignLib.Lens,
) where
import Distribution.Compat.Lens
import Distribution.Compat.Prelude
import Prelude ()
import Distribution.Types.BuildInfo (BuildInfo)
import Distribution.Types.ForeignLib (ForeignLi... | null | https://raw.githubusercontent.com/haskell/cabal/0abbe37187f708e0a5daac8d388167f72ca0db7e/Cabal-syntax/src/Distribution/Types/ForeignLib/Lens.hs | haskell | module Distribution.Types.ForeignLib.Lens (
ForeignLib,
module Distribution.Types.ForeignLib.Lens,
) where
import Distribution.Compat.Lens
import Distribution.Compat.Prelude
import Prelude ()
import Distribution.Types.BuildInfo (BuildInfo)
import Distribution.Types.ForeignLib (ForeignLi... | |
9ff1b8ebd59f31e1b818e3a2999422f8d8cfab8cfcc4d5d915f90fbd2b7339ea | rd--/hsc3 | hpf.help.hs | -- hpf
let f = fSinOsc kr (xLine kr 0.7 300 20 RemoveSynth) 0 * 3600 + 4000
in hpf (saw ar 200 * 0.1) f
hpf ; cutoff at one hertz
hpf (whiteNoiseId 'α' ar) 1 * 0.1
---- ; drawings
Sound.Sc3.Plot.FFT.plot_ugen_fft1 0.05 (hpf (whiteNoiseId 'α' ar) 12000)
| null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/hpf.help.hs | haskell | hpf
-- ; drawings | let f = fSinOsc kr (xLine kr 0.7 300 20 RemoveSynth) 0 * 3600 + 4000
in hpf (saw ar 200 * 0.1) f
hpf ; cutoff at one hertz
hpf (whiteNoiseId 'α' ar) 1 * 0.1
Sound.Sc3.Plot.FFT.plot_ugen_fft1 0.05 (hpf (whiteNoiseId 'α' ar) 12000)
|
a3b985854b537b3d12eac58f2b03ae8c40818df6e8f35d597381dbfe1ff0d37b | shamazmazum/easy-audio | package.lisp | (defpackage easy-audio.ape-examples
(:use #:cl
#:easy-audio.wav
#:easy-audio.ape
#:easy-audio.core)
(:nicknames #:ape-examples)
(:export #:ape2wav))
| null | https://raw.githubusercontent.com/shamazmazum/easy-audio/4944f4ac12ffbe96f2d6bb7b116deae8203080e8/ape/examples/package.lisp | lisp | (defpackage easy-audio.ape-examples
(:use #:cl
#:easy-audio.wav
#:easy-audio.ape
#:easy-audio.core)
(:nicknames #:ape-examples)
(:export #:ape2wav))
| |
d36039bdc0717ecd1d8d5dc58e561444589ed5f72960e9ce9d0c6240050193a2 | atlas-engineer/nyxt | status.lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :nyxt)
(export-always 'mode-status)
(defgeneric mode-status (status mode)
(:method ((status status-buffer) (mode mode))
(if (glyph-mode-presentation-p status)
(glyph mode)
(princ-to-string ... | null | https://raw.githubusercontent.com/atlas-engineer/nyxt/073021b9b5c01a0b555c1cf3045c51d7aadc479f/source/status.lisp | lisp | TODO: Firefox-like additional click actions? See
-US/kb/mouse-shortcuts-perform-common-tasks
However this function changes, it should always:
- Prevent IDN/Unicode-spoofing.
- Clearly show subdomains (except maybe "trivial" ones) to prevent
subdomain takeover attacks.
- Retain a clear display of which protocol... | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :nyxt)
(export-always 'mode-status)
(defgeneric mode-status (status mode)
(:method ((status status-buffer) (mode mode))
(if (glyph-mode-presentation-p status)
(glyph mode)
(princ-to-string ... |
55841c21b84f821432711d2d6499ac30b8f724627af43063a9a6be108061524b | anoma/zkp-compiler-shootout | package.lisp | (defpackage :triton-test
;; I really want to use mix, but alas Ι don't want to assume a
newer asdf for
(:shadowing-import-from :triton
:prod :case :tagbody :block :begin :drop :push :pop :return :call)
(:use #:serapeum #:cl #:triton #:fiveam)
(:local-nicknames)
(:export #:run-tests))
(in-package :trito... | null | https://raw.githubusercontent.com/anoma/zkp-compiler-shootout/05dce15ba113427942aec7e8e2c1d5e65599b02c/triton-assembler/test/package.lisp | lisp | I really want to use mix, but alas Ι don't want to assume a | (defpackage :triton-test
newer asdf for
(:shadowing-import-from :triton
:prod :case :tagbody :block :begin :drop :push :pop :return :call)
(:use #:serapeum #:cl #:triton #:fiveam)
(:local-nicknames)
(:export #:run-tests))
(in-package :triton-test)
|
52985ce0a1ec732db6910832489b867664b1c4bc964bd8b7a3cc75a68341df3c | simplex-chat/simplex-chat | WebRTCTests.hs | module WebRTCTests where
import Control.Monad.Except
import Crypto.Random (getRandomBytes)
import qualified Data.ByteString.Base64.URL as U
import qualified Data.ByteString.Char8 as B
import Simplex.Chat.Mobile.WebRTC
import qualified Simplex.Messaging.Crypto as C
import Test.Hspec
webRTCTests :: Spec
webRTCTests = d... | null | https://raw.githubusercontent.com/simplex-chat/simplex-chat/01acbb970ae7762e1551e352131453e77a601764/tests/WebRTCTests.hs | haskell | module WebRTCTests where
import Control.Monad.Except
import Crypto.Random (getRandomBytes)
import qualified Data.ByteString.Base64.URL as U
import qualified Data.ByteString.Char8 as B
import Simplex.Chat.Mobile.WebRTC
import qualified Simplex.Messaging.Crypto as C
import Test.Hspec
webRTCTests :: Spec
webRTCTests = d... | |
6bdca148971239baf5ddbabf2882608caf28223ff8d08dc59861d1c2fa0fe527 | Fresheyeball/Shpadoinkle | Search.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
module Shpadoinkle.Widgets.Types.Search where
import ... | null | https://raw.githubusercontent.com/Fresheyeball/Shpadoinkle/8e0efbb11857a1af47038dae07b8140291c251ed/widgets/Shpadoinkle/Widgets/Types/Search.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE OverloadedStrings # | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ViewPatterns #
module Shpadoinkle.Widgets.Types.Search where
import Data.Aeson (FromJSON, ToJSON)
import Data.Foldable as F (Foldable (foldl'))
import Data.List (sort)
import Data.Maybe ... |
38b4c02dedf4a5d0a8e95b778a5c268c53fa62e2c73245a7e43a2319f08b9cf9 | libguestfs/supermin | format_ext2_kernel.mli | supermin 5
* Copyright ( C ) 2009 - 2016 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... | null | https://raw.githubusercontent.com/libguestfs/supermin/fd9f17c7eb63979af882533a0d234bfc8ca42de3/src/format_ext2_kernel.mli | ocaml | * For [--build -f ext2] this module chooses a kernel to use
and either links to it or copies it.
See also the {!Format_ext2} module.
* [build_kernel debug host_cpu copy_kernel kernel]
chooses the kernel to use and links to it or copies it into the
appliance directory.
The output is written to the... | supermin 5
* Copyright ( C ) 2009 - 2016 Red Hat Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation ; either version 2 of the License , or
* ( at your option ) any later ... |
ec6fa086b9cd26049504f8d9a0689b81840be29129cefed8e803f24686b5d182 | g-andrade/erlwitness | erlwitness_lobby.erl | % vim: set expandtab softtabstop=4 shiftwidth=4:
-module(erlwitness_lobby).
-author('Guilherme Andrade <erlwitness(at)gandrade(dot)net>').
-behaviour(gen_server).
%% API functions
-export([watch/2,
unwatch/2,
unwatch_by_pid/1,
watchers_local_lookup/1,
is_entity_watched_by/2,
... | null | https://raw.githubusercontent.com/g-andrade/erlwitness/047ea86ea2fec9c3dab1ef091a3a1dfea23abaad/src/erlwitness_lobby.erl | erlang | vim: set expandtab softtabstop=4 shiftwidth=4:
API functions
gen_server callbacks
===================================================================
API functions
===================================================================
--------------------------------------------------------------------
@doc
Starts t... | -module(erlwitness_lobby).
-author('Guilherme Andrade <erlwitness(at)gandrade(dot)net>').
-behaviour(gen_server).
-export([watch/2,
unwatch/2,
unwatch_by_pid/1,
watchers_local_lookup/1,
is_entity_watched_by/2,
is_entity_watched/1]).
-export([start_link/0]).
-export([init... |
526797efc89dea1ef346436f25232d4201faa44d141a765e793f5bb9110ceb1f | GaloisInc/ivory | FibTutorial.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module FibTutorial where
import Ivory.Language
import qualified Ivory.Compile.C.CmdlineFrontend as C (compile)
fib_loop :: Def ('[Ix 1000] ':-> Uint32)
fib_loop = proc "fib_loop" $ \ n -> body $ do
a <- local (ival 0)
b <- local (ival 1)
n `times` \ _ -> do
... | null | https://raw.githubusercontent.com/GaloisInc/ivory/53a0795b4fbeb0b7da0f6cdaccdde18849a78cd6/ivory-examples/examples/FibTutorial.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
module FibTutorial where
import Ivory.Language
import qualified Ivory.Compile.C.CmdlineFrontend as C (compile)
fib_loop :: Def ('[Ix 1000] ':-> Uint32)
fib_loop = proc "fib_loop" $ \ n -> body $ do
a <- local (ival 0)
b <- local (ival 1)
n `times` \ _ -> do
... | |
b8383794af82acb5f202c16614a1ad6ae0c09a576b6a465a95a8bc863a79fe5a | cemerick/friend | middleware.clj | (ns test-friend.middleware
(:use clojure.test
[compojure.core :only (defroutes GET)]
[cemerick.friend :only (wrap-authorize)]))
(defroutes ^{:private true} routes
(GET "/path" request "Response"))
(deftest wrap-authorize-throws-on-empty-role-set
(testing "wrap-authorize throws IllegalArgumentExc... | null | https://raw.githubusercontent.com/cemerick/friend/75bb607179515c6abd0a76a11ee97895fb758963/test/test_friend/middleware.clj | clojure | (ns test-friend.middleware
(:use clojure.test
[compojure.core :only (defroutes GET)]
[cemerick.friend :only (wrap-authorize)]))
(defroutes ^{:private true} routes
(GET "/path" request "Response"))
(deftest wrap-authorize-throws-on-empty-role-set
(testing "wrap-authorize throws IllegalArgumentExc... | |
2c17baa5112f8679d39c9304e7d8b9106d3ce9df42ae795cfa32b755d1ac9694 | stumpwm/stumpwm-contrib | lock.lisp | (in-package #:stump-lock)
(defvar *password* nil
"The password to unlock.")
(stumpwm:defcommand lock-screen () ()
(unless *password*
(error "A password needs to be set. Please read the instructions."))
(loop
(if (string= (let ((stumpwm::*input-history* nil))
(stumpwm:read-one-line
... | null | https://raw.githubusercontent.com/stumpwm/stumpwm-contrib/a7dc1c663d04e6c73a4772c8a6ad56a34381096a/util/stump-lock/lock.lisp | lisp | (in-package #:stump-lock)
(defvar *password* nil
"The password to unlock.")
(stumpwm:defcommand lock-screen () ()
(unless *password*
(error "A password needs to be set. Please read the instructions."))
(loop
(if (string= (let ((stumpwm::*input-history* nil))
(stumpwm:read-one-line
... | |
b6a40afb821932df2aa05e4e7e4a97b6dc84fdcdd3ff350e59df93e4ec9ed032 | hugomg/scfgc | id.ml | open Core_kernel.Std
module type S = sig
type t with sexp
val to_int : t -> int
val fresh : unit -> t
include Comparable.S with type t := t
include Hashable.S with type t := t
end
module Make ( ) : S = struct
type t = int with sexp
let to_int x = x
let next = ref 0
let fresh () =
let id = !next... | null | https://raw.githubusercontent.com/hugomg/scfgc/9604ef317a23ce51c46d8e5d03e6597081abc3cd/id.ml | ocaml | open Core_kernel.Std
module type S = sig
type t with sexp
val to_int : t -> int
val fresh : unit -> t
include Comparable.S with type t := t
include Hashable.S with type t := t
end
module Make ( ) : S = struct
type t = int with sexp
let to_int x = x
let next = ref 0
let fresh () =
let id = !next... | |
4c150f42013e5b88a87b9695e9a787cec7b52610598d715bcd67b43aaf445766 | david-broman/modelyze | sundials.mli |
Modeling Kernel Language ( Modelyze ) evaluator
Copyright ( C ) 2010 - 2012
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
... | null | https://raw.githubusercontent.com/david-broman/modelyze/e48c934283e683e268a9dfd0fed49d3c10277298/ext/sundials/sundials.mli | ocaml | * Raised when the number of equations supplied (e.g. array sizes)
are wrong
* Raised when there is an error in the init procedure.
* The simulation instance type
* Reinitialize the solver again with the same time and value as currently
exists in the simulation instance
* Close a simulation instance. Th... |
Modeling Kernel Language ( Modelyze ) evaluator
Copyright ( C ) 2010 - 2012
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
... |
58a6a03b997f445cd31ed165d867be55428f6507b9568339ca33d94ad2e57fab | oakes/paren-soup | prod.clj | (require
'[clojure.java.io :as io]
'[clojure.string :as str]
'[cljs.build.api :as api]
'[leiningen.core.project :as p :refer [defproject]]
'[leiningen.install :refer [install]]
'[leiningen.deploy :refer [deploy]])
(defn read-project-clj []
(p/ensure-dynamic-classloader)
(-> "project.clj" load-file var-... | null | https://raw.githubusercontent.com/oakes/paren-soup/15f55ebb40ee30f75ca960d381ddebd094a76f3d/prod.clj | clojure | entry point | (require
'[clojure.java.io :as io]
'[clojure.string :as str]
'[cljs.build.api :as api]
'[leiningen.core.project :as p :refer [defproject]]
'[leiningen.install :refer [install]]
'[leiningen.deploy :refer [deploy]])
(defn read-project-clj []
(p/ensure-dynamic-classloader)
(-> "project.clj" load-file var-... |
c5ace1b185f663531bfb524c992df9fedae6b50e5adae01b8bd629a74f410632 | brianium/tomaat | slack.cljs | (ns tomaat.worker.slack
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [cljs-http.client :as http]
[cljs.core.async :refer [<!]]
[goog.uri.utils :as uri]
[tomaat.data :as data]))
(defn query
"Creates encoded query string params from a hash map"
[params]
(... | null | https://raw.githubusercontent.com/brianium/tomaat/990cb7c496796c567613ec7ea8c9855f397c45c2/src/tomaat/worker/slack.cljs | clojure | Completing a pomodoro involves stopping it and notifiying the user | (ns tomaat.worker.slack
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [cljs-http.client :as http]
[cljs.core.async :refer [<!]]
[goog.uri.utils :as uri]
[tomaat.data :as data]))
(defn query
"Creates encoded query string params from a hash map"
[params]
(... |
416e671af69185c982303d226333910c8d4032ab82ec3ddd0fc44e9ed1315b82 | oden-lang/oden | PolymorphicSpec.hs | module Oden.Type.PolymorphicSpec where
import Oden.Identifier
import Oden.Metadata
import Oden.QualifiedName
import Oden.SourceInfo
import Oden.Type.Polymorphic
import Test.Hspec
missing :: Metadata SourceInfo
missing = Metadata Missing
named :: String -> ... | null | https://raw.githubusercontent.com/oden-lang/oden/10c99b59c8b77c4db51ade9a4d8f9573db7f4d14/test/Oden/Type/PolymorphicSpec.hs | haskell | module Oden.Type.PolymorphicSpec where
import Oden.Identifier
import Oden.Metadata
import Oden.QualifiedName
import Oden.SourceInfo
import Oden.Type.Polymorphic
import Test.Hspec
missing :: Metadata SourceInfo
missing = Metadata Missing
named :: String -> ... | |
975353b59e5c3ae5df97649b17feb7b4e4d310481149f1e5707088cc822dc0c1 | let-def/menhir | preFront.ml | (**************************************************************************)
(* *)
Menhir
(* *)
, INRIA Ro... | null | https://raw.githubusercontent.com/let-def/menhir/e8ba7bef219acd355798072c42abbd11335ecf09/src/preFront.ml | ocaml | ************************************************************************
et en Automatique. All rig... | Menhir
, INRIA Rocquencourt
, PPS , Université Paris Diderot
Copyright 2005 - 2008 Institut National de Recherche en Informatique
under the terms of the Q Public License versi... |
cd0db99ab6c3443cf77a70750cde6104de73ec8ea16f854b235c3220d7406393 | erleans/pgo | pgo_query_cache.erl | -module(pgo_query_cache).
-export([start_link/0,
lookup/2,
insert/3,
reset/0,
delete/1]).
-export([init/1,
callback_mode/0,
ready/3,
terminate/3]).
-record(data, {}).
start_link() ->
gen_statem:start_link({local, ?MODULE}, ?MODULE, [], []).
lookup(... | null | https://raw.githubusercontent.com/erleans/pgo/1c9a0992bc41f2ecd0328fbee1151b75843ac979/src/pgo_query_cache.erl | erlang | -module(pgo_query_cache).
-export([start_link/0,
lookup/2,
insert/3,
reset/0,
delete/1]).
-export([init/1,
callback_mode/0,
ready/3,
terminate/3]).
-record(data, {}).
start_link() ->
gen_statem:start_link({local, ?MODULE}, ?MODULE, [], []).
lookup(... | |
f755effd7a596a787d6a6c7257c7e45ad9b89e95d4b355a90f485ceb974468ba | iand675/hs-opentelemetry | Resource_Fields.hs | {- This file was auto-generated from opentelemetry/proto/resource/v1/resource.proto by the proto-lens-protoc program. -}
{-# LANGUAGE BangPatterns #-}
{- This file was auto-generated from opentelemetry/proto/resource/v1/resource.proto by the proto-lens-protoc program. -}
# LANGUAGE DataKinds #
{- This file was auto-gen... | null | https://raw.githubusercontent.com/iand675/hs-opentelemetry/b08550db292ca0d8b9ce9156988e6d08dd6a2e61/otlp/src/Proto/Opentelemetry/Proto/Resource/V1/Resource_Fields.hs | haskell | This file was auto-generated from opentelemetry/proto/resource/v1/resource.proto by the proto-lens-protoc program.
# LANGUAGE BangPatterns #
This file was auto-generated from opentelemetry/proto/resource/v1/resource.proto by the proto-lens-protoc program.
This file was auto-generated from opentelemetry/proto/resou... | # LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MagicHash #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternSynonyms #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE Typ... |
6f64754a3c1f74019ac38496e188e81fe5c1c4b7eaf6f5939035ffe993d597bc | Mallku2/lua-redex-model | grammar.rkt | #lang racket
(require redex)
Core language grammar definition
(define-language core-lang
[s \;
break
(return e)
functioncall
($builtIn Name (e ...))
((var ...) = (e ...))
(do s end)
(if e then s else s end)
(while e d... | null | https://raw.githubusercontent.com/Mallku2/lua-redex-model/13a1b8cacbdc72a1b5cb1a1f140f21cc974d71c3/grammar.rkt | racket |
Run-time statements
xpcall's protected mode
Variables' Identifiers' syntactic category, to ease the definition of the
substitution function.
This syntactic category is added to ease meta-functions' definitions.
To allow function calls in protected mode, in place of expressions.
Run-time expressions
To allow e... | #lang racket
(require redex)
Core language grammar definition
(define-language core-lang
break
(return e)
functioncall
($builtIn Name (e ...))
((var ...) = (e ...))
(do s end)
(if e then s else s end)
(while e do s end)... |
84dbb10974589e66d905a0cf722f0b8d68f9b785ed4c7df2846ece49291791f2 | smanek/trivial-lisp-webapp | request.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*-
$ Header : /usr / local / cvsrep / hunchentoot / request.lisp , v 1.35 2008/02/13 16:02:18 edi Exp $
Copyright ( c ) 2004 - 2009 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or witho... | null | https://raw.githubusercontent.com/smanek/trivial-lisp-webapp/36816c17ea378822e02a123c1be960fd9ce3e29d/aux/hunchentoot/request.lisp | lisp | Syntax : COMMON - LISP ; Package : HUNCHENTOOT ; Base : 10 -*-
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 t... | $ Header : /usr / local / cvsrep / hunchentoot / request.lisp , v 1.35 2008/02/13 16:02:18 edi Exp $
Copyright ( c ) 2004 - 2009 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-pack... |
ac6b0e2c431d3901014ef4506dde8431d68112d19da0ca24af3feda2b3c225e9 | jacekschae/learn-reitit-course-files | routes.clj | (ns cheffy.recipe.routes
(:require [cheffy.recipe.handlers :as recipe]
[cheffy.responses :as responses]
[cheffy.middleware :as mw]))
(defn routes
[env]
(let [db (:jdbc-url env)]
["/recipes" {:swagger {:tags ["recipes"]}
:middleware [[mw/wrap-auth0]]}
[""
{:... | null | https://raw.githubusercontent.com/jacekschae/learn-reitit-course-files/c13a8eb622a371ad719d3d9023f1b4eff9392e4c/increments/44-update-role/src/cheffy/recipe/routes.clj | clojure | (ns cheffy.recipe.routes
(:require [cheffy.recipe.handlers :as recipe]
[cheffy.responses :as responses]
[cheffy.middleware :as mw]))
(defn routes
[env]
(let [db (:jdbc-url env)]
["/recipes" {:swagger {:tags ["recipes"]}
:middleware [[mw/wrap-auth0]]}
[""
{:... | |
8f249ff7efdb84faf9577412f050eb39fdce68db002e83f29fb4fb2e13ab92a7 | seandepagnier/cruisingplot | autopilot.scm | Copyright ( C ) 2011 , 2012 < >
;;
This Program is free software ; you can redistribute it and/or
;; modify it under the terms of the GNU General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at your option ) any later version .
(declare (unit autopilot... | null | https://raw.githubusercontent.com/seandepagnier/cruisingplot/d3d83e7372e2c5ce1a8e8071286e30c2028088cf/autopilot.scm | scheme |
you can redistribute it and/or
modify it under the terms of the GNU General Public
either
make && ./cruisingplot -v -swindvane-control -ause-windvane -d wind-vane
The goal is to keep the boat on course by measuring it's motion,
then estimating what the motion will be in the future with various
helm changes... | Copyright ( C ) 2011 , 2012 < >
version 3 of the License , or ( at your option ) any later version .
(declare (unit autopilot))
(define desired-heading #f)
(define sensor-history '())
(define pitch-misalignment #f)
(define gps-magnetic-declination #f)
(define gps-magnetic-declination-timeout 0)
(define (ne... |
1b434378d8bd7d859b682993f156d449c560e9cd763ec9c200e8b41397ab0c47 | jgbm/cpgv | CPToGV.hs | module CPToGV where
import Data.Maybe
import qualified CP.Syntax as CP
import CP.Printer
import GV.Syntax (dual)
import qualified GV.Syntax as GV
xSession :: CP.Prop -> GV.Session
xSession (CP.Times a b) = GV.Output (xTypeDual a) (xSession b)
xSession (CP.Par a b) = GV.Input (xType a) (xSession b)
xSession (CP.Plus ... | null | https://raw.githubusercontent.com/jgbm/cpgv/1d06a6b47de4977dfa939a661ccd6ffcdcc5ec9e/CPToGV.hs | haskell | module CPToGV where
import Data.Maybe
import qualified CP.Syntax as CP
import CP.Printer
import GV.Syntax (dual)
import qualified GV.Syntax as GV
xSession :: CP.Prop -> GV.Session
xSession (CP.Times a b) = GV.Output (xTypeDual a) (xSession b)
xSession (CP.Par a b) = GV.Input (xType a) (xSession b)
xSession (CP.Plus ... | |
101ed3976e9df854958d92685d6027e29130b8244cae672ec2c33cdda3e8608c | scalaris-team/scalaris | db_generator_SUITE.erl | 2013 Zuse Institute Berlin
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
distribu... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/test/db_generator_SUITE.erl | erlang | you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language gov... | 2013 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(db_generator_SUITE).
-author('').
-vsn('$Id$').
-compile(export_all).
-include("unittest.hrl").
-include("scalari... |
ed1cf282d2469ecaa2d01ca698c842dd4e93a5de5e5305589beecfe6f9cf3357 | robert-strandh/SICL | packages.lisp | (cl:in-package #:common-lisp-user)
(defpackage #:sicl-boot-stealth-mixin
(:use #:common-lisp)
(:import-from #:sicl-boot
#:load-source-file
#:load-source-file-using-client
#:ensure-asdf-system
#:ensure-asdf-system-using-client
#:import-... | null | https://raw.githubusercontent.com/robert-strandh/SICL/95bec48848029500a7a57f520e8bd86d95192c04/Code/Boot/Stealth-mixin/packages.lisp | lisp | (cl:in-package #:common-lisp-user)
(defpackage #:sicl-boot-stealth-mixin
(:use #:common-lisp)
(:import-from #:sicl-boot
#:load-source-file
#:load-source-file-using-client
#:ensure-asdf-system
#:ensure-asdf-system-using-client
#:import-... | |
b47a942cb527803a61ca3e268c1d3968ab914d32671a0a83320e486680489501 | yokolet/clementine | string.cljs | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/yokolet/clementine/b26c2318625e49606b5cc3b95cc9e1f5085ac309/ext/clojure-clojurescript-bef56a7/src/cljs/clojure/string.cljs | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns clojure.string
(:refer-clojure :exclude [replace reverse])
(:require [goog.string :as gstring]
[goog.string.StringBuffer :as gstringbuf]))
(defn- seq-reverse
[coll]
(reduce conj () coll))
(defn reverse
"Returns s with its characters reversed."
... |
2e724f715aad74477bea0d26fc26a90eb9b47601d8bd4446c8c62d89eed4bdf1 | sarabander/p2pu-sicp | Ex1.5.scm | Exercise 1.5
(define (p) (p))
(define (test x y)
(if (= x 0)
0
y))
(test 0 (p))
(test 0 7)
(test 3 -4)
applicative order - arguments will be evaluated first ,
;; then procedure will be applied to them - therefore procedure (p)
in ( test 0 ( p ) ) will be called immediately .
;; Result is an infi... | null | https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/1.1/Ex1.5.scm | scheme | then procedure will be applied to them - therefore procedure (p)
Result is an infinite loop.
normal order - evaluation of the arguments will be postponed
until they are needed. The arguments of (test ) will be passed
the execution never reaches (p) because of the predicate (= x 0). | Exercise 1.5
(define (p) (p))
(define (test x y)
(if (= x 0)
0
y))
(test 0 (p))
(test 0 7)
(test 3 -4)
applicative order - arguments will be evaluated first ,
in ( test 0 ( p ) ) will be called immediately .
unevaluated to the procedure body . In the case of ( test 0 ( p ) ) ,
|
525b86e9dc5b452b1fda3d10cd807aa9e58f7feeed5c7788702cb08e8aefead5 | mitchellwrosen/planet-mitchell | Lazy.hs | module Map.Int.Lazy
( module Data.IntMap.Lazy
) where
import Data.IntMap.Lazy
| null | https://raw.githubusercontent.com/mitchellwrosen/planet-mitchell/18dd83204e70fffcd23fe12dd3a80f70b7fa409b/planet-mitchell/src/Map/Int/Lazy.hs | haskell | module Map.Int.Lazy
( module Data.IntMap.Lazy
) where
import Data.IntMap.Lazy
| |
f3c7cf6c57005aff9a28058fe166b9b8fbdfaa6ef40af368b159bd6a35d2e6d3 | aantron/luv | condition.ml | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
type t = C.Types.Condition.t Ctypes.ptr
let init () =
let condition = Ctypes.addr (Ctypes.make C.Types.Condition.t) in
C.Functions.Condition.init condition
|> Error.to_result c... | null | https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/src/condition.ml | ocaml | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
type t = C.Types.Condition.t Ctypes.ptr
let init () =
let condition = Ctypes.addr (Ctypes.make C.Types.Condition.t) in
C.Functions.Condition.init condition
|> Error.to_result c... | |
e73cc9cecce6ab33c6fd7c01ad0ec9de78e6045d8907b4c820029613718be142 | onedata/op-worker | dataset_rest_routes.erl | %%%--------------------------------------------------------------------
%%% This file has been automatically generated from Swagger
%%% specification - DO NOT EDIT!
%%%
( C ) 2019 - 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%----------------------... | null | https://raw.githubusercontent.com/onedata/op-worker/a06e0e0064e2cbea4706df1dc2dde12e0aa77091/src/http/rest/routes/dataset_rest_routes.erl | erlang | --------------------------------------------------------------------
This file has been automatically generated from Swagger
specification - DO NOT EDIT!
@end
--------------------------------------------------------------------
@doc
This module contains definitions of dataset REST methods.
@end
----------------... | ( C ) 2019 - 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(dataset_rest_routes).
-include("http/rest.hrl").
-export([routes/0]).
-spec routes() -> [{binary(), module(), #rest_req{}}].
routes() -> [
{<<"/spaces/:sid/datasets">>, rest_handler, #r... |
e297fcc7d36b64493e6a64eec637cecce91eced000b43ab8c7506acd2676daf5 | avsm/platform | opamSwitch.mli | (**************************************************************************)
(* *)
Copyright 2012 - 2015 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/format/opamSwitch.mli | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2015 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
include OpamStd.ABSTRACT
val unset: t
val is_external: t -> bool
val get_root: OpamFilenam... |
759c492d546b168f2e7489dd8703b8b2121b66f69ac7690c4ec3a83988447449 | MLstate/opalang | RAList.mli | (** result of a comparison *)
type comparison = Lesser | Equal | Greater
(** invalid access of the ith element when only n elements (Invalid_subscript(i,n)) *)
exception Invalid_subscript of (int*int)
(** invalid operation on empty ra_list *)
exception Empty
type 'a ra_list
* classic operations of list , all O(1 )
mo... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/RAList.mli | ocaml | * result of a comparison
* invalid access of the ith element when only n elements (Invalid_subscript(i,n))
* invalid operation on empty ra_list
to implement fold until
raise Empty
raise Empty
* classic operations of functional array, O(ln(N))
raise Invalid_subscript
raise Invalid_subscript
* return the las... | type comparison = Lesser | Equal | Greater
exception Invalid_subscript of (int*int)
exception Empty
type 'a ra_list
* classic operations of list , all O(1 )
module AsList :
sig
val is_empty : 'a ra_list -> bool
val empty : 'a ra_list
val cons : 'a -> 'a ra_list -> 'a ra_list
catch StopFold to implement fold u... |
b24464e571a36abd9aa98b85c79d5139bd66574bb6f5b500a6f69dc51f59733e | HaskellForCats/HaskellForCats | 3_b_Lists.hs | module Ch1Lists where
import Data.Char
import Test.QuickCheck
-- Lists are the primary data structure in LISP like languages.
Where as Arrays are the primary data collection in C derived languages like Java .
examp1 = [x*x | x <- [1,2,3] ]
-- [1,4,9]
examp2 = [toLower c | c <- "Hello From Haskell"]
" hello fr... | null | https://raw.githubusercontent.com/HaskellForCats/HaskellForCats/2d7a15c0cdaa262c157bbf37af6e72067bc279bc/30MinHaskell/z_notes/3_b_Lists.hs | haskell | Lists are the primary data structure in LISP like languages.
[1,4,9]
[(1,False),(2,True),(3,False)]
----- notes -------------------------------
[x*x | x <- [1,2,3] ] is a list comprehension
x <- [1,2,3] is a generator
<- means "drawn from"
[(1,False).....] pairs in a list
| are guards and they e... | module Ch1Lists where
import Data.Char
import Test.QuickCheck
Where as Arrays are the primary data collection in C derived languages like Java .
examp1 = [x*x | x <- [1,2,3] ]
examp2 = [toLower c | c <- "Hello From Haskell"]
" hello from "
examp3 = [ (x, even x) | x <- [1,2,3] ]
examp4 = [x|x <-[1..5], odd ... |
7453ce200e4d2a66dffc89b8d723eb4d0aa6c85687c9dc6ce27ddb1799583e33 | nshimaza/thread-supervisor | SupervisorSpec.hs | # OPTIONS_GHC -Wno - orphans #
# OPTIONS_GHC -Wno - type - defaults #
module Control.Concurrent.SupervisorSpec where
import Data.Default (def)
import Data.Foldable (for_)
import Data.Functor (($>))
import Data.List ... | null | https://raw.githubusercontent.com/nshimaza/thread-supervisor/ac7e21eadd2489c85aa9a630ae89c629280032bc/test/Control/Concurrent/SupervisorSpec.hs | haskell | # ANN module "HLint: ignore Reduce duplication" #
# ANN module "HLint: ignore Use head" # | # OPTIONS_GHC -Wno - orphans #
# OPTIONS_GHC -Wno - type - defaults #
module Control.Concurrent.SupervisorSpec where
import Data.Default (def)
import Data.Foldable (for_)
import Data.Functor (($>))
import Data.List ... |
018dc345384b4cc97f762fa0a97b85fc75c0a61fb323cd89489fa898f7e95cd1 | input-output-hk/cardano-sl | Main.hs | module Main (main) where
import Pos.Util.Log.LoggerConfig (LoggerConfig)
import Pos.Infra.Network.Yaml (Topology)
import Data.List.Split
import System.Environment
import Data.Yaml
import Control.Monad.Catch
import Data.Monoid
main :: IO ()
main = do
runTest "logConfigs" checkLogConfig
runTest "topologyConfigs" ch... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/yaml-validation/Main.hs | haskell | module Main (main) where
import Pos.Util.Log.LoggerConfig (LoggerConfig)
import Pos.Infra.Network.Yaml (Topology)
import Data.List.Split
import System.Environment
import Data.Yaml
import Control.Monad.Catch
import Data.Monoid
main :: IO ()
main = do
runTest "logConfigs" checkLogConfig
runTest "topologyConfigs" ch... | |
fd95f866cf1fefa571fae6564874b1deccfcec3c69194f1df673f839ff29012d | buntine/Simply-Scheme-Exercises | 20-5.scm | ; Our name-table procedure uses a fixed width for the column containing the last
names of the people in the argument list . Suppose that instead of liking British - invasion
music you are into late romantic Russian composers :
;
> ( name - table ' ( ( ) ( nicolay rimsky - korsakov )
( sergei ... | null | https://raw.githubusercontent.com/buntine/Simply-Scheme-Exercises/c6cbf0bd60d6385b506b8df94c348ac5edc7f646/20-input-and-output/20-5.scm | scheme | Our name-table procedure uses a fixed width for the column containing the last
Alternatively, perhaps you like jazz:
| names of the people in the argument list . Suppose that instead of liking British - invasion
music you are into late romantic Russian composers :
> ( name - table ' ( ( ) ( nicolay rimsky - korsakov )
( sergei ) ( modest ) ) )
> ( name - table ' ( ( ) ( ) ( ) ) )
Modify name - tabl... |
65338dd4448c4bdced4bcc0e2afd1a2eb71248a7c6670fe2a6f8709db36c6feb | ocaml/oasis | test_compile.ml | (******************************************************************************)
OASIS : architecture for building OCaml libraries and applications
(* *)
Copyright ( C ) 2011 - 2016 ,
Copyrig... | null | https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/test/data/TestFull/with-cclib/src/test_compile.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | OASIS : architecture for building OCaml libraries and applications
Copyright ( C ) 2011 - 2016 ,
Copyright ( C ) 2008 - 2011 , OCamlCore SARL
the Free Software Foundation ; either version 2.1 of the License , or ( at
You s... |
16a93d1b06eb217e68b38990517d4b6d84261e3deeb8cc72d34f96946c1e73d6 | acl2/acl2 | abstract-syntax.lisp | PFCS ( Prime Field Constraint System ) Library
;
Copyright ( C ) 2023 Kestrel Institute ( )
;
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
;
Author : ( )
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package "PFCS")
(include-book... | null | https://raw.githubusercontent.com/acl2/acl2/560688cd2b96edcacc5594329e238526c2d216d3/books/kestrel/crypto/pfcs/abstract-syntax.lisp | lisp | PFCS ( Prime Field Constraint System ) Library
Copyright ( C ) 2023 Kestrel Institute ( )
License : A 3 - clause BSD license . See the LICENSE file distributed with ACL2 .
Author : ( )
(in-package "PFCS")
(include-book "centaur/fty/top" :dir :system)
(include-book "std/util/defprojection" :dir :system)
(... | |
65b781310ea8365a3736b774980f3c1c445dd91c281d00038d4a323483382335 | dinosaure/art | test_ring.ml | let pp_process_status ppf = function
| Unix.WEXITED n -> Format.fprintf ppf "(WEXITED %d)" n
| Unix.WSIGNALED n -> Format.fprintf ppf "(WSIGNALED %d)" n
| Unix.WSTOPPED n -> Format.fprintf ppf "(WSTOPPED %d)" n
let res = ref true
let exit_success = 0
let exit_failure = 1
let properly_exited = function Unix.WEX... | null | https://raw.githubusercontent.com/dinosaure/art/40af4c34a2e2ec9632cb73a74ac2ec0fd7f62a81/test/test_ring.ml | ocaml | let pp_process_status ppf = function
| Unix.WEXITED n -> Format.fprintf ppf "(WEXITED %d)" n
| Unix.WSIGNALED n -> Format.fprintf ppf "(WSIGNALED %d)" n
| Unix.WSTOPPED n -> Format.fprintf ppf "(WSTOPPED %d)" n
let res = ref true
let exit_success = 0
let exit_failure = 1
let properly_exited = function Unix.WEX... | |
f537856b3922c355f94d89011f66f7844bcc00fa0b924833466cf902c169ebb8 | roblaing/erlang-webapp-howto | blog_handler.erl | -module(blog_handler).
-behaviour(cowboy_websocket).
-export([ init/2
, websocket_handle/2
, websocket_info/2
]).
init(Req, State) ->
{cowboy_websocket, Req, State}.
% Responds to Frames from client
% InFrame :: ping | pong | {text | binary | ping | pong, binary()}
websocket_handle({text... | null | https://raw.githubusercontent.com/roblaing/erlang-webapp-howto/e1731dfc4e2cfdfee88e982d67155b83acd5cc04/unit8/apps/unit8/src/blog_handler.erl | erlang | Responds to Frames from client
InFrame :: ping | pong | {text | binary | ping | pong, binary()}
This has to be here, but isn't used.
@doc Rehash the hexdigest read from browser cookie and return as a new hexdigest.
@doc Check if uuid is false, and if not that it's a valid ID.
@doc Call before new login or sign... | -module(blog_handler).
-behaviour(cowboy_websocket).
-export([ init/2
, websocket_handle/2
, websocket_info/2
]).
init(Req, State) ->
{cowboy_websocket, Req, State}.
websocket_handle({text, Json}, State) ->
Proplist = jsx:decode(Json),
case proplists:get_value(<<"page">>, Proplist, fals... |
5af981cf23e37d10441600693636bbbbd29c2791febfd78f5a18cc262de092ee | ocaml-doc/doc-ock | docOckPayload.ml |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and 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 AU... | null | https://raw.githubusercontent.com/ocaml-doc/doc-ock/788aabe6e3d157633890f67042d6a4d0161835a7/src/docOckPayload.ml | ocaml |
* Copyright ( c ) 2014 < >
*
* Permission to use , copy , modify , and 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 AU... | |
09019eeef9fc29ec8248d3e924097cc3f7196ecb8e03adaf99bbba5912ad968c | oreillymedia/etudes-for-erlang | bad_code.erl | %% @author J D Eisenberg <>
%% @doc How not to create lists (and a correct example)
2013 J D Eisenberg
%% @version 0.1
-module(bad_code).
-export([squares/1, squares2/1]).
%% @doc Attempt to square a list of numbers.
%% This is the worst approach to use, as it generates improper lists.
-spec(squares(list()) -> li... | null | https://raw.githubusercontent.com/oreillymedia/etudes-for-erlang/07200372503a8819f9fcc2856f8cb82451be7b48/code/ch06-interlude/bad_code.erl | erlang | @author J D Eisenberg <>
@doc How not to create lists (and a correct example)
@version 0.1
@doc Attempt to square a list of numbers.
This is the worst approach to use, as it generates improper lists.
@doc Another attempt to square a list of numbers.
This is a bad approach to use; at least you get a list,
but it... | 2013 J D Eisenberg
-module(bad_code).
-export([squares/1, squares2/1]).
-spec(squares(list()) -> list()).
squares(Numbers) -> squares(Numbers, []).
squares([], Result) -> Result;
squares([H | T], Result) ->
squares(T, [Result | H * H ]).
-spec(squares2(list()) -> list()).
squares2(Numbers) -> squares2(N... |
967d9d4a41559cbfcc7e9b840612c36d8d2a8c99eb69c1ac8fc52f6f5ee8903a | jeannekamikaze/Spear | Step.hs | # LANGUAGE FlexibleInstances #
module Spear.Step
( -- * Definitions
Step,
Elapsed,
Dt,
-- * Running
runStep,
-- * Constructors
step,
sid,
spure,
sfst,
ssnd,
sfold,
-- * Combinators
(.>),
(<.),
szip,
switch,
multiSwitch,
)
where
import Data... | null | https://raw.githubusercontent.com/jeannekamikaze/Spear/8f2ec33e8c15e523b2b60d3bfd8e6360313a0657/Spear/Step.hs | haskell | * Definitions
* Running
* Constructors
* Combinators
| A step function.
| Construct a step from a function.
| Step identity.
| Construct a step from a pure function.
| Construct a step that folds a given list of inputs.
Combinators
| Construct a step that switches among multiple steps based on input. | # LANGUAGE FlexibleInstances #
module Spear.Step
Step,
Elapsed,
Dt,
runStep,
step,
sid,
spure,
sfst,
ssnd,
sfold,
(.>),
(<.),
szip,
switch,
multiSwitch,
)
where
import Data.List (foldl')
import Data.Map (Map)
import qualified Data.Map as Map
import Data... |
d3c278f9f7c65d9fa86c6af2b97cb6580e2dd049adba536bb4a889216576b2e4 | joelagnel/stumpwm-goodies | modeline-cpu.lisp | (defvar *prev-user-cpu* 0)
(defvar *prev-sys-cpu* 0)
(defvar *prev-idle-cpu* 0)
(defvar *prev-iowait* 0)
(defun current-cpu-usage ()
"Return the average CPU usage since the last call.
First value is percent of CPU in use.
Second value is percent of CPU in use by system processes.
Third value is ... | null | https://raw.githubusercontent.com/joelagnel/stumpwm-goodies/bf9dee6a2e92fea6f2160c37565a74072e367d36/mode-line/modeline-cpu.lisp | lisp | ;; ... some other modeline settings ... | (defvar *prev-user-cpu* 0)
(defvar *prev-sys-cpu* 0)
(defvar *prev-idle-cpu* 0)
(defvar *prev-iowait* 0)
(defun current-cpu-usage ()
"Return the average CPU usage since the last call.
First value is percent of CPU in use.
Second value is percent of CPU in use by system processes.
Third value is ... |
7291289613541a06ae30784b52d949d7ac5fe2abef1af88cc0ee78eb34a6dd6d | aristidb/aws | Aws.hs | module Aws
( -- * Logging
LogLevel(..)
, Logger
, defaultLog
-- * Configuration
, Configuration(..)
, baseConfiguration
, dbgConfiguration
-- * Transaction runners
-- ** Safe runners
, aws
, awsRef
, pureAws
, simpleAws
-- ** Unsafe runners
, unsafeAws
, unsafeAwsRef
-- ** URI runners
, awsUri
-- ** Itera... | null | https://raw.githubusercontent.com/aristidb/aws/9bdc4ee018d0d9047c0434eeb21e2383afaa9ccf/Aws.hs | haskell | * Logging
* Configuration
* Transaction runners
** Safe runners
** Unsafe runners
** URI runners
** Iterated runners
, awsIteratedAll
* Response
** Full HTTP response
** Metadata in responses
** Memory responses
** Exception types
* Query
** Service configuration
** Expiration
* Transactions
* Credenti... | module Aws
LogLevel(..)
, Logger
, defaultLog
, Configuration(..)
, baseConfiguration
, dbgConfiguration
, aws
, awsRef
, pureAws
, simpleAws
, unsafeAws
, unsafeAwsRef
, awsUri
, awsIteratedSource
, awsIteratedList
, HTTPResponseConsumer
, Response(..)
, readResponse
, readResponseIO
, ResponseMetadata
, AsMemoryRes... |
559f87c08f7925d694a74f8c93cd62939e5a837d744320370c2ce2fbb21c0e3f | li-clutter-org/http2-test | Session.hs | # LANGUAGE FlexibleContexts , Rank2Types #
module Rede.SpdyProtocol.Session(
-- trivialSession
basicSession
-- ,showHeadersIfPresent
) where
import Control.Concurrent (forkIO)
import Control.Monad.IO.Class (liftIO)
import Control.Mona... | null | https://raw.githubusercontent.com/li-clutter-org/http2-test/38d6706511f93af875273f7702fa0ea8582d5d8e/hs-src/Rede/SpdyProtocol/Session.hs | haskell | trivialSession
,showHeadersIfPresent
import Data.IORef
import Data.Conduit.Lift (distribute)
TODO: Move to constants?
goAwayMsg = GoA.GoAwayFrame {
GoA.prologue = def
,GoA.statusCode = GoA.OK_GAR
,GoA.lastGoodStream = 0
}
A table from stream id to windo... | # LANGUAGE FlexibleContexts , Rank2Types #
module Rede.SpdyProtocol.Session(
basicSession
) where
import Control.Concurrent (forkIO)
import Control.Monad.IO.Class (liftIO)
import Control.Monad.Trans.Class (lift)
import ... |
cd8872ca79dd4d01946b3b3cfd1be5a313f1cd50352ed3789611d22c6417b4ae | mattgreen/hython | AttributeDict.hs | module Hython.AttributeDict
where
import Control.Monad.IO.Class (MonadIO)
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HashMap
import Data.Text (Text)
import Hython.Ref
type AttributeDict obj = HashMap Text (Ref obj)
empty :: AttributeDict obj
empty = HashMap.empty
insertRef :: Text... | null | https://raw.githubusercontent.com/mattgreen/hython/fcbde98e9b5a033f0d4bea73ac9914bc5e12b746/src/Hython/AttributeDict.hs | haskell | module Hython.AttributeDict
where
import Control.Monad.IO.Class (MonadIO)
import Data.HashMap.Strict (HashMap)
import qualified Data.HashMap.Strict as HashMap
import Data.Text (Text)
import Hython.Ref
type AttributeDict obj = HashMap Text (Ref obj)
empty :: AttributeDict obj
empty = HashMap.empty
insertRef :: Text... | |
067c393590c5c384b8b5948d7adf3fc387a8c28014fa2a3327b35a932290e297 | antono/guix-debian | cmake-build-system.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2013 < >
Copyright © 2013 < >
Copyright © 2014 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Fre... | null | https://raw.githubusercontent.com/antono/guix-debian/85ef443788f0788a62010a942973d4f7714d10b4/guix/build/cmake-build-system.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2013 < >
Copyright © 2013 < >
Copyright © 2014 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (guix build cmake-build-system)
#:use-module ... |
d0ad29b87bf826299a6daf077e0435be4aad4664dac5533417c41957fd4c180e | well-typed/optics | Optics.hs | -- |
-- Module: Data.Text.Optics
-- Description: Optics for working with strict or lazy 'Text'.
--
This module provides ' 's for converting strict or lazy ' Text ' to or from a
' String ' or ' Builder ' , and an ' ' for traversing the individual
-- characters of a 'Text'.
--
The same combinators support both st... | null | https://raw.githubusercontent.com/well-typed/optics/ba3c5a4d2f110c82238bc2fe7bb187023ab516f5/optics-extra/src/Data/Text/Optics.hs | haskell | |
Module: Data.Text.Optics
Description: Optics for working with strict or lazy 'Text'.
characters of a 'Text'.
typeclass. You can import "Data.Text.Strict.Optics" or
"Data.Text.Lazy.Optics" instead if you prefer monomorphic versions.
| Traversals for strict or lazy 'Text'
| This isomorphism can be used to '... | This module provides ' 's for converting strict or lazy ' Text ' to or from a
' String ' or ' Builder ' , and an ' ' for traversing the individual
The same combinators support both strict and lazy text using the ' IsText '
module Data.Text.Optics
( IsText(..)
, unpacked
, _Text
, pattern Text
) where
... |
f3d1f7c01d333e80cca961984da50b267b8361894927534e87955b6882efc89f | basho/riaknostic | riaknostic_check_ring_size.erl | %% -------------------------------------------------------------------
%%
riaknostic - automated diagnostic tools for Riak
%%
Copyright ( c ) 2011 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
... | null | https://raw.githubusercontent.com/basho/riaknostic/dad8939d0ef32fbf435d13697720223293195282/src/riaknostic_check_ring_size.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissi... | riaknostic - automated diagnostic tools for Riak
Copyright ( c ) 2011 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS... |
7a10e6e7ddbf9678ef35d727a3fa16e5e7573e7500f924e9961991213a512afc | ondrap/dynamodb-simple | Update.hs | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 800
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
#endif
{-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
-- | Module for creating update actions
--
-- E... | null | https://raw.githubusercontent.com/ondrap/dynamodb-simple/fb7e3fe37d7e534161274cfd812cd11a82cc384b/src/Database/DynamoDB/Update.hs | haskell | # OPTIONS_GHC -Wno-redundant-constraints #
# LANGUAGE DataKinds #
# LANGUAGE OverloadedStrings #
| Module for creating update actions
Example as used in nested structure for scan:
> updateItemByKey_ (Proxy :: Proxy Test, ("hashkey", "sortkey"))
to operate on the same attribute simultane... | # LANGUAGE CPP #
#if __GLASGOW_HASKELL__ >= 800
#endif
# LANGUAGE FlexibleContexts #
# LANGUAGE GeneralizedNewtypeDeriving #
> ( ( iInt ' + = . 5 ) < > ( iText ' = . " updated " ) < > ( iMText ' = . Nothing ) )
The unique " Action " can be added together using the ' < > ' operator . Y... |
67efd67f56e33f1974814517551e0630e7ace4e195becdc33cf74b03559d71ec | bnoordhuis/chicken-core | extras.scm | ;;; extras.scm - Optional non-standard extensions
;
Copyright ( c ) 2008 - 2013 , The Chicken Team
Copyright ( c ) 2000 - 2007 ,
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
; conditions are met:
;
; Redist... | null | https://raw.githubusercontent.com/bnoordhuis/chicken-core/56d30e3be095b6abe1bddcfe10505fa726a43bb5/extras.scm | scheme | extras.scm - Optional non-standard extensions
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 t... | Copyright ( c ) 2008 - 2013 , The Chicken Team
Copyright ( c ) 2000 - 2007 ,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIM... |
364a841dd93673c57f320a89a93209fda8f12a00b99f80674768d3ff829581bd | hipsleek/hipsleek | specutil.ml | #include "xdebug.cppo"
open VarGen
open Globals
module DD = Debug
open Gen
open Exc.GTable
open Cformula
open Cpure
open Cprinter
module CP = Cpure
module MCP = Mcpure
module CF = Cformula
module TP = Tpdispatcher
module IF = Iformula
module I = Iast
module C = Cast
type pure_dom = {
para_names : spec_var list;
T... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/bef_indent/specutil.ml | ocaml | inductive_def : ...;
****************************************************************************
****************************************************************************
TODO: abs_dom | #include "xdebug.cppo"
open VarGen
open Globals
module DD = Debug
open Gen
open Exc.GTable
open Cformula
open Cpure
open Cprinter
module CP = Cpure
module MCP = Mcpure
module CF = Cformula
module TP = Tpdispatcher
module IF = Iformula
module I = Iast
module C = Cast
type pure_dom = {
para_names : spec_var list;
T... |
b7440cac194439776b3678b03b194138d456c9811d53782ea79d450521a0d7fe | dradtke/Lisp-Text-Editor | context.lisp | (in-package :cl-cairo2)
;;;;
Notes
;;;;
;;;; need to write:
cairo - get - target
;;;; push-group-with-content
;;;; get-group-target
;;;;
;;;;
;;;; not sure anyone needs:
;;;; get/set-user-data
;;;; get-reference-count
;;;;
;;;; context class
;;;;
(defclass context (cairo-object)
((width :ini... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/quicklisp/dists/quicklisp/software/cl-cairo2-20120208-git/src/context.lisp | lisp |
need to write:
push-group-with-content
get-group-target
not sure anyone needs:
get/set-user-data
get-reference-count
context class
register finalizer
since:
1) we're not allowed to access the object in the finaliser
from ever running
(defmethod destroy ((object context))
(with-slots ... | (in-package :cl-cairo2)
Notes
cairo - get - target
(defclass context (cairo-object)
((width :initarg :width :reader width)
(height :initarg :height :reader height)
(pixel-based-p :initarg :pixel-based-p :reader pixel-based-p)))
(define-foreign-type context-type () ()
(:actual-type :pointer)
(:s... |
fa4d7ff0efcd76558f4bc6ebc49dc03c269ae223517b835f3f5fb0990d39cf44 | NorfairKing/smos | Admin.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Smos.Web.Server.Handler.Admin
( getAdminPanelR,
postAdminMigrateFilesR,
getAdminUserR,
postAdminUserSetSubscriptionR,
)
where
import Smos.Web.Server.Handler.Import
getAdminPanelR :: Handler Html
getAdm... | null | https://raw.githubusercontent.com/NorfairKing/smos/4891d1c7a462040ac63771058ab35e35abb4e46d/smos-web-server/src/Smos/Web/Server/Handler/Admin.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
module Smos.Web.Server.Handler.Admin
( getAdminPanelR,
postAdminMigrateFilesR,
getAdminUserR,
postAdminUserSetSubscriptionR,
)
where
import Smos.Web.Server.Handler.Import
getAdminPanelR :: Handler Html
getAdminPanelR = withAdminLogin $ \t -> d... |
34618234c33a9b8e965ece8c46a079dc5be580bdd140bd9d50cb9a68acc7fd1b | brianium/yoose | generators.clj | (ns brianium.yoose.async.generators
(:require [clojure.core.async :as async]
[clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[brianium.yoose.async :as yoose-async]))
(defn chan []
(s/gen #{ (async/chan) }))
(defn use-case []
(let [in (gen/generate (chan)... | null | https://raw.githubusercontent.com/brianium/yoose/c4f2892798cbdfef726ce221723c9397108e472e/src/brianium/yoose/async/generators.clj | clojure | (ns brianium.yoose.async.generators
(:require [clojure.core.async :as async]
[clojure.spec.alpha :as s]
[clojure.spec.gen.alpha :as gen]
[brianium.yoose.async :as yoose-async]))
(defn chan []
(s/gen #{ (async/chan) }))
(defn use-case []
(let [in (gen/generate (chan)... | |
9e4695dc50d42a6a2bb7350d96e3c19671fc6e1b44d94ea259c6c7b947d0731e | finnishtransportagency/harja | laskutusyhteenvedot.clj | (ns harja.palvelin.ajastetut-tehtavat.laskutusyhteenvedot
"Ajastettu tehtävä laskutusyhteenvetojen muodostamiseksi valmiiksi välimuistiin"
(:require [com.stuartsierra.component :as component]
[harja.kyselyt.laskutusyhteenveto :as q]
[harja.palvelin.tyokalut.lukot :as lukot]
[taoe... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/79b402d6829160743d4bff523b6364b46c59176a/src/clj/harja/palvelin/ajastetut_tehtavat/laskutusyhteenvedot.clj | clojure | (ns harja.palvelin.ajastetut-tehtavat.laskutusyhteenvedot
"Ajastettu tehtävä laskutusyhteenvetojen muodostamiseksi valmiiksi välimuistiin"
(:require [com.stuartsierra.component :as component]
[harja.kyselyt.laskutusyhteenveto :as q]
[harja.palvelin.tyokalut.lukot :as lukot]
[taoe... | |
b09e734de98fc38353c1addfe5eed5dcc4ca58d7ca292d760aa75b6c4150b155 | marcoheisig/Petalisp | kernel-interpreter.lisp | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(in-package #:petalisp.ir)
;;; In this file we define a simple kernel interpreter. The interpreter
;;; can be used for testing or for executing small kernels for which
;;; compilation is not worth it.
(defun interpret-kernel (kernel iteration-... | null | https://raw.githubusercontent.com/marcoheisig/Petalisp/a1c85cf71da445ef9c7913cd9ddb5149373211a7/code/ir/kernel-interpreter.lisp | lisp | In this file we define a simple kernel interpreter. The interpreter
can be used for testing or for executing small kernels for which
compilation is not worth it.
Compute the number of entries in the value vector, and have the
entry of the offset vector of each instruction point to the correct
place in the value ... | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(in-package #:petalisp.ir)
(defun interpret-kernel (kernel iteration-space)
(let* ((instruction-vector (kernel-instruction-vector kernel))
(offset-vector (make-array (length instruction-vector)))
(value-vector-length 0))
... |
ecc8f68bdcedd7803f81ac731b79418715c4854d1fad06ce1df8b5116653168e | DaiF1/Oditor | files.ml |
file : files.ml
dependencies : editor.ml colors.ml
Editor file management
file: files.ml
dependencies: editor.ml colors.ml
Editor file management
*)
open Editor;;
open Colors;;
(* Add line to text buffer
param str: line to add
param len: length of line *)
let add_line str len =... | null | https://raw.githubusercontent.com/DaiF1/Oditor/9f49ce05281f3253c166475b21c282a1e36c99f7/editor/files.ml | ocaml | Add line to text buffer
param str: line to add
param len: length of line
Convert text buffer to string
param text: erow to convert
Write buffer to file
param path: path to file |
file : files.ml
dependencies : editor.ml colors.ml
Editor file management
file: files.ml
dependencies: editor.ml colors.ml
Editor file management
*)
open Editor;;
open Colors;;
let add_line str len =
let rec loop text = match text with
| [] -> let row = {chars = str; size ... |
fce48104daae34b87125c2a37fd4b011ea0182e2ec67c5cdc20f7c97c56e671f | kunstmusik/score | tuning.clj | (ns score.tuning
"Functions related to tunings, based on the Scala scale file format."
(:require [clojure.java.io :refer :all]
[clojure.string :refer [trim triml split]]))
(def ^:const ^{:tag 'double}
MIDDLE-C 261.6255653005986)
(def TWELVE-TET
{ :description "Twelve-Tone Equal Temperament"
:... | null | https://raw.githubusercontent.com/kunstmusik/score/87b532ec2e3e273f077be9bdd878427a25d0534c/src/main/score/tuning.clj | clojure | (ns score.tuning
"Functions related to tunings, based on the Scala scale file format."
(:require [clojure.java.io :refer :all]
[clojure.string :refer [trim triml split]]))
(def ^:const ^{:tag 'double}
MIDDLE-C 261.6255653005986)
(def TWELVE-TET
{ :description "Twelve-Tone Equal Temperament"
:... | |
3f678dc67ce843afd2b52277e0748e656b70b81a2d188031e9fa60186b64cdfb | GaloisInc/saw-script | Test.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE ImplicitParams #
{-# Language OverloadedStrings #-}
# OPTIONS_GHC -Wall -fno - warn - unused - top - binds #
import qualified Data.ByteString as BS
import qualified Data.ByteString.UTF8 as BS8
import Data.Char (isSpace)
import Data.List (dro... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/92e96208600f2ccd11b8de409e8e28d5247484ea/crux-mir-comp/test/Test.hs | haskell | # LANGUAGE GADTs #
# Language OverloadedStrings #
old mainline crucible
verification runs close to the timeout, causing flaky results
Skip hidden files, such as editor swap files
Skip hidden files, such as editor swap files
For newSAWCoreBackend
| Compile using 'rustc' and run executable | # LANGUAGE LambdaCase #
# LANGUAGE ImplicitParams #
# OPTIONS_GHC -Wall -fno - warn - unused - top - binds #
import qualified Data.ByteString as BS
import qualified Data.ByteString.UTF8 as BS8
import Data.Char (isSpace)
import Data.List (dropWhileEnd, isPrefixOf)
import Data.Maybe (catMay... |
096fcdb464b45c704d7fad9f3e1f177dfcd345988c3a86ee1927596fbea76532 | goldfirere/singletons | T450.hs | module T450 where
import Data.Maybe
import Data.Singletons.TH
import Data.Singletons.TH.Options
import Data.Text (Text)
import Language.Haskell.TH (Name)
import Prelude.Singletons
newtype Message = MkMessage Text
newtype PMessage = PMkMessage Symbol
newtype Function a b = MkFunction (a -> b)
newtype PFunction a ... | null | https://raw.githubusercontent.com/goldfirere/singletons/ad40d2a6392d562509ba572c84f9a335e4cef5f9/singletons-base/tests/compile-and-dump/Singletons/T450.hs | haskell | module T450 where
import Data.Maybe
import Data.Singletons.TH
import Data.Singletons.TH.Options
import Data.Text (Text)
import Language.Haskell.TH (Name)
import Prelude.Singletons
newtype Message = MkMessage Text
newtype PMessage = PMkMessage Symbol
newtype Function a b = MkFunction (a -> b)
newtype PFunction a ... | |
6687979b5bdfaf18de5e868ad0b4e61b95497da99bf595560425d80e159170b4 | iu-parfunc/lvars | MIS.hs | | Maximum independent set algorithms in lvish
# LANGUAGE CPP , ScopedTypeVariables #
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE GADTs #-}
module Data.LVar.Graph.MIS where
import Utils
-- Benchmark utils:
-- import PBBS.FileReader
import ( wait_clocks , runAndReport )
calibrate , measureFreq , commaint ,
i... | null | https://raw.githubusercontent.com/iu-parfunc/lvars/78e73c96a929aa75aa4f991d42b2f677849e433a/src/lvish-graph-algorithms/src/Data/LVar/Graph/MIS.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE GADTs #
Benchmark utils:
import PBBS.FileReader
define DEBUG_CHECKS
----------------------------------------------------------------------------------------
TODO: Define clan user-visible datatypes for dense and sparse representations of
node sets.
type SparseVertset
---------... | | Maximum independent set algorithms in lvish
# LANGUAGE CPP , ScopedTypeVariables #
module Data.LVar.Graph.MIS where
import Utils
import ( wait_clocks , runAndReport )
calibrate , measureFreq , commaint ,
import Control.LVish
import Control.Monad
import Data.Word
import qualified Data.Vector.Unboxed as U... |
6b2930f45106ae0942d51a5eb93468e9f4e99089752cfd8f4d040d83c3bb82ce | Helium4Haskell/helium | SimilarNegation.hs | module SimilarNegation where
test :: Float
test = - (3.0 + 6.0)
test' :: Int
test' = - 3
dit zijn nu syntax errors :
test '' : : Float - > Float
test '' ( - 1.0 ) = 1.0
test '' x = x + . 1.0
test '' ' : : Int - > Bool
test '' ' ( - . 1 ) = True
test '' ' _ = False
test'' :: Float -> Flo... | null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeerrors/Heuristics/SimilarNegation.hs | haskell | module SimilarNegation where
test :: Float
test = - (3.0 + 6.0)
test' :: Int
test' = - 3
dit zijn nu syntax errors :
test '' : : Float - > Float
test '' ( - 1.0 ) = 1.0
test '' x = x + . 1.0
test '' ' : : Int - > Bool
test '' ' ( - . 1 ) = True
test '' ' _ = False
test'' :: Float -> Flo... | |
6bb3a5553ef45882350105566c417adb5eae3d38cec865e8e254dd0c91c15674 | aistrate/Okasaki | PairingHeap_Test.hs | import Test.HUnit
import qualified Test.QuickCheck as QC
import Data.List (sort)
import Text.Printf (printf)
import TestHelper
import PairingHeap
main = do printTime $ runTestTT hunitTests
printTime $ mapM_ (\(s,a) -> printf "%-25s: " s >> a) qcheckTests
hunitTests = TestList [
"fromList" ~:
[
test... | null | https://raw.githubusercontent.com/aistrate/Okasaki/cc1473c81d053483bb5e327409346da7fda10fb4/MyCode/Ch05/PairingHeap_Test.hs | haskell | QC.quickCheck
QC.verboseCheck | import Test.HUnit
import qualified Test.QuickCheck as QC
import Data.List (sort)
import Text.Printf (printf)
import TestHelper
import PairingHeap
main = do printTime $ runTestTT hunitTests
printTime $ mapM_ (\(s,a) -> printf "%-25s: " s >> a) qcheckTests
hunitTests = TestList [
"fromList" ~:
[
test... |
fc6121f4b5aaa111fd0e2f85c645bbe3a17178e80d78c1f134fb6e2775e24d69 | eugenehr/erlyconv | cp437.erl | %% THIS FILE WAS AUTOMATICALLY GENERATED BY gen_src.pl
FROM mappings / MICSFT / PC / CP437.TXT AT 2016 - 08 - 19
-module(cp437).
-vsn(20160819).
-export([to_unicode/1, from_unicode/1]).
%% Public functions
to_unicode(16#80) -> 16#00c7;
to_unicode(16#81) -> 16#00fc;
to_unicode(16#82) -> 16#00e9;
to_unicode(16#83) -> ... | null | https://raw.githubusercontent.com/eugenehr/erlyconv/ecdcd7db8f785c9638cd1ebad37ccd426c050cdf/src/cp437.erl | erlang | THIS FILE WAS AUTOMATICALLY GENERATED BY gen_src.pl
Public functions
Private functions | FROM mappings / MICSFT / PC / CP437.TXT AT 2016 - 08 - 19
-module(cp437).
-vsn(20160819).
-export([to_unicode/1, from_unicode/1]).
to_unicode(16#80) -> 16#00c7;
to_unicode(16#81) -> 16#00fc;
to_unicode(16#82) -> 16#00e9;
to_unicode(16#83) -> 16#00e2;
to_unicode(16#84) -> 16#00e4;
to_unicode(16#85) -> 16#00e0;
to_uni... |
291e75ac5623116ef644d6e7cc620034d44e2506faec1f81312a562db4a364c6 | cloudant/mem3 | mem3_httpd.erl | Copyright 2010 Cloudant
%
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% -2.0
%
% Unless required by applicable law or agreed to in writing, software
distributed under the Lice... | null | https://raw.githubusercontent.com/cloudant/mem3/49b41333f6acd2e9154e182cf66b67efaf58ac7b/src/mem3_httpd.erl | erlang |
use this file except in compliance with the License. You may obtain a copy of
the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitation... | Copyright 2010 Cloudant
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(mem3_httpd).
-export([handle_membership_req/1, handle_shards_req/2]).
-include("mem3.hrl").
-include_lib("couch/include/... |
739a62c26386c3774dc5f45e6a418972d6c39bad0c7e228780027f93e0b08876 | xh4/web-toolkit | array.lisp | (in-package :json)
(defclass array ()
((value
:initarg :value
:initform nil
:accessor value)))
(defmethod initialize-instance :after ((array array) &key)
(check-type (value array) list))
(defun array-form (array)
(check-type array array)
`(array ,@(value array)))
(defmethod print-object ((array ... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/json/array.lisp | lisp | (in-package :json)
(defclass array ()
((value
:initarg :value
:initform nil
:accessor value)))
(defmethod initialize-instance :after ((array array) &key)
(check-type (value array) list))
(defun array-form (array)
(check-type array array)
`(array ,@(value array)))
(defmethod print-object ((array ... | |
0de7d4833f27b658baa503e281ac1bc904572290bee71724382dec6dfbbc6478 | wireapp/wire-server | ParseExistsError.hs | module ParseExistsError where
import Amazonka.Types
import Gundeck.Aws
import Gundeck.Aws.Arn
import Gundeck.Types.Push.V2 (Transport (APNS))
import Imports
import Test.Tasty
import Test.Tasty.HUnit
tests :: TestTree
tests =
testGroup
"parseExistsError"
[ testCase "parse error string from real world example... | null | https://raw.githubusercontent.com/wireapp/wire-server/1c8534679d3e7f453acf7fa52df2c28590cc522b/services/gundeck/test/unit/ParseExistsError.hs | haskell | module ParseExistsError where
import Amazonka.Types
import Gundeck.Aws
import Gundeck.Aws.Arn
import Gundeck.Types.Push.V2 (Transport (APNS))
import Imports
import Test.Tasty
import Test.Tasty.HUnit
tests :: TestTree
tests =
testGroup
"parseExistsError"
[ testCase "parse error string from real world example... | |
c719fd6b4f407ead54c63cd3c7eaadcc57b75ca5fbc46988448d739f410d8721 | bzg/woof | web.clj | Copyright ( c ) 2022 - 2023 Bastien Guerry < >
SPDX - License - Identifier : EPL-2.0
;; License-Filename: LICENSES/EPL-2.0.txt
(ns bzg.web
(:require [reitit.ring :as ring]
[bzg.core :as core]
[bzg.i18n :as i18n]
[bzg.data :as data]
[bzg.fetch :as fetch]
... | null | https://raw.githubusercontent.com/bzg/woof/d0cb841d62391122ab232fd4c241c138726120c9/src/bzg/web.clj | clojure | License-Filename: LICENSES/EPL-2.0.txt
See comment in `compute-vote` on why `read-string`
TODO: Could we safely use email-re as msgid-re?
TODO: Implement overview features here
Patch body
List per source | Copyright ( c ) 2022 - 2023 Bastien Guerry < >
SPDX - License - Identifier : EPL-2.0
(ns bzg.web
(:require [reitit.ring :as ring]
[bzg.core :as core]
[bzg.i18n :as i18n]
[bzg.data :as data]
[bzg.fetch :as fetch]
[bzg.db :as db]
[clojure.str... |
c285403b481386ea1e814041ee5f3130338a6886b1dccae2b895f1aaf35cffe8 | yesodweb/serversession | TestImport.hs | module TestImport
( module TestImport
, module X
) where
import Application
import ClassyPrelude as X hiding (delete, deleteBy, Handler)
import Database.Persist as X hiding (get)
import Database.Persist.Sql
import Database.Persist.Sql.Types.Internal (connEscapeRawName)
import Foundation ... | null | https://raw.githubusercontent.com/yesodweb/serversession/bdede5fb660890df670f103d64a5e69024b13e57/examples/serversession-example-yesod-persistent/test/TestImport.hs | haskell | Wiping the database
This function will truncate all of the tables in your database.
'withApp' calls it before each test, creating a clean environment for each
spec to run in.
In order to wipe the database, we need to use a connection which has
foreign key checks disabled. Foreign key checks are enabled or disabl... | module TestImport
( module TestImport
, module X
) where
import Application
import ClassyPrelude as X hiding (delete, deleteBy, Handler)
import Database.Persist as X hiding (get)
import Database.Persist.Sql
import Database.Persist.Sql.Types.Internal (connEscapeRawName)
import Foundation ... |
0d27518f2dd67701ad3ee600d01937e73199f6770e6895f6d6671d7aca642dd1 | links-lang/links | debug.ml | let debug = ref false
let set_debug b = debug := b
let print s = if !debug then prerr_endline s
| null | https://raw.githubusercontent.com/links-lang/links/2923893c80677b67cacc6747a25b5bcd65c4c2b6/lens/debug.ml | ocaml | let debug = ref false
let set_debug b = debug := b
let print s = if !debug then prerr_endline s
| |
dc86b1fa6d92fd3e705d04a84c4f988723066e84ff6882bfbd176d5d11cebad2 | openmusic-project/openmusic | package.lisp | ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; package.lisp --- TRIVIAL-FEATURES-TESTS package definition.
;;;
Copyright ( C ) 2007 ,
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to d... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/foreign-interface/ffi/trivial-features/tests/package.lisp | lisp | -*- Mode: lisp; indent-tabs-mode: nil -*-
package.lisp --- TRIVIAL-FEATURES-TESTS package definition.
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, publ... | Copyright ( C ) 2007 ,
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-package :cl-user)
... |
62ebb2ab692bddef5b081c38074a8eee8f2410963a59b4014945b4ec7898bb10 | mpickering/apply-refact | Default37.hs | yes = concat $ Data.List.intersperse " " xs | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Default37.hs | haskell | yes = concat $ Data.List.intersperse " " xs | |
4873dc199f7017d5b8b89f75c75dffecf519bc5ea4018d5308e6707d4cca605c | andreypopp/type-systems | syntax.ml | open! Base
type name = string [@@deriving sexp_of]
and id = int
and lvl = int
type expr =
| E_var of name
| E_abs of name list * expr
| E_app of expr * expr list
| E_let of (name * expr * ty_sch option) * expr
| E_lit of lit
[@@deriving sexp_of]
and lit = Lit_string of string | Lit_int of int
and ty =
... | null | https://raw.githubusercontent.com/andreypopp/type-systems/d379e6ebc73914189b0054549f6c0191319c443a/hmx/syntax.ml | ocaml | * Levels are assigned when we enter [C_exists] or [C_let] constraints
* Types are discovered as a result of unification.
Always break on let inside the body.
If there's [let x = let y = ... in ... in ...] then we want to
force break.
Check if we can layout this as simply as [aty -> try] in case of... | open! Base
type name = string [@@deriving sexp_of]
and id = int
and lvl = int
type expr =
| E_var of name
| E_abs of name list * expr
| E_app of expr * expr list
| E_let of (name * expr * ty_sch option) * expr
| E_lit of lit
[@@deriving sexp_of]
and lit = Lit_string of string | Lit_int of int
and ty =
... |
979640f7168a88b163c73c9568ac8bc66af56a45b6c4bbce23fdd2625c369a9d | abakst/Brisk | Extract.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module Brisk.Model.Extract where
import GHC (GhcMonad)
import GhcPlugins hiding ((<+>), pp, text, Subst, Id, mkTyVar, tyVarName)
import qualified GhcPlugins as Ghc
import Type as Ty
import TyCoRep ... | null | https://raw.githubusercontent.com/abakst/Brisk/3e4ce790a742d3e3b786dba45d36f715ea0e61ef/src/Brisk/Model/Extract.hs | haskell | import Brisk.Model.Promela
initBinds <- resolve hsenv (specTuple <$> specs)
let g0 = Env.addsEnv Env.empty [ (nameId x, specAnnot <$> b) | (x,b) <- initBinds ]
return (nameId nm :<=: t)
dumpBinds all
FunTy _ t')
, text (ppShow v)
guess = foldr go (foldl go' (var n (annotOfBind ... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
module Brisk.Model.Extract where
import GHC (GhcMonad)
import GhcPlugins hiding ((<+>), pp, text, Subst, Id, mkTyVar, tyVarName)
import qualified GhcPlugins as Ghc
import Type as Ty
import TyCoRep ... |
74c1404c92705c0217f2a23d66fa9ed465b2163e8c41c42992f773143d13d179 | clojure/data.xml | prxml.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 epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/clojure/data.xml/12cc9934607de6cb4d75eddb1fcae30829fa4156/src/main/clojure/clojure/data/xml/prxml.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns clojure.data.xml.prxml
(:require
[clojure.data.xml.protocols :refer [AsElements as-elements]]
[clojure.data.xml.node :refer [cdata xml-comment element* element]]))
(defn sexp-element [tag attrs child]
(cond
(= :-cdata tag) (cdata (first child))
(= :-... |
23b0926c3c29d7b3a98e9fe0ea9327a6e38b42719b8ee3ba219aa142deace422 | argp/bap | batDeque.ml |
* Deque -- functional double - ended queues
* Copyright ( C ) 2011 Batteries Included Development Team
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* ... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batDeque.ml | ocaml |
* Deque -- functional double - ended queues
* Copyright ( C ) 2011 Batteries Included Development Team
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation ; either
* ... | |
04fa73b64660244d3586568563199d3c1af6a987705ddedef2d24876558b883c | mirage/ocaml-cohttp | bytebuffer.ml | module Bytes = BytesLabels
Bytebuffer is split into three regions using two separate indices that are used
to support read and write operations .
+ --------------------+---------------------------+----------------------------+
| Consumed Bytes | Bytes available to read | Empty space for writin... | null | https://raw.githubusercontent.com/mirage/ocaml-cohttp/5ee84489cf6755711d0e7c0f1365685a15cae468/http/src/bytebuffer/bytebuffer.ml | ocaml | module Bytes = BytesLabels
Bytebuffer is split into three regions using two separate indices that are used
to support read and write operations .
+ --------------------+---------------------------+----------------------------+
| Consumed Bytes | Bytes available to read | Empty space for writin... | |
b6c92ec66975f3d155e189efb4cf8ed34147fc488d1204159dd8845c60889fbf | pirapira/coq2rust | genprint.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/printing/genprint.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Entry point for generic printers
... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Pp
open Genarg
val raw... |
52c63ff45c67a60749d1118c37248353bc3d29a69e241f8256cec66bb74cd38c | clash-lang/clash-compiler | Signals.hs | {-# LANGUAGE RankNTypes #-}
| Functions to generate signals for SPI devices . The function used to
-- generate a signal determines if the signal is lawful or not (with regards
-- to respecting busy and acknowledgement signals).
--
module Test.Cores.Internal.Signals
( GenMaster
, GenSlave
, masterLawfulSignal
... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/clash-cores/test/Test/Cores/Internal/Signals.hs | haskell | # LANGUAGE RankNTypes #
generate a signal determines if the signal is lawful or not (with regards
to respecting busy and acknowledgement signals).
import Clash.Cores.SPI
busy and acknowledgement signals from the device.
wait for the acknowledgement signal before changing the input, which
should result... |
| Functions to generate signals for SPI devices . The function used to
module Test.Cores.Internal.Signals
( GenMaster
, GenSlave
, masterLawfulSignal
, masterLawlessSignal
, slaveLawfulSignal
, slaveLawlessSignal
) where
import qualified Data.List as List (cycle, head, tail)
import qualified Clash.Ex... |
744b39fee221e30f4c708cc051b07ee2ae12b16ccc0b6fa3d880ea1206572e1c | initc3/SaUCy | Main.hs | module Main where
import qualified Language.ILC.Repl as Repl ( main )
main :: IO ()
main = Repl.main
| null | https://raw.githubusercontent.com/initc3/SaUCy/199154c1f488af4561e4bf1f7f5f3ef8876dfa6b/app/Main.hs | haskell | module Main where
import qualified Language.ILC.Repl as Repl ( main )
main :: IO ()
main = Repl.main
| |
1d2215252918648b79255185f386504ab9630af8013b7d43e1aebb6b17dbdd20 | mtgred/netrunner | pages.clj | (ns web.pages
(:require
[cheshire.core :as json]
[cljc.java-time.instant :as inst]
[hiccup.page :as hiccup]
[monger.collection :as mc]
[monger.operators :refer :all]
[ring.middleware.anti-forgery :as anti-forgery]
[web.utils :refer [response html-response]]
[web.versions :refer [frontend-versi... | null | https://raw.githubusercontent.com/mtgred/netrunner/5245a4cbcda4b789addd2b8b9213276422718f23/src/clj/web/pages.clj | clojure | (ns web.pages
(:require
[cheshire.core :as json]
[cljc.java-time.instant :as inst]
[hiccup.page :as hiccup]
[monger.collection :as mc]
[monger.operators :refer :all]
[ring.middleware.anti-forgery :as anti-forgery]
[web.utils :refer [response html-response]]
[web.versions :refer [frontend-versi... | |
b30990fd1ed3c02e0ebead12d1b17772ae848878be7098e190e1136d9c317e7a | tnelson/Forge | sample-wheat.rkt | #lang forge/core
(sig Node)
(relation edges (Node Node))
(pred (isSource n)
(= Node (join n edges)))
(pred hasSink
(some ([n Node])
(= Node (join edges n))))
| null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/check-ex-spec/examples/sample-ta/sample/wheats/sample-wheat.rkt | racket | #lang forge/core
(sig Node)
(relation edges (Node Node))
(pred (isSource n)
(= Node (join n edges)))
(pred hasSink
(some ([n Node])
(= Node (join edges n))))
| |
87f7a282b387358da48c7f3e82f39d488749be96aa6253ef8ee8c289b78e30ec | kupl/FixML | localize.ml | open Lang
open Util
open Label_lang
open Print
open Labeling
(* set of execution traces *)
type trace_set = int BatSet.t
let empty_set = BatSet.empty
let extend_set = BatSet.add
(* set of execution traces *)
let trace_set = ref empty_set
let init_set () = (trace_set := empty_set)
let start_time = ref 0.0
(* Find c... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/engine/localize.ml | ocaml | set of execution traces
set of execution traces
Find counter exampels
***************************************************************
***************************************************************
Block task
Argument binding
Pattern Matching
exp evaluation
gather execution traces
aop
lop
else
Va... | open Lang
open Util
open Label_lang
open Print
open Labeling
type trace_set = int BatSet.t
let empty_set = BatSet.empty
let extend_set = BatSet.add
let trace_set = ref empty_set
let init_set () = (trace_set := empty_set)
let start_time = ref 0.0
let rec is_counter_example : prog -> example -> bool
= fun pgm (input... |
8aaa0003ee4520eee4549cd601634040fca5660242a50930c0673bdeac7b3e23 | mzp/coq-ide-for-ios | coqinit.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/toplevel/coqinit.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
By the option -include -I or -R of ... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ I d : coqinit.ml 13323 20... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.