_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 |
|---|---|---|---|---|---|---|---|---|
114e9fd3f39294898ba88e6531724cccf85ad47e4e309ee6131ffa2c07ab6e36 | ppaml-op3/insomnia | Selfify.hs | # LANGUAGE ViewPatterns , OverloadedStrings #
module Insomnia.Typecheck.Selfify
( selfifySignature
, selfifyTypeDefn
) where
import Data.Monoid (Monoid(..), (<>))
import qualified Unbound.Generics.LocallyNameless as U
import qualified Unbound.Generics.LocallyNameless.Unsafe as UU
import Insomnia... | null | https://raw.githubusercontent.com/ppaml-op3/insomnia/5fc6eb1d554e8853d2fc929a957c7edce9e8867d/src/Insomnia/Typecheck/Selfify.hs | haskell | # SOURCE #
a type variable of singleton kind (ie, a module variable standing
for a module expression) such that the module variable is given its principal
kind (exposes maximal sharing).
this definition in the rest of the signature by
the full projection from the model path. Also replace the
type constructors
|... | # LANGUAGE ViewPatterns , OverloadedStrings #
module Insomnia.Typecheck.Selfify
( selfifySignature
, selfifyTypeDefn
) where
import Data.Monoid (Monoid(..), (<>))
import qualified Unbound.Generics.LocallyNameless as U
import qualified Unbound.Generics.LocallyNameless.Unsafe as UU
import Insomnia... |
7a6b1256a03aefadac2cca66ca3795f9e27fb3e58dba453eb1be9841b090bc16 | intolerable/reddit | Message.hs | module Reddit.Routes.Message where
import Reddit.Types.Options
import Reddit.Types.Message
import Reddit.Types.Thing
import Reddit.Types.User
import Data.Text (Text)
import Network.API.Builder.Routes
inbox :: Bool -> Options MessageKind -> Route
inbox shouldMark opts =
Route [ "message", "inbox" ]
[ "mark"... | null | https://raw.githubusercontent.com/intolerable/reddit/588901f79e684536a6839d63e6f9c6a4847fe001/src/Reddit/Routes/Message.hs | haskell | module Reddit.Routes.Message where
import Reddit.Types.Options
import Reddit.Types.Message
import Reddit.Types.Thing
import Reddit.Types.User
import Data.Text (Text)
import Network.API.Builder.Routes
inbox :: Bool -> Options MessageKind -> Route
inbox shouldMark opts =
Route [ "message", "inbox" ]
[ "mark"... | |
9de83873395e362ac98a2686b13ffada6112117d6d55026e723984b776f5a2ab | RedPRL/asai | Asai_lsp.ml | open Lsp.Types
module RPC = Jsonrpc
module Make (Code : Asai.Code.S) (Logger : Asai.Logger.S with module Code := Code) =
struct
module Server = Server.Make(Code)(Logger)
open Server
let unwrap opt err =
match opt with
| Some opt -> opt
| None -> raise @@ LspError err
let print_exn exn =
let ... | null | https://raw.githubusercontent.com/RedPRL/asai/bef7bca8e6543bbc50131491db766da2f94d862f/src/lsp/Asai_lsp.ml | ocaml | [TODO: Reed M, 09/06/2022] Commands??? | open Lsp.Types
module RPC = Jsonrpc
module Make (Code : Asai.Code.S) (Logger : Asai.Logger.S with module Code := Code) =
struct
module Server = Server.Make(Code)(Logger)
open Server
let unwrap opt err =
match opt with
| Some opt -> opt
| None -> raise @@ LspError err
let print_exn exn =
let ... |
0a3d53663ed590aff38f671b75db8d14c923bfcf2971ef587ea4e2f5a21f936a | danielsz/system | benjamin.clj | (ns system.components.benjamin
(:require [com.stuartsierra.component :as component]
[benjamin.configuration :as config :refer [set-config!]]))
(defrecord Logbook [success-fn persistence-fn logbook-fn events persistence-fn-wrap-component? logbook-fn-wrap-component? allow-undeclared-events?]
component/Li... | null | https://raw.githubusercontent.com/danielsz/system/4c8bf677e9988eec59033b3af4352567c459b50c/src/system/components/benjamin.clj | clojure | (ns system.components.benjamin
(:require [com.stuartsierra.component :as component]
[benjamin.configuration :as config :refer [set-config!]]))
(defrecord Logbook [success-fn persistence-fn logbook-fn events persistence-fn-wrap-component? logbook-fn-wrap-component? allow-undeclared-events?]
component/Li... | |
64aec416d515c9a6bfa882dd76d33a29271a9cb4ecf5af84c3621698ea24894a | cram-code/cram_core | serialize.lisp | ;;;
Copyright ( c ) 2009 - 2010
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list o... | null | https://raw.githubusercontent.com/cram-code/cram_core/984046abe2ec9e25b63e52007ed3b857c3d9a13c/cram_execution_trace/src/serialize.lisp | lisp |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redi... | Copyright ( c ) 2009 - 2010
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR
LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY ,... |
64ae7f2c2f2efdda6ed783bfe95926a602b1acbaa7fd14a2116afd833c2edff1 | phaazon/wavefront | Object.hs | -----------------------------------------------------------------------------
-- |
Copyright : ( C ) 2015
-- License : BSD3
--
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
-----------------------------------------------------------------------------
module Codec.Wavefro... | null | https://raw.githubusercontent.com/phaazon/wavefront/74dc61e8e298dce19c1c50ebf21d1c6fe841458c/src/Codec/Wavefront/Object.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
Portability : portable
---------------------------------------------------------------------------
|Locations.
|Texture coordinates.
|Normals.
|Points.
|Lines.
|Faces.
|Material libra... | Copyright : ( C ) 2015
Maintainer : < >
module Codec.Wavefront.Object where
import Codec.Wavefront.Element
import Codec.Wavefront.Face
import Codec.Wavefront.Lexer ( Ctxt(..) )
import Codec.Wavefront.Line
import Codec.Wavefront.Location
import Codec.Wavefront.Normal
import Codec.Wavefront.Point
import C... |
01b94b03f84adcc77dbdfccf11c27a7ab10a896e65e331ba05a1d687da0572f5 | leonardb/mnesia_fdb | mnesia_fdb_sup.erl | %%----------------------------------------------------------------
Copyright ( c ) 2013 - 2016 Klarna AB
%%
This file is provided to you 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
%%
%% ... | null | https://raw.githubusercontent.com/leonardb/mnesia_fdb/d94f89d67453cc2edb2053ae0799e424006d6e2f/src/mnesia_fdb_sup.erl | erlang | ----------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions an... | Copyright ( c ) 2013 - 2016 Klarna AB
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 , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(mnesia_fdb_sup).
-behaviour(sup... |
0b256e950b5fcf4a599fe32a0458074dd4278c4d30ad542f583341c278e07ec3 | aeternity/aeternity | aest_perf_SUITE.erl | -module(aest_perf_SUITE).
%=== EXPORTS ===================================================================
% Common Test exports
-export([suite/0]).
-export([all/0]).
-export([groups/0]).
-export([init_per_suite/1]).
-export([init_per_group/2]).
-export([init_per_testcase/2]).
-export([end_per_testcase/2]).
-export([... | null | https://raw.githubusercontent.com/aeternity/aeternity/b7ce6ae15dab7fa22287c2da3d4405c29bb4edd7/system_test/common/aest_perf_SUITE.erl | erlang | === EXPORTS ===================================================================
Common Test exports
Test cases
=== INCLUDES ==================================================================
=== COMMON TEST FUNCTIONS =====================================================
Interval to check mining height
Timeout until... | -module(aest_perf_SUITE).
-export([suite/0]).
-export([all/0]).
-export([groups/0]).
-export([init_per_suite/1]).
-export([init_per_group/2]).
-export([init_per_testcase/2]).
-export([end_per_testcase/2]).
-export([end_per_group/2]).
-export([end_per_suite/1]).
-export([
long_chain_mine_and_export/1,
startup... |
52188fce450f1a50bb14080fa239b1109afff0406f1c0ec126c62d8e06493d1e | macourtney/Conjure | view_test_generator.clj | (ns conjure.script.generators.view-test-generator
(:require [clojure.tools.file-utils :as file-utils]
[conjure.script.view.util :as script-view-util]
[conjure.test.builder :as test-builder]
[conjure.test.util :as test-util]
[conjure.view.util :as util]))
(defn generate... | null | https://raw.githubusercontent.com/macourtney/Conjure/1d6cb22d321ea75af3a6abe2a5bc140ad36e20d1/conjure_script_view/src/conjure/script/generators/view_test_generator.clj | clojure | (ns conjure.script.generators.view-test-generator
(:require [clojure.tools.file-utils :as file-utils]
[conjure.script.view.util :as script-view-util]
[conjure.test.builder :as test-builder]
[conjure.test.util :as test-util]
[conjure.view.util :as util]))
(defn generate... | |
a1a994f539170919aad8e2415bdd29a21f762dd5972f3a10d30c4e59bf41be75 | mitchellwrosen/mit | State.hs | module Mit.State
( MitState (..),
emptyMitState,
deleteMitState,
readMitState,
writeMitState,
)
where
import Data.Text qualified as Text
import Data.Text.Encoding.Base64 qualified as Text
import Data.Text.IO qualified as Text
import Mit.Env (Env (..))
import Mit.Git
import Mit.Monad
import Mit.Prel... | null | https://raw.githubusercontent.com/mitchellwrosen/mit/7fe214ab84b27d34c79424d023ee34ed2e3c150d/src/Mit/State.hs | haskell | module Mit.State
( MitState (..),
emptyMitState,
deleteMitState,
readMitState,
writeMitState,
)
where
import Data.Text qualified as Text
import Data.Text.Encoding.Base64 qualified as Text
import Data.Text.IO qualified as Text
import Mit.Env (Env (..))
import Mit.Git
import Mit.Monad
import Mit.Prel... | |
c1cbdd3ef6edfdcc0865c8511c3234bd3b4532684f303a8cefdf76990d5f03a0 | 0install/0install | help_box.ml | Copyright ( C ) 2013 , the README file for details , or visit .
* See the README file for details, or visit .
*)
(** Displays a few paragraphs of help text in a dialog box. *)
open Support.Common
open Gtk_common
let create title sections =
object
val mutable dialog = None
method display =
... | null | https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/gui_gtk/help_box.ml | ocaml | * Displays a few paragraphs of help text in a dialog box. | Copyright ( C ) 2013 , the README file for details , or visit .
* See the README file for details, or visit .
*)
open Support.Common
open Gtk_common
let create title sections =
object
val mutable dialog = None
method display =
dialog |> if_some (fun box -> box#destroy ());
let box... |
f78acfd1a7831d272b450d095916ec7e9e45711e068c7a6d68ffa6e47121d334 | portkey-cloud/aws-clj-sdk | _2017-11-09.clj | (ns portkey.aws.alexaforbusiness.-2017-11-09 (:require [portkey.aws]))
(def endpoints 'nil)
(comment TODO support "json")
| null | https://raw.githubusercontent.com/portkey-cloud/aws-clj-sdk/10623a5c86bd56c8b312f56b76ae5ff52c26a945/src/portkey/aws/alexaforbusiness/_2017-11-09.clj | clojure | (ns portkey.aws.alexaforbusiness.-2017-11-09 (:require [portkey.aws]))
(def endpoints 'nil)
(comment TODO support "json")
| |
52131ed78973548760428f398a1b7be3560c0ad27f49b9ca122ba5633a765a42 | ocamllabs/ocaml-effects | ast_mapper.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-effects/36008b741adc201bf9b547545344507da603ae31/parsing/ast_mapper.mli | ocaml | *********************************************************************
OCaml
... | , LexiFi
Copyright 2012 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
* The interface of a -ppx rewriter
... |
675014d35c84907105bd941df56c6a8bda61c37bbc45882d1b8d1fd0aa3b1e70 | arachne-framework/aristotle | registry.clj | (ns arachne.aristotle.registry
"Tools for mapping between IRIs and keywords"
(:require [clojure.string :as str])
(:refer-clojure :exclude [find alias])
(:import [org.apache.jena.rdf.model.impl Util]
[clojure.lang ExceptionInfo]))
;; Note: it would potentially be more performant to use a trie or
;; p... | null | https://raw.githubusercontent.com/arachne-framework/aristotle/86f3ace210318bd9820322da45e627cec9cfba48/src/arachne/aristotle/registry.clj | clojure | Note: it would potentially be more performant to use a trie or
prefix tree instead of a normal map for the inverse prefix
tree. Punting until it becomes a problem.
TODO: it shouldn't be possible to conflict with a non-wildcard
TODO: we need to store non-wildcard registrations as a distinct map form. Not the same a... | (ns arachne.aristotle.registry
"Tools for mapping between IRIs and keywords"
(:require [clojure.string :as str])
(:refer-clojure :exclude [find alias])
(:import [org.apache.jena.rdf.model.impl Util]
[clojure.lang ExceptionInfo]))
(defonce ^:dynamic *registry* {:prefixes {}
... |
7f60fb6d224c5ab662886b5863be46aebf3ce8e55de5060256be0a62b816aebf | Eonblast/Scalaxis | lb_op.erl | 2010 - 2011 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
d... | null | https://raw.githubusercontent.com/Eonblast/Scalaxis/10287d11428e627dca8c41c818745763b9f7e8d4/src/lb_op.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... | 2010 - 2011 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(lb_op).
-author('').
-vsn('$Id$ ').
-export([no_op/0, slide_op/4, jump_op/6,
is_no_op/1, is_slide/1... |
bf84ea9ab0ad970429f6f057e4977aab4be1edc9da6454b203365795ceed0090 | dmitryvk/sbcl-win32-threads | force-delayed-defbangmacros.lisp | Now that all the cross - compiler DEFMACRO machinery has been set up , we
;;;; can feed the stored DEF!MACRO argument lists to it.
;;;;
: There 's no real reason for this to be in its own file , except
;;;; perhaps the parallelism with FORCE-DELAYED-DEF!STRUCTS (which does have a
;;;; good reason).
This softwar... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/force-delayed-defbangmacros.lisp | lisp | can feed the stored DEF!MACRO argument lists to it.
perhaps the parallelism with FORCE-DELAYED-DEF!STRUCTS (which does have a
good reason).
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. | Now that all the cross - compiler DEFMACRO machinery has been set up , we
: There 's no real reason for this to be in its own file , except
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... |
0c205bf66f7613abd1c1793a7d5069ca178de2e5534a498ff83f1a65522ddc79 | let-def/lrgrep | refine.ml | module type DECOMPOSABLE = sig
type 'a t
val is_empty : 'a t -> bool
val compare_minimum : 'a t -> 'a t -> int
val sorted_union : 'a t list -> 'a t
val extract_unique_prefix : 'a t -> 'a t -> 'a t * 'a t
val extract_shared_prefix : 'a t -> 'a t -> 'a t * ('a t * 'a t)
end
module type S = sig
type 'a t
... | null | https://raw.githubusercontent.com/let-def/lrgrep/29e64174dc9617bcd1871fd2e4fd712269568324/lib/utils/refine.ml | ocaml | switch merge if necessary
always merge with right
left becomes right due to being shorter | module type DECOMPOSABLE = sig
type 'a t
val is_empty : 'a t -> bool
val compare_minimum : 'a t -> 'a t -> int
val sorted_union : 'a t list -> 'a t
val extract_unique_prefix : 'a t -> 'a t -> 'a t * 'a t
val extract_shared_prefix : 'a t -> 'a t -> 'a t * ('a t * 'a t)
end
module type S = sig
type 'a t
... |
f408b1fcc90965f574cd08ef79e59173c18afa414aab02ad4bdb95c6a8211f06 | pfdietz/ansi-test | gcd.lsp | ;-*- Mode: Lisp -*-
Author :
Created : We d Sep 3 06:51:03 2003
Contains : Tests of GCD
;;; Error tests
(deftest gcd.error.1
(check-type-error #'gcd #'integerp)
nil)
;;; Non-error tests
(deftest gcd.1
(gcd)
0)
(deftest gcd.2
(loop for i = (random-fixnum)
for a = (abs i)
... | null | https://raw.githubusercontent.com/pfdietz/ansi-test/3f4b9d31c3408114f0467eaeca4fd13b28e2ce31/numbers/gcd.lsp | lisp | -*- Mode: Lisp -*-
Error tests
Non-error tests | Author :
Created : We d Sep 3 06:51:03 2003
Contains : Tests of GCD
(deftest gcd.error.1
(check-type-error #'gcd #'integerp)
nil)
(deftest gcd.1
(gcd)
0)
(deftest gcd.2
(loop for i = (random-fixnum)
for a = (abs i)
repeat 10000
unless (and (eql a (gcd i))
... |
2fe433aea101ebe4aa8caeddd896b0c81d0ea794b13a060bc3c3e872b5788b52 | dmitryvk/sbcl-win32-threads | dfo.lisp | ;;;; This file contains the code that finds the initial components and
DFO , and recomputes the DFO if it is invalidated .
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 Univer... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/dfo.lisp | lisp | This file contains the code that finds the initial components and
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.
merging any other components we reach. We repeatedly iterate over
the entry... | DFO , and recomputes the DFO if it is invalidated .
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!C")
Find the DFO for a component , deleting any unre... |
23313cb2cd241c2b1a386854621596b2b496089e4e76d8b73fbf16c003b645c5 | ocsigen/eliom | eliom_unwrap.client.mli | Ocsigen
*
* Copyright ( C ) 2011
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your ... | null | https://raw.githubusercontent.com/ocsigen/eliom/c3e0eea5bef02e0af3942b6d27585add95d01d6c/src/lib/eliom_unwrap.client.mli | ocaml | * Values of type [unwrap_id] are used to identify a specific unwrapper.
*/*
* [unwrap s i] unmarshal [s] (starting at character [i]) and
transform the value [v] using registered wrappers. The marshalled
value must have been produced with [Marshal.to_string
(Eliom_wrap.wrap v)]. This function is for interna... | Ocsigen
*
* Copyright ( C ) 2011
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking exception ;
* either version 2.1 of the License , or ( at your ... |
d7a926107b72a40f40a81ea0b734fb669d997c212770bf137669935722dbcbf6 | deadpendency/deadpendency | CommonError.hs | module Common.Model.Error.CommonError
( CommonError (..),
)
where
import Common.Aeson.Aeson
import Common.Model.Error.ConsideredAppFailure
import Data.Aeson
data CommonError
= NonRetryableFailure
| GoogleEnvLoadError
| CommonConfigLoadError
| UnexpectedRunMissing
| PubSubPublishQueueIdConfigMissing
| ... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/common/src/Common/Model/Error/CommonError.hs | haskell | module Common.Model.Error.CommonError
( CommonError (..),
)
where
import Common.Aeson.Aeson
import Common.Model.Error.ConsideredAppFailure
import Data.Aeson
data CommonError
= NonRetryableFailure
| GoogleEnvLoadError
| CommonConfigLoadError
| UnexpectedRunMissing
| PubSubPublishQueueIdConfigMissing
| ... | |
8636c9fa6776f792587009afad78dc980926123b7f73a5e3db93b7ff18bd2a8c | ds-wizard/engine-backend | DocumentSchemaMigration.hs | module Wizard.Database.Migration.Development.Document.DocumentSchemaMigration where
import Database.PostgreSQL.Simple
import Wizard.Database.DAO.Common
import Wizard.Model.Context.AppContext
import Wizard.Model.Context.ContextLenses ()
import Wizard.Util.Logger
runMigration :: AppContextM ()
runMigration = do
logI... | null | https://raw.githubusercontent.com/ds-wizard/engine-backend/d392b751192a646064305d3534c57becaa229f28/engine-wizard/src/Wizard/Database/Migration/Development/Document/DocumentSchemaMigration.hs | haskell | module Wizard.Database.Migration.Development.Document.DocumentSchemaMigration where
import Database.PostgreSQL.Simple
import Wizard.Database.DAO.Common
import Wizard.Model.Context.AppContext
import Wizard.Model.Context.ContextLenses ()
import Wizard.Util.Logger
runMigration :: AppContextM ()
runMigration = do
logI... | |
4b1e0e1d4a645949356464bcd5cc2fdfc393eed775ecfa6aa5871ea189d8d958 | paurkedal/batyr | prereq.ml | Copyright ( C ) 2017 - -2022 Petter A. Urkedal < >
*
* 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 ver... | null | https://raw.githubusercontent.com/paurkedal/batyr/814791b6ce6476b79ecddc12b7d28fa4d23dc591/batyr-core/lib/prereq.ml | ocaml | Copyright ( C ) 2017 - -2022 Petter A. Urkedal < >
*
* 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 ver... | |
90388586636fe733e7a3db980d3dfe43c74642c0df86f88d991a46ab0e31c9cb | basho/riak_test | verify_cluster_converge.erl | -module(verify_cluster_converge).
-behavior(riak_test).
-export([confirm/0]).
-include_lib("eunit/include/eunit.hrl").
-include_lib("riakc/include/riakc.hrl").
-define(assertDenied(Op), ?assertMatch({error, <<"Permission",_/binary>>}, Op)).
confirm() ->
lager:info("Deploy & cluster some nodes"),
_Nodes = r... | null | https://raw.githubusercontent.com/basho/riak_test/8170137b283061ba94bc85bf42575021e26c929d/tests/verify_cluster_converge.erl | erlang | -module(verify_cluster_converge).
-behavior(riak_test).
-export([confirm/0]).
-include_lib("eunit/include/eunit.hrl").
-include_lib("riakc/include/riakc.hrl").
-define(assertDenied(Op), ?assertMatch({error, <<"Permission",_/binary>>}, Op)).
confirm() ->
lager:info("Deploy & cluster some nodes"),
_Nodes = r... | |
b8b245dc1b4ff13b23edfe6292e915dbec86251c7d7b925b6189fdb3e3826752 | rwmjones/guestfs-tools | random_seed.ml | virt - sysprep
* Copyright ( C ) 2012 - 2023 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 la... | null | https://raw.githubusercontent.com/rwmjones/guestfs-tools/57423d907270526ea664ff15601cce956353820e/customize/random_seed.ml | ocaml | It's important that we write a random seed if we possibly can.
* Unfortunately some installers (hello, Debian) don't include the file
* in the basic guest, so we have to work out where to create it.
Fedora
Backup plan: Try to create a new file.
Get n bytes of randomness from the host.
Create a new file, set... | virt - sysprep
* Copyright ( C ) 2012 - 2023 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 la... |
8df889880c76a3044da1b8a64f48c5ea237e84055b9cde33a7f3055efa964090 | mpickering/apply-refact | Structure13.hs | foo = case f v of _ -> x | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Structure13.hs | haskell | foo = case f v of _ -> x | |
436d4c3abf30621ed515feff36b71cf54c5d8c9f8b9192c7b9de2e0d5a89e828 | cwearl/fulmar | doc-scraper.rkt | #lang racket/base
(require racket/stream
racket/match
racket/dict
)
(provide read-sym-stream
fancy-filter
crush)
(define (sym-stream name port)
(let ([next-sym (read-syntax name port)])
(if (eof-object? next-sym)
empty-stream
(stream-cons next-sym (sy... | null | https://raw.githubusercontent.com/cwearl/fulmar/4cf60699558b3bb28fa813443456993d1563bfb2/private/doc/doc-scraper.rkt | racket | Replace with any empty dictionary type | #lang racket/base
(require racket/stream
racket/match
racket/dict
)
(provide read-sym-stream
fancy-filter
crush)
(define (sym-stream name port)
(let ([next-sym (read-syntax name port)])
(if (eof-object? next-sym)
empty-stream
(stream-cons next-sym (sy... |
afc0fe94d715265172954a85df90b958c918097d0353ec9e46b89fbd74fdffb2 | ChristopherBiscardi/snap-for-beginners | Twitter.hs | {-# LANGUAGE OverloadedStrings #-}
module Twitter
(Tweet
,tweetFormHandler ) where
import qualified Data.Text as T
import Text.Digestive
import Text.Digestive.Heist
import Text.Digestive.Snap
import Control.Applicative
import Snap.Core (writeText)
import Sna... | null | https://raw.githubusercontent.com/ChristopherBiscardi/snap-for-beginners/d35a4bbdd0a459983e2f37400fbc2bf8c8bf6239/code/df-one/src/Twitter.hs | haskell | # LANGUAGE OverloadedStrings # | module Twitter
(Tweet
,tweetFormHandler ) where
import qualified Data.Text as T
import Text.Digestive
import Text.Digestive.Heist
import Text.Digestive.Snap
import Control.Applicative
import Snap.Core (writeText)
import Snap.Snaplet
import Snap.Sna... |
a69e52832e9bca8b87c804d6a4069a5e5e6b1bc9493b7882a9dc1e38ca29e7f5 | google/ghc-source-gen | Binds.hs | module GHC.Hs.Binds (module HsBinds) where
import HsBinds
| null | https://raw.githubusercontent.com/google/ghc-source-gen/756d4cdc82f0aa86a8fd703fbc08b285ff3995ff/compat/GHC/Hs/Binds.hs | haskell | module GHC.Hs.Binds (module HsBinds) where
import HsBinds
| |
8bda2ecbabc989aac2266903e17afeaa43bd4cacc8e8fa89f08ff44d0a40543f | tonsky/advent-of-code | day2.clj | (ns advent-of-code.year2021.day2
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.set :as set]))
(def data
(with-open [rdr (io/reader (io/file "inputs/year2021/day2"))]
(->> (line-seq rdr)
(mapv #(let [[_ cmd arg] (re-matches #"([a-z]+) ([0-9]+)" %)]
[(keyword c... | null | https://raw.githubusercontent.com/tonsky/advent-of-code/094747f9e9b8d62e525ecde642f49db1c4327659/src/advent_of_code/year2021/day2.clj | clojure | (ns advent-of-code.year2021.day2
(:require
[clojure.java.io :as io]
[clojure.string :as str]
[clojure.set :as set]))
(def data
(with-open [rdr (io/reader (io/file "inputs/year2021/day2"))]
(->> (line-seq rdr)
(mapv #(let [[_ cmd arg] (re-matches #"([a-z]+) ([0-9]+)" %)]
[(keyword c... | |
4949758960d6fec317e02055f39ad4902125317a68b96f76f37d94d3b719ac29 | pbrisbin/bugsnag-haskell | Yesod.hs | | A ' yesodMiddleware ' that notifies of exceptions
--
-- 'yesodMiddleware' is the only way to handle things as actual exceptions. The
-- alternative, using 'errorHandler', means you would only ever see an
-- "InternalError Text" value.
--
-- The main downside to this middleware is that short-circuit responses also... | null | https://raw.githubusercontent.com/pbrisbin/bugsnag-haskell/7ac6935d87151298ad73ae08b1a38d6dcc8a8711/bugsnag-yesod/src/Network/Bugsnag/Yesod.hs | haskell |
'yesodMiddleware' is the only way to handle things as actual exceptions. The
alternative, using 'errorHandler', means you would only ever see an
"InternalError Text" value.
The main downside to this middleware is that short-circuit responses also
come through the middleware as exceptions, and must be filtered. ... | | A ' yesodMiddleware ' that notifies of exceptions
course you want to notify of 404s and such .
module Network.Bugsnag.Yesod
( bugsnagYesodMiddleware
, bugsnagYesodMiddlewareWith
) where
import Prelude
import Control.Monad (unless)
import Control.Monad.IO.Class (liftIO)
import Data.Bugsnag.Settings... |
b504fab74291f082d6f6c947d16c309d87719a364f2927ddd3bb36072bab4cf6 | cmsc430/www | example.rkt | #lang racket
(cons '() '())
| null | https://raw.githubusercontent.com/cmsc430/www/13085987ec16989b9fadb19ef792b82c88239e16/langs/hoodwink/example.rkt | racket | #lang racket
(cons '() '())
| |
2d3cbbd189e78d09c22daf31742295a4be3cb5b535916a82ef415117a6eb6ca7 | PrincetonUniversity/lucid | Events.ml | Useful functions
open Batteries
open Syntax
open InterpState
Generic Event defs
let event_name = "Event"
let event_id = Id.create event_name
let module_id = event_id
let event_error fun_name msg = error (event_name ^ ": " ^ fun_name ^ ": " ^ msg)
(* Event.delay *)
let event_delay_name = "delay"
let event_delay_... | null | https://raw.githubusercontent.com/PrincetonUniversity/lucid/3a8f1638858b180e009a914735e474b7cf01845f/src/lib/frontend/modules/Events.ml | ocaml | Event.delay | Useful functions
open Batteries
open Syntax
open InterpState
Generic Event defs
let event_name = "Event"
let event_id = Id.create event_name
let module_id = event_id
let event_error fun_name msg = error (event_name ^ ": " ^ fun_name ^ ": " ^ msg)
let event_delay_name = "delay"
let event_delay_id = Id.create eve... |
4e9e994d18dc289b640cd41172fd54d7cf628b45afd126ea6fe145cc70a3c111 | expipiplus1/vulkan | Main.hs | module Main where
import Control.Monad.IO.Class
import Control.Monad.Trans.Resource
import Frame
import Init
import MonadFrame
import MonadVulkan
import Render
import SDL ( showWindow
... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/b1e33d1031779b4740c279c68879d05aee371659/examples/hlsl/Main.hs | haskell |
Initialization
Go
| module Main where
import Control.Monad.IO.Class
import Control.Monad.Trans.Resource
import Frame
import Init
import MonadFrame
import MonadVulkan
import Render
import SDL ( showWindow
... |
7371e5f4865303dbd3154bca80c099ec9b3d8989912d2e4c41a3790e1dfad0a5 | SamB/coq | subtac.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/SamB/coq/8f84aba9ae83a4dc43ea6e804227ae8cae8086b1/contrib/subtac/subtac.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Make all obligations transparent s... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * CNRS - Ecole Polytechnique - INRIA Futurs - Universite Paris Sud
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
$ Id$
open Global
open P... |
dd24b65605ead9df4c4d93b40d0f72d6238aaa128338db45e5d4eb53f5d0b6f5 | tip-org/tools | Params.hs | module Tip.GHC.Params where
import Options.Applicative
import Tip.Utils
import Data.List.Split
import Data.Monoid
-- | Parameters
data Params = Params
{ param_include :: [FilePath]
-- ^ Directories to include
, param_debug_flags :: [DebugFlag]
-- ^ Debugging flags
, param_keep :: Maybe [String]
-- ^... | null | https://raw.githubusercontent.com/tip-org/tools/34350072587bd29157d18331eb895a1b2819555f/tip-ghc/src/Tip/GHC/Params.hs | haskell | | Parameters
^ Directories to include
^ Debugging flags
^ Only consider these functions and properties
| Default (empty) parameters
| Debugging flags | module Tip.GHC.Params where
import Options.Applicative
import Tip.Utils
import Data.List.Split
import Data.Monoid
data Params = Params
{ param_include :: [FilePath]
, param_debug_flags :: [DebugFlag]
, param_keep :: Maybe [String]
}
deriving Show
commaSep :: [String] -> [String]
commaSep = concatMap ... |
7649c2e45295a495a016fe3eb1947ed8730eb20f7d6eca6f02b25801bd0f91f0 | alhimik45/three-man-chess | page.cljs | (ns three-man-chess.page)
(def params
(let [location-hash (-> js/window .-location .-hash)]
(-> location-hash (.split "/") next vec)))
(defn redirect! [page & params]
(.replace js/location (str (.-protocol js/location) "//"
(.-host js/location) "/"
pa... | null | https://raw.githubusercontent.com/alhimik45/three-man-chess/ffde0eb152d795aac829a9e82f4bbd0b6455659c/src/cljs/three_man_chess/page.cljs | clojure | (ns three-man-chess.page)
(def params
(let [location-hash (-> js/window .-location .-hash)]
(-> location-hash (.split "/") next vec)))
(defn redirect! [page & params]
(.replace js/location (str (.-protocol js/location) "//"
(.-host js/location) "/"
pa... | |
dfd6ad07d2fdd09de420b68754860a444979239453e20f07c88dad5216e59b4f | racket/rhombus-prototype | space-meta-clause-primitive.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse/pre
racket/symbol)
"space-meta-clause.rkt"
"parens.rkt"
"parse.rkt")
(provide (for-space rhombus/space_meta_clause
parse_syntax_class
parse_prefix... | null | https://raw.githubusercontent.com/racket/rhombus-prototype/2d7e044db8701ff06393922894bd4cb0edcdf299/rhombus/private/space-meta-clause-primitive.rkt | racket | #lang racket/base
(require (for-syntax racket/base
syntax/parse/pre
racket/symbol)
"space-meta-clause.rkt"
"parens.rkt"
"parse.rkt")
(provide (for-space rhombus/space_meta_clause
parse_syntax_class
parse_prefix... | |
c20fdb9aeebdeee66cd79fc3aa0045560443f22e53e7ef54261263f7d6bf8142 | AdaCore/why3 | mc_lexer.mli | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
(* ... | null | https://raw.githubusercontent.com/AdaCore/why3/4441127004d53cf2cb0f722fed4a930ccf040ee4/plugins/microc/mc_lexer.mli | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2022 -- Inria - CNRS - Paris - Saclay University
General Public License version 2.1 , with the special exception
val parse : string -> in_channel -> Mc_ast.file
val parse_term : Lexing.lexbuf -> Why3.Ptree.term
val parse... |
e6fbc9b4c59154603aa1d7077313859c198f4d3bc994c2ab13ab2dd120fee7ad | squaresLab/genprog-code | cdiffmain.ml |
* Structural Diff on C Programs
*
* --generate : given two C files , produce a data file and a text patch file
* that can be used to turn one into the other
*
* --use : given the data file and some subset of the text file , apply that
* subset of the changes to turn the first file into ( some... | null | https://raw.githubusercontent.com/squaresLab/genprog-code/7982415b347529efee02190ab9ba6bd7eda6195e/tools/ga/cdiffmain.ml | ocaml | Cil.printCilAsIs := true ;
Cil.printCilAsIs := true; |
* Structural Diff on C Programs
*
* --generate : given two C files , produce a data file and a text patch file
* that can be used to turn one into the other
*
* --use : given the data file and some subset of the text file , apply that
* subset of the changes to turn the first file into ( some... |
1e523d563229d49e79a463cf64e55a34b20f748d456d989c5b0b7b84b7ad5fcc | mfoemmel/erlang-otp | wxGridEvent.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxGridEvent.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
< dd><em > grid_cell_left_click</em > , ... |
e24bc99732f537707ec90689030e3df0e16762e36d87b68287d8d83c1631902e | eslick/cl-registry | twitter.lisp | (in-package :registry)
;;
;; Quick hack to send twitter updates
;;
(define-system-event-hook update-twitter-feed (system-timer)
(when (twitter-enabled-p)
(update-twitter-feed)))
(defun twitter-enabled-p ()
(get-site-config-param :twitter-enabled-p))
;;
;; Authenticating user
;;
(defparameter *registry-twit... | null | https://raw.githubusercontent.com/eslick/cl-registry/d4015c400dc6abf0eeaf908ed9056aac956eee82/src/plugins/twitter.lisp | lisp |
Quick hack to send twitter updates
Authenticating user
Sending feeds
Generating stats and text
| (in-package :registry)
(define-system-event-hook update-twitter-feed (system-timer)
(when (twitter-enabled-p)
(update-twitter-feed)))
(defun twitter-enabled-p ()
(get-site-config-param :twitter-enabled-p))
(defparameter *registry-twitter-user* nil)
(defun get-twitter-user ()
"Unless we've created our us... |
690a080dd194a0d2eb473ded5feb25fbc6638285af0ff57da93663ca5a68c343 | GaloisInc/macaw | JumpBounds.hs | {- |
This module defines a relational abstract domain for tracking bounds
checks emitted by the compiler on registers and stack location. This is
built on top of an underlying stack pointer tracking domain so that we
can include checks on stack locations and maintain constraints between
known equivalent values.
-}
#... | null | https://raw.githubusercontent.com/GaloisInc/macaw/2c85dce18e2c38cef160ebe13de95a678806bc2f/base/src/Data/Macaw/AbsDomain/JumpBounds.hs | haskell | |
This module defines a relational abstract domain for tracking bounds
checks emitted by the compiler on registers and stack location. This is
built on top of an underlying stack pointer tracking domain so that we
can include checks on stack locations and maintain constraints between
known equivalent values.
# LAN... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module Data.Macaw.AbsDomain.JumpBounds
InitJumpBounds
, initBndsMap
, functio... |
1fe1852296598ca49e68b79bba9330af8b8017fc842907588647a53243ef7ee5 | fmi/fp2015 | version2-problem5.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
(define (all-prods ns)
(define (helper ns index prod)
(cond
[(= index (length ns))
(list prod)]
[else (append (helper ns (add1 index) (* prod (list-ref ns index)))
(helper ns (add1 index) prod))]))
(cond
[(eq... | null | https://raw.githubusercontent.com/fmi/fp2015/ea2ea5448c6c054b00c280590e2e56ee782278e9/exam1/version2-problem5.rkt | racket | #lang racket
(require rackunit)
(require rackunit/text-ui)
(define (all-prods ns)
(define (helper ns index prod)
(cond
[(= index (length ns))
(list prod)]
[else (append (helper ns (add1 index) (* prod (list-ref ns index)))
(helper ns (add1 index) prod))]))
(cond
[(eq... | |
9aa44c1e152371e3d4c021089b1e5fa16ae23d07f2028e388b6fa56c60b155aa | jaredly/reason-language-server | typedtreeIter.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
( OCa... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/402/typedtreeIter.mli | ocaml | ************************************************************************
OCaml
... | ( OCamlPro ) , ( INRIA Saclay )
Copyright 2007 Institut National de Recherche en Informatique et
under the terms of the Q Public License version 1.0 .
open Asttypes
open Typedtree
module type IteratorArgument = sig
val enter_structure : structure -> unit
val enter... |
05ab06ef7117b3ea2021e3fee7c477d099efbe71c8fc853a444d2bb8ee039339 | dreixel/regular | Constructor.hs | {-# LANGUAGE KindSignatures #-}
-----------------------------------------------------------------------------
-- |
-- Module : Generics.Regular.Constructor
Copyright : ( c ) 2008 Universiteit Utrecht
-- License : BSD3
--
Maintainer :
-- Stability : experimental
-- Portability : non-p... | null | https://raw.githubusercontent.com/dreixel/regular/c8460ee827f1eb04dd31b873380ff9626a4a4220/src/Generics/Regular/Constructor.hs | haskell | # LANGUAGE KindSignatures #
---------------------------------------------------------------------------
|
Module : Generics.Regular.Constructor
License : BSD3
Stability : experimental
Portability : non-portable
Summary: Representation for constructors.
--------------------------------------... |
Copyright : ( c ) 2008 Universiteit Utrecht
Maintainer :
module Generics.Regular.Constructor (
Constructor(..), Fixity(..), Associativity(..)
) where
class Constructor c where
conName :: t c (f :: * -> *) r -> String
conFixity :: t c (f :: * -> *) r -> Fixity
conFixity = const Prefix
c... |
bb56c1532a4211d22b8deef01b69bff0711f306711e30c6d464aa163a3456691 | elldritch/hipsterfy | User.hs | module Hipsterfy.Database.User
( UserT (..),
User,
UserReadF,
UserWriteF,
UserIDT (..),
UserID,
UserIDReadF,
SpotifyCredentialsT (..),
SpotifyCredentials,
pUserID,
userTable,
UserArtistFollowT (..),
UserArtistFollowF,
pUserArtistFollow,
userArtistFollowTable,
... | null | https://raw.githubusercontent.com/elldritch/hipsterfy/7d455697c1146d89fc6b2f78effe6694efe69120/src/Hipsterfy/Database/User.hs | haskell | "hipsterfy_user" table.
"hipsterfy_user_spotify_artist_follow" table.
"spotify_oauth_request" table.
"hipsterfy_user_session" table. | module Hipsterfy.Database.User
( UserT (..),
User,
UserReadF,
UserWriteF,
UserIDT (..),
UserID,
UserIDReadF,
SpotifyCredentialsT (..),
SpotifyCredentials,
pUserID,
userTable,
UserArtistFollowT (..),
UserArtistFollowF,
pUserArtistFollow,
userArtistFollowTable,
... |
0af44a606cda16368b4736acf2cff6f6f8d821fbd85743326844e9e762e47cdf | ashinn/chibi-scheme | pcre.scm |
PCRE parsing , adapted from IrRegex .
(define ~none 0)
(define ~save? 1)
(define ~case-insensitive? 2)
(define ~multi-line? 4)
(define ~single-line? 8)
(define ~ignore-space? 16)
(define (flag-set? flags i)
(= i (bitwise-and flags i)))
(define (flag-join a b)
(if b (bitwise-ior a b) a))
(define (flag-clear a b... | null | https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/chibi/regexp/pcre.scm | scheme | alternately permissively allow this as a -
accumulate the substring from..i as literal text
like collect but breaks off the last single character when
collecting literal data, as the argument to ?/*/+ etc.
collects for use as a result, reversing and grouping OR
terms, and some ugly tweaking of `function-like' gro... |
PCRE parsing , adapted from IrRegex .
(define ~none 0)
(define ~save? 1)
(define ~case-insensitive? 2)
(define ~multi-line? 4)
(define ~single-line? 8)
(define ~ignore-space? 16)
(define (flag-set? flags i)
(= i (bitwise-and flags i)))
(define (flag-join a b)
(if b (bitwise-ior a b) a))
(define (flag-clear a b... |
95464f90e2bfc4f75ee48c0a7c626432b4f76f44c6551999f057dcff2d39c2ff | alanzplus/EOPL | 2.12.rkt | #lang eopl
; empty-stack
; push
; pop
; top
; empty-stack?
(define unknown-action
(lambda (action)
(eopl:error "unkonw action ~s" action)))
(define empty-stack
(lambda ()
(lambda (action)
(cond ((eqv? 'top action)
(eopl:error "stack underflow"))
((eqv? 'pop action)
... | null | https://raw.githubusercontent.com/alanzplus/EOPL/d7b06392d26d93df851d0ca66d9edc681a06693c/EOPL/ch2/2.12.rkt | racket | empty-stack
push
pop
top
empty-stack? | #lang eopl
(define unknown-action
(lambda (action)
(eopl:error "unkonw action ~s" action)))
(define empty-stack
(lambda ()
(lambda (action)
(cond ((eqv? 'top action)
(eopl:error "stack underflow"))
((eqv? 'pop action)
(eopl:error "stack underflow"))
... |
934c38ec48fdccd69871072a3850d90ce9af157a5c7ad784a55a533c1e180359 | opencog/opencog | neg.scm | ; This rule is for negation of predicates, as in "You do not smell good, sir."
( AN June 2015 )
(define neg
(BindLink
(VariableList
(var-decl "$a-parse" "ParseNode")
(var-decl "$pred" "WordInstanceNode")
(var-decl "$pred-lemma" "WordNode")
)
(AndLink
(word-in-parse "$pred" "$a-parse")
(word-le... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/nlp/relex2logic/rules/neg.scm | scheme | This rule is for negation of predicates, as in "You do not smell good, sir." | ( AN June 2015 )
(define neg
(BindLink
(VariableList
(var-decl "$a-parse" "ParseNode")
(var-decl "$pred" "WordInstanceNode")
(var-decl "$pred-lemma" "WordNode")
)
(AndLink
(word-in-parse "$pred" "$a-parse")
(word-lemma "$pred" "$pred-lemma")
(word-feat "$pred" "negative")
)
(ExecutionO... |
29b1f8cebfa70c2ed287d1a4ef89554f20fdd0328e5ff4a1beb89b43ea5ab4da | iostat/relapse | GenericRLPTest.hs | {-# LANGUAGE DeriveGeneric #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module GenericRLPTest where
import Control.Monad ... | null | https://raw.githubusercontent.com/iostat/relapse/cf8c53f957ce2f8552492f06073cb3e14c417dab/test/GenericRLPTest.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes # | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
module GenericRLPTest where
import Control.Monad (forM_, when)
import Data.Either (isRight)
import qualified Data.Map as M
import qual... |
382762da5c3dd8442a6fae4e25fbc2a300151655afb9fd399b0bddbfad3490d8 | jeromesimeon/Galax | cs_util.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/code_selection/cs_util.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : cs_util.ml , v 1.38 2007/02/21 21:14:43 simeon Exp $
open Format
open Error
open Datatypes
open Datatypes_util
open Xquery_ast
open Xquery_algebra_ast
open Xquery_algebra_ast_util
open Xquery_common_ast
open Xquery_algebra_ast_an... |
9480f4c165dc3dac8e176996e1339b1cd79f772e1576abd97f8acf9a65171367 | pdarragh/variadic-curry-calculus | main.rkt | #lang racket
(require "lambda-vc.rkt")
(provide (all-from-out "lambda-vc.rkt"))
(module reader syntax/module-reader
lambda-vc)
| null | https://raw.githubusercontent.com/pdarragh/variadic-curry-calculus/79ac3aec14e31c08b626385acc06f389342d69a5/lambda-vc/main.rkt | racket | #lang racket
(require "lambda-vc.rkt")
(provide (all-from-out "lambda-vc.rkt"))
(module reader syntax/module-reader
lambda-vc)
| |
ebcce46ad072f3c66dedb21aeb1a2841e8f204f76abff4115b91daf4c84cec8f | BinaryAnalysisPlatform/bap | bap_primus_machine.mli | Not yet released .
open Core_kernel[@@warning " -D " ]
open Monads . Std
open Bap_knowledge
( * * Primus - A non - deterministic interpreter .
open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_knowledge
(** Primus - A non-deterministic interpreter.
*)
module P... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/253afc171bbfd0fe1b34f6442795dbf4b1798348/lib/bap_primus_machine/bap_primus_machine.mli | ocaml | * Primus - A non-deterministic interpreter.
* The Machine Exception.
The exn type is an extensible variant, and components
usually register their own error constructors.
* [an observation] of a value of type [a].
* Machine exit status.
A machine may terminate normally, or abnormally with the
... | Not yet released .
open Core_kernel[@@warning " -D " ]
open Monads . Std
open Bap_knowledge
( * * Primus - A non - deterministic interpreter .
open Core_kernel[@@warning "-D"]
open Monads.Std
open Bap_knowledge
module Primus : sig
open Knowledge
type 'a machine
ty... |
24073a60632b5d6cf885537959f6a616fbc38bf3a2c1b2dce24788200695a40b | facebookarchive/duckling_old | finance.clj | (
{}
"십달러"
"십불"
(money 10 "$")
;"under $15"
;"no more than 15$"
;"no greater than 15$"
" less than fifteen dollars "
( money 15 " $ " " < " )
"십센트"
(money 10 "cent")
"만달러"
"만불"
(money 10000 "$")
"일점이삼달러"
"일쩜이삼달러"
"일점이삼불"
"일쩜이삼불"
(money 1.23 "$")
"이달러이십삼센트"
"이불이십삼센... | null | https://raw.githubusercontent.com/facebookarchive/duckling_old/bf5bb9758c36313b56e136a28ba401696eeff10b/resources/languages/ko/corpus/finance.clj | clojure | "under $15"
"no more than 15$"
"no greater than 15$" | (
{}
"십달러"
"십불"
(money 10 "$")
" less than fifteen dollars "
( money 15 " $ " " < " )
"십센트"
(money 10 "cent")
"만달러"
"만불"
(money 10000 "$")
"일점이삼달러"
"일쩜이삼달러"
"일점이삼불"
"일쩜이삼불"
(money 1.23 "$")
"이달러이십삼센트"
"이불이십삼센트"
(money 2.23 "$")
"이십유로"
"EUR 20"
(money 20 "EUR"... |
759ef4a3769039b84e872be5dc14610dc3237e15c2768462dbd7357ec763b0e8 | willghatch/rackterm | shell-trampoline.rkt | #lang racket/base
;; This is a wrapper to launch another program with proper settings to have job
;; control and let everything work properly in a terminal. My idea was to have
;; this in racket so no code in other languages would be needed.
(module+ main
(require "pty.rkt" ffi/unsafe/port)
(define args (vector... | null | https://raw.githubusercontent.com/willghatch/rackterm/5d94185dea482974a1cf66099380bede6c2ce501/rackterm/private/shell-trampoline.rkt | racket | This is a wrapper to launch another program with proper settings to have job
control and let everything work properly in a terminal. My idea was to have
this in racket so no code in other languages would be needed.
this gives the process a new session ID
Some terminal emulators use setpgid too, but it's failing f... | #lang racket/base
(module+ main
(require "pty.rkt" ffi/unsafe/port)
(define args (vector->list (current-command-line-arguments)))
(setsid)
( setpgid 0 0 )
(set-controlling-tty (unsafe-port->file-descriptor (current-input-port)))
(with-handlers ([(lambda (exn) #t)
(lambda (exn) ((erro... |
6fdc7e2992ab76d253debd7ca19287e2a9cf83f0ffcf6912f2ce4582baac0819 | apache/couchdb-chttpd | chttpd_epi.erl | 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 License is distributed on an " AS ... | null | https://raw.githubusercontent.com/apache/couchdb-chttpd/74002101513c03df74a4c25f3c892f5d003fa5da/src/chttpd_epi.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 limitations u... | 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(chttpd_epi).
-behaviour(couch_epi_plugin).
-export([
app/0,
providers/0,
services/0,
data_subscriptions/0,
data_providers/0,
... |
4798530a49c491c8a4c44fbeb4d13cc776407947b5f6ac634940fc7cb333acb3 | clojusc/ltest | core_test.clj | (ns ltest.core-test
(:require
[clojure.test :refer [are deftest is testing]]
[ltest.core :refer [run-test run-tests run-suite run-suites]]))
(deftest placeholder
(testing "Placeholder"
(is (= 1 1))))
| null | https://raw.githubusercontent.com/clojusc/ltest/e82073d830e0e66018bbd6c98f49b0617cd2fa88/ltest/test/ltest/core_test.clj | clojure | (ns ltest.core-test
(:require
[clojure.test :refer [are deftest is testing]]
[ltest.core :refer [run-test run-tests run-suite run-suites]]))
(deftest placeholder
(testing "Placeholder"
(is (= 1 1))))
| |
3a97d41ac01f0d61275f9cd4df02d7c5c0017dfe6936c572012529c954d859f7 | NuID/ethereum | ethereum.cljc | (ns nuid.ethereum
(:require
[clojure.spec.alpha :as s]
[nuid.ethereum.client :as client]
[nuid.ethereum.impl :as impl]
[nuid.ethereum.proto :as proto]
[nuid.ethereum.transaction :as tx]
[nuid.ident.ethereum :as ident.ethereum]))
;;;
;;; NOTE: specs, predicates
;;;
(def networks ident.et... | null | https://raw.githubusercontent.com/NuID/ethereum/fe57306c71cd1afc2966c736a1fbd465abc67f1f/src/nuid/ethereum.cljc | clojure |
NOTE: specs, predicates
NOTE: helpers
NOTE: api
| (ns nuid.ethereum
(:require
[clojure.spec.alpha :as s]
[nuid.ethereum.client :as client]
[nuid.ethereum.impl :as impl]
[nuid.ethereum.proto :as proto]
[nuid.ethereum.transaction :as tx]
[nuid.ident.ethereum :as ident.ethereum]))
(def networks ident.ethereum/networks)
(s/def ::client ::proto/cli... |
40ae9de60a796216233cdad359499701f7e4f053dbd89422c4a5b0a4f2769939 | flavioc/cl-hurd | class.lisp |
(in-package :hurd-tree-translator)
;;
;; This file contains a special kind of translator:
;; the tree-translator
;; It implements without much hassle the directory callbacks
;; and maintains a structured directory hierarchy.
;;
(defclass tree-translator (translator)
((name :initform "tree-translator"
:doc... | null | https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/tree-translator/class.lisp | lisp |
This file contains a special kind of translator:
the tree-translator
It implements without much hassle the directory callbacks
and maintains a structured directory hierarchy.
It ensures the root node is a directory
and calls the function fill-root-node to fill the directory
structure. |
(in-package :hurd-tree-translator)
(defclass tree-translator (translator)
((name :initform "tree-translator"
:documentation "Translator name"))
(:documentation "The tree-translator."))
(defmethod propagate-read-to-execute ((stat stat))
"Enables the execute permission bit if the read bit is on."
(if... |
5b9c92103b7e9f319c487366a8b2a07cf7db2fb7ceb4e3196980169ec3b9046b | unison-code/unison | Target.hs | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | null | https://raw.githubusercontent.com/unison-code/unison/9f8caf78230f956a57b50a327f8d1dca5839bf64/src/unison/src/Unison/Target.hs | haskell | |
Copyright : Copyright ( c ) 2016 , RISE SICS AB
License : BSD3 ( see the LICENSE file )
Maintainer :
Copyright : Copyright (c) 2016, RISE SICS AB
License : BSD3 (see the LICENSE file)
Maintainer :
-}
Main authors :
< >
This file is part of Unison , see -code.github.io ... | |
aa74895098edba09279f1f0176a325fa0f63fbbff358790ab1f3074294f16dd2 | Press-One/prsc | dsl.clj | (ns prsc.dsl
"prsc dsl"
(:require [config.core :refer [env]]
[cheshire.core :refer :all]
[instaparse.core :as insta]
[clara.rules :refer :all]
[schema.core :as s]
[clojure.tools.logging :as log]
[prsc.utils :refer :all]
))
(defrec... | null | https://raw.githubusercontent.com/Press-One/prsc/a5cb9e92b9270778a73e461ba74a3f8628623be5/src/prsc/dsl.clj | clojure | (ns prsc.dsl
"prsc dsl"
(:require [config.core :refer [env]]
[cheshire.core :refer :all]
[instaparse.core :as insta]
[clara.rules :refer :all]
[schema.core :as s]
[clojure.tools.logging :as log]
[prsc.utils :refer :all]
))
(defrec... | |
986f1673e0263a2887e281561d62df65ff6444532621eff0f84704e8a4ff43a1 | reasonml/reason | reason_lexer.mli | open Reason_parser
type t
type 'a positioned = 'a * Lexing.position * Lexing.position
val init : ?insert_completion_ident:Lexing.position -> Lexing.lexbuf -> t
val token : t -> token positioned
val lexbuf : t -> Lexing.lexbuf
type comment = string * Location.t
(* Some docstrings are not accepted by the parser
an... | null | https://raw.githubusercontent.com/reasonml/reason/daa11255cb4716ce1c370925251021bd6e3bd974/src/reason-parser/reason_lexer.mli | ocaml | Some docstrings are not accepted by the parser
and turned into comments. | open Reason_parser
type t
type 'a positioned = 'a * Lexing.position * Lexing.position
val init : ?insert_completion_ident:Lexing.position -> Lexing.lexbuf -> t
val token : t -> token positioned
val lexbuf : t -> Lexing.lexbuf
type comment = string * Location.t
type invalid_docstrings
val empty_invalid_docstrings : ... |
9412e3611cb7787ff719f940862f7d579e76d7bb793dc91856dc3451a79801fd | racket/gui | rbtree.rkt | #lang racket/base
red-black-tree.rkt -- and -- 3rd nov 2003
;;; PURPOSE
; This is an implementation of red/black trees, based on the galore.plt code
;;; HISTORY
This is direct port of Jean - Christophe Filliatre 's implementation
of red - black trees in Ocaml .
13th jan 2010 [ mflatt ]
- simpli... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/private/wx/common/rbtree.rkt | racket | PURPOSE
This is an implementation of red/black trees, based on the galore.plt code
HISTORY
something like this should be in `scheme', instead.
- added set?
- numerous modifications to handle the case were
elm= is finer than elm> and elm<
- fixed serious bug in unbalanced-left
(one sub tree w... | #lang racket/base
red-black-tree.rkt -- and -- 3rd nov 2003
This is direct port of Jean - Christophe Filliatre 's implementation
of red - black trees in Ocaml .
13th jan 2010 [ mflatt ]
22nd jan 2004 [ soegaard ]
- fixed bug in inter - list reported by
15th feb 2005 [ soegaard ]
17th f... |
13ed74749f76618db728d0b12d601280c85d81216f2d59f712185d4a22cb714b | b0-system/brzo | brzo_cmd_sources.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2018 The programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2018... | null | https://raw.githubusercontent.com/b0-system/brzo/e481a39d7881d7aaf800cf3c7a9b6cd836867a90/src/brzo_cmd_sources.ml | ocaml | Command line interface | ---------------------------------------------------------------------------
Copyright ( c ) 2018 The programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 2018... |
643e106b4bc95cdb6cfc65d358c469cdc91da2e65b8cfff3cd8aaf94d925eaad | craigfe/field_repr | main.ml | open Field_repr.O
let check_int pos = Alcotest.(check ~pos int) ""
let check_string pos = Alcotest.(check ~pos string) ""
module X : sig
type t = { mutable foo : int; mutable bar : string } [@@deriving field_repr]
end = struct
type t = { mutable foo : int; mutable bar : string } [@@deriving field_repr]
end
open ... | null | https://raw.githubusercontent.com/craigfe/field_repr/bd9f1ecb7a563ec3ef05e762285f58ba546c15a0/test/unit-tests/main.ml | ocaml | open Field_repr.O
let check_int pos = Alcotest.(check ~pos int) ""
let check_string pos = Alcotest.(check ~pos string) ""
module X : sig
type t = { mutable foo : int; mutable bar : string } [@@deriving field_repr]
end = struct
type t = { mutable foo : int; mutable bar : string } [@@deriving field_repr]
end
open ... | |
ffbd7fb27ab0247ede69f8d1060ffc7256268fb0ecd89136ab33690d3bd60f6f | Tyruiop/syncretism | utils.clj | (ns datops-compute.utils
(:require
[clojure.string :as str]
[clojure.java.io :as io])
(:import
[org.apache.commons.io Charsets]))
(defn read-gzipped
[f fname]
(with-open [in (java.util.zip.GZIPInputStream.
(io/input-stream fname))]
(doall
(map
f
(line-seq (java.i... | null | https://raw.githubusercontent.com/Tyruiop/syncretism/7999dd9a01e7a751b84301cb54bdad41ff1a025c/datops-compute/src/datops_compute/utils.clj | clojure | Get last date's dir | (ns datops-compute.utils
(:require
[clojure.string :as str]
[clojure.java.io :as io])
(:import
[org.apache.commons.io Charsets]))
(defn read-gzipped
[f fname]
(with-open [in (java.util.zip.GZIPInputStream.
(io/input-stream fname))]
(doall
(map
f
(line-seq (java.i... |
28d0aa74d01b3d9418f7d3a84ceac86eda73f6564cbe7be47ec10d03e110ce7b | awakesecurity/spectacle | Tape.hs | {-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Control.Comonad.Tape
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see LICENSE
--
-- Stability : stable
Portability : non - portable ( GHC extensions )
--
-- A @'Tape'@ type for walking over and focus... | null | https://raw.githubusercontent.com/awakesecurity/spectacle/430680c28b26dabb50f466948180eb59ba72fc8e/src/Control/Comonad/Tape.hs | haskell | # OPTIONS_HADDOCK show-extensions #
|
Module : Control.Comonad.Tape
Stability : stable
A @'Tape'@ type for walking over and focusing on sequences of values.
@since 1.0.0
* Tape Comonad
** Construction
** Destruction
** Operations
--------------------------------------------------------------------... |
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see LICENSE
Portability : non - portable ( GHC extensions )
module Control.Comonad.Tape
Tape (Tape, before, focus, after),
viewl,
viewr,
viewAt,
toSeq,
shiftl,
shiftr,
tabulater,
ta... |
2fcaeb991ca84a8282da3a3b4dc53d0860ff69af00293695afee710efff95912 | brendanhay/amazonka | DescribeOrganization.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workmail/gen/Amazonka/WorkMail/DescribeOrganization.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Module : Amazonka.WorkMail.DescribeOrganization
Stability : auto-generated
Provides more information regarding a given organization based on its
identifier.
* Creating a Request
* Request Lenses
* Destructuring the Response
* Response Lenses
| /... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
4f21363c55e8f3269036f01e4d525fe423213798a6849338aec160c6b876d211 | m4b/rdr | ReadPE.ml | open Config
open PE.Import
open PE.Export
open PE.Header
open Goblin.Import
open Goblin.Export
let analyze (config:Config.t) binary =
let pe = PE.get ~coverage:config.print_coverage binary in
(* print switches *)
if (not config.silent) then
begin
if (not config.search) then
PE.print_header_stub... | null | https://raw.githubusercontent.com/m4b/rdr/2bf1f73fc317cd74f8c7cacd542889df729bd003/src/ReadPE.ml | ocaml | print switches
NO-OP no debug symbols implemented yet | open Config
open PE.Import
open PE.Export
open PE.Header
open Goblin.Import
open Goblin.Export
let analyze (config:Config.t) binary =
let pe = PE.get ~coverage:config.print_coverage binary in
if (not config.silent) then
begin
if (not config.search) then
PE.print_header_stub pe;
if (config.v... |
103079edbcf311b71a600fabcd8980b8ca04ae0acb6ff5323b8bcddbe57408ea | ocaml-batteries-team/batteries-included | batAvlTree.mli | Copyright 2003 . distributed with LGPL
Modified by < >
* Internals of ISet and IMap , usable as generic tree library
type +'a tree
val empty : 'a tree
val is_empty : 'a tree -> bool
val make_tree : 'a tree -> 'a -> 'a tree -> 'a tree
val create : 'a tree -> 'a -> 'a tree -> 'a tree
(** [create l v r] is ... | null | https://raw.githubusercontent.com/ocaml-batteries-team/batteries-included/59f8946a0220fa59775f6205a17080df9ab3c1cf/src/batAvlTree.mli | ocaml | * [create l v r] is similar to [make_tree l v r] but performs no rebalancing;
in other words, you should use this only when you {e know} that [l] and [r]
are already balanced.
* @raise Not_found if the tree is empty
* @raise Not_found if the tree is empty
* @raise Not_found if the tree is empty
Sanity chec... | Copyright 2003 . distributed with LGPL
Modified by < >
* Internals of ISet and IMap , usable as generic tree library
type +'a tree
val empty : 'a tree
val is_empty : 'a tree -> bool
val make_tree : 'a tree -> 'a -> 'a tree -> 'a tree
val create : 'a tree -> 'a -> 'a tree -> 'a tree
val height : 'a tree ... |
642b5361d3dde2db671c053e2a5cd335b98742d68e891107532ca1ef9a582510 | haskell/haskell-language-server | MessageForallA.hs | test :: a
test = _
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/MessageForallA.hs | haskell | test :: a
test = _
| |
ea42ce789b77e87c53ea846aa4ecfbf9c68c0e58333f9a50ae452a00959a2701 | wireapp/servant-uverb | UVerb.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -Wno - orphans #
module Servant.Swagger.UVerb () where
import Control.Applicative ((<|>))
import qualified Data.HashMap.Strict.InsOrd as I
import Data.Proxy (Proxy (Proxy))
import Data.Swagger (ToSchema... | null | https://raw.githubusercontent.com/wireapp/servant-uverb/a2d445e05f9e470590dcbec80db8959bcfb89b43/servant-uverb-swagger/src/Servant/Swagger/UVerb.hs | haskell | workaround for
We'd like to juse use (<>) but the instances are wrong | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -Wno - orphans #
module Servant.Swagger.UVerb () where
import Control.Applicative ((<|>))
import qualified Data.HashMap.Strict.InsOrd as I
import Data.Proxy (Proxy (Proxy))
import Data.Swagger (ToSchema... |
e0783ce31cb5c18ab52a72e84abc1a3778f2d2a5fda2c203861d4a6d0ac0547c | ghcjs/ghcjs-base | Internal.hs | # LANGUAGE MagicHash , NegativeLiterals , BangPatterns ,
ForeignFunctionInterface , JavaScriptFFI , UnliftedFFITypes
#
ForeignFunctionInterface, JavaScriptFFI, UnliftedFFITypes
#-}
module Data.JSString.Internal where
import Prelude ( Eq ( .. ) , ( .. ) , Show ( .. ) , Re... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-base/18f31dec5d9eae1ef35ff8bbf163394942efd227/Data/JSString/Internal.hs | haskell | # INLINE compareJSString #
# INLINE empty #
----------------------------------------------------------------------------- | # LANGUAGE MagicHash , NegativeLiterals , BangPatterns ,
ForeignFunctionInterface , JavaScriptFFI , UnliftedFFITypes
#
ForeignFunctionInterface, JavaScriptFFI, UnliftedFFITypes
#-}
module Data.JSString.Internal where
import Prelude ( Eq ( .. ) , ( .. ) , Show ( .. ) , Re... |
dc1bcc8da8e153cdf624c4e7a1d97d5a60d207961e5e7e47755ee1aeb1993b61 | atgreen/lisp-openshift | mem.lisp | (in-package :cl-mongo)
#+sbcl(defun gen-clean (gen)
(let ((thr (sb-ext:generation-minimum-age-before-gc gen)))
(setf (sb-ext:generation-minimum-age-before-gc gen) 0.d0)
(sb-ext:gc :gen gen)
(setf (sb-ext:generation-minimum-age-before-gc gen) thr)))
#+sbcl(defun reclaim-memory()
(dotimes (gen 7)
... | null | https://raw.githubusercontent.com/atgreen/lisp-openshift/40235286bd3c6a61cab9f5af883d9ed9befba849/quicklisp/dists/quicklisp/software/cl-mongo-20120208-git/src/mem.lisp | lisp | (format t "hello ~A~%" gen) | (in-package :cl-mongo)
#+sbcl(defun gen-clean (gen)
(let ((thr (sb-ext:generation-minimum-age-before-gc gen)))
(setf (sb-ext:generation-minimum-age-before-gc gen) 0.d0)
(sb-ext:gc :gen gen)
(setf (sb-ext:generation-minimum-age-before-gc gen) thr)))
#+sbcl(defun reclaim-memory()
(dotimes (gen 7)
... |
bef8cfe855a2df182d8b166308a272aadf682aa1fc46845033dd2c88c6fe0030 | JKTKops/cspim | Parser.hs | -------------------------------------------------------------------------------------------
-- QUASIQUOTER FOR TEMPLATE HASKELL
--
We want to be able to write literal MIPS code in the code generator . This is twofold :
1 ) Simplify the process of reading and writing the MIPS translations of VM instructions .
2 ) ... | null | https://raw.githubusercontent.com/JKTKops/cspim/0218d88ee774023eecef2c4a0733c3cf1184f443/src/MIPS/Parser.hs | haskell | -----------------------------------------------------------------------------------------
QUASIQUOTER FOR TEMPLATE HASKELL
Template Haskell is the way to go here: we need a parser, and [|mips|code] brackets
will be the EDSL.
------------------------------------------------------------------------------------------
... | We want to be able to write literal MIPS code in the code generator . This is twofold :
1 ) Simplify the process of reading and writing the MIPS translations of VM instructions .
2 ) Easier to selectively add comments where desired .
# LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
module MIPS.Parser where
i... |
92074694e987f27d011e518c19d70a899f4cff0d28fa4c760a484358858eafda | esl/MongooseIM | mongoose_deprecations_SUITE.erl | -module(mongoose_deprecations_SUITE).
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-compile([export_all, nowarn_export_all]).
-define(TEST_COOLDOWN, 50). % ms
ms , must be much smaller than TEST_COOLDOWN
-define(LOG_MSG, #{what => cool_deprecated}).
all() ->
[
... | null | https://raw.githubusercontent.com/esl/MongooseIM/e270ef15f36049170fceed9fb82b1b8c57bbe17e/test/mongoose_deprecations_SUITE.erl | erlang | ms
Test cases
Even the same message can be logged with any frequency when tags
are different
One can specify the level error on warning. It does not affect the default
level.
Helpers
of log levels used for each message. In order
of appearing. | -module(mongoose_deprecations_SUITE).
-include_lib("eunit/include/eunit.hrl").
-include_lib("common_test/include/ct.hrl").
-compile([export_all, nowarn_export_all]).
ms , must be much smaller than TEST_COOLDOWN
-define(LOG_MSG, #{what => cool_deprecated}).
all() ->
[
check_too_fast_pace,
check... |
d309b5715ad89c7b979c25c4e50af5c3eacfde322238ceb81a430c72c150c98b | eWert-Online/OSnap | OSnap_Browser_Types.ml | type t =
{ ws : string
; browserContextId : Cdp.Types.Browser.BrowserContextID.t
; process : Lwt_process.process_full
}
| null | https://raw.githubusercontent.com/eWert-Online/OSnap/ce3b716e61a56951ef8af39ed7c97fba065d009d/lib/OSnap_Browser/OSnap_Browser_Types.ml | ocaml | type t =
{ ws : string
; browserContextId : Cdp.Types.Browser.BrowserContextID.t
; process : Lwt_process.process_full
}
| |
3f03e53896ae17e42bf4bfa1f33b24fa22a782465cfd75df69e1143fde17f28f | yawaramin/re-web | Filter.ml | module Header = ReWeb__Header
module type S = sig
module Config : ReWeb__Config.S
module Service : Service.S
type ('ctx1, 'ctx2, 'resp) t =
('ctx2, 'resp) Service.t -> ('ctx1, 'resp) Service.t
(** A filter transforms a service. It can change the request (usually
by changing the request context) or t... | null | https://raw.githubusercontent.com/yawaramin/re-web/7b407c1b98ddfac32a81c32481c40cc535c7452a/ReWeb/Filter.ml | ocaml | * A filter transforms a service. It can change the request (usually
by changing the request context) or the response (by actually
running the service and then modifying its response).
Filters can be composed using function composition.
* [body_string] is a filter that transforms a 'root' service int... | module Header = ReWeb__Header
module type S = sig
module Config : ReWeb__Config.S
module Service : Service.S
type ('ctx1, 'ctx2, 'resp) t =
('ctx2, 'resp) Service.t -> ('ctx1, 'resp) Service.t
val basic_auth : ('ctx1, < username : string; password : string; prev : 'ctx1 >, _ Response.t) t
* [ basic_auth ... |
2f39bbe5a396ceea2a13cfe306583149fa64b9091bcaea2050c1a4b8b50cb821 | ijvcms/chuanqi_dev | szww_reward_config.erl | %%%-------------------------------------------------------------------
@author zhengsiying
%%% @doc
%%% 自动生成文件,不要手动修改
%%% @end
Created : 2016/10/12
%%%-------------------------------------------------------------------
-module(szww_reward_config).
-include("common.hrl").
-include("config.hrl").
-compile([export... | null | https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/config/szww_reward_config.erl | erlang | -------------------------------------------------------------------
@doc
自动生成文件,不要手动修改
@end
------------------------------------------------------------------- | @author zhengsiying
Created : 2016/10/12
-module(szww_reward_config).
-include("common.hrl").
-include("config.hrl").
-compile([export_all]).
get_list_conf() ->
[ szww_reward_config:get(X) || X <- get_list() ].
get_list() ->
[1, 2, 3, 4, 5, 6, 7].
get(1) ->
#szww_reward_conf{
key = 1,
min_rank = 1,
m... |
7dbae2b47bcf09eeaaa6d56615a419794bbd1d52029df55c8df2c6d00f3544d6 | ocaml-flambda/flambda-backend | asmpackager.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/flambda-backend/8c52c4ec5f8c325f045cb13e189c62af3eaeaeb0/backend/asmpackager.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 2002 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
" Package " a set of .cmx/.o files into one .cmx/.o file having the
original compilation units as ... |
62f7377f067672007240d20786325558dbc4c522ce52fcbbcc5e52240612ab80 | bzliu94/cs61a_fa07 | pigl.scm | (define (pigl wd)
(if (pl-done? wd)
(word wd 'ay)
(pigl (word (bf wd) (first wd)))))
(define (pl-done? wd)
(vowel? (first wd)))
(define (vowel? letter)
(member? letter '(a e i o u)))
| null | https://raw.githubusercontent.com/bzliu94/cs61a_fa07/12a62689f149ef035a36b326351928928f6e7b5d/02%20-%20labs/lab1/pigl.scm | scheme | (define (pigl wd)
(if (pl-done? wd)
(word wd 'ay)
(pigl (word (bf wd) (first wd)))))
(define (pl-done? wd)
(vowel? (first wd)))
(define (vowel? letter)
(member? letter '(a e i o u)))
| |
d4c7817d29937bc42230ccbb2e53db73e9b0f0a22c1bdbd23286e074d4b12125 | Gbury/dolmen | answer.ml |
(* This file is free software, part of dolmen. See file "LICENSE" for more information. *)
(* Type definitions *)
type term = Term.t
type location = Loc.t
type defs = Statement.defs
type descr =
| Unsat
| Sat of defs list option
| Error of string
type t = {
id : Id.t option;
descr : descr;
attrs : term ... | null | https://raw.githubusercontent.com/Gbury/dolmen/8462c000e25e396e8424936b711c4d166f402b6c/src/standard/answer.ml | ocaml | This file is free software, part of dolmen. See file "LICENSE" for more information.
Type definitions |
type term = Term.t
type location = Loc.t
type defs = Statement.defs
type descr =
| Unsat
| Sat of defs list option
| Error of string
type t = {
id : Id.t option;
descr : descr;
attrs : term list;
loc : location;
}
let pp_defs =
Statement.print_group Statement.print_def
let print_model_opt fmt = fu... |
b275bb28066198045271db21bc77a5afc1ca815e3e8d8809395fcc4bee3e56f7 | astrada/ocaml-extjs | ext_ZIndexManager.mli | * A class that manages a group of ...
{ % < p > A class that manages a group of < a href="#!/api / Ext . Component - cfg - floating " rel="Ext . Component - cfg - floating " class="docClass">Ext . > Components and provides z - order management ,
and Component activation behavior , including masking below the... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_ZIndexManager.mli | ocaml | * {% <p>Gets a registered Component by id.</p> %}
{b Parameters}:
{ul {- id: [_ Js.t]
{% <p>The id of the Component or a <a href="#!/api/Ext.Component" rel="Ext.Component" class="docClass">Ext.Component</a> instance</p> %}
}
}
* {% <p>Hides all Components managed by this ZIndexManager.</p>... | * A class that manages a group of ...
{ % < p > A class that manages a group of < a href="#!/api / Ext . Component - cfg - floating " rel="Ext . Component - cfg - floating " class="docClass">Ext . > Components and provides z - order management ,
and Component activation behavior , including masking below the... |
e718b4a2e8f655799d6c45eef32057c51bea9a851a46fc5c316d2cfcf4224da1 | heraldry/heraldicon | list.cljs | (ns heraldicon.frontend.library.ribbon.list
(:require
[heraldicon.entity.id :as id]
[heraldicon.frontend.element.ribbon-select :as ribbon-select]
[heraldicon.frontend.language :refer [tr]]
[heraldicon.frontend.library.ribbon.shared :refer [entity-type]]
[heraldicon.frontend.message :as message]
[her... | null | https://raw.githubusercontent.com/heraldry/heraldicon/18b50856176c3d072e9ffc11505b47e32b6f0ee9/src/heraldicon/frontend/library/ribbon/list.cljs | clojure | (ns heraldicon.frontend.library.ribbon.list
(:require
[heraldicon.entity.id :as id]
[heraldicon.frontend.element.ribbon-select :as ribbon-select]
[heraldicon.frontend.language :refer [tr]]
[heraldicon.frontend.library.ribbon.shared :refer [entity-type]]
[heraldicon.frontend.message :as message]
[her... | |
0ce6a39cd17e5ac7e7a6c235f35b3f50b5929348cb1748179d9a7cc605dd3d70 | OCamlPro/scilint | scilabTyper.ml | open ScilabAst
open ScilabTypedContext
open ScilabFunctionType
exception TypeError
exception TooMuchSolutions
Scilab primitives function
let string_of_opExp_Oper = function
| OpExp_plus -> " + "
| OpExp_minus -> " - "
| OpExp_times -> " * "
| OpExp_rdivide -> " / "
| OpExp_ldivide -> " \\ "
| OpExp_po... | null | https://raw.githubusercontent.com/OCamlPro/scilint/9d9ddd8e1630ddeae7f4f875bce62b2f65ec17d8/src/scilint/scilabTyper.ml | ocaml | Filter with the fst argument's type
Filter with the fst argument's type
unaryMinus have a dump expression as left operand
tr | open ScilabAst
open ScilabTypedContext
open ScilabFunctionType
exception TypeError
exception TooMuchSolutions
Scilab primitives function
let string_of_opExp_Oper = function
| OpExp_plus -> " + "
| OpExp_minus -> " - "
| OpExp_times -> " * "
| OpExp_rdivide -> " / "
| OpExp_ldivide -> " \\ "
| OpExp_po... |
f111c5cfde77a1fef54870d81a486fb67a89f576656f04497826de25b04c31db | bittide/bittide-hardware | ElasticBuffer.hs | SPDX - FileCopyrightText : 2022 Google LLC
--
SPDX - License - Identifier : Apache-2.0
module Bittide.ClockControl.ElasticBuffer where
import Clash.Prelude
import Clash.Signal.Internal
import GHC.Stack
import Bittide.ClockControl
-- | Determines how 'elasticBuffer' should respond to underflow/overflow.
data Ov... | null | https://raw.githubusercontent.com/bittide/bittide-hardware/b44dac8ee0fb14b0c6a94fcbe830fdd8d140bec4/elastic-buffer-sim/src/Bittide/ClockControl/ElasticBuffer.hs | haskell |
| Determines how 'elasticBuffer' should respond to underflow/overflow.
| Saturate at empty/full boundaries. Useful for testing purposes.
| Error on write-when-full, or read-when-empty. This mode should be used in
practice. Overflowing elastic buffer cannot happen in a real Bittide system.
| Simple model of a FIFO... | SPDX - FileCopyrightText : 2022 Google LLC
SPDX - License - Identifier : Apache-2.0
module Bittide.ClockControl.ElasticBuffer where
import Clash.Prelude
import Clash.Signal.Internal
import GHC.Stack
import Bittide.ClockControl
data OverflowMode
= Saturate
| Error
elasticBuffer ::
forall n readDom writeD... |
6899f74b3006d71c4fe56ed68b6518392bc9c6bbeae52814317b29f9fd77fe23 | anan44/it-starts-with-clojure | core.clj | (ns reddit-analyser.core
(:require [clj-http.client :as client]
[cheshire.core :refer [parse-string]])
(:gen-class))
(def options {:headers {"User-agent" "mega-secret-1337"}
:query-params {:limit 100}})
(def url "")
(defn get-posts
[]
(let [body (:body (client/get url options))... | null | https://raw.githubusercontent.com/anan44/it-starts-with-clojure/4bceac53a4004dc799a7bd96809d08009251a530/projects/reddit-analyser/src/reddit_analyser/core.clj | clojure | (ns reddit-analyser.core
(:require [clj-http.client :as client]
[cheshire.core :refer [parse-string]])
(:gen-class))
(def options {:headers {"User-agent" "mega-secret-1337"}
:query-params {:limit 100}})
(def url "")
(defn get-posts
[]
(let [body (:body (client/get url options))... | |
bf0f634447a005a591848ee6143b115317a1c5bd0d0ecb666ff83de6b8703d4d | galdor/tungsten | hmacs.lisp | (in-package :openssl-test)
(defmacro check-compute-hmac (algorithm &rest checks)
`(progn
,@(mapcar (lambda (check)
`(check-string=
,(car check)
(text:encode-hex-string
(openssl:compute-hmac
(text:decode-hex-string ,(... | null | https://raw.githubusercontent.com/galdor/tungsten/5d6e71fb89af32ab3994c5b2daf8b902a5447447/tungsten-openssl/t/hmacs.lisp | lisp | See RFC 2202 3. Test Cases for HMAC-SHA-1
See RFC 4231 4. Test Vectors | (in-package :openssl-test)
(defmacro check-compute-hmac (algorithm &rest checks)
`(progn
,@(mapcar (lambda (check)
`(check-string=
,(car check)
(text:encode-hex-string
(openssl:compute-hmac
(text:decode-hex-string ,(... |
2f14f5612bca7bd492c10224006f77c9153d5b9b1b5b82c5d0ae07185446092b | tonyg/kali-scheme | dispatch.scm | Copyright ( c ) 1994 . See file COPYING .
(define (dispatches->computed-gotos forms)
(walk (lambda (f)
(if (and (form-var f)
(eq? 'initialize (form-type f)))
(let ((value (thunk-value (form-node f))))
(if (and value
(call-node? value)
(eq? 'make-dispatch-table
(primop-id (cal... | null | https://raw.githubusercontent.com/tonyg/kali-scheme/79bf76b4964729b63fce99c4d2149b32cb067ac0/ps-compiler/prescheme/unused/dispatch.scm | scheme | FORM defines a dispatch vector, created in MAKE-CALL. This replaces the
dispatch vector with a procedure that performs a computed goto.
vector is bound, are analysed to find all of the uses of the vector and all
of the dispatch procedures added to it. These procedures are put in the
Once all of the references ... | Copyright ( c ) 1994 . See file COPYING .
(define (dispatches->computed-gotos forms)
(walk (lambda (f)
(if (and (form-var f)
(eq? 'initialize (form-type f)))
(let ((value (thunk-value (form-node f))))
(if (and value
(call-node? value)
(eq? 'make-dispatch-table
(primop-id (cal... |
5a31f28fc52742061ac09f0cc49312eb9d7708f25133eae29b0dcbcc1fad3b2c | johnwhitington/haskell-from-the-very-beginning-exercises | Exercises.hs | map' :: (a -> b) -> [a] -> [b]
map' f [] = []
map' f (x:xs) = f x : map' f xs
data Rect a = Square a
| Rectangle a a deriving Show
area :: Num a => Rect a -> a
area (Square s) = s * s
area (Rectangle w h) = w * h
rotate :: Ord a => Rect a -> Rect a
rotate (Rectangle w h) =
if w > h then Rectangle... | null | https://raw.githubusercontent.com/johnwhitington/haskell-from-the-very-beginning-exercises/18bda69bf8a0233feb6f023c6a2219b7c20e9fa1/exercises/Chapter10/Exercises.hs | haskell | map' :: (a -> b) -> [a] -> [b]
map' f [] = []
map' f (x:xs) = f x : map' f xs
data Rect a = Square a
| Rectangle a a deriving Show
area :: Num a => Rect a -> a
area (Square s) = s * s
area (Rectangle w h) = w * h
rotate :: Ord a => Rect a -> Rect a
rotate (Rectangle w h) =
if w > h then Rectangle... | |
737f16fe0eddf2c5edae2373df8dfa1bb95f839e0e2358aa3e92b008cd1468ac | aredington/schism | vector_test.cljc | (ns schism.impl.types.vector-test
(:require #?(:clj [clojure.test :refer [deftest testing is]]
:cljs [cljs.test :refer [deftest testing is]])
#?(:cljs [cljs.reader :as reader])
[schism.impl.types.vector :as svector]
[schism.node :as node]
[schism.impl.pro... | null | https://raw.githubusercontent.com/aredington/schism/32cff2f40034b7962f663d290b9021290bdf3aa4/test/schism/impl/types/vector_test.cljc | clojure | (ns schism.impl.types.vector-test
(:require #?(:clj [clojure.test :refer [deftest testing is]]
:cljs [cljs.test :refer [deftest testing is]])
#?(:cljs [cljs.reader :as reader])
[schism.impl.types.vector :as svector]
[schism.node :as node]
[schism.impl.pro... | |
9775771c8d45c3327ad863e8765facc068d13fbcc221697ae1a064d84d40809a | coq-community/coqffi | tup.ml | let x = (true, true, true)
let y = ((true, true), true)
let z = (true, (true, true))
let u = (Obj.magic (), 2)
let r = (3, 3, Obj.magic ())
| null | https://raw.githubusercontent.com/coq-community/coqffi/59ead2210befcbf3ee7b7aadcf22638b7a338a4b/examples/src/tup.ml | ocaml | let x = (true, true, true)
let y = ((true, true), true)
let z = (true, (true, true))
let u = (Obj.magic (), 2)
let r = (3, 3, Obj.magic ())
| |
5bdaeafc2621be5412e5a1fa22207bdc1b539b7a13fe6adba68d430f9ccf42cd | cram2/cram | callback.lisp | ;; Foreign callback functions.
Time - stamp : < 2015 - 01 - 22 23:27:55EST callback.lisp >
;;
Copyright 2009 , 2010 , 2015
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU ... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/init/callback.lisp | lisp | Foreign callback functions.
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PAR... |
Time - stamp : < 2015 - 01 - 22 23:27:55EST callback.lisp >
Copyright 2009 , 2010 , 2015
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should ha... |
3c324b286f2659d4409e48664f6211c62e5f4cb999e1e5fcfa18d9400febf1e0 | haskell-tools/haskell-tools | NameCollosionWithImport.hs | module Refactor.FloatOut.NameCollosionWithImport where
f = id
where id = () | null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/FloatOut/NameCollosionWithImport.hs | haskell | module Refactor.FloatOut.NameCollosionWithImport where
f = id
where id = () | |
cd9b7a115bf130fcc48466616cbc89aec5c2d5d83cff76fcb6e6bd92c48b50f4 | hverr/lxdfile | InitScript.hs | | This module contains funcitonality to parse InitScripts .
module Language.LXDFile.InitScript (
-- * Parsing
parseString
, parseFile
-- * Top-level types
, InitScript(..)
, Action(..)
-- * Subtypes
, Arguments(..)
) where
import Language.LXDFile.InitScript.Parser (parseString, parseFile)
import Language.L... | null | https://raw.githubusercontent.com/hverr/lxdfile/16c371b3ab3aff2ebc4bb1fc7f6a7c45f0b91b01/src/Language/LXDFile/InitScript.hs | haskell | * Parsing
* Top-level types
* Subtypes | | This module contains funcitonality to parse InitScripts .
module Language.LXDFile.InitScript (
parseString
, parseFile
, InitScript(..)
, Action(..)
, Arguments(..)
) where
import Language.LXDFile.InitScript.Parser (parseString, parseFile)
import Language.LXDFile.InitScript.Types
|
63545f7d142282da33d7fbac74ed8b13848d82be49eb3d689e7e42921f822647 | samply/blaze | verify.clj | (ns blaze.db.node.tx-indexer.verify
(:require
[blaze.anomaly :as ba :refer [throw-anom]]
[blaze.db.api :as d]
[blaze.db.impl.codec :as codec]
[blaze.db.impl.index.resource-handle :as rh]
[blaze.db.impl.index.rts-as-of :as rts]
[blaze.db.impl.index.system-stats :as system-stats]
[blaze.db.i... | null | https://raw.githubusercontent.com/samply/blaze/c4120e944bdf0ffbbe7d5bc4e0378c49278e31fe/modules/db/src/blaze/db/node/tx_indexer/verify.clj | clojure | (ns blaze.db.node.tx-indexer.verify
(:require
[blaze.anomaly :as ba :refer [throw-anom]]
[blaze.db.api :as d]
[blaze.db.impl.codec :as codec]
[blaze.db.impl.index.resource-handle :as rh]
[blaze.db.impl.index.rts-as-of :as rts]
[blaze.db.impl.index.system-stats :as system-stats]
[blaze.db.i... | |
e97f87d265a4e7783410b0e21c650d13551961c5f7653124e0cf192a38d866fd | williamleferrand/accretio | ys_timeline.ml |
* Accretio is an API , a sandbox and a runtime for social playbooks
*
* Copyright ( C ) 2015
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 o... | null | https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/library/server/ys_timeline.ml | ocaml | all we need to keep is an ordered list of views |
* Accretio is an API , a sandbox and a runtime for social playbooks
*
* Copyright ( C ) 2015
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation , either version 3 o... |
2e7bc4f341170e113c64c78083ac7cfaf1bcc629da5ae80dac81895917e35041 | avsm/eeww | error.ml | type t = int
let to_int = Fun.id
| null | https://raw.githubusercontent.com/avsm/eeww/17c68b93536cd382b901ba675411c2f69831fdac/lib/network/lib/error.ml | ocaml | type t = int
let to_int = Fun.id
| |
39275b5bc10c95959f157cf5ec7de2ea015ca06228dd85e01262775ca1570e8f | apibot-org/apibot | middleware.clj | (ns apibot.middleware
(:require
[apibot.auth :as auth]
[apibot.config :refer [env]]
[apibot.env :refer [defaults]]
[apibot.layout :refer [*app-context* error-page]]
[clojure.tools.logging :as log]
[clojure.string :refer [starts-with?]]
[immutant.web.middleware :refer [wrap-session]]
[m... | null | https://raw.githubusercontent.com/apibot-org/apibot/26c77c688980549a8deceeeb39f01108be016435/src/clj/apibot/middleware.clj | clojure | If we're not inside a servlet environment
(for example when using mock requests), then
.getContextPath might not exist
if the context is not specified in the request
we check if one has been specified in the environment
instead
since they're not compatible with this middleware
XXX protect only the /api/ endpoin... | (ns apibot.middleware
(:require
[apibot.auth :as auth]
[apibot.config :refer [env]]
[apibot.env :refer [defaults]]
[apibot.layout :refer [*app-context* error-page]]
[clojure.tools.logging :as log]
[clojure.string :refer [starts-with?]]
[immutant.web.middleware :refer [wrap-session]]
[m... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.