_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 |
|---|---|---|---|---|---|---|---|---|
0e360532b2895714c94dae8f99cb4991821bb3522f0d73e348dfac3052532604 | IronScheme/IronScheme | procedural.sps | #!r6rs
(import (tests r6rs records procedural)
(tests r6rs test)
(rnrs io simple))
(display "Running tests for (rnrs records procedural)\n")
(run-records-procedural-tests)
(report-test-results)
| null | https://raw.githubusercontent.com/IronScheme/IronScheme/687cde5d4e463a119e4ba28296f2af42a5c4a9df/IronScheme/IronScheme.Console/tests/r6rs/run/records/procedural.sps | scheme | #!r6rs
(import (tests r6rs records procedural)
(tests r6rs test)
(rnrs io simple))
(display "Running tests for (rnrs records procedural)\n")
(run-records-procedural-tests)
(report-test-results)
| |
9539e4571bf6dab9cf0bfec8ae55093bfa2df1ac2a3eea9ffbd2fbcd105f5f2e | footprintanalytics/footprint-web | check_features.clj | (ns metabase.query-processor.middleware.check-features
(:require [metabase.driver :as driver]
[metabase.mbql.schema :as mbql.s]
[metabase.mbql.util :as mbql.u]
[metabase.query-processor.error-type :as qp.error-type]
[metabase.query-processor.store :as qp.store]
... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/query_processor/middleware/check_features.clj | clojure | TODO - definitely a little incomplete. It would be cool if we cool look at the metadata in the schema namespace and
auto-generate this logic | (ns metabase.query-processor.middleware.check-features
(:require [metabase.driver :as driver]
[metabase.mbql.schema :as mbql.s]
[metabase.mbql.util :as mbql.u]
[metabase.query-processor.error-type :as qp.error-type]
[metabase.query-processor.store :as qp.store]
... |
513f939f5f3586d993191e3ad7b050ed8726f82591047893ac1fa3c45bb32453 | dalaing/little-languages | Infer.hs | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
-}
module Test.Term.Infer (
inferTests
) where
-- from 'base'
import... | null | https://raw.githubusercontent.com/dalaing/little-languages/9f089f646a5344b8f7178700455a36a755d29b1f/code/i/tests/Test/Term/Infer.hs | haskell | from 'base'
from 'tasty'
from 'tasty-quickcheck'
from 'QuickCheck'
local
For now, all of our terms are well typed.
Assumes we are dealing with a well-typed term.
Assumes we are dealing with a well-typed term. | |
Copyright : ( c ) , 2016
License : :
Stability : experimental
Portability : non - portable
Copyright : (c) Dave Laing, 2016
License : BSD3
Maintainer :
Stability : experimental
Portability : non-portable
-}
module Test.Term.Infer (
inferTests
) where
import Data... |
a9489b4aa2671c1c1f1a7804ffa0760d499812f8ed19017634eb2f45b1849534 | jpmonettas/clindex | test_code.cljc | (ns test-code
"A not so well documented namespace"
(:require [clojure.string :as str]
[dep-code :as dep]))
#?(:clj
(defmacro some-macro [a b]
`(+ a b)))
(defn some-function [arg1 arg2]
;; Some comment
(let [a 1
b (+ arg1 arg2)]
(+ a b)))
(defprotocol TheProtocol
(do-somethin... | null | https://raw.githubusercontent.com/jpmonettas/clindex/77097d80a23aa85d2ff50e55645a1452f2dcb3c0/test-resources/test-project/src/test_code.cljc | clojure | Some comment | (ns test-code
"A not so well documented namespace"
(:require [clojure.string :as str]
[dep-code :as dep]))
#?(:clj
(defmacro some-macro [a b]
`(+ a b)))
(defn some-function [arg1 arg2]
(let [a 1
b (+ arg1 arg2)]
(+ a b)))
(defprotocol TheProtocol
(do-something [_]))
(defmulti... |
db11e84894b7647a6c021c298ce7a15efd4980bae327224b44c39c597d92b00f | geophf/1HaskellADay | Solution.hs | module Y2018.M05.D17.Solution where
-
Today 's problem is partially written out . That provides its own set of
problems : you have code that you are inheriting , and you need to build function-
ality on top of the existing code base .
Not that that ever happens in industry .
So , today you have to learn w... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M05/D17/Solution.hs | haskell | }
Article
}
I write all the above to show the work-flow. For redundant articles, we
simply log that they are redundant, so we need a logging function:
UPDATE UPDATE UPDATE -------------------------------------------------------
... updating articles is much simpler (lift-n-shift from Y2018.M02.D07):
it looks like... | module Y2018.M05.D17.Solution where
-
Today 's problem is partially written out . That provides its own set of
problems : you have code that you are inheriting , and you need to build function-
ality on top of the existing code base .
Not that that ever happens in industry .
So , today you have to learn w... |
db839e82d61b744d39dfd8fccd5200af4c41cbc3c3b022ae9865a57ffb2dba7b | moostang/autolisp | chainage_label.lsp | ;; ------------------------------------------------------------------------- ;;
;; ------------------------------------------------------------------------- ;;
;; FUNCTION chainage_label ;;
;; ----------------------- ;;
... | null | https://raw.githubusercontent.com/moostang/autolisp/e4f9e624175880a6383850bae58718c48e31ff43/chainage_label.lsp | lisp | ------------------------------------------------------------------------- ;;
------------------------------------------------------------------------- ;;
FUNCTION chainage_label ;;
----------------------- ;;
;
... | (defun chainageLabel (chainage / prefix suffix
)
(setq chainage (fix chainage))
(if (< chainage 1000)
(progn
(setq suffix (rtos chainage))
(while (< (strlen suffix) 3)
(setq suffix (strcat "0" suffix))
(setq label (strcat "0+" suffix))
(pr... |
395bcc2df232449881994666c8fc9144976307f8997e811cfe16ab0ebda67345 | Swirrl/cubiql | data.clj | (ns cubiql.data
(:require
[grafter.rdf.repository :as repo]
[grafter.rdf.formats :as formats]
[grafter.rdf :refer [add]]
[grafter.rdf.formats :as formats]
[clojure.java.io :as io])
(:import [java.io File FileFilter]
[java.net URI URISyntaxException]))
(defn- ^FileFilter create-file-f... | null | https://raw.githubusercontent.com/Swirrl/cubiql/67efdc51750b9ac4fd1cdfbcddfb80398189807f/src/cubiql/data.clj | clojure | (ns cubiql.data
(:require
[grafter.rdf.repository :as repo]
[grafter.rdf.formats :as formats]
[grafter.rdf :refer [add]]
[grafter.rdf.formats :as formats]
[clojure.java.io :as io])
(:import [java.io File FileFilter]
[java.net URI URISyntaxException]))
(defn- ^FileFilter create-file-f... | |
aef399fd850a03997af53eb27e2753c55c83bb2aedee2f7b6819aba7471b2a3a | sjl/euler | 001.lisp | (defpackage :euler/001 #.euler:*use*)
(in-package :euler/001)
If we list all the natural numbers below 10 that are multiples of 3 or 5 , we
get 3 , 5 , 6 and 9 . The sum of these multiples is 23 .
;;
Find the sum of all the multiples of 3 or 5 below 1000 .
(define-problem (1 233168)
(iterate (for i :from 1 :b... | null | https://raw.githubusercontent.com/sjl/euler/29cd8242172a2d11128439bb99217a0a859057ed/src/problems/001.lisp | lisp | (defpackage :euler/001 #.euler:*use*)
(in-package :euler/001)
If we list all the natural numbers below 10 that are multiples of 3 or 5 , we
get 3 , 5 , 6 and 9 . The sum of these multiples is 23 .
Find the sum of all the multiples of 3 or 5 below 1000 .
(define-problem (1 233168)
(iterate (for i :from 1 :belo... | |
4b7f3c50838222362235fae816730b18d57158baad13e5f6a08cf6a8b27eecdb | JPMoresmau/dbIDE | Types.hs | # LANGUAGE RecordWildCards #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable , TemplateHaskell , OverloadedStrings #
module Language.Haskell.ASBrowser.Types where
import Language.Haskell.ASBrowser.Utils
import... | null | https://raw.githubusercontent.com/JPMoresmau/dbIDE/dae37edf67fbe55660e7e22c9c5356d0ada47c61/as-browser/src/Language/Haskell/ASBrowser/Types.hs | haskell | # LANGUAGE TypeSynonymInstances # | # LANGUAGE RecordWildCards #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable , TemplateHaskell , OverloadedStrings #
module Language.Haskell.ASBrowser.Types where
import Language.Haskell.ASBrowser.Utils
import Control.Arrow
import Control.Monad
im... |
706e78e7222e6b2dcf47c85f68fdb4cfc2fa73bfe29ddfc2d3f24c8da59fd76b | rmascarenhas/foppl | toposort.clj | (ns foppl.toposort
"Performs topological sort of an acyclic graph."
(:require [clojure.set :as set]))
Based on original implementation
;;
(defn- without
"Returns set s with x removed."
[s x] (set/difference s #{x}))
(defn- take-1
"Returns the pair [element, s'] where s' is set s with element remo... | null | https://raw.githubusercontent.com/rmascarenhas/foppl/f3d7013c97652c8b555dae2bd7067e2b0134b030/src/foppl/toposort.clj | clojure | (ns foppl.toposort
"Performs topological sort of an acyclic graph."
(:require [clojure.set :as set]))
Based on original implementation
(defn- without
"Returns set s with x removed."
[s x] (set/difference s #{x}))
(defn- take-1
"Returns the pair [element, s'] where s' is set s with element removed."
... | |
44c7105cd383885f7420367aaf07531bb4b6f50fa2d7d8cfb7f38f5e4d8da19a | gillchristian/tailwind-purs | Util.hs | module Util where
import Control.Applicative (Applicative (liftA2))
import Data.Char (isSpace)
import Data.List (dropWhileEnd)
trimEnd :: String -> String
trimEnd = dropWhileEnd isSpace
replace :: Eq a => a -> a -> [a] -> [a]
replace a b = map $ \c -> if c == a then b else c
startsWith :: (a -> Bool) -> [a] -> Bool... | null | https://raw.githubusercontent.com/gillchristian/tailwind-purs/87474189c951320959797b7a77488343de203771/src/Util.hs | haskell | module Util where
import Control.Applicative (Applicative (liftA2))
import Data.Char (isSpace)
import Data.List (dropWhileEnd)
trimEnd :: String -> String
trimEnd = dropWhileEnd isSpace
replace :: Eq a => a -> a -> [a] -> [a]
replace a b = map $ \c -> if c == a then b else c
startsWith :: (a -> Bool) -> [a] -> Bool... | |
ea46480acc81890b7bfd813dbc844d7e67437f8490f6dc7370a45bb5878773d6 | rizo/snowflake-os | linkerTest.ml |
(* Build the snowflake kernel (eventually) *)
(* -T kernel/kernel.ldscript -L . -L libraries/stdlib -L libraries/threads -L libraries/extlib -L libraries/bitstring *)
let input_files = [|
"kernel/snowflake.native.startup.o";
"kernel/snowflake.o";
(*"kernel/vga.o";*)
"kernel/tarFile.o";
"kernel/tr... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/kernel/linkerTest.ml | ocaml | Build the snowflake kernel (eventually)
-T kernel/kernel.ldscript -L . -L libraries/stdlib -L libraries/threads -L libraries/extlib -L libraries/bitstring
"kernel/vga.o";
"kernel/PCI.o";
"kernel/deviceManager.o"; |
let input_files = [|
"kernel/snowflake.native.startup.o";
"kernel/snowflake.o";
"kernel/tarFile.o";
"kernel/trie.o";
" kernel / keyboard.o " ;
"kernel/interrupts.o";
"kernel/ELF.o";
"kernel/vt100.o";
"kernel/linkerTest.o";
" kernel / audioMixer.o " ;
" kernel / blockIO.o " ;
" k... |
8f60a1a4ffd867057f5bca2bf5cd86b429d4913ce26a34b95946724970ad0c39 | rixed/ramen | RamenGraphiteSink.ml | (* Collector for graphite plain text protocol (as described in
* -carbon.html).
*
* Graphite metrics are organized as a hierarchy (with added tags on top).
* We make no attempt to map that hierarchy into several functions; instead,
* like for collectd we merely queue all received metrics into a single
* stream re... | null | https://raw.githubusercontent.com/rixed/ramen/f4e8fb56ac43fe91a175efa273ff81066032dcff/src/RamenGraphiteSink.ml | ocaml | Collector for graphite plain text protocol (as described in
* -carbon.html).
*
* Graphite metrics are organized as a hierarchy (with added tags on top).
* We make no attempt to map that hierarchy into several functions; instead,
* like for collectd we merely queue all received metrics into a single
* stream repr... | open Batteries
open DessserOCamlBackEndHelpers
open RamenConsts
open RamenHelpersNoLog
open RamenHelpers
open RamenLog
open RamenTuple
open RamenTypes
module DT = DessserTypes
module N = RamenName
module T = RamenTypes
let tuple_typ =
[ { name = N.field "metric" ;
typ = DT.required TString ;
units = Non... |
b975d16bfad03df13267804deed9674a9b39d935081bfc17295b320b05cb9547 | jfischoff/twitch | InternalRule.hs | module Tests.Twitch.InternalRule where
import Test.Hspec
tests :: Spec
tests = return () | null | https://raw.githubusercontent.com/jfischoff/twitch/9ed10b0aaff8aace3b8b2eb47d605d9107194b95/tests/Tests/Twitch/InternalRule.hs | haskell | module Tests.Twitch.InternalRule where
import Test.Hspec
tests :: Spec
tests = return () | |
6bfd95a5dc311b5413bc70ad405bf3d8706df403bb839dd29d29fa86878aad6d | vvvvalvalval/datomock | impl_test.clj | (ns datomock.impl-test
(:require [clojure.test :refer :all]
[clojure.test.check :as tc]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.test.check.clojure-test :refer [defspec]]
[datomock.test.utils :as tu]
... | null | https://raw.githubusercontent.com/vvvvalvalval/datomock/3ab532f24bca982e23f1897bd5656bd5be15b0ba/test/datomock/impl_test.clj | clojure | (ns datomock.impl-test
(:require [clojure.test :refer :all]
[clojure.test.check :as tc]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
[clojure.test.check.clojure-test :refer [defspec]]
[datomock.test.utils :as tu]
... | |
2ac00137cf8652d24f2929de8ee0e7bfba19a7a7e2885f62a2e3cf4c0ed1e689 | incoherentsoftware/defect-process | Bat.hs | module Configs.All.Enemy.Bat
( BatEnemyConfig(..)
) where
import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON)
import GHC.Generics (Generic)
import Attack.Util
import Enemy.DeathEffectData.Types
import Enemy.HurtEffectData.Types
import Enemy.SpawnEffectData.Types
import Util
import Window.Graph... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/14ec46dec2c48135bc4e5965b7b75532ef19268e/src/Configs/All/Enemy/Bat.hs | haskell | module Configs.All.Enemy.Bat
( BatEnemyConfig(..)
) where
import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON)
import GHC.Generics (Generic)
import Attack.Util
import Enemy.DeathEffectData.Types
import Enemy.HurtEffectData.Types
import Enemy.SpawnEffectData.Types
import Util
import Window.Graph... | |
758e23899b49c7669b9de915ee7efa4cdb90738b71d7a9666e2f3a478216a64d | rudenoise/mirage-dashboard | releases.ml | open Lwt
*
* example github release values
* " i d " : 3009723 ,
* " tag_name " : " " ,
* " target_commitish " : " " ,
* " name " : " " ,
* " body " : " " ,
* " draft " : false ,
* " prerelease " : false ,
* " created_at " : " 2016 - 04 - 13T10:39:07Z " ,
* " published_at " : " 2016 - 04 ... | null | https://raw.githubusercontent.com/rudenoise/mirage-dashboard/f109ad96d68701addd2ac7cc0be87d706f7eab50/src/releases.ml | ocaml | RELEASES:
TAGS: | open Lwt
*
* example github release values
* " i d " : 3009723 ,
* " tag_name " : " " ,
* " target_commitish " : " " ,
* " name " : " " ,
* " body " : " " ,
* " draft " : false ,
* " prerelease " : false ,
* " created_at " : " 2016 - 04 - 13T10:39:07Z " ,
* " published_at " : " 2016 - 04 ... |
8e76b25909d6b6addc46a02fe92d6b5a3a8286a603d8b4c0e5a685688ee8babb | rabbitmq/looking_glass | lg_socket_client.erl | %% Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
%%
This package , Looking , is double - licensed under the Mozilla
Public License 1.1 ( " MPL " ) and the Apache License version 2
( " ASL " ) . For the MPL , please see LICENSE - MPL - RabbitMQ . For the ASL ,
%% please see LICENSE-APACH... | null | https://raw.githubusercontent.com/rabbitmq/looking_glass/0ae891a8cee16603cdead0caf2d4c0b0800b22c9/src/lg_socket_client.erl | erlang | Copyright (c) 2017-Present Pivotal Software, Inc. All rights reserved.
please see LICENSE-APACHE2.
either express or implied. See the LICENSE file for specific language governing
rights and limitations of this software.
If you have any questions regarding licensing, please contact us at
.
gen_statem.
We nee... | This package , Looking , is double - licensed under the Mozilla
Public License 1.1 ( " MPL " ) and the Apache License version 2
( " ASL " ) . For the MPL , please see LICENSE - MPL - RabbitMQ . For the ASL ,
This software is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY KIND ,
-module(lg_socket_... |
33c812fb3b3a52669d1aa5bb0876e1fa9c292f3e6ea493a877ecdc27444d88f8 | pirapira/coq2rust | find_subterm.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/pirapira/coq2rust/22e8aaefc723bfb324ca2001b2b8e51fcc923543/pretyping/find_subterm.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Finding subterms, possibly up to s... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2012
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Names
open Locus
open Co... |
1aa7a2c473a30a0df5f583b1750e4ef3fbad2489bb1906fe02721c82f135f4e9 | haslab/HAAP | MoveViewer.hs | # LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
module Main where
import JSImages
import LI11718
import OracleT4
import OracleT3
import OracleT2
import OracleT1
import System.Environment
import Test.QuickCheck.Gen
import Data.List
import Data.Maybe
import Safe
import Data.Char
import Debug.Trace
import GH... | null | https://raw.githubusercontent.com/haslab/HAAP/5acf9efaf0e5f6cba1c2482e51bda703f405a86f/examples/plab/oracle/MoveViewer.hs | haskell | , acoes :: [Acao]
centroPeca _ (a,b) = (toEnum a+0.5,toEnum b+0.5)
, timer = 0
- begin gloss ---
end gloss --
main = do
where | # LANGUAGE PatternGuards #
# LANGUAGE ScopedTypeVariables #
module Main where
import JSImages
import LI11718
import OracleT4
import OracleT3
import OracleT2
import OracleT1
import System.Environment
import Test.QuickCheck.Gen
import Data.List
import Data.Maybe
import Safe
import Data.Char
import Debug.Trace
import GH... |
453fb5939acf02423864da26c322f890eeec1527d56efd1da041145751f86a00 | reanimate/reanimate | morphology_closest.hs | #!/usr/bin/env stack
-- stack runghc --package reanimate
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ParallelListComp #-}
module Main(main) where
import Codec.Picture
import Codec.Picture.Types
import Control.Lens ((&))
import Control.Monad
import Graphi... | null | https://raw.githubusercontent.com/reanimate/reanimate/5ea023980ff7f488934d40593cc5069f5fd038b0/examples/morphology_closest.hs | haskell | stack runghc --package reanimate
# LANGUAGE OverloadedStrings #
# LANGUAGE ParallelListComp # | #!/usr/bin/env stack
module Main(main) where
import Codec.Picture
import Codec.Picture.Types
import Control.Lens ((&))
import Control.Monad
import Graphics.SvgTree (LineJoin (..))
import Reanimate
import Reanimate.Morph.Common
import... |
d2bdc93725bc8c652ed289329434d1779314e8a0d2f05381850a4c128c98d820 | sondresl/AdventOfCode | Day24.hs | module Day24 where
import Lib
import Control.Lens
import Data.List.Extra
parseInput = id
part1 input = undefined
part2 input = undefined
main :: IO ()
main = do
input <- parseInput <$> readFile "../data/day01.in"
print input
-- print $ part1 input
-- print $ part2 input
| null | https://raw.githubusercontent.com/sondresl/AdventOfCode/224cf59354c7c1c31821f36884fe8909c5fdf9a6/2015/Haskell/src/Day24.hs | haskell | print $ part1 input
print $ part2 input | module Day24 where
import Lib
import Control.Lens
import Data.List.Extra
parseInput = id
part1 input = undefined
part2 input = undefined
main :: IO ()
main = do
input <- parseInput <$> readFile "../data/day01.in"
print input
|
505ee45ad982f5c2b5344acc0ebc5a2aaa8c016200ac81cc4dd989b586c00739 | rescript-lang/syntax | res_parser.mli | module Scanner = Res_scanner
module Token = Res_token
module Grammar = Res_grammar
module Reporting = Res_reporting
module Diagnostics = Res_diagnostics
module Comment = Res_comment
type mode = ParseForTypeChecker | Default
type regionStatus = Report | Silent
type t = {
mode: mode;
mutable scanner: Scanner.t;
... | null | https://raw.githubusercontent.com/rescript-lang/syntax/67fec537284579e58bee8e70120bff8e03688fa8/src/res_parser.mli | ocaml | module Scanner = Res_scanner
module Token = Res_token
module Grammar = Res_grammar
module Reporting = Res_reporting
module Diagnostics = Res_diagnostics
module Comment = Res_comment
type mode = ParseForTypeChecker | Default
type regionStatus = Report | Silent
type t = {
mode: mode;
mutable scanner: Scanner.t;
... | |
0befaad4e5c8a47a41f5a1375ff118be4f9a7d6ae0eeabd60d29dddffcc56de5 | cndreisbach/clojure-web-dev-workshop | handler.clj | (ns we-owe.handler
(:require [clojure.pprint :refer [pprint]]
[ring.middleware
[stacktrace :refer [wrap-stacktrace]]
[mime-extensions :refer [wrap-convert-extension-to-accept-header]]]
[compojure.core :refer :all]
[compojure.route :as route]
[c... | null | https://raw.githubusercontent.com/cndreisbach/clojure-web-dev-workshop/95d9fdf94b39f8a1e408b8bf75a81b92899ee7d9/code/05-liberator/src/we_owe/handler.clj | clojure | (ns we-owe.handler
(:require [clojure.pprint :refer [pprint]]
[ring.middleware
[stacktrace :refer [wrap-stacktrace]]
[mime-extensions :refer [wrap-convert-extension-to-accept-header]]]
[compojure.core :refer :all]
[compojure.route :as route]
[c... | |
9682a29c23cf56aa4ded884c54d7f44038a93331a9368b9e9b5325e7781011ef | fmthoma/vty-workshop | Pong.hs | module Pong (pong) where
import Brick
import Brick.BChan
import Brick.Widgets.Border
import Brick.Widgets.Center
import Brick.Widgets.Dialog
import Control.Concurrent
import Control.Concurrent.Async
import Control.Monad
import Gr... | null | https://raw.githubusercontent.com/fmthoma/vty-workshop/7e39ee78e059009a3caa1c4924e4517bda428902/code/src/Pong.hs | haskell | module Pong (pong) where
import Brick
import Brick.BChan
import Brick.Widgets.Border
import Brick.Widgets.Center
import Brick.Widgets.Dialog
import Control.Concurrent
import Control.Concurrent.Async
import Control.Monad
import Gr... | |
cddb89aa5d9fae63cb713f3adc1a73a1e45d9f5e85af9192692b5dbb0765a63a | xapi-project/squeezed | squeezed_xenstore.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/squeezed/1c23bfe2d8284384ad66fa0dedb1583b570369b8/src/squeezed_xenstore.ml | ocaml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* 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 ; version 2.1 only . with the special
* exception on linking describe... | |
140cbf8c0d5064559ea6ff1255070332411982caae7b78c3d41e1ac234204e3c | typelead/intellij-eta | VirtualFile.hs | module FFI.Com.IntelliJ.OpenApi.Vfs.VirtualFile where
import P.Base
data {-# CLASS "com.intellij.openapi.vfs.VirtualFile" #-}
VirtualFile = VirtualFile (Object# VirtualFile)
deriving Class
foreign import java unsafe "getPath" getPath :: Java VirtualFile JString
| null | https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/main/eta/FFI/Com/IntelliJ/OpenApi/Vfs/VirtualFile.hs | haskell | # CLASS "com.intellij.openapi.vfs.VirtualFile" # | module FFI.Com.IntelliJ.OpenApi.Vfs.VirtualFile where
import P.Base
VirtualFile = VirtualFile (Object# VirtualFile)
deriving Class
foreign import java unsafe "getPath" getPath :: Java VirtualFile JString
|
f98e8db12847fac7a48e0f9bb01d354eb2de70c2a7965770bbde689b378dd4ad | dgtized/lein-vanity | project.clj | (defproject lein-vanity "0.3.0-SNAPSHOT"
:description "Vanity clojure LOC metrics plugin for leiningen"
:url "-vanity"
:license {:name "MIT"
:url "-vanity/master/LICENSE"}
:dependencies [[org.clojure/clojure "1.5.1"]]
:min-lein-version "2.0.0"
:eval-in-leiningen true)
| null | https://raw.githubusercontent.com/dgtized/lein-vanity/c9a87b78571b3e7dc79baf64c6606286a2e18cae/project.clj | clojure | (defproject lein-vanity "0.3.0-SNAPSHOT"
:description "Vanity clojure LOC metrics plugin for leiningen"
:url "-vanity"
:license {:name "MIT"
:url "-vanity/master/LICENSE"}
:dependencies [[org.clojure/clojure "1.5.1"]]
:min-lein-version "2.0.0"
:eval-in-leiningen true)
| |
2e07cf3b9d7ab98ab97142710436f5f3979cabfc6670654c2784f8020dffe137 | turlando/airhead | utils_test.clj | (ns airhead.utils-test
(:require [clojure.test :refer :all]
[airhead.utils :as sut]))
(deftest test-seek
;; Taken from -2056
;; always nil for nil or empty coll/seq
(are [x] (= (sut/seek pos? x) nil)
nil
() [] {} #{}
(lazy-seq [])
(into-array []))
(are [x y] (= x y)
nil (sut/... | null | https://raw.githubusercontent.com/turlando/airhead/f38d8b3177d90462ad377c207a84966388cb326e/backend/test/airhead/utils_test.clj | clojure | Taken from -2056
always nil for nil or empty coll/seq
does not consume whole sequence
can find false
not-found value | (ns airhead.utils-test
(:require [clojure.test :refer :all]
[airhead.utils :as sut]))
(deftest test-seek
(are [x] (= (sut/seek pos? x) nil)
nil
() [] {} #{}
(lazy-seq [])
(into-array []))
(are [x y] (= x y)
nil (sut/seek nil nil)
1 (sut/seek pos? [1])
1 (sut/seek pos? [1... |
9c241699a5a65fa3d9e914f8367ba8ed3c8b43986c557d5a38043edc107fe7a2 | jpmonettas/clindex | some_specs.cljc | (ns some-specs
(:require [clojure.spec.alpha :as s]
[dep-code :as dc]))
(s/def :person/name string?)
(s/fdef dc/function-with-doc
:args (s/cat :args (s/coll-of :person/name))
:ret boolean?)
| null | https://raw.githubusercontent.com/jpmonettas/clindex/77097d80a23aa85d2ff50e55645a1452f2dcb3c0/test-resources/test-project/src/some_specs.cljc | clojure | (ns some-specs
(:require [clojure.spec.alpha :as s]
[dep-code :as dc]))
(s/def :person/name string?)
(s/fdef dc/function-with-doc
:args (s/cat :args (s/coll-of :person/name))
:ret boolean?)
| |
ed907cda307e9e501d088967b08cc6461aef34eae95b4ebf577c66e527e29af3 | clojure/tools.analyzer.jvm | fix_case_test.clj | Copyright ( c ) , Rich Hickey & contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be b... | null | https://raw.githubusercontent.com/clojure/tools.analyzer.jvm/f00d92317307c3e9e326fd99d337292925dc9db1/src/main/clojure/clojure/tools/analyzer/passes/jvm/fix_case_test.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , Rich Hickey & contributors .
(ns clojure.tools.analyzer.passes.jvm.fix-case-test
(:require [clojure.tools.analyzer.passes.add-binding-atom :refer [add-binding-atom]]))
(defn fix-case-test
"If the node is a :case-test, annotates in the atom shared
by the binding and the local node with :... |
883ccb48f7d2b45d5d56beb6ba5fe34e3d1bd2f5cb0ce6270e89838ce162a299 | overtone/overtone | linter.clj | (ns overtone.linter
"Helpers for linting overtone vars correctly (using clj-kondo)."
(:require
[clojure.string :as str]
[clojure.java.io :as io]
[clojure.pprint :as pp]
[overtone.api]))
(defn find-vars
"Find vars in your project according to one or more of the following queries:
- `:namespaces` (co... | null | https://raw.githubusercontent.com/overtone/overtone/9afb513297662716860a4010bc76a0e73c65ca37/src/overtone/linter.clj | clojure | See `with-overloaded-ugens`.
"Use" the overloaded ugens so we don't have unused bindings
warnings.
See `with-overloaded-ugens`.
"Use" the overloaded ugens so we don't have unused bindings
warnings.
"Use" the overloaded ugens so we don't have unused bindings
warnings.
"Use" the overloaded ugens so we don't ha... | (ns overtone.linter
"Helpers for linting overtone vars correctly (using clj-kondo)."
(:require
[clojure.string :as str]
[clojure.java.io :as io]
[clojure.pprint :as pp]
[overtone.api]))
(defn find-vars
"Find vars in your project according to one or more of the following queries:
- `:namespaces` (co... |
0bf721c42c5d00af053eea4e657486c4ee794a11e77777a58647b1a84c80c7fd | nuvla/api-server | user_minimum_lifecycle_test.clj | (ns sixsq.nuvla.server.resources.user-minimum-lifecycle-test
(:require
[clojure.data.json :as json]
[clojure.test :refer [deftest is use-fixtures]]
[peridot.core :refer [content-type header request session]]
[ring.util.codec :as rc]
[sixsq.nuvla.server.app.params :as p]
[sixsq.nuvla.server.mid... | null | https://raw.githubusercontent.com/nuvla/api-server/d1291d0499cd33ce3b331db84ea00f6e01c1b1b5/code/test/sixsq/nuvla/server/resources/user_minimum_lifecycle_test.clj | clojure | user collection query should succeed but be empty for all users
create a new user; fails without reference
create with invalid template fails
create with bad parameters fails
user collection query should succeed but be empty for all users
create a new user; fails without reference
create with invalid template fa... | (ns sixsq.nuvla.server.resources.user-minimum-lifecycle-test
(:require
[clojure.data.json :as json]
[clojure.test :refer [deftest is use-fixtures]]
[peridot.core :refer [content-type header request session]]
[ring.util.codec :as rc]
[sixsq.nuvla.server.app.params :as p]
[sixsq.nuvla.server.mid... |
78660a3545ead4973bc48783318f21eb2e8bd07f6a3cf1898936c062eeac67f6 | BioHaskell/hPDB | Internals.hs | {-# LANGUAGE BangPatterns #-}
# LANGUAGE DisambiguateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE RecordWildCards ... | null | https://raw.githubusercontent.com/BioHaskell/hPDB/5be747e2f2c57370b498f4c11f9f1887fdab0418/Bio/PDB/StructureBuilder/Internals.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE NamedFieldPuns #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
# LANGUAGE RecordWildCards #
for convenient debugging
| This module allows access to internal interface of @StructureBuilder@ in case that user wants to exte... | # LANGUAGE DisambiguateRecordFields #
# LANGUAGE FlexibleContexts #
# LANGUAGE MultiParamTypeClasses #
# OPTIONS_GHC -fspec - constr - count=2 #
module Bio.PDB.StructureBuilder.Internals
where
import Prelude hiding (String)
import qualified Data.ByteString.Char8 ... |
7767a98fc592813f32d9c442ca99006e78239df51b4c99ff5ea1ea0298f3584b | florence/cover | error-file.rkt | #lang racket
(require rackunit)
(check-true #f)
(test-begin
(error "this is supposed to happend"))
| null | https://raw.githubusercontent.com/florence/cover/bc17e4e22d47b1da91ddaa5eafefe28f4675e85c/cover-test/cover/tests/error-file.rkt | racket | #lang racket
(require rackunit)
(check-true #f)
(test-begin
(error "this is supposed to happend"))
| |
e56ad059b5722b87512fe91d1500cfbbc090c49e9350c1f4a2919194449fec74 | lpw25/ocaml-typed-effects | mctest.ml |
* Copyright ( c ) 2015 , < >
* Copyright ( c ) 2015 , < >
*
* Permission to use , copy , modify , and/or distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE ... | null | https://raw.githubusercontent.com/lpw25/ocaml-typed-effects/79ea08b285c1fd9caf3f5a4d2aa112877f882bea/testsuite/tests/parallel/mctest.ml | ocaml | TODO KC: Replace with concurrent lock free bag --
* |
* Copyright ( c ) 2015 , < >
* Copyright ( c ) 2015 , < >
*
* Permission to use , copy , modify , and/or distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE ... |
109803aa1f3d061bfa8ea7babbd6747edbead10d214bd2a763f6e930814c4183 | tsloughter/epubnub | epn_basic_examples.erl | -module(epn_basic_examples).
-compile([export_all]).
publish() ->
epubnub:publish(<<"hello_world">>, <<"hello">>).
subscribe() ->
epubnub:subscribe(<<"hello_world">>, fun(X)-> io:format("~p~n", [X]) end).
history() ->
epubnub:history(<<"hello_world">>, 10).
time() ->
epubnub:time().
| null | https://raw.githubusercontent.com/tsloughter/epubnub/7c2168dce81631ab5e8d66bfed71ef187940a367/src/epn_basic_examples.erl | erlang | -module(epn_basic_examples).
-compile([export_all]).
publish() ->
epubnub:publish(<<"hello_world">>, <<"hello">>).
subscribe() ->
epubnub:subscribe(<<"hello_world">>, fun(X)-> io:format("~p~n", [X]) end).
history() ->
epubnub:history(<<"hello_world">>, 10).
time() ->
epubnub:time().
| |
f6ab5cdf8c2e9e6a4e62242e079bcac673112367fc1468a74c98a5689e39b2a0 | spechub/Hets | Morphism.hs | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE ExistentialQuantification #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
|
Modu... | null | https://raw.githubusercontent.com/spechub/Hets/4cedaf8dbdb8909955e0066b465c331973043bbf/Logic/Morphism.hs | haskell | # LANGUAGE DeriveDataTypeable #
References: see Logic.hs
Todo:
morphism modifications / representation maps
also covers semi-morphisms ??
with no sentence translation
- but these are spans!
| identity morphisms
changed to identities!
composition not needed, use lax triangles instead
|... | # LANGUAGE MultiParamTypeClasses #
# LANGUAGE FunctionalDependencies #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE ExistentialQuantification #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
|
Module : ./Logic / Morphism.hs
... |
9fd5d0dd59c2e6762c96a42b0983b2ca4eef5a34a8adda9b97fd0e6bff9aea2e | exercism/clojure | bank_account.clj | (ns bank-account)
(defn open-account [] ;; <- arglist goes here
;; your code goes here
)
(defn close-account [] ;; <- arglist goes here
;; your code goes here
)
(defn get-balance [] ;; <- arglist goes here
;; your code goes here
)
(defn update-balance [] ;; <- arglist goes here
;; your code goes here
... | null | https://raw.githubusercontent.com/exercism/clojure/04cb3e274f7c3f8d91229e0f64471e20433db6a1/exercises/practice/bank-account/src/bank_account.clj | clojure | <- arglist goes here
your code goes here
<- arglist goes here
your code goes here
<- arglist goes here
your code goes here
<- arglist goes here
your code goes here | (ns bank-account)
)
)
)
)
|
1194997616f153cfc6f56f1bb0aa020c25d3b4a947d5d611aaad522c78e84626 | issuu/ocaml-protoc-plugin | ocaml_protoc_plugin.ml | (**/**)
module Serialize = Serialize
module Deserialize = Deserialize
module Spec = Spec
module Runtime = Runtime
(**/**)
module Reader = Reader
module Writer = Writer
module Service = Service
module Result = Result
module Extensions = Extensions
(**/**)
let test () =
Writer.Test.test ();
Serialize.Test.test ();... | null | https://raw.githubusercontent.com/issuu/ocaml-protoc-plugin/1893507045110c6176b96f9a2156519fffbd6c26/src/ocaml_protoc_plugin/ocaml_protoc_plugin.ml | ocaml | */*
*/*
*/*
*/* | module Serialize = Serialize
module Deserialize = Deserialize
module Spec = Spec
module Runtime = Runtime
module Reader = Reader
module Writer = Writer
module Service = Service
module Result = Result
module Extensions = Extensions
let test () =
Writer.Test.test ();
Serialize.Test.test ();
()
|
3e190dc622372d5f6f37997c10a13d0cdcda156869bf961ae9d5f76550811c80 | tweag/linear-base | Many.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE LinearTypes #-}
# LANGUAGE QualifiedDo #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
{-# OPTIONS_GHC -Wno-name-shadowing #-}
{-# OPTIONS_HADDOCK hide #-}
-- | This module contains all functions that do something with
-- multiple streams as i... | null | https://raw.githubusercontent.com/tweag/linear-base/aef2124a98ecca377ad55205eb60d24a65c8910d/src/Streaming/Linear/Internal/Many.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE LinearTypes #
# OPTIONS_GHC -Wno-name-shadowing #
# OPTIONS_HADDOCK hide #
| This module contains all functions that do something with
multiple streams as input or output. This includes combining
streams, splitting a stream, etc.
* Operations that use or return multiple 'Stream's
** M... | # LANGUAGE LambdaCase #
# LANGUAGE QualifiedDo #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
module Streaming.Linear.Internal.Many
* * and Unzip
unzip,
ZipResidual,
ZipResidual3,
zip,
zipR,
zipWith,
zipWithR,
zip3,
zip3R,
zipWith3,
zipWith3R,
Either... |
936f76ef087b980e55f1bdd5fcb3766dec513603366830cf6bb76c9fced0065d | googleson78/fp-lab-2022-23 | Solutions.hs | -- cover all cases!
# OPTIONS_GHC -fwarn - incomplete - patterns #
-- warn about incomplete patterns v2
# OPTIONS_GHC -fwarn - incomplete - uni - patterns #
-- write all your toplevel signatures!
# OPTIONS_GHC -fwarn - missing - signatures #
-- use different names!
{-# OPTIONS_GHC -fwarn-name-shadowing #-}
-- use all y... | null | https://raw.githubusercontent.com/googleson78/fp-lab-2022-23/a023f5c9cad9686f3dbd224faf0a3796dfcf376d/exercises/08/Solutions.hs | haskell | cover all cases!
warn about incomplete patterns v2
write all your toplevel signatures!
use different names!
# OPTIONS_GHC -fwarn-name-shadowing #
use all your pattern matches!
hof: -12-01-higherorderness-is-interaction/
z
False
thunk -- delayed computation, replaced when done
do n't forget type annos -- somet... | # OPTIONS_GHC -fwarn - incomplete - patterns #
# OPTIONS_GHC -fwarn - incomplete - uni - patterns #
# OPTIONS_GHC -fwarn - missing - signatures #
# OPTIONS_GHC -fwarn - unused - matches #
module Solutions where
import Data.Maybe (fromMaybe)
import Debug.Trace
import Prelude hiding (cycle, foldl, repeat, scanl)
f(... |
743a97c80f726b0466ad236f6675792599747ca281e85a563cb94b822564050e | casperschipper/ocaml-cisp | sndfiletest.ml | open Process
reading the first channel of an audio file
let _ =
(* replace with another audio file *)
let snd = Sndfile.read "/Users/casperschipper/Downloads/tmp/applaud.wav" in
let sndproc = Sndfile.toProc snd 0 in
let filtered = bhpf_static 1350. 1. sndproc *~ ~.0.3 in
Jack.playSeqs
| null | https://raw.githubusercontent.com/casperschipper/ocaml-cisp/571ffb8e508c5427d01e407ba5e91ff2a4604f40/examples/sndfiletest.ml | ocaml | replace with another audio file | open Process
reading the first channel of an audio file
let _ =
let snd = Sndfile.read "/Users/casperschipper/Downloads/tmp/applaud.wav" in
let sndproc = Sndfile.toProc snd 0 in
let filtered = bhpf_static 1350. 1. sndproc *~ ~.0.3 in
Jack.playSeqs
|
d3c6ff889ec9578fc0fbce3a6a68f8f87f7d1df7758f59f01cf0c24dd91edde7 | josefs/Gradualizer | constraints.erl | @private
-module(constraints).
-export([empty/0,
vars/1,
upper/2,
lower/2,
combine/1, combine/2,
combine_with/4,
add_var/2,
solve/3,
append_values/3,
has_upper_bound/2]).
-export_type([t/0,
mapset/1,
var/0])... | null | https://raw.githubusercontent.com/josefs/Gradualizer/d09a29a143b22b94de8892e6a0d8cc94df40cdb4/src/constraints.erl | erlang | TODO: Don't throw away the constraints
TODO: What if the substition contains occurrences of the variables we're eliminating
in the range of the substitution?
Subtyping should not create new existential variables | @private
-module(constraints).
-export([empty/0,
vars/1,
upper/2,
lower/2,
combine/1, combine/2,
combine_with/4,
add_var/2,
solve/3,
append_values/3,
has_upper_bound/2]).
-export_type([t/0,
mapset/1,
var/0])... |
ad0f4992d49866e8239d7dc97da640e72a4e0c54d68db91b2c367ff0cf9efb43 | lehins/primal | StablePtr.hs | # LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - orphans #
-- |
-- Module : Primal.Foreign.StablePtr
Copyright : ( c ) 2020 - 2022
-- License : BSD3
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
--
module Primal.Foreign.StablePtr
( GHC.StablePtr(..)
, n... | null | https://raw.githubusercontent.com/lehins/primal/c620bfd4f2a6475f1c12183fbe8138cf29ab1dad/primal/src/Primal/Foreign/StablePtr.hs | haskell | |
Module : Primal.Foreign.StablePtr
License : BSD3
Stability : experimental
Portability : non-portable
| Orphan in @primal@
| Orphan in @primal@
| Same as `GHC.deRefStablePtr`, but generalized to `Primal` | # LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - orphans #
Copyright : ( c ) 2020 - 2022
Maintainer : < >
module Primal.Foreign.StablePtr
( GHC.StablePtr(..)
, newStablePtr
, deRefStablePtr
, freeStablePtr
, GHC.castStablePtrToPtr
, GHC.castPtrToStablePtr
) where
import Control.Dee... |
c6242e98cfb912c47f36fe1d2c54b53639067ff6c893c234adffd79e6d81fe27 | bmeurer/ocamljit2 | test8.ml | open Event
type 'a buffer_channel = { input: 'a channel; output: 'a channel }
let new_buffer_channel() =
let ic = new_channel() in
let oc = new_channel() in
let buff = Queue.create() in
let rec buffer_process front rear =
match (front, rear) with
([], []) -> buffer_process [sync(receive ic)] []
... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/testsuite/tests/lib-threads/test8.ml | ocaml | Test | open Event
type 'a buffer_channel = { input: 'a channel; output: 'a channel }
let new_buffer_channel() =
let ic = new_channel() in
let oc = new_channel() in
let buff = Queue.create() in
let rec buffer_process front rear =
match (front, rear) with
([], []) -> buffer_process [sync(receive ic)] []
... |
848133176160f7faaa0fd87bcf65bbed52324353ce91c3dfa26dee697e3c3a91 | isovector/circuitry | Graph.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE MagicHash #-}
{-# LANGUAGE OverloadedLabels #-}
module Circuitry.Graph where
import Circuitry.Category (Category(..))
import Clash.Sized.Vector (Vec(..))
import qualified Clash.Sized.Vector as V
import Control.Monad.Reader (R... | null | https://raw.githubusercontent.com/isovector/circuitry/55b9697a8e34b4ae2effe7b4cbb8fbf4c1419c85/src/Circuitry/Graph.hs | haskell | # LANGUAGE MagicHash #
# LANGUAGE OverloadedLabels # | # LANGUAGE AllowAmbiguousTypes #
module Circuitry.Graph where
import Circuitry.Category (Category(..))
import Clash.Sized.Vector (Vec(..))
import qualified Clash.Sized.Vector as V
import Control.Monad.Reader (ReaderT, MonadReader)
import Control.Monad.State
import D... |
a3f63441a3eb95a515af4483c547d7fef96f9dfdc67c1da44b4ea7dd7621deae | jjtolton/libapl-clj | pointer.clj | (ns libapl-clj.impl.pointer
(:refer-clojure :exclude [- = * > < / + -])
(:require [libapl-clj.impl.jna :as jna]
tech.v3.datatype.jna ;; <-- this is criticial
[tech.v3.datatype :as dtype]
[libapl-clj.impl.api :as api])
(:import [com.sun.jna Pointer]))
(defn ^:private getfn
"... | null | https://raw.githubusercontent.com/jjtolton/libapl-clj/01e2bf7e0d20abd9f8f36c2d9fc829dd4082d455/src/libapl_clj/impl/pointer.clj | clojure | <-- this is criticial
⍝ not sure if this will work | (ns libapl-clj.impl.pointer
(:refer-clojure :exclude [- = * > < / + -])
(:require [libapl-clj.impl.jna :as jna]
[tech.v3.datatype :as dtype]
[libapl-clj.impl.api :as api])
(:import [com.sun.jna Pointer]))
(defn ^:private getfn
"Import an APL function into Clojure as a pointer"
^Point... |
48bd4789feab176ceabea8fccc3465da608d4314b8b9babc3012488965e1ff31 | haskell/haskell-language-server | RuleTypes.hs | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
--... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/ff28990e042f6ae9df39dab435b94ce9b20356a5/ghcide/src/Development/IDE/Core/RuleTypes.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE PatternSynonyms #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
| A Shake implementation of the compiler service, built
| Encode the linkable into an ordered bytestring.
This is used to drive an ordered "newness" predicate in the
| The parse tree fo... | Copyright ( c ) 2019 The DAML Authors . All rights reserved .
SPDX - License - Identifier : Apache-2.0
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleInstances #
using the " " abstraction layer for in - memory use .
module Development.IDE.Core.RuleTypes(
GhcSessionDeps(.., GhcSessionDeps),
modu... |
9926a800c3be8c299e395cf07e072b33c79faa07a26ae8654b25b55eabb3af14 | g000001/MacLISP-compat | ARYFIL.lisp | ;;; -*-LISP-*-
;;; (LIVE-ARRAYS <kind>) returns a list of all allocated arrays (not
;;; currently considered "dead" space). Its argument permits selecting
only certain kinds of arrays : OBARRAY , READTABLE , FILE , T , NIL ,
;;; FIXNUM, or FLONUM. An argument of ALL gets all non-dead arrays.
;;; In addi... | null | https://raw.githubusercontent.com/g000001/MacLISP-compat/a147d09b98dca4d7c089424c3cbaf832d2fd857a/ARYFIL.lisp | lisp | -*-LISP-*-
(LIVE-ARRAYS <kind>) returns a list of all allocated arrays (not
currently considered "dead" space). Its argument permits selecting
FIXNUM, or FLONUM. An argument of ALL gets all non-dead arrays.
In addition, an argument of OPEN-FILE selects only open files.
(OPEN-FILES) returns a list of al... |
only certain kinds of arrays : OBARRAY , READTABLE , FILE , T , NIL ,
(defun (OPEN-FILES macro) (()) `(LIVE-ARRAYS 'OPEN-FILE))
(defun LIVE-ARRAYS (kind)
(or kind (setq kind 'T))
(and (not (memq kind '(OBARRAY READTABLE FILE FIXNUM FLONUM T NIL)))
(not (eq kind 'OPEN-FILE))
(setq kind 'ALL))
... |
5067c4300372e3ed9fa199d152246555af41fe33a83ddf381a1939b7306d5603 | mirage/charrua | dhcp_ipv4.ml | open Lwt.Infix
module Make(R : Mirage_random.S) (C : Mirage_clock.MCLOCK) (Time : Mirage_time.S) (Network : Mirage_net.S) (E : Ethernet.S) (Arp : Arp.S) = struct
(* for now, just wrap a static ipv4 *)
module DHCP = Dhcp_client_mirage.Make(R)(Time)(Network)
include Static_ipv4.Make(R)(C)(E)(Arp)
let connect net... | null | https://raw.githubusercontent.com/mirage/charrua/a06207ea4d174697c8a0226865f0390584aa8433/client/mirage/dhcp_ipv4.ml | ocaml | for now, just wrap a static ipv4 | open Lwt.Infix
module Make(R : Mirage_random.S) (C : Mirage_clock.MCLOCK) (Time : Mirage_time.S) (Network : Mirage_net.S) (E : Ethernet.S) (Arp : Arp.S) = struct
module DHCP = Dhcp_client_mirage.Make(R)(Time)(Network)
include Static_ipv4.Make(R)(C)(E)(Arp)
let connect net ethernet arp =
DHCP.connect net >>= ... |
fffd761bfc237cce5d5eee476925f999c8f728119bf58afe77bda2b5588c58c1 | ytomino/headmaster | stringSet.ml | include Set.Make (String);;
| null | https://raw.githubusercontent.com/ytomino/headmaster/6c52709c7355b6418d5094f2b96da168fe276bae/source/stringSet.ml | ocaml | include Set.Make (String);;
| |
f0acc35be98c4d71238e6b5882db11db982007d27e317e08c281b2a3b2563e5c | janestreet/virtual_dom | global_listeners.mli | open! Core
open! Js_of_ocaml
(** Hooks to set events listeners on [window]. This is needed as if we only set
them on individual elements we will miss ones that happen outside of the viewport
-mouse-events-that-work-even-when-mouse-is-moved-outside-the-window *)
(** Mouse-event handlers *)
val mouseup : (Dom... | null | https://raw.githubusercontent.com/janestreet/virtual_dom/3dd6e8080bdc54fe32e1e9701700ad27df81bf83/src/global_listeners.mli | ocaml | * Hooks to set events listeners on [window]. This is needed as if we only set
them on individual elements we will miss ones that happen outside of the viewport
-mouse-events-that-work-even-when-mouse-is-moved-outside-the-window
* Mouse-event handlers
* Keyboard-event handlers
* Other event handlers | open! Core
open! Js_of_ocaml
val mouseup : (Dom_html.mouseEvent Js.t -> unit Ui_effect.t) -> Attr.t
val mousemove : (Dom_html.mouseEvent Js.t -> unit Ui_effect.t) -> Attr.t
val click : (Dom_html.mouseEvent Js.t -> unit Ui_effect.t) -> Attr.t
val contextmenu : (Dom_html.mouseEvent Js.t -> unit Ui_effect.t) -> Attr.t
... |
4761b5cf71a90744b5a38019b5a749d6c50f52635877e971f7a4fc268a990f99 | bytekid/mkbtt | mascott.ml | module Main = Mascottx.Main;;
module Kernel = struct
let execute = Main.execute
let execute_with = Main.execute_with
end
| null | https://raw.githubusercontent.com/bytekid/mkbtt/c2f8e0615389b52eabd12655fe48237aa0fe83fd/src/mascott/src/mascott.ml | ocaml | module Main = Mascottx.Main;;
module Kernel = struct
let execute = Main.execute
let execute_with = Main.execute_with
end
| |
1b78fb159483980d122f3679f73a8c789442ba46daf58a577ed434ce3589b805 | batebobo/fp1819 | 5-append.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
; Искаме да залепим два списъка
(define tests
(test-suite "Append tests"
(test-case "" (check-equal? (my-append '(1 2 3) '()) '(1 2 3)))
(test-case "" (check-equal? (my-append '() '(1 2 3)) '(1 2 3)))
(test-case "" (check-equal? (my-append '(4 ... | null | https://raw.githubusercontent.com/batebobo/fp1819/2061b7e62a1a9ade3a5fff9753f9fe0da5684275/scheme/4/5-append.rkt | racket | Искаме да залепим два списъка | #lang racket
(require rackunit)
(require rackunit/text-ui)
(define tests
(test-suite "Append tests"
(test-case "" (check-equal? (my-append '(1 2 3) '()) '(1 2 3)))
(test-case "" (check-equal? (my-append '() '(1 2 3)) '(1 2 3)))
(test-case "" (check-equal? (my-append '(4 5 6) '(1 2 3)) '(4 5 6 1 2 3)))
... |
f5c2c7a764e4f02233f8f8d1cf8325e815b9f251e2af05642f1b950a999e45d7 | Zulu-Inuoe/clution | static-vectors-tests.lisp | ;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*-
;;;
;;; --- FiveAM Tests
;;;
(defpackage :static-vectors/test
(:use #:cl #:static-vectors #:fiveam)
(:import-from #:static-vectors #:cmfuncall))
(in-package :static-vectors/test)
(in-suite* :static-vectors)
(test (make-static-vector.plain.notinline
:compile-... | null | https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/static-vectors-v1.8.3/tests/static-vectors-tests.lisp | lisp | -*- Mode: Lisp; indent-tabs-mode: nil -*-
--- FiveAM Tests
|
(defpackage :static-vectors/test
(:use #:cl #:static-vectors #:fiveam)
(:import-from #:static-vectors #:cmfuncall))
(in-package :static-vectors/test)
(in-suite* :static-vectors)
(test (make-static-vector.plain.notinline
:compile-at :definition-time)
(locally
(declare (notinline make-static-vector... |
e41dae8b9bf7c6cb606bb75a505493caba4cab8899109892a09fdfa8c9333ddf | jnear/compiler-construction-assignments | r2_2.rkt | (let ([x #f])
42)
| null | https://raw.githubusercontent.com/jnear/compiler-construction-assignments/17a1edbd59627341622203056180d9af7830756d/tests/r2_2.rkt | racket | (let ([x #f])
42)
| |
bf2c7cdf4d426563fca4f1cbbfe9cc4a01520a75bd6f7b7133fb892378cf684d | karamellpelle/grid | Drawer.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/source/Game/Output/Drawer.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 Game.Output.Drawer
(
Drawer (..),
) ... |
4754eb9d92ca76280eb4136643b2b52aef69bb5fc056fe2f422525ad5a1e2563 | herd/herdtools7 | CTestHash.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/8ceb2e10d07e04cfcced6e13886bca3fff5358d5/lib/CTestHash.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2014 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
b04eb9d842630a2907ab128145617765abf3a9a20b94ed1646a152fc26931296 | fukamachi/clozure-cl | sequence-utils.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; Package : cl - user -*-
;;;; ***********************************************************************
;;;; FILE IDENTIFICATION
;;;;
;;;; Name: sequence-utils.lisp
Version : 0.2
;;;; Project: utilities
;;;; Purpose: utilities fo... | null | https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/library/sequence-utils.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 ; Package : cl - user -*-
***********************************************************************
FILE IDENTIFICATION
Name: sequence-utils.lisp
Project: utilities
Purpose: utilities for working with sequences
***************************************... | Version : 0.2
(in-package "CCL")
Split a sequence SEQ at each point where TEST is true
DIR should be one of : BEFORE , : AFTER or : ELIDE
(defun split-if (test seq &optional (dir :before))
(remove-if
#'(lambda (x) (equal x (subseq seq 0 0)))
(loop for start fixnum = 0
then (if (eq dir... |
04f7e8c98c27ccad05f583d87c42da0463034b4680612d7297175f6c6a9349a0 | janestreet/vcaml | simple_editor.ml | open Core
open Async
open Vcaml
open Deferred.Or_error.Let_syntax
(* Simple Vcaml plugin to create a new buffer/window which the user can use as a
scratchpad, with no vim bindings. The plugin is killed on window close.
The editor only supports lowercase/uppercase letters + space/enter/backspace. *)
let of_ascii... | null | https://raw.githubusercontent.com/janestreet/vcaml/64d205c2d6eee4a7e57abd2d452f5979dc6cd797/example/simple_editor/src/simple_editor.ml | ocaml | Simple Vcaml plugin to create a new buffer/window which the user can use as a
scratchpad, with no vim bindings. The plugin is killed on window close.
The editor only supports lowercase/uppercase letters + space/enter/backspace. | open Core
open Async
open Vcaml
open Deferred.Or_error.Let_syntax
let of_ascii_list ascii_chars =
ascii_chars |> List.map ~f:(Fn.compose String.of_char Char.of_int_exn)
;;
let lowercase = of_ascii_list (List.init 26 ~f:(( + ) 97))
let uppercase = of_ascii_list (List.init 26 ~f:(( + ) 65))
let alphabet = lowercase ... |
0dc0525fde8d582f049ba931c77f8499e2ad0ebea7573adb420f5f20d899f369 | LeventErkok/sbv | Fibonacci.hs | -----------------------------------------------------------------------------
-- |
-- Module : Documentation.SBV.Examples.Lists.Fibonacci
Copyright : ( c )
-- License : BSD3
-- Maintainer:
-- Stability : experimental
--
Define the fibonacci sequence as an SBV symbolic list .
--------------------------------... | null | https://raw.githubusercontent.com/LeventErkok/sbv/fdd4b9e7607b0a14ce87057130e55a6be6910bd5/Documentation/SBV/Examples/Lists/Fibonacci.hs | haskell | ---------------------------------------------------------------------------
|
Module : Documentation.SBV.Examples.Lists.Fibonacci
License : BSD3
Maintainer:
Stability : experimental
---------------------------------------------------------------------------
# OPTIONS_GHC -Wall -Werror #
| Compute a prefix ... | Copyright : ( c )
Define the fibonacci sequence as an SBV symbolic list .
module Documentation.SBV.Examples.Lists.Fibonacci where
import Data.SBV
import Prelude hiding ((!!))
import Data.SBV.List ((!!))
import qualified Data.SBV.List as L
import Data.SBV.Control
mkFibs :: Int -> IO [Integer]
mkFi... |
c1f2d0ec08cbea8133bd3d4cb64b496afa4536d4d6c2d72263d34750ce209dce | ocaml-multicore/tezos | delegate_storage.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/ocaml-multicore/tezos/e4fd21a1cb02d194b3162ab42d512b7c985ee8a9/src/proto_alpha/lib_protocol/delegate_storage.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WIT... |
bbc7181971d185597026ae415e707febd35d32d28f22039ad38f56bb7103d9d0 | cram2/cram | fk.lisp | ;;;
Copyright ( c ) 2016 , < >
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions are met:
;;;
;;; * Redistributions of source code must retain the above copyright
;;; notice, this list... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_pr2/cram_pr2_arm_kinematics/src/fk.lisp | lisp |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redi... | Copyright ( c ) 2016 , < >
* Neither the name of the Institute for Artificial Intelligence/
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS "
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ... |
0af170247d5caed7d2bfaab117ea9837971af38767224086cf3b38abced6e126 | qrilka/xlsx | Util.hs | module Codec.Xlsx.Parser.Internal.Util
( boolean
, eitherBoolean
, decimal
, eitherDecimal
, rational
, eitherRational
) where
import Data.Text (Text)
import Control.Monad.Fail (MonadFail)
import qualified Data.Text as T
import qualified Data.Text.Read as T
import qualified Control.Monad.Fail as F
decim... | null | https://raw.githubusercontent.com/qrilka/xlsx/397c3c9db965419a2d2d72470ba68f478748c573/src/Codec/Xlsx/Parser/Internal/Util.hs | haskell | module Codec.Xlsx.Parser.Internal.Util
( boolean
, eitherBoolean
, decimal
, eitherDecimal
, rational
, eitherRational
) where
import Data.Text (Text)
import Control.Monad.Fail (MonadFail)
import qualified Data.Text as T
import qualified Data.Text.Read as T
import qualified Control.Monad.Fail as F
decim... | |
43fe58414253d7c9d7b3d67f4b2689136036cae4a426c1759abf8c2d8369cf41 | yi-editor/yi | LineNumbers.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.UI.LineNumbers
-- License : GPL-2
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
-- Line numbers.
module Yi.UI.LineNumbers
( getDisplayLineNumb... | null | https://raw.githubusercontent.com/yi-editor/yi/58c239e3a77cef8f4f77e94677bd6a295f585f5f/yi-core/src/Yi/UI/LineNumbers.hs | haskell | # LANGUAGE DeriveDataTypeable #
# OPTIONS_HADDOCK show-extensions #
|
Module : Yi.UI.LineNumbers
License : GPL-2
Maintainer :
Stability : experimental
Portability : portable
Line numbers.
| Get the buffer-local line number setting.
| Set the buffer-local line number setting.
Nothing: use gl... | # LANGUAGE DeriveGeneric #
module Yi.UI.LineNumbers
( getDisplayLineNumbersLocal
, setDisplayLineNumbersLocal
) where
import Data.Binary (Binary (..))
import Data.Default (Default (..))
import Data.Typeable (Typeable)
import GHC.Generics (Generic)
import ... |
387c21e20601ed6b6435cff9e35cc971faf8d6db47b94afda6b9806449d45b1d | bobot/FetedelascienceINRIAsaclay | snapshot.ml | open Graphics
File : snapshot.ml
Copyright ( C ) 2008
< >
WWW : /
This library is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.1 or
later as published by the Free Software Foundation , with the special
... | null | https://raw.githubusercontent.com/bobot/FetedelascienceINRIAsaclay/87765db9f9c7211a26a09eb93e9c92f99a49b0bc/2010/robot/examples_mindstorm_lab/rubik/snapshot.ml | ocaml | FIXME: this file needs some cleanup
Helpers
**********************************************************************
**********************************************************************
This approach saves snapshots in a file that we can read in
(execute "vlc -p image" for more info). The "-I rc" starts the
... | open Graphics
File : snapshot.ml
Copyright ( C ) 2008
< >
WWW : /
This library is free software ; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.1 or
later as published by the Free Software Foundation , with the special
... |
75139f843090f695ad1c913824529db69113b065d7d35144d0b62e11fea51353 | stackbuilders/tutorials | Main.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Main where
import Asterius.Types
import Control.Monad
import Data.Aeson hiding (Object)
import qualified Data.Aeson as A
import Data.Aeson.TH
import qualified Data.ByteStri... | null | https://raw.githubusercontent.com/stackbuilders/tutorials/c6100b5bf7a00a3669444313159dfc2ca0cf8eb7/tutorials/haskell/wasm-and-cloudflare-workers/code/cabal-cfw-example/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Main where
import Asterius.Types
import Control.Monad
import Data.Aeson hiding (Object)
import qualified Data.Aeson as A
import Data.Aeson.TH
import qualified Data.ByteString.Lazy.Char8 as B8
import ... |
b65a19ba147735b1d68f54351e7822b7105cca2ceb4b47d30155ad1e036ebe99 | tweag/asterius | rebindable7.hs | {-# OPTIONS -XRebindableSyntax #-}
This one tests rebindable syntax for do - notation
module Main where
import qualified Prelude
import GHC.Num
import GHC.Base hiding( Monad(..) )
class Foo a where
op :: a -> a
data T a = MkT a
instance Foo Int where
op x = x+1
(>>=) :: Foo a => T a -> (a -> T b) -> T b
(>... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/test/ghc-testsuite/rebindable/rebindable7.hs | haskell | # OPTIONS -XRebindableSyntax # |
This one tests rebindable syntax for do - notation
module Main where
import qualified Prelude
import GHC.Num
import GHC.Base hiding( Monad(..) )
class Foo a where
op :: a -> a
data T a = MkT a
instance Foo Int where
op x = x+1
(>>=) :: Foo a => T a -> (a -> T b) -> T b
(>>=) (MkT x) f = f (op x)
(>>) :: F... |
a3b4b55ae9c4531618e273a3f12242aed6531d990dc4738c4e2771136cc45707 | mfoemmel/erlang-otp | mnesia_backup.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/mnesia/src/mnesia_backup.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1996 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
0
This module contains one implementat... |
bf5cab8e579213b0f73b7f61491ffb04479a421bd8549871aea67e35eb7f8e78 | bitnomial/bitcoind-rpc | Wallet.hs | # LANGUAGE NumericUnderscores #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TupleSections #
module Bitcoin.Core.Test.Wallet (
walletRPC,
) where
import Control.Monad (replicateM, replicateM_, when)
import Control.Monad.IO.Class (liftIO)
import Data.Functor (void)
import Data.List (sortOn)
import qualified Data.... | null | https://raw.githubusercontent.com/bitnomial/bitcoind-rpc/6a8befdce7828f2ae867fc7dcb411a36a363de52/bitcoind-regtest/test/Bitcoin/Core/Test/Wallet.hs | haskell | # LANGUAGE OverloadedStrings #
Taken from bitcoind descriptor wallet documentation
TODO importWallet,
TODO signRawTx, | # LANGUAGE NumericUnderscores #
# LANGUAGE TupleSections #
module Bitcoin.Core.Test.Wallet (
walletRPC,
) where
import Control.Monad (replicateM, replicateM_, when)
import Control.Monad.IO.Class (liftIO)
import Data.Functor (void)
import Data.List (sortOn)
import qualified Data.Map.Strict as Map
import qualified ... |
8d0fa4fca3db29f0c5a1b91faed20b1ad30fab0d1be890789b3b97ee59e44c83 | digital-dj-tools/dj-data-converter | stats.cljc | (ns converter.stats
(:require [clojure.core.matrix.stats :as stats]
[converter.universal.core :as u]
[converter.universal.tempo :as ut]))
(defn mean-tempos
[library]
(double (stats/mean (map (comp count ::u/tempos) (::u/collection library)))))
(defn count-tempos-of-rand-n-items
[librar... | null | https://raw.githubusercontent.com/digital-dj-tools/dj-data-converter/de1ae5cda60bc64ee3cca1a09b11e1808dd4738a/test/converter/stats.cljc | clojure | (ns converter.stats
(:require [clojure.core.matrix.stats :as stats]
[converter.universal.core :as u]
[converter.universal.tempo :as ut]))
(defn mean-tempos
[library]
(double (stats/mean (map (comp count ::u/tempos) (::u/collection library)))))
(defn count-tempos-of-rand-n-items
[librar... | |
d1f28c0c105c7e282824899202f1a7811fe40e2e36391568419cfa163098a478 | thesis/shale | configurer.clj | (ns shale.configurer
(:use shale.utils)
(:require [carica.core :refer [resources]]
[environ.core :refer [env]]
clojure.walk
[clojure.java.io :as io]
clojure.edn
[shale.logging :as logging]
[shale.utils :refer [pretty]]))
(defn... | null | https://raw.githubusercontent.com/thesis/shale/84180532e46ee5d9ee0218138da04ea035bcf7d2/src/clj/shale/configurer.clj | clojure | (ns shale.configurer
(:use shale.utils)
(:require [carica.core :refer [resources]]
[environ.core :refer [env]]
clojure.walk
[clojure.java.io :as io]
clojure.edn
[shale.logging :as logging]
[shale.utils :refer [pretty]]))
(defn... | |
2ec7c551aab2ac9d1af4b8c26e022a2dacfdf5e4e3e3de99b8a3b7c67a2ba055 | patricoferris/ocaml-multicore-monorepo | sql.eml.ml | module type DB = Caqti_lwt.CONNECTION
module R = Caqti_request
module T = Caqti_type
let list_comments =
let query =
R.collect T.unit T.(tup2 int string)
"SELECT id, text FROM comment" in
fun (module Db : DB) ->
let%lwt comments_or_error = Db.collect_list query () in
Caqti_lwt.or_fail comments_or... | null | https://raw.githubusercontent.com/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/dream/example/h-sql/sql.eml.ml | ocaml | module type DB = Caqti_lwt.CONNECTION
module R = Caqti_request
module T = Caqti_type
let list_comments =
let query =
R.collect T.unit T.(tup2 int string)
"SELECT id, text FROM comment" in
fun (module Db : DB) ->
let%lwt comments_or_error = Db.collect_list query () in
Caqti_lwt.or_fail comments_or... | |
46f9cb72e2c0542bdfa93cb157b59a84b8783b059afc05a00339f4273e2d1086 | OtpChatBot/Ybot | web_admin_req_handler.erl | %%%-----------------------------------------------------------------------------
%%% @author 0xAX <>
%%% @doc
Ybot web admin requests handler .
%%% @end
%%%-----------------------------------------------------------------------------
-module(web_admin_req_handler).
-export([init/3]).
-export([handle/2]).
-export([te... | null | https://raw.githubusercontent.com/OtpChatBot/Ybot/5ce05fea0eb9001d1c0ff89702729f4c80743872/src/web/web_admin_req_handler.erl | erlang | -----------------------------------------------------------------------------
@author 0xAX <>
@doc
@end
-----------------------------------------------------------------------------
=============================================================================
Cowboy handler callback
================================... | Ybot web admin requests handler .
-module(web_admin_req_handler).
-export([init/3]).
-export([handle/2]).
-export([terminate/3]).
init(_Transport, Req, []) ->
{ok, Req, undefined}.
handle(Req, State) ->
{ok, WebAdmin} = application:get_env(ybot, web_admin),
case config_option(webadmin_auth, WebAdmin... |
ba063d5bd8236466ebe1c88fd47206212f5594acc6baa537d82af545f0b7037d | conreality/conreality | bcm2836.mli | (* This is free and unencumbered software released into the public domain. *)
module GPIO : sig
module Pin : sig
val construct : Scripting.Table.t -> Device.t
end
end
| null | https://raw.githubusercontent.com/conreality/conreality/e03328ef1f0056b58e4ffe181a279a1dc776e094/src/consensus/machinery/bcm2836.mli | ocaml | This is free and unencumbered software released into the public domain. |
module GPIO : sig
module Pin : sig
val construct : Scripting.Table.t -> Device.t
end
end
|
eced361868749e0292a3dc238cf1b0b31ac70c4ccc0552dd37320eeb84d2fb6b | solatis/haskell-network-anonymous-i2p | Parser.hs | -- | Parser defintions
--
-- Defines parsers used by the I2P SAM protocol
--
-- __Warning__: This function is used internally by 'Network.Anonymous.I2P'
-- and using these functions directly is unsupported. The
-- interface of these functions might change at any time without
-- ... | null | https://raw.githubusercontent.com/solatis/haskell-network-anonymous-i2p/57681eedc06ed349f3ac011ada221c567c91739a/src/Network/Anonymous/I2P/Protocol/Parser.hs | haskell | | Parser defintions
Defines parsers used by the I2P SAM protocol
__Warning__: This function is used internally by 'Network.Anonymous.I2P'
and using these functions directly is unsupported. The
interface of these functions might change at any time without
prior noti... |
module Network.Anonymous.I2P.Protocol.Parser where
import Control.Applicative ((*>), (<$>), (<*),
(<|>))
import qualified Data.Attoparsec.ByteString as Atto
import qualified Data.Attoparsec.ByteString.Cha... |
007575e887c9575f35c638b390448c51a19211b515a33596a14b03d72a846f09 | cwmaguire/zombunity-mud | move_test.clj | (ns zombunity.move-test
(:use clojure.test)
(:require [zombunity.dispatch :as disp]
[zombunity.data :as data]
[zombunity.data.simple-data :as simple-data]))
(def conn-id (rand 100))
(def no-movement-msg {:message "No movement commands as of yet." :conn-id conn-id})
(deftest test-chat
(di... | null | https://raw.githubusercontent.com/cwmaguire/zombunity-mud/ec14406f4addac9b9a0742d3043a6e7bccef1fa6/zombunity_server/test/zombunity/move_test.clj | clojure | (ns zombunity.move-test
(:use clojure.test)
(:require [zombunity.dispatch :as disp]
[zombunity.data :as data]
[zombunity.data.simple-data :as simple-data]))
(def conn-id (rand 100))
(def no-movement-msg {:message "No movement commands as of yet." :conn-id conn-id})
(deftest test-chat
(di... | |
e75e14e1d4e61fe56a287dc7af6e9bacd7765b3de721164ca2a480be80dee091 | g000001/MacLISP-compat | GRIND.lisp |
;;; -*-LISP-*-
;;; ***********************************************************************
* * * * * * * * * * * S - expression formatter for files ( grind ) * * * * * * * * *
;;; ***********************************************************************
* * ( c ) Copyright 1980 Massachusetts Institute of... | null | https://raw.githubusercontent.com/g000001/MacLISP-compat/a147d09b98dca4d7c089424c3cbaf832d2fd857a/GRIND.lisp | lisp | -*-LISP-*-
***********************************************************************
***********************************************************************
****** this is a read-only file! (all writes reserved) ****************
***********************************************************************
/ ; us... |
* * * * * * * * * * * S - expression formatter for files ( grind ) * * * * * * * * *
* * ( c ) Copyright 1980 Massachusetts Institute of Technology * * * * * * * * * * *
This version of Grind works in both ITS and Multics Maclisp
GFILE - fns for pretty - printing and grinding files .
(eval-when (eval c... |
e84de4b2e4e5d4d01858f24a8c97b68490fb9a950d69e0f46d446bed800d9b46 | typelead/intellij-eta | AbstractModuleBuilder.hs | module FFI.Com.IntelliJ.Ide.Util.ProjectWizard.AbstractModuleBuilder where
import P.Base
data AbstractModuleBuilder = AbstractModuleBuilder
@com.intellij.ide.util.projectWizard.AbstractModuleBuilder
deriving Class
| null | https://raw.githubusercontent.com/typelead/intellij-eta/ee66d621aa0bfdf56d7d287279a9a54e89802cf9/plugin/src/main/eta/FFI/Com/IntelliJ/Ide/Util/ProjectWizard/AbstractModuleBuilder.hs | haskell | module FFI.Com.IntelliJ.Ide.Util.ProjectWizard.AbstractModuleBuilder where
import P.Base
data AbstractModuleBuilder = AbstractModuleBuilder
@com.intellij.ide.util.projectWizard.AbstractModuleBuilder
deriving Class
| |
4db0a56a43abe6cba1f8a1ddef3a736982ff1bf734b50b4d76434fd09f11d944 | ringstellung/Enigma | EnigmaI.hs | module EnigmaI (module EnigmaI) where
import Data.Char
import Auxiliars
import Types
import Rotors
CIFRADO
CIFRADO
-}
isInPositionToCJump :: RotorGS -> Bool
isInPositionToCJump (RotorGS r c) = c `elem` (extractNotch r)
rotateRotorOne :: ... | null | https://raw.githubusercontent.com/ringstellung/Enigma/f21aa7617355b804f0e43ae76ae66a750fabc615/Enigma_I/EnigmaI.hs | haskell | module EnigmaI (module EnigmaI) where
import Data.Char
import Auxiliars
import Types
import Rotors
CIFRADO
CIFRADO
-}
isInPositionToCJump :: RotorGS -> Bool
isInPositionToCJump (RotorGS r c) = c `elem` (extractNotch r)
rotateRotorOne :: ... | |
b8057945e3b7a077034424904d0455e28e027916561e6cee27733ad4e481bb47 | nikomatsakis/a-mir-formality | subtype.rkt | #lang racket
(require redex/reduction-semantics
"occurs-check.rkt"
"universe-check.rkt"
"rigid.rkt"
"../kind.rkt"
"../grammar.rkt"
"../extrude.rkt"
"../hypothesized-bounds.rkt"
"../../logic/env.rkt"
"../../logic/env-inequalities.rkt"
... | null | https://raw.githubusercontent.com/nikomatsakis/a-mir-formality/bc951e21bff2bae1ccab8cc05b2b39cfb6365bfd/racket-src/ty/relate/subtype.rkt | racket | X ?= X:
Always ok.
'a <= 'b if 'a -outlives- 'b
'a >= 'b if 'a -outlived-by- 'b
ought to be well-kinded
X ?= R<...> -- Inequality between a variable and a rigid type
R<...> ?= X -- Inequality between a variable and a rigid type
R<...> ?= X -- Inequality between a variable and a rigid type
`?X <= T` where occ... | #lang racket
(require redex/reduction-semantics
"occurs-check.rkt"
"universe-check.rkt"
"rigid.rkt"
"../kind.rkt"
"../grammar.rkt"
"../extrude.rkt"
"../hypothesized-bounds.rkt"
"../../logic/env.rkt"
"../../logic/env-inequalities.rkt"
... |
fdee1e1c89d7c5ee0da1199bc521137d81c83e4734f8fb60f688eff3b85beef9 | jrm-code-project/LISP-Machine | open.lisp | -*- Mode : LISP ; Package : FILE - SYSTEM ; Base:8 ; : ZL -*-
;;;; Global interface functions, and random file stuff
First define the error flavors and signal names used by all file errors .
(DEFFLAVOR FILE-ERROR (PATHNAME OPERATION) (NO-ACTION-MIXIN ERROR)
:ABSTRACT-FLAVOR
:GETTABLE-INSTANCE-VARIABLES
:INIT... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/io/file/open.lisp | lisp | Package : FILE - SYSTEM ; Base:8 ; : ZL -*-
Global interface functions, and random file stuff
Unimplemented-option
Subclasses of FILE-OPERATION-FAILURE.
ACCESS-ERROR means some kind of protection failure.
CREATION-FAILUREs
Should have property :NEW-PATHNAME.
This variable is to make DIRED have a guess at what is... |
First define the error flavors and signal names used by all file errors .
(DEFFLAVOR FILE-ERROR (PATHNAME OPERATION) (NO-ACTION-MIXIN ERROR)
:ABSTRACT-FLAVOR
:GETTABLE-INSTANCE-VARIABLES
:INITTABLE-INSTANCE-VARIABLES)
(DEFMETHOD (FILE-ERROR :AFTER :INIT) (IGNORE)
(SETQ PATHNAME (GETF SI:PROPERTY-LIST ':PAT... |
b675a681af4ce36c998126c44dd6a361cf7f00b2d530d6c82f1f51e7b1b26db5 | zeniuseducation/poly-euler | prob51-100.clj | (ns euler.prob51-100)
(load-file "math.clj")
Do nt know berapa
(defn sqr [x] (* x x))
(defn a->bc
"Consider a^2 + b^2 = c^2, this fn returns the value of a+b+c from a
given a, or nil if it's impossible to construct integer-value b and
c from a given a."
[a lim]
(let [asqr (sqr a)]
(loop [b (inc a)... | null | https://raw.githubusercontent.com/zeniuseducation/poly-euler/734fdcf1ddd096a8730600b684bf7398d071d499/clojure/prob51-100.clj | clojure | x^2 = 1 + dy2 | (ns euler.prob51-100)
(load-file "math.clj")
Do nt know berapa
(defn sqr [x] (* x x))
(defn a->bc
"Consider a^2 + b^2 = c^2, this fn returns the value of a+b+c from a
given a, or nil if it's impossible to construct integer-value b and
c from a given a."
[a lim]
(let [asqr (sqr a)]
(loop [b (inc a)... |
329e3afe73d62126e3ff8cf0a0e47b735f8dba5f01a802376aecc0a76453b7de | DerekCuevas/interview-cake-clj | core.clj | (ns highest-product-of-three.core
(:gen-class))
(defn- rotation
"Rotates bucket of k length around the bottom and top of arr by idx."
[arr k idx]
(let [top (- (count arr) (- k idx))]
(vec (concat (subvec arr 0 idx)
(subvec arr top)))))
(defn highest-product-of-k
"O(nlgn) time + O(n + (k... | null | https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/highest-product-of-three/src/highest_product_of_three/core.clj | clojure | (ns highest-product-of-three.core
(:gen-class))
(defn- rotation
"Rotates bucket of k length around the bottom and top of arr by idx."
[arr k idx]
(let [top (- (count arr) (- k idx))]
(vec (concat (subvec arr 0 idx)
(subvec arr top)))))
(defn highest-product-of-k
"O(nlgn) time + O(n + (k... | |
fee29ed0b8ed089b1540148c733c106c66ef9b274d1cd43cdf8ba77759117d44 | danieljharvey/nix-mate | Tags.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralisedNewtypeDeriving #
module NixMate.Types.Tags
( Tag (..),
TagName,
mkTagName,
getTagName,
tagsPrefix,
)
where
import qualified Data.Char as Char
import Data.List (isInfixOf)
import NixMate.Types.Config
newtype TagName = TagName String
deriving... | null | https://raw.githubusercontent.com/danieljharvey/nix-mate/0197b8517319a4ad4c9cb489579a6ed36ad9aec1/src/NixMate/Types/Tags.hs | haskell | # LANGUAGE DerivingStrategies #
# LANGUAGE GeneralisedNewtypeDeriving #
module NixMate.Types.Tags
( Tag (..),
TagName,
mkTagName,
getTagName,
tagsPrefix,
)
where
import qualified Data.Char as Char
import Data.List (isInfixOf)
import NixMate.Types.Config
newtype TagName = TagName String
deriving... | |
677abdd2f0baa1c6909fb40d83d9f5dae02e8604e26ed4300e4f7246f4ee7722 | con-kitty/categorifier-c | Utils.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
module Categorifier.C.CTypes.Codegen.Render.Utils
( indentWith,
staticAssertTriviallyCopyable,
staticAssertTriviallyCopyable',
toCommentText,
nolintNextLineReadabilityIdentifierNaming,
nolintReadabilityIdentifierNaming,
staticAssert,... | null | https://raw.githubusercontent.com/con-kitty/categorifier-c/167ff5cfdeb60b6fa00b10ec74033c32132d45a0/Categorifier/C/CTypes/Codegen/Render/Utils.hs | haskell | # LANGUAGE OverloadedStrings #
don't add spaces to an empty line | # LANGUAGE QuasiQuotes #
module Categorifier.C.CTypes.Codegen.Render.Utils
( indentWith,
staticAssertTriviallyCopyable,
staticAssertTriviallyCopyable',
toCommentText,
nolintNextLineReadabilityIdentifierNaming,
nolintReadabilityIdentifierNaming,
staticAssert,
)
where
import Categorifier.C.C... |
74400a65fb8efd3181779793f205b088f9545b6e236dc221bbf6198e32c0f795 | janestreet/memtrace_viewer_with_deps | app.ml | open! Core_kernel
open! Async_kernel
open Incr_dom
module Model = struct
type t = unit
let cutoff = phys_equal
end
module State = struct
type t = unit
end
module Action = struct
type t = Nothing.t [@@deriving sexp]
end
let initial_model = ()
let on_startup ~schedule_action:_ _model = Deferred.unit
let cre... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/incr_dom/example/hello_world/lib/app.ml | ocaml | open! Core_kernel
open! Async_kernel
open Incr_dom
module Model = struct
type t = unit
let cutoff = phys_equal
end
module State = struct
type t = unit
end
module Action = struct
type t = Nothing.t [@@deriving sexp]
end
let initial_model = ()
let on_startup ~schedule_action:_ _model = Deferred.unit
let cre... | |
728ebdd3576632f6411be6162f1374dd50f140cf1bc3fbd46cccca623843ffda | ryleelyman/latex.nvim | conceal_greek.scm | greek conceal
(generic_command
command: ((command_name) @text.math
(#any-of? @text.math
"\\alpha" "\\beta" "\\gamma" "\\delta"
"\\epsilon" "\\varepsilon" "\\zeta" "\\eta"
"\\theta" "\\vartheta" "\\iota" "\\kappa"
"\\lambda" "\\mu" "\\nu" "\\xi"
"\\pi" "\\varpi" "\\rho" "\\varrho"
"\\sigma" "\\... | null | https://raw.githubusercontent.com/ryleelyman/latex.nvim/966a4fe978b8bef82d153fd6321801bd0683eb15/queries/latex/conceal_greek.scm | scheme | greek conceal
(generic_command
command: ((command_name) @text.math
(#any-of? @text.math
"\\alpha" "\\beta" "\\gamma" "\\delta"
"\\epsilon" "\\varepsilon" "\\zeta" "\\eta"
"\\theta" "\\vartheta" "\\iota" "\\kappa"
"\\lambda" "\\mu" "\\nu" "\\xi"
"\\pi" "\\varpi" "\\rho" "\\varrho"
"\\sigma" "\\... | |
f017f30bcaeb063d0573862190c381c5bb00cae9182cdbb443087d4fa54a419b | manuel-serrano/bigloo | pgp_s2k.scm | (module __openpgp-s2k
(library crypto)
(import __openpgp-human
__openpgp-algo
__openpgp-util
__openpgp-error)
(export (simple-s2k::bstring str::bstring len::long hash-fun::procedure)
(salted-s2k::bstring str::bstring len::long hash-fun::procedure
salt::bstring)
(iterated-salted-s2k::bst... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/6afa8068fa5889b3615f4b6fe5991b7d2387318a/api/openpgp/src/Llib/pgp_s2k.scm | scheme | rounds the input number, so that it can be exactly encoded by the
s2k-encoding mechanism.
if we are in between iterations just round up.
the left digit decides how far we must shift the right digit.
We thus shift the initial count to the right until we satisfy this
property. (As we come from above, we only need t... | (module __openpgp-s2k
(library crypto)
(import __openpgp-human
__openpgp-algo
__openpgp-util
__openpgp-error)
(export (simple-s2k::bstring str::bstring len::long hash-fun::procedure)
(salted-s2k::bstring str::bstring len::long hash-fun::procedure
salt::bstring)
(iterated-salted-s2k::bst... |
64cee1541b95c3013e4d8dcc45f6a8ace3a5facceaeb35023cbc11d1d4fe4174 | wies/grasshopper | prioQueue.mli | * Priority Search Queues .
Implements the data structure from this paper :
A Simple Implementation Technique for Priority Search Queues
, ICFP 2001
Implements the data structure from this paper:
A Simple Implementation Technique for Priority Search Queues
Ralf Hinze, ICFP 2001
*)... | null | https://raw.githubusercontent.com/wies/grasshopper/108473b0a678f0d93fffec6da2ad6bcdce5bddb9/src/util/prioQueue.mli | ocaml | * Priority Search Queues .
Implements the data structure from this paper :
A Simple Implementation Technique for Priority Search Queues
, ICFP 2001
Implements the data structure from this paper:
A Simple Implementation Technique for Priority Search Queues
Ralf Hinze, ICFP 2001
*)... | |
2214a5ac2319bf6a71020b9630ab2e0cbc2727ba67d1c8b4215ffe3f7d27f307 | jaseemabid/mit-scheme | tak.scm | (declare (usual-integrations))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; File: tak.sch
Description : TAK benchmark from the tests
Author :
; Created: 12-Apr-85
Modified : 12 - Apr-85 09:58:18 ( )
22 - Jul-87 ( )
; Language:... | null | https://raw.githubusercontent.com/jaseemabid/mit-scheme/d30da6b2c103e34b6e0805bd5cbefeb9501382c1/v8/src/bench/tak.scm | scheme |
File: tak.sch
Created: 12-Apr-85
Language: Scheme
Status: Public Domain
| (declare (usual-integrations))
Description : TAK benchmark from the tests
Author :
Modified : 12 - Apr-85 09:58:18 ( )
22 - Jul-87 ( )
TAK -- A vanilla version of the TAKeuchi function
(define (tak x y z)
(if (not (< y x))
z
(tak (tak (- x 1) y z)
... |
bb5150cbcea1711d4c32cc21cdb6eba180ceeaa51d3cd6e05278ae82ce21a39e | flavioc/cl-meld | typecheck.lisp | (in-package :cl-meld)
(define-condition type-invalid-error (error)
((text :initarg :text :reader text)))
(defun check-home-argument (name typs)
(when (null typs)
(error 'type-invalid-error :text (concatenate 'string name " has no arguments")))
(let ((fst (first typs)))
(unless (or (type-addr-p fs... | null | https://raw.githubusercontent.com/flavioc/cl-meld/8bfedb30137a15bfd94c6cfafe0a5107a050dd35/typecheck.lisp | lisp | do nothing
var is already typed
(warn "types ~a base-types ~a head-types ~a list-head-types ~a new-types ~a" forced-types
base-types head-types list-head-types new-types)
re-updated head-type
linear fact
persistent fact
replace spec variable's types.
LET has problems with this
(unless (has-variables-defined exp... | (in-package :cl-meld)
(define-condition type-invalid-error (error)
((text :initarg :text :reader text)))
(defun check-home-argument (name typs)
(when (null typs)
(error 'type-invalid-error :text (concatenate 'string name " has no arguments")))
(let ((fst (first typs)))
(unless (or (type-addr-p fs... |
3be34ed910c1c04467670b903cda0c7db2ef426b3f14c85ef18d2f6d8b590493 | google/ormolu | grouped-splices-out.hs | $(deriveJSON fieldLabelMod ''A)
$(deriveJSON fieldLabelMod ''B)
$(deriveJSON fieldLabelMod ''C)
| null | https://raw.githubusercontent.com/google/ormolu/ffdf145bbdf917d54a3ef4951fc2655e35847ff0/data/examples/declaration/splice/grouped-splices-out.hs | haskell | $(deriveJSON fieldLabelMod ''A)
$(deriveJSON fieldLabelMod ''B)
$(deriveJSON fieldLabelMod ''C)
| |
72f4e352b14e60852916ae42b2df6e7519dd7032537dbbe82070f7171bcf4c10 | jixiuf/helloerlang | test.erl | -module(test).
-export([terminate/2,handle_cast/2,handle_call/3,init/1,start_link/0]).
start_link()->
gen_server_2:start_link(?MODULE,[])
.
init(State)->
{ok,State}
.
handle_call(hello,_From,State)->
io:format("you say hello~n",[]),
{reply,you_say_hello, State};
handle_call(world,Fr... | null | https://raw.githubusercontent.com/jixiuf/helloerlang/3960eb4237b026f98edf35d6064539259a816d58/gen_server_2/src/test.erl | erlang | -module(test).
-export([terminate/2,handle_cast/2,handle_call/3,init/1,start_link/0]).
start_link()->
gen_server_2:start_link(?MODULE,[])
.
init(State)->
{ok,State}
.
handle_call(hello,_From,State)->
io:format("you say hello~n",[]),
{reply,you_say_hello, State};
handle_call(world,Fr... | |
c8af026d99d7a9d21c129f0ac41faa55a66ec8ac5df1943994b346909f0fa05a | chetmurthy/typpx | sugar.ml | open Ast_helper
open Parsetree
open Asttypes
open Ast_mapper
let extend super =
let structure_item self sitem = match sitem.pstr_desc with
| Pstr_extension ( ({txt="overloaded"}, PStr [{pstr_desc= Pstr_primitive vd}] ), _attr ) ->
(* val%overloaded x : t => external x : t = "__OVERLOADED" *)
Str... | null | https://raw.githubusercontent.com/chetmurthy/typpx/a740750b75739e686da49b46ded7db7d6874e108/examples/ppx_overload/sugar.ml | ocaml | val%overloaded x : t => external x : t = "__OVERLOADED"
val%overloaded x : t => external x : t = "__OVERLOADED" | open Ast_helper
open Parsetree
open Asttypes
open Ast_mapper
let extend super =
let structure_item self sitem = match sitem.pstr_desc with
| Pstr_extension ( ({txt="overloaded"}, PStr [{pstr_desc= Pstr_primitive vd}] ), _attr ) ->
Str.primitive ~loc:sitem.pstr_loc { vd with pval_prim = [ "__OVERLOADED" ]... |
1cd3a01c7b1f863dc445d0bae0374b838491a99724b22f34aa659ad1e41ffa43 | haskell-opengl/OpenGLRaw | TextureFloat.hs | # LANGUAGE PatternSynonyms #
--------------------------------------------------------------------------------
-- |
-- Module : Graphics.GL.ATI.TextureFloat
Copyright : ( c ) 2019
-- License : BSD3
--
Maintainer : < >
-- Stability : stable
-- Portability : portable
--
-------------------... | null | https://raw.githubusercontent.com/haskell-opengl/OpenGLRaw/57e50c9d28dfa62d6a87ae9b561af28f64ce32a0/src/Graphics/GL/ATI/TextureFloat.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.GL.ATI.TextureFloat
License : BSD3
Stability : stable
Portability : portable
------------------------------------------------------------------------------
* Extension Support
* Enums | # LANGUAGE PatternSynonyms #
Copyright : ( c ) 2019
Maintainer : < >
module Graphics.GL.ATI.TextureFloat (
glGetATITextureFloat,
gl_ATI_texture_float,
pattern GL_ALPHA_FLOAT16_ATI,
pattern GL_ALPHA_FLOAT32_ATI,
pattern GL_INTENSITY_FLOAT16_ATI,
pattern GL_INTENSITY_FLOAT32_ATI,
pattern ... |
df5c8bd328a30337f69c8dba33df4d3dac3b240e28279b5543592589fc8fe09a | gedge-platform/gedge-platform | rabbit_exchange_type.erl | 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 /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module(rabbit_exchange_type).
-behaviour(rabbit... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbit_common/src/rabbit_exchange_type.erl | erlang |
Should Rabbit ensure that all binding events that are
delivered to an individual exchange can be serialised? (they
might still be delivered out of order, but there'll be a
serial number).
The no_return is there so that we can have an "invalid" exchange
type (see rabbit_exchange_type_invalid).
called after decl... | 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 /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module(rabbit_exchange_type).
-behaviour(rabbit_regis... |
c1a38d50165e2d4eda1bd85f2d94db5c3dd2b7057e5423fea464fc95550ad911 | magthe/sandi | Base64Url.hs | # LANGUAGE ForeignFunctionInterface #
-- |
-- Module: Codec.Binary.Base64Url
Copyright : ( c ) 2012
-- License: BSD3
--
Implemented as specified in RFC 4648 ( < > ) .
--
The difference compared to vanilla Base64 encoding is just in two
characters . In Base64 the characters are used , and in Base64Url the... | null | https://raw.githubusercontent.com/magthe/sandi/a8ef86ec3798a640d86342421a7fa7fa97bdedd4/sandi/src/Codec/Binary/Base64Url.hs | haskell | |
Module: Codec.Binary.Base64Url
License: BSD3
Please refer to "Codec.Binary.Base64" for the details of all functions in
this module. | # LANGUAGE ForeignFunctionInterface #
Copyright : ( c ) 2012
Implemented as specified in RFC 4648 ( < > ) .
The difference compared to vanilla Base64 encoding is just in two
characters . In Base64 the characters are used , and in Base64Url they
are replaced by @_-@ respectively .
module Codec.Binary.Ba... |
ec535dde81887201330ff39d4b0318956780f879e33b4dd96dc5afb52b08f0dc | jrh13/hol-light | parser.ml | (* ========================================================================= *)
(* Lexical analyzer, type and preterm parsers. *)
(* *)
, University of Cambridge Computer Laboratory
(* ... | null | https://raw.githubusercontent.com/jrh13/hol-light/74560a4095e4ed5d50e784c5b82df6d929fe214a/parser.ml | ocaml | =========================================================================
Lexical analyzer, type and preterm parsers.
===============... | , University of Cambridge Computer Laboratory
( c ) Copyright , University of Cambridge 1998
( c ) Copyright , 1998 - 2007
( c ) Copyright , , 2017 - 2018
needs "preterm.ml";;
parse_as_infix (",",(14,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.