_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 |
|---|---|---|---|---|---|---|---|---|
945d288088f35d39872d103773c532fd17f27548c7a227b4da74c6632c91610f | kmi/ocml | meta.lisp | -*- Mode : LISP ; Syntax : Common - lisp ; Base : 10 ; Package : OCML ; -*-
(in-package "OCML")
(in-ontology base-ontology)
;;;Now in foundation.lisp
( def - class OCML - EXPRESSION ( ) ? x
;; :iff-def (or (sentence ?x)
;; (procedural-expression ?x)
;; (term ?x)
;; (l... | null | https://raw.githubusercontent.com/kmi/ocml/90b0b173f588c580c26393c94f9970282c640f4d/library/basic/meta.lisp | lisp | Syntax : Common - lisp ; Base : 10 ; Package : OCML ; -*-
Now in foundation.lisp
:iff-def (or (sentence ?x)
(procedural-expression ?x)
(term ?x)
(list ?x)))
?bound-vars)
(all-free-vars-in-term (rest (rest ?term))
... |
(in-package "OCML")
(in-ontology base-ontology)
( def - class OCML - EXPRESSION ( ) ? x
(def-class PROCEDURAL-EXPRESSION (ocml-expression) ?x
"The class of OCML procedural expressions"
:iff-def (or (term ?x)
(tell-statement ?x)
(unassert-statement ?x)
(loop-statemen... |
2fa4900fa964b8d1303111cb4b1276f5777736205fbf7f823eba49edba4456ef | baconpaul/composition-kit | samples.clj | (ns composition-kit.music-lib.samples
(:import [java.io File])
(:import [javax.sound.sampled AudioInputStream AudioSystem]))
(defn clip-player [fname zero-point-in-microseconds]
(let [strm (AudioSystem/getAudioInputStream (File. ^String fname))
clip (AudioSystem/getClip)
_ (.open clip strm)... | null | https://raw.githubusercontent.com/baconpaul/composition-kit/fce0addb74a9c30ba06e051d3bca51c5a2b0ce6f/src/composition_kit/music_lib/samples.clj | clojure | (ns composition-kit.music-lib.samples
(:import [java.io File])
(:import [javax.sound.sampled AudioInputStream AudioSystem]))
(defn clip-player [fname zero-point-in-microseconds]
(let [strm (AudioSystem/getAudioInputStream (File. ^String fname))
clip (AudioSystem/getClip)
_ (.open clip strm)... | |
81603a18747abfaef3be806c45590460b214b95681562356182625ff8cd42b1b | janestreet/bonsai | app_test.ml | open! Core
open! Bonsai_web_test
open! Bonsai_web
open Bonsai_time_example
(* $MDX part-begin=test-clock-component *)
let%expect_test _ =
let handle = Handle.create (Result_spec.vdom Fn.id) component in
Handle.show handle;
[%expect {| 1970-01-01 00:00:00.000000000Z |}];
Handle.advance_clock_by handle (Time_ns.... | null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/examples/time/test/app_test.ml | ocaml | $MDX part-begin=test-clock-component
$MDX part-end | open! Core
open! Bonsai_web_test
open! Bonsai_web
open Bonsai_time_example
let%expect_test _ =
let handle = Handle.create (Result_spec.vdom Fn.id) component in
Handle.show handle;
[%expect {| 1970-01-01 00:00:00.000000000Z |}];
Handle.advance_clock_by handle (Time_ns.Span.of_sec 2.0);
Handle.show handle;
[... |
b848c0f98bf42cabecb2a2df4048d58f7610e5578011436ba4e9e62841963b53 | dmitryvk/sbcl-win32-threads | snapshot.lisp | ;;;; code to detect whether a package has changed
;;;;
This is really old code which was most useful when first
bootstrapping SBCL when only CMU CL was available as an XC host .
Its main purpose was to check that legacy code like DEFMACRO
DOLIST and DEFUN IR1 - OPTIMIZE - UNTIL - DONE was all correctly
conver... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/cold/snapshot.lisp | lisp | code to detect whether a package has changed
built things for the target.
well be mutating the cross-compiler host because we can build
successfully under OpenMCL, which shouldn't have the same
packages or symbols. So we don't need to worry very much about
(maybe DEFMACRO DOLIST?) could be written in such a way... | This is really old code which was most useful when first
bootstrapping SBCL when only CMU CL was available as an XC host .
Its main purpose was to check that legacy code like DEFMACRO
DOLIST and DEFUN IR1 - OPTIMIZE - UNTIL - DONE was all correctly
converted from code which mutated the XC host into code which... |
6ca3d9a6e83ebb0af52d0213f092e866301c88bd36f8cf0bef86b50e3509e8cd | PacktWorkshops/The-Clojure-Workshop | fixtures.clj | (ns packt-clj.tennis.fixtures
(:require
[clojure.java.jdbc :as jdbc]
[clojure.test :refer :all]
[packt-clj.tennis.database :as database]))
(defn db-fixture
[f]
(database/load)
(f)
(jdbc/execute! database/db ["drop table elo" ])
(jdbc/execute! database/db ["drop table tennis_match"])
(jdbc/ex... | null | https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter13/tests/Activity13.01/packt_clj/tennis/fixtures.clj | clojure | (ns packt-clj.tennis.fixtures
(:require
[clojure.java.jdbc :as jdbc]
[clojure.test :refer :all]
[packt-clj.tennis.database :as database]))
(defn db-fixture
[f]
(database/load)
(f)
(jdbc/execute! database/db ["drop table elo" ])
(jdbc/execute! database/db ["drop table tennis_match"])
(jdbc/ex... | |
f45c5d928e67ba7e933529a234448c0ed72cfbe6a9c09430dd6e1300cce8ceb0 | ekmett/discrimination | Class.hs | module Data.Discrimination.Class
( Discriminating(..)
-- * Joins
, joining
, inner
, outer
, leftOuter
, rightOuter
) where
import Control.Applicative
import Control.Arrow
import Data.Functor.Contravariant.Divisible
import Data.Discrimination.Grouping
import Data.Discrimination.Internal
import Data.Dis... | null | https://raw.githubusercontent.com/ekmett/discrimination/65de58fc7abf0194a6056d8670091e32714aec60/src/Data/Discrimination/Class.hs | haskell | * Joins
------------------------------------------------------------------------------
* Joins
------------------------------------------------------------------------------
The results are grouped by the discriminator.
^ the discriminator to use
^ selector for the left table
^ selector for the right table
^ le... | module Data.Discrimination.Class
( Discriminating(..)
, joining
, inner
, outer
, leftOuter
, rightOuter
) where
import Control.Applicative
import Control.Arrow
import Data.Functor.Contravariant.Divisible
import Data.Discrimination.Grouping
import Data.Discrimination.Internal
import Data.Discrimination.S... |
2157f57923f752f84d08e6744d7c98db743f8f451e4fa7b7473592376754fdbe | YoshikuniJujo/funpaala | mapMaybe.hs | import Data.Maybe
prices :: [(String, Integer)]
prices = [
("apple", 100),
("banana", 70),
("orange", 90) ]
myMapMaybe :: (a -> Maybe b) -> [a] -> [b]
myMapMaybe f (x : xs) = case f x of
Just y -> y : myMapMaybe f xs
_ -> myMapMaybe f xs
myMapMaybe _ _ = []
justs :: [Maybe a] -> [a]
justs (mx : xs) = case mx of... | null | https://raw.githubusercontent.com/YoshikuniJujo/funpaala/5366130826da0e6b1180992dfff94c4a634cda99/samples/others/mapMaybe.hs | haskell | import Data.Maybe
prices :: [(String, Integer)]
prices = [
("apple", 100),
("banana", 70),
("orange", 90) ]
myMapMaybe :: (a -> Maybe b) -> [a] -> [b]
myMapMaybe f (x : xs) = case f x of
Just y -> y : myMapMaybe f xs
_ -> myMapMaybe f xs
myMapMaybe _ _ = []
justs :: [Maybe a] -> [a]
justs (mx : xs) = case mx of... | |
0466aa9436edfcf0cb92841fb511b9d6bec4a93f1b28c015377b523c1032cc8c | Tim-ats-d/Indigobi | request.mli | type bypass = {
host : bool;
expiration : bool;
empty : bool;
fingerprint : bool;
}
type t = {
base_url : string;
uri : string;
host : string;
port : int;
cert : Tls.Config.own_cert option;
bypass : bypass;
}
val default_bypass : bypass
val create :
bypass:bypass ->
host:string ->
port:int ... | null | https://raw.githubusercontent.com/Tim-ats-d/Indigobi/c936f8ad2e044cdce25ae631b86cdec818654696/src/gemini/request.mli | ocaml | type bypass = {
host : bool;
expiration : bool;
empty : bool;
fingerprint : bool;
}
type t = {
base_url : string;
uri : string;
host : string;
port : int;
cert : Tls.Config.own_cert option;
bypass : bypass;
}
val default_bypass : bypass
val create :
bypass:bypass ->
host:string ->
port:int ... | |
56a121948996ca30e326f24dcb63cea32849773a88f6ded652d0e01934d39c7d | zotonic/zotonic | scomp_wires_sorter.erl | @author < >
2009
%%
Based on code ( c ) 2008 - 2009
%%
@doc an element as a sorter . A sorter is a container for sortables .
Copyright 2009
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may ob... | null | https://raw.githubusercontent.com/zotonic/zotonic/62d959610061e6d2a8aed316b63fc1dafa3dd058/apps/zotonic_mod_wires/src/scomps/scomp_wires_sorter.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing pe... | @author < >
2009
Based on code ( c ) 2008 - 2009
@doc an element as a sorter . A sorter is a container for sortables .
Copyright 2009
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(scomp_wire... |
8288d47092d65312e0e0b3dfef8b98b270193b495ccd1ccf559c09b8e5b3c868 | sbcl/specializable | accept-specializer.lisp | ;;;; accept-specializer.lisp --- Unit tests for the accept specializer.
;;;;
Copyright ( C ) 2013 , 2014 ,
Copyright ( C ) 2014 Jan Moringen
;;;;
Author : < >
Author : < >
(cl:in-package #:accept-specializer.test)
(in-suite :specializable.accept-specializer)
;;; Respond test
(eval-when (:compile-t... | null | https://raw.githubusercontent.com/sbcl/specializable/a08048ce874a2a8c58e4735d88de3bf3da0de052/test/accept-specializer/accept-specializer.lisp | lisp | accept-specializer.lisp --- Unit tests for the accept specializer.
Respond test
Not known content types
since (string< "audio/mp3" "text/html")
likewise
Multiple content types, with and without q
since text/html earlier in accept string
opposite
Not known content types
no primary method
STRING specializer
... | Copyright ( C ) 2013 , 2014 ,
Copyright ( C ) 2014 Jan Moringen
Author : < >
Author : < >
(cl:in-package #:accept-specializer.test)
(in-suite :specializable.accept-specializer)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defgeneric respond (request)
(:generic-function-class accep... |
86577bc3a7180e4cc7ea5e524f5115edfc9cc9190714b910866c1ee319cde750 | TristanCacqueray/Haxible | Eval.hs | -- | This module contains the evaluation logic
module Haxible.Eval
( AnsibleHaxl,
runHaxible,
runTask,
notifyHandler,
json,
extractLoop,
extractWhen,
traverseLoop,
traverseInclude,
cleanVar,
tryRescue,
Value,
Vars,
)
where
import Control.Exception (handle)
import Dat... | null | https://raw.githubusercontent.com/TristanCacqueray/Haxible/d23dd572e167001a052c60d10e2cbd1a8f7b6c66/src/Haxible/Eval.hs | haskell | | This module contains the evaluation logic
$setup
>>> let dump = putStrLn . unsafeFrom . encode
| Call the rescue block if the main block fails.
| Build the loop results:
>>> dump =<< traverseLoop (pure . String) ["a", "b"]
| Concat nested results
["a",42,"b",42]
| Process loop results
>>> dump $ loopResu... | module Haxible.Eval
( AnsibleHaxl,
runHaxible,
runTask,
notifyHandler,
json,
extractLoop,
extractWhen,
traverseLoop,
traverseInclude,
cleanVar,
tryRescue,
Value,
Vars,
)
where
import Control.Exception (handle)
import Data.Aeson hiding (json)
import Data.Aeson.Key qua... |
00f8c3ca4ae17dc9b6d39e66a78bbd2c4bc9cc706011d08953a7cb7dfbcc2999 | Mesabloo/HaSM | Ret.hs | module Language.HaSM.Syntax.Rules.Instructions.Ret where
import Language.HaSM.Syntax.Parser
import Language.HaSM.Syntax.AST
ret :: Parser Instruction
ret = Ret <$ reserved "ret" | null | https://raw.githubusercontent.com/Mesabloo/HaSM/7d75f0a81055d1e9c9dd0d351f3e9b9c00c7dadd/src/Language/HaSM/Syntax/Rules/Instructions/Ret.hs | haskell | module Language.HaSM.Syntax.Rules.Instructions.Ret where
import Language.HaSM.Syntax.Parser
import Language.HaSM.Syntax.AST
ret :: Parser Instruction
ret = Ret <$ reserved "ret" | |
791f985443bf5f6dad7dc8ababa9ccfc2963cf0e7c60730ac365a03fd8b90e21 | josefs/Gradualizer | block_scope.erl | -module(block_scope).
-export([foo/0]).
foo() ->
begin
X = 1,
Y = 2
end,
X,Y.
| null | https://raw.githubusercontent.com/josefs/Gradualizer/208f5816b0157f282212fc036ba7560f0822f9fc/test/should_pass/block_scope.erl | erlang | -module(block_scope).
-export([foo/0]).
foo() ->
begin
X = 1,
Y = 2
end,
X,Y.
| |
7db8df80e76eec39052b4bf53e45e56a515ceb2a32e76b0f60b5fe845890b9f7 | dnaeon/cl-wol | list-hosts.lisp | Copyright ( c ) 2021 Nikolov < >
;; 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 above copyright
;; notice, this list of co... | null | https://raw.githubusercontent.com/dnaeon/cl-wol/8f5cb9c4aeabb726b1991379d2a47eac3f38b2b6/src/cli/list-hosts.lisp | lisp | All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer
in this position and unchanged.
notice, this list of conditions and the fo... | Copyright ( c ) 2021 Nikolov < >
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
THIS SOFTWARE IS PROVIDED BY THE AUTHOR(S ) ` ` AS IS '' AND ANY EXPRESS OR
INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES... |
76c5ac99a16ab1ef997218eb5a7b9f7ebf0b76e86f9affd4efae600e28b9a817 | jabber-at/ejabberd | elixir_SUITE.erl | %%%-------------------------------------------------------------------
Author : < >
Created : 19 Feb 2015 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2017 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License ... | null | https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/test/elixir_SUITE.erl | erlang | -------------------------------------------------------------------
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 it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHA... | Author : < >
Created : 19 Feb 2015 by < >
ejabberd , Copyright ( C ) 2002 - 2017 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
... |
fe14940ca51ba5e2985804a619614dc64d66b32dfb6ec46c2e8bd0e3cfd524de | lisp/de.setf.utility | source-walker.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.utility.implementation ; -*-
(in-package :de.setf.utility.implementation)
(:documentation "This file is a place-holder for source walking operators for the 'de.setf.utility' library."
(copyright
"Copyright 2003, 2010 [james ande... | null | https://raw.githubusercontent.com/lisp/de.setf.utility/782cd79d99ebf40deeed60c492be9873bbe42a15/walker/source-walker.lisp | lisp | Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.utility.implementation ; -*-
utilities |
(in-package :de.setf.utility.implementation)
(:documentation "This file is a place-holder for source walking operators for the 'de.setf.utility' library."
(copyright
"Copyright 2003, 2010 [james anderson](mailto:) All Rights Reserved"
"'de.setf.utility' is free software: you can redistribute it and/or mod... |
494c3c02f19214d3ebde4f2d177a7e44d6fbfa1c6b1fe026e7d4897f1cab7c8e | lambdacube3d/lambdacube-workshop | HelloOBJ.hs | # LANGUAGE LambdaCase , OverloadedStrings #
import System.Environment
import Graphics.UI.GLFW as GLFW
import LambdaCube.Compiler as LambdaCube -- compiler
import LambdaCube.GL as LambdaCubeGL -- renderer
import LambdaCube.OBJ
----------------------------------------------------
-- See: -started
-------------------... | null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-workshop/3d40c91811d0aaf9fa57c3b8eb4a3f1bde0e3173/hello-obj/HelloOBJ.hs | haskell | compiler
renderer
--------------------------------------------------
See: -started
--------------------------------------------------
setup render data
load OBJ geometry and material descriptions
load materials textures
add OBJ to pipeline input
check schema compatibility
update graphics input
render | # LANGUAGE LambdaCase , OverloadedStrings #
import System.Environment
import Graphics.UI.GLFW as GLFW
import LambdaCube.OBJ
main :: IO ()
main = do
compile hello.lc to graphics pipeline description
pipelineDesc <- LambdaCube.compileMain ["."] OpenGL33 "hello_obj.lc" >>= \case
Left err -> fail $ "compil... |
b280bf5d6e84b9af992972f86352d9cef4f535627104f7c8f97e58a6f0aadbb4 | binsec/haunted | smt_bitvectors.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/static/types/smt_bitvectors.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
ceba03c564234bebc58369b1dd151a59f13bf828b4f8dea0e800d51e137f4b99 | jafingerhut/thalia | collections_test.clj | (ns thalia.collections-test
(:use clojure.test)
(:require
[clojure.data.avl :as avl]
[flatland.ordered.set :as fset]
[flatland.ordered.map :as fmap]
[flatland.useful.map :as umap]
[clojure.data.int-map :as imap]
[clojure.data.priority-map :as pmap]
[clojure.core.rrb-vector :as rrbv]
))
T... | null | https://raw.githubusercontent.com/jafingerhut/thalia/20c98eec8168ff72c5b3965cc048b817d34a4583/test/thalia/collections_test.clj | clojure | libraries.
Functions is-same-sequential, is-same-set, and is-same-map started
by being copied from function is-same-collection in file
implementation test suite.
TBD: This only approximately characterizes Clojure 1.9.0 behavior,
since there are still some test failures that this code is not
predicting the result... | (ns thalia.collections-test
(:use clojure.test)
(:require
[clojure.data.avl :as avl]
[flatland.ordered.set :as fset]
[flatland.ordered.map :as fmap]
[flatland.useful.map :as umap]
[clojure.data.int-map :as imap]
[clojure.data.priority-map :as pmap]
[clojure.core.rrb-vector :as rrbv]
))
T... |
de9963fc3a97b139c5e15e0bbd8ef1de00669ab2527f281ba8d7c70ff9b6a778 | purescript/purescript | Synonyms.hs | {-# LANGUAGE GADTs #-}
-- |
-- Functions for replacing fully applied type synonyms
--
module Language.PureScript.TypeChecker.Synonyms
( SynonymMap
, KindMap
, replaceAllTypeSynonyms
, replaceAllTypeSynonymsM
) where
import Prelude
import Control.Monad.Error.Class (MonadError(..))
import... | null | https://raw.githubusercontent.com/purescript/purescript/02bd6ae60bcd18cbfa892f268ef6359d84ed7c9b/src/Language/PureScript/TypeChecker/Synonyms.hs | haskell | # LANGUAGE GADTs #
|
Functions for replacing fully applied type synonyms
| Type synonym information (arguments with kinds, aliased type), indexed by name
| Replace fully applied type synonyms |
module Language.PureScript.TypeChecker.Synonyms
( SynonymMap
, KindMap
, replaceAllTypeSynonyms
, replaceAllTypeSynonymsM
) where
import Prelude
import Control.Monad.Error.Class (MonadError(..))
import Control.Monad.State
import Data.Maybe (fromMaybe)
import qualifie... |
7a579e79eed2a64d2351c0ef5dd5f3f1aff494462269eadee4aefe96ea3ee83c | jakemcc/sicp-study | ex2_59.clj | Exercise 2.59
;
; Write a procedure union-set which does a union
of two sets where the sets are represented
; by unique lists
(use 'clojure.test)
(defn element-of-set? [x s]
(cond (empty? s) false
(= x (first s)) true
:else (element-of-set? x (rest s))))
(deftest element-of-set?-works
(is (elemen... | null | https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section2.3/ex2_59.clj | clojure |
Write a procedure union-set which does a union
by unique lists | Exercise 2.59
of two sets where the sets are represented
(use 'clojure.test)
(defn element-of-set? [x s]
(cond (empty? s) false
(= x (first s)) true
:else (element-of-set? x (rest s))))
(deftest element-of-set?-works
(is (element-of-set? 1 '(1 2 3)))
(is (not (element-of-set? 4 '(1 2 3)))))
(de... |
ff94f684d7d71d62e98a1c09f23d0160aea0de869aab8cfd68238b0ed058f92b | 2600hz/kazoo | kz_formatters.erl | %%%-----------------------------------------------------------------------------
( C ) 2014 - 2020 , 2600Hz
%%% @doc
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% @end... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_endpoint/src/kz_formatters.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
----------------------------------------------------------------------------- | ( C ) 2014 - 2020 , 2600Hz
@author
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kz_formatters).
-export([apply/3]).
-include_lib("kazoo_stdlib/include/kz_types.hrl").
-typ... |
13275230e7a2bbb745399fe0235552a4af7ff51dd5de8af2fb652b9f44ded512 | leksah/leksah | Errors.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
# LANGUAGE RecursiveDo #
# LANGUAGE ScopedTypeVariables #
module IDE.Web.Widget.Errors
( errorsCss
, errorsWidget
) where
import Control.Lens (view, (^?))
import Data.Bool (bool)
import Data.Char (isSpace)
import Data.Dependent.Map (DMap)
import Data.F... | null | https://raw.githubusercontent.com/leksah/leksah/ec95f33af27fea09cba140d7cddd010935a2cf52/src/IDE/Web/Widget/Errors.hs | haskell | # LANGUAGE OverloadedStrings #
, const -1 <$ reset
scrollTo
| Removes the unnecessary indentation | # LANGUAGE TypeFamilies #
# LANGUAGE RecursiveDo #
# LANGUAGE ScopedTypeVariables #
module IDE.Web.Widget.Errors
( errorsCss
, errorsWidget
) where
import Control.Lens (view, (^?))
import Data.Bool (bool)
import Data.Char (isSpace)
import Data.Dependent.Map (DMap)
import Data.Foldable (toList)
import Data.Functi... |
0aa2a24aabf44cc3727c20f70ef28a1f8fdb9cfc58dc9f72ab4d80605c77f726 | shayan-najd/QFeldspar | HaskellEnvironment.hs | module QFeldspar.Prelude.HaskellEnvironment where
import QFeldspar.MyPrelude hiding (realPart,imagPart,mod)
import qualified QFeldspar.Environment.Scoped as ES
import qualified QFeldspar.Environment.Plain as EP
import qualified Language.Haskell.TH.Syntax as TH
import qualified QFeldspar.Nat.ADT as N... | null | https://raw.githubusercontent.com/shayan-najd/QFeldspar/ed60ce02794a548833317388f6e82e2ab1eabc1c/QFeldspar/Prelude/HaskellEnvironment.hs | haskell | module QFeldspar.Prelude.HaskellEnvironment where
import QFeldspar.MyPrelude hiding (realPart,imagPart,mod)
import qualified QFeldspar.Environment.Scoped as ES
import qualified QFeldspar.Environment.Plain as EP
import qualified Language.Haskell.TH.Syntax as TH
import qualified QFeldspar.Nat.ADT as N... | |
d7bc533818923e08ae9dc38a0fa3b858fbc92f94ebe9d21bfa91645d3c694f14 | onedata/op-worker | lfm_perms.erl | %%%-------------------------------------------------------------------
@author
( C ) 2015 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% This module performs permissions-r... | null | https://raw.githubusercontent.com/onedata/op-worker/b906c994c1bfefa28696399db15b3e9a3263c0f7/src/modules/logical_file_manager/lfm_submodules/lfm_perms.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
This module performs permissions-related operations of lfm_submodules.
@end
-------------------------------------------------------------------
API
=====================... | @author
( C ) 2015 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(lfm_perms).
-include("proto/oneclient/fuse_messages.hrl").
-include("proto/oneprovider/provider_messages.hrl").
-export([
set_perms/3,
check_perms/3,
set_acl/3,
get_acl/2,
... |
3b746da66c42c165992953ac27337ff25191d78bf2f32a2613eadd948d1710a8 | biscuit-auth/biscuit-haskell | Parser.hs | # LANGUAGE DataKinds #
# LANGUAGE OverloadedLists #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module Spec.Parser (specs, parseExpression, parseBlock, parseAuthorizer) where
import Control.Monad ((<=<))
import Data.Bifunctor (first)
imp... | null | https://raw.githubusercontent.com/biscuit-auth/biscuit-haskell/b1863e3e2ce5c431742effb52c9cfeba8433c01a/biscuit/test/Spec/Parser.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE OverloadedLists #
# LANGUAGE RecordWildCards #
module Spec.Parser (specs, parseExpression, parseBlock, parseAuthorizer) where
import Control.Monad ((<=<))
import Data.Bifunctor (first)
import Data.Either ... |
fb9e5322df4f555989bb39478d390d0c14ca659b3414b8206cba6b978c2d8662 | falgon/htcc | Preprocessor.hs | |
Module : Htcc . CRules . Preprocessor
Description : The rules of preprocessor of C language
Copyright : ( c ) roki , 2019
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
The rules of preprocessor of C language
Module : Htcc.CRules.Preprocessor
Descri... | null | https://raw.githubusercontent.com/falgon/htcc/3cef6fc362b00d4bc0ae261cba567bfd9c69b3c5/src/Htcc/CRules/Preprocessor.hs | haskell | |
Module : Htcc . CRules . Preprocessor
Description : The rules of preprocessor of C language
Copyright : ( c ) roki , 2019
License : MIT
Maintainer :
Stability : experimental
Portability : POSIX
The rules of preprocessor of C language
Module : Htcc.CRules.Preprocessor
Descri... | |
1aafce41e21ef8b76f8fe5ab366711bc383d750ddd0cc0fdf0a43b7e0ee142e4 | metasoarous/semantic-csv | transducers_test.clj | (ns semantic-csv.transducers-test
(:require [semantic-csv.transducers :refer :all]
[clojure-csv.core :as csv]
[clojure.test :refer :all]))
(deftest mappify-test
(let [data [["this" "that"]
["x" "y"]
["# some comment"]]]
(testing "mappify should work"
(... | null | https://raw.githubusercontent.com/metasoarous/semantic-csv/10f436bacf2ca9ed2f22ffbbecea6467ba20c2e4/test/semantic_csv/transducers_test.clj | clojure | (ns semantic-csv.transducers-test
(:require [semantic-csv.transducers :refer :all]
[clojure-csv.core :as csv]
[clojure.test :refer :all]))
(deftest mappify-test
(let [data [["this" "that"]
["x" "y"]
["# some comment"]]]
(testing "mappify should work"
(... | |
ed750b599719b84bd814f57ac22878c54da5361815bb2b7652e97cb086cc87b6 | xmonad/xmonad-contrib | XPropManage.hs | # LANGUAGE ScopedTypeVariables #
-----------------------------------------------------------------------------
-- |
-- Module : XMonad.Hooks.XPropManage
-- Description : ManageHook matching on XProperties.
Copyright : ( c ) < >
-- License : BSD
--
Maintainer : < >
-- Stability : unstable... | null | https://raw.githubusercontent.com/xmonad/xmonad-contrib/3058d1ca22d565b2fa93227fdde44d8626d6f75d/XMonad/Hooks/XPropManage.hs | haskell | ---------------------------------------------------------------------------
|
Module : XMonad.Hooks.XPropManage
Description : ManageHook matching on XProperties.
License : BSD
Stability : unstable
Portability : unportable
A ManageHook matching on XProperties.
-----------------------------------... | # LANGUAGE ScopedTypeVariables #
Copyright : ( c ) < >
Maintainer : < >
module XMonad.Hooks.XPropManage (
xPropManageHook, XPropMatch, pmX, pmP
) where
import Control.Exception as E
import Control.Monad.Trans (lift)
import XMonad
import XMonad.Prelude (Endo (..), ch... |
74203dfc6e1cf9c8953bd77d843c31037170820251835b341cd71031af1c1db6 | jebberjeb/reframe-fsm | project.clj | (defproject reframe-fsm "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha14"]
Clojurescript
[org.clojure/clojurescript "1.9.293" :scope "provided"]
Pedes... | null | https://raw.githubusercontent.com/jebberjeb/reframe-fsm/a88be427d33b0b3adeb1d359c2c6ce5cad2be825/register-no-fsm/project.clj | clojure | Reframe | (defproject reframe-fsm "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0-alpha14"]
Clojurescript
[org.clojure/clojurescript "1.9.293" :scope "provided"]
Pedes... |
254b219042757a97bace76714ee067cb1f6f4e66b06fd2a51d306e402c20ca1f | LdBeth/CLFSWM | clfswm.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: Main functions
;;; --------------------------------------------------------------------------
;;;
... | null | https://raw.githubusercontent.com/LdBeth/CLFSWM/4e936552d1388718d2947a5f6ca3eada19643e75/src/clfswm.lisp | lisp | --------------------------------------------------------------------------
CLFSWM - FullScreen Window Manager
--------------------------------------------------------------------------
Documentation: Main functions
--------------------------------------------------------------------------
This program is free ... | ( C ) 2005 - 2015 < >
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
(in-package :clfswm)
(defparameter *clfswm-initializing* nil)
(def... |
8f7d16e72848dfe274de39ef904b9639d02ef73f3e73f3c6e7ecaafc95157be7 | jabber-at/ejabberd | gen_mod.erl | %%%----------------------------------------------------------------------
%%% File : gen_mod.erl
Author : < >
%%% Purpose :
Created : 24 Jan 2003 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under t... | null | https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/gen_mod.erl | erlang | ----------------------------------------------------------------------
File : gen_mod.erl
Purpose :
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 it will be useful,
but WITHOUT ANY WARRANTY; without... | Author : < >
Created : 24 Jan 2003 by < >
ejabberd , Copyright ( C ) 2002 - 2018 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
... |
8fb13cdf14a555cd5b590822801e3f7f4072dbefc0d2613bd35b507845308561 | pallet/pallet | utils.clj | (ns pallet.utils
"Utilities used across pallet."
(:require
[clojure.java.io :as io]
[clojure.pprint :as pprint]
[clojure.string :as string]
[clojure.tools.logging :as logging]
[pallet.common.deprecate :refer [deprecated]])
(:import
(java.security MessageDigest NoSuchAlgorithmException)
(org.a... | null | https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/src/pallet/utils.clj | clojure | require failed on previous attempt
require on a bad namespace still instantiates the namespace
this is a potential cause of non-unique names
see | (ns pallet.utils
"Utilities used across pallet."
(:require
[clojure.java.io :as io]
[clojure.pprint :as pprint]
[clojure.string :as string]
[clojure.tools.logging :as logging]
[pallet.common.deprecate :refer [deprecated]])
(:import
(java.security MessageDigest NoSuchAlgorithmException)
(org.a... |
c95693a74787effdd6982af13bf859e8f2d1741255096d7aac58155a3af549f0 | exercism/common-lisp | example.lisp | (defpackage :isogram
(:use :common-lisp)
(:export :isogram-p))
(in-package :isogram)
(defun isogram-p (xs)
(let ((chars-only (remove-if-not #'alpha-char-p xs)))
(string-equal chars-only
(remove-duplicates chars-only :test #'char-equal))))
| null | https://raw.githubusercontent.com/exercism/common-lisp/398ad2bafb5d50d72b82efe10a9838dc28b6be78/exercises/practice/isogram/.meta/example.lisp | lisp | (defpackage :isogram
(:use :common-lisp)
(:export :isogram-p))
(in-package :isogram)
(defun isogram-p (xs)
(let ((chars-only (remove-if-not #'alpha-char-p xs)))
(string-equal chars-only
(remove-duplicates chars-only :test #'char-equal))))
| |
e292b91c7e734f1812eb764d5da00e6b19b783220b4c8a9bd886ff2078219c9b | lambdageek/unbound-generics | Alpha.hs | {-# OPTIONS_HADDOCK show-extensions #-}
-- |
Module : Unbound . Generics . LocallyNameless . Alpha
Copyright : ( c ) 2014 ,
-- License : BSD3 (See LICENSE)
Maintainer :
-- Stability : experimental
--
-- Use the 'Alpha' typeclass to mark types that may contain 'Name's.
# LANGUAGE DefaultSignatures
... | null | https://raw.githubusercontent.com/lambdageek/unbound-generics/a2a558058012b09bb313b3eb03cddb734fcf4a98/src/Unbound/Generics/LocallyNameless/Alpha.hs | haskell | # OPTIONS_HADDOCK show-extensions #
|
License : BSD3 (See LICENSE)
Stability : experimental
Use the 'Alpha' typeclass to mark types that may contain 'Name's.
* Name-aware opertions
* Binder variables
* Implementation details
* Internal
** Interal helpers for gfreshen
| Some 'Alpha' operations need to rec... | Module : Unbound . Generics . LocallyNameless . Alpha
Copyright : ( c ) 2014 ,
Maintainer :
# LANGUAGE DefaultSignatures
, FlexibleContexts
, TypeOperators
, RankNTypes
#
, FlexibleContexts
, TypeOperators
, RankNTy... |
cdcdf3a68f9196afc2d9547d009b0336ec1c1a0bf967018deed76e338c672da0 | aantron/dream | site_prefix.ml | This file is part of Dream , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2021
for details, or visit .
Copyright 2021 Anton Bachin *)
module Formats = Dream_pure.Formats
module Message = Dream_pure.Message
module Stream = Dream_pure.Stream
let rec match... | null | https://raw.githubusercontent.com/aantron/dream/536c4a41db5f1735f8832d2735234e27bcd68702/src/server/site_prefix.ml | ocaml | TODO The path and prefix representations and accessors need a cleanup. | This file is part of Dream , released under the MIT license . See LICENSE.md
for details , or visit .
Copyright 2021
for details, or visit .
Copyright 2021 Anton Bachin *)
module Formats = Dream_pure.Formats
module Message = Dream_pure.Message
module Stream = Dream_pure.Stream
let rec match... |
4b2231c2235bc0c766da35ff431a295015a2d2c581faf6be9b78038560c3571b | tilk/yieldfsm | Lang.hs | |
Copyright : ( C ) 2022 : BSD2 ( see the file LICENSE )
Maintainer : < >
Defines the YieldFSM language .
Copyright : (C) 2022 Marek Materzok
License : BSD2 (see the file LICENSE)
Maintainer : Marek Materzok <>
Defines the YieldFSM language.
-}
module FSM.Lang where
import qualified... | null | https://raw.githubusercontent.com/tilk/yieldfsm/bf86708eab22faec90c63cb15b0ac94c7005724b/src/FSM/Lang.hs | haskell | |
Represents the intermediate language used.
Type-level naturals are used in order to leverage type-level inequalities
for testing for language features.
^ Source language.
^ Language with loops, but without outputs.
^ Desugared language.
^ Lambda-lifted language.
^ Normalized language.
| Type-level negated ineq... | |
Copyright : ( C ) 2022 : BSD2 ( see the file LICENSE )
Maintainer : < >
Defines the YieldFSM language .
Copyright : (C) 2022 Marek Materzok
License : BSD2 (see the file LICENSE)
Maintainer : Marek Materzok <>
Defines the YieldFSM language.
-}
module FSM.Lang where
import qualified... |
1140993e86430027ee5c8003ad23fa46a31281c69c46c558d91c6621141824fd | ygrek/mldonkey | gzip.mli | (***********************************************************************)
(* *)
The library
(* *)
, projet Cristal , ... | null | https://raw.githubusercontent.com/ygrek/mldonkey/e136e7436c7d0f47f7222e43daa56ed721d12b0e/src/utils/cdk/gzip.mli | ocaml | *********************************************************************
the special exception on linking descr... | The library
, projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Pu... |
45e0f1f20ad4ab84ba2e4cf7f4f572c7842ff7bc62a30f1561cb60e2ffe75694 | Mesabloo/nihil | Runtime.hs | # LANGUAGE BlockArguments #
# LANGUAGE LambdaCase #
{-# LANGUAGE RankNTypes #-}
module Nihil.Runtime
( eval
-- * Re-exports
, module Nihil.Runtime.Core ) where
import Nihil.Runtime.Core
import Nihil.Runtime.Interpreter | null | https://raw.githubusercontent.com/Mesabloo/nihil/3821052ca5691a6492b23bd8a46bfe70567d374f/src/runtime/Nihil/Runtime.hs | haskell | # LANGUAGE RankNTypes #
* Re-exports | # LANGUAGE BlockArguments #
# LANGUAGE LambdaCase #
module Nihil.Runtime
( eval
, module Nihil.Runtime.Core ) where
import Nihil.Runtime.Core
import Nihil.Runtime.Interpreter |
e1cad99ed1985ed71f01099962559fd488747b5b327e9a34579bac16b0b88e2f | well-typed/recover-rtti | ClosureTree.hs | {-# LANGUAGE BangPatterns #-}
module Debug.RecoverRTTI.ClosureTree (
showClosureTree
) where
import Data.List
import GHC.Exts.Heap
-- | Show closure tree up to the given depth
--
-- Used only for internal debugging
showClosureTree :: Int -> a -> IO String
showClosureTree = \d -> go d 0 . asBox
where
go :... | null | https://raw.githubusercontent.com/well-typed/recover-rtti/57c45f9352cda7e385ef9b4c525dbd7b9f979e32/src/Debug/RecoverRTTI/ClosureTree.hs | haskell | # LANGUAGE BangPatterns #
| Show closure tree up to the given depth
Used only for internal debugging |
module Debug.RecoverRTTI.ClosureTree (
showClosureTree
) where
import Data.List
import GHC.Exts.Heap
showClosureTree :: Int -> a -> IO String
showClosureTree = \d -> go d 0 . asBox
where
go :: Int -> Int -> Box -> IO String
go 0 _ _ = return ""
go d i x = do
closure <- getBoxedClosureData... |
f20258d8b927dbc18984bc10f591329e5b6dd0da6799f0ad115170f802ad3824 | racket/gui | keybinding-lang.rkt | #lang scheme
(require mred
string-constants
framework
scheme/class)
(provide (rename-out (kl-module-begin #%module-begin))
(except-out (all-from-out scheme) #%module-begin)
(all-from-out framework
mred
scheme/class))
(define-sy... | null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/framework/keybinding-lang.rkt | racket | #lang scheme
(require mred
string-constants
framework
scheme/class)
(provide (rename-out (kl-module-begin #%module-begin))
(except-out (all-from-out scheme) #%module-begin)
(all-from-out framework
mred
scheme/class))
(define-sy... | |
a9af25c8597f61ccf0afab231300230f48169096f246fd234387d7163cbde63e | naproche/naproche | Structure.hs | -- |
Authors : ( 2001 - 2008 ) ,
( 2017 - 2018 )
--
-- Syntax of ForTheL sections.
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
module SAD.ForTheL.Structure (forthel) where
import Data.List
import Data.Maybe
import Data.Char (isAlphaNum)
import Control.Applicative
import Control.M... | null | https://raw.githubusercontent.com/naproche/naproche/6284a64b4b84eaa53dd0eb7ecb39737fb9135a0d/src/SAD/ForTheL/Structure.hs | haskell | |
Syntax of ForTheL sections.
# LANGUAGE OverloadedStrings #
| Parse a top-level block:
@<topLevelSection> | <instruction> | <macro> | <pretyping>@
| Parse a top-level section:
@<signature> | <definition> | <axiom> | <theorem>@
* Top-level sections
| @beginTopLevelSection keywords@ parses @"\\begin" "{" <keywo... | Authors : ( 2001 - 2008 ) ,
( 2017 - 2018 )
# LANGUAGE NamedFieldPuns #
module SAD.ForTheL.Structure (forthel) where
import Data.List
import Data.Maybe
import Data.Char (isAlphaNum)
import Control.Applicative
import Control.Monad
import Control.Monad.State.Class (modify)
import Data.Text.Lazy (Text... |
46d14e98931e8b7415b2227625ddbfc2d091ad88e9b408475809b7c142567058 | zenspider/schemers | exercise.1.25.scm | #lang racket/base
Exercise 1.25 :
complains that we went to a lot of extra work in
;; writing `expmod'. After all, she says, since we already know how to
;; compute exponentials, we could have simply written
(define (square n) (* n n))
(define (old-expmod base exp m)
(cond ((= exp 0) 1)
((even? exp... | null | https://raw.githubusercontent.com/zenspider/schemers/2939ca553ac79013a4c3aaaec812c1bad3933b16/sicp/ch_1/exercise.1.25.scm | scheme | writing `expmod'. After all, she says, since we already know how to
compute exponentials, we could have simply written
Is she correct? Would this procedure serve as well for our fast
prime tester? Explain.
so... it appears to be faster only for smaller primes. For larger
primes, it seems to do a lot more work... ... | #lang racket/base
Exercise 1.25 :
complains that we went to a lot of extra work in
(define (square n) (* n n))
(define (old-expmod base exp m)
(cond ((= exp 0) 1)
((even? exp) (remainder (square (expmod base (/ exp 2) m)) m))
(else (remainder (* base (expmod base (- exp 1) m)) m))))
... |
d2b47e9ed9dadd7cae2fa9e762287f315afb0d9cec3a01edc67648538fd1a08a | camlspotter/ocaml-zippy-tutorial-in-japanese | w17.ml | Warning 17 : the virtual method x is not declared .
class virtual c = object (self)
method y = self#x + 1
end
| null | https://raw.githubusercontent.com/camlspotter/ocaml-zippy-tutorial-in-japanese/c6aeabc08b6e2289a0e66c5b94a89c6723d88a6a/t/warnings/w17.ml | ocaml | Warning 17 : the virtual method x is not declared .
class virtual c = object (self)
method y = self#x + 1
end
| |
3b99b27f615404383ec1cd633830c120bce47ce651b5714507ff5dbf876a6e6b | haskell-repa/repa | InstProduct.hs | # OPTIONS_GHC -fno - warn - orphans -fno - warn - incomplete - patterns #
{-# LANGUAGE UndecidableInstances #-}
module Data.Repa.Array.Material.Auto.InstProduct
where
import Data.Repa.Array.Material.Auto.Base as A
import Data.Repa.Array.Material.Auto.InstUnit as A
import Data.Repa.Array.Meta.Window ... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-array/Data/Repa/Array/Material/Auto/InstProduct.hs | haskell | # LANGUAGE UndecidableInstances #
-------------------------------------------------------------------------------------------------
Arrays of products are stored in columnar format to allow easy selecting
and addition of columns.
Bool. The unit colunm is stored as a simple count of the number of elements,
an... | # OPTIONS_GHC -fno - warn - orphans -fno - warn - incomplete - patterns #
module Data.Repa.Array.Material.Auto.InstProduct
where
import Data.Repa.Array.Material.Auto.Base as A
import Data.Repa.Array.Material.Auto.InstUnit as A
import Data.Repa.Array.Meta.Window as A
import Data.Repa.Array.Internals... |
3fabd583178dc5168d1903f3ffc7125b4a3a7b2c3ed1a04402e09b3845f73623 | input-output-hk/cardano-wallet | Transactions.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE NumericUnderscores #
# LANGUAGE OverloadedLabels #
# LANGUAGE QuasiQuotes #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Test.Integration.Scena... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/7b0192110fe226f992bca6198b8ee83fa4a37f46/lib/wallet/integration/src/Test/Integration/Scenario/API/Byron/Transactions.hs | haskell | # LANGUAGE RankNTypes #
pick out an asset to send
pick out an asset to send
pick out an asset to send
pick an asset from the fixture wallet
NOTE
Special legacy wallets where addresses have been generated from a | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE NumericUnderscores #
# LANGUAGE OverloadedLabels #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
module Test.Integration.Scenario.API.Byron.Transactions
... |
5b9d1c1d4fdbe6b107c98ce45be11a789537398f22a224ee5c7a1ff60ea88080 | JustusAdam/language-haskell | Arrows.hs | SYNTAX TEST " source.haskell " " Arrow keywords "
h a b = proc (a, r) -> do rec
-- ^^ keyword.operator.arrow.haskell
^^^^ keyword.control.proc.haskell
^^ keyword.control.do.haskell
-- ^^^ keyword.control.rec.haskell
(f -< (a, r)) `h` ... | null | https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tests/Arrows.hs | haskell | ^^ keyword.operator.arrow.haskell
^^^ keyword.control.rec.haskell
^ keyword.operator.lambda.haskell
^^ keyword.operator.arrow.haskell | SYNTAX TEST " source.haskell " " Arrow keywords "
h a b = proc (a, r) -> do rec
^^^^ keyword.control.proc.haskell
^^ keyword.control.do.haskell
(f -< (a, r)) `h` \e -> g -< ((a, e), r)
^^ ^^ keyword.operator.arrow.left.tail.haskell |
06e63e66f2edcd296c62d47e240598ddbddeed38cd65db96cfde09940cd6854e | exercism/scheme | example.scm | (import (rnrs))
(define hello-world
"Hello, World!")
| null | https://raw.githubusercontent.com/exercism/scheme/aa880e6222a393fcf5d672decb5c5dd6fae286ff/exercises/practice/hello-world/.meta/example.scm | scheme | (import (rnrs))
(define hello-world
"Hello, World!")
| |
3973b426712616e7a9faa1b278f2717d7c673af7848d969d09fa7b2b85a948d2 | RefactoringTools/HaRe | D4.hs | module Renaming.D4 where
{-Rename instance name 'isSame'' to 'sameOrNot'.
This refactoring affects module `D4', 'B4' and 'C4' -}
data Tree a = Leaf a | Branch (Tree a) (Tree a)
fringe :: Tree a -> [a]
fringe (Leaf x ) = [x]
fringe (Branch left right) = fringe left ++ fringe right
class SameOrNot a where
isSame... | null | https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/Renaming/D4.hs | haskell | Rename instance name 'isSame'' to 'sameOrNot'.
This refactoring affects module `D4', 'B4' and 'C4' | module Renaming.D4 where
data Tree a = Leaf a | Branch (Tree a) (Tree a)
fringe :: Tree a -> [a]
fringe (Leaf x ) = [x]
fringe (Branch left right) = fringe left ++ fringe right
class SameOrNot a where
isSame :: a -> a -> Bool
isNotSame :: a -> a -> Bool
instance SameOrNot Int where
isSame a b = a == b
... |
f53c86cb512572e9037727ce5447c21d3a9e99e1ce754353833c1b12528ed5da | tweag/sparkle | Row.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE LinearTypes #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QualifiedDo #
# LANGUAGE QuasiQuotes #
# LANGUAGE Scope... | null | https://raw.githubusercontent.com/tweag/sparkle/24b8c452e67b414f93e4d7fc8c54c7175ddb1b2f/src/linear-types/Control/Distributed/Spark/Safe/SQL/Row.hs | haskell | # LANGUAGE LinearTypes #
# LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE QualifiedDo #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFam... |
0c1124a74a088d4025716d471ff6bad99a1ae1b7b02f820a487892e416d30aab | dmitryvk/sbcl-win32-threads | subprim.lisp | ;;;; linkage information for standard static functions, and
;;;; miscellaneous VOPs
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public do... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/compiler/x86-64/subprim.lisp | lisp | linkage information for standard static functions, and
miscellaneous VOPs
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
LENGTH
Move OBJECT into a temp we can bash on, and initialize the ... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!VM")
(define-vop (length/list)
(:translate length)
(:args (object :scs (descriptor-reg control-stack) ... |
4107c41b0d7e69080614f3d07e02432046b80a5e6acad7edd9e7641ad364a14b | jimpil/clambda | jlambda.clj | (ns clambda.jlambda
(:import (java.util.function Predicate Function BiFunction
Supplier LongSupplier IntSupplier DoubleSupplier
Consumer BiConsumer LongConsumer IntConsumer UnaryOperator DoubleConsumer
IntUnaryOperator LongUn... | null | https://raw.githubusercontent.com/jimpil/clambda/176831945e12e0736cee00b53d2b9a6a1b8c6964/src/clambda/jlambda.clj | clojure | helper macros to remove boilerplate
=========================================================
============<PREDICATES>=========
=================================
=========<FUNCTIONS>=============
===================================
===========<CONSUMERS>=============
====================================
==========<SUPP... | (ns clambda.jlambda
(:import (java.util.function Predicate Function BiFunction
Supplier LongSupplier IntSupplier DoubleSupplier
Consumer BiConsumer LongConsumer IntConsumer UnaryOperator DoubleConsumer
IntUnaryOperator LongUn... |
7b302c89270ad528c04d5bd40bb1e4cb55295ddc5b22a8aa3e71a5567413f40e | skydeck/twilio-ocaml | response_test.ml | let assert_equal ~printer ~msg ~expected actual =
if expected = actual then
()
else
raise (Failure (Printf.sprintf "%s expected [%s] but got [%s]"
msg
(printer expected)
(printer actual)
)
)
let assert_string ~ms... | null | https://raw.githubusercontent.com/skydeck/twilio-ocaml/a05e4a811c520aab4a5066626954c983b1de0560/test/response_test.ml | ocaml | * Use the examples from the API documentation to make sure we created the correct atd
definitions | let assert_equal ~printer ~msg ~expected actual =
if expected = actual then
()
else
raise (Failure (Printf.sprintf "%s expected [%s] but got [%s]"
msg
(printer expected)
(printer actual)
)
)
let assert_string ~ms... |
a744d441dff28d17e79ac3e39f123fbebb8b0e5d1e466ebe49a8af32e432fbb5 | robert-strandh/SICL | random-state-defgeneric.lisp | (cl:in-package #:sicl-random)
(defgeneric seed-random-state (state seed)
(:documentation "Initializes and sets the initial seed of STATE."))
(defgeneric read-random-state (state)
(:documentation "Returns the next random number from STATE and prepares the next one."))
(defgeneric copy-random-state (state)
(:docum... | null | https://raw.githubusercontent.com/robert-strandh/SICL/59656d5027857155ffeb408f16b40fd1d41edca9/Code/Random/random-state-defgeneric.lisp | lisp | (cl:in-package #:sicl-random)
(defgeneric seed-random-state (state seed)
(:documentation "Initializes and sets the initial seed of STATE."))
(defgeneric read-random-state (state)
(:documentation "Returns the next random number from STATE and prepares the next one."))
(defgeneric copy-random-state (state)
(:docum... | |
aa5d6cdee684efc277dd6dca7a80e39416b92f8b367245d2257da678e8424c60 | YoshikuniJujo/test_haskell | MakePng.hs | # LANGUAGE LambdaCase #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module MakePng where
import Data.Int
import Data.CairoContext
import Data.CairoImage
import Data.JuicyCairo
import Codec.Picture
import Graphics.Cairo.Drawing.CairoT
import Graphics.Cairo.Surfaces.ImageSurfaces
import Graphics.Cairo.Values
pngWith :: F... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/394f9134dedf34747aa383a7ea17ae702b59d408/themes/gui/cairo/try-simple-cairo-new/src/MakePng.hs | haskell | # LANGUAGE LambdaCase #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module MakePng where
import Data.Int
import Data.CairoContext
import Data.CairoImage
import Data.JuicyCairo
import Codec.Picture
import Graphics.Cairo.Drawing.CairoT
import Graphics.Cairo.Surfaces.ImageSurfaces
import Graphics.Cairo.Values
pngWith :: F... | |
2c5cabaa41b13ba931480455b8e037df202cb3c00babae458b9c18b76d4f99c1 | haskell/ghcide | LanguageServer.hs | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE ExistentialQuantification #
{-# LANGUAGE RankNTypes #-}
-- WARNING: A copy of DA.Daml.LanguageServer, try to keep them in sync
-- This version removes the daml: handling
module Devel... | null | https://raw.githubusercontent.com/haskell/ghcide/3ef4ef99c4b9cde867d29180c32586947df64b9e/src/Development/IDE/LSP/LanguageServer.hs | haskell | # LANGUAGE RankNTypes #
WARNING: A copy of DA.Daml.LanguageServer, try to keep them in sync
This version removes the daml: handling
Move stdout to another file descriptor and duplicate stderr
to stdout. This guards against stray prints from corrupting the JSON-RPC
message stream.
Print out a singl... | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE ExistentialQuantification #
module Development.IDE.LSP.LanguageServer
( runLanguageServer
) where
import Language.Haskell.LSP.Types
import Language.Haskell.LSP.Types.Cap... |
c0427b694e991ca7e45f63a2d1e61728da00281393d11241321d95c61005ddfd | janestreet/memtrace_viewer_with_deps | ppx_string.ml | open Base
open Ppxlib
open Ast_builder.Default
module Where = struct
type t =
| Imprecise of Location.t
| Precise of { mutable position : position }
let is_precise = function
| Imprecise _ -> false
| Precise _ -> true
;;
let advance position char =
let pos_cnum = position.pos_cnum + 1 in
... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/ppx_string/src/ppx_string.ml | ocaml | open Base
open Ppxlib
open Ast_builder.Default
module Where = struct
type t =
| Imprecise of Location.t
| Precise of { mutable position : position }
let is_precise = function
| Imprecise _ -> false
| Precise _ -> true
;;
let advance position char =
let pos_cnum = position.pos_cnum + 1 in
... | |
722a99122331505f81dd0543b8fa6d5ddf735f1ffcb9a196827cee2519f6c107 | sgbj/MaximaSharp | bf-cobyla.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 1.222 2010/10/08 03:05:30 "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.204 2010/02/23 05:21:30 "
" f2cl6.l , v 1.48 2008/08/... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/share/cobyla/lisp/bf-cobyla.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 1.222 2010/10/08 03:05:30 "
" f2cl2.l , v 1.37 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Exp $ "
" f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Exp $ "
" f2cl5.l , v 1.204 2010/02/23 05:21:30 "
" f2cl6.l , v 1.48 2008/08/24 00:56:27 rtoy Exp $ "
" ... |
2e365f7dadf4e08c19370589cb2a9dab36c8a5060fc4a6cf6e95d3eca32b02ed | amuletml/amulet | Prove.hs | # LANGUAGE OverloadedStrings , RankNTypes , FlexibleContexts ,
ScopedTypeVariables , CPP , PatternSynonyms #
ScopedTypeVariables, CPP, PatternSynonyms #-}
#ifdef WITH_SERVER
# LANGUAGE RecordWildCards #
#endif
module Main where
import System.Console.Haskeline hiding (display)
import System.Environment
impor... | null | https://raw.githubusercontent.com/amuletml/amulet/f5c3f5f073b85e2a6ab105dcd296332882d0d348/bin/Prove.hs | haskell | # LANGUAGE OverloadedStrings , RankNTypes , FlexibleContexts ,
ScopedTypeVariables , CPP , PatternSynonyms #
ScopedTypeVariables, CPP, PatternSynonyms #-}
#ifdef WITH_SERVER
# LANGUAGE RecordWildCards #
#endif
module Main where
import System.Console.Haskeline hiding (display)
import System.Environment
impor... | |
9b956cc4f8b29d16fa65c0829c112fcf48353fc2ce44168577172bf559a4e57b | robert-strandh/SICL | with-proper-list-elements-defmacro.lisp | (cl:in-package #:sicl-cons)
(defmacro with-proper-list-elements ((element-var list function-name) &body body)
(let ((list-var (gensym))
(rest-var (gensym)))
`(loop with ,list-var = ,list
for ,rest-var = ,list-var then (rest ,rest-var)
for ,element-var = (if (atom ,rest-var) nil (fir... | null | https://raw.githubusercontent.com/robert-strandh/SICL/7e4f5e56a9ca8575d4de40d486bfaf20998694c9/Code/Cons/with-proper-list-elements-defmacro.lisp | lisp | (cl:in-package #:sicl-cons)
(defmacro with-proper-list-elements ((element-var list function-name) &body body)
(let ((list-var (gensym))
(rest-var (gensym)))
`(loop with ,list-var = ,list
for ,rest-var = ,list-var then (rest ,rest-var)
for ,element-var = (if (atom ,rest-var) nil (fir... | |
4c9df5e079ab96c65964067712565b0135d982213505afc0f30b5804a6e429f2 | fukamachi/woo | ipv6.lisp | (in-package :cl-user)
(defpackage woo-test.ipv6
(:use :cl
:rove)
(:import-from :clack.test
:testing-app
:*clackup-additional-args*)
(:import-from :clack.test.suite
:localhost))
(in-package :woo-test.ipv6)
(let ((clack.test:*clackup-additional-args* '(:addre... | null | https://raw.githubusercontent.com/fukamachi/woo/fba3567be95ed6e782d98a4c1477d3a74b8ad124/t/ipv6.lisp | lisp | (in-package :cl-user)
(defpackage woo-test.ipv6
(:use :cl
:rove)
(:import-from :clack.test
:testing-app
:*clackup-additional-args*)
(:import-from :clack.test.suite
:localhost))
(in-package :woo-test.ipv6)
(let ((clack.test:*clackup-additional-args* '(:addre... | |
00b9b22cc9df7be4cc9bf3eb78d26842248265d5258157eace034eef901b3156 | exoscale/clojure-kubernetes-client | v1_rbd_volume_source.clj | (ns clojure-kubernetes-client.specs.v1-rbd-volume-source
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-local-object-reference :refer :all]
)
(:import (java.io File)))
(declare v1-rbd-volume-source-data v1-rbd-volume-sourc... | null | https://raw.githubusercontent.com/exoscale/clojure-kubernetes-client/79d84417f28d048c5ac015c17e3926c73e6ac668/src/clojure_kubernetes_client/specs/v1_rbd_volume_source.clj | clojure | (ns clojure-kubernetes-client.specs.v1-rbd-volume-source
(:require [clojure.spec.alpha :as s]
[spec-tools.data-spec :as ds]
[clojure-kubernetes-client.specs.v1-local-object-reference :refer :all]
)
(:import (java.io File)))
(declare v1-rbd-volume-source-data v1-rbd-volume-sourc... | |
02532b9e9eb988ca920d94a3509b458e29482c4b4e53cfb48d2b56c97a8087cb | felixmulder/haskell-in-production | SimpleHttp.hs | -- | This module supplies a very simplified HTTP interface for the purposes of
-- illustrating how to build production grade haskell services.
--
-- The focus for this illustration is not on mastering a specific API, rather
-- techniques like dependency injection and parameterization of components.
--
Ergo - ... | null | https://raw.githubusercontent.com/felixmulder/haskell-in-production/ff3431f01342b8689d3449007759706d0bba6488/part-1-testable-components/src/Web/SimpleHttp.hs | haskell | | This module supplies a very simplified HTTP interface for the purposes of
illustrating how to build production grade haskell services.
The focus for this illustration is not on mastering a specific API, rather
techniques like dependency injection and parameterization of components.
illustration purpoes... | Ergo - do n't think too hard on what 's in this module , it 's for
module Web.SimpleHttp
( run
, matches
, ToResponse(..)
) where
import Prelude
import Data.Text (Text)
import qualified Data.Text as T
import Data.Text.Lazy (toStrict, fromStrict)
import qualified Data.Text.En... |
83a61369855631f8a5ab8df6c01a209fc5747fd42b53da314dada3001e07d00c | fredfeng/CS162 | closure.ml | let x = 1;;
let f y = x + y;;
let x = 2;;
let y = 3;;
f (x + y);;
let x = 1;;
let f y =
let x = 2 in
fun z -> x + y + z
;;
let x = 100;;
let g = (f 4);;
let y = 100;;
(g 1);;
| null | https://raw.githubusercontent.com/fredfeng/CS162/6ed049c46f3c04997d4add778b14697840787826/code/closure.ml | ocaml | let x = 1;;
let f y = x + y;;
let x = 2;;
let y = 3;;
f (x + y);;
let x = 1;;
let f y =
let x = 2 in
fun z -> x + y + z
;;
let x = 100;;
let g = (f 4);;
let y = 100;;
(g 1);;
| |
2b585af12889b8198662870d55ddc73786a3d8c1130f1b69d8147a64456e4b03 | vbrankov/hdf5-ocaml | bench_struct.ml | module A = Array
module Particle = struct
[%%h5struct
pressure "Pressure" Float64 Seek;
lati "Latitude" Float64;
longi "Longitude" Float64;
temperature "Temperature" Float64]
end
module Record = struct
[%%h5struct
a "a" Float64;
b "b" Float64;
c "c" Float64;
d "... | null | https://raw.githubusercontent.com/vbrankov/hdf5-ocaml/7abc763189767cd6c92620f29ce98f6ee23ba88f/examples/bench/bench_struct.ml | ocaml | module A = Array
module Particle = struct
[%%h5struct
pressure "Pressure" Float64 Seek;
lati "Latitude" Float64;
longi "Longitude" Float64;
temperature "Temperature" Float64]
end
module Record = struct
[%%h5struct
a "a" Float64;
b "b" Float64;
c "c" Float64;
d "... | |
9b6551655ebc96f1af00421bf51abbdb941fd76f7187787453c4995f00837cd0 | heechul/crest-z3 | whitetrack.ml |
open Cabs
open Cabshelper
(* This isn't the most efficient way to do things.
* It would probably be better to not reparse rather
* than keep the tokens in memory *)
(* In particular, most of the tokens we hold will be
header files that we don't need *)
map to token indexes
(* TODO: gather until end of line... | null | https://raw.githubusercontent.com/heechul/crest-z3/cfcebadddb5e9d69e9956644fc37b46f6c2a21a0/cil/src/frontc/whitetrack.ml | ocaml | This isn't the most efficient way to do things.
* It would probably be better to not reparse rather
* than keep the tokens in memory
In particular, most of the tokens we hold will be
header files that we don't need
TODO: gather until end of line, then decide where to split
NOTE: If you find yourself getting... |
open Cabs
open Cabshelper
map to token indexes
let tokenmap : ((string * int),int) Hashtbl.t = Hashtbl.create 1000
let nextidx = ref 0
let gonebad = ref false
let tokens = GrowArray.make 0 (GrowArray.Elem ("",""))
let cabsloc_to_str cabsloc =
cabsloc.filename ^ ":" ^ string_of_int cabsloc.lineno ^ ":"... |
6738db3ba648804f826d99efbd027d4b60ae3cdc1eeb086bb327be93e7b89c24 | Drup/dowsing | test_unification.ml | let all_tests = ref []
let test_cnt = ref 0
let add_tests name tests =
all_tests := ! all_tests @ [ name, tests ]
(* Unification.unifiable *)
let pos_tests = [
(* com-2 *)
"a * b", "b * a" ;
"a * (b * c)", "(c * b) * a" ;
"(a * b) f", "(b * a) f" ;
"a * b -> c", "b * a -> c" ;
"(a * b) f * c", "(b * a) ... | null | https://raw.githubusercontent.com/Drup/dowsing/6bf6800fdac2efef954e266b46cdabb5c5c08d84/test/unit_tests/test_unification.ml | ocaml | Unification.unifiable
com-2
ass-2
ass-0
currification + unification
other
currification + unification
other
require occur check
do test
Change for slow tests | let all_tests = ref []
let test_cnt = ref 0
let add_tests name tests =
all_tests := ! all_tests @ [ name, tests ]
let pos_tests = [
"a * b", "b * a" ;
"a * (b * c)", "(c * b) * a" ;
"(a * b) f", "(b * a) f" ;
"a * b -> c", "b * a -> c" ;
"(a * b) f * c", "(b * a) f * c" ;
"(a * b) f -> c", "(b * a) f ->... |
bf9be978eafd5401a7f36933190cb6fc80575df195d63572c2978f16194c5753 | crategus/cl-cffi-gtk | rtest-cairo-image-surface.lisp | (def-suite cairo-image-surface :in cairo-suite)
(in-suite cairo-image-surface)
;;; --- Types and Values -------------------------------------------------------
;;; CAIRO_HAS_IMAGE_SURFACE
;;; cairo_format_t
;;; --- Functions --------------------------------------------------------------
;;; cairo_forma... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/22156e3e2356f71a67231d9868abcab3582356f3/test/rtest-cairo-image-surface.lisp | lisp | --- Types and Values -------------------------------------------------------
CAIRO_HAS_IMAGE_SURFACE
cairo_format_t
--- Functions --------------------------------------------------------------
cairo_format_stride_for_width
cairo_image_surface_create
cairo_image_surface_create_for_data
ca... | (def-suite cairo-image-surface :in cairo-suite)
(in-suite cairo-image-surface)
(test cairo-format-stride-for-width
(is (= 400 (cairo-format-stride-for-width :argb32 100)))
(is (= 400 (cairo-format-stride-for-width :rgb24 100)))
(is (= 100 (cairo-format-stride-for-width :a8 100)))
(is (= 16 (cairo-format-... |
1b145ea2aa97b969dcb382a27f3cd3d22ca456e9c4afea091ab41d41840e6381 | modular-macros/ocaml-macros | static_values.ml | static x = 42
;;
let y = succ x (* Error: phase mismatch *)
;;
static () = Printf.printf "%d\n" x (* Error: this module is at phase 0 *)
;;
static () = ~Printf.printf "%d\n" x
;;
let () = Printf.printf "%d\n" $(Expr.of_int x)
;;
| null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/macros/static_values.ml | ocaml | Error: phase mismatch
Error: this module is at phase 0 | static x = 42
;;
;;
;;
static () = ~Printf.printf "%d\n" x
;;
let () = Printf.printf "%d\n" $(Expr.of_int x)
;;
|
0d5dd5dfaac672967ad30e6776b94305a9fe9d4d97c24fbfef7a07d775fbd6b6 | karamellpelle/grid | GLFW.hs | grid is a game written in Haskell
Copyright ( C ) 2018
--
-- This file is part of grid.
--
-- grid is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your optio... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/MEnv/Sound/GLFW.hs | haskell |
This file is part of grid.
grid is free software: you can redistribute it and/or modify
(at your option) any later version.
grid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GN... | grid is a game written in Haskell
Copyright ( C ) 2018
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
module MEnv.Sound.GLFW
(
) where
import MEnv
... |
32cc82844b59685c6ae40b56b43e51002c18f4b1979aa7f33940203ec3ad0855 | aneksteind/Core | Pretty.hs | module Core.Pretty (pprint,
showResults,
showFinalResult,
Printer(..)) where
import Core.Grammar
import Core.G
import qualified Data.Map as M (toList, member, fromList, Map)
data Iseq = INil
| IStr String
| IAppend Iseq Iseq
| ... | null | https://raw.githubusercontent.com/aneksteind/Core/416f53bc25a697dc6f0e40e43f0222c61f69d16b/src/Core/Pretty.hs | haskell | | pretty prints a core program
pretty prints a supercombinator definition
pretty prints expressions
pretty prints case alts
pretty prints let definitions
pretty prints a single expression
pretty prints a string
pretty prints an int
pretty prints digits with proper spacing
prints out a numbered list of other s... | module Core.Pretty (pprint,
showResults,
showFinalResult,
Printer(..)) where
import Core.Grammar
import Core.G
import qualified Data.Map as M (toList, member, fromList, Map)
data Iseq = INil
| IStr String
| IAppend Iseq Iseq
| ... |
a8d688d0b07a2a39ffcfa6a6a1a84bd827d71a35478cf955966cfb5df7cae604 | slyrus/clem | test-typed-mref.lisp |
(in-package :clem-test)
(defmethod test-typed-mref ()
(let ((m (array->matrix #2A((1 2 3)(4 5 6)(7 8 9))
:matrix-class 'double-float-matrix))
(n (array->matrix #2A((2 2 3)(4 5 6)(7 8 9))
:matrix-class 'double-float-matrix))
(p (array->matrix #2A((3... | null | https://raw.githubusercontent.com/slyrus/clem/5eb055bb3f45840b24fd44825b975aa36bd6d97c/test/test-typed-mref.lisp | lisp |
(in-package :clem-test)
(defmethod test-typed-mref ()
(let ((m (array->matrix #2A((1 2 3)(4 5 6)(7 8 9))
:matrix-class 'double-float-matrix))
(n (array->matrix #2A((2 2 3)(4 5 6)(7 8 9))
:matrix-class 'double-float-matrix))
(p (array->matrix #2A((3... | |
555cc3b39f8f2b7e46c2cd3d4230ede2053c27303c6a5663c81b696a6fb63b4d | samply/blaze | system_stats_spec.clj | (ns blaze.db.impl.index.system-stats-spec
(:require
[blaze.db.impl.index.spec]
[blaze.db.impl.index.system-stats :as system-stats]
[blaze.db.kv.spec]
[blaze.db.tx-log.spec]
[clojure.spec.alpha :as s]))
(s/fdef system-stats/new-iterator
:args (s/cat :snapshot :blaze.db/kv-snapshot)
:ret :blaz... | null | https://raw.githubusercontent.com/samply/blaze/e84c106b5ca235600c20ba74fe8a2295eb18f350/modules/db/test/blaze/db/impl/index/system_stats_spec.clj | clojure | (ns blaze.db.impl.index.system-stats-spec
(:require
[blaze.db.impl.index.spec]
[blaze.db.impl.index.system-stats :as system-stats]
[blaze.db.kv.spec]
[blaze.db.tx-log.spec]
[clojure.spec.alpha :as s]))
(s/fdef system-stats/new-iterator
:args (s/cat :snapshot :blaze.db/kv-snapshot)
:ret :blaz... | |
7d2014de2595830686771ff9563c0c2c3a583e39ea37cce0d17a182aa2dbd1fd | returntocorp/semgrep | String_literal.mli | (*
This module is a hack for evaluating string literals.
*)
Evaluate unquoted , escaped string literal contents .
abc\\\'\"def - > abc\'"def
Assumes :
\\ - > \
\ ' - > '
\ " - > "
Other escape sequences are left untouched .
HACK !
Different languages use differ... | null | https://raw.githubusercontent.com/returntocorp/semgrep/70af5900482dd15fcce9b8508bd387f7355a531d/src/engine/String_literal.mli | ocaml |
This module is a hack for evaluating string literals.
|
Evaluate unquoted , escaped string literal contents .
abc\\\'\"def - > abc\'"def
Assumes :
\\ - > \
\ ' - > '
\ " - > "
Other escape sequences are left untouched .
HACK !
Different languages use different escaping rules for their string
literals . This is inc... |
106abd570cafdb27981f07a7d15e78c048ca72392708f74d70a02fb8912ef3f7 | HackingGibsons/clubot | package.lisp | (defpackage #:clubot-cli
(:use #:cl)
(:use :clubot)
(:use :unix-options)
#+sbcl
(:shadowing-import-from :sb-ext quit)
(:export :main
:*self*
:defcommand
:get-command))
(in-package :clubot-cli)
(defvar *self* "clubot" "The name of the binary.")
(defgeneric main (argv)
... | null | https://raw.githubusercontent.com/HackingGibsons/clubot/7f373158cf872130730e3f4a1a56338752fd8e30/src/cli/package.lisp | lisp | Without this we would get reliably random numbers in saved cores
but not otherwise. And by reliably random, I mean identical sequences between
execution. The bad kind. | (defpackage #:clubot-cli
(:use #:cl)
(:use :clubot)
(:use :unix-options)
#+sbcl
(:shadowing-import-from :sb-ext quit)
(:export :main
:*self*
:defcommand
:get-command))
(in-package :clubot-cli)
(defvar *self* "clubot" "The name of the binary.")
(defgeneric main (argv)
... |
55368c7bdc184a43af3392a28ceb602326ae3f38eb049aca07ff13656323d5e5 | chrisdone/duet | Renamer.hs | {-# LANGUAGE MultiWayIf #-}
# LANGUAGE ViewPatterns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
# LANGUAGE FlexibleContexts #
-- At each binding point (lambdas), we need to supply a new unique
-- name, and th... | null | https://raw.githubusercontent.com/chrisdone/duet/959d40db68f4c2df04cabb7677724900d4f71db4/src/Duet/Renamer.hs | haskell | # LANGUAGE MultiWayIf #
At each binding point (lambdas), we need to supply a new unique
name, and then rename everything inside the expression.
first for each top-level thing (which might be mutually
independent), and then run the sub-renaming processes, with the new
substitutions in scope.
It's as simple as th... | # LANGUAGE ViewPatterns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
# OPTIONS_GHC -fno - warn - orphans #
# LANGUAGE LambdaCase #
# LANGUAGE TupleSections #
# LANGUAGE FlexibleContexts #
For each BindGroup , we should generate the list of unique names
module Duet.Renamer
( renameDataTypes
... |
2bba25703a0e10483d6d83dee36913a36aad9395ddde226534da5828dbb5a087 | rvantonder/hack_parallel | value.mli | *
* Copyright ( c ) 2015 , Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD - style license found in the
* LICENSE file in the root directory of this source tree . An additional grant
* of patent rights can be found in the PATENTS file in the same directory .
*... | null | https://raw.githubusercontent.com/rvantonder/hack_parallel/c9d0714785adc100345835c1989f7c657e01f629/src/heap/value.mli | ocaml | ***************************************************************************
Very simple module used to make sure we don't mix keys of different
* type in the heap (cf shared.ml).
* Because we have to "create" a new module every time, we have to make a new
* prefix (cf prefix.ml). Since the prefixes are always diffe... | *
* Copyright ( c ) 2015 , Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD - style license found in the
* LICENSE file in the root directory of this source tree . An additional grant
* of patent rights can be found in the PATENTS file in the same directory .
*... |
2bbc3066b30e5c8b8512d450a789911a1c8cc00febe8f475f235b1e4c42034e7 | lokedhs/cl-gdata | contacts.lisp | (in-package :cl-gdata-contacts)
(alexandria:define-constant +EMAIL-TAG-HOME+ "#home" :test 'equal)
(alexandria:define-constant +EMAIL-TAG-WORK+ "#work" :test 'equal)
(alexandria:define-constant +EMAIL-TAG-OTHER+ "#other" :test 'equal)
(alexandria:define-constant +PHONE-TAG-MOBILE+ "#mobile" :test 'equal)
(alexandria:... | null | https://raw.githubusercontent.com/lokedhs/cl-gdata/3ca1ed63e358ccb4bfbbaa5f09755cc8ef980db6/src/contacts.lisp | lisp | Node set is empty, create a new node | (in-package :cl-gdata-contacts)
(alexandria:define-constant +EMAIL-TAG-HOME+ "#home" :test 'equal)
(alexandria:define-constant +EMAIL-TAG-WORK+ "#work" :test 'equal)
(alexandria:define-constant +EMAIL-TAG-OTHER+ "#other" :test 'equal)
(alexandria:define-constant +PHONE-TAG-MOBILE+ "#mobile" :test 'equal)
(alexandria:... |
3fba3315a3e9e6e37df51a610a4d7a77600510628640847ee86e2796b0f0ce14 | irastypain/sicp-on-language-racket | exercise_1_27-test.rkt | #lang racket
(require rackunit
rackunit/text-ui
"../../src/chapter01/exercise_1_27.rkt")
(define tests
(test-suite
"Carmichael numbers test"
(check-true (test-k-all 561))
(check-true (test-k-all 1105))
(check-true (test-k-all 1729))
(check-true (test-k-all 2465))
(check-tr... | null | https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/test/chapter01/exercise_1_27-test.rkt | racket | #lang racket
(require rackunit
rackunit/text-ui
"../../src/chapter01/exercise_1_27.rkt")
(define tests
(test-suite
"Carmichael numbers test"
(check-true (test-k-all 561))
(check-true (test-k-all 1105))
(check-true (test-k-all 1729))
(check-true (test-k-all 2465))
(check-tr... | |
89826f4b6eba99942c78df72cad9a4017c373be4f479816283e80cd095fd7c65 | pink-gorilla/notebook | document.cljs | (ns pinkgorilla.notebook-ui.app.pages.document
(:require
[taoensso.timbre :as timbre :refer [info warn]]
[reagent.core :as r]
[re-frame.core :as rf :refer [dispatch subscribe]]
[webly.web.handler :refer [reagent-page]]
[webly.user.oauth2.view :refer [user-button]]
[pinkgorilla.document.component :re... | null | https://raw.githubusercontent.com/pink-gorilla/notebook/da76c35585965b0bf76eb975ebaa006016616b20/src/pinkgorilla/notebook_ui/app/pages/document.cljs | clojure | NOTEBOOK
if a layout option is passed this will override the settings in localstorage
:layout :single ; :vertical ; :horizontal
(rf/dispatch [:doc/load doc])
:div.m-3 .bg-blue-300
:type :file
:filename "resources/notebooks/notebook/notebook-welcome.cljg"
[document-page document-viewer header-menu-left query-params] | (ns pinkgorilla.notebook-ui.app.pages.document
(:require
[taoensso.timbre :as timbre :refer [info warn]]
[reagent.core :as r]
[re-frame.core :as rf :refer [dispatch subscribe]]
[webly.web.handler :refer [reagent-page]]
[webly.user.oauth2.view :refer [user-button]]
[pinkgorilla.document.component :re... |
bc994c06bcbf1fc61abc9984eca2497f5e6b034a89fa70f4a1f1cc2178415947 | mRrvz/bmstu-ca | Parse.hs | module Parse (
parseTable,
Table (xy, weight),
toInt
) where
type ValueTable = [[Double]]
data Table = Table { xy :: [(Double, Double)],
weight :: [Double]
} deriving (Show)
parseTable :: [String] -> Table
parseTable string = Table xy ro
where words' = map word... | null | https://raw.githubusercontent.com/mRrvz/bmstu-ca/866a32b37878d45006ec3c4f99f67983ae681717/lab_04/src/Parse.hs | haskell | module Parse (
parseTable,
Table (xy, weight),
toInt
) where
type ValueTable = [[Double]]
data Table = Table { xy :: [(Double, Double)],
weight :: [Double]
} deriving (Show)
parseTable :: [String] -> Table
parseTable string = Table xy ro
where words' = map word... | |
49e3579e5e33e16e2ab8fa568c1f7c6930816d98f2d2ddc00289cae08aa6aaeb | sanjoy/Snippets | GenerateMatcherTest.hs | # LANGUAGE TemplateHaskell #
import GenerateMatcher
generateMatcher "generatedF" ["asdf", "a?foo", "P"]
main = do
str <- getLine
putStrLn $ show $ generatedF str
| null | https://raw.githubusercontent.com/sanjoy/Snippets/76dcbff1da333b010662d42d0d235f614a882b87/GenerateMatcherTest.hs | haskell | # LANGUAGE TemplateHaskell #
import GenerateMatcher
generateMatcher "generatedF" ["asdf", "a?foo", "P"]
main = do
str <- getLine
putStrLn $ show $ generatedF str
| |
501897afc5dd51c9d1c30455cf69a5ea6c1fa914b72eddbf93ab59528e011644 | kyleburton/sandbox | repl.clj | (ns lol-champquiz.repl
(:use lol-champquiz.handler
ring.server.standalone
[ring.middleware file-info file]))
(defonce server (atom nil))
(defn get-handler []
;; #'app expands to (var app) so that when we reload our code,
;; the server is forced to re-resolve the symbol in the var
;; rather tha... | null | https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/examples/clojure/lol-champquiz/env/dev/clj/lol_champquiz/repl.clj | clojure | #'app expands to (var app) so that when we reload our code,
the server is forced to re-resolve the symbol in the var
rather than having its own copy. When the root binding
changes, the server picks it up without having to restart.
Content-Type, Content-Length, and Last Modified headers for files in body | (ns lol-champquiz.repl
(:use lol-champquiz.handler
ring.server.standalone
[ring.middleware file-info file]))
(defonce server (atom nil))
(defn get-handler []
(-> #'app
Makes static assets in $ PROJECT_DIR / resources / public/ available .
(wrap-file "resources")
(wrap-file-info)))
(... |
d576c588687885f6ea50ba777f4036c2dbba42f54bb87dc5bac6a6d7224cdaac | UnixJunkie/ACPC | ROC.ml |
functions for ROC analysis
open Batteries
open Printf
module F = File
module L = List
module Log = Dolog.Log
module HT = Hashtbl
module MU = My_utils
module S = String
group molecules by name and keep only the best score for each name
THIS IS NEEDED BY MULTIPLE COMFORMERS
THIS IS NEEDED BY MULT... | null | https://raw.githubusercontent.com/UnixJunkie/ACPC/835700f4acd5a2b6e237b5f262855a18fd98440a/src/ROC.ml | ocaml | keep only best score for all molecules with same name
i is used to preserve the order from the input file to ease
software validation
return them in the same order that they were found
this is the format the CROC Python module reads in
dump ranks and return the top_n scoring molecules |
functions for ROC analysis
open Batteries
open Printf
module F = File
module L = List
module Log = Dolog.Log
module HT = Hashtbl
module MU = My_utils
module S = String
group molecules by name and keep only the best score for each name
THIS IS NEEDED BY MULTIPLE COMFORMERS
THIS IS NEEDED BY MULT... |
de1b5168cf3d258f44f267f756b6125ff1998a8c26c18a6a3af9a6951a9959bb | spechub/Hets | ParseQvtAsLibDefn.hs | |
Module : ./QVTR / ParseQvtAsLibDefn.hs
Description : QVTR .qvt parser
Copyright : ( c ) Universidad de la Republica , Uruguay 2013
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
Module : ./QVTR/ParseQv... | null | https://raw.githubusercontent.com/spechub/Hets/af7b628a75aab0d510b8ae7f067a5c9bc48d0f9e/QVTR/ParseQvtAsLibDefn.hs | haskell | Either ParseError String | |
Module : ./QVTR / ParseQvtAsLibDefn.hs
Description : QVTR .qvt parser
Copyright : ( c ) Universidad de la Republica , Uruguay 2013
License : GPLv2 or higher , see LICENSE.txt
Maintainer :
Stability : provisional
Portability : portable
Module : ./QVTR/ParseQv... |
03b7e2e7b4b3c14a0bcc771ae255c197396dc0cdd19868beef779027735997ea | jordwalke/rehp | generate_closure.mli | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/compiler/lib/generate_closure.mli | ocaml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | |
bf42c8d77ee7c60ba2147debb7e80b2927f65fce14a9f6548ae54131fb027a5f | DanielG/ghc-mod | World.hs | module GhcMod.World where
import GhcMod.GhcPkg
import GhcMod.PathsAndFiles
import GhcMod.Types
import GhcMod.Monad.Types
import GhcMod.Utils
import Control.Applicative
import Data.Maybe
import Data.Traversable hiding (mapM)
import System.FilePath ((</>))
import GHC.Paths (libdir)
import Prelude
data World = World {... | null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/core/GhcMod/World.hs | haskell | module GhcMod.World where
import GhcMod.GhcPkg
import GhcMod.PathsAndFiles
import GhcMod.Types
import GhcMod.Monad.Types
import GhcMod.Utils
import Control.Applicative
import Data.Maybe
import Data.Traversable hiding (mapM)
import System.FilePath ((</>))
import GHC.Paths (libdir)
import Prelude
data World = World {... | |
9da666d56fded619ae5a815389e0c8a7c953b3ad2fea966822050f998426d087 | walmartlabs/system-viz | system_viz.clj | (ns com.walmartlabs.system-viz
"Visualize a component system using Graphviz."
(:require
[com.stuartsierra.component :as component]
[dorothy.core :as dorothy :as d]
[clojure.set :as set]
[clojure.java.browse :refer [browse-url]]
[clojure.java.io :as io]
[clojure.string :as str])
(:import
... | null | https://raw.githubusercontent.com/walmartlabs/system-viz/d0011babd92fef343895984eecae081f592bba58/src/com/walmartlabs/system_viz.clj | clojure | edges have to come last, otherwise they may "create" the bad nodes
and the node-attrs above do not take effect
this is then fed through the `dot`
these are added as node attributes.
defaults to :pdf, but
Ignore the result of the above, and just return the system. | (ns com.walmartlabs.system-viz
"Visualize a component system using Graphviz."
(:require
[com.stuartsierra.component :as component]
[dorothy.core :as dorothy :as d]
[clojure.set :as set]
[clojure.java.browse :refer [browse-url]]
[clojure.java.io :as io]
[clojure.string :as str])
(:import
... |
e7fe5341a44563c0513aa1a3eaa421061635bce07963b06269644860a67525d9 | haskell/containers | LookupGE_Map.hs | # LANGUAGE BangPatterns , CPP #
module LookupGE_Map where
import Data.Map.Internal
lookupGE1 :: Ord k => k -> Map k a -> Maybe (k,a)
lookupGE1 k m =
case splitLookup k m of
(_,Just v,_) -> Just (k,v)
(_,Nothing,r) -> findMinMaybe r
# INLINABLE lookupGE1 #
lookupGE2 :: Ord k => k -> Map k a -> Ma... | null | https://raw.githubusercontent.com/haskell/containers/7fb91ca53b1aca7c077b36a0c1f8f785d177da34/containers-tests/benchmarks/LookupGE/LookupGE_Map.hs | haskell | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Properties:
-------------------------------------------------------------------------... | # LANGUAGE BangPatterns , CPP #
module LookupGE_Map where
import Data.Map.Internal
lookupGE1 :: Ord k => k -> Map k a -> Maybe (k,a)
lookupGE1 k m =
case splitLookup k m of
(_,Just v,_) -> Just (k,v)
(_,Nothing,r) -> findMinMaybe r
# INLINABLE lookupGE1 #
lookupGE2 :: Ord k => k -> Map k a -> Ma... |
8caa8953d1828873c339c6b45658f3be934ae73768d652ea9435eacd5a87d50f | lisp-mirror/clpm | release.lisp | release - EXPERIMENTAL
;;;;
This software is part of CLPM . See README.org for more information . See
;;;; LICENSE for license information.
(uiop:define-package #:clpm-cli/commands/clpi/release
(:use #:cl
#:clpm-cli/common-args
#:clpm-cli/commands/clpi/common
#:clpm-cli/interfac... | null | https://raw.githubusercontent.com/lisp-mirror/clpm/ad9a704fcdd0df5ce30ead106706ab6cc5fb3e5b/cli/commands/clpi/release.lisp | lisp |
LICENSE for license information. | release - EXPERIMENTAL
This software is part of CLPM . See README.org for more information . See
(uiop:define-package #:clpm-cli/commands/clpi/release
(:use #:cl
#:clpm-cli/common-args
#:clpm-cli/commands/clpi/common
#:clpm-cli/interface-defs
#:clpm)
(:import-from #:... |
80e9137dab2556cc3c3b67cd76d0b1d7c326f706a9342cac0e23267dcdbdb21c | wilkerlucio/pathom-connect-spacex | workspaces_main.cljs | (ns com.wsscode.pathom.connect.spacex.workspaces-main
(:require [cljs.core.async :as async :refer [go <!]]
[com.wsscode.common.async-cljs :refer [<? go-catch]]
[com.wsscode.pathom.connect :as pc]
[com.wsscode.pathom.core :as p]
[nubank.workspaces.model :as wsm]
... | null | https://raw.githubusercontent.com/wilkerlucio/pathom-connect-spacex/5e5d877da927871f5ee132c70a00fa0aea38d8f6/src/cards/com/wsscode/pathom/connect/spacex/workspaces_main.cljs | clojure | (ns com.wsscode.pathom.connect.spacex.workspaces-main
(:require [cljs.core.async :as async :refer [go <!]]
[com.wsscode.common.async-cljs :refer [<? go-catch]]
[com.wsscode.pathom.connect :as pc]
[com.wsscode.pathom.core :as p]
[nubank.workspaces.model :as wsm]
... | |
f323e9d2194bc34b4aa1587a27b14311658f2f4d97be531ef6e14bbacbbf1244 | mfikes/fifth-postulate | ns394.cljs | (ns fifth-postulate.ns394)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | null | https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns394.cljs | clojure | (ns fifth-postulate.ns394)
(defn solve-for01 [xs v]
(for [ndx0 (range 0 (- (count xs) 3))
ndx1 (range (inc ndx0) (- (count xs) 2))
ndx2 (range (inc ndx1) (- (count xs) 1))
ndx3 (range (inc ndx2) (count xs))
:when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))]
(list (x... | |
7014559354ea8e95e26303149c52c66d99e09eb5130cd595e6e70f23bc4fffda | hanshuebner/bknr-web | import-images-handler.lisp | (in-package :bknr.images)
(enable-interpol-syntax)
(defclass import-images-handler (import-handler)
())
(defmethod import-handler-spool-files ((handler import-images-handler))
(image-directory-recursive (import-handler-import-pathname handler)))
(defmethod handle-form ((handler import-images-handler) action)
... | null | https://raw.githubusercontent.com/hanshuebner/bknr-web/5c30b61818a2f02f6f2e5dc69fd77396ec3afc51/src/images/import-images-handler.lisp | lisp | (in-package :bknr.images)
(enable-interpol-syntax)
(defclass import-images-handler (import-handler)
())
(defmethod import-handler-spool-files ((handler import-images-handler))
(image-directory-recursive (import-handler-import-pathname handler)))
(defmethod handle-form ((handler import-images-handler) action)
... | |
8c88a88da1e657282d2505744c99670a8c9fdcf3e1a3449853e7016e28f777ab | emotiq/emotiq | test-hash.lisp |
(in-package :core-crypto-test)
(define-test hashes
(assert-true (and
(string-equal
(hex-str (hash/256 ""))
"a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a")
(string-equal
(hex-str (hash/384 ""))
"0c... | null | https://raw.githubusercontent.com/emotiq/emotiq/9af78023f670777895a3dac29a2bbe98e19b6249/src/Crypto/test/test-hash.lisp | lisp |
(lisp-unit:run-tests :all :crypto/test)
|
(in-package :core-crypto-test)
(define-test hashes
(assert-true (and
(string-equal
(hex-str (hash/256 ""))
"a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a")
(string-equal
(hex-str (hash/384 ""))
"0c... |
55b653258cda4c5acac96e95e67e3665dbbf68f34faad45d7d55cb7ffb0141fb | screenshotbot/screenshotbot-oss | tests.lisp | hier mal unit tests , i m moment
(in-package :bknr.datastore)
(define-persistent-class boeses-object ()
((a :read)))
(define-persistent-class foobar ()
((a :read :index-type unique-index :index-values all-foobars)))
(deftransaction boese-tx ()
(format t "BOESE BOESE!~%"))
(defmethod initialize-transient-... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/1faeba2a45c639354e1298eb8a75aa82805a9ad5/third-party/bknr.datastore/src/data/tests.lisp | lisp | sein, soll das destroyed werden? | hier mal unit tests , i m moment
(in-package :bknr.datastore)
(define-persistent-class boeses-object ()
((a :read)))
(define-persistent-class foobar ()
((a :read :index-type unique-index :index-values all-foobars)))
(deftransaction boese-tx ()
(format t "BOESE BOESE!~%"))
(defmethod initialize-transient-... |
4cb71e42ea1aacb41584449d5b0a07efe221e991d70473e8f84ef36986dae453 | SquircleSpace/shcl | debug.lisp | Copyright 2018
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software
distributed under the Li... | null | https://raw.githubusercontent.com/SquircleSpace/shcl/cc8d3c841b8b64b6715bf8f238fb19cd6093a793/shell/debug.lisp | lisp |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2018
distributed under the License is distributed on an " AS IS " BASIS ,
(defpackage :shcl/shell/debug
(:use :common-lisp :shcl/core/utility)
(:import-from :shcl/core/command #:define-builtin)
(:import-from :shcl/core/debug
#:undocumented-symbols #:undocumented-symbols-in-package)
(:import-... |
56045f75010e3f0b7dba1c4508800cc0c1ec6842efeaaa9958bd8fe3fd822b3c | uw-unsat/serval-sosp19 | test.rkt | #lang rosette
(require rosette/lib/roseunit)
(require "extracted.rkt")
(require "speclang.rkt")
(for [(thm (decode-list r_theorems))]
(check-theorem thm))
| null | https://raw.githubusercontent.com/uw-unsat/serval-sosp19/175c42660fad84b44e4c9f6f723fd3c9450d65d4/racket/speclang/test.rkt | racket | #lang rosette
(require rosette/lib/roseunit)
(require "extracted.rkt")
(require "speclang.rkt")
(for [(thm (decode-list r_theorems))]
(check-theorem thm))
| |
c47681df7f6ff0203aa7dfa988f38abe55799ed8d78bdcf4c7855f7aeb81317b | wildarch/jepsen.rqlite | nemesis.clj | (ns jepsen.rqlite.nemesis
"Custom nemeses for testing rqlited"
(:refer-clojure :exclude [test])
(:require [clojure.tools.logging :refer :all]
[jepsen
[net :as net]
[control :as c]
[nemesis :as nemesis]]))
(defn heal
"Heals the network, removing any slowdown or... | null | https://raw.githubusercontent.com/wildarch/jepsen.rqlite/f3430b4edc1aa0583d19e350b8cdd115fa187fb6/src/jepsen/rqlite/nemesis.clj | clojure | (ns jepsen.rqlite.nemesis
"Custom nemeses for testing rqlited"
(:refer-clojure :exclude [test])
(:require [clojure.tools.logging :refer :all]
[jepsen
[net :as net]
[control :as c]
[nemesis :as nemesis]]))
(defn heal
"Heals the network, removing any slowdown or... | |
552480f402b1dcd223f8a165f9bd974ce5ed2feaac9c1c8ea86c9aae1b69d2cd | walkie/Hagl | Tournament.hs |
-- | Functions for running various kinds of tournaments.
module Hagl.Tournament where
import Control.Monad (liftM)
import Data.Function (on)
import Data.List (nub,sortBy)
import Hagl.List
import Hagl.Payoff
import Hagl.Game
import Hagl.Exec
--
-- * Tournament execution
--
-- | Tournaments results: mapping from... | null | https://raw.githubusercontent.com/walkie/Hagl/ac1edda51c53d2b683c4ada3f1c3d4d14a285d38/src/Hagl/Tournament.hs | haskell | | Functions for running various kinds of tournaments.
* Tournament execution
| Tournaments results: mapping from player names to scores.
| Run a game with each successive collection of players. Aggregate the scores
of all Players (based on name) and return the results.
| Tournament where all combinations of p... |
module Hagl.Tournament where
import Control.Monad (liftM)
import Data.Function (on)
import Data.List (nub,sortBy)
import Hagl.List
import Hagl.Payoff
import Hagl.Game
import Hagl.Exec
type Results = [(Name,Float)]
runGames :: Game g => g -> [[Player g]] -> ExecM g Payoff -> IO Results
runGames g pss run = do
... |
05b08903742921d5a780f6d9ee8f15425d3b647ee5aa3ab1c253bc931d1d86ba | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | DeletedTerminal_Location.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
-- | Contains the types generated from the schema DeletedTerminal_Location
module StripeAPI.Types.DeletedTerminal_Location wh... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/DeletedTerminal_Location.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
| Contains the types generated from the schema DeletedTerminal_Location
| Defines the object schema located at @components.schemas.deleted_terminal.location@ in the specification.
| id: Unique identifier for the object.
Constraints:
| Create a new 'DeletedTe... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
module StripeAPI.Types.DeletedTerminal_Location where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data.Aeson as Data.Aeson.Encoding.Internal
import qu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.