_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 |
|---|---|---|---|---|---|---|---|---|
696f53670676892fd09873bc731993200a036d5b6c5bd1e7ba1877da39d7b465 | eugeneia/athens | stylesheet.lisp | ;;; stylesheet.lisp
;;;
;;; This file is part of the cl-libxml2 library, released under Lisp-LGPL.
;;; See file COPYING for details.
;;;
Author : < >
(in-package #:libxml2.xslt)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; stylesheet
;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/cl-libxml2-20130615-git/xslt/stylesheet.lisp | lisp | stylesheet.lisp
This file is part of the cl-libxml2 library, released under Lisp-LGPL.
See file COPYING for details.
stylesheet
stylesheet-set-param
stylesheet-remove-param
stylesheet-clear-params
parse-stylesheet
parse-stylehseet ((filename pathname))
parse-stylesheet ((doc document))
parse-styl... | Author : < >
(in-package #:libxml2.xslt)
(defclass stylesheet (libxml2.tree::libxml2-cffi-object-wrapper)
((params :initform nil)))
(define-libxml2-function ("xsltFreeStylesheet" %xsltFreeStylesheet) :void
(style %xsltStylesheetPtr))
(defmethod libxml2.tree::release/impl ((style stylesheet))
(%xsltFreeS... |
f394b0d36c56d03fc2c96ce7749b22d5f5bbf60993f441f803e160f6acf1efa2 | MyDataFlow/ttalk-server | privacy_helper.erl | -module(privacy_helper).
-include_lib("exml/include/exml.hrl").
-include_lib("escalus/include/escalus.hrl").
-include_lib("escalus/include/escalus_xmlns.hrl").
-include_lib("common_test/include/ct.hrl").
-import(escalus_compat, [bin/1]).
-export([set_and_activate/2,
set_list/2,
send_set_list/2,
... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/test/ejabberd_tests/tests/privacy_helper.erl | erlang | Sets the list on server and makes it the active one.
Sets the list on server.
Make the list the active one.
Make the list the default one.
Is this iq a notification about a privacy list being changed? | -module(privacy_helper).
-include_lib("exml/include/exml.hrl").
-include_lib("escalus/include/escalus.hrl").
-include_lib("escalus/include/escalus_xmlns.hrl").
-include_lib("common_test/include/ct.hrl").
-import(escalus_compat, [bin/1]).
-export([set_and_activate/2,
set_list/2,
send_set_list/2,
... |
971096d9f554dd2325c3710225aff94ada2c4500dd62164b1c27c3eb9464ef18 | vimus/libmpd-haskell | Database.hs | {-# LANGUAGE OverloadedStrings #-}
|
Module : Network . MPD.Commands . Database
Copyright : ( c ) 2005 - 2009 , 2012
License : MIT ( see LICENSE )
Maintainer :
Stability : stable
Portability : unportable
The music database .
Module : Network.MPD.Commands.Database
Copyri... | null | https://raw.githubusercontent.com/vimus/libmpd-haskell/1ec02deba33ce2a16012d8f0954e648eb4b5c485/src/Network/MPD/Commands/Database.hs | haskell | # LANGUAGE OverloadedStrings #
| Count the number of entries matching a query.
| Search the database for entries exactly matching a query.
| Adds songs matching a query to the current playlist.
| List all tags of the specified type of songs that that satisfy the query.
@since 0.10.0.0
^ Metadata to list
| List ... |
|
Module : Network . MPD.Commands . Database
Copyright : ( c ) 2005 - 2009 , 2012
License : MIT ( see LICENSE )
Maintainer :
Stability : stable
Portability : unportable
The music database .
Module : Network.MPD.Commands.Database
Copyright : (c) Ben Sinclair 2005-2009,... |
14e22bcebdfae6dbb7e090f94641a6fee355b15384e908b71091de3cf0469629 | peterhudec/cljsx | main.cljs | (ns shadow-cljs-example.main
(:require ["react" :as react]
["react-dom" :as react-dom]
[cljsx.core :refer [react> defcomponent]]))
(def common-props {:style {:color "olive"
:background "honeydew"
:borderRadius "0.2em"
... | null | https://raw.githubusercontent.com/peterhudec/cljsx/3a23dbc085fed0c79d4e865c88ae7da55bdaa789/examples/shadow_cljs_example/main.cljs | clojure | (ns shadow-cljs-example.main
(:require ["react" :as react]
["react-dom" :as react-dom]
[cljsx.core :refer [react> defcomponent]]))
(def common-props {:style {:color "olive"
:background "honeydew"
:borderRadius "0.2em"
... | |
2cf2846708cf6ede18290be1ad66ff902ad3e4b555b09cad7e7657d360fe3d95 | racket/macro-debugger | test-setup.rkt | #lang racket/base
(require macro-debugger/model/debug)
;; Testing facilities for macro debugger
(provide trace/ns
trace/t
trace/k
testing-namespace
hide-all-policy
hide-none-policy
T-policy
Tm-policy
stx/hide-none
stx/hide-all
... | null | https://raw.githubusercontent.com/racket/macro-debugger/d4e2325e6d8eced81badf315048ff54f515110d5/macro-debugger/tests/macro-debugger/test-setup.rkt | racket | Testing facilities for macro debugger
Use just 'expand', not 'expand/compile-time-evals',
for test backward compatibility
FIXME: add tests that use 'expand/compile-time-evals'
T hiding policy
ALL macros & primitives are hidden
Tm hiding policy | #lang racket/base
(require macro-debugger/model/debug)
(provide trace/ns
trace/t
trace/k
testing-namespace
hide-all-policy
hide-none-policy
T-policy
Tm-policy
stx/hide-none
stx/hide-all
stx/hide-standard
stx/hide-T
... |
248b0ef1260bb672b64d7fc8b60a7a83755b3d9bf312db61cfe774176e46dc1b | haskell/ghcide | PositionMapping.hs | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
module Development.IDE.Core.PositionMapping
( PositionMapping(..)
, PositionResult(..)
, lowerRange
, upperRange
, positionResultToMaybe
, fromCurrentPosition
, toCurrentPosition
, PositionDelta(..... | null | https://raw.githubusercontent.com/haskell/ghcide/3ef4ef99c4b9cde867d29180c32586947df64b9e/src/Development/IDE/Core/PositionMapping.hs | haskell | toCurrent and fromCurrent are mainly exposed for testing
| Either an exact position, or the range of text that was substituted
^ Fields need to be non-strict otherwise bind is exponential
A position mapping is the difference from the current version to
a specific version
| Convert a set of changes into a delta fr... | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
module Development.IDE.Core.PositionMapping
( PositionMapping(..)
, PositionResult(..)
, lowerRange
, upperRange
, positionResultToMaybe
, fromCurrentPosition
, toCurrentPosition
, PositionDelta(..... |
02b58bed7ae8a9c6fcdb98c169c2e348a5a3c36a6aac4934f8032c2cbbb9f329 | TrustInSoft/tis-kernel | bottom.mli | (**************************************************************************)
(* *)
This file is part of .
(* *)
is a fork of Frama - C. Al... | null | https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_services/abstract_interp/bottom.mli | ocaml | ************************************************************************
... | This file is part of .
is a fork of Frama - C. All the differences are :
Copyright ( C ) 2016 - 2017
is released under GPLv2
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015 ... |
41267a8784e36c88bc02ecd863bdc1ea2bac6a9af815927955113beb046d119f | codecov/codecov-racket | info.rkt | #lang setup/infotab
(define name "cover-codecov")
(define collection 'multi)
(define version "0.1.1")
(define deps '(
("base" #:version "6.1.1")
"cover"))
(define build-deps '("rackunit-lib"))
| null | https://raw.githubusercontent.com/codecov/codecov-racket/50388b36071d54b2beffc0cfd8ad17cad940f7a8/info.rkt | racket | #lang setup/infotab
(define name "cover-codecov")
(define collection 'multi)
(define version "0.1.1")
(define deps '(
("base" #:version "6.1.1")
"cover"))
(define build-deps '("rackunit-lib"))
| |
4e4f31d70a2ee069524f66bfbb3fbc68ec6f1c97f375ef476b8a8a383bf7b0d0 | racket/typed-racket | flonum.rkt | #lang racket/base
(module t typed/racket/base/optional
;; Test case-> type
(require racket/flonum)
(provide flprobability?)
(: flprobability? (case-> (Flonum -> Boolean) (Flonum Any -> Boolean)))
(define (flprobability? p [log? #f])
(cond [log? (and (p . fl>= . -inf.0) (p . fl<= . 0.0))]
[else... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/optional/flonum.rkt | racket | Test case-> type | #lang racket/base
(module t typed/racket/base/optional
(require racket/flonum)
(provide flprobability?)
(: flprobability? (case-> (Flonum -> Boolean) (Flonum Any -> Boolean)))
(define (flprobability? p [log? #f])
(cond [log? (and (p . fl>= . -inf.0) (p . fl<= . 0.0))]
[else (and (p . fl>= . 0.0... |
037618d0129b0bd5d29ba143e95f027bf82ce23c019c0f7453a61330affaf49b | robert-strandh/SICL | data.lisp | (cl:in-package #:cleavir-ir)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Data.
;;;
;;; Only Common Lisp objects are used as data in the high-level
intermediate representation , but they can be BOXED or .
;;;
Two kinds of data are possible in the high - level intermediate
;;; rep... | null | https://raw.githubusercontent.com/robert-strandh/SICL/bd3ec8f991d9455541d1629a3c672ae3d46dc16d/Code/Cleavir/Intermediate-representation/HIR/data.lisp | lisp |
Data.
Only Common Lisp objects are used as data in the high-level
representation:
* CONSTANT-INPUT. This type of data can only be used as input
to instructions. It is used for any Common Lisp object
considered to be literal data.
* LEXICAL-LOCATION. This type of data can be used both as inpu... | (cl:in-package #:cleavir-ir)
intermediate representation , but they can be BOXED or .
Two kinds of data are possible in the high - level intermediate
that datum can be BOXED or .
An instruction I REFERS TO a lexical location L if and only if L
is either one of the inputs or one of the outputs of I.
l... |
a04f06bdae8f08bde96e6a7231ba8cc91804eb519b0c85b7d43391dfa35572c9 | eareese/htdp-exercises | 207-total-time-list.rkt | #lang htdp/bsl+
;;---------------------------------------------------------------------------------------------------
(require 2htdp/itunes)
(define ITUNES-LOCATION "itunes.xml")
LLists
(define library (read-itunes-as-lists ITUNES-LOCATION))
(define test-llist (list (list
(list "Album" "TN... | null | https://raw.githubusercontent.com/eareese/htdp-exercises/a85ff3111d459dda0e94d9b463d01a09accbf9bf/part02-arbitrarily-large-data/207-total-time-list.rkt | racket | ---------------------------------------------------------------------------------------------------
Once you have completed the design, compute the total play time of your iTunes collection.
there a difference?
– '()
An LAssoc is one of:
– '()
– Boolean
– Number
– String
– Date | #lang htdp/bsl+
(require 2htdp/itunes)
(define ITUNES-LOCATION "itunes.xml")
LLists
(define library (read-itunes-as-lists ITUNES-LOCATION))
(define test-llist (list (list
(list "Album" "TNT")
(list "Artist" "Tortoise")
(list "Name" "Four-... |
0b3d862f18d21a83d625bb50c9db6c9b453a3c825b1686512a4873f787799436 | active-group/active-clojure | record_spec.cljc | (ns active.clojure.record-spec
"A re-implementation of `active.clojure.record` that makes use of
Clojure's new spec library. Define records the same ways as in the old
implementation or use the new syntax to automatically generate specs.
If a field has no explicit spec, defaults to `any?`."
#?@
(:clj
[... | null | https://raw.githubusercontent.com/active-group/active-clojure/44050a1292fa610dde732d5fbfc42c37ad976d3a/src/active/clojure/record_spec.cljc | clojure | specs
Generate a spec for each constructor arg. Uses each constructor arg and prepends the type name + "-" as the name. | (ns active.clojure.record-spec
"A re-implementation of `active.clojure.record` that makes use of
Clojure's new spec library. Define records the same ways as in the old
implementation or use the new syntax to automatically generate specs.
If a field has no explicit spec, defaults to `any?`."
#?@
(:clj
[... |
54c7f183f1bb2c704df7c0780765a630e2e9b0e30d3488bbf718f9b666721d3d | acowley/Frames | TutorialMain.hs | main :: IO ()
main = return ()
| null | https://raw.githubusercontent.com/acowley/Frames/aeca953fe608de38d827b8a078ebf2d329edae04/demo/TutorialMain.hs | haskell | main :: IO ()
main = return ()
| |
f678ad4605c5f2f76b6a2c3918fa77581aceef9ce8d6d12699a8b52d2f8680ac | deadtrickster/prometheus.erl | prometheus_histogram_tests.erl | -module(prometheus_histogram_tests).
-include_lib("eunit/include/eunit.hrl").
-include("prometheus_model.hrl").
prometheus_format_test_() ->
{foreach,
fun prometheus_eunit_common:start/0,
fun prometheus_eunit_common:stop/1,
[fun test_registration/1,
fun test_errors/1,
fun test_buckets/1,
fun t... | null | https://raw.githubusercontent.com/deadtrickster/prometheus.erl/b7cdd4fe70127aee738993c649e8c853718ea52a/test/eunit/metric/prometheus_histogram_tests.erl | erlang | basic name/labels/help validations test
mf/arity errors
histogram specific errors | -module(prometheus_histogram_tests).
-include_lib("eunit/include/eunit.hrl").
-include("prometheus_model.hrl").
prometheus_format_test_() ->
{foreach,
fun prometheus_eunit_common:start/0,
fun prometheus_eunit_common:stop/1,
[fun test_registration/1,
fun test_errors/1,
fun test_buckets/1,
fun t... |
176b3bff28989c79d196e0c7724d77ad4260728629481c9bc2acc4b31ff9ba5f | pixura/simple-graphql-client | Types.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Network.GraphQL.Client.Types
( GraphQLQuery(..)
, Location(..)
, GraphQLError(..)
, GraphQLQueryError(..)
, GraphQLResponse(..)
, GraphQLBody(.... | null | https://raw.githubusercontent.com/pixura/simple-graphql-client/ed663325693b85b226bac1bc4204f8af65a1c611/src/Network/GraphQL/Client/Types.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
| GraphQLQuery
---------------------------------------------------------------------------
| The graphql query
---------------------------------------------------... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE RecordWildCards #
module Network.GraphQL.Client.Types
( GraphQLQuery(..)
, Location(..)
, GraphQLError(..)
, GraphQLQueryError(..)
, GraphQLResponse(..)
, GraphQLBody(..)
, Nodes(..)
)
where
import qualified Data.Aeson as J
import ... |
941762d0ae21efea31cbafcf3b2b800563a373578ea1d2696e615bc85b9d0372 | jscl-project/jscl | extended-loop.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Package : ANSI - LOOP ; Base : 10 ; Lowercase : T -*-
;;;>
> Portions of LOOP are Copyright ( c ) 1986 by the Massachusetts Institute of Technology .
;;;> All Rights Reserved.
;;;>
;;;> Permission to use, copy, modify and distribute this software and its
;;;> documentatio... | null | https://raw.githubusercontent.com/jscl-project/jscl/d38eec2aeb47d04f1caf3d1cda82dc968d67c305/src/ansiloop/extended-loop.lisp | lisp | Syntax : Common - lisp ; Package : ANSI - LOOP ; Base : 10 ; Lowercase : T -*-
>
> All Rights Reserved.
>
> Permission to use, copy, modify and distribute this software and its
> documentation for any purpose and without fee is hereby granted,
> both that copyright notice and this permission notice appear in
> pertai... | > Portions of LOOP are Copyright ( c ) 1986 by the Massachusetts Institute of Technology .
> provided that the M.I.T. copyright notice appear in all copies and that
> supporting documentation . The names " M.I.T. " and " Massachusetts
> Institute of Technology " may not be used in advertising or publicity
> copying d... |
1a4e262e6903b5334482e7e87451c52b1d08f3975e17f0d14c93f20a2afa849a | inhabitedtype/ocaml-aws | listTagsForResource.ml | open Types
open Aws
type input = ListTagsForResourceRequest.t
type output = ListTagsForResourceResponse.t
type error = Errors_internal.t
let service = "route53"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (En... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/route53/lib/listTagsForResource.ml | ocaml | open Types
open Aws
type input = ListTagsForResourceRequest.t
type output = ListTagsForResourceResponse.t
type error = Errors_internal.t
let service = "route53"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_option_exn (En... | |
288ffbd3f608e4ff00a78ad1b3a82ee0deedccc1bf45f0752aa77a9e21922ccd | xtdb/xtdb | prometheus.clj | (ns xtdb.metrics.prometheus
(:require [xtdb.metrics :as metrics]
[xtdb.system :as sys]
[iapetos.collector.jvm :as jvm]
[iapetos.core :as prometheus]
[iapetos.standalone :as server])
(:import com.codahale.metrics.MetricRegistry
io.prometheus.client.dropwizar... | null | https://raw.githubusercontent.com/xtdb/xtdb/e2f51ed99fc2716faa8ad254c0b18166c937b134/modules/metrics/src/xtdb/metrics/prometheus.clj | clojure | (ns xtdb.metrics.prometheus
(:require [xtdb.metrics :as metrics]
[xtdb.system :as sys]
[iapetos.collector.jvm :as jvm]
[iapetos.core :as prometheus]
[iapetos.standalone :as server])
(:import com.codahale.metrics.MetricRegistry
io.prometheus.client.dropwizar... | |
b250473a6789ae29a54ceed71b653fd9efbc86db21d726813623b9b7649e392b | angelhof/flumina | log_mod.erl | -module(log_mod).
-export([initialize_message_logger_state/2,
initialize_message_logger_state/3,
initialize_specialized_message_logger/3,
initialize_specialized_message_logger/4,
maybe_log_message/3,
no_message_logger/1,
message_logger/1,
init_num_log_state/0,
reset_num_... | null | https://raw.githubusercontent.com/angelhof/flumina/9602454b845cddf8e3dff8c54089c7f970ee08e1/src/log_mod.erl | erlang | TODO: If the API grows more, refactor these to have options like the rest (producer, sink)
WARNING: At the moment this only logs messages, not heartbeats
Obsolete synchronous logging code
% the predicate to be anything instead of just a tag set
%% WARNING: At the moment this only logs messages, not heartbeats
ol... | -module(log_mod).
-export([initialize_message_logger_state/2,
initialize_message_logger_state/3,
initialize_specialized_message_logger/3,
initialize_specialized_message_logger/4,
maybe_log_message/3,
no_message_logger/1,
message_logger/1,
init_num_log_state/0,
reset_num_... |
c4b1b9062e3bd62809bb5258ac03123cbff6809097e560b0f36238316b9d8fe4 | abdulapopoola/SICPBook | 5.25.scm | #lang planet neil/sicp
;; Skipping this exercise
However Skanev has a solution here ( if you are interested )
;;
| null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%205/5.4/5.25.scm | scheme | Skipping this exercise
| #lang planet neil/sicp
However Skanev has a solution here ( if you are interested )
|
d623d54372ae8f66b09891f9bc5deec1f6bd05a84045f379560b5329a14632dc | y-taka-23/wasm-game-of-life | UniverseSpec.hs | module Acme.GameOfLife.UniverseSpec (spec) where
import Test.Hspec ( Spec, describe, it, shouldBe )
import Test.Hspec.QuickCheck ( prop )
import Acme.GameOfLife.Universe
( fromList
, stringify
, tick
, toggle
, unstringify
)
spec :: Spec
spec = do
describe "tick" $ do
... | null | https://raw.githubusercontent.com/y-taka-23/wasm-game-of-life/69b3269e3fa05c65b7def23fdb7a71a92a22c54f/test/Acme/GameOfLife/UniverseSpec.hs | haskell | module Acme.GameOfLife.UniverseSpec (spec) where
import Test.Hspec ( Spec, describe, it, shouldBe )
import Test.Hspec.QuickCheck ( prop )
import Acme.GameOfLife.Universe
( fromList
, stringify
, tick
, toggle
, unstringify
)
spec :: Spec
spec = do
describe "tick" $ do
... | |
846540881c9e270d9b0854ce11a8c6d2cf99af2c1d01d6fa3a9875a9b72b8cda | rmloveland/scheme48-0.53 | low.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
; Portable versions of low-level things that would really like to rely
; on the Scheme 48 VM or on special features provided by the byte code
; compiler.
(define (vector-unassigned? v i) #f)
(define (flush-the-symbol-table!) #f)
(define maybe-open-input... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/alt/low.scm | scheme | Portable versions of low-level things that would really like to rely
on the Scheme 48 VM or on special features provided by the byte code
compiler.
Suppress undefined export warnings. | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
(define (vector-unassigned? v i) #f)
(define (flush-the-symbol-table!) #f)
(define maybe-open-input-file open-input-file)
(define maybe-open-output-file open-output-file)
(define-syntax %file-name%
(syntax-rules ()
((%file-name%) "")))
(define... |
ee329036de929ee5e247e9d34143886d024c450b0daf612aaa6422914409f21f | metabase/metabase | setting_test.clj | (ns ^:mb/once metabase.api.setting-test
(:require
[clojure.test :refer :all]
[metabase.api.common.validation :as validation]
[metabase.models.setting :as setting :refer [defsetting]]
[metabase.models.setting-test :as models.setting-test]
[metabase.public-settings.premium-features-test
:as premium-f... | null | https://raw.githubusercontent.com/metabase/metabase/56b28e5b07e73002d5c507f583e3d64439ba8b8c/test/metabase/api/setting_test.clj | clojure | internal setting that should not be returned
n.b. the api will return nil if a setting is its default value.
there are additional tests for this functionality in [[metabase.models.models.setting-test/set-many!-test]], since
this API endpoint is just a thin wrapper around that function | (ns ^:mb/once metabase.api.setting-test
(:require
[clojure.test :refer :all]
[metabase.api.common.validation :as validation]
[metabase.models.setting :as setting :refer [defsetting]]
[metabase.models.setting-test :as models.setting-test]
[metabase.public-settings.premium-features-test
:as premium-f... |
7a5a46daceb6a034de94c29f430ce5a7ec9cc3d4b04b7e4abfef8686ffdf60c5 | polymeris/cljs-aws | cloudhsm.cljs | (ns cljs-aws.cloudhsm
(:require [cljs-aws.base.requests])
(:require-macros [cljs-aws.base.service :refer [defservice]]))
(defservice "CloudHSM" "cloudhsm-2014-05-30.min.json")
| null | https://raw.githubusercontent.com/polymeris/cljs-aws/3326e7c4db4dfc36dcb80770610c14c8a7fd0d66/src/cljs_aws/cloudhsm.cljs | clojure | (ns cljs-aws.cloudhsm
(:require [cljs-aws.base.requests])
(:require-macros [cljs-aws.base.service :refer [defservice]]))
(defservice "CloudHSM" "cloudhsm-2014-05-30.min.json")
| |
3633b6b508be3bf7c081aebcad626ec08d3239038582a43b57eb0b1d8fb963f3 | leon-gondelman/ocaml2lang | translate.ml | open Location
open Longident
module P = Parsetree
open Lang
type info = { (* auxiliary information needed for translation, such as
free variables, local variables, paths, etc. *)
info_lvars: (ident, unit) Hashtbl.t;
}
let create_info () =
{ info_lvars = Hashtbl.create 16 }
let mk_gvar s = Evar... | null | https://raw.githubusercontent.com/leon-gondelman/ocaml2lang/f94f02d35b537623b7e4da812d33eb6c29cc9214/tmp/translate.ml | ocaml | auxiliary information needed for translation, such as
free variables, local variables, paths, etc. | open Location
open Longident
module P = Parsetree
open Lang
info_lvars: (ident, unit) Hashtbl.t;
}
let create_info () =
{ info_lvars = Hashtbl.create 16 }
let mk_gvar s = Evar (Vgvar (Gvar s))
let rec name_of_pat pat = match pat.P.ppat_desc with
| Ppat_any -> "_"
| Ppat_var s -> s.txt
| Ppat_constraint ... |
67d19586f78e4804fa6100bcceadf60ac5926a613ffe287805da2fa2af7b8f82 | sbtourist/clamq | activemq_test.clj | (ns clamq.test.activemq-test
(:use [clojure.test] [clamq.test.base-jms-test] [clamq.jms] [clamq.activemq]))
(defn setup-connection-and-test [test-fn]
(with-open [connection (activemq-connection "tcp:61616")]
(test-fn connection)))
(deftest activemq-test-suite []
(setup-connection-and-test producer-consumer-t... | null | https://raw.githubusercontent.com/sbtourist/clamq/34a6bbcb7a2a431ea629aa5cfbc687ef31f860f2/clamq-activemq/test/clamq/test/activemq_test.clj | clojure | (ns clamq.test.activemq-test
(:use [clojure.test] [clamq.test.base-jms-test] [clamq.jms] [clamq.activemq]))
(defn setup-connection-and-test [test-fn]
(with-open [connection (activemq-connection "tcp:61616")]
(test-fn connection)))
(deftest activemq-test-suite []
(setup-connection-and-test producer-consumer-t... | |
8e65716c65e6502b3fe0296727664c9cf5b55a977e7904929139281b86346182 | a-nikolaev/wanderers | win.ml |
* Copyright ( C ) 2007 , 2008
*
* 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 fo... | null | https://raw.githubusercontent.com/a-nikolaev/wanderers/054c1cdc6dd833d8938357e6d898def510531d67/lib/win.ml | ocaml | ********************** Windowing ***************************************
Sleep for n microseconds |
* Copyright ( C ) 2007 , 2008
*
* 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 fo... |
f877975acdf07091f5bc26c16d29bedd86e190bd164f59061c66ea36e08857d6 | aiya000/hs-character-cases | Cases.hs | # LANGUAGE QuasiQuotes #
-- |
Exposes subspecies types of .
-- e.g. `[a-z]`, `[A-Z]`, and `[0-9]`.
module Data.Char.Cases
( AlphaNumChar (..)
, alphaNumToChar
, alphaNumChar
, charToAlphaNum
, alphaNumCharQ
, AlphaChar (..)
, alphaToChar
, charToAlpha
, alphaChar
, alphaCharQ
, UpperChar (..)
... | null | https://raw.githubusercontent.com/aiya000/hs-character-cases/3b6156310e7a68ee1ad514f8bc6f590c3c1000a3/src/Data/Char/Cases.hs | haskell | |
e.g. `[a-z]`, `[A-Z]`, and `[0-9]`.
$setup
>>> :set -XQuasiQuotes
| '[A-Za-z0-9]'
|
>>> [alphaNumCharQ|x|]
AlphaNumAlpha (AlphaLower X_)
>>> [alphaNumCharQ|X|]
AlphaNumAlpha (AlphaUpper X)
>>> [alphaNumCharQ|1|]
AlphaNumDigit D1
| '[A-Za-z]'
| '[A-Z]'
|
Extracts a Char of [A-Z].
Also throws compil... | # LANGUAGE QuasiQuotes #
Exposes subspecies types of .
module Data.Char.Cases
( AlphaNumChar (..)
, alphaNumToChar
, alphaNumChar
, charToAlphaNum
, alphaNumCharQ
, AlphaChar (..)
, alphaToChar
, charToAlpha
, alphaChar
, alphaCharQ
, UpperChar (..)
, upperToChar
, upperChar
, charToUppe... |
b509c04909851c1b62a3f1ef08a0f6e7ddf3b49fc8d9654c59964aa54235514b | tonyrog/dbus | dbus_app.erl | %%%---- BEGIN COPYRIGHT -------------------------------------------------------
%%%
Copyright ( C ) 2007 - 2013 , Rogvall Invest AB , < >
%%%
%%% This software is licensed as described in the file COPYRIGHT, which
%%% you should have received as part of this distribution. The terms
%%% are also available at .
%%%
%%... | null | https://raw.githubusercontent.com/tonyrog/dbus/0705e9bee81ace1b5ad2d3af07ae5c156046c47a/src/dbus_app.erl | erlang | ---- BEGIN COPYRIGHT -------------------------------------------------------
This software is licensed as described in the file COPYRIGHT, which
you should have received as part of this distribution. The terms
are also available at .
You may opt to use, copy, modify, merge, publish, distribute and/or sell
furni... | Copyright ( C ) 2007 - 2013 , Rogvall Invest AB , < >
copies of the Software , and permit persons to whom the Software is
This software is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY
-module(dbus_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
d... |
2587c7d8de19eea30c1797be4d92dc94fe5eda9fe88591eac09e9294426487e1 | xh4/web-toolkit | stream.lisp | (in-package :http-test)
(in-suite :http-test)
(test stream
(it
(babel-streams:with-input-from-sequence (stream #(1 2 3 4 5))
(setf stream (make-instance 'http::stream :upstream stream :length 5))
(is (= 1 (read-byte stream)))
(is (= 4 (http::stream-remaining-length stream)))
(read-sequ... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/test/http/stream.lisp | lisp | (in-package :http-test)
(in-suite :http-test)
(test stream
(it
(babel-streams:with-input-from-sequence (stream #(1 2 3 4 5))
(setf stream (make-instance 'http::stream :upstream stream :length 5))
(is (= 1 (read-byte stream)))
(is (= 4 (http::stream-remaining-length stream)))
(read-sequ... | |
2c5ea2a20ede02c6fb715ec47d8c70b6833f20e75325a792804ef0c8722f834d | ghc/testsuite | T3177.hs | {- LANGUAGE TemplateHaskell #-}
Template Haskell type splices
module T3177 where
f :: $(id [t| Int |])
f = 3
class C a where
op :: a -> a
instance C a => C ($([t| Maybe |]) a) where
op x = fmap op x
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/th/T3177.hs | haskell | LANGUAGE TemplateHaskell # |
Template Haskell type splices
module T3177 where
f :: $(id [t| Int |])
f = 3
class C a where
op :: a -> a
instance C a => C ($([t| Maybe |]) a) where
op x = fmap op x
|
d0143fd97764ffd5672478361dd4371f441b9c6ba094b33a27d0d135d957ffe6 | cenary-lang/cenary | Language.hs | module Cenary.Lexer.Language where
--------------------------------------------------------------------------------
import Text.Parsec.Language (emptyDef)
import Text.Parsec.Token
--------------------------------------------------------------------------------
--------------------------------------... | null | https://raw.githubusercontent.com/cenary-lang/cenary/bf5ab4ac6bbc2353b072d32de2f3bc86cbc88266/src/Cenary/Lexer/Language.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------ | module Cenary.Lexer.Language where
import Text.Parsec.Language (emptyDef)
import Text.Parsec.Token
style :: LanguageDef state
style =
emptyDef
{ commentLine = "--"
, reservedOpNames = ops
, reservedNames = names
}
ops :: [String]
ops =
[ "+", "*", "-", "/", ";"
, "'", ... |
977ee52df12ec5123c8170bb0fc2081a9a64ee269f26ba796bb7812155c508c2 | w3ntao/sicp-solution | 3-61.rkt | #lang racket
(provide (all-defined-out))
(require (only-in "../ToolBox/AbstractionOfData/stream.rkt"
cons-stream
stream-cdr
scale-stream
mul-series
display-stream-until
exp-series))
(define (invert-unit-series... | null | https://raw.githubusercontent.com/w3ntao/sicp-solution/00be3a7b4da50bb266f8a2db521a24e9f8c156be/chap-3/3-61.rkt | racket | #lang racket
(provide (all-defined-out))
(require (only-in "../ToolBox/AbstractionOfData/stream.rkt"
cons-stream
stream-cdr
scale-stream
mul-series
display-stream-until
exp-series))
(define (invert-unit-series... | |
9b8d04c96ae0fbd9e1ceb5d0b3f04f2bf57361b2ab57479351c88574f9fbf299 | scarvalhojr/haskellbook | section18.6.hs |
import Control.Monad ((>=>))
sayHi :: String -> IO String
sayHi greeting = do
putStrLn greeting
getLine
readM :: Read a => String -> IO a
readM = return . read
getAge :: String -> IO Int
getAge = sayHi >=> readM
askForAge :: IO Int
askForAge = getAge "How old are you?"
| null | https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter18/section18.6.hs | haskell |
import Control.Monad ((>=>))
sayHi :: String -> IO String
sayHi greeting = do
putStrLn greeting
getLine
readM :: Read a => String -> IO a
readM = return . read
getAge :: String -> IO Int
getAge = sayHi >=> readM
askForAge :: IO Int
askForAge = getAge "How old are you?"
| |
bde251f3235fc9584b6258c6aeb57c0099cb112ade3850cd3982b53548ee6fca | rcherrueau/APE | ast.rkt | #lang typed/racket/base
(require "utils.rkt")
(provide (all-defined-out))
(define-datatype Primitive1
Add1
Sub1)
(define-datatype Exp
[Num Number]
[Id Symbol]
[Prim1 Primitive1 Exp]
[Let (Listof (Pairof Symbol Exp)) Exp]
)
| null | https://raw.githubusercontent.com/rcherrueau/APE/8b5302709000bd043b64d46d55642acb34ce5ba7/racket/pan/core/ast.rkt | racket | #lang typed/racket/base
(require "utils.rkt")
(provide (all-defined-out))
(define-datatype Primitive1
Add1
Sub1)
(define-datatype Exp
[Num Number]
[Id Symbol]
[Prim1 Primitive1 Exp]
[Let (Listof (Pairof Symbol Exp)) Exp]
)
| |
45e3d95feca36be3e7c6159a258aa1de411e979935530dd8865756da0b0cd159 | melange-re/melange | lam_analysis.mli | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... | null | https://raw.githubusercontent.com/melange-re/melange/246e6df78fe3b6cc124cb48e5a37fdffd99379ed/jscomp/core/lam_analysis.mli | ocaml | * A module which provides some basic analysis over lambda expression
* No side effect, but it might depend on data store | Copyright ( C ) 2015 - 2016 Bloomberg Finance L.P.
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later... |
b5002fe82e3caa6cbef4b14d02c3269880482606539196cead95a3fcba600ddc | input-output-hk/ouroboros-network | Run.hs | {-# LANGUAGE FlexibleContexts #-}
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
module Cardano.Tools.DBAnalyser.Run (analyse) where
import Codec.CBOR.Decoding (Decoder)
import Codec.Serialise (Serialise (decode))
import Control... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/358880057f1d6d86cc385e8475813ace3b9ebef6/ouroboros-consensus-cardano-tools/src/Cardano/Tools/DBAnalyser/Run.hs | haskell | # LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes #
------------------------------------------------------------------------------
Analyse
------------------------------------------------------------------------------
TODO we need to check if the snapshot exists. If not, print an
how to do it.
(ExtLe... | # LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
module Cardano.Tools.DBAnalyser.Run (analyse) where
import Codec.CBOR.Decoding (Decoder)
import Codec.Serialise (Serialise (decode))
import Control.Monad.Except (runExceptT)
import qualified Debug.Trace as Debug
import ... |
d3a5f580c455e69e6f6725e0ce2fad8b8e53ab5eb5174baf1cef99e59768d317 | yrashk/erlang | snmpa_svbl.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 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/yrashk/erlang/e1282325ed75e52a98d58f5bd9fb0fa27896173f/lib/snmp/src/agent/snmpa_svbl.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 1996 - 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 "
-module(snmpa_svbl).
-include("snmp_types.... |
383feb88f68720ed173487f6f8b2735421112bcfa0c0710d7726c80d2921ac01 | openmusic-project/openmusic | om-osc.lisp | ;;===========================================================================
OM API
Multiplatform API for OpenMusic
;
Copyright ( C ) 2004 IRCAM - Centre , Paris , France .
;
;This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as pub... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/api/externals/OSC/om-osc.lisp | lisp | ===========================================================================
This program is free software; you can redistribute it and/or
either version 2
of the License, or (at your option) any later version.
See file LICENSE for further informations on licensing terms.
This program is distributed in t... | OM API
Multiplatform API for OpenMusic
Copyright ( C ) 2004 IRCAM - Centre , Paris , France .
modify it under the terms of the GNU General Public License
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
A... |
7cd9766aca85673b422162b07f84ed09d08d172de596d7893c6c3479fb0705a1 | nunchaku-inria/nunchaku | Bit_set.ml | (* This file is free software, part of containers. See file "license" for more details. *)
(** {1 Bit Field} *)
exception TooManyFields
exception Frozen
let max_width = Sys.word_size - 2
module type S = sig
type t = private int
* Generative type of bitfields . Each instantiation of the functor
should crea... | null | https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/core/Bit_set.ml | ocaml | This file is free software, part of containers. See file "license" for more details.
* {1 Bit Field}
* Get the value of this field
* Set the value of this field
* Make a new field
increment and return previous value
a mask |
exception TooManyFields
exception Frozen
let max_width = Sys.word_size - 2
module type S = sig
type t = private int
* Generative type of bitfields . Each instantiation of the functor
should create a new , incompatible type
should create a new, incompatible type *)
val empty : t
* Empty bitfields ... |
0e6822ce4d492d6692ec29d8ed047d337a44bd01518f70320e3d58bef956973f | zilch-lang/nstar | REX.hs | module Language.NStar.CodeGen.Machine.Internal.X64.REX where
import Language.NStar.CodeGen.Machine.Internal.Intermediate (InterOpcode(..))
| REX with only the W bit set , so it indicates 64 - bit operand size , but no high registers .
rexW :: InterOpcode
rexW = Byte 0x48
| null | https://raw.githubusercontent.com/zilch-lang/nstar/8a9d1d5aa19fe6493c556ae3606c758829683762/lib/nsc-codegen/src/Language/NStar/CodeGen/Machine/Internal/X64/REX.hs | haskell | module Language.NStar.CodeGen.Machine.Internal.X64.REX where
import Language.NStar.CodeGen.Machine.Internal.Intermediate (InterOpcode(..))
| REX with only the W bit set , so it indicates 64 - bit operand size , but no high registers .
rexW :: InterOpcode
rexW = Byte 0x48
| |
93e495bbe846dd72088e6f6a0a0d2e2d5382b0dcada59ad106bd804d1db7bed7 | logseq/mldoc | block0.ml | open! Prelude
open Angstrom
open Parsers
open Type
open Conf
open Helper
open Pos
module MakeBlock (Lists : sig
val parse :
Conf.t -> (Type.t * Pos.pos_meta) list Angstrom.t -> Type.t Angstrom.t
end) =
struct
There are 2 kinds of blocks .
1 . ` begin ... end `
# + BEGIN_X
line1
line... | null | https://raw.githubusercontent.com/logseq/mldoc/1404fdf6e9b7b044f55292706541b50d559aa693/lib/syntax/block0.ml | ocaml | clear indents
export html, etc
verbatim block | open! Prelude
open Angstrom
open Parsers
open Type
open Conf
open Helper
open Pos
module MakeBlock (Lists : sig
val parse :
Conf.t -> (Type.t * Pos.pos_meta) list Angstrom.t -> Type.t Angstrom.t
end) =
struct
There are 2 kinds of blocks .
1 . ` begin ... end `
# + BEGIN_X
line1
line... |
783d522eaf0a3ec74ea397084eb9ad8ed6d3329cdcd96c98a824a8248809435c | swarm-game/swarm | MkLogo.hs | #!/usr/bin/env stack
-- stack --resolver lts-19.3 script
import System.Random
main = do
txt <- lines <$> readFile "title.txt"
txt' <- (traverse . traverse) replace txt
writeFile "logo.txt" (unlines txt')
chars = "<^>vT~@▒ "
replace :: Char -> IO Char
replace ' ' = pick $ zip (replicate 8 0.005 ++ [1]) chars
r... | null | https://raw.githubusercontent.com/swarm-game/swarm/8b8c16a71bd7a666bd2302975ce38078484a26d4/images/logo/MkLogo.hs | haskell | stack --resolver lts-19.3 script | #!/usr/bin/env stack
import System.Random
main = do
txt <- lines <$> readFile "title.txt"
txt' <- (traverse . traverse) replace txt
writeFile "logo.txt" (unlines txt')
chars = "<^>vT~@▒ "
replace :: Char -> IO Char
replace ' ' = pick $ zip (replicate 8 0.005 ++ [1]) chars
replace _ = pick $ zip (replicate 4 0... |
e99bbf6b2cf33df4036ed09a315db5dcef8c1eeafcc804e789b933d05b281a85 | larcenists/larceny | bv2string.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
Copyright 2007 .
;
; Permission to copy this software, in whole or in part, to use this
; software for any lawful purpose, and to redistribute this software
; is granted subject to the restriction that all copies made of this
; software must includ... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/Benchmarking/R7RS/src/bv2string.scm | scheme |
Permission to copy this software, in whole or in part, to use this
software for any lawful purpose, and to redistribute this software
is granted subject to the restriction that all copies made of this
software must include this copyright notice in full.
I also request that you send me a copy of any improvement... | Copyright 2007 .
(import (scheme base)
(scheme read)
(scheme write)
(scheme time))
(define failed-tests '())
(define (test name actual expected)
(if (not (equal? actual expected))
(begin (display "******** FAILED TEST ******** ")
(display name)
(newline... |
d179c2f16b2c67ff7e0d46c2e3d7da35fc7c62e44370287acf2806b6136f484f | benzap/fif | utils.cljc | (ns fif-test.utils
(:require
[clojure.test :refer [deftest testing is are]]
[fif.stack-machine :as stack]
[fif.core :as fif :include-macros true]))
(def ^:dynamic *test-step-max* 10000)
(def max-step-exceeded-keyword ::max-step-exceeded)
(defn teval-fn
"Used to test fif evaluation, while ensuring the ... | null | https://raw.githubusercontent.com/benzap/fif/972adab8b86c016b04babea49d52198585172fe3/test/fif_test/utils.cljc | clojure | A healthy stack machine has no flags active.
There are no return values on the return stack when the
stack machine is healthy.
The global scope is all that is left when the stack machine
is healthy. | (ns fif-test.utils
(:require
[clojure.test :refer [deftest testing is are]]
[fif.stack-machine :as stack]
[fif.core :as fif :include-macros true]))
(def ^:dynamic *test-step-max* 10000)
(def max-step-exceeded-keyword ::max-step-exceeded)
(defn teval-fn
"Used to test fif evaluation, while ensuring the ... |
ba6061d178d78f7a9bd3c1ca8752f3f47503325e3254044ae47f6cac9d73708e | carlohamalainen/ghc-imported-from | ImportedFromSpec.hs | {-# LANGUAGE RankNTypes #-}
module ImportedFromSpec where
import Language.Haskell.GhcImportedFrom
import System.FilePath()
import Test.Hspec
import Control.Exception as E
import Data.List (isPrefixOf)
import System.Directory
import System.FilePath (addTrailingPathSeparator)
-----------------------------------------... | null | https://raw.githubusercontent.com/carlohamalainen/ghc-imported-from/ac28f1c26644791abd698c55b00ce663ccbd861d/test/ImportedFromSpec.hs | haskell | # LANGUAGE RankNTypes #
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Instead of shouldSatisfy isRight, these should check for the right module/package
name turning up in the results. |
module ImportedFromSpec where
import Language.Haskell.GhcImportedFrom
import System.FilePath()
import Test.Hspec
import Control.Exception as E
import Data.List (isPrefixOf)
import System.Directory
import System.FilePath (addTrailingPathSeparator)
withDirectory _ , withDirectory , and toRelativeDir are copied
fr... |
5153a9e42dfbc71ccb5e6d5696581680abefdcfc9066020f6574bfcedec68c29 | ocaml-ppx/ppx_tools_versioned | ast_mapper_class_410.mli | open Migrate_parsetree.Ast_410
(* This file is part of the ppx_tools package. It is released *)
under the terms of the MIT license ( see LICENSE file ) .
Copyright 2013 and LexiFi
(** Class-based customizable mapper *)
open Parsetree
class mapper:
object
method attrib... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx_tools_versioned/00a0150cdabfa7f0dad2c5e0e6b32230d22295ca/ast_mapper_class_410.mli | ocaml | This file is part of the ppx_tools package. It is released
* Class-based customizable mapper | open Migrate_parsetree.Ast_410
under the terms of the MIT license ( see LICENSE file ) .
Copyright 2013 and LexiFi
open Parsetree
class mapper:
object
method attribute: attribute -> attribute
method attributes: attribute list -> attribute list
method binding_op: ... |
6070b7e4cecc682547cb2528b77a82278e4974ce5c6b4bf36a36781cacfefd04 | input-output-hk/cardano-wallet | LayerSpec.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NumericUnderscores #
# LANGUAGE OverloadedLabels #... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/053771567b5dc2c9d0670d739cf5f7364ac636e3/lib/wallet/test/unit/Cardano/Wallet/DB/LayerSpec.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes #
# OPTIONS_GHC -Wno-unused-imports #
|
License: Apache-2.0
To test individual properties in GHCi, use the shorthand type aliases. For
example:
>>> db <- newMemoryDBLayer :: IO TestDBSeq
>>> quickCheck $ prop_sequential db
-----------------------------------------------... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE NumericUnderscores #
# LANGUAGE OverloadedLabels #
# LANGUAGE QuasiQuotes... |
19a7df2246a378b5fa3a85f351f58853a39ae64a24ada061b623c338383d72e0 | mokus0/junkbox | Quine2a.hs | quine s = do
putStr s
print s
main = quine "quine s = do\n putStr s\n print s\nmain = quine "
| null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/quine/Quine2a.hs | haskell | quine s = do
putStr s
print s
main = quine "quine s = do\n putStr s\n print s\nmain = quine "
| |
3dc503998bdfc53fec1be3bb1849de47a813b87b9ce0db8fe68652958db152fb | thi-ng/geom | colored_cube.cljs | (ns thi.ng.geom.examples.gl.colored-cube
(:require-macros
[thi.ng.math.macros :as mm])
(:require
[thi.ng.math.core :as m :refer [PI HALF_PI TWO_PI]]
[thi.ng.color.core :as col]
[thi.ng.typedarrays.core :as arrays]
[thi.ng.geom.gl.core :as gl]
[thi.ng.geom.gl.webgl.constants :as glc]
[thi.ng.geo... | null | https://raw.githubusercontent.com/thi-ng/geom/85783a1f87670c5821473298fa0b491bd40c3028/examples/gl/colored_cube.cljs | clojure | (ns thi.ng.geom.examples.gl.colored-cube
(:require-macros
[thi.ng.math.macros :as mm])
(:require
[thi.ng.math.core :as m :refer [PI HALF_PI TWO_PI]]
[thi.ng.color.core :as col]
[thi.ng.typedarrays.core :as arrays]
[thi.ng.geom.gl.core :as gl]
[thi.ng.geom.gl.webgl.constants :as glc]
[thi.ng.geo... | |
05d0a1367f5ab29330321552876993bd9b4d75724e874a8b34e4bbb8a6223acb | iskandr/parakeet-retired | HostMemspace.ml | open Ptr
external c_malloc_impl : int -> Int64.t = "ocaml_malloc"
exception HostOutOfMemory
let malloc nbytes =
let ptr = c_malloc_impl nbytes in
if ptr = Int64.zero then raise HostOutOfMemory
else ptr
external free : Int64.t -> unit = "ocaml_free"
external memcpy : Int64.t -> Int64.t -> int -> unit = "ocaml_m... | null | https://raw.githubusercontent.com/iskandr/parakeet-retired/3d7e6e5b699f83ce8a1c01290beed0b78c0d0945/Runtime/Memory/HostMemspace.ml | ocaml | open Ptr
external c_malloc_impl : int -> Int64.t = "ocaml_malloc"
exception HostOutOfMemory
let malloc nbytes =
let ptr = c_malloc_impl nbytes in
if ptr = Int64.zero then raise HostOutOfMemory
else ptr
external free : Int64.t -> unit = "ocaml_free"
external memcpy : Int64.t -> Int64.t -> int -> unit = "ocaml_m... | |
67cb60d3319bf510b9fe50a8eafa332c1e17ba741b8a29b9b6b24b9ebf2160f4 | fujita-y/ypsilon | lists.scm | #!nobacktrace
(library (rnrs lists (6))
(export find for-all exists
filter
partition
fold-left fold-right
remp remove remv remq
memp member memv memq
assp assoc assv assq cons*)
(import (core lists)))
| null | https://raw.githubusercontent.com/fujita-y/ypsilon/f742470e2810aabb7a7c898fd6c07227c14a725f/sitelib/rnrs/lists.scm | scheme | #!nobacktrace
(library (rnrs lists (6))
(export find for-all exists
filter
partition
fold-left fold-right
remp remove remv remq
memp member memv memq
assp assoc assv assq cons*)
(import (core lists)))
| |
72ca59848b8cb5cf8ed828de4112e64a7454548c9ec1c0c4c4e0cb02308521ac | hjcapple/reading-sicp | exercise_3_26.scm | #lang sicp
P187 - [ 练习 3.26 ]
树的递归查找和插入,跟 [ 练习 2.66 ] 相似。但有几个地方不同
1 . 将 key value left right 放在一起,省去中间的 entry 。
2 . make - table 中 添加了 compare - key 过程作为参数,可以定制比较函数 。
3 . insert - tree !
4 . make - table 。
(define (make-tree key value left right)
(cons (cons key value) (cons left right)))
(defin... | null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_3/exercise_3_26.scm | scheme | #lang sicp
P187 - [ 练习 3.26 ]
树的递归查找和插入,跟 [ 练习 2.66 ] 相似。但有几个地方不同
1 . 将 key value left right 放在一起,省去中间的 entry 。
2 . make - table 中 添加了 compare - key 过程作为参数,可以定制比较函数 。
3 . insert - tree !
4 . make - table 。
(define (make-tree key value left right)
(cons (cons key value) (cons left right)))
(defin... | |
ecc13a190519289214dea07782e9717c90aaf1a2ac45d25c830dd855138d0c92 | hsyl20/haskus-system | SymLink.hs | # LANGUAGE DataKinds #
# LANGUAGE LambdaCase #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE TypeApplications #
# LANGUAGE FlexibleContexts #
-- | Symbolic links
module Haskus.System.Linux.FileSystem.SymLink
( sysSymlink
, ReadSymLinkErrors
, readSymbolicLink
)
where
import Haskus.System... | null | https://raw.githubusercontent.com/hsyl20/haskus-system/2f389c6ecae5b0180b464ddef51e36f6e567d690/haskus-system/src/lib/Haskus/System/Linux/FileSystem/SymLink.hs | haskell | | Symbolic links
| Read the path in a symbolic link
| Wrapper for readlinkat syscall
if no handle is passed, we assume the path is absolute and we give a
(-1) file descriptor which should be ignored. If the path is relative,
allocate a buffer and try to readlinkat.
retry with double buffer size
| Create a symbo... | # LANGUAGE DataKinds #
# LANGUAGE LambdaCase #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE TypeApplications #
# LANGUAGE FlexibleContexts #
module Haskus.System.Linux.FileSystem.SymLink
( sysSymlink
, ReadSymLinkErrors
, readSymbolicLink
)
where
import Haskus.System.Linux.Error
import ... |
dc29f233dac68a95016dcd9aba81f037d34f428a8208321bfe93a303b7ec6336 | lpw25/prof_spacetime | serve.mli |
val serve
: address:string
-> port:int
-> title:string
-> Series.t
-> unit
| null | https://raw.githubusercontent.com/lpw25/prof_spacetime/bb17f61a54b530eaed30dab5759d6d0c2a9d083c/src/serve.mli | ocaml |
val serve
: address:string
-> port:int
-> title:string
-> Series.t
-> unit
| |
6a13751f12d7bd53d43bdb1165e444effe85f5480453f65b96cc3034e69e07de | haskell-numerics/hmatrix | LAPACK.hs | # LANGUAGE TypeOperators #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -fno - warn - missing - signatures #
-----------------------------------------------------------------------------
-- |
Module : Numeric . LinearAlgebra . LAPACK
Copyright : ( c ) 2006 - 14
-- License : BSD3
Maintainer : ... | null | https://raw.githubusercontent.com/haskell-numerics/hmatrix/2694f776c7b5034d239acb5d984c489417739225/packages/base/src/Internal/LAPACK.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Stability : provisional
---------------------------------------------------------------------------
---------------------------------------------------------------------------------
--------------------------------... | # LANGUAGE TypeOperators #
# LANGUAGE ViewPatterns #
# OPTIONS_GHC -fno - warn - missing - signatures #
Module : Numeric . LinearAlgebra . LAPACK
Copyright : ( c ) 2006 - 14
Maintainer :
Functional interface to selected LAPACK functions ( < > ) .
module Internal.LAPACK where
import Da... |
0fbd6f2b0691263738c772023f951b36df143cb1b773168f229142461e91b672 | dongcarl/guix | git.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2020 < >
;;;
;;; 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 Free Software Foundation ; either version 3 of the Lice... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/guix/scripts/git.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 © 2020 < >
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 scripts git)
#:use-module (ice-9 match)
#:use-module (guix ui)
#:use-module (guix scrip... |
d234690c10938f2f9114248d81f48b3c9c060e526e0c1975aa76f8b9268e2b38 | a13x/aberth | aberth_app.erl | Copyright ( c ) 2013 < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL... | null | https://raw.githubusercontent.com/a13x/aberth/e09b721b40782d337970aebe3d126e0ab27b1089/src/aberth_app.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2013 < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(aberth_app).
-behaviour(application).
-export([start... |
99f7ff2c03adc7145df49dcc9c958de1c657ce4003316c928e8cbc26db23d00b | agda/agda | CallGraph.hs | # LANGUAGE ImplicitParams #
module Internal.Termination.CallGraph ( tests ) where
import Agda.Termination.CallGraph
import Agda.Termination.CutOff
import Agda.Termination.SparseMatrix
import qualified Data.List as List
import Internal.Helpers
import Internal.Termination.CallMatrix ( callMatrix )
------------------... | null | https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/test/Internal/Termination/CallGraph.hs | haskell | ----------------------------------------------------------------------------
prop_complete :: (?cutoff :: CutOff) => Property
prop_complete =
isComplete (complete cs)
-- | Returns 'True' iff the call graph is complete.
isComplete s = (s `union` (s `combine` s)) `notWorse` s
------------------------------------... | # LANGUAGE ImplicitParams #
module Internal.Termination.CallGraph ( tests ) where
import Agda.Termination.CallGraph
import Agda.Termination.CutOff
import Agda.Termination.SparseMatrix
import qualified Data.List as List
import Internal.Helpers
import Internal.Termination.CallMatrix ( callMatrix )
forAll ( call... |
0e01fdb77ad67259b310968f626e04ef7c11610da875559b8b9423bf095108bb | acieroid/scala-am | f-0.scm | (letrec ((f (lambda (x) (+ (* x x) (* x x)))) (g (lambda (x) (+ (* x x) (* x x))))) (let ((_tmp1 (f 1))) (let ((_tmp2 (f 2))) (let ((_tmp3 (f 3))) (let ((_tmp4 (f 4))) (let ((_tmp5 (f 5))) (let ((_tmp6 (f 6))) (let ((_tmp7 (f 7))) (let ((_tmp8 (f 8))) (let ((_tmp9 (f 9))) (f 10))))))))))) | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/changesBenevolPaper/f1-tests/f-0.scm | scheme | (letrec ((f (lambda (x) (+ (* x x) (* x x)))) (g (lambda (x) (+ (* x x) (* x x))))) (let ((_tmp1 (f 1))) (let ((_tmp2 (f 2))) (let ((_tmp3 (f 3))) (let ((_tmp4 (f 4))) (let ((_tmp5 (f 5))) (let ((_tmp6 (f 6))) (let ((_tmp7 (f 7))) (let ((_tmp8 (f 8))) (let ((_tmp9 (f 9))) (f 10))))))))))) | |
bcff33f9d5be45875f28ff3c02e838394380d7865e193f5ee1b98e21f4ce9604 | dcastro/twenty48 | Twenty48.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
# LANGUAGE TemplateHaskell #
module Handler.Twenty48 where
import Import
import Text.Hamlet (hamletFile)
import Text.Julius (juliusFile)
import Text.Shakespeare.Sass
getTwenty48R :: Ha... | null | https://raw.githubusercontent.com/dcastro/twenty48/d4a58bfa389bb247525fd18f80ef428d84ef5fe9/src/Handler/Twenty48.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE QuasiQuotes # | # LANGUAGE TemplateHaskell #
module Handler.Twenty48 where
import Import
import Text.Hamlet (hamletFile)
import Text.Julius (juliusFile)
import Text.Shakespeare.Sass
getTwenty48R :: Handler Html
getTwenty48R = do
pc <-
widgetToPageContent $ do
... |
ec6e3e66fca1ca04a521687e5ebfa4b1f53f1746c99fd19b8fe3f93d743dc436 | jrclogic/SMCDEL | S5.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , FlexibleContexts #
module SMCDEL.Explicit.S5 where
import Control.Arrow (second,(&&&))
import Data.Dynamic
import Data.GraphViz
import Data.List
import Data.Tuple (swap)
import Data.Maybe (fromMaybe)
import SMCDEL.Language
import SMCDEL.Internal.TexDisplay
impor... | null | https://raw.githubusercontent.com/jrclogic/SMCDEL/b20eeaac9900879b1636fba9a0968a80de4eb1c6/src/SMCDEL/Explicit/S5.hs | haskell | allow updating with formulas that are not globally true.
same valuation
forth
back
nothing to minimize
| A safe way to `lookup` all postconditions
do not check precondition!
do not check precondition! | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , FlexibleContexts #
module SMCDEL.Explicit.S5 where
import Control.Arrow (second,(&&&))
import Data.Dynamic
import Data.GraphViz
import Data.List
import Data.Tuple (swap)
import Data.Maybe (fromMaybe)
import SMCDEL.Language
import SMCDEL.Internal.TexDisplay
impor... |
ad07d6dd4435b7e11e76fbb8e56d6302c0beed7a7d19735cca622954e0f9d366 | haskell-suite/haskell-src-exts | FixityTests.hs | main = forM_ cmdReports $ \x -> do
putStrLn $ "Writing report to " ++ x ++ " ..."
writeReport x ideas
| null | https://raw.githubusercontent.com/haskell-suite/haskell-src-exts/84a4930e0e5c051b7d9efd20ef7c822d5fc1c33b/tests/examples/FixityTests.hs | haskell | main = forM_ cmdReports $ \x -> do
putStrLn $ "Writing report to " ++ x ++ " ..."
writeReport x ideas
| |
1a463e1237cd30bed4ba9f2eea24ac74f55a6e403b9cbea917b9bce0ea5ec37a | cushon/project-euler | 48.rkt | #lang racket
(require "common.rkt")
Find the last 10 digits of the series 1 ^ 1 + 2 ^ 2 + ... + 1000 ^ 1000 .
(define (solve)
(define (last10 n) (remainder n (expt 10 10)))
(last10
(foldr + 0
(map (lambda (x) (last10 (expt x x)))
(range 1 1000)))))
(provide solve) | null | https://raw.githubusercontent.com/cushon/project-euler/d7fcbfff0cd59b2c3691293ff35bb2043b409f68/48.rkt | racket | #lang racket
(require "common.rkt")
Find the last 10 digits of the series 1 ^ 1 + 2 ^ 2 + ... + 1000 ^ 1000 .
(define (solve)
(define (last10 n) (remainder n (expt 10 10)))
(last10
(foldr + 0
(map (lambda (x) (last10 (expt x x)))
(range 1 1000)))))
(provide solve) | |
b8718cae021be9de2a7d3747fc3ffe2cc27030dd409a7791140d9dcf85560cd0 | lexi-lambda/freer-simple | Coroutine.hs | -- |
Module : Control . . Freer . Coroutine
-- Description: Composable coroutine effects layer.
Copyright : ( c ) 2016 Allele Dev ; 2017 Ixperta Solutions s.r.o . ; 2017
-- License: BSD3
Maintainer : < >
-- Stability: experimental
Portability : GHC specific language extensions .
-... | null | https://raw.githubusercontent.com/lexi-lambda/freer-simple/e5ef0fec4a79585f99c0df8bc9e2e67cc0c0fb4a/src/Control/Monad/Freer/Coroutine.hs | haskell | |
Description: Composable coroutine effects layer.
License: BSD3
Stability: experimental
An effect to compose functions with the ability to yield.
Using <> as a starting point.
* Yield Control
* Handle Yield Effect
| A type representing a yielding of control.
Type variables have following meaning:... | Module : Control . . Freer . Coroutine
Copyright : ( c ) 2016 Allele Dev ; 2017 Ixperta Solutions s.r.o . ; 2017
Maintainer : < >
Portability : GHC specific language extensions .
module Control.Monad.Freer.Coroutine
Yield(..)
, yield
, Status(..)
, runC
, interposeC
, replyC... |
b2e0b630cc23498a39c6df8bf9209424bed79a2f4e78002e6a392e0410e357bd | verystable/warframe-autobuilder | MultishotMods.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
-- |
-- Module : Builder.Mods.PistolMods.AmmoMods
-- Maintainer :
-- Stability : experimental
--
Contains function that modify multishot , applicable on secondary weapons .
module Builder.Mods.PistolMods.MultishotMods where
import ... | null | https://raw.githubusercontent.com/verystable/warframe-autobuilder/015e0bb6812711ea27071816d054cbaa1c65770b/src/Builder/Mods/PistolMods/MultishotMods.hs | haskell | # LANGUAGE OverloadedStrings #
|
Module : Builder.Mods.PistolMods.AmmoMods
Maintainer :
Stability : experimental
| Barrel Diffusion [+120% Multishot]
| Amalgam Barrel Diffusion [+110% Multishot] | # LANGUAGE NoImplicitPrelude #
Contains function that modify multishot , applicable on secondary weapons .
module Builder.Mods.PistolMods.MultishotMods where
import ClassyPrelude
import Control.Lens
import GenericFunctions.GenericFunctions
import Types.GenericWeapon
barrelD... |
b3ddcde6b65223740c14166b768e84f66804f0e9f0049e0ec52b527cd782f094 | jrm-code-project/LISP-Machine | lmfile.lisp | ;;; -*- Mode:LISP; Package:ZWEI; Base:8 -*-
;;; LMFILE mail files.
( DEFMETHOD ( FS : LM - PARSING - MIXIN : MAIL - FILE - FORMAT - COMPUTER ) ( STREAM & AUX FLAVOR APPEND - P )
; (IF (NULL STREAM)
( SETQ FLAVOR ' RMAIL - FILE - BUFFER )
; (LET ((FIRST-LINE (SEND STREAM :LINE-IN)))
; (SEND STREAM :S... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/zmail/lmfile.lisp | lisp | -*- Mode:LISP; Package:ZWEI; Base:8 -*-
LMFILE mail files.
(IF (NULL STREAM)
(LET ((FIRST-LINE (SEND STREAM :LINE-IN)))
(SEND STREAM :SET-POINTER 0)
; Looks like a babyl file
; is rmail file
(VALUES FLAVOR APPEND-P))
(LOOP FOR FN2 IN *ZMAIL-FILE-FN2S*
COLLECT (SEND SELF :NEW-PATHNAME :NAM... |
( DEFMETHOD ( FS : LM - PARSING - MIXIN : MAIL - FILE - FORMAT - COMPUTER ) ( STREAM & AUX FLAVOR APPEND - P )
( SETQ FLAVOR ' RMAIL - FILE - BUFFER )
( IF ( STRING - EQUAL FIRST - LINE " Babyl Options : " )
( SETQ FLAVOR ' BABYL - MAIL - FILE - BUFFER )
( SETQ FLAVOR ' RMAIL - F... |
ffa38ee2683dff2a782bb750ad3bc876ebbe803c2804e10bc2aba99a7706a874 | ekmett/thrists | Tarjan.hs | # LANGUAGE RankNTypes , GADTs , PolyKinds #
module Tarjan where
import Control.Applicative
import Control.Category
import Data.Monoid
import Prelude hiding ((.),id)
and
TODO : we need fast access to
class Cat (t :: (i -> i -> *) -> i -> i -> *) where
foldCat :: Category m => (forall a b. r a b -... | null | https://raw.githubusercontent.com/ekmett/thrists/49c4a0a86712a91bb435c938147173676b8c005c/wip/Tarjan.hs | haskell | fixl3 (Q1 (D3 a b c) m r = Q1 (E1 (N2 b c) <| m) r
a :| Q1 (E1 (N2 b c) <| m) r
ensure the deque is not 5,6 exposed on the left
ensure the deque is not 5,6 exposed on the right | # LANGUAGE RankNTypes , GADTs , PolyKinds #
module Tarjan where
import Control.Applicative
import Control.Category
import Data.Monoid
import Prelude hiding ((.),id)
and
TODO : we need fast access to
class Cat (t :: (i -> i -> *) -> i -> i -> *) where
foldCat :: Category m => (forall a b. r a b -... |
81567d359d137b2667a888ff09418376b0da697049c6babbf882c945f91660e5 | ucsd-progsys/liquidhaskell | ApplicativeId.hs | {-@ LIQUID "--reflection" @-}
{-@ LIQUID "--ple" @-}
{-# LANGUAGE IncoherentInstances #-}
# LANGUAGE FlexibleContexts #
module ApplicativeId where
import Prelude hiding (fmap, id, pure, seq)
import Language.Haskell.Liquid.ProofCombinators
-- | Applicative Laws :
-- | identity pure id <*> v = v
-- | c... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/20cd67af038930cb592d68d272c8eb1cbe3cb6bf/tests/benchmarks/popl18/ple/pos/ApplicativeId.hs | haskell | @ LIQUID "--reflection" @
@ LIQUID "--ple" @
# LANGUAGE IncoherentInstances #
| Applicative Laws :
| identity pure id <*> v = v
| composition pure (.) <*> u <*> v <*> w = u <*> (v <*> w)
| homomorphism pure f <*> pure x = pure (f x)
| interchange u <*> pure y = pure ($ y) <*> u
@ reflect pure @
... |
# LANGUAGE FlexibleContexts #
module ApplicativeId where
import Prelude hiding (fmap, id, pure, seq)
import Language.Haskell.Liquid.ProofCombinators
pure :: a -> Identity a
pure x = Identity x
seq :: Identity (a -> b) -> Identity a -> Identity b
seq (Identity f) (Identity x) = Identity (f x)
id :: a -> a
id x ... |
58af9341e241fabdcf0147dd1cc6d8e552fc4c920d865b2b6c9a4526dc5e85ae | drathier/elm-offline | Functions.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module Generate.Functions (functions) where
import qualified Data.ByteString.Builder as B
import Text.RawString.QQ (r)
-- FUNCTIONS
functions :: B.Builder
functions = [r|
function F(arity, fun, wrapper) {
wrapper.a = arity;
wrapper.f = fun;
return... | null | https://raw.githubusercontent.com/drathier/elm-offline/f562198cac29f4cda15b69fde7e66edde89b34fa/builder/src/Generate/Functions.hs | haskell | # LANGUAGE OverloadedStrings #
FUNCTIONS | # LANGUAGE QuasiQuotes #
module Generate.Functions (functions) where
import qualified Data.ByteString.Builder as B
import Text.RawString.QQ (r)
functions :: B.Builder
functions = [r|
function F(arity, fun, wrapper) {
wrapper.a = arity;
wrapper.f = fun;
return wrapper;
}
function F2(fun) {
return F(2, fu... |
f63eb2ecb20b33ce03a3ea5253bb1fe83cd60bf420ebf6b2474d6a1230137a83 | haskell-servant/servant | StaticFiles.hs | # LANGUAGE CPP #
-- | This module defines server-side handlers that lets you serve static files.
--
-- The most common needs for a web application are covered by
-- 'serveDirectoryWebApp`, but the other variants allow you to use
different ` StaticSettings ` and ' serveDirectoryWith ' even allows you
to specify arbi... | null | https://raw.githubusercontent.com/haskell-servant/servant/d06b65c4e6116f992debbac2eeeb83eafb960321/servant-server/src/Servant/Server/StaticFiles.hs | haskell | | This module defines server-side handlers that lets you serve static files.
The most common needs for a web application are covered by
'serveDirectoryWebApp`, but the other variants allow you to use
* Deprecated
| Serve anything under the specified directory as a 'Raw' endpoint.
@
server :: Server MyApi
@
... | # LANGUAGE CPP #
different ` StaticSettings ` and ' serveDirectoryWith ' even allows you
to specify arbitrary ' StaticSettings ' to be used for serving static files .
module Servant.Server.StaticFiles
( serveDirectoryWebApp
, serveDirectoryWebAppLookup
, serveDirectoryFileServer
, serveDirectoryEmbedded
,... |
4d8c9104f60216f6871f13a938024645ca34e7caf1de4d60f96aed26f453144f | Frama-C/Frama-C-snapshot | clabels.ml | (**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/wp/clabels.ml | ocaml | ************************************************************************
alternatives)
... | This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Software
Foundation ,... |
3c216cd9bd86e4dc1c3c368fdc07f2ad731a4f4069b6214512c97e385e2865e4 | mirage/ptt-deployer | certificate.ml | open Rresult
let prefix =
X509.Distinguished_name.[ Relative_distinguished_name.singleton (CN "PTT") ]
let cacert_dn =
X509.Distinguished_name.(
prefix
@ [ Relative_distinguished_name.singleton (CN "Ephemeral CA for PTT") ])
let cacert_lifetime = Ptime.Span.v (365, 0L)
let cacert_serial_number = Z.zero
... | null | https://raw.githubusercontent.com/mirage/ptt-deployer/9a2bd4464c6dbc189ba1331adeaedc73defe01d2/src/certificate.ml | ocaml | open Rresult
let prefix =
X509.Distinguished_name.[ Relative_distinguished_name.singleton (CN "PTT") ]
let cacert_dn =
X509.Distinguished_name.(
prefix
@ [ Relative_distinguished_name.singleton (CN "Ephemeral CA for PTT") ])
let cacert_lifetime = Ptime.Span.v (365, 0L)
let cacert_serial_number = Z.zero
... | |
8a3a155f5d4946e909ed24cfbb3c74fd7db0ddb6f70d751933c35b7ce10ad736 | functionally/pigy-genetics | Types.hs | -----------------------------------------------------------------------------
--
-- Module : $Headers
Copyright : ( c ) 2021
License : MIT
--
Maintainer : < >
-- Stability : Experimental
Portability : Portable
--
-- | Types for the pig-image service.
--
------------------------... | null | https://raw.githubusercontent.com/functionally/pigy-genetics/ed2784faabfa77d8a94a147e9f7b11cac0f545b6/app/Pigy/Types.hs | haskell | ---------------------------------------------------------------------------
Module : $Headers
Stability : Experimental
| Types for the pig-image service.
---------------------------------------------------------------------------
* Configuration
* Context
* Operations
* Keys
| The service configura... | Copyright : ( c ) 2021
License : MIT
Maintainer : < >
Portability : Portable
# LANGUAGE RecordWildCards #
module Pigy.Types (
Configuration(..)
, readConfiguration
, Context(..)
, makeContext
, Mode(..)
, KeyInfo(..)
, KeyedAddress(..)
, readKeyedAddress
) where
import Cardano.A... |
5299fdf3ac8d968f0e1493fd559d90359f81796b03aac4aa334284a0255627ed | clojure-interop/java-jdk | MetalToolBarUI.clj | (ns javax.swing.plaf.metal.MetalToolBarUI
"A Metal Look and Feel implementation of ToolBarUI. This implementation
is a \"combined\" view/controller."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.metal MetalToolBarUI]))
(defn ->metal-tool-bar-ui
"Constructor."
(^MetalToolBarU... | null | https://raw.githubusercontent.com/clojure-interop/java-jdk/8d7a223e0f9a0965eb0332fad595cf7649d9d96e/javax.swing/src/javax/swing/plaf/metal/MetalToolBarUI.clj | clojure | (ns javax.swing.plaf.metal.MetalToolBarUI
"A Metal Look and Feel implementation of ToolBarUI. This implementation
is a \"combined\" view/controller."
(:refer-clojure :only [require comment defn ->])
(:import [javax.swing.plaf.metal MetalToolBarUI]))
(defn ->metal-tool-bar-ui
"Constructor."
(^MetalToolBarU... | |
204761aa4dfd293fe654447fce2f3b39362d1f0ae4413891daf0a0ba6021b36d | slindley/effect-handlers | UpDown.hs |
This example ( due to ) illustrates the limitations of our
encoding of effect typing in Haskell . The effects have been replaced
by concrete handlers Up and Down which are different types .
Tested with ghc 7.8.4 .
This example (due to Oscar Key) illustrates the limitations of our
encoding of effect... | null | https://raw.githubusercontent.com/slindley/effect-handlers/39d0d09582d198dd6210177a0896db55d92529f4/Examples/UpDown.hs | haskell |
This example ( due to ) illustrates the limitations of our
encoding of effect typing in Haskell . The effects have been replaced
by concrete handlers Up and Down which are different types .
Tested with ghc 7.8.4 .
This example (due to Oscar Key) illustrates the limitations of our
encoding of effect... | |
89b9dded605bb85d7e3c17ef2ffc0d5144b429d615e39e031e3a517367795d44 | mark-gerarts/nature-of-code | sketch.lisp | (defpackage :nature-of-code.fractals.exercise-8.9
(:export :start-sketch)
(:use :cl :trivial-gamekit)
(:import-from :alexandria :random-elt))
(in-package :nature-of-code.fractals.exercise-8.9)
(defvar *width* 600)
(defvar *height* 400)
(defvar *center-x* (/ *width* 2))
(defvar *center-y* (/ *height* 2))
(defvar... | null | https://raw.githubusercontent.com/mark-gerarts/nature-of-code/4f8612e18a2a62012e44f08a8e0a4f8aec21a1ec/08.%20Fractals/Exercise%208.9%20-%20Growing%20tree/sketch.lisp | lisp | This is a remnant of a previous exercise, where it made sense to share some
properties between leaves and branches.
See above. Leaves are put in the branches array as well. Might be a good
idea to refactor this. | (defpackage :nature-of-code.fractals.exercise-8.9
(:export :start-sketch)
(:use :cl :trivial-gamekit)
(:import-from :alexandria :random-elt))
(in-package :nature-of-code.fractals.exercise-8.9)
(defvar *width* 600)
(defvar *height* 400)
(defvar *center-x* (/ *width* 2))
(defvar *center-y* (/ *height* 2))
(defvar... |
f937893b2d499fb0ff2690d36411ac85e1a00dd22210de0c654b06af6519ea02 | inhabitedtype/ocaml-aws | setQueueAttributes.mli | open Types
type input = SetQueueAttributesRequest.t
type output = unit
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/sqs/lib/setQueueAttributes.mli | ocaml | open Types
type input = SetQueueAttributesRequest.t
type output = unit
type error = Errors_internal.t
include
Aws.Call with type input := input and type output := output and type error := error
| |
176739b44009a4177046a063b55ce345ea2f37442ca640fddf536b8b717a5c35 | reasonml/reason | migrate_parsetree_408_409.ml | (**************************************************************************)
(* *)
(* OCaml Migrate Parsetree *)
(* *)
... | null | https://raw.githubusercontent.com/reasonml/reason/4f6ff7616bfa699059d642a3d16d8905d83555f6/src/vendored-omp/src/migrate_parsetree_408_409.ml | ocaml | ************************************************************************
OCaml Migrate Parsetree
... |
Copyright 2017 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
include Migrate_parsetree_408_409_migrate
$ open Printf
let fields = [
" attribute " ; " attribut... |
831f7401e56f8ea2afd01f7f23d509fc45594b960e6f9b0849fb2301a5d2679b | reborg/clojure-essential-reference | 1.clj | < 1 >
< 2 >
3
(s/last-index-of "Bonjure Clojure!" "ju") ; <3>
11 | null | https://raw.githubusercontent.com/reborg/clojure-essential-reference/c37fa19d45dd52b2995a191e3e96f0ebdc3f6d69/StringsandRegularExpressions/index-of%2Clast-index-of/1.clj | clojure | <3> | < 1 >
< 2 >
3
11 |
8429c1345277ed654919cfb6c9ee27288fbaa867f6bf8cf2ff9f4230199e60c8 | andorp/bead | LDAP.hs | module Bead.Daemon.LDAP (
LDAPDaemon(..)
, LDAPDaemonConfig(..)
, startLDAPDaemon
, module Bead.Daemon.LDAP.Result
) where
import Prelude hiding (log)
import Control.Concurrent (forkIO)
import Control.Concurrent.Async
import Control.Concurrent.STM
import C... | null | https://raw.githubusercontent.com/andorp/bead/280dc9c3d5cfe1b9aac0f2f802c705ae65f02ac2/src/Bead/Daemon/LDAP.hs | haskell | ^ Queries the given username, and returns a computation that blocks
until the authentication result is not evaluated.
the final result is not calculated.
Start the workers | module Bead.Daemon.LDAP (
LDAPDaemon(..)
, LDAPDaemonConfig(..)
, startLDAPDaemon
, module Bead.Daemon.LDAP.Result
) where
import Prelude hiding (log)
import Control.Concurrent (forkIO)
import Control.Concurrent.Async
import Control.Concurrent.STM
import C... |
1ec457e4f5e7653d60233981b789e3b14d17f262e986433db8563a4a29f12215 | GaloisInc/cryptol | Patterns.hs | # Language Safe , RankNTypes , MultiParamTypeClasses #
{-# Language FunctionalDependencies #-}
{-# Language FlexibleInstances #-}
# Language TypeFamilies , UndecidableInstances #
{-# Language TypeOperators #-}
module Cryptol.Utils.Patterns where
import Control.Monad(liftM,liftM2,ap,MonadPlus(..),guard)
import qualifie... | null | https://raw.githubusercontent.com/GaloisInc/cryptol/4c1c5fc68120e38e38fe3c93eb787da84c1b24bc/src/Cryptol/Utils/Patterns.hs | haskell | # Language FunctionalDependencies #
# Language FlexibleInstances #
# Language TypeOperators #
| Check that a value satisfies multiple patterns.
For example, an "as" pattern is @(__ &&& p)@.
| Match a value, and modify the result.
| Match a value, and return the given result
| View pattern.
| Variable pattern.
| ... | # Language Safe , RankNTypes , MultiParamTypeClasses #
# Language TypeFamilies , UndecidableInstances #
module Cryptol.Utils.Patterns where
import Control.Monad(liftM,liftM2,ap,MonadPlus(..),guard)
import qualified Control.Monad.Fail as Fail
import Control.Applicative(Alternative(..))
newtype Match b = Match (forall ... |
b5dcaf135ada3d87ad9639f21d85060e0c983165b26ac2dc78974b9fa8a1dbf1 | SqrtMinusOne/channel-q | starship.scm | (define-module (starship)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (gnu packages gcc)
#:use-module (guix download)
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (nonguix build-system binary))
(define-public starship... | null | https://raw.githubusercontent.com/SqrtMinusOne/channel-q/0531901c54bdf3a0bc40a82412048544853fcf46/starship.scm | scheme | (define-module (starship)
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (gnu packages gcc)
#:use-module (guix download)
#:use-module (guix packages)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (nonguix build-system binary))
(define-public starship... | |
33c3a8b71c65afefa551b439368ace674a040569e4d78eda1f835b908e792953 | FieryCod/holy-lambda | core.cljc | (ns aws-interop-v2.example.core
(:gen-class)
(:require [fierycod.holy-lambda.response :as hr]
[fierycod.holy-lambda.core :as h]
[fierycod.holy-lambda.agent :as agent]
[fierycod.holy-lambda.native-runtime :as native]
[clojure.string :as str]
[jsonista.core ... | null | https://raw.githubusercontent.com/FieryCod/holy-lambda/93e786be70505f6734c6f8c45c7a7703c149f482/examples/bb/native/aws-interop-v2.example/src/aws_interop_v2/example/core.cljc | clojure | AWS API
AWS S3 API
-summary.html
cache of re-usable clients using the id/key. best perf to create a client once, not for each request
you could have N s3 clients e.g. different regions
used in AWS cloud
used during native:conf payloads
list page
object perms page
safe s3 request i.e. no side effects
safe s3 ... | (ns aws-interop-v2.example.core
(:gen-class)
(:require [fierycod.holy-lambda.response :as hr]
[fierycod.holy-lambda.core :as h]
[fierycod.holy-lambda.agent :as agent]
[fierycod.holy-lambda.native-runtime :as native]
[clojure.string :as str]
[jsonista.core ... |
75a4a5c74313a2d3a03f169d36c68ab8aaa612a25e6a7aeabc8dd3995b31b003 | theodormoroianu/SecondYearCourses | LambdaChurch_20210415164419.hs | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/5e359e6a7cf588a527d27209bf53b4ce6b8d5e83/FLP/Laboratoare/Lab%209/.history/LambdaChurch_20210415164419.hs | haskell | alpha-equivalence
subst u x t defines [u/x]t, i.e., substituting u for x in t
This substitution avoids variable captures so it is safe to be used when
reducing terms with free variables (e.g., if evaluating inside lambda abstractions)
^ substitution term
^ variable to be substitutes
^ term in which the substit... | module LambdaChurch where
import Data.Char (isLetter)
import Data.List ( nub )
class ShowNice a where
showNice :: a -> String
class ReadNice a where
readNice :: String -> (a, String)
data Variable
= Variable
{ name :: String
, count :: Int
}
deriving (Show, Eq, Ord)
var :: String -> Variable
var ... |
07d9d467342ed097b308ba846971c1e87006bd1a8c79635546063a5cbb73a7ae | aryx/fork-efuns | utils.mli | (***********************************************************************)
(* *)
(* ____ *)
(* *)
Fabrice Le Fessa... | null | https://raw.githubusercontent.com/aryx/fork-efuns/8f2f8f66879d45e26ecdca0033f9c92aec2b783d/commons/utils.mli | ocaml | *********************************************************************
____
... | Fabrice Le Fessant , projet Para / SOR , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
val count_char_sub : string -> int -> int -> char -> int * int
val count_char : string -> char -> i... |
917e3f2e4dae652fae8c306aae719c667f1b43e80a4c3f497e1c2c56487235dc | blynn/compiler | e4096.hs | infixl 9 !!;
infixr 9 .;
infixl 7 * , / , %;
infixl 6 + , -;
infixr 5 ++;
infixl 4 <*>;
infix 4 == , <=;
infixl 3 &&;
infixl 2 ||;
infixl 1 >> , >>=;
infixr 0 $;
foreign import ccall "putchar" putChar :: Int -> IO Int;
class Eq a where { (==) :: a -> a -> Bool };
instance Eq Int where { (==) = intEq };
class Ord a whe... | null | https://raw.githubusercontent.com/blynn/compiler/b9fe455ad4ee4fbabe77f2f5c3c9aaa53cffa85b/e4096.hs | haskell | infixl 9 !!;
infixr 9 .;
infixl 7 * , / , %;
infixl 6 + , -;
infixr 5 ++;
infixl 4 <*>;
infix 4 == , <=;
infixl 3 &&;
infixl 2 ||;
infixl 1 >> , >>=;
infixr 0 $;
foreign import ccall "putchar" putChar :: Int -> IO Int;
class Eq a where { (==) :: a -> a -> Bool };
instance Eq Int where { (==) = intEq };
class Ord a whe... | |
517c9d4b6cae648e773673807ec034452d47ed66083c0c5a1d777d53f9e816f7 | locusmath/locus | object.clj | (ns locus.polynomial.fractional.object
(:refer-clojure :exclude [+ - * /])
(:require [locus.set.logic.core.set :refer :all :exclude [add]]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.quiver.structure.core.protoc... | null | https://raw.githubusercontent.com/locusmath/locus/12061072ccfe6a28f87eb8bd4489397dcf4b93d8/src/clojure/locus/polynomial/fractional/object.clj | clojure | Elements of the fields of fractions of polynomial rings
Negation
Ontology of rational expressions | (ns locus.polynomial.fractional.object
(:refer-clojure :exclude [+ - * /])
(:require [locus.set.logic.core.set :refer :all :exclude [add]]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.quiver.structure.core.protoc... |
120974eea633caa6eb81aa892cd19920a5acc144eb3927b48437d69946cf8209 | cedlemo/OCaml-GI-ctypes-bindings-generator | Entry_buffer_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Entry_buffer_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Entry_buffer_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "Entry_buffer_private"
| |
93e03aa0ba31ebfdd20dc369ad9549a728b9257340049e004448003efd95a1a4 | Dean177/reason-standard | ArrayOcamlSyntaxSpecificTest.ml | open Standard
open AlcoJest
let suite =
suite "Array - OCaml Syntax" (fun () ->
let animals = [|"Bear"; "Wolf"|] in
describe ".()" (fun () ->
test "regular array syntax is the equivalent to Array.get" (fun () ->
expect animals.(0) |> toEqual Eq.string "Bear")) ;
describe ".?... | null | https://raw.githubusercontent.com/Dean177/reason-standard/74ed165c988eb4a4ea54339e829ff1d59b186d15/native/test/ArrayOcamlSyntaxSpecificTest.ml | ocaml | open Standard
open AlcoJest
let suite =
suite "Array - OCaml Syntax" (fun () ->
let animals = [|"Bear"; "Wolf"|] in
describe ".()" (fun () ->
test "regular array syntax is the equivalent to Array.get" (fun () ->
expect animals.(0) |> toEqual Eq.string "Bear")) ;
describe ".?... | |
9a8c5a73665927b53f74d19bdf31a964fad7dee8ccd5210dc58c696629d5b40c | haskell-CI/hackage-matrix-builder | Job.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
-- |
Copyright : © 2018
SPDX - License - Identifier : GPL-3.0 - or - later
--
module Job
( JobStep(..), runSte... | null | https://raw.githubusercontent.com/haskell-CI/hackage-matrix-builder/bb813e9e4cf0d08352f33004c00ede987f45da56/src-lib/Job.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
|
* internal utilities
import qualified Data.Text.IO as T
TODO: use exception safe variant
TODO: are filedescriptors properly closed on process termination?
FIXME/TODO: temporary hack until there's `cabal new-fetch` | # LANGUAGE DeriveGeneric #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
Copyright : © 2018
SPDX - License - Identifier : GPL-3.0 - or - later
module Job
( JobStep(..), runStep
, Task, newTask, runTask, cancelTask
, runProc'
) where
import ... |
f396e8fe3b0de83af5369e2b155726834b55e4f6bf14016693ae908f03f6241f | archimag/rulisp | rulisp.lisp | ;;;; rulisp.lisp
;;;;
This file is part of the rulisp application , released under GNU Affero General Public License , Version 3.0
;;;; See file COPYING for details.
;;;;
Author : < >
(in-package #:rulisp)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; c... | null | https://raw.githubusercontent.com/archimag/rulisp/2af0d92066572c4665d14dc3ee001c0c5ff84e84/src/rulisp.lisp | lisp | rulisp.lisp
See file COPYING for details.
compute login
rulisp templates
routes
modules
;;;; auth
forum
format
jscl
wiki
articles
static files
(closure-template:ttable-sync-package ttable '#:rulisp.directory-publisher.view)
not found page | This file is part of the rulisp application , released under GNU Affero General Public License , Version 3.0
Author : < >
(in-package #:rulisp)
(defun compute-user-login-name ()
(labels ((find-upper-module (module)
(let ((parent (restas::module-parent module)))
(if parent
... |
195b3b9791d730376020aa9d79cf11e054393933920f137a606c94ba31c524b7 | tolysz/ghcjs-stack | Message.hs | {-# LANGUAGE BangPatterns #-}
module Distribution.Client.Dependency.Modular.Message (
Message(..),
showMessages
) where
import qualified Data.List as L
import Prelude hiding (pi)
from Cabal
import Distribution.Client.Dependency.Modular.Dependency
import Distribution.Client.Dependency.Modular.Flag
import... | null | https://raw.githubusercontent.com/tolysz/ghcjs-stack/83d5be83e87286d984e89635d5926702c55b9f29/special/cabal-next/cabal-install/Distribution/Client/Dependency/Modular/Message.hs | haskell | # LANGUAGE BangPatterns #
^ increase indentation level
^ decrease indentation level
| Transforms the structured message type to actual messages (strings).
Takes an additional relevance predicate. The predicate gets a stack of goal
variables and can decide whether messages regarding these goals are relevant.
You ... |
module Distribution.Client.Dependency.Modular.Message (
Message(..),
showMessages
) where
import qualified Data.List as L
import Prelude hiding (pi)
from Cabal
import Distribution.Client.Dependency.Modular.Dependency
import Distribution.Client.Dependency.Modular.Flag
import Distribution.Client.Dependenc... |
fe5c22bc069b8d6d3bc8be10736508aa89e9ab611d79ad159a53b51e3c716d1a | cardmagic/lucash | ccp.scm | ;;; Char->char partial maps -*- Scheme -*-
Copyright ( C ) 1998 by .
;;; CCPs are an efficient data structure for doing simple string transforms,
;;; similar to the kinds of things you would do with the tr(1) program.
;;;
This code is tuned for a 7- or 8 - bit character type . Large , 16 - bit
;;; character ... | null | https://raw.githubusercontent.com/cardmagic/lucash/0452d410430d12140c14948f7f583624f819cdad/reference/scsh-0.6.6/scsh/lib/ccp.scm | scheme | Char->char partial maps -*- Scheme -*-
CCPs are an efficient data structure for doing simple string transforms,
similar to the kinds of things you would do with the tr(1) program.
character types would need a more sophisticated data structure, tuned
for sparseness. I would suggest something like this:
d... | Copyright ( C ) 1998 by .
This code is tuned for a 7- or 8 - bit character type . Large , 16 - bit
( define - record ccp
sequence of L chars beginning with ( in the sequence of the underlying
char type representation ) , where L is the length of STRING . These MAP elements
are sorted by , so that b... |
4ad9adb6874a8117e0ba4ca06c7290a99fe8021a1c48f5be08e49a97d9978371 | bos/llvm | Optimize.hs |
does not export its functions
@createStandardFunctionPasses@ and
@createStandardModulePasses@ via its C interface
and interfacing to C - C++ wrappers is not very portable .
Thus we reimplement these functions
from @opt.cpp@ and @StandardPasses.h@ in Haskell .
However this way we risk inconsistencies
be... | null | https://raw.githubusercontent.com/bos/llvm/819b94d048c9d7787ce41cd7c71b84424e894f64/LLVM/Util/Optimize.hs | haskell | |
Result tells whether the module was modified by any of the passes.
Core.Util.createPassManager would provide a finalizer for us,
but I think it is better here to immediately dispose the manager
when we need it no longer.
Pass the module target data to the pass manager .
Pass the module target d... |
does not export its functions
@createStandardFunctionPasses@ and
@createStandardModulePasses@ via its C interface
and interfacing to C - C++ wrappers is not very portable .
Thus we reimplement these functions
from @opt.cpp@ and @StandardPasses.h@ in Haskell .
However this way we risk inconsistencies
be... |
7b444e9d9c68330d49c293a57ee6114683705cdf26e5bcb0bf6f76da9118d9ef | elnewfie/lslforge | SerializationInstances.hs | {-# OPTIONS_GHC -XTemplateHaskell -XScopedTypeVariables #-}
module Language.Lsl.Internal.SerializationInstances where
import Language.Lsl.Internal.SerializationGenerator
$(deriveJavaRepTups [2..10])
$(deriveJavaRep ''Either)
$(deriveJavaRep ''Maybe)
| null | https://raw.githubusercontent.com/elnewfie/lslforge/27eb84231c53fffba6bdb0db67bde81c1c12dbb9/lslforge/haskell/src/Language/Lsl/Internal/SerializationInstances.hs | haskell | # OPTIONS_GHC -XTemplateHaskell -XScopedTypeVariables # | module Language.Lsl.Internal.SerializationInstances where
import Language.Lsl.Internal.SerializationGenerator
$(deriveJavaRepTups [2..10])
$(deriveJavaRep ''Either)
$(deriveJavaRep ''Maybe)
|
6fd30149d42ce4bf2f50d5fba291142552d8e20d1f089eb840c47d6c193b622f | esl/escalus | escalus_rpc.erl | %% @doc This module should not exist as it has nothing to do with XMPP
nor is it needed by Escalus itself .
%%
The module contains RPC helpers which used to rely on Common Test ,
%% but do not do so anymore.
-module(escalus_rpc).
%% Public
-export([call/6]).
%%
%% Public
%%
%% @doc Emulate `ct_rpc:call/6' but do... | null | https://raw.githubusercontent.com/esl/escalus/ac5e813ac96c0cdb5d5ac738d63d992f5f948585/src/escalus_rpc.erl | erlang | @doc This module should not exist as it has nothing to do with XMPP
but do not do so anymore.
Public
Public
@doc Emulate `ct_rpc:call/6' but do not rely on Common Test.
`call/6' takes a `Cookie' as the last parameter,
so that nodes with different cookies can be easily called.
However, this function is not sa... | nor is it needed by Escalus itself .
The module contains RPC helpers which used to rely on Common Test ,
-module(escalus_rpc).
-export([call/6]).
with ` erlang : get_cookie/0 ' and ` erlang : ' .
call(Node, Module, Function, Args, TimeOut, Cookie) ->
call_with_cookie_match(Node, Module, Function, Args, Ti... |
f66d6c80ccdaefd9f9c9a281f1c9e32abc1cb3c66f9d71567edb47493c8ab68e | finnishtransportagency/harja | yksikkohintaiset_tyot.cljs | (ns harja.views.urakka.toteumat.yksikkohintaiset-tyot
"Urakan 'Toteumat' välilehden Yksikköhintaist työt osio"
(:require [reagent.core :refer [atom]]
[harja.ui.grid :as grid]
[harja.ui.grid.gridin-muokkaus :as gridin-muokkaus]
[harja.ui.ikonit :as ikonit]
[harja.ui.yl... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/d2c3efc456f459e72943c97c369d5391b57f5536/src/cljs/harja/views/urakka/toteumat/yksikkohintaiset_tyot.cljs | clojure | (ns harja.views.urakka.toteumat.yksikkohintaiset-tyot
"Urakan 'Toteumat' välilehden Yksikköhintaist työt osio"
(:require [reagent.core :refer [atom]]
[harja.ui.grid :as grid]
[harja.ui.grid.gridin-muokkaus :as gridin-muokkaus]
[harja.ui.ikonit :as ikonit]
[harja.ui.yl... | |
7c1e7945215d3dbac3d3169f36a81b6715823bf3c0d5faaff7bfb236ca8b6a00 | fpco/schoolofhaskell.com | Exception.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
{-# LANGUAGE RankNTypes #-}
module Azure.BlobStorage.Exception where
import Azure.BlobStorage.Request
import Azure.BlobStorage.Types
import Azure.BlobStorage.Util
import Control.Exception
import Control.Mona... | null | https://raw.githubusercontent.com/fpco/schoolofhaskell.com/15ec1a03cb9d593ee9c0d167dc522afe45ba4f8e/src/Azure/BlobStorage/Exception.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
| Throw an exception if the status doesn't indicate the blob was
successfully created. | # LANGUAGE ViewPatterns #
module Azure.BlobStorage.Exception where
import Azure.BlobStorage.Request
import Azure.BlobStorage.Types
import Azure.BlobStorage.Util
import Control.Exception
import Control.Monad.Reader hiding (forM)
import Control.Monad.Trans.Res... |
8ee7a5a44699b758954b6cc81cc310fea347b4f28f374736b5139080965a6348 | johnstonskj/simple-oauth2 | main.rkt | #lang racket/base
;;
;; simple-oauth2 - oauth2.
;; Simple OAuth2 client and server implementation
;;
Copyright ( c ) 2019 ( ) .
;; Racket Style Guide: -lang.org/style/index.html
(require oauth2/private/logging)
(provide OAUTH-SPEC-VERSION
OAUTH-RFC
OAUTH-DISPLAY-NAME
(exce... | null | https://raw.githubusercontent.com/johnstonskj/simple-oauth2/b8cb40511f64dcb274e17957e6fc9ab4c8a6cbea/main.rkt | racket |
simple-oauth2 - oauth2.
Simple OAuth2 client and server implementation
Racket Style Guide: -lang.org/style/index.html
---------- Requirements
---------- Implementation
Useful to put this into the log nice and early.
Using #:prefab to allow these to be serialized using read/write.
---------- Internal Procedu... | #lang racket/base
Copyright ( c ) 2019 ( ) .
(require oauth2/private/logging)
(provide OAUTH-SPEC-VERSION
OAUTH-RFC
OAUTH-DISPLAY-NAME
(except-out (struct-out client) make-client)
(rename-out [create-client make-client])
(struct-out token)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.