_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 |
|---|---|---|---|---|---|---|---|---|
5634073fb0b875840221b2909adffdb749f60bc55df00eb8deef5c7a0c9e0b26 | b0-system/brzo | answer.ml |
let value = 42
| null | https://raw.githubusercontent.com/b0-system/brzo/79d316a5024025a0112a8569a6335241b4620da8/examples/ocaml-deps/answer.ml | ocaml |
let value = 42
| |
47500c131531b2480cde3f9d7d293def6f67c7027eb0e4105cb3c22d52c93596 | circuithub/rel8 | Name.hs | # language DataKinds #
{-# language FlexibleContexts #-}
# language FlexibleInstances #
# language MultiParamTypeClasses #
# language NamedFieldPuns #
{-# language ScopedTypeVariables #-}
# language TypeApplications #
{-# language TypeFamilies #-}
{-# language UndecidableInstances #-}
# language ViewPatterns #
module ... | null | https://raw.githubusercontent.com/circuithub/rel8/5d2b9e4cdaa3ebcdaf49a66f39db0913df020e44/src/Rel8/Table/Name.hs | haskell | # language FlexibleContexts #
# language ScopedTypeVariables #
# language TypeFamilies #
# language UndecidableInstances #
base
rel8
| Construct a table in the 'Name' context containing the names of all
columns. Nested column names will be combined with @/@.
See also: 'namesFromLabelsWith'.
| Construct a table i... | # language DataKinds #
# language FlexibleInstances #
# language MultiParamTypeClasses #
# language NamedFieldPuns #
# language TypeApplications #
# language ViewPatterns #
module Rel8.Table.Name
( namesFromLabels
, namesFromLabelsWith
, showLabels
, showNames
)
where
import Data.Foldable ( fold )
import Da... |
5e114253b1a36ac2f19ab96fb99e8f88498c4081342b9794f35b4462c760969e | esl/escalus | escalus_users.erl | %%==============================================================================
Copyright 2010 Erlang Solutions Ltd.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
... | null | https://raw.githubusercontent.com/esl/escalus/63652d3e914e40104623539f438f91174992fecc/src/escalus_users.erl | erlang | ==============================================================================
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ex... | Copyright 2010 Erlang Solutions Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(escalus_users).
-behaviour(escalus_user_db).
-export([start/1,
stop/1,
create_users/2,
delete_users/... |
d016d48b878024a1ff8076c344dbfe198f679aded4bd7b16d4f40254c5a070fd | graninas/Functional-Design-and-Architecture | Main.hs | module Main where
import qualified Listing1
import qualified Listing2
main :: IO ()
main = pure ()
| null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/1736abc16d3e4917fc466010dcc182746af2fd0e/Second-Edition-Manning-Publications/BookSamples/CH03/Section3p1/Main.hs | haskell | module Main where
import qualified Listing1
import qualified Listing2
main :: IO ()
main = pure ()
| |
e666440caa4b48a32985c9d53e6ea2b87d5cef8a6a5b645f62add08a0ee22f6a | input-output-hk/hydra | Util.hs | # LANGUAGE TypeApplications #
# OPTIONS_GHC -Wno - deprecations #
module Test.Util where
import Hydra.Prelude
import Test.Hydra.Prelude hiding (shouldBe)
import Control.Monad.Class.MonadSay (say)
import Control.Monad.IOSim (
Failure (FailureException),
IOSim,
SimTrace,
runSimTrace,
selectTraceEventsDynamic... | null | https://raw.githubusercontent.com/input-output-hk/hydra/c46541576ae6937f8f710a2353aa43293d03845f/hydra-node/test/Test/Util.hs | haskell | This tracer uses the 'Output' event which uses converts value traced to 'Dynamic'
applied to the correct type.
any existing tracer:
@@
someCode tracer = do
foo <- makeFoo
...
@@
does not produce equals values within a reasonable number of generated values. | # LANGUAGE TypeApplications #
# OPTIONS_GHC -Wno - deprecations #
module Test.Util where
import Hydra.Prelude
import Test.Hydra.Prelude hiding (shouldBe)
import Control.Monad.Class.MonadSay (say)
import Control.Monad.IOSim (
Failure (FailureException),
IOSim,
SimTrace,
runSimTrace,
selectTraceEventsDynamic... |
476b9566cb7b4e31a7263efe0d97612c243d2f9224356afcaa73ded8f1c8995c | cyverse-archive/DiscoveryEnvironmentBackend | validators.clj | (ns clojure-commons.validators
(:use [slingshot.slingshot :only [try+ throw+]])
(:require [clojure-commons.exception :as cx])
(:import [clojure.lang IPersistentMap]))
(defn ^Boolean nonnegative-int?
"Indicates whether or not the unparsed field value contains a nonnegative integer.
Parameters:
str-val... | null | https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/libs/iplant-clojure-commons/src/clojure_commons/validators.clj | clojure | (ns clojure-commons.validators
(:use [slingshot.slingshot :only [try+ throw+]])
(:require [clojure-commons.exception :as cx])
(:import [clojure.lang IPersistentMap]))
(defn ^Boolean nonnegative-int?
"Indicates whether or not the unparsed field value contains a nonnegative integer.
Parameters:
str-val... | |
0c2b480d3697c1d310c91b02b879402d9bc8d0715e92d0ee6ffbdd53a0c16055 | palletops/log-config | wrap.clj | (ns com.palletops.log-config.timbre.wrap
"Add logging and profiling to your functions dynamically."
(:require
[taoensso.timbre :refer [log logf]]))
(defn wrap
"Wrap a function with a set of function wrappers."
[f f-info [wrapper & wrappers]]
(if (seq wrappers)
(wrap (wrapper f f-info) f-info wrappers)... | null | https://raw.githubusercontent.com/palletops/log-config/ff924ac9ea900999324ce44645b2969781cf4b12/src/com/palletops/log_config/timbre/wrap.clj | clojure | (ns com.palletops.log-config.timbre.wrap
"Add logging and profiling to your functions dynamically."
(:require
[taoensso.timbre :refer [log logf]]))
(defn wrap
"Wrap a function with a set of function wrappers."
[f f-info [wrapper & wrappers]]
(if (seq wrappers)
(wrap (wrapper f f-info) f-info wrappers)... | |
6eb362dfca557006caeec4491221f80f530b09dd929eec29970c082742500c27 | janestreet/memtrace_viewer_with_deps | fqueue_tests.ml | open Core_kernel
let%test_unit "Fqueue round trip via list" =
Quickcheck.test
(List.quickcheck_generator Int.quickcheck_generator)
~sexp_of:[%sexp_of: int list]
~f:(fun a ->
let b = Fqueue.of_list a in
let c = Fqueue.to_list b in
let d = Fqueue.of_list c in
[%test_result: int list... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/core_kernel/test/src/fqueue_tests.ml | ocaml | open Core_kernel
let%test_unit "Fqueue round trip via list" =
Quickcheck.test
(List.quickcheck_generator Int.quickcheck_generator)
~sexp_of:[%sexp_of: int list]
~f:(fun a ->
let b = Fqueue.of_list a in
let c = Fqueue.to_list b in
let d = Fqueue.of_list c in
[%test_result: int list... | |
a672f83f116b8f50d64e6121a3da00e052b10042fca076dda0591b420fd8847d | jgpc42/insn | annotation.clj | (ns ^:no-doc insn.annotation
"Annotation visitor fns."
(:require [insn.util :as util])
(:import [org.objectweb.asm AnnotationVisitor ClassVisitor FieldVisitor MethodVisitor]
[java.lang.annotation Retention RetentionPolicy]))
(declare visit*)
(defn- visit1
"Mostly taken from `clojure.core/add-annota... | null | https://raw.githubusercontent.com/jgpc42/insn/3c12bb3c70e54e5091b79764c9776f72726266be/src/insn/annotation.clj | clojure | (ns ^:no-doc insn.annotation
"Annotation visitor fns."
(:require [insn.util :as util])
(:import [org.objectweb.asm AnnotationVisitor ClassVisitor FieldVisitor MethodVisitor]
[java.lang.annotation Retention RetentionPolicy]))
(declare visit*)
(defn- visit1
"Mostly taken from `clojure.core/add-annota... | |
65eba835dfbbfd60c86442432314d09febd8739e658ff6ee4aad89accf6b435c | openweb-nl/open-bank-mark | process.clj | (ns nl.openweb.test.process
(:require [clj-docker-client.core :as docker]))
(defonce docker-conn (atom nil))
(defn init
[]
(reset! docker-conn (docker/connect))
(docker/stats @docker-conn "db")
(docker/stats @docker-conn "command-handler")
(docker/stats @docker-conn "kafka-1")
(docker/stats @docker-conn... | null | https://raw.githubusercontent.com/openweb-nl/open-bank-mark/786c940dafb39c36fdbcae736fe893af9c00ef17/test/src/nl/openweb/test/process.clj | clojure | (ns nl.openweb.test.process
(:require [clj-docker-client.core :as docker]))
(defonce docker-conn (atom nil))
(defn init
[]
(reset! docker-conn (docker/connect))
(docker/stats @docker-conn "db")
(docker/stats @docker-conn "command-handler")
(docker/stats @docker-conn "kafka-1")
(docker/stats @docker-conn... | |
d5f08e19fe14e23e36a1415b61742df983609294479bf0d77add891899c1f025 | clj-pour/pour | core_test.clj | (ns pour.core-test
(:require [clojure.test :refer :all]
[pour.core :as pour]
[datomic.api :as d]))
(defrecord Test [a b])
(deftest seqy
(is (not (pour/seqy? {:db/id 123})))
(is (not (pour/seqy? {})))
(is (not (pour/seqy? nil)))
(is (not (pour/seqy? "hi")))
(is (not (pour/seqy? (->T... | null | https://raw.githubusercontent.com/clj-pour/pour/2ba06996e9d2fc4d34a28933d1c8d24c306a60db/test/pour/core_test.clj | clojure | (ns pour.core-test
(:require [clojure.test :refer :all]
[pour.core :as pour]
[datomic.api :as d]))
(defrecord Test [a b])
(deftest seqy
(is (not (pour/seqy? {:db/id 123})))
(is (not (pour/seqy? {})))
(is (not (pour/seqy? nil)))
(is (not (pour/seqy? "hi")))
(is (not (pour/seqy? (->T... | |
cf1827be24a910945b4cf87ffee22622e8e060e9661fbb3f696f6e9ebcae1e2b | johnridesabike/acutis | error_test.ml | open Acutis
module RenderSync = Render.Make (Sync) (Acutis_json.Data)
let render ?(json = "{}") src () =
let temp = Compile.(from_string ~fname:"<test>" Components.empty src) in
let json = Yojson.Basic.from_string json in
ignore @@ RenderSync.make temp json
exception E = Error.Acutis_error
let illegal_chars ()... | null | https://raw.githubusercontent.com/johnridesabike/acutis/f9144c8890c43627376e28991023a9dbe1b8d3f9/test/error_test.ml | ocaml | open Acutis
module RenderSync = Render.Make (Sync) (Acutis_json.Data)
let render ?(json = "{}") src () =
let temp = Compile.(from_string ~fname:"<test>" Components.empty src) in
let json = Yojson.Basic.from_string json in
ignore @@ RenderSync.make temp json
exception E = Error.Acutis_error
let illegal_chars ()... | |
e83c1daeddf0cfcc4be35d3191c152c0d6f716360f663a92f0c7906d99636ffe | Concordium/concordium-client | SchemaParsingSpec.hs | -- This module contains unit tests testing that the client can correctly parse
-- specific JSON files according to the given schema.
# OPTIONS_GHC -Wno - deprecations #
module SimpleClientTests.SchemaParsingSpec where
import qualified Data.ByteString as BS
import qualified Data.Aeson as AE
import Concordium.Client.Ty... | null | https://raw.githubusercontent.com/Concordium/concordium-client/c1d23d2779579df9af82b7fffdf2c88e296a7fc6/test/SimpleClientTests/SchemaParsingSpec.hs | haskell | This module contains unit tests testing that the client can correctly parse
specific JSON files according to the given schema.
Test that parsing a parameter that contains a
- ULEB128 value in the amount field.
- an Option<32-byte bytearray> value
works correctly.
| Test that parses a simple (String) parameter us... | # OPTIONS_GHC -Wno - deprecations #
module SimpleClientTests.SchemaParsingSpec where
import qualified Data.ByteString as BS
import qualified Data.Aeson as AE
import Concordium.Client.Types.Contract.Parameter
import Concordium.Client.Types.Contract.Schema
import Test.Hspec
import Test.HUnit
import Control.Monad.List ... |
609f951b8d28f6b5b7fa00da6767a4b2de6464d5e027b9ceb6ab9e08ed700f92 | lokke-org/lokke | test.scm | Copyright ( C ) 2019 - 2021 < >
SPDX - License - Identifier : LGPL-2.1 - or - later OR EPL-1.0 +
(define-module (lokke ns clojure test)
#:use-module ((lokke scm test-anything) #:select (tap-test-runner))
#:use-module ((srfi srfi-64)
#:select (test-assert
test-begin
... | null | https://raw.githubusercontent.com/lokke-org/lokke/12b1ba89352338a69b1f7aeee15026c2e6ddd30e/mod/lokke/ns/clojure/test.scm | scheme | FIXME: support *load-tests*?
FIXME: deftest should of course not be executing the code immediately
For now just supports (is x) and (is (= x y)), since that's easy to
and/or moving away from the srfi, and mere syntax pattern matching.
FIXME: change literals to explicit pattern guards? | Copyright ( C ) 2019 - 2021 < >
SPDX - License - Identifier : LGPL-2.1 - or - later OR EPL-1.0 +
(define-module (lokke ns clojure test)
#:use-module ((lokke scm test-anything) #:select (tap-test-runner))
#:use-module ((srfi srfi-64)
#:select (test-assert
test-begin
... |
dfde3460297a67f1fdc32e5b958e3ed665bb6916ff04ecd984266dfffa98f6ac | CloudI/CloudI | ranch1_listener_sup.erl | Copyright ( c ) 2011 - 2016 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_ranch1/src/ranch1_listener_sup.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 ) 2011 - 2016 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(ranch1_listener_sup).
-behaviour(supervisor).... |
fa9fdbde03f83d4b01b4455c7ba509e342f219aa428b9acbfbfb5a8f078a6d0b | kronkltd/jiksnu | user_test.clj | (ns jiksnu.modules.core.model.user-test
(:require [clj-factory.core :refer [factory fseq]]
[jiksnu.modules.core.actions.domain-actions :as actions.domain]
[jiksnu.modules.core.actions.user-actions :as actions.user]
[jiksnu.mock :as mock]
[jiksnu.modules.core.model.domai... | null | https://raw.githubusercontent.com/kronkltd/jiksnu/8c91e9b1fddcc0224b028e573f7c3ca2f227e516/test/jiksnu/modules/core/model/user_test.clj | clojure | (ns jiksnu.modules.core.model.user-test
(:require [clj-factory.core :refer [factory fseq]]
[jiksnu.modules.core.actions.domain-actions :as actions.domain]
[jiksnu.modules.core.actions.user-actions :as actions.user]
[jiksnu.mock :as mock]
[jiksnu.modules.core.model.domai... | |
a502dc0fde84fadb671cee57c60b86ad047806b55073169ab06f2006c714c471 | the-little-typer/pie | pie-info.rkt | #lang racket/base
(require (for-syntax racket/base syntax/parse))
(provide (all-defined-out))
(define-syntax (define-pie-keyword stx)
(syntax-parse stx
[(_ kw:id)
#'(define-syntax (kw inner-stx)
(syntax-parse inner-stx
#:literals (kw)
[kw #'(void)]
[(kw e (... ...)... | null | https://raw.githubusercontent.com/the-little-typer/pie/a698d4cacd6823b5161221596d34bd17ce5282b8/pie-info.rkt | racket | #lang racket/base
(require (for-syntax racket/base syntax/parse))
(provide (all-defined-out))
(define-syntax (define-pie-keyword stx)
(syntax-parse stx
[(_ kw:id)
#'(define-syntax (kw inner-stx)
(syntax-parse inner-stx
#:literals (kw)
[kw #'(void)]
[(kw e (... ...)... | |
51950c0f161ef62861a2363ad872f8c7216e5ec8c7fea38732548aec43b5dcbc | grasswire/chat-app | Queries.hs | # LANGUAGE TypeFamilies , OverloadedStrings , TypeSynonymInstances , FlexibleContexts #
module Queries where
import Import hiding ((==.), (>=.))
import qualified Database.Esqueleto as E
import Database.Esqueleto ((==.), (^.), (&&.), val, (?.))
import Database.Persist.Sql (rawSql)
import Database.P... | null | https://raw.githubusercontent.com/grasswire/chat-app/a8ae4e782cacd902d7ec9c68c40a939cc5cabb0a/backend/Queries.hs | haskell | list of all channels along with their current members for the given user
list of users who are or were members of any channel I'm a member of
list of current members for a given channel
list of users who are or were members for a given channel
"as r, t.* from message t) message join shouldbechannel c on (c.id = ... | # LANGUAGE TypeFamilies , OverloadedStrings , TypeSynonymInstances , FlexibleContexts #
module Queries where
import Import hiding ((==.), (>=.))
import qualified Database.Esqueleto as E
import Database.Esqueleto ((==.), (^.), (&&.), val, (?.))
import Database.Persist.Sql (rawSql)
import Database.P... |
1158f177585eb40c3b78beef9e8230375e97474f600a450d4557520b319c5153 | Bogdanp/racket-dbg | server.rkt | #lang racket/base
(require racket/contract
"private/server.rkt")
(provide
(contract-out
[serve (->* ()
(#:host string?
#:port (integer-in 0 65535))
(-> void?))]))
| null | https://raw.githubusercontent.com/Bogdanp/racket-dbg/b17598a24d8c27a0b815d3fcae4da177a39378b1/dbg/server.rkt | racket | #lang racket/base
(require racket/contract
"private/server.rkt")
(provide
(contract-out
[serve (->* ()
(#:host string?
#:port (integer-in 0 65535))
(-> void?))]))
| |
4c20fe8d2c31aa7f1818619d9a253912165e8af685831a04975ac7888700d039 | Metaxal/quickscript-extra | info.rkt | #lang info
(define collection "quickscript-extra")
(define deps '("base"
"quickscript"
"at-exp-lib"
"drracket"
"gui-lib"
"pict-lib"
"racket-index"
"scribble-lib"
"search-list-box"
"srfi... | null | https://raw.githubusercontent.com/Metaxal/quickscript-extra/5cf24dd1b621a7cf0f23ee441f52334eafc45665/info.rkt | racket | "scribble-lib" "racket-doc" "rackunit-lib")) | #lang info
(define collection "quickscript-extra")
(define deps '("base"
"quickscript"
"at-exp-lib"
"drracket"
"gui-lib"
"pict-lib"
"racket-index"
"scribble-lib"
"search-list-box"
"srfi... |
d991ccd22b94483aa7c3a8ed5fb1db363bae8f45b4e00bf65d67f04e47972d07 | idris-lang/Idris-dev | ProofState.hs | |
Module : . Core . ProofState
Description : Proof state implementation .
License : : The Idris Community .
Implements a proof state , some primitive tactics for manipulating
proofs , and some high level commands for introducing new theorems ,
evaluation / checking inside the proof system... | null | https://raw.githubusercontent.com/idris-lang/Idris-dev/d30e505cfabfce97bdfdd940464f74fe14100c22/src/Idris/Core/ProofState.hs | haskell | ^ holes still to be solved
^ used names, don't use again
^ name supply, for locally unique names
^ a mirror of the global name supply,
for generating things like type tags
in reflection
^ current proof term
^ original goal
^ explicitly given by programmer, leave it
^ dot pattern holes + environment
eithe... | |
Module : . Core . ProofState
Description : Proof state implementation .
License : : The Idris Community .
Implements a proof state , some primitive tactics for manipulating
proofs , and some high level commands for introducing new theorems ,
evaluation / checking inside the proof system... |
38195c494de2d9ab7c99d8512d62cc2c574d1b879f566b0db28338938b827e77 | startalkIM/ejabberd | mod_http_api.erl | %%%----------------------------------------------------------------------
%%% File : mod_http_api.erl
Author : >
%%% Purpose : Implements REST API for ejabberd using JSON data
Created : 15 Sep 2014 by
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
%%%
%%% This program is free software;... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/mod_http_api.erl | erlang | ----------------------------------------------------------------------
File : mod_http_api.erl
Purpose : Implements REST API for ejabberd using JSON data
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that... | Author : >
Created : 15 Sep 2014 by
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
wit... |
79e01f56295871c33e643995900d1b8dc999a51609466157b812f36d1711df79 | larcenists/larceny | exceptions.sps | (import (tests r6rs exceptions)
(tests scheme test)
(scheme write))
(display "Running tests for (rnrs exceptions)\n")
(run-exceptions-tests)
(report-test-results)
| null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/R7RS/Lib/tests/r6rs/run/exceptions.sps | scheme | (import (tests r6rs exceptions)
(tests scheme test)
(scheme write))
(display "Running tests for (rnrs exceptions)\n")
(run-exceptions-tests)
(report-test-results)
| |
8d2111cf0569e9f0d4e4e950ca5f6d390d2c602f45076fbacac9fe826eda7699 | AshleyYakeley/Truth | FreeVars.hs | module Pinafore.Language.Grammar.FreeVars
( syntaxExpressionFreeVariables
, syntaxPatternBindingVariables
) where
import Pinafore.Language.Grammar.Syntax
import Pinafore.Language.Name
import Shapes
syntaxExpressionFreeVariables :: SyntaxExpression -> [FullName]
syntaxExpressionFreeVariables expr = toList ... | null | https://raw.githubusercontent.com/AshleyYakeley/Truth/53900d89022f68bffb08d5c07b4e783ab0a0542e/Pinafore/pinafore-language/lib/Pinafore/Language/Grammar/FreeVars.hs | haskell | module Pinafore.Language.Grammar.FreeVars
( syntaxExpressionFreeVariables
, syntaxPatternBindingVariables
) where
import Pinafore.Language.Grammar.Syntax
import Pinafore.Language.Name
import Shapes
syntaxExpressionFreeVariables :: SyntaxExpression -> [FullName]
syntaxExpressionFreeVariables expr = toList ... | |
8b9832df3754b4ad828ed12ed99e6eca394b174921bb3cde9889b58fa6e6780b | hipsleek/hipsleek | golf.ml |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source code must retain the abov... | null | https://raw.githubusercontent.com/hipsleek/hipsleek/596f7fa7f67444c8309da2ca86ba4c47d376618c/cil/src/ext/pta/golf.ml | ocaml | *********************************************************************
Exceptions
****************************************... |
*
* Copyright ( c ) 2001 - 2002 ,
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1 . Redistributions of source code must retain the abov... |
6530bdd0e08bbcd11264e9cd2b968da6f831df2ad49eccac2a0a82ae2d9cec08 | TyOverby/bonsai-wall | minimal.ml | open Tsdl
open Wall
let load_font name =
let ic = open_in_bin name in
let dim = in_channel_length ic in
let fd = Unix.descr_of_in_channel ic in
let buffer =
Unix.map_file fd Bigarray.int8_unsigned Bigarray.c_layout false [|dim|]
|> Bigarray.array1_of_genarray
in
let offset = List.hd (Stb_truetype.... | null | https://raw.githubusercontent.com/TyOverby/bonsai-wall/1c633c40eb836b7b1d639fcfca4f3ccf3b1902ad/example/minimal.ml | ocaml | text_arrow ~x:400.0 ~y:300.0 ~size:200.0 ();
text_arrow ~x:50.0 ~y:50.0 ();
text_arrow' ~x:50.0 ~y:60.0 ();
~cap:`ROUND | open Tsdl
open Wall
let load_font name =
let ic = open_in_bin name in
let dim = in_channel_length ic in
let fd = Unix.descr_of_in_channel ic in
let buffer =
Unix.map_file fd Bigarray.int8_unsigned Bigarray.c_layout false [|dim|]
|> Bigarray.array1_of_genarray
in
let offset = List.hd (Stb_truetype.... |
cc3773ed0c04ebaf4e2f9540fa59b18c0dc53fcf0ea8276e95f7694b7f9f00d0 | lwhjp/racket-asm | mode.rkt | #lang racket/base
(require racket/contract)
(provide (all-defined-out))
(define default-assembler-bits
(let ([word-size (system-type 'word)])
(if (memv word-size '(16 32 64))
word-size
64)))
(define/contract current-assembler-bits
(parameter/c (or/c 16 32 64))
(make-parameter default-assem... | null | https://raw.githubusercontent.com/lwhjp/racket-asm/57abd235fcb8c7505990f8e9731c01c716324ee5/x86/private/mode.rkt | racket | #lang racket/base
(require racket/contract)
(provide (all-defined-out))
(define default-assembler-bits
(let ([word-size (system-type 'word)])
(if (memv word-size '(16 32 64))
word-size
64)))
(define/contract current-assembler-bits
(parameter/c (or/c 16 32 64))
(make-parameter default-assem... | |
bdbd0c65f0a146819932d808b5686287cc5ddb844b4dde394482aa0abb4056ec | eskimor/servant-purescript | WebAPI.hs | # LANGUAGE AutoDeriveTypeable #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeOperators #-}
module Counter.WebAP... | null | https://raw.githubusercontent.com/eskimor/servant-purescript/6454d5bcb9aa2a5d6e3a3dc935423b67b6f3993c/examples/central-counter/src/Counter/WebAPI.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators # | # LANGUAGE AutoDeriveTypeable #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
module Counter.WebAPI where
import Control.Applicative
import Control.Lens
import Data.Aeson
import Data.Proxy
import qualified Data.Se... |
66bb47d3862940c438cb144c97feab2dc6e4c451ba9b683d3e0f3052e98051ec | agda/agda | Fail.hs | | A pure MonadFail .
module Agda.Utils.Fail where
Control . Monad . Fail import is redundant since GHC 8.8.1
import Control.Monad.Fail
newtype Fail a = Fail { runFail :: Either String a }
deriving (Functor, Applicative, Monad)
instance MonadFail Fail where
fail = Fail . Left
runFail_ :: Fail a -> a
runFail_... | null | https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/src/full/Agda/Utils/Fail.hs | haskell | | A pure MonadFail .
module Agda.Utils.Fail where
Control . Monad . Fail import is redundant since GHC 8.8.1
import Control.Monad.Fail
newtype Fail a = Fail { runFail :: Either String a }
deriving (Functor, Applicative, Monad)
instance MonadFail Fail where
fail = Fail . Left
runFail_ :: Fail a -> a
runFail_... | |
f88725ba029cf9536cff321e0a2575a448e555ce6146ffdaf336907a9d1482be | cbaggers/varjo | and-or.lisp | (in-package :vari.cl)
(in-readtable fn:fn-reader)
;;------------------------------------------------------------
;; And
(v-defspecial and (&rest forms)
:args-valid t
:return
(let* ((objs (mapcar (lambda (x) (compile-form x env)) forms))
(flow-id (flow-id!))
(type-set (make-type-set (type-spec-... | null | https://raw.githubusercontent.com/cbaggers/varjo/9e77f30220053155d2ef8870ceba157f75e538d4/src/vari.cl/special-operators/and-or.lisp | lisp | ------------------------------------------------------------
And
pretty sure this env is wrong, what if side effects in
forms?
------------------------------------------------------------
Or
pretty sure env is wrong in 'or and 'and, what if there are side effects in
forms?
In fact function calls in ... | (in-package :vari.cl)
(in-readtable fn:fn-reader)
(v-defspecial and (&rest forms)
:args-valid t
:return
(let* ((objs (mapcar (lambda (x) (compile-form x env)) forms))
(flow-id (flow-id!))
(type-set (make-type-set (type-spec->type :bool flow-id))))
(unless (loop for o in objs always (v-prim... |
be25fe27050f7698f5c2abfc5f3961d02621a8772596c130212b58876aaba348 | robert-strandh/CLIMatis | clx-framebuffer.lisp | (in-package #:clim3-clx-framebuffer)
(defparameter *hpos* nil)
(defparameter *vpos* nil)
(defparameter *hstart* nil)
(defparameter *vstart* nil)
(defparameter *hend* nil)
(defparameter *vend* nil)
(defparameter *pixel-array* nil)
(defclass clx-framebuffer-port (clim3:port)
((%display :accessor display)
(%screen ... | null | https://raw.githubusercontent.com/robert-strandh/CLIMatis/4949ddcc46d3f81596f956d12f64035e04589b29/Backends/CLX-Framebuffer/clx-framebuffer.lisp | lisp | A vector of interpretations. Each interpretation is a
short vector of keysyms
Do not change the clipping region, just the
origin of the coordinate system.
Later, we might try to do something more fancy here, such as
attempting to move the window on the screen.
Handle pointer position
Find the root zone of ... | (in-package #:clim3-clx-framebuffer)
(defparameter *hpos* nil)
(defparameter *vpos* nil)
(defparameter *hstart* nil)
(defparameter *vstart* nil)
(defparameter *hend* nil)
(defparameter *vend* nil)
(defparameter *pixel-array* nil)
(defclass clx-framebuffer-port (clim3:port)
((%display :accessor display)
(%screen ... |
b8e2fd632095c73659d9ea29d61c57d240f5629000f24569cc5918f3017b684f | igorhvr/bedlam | differ.scm | " differ.scm " ) Sequence Comparison Algorithm .
Copyright ( C ) 2001 , 2002 , 2003 , 2004 , 2007
;
;Permission to copy this software, to modify it, to redistribute it,
;to distribute modified versions, and to use it for any purpose is
;granted, subject to the following restrictions and understandings.
;
1 . A... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/iasylum/slib/3b2/differ.scm | scheme |
Permission to copy this software, to modify it, to redistribute it,
to distribute modified versions, and to use it for any purpose is
granted, subject to the following restrictions and understandings.
in full.
this software will be error-free, and I am under no obligation to
provide any services, by way of maintenan... | " differ.scm " ) Sequence Comparison Algorithm .
Copyright ( C ) 2001 , 2002 , 2003 , 2004 , 2007
1 . Any copy made of this software must include this copyright notice
2 . I have made no warranty or representation that the operation of
3 . In conjunction with products arising from the use of this
@ifinfo
... |
441dbe69774c5689d18f27043e8d5e44f31fe6df5be643306573334d4a4cee4a | theurere/berkeley_cs61a_spring-2011_archive | explorin.scm | Library files for Exploring Computer Science with Scheme
Revised April 2002 by
Version 2.02.0 2002/04/26 02:22:06
;
; Contents
; truncate (redefined to give exact number)
; round (redefined to give exact number)
first , second , third , fourth , fifth , rest
subseq
; position, remove, count (all use eq... | null | https://raw.githubusercontent.com/theurere/berkeley_cs61a_spring-2011_archive/1d90036a0a76c62933753ad71f8dcccbbbd37ae4/code/src/ucb/bscheme/explorin.scm | scheme |
Contents
truncate (redefined to give exact number)
round (redefined to give exact number)
position, remove, count (all use equal? for comparison)
atom?
find-if, find-if-not, count-if, count-if-not, remove-if, keep-if
rassoc (uses equal? for comparison)
every, any, some
accumulate, accumulate-tail, reduce, red... | Library files for Exploring Computer Science with Scheme
Revised April 2002 by
Version 2.02.0 2002/04/26 02:22:06
first , second , third , fourth , fifth , rest
subseq
random , init - random ( now using )
(define (explorinOrSimply)
"explorin")
( let ( ( newline newline ) ( display displa... |
e66acc1f5b38f12b5ee97319ef9c22ce06c028b238c8806147b1b63e4ec3fee6 | eeng/shevek | profile_test.clj | (ns shevek.acceptance.profile-test
(:require [clojure.test :refer [deftest use-fixtures is]]
[shevek.acceptance.test-helper :refer [wrap-acceptance-tests it login click click-text visit fill has-css? has-text? click-tid select clear-preferences]]
[etaoin.keys :as k]))
(use-fixtures :once wrap... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/test/clj/shevek/acceptance/profile_test.clj | clojure | (ns shevek.acceptance.profile-test
(:require [clojure.test :refer [deftest use-fixtures is]]
[shevek.acceptance.test-helper :refer [wrap-acceptance-tests it login click click-text visit fill has-css? has-text? click-tid select clear-preferences]]
[etaoin.keys :as k]))
(use-fixtures :once wrap... | |
7e85fd2c96962ddd323299c512852af5a7dbb4f96304cb0b255c8a6133c74a74 | janestreet/username_kernel | username.ml | open! Core
include
String_id.Make
(struct
let module_name = "Username_kernel.Username"
end)
()
| null | https://raw.githubusercontent.com/janestreet/username_kernel/3ee803e1b422d261d31bc45fa65ae9a28634557d/src/username.ml | ocaml | open! Core
include
String_id.Make
(struct
let module_name = "Username_kernel.Username"
end)
()
| |
b8c150cd264b54ca04264d11c5356133374b07d0f2ad78b768ba914d8a0bb936 | thoughtstem/minetest | items.rkt | #lang racket
(provide define-item)
(require 2htdp/image)
(require "core.rkt")
(require (for-syntax racket/syntax))
;(struct item-struct asset-struct (image) #:transparent)
;Was a struct... not anymore...
(define (item-struct id desc img m)
(asset-struct id desc (make-immutable-hash
(list... | null | https://raw.githubusercontent.com/thoughtstem/minetest/74ba2d02511e96bfc477ab6db4937d1732bd1e2b/items.rkt | racket | (struct item-struct asset-struct (image) #:transparent)
Was a struct... not anymore...
Makes a stub -- e.g. for default:stone | #lang racket
(provide define-item)
(require 2htdp/image)
(require "core.rkt")
(require (for-syntax racket/syntax))
(define (item-struct id desc img m)
(asset-struct id desc (make-immutable-hash
(list
(cons 'inventory_image
(compil... |
e6b05c416714a94a1c75d718e8f310ca5e0aff590b0463f0d25d68e58bbe11f8 | RefactoringTools/HaRe | tokens.hs |
import TestUtils
import SrcLoc
import Panic
import Lexer
main = do
(t,toks) <- parsedFileGhc "./test/testdata/MoveDef/Md1.hs"
let s = showRichTokenStream' toks
putStrLn s
putStrLn "----------------------------------------"
putStrLn (show $ filter (\(_,s) -> s == "") toks)
Based on version fro... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/tokens.hs | haskell | | Take a rich token stream such as produced from 'getRichTokenStream' and
return source code almost identical to the original code (except for
insignificant whitespace.)
mark the position of the hidden tokens |
import TestUtils
import SrcLoc
import Panic
import Lexer
main = do
(t,toks) <- parsedFileGhc "./test/testdata/MoveDef/Md1.hs"
let s = showRichTokenStream' toks
putStrLn s
putStrLn "----------------------------------------"
putStrLn (show $ filter (\(_,s) -> s == "") toks)
Based on version fro... |
90e80a5b0ae9ca4dae92f59c3705a9069e05fb798ef550816b8768287d686c37 | JacquesCarette/Drasil | Main.hs | module Main (main) where
import GHC.IO.Encoding
import Language.Drasil.Generate (gen, typeCheckSI, genCode, genDot, genLog, DocSpec(DocSpec), DocType(SRS), Format(..), docChoices)
import Drasil.NoPCM.Body (srs, printSetting, fullSI)
import Drasil.NoPCM.Choices (choices, code)
main :: IO ()
main = d... | null | https://raw.githubusercontent.com/JacquesCarette/Drasil/98c6e2e81bc1479010ce71b22960ab214a891159/code/drasil-example/nopcm/app/Main.hs | haskell | module Main (main) where
import GHC.IO.Encoding
import Language.Drasil.Generate (gen, typeCheckSI, genCode, genDot, genLog, DocSpec(DocSpec), DocType(SRS), Format(..), docChoices)
import Drasil.NoPCM.Body (srs, printSetting, fullSI)
import Drasil.NoPCM.Choices (choices, code)
main :: IO ()
main = d... | |
f194d661059c84f78f7173384b784d63fa4364208ebd94c494c8a92a744bb411 | ProjectMAC/propagators | load.scm | ;;; ----------------------------------------------------------------------
Copyright 2010 and
;;; ----------------------------------------------------------------------
This file is part of Propagator Network Prototype .
;;;
Propagator Network Prototype is free software ; you can
;;; redistribute it and/or ... | null | https://raw.githubusercontent.com/ProjectMAC/propagators/add671f009e62441e77735a88980b6b21fad7a79/explorations/circuits/load.scm | scheme | ----------------------------------------------------------------------
----------------------------------------------------------------------
you can
redistribute it and/or modify it under the terms of the GNU
any later version.
will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of M... | Copyright 2010 and
This file is part of Propagator Network Prototype .
General Public License as published by the Free Software
Foundation , either version 3 of the License , or ( at your option )
Propagator Network Prototype is distributed in the hope that it
You should have received a copy of the GNU... |
5d88a14f67c78cde1b508bd90418ca7e16a13c542ec67b45e7ca665d29632565 | EveryTian/Haskell-Codewars | tongues.hs |
module Codewars.Exercise.Tongues where
import Data.Char (toUpper)
import Data.Maybe (fromMaybe)
swapTable :: [(Char, Char)]
-- abcdefghijklmnopqrstuvwxyz
swapTable = let table = "eplragfsoxvcwtibzdhnykmjuq"
in zip (['a'..'z'] ++ ['A'..'Z']) (table ++ map toUpper table)
swapChar ... | null | https://raw.githubusercontent.com/EveryTian/Haskell-Codewars/dc48d95c676ce1a59f697d07672acb6d4722893b/5kyu/tongues.hs | haskell | abcdefghijklmnopqrstuvwxyz
swapChar c = case lookup c swapTable of
Nothing -> c
Just c' -> c' |
module Codewars.Exercise.Tongues where
import Data.Char (toUpper)
import Data.Maybe (fromMaybe)
swapTable :: [(Char, Char)]
swapTable = let table = "eplragfsoxvcwtibzdhnykmjuq"
in zip (['a'..'z'] ++ ['A'..'Z']) (table ++ map toUpper table)
swapChar :: Char -> Char
swapChar c = fromMaybe c $ lookup c ... |
dff95064d5511c3b901a85a001931a9520db166cee1f7599f9778e5e0d15c60b | mcorbin/tour-of-clojure | thread_macro.clj | (ns tourofclojure.pages.thread-macro
(:require [hiccup.element :refer [link-to]]
[clojure.java.io :as io]
[tourofclojure.pages.util :refer [navigation-block]]))
(def code
(slurp (io/resource "public/pages/code/thread_macro.clj")))
(defn desc
[previous next lang]
(condp = lang
"fr" ... | null | https://raw.githubusercontent.com/mcorbin/tour-of-clojure/57f97b68ca1a8c96904bfb960f515217eeda24a6/src/tourofclojure/pages/thread_macro.clj | clojure | (ns tourofclojure.pages.thread-macro
(:require [hiccup.element :refer [link-to]]
[clojure.java.io :as io]
[tourofclojure.pages.util :refer [navigation-block]]))
(def code
(slurp (io/resource "public/pages/code/thread_macro.clj")))
(defn desc
[previous next lang]
(condp = lang
"fr" ... | |
1db553cc23bd4afb2756184e57399cc65cf4112ca8f7db3cae48b7ccb0151d2a | zadean/xqerl | prod_ContextItemDecl_SUITE.erl | -module('prod_ContextItemDecl_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['contextDecl-014'/1]).
-export(['contextDecl-015'/1]).
-export(['contextDe... | null | https://raw.githubusercontent.com/zadean/xqerl/1a94833e996435495922346010ce918b4b0717f2/test/prod/prod_ContextItemDecl_SUITE.erl | erlang | -module('prod_ContextItemDecl_SUITE').
-include_lib("common_test/include/ct.hrl").
-export([
all/0,
groups/0,
suite/0
]).
-export([
init_per_suite/1,
init_per_group/2,
end_per_group/2,
end_per_suite/1
]).
-export(['contextDecl-014'/1]).
-export(['contextDecl-015'/1]).
-export(['contextDe... | |
bfcc77386d8fc1b44c1f42ff698904e6a13da1498e4d30f3deb7e96b7bdd29f6 | ulrikstrid/dream-routes | main.ml | *
* Copyright 2021 ulrik . All rights reserved .
* Use of this source code is governed by a BSD - style
* license that can be found in the LICENSE file .
* Copyright 2021 ulrik. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*)
... | null | https://raw.githubusercontent.com/ulrikstrid/dream-routes/cea14ecc9fb2f4af5db2408f76f3b6f9ce426e75/src/bin/main.ml | ocaml | *
* Copyright 2021 ulrik . All rights reserved .
* Use of this source code is governed by a BSD - style
* license that can be found in the LICENSE file .
* Copyright 2021 ulrik. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*)
... | |
7acf49898f8d1b887972db38ebc8ea28877828c46aa5fb12f32a29a4f3961e21 | Bogdanp/racket-gui-easy | bidi.rkt | #lang racket/base
(require racket/gui/easy
racket/gui/easy/operator)
(define @msg (@ "Hi"))
(render
(window
#:title @msg
#:size '(200 100)
(vpanel
(input @msg (λ (_event text)
(@msg . := . text)))
(text @msg))))
| null | https://raw.githubusercontent.com/Bogdanp/racket-gui-easy/53f0bf9912b826bdd4ce0d070a04f1620b688978/examples/bidi.rkt | racket | #lang racket/base
(require racket/gui/easy
racket/gui/easy/operator)
(define @msg (@ "Hi"))
(render
(window
#:title @msg
#:size '(200 100)
(vpanel
(input @msg (λ (_event text)
(@msg . := . text)))
(text @msg))))
| |
7c27d780c228a1a656f93394ee712e821a92cdec7537e8d017bc342e68f02e48 | bvaugon/ocapic | proto.ml | (*************************************************************************)
(* *)
(* OCaPIC *)
(* *)
... | null | https://raw.githubusercontent.com/bvaugon/ocapic/a14cd9ec3f5022aeb5fe2264d595d7e8f1ddf58a/src/simulator/lcd/proto.ml | ocaml | ***********************************************************************
OCaPIC
... |
This file is distributed under the terms of the CeCILL license .
open Printf
open Types
let verbose = false
let print = if verbose then prerr_endline else (fun _ -> ())
let refresh display =
if display.display_mode = On then
let addr = displ... |
3b056638dbe279269cb77ebbad7cae134b9172b7b7a3af434fd4416831748c40 | generateme/cljplot | core.clj | (ns cljplot.core
(:require [clojure2d.core :refer [next-filename]]
[cljplot.common :refer :all]
[clojure2d.extra.utils :as utils]
[cljplot.impl.histogram :refer :all]
[cljplot.build :as b]
[cljplot.render :as r]
[cljplot.impl.strips :refer :all]
... | null | https://raw.githubusercontent.com/generateme/cljplot/1eb865439653c95940be18421298c574b7ce8db6/src/cljplot/core.clj | clojure | (ns cljplot.core
(:require [clojure2d.core :refer [next-filename]]
[cljplot.common :refer :all]
[clojure2d.extra.utils :as utils]
[cljplot.impl.histogram :refer :all]
[cljplot.build :as b]
[cljplot.render :as r]
[cljplot.impl.strips :refer :all]
... | |
f4bd19cd0ecb930de99f814656224014bc7ddf1a95b5f5413f86c2a26f93fabd | vii/dysfunkycom | pixels.lisp | Demonstration / Test of using SDL ( Simple Media Layer ) library
using CFFI for foreign function interfacing ...
;;;; (C)2006 Justin Heyes-Jones
;;;; see COPYING for license
(in-package #:sdl-examples)
(defun pixels-1 ()
(sdl:with-init ()
(sdl:window 640 480)
(setf (sdl:frame-rate) 0)
(sdl:with-e... | null | https://raw.githubusercontent.com/vii/dysfunkycom/a493fa72662b79e7c4e70361ad0ea3c7235b6166/addons/lispbuilder-sdl/examples/pixels.lisp | lisp | (C)2006 Justin Heyes-Jones
see COPYING for license | Demonstration / Test of using SDL ( Simple Media Layer ) library
using CFFI for foreign function interfacing ...
(in-package #:sdl-examples)
(defun pixels-1 ()
(sdl:with-init ()
(sdl:window 640 480)
(setf (sdl:frame-rate) 0)
(sdl:with-events ()
(:quit-event () t)
(:idle ()
(sdl... |
af26741b7ad01c6f6fe728e8a53b1b1d05ad4b94aa3631199a98ac1809a66f8c | hypernumbers/LuvvieScript | 1d_records_and_fns.erl | -module('1c_records').
-record(bish, {
bash = [],
bosh = erk
}).
-export([
recordfn/1
]).
recordfn(#bish{bash = Bash}) ->
Bash.
| null | https://raw.githubusercontent.com/hypernumbers/LuvvieScript/d10da50e0719ff26690749570c75e1e614214381/test/not_passing/src/1d_records_and_fns.erl | erlang | -module('1c_records').
-record(bish, {
bash = [],
bosh = erk
}).
-export([
recordfn/1
]).
recordfn(#bish{bash = Bash}) ->
Bash.
| |
358d5ceff44816457213cfd9a4904647e86e6bc34768cccae9495c18b13bf6fc | imrekoszo/polylith-kaocha | bricks_to_test.clj | (ns polylith-kaocha.kaocha-test-runner.bricks-to-test
"Copied from polylith.clj.core.change.bricks-to-test so it doesn't filter out
bricks that don't have dedicated test sources"
(:require [clojure.set :as set]))
(defn bricks-to-test-for-project [{:keys [is-dev alias name base-names component-names]}
... | null | https://raw.githubusercontent.com/imrekoszo/polylith-kaocha/1d5d0dd1fea335969ea11d59dd6f5f4977b8cdfe/components/kaocha-test-runner/src/polylith_kaocha/kaocha_test_runner/bricks_to_test.clj | clojure |
If the :test key is given for a project in workspace.edn, then only include
the specified bricks, otherwise, run tests for all bricks that have tests.
if we pass in :all or :all-bricks or if the project has changed
then always run all brick tests.
And finally, if brick:BRICK is given, also filter on that, wh... | (ns polylith-kaocha.kaocha-test-runner.bricks-to-test
"Copied from polylith.clj.core.change.bricks-to-test so it doesn't filter out
bricks that don't have dedicated test sources"
(:require [clojure.set :as set]))
(defn bricks-to-test-for-project [{:keys [is-dev alias name base-names component-names]}
... |
5ad7c4081fa84a431d98d1cbbdb9f2a63afa0f96ee65e02a8334dfdf0763ca1c | bruz/hotframeworks | stackoverflow.clj | (ns hotframeworks.test.statistic-types.stackoverflow
(:require [hotframeworks.statistic-types.stackoverflow :as stackoverflow]
[environ.core :refer [env]]
[stacktraces.tags :as tags])
(:use midje.sweet))
(fact "statistic provided with valid stackoverflow tag"
(def framework {:stackoverflo... | null | https://raw.githubusercontent.com/bruz/hotframeworks/629aa8f3cd7556479ea5cd7720d8b06ee4926ae4/test/hotframeworks/test/statistic_types/stackoverflow.clj | clojure | (ns hotframeworks.test.statistic-types.stackoverflow
(:require [hotframeworks.statistic-types.stackoverflow :as stackoverflow]
[environ.core :refer [env]]
[stacktraces.tags :as tags])
(:use midje.sweet))
(fact "statistic provided with valid stackoverflow tag"
(def framework {:stackoverflo... | |
1756c0e049b517b9303955b4871d14b88269e8e6eb2dc4424222102d1694daac | willtim/Expresso | Utils.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE DeriveFoldable #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
--... | null | https://raw.githubusercontent.com/willtim/Expresso/add7480c867b98819a482adb6bcd2da730928f1a/src/Expresso/Utils.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveTraversable #
|
Module : Expresso.Utils
License : BSD3
Maintainer :
Stability : experimental
Portability : portable
Recursion scheme utilities.
| add annotation
| strip annotations
| retrieve annotation
| fix with annotation | # LANGUAGE DeriveFunctor #
# LANGUAGE DeriveFoldable #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
Copyright : ( c ) 2017 - 2019
module Expresso.Utils(
Fix(..),
... |
6a9ee5aa9d51c0d396717b79f73d7d53234d2a8c9bc18fc8d00f9c6dfe1609bd | kyleburton/sandbox | yaml.clj | (ns com.github.kyleburton.sandbox.yaml
(:import [org.ho.yaml Yaml]))
;; symbol's don't dump?
( Yaml / dump { : a 1 : b 2 : c [ 3 4 5 ] } )
(println
(Yaml/dump
(doto (java.util.HashMap.) (.put "a" 1)
(.put "b" 2)
(.put "c" [3 4 5]))))
;; quite nice, but can we round-trip?
;; ---
b : 2
;; c: ... | null | https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/clojure-utils/kburton-clojure-utils/src/main/clj/com/github/kyleburton/sandbox/yaml.clj | clojure | symbol's don't dump?
quite nice, but can we round-trip?
---
c: !clojure.lang.LazilyPersistentVector
- 3
- 4
- 5
NO :(
(Yaml/load
(Yaml/dump
(.put "c" [3 4 5]))))
and...
...we can read it back, good | (ns com.github.kyleburton.sandbox.yaml
(:import [org.ho.yaml Yaml]))
( Yaml / dump { : a 1 : b 2 : c [ 3 4 5 ] } )
(println
(Yaml/dump
(doto (java.util.HashMap.) (.put "a" 1)
(.put "b" 2)
(.put "c" [3 4 5]))))
b : 2
a : 1
( doto ( java.util . . ) ( .put " a " 1 )
( .put " ... |
5492fb0bb7c977780af1a7add8a7443463e56ec97b7e793c27b838fe951aa421 | ennocramer/monad-dijkstra | Main.hs | # LANGUAGE CPP #
module Main ( main ) where
import Control.Monad ( mplus, mzero )
import Control.Monad.Search
import Data.Semigroup as Sem
#if MIN_VERSION_tasty_hspec(1,1,7)
import Test.Hspec
#endif
import Test.Tasty
import Test.Tasty.Hspec
... | null | https://raw.githubusercontent.com/ennocramer/monad-dijkstra/c84d30848d6bc6cc80a4058e1de7e03e67c43675/test/Main.hs | haskell | # LANGUAGE CPP #
module Main ( main ) where
import Control.Monad ( mplus, mzero )
import Control.Monad.Search
import Data.Semigroup as Sem
#if MIN_VERSION_tasty_hspec(1,1,7)
import Test.Hspec
#endif
import Test.Tasty
import Test.Tasty.Hspec
... | |
5cec3cc499595a709d20cc9cd4c7fdb59e6cdfc28111f6501f00380ad6098b45 | sneeuwballen/zipperposition | arTerm.mli |
This file is free software , part of Zipperposition . See file " license " for more details .
(** {1 Arbitrary Typed Terms and Formulas} *)
open Logtk
type 'a arbitrary = 'a QCheck.arbitrary
type 'a gen = 'a QCheck.Gen.t
val shrink : Term.t QCheck.Shrink.t
val default_g : Term.t gen
val default_fuel : int -> T... | null | https://raw.githubusercontent.com/sneeuwballen/zipperposition/7f1455fbe2e7509907f927649c288141b1a3a247/src/arbitrary/arTerm.mli | ocaml | * {1 Arbitrary Typed Terms and Formulas}
* Default polymorphic term
* Default polymorphic term, with lambdas
* Default ground monomorphic term
* predicates (type "o")
* Random valid position in the term
* Default polymorphic term
* Default ground monomorphic term
* predicates (type "prop") |
This file is free software , part of Zipperposition . See file " license " for more details .
open Logtk
type 'a arbitrary = 'a QCheck.arbitrary
type 'a gen = 'a QCheck.Gen.t
val shrink : Term.t QCheck.Shrink.t
val default_g : Term.t gen
val default_fuel : int -> Term.t gen
val default : Term.t arbitrary
val... |
b0abde293d69b11f4d2de67dbe2324030d98d4d9911cf1fd0fb8b2e14d9b5d43 | vonli/Ext2-for-movitz | integers.lisp | ;;;;------------------------------------------------------------------
;;;;
Copyright ( C ) 2000 - 2005 ,
Department of Computer Science , University of Tromso , Norway
;;;;
;;;; Filename: integers.lisp
Description : Arithmetics .
Author : < >
;;;; Created at: Wed Nov 8 18:44:57 ... | null | https://raw.githubusercontent.com/vonli/Ext2-for-movitz/81b6f8e165de3e1ea9cc7d2035b9259af83a6d26/losp/muerte/integers.lisp | lisp | ------------------------------------------------------------------
Filename: integers.lisp
Created at: Wed Nov 8 18:44:57 2000
Distribution: See the accompanying file COPYING.
------------------------------------------------------------------
unspecified
both were fi... | Copyright ( C ) 2000 - 2005 ,
Department of Computer Science , University of Tromso , Norway
Description : Arithmetics .
Author : < >
$ I d : , v 1.124 2008/02/04 10:08:18 ffjeld Exp $
(require :muerte/basic-macros)
(require :muerte/typep)
(require :muerte/arithmetic-macros)
(provide :m... |
420ea172cc4c15bdf5d196805095eff77def862b7abcc874a57780ea09e564c5 | yuriy-chumak/ol | pick_random_element.scm | ;
(define *path* (cons "tests/rosettacode" *path*))
(import (otus random!))
(define x '("Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday"))
(print (list-ref x (rand! (length x))))
| null | https://raw.githubusercontent.com/yuriy-chumak/ol/83dd03d311339763682eab02cbe0c1321daa25bc/tests/rosettacode/pick_random_element.scm | scheme | (define *path* (cons "tests/rosettacode" *path*))
(import (otus random!))
(define x '("Monday" "Tuesday" "Wednesday" "Thursday" "Friday" "Saturday" "Sunday"))
(print (list-ref x (rand! (length x))))
| |
7aa254a118f33539d2439fd67a3115cf78f3882b5b5f29d4eb5f49d12f84c5ef | namin/biohacker | timedb.lisp | ;; -*- Mode: Lisp; -*-
's temporal logic implemented in WALTZER
Last edited 1/29/93 , by KDF
Copyright ( c ) 1988 -- 1992 , Northwestern University ,
, Xerox Corporation .
;; All rights reserved.
;;; See the file legal.txt for a paragraph stating scope of permission
;;; and disclaimer of warranty. ... | null | https://raw.githubusercontent.com/namin/biohacker/6b5da4c51c9caa6b5e1a68b046af171708d1af64/BPS/relax/timedb.lisp | lisp | -*- Mode: Lisp; -*-
All rights reserved.
See the file legal.txt for a paragraph stating scope of permission
and disclaimer of warranty. The above copyright notice and that
paragraph must be included in any separate copy of this file.
String for printing
Debugging flag
Unique ID
List of intervals
Temporal rel... |
's temporal logic implemented in WALTZER
Last edited 1/29/93 , by KDF
Copyright ( c ) 1988 -- 1992 , Northwestern University ,
, Xerox Corporation .
(in-package :COMMON-LISP-USER)
(defstruct (timedb (:PREDICATE temporal-database?)
(:PRINT-FUNCTION
(lambda (st str ignore) (declare (ignor... |
b3de97676c3680c97913a77a2036f6b36e925701d06e2adeb1d4634550dd897b | ocaml-ppx/cinaps | syntax.mli | type t =
{ comment_start_dollar : Re.re
; comment_end_or_dollar_comment_end_or_comment_start_if_rec_comment : Re.re
; comment_end_anchored : Re.re
}
val ocaml : t
val c : t
val sexp : t
| null | https://raw.githubusercontent.com/ocaml-ppx/cinaps/2791bce694bfea6ab077f13fc2987fb56fa5006f/src/syntax.mli | ocaml | type t =
{ comment_start_dollar : Re.re
; comment_end_or_dollar_comment_end_or_comment_start_if_rec_comment : Re.re
; comment_end_anchored : Re.re
}
val ocaml : t
val c : t
val sexp : t
| |
c0ff02341a018cf33ae3bbdd6e8aa618bd6d3c417fea1472513a692a28996d73 | rbkmoney/fistful-server | ff_withdrawal.erl | %%%
%%% Withdrawal
%%%
-module(ff_withdrawal).
-include_lib("damsel/include/dmsl_payment_processing_thrift.hrl").
-include_lib("damsel/include/dmsl_withdrawals_provider_adapter_thrift.hrl").
-type id() :: binary().
-type clock() :: ff_transaction:clock().
-define(ACTUAL_FORMAT_VERSION, 4).
-opaque withdrawal_state... | null | https://raw.githubusercontent.com/rbkmoney/fistful-server/2be57c4e9fe1a2bf2b2143da158a0f43d4a96dfc/apps/ff_transfer/src/ff_withdrawal.erl | erlang |
Withdrawal
Transfer logic callbacks
API
Event source
Internal types
Legacy activity
API
Transfer callbacks
Internals
Internal getters
Processing helpers
Backward compatibility legacy case for old withrawals without terminals
Quote helpers
Session management
Withdrawal validators
Limit helpers
Adju... |
-module(ff_withdrawal).
-include_lib("damsel/include/dmsl_payment_processing_thrift.hrl").
-include_lib("damsel/include/dmsl_withdrawals_provider_adapter_thrift.hrl").
-type id() :: binary().
-type clock() :: ff_transaction:clock().
-define(ACTUAL_FORMAT_VERSION, 4).
-opaque withdrawal_state() :: #{
id := id()... |
9ee14e6f64a21b55bf7e8d046fa583fbfc4abbb3fedd7b3b425b7dc44247a1db | realworldocaml/book | configuration.mli | open! Core
open! Import
(** Default amount of context shown around each change in the diff *)
val default_context : int
(** The following constants were all chosen empirically. *)
(** Default cutoff for line-level semantic cleanup. Any match of [default_line_big_enough]
or more will not be deleted, even if it's... | null | https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/patdiff/kernel/src/configuration.mli | ocaml | * Default amount of context shown around each change in the diff
* The following constants were all chosen empirically.
* Default cutoff for line-level semantic cleanup. Any match of [default_line_big_enough]
or more will not be deleted, even if it's surrounded by large inserts and deletes.
Raising this quan... | open! Core
open! Import
val default_context : int
val default_line_big_enough : int
val default_word_big_enough : int
* Governs the behavior of [ split_for_readability ] . We will only split ranges around
matches of size greater than [ too_short_to_split ] . Note that this should always
be at least... |
5eac76be182cdc21cdd08e6da2e6d1c30ebce992f931aa0ffe32e7b8e62066e9 | MarchLiu/market | project.clj | (defproject sequences "0.2.2"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:source-paths ["src/main/clojure"]
:java-source-paths ["src/main/java"]
:plugins [[lein-junit "1.1.8"]]
:dependencies [[org.clojure/clojure "1.10.0"]
... | null | https://raw.githubusercontent.com/MarchLiu/market/7a7daf6c04b41e0f8494be6740da8d54785c5e77/sequences/project.clj | clojure | (defproject sequences "0.2.2"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:source-paths ["src/main/clojure"]
:java-source-paths ["src/main/java"]
:plugins [[lein-junit "1.1.8"]]
:dependencies [[org.clojure/clojure "1.10.0"]
... | |
58ab819bdbffe306a930f9f750e939526ece831e20fb035f55822a360d013027 | BinaryAnalysisPlatform/bap | regular_data_write.ml | open Core_kernel[@@warning "-D"]
open Regular_data_types
type bytes = Regular_bytes.t
type 'a t = {
size : 'a -> int;
copy : ('a,bytes) copy;
blit : ('a,bigstring) copy;
dump : Out_channel.t -> 'a -> unit;
pp : Format.formatter -> 'a -> unit;
to_bytes : 'a -> bytes;
to_bigstring : 'a -> bigstring;
} [... | null | https://raw.githubusercontent.com/BinaryAnalysisPlatform/bap/7eb7cbfbed0a46d6511efe416e4bee32d6c39be8/lib/regular/regular_data_write.ml | ocaml | open Core_kernel[@@warning "-D"]
open Regular_data_types
type bytes = Regular_bytes.t
type 'a t = {
size : 'a -> int;
copy : ('a,bytes) copy;
blit : ('a,bigstring) copy;
dump : Out_channel.t -> 'a -> unit;
pp : Format.formatter -> 'a -> unit;
to_bytes : 'a -> bytes;
to_bigstring : 'a -> bigstring;
} [... | |
5dbdb74ff36e4526a1b5a97782ad1ecee7d882ec90fa07b2b93add80e46a9c34 | aantron/luv | network.ml | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
module Interface_address =
struct
type t = {
name : string;
is_internal : bool;
physical : string;
address : Sockaddr.t;
netmask : Sockaddr.t;
}
let c_socka... | null | https://raw.githubusercontent.com/aantron/luv/4b49d3edad2179c76d685500edf1b44f61ec4be8/src/network.ml | ocaml | This file is part of Luv , released under the MIT license . See LICENSE.md for
details , or visit .
details, or visit . *)
module Interface_address =
struct
type t = {
name : string;
is_internal : bool;
physical : string;
address : Sockaddr.t;
netmask : Sockaddr.t;
}
let c_socka... | |
9b6ad8a6fd1eb0481eab2c75b84fcb2144aebe0c1c561873b74a3f61a49f1a1a | ghcjs/jsaddle-dom | Headers.hs | # LANGUAGE PatternSynonyms #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.Headers
(append, delete, get, get_, getUnsafe, getUnchecked, has, has_,
set, Headers(..), gTypeHeaders)
... | null | https://raw.githubusercontent.com/ghcjs/jsaddle-dom/5f5094277d4b11f3dc3e2df6bb437b75712d268f/src/JSDOM/Generated/Headers.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - unused - imports #
module JSDOM.Generated.Headers
(append, delete, get, get_, getUnsafe, getUnchecked, has, has_,
set, Headers(..), gTypeHeaders)
where
import Prelude ((.), (==), (>>=), return, IO, Int, Float, Double, Bool(..), Maybe, maybe,... |
af5a2ff93627befac84e3a8939a1ee2b47e5645437f1d2962ac7720c6b54577b | lamdu/lamdu | Code.hs | -- | Code texts
{-# OPTIONS -O0 #-}
# LANGUAGE TemplateHaskell , DerivingVia #
module Lamdu.I18N.Code where
import qualified Control.Lens as Lens
import qualified Data.Aeson.TH.Extended as JsonTH
import GUI.Momentu.Element.Id (ElemIds)
import Lamdu.Prelude
-- All words here are reserved (conflict... | null | https://raw.githubusercontent.com/lamdu/lamdu/5b15688e53ccbf7448ff11134b3e51ed082c6b6c/src/Lamdu/I18N/Code.hs | haskell | | Code texts
# OPTIONS -O0 #
All words here are reserved (conflicted when used as user names)
Assignment
Apply
Case
If:
Inject
Lambda:
Literal a:
Record:
Kinds | # LANGUAGE TemplateHaskell , DerivingVia #
module Lamdu.I18N.Code where
import qualified Control.Lens as Lens
import qualified Data.Aeson.TH.Extended as JsonTH
import GUI.Momentu.Element.Id (ElemIds)
import Lamdu.Prelude
data Code a = Code
, _let_ :: a
, _repl :: a
_case_ :: a
... |
0c0062d3dd15e861c23ed1be11ad0f30633ee1f9ffc4e9b3da0dd894348c9a38 | robert-strandh/Clump | test-2-3-tree.lisp | (cl:in-package #:clump-test)
(defclass size-mixin ()
((%size :initarg :size :accessor size)))
(defmethod clump-2-3-tree:replace :after
((node size-mixin) old-child new-child)
(declare (ignore old-child new-child))
(recompute-size node))
(defmethod clump-2-3-tree:split :after
((node size-mixin) old-chil... | null | https://raw.githubusercontent.com/robert-strandh/Clump/1ea4dbac1cb86713acff9ae58727dd187d21048a/Test/test-2-3-tree.lisp | lisp | (cl:in-package #:clump-test)
(defclass size-mixin ()
((%size :initarg :size :accessor size)))
(defmethod clump-2-3-tree:replace :after
((node size-mixin) old-child new-child)
(declare (ignore old-child new-child))
(recompute-size node))
(defmethod clump-2-3-tree:split :after
((node size-mixin) old-chil... | |
91805a5eeee4d43cf478db201de4d253c8878d40f988cb0a915f44b8294c5281 | toschoo/mom | Balancer.hs | {-# Language BangPatterns #-}
-------------------------------------------------------------------------------
-- |
Module : Network / Mom / Stompl / Patterns / Balancer.hs
Copyright : ( c )
-- License : LGPL
-- Stability : experimental
-- Portability: portable
--
-- This module provides a balancer for... | null | https://raw.githubusercontent.com/toschoo/mom/b58ca23d05c98ab50d9e981bd4ad2cdb76846399/src/stomp-patterns/Network/Mom/Stompl/Patterns/Balancer.hs | haskell | # Language BangPatterns #
-----------------------------------------------------------------------------
|
License : LGPL
Stability : experimental
Portability: portable
This module provides a balancer for services and tasks
and a topic router.
Balancers for services and tasks improve scalability and reliabi... | Module : Network / Mom / Stompl / Patterns / Balancer.hs
Copyright : ( c )
a request is sent to only one server .
Routers can be used to balance the workload of publishers :
Instead of one publisher serving thousands of subscribers ,
the initial publisher would serve thousands of routers ,
which ... |
841330e76f7217e0d88a115a8288f5108668eba87ae5c49a9755d62f0cd1d162 | tallaproject/onion | prop_dh.erl | %%%
Copyright ( c ) 2016 The Talla Authors . All rights reserved .
%%% Use of this source code is governed by a BSD-style
%%% license that can be found in the LICENSE file.
%%%
%%% -----------------------------------------------------------
@author < >
%%% @doc Property Tests for onion_dh.
%%% @end
%%% ---------... | null | https://raw.githubusercontent.com/tallaproject/onion/d0c3f86c726c302744d3cfffa2de21f85c190cf0/test/prop_dh.erl | erlang |
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
-----------------------------------------------------------
@doc Property Tests for onion_dh.
@end
-----------------------------------------------------------
Properties.
All negative numbers.
The generator.
P ... | Copyright ( c ) 2016 The Talla Authors . All rights reserved .
@author < >
-module(prop_dh).
-export([prop_shared_secret/0,
prop_degenerate/0,
prop_public_key_not_degenerate/0
]).
-include_lib("onion/include/onion_test.hrl").
-spec prop_shared_secret() -> term().
prop_shared_secret()... |
0f9a97e624d5c7a85fd0b24b8aa64e2c0ba9f13e32bb90a34077dd4099e2a0d3 | GlideAngle/flare-timing | HLint.hs | module Main (main) where
import Language.Haskell.HLint (hlint)
import System.Exit (exitFailure, exitSuccess)
arguments :: [String]
arguments =
[ "library"
, "test-suite-hlint"
, "test-suite-parse"
-- WARNING: HLint turns off QuasiQuotes even if turned on in
default - extensions in the cabal file , #... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/kml/test-suite-hlint/HLint.hs | haskell | WARNING: HLint turns off QuasiQuotes even if turned on in
SEE: | module Main (main) where
import Language.Haskell.HLint (hlint)
import System.Exit (exitFailure, exitSuccess)
arguments :: [String]
arguments =
[ "library"
, "test-suite-hlint"
, "test-suite-parse"
default - extensions in the cabal file , # 55 .
, "-XQuasiQuotes"
]
main :: IO ()
main = do
hi... |
1f6cb88fc2f50ade2d90b110d366b5605d728c59c9d9f113e4ae084d21fe6814 | UU-ComputerScience/uhc | CString.hs | # EXCLUDE_IF_TARGET js #
{-# EXCLUDE_IF_TARGET cr #-}
module CString (module Foreign.C.String) where
import Foreign.C.String
| null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/ehclib/haskell98/CString.hs | haskell | # EXCLUDE_IF_TARGET cr # | # EXCLUDE_IF_TARGET js #
module CString (module Foreign.C.String) where
import Foreign.C.String
|
91c64add592b401f645db95de6060b52f5a290795ce3d99f0ecd87d14365df99 | uswitch/blueshift | main.clj | (ns uswitch.blueshift.main
(:require [clojure.tools.logging :refer (info)]
[clojure.tools.cli :refer (parse-opts)]
[uswitch.blueshift.system :refer (build-system)]
[com.stuartsierra.component :refer (start stop)])
(:gen-class))
(def cli-options
[["-c" "--config CONFIG" "Path t... | null | https://raw.githubusercontent.com/uswitch/blueshift/98c4345c8145158247c8c88637ae7c01d9df7a83/src/uswitch/blueshift/main.clj | clojure | (ns uswitch.blueshift.main
(:require [clojure.tools.logging :refer (info)]
[clojure.tools.cli :refer (parse-opts)]
[uswitch.blueshift.system :refer (build-system)]
[com.stuartsierra.component :refer (start stop)])
(:gen-class))
(def cli-options
[["-c" "--config CONFIG" "Path t... | |
136d4712c5e0f2d6dd08f2ed5365e5e9a59a9def5911062ea507efc0574585bf | fukamachi/lack | csrf.lisp | (in-package :cl-user)
(defpackage lack.middleware.csrf
(:use :cl)
(:import-from :lack.request
:make-request
:request-body-parameters)
(:import-from :lack.util
:generate-random-id)
(:export :*lack-middleware-csrf*
:csrf-token
:csrf-html-tag))
... | null | https://raw.githubusercontent.com/fukamachi/lack/1f155216aeea36291b325c519f041e469262a399/src/middleware/csrf.lisp | lisp | for multipart/form-data | (in-package :cl-user)
(defpackage lack.middleware.csrf
(:use :cl)
(:import-from :lack.request
:make-request
:request-body-parameters)
(:import-from :lack.util
:generate-random-id)
(:export :*lack-middleware-csrf*
:csrf-token
:csrf-html-tag))
... |
4fab03e5d15d0a2eed56df04ecf40303954903f47234b0e81aebd20d87f2faae | Mayvenn/storefront | contentful.clj | (ns storefront.system.contentful
(:require [clojure.walk :as walk]
[com.stuartsierra.component :as component]
[storefront.system.scheduler :as scheduler]
[storefront.utils :as utils]
[ring.util.response :as util.response]
[spice.date :as date]
[s... | null | https://raw.githubusercontent.com/Mayvenn/storefront/246c6906e2152a55683d5e8bf642208d7d082513/src/storefront/system/contentful.clj | clojure | Used for homepage | (ns storefront.system.contentful
(:require [clojure.walk :as walk]
[com.stuartsierra.component :as component]
[storefront.system.scheduler :as scheduler]
[storefront.utils :as utils]
[ring.util.response :as util.response]
[spice.date :as date]
[s... |
002b779fa4ba4bb0043d061f2a3e9de207243bf34332151c2dbeb560015c94cb | RunOrg/RunOrg | eventStream.mli | open Common
type ('ctx, 'a) event_writer = 'a list -> ( 'ctx, Clock.t ) Run.t
module type STREAM = sig
type event
val name : string
val append : ( #ctx, event ) event_writer
val count : unit -> ( #ctx, int ) Run.t
val clock : unit -> ( #ctx, Clock.t ) Run.t
val track : Projection.view -> (event -> ctx Run... | null | https://raw.githubusercontent.com/RunOrg/RunOrg/b53ee2357f4bcb919ac48577426d632dffc25062/server/cqrsLib/eventStream.mli | ocaml | open Common
type ('ctx, 'a) event_writer = 'a list -> ( 'ctx, Clock.t ) Run.t
module type STREAM = sig
type event
val name : string
val append : ( #ctx, event ) event_writer
val count : unit -> ( #ctx, int ) Run.t
val clock : unit -> ( #ctx, Clock.t ) Run.t
val track : Projection.view -> (event -> ctx Run... | |
68c7e76888cff151c298bee4c768f7bfbc728d20db08c19abb5fd47ccf6fd139 | zhuangxm/clj-rpc | server.clj | Server for simple RPC(http )
;;
;; example usage:
;; (export-commands 'clojure.core)
;; to export all functions of clojure.core to outside world.
;; (start)
to start the http server on the default rpc port 9876
;; (stop)
;; to stop the server.
;;
;; Server urls:
The server supports different wire format ( current... | null | https://raw.githubusercontent.com/zhuangxm/clj-rpc/73a2f66b5ed0cce865d102acb49ba229203343ad/src/clj_rpc/server.clj | clojure |
example usage:
(export-commands 'clojure.core)
to export all functions of clojure.core to outside world.
(start)
(stop)
to stop the server.
Server urls:
e.g. :9876/json json format
help -- GET/POST returns the list of the functions
invoke -- POST (parameters: method, args) invoke the function (by
"method")... | Server for simple RPC(http )
to start the http server on the default rpc port 9876
The server supports different wire format ( currently clj , json ) .
First part of URL specify it :
For each format , the server support 2 commands :
(ns clj-rpc.server
(:use compojure.core, ring.adapter.jetty)
(:require [c... |
5007b967b7a23a8f43ecf53c3ef3bfd9c8299e65b3072a7a8ca3703754ce61cd | kindista/kindista | facebook.lisp | Copyright 2015 - 2021 CommonGoods Network , Inc.
;;;
This file is part of Kindista .
;;;
Kindista is free software : you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
;;; (at you... | null | https://raw.githubusercontent.com/kindista/kindista/7d2be6d1bf2e8a8d027854998017f6cdcc70691a/src/shared/facebook.lisp | lisp |
(at your option) any later version.
without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
License for more details.
(or *enable-facebook-posting*
(find userid *alpha-testers*)
(:div
:class "fb-share-button"
:data-href url
:data... | Copyright 2015 - 2021 CommonGoods Network , Inc.
This file is part of Kindista .
Kindista is free software : you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published
by the Free Software Foundation , either version 3 of the License , or
Kindista is distr... |
12e90e97b06e98608b229fdaa90c4b50ef1b7d772332ea18e341a154c4d5ca2c | markus-git/hardware-edsl | Types.hs | {-# LANGUAGE TypeOperators #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE DataKinds #-}
# LANGUAGE ScopedTypeVariables #
module Types where
import Language.VHDL (Mode(..))
import Language.Embedded.Hardware
import Control.Monad.Identity
import Control.Monad.Operational.Higher
import Data.ALaCar... | null | https://raw.githubusercontent.com/markus-git/hardware-edsl/d0fde93ff57a8f5c2c37e273ff3a1d2a761fc5eb/examples/Types.hs | haskell | # LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
# LANGUAGE DataKinds #
------------------------------------------------------------------------------
* Example of a program that performs type casting.
------------------------------------------------------------------------------
| Command ... | # LANGUAGE ScopedTypeVariables #
module Types where
import Language.VHDL (Mode(..))
import Language.Embedded.Hardware
import Control.Monad.Identity
import Control.Monad.Operational.Higher
import Data.ALaCarte
import Data.Int
import Data.Word
import Text.PrettyPrint
import Prelude hiding (and, or, not, toInteger)
... |
e94edd21314f7dbe8cfc05dfc979f8602d19206c8514ebd074bede8c04834b1f | pdarragh/parsing-with-zippers-paper-artifact | pwz_bench.ml | module Command = Core.Command
open Benchmarking
open Core_bench
open Interface
open Pwz_cli_common
open Pytokens
(* A small module for properly timing parses. This needed to be parameterized for the PI.tok, hence the module. *)
module MakeTimer (PI : ParserInterface) = struct
let time_parse (tokens : PI.tok list)... | null | https://raw.githubusercontent.com/pdarragh/parsing-with-zippers-paper-artifact/c5c08306cfe4eec588237c7fa45b794649ccb68a/benchmark/pwz_bench/generate/static/pwz_bench.ml | ocaml | A small module for properly timing parses. This needed to be parameterized for the PI.tok, hence the module.
The base parsing command. | module Command = Core.Command
open Benchmarking
open Core_bench
open Interface
open Pwz_cli_common
open Pytokens
module MakeTimer (PI : ParserInterface) = struct
let time_parse (tokens : PI.tok list) () =
ignore (PI.parse tokens)
end
let strip_filename (filename : string) : string =
match String.rind... |
25d51e277e588af83c2bf348bc93f27fbaa89f588e4e67b6b3bc82967897c1c7 | HouzuoGuo/Aurinko | db.clj | (ns Aurinko.db
(:use [clojure.java.io :only [file]])
(:require (Aurinko [fs :as fs] [col :as col])))
(defprotocol DbP
(create [this name])
(rename [this old new])
(delete [this name])
(compress [this name] "Compact space consumed by deleted documents")
(repair [this name] "Recreate the collection... | null | https://raw.githubusercontent.com/HouzuoGuo/Aurinko/f24bcab53da45b477d0b842bc4ab9ff1e08f505c/src/Aurinko/db.clj | clojure | (ns Aurinko.db
(:use [clojure.java.io :only [file]])
(:require (Aurinko [fs :as fs] [col :as col])))
(defprotocol DbP
(create [this name])
(rename [this old new])
(delete [this name])
(compress [this name] "Compact space consumed by deleted documents")
(repair [this name] "Recreate the collection... | |
ebaf135ce8e5b0ab80f0b032e0f972800728eb4adeb1a43232e780f33b4156c0 | rmculpepper/crypto | info.rkt | #lang info
;; pkg info
(define version "1.0")
(define collection "crypto")
(define deps '("base" "rackunit-lib" "asn1-lib" "crypto-lib"))
(define pkg-authors '(ryanc))
;; collection info
(define name "crypto")
| null | https://raw.githubusercontent.com/rmculpepper/crypto/fec745e8af7e3f4d5eaf83407dde2817de4c2eb0/crypto-test/info.rkt | racket | pkg info
collection info | #lang info
(define version "1.0")
(define collection "crypto")
(define deps '("base" "rackunit-lib" "asn1-lib" "crypto-lib"))
(define pkg-authors '(ryanc))
(define name "crypto")
|
271e038d9e422cefae84dc611b9c800aca922c0fae1c0289dd541be5b432a841 | Average-user/MazeGen | Spec.hs | import Data.Array
import Solver
import System.Random
import Utils
import Data.Set (fromList)
import Test.QuickCheck
import Data.Time
-- | Algorithms implemented so far
import qualified Algorithm.HuntKill
import qualified Algorithm.Sidewinder
import qualified Algorithm.Prims
import qualified Algorithm.GrowingTree
impor... | null | https://raw.githubusercontent.com/Average-user/MazeGen/e6788c05ccd1bd10e1d4b00c23404b9b1d3352a9/test/Spec.hs | haskell | | Algorithms implemented so far | import Data.Array
import Solver
import System.Random
import Utils
import Data.Set (fromList)
import Test.QuickCheck
import Data.Time
import qualified Algorithm.HuntKill
import qualified Algorithm.Sidewinder
import qualified Algorithm.Prims
import qualified Algorithm.GrowingTree
import qualified Algorithm.Backtracker
i... |
e2075f31b879983c5821248c5dcbc6c2d1ed8de927b8d0a3fde87ec4c7db0761 | aisamanra/s-cargot | Comments.hs | {-# LANGUAGE OverloadedStrings #-}
module Data.SCargot.Comments
( -- $intro
-- * Lisp-Style Syntax
-- $lisp
withLispComments
-- * Other Existing Comment Syntaxes
-- ** Scripting Language Syntax
-- $script
, withOctothorpeComments
* * Prolog- or Matlab - Style Syntax
, withPercentComme... | null | https://raw.githubusercontent.com/aisamanra/s-cargot/71d2ec896f50877110df8622de3efdccfa6b8d59/Data/SCargot/Comments.hs | haskell | # LANGUAGE OverloadedStrings #
$intro
* Lisp-Style Syntax
$lisp
* Other Existing Comment Syntaxes
** Scripting Language Syntax
$script
** C-Style Syntax
$clike
** Haskell-Style Syntax
* Comment Syntax Helper Functions
| Given a string, produce a comment parser that matches that
initial string and ignores ... |
module Data.SCargot.Comments
withLispComments
, withOctothorpeComments
* * Prolog- or Matlab - Style Syntax
, withPercentComments
, withPercentBlockComments
, withCLikeLineComments
, withCLikeBlockComments
, withCLikeComments
$ haskell
, withHaskellLineComments
, withHaskellBlockComments
, ... |
36a1b3358ac2cb17fad278c71e79bba7fbe591594d2ae49d82611e21d4c3e04f | dmjio/miso | Main.hs | # LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE RecordWildCards #-}
# LANGUAGE TypeFamilies #
module Main where
import Miso hiding (asyncCallback)
import ... | null | https://raw.githubusercontent.com/dmjio/miso/0be227bca6e0aec16a69a1c09f9a90624af070c1/examples/file-reader/Main.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
# LANGUAGE DataKinds #
# LANGUAGE RecordWildCards #
| Model
| Action
| Main entry point
| Update your model
| View function, with routing | # LANGUAGE DeriveGeneric #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Main where
import Miso hiding (asyncCallback)
import Miso.String
import Control.Concurrent.MVar
import GHCJS.Types
import GHCJS.Foreign.Callback
data Model
= Model
{ info :: M... |
1c304b11d3da615c804fb4658f188da180cc1ad5938bcd290309825bfda0b3bd | cerner/clara-rules | test_rule_execution.cljc | (ns clara.performance.test-rule-execution
(:require [clara.rules.accumulators :as acc]
[clara.rules :as r]
#?(:clj
[clojure.test :refer :all]
:cljs [cljs.test :refer-macros [is deftest]])
#?(:clj
[clara.tools.testing-utils :refer [def-rules-test run-performance-test]... | null | https://raw.githubusercontent.com/cerner/clara-rules/8107a5ab7fdb475e323c0bcb39084a83454deb1c/src/test/common/clara/performance/test_rule_execution.cljc | clojure | (ns clara.performance.test-rule-execution
(:require [clara.rules.accumulators :as acc]
[clara.rules :as r]
#?(:clj
[clojure.test :refer :all]
:cljs [cljs.test :refer-macros [is deftest]])
#?(:clj
[clara.tools.testing-utils :refer [def-rules-test run-performance-test]... | |
6d844dafa7c8a6aa9f66f3196775c7fc0fab62e620d461ab650597025620c106 | danhper/evm-analyzer | testTraceParser.ml | open Evm_analyzer
let parse_regular_format () =
let traces = TraceParser.parse_string Fixtures.regular_trace_0xdd77a7d375e in
Alcotest.(check int) "has all traces" 165 (List.length traces)
let parse_stripped_format () =
let regular_traces = TraceParser.parse_string Fixtures.regular_trace_0xdd77a7d375e in
let... | null | https://raw.githubusercontent.com/danhper/evm-analyzer/9fb1cf6dc743c2f779973b2f0892047ebbd4e5fd/test/testTraceParser.ml | ocaml | open Evm_analyzer
let parse_regular_format () =
let traces = TraceParser.parse_string Fixtures.regular_trace_0xdd77a7d375e in
Alcotest.(check int) "has all traces" 165 (List.length traces)
let parse_stripped_format () =
let regular_traces = TraceParser.parse_string Fixtures.regular_trace_0xdd77a7d375e in
let... | |
3d3e0dfb601c4445f2df71ddfd3cfe5b5e432ee130140326af0d070f849b908a | intolerable/api-builder | RoutesSpec.hs | module Network.API.Builder.RoutesSpec where
import Network.API.Builder.Routes
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "routeURL" $ do
it "should be able to create a basic url" $ do
routeURL "" (Route [ "api", "index" ] [ ] "GET")
`shouldBe` "/api/index"
... | null | https://raw.githubusercontent.com/intolerable/api-builder/f7440211195da98cfa93b6a97e51892b939919e1/test/Network/API/Builder/RoutesSpec.hs | haskell | module Network.API.Builder.RoutesSpec where
import Network.API.Builder.Routes
import Test.Hspec
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "routeURL" $ do
it "should be able to create a basic url" $ do
routeURL "" (Route [ "api", "index" ] [ ] "GET")
`shouldBe` "/api/index"
... | |
eb4b5a8baf634bc7d0d0f098fd45ea3155b8ea4f3d842af1f9d6d3a5d72330ca | andersfugmann/ppx_protocol_conv | xmlm.ml | (* Xml driver for ppx_protocol_conv *)
open StdLabels
open Protocol_conv.Runtime
module Helper = Protocol_conv.Runtime.Helper
type t = Ezxmlm.node
type error = string * t option
exception Protocol_error of error
module StringMap = Map.Make(String)
let make_error ?value msg = (msg, value)
let to_string_hum xml = Ezxm... | null | https://raw.githubusercontent.com/andersfugmann/ppx_protocol_conv/e93eb01ca8ba8c7dd734070316cd281a199dee0d/drivers/xmlm/xmlm.ml | ocaml | Xml driver for ppx_protocol_conv
Register exception printer
Join all elements, including default empty ones
* If the given list has been unwrapped since its part of a record, we "rewrap it".
If the given list has been unwrapped since its part of a record, we "rewrap it". | open StdLabels
open Protocol_conv.Runtime
module Helper = Protocol_conv.Runtime.Helper
type t = Ezxmlm.node
type error = string * t option
exception Protocol_error of error
module StringMap = Map.Make(String)
let make_error ?value msg = (msg, value)
let to_string_hum xml = Ezxmlm.to_string [xml]
let error_to_string... |
5d2ae91355a7cd1e8ffbe445ada9389b23ef95d88056cdd46c7659730babd950 | avsm/eeww | list.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/avsm/eeww/651d8da20a3cc9e88354ed0c8da270632b9c0c19/boot/ocaml/stdlib/list.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type 'a t = 'a list = [] | (::) of 'a * 'a list
let rec length_aux len = function
[] -> len
| _::... |
d46369199f24d50c696ec308c2b986b8f6e9411e587b71032747a794d4431611 | melange-re/melange-compiler-libs | translmod.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/melange-re/melange-compiler-libs/83e3017d2e7a058385f71d1d9a4c4ab52dc1c008/lambda/translmod.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Typedtree
open Lambda
type id_or_ignore_loc =
| Id of Ident.t
| Ignore_loc of Lambda.scoped_lo... |
6987360a3746ddd20f231a6e15e3bd1ae479b41d160a9c98750825d7e6b27016 | azimut/shiny | misc-gpu.lisp | (in-package :shiny)
(defvar *light-color* (v! 1 1 1))
(defvar *exposure* 1f0)
;; Range Constant Linear Quadratic
3250 , 1.0 , 0.0014 , 0.000007
600 , 1.0 , 0.007 , 0.0002
325 , 1.0 , 0.014 , 0.0007
200 , 1.0 , 0.022 , 0.0019
160 , 1.0 , 0.027 , 0.0028
100 , 1.0 , 0.045 , 0.0075
65 , 1.0 , 0.07 , 0.017
... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/lib/misc-gpu.lisp | lisp | Range Constant Linear Quadratic
Diffuse shading
combine
--------------------------------------------------
-Lighting/Normal-Mapping
"Pushing pixels" code
Sometimes "y" component is wrong on the normal map.
?
From "pushing pixels" don't remember why it's needed
--------------------------------------------------
... | (in-package :shiny)
(defvar *light-color* (v! 1 1 1))
(defvar *exposure* 1f0)
3250 , 1.0 , 0.0014 , 0.000007
600 , 1.0 , 0.007 , 0.0002
325 , 1.0 , 0.014 , 0.0007
200 , 1.0 , 0.022 , 0.0019
160 , 1.0 , 0.027 , 0.0028
100 , 1.0 , 0.045 , 0.0075
65 , 1.0 , 0.07 , 0.017
50 , 1.0 , 0.09 , 0.032
32 , 1.0... |
3652e624a435d8a43a65fab940f6b4ffb766803d8f2186f2a2c69cbba43ba320 | wdebeaum/step | yourselves.lisp | ;;;;
;;;; W::YOURSELVES
;;;;
(define-words :pos W::pro :boost-word t :templ PRONOUN-TEMPL
:tags (:base500)
:words (
(W::YOURSELVES
(wordfeats (W::agr W::2p) (W::stem W::you) (W::REFL +) (W::CASE W::OBJ))
(SENSES
((LF-PARENT ONT::PERSON)
(templ pronoun-plural-templ)
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/yourselves.lisp | lisp |
W::YOURSELVES
|
(define-words :pos W::pro :boost-word t :templ PRONOUN-TEMPL
:tags (:base500)
:words (
(W::YOURSELVES
(wordfeats (W::agr W::2p) (W::stem W::you) (W::REFL +) (W::CASE W::OBJ))
(SENSES
((LF-PARENT ONT::PERSON)
(templ pronoun-plural-templ)
)
)
)
))
|
4ac5a5bf8fd2e72868ccf6c9460432e0298eb7b6dab3c47d8b81361ec05994ab | wireapp/wire-server | Cargohold.hs | -- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modify it under
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License... | null | https://raw.githubusercontent.com/wireapp/wire-server/1fcda9671f2b4cb8cb5574d9c9d9de5cf915b043/libs/wire-api/src/Wire/API/Routes/Internal/Cargohold.hs | haskell | This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTI... | Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Public License along
module Wire.API.Routes.Internal.... |
f9158b4e3eb4ad6bbe0c788632ad7588b26dc51d9e032444b92d859c9c9c1ec7 | arrdem/stacks | pygmentize.clj | (ns stacks.tools.articles.middleware.pygmentize
"Article middleware for pygmentizing code blocks."
(:require [stacks.tools.articles :refer [handle-render-block]]
[stacks.tools.pygments :refer [lexers pygmentize]]))
(defonce +known-lexers+
(delay (set (lexers))))
(defn handle-render-pygmentize
"Art... | null | https://raw.githubusercontent.com/arrdem/stacks/a16a7a6301e400c0c40c8774d07df0a86f9806f5/src/main/clj/stacks/tools/articles/middleware/pygmentize.clj | clojure | clj is known to pygments
foo is not | (ns stacks.tools.articles.middleware.pygmentize
"Article middleware for pygmentizing code blocks."
(:require [stacks.tools.articles :refer [handle-render-block]]
[stacks.tools.pygments :refer [lexers pygmentize]]))
(defonce +known-lexers+
(delay (set (lexers))))
(defn handle-render-pygmentize
"Art... |
344fe51cf1789fb6501eddc17a35af7e4543bcdf8954a799f21c26cfad4471b0 | bhaskara/programmable-reinforcement-learning | maxq0-q-fn.lisp | (defpackage maxq0-q-function
(:documentation
"Package for defining MAXQ0 Q-functions and associated feature templates for concurrent ALisp programs.
Types
-----
<maxq0-q-function>
")
(:use
utils
calisp)
(:export
<maxq0-q-function>))
(in-package maxq0-q-function)
(defclass <maxq0-q-function> (<calis... | null | https://raw.githubusercontent.com/bhaskara/programmable-reinforcement-learning/8afc98116a8f78163b3f86076498d84b3f596217/lisp/envs/stratagus/resource/maxq0-q-fn.lisp | lisp | these are references into the hash table
TODO: Implement Featurizer, inform-env-step, and inform-end-choice-block | (defpackage maxq0-q-function
(:documentation
"Package for defining MAXQ0 Q-functions and associated feature templates for concurrent ALisp programs.
Types
-----
<maxq0-q-function>
")
(:use
utils
calisp)
(:export
<maxq0-q-function>))
(in-package maxq0-q-function)
(defclass <maxq0-q-function> (<calis... |
e01ce379d23e9f86f276620aeb3978a24e9cece0bbf1bfacf3d653d35ce2e505 | brownplt/TeJaS | typeScript_types.ml | open Prelude
open Sig
open TypeScript_sigs
open Strobe_sigs
module Make : TYPESCRIPT_TYP = functor (STROBE : TYPS) ->
struct
type baseKind = STROBE.kind
type kind =
(* and anything new... *)
| KStrobe of baseKind
type baseTyp = STROBE.typ
type typ =
| TStrobe of baseTyp
| TA... | null | https://raw.githubusercontent.com/brownplt/TeJaS/a8ad7e5e9ad938db205074469bbde6a688ec913e/src/typescript/typeScript_types.ml | ocaml | and anything new...
and anything new...
trace "TypeScript:typ_assoc"
(Pretty.simpl_typ t1 ^ " with " ^ Pretty.simpl_typ t2)
(fun _ -> true) (fun () -> (typ_assoc' add merge env t1 t2))
substitute x FOR s IN t
a, b, ... z, aa, bb, ..., zz, ... | open Prelude
open Sig
open TypeScript_sigs
open Strobe_sigs
module Make : TYPESCRIPT_TYP = functor (STROBE : TYPS) ->
struct
type baseKind = STROBE.kind
type kind =
| KStrobe of baseKind
type baseTyp = STROBE.typ
type typ =
| TStrobe of baseTyp
| TArrow of typ list * typ option * ... |
d14c82128facbff27cca2a5962e4291f9baece3cf788468605b015714458d493 | hemmi/coq2scala | coqc.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/scripts/coqc.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
environment
coqc options
compil... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Afin de rendre Coq plus por... |
ec35329e7f1b34d777c4b3c5ce5c5e790a3595ac42adae8a24631cf5bd89eb3a | janestreet/ppx_typed_fields | nested.mli | open! Core
module Make (Leaf_data : T1) : sig
module rec Tree : sig
type 'a t = private
| Leaf : 'a Leaf_data.t -> 'a t
| Branch : (module Branch.S with type Typed_field.derived_on = 'a) -> 'a t
end
and Branch : sig
module type S = sig
module Typed_field : Typed_fields_lib.S
mod... | null | https://raw.githubusercontent.com/janestreet/ppx_typed_fields/bc4f91fd95cae8e1d790250cbd8fcc1a8d7d8aea/typed_field_map/nested.mli | ocaml | open! Core
module Make (Leaf_data : T1) : sig
module rec Tree : sig
type 'a t = private
| Leaf : 'a Leaf_data.t -> 'a t
| Branch : (module Branch.S with type Typed_field.derived_on = 'a) -> 'a t
end
and Branch : sig
module type S = sig
module Typed_field : Typed_fields_lib.S
mod... | |
167381e26d0292ac6b0c1d6d696ab5568e73d553a6d873f1cd4510964c9236b8 | byorgey/AoC | 07.hs | import Data.Bits
import Data.Map ((!))
import qualified Data.Map as M
import Data.Word
import Text.Parsec
import Text.Parsec.String
type Wire = String
data Input
= Pass Wire
| Val Word16
| NOT Wire
| AND Wire Wire
special case for 1 AND x... | null | https://raw.githubusercontent.com/byorgey/AoC/30eb51eb41af9ca86b05de598a3a96d25bd428e3/2015/07/07.hs | haskell | import Data.Bits
import Data.Map ((!))
import qualified Data.Map as M
import Data.Word
import Text.Parsec
import Text.Parsec.String
type Wire = String
data Input
= Pass Wire
| Val Word16
| NOT Wire
| AND Wire Wire
special case for 1 AND x... | |
664816d5cd775cfa5c106cf981d50d8f15644d62f1b81caaf760b6b07c9cb3b2 | uxbox/uxbox-old | material_design_file.cljs | (ns uxbox.ui.icon-sets.material-design-file
(:require [uxbox.ui.tools :as t]))
(def material-design-file (sorted-map
:attachment {
:name "Attachment"
:svg [:path
{:d
"M15 36c-6.08 0-11-4.93-11-11s4.92-11 11-11h21c4.42 0 8 3.58 8 8s-3.58 8-8 8h-17c-2.76 0-5-2.24-5-5s2.24-5 5-5h15v3h-15c-1.1 0-2 ... | null | https://raw.githubusercontent.com/uxbox/uxbox-old/9c3c3c406a6c629717cfc40e3da2f96df3bdebf7/src/frontend/uxbox/ui/icon_sets/material_design_file.cljs | clojure | (ns uxbox.ui.icon-sets.material-design-file
(:require [uxbox.ui.tools :as t]))
(def material-design-file (sorted-map
:attachment {
:name "Attachment"
:svg [:path
{:d
"M15 36c-6.08 0-11-4.93-11-11s4.92-11 11-11h21c4.42 0 8 3.58 8 8s-3.58 8-8 8h-17c-2.76 0-5-2.24-5-5s2.24-5 5-5h15v3h-15c-1.1 0-2 ... | |
709a62962cb1496b85d9b7d5fc7a94e2efe96667f97c62f7878469094f084c67 | ocaml-flambda/ocaml-jst | maindriver.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/1bb6c797df7c63ddae1fc2e6f403a0ee9896cc8e/driver/maindriver.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Clflags
module Options = Main_args.Make_bytecomp_options (Main_args.Default.Main)
let main argv p... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.