_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
af6d337ecc53bcdcae3783b1c3070d02f4a518664adec53329fc6ff219c132fd
akc/sloane
Entry.hs
{-# LANGUAGE OverloadedStrings #-} -- | Copyright : Maintainer : < > -- License : BSD-3 -- module Sloane.Entry ( Prg (..) , Name (..) , Trail , Entry (..) ) where import Data.Aeson import Data.Maybe import Data.ByteString.Char8 (ByteString) import Data.Text.Encoding (encodeUtf8,...
null
https://raw.githubusercontent.com/akc/sloane/0785928dc6aa7701ef8268a6e39a8af489570134/Sloane/Entry.hs
haskell
# LANGUAGE OverloadedStrings # | License : BSD-3 | An entry consists of a program together with a list of rational numbers.
Copyright : Maintainer : < > module Sloane.Entry ( Prg (..) , Name (..) , Trail , Entry (..) ) where import Data.Aeson import Data.Maybe import Data.ByteString.Char8 (ByteString) import Data.Text.Encoding (encodeUtf8, decodeUtf8) import Control.Monad newtype Prg = Prg ByteString de...
83d0d8b21372d446fa3553984daaa29a2671c9353e348a1227e66750ca0fc132
andrewthad/sockets
Many.hs
# language BangPatterns # # language DataKinds # # language DuplicateRecordFields # # language LambdaCase # # language MagicHash # # language NamedFieldPuns # # language UnboxedTuples # module Socket.Datagram.Uninterruptible.MutableBytes.Many ( receiveMany , receiveManyFromIPv4 ) where import GHC.Exts (proxy#) i...
null
https://raw.githubusercontent.com/andrewthad/sockets/90d314bd2ec71b248a90da6ad964c679f75cfcca/src-no-mmsg/Socket/Datagram/Uninterruptible/MutableBytes/Many.hs
haskell
| Receive up to the specified number of datagrams into freshly allocated byte arrays. When there are many datagrams present in the receive buffer, this is more efficient than calling 'receive' repeatedly. This The length buffer and the payload buffers arrange data in a structure-of-arrays fashion. The siz...
# language BangPatterns # # language DataKinds # # language DuplicateRecordFields # # language LambdaCase # # language MagicHash # # language NamedFieldPuns # # language UnboxedTuples # module Socket.Datagram.Uninterruptible.MutableBytes.Many ( receiveMany , receiveManyFromIPv4 ) where import GHC.Exts (proxy#) i...
a2fd17c647c7213e38766682c794abcdb44bd0055391e3f5fc24ec8318f2a819
ocurrent/ocurrent
clone.ml
open Lwt.Infix type t = No_context let ( >>!= ) = Lwt_result.bind module Key = struct type t = { repo : string; (* Remote repository from which to pull. *) gref : string; } [@@deriving to_yojson] let pp f t = Yojson.Safe.pretty_print f (to_yojson t) let digest t = Yojson.Safe.to_string (to_yojson ...
null
https://raw.githubusercontent.com/ocurrent/ocurrent/344af83279e9ba17f5f32d0a0351c228a6f42863/plugins/git/clone.ml
ocaml
Remote repository from which to pull. Ensure we have a local clone of the repository.
open Lwt.Infix type t = No_context let ( >>!= ) = Lwt_result.bind module Key = struct type t = { gref : string; } [@@deriving to_yojson] let pp f t = Yojson.Safe.pretty_print f (to_yojson t) let digest t = Yojson.Safe.to_string (to_yojson t) end module Value = Commit module Repo_map = Map.Make(String...
1a5f6694a78cedb55d9e7e96edb36992de2535f77bed790e6a2ee1d5e3d423d2
BillHallahan/G2
Zeno.hs
{-# LANGUAGE BangPatterns #-} module Zeno where import Prelude ( Eq , Ord , Show , iterate , (!!) , fmap , Bool(..) , div , return , (.) , (||) , (==) , ($) ) -- code here adapted from HipSpec.hs infix 1 =:= infixr 0 ==> -- simplification to remove Prop type given :: Bool -> Bool -> B...
null
https://raw.githubusercontent.com/BillHallahan/G2/9c0414d2755d4f49b394bdedf866b3911c3f1538/tests/RewriteVerify/Correct/Zeno.hs
haskell
# LANGUAGE BangPatterns # code here adapted from HipSpec.hs simplification to remove Prop type everything here mainly copied from HipSpec, with some simplifications Boolean functions Natural numbers List functions this doesn't type-check prop_46 xs = (zip [] xs =:= []) ys prop_46 :: Eq b => [b] -> Bool al...
module Zeno where import Prelude ( Eq , Ord , Show , iterate , (!!) , fmap , Bool(..) , div , return , (.) , (||) , (==) , ($) ) infix 1 =:= infixr 0 ==> given :: Bool -> Bool -> Bool given pb pa = (not pb) || pa givenBool :: Bool -> Bool -> Bool givenBool = given (==>) :: Bool -> B...
f54b4720005de1b5b9a5e585c0e0a08d81d9c7db2384977ae82aafdf75d2c783
lem-project/lem
clhs.lisp
(defpackage :lem-webview.clhs (:use :cl :lem :lem-webview)) (in-package :lem-webview.clhs) (defparameter *clhs-base-url* "/") (defparameter *clhs-cache-directory* (let ((cache-dir (uiop:ensure-directory-pathname (merge-pathnames ".lem/" (user-homedir-pathname))))) (merge-pathnames #P"clhs/" cache-...
null
https://raw.githubusercontent.com/lem-project/lem/4f620f94a1fd3bdfb8b2364185e7db16efab57a1/frontends/electron/webview/clhs.lisp
lisp
Omit "../" and URL fragment
(defpackage :lem-webview.clhs (:use :cl :lem :lem-webview)) (in-package :lem-webview.clhs) (defparameter *clhs-base-url* "/") (defparameter *clhs-cache-directory* (let ((cache-dir (uiop:ensure-directory-pathname (merge-pathnames ".lem/" (user-homedir-pathname))))) (merge-pathnames #P"clhs/" cache-...
de55a71d6db7bf5b3fef1098f7a351240bb8e185b98313fbfd715ea136eeb227
lilyball/projecteuler-ocaml
sieve.ml
type primality = Prime | Composite | Unknown type sieve = primality array exception Out_of_bounds let make n = if n < 2 then invalid_arg "sieve must have at least 2 elements" else let sieve = Array.make n Unknown in sieve.(0) <- Composite; sieve.(1) <- Composite; sieve let primality i sieve = si...
null
https://raw.githubusercontent.com/lilyball/projecteuler-ocaml/a88ed8355b565ad0726cfcac4916d2b80512da7a/sieve.ml
ocaml
it's a prime
type primality = Prime | Composite | Unknown type sieve = primality array exception Out_of_bounds let make n = if n < 2 then invalid_arg "sieve must have at least 2 elements" else let sieve = Array.make n Unknown in sieve.(0) <- Composite; sieve.(1) <- Composite; sieve let primality i sieve = si...
27356226227dd4546686e60421344af0e3a80b8246c0fd61f22ff7d34d5b6c3a
Workiva/eva
operations.clj
Copyright 2015 - 2019 Workiva Inc. ;; ;; Licensed under the Eclipse Public License 1.0 (the "License"); ;; you may not use this file except in compliance with the License. ;; You may obtain a copy of the License at ;; ;; -1.0.php ;; ;; Unless required by applicable law or agreed to in writing, software dist...
null
https://raw.githubusercontent.com/Workiva/eva/b7b8a6a5215cccb507a92aa67e0168dc777ffeac/core/src/eva/v2/datastructures/bbtree/logic/v0/operations.clj
clojure
Licensed under the Eclipse Public License 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -1.0.php Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expre...
Copyright 2015 - 2019 Workiva Inc. distributed under the License is distributed on an " AS IS " BASIS , (ns eva.v2.datastructures.bbtree.logic.v0.operations (:require [eva.v2.datastructures.bbtree.logic.v0.nodes :as nodes :refer :all] [eva.v2.datastructures.bbtree.logic.v0.protocols :refer :all] ...
0fbb36d45640b412207e3eae4c3db9dfd83a9894cc0ccf43efd388b0df742df0
gvolpe/haskell-book-exercises
scans.hs
fibs = 1 : scanl (+) 1 fibs fibsNth n = fibs !! n fibs20 = take 20 fibs fibsLessThan100 = takeWhile (<100) fibs fact :: Integer -> Integer fact 0 = 1 fact n = foldl (*) n [1..(n-1)]
null
https://raw.githubusercontent.com/gvolpe/haskell-book-exercises/5c1b9d8dc729ee5a90c8709b9c889cbacb30a2cb/chapter10/scans.hs
haskell
fibs = 1 : scanl (+) 1 fibs fibsNth n = fibs !! n fibs20 = take 20 fibs fibsLessThan100 = takeWhile (<100) fibs fact :: Integer -> Integer fact 0 = 1 fact n = foldl (*) n [1..(n-1)]
0d0fdff6b809c9e224c82f6cfb5dd051279afe38054a233a744f6b310f2b875c
auser/beehive
date_util.erl
-module(date_util). -compile(export_all). epoch() -> now_to_seconds(now()). time_right_now() -> {MSec, Sec, _} = now(), MSec * 1000000 + Sec. % Calc the elapsed calc_elapsed({MSecStart, SecStart, MicroSecStart}, {MSecFinish, SecFinish, MicroSecFinish}) -> (MSecFinish * 1000000 + SecFinish + MicroSecFi...
null
https://raw.githubusercontent.com/auser/beehive/dfe257701b21c56a50af73c8203ecac60ed21991/lib/erlang/apps/beehive/src/bh_utils/date_util.erl
erlang
Calc the elapsed
-module(date_util). -compile(export_all). epoch() -> now_to_seconds(now()). time_right_now() -> {MSec, Sec, _} = now(), MSec * 1000000 + Sec. calc_elapsed({MSecStart, SecStart, MicroSecStart}, {MSecFinish, SecFinish, MicroSecFinish}) -> (MSecFinish * 1000000 + SecFinish + MicroSecFinish / 1000000) - ...
8a88a57c91dc90f1704ec1e835c1dcc342d1ccb34a4c8bb8c54370ae988b668d
craigfe/ppx_irmin
record.ml
Records type test_record1 = { alpha : string; beta : int64 list; gamma : unit } [@@deriving irmin] type test_record2 = { the_FIRST_identifier : test_record1 option; the_SECOND_identifier : (string, int32) result list; } [@@deriving irmin]
null
https://raw.githubusercontent.com/craigfe/ppx_irmin/06d764c6f1049131f1c4c7a3fbc59ff516c9d679/test/deriver/passing/record.ml
ocaml
Records type test_record1 = { alpha : string; beta : int64 list; gamma : unit } [@@deriving irmin] type test_record2 = { the_FIRST_identifier : test_record1 option; the_SECOND_identifier : (string, int32) result list; } [@@deriving irmin]
1c1c2c88f59c50102cb0ec3bc5dd50b87e13cc8eb65e888711afdc539d5c2878
digitallyinduced/ihp
Controller.hs
# LANGUAGE UndecidableInstances # module IHP.DataSync.REST.Controller where import IHP.ControllerPrelude hiding (OrderByClause) import IHP.DataSync.REST.Types import Data.Aeson import Data.Aeson.TH import qualified Database.PostgreSQL.Simple.ToField as PG import qualified Database.PostgreSQL.Simple.Types as PG import ...
null
https://raw.githubusercontent.com/digitallyinduced/ihp/27aa2eadf907f6647b6199ef725bf4aa85eb6fd6/IHP/DataSync/REST/Controller.hs
haskell
DELETE /api/:table/:id GET /api/:table/:id GET /api/:table GET /api/:table?fields=id,title # INLINABLE renderErrorJson # This is really hacky and is mostly duck typing. We should refactor this in the future to
# LANGUAGE UndecidableInstances # module IHP.DataSync.REST.Controller where import IHP.ControllerPrelude hiding (OrderByClause) import IHP.DataSync.REST.Types import Data.Aeson import Data.Aeson.TH import qualified Database.PostgreSQL.Simple.ToField as PG import qualified Database.PostgreSQL.Simple.Types as PG import ...
a1190df3639bb2da5686ff46a4b6d3b405bc36db1c50a7a78f6134b6f7aba719
IndianRoboticsOrganization/ArimaTTS
tamil_TokenToWords.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;; ;;; Rules to map tokens to words ;; ;;; ...
null
https://raw.githubusercontent.com/IndianRoboticsOrganization/ArimaTTS/7377dca466306e2e6b90a063427273142cd50616/tamil/festvox/tamil_TokenToWords.scm
scheme
;; Rules to map tokens to words ;; ;; ; ;; ...
(defvar tamil_dotted_abbr_list '( ("ma" "மணி") ("txaa" "டாக்டர்") ("si" "சிரஞ்ஜீவி") ("sau" "சௌபாக்கியவதி") ("ku" "குமாரி") Morning , Afternoon , Evening , Night ("mu.pa" "முற்பகல்") ("pi.pa" "பிற்பகல்") ("kaa" "காலை") ("maa" "மாலை") ("ndi" "நிமிடம்") ("௺" "நம்பர்"...
d8450e77001dbe8f226bb364adba498ef8ac29824f638b23fd7a3e8f2fe3b524
whily/yalo
keyboard.lisp
;;;; -*- Mode: Lisp -*- ;;;; Author: < > ;;;; Description: ;;;; Keyboard handling mode functions. ;;;; BIOS interruptions are not used. ;;;; License: ;;;; GNU General Public License v2 ;;;; -2.0.html Copyright ( C ) 2015 - 2018 (in-package :cc) (defparameter *keyboard-constants* `( ...
null
https://raw.githubusercontent.com/whily/yalo/be0ed108e7b4393ddcf506517b3bd3ddff4d20ce/cc/keyboard.lisp
lisp
-*- Mode: Lisp -*- Author: Description: Keyboard handling mode functions. BIOS interruptions are not used. License: GNU General Public License v2 -2.0.html Keyboard related constants. Note that input and output are from keyboard's perspective, not from user/cpu's persepctive. Codes for key st...
< > Copyright ( C ) 2015 - 2018 (in-package :cc) (defparameter *keyboard-constants* `( (equ kbd-encoder-buf #x60) (equ kbd-encoder-cmd-reg #x60) (equ kbd-ctrl-status-reg #x64) (equ kbd-ctrl-cmd-reg #x64) (equ kbd-ctrl-status-mask-out-buf #x01) (equ kbd-ctrl-status-ma...
08b37ae39ede2384876f70028f508285ebd1131ffd85e37dcfa8e582b855aa12
openmusic-project/openmusic
space-pack.lisp
;========================================================================= OpenMusic : Visual Programming Language for Music Composition ; Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France . ; This file is part of the OpenMusic environment sources ; OpenMusic is free software : you can redist...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/projects/space/space-pack.lisp
lisp
========================================================================= (at your option) any later version. but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. =================...
OpenMusic : Visual Programming Language for Music Composition Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France . This file is part of the OpenMusic environment sources OpenMusic is free software : you can redistribute it and/or modify it under the terms of the GNU General Public License ...
3a231daee68e64c3f9cf1a105fd7be867dbdce7bf132063f34b3169dd12b6138
clash-lang/clash-compiler
Extra.hs
# LANGUAGE CPP # # OPTIONS_GHC -Wno - orphans # module Data.Primitive.ByteArray.Extra where #if !MIN_VERSION_primitive(0,7,1) import Control.DeepSeq (NFData(..)) #endif import Data.Binary (Binary(..)) import Data.Hashable (Hashable(..)) import Data.Primitive.ByteArray (ByteArray) import GHC.Exts (IsList(..)) #if !MI...
null
https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/clash-lib/src/Data/Primitive/ByteArray/Extra.hs
haskell
# LANGUAGE CPP # # OPTIONS_GHC -Wno - orphans # module Data.Primitive.ByteArray.Extra where #if !MIN_VERSION_primitive(0,7,1) import Control.DeepSeq (NFData(..)) #endif import Data.Binary (Binary(..)) import Data.Hashable (Hashable(..)) import Data.Primitive.ByteArray (ByteArray) import GHC.Exts (IsList(..)) #if !MI...
7a3733d5bbf933cb2ed3e2e2cc22cd9712ba626019e751a12bf47c57f1e00e07
justinmeiners/exercises
2_70.scm
(load "2_69.scm") (define lyric-pairs '((A 2) (GET 2) (SHA 3) (WAH 1) (BOOM 1) (JOB 2) (NA 16) (YIP 9))) (define lyric-tree (generate-huffman-tree lyric-pairs)) (define lyrics '(GET A JOB SHA NA NA NA NA NA NA NA NA GET A JOB SHA NA NA NA NA NA NA NA NA ...
null
https://raw.githubusercontent.com/justinmeiners/exercises/9491bc16925eae12e048ccd3f424b870ebdc73aa/sicp/2/2_70.scm
scheme
- who many bits? - - how many with fixed length? -
(load "2_69.scm") (define lyric-pairs '((A 2) (GET 2) (SHA 3) (WAH 1) (BOOM 1) (JOB 2) (NA 16) (YIP 9))) (define lyric-tree (generate-huffman-tree lyric-pairs)) (define lyrics '(GET A JOB SHA NA NA NA NA NA NA NA NA GET A JOB SHA NA NA NA NA NA NA NA NA ...
c88546a7bff24730990d95ebca18fde92c7d3e037e2d6d0bccfe56a82ac2bdd4
matthewbauer/eu4-parser
generate-continent.hs
-- generate a map of features to "continent" from the parsed assets import Prelude hiding (putStrLn) import Map import Generator import Data.Aeson import Data.ByteString.Lazy.Char8 (putStrLn) main :: IO () main = putStrLn . encode =<< (genmap <$> continent)
null
https://raw.githubusercontent.com/matthewbauer/eu4-parser/4cb2eb3dc6660916082d59ce290cdcde0e062996/generate-continent.hs
haskell
generate a map of features to "continent" from the parsed assets
import Prelude hiding (putStrLn) import Map import Generator import Data.Aeson import Data.ByteString.Lazy.Char8 (putStrLn) main :: IO () main = putStrLn . encode =<< (genmap <$> continent)
fcecc622a5e88784192c7433e06569e6757845dd9c653f60adee707e32379790
spawnfest/eep49ers
big_external_type.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2001 - 2015 . All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicab...
null
https://raw.githubusercontent.com/spawnfest/eep49ers/916ea06f69c8dc1b3f950219fe17c2d8bb12bf77/lib/dialyzer/test/opaque_SUITE_data/src/big_external_type.erl
erlang
%CopyrightBegin% you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific lan...
Copyright Ericsson AB 2001 - 2015 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(big_external_type). -export([parse_form/1,parse_exprs/1,parse_term/1]). -export([normalise/1,tokens/1,toke...
bd7f8f4d9adf9c52af25dfe59239fc247dbb2ebf1d4310c73b245bd94cd1bf63
ku-fpg/haskino
TransTest.hs
{-# OPTIONS_GHC -fplugin=System.Hardware.Haskino.ShallowDeepPlugin #-} ------------------------------------------------------------------------------- -- | Module : System . Hardware . Haskino . SamplePrograms . Rewrite . TransTestProg Copyright : ( c ) University of Kansas -- License : BSD3 -- St...
null
https://raw.githubusercontent.com/ku-fpg/haskino/9a0709c92c2da9b9371e292b00fd076e5539eb18/tests/TransTests/TransTest.hs
haskell
# OPTIONS_GHC -fplugin=System.Hardware.Haskino.ShallowDeepPlugin # ----------------------------------------------------------------------------- | License : BSD3 Stability : experimental Base test example used for rewrite written in shallow version. ---------------------------------------------------------...
Module : System . Hardware . Haskino . SamplePrograms . Rewrite . TransTestProg Copyright : ( c ) University of Kansas module System.Hardware.Haskino.SamplePrograms.Rewrite.TransTest(transTest) where import System.Hardware.Haskino import Control.Monad import Data.Word import Data.Boolean import Syste...
ec2215f80c3021ed0272991a67975c024657e25d2152439a48e3b2b82860ab21
janestreet/ppx_fields_conv
ppx_fields_conv.mli
open! Base open Ppxlib module Selector = Selector val fields : Deriving.t
null
https://raw.githubusercontent.com/janestreet/ppx_fields_conv/1b2ee163ab21771d42b8a32de3ef5d6b7bf9edaf/src/ppx_fields_conv.mli
ocaml
open! Base open Ppxlib module Selector = Selector val fields : Deriving.t
ac9ff0ef34bb4927da088375e5d30f7328bbbaec3e59a985dce8092ca4ba912e
metabase/metabase
indents.clj
{metabase.api.collection/foo [[:inner 0]] toucan.db/insert! [[:block 1]]}
null
https://raw.githubusercontent.com/metabase/metabase/07f174deaaf3ee7794e17c3aa9ebf94250b04d8e/.cljfmt/indents.clj
clojure
{metabase.api.collection/foo [[:inner 0]] toucan.db/insert! [[:block 1]]}
b4bbf2bff245824b4afbce2d426a775174f197944c91054f7a97b6577826f085
deadtrickster/prometheus.cl
basic.lisp
(in-package #:prometheus.collectors.process.test) (plan 1) (subtest "Process Collector test" (with-fresh-registry (let ((pc (prom.process:make-process-collector :namespace "qwe_")) (metrics) (expected-names '("qwe_process_open_fds" "qwe_process_max_fds" ...
null
https://raw.githubusercontent.com/deadtrickster/prometheus.cl/60572b793135e8ab5a857d47cc1a5fe0af3a2d53/t/collectors/process/basic.lisp
lisp
(in-package #:prometheus.collectors.process.test) (plan 1) (subtest "Process Collector test" (with-fresh-registry (let ((pc (prom.process:make-process-collector :namespace "qwe_")) (metrics) (expected-names '("qwe_process_open_fds" "qwe_process_max_fds" ...
46ea4c37e7ef725377cdc97de552621118028f97835fed93336db91ea316c80b
1Jajen1/Brokkr
Rotation.hs
# LANGUAGE PatternSynonyms # # LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Util.Rotation ( Rotation(..) , pattern Rotation ) where import Foreign.Storable import Util.Linear.V2 import Util.Binary import Util.Linear.Vector import Hecs (Component, ViaFlat) newtype Rotatio...
null
https://raw.githubusercontent.com/1Jajen1/Brokkr/1c93519fdc3490091205e8499ed04cd1fee66192/src/Util/Rotation.hs
haskell
# COMPLETE Rotation #
# LANGUAGE PatternSynonyms # # LANGUAGE DataKinds # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Util.Rotation ( Rotation(..) , pattern Rotation ) where import Foreign.Storable import Util.Linear.V2 import Util.Binary import Util.Linear.Vector import Hecs (Component, ViaFlat) newtype Rotatio...
d9325a8a06b39310f5f54d281fdb6eaab74d70e541c92eee2fd3811215cfbcaa
cxxxr/valtan
must-do.lisp
Copyright ( C ) 2002 - 2004 , < > ;; ALL RIGHTS RESERVED. ;; $ I d : must - do.lisp , v 1.8 2004/02/20 07:23:42 yuji Exp $ ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions ;; are met: ;; ;; * Redistributions of sourc...
null
https://raw.githubusercontent.com/cxxxr/valtan/ec3164d42b86869357dc185b747c5dfba25c0a3c/tests/sacla-tests/must-do.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. * Redistribu...
Copyright ( C ) 2002 - 2004 , < > $ I d : must - do.lisp , v 1.8 2004/02/20 07:23:42 yuji Exp $ " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT THEORY OF LIABILITY ...
919ba028983771f228596909f087f84ffa4d1d6ad6ca63ad10b52d695250ad0b
anmonteiro/anmonteiro.github.io
patterns.cljs
(ns recursion-examples.patterns (:require-macros [devcards.core :refer [defcard deftest dom-node]]) (:require [devcards.core :as dc] [om.next :as om :refer-macros [defui]] [om.dom :as dom])) ;; ============================================================================= ;; Composite (def ...
null
https://raw.githubusercontent.com/anmonteiro/anmonteiro.github.io/c5400c2431576305e5ce3f2cdfb223b1ee893bde/assets/cljs/recursion-examples/patterns.cljs
clojure
============================================================================= Composite ============================================================================= Decorator
(ns recursion-examples.patterns (:require-macros [devcards.core :refer [defcard deftest dom-node]]) (:require [devcards.core :as dc] [om.next :as om :refer-macros [defui]] [om.dom :as dom])) (def composite-data {:composite/item {:id 0 :width 400 :hei...
aa285cf1ed643296b7f0bcc5b1021b7cdc22fcf56f102dc0c50e7f68ae2e06fb
LauJensen/clojureql
test.clj
(ns clojureql.test (:refer-clojure :exclude [compile drop take sort distinct conj! disj! case resultset-seq]) (:use clojure.java.jdbc clojure.test clojureql.core [clojure.java.io :only [delete-file]])) (if (find-ns 'cake) (refer 'cake :only ['*opts*]) (def ^:dynamic *opts* {:integration...
null
https://raw.githubusercontent.com/LauJensen/clojureql/06e06ab289a5f73386077af8dc72a8b99242f055/test/test.clj
clojure
(ns clojureql.test (:refer-clojure :exclude [compile drop take sort distinct conj! disj! case resultset-seq]) (:use clojure.java.jdbc clojure.test clojureql.core [clojure.java.io :only [delete-file]])) (if (find-ns 'cake) (refer 'cake :only ['*opts*]) (def ^:dynamic *opts* {:integration...
3521ae411bcc10695f5f05bb29335c6de60bf968b7077a4a9daa76ae35bce014
phadej/cabal-extras
Debug.hs
-- | SPDX - License - Identifier : GPL-2.0 - or - later OR BSD-3 - Clause Copyright : < > -- -- Debug and development methods -- module Peura.Debug ( error, undefined, trace, traceShow, traceShowId, ) where import qualified Prelude import qualified Debug.Trace undefined :...
null
https://raw.githubusercontent.com/phadej/cabal-extras/378cac5495b829794d67f243b27a9317eeed0858/peura/src/Peura/Debug.hs
haskell
| Debug and development methods # DEPRECATED undefined "Don't leave me in the code" # # DEPRECATED error "Don't leave me in the code" # # DEPRECATED trace "Don't leave me in the code" # # DEPRECATED traceShow "Don't leave me in the code" # # DEPRECATED traceShowId "Don't leave me in the code" #
SPDX - License - Identifier : GPL-2.0 - or - later OR BSD-3 - Clause Copyright : < > module Peura.Debug ( error, undefined, trace, traceShow, traceShowId, ) where import qualified Prelude import qualified Debug.Trace undefined :: a undefined = Prelude.undefined error :: ...
7d8bd2f5ae258d74d618c466d54da21b9a938620d28eb6f2905968ebe0eaefef
mattmundell/nightshade
objdef.lisp
;;; Machine independent aspects of the object representation. (in-package "VM") (export '(lowtag-bits lowtag-mask lowtag-limit type-bits type-mask target-most-positive-fixnum target-most-negative-fixnum even-fixnum-type function-pointer-type other-immediate-0-type list-pointer-type odd-fixnum-type instance-p...
null
https://raw.githubusercontent.com/mattmundell/nightshade/d8abd7bd3424b95b70bed599e0cfe033e15299e0/src/compiler/generic/objdef.lisp
lisp
Machine independent aspects of the object representation. Type based constants. eval-when the pointer or immediate object. FIX explain each? somewhere? The heap types. Each of these types is in the header of objects in the heap. The different vector subtypes. The primitive objects themselves. Other non-he...
(in-package "VM") (export '(lowtag-bits lowtag-mask lowtag-limit type-bits type-mask target-most-positive-fixnum target-most-negative-fixnum even-fixnum-type function-pointer-type other-immediate-0-type list-pointer-type odd-fixnum-type instance-pointer-type other-immediate-1-type other-pointer-type bignu...
5d3d14156ce47f61b05e534e2d5a4e0a5ea59804724e23bcdcd4045b91fd84e7
sighingnow/xgboost-haskell
FFI.hs
module ML.DMLC.XGBoost.Rabit.FFI where import Foundation import Foundation.Array.Internal import Foundation.Class.Storable import Foundation.Collection import Foundation.Foreign import Foreign.Ptr (nullPtr) import Foreign.Marshal.Alloc (alloca) import qualified Foreign.Storable (peek) import ML.DMLC.XGBoost.Foreign ...
null
https://raw.githubusercontent.com/sighingnow/xgboost-haskell/a7132709bfbc67f0802179e17b08d1213a94b67e/src/ML/DMLC/XGBoost/Rabit/FFI.hs
haskell
^ the pointer to send or recive buffer. ^ the size of data ^ the root of process ^ buffer for both sending and recving data ^ number of elements to be reduced
module ML.DMLC.XGBoost.Rabit.FFI where import Foundation import Foundation.Array.Internal import Foundation.Class.Storable import Foundation.Collection import Foundation.Foreign import Foreign.Ptr (nullPtr) import Foreign.Marshal.Alloc (alloca) import qualified Foreign.Storable (peek) import ML.DMLC.XGBoost.Foreign ...
489d766ed34825aa7c222dae17187d325a775434ab257618d6b2238cc592b99b
plow-technologies/quickcheck-arbitrary-template
BuildArbitrary.hs
# LANGUAGE TemplateHaskell # module Test.QuickCheck.TH.Generators.Internal.BuildArbitrary where import Language.Haskell.TH import Safe -- | automatically build functions named `buildArbn` where n is an integer greater than 0 . $ ( buildArbAny 3 ) creates a function buildArb3 which takes a c...
null
https://raw.githubusercontent.com/plow-technologies/quickcheck-arbitrary-template/97d6243f9d3b7dddb0a1c6329de9f3f8ad49c813/src/Test/QuickCheck/TH/Generators/Internal/BuildArbitrary.hs
haskell
| automatically build functions named `buildArbn` where n is an integer of that constructor. It assumes that the constructors type is an instance buildArb1 :: Arbitrary a => (a -> b) -> Gen b buildArb1 f = f <$> arbitrary buildArb2 :: (Arbitrary a, Arbitrary a1) => (a1 -> a -> b)...
# LANGUAGE TemplateHaskell # module Test.QuickCheck.TH.Generators.Internal.BuildArbitrary where import Language.Haskell.TH import Safe greater than 0 . $ ( buildArbAny 3 ) creates a function buildArb3 which takes a constructor that takes 3 parameters , and returns an arbitrary instances o...
398ab78c87e7165e7d5e0de3b003fb83b823e3fd2aece83afe57270b4cac68b9
cedlemo/OCaml-GI-ctypes-bindings-generator
Spin_button_update_policy.mli
open Ctypes type t = Always | If_valid val of_value: Unsigned.uint32 -> t val to_value: t -> Unsigned.uint32 val t_view: t typ
null
https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/Spin_button_update_policy.mli
ocaml
open Ctypes type t = Always | If_valid val of_value: Unsigned.uint32 -> t val to_value: t -> Unsigned.uint32 val t_view: t typ
e9ae71b0f2ae7500252cf2c87a053e6e14a2c598a49f972fdc7d6f7fcc1e9296
kmi/irs
help-xml-gen.lisp
(in-package :ocml) ;;;;IMPORTANT, JOHN'S SOLUTION FOR MAPPING ;;;; (def-rule family-name-mapping-rule ;;;; ((has-family-name ?inst ?x) if ;;;; (haslastname ?inst ?x))) ;;;; (def-rule full-name-mapping-rule ;;;; ((has-full-name ?inst ?full-name) if ;;;; (haslastname ?inst ?x) ;;;; (hasfirstname ?inst...
null
https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/profile/transform/help-xml-gen.lisp
lisp
IMPORTANT, JOHN'S SOLUTION FOR MAPPING (def-rule family-name-mapping-rule ((has-family-name ?inst ?x) if (haslastname ?inst ?x))) (def-rule full-name-mapping-rule ((has-full-name ?inst ?full-name) if (haslastname ?inst ?x) (hasfirstname ?inst ?y) (= ?full-name)) (util-list-flatten '((("b") "...
(in-package :ocml) (defstruct (attr (:conc-name a-) (:print-function print-attr)) "represents a xml attribute with name and value" n v) (defun print-attr (a stream depth) "printing function of the attribute structure" (format stream " ~a=\"~a\" " (a-n a) (a-v a))) ( princ ( make - attr...
ce95be8135fafe70d6137a7135db6e0839b0c69c24e7f5edf8dff45605cdd898
metasoarous/odum
app.clj
(ns odum.app (:require [odum.datomic :as datomic] [odum.ws :as ws] [dat.sync.server :as dat.sync] [taoensso.timbre :as log :include-macros true] [com.stuartsierra.component :as component] [slingshot.slingshot :as slingshot :refer [throw+ try+]] [...
null
https://raw.githubusercontent.com/metasoarous/odum/92965d14c8f5702a1bdbfcfb2e44ebbfa41c8cab/src/clj/odum/app.clj
clojure
# Application This namespace contains the core of the server's message handling logic. Any custom message handlers on the server you want to hook up should go here Dispatch on event-id ## Event handlers don't really need this... should delete General purpose transaction handler We handle the bootstrap message b...
(ns odum.app (:require [odum.datomic :as datomic] [odum.ws :as ws] [dat.sync.server :as dat.sync] [taoensso.timbre :as log :include-macros true] [com.stuartsierra.component :as component] [slingshot.slingshot :as slingshot :refer [throw+ try+]] [...
025c019f7410eed7b28e856cba10980148d947de2e4d523c2d0a9fe320ebd381
brightin/pottery
project.clj
(defproject brightin/pottery "0.0.5" :description "A clojure library to interact with gettext and PO/POT files" :url "" :license {:name "Hippocratic License" :url "/"} :dependencies [[org.clojure/clojure "1.10.0" :scope "provided"] [org.clojure/core.match "1.0.0"]] :repl-options {...
null
https://raw.githubusercontent.com/brightin/pottery/33dd155105873e307c6730d6f718d99c60a6d63e/project.clj
clojure
(defproject brightin/pottery "0.0.5" :description "A clojure library to interact with gettext and PO/POT files" :url "" :license {:name "Hippocratic License" :url "/"} :dependencies [[org.clojure/clojure "1.10.0" :scope "provided"] [org.clojure/core.match "1.0.0"]] :repl-options {...
3a7c6548618042c2cca3a495d5b7cff6688ac9d64a78804190664f105f3c2f3a
ferd/cth_readable
cth_readable_lager_backend.erl
Copyright ( c ) 2011 - 2012 , 2014 Basho Technologies , Inc. All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the License at %% %% -2.0 %% %% Unless r...
null
https://raw.githubusercontent.com/ferd/cth_readable/e87c03153de1dc40923815b2bd87e089600306b3/src/cth_readable_lager_backend.erl
erlang
Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. @doc Console backend for lager...
Copyright ( c ) 2011 - 2012 , 2014 Basho Technologies , Inc. All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS O...
d74394c71a71da1bf567d3c317651527fe4b275f20146be6e44cb0306b9ead09
lonjil/cl-harmony
json-mop-hack.lisp
(in-package #:xyz.lonjil.discord/base) (defmethod json-mop:to-json-value ((value json-mop:json-serializable) (json-type (eql :hash-table))) value) (defmethod json-mop:json-to-clos ((input vector) class &rest initargs) (map 'list (lambda (x) (apply #'json-mop:js...
null
https://raw.githubusercontent.com/lonjil/cl-harmony/947e305464dcbe11f226743560366889e129d519/base/json-mop-hack.lisp
lisp
(in-package #:xyz.lonjil.discord/base) (defmethod json-mop:to-json-value ((value json-mop:json-serializable) (json-type (eql :hash-table))) value) (defmethod json-mop:json-to-clos ((input vector) class &rest initargs) (map 'list (lambda (x) (apply #'json-mop:js...
6ffcab6e1d9e931a2534a36c68ca7a14635d89250ecefb764cc2d4aec389e953
xapi-project/xen-api
sanitycheck.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/xen-api/fa6f118fb512a2c90159368a1a0bc1cc730c895b/ocaml/xapi/sanitycheck.ml
ocaml
Look for the exception catching bug caused by dodgy linking (thanks, ocamlfind)
* 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...
ff607736821fdffab4f549c24a041f706abb28e3372f577fca8c405c7efaf7d0
raaz-crypto/raaz
Equality.hs
{-# OPTIONS_HADDOCK hide #-} {-# LANGUAGE CPP #-} # LANGUAGE TypeFamilies # # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE FlexibleContexts #-} -- | This module defines combinators, types and instances for defining -- timing safe equality checks. module Raaz.Core.Types.Equal...
null
https://raw.githubusercontent.com/raaz-crypto/raaz/1d17ead6d33c5441a59dbc4ff33197e2bd6eb6ec/core/Raaz/Core/Types/Equality.hs
haskell
# OPTIONS_HADDOCK hide # # LANGUAGE CPP # # LANGUAGE FlexibleContexts # | This module defines combinators, types and instances for defining timing safe equality checks. * Timing safe equality checking. ** Equality instances for custom types comparisons should be timing safe, i.e. ...
# LANGUAGE TypeFamilies # # LANGUAGE MultiParamTypeClasses # module Raaz.Core.Types.Equality $ timingSafeEquality$ Result , Equality(..), (===) $ customequality$ ) where import qualified Data.Vector.Generic as G import qualified Data.Vector.Generic.Mutable as GM import ...
82a73b29afdcfbd50f493935e44008991d750158fbd75f817168fb28c4f45810
janestreet/memtrace_viewer
location_table.mli
open! Core open Bonsai_web open Memtrace_viewer_common type t = { view : Vdom.Node.t ; key_handler : Vdom_keyboard.Keyboard_event_handler.t ; selection : (Data.Backtrace.t * Data.Fragment.t) option ; set_selection : Data.Fragment.t option -> unit Vdom.Effect.t ; move_selection : [ `Prev | `Next ] -> unit Vdo...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer/46439f8bd16e77c5aa38632c9c4aa53175121d4d/client/src/location_table.mli
ocaml
open! Core open Bonsai_web open Memtrace_viewer_common type t = { view : Vdom.Node.t ; key_handler : Vdom_keyboard.Keyboard_event_handler.t ; selection : (Data.Backtrace.t * Data.Fragment.t) option ; set_selection : Data.Fragment.t option -> unit Vdom.Effect.t ; move_selection : [ `Prev | `Next ] -> unit Vdo...
974c4d3d1f0d653a03ebc14c6216ce32407fbed589a43b9f37bb7cd7525bec55
albertoruiz/easyVision
stand2.hs
import Vision.GUI import Image main = runIt win win = browser "odd numbers" xs sh where xs = [1,3 .. 21] sh _k = text (Point 0 0) . show
null
https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/projects/tour/stand2.hs
haskell
import Vision.GUI import Image main = runIt win win = browser "odd numbers" xs sh where xs = [1,3 .. 21] sh _k = text (Point 0 0) . show
3cdd0e91fd70c6d7198582672f0a2a9fada8e8de803250644c14a2c9038ad458
VisionsGlobalEmpowerment/webchange
recording_studio_rounds.clj
(ns webchange.dev-templates.recording-studio-rounds (:require [webchange.dev-templates :as t] [webchange.templates.core :as templates] [webchange.course.core :as core])) (comment (def test-course-slug (-> (t/create-test-course) :slug)) (def test-course-slug "test-course-english-hkgwpieh")...
null
https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/118ba5ee407ba1261bac40a6ba5729ccda6e8150/env/dev/clj/webchange/dev_templates/recording_studio_rounds.clj
clojure
add round
(ns webchange.dev-templates.recording-studio-rounds (:require [webchange.dev-templates :as t] [webchange.templates.core :as templates] [webchange.course.core :as core])) (comment (def test-course-slug (-> (t/create-test-course) :slug)) (def test-course-slug "test-course-english-hkgwpieh")...
94e858ae1140c3b7b7cda134ccc61cbf90e8232e84b8e3b6a875425a3e9df9ba
AndrewRademacher/coinbase-exchange
Socket.hs
{-# LANGUAGE OverloadedStrings #-} module Coinbase.Exchange.Socket ( subscribe , module Coinbase.Exchange.Types.Socket ) where ------------------------------------------------------------------------------- import Data.Aeson import Network.Socket import qualified Network.WebSockets ...
null
https://raw.githubusercontent.com/AndrewRademacher/coinbase-exchange/77945f2dddb1699927c354dfd221f366289ea19c/src/Coinbase/Exchange/Socket.hs
haskell
# LANGUAGE OverloadedStrings # ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- -------------------------------------------------------...
module Coinbase.Exchange.Socket ( subscribe , module Coinbase.Exchange.Types.Socket ) where import Data.Aeson import Network.Socket import qualified Network.WebSockets as WS import Wuss import Coinbase.Exchange.Types import Coinbase.Exchange.Ty...
3ae03809c7302737485d5840b55ae2a6146f9bfe372bcfe2834d4b95ff290aa3
guicho271828/alien
1-state.lisp
(in-package :strips) (named-readtables:in-readtable :fare-quasiquote) TODO static vectors , segmented vectors ( sb - vm : memory - usage : print - spaces t : count - spaces ' (: ) : print - summary nil ) (deftype close-list () 'strips.lib:index) (defun make-close-list () (strips.lib:make-index :test...
null
https://raw.githubusercontent.com/guicho271828/alien/6987d034426b8928adf67f498dc6cb06fd7f923e/search/old/1-state.lisp
lisp
TODO: idea: prune by bloom filter
(in-package :strips) (named-readtables:in-readtable :fare-quasiquote) TODO static vectors , segmented vectors ( sb - vm : memory - usage : print - spaces t : count - spaces ' (: ) : print - summary nil ) (deftype close-list () 'strips.lib:index) (defun make-close-list () (strips.lib:make-index :test...
f87c9dd6b64ae2adaf6ea98a091b63dee6423092eef8e053f07ebbc42e315a9b
gcv/appengine-magic
user.clj
(ns test.appengine-magic.services.user (:use clojure.test) (:require [appengine-magic.services.user :as du] [appengine-magic.testing :as ae-testing])) (use-fixtures :each (ae-testing/local-services :all :hook-helper (ae-testing/admin-login ""))) (deftest basics (let [user (du/...
null
https://raw.githubusercontent.com/gcv/appengine-magic/facc9fe4945b3becd772d6b053844e572dcc1c73/test/test/appengine_magic/services/user.clj
clojure
(ns test.appengine-magic.services.user (:use clojure.test) (:require [appengine-magic.services.user :as du] [appengine-magic.testing :as ae-testing])) (use-fixtures :each (ae-testing/local-services :all :hook-helper (ae-testing/admin-login ""))) (deftest basics (let [user (du/...
166c1c870ca6e0c1499b9c748b62de29174217cacc8b23d00a9868cde4c1d7e3
fossas/fossa-cli
YarnLockV1Spec.hs
# LANGUAGE TemplateHaskell # module Yarn.V1.YarnLockV1Spec ( spec, ) where import Control.Effect.Diagnostics import Control.Effect.Lift import Data.Map.Strict qualified as Map import Data.Set qualified as Set import Data.String.Conversion (decodeUtf8, toString) import Data.Tagged (applyTag) import DepTypes ( DepE...
null
https://raw.githubusercontent.com/fossas/fossa-cli/8a7d389d9440821b07a982321428f31d5cb1a903/test/Yarn/V1/YarnLockV1Spec.hs
haskell
# LANGUAGE TemplateHaskell # module Yarn.V1.YarnLockV1Spec ( spec, ) where import Control.Effect.Diagnostics import Control.Effect.Lift import Data.Map.Strict qualified as Map import Data.Set qualified as Set import Data.String.Conversion (decodeUtf8, toString) import Data.Tagged (applyTag) import DepTypes ( DepE...
0c3b8816de9c49334f5eef4317c3f7eb490059e4da35571fb4b6da968bbc2e12
hstreamdb/hstream
Foreign.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # # LANGUAGE MagicHash # # LANGUAGE ScopedTypeVariables # # OPTIONS_GHC -pgmPcpphs -optP -- cpp # module HStream.Foreign ( PeekNFun , peekN , BA# (..) , MBA# (..) , BAArray# (..) -- * StdString , Z.StdString , peekStdStrin...
null
https://raw.githubusercontent.com/hstreamdb/hstream/623ccb8577b992383cfacd7d6577616d245b8583/common/base/HStream/Foreign.hs
haskell
# LANGUAGE BangPatterns # cpp # * StdString * Optional * List * Map * Misc ----------------------------------------------------------------------------- ----------------------------------------------------------------------------- Optional ------------------------------------------------------------------...
# LANGUAGE CPP # # LANGUAGE MagicHash # # LANGUAGE ScopedTypeVariables # module HStream.Foreign ( PeekNFun , peekN , BA# (..) , MBA# (..) , BAArray# (..) , Z.StdString , peekStdStringToCBytesN , peekStdStringToCBytesIdx , withStdStringUnsafe , withAllocMaybePrim , wi...
6dd9347337cbaec829f9898f139cb224aa077637c41e7a99fd2d57fa63113673
mtgred/netrunner
game.clj
(ns web.game (:require [cheshire.core :as json] [cljc.java-time.instant :as inst] [clojure.stacktrace :as stacktrace] [cond-plus.core :refer [cond+]] [game.core :as core] [game.core.diffs :as diffs] [game.main :as main] [jinteki.utils :refer [side-from-str]] [medley.core :refer [find-first]...
null
https://raw.githubusercontent.com/mtgred/netrunner/b3e1a5574dd73063116a11d50d740a79b5717d00/src/clj/web/game.clj
clojure
The game will not exist if this is the last player to leave. needed to update the status bar The game will not exist if this is the last player to leave.
(ns web.game (:require [cheshire.core :as json] [cljc.java-time.instant :as inst] [clojure.stacktrace :as stacktrace] [cond-plus.core :refer [cond+]] [game.core :as core] [game.core.diffs :as diffs] [game.main :as main] [jinteki.utils :refer [side-from-str]] [medley.core :refer [find-first]...
db996ab544845fe251c6f91932587239aac7efedfd0d6c1265c18228954d6a9e
input-output-hk/cardano-ledger
EpochSlots.hs
{-# LANGUAGE DeriveDataTypeable #-} # LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # module Cardano.Chain.Slotting.EpochSlots ( EpochSlots (..), WithEpochSlots (..), epochFirstSlot, ) where import Cardano.Chain.Slotting.EpochNumber import Cardano.Chain.Slotting.SlotNumber import Cardano.Ledger...
null
https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/eras/byron/ledger/impl/src/Cardano/Chain/Slotting/EpochSlots.hs
haskell
# LANGUAGE DeriveDataTypeable # | The number of slots per epoch. | Data with an accompanying slots per epoch context. first and only era - a more robust method should use 'EpochInfo' from cardano-slotting.
# LANGUAGE DeriveGeneric # # LANGUAGE GeneralizedNewtypeDeriving # module Cardano.Chain.Slotting.EpochSlots ( EpochSlots (..), WithEpochSlots (..), epochFirstSlot, ) where import Cardano.Chain.Slotting.EpochNumber import Cardano.Chain.Slotting.SlotNumber import Cardano.Ledger.Binary ( DecCBOR (..), EncCBOR ...
5165731bedf80f53a39315376834b525c1b569a210f170f19b6123a0dc4e523e
avsm/eeww
proc.ml
# 2 "asmcomp/amd64/proc.ml" (**************************************************************************) (* *) (* OCaml *) (* ...
null
https://raw.githubusercontent.com/avsm/eeww/651d8da20a3cc9e88354ed0c8da270632b9c0c19/boot/ocaml/asmcomp/amd64/proc.ml
ocaml
************************************************************************ OCaml ...
# 2 "asmcomp/amd64/proc.ml" , projet Cristal , INRIA Rocquencourt Copyright 2000 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the open Misc open Arch open Cmm open Reg open Mach let fp = Config.with_frame_...
796e8d80dbe89944550c10038cd188ecfe82566acd9eb8bfc0864750b159b1ec
mfoemmel/erlang-otp
mnesia_lib.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_lib.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 1996 - 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " -module(mnesia_lib). -include("mnesia.hr...
34fdaabe7e6c6d92c619f0b8f26e1904a81f19ab8b9955cd51c99b36cc5697ee
xhtmlboi/yocaml
build.ml
open Util type ('a, 'b) t = { dependencies : Deps.t ; task : 'a -> 'b Effect.t } let get_dependencies { dependencies; _ } = dependencies let get_task { task; _ } = task let perform_if_update_needed target deps need_creation need_update up_to_date = let open Effect in let* may_need_update = Deps.need_update...
null
https://raw.githubusercontent.com/xhtmlboi/yocaml/04a5a868c1db4e325a24fbf59f850cd723829671/lib/yocaml/build.ml
ocaml
open Util type ('a, 'b) t = { dependencies : Deps.t ; task : 'a -> 'b Effect.t } let get_dependencies { dependencies; _ } = dependencies let get_task { task; _ } = task let perform_if_update_needed target deps need_creation need_update up_to_date = let open Effect in let* may_need_update = Deps.need_update...
8d052405a26ac3e81abce06c255956b34671e78f3e361386f9952c5ebad4f09f
samply/blaze
measure_spec.clj
(ns blaze.fhir.operation.evaluate-measure.measure-spec (:require [blaze.cql-translator-spec] [blaze.db.spec] [blaze.fhir.operation.evaluate-measure.cql-spec] [blaze.fhir.operation.evaluate-measure.measure :as measure] [blaze.fhir.operation.evaluate-measure.measure.spec] [blaze.fhir.spec] [...
null
https://raw.githubusercontent.com/samply/blaze/867d3e17ec8148f055324a1ab526d3727b41715b/modules/operation-measure-evaluate-measure/test/blaze/fhir/operation/evaluate_measure/measure_spec.clj
clojure
(ns blaze.fhir.operation.evaluate-measure.measure-spec (:require [blaze.cql-translator-spec] [blaze.db.spec] [blaze.fhir.operation.evaluate-measure.cql-spec] [blaze.fhir.operation.evaluate-measure.measure :as measure] [blaze.fhir.operation.evaluate-measure.measure.spec] [blaze.fhir.spec] [...
be77f2caf4e6302dd76b8fe89b15c5584b61d81326841bd39bec5acbd83e9823
HugoPeters1024/hs-sleuth
Properties.hs
-- | QuickCheck properties for the text library. # OPTIONS_GHC -fno - enable - rewrite - rules -fno - warn - missing - signatures # module Tests.Properties ( tests ) where import Test.Tasty (TestTree, testGroup) import Tests.Properties.Basics (testBasics) import Tests.Properties.Builder (testBuilder) im...
null
https://raw.githubusercontent.com/HugoPeters1024/hs-sleuth/91aa2806ea71b7a26add3801383b3133200971a5/test-project/text-nofusion/tests/Tests/Properties.hs
haskell
| QuickCheck properties for the text library.
# OPTIONS_GHC -fno - enable - rewrite - rules -fno - warn - missing - signatures # module Tests.Properties ( tests ) where import Test.Tasty (TestTree, testGroup) import Tests.Properties.Basics (testBasics) import Tests.Properties.Builder (testBuilder) import Tests.Properties.Folds (testFolds) import Te...
e2a4834966fe2e2e844ad33956e5961a26c2cf2999b7eaa4aed591a0786e4009
AndrasKovacs/ELTE-func-lang
Gy13_pre.hs
# LANGUAGE DeriveFunctor # {-# OPTIONS_GHC -Wincomplete-patterns #-} module Gy13 where import Control.Applicative import Control.Monad import Data.Char State monad -------------------------------------------------------------------------------- newtype State s a = State {runState :: s -> (a, s)} deriving Functo...
null
https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/5534db06399168f17aca6dc56a378fa1a575f93e/2021-22-2/gyak_3/Gy13_pre.hs
haskell
# OPTIONS_GHC -Wincomplete-patterns # ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Feladatok ------------------------------------------------------------------------------ -----...
# LANGUAGE DeriveFunctor # module Gy13 where import Control.Applicative import Control.Monad import Data.Char State monad newtype State s a = State {runState :: s -> (a, s)} deriving Functor instance Applicative (State s) where pure = return (<*>) = ap instance Monad (State s) where return a = State $ ...
48ac21f57629ea052755b81ef41a738633fe245fdc5719b1053a1c0a1e7e4437
hemmi/coq2scala
dn.ml
module Make = functor (X : Set.OrderedType) -> functor (Y : Map.OrderedType) -> functor (Z : Map.OrderedType) -> struct module Y_tries = struct type t = (Y.t * int) option let compare x y = match x,y with None,None -> 0 | Some (l,n),Some (l',n') -> let m = Y.compare l l' ...
null
https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2/tactics/dn.ml
ocaml
[path_of dna pat] returns the list of nodes of the pattern [pat] read in prefix ordering, [dna] is the function returning the main node of a pattern
module Make = functor (X : Set.OrderedType) -> functor (Y : Map.OrderedType) -> functor (Z : Map.OrderedType) -> struct module Y_tries = struct type t = (Y.t * int) option let compare x y = match x,y with None,None -> 0 | Some (l,n),Some (l',n') -> let m = Y.compare l l' ...
4e8822d40d9b845a89f2bc1e29b3cddace6b9c492bf80f05f616f8a161cc7da9
mokus0/junkbox
Erf.hs
# LANGUAGE ForeignFunctionInterface # GSL.SpecFunc . Erf - translated from specfunc / erfc.c in GSL sources . Original header from specfunc / erfc.c follows . -- specfunc/erfc.c -- Copyright ( C ) 1996 , 1997 , 1998 , 1999 , 2000 , 2001 , 2002 , 2003 -- -- This program is free software; you can redistribute ...
null
https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/GSL/SpecFunc/Erf.hs
haskell
specfunc/erfc.c This program is free software; you can redistribute it and/or modify your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GN...
# LANGUAGE ForeignFunctionInterface # GSL.SpecFunc . Erf - translated from specfunc / erfc.c in GSL sources . Original header from specfunc / erfc.c follows . Copyright ( C ) 1996 , 1997 , 1998 , 1999 , 2000 , 2001 , 2002 , 2003 it under the terms of the GNU General Public License as published by the Free ...
7bafbf1a141da6aca6143d4ebd13458bc50417e6bf766c13ae7ba460ea719330
louispan/ghcjs-base-stub
Fusion.hs
module Data.JSString.Internal.Fusion ( -- * Types Stream(..) , Step(..) -- * Creation and elimination , stream , unstream ...
null
https://raw.githubusercontent.com/louispan/ghcjs-base-stub/8eaee240c9af1a2290f4572a87528f3ddb3e9f12/src/Data/JSString/Internal/Fusion.hs
haskell
* Types * Creation and elimination * Transformations * Construction ** Scans ** Accumulating maps ** Generation and unfolding * Indexing # INLINE [0] stream # backwards. # INLINE [0] reverseStream # # INLINE [0] unstream # # RULES "STREAM stream/unstream fusion" forall s. stream (unstream s) = s # -----------...
Stream(..) , Step(..) , stream , unstream , reverseStream , length ...
4ee5b64d5f15e9cb52acdd5b0711b34c22d7ed0c55d22639d9ed15acbd40073f
bscarlet/llvm-general
ParameterAttribute.hs
-- | Module to allow importing 'ParameterAttribute' distinctly qualified. module LLVM.General.AST.ParameterAttribute where import LLVM.General.Prelude -- | <#parameter-attributes> data ParameterAttribute = ZeroExt | SignExt | InReg | SRet | Alignment Word64 | NoAlias | ByVal | NoCaptur...
null
https://raw.githubusercontent.com/bscarlet/llvm-general/61fd03639063283e7dc617698265cc883baf0eec/llvm-general-pure/src/LLVM/General/AST/ParameterAttribute.hs
haskell
| Module to allow importing 'ParameterAttribute' distinctly qualified. | <#parameter-attributes>
module LLVM.General.AST.ParameterAttribute where import LLVM.General.Prelude data ParameterAttribute = ZeroExt | SignExt | InReg | SRet | Alignment Word64 | NoAlias | ByVal | NoCapture | Nest | ReadNone | ReadOnly | InAlloca | NonNull | Dereferenceable Word64 ...
81bf3d765b07811da1c2c12467836bce9f008df47b74362493db308102130245
HiiGHoVuTi/Catrina
Parsing.hs
module Parsing ( Parser, lexer ) where import Parsing.LangDef import Parsing.Lexer
null
https://raw.githubusercontent.com/HiiGHoVuTi/Catrina/a82036f37ce4fc23aec23314c4a98bc0849c3725/app/Parsing.hs
haskell
module Parsing ( Parser, lexer ) where import Parsing.LangDef import Parsing.Lexer
dc8a8a90229a7676d2048f805e2d49e819b5cbb8cef59f572942bed363809422
clojure-interop/google-cloud-clients
core.clj
(ns core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[com.google.cloud.securitycenter.v1.core]) (require '[com.google.cloud.securitycenter.v1.stub.core]) (require '[com.google.cloud.securitycenter.v1beta1.core]) (require '[com.google.cloud.securitycenter.v1beta1.stub.core])
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.securitycenter/src/core.clj
clojure
(ns core (:refer-clojure :only [require comment defn ->]) (:import )) (require '[com.google.cloud.securitycenter.v1.core]) (require '[com.google.cloud.securitycenter.v1.stub.core]) (require '[com.google.cloud.securitycenter.v1beta1.core]) (require '[com.google.cloud.securitycenter.v1beta1.stub.core])
43a83a1ce1c5af6477f3827fa4751ae9a70b2e915782f9420e4c001ae07b97c3
Beyamor/ruin
levelling.cljs
(ns demo.levelling (:use [ruin.mixin :only [has-mixin?]]) (:require [ruin.entity :as e]) (:require-macros [lonocloud.synthread :as ->])) (defn next-level [lvl] (* lvl lvl 10)) (defn climb-levels [entity points] (loop [{:keys [experience level] :as entity} entity points points levels-gained 0] (let [...
null
https://raw.githubusercontent.com/Beyamor/ruin/50a6977430dcbbceecccadbf732298462165b049/src/demo/levelling.cljs
clojure
(ns demo.levelling (:use [ruin.mixin :only [has-mixin?]]) (:require [ruin.entity :as e]) (:require-macros [lonocloud.synthread :as ->])) (defn next-level [lvl] (* lvl lvl 10)) (defn climb-levels [entity points] (loop [{:keys [experience level] :as entity} entity points points levels-gained 0] (let [...
ad92b8f7643a0a295427d4543f16fce4133a499a535543cd6db6fa8891cf64b2
racket/gui
test-snip-example.rkt
#lang racket/base (require wxme ;; this is dynamically required racket/gui/base racket/file racket/runtime-path racket/port) (define collection-name "circle-snip") (define snip-example-name "main.rkt") (define-runtime-path snip-example.rkt "snip-example.rkt") (define-runtime-path wxm...
null
https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-doc/scribblings/gui/test-snip-example.rkt
racket
this is dynamically required
#lang racket/base racket/gui/base racket/file racket/runtime-path racket/port) (define collection-name "circle-snip") (define snip-example-name "main.rkt") (define-runtime-path snip-example.rkt "snip-example.rkt") (define-runtime-path wxme-circle-snip.rkt "wxme-circle-snip.rkt") (def...
7140479681b69f04f39c1ce2a3a2b1d55850072866e8a0a205ac9fda830c6393
adityaathalye/sicp
ch1-3-3-half-interval-method.scm
; Ch 1.3.3 Procedures as General Methods: Finding roots of equations by half - interval method (define (search f neg-point pos-point) (let ((midpoint (average neg-point pos-point))) (if (close-enough? neg-point pos-point) midpoint (let ((test-value (f midpoint))) (cond ((po...
null
https://raw.githubusercontent.com/adityaathalye/sicp/c8b62c366dade1d5101238a32267dab177808105/ch1-3-3-half-interval-method.scm
scheme
Ch 1.3.3 Procedures as General Methods: Finding roots of
equations by half - interval method (define (search f neg-point pos-point) (let ((midpoint (average neg-point pos-point))) (if (close-enough? neg-point pos-point) midpoint (let ((test-value (f midpoint))) (cond ((positive? test-value) (search f neg-point m...
375e0a27de7c2aed16c60ca2efd7b256deb8ae3a97029789c8813838b23e173c
8c6794b6/guile-tjit
srfi-18.scm
;;; srfi-18.scm --- Multithreading support Copyright ( C ) 2008 , 2009 , 2010 , 2012 , 2014 Free Software Foundation , Inc. ;; ;; This library is free software; you can redistribute it and/or ;; modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either...
null
https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/module/srfi/srfi-18.scm
scheme
srfi-18.scm --- Multithreading support This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public either This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ...
Copyright ( C ) 2008 , 2009 , 2010 , 2012 , 2014 Free Software Foundation , Inc. version 3 of the License , or ( at your option ) any later version . You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA Author : < > Dat...
094b7461e8b672bc50e9cb8e7fdcd0f8dea4491e0de7598eb997f566a8aed6d8
nuvla/api-server
status_utils_test.clj
(ns sixsq.nuvla.server.resources.nuvlabox.status-utils-test (:require [clojure.test :refer [are deftest is testing]] [sixsq.nuvla.db.impl :as db] [sixsq.nuvla.server.resources.common.crud :as crud] [sixsq.nuvla.server.resources.nuvlabox.status-utils :as t])) (deftest status-fields-to-denormalize (...
null
https://raw.githubusercontent.com/nuvla/api-server/2e531a718d281fd6554075ed640c1f1740defa20/code/test/sixsq/nuvla/server/resources/nuvlabox/status_utils_test.clj
clojure
(ns sixsq.nuvla.server.resources.nuvlabox.status-utils-test (:require [clojure.test :refer [are deftest is testing]] [sixsq.nuvla.db.impl :as db] [sixsq.nuvla.server.resources.common.crud :as crud] [sixsq.nuvla.server.resources.nuvlabox.status-utils :as t])) (deftest status-fields-to-denormalize (...
d0132e48f84426fec89ea1940952bc2c6e5cd65f45b9ef1e0c596f6f376eb3e4
clojupyter/clojupyter
cljsrv.clj
(ns clojupyter.kernel.cljsrv "Interface to NREPL server mainly enabling Clojupyter to evaluate Clojure code entered into Jupyter code cells, but supporting code completion, access to documentation strings, and interrupting currently running evaluations." (:require [clojure.pprint :as pp] [io.simplect.co...
null
https://raw.githubusercontent.com/clojupyter/clojupyter/b54b30b5efa115937b7a85e708a7402bd9efa0ab/src/clojupyter/kernel/cljsrv.clj
clojure
------------------------------------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------------------------------------ ---------------------------------------------------------------------------...
(ns clojupyter.kernel.cljsrv "Interface to NREPL server mainly enabling Clojupyter to evaluate Clojure code entered into Jupyter code cells, but supporting code completion, access to documentation strings, and interrupting currently running evaluations." (:require [clojure.pprint :as pp] [io.simplect.co...
ef637fd46276c4da23f1515161a63e6e7d95d0f6a8c062725ec9b590ac1fa17a
circuithub/rel8
Opaleye.hs
# language BlockArguments # # language DataKinds # {-# language DisambiguateRecordFields #-} {-# language FlexibleContexts #-} # language NamedFieldPuns # # language RankNTypes # {-# language TypeFamilies #-} # language ViewPatterns # # options_ghc -Wno - deprecations # module Rel8.Table.Opaleye ( aggregator , at...
null
https://raw.githubusercontent.com/circuithub/rel8/2e82fccb02470198297f4a71b9da8f535d8029b1/src/Rel8/Table/Opaleye.hs
haskell
# language DisambiguateRecordFields # # language FlexibleContexts # # language TypeFamilies # base opaleye profunctors rel8 | Transform a table by adding 'CAST' to all columns. This is most useful for finalising a SELECT or RETURNING statement, guaranteed that the output
# language BlockArguments # # language DataKinds # # language NamedFieldPuns # # language RankNTypes # # language ViewPatterns # # options_ghc -Wno - deprecations # module Rel8.Table.Opaleye ( aggregator , attributes , binaryspec , distinctspec , exprs , exprsWithNames , table , tableFields , unpack...
2aa0fe91949e02652239bb795ceead8cb97501fe06d5da1d5ea9a09ddca7d2b3
batterseapower/haskell-kata
BeautifulFolding.hs
# LANGUAGE ExistentialQuantification # Data type from Max Rabkin 's " Beautiful Folding " ( -folding.html ): Fold over list of type |[b]| with result of type data Fold b c = forall a. F (a -> b -> a) a (a -> c) -- Data type after existential elimination, Oleg-style: data Fold' b c = F' (b -> Fold' b c) c back ...
null
https://raw.githubusercontent.com/batterseapower/haskell-kata/49c0c5cf48f8e5549131c78d026e4f2aa73d8a7a/BeautifulFolding.hs
haskell
Data type after existential elimination, Oleg-style:
# LANGUAGE ExistentialQuantification # Data type from Max Rabkin 's " Beautiful Folding " ( -folding.html ): Fold over list of type |[b]| with result of type data Fold b c = forall a. F (a -> b -> a) a (a -> c) data Fold' b c = F' (b -> Fold' b c) c back :: Fold' b c -> Fold b c back f' = F (\(F' x _) b -> x b...
3e2c7da32413de68c75dfbafba1d9955cf68e3c157dad05658fd2182b69b92d9
yesodweb/yesod
browserid.hs
{-# LANGUAGE OverloadedStrings #-} # LANGUAGE TypeFamilies # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # # LANGUAGE MultiParamTypeClasses # import Yesod.Core import Yesod.Auth import Yesod.Auth.BrowserId import Data.Text (Text) import Text.Hamlet (hamlet) import Control.Monad.IO.Class (liftIO) import Yesod.Fo...
null
https://raw.githubusercontent.com/yesodweb/yesod/c59993ff287b880abbf768f1e3f56ae9b19df51e/yesod-auth/browserid.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies # # LANGUAGE QuasiQuotes # # LANGUAGE TemplateHaskell # # LANGUAGE MultiParamTypeClasses # import Yesod.Core import Yesod.Auth import Yesod.Auth.BrowserId import Data.Text (Text) import Text.Hamlet (hamlet) import Control.Monad.IO.Class (liftIO) import Yesod.Form import Network.Wai.Handler.Warp ...
ec7b05dd6010f4e9a41fa2187f165149c883f0fe884916d578835271b1695725
obfusk/koneko
Eval.hs
-- ; { { { 1 -- File : / Eval.hs -- Maintainer : FC Stegerman <> Date : 2022 - 02 - 12 -- -- Copyright : Copyright (C) 2022 FC Stegerman Version : v0.0.1 License : + -- -- ...
null
https://raw.githubusercontent.com/obfusk/koneko/fd6bf756d94c574d64d25ac77ceaea6fa1ef873a/src/Koneko/Eval.hs
haskell
; { { { 1 Maintainer : FC Stegerman <> Copyright : Copyright (C) 2022 FC Stegerman ; } } } 1 # LANGUAGE OverloadedStrings # | >>> :set -XOverloadedStrings >>> import Data.Maybe >>> ctx <...
File : / Eval.hs Date : 2022 - 02 - 12 Version : v0.0.1 License : + # LANGUAGE CPP # # LANGUAGE NoMonomorphismRestriction # # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # { { { 1 > > > i d = fromJust . ident > > > ev [ str " Hello , World ! " , KIdent $ i d " sa...
d7e29e0bf6bbbeffa6c43bfd80ee56191b00221b38d136ef66a00508d760b6ec
Holmusk/three-layer
Common.hs
-- | Common helpers for writing tests. module Test.Common ( joinSpecs ) where import Test.Hspec (Spec, describe) import Lib.App (AppEnv) -- | Joins list of specs into single test group with given name. joinSpecs :: String -> [AppEnv -> Spec] -> AppEnv -> Spec joinSpecs name specs env = describe name $...
null
https://raw.githubusercontent.com/Holmusk/three-layer/1b58ec102f206681b66a584ca4a7d18f2eb4ef81/test/Test/Common.hs
haskell
| Common helpers for writing tests. | Joins list of specs into single test group with given name.
module Test.Common ( joinSpecs ) where import Test.Hspec (Spec, describe) import Lib.App (AppEnv) joinSpecs :: String -> [AppEnv -> Spec] -> AppEnv -> Spec joinSpecs name specs env = describe name $ traverse_ ($ env) specs
68c2d5b764838e4a61a0a1edac118cc1e5569d7a42d1e66810221a852b48b937
jcclinton/wow-emulator
player_send.erl
This is a World of Warcraft emulator written in erlang , supporting client 1.12.x %% Copyright ( C ) 2014 < jamieclinton.com > %% %% This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Found...
null
https://raw.githubusercontent.com/jcclinton/wow-emulator/21bc67bfc9eea131c447c67f7f889ba040dcdd79/src/player_send.erl
erlang
This program is free software; you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU G...
This is a World of Warcraft emulator written in erlang , supporting client 1.12.x Copyright ( C ) 2014 < jamieclinton.com > it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or You should have received a copy...
13ea5f999c86b6b3045f266d2c3e096ab97a3bcbb4001fec160e41ee98d8c719
brendanhay/amazonka
DeleteRetentionPolicy.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused -...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workmail/gen/Amazonka/WorkMail/DeleteRetentionPolicy.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Stability : auto-generated Deletes the specified retention policy from the specified organization. * Creating a Request * Request Lenses * Destructuring the Response * Response Lenses | /See:/ 'newDeleteRetentionPolicy' smart constructor. | The organi...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # De...
57a83a6aa937823dfa87c37f6775588eb76df7b3c01bb240f3822962dbd3120d
ocaml-multicore/ocaml-tsan
test7.ml
(* TEST include unix modules = "test7_.c" * libunix ** bytecode ** native *) (* Tests nested calls from C (main C) to OCaml (main OCaml) to C (caml_to_c) to * OCaml (c_to_caml) to C (printf functions). Effect E is performed in the * callback, which does not have a handler. *) open Effect open Effect....
null
https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/testsuite/tests/callback/test7.ml
ocaml
TEST include unix modules = "test7_.c" * libunix ** bytecode ** native Tests nested calls from C (main C) to OCaml (main OCaml) to C (caml_to_c) to * OCaml (c_to_caml) to C (printf functions). Effect E is performed in the * callback, which does not have a handler.
open Effect open Effect.Deep type _ t += E : unit t let printf = Printf.printf let c_to_caml () = printf "[Caml] Enter c_to_caml\n%!"; printf "[Caml] c_to_caml: perform effect\n%!"; perform E let _ = Callback.register "c_to_caml" c_to_caml external caml_to_c : unit -> unit = "caml_to_c" let _ = try_with...
ec3711ef085d44f120164f54080436cd6a5d82af51ece327d80e63338e1be98f
functionally/mantis
Types.hs
module Mantra.Command.Types ( Mantra(..) , Configuration(..) ) where import Data.Word (Word32, Word64) import Mantra.Types (SlotRef(..)) data Configuration = Configuration { socketPath :: FilePath , magic :: Maybe Word32 , epochSlots :: Word64 , addressString ...
null
https://raw.githubusercontent.com/functionally/mantis/1cd121202452dcc1bce56ed4b4f41f0e880c9d04/app/Mantra/Command/Types.hs
haskell
module Mantra.Command.Types ( Mantra(..) , Configuration(..) ) where import Data.Word (Word32, Word64) import Mantra.Types (SlotRef(..)) data Configuration = Configuration { socketPath :: FilePath , magic :: Maybe Word32 , epochSlots :: Word64 , addressString ...
bac9df5259f260c18900811c2be938ebf2768c0a91b069999f4f7eba4b1b6252
bhauman/advent-of-clojure
day7.clj
(ns advent-2016.day7 (:require [clojure.java.io :as io])) (def data (line-seq (io/reader (io/resource "2016/day7")))) (defn abba? [[a b c d :as x]] {:pre [(= 4 (count x))]} (and (not= a b) (= a d) (= b c))) (defn separate-parts [s] (->> s (partition-by #{\[ \]}) (reduce (fn [{:keys [k] :as s...
null
https://raw.githubusercontent.com/bhauman/advent-of-clojure/856763baf45bf7bf452ffd304dc1b89f9bc879a6/src/advent-2016/day7.clj
clojure
(ns advent-2016.day7 (:require [clojure.java.io :as io])) (def data (line-seq (io/reader (io/resource "2016/day7")))) (defn abba? [[a b c d :as x]] {:pre [(= 4 (count x))]} (and (not= a b) (= a d) (= b c))) (defn separate-parts [s] (->> s (partition-by #{\[ \]}) (reduce (fn [{:keys [k] :as s...
6a467a7b34d4738e746310422c5c0c604de0e24a927a8e149fe8f9b9c9f51c12
janestreet/memtrace_viewer_with_deps
hash_test.ml
open Ppx_hash_lib.Std open Hash.Builtin module Check_struct_items_match_sig_items = struct module M : sig type t0 [@@deriving hash] type _ t1 [@@deriving hash] type (_,_) t2 [@@deriving hash] end = struct type t0 = int [@@deriving hash] type 'a t1 = 'a * int [@@deriving hash] type ('a,'b) t...
null
https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/ppx_hash/test/hash_test.ml
ocaml
making sure that nobody is reversing the type parameters Same name for type-var and type-name; must be careful when introducing rigid type names.
open Ppx_hash_lib.Std open Hash.Builtin module Check_struct_items_match_sig_items = struct module M : sig type t0 [@@deriving hash] type _ t1 [@@deriving hash] type (_,_) t2 [@@deriving hash] end = struct type t0 = int [@@deriving hash] type 'a t1 = 'a * int [@@deriving hash] type ('a,'b) t...
2ca2339b3f90db30a7823bd3e9f9a1296b03b1929cde06540897a40572c490c5
mistupv/cauder-core
client_server.erl
-module(client_server). -export([main/0, server/0, client/1]). main() -> S = spawn(?MODULE, server, []), spawn(?MODULE, client, [S]), client(S). server() -> receive {P, _} -> P ! ack, server() end. client(S) -> S ! {self(), req}, receive ack -> ok end.
null
https://raw.githubusercontent.com/mistupv/cauder-core/b676fccd1bbd629eb63f3cb5259f7a9a8c6da899/examples/client_server.erl
erlang
-module(client_server). -export([main/0, server/0, client/1]). main() -> S = spawn(?MODULE, server, []), spawn(?MODULE, client, [S]), client(S). server() -> receive {P, _} -> P ! ack, server() end. client(S) -> S ! {self(), req}, receive ack -> ok end.
b3af1d22539d349acb32b1a44088c8f700299ecd12a3013fccd47dc118933223
greghendershott/pdb
define-foo.rkt
#lang racket (provide foo) (define foo 42)
null
https://raw.githubusercontent.com/greghendershott/pdb/6a2b9c7d67bbfce1607976a19312cd571994026c/example/define-foo.rkt
racket
#lang racket (provide foo) (define foo 42)
e2b2cb3cdbf258bed1b1d4101d5c22de8e126f2d27bf8ef6f6b3952787054115
mmontone/gestalt
model.lisp
(defpackage consistent-object (:use :cl :closer-mop) (:export #:consistent-object-class #:consistency-check #:consistency-error #:validate #:ensure #:suspending-consistency)) (defvar *modification-transaction* nil) (defclass consistent-object-class () () (:documentation "Metaclass for consis...
null
https://raw.githubusercontent.com/mmontone/gestalt/fd019c0ca03b4efc73b9ddd3db1e3ed211233428/src/model.lisp
lisp
For the following we need a new method combination that lets us attach several :before and :after methods to a :primary method. That makes it more compositional, although more difficult to redefine and remove methods. Example: The following fails: The following fails: The following fails: The following works: ...
(defpackage consistent-object (:use :cl :closer-mop) (:export #:consistent-object-class #:consistency-check #:consistency-error #:validate #:ensure #:suspending-consistency)) (defvar *modification-transaction* nil) (defclass consistent-object-class () () (:documentation "Metaclass for consis...
679eac6f0012af5872a838aaf9aceb03fb585f2f75b78aabdb86f9780be0201f
fourmolu/fourmolu
output-LetAuto-InRightAlign-indent=2.hs
{-- should be the same in every option --} let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b {-- pure let expressions --} let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2...
null
https://raw.githubusercontent.com/fourmolu/fourmolu/f47860f01cb3cac3b973c5df6ecbae48bbb4c295/data/fourmolu/let-style/output-LetAuto-InRightAlign-indent%3D2.hs
haskell
- should be the same in every option - - pure let expressions - a comment - do-block - - list comprehension -
let_oneline_empty = let in 10 let_oneline_single = let a = 1 in a + 2 let_oneline_multi = let a = 1; b = 2 in a + b let_empty = let in 10 let_single = let a = 1 in a + 2 let_single_sig = let a :: Int a = 1 in a + 2 let_single_comment = let a = 1 in a + 2 let_multi = le...
2ea2db4553e4fb7f6d1548b8b0c004e3ccd2e873c6dd46f053cd17ebc63bfc20
chef/chef-server
oc_chef_wm_authenticate_user.erl
-*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*- %% ex: ts=4 sw=4 et @author < > 2014 Chef Software Inc %% @doc Endpoint used by webui for user authentication -module(oc_chef_wm_authenticate_user). -include("oc_chef_wm.hrl"). Webmachine resource callbacks -mixin([{oc_c...
null
https://raw.githubusercontent.com/chef/chef-server/6d31841ecd73d984d819244add7ad6ebac284323/src/oc_erchef/apps/oc_chef_wm/src/oc_chef_wm_authenticate_user.erl
erlang
ex: ts=4 sw=4 et @doc Endpoint used by webui for user authentication chef_wm behavior callbacks This change on hold until our front-end components expect it chef_user:validate_user_name(UserData), Disallow any attempts to authenticate with credentials of the platform superuser But only permit the identified sup...
-*- erlang - indent - level : 4;indent - tabs - mode : nil ; fill - column : 92 -*- @author < > 2014 Chef Software Inc -module(oc_chef_wm_authenticate_user). -include("oc_chef_wm.hrl"). Webmachine resource callbacks -mixin([{oc_chef_wm_base, [content_types_provided/2, finish_r...
3dd543b846416097a707692e0a1141ad072a45cd7c8eb4338526f79f1df5d47b
ashinn/alschemist
html-parser.scm
;; html-parser.scm -- SSAX-like tree-folding html parser Copyright ( c ) 2003 - 2020 . All rights reserved . ;; BSD-style license: ;;> A permissive HTML parser supporting scalable streaming with a tree > folding interface . This copies the interface of ;;> SSAX parser, as well as providing simple convenien...
null
https://raw.githubusercontent.com/ashinn/alschemist/b8409a090cfd3ef6746f6d5c469da6008cf58ea6/chibi/html-parser.scm
scheme
html-parser.scm -- SSAX-like tree-folding html parser BSD-style license: > A permissive HTML parser supporting scalable streaming with a tree > SSAX parser, as well as providing simple convenience utilities. > It correctly handles all invalid HTML, inserting "virtual" > starting and closing tags as needed to maintai...
Copyright ( c ) 2003 - 2020 . All rights reserved . > folding interface . This copies the interface of (define (call-with-output-string proc) (let ((out (open-output-string))) (proc out) (get-output-string out))) (define (read-while pred . o) (let ((in (if (pair? o) (car o) (current-input-por...
ad533a4e96ae72068e7dcf1ecfaef636afb1d1d3bf6b12c7490ef94478d01eef
johnwhitington/ocamli
foo.ml
let _ = Pptinyocaml.simple := true; Ocamliutil.typecheck := false; Ocamlilib.load_stdlib := true; Ocamlilib.load_library () let mk name f = let open Tinyocaml in Fun (NoLabel, (PatVar "*x"), (CallBuiltIn (None, name, [Var "*x"], f)), []) let exception_from_ocaml e = Tinyocaml.Unit [%%auto {|ext...
null
https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/ppx_interpret/example/foo.ml
ocaml
let _ = Pptinyocaml.simple := true; Ocamliutil.typecheck := false; Ocamlilib.load_stdlib := true; Ocamlilib.load_library () let mk name f = let open Tinyocaml in Fun (NoLabel, (PatVar "*x"), (CallBuiltIn (None, name, [Var "*x"], f)), []) let exception_from_ocaml e = Tinyocaml.Unit [%%auto {|ext...
eda04f98de0b34d5abf26b1e4a1b8f476e846955fb06fb88f6a0f08b774b6183
lispgames/perfectstorm
ticks.lisp
(in-package :storm) (defparameter *speed-of-sound* 4) (defgeneric tick (entity)) (defmethod tick :around ((entity entity)) ;(error "tick around") (unless (invalid entity) (call-next-method))) (defmethod tick :before ((unit ground-unit)) (setf (pos unit) (case (length (new-positions unit)) ...
null
https://raw.githubusercontent.com/lispgames/perfectstorm/a21e0420deb3ec83e9d776241ab37e78c5f29b94/perfectstorm/ticks.lisp
lisp
(error "tick around") (call-next-method)) animation when fade-in in progress selection indicator must be larger than the unit (centroid (mapcar #'pos (units group))))) bullet should be at least circular (print-vars (size-x bullet))) if target is lost, take the weapon's next target as new target if available c...
(in-package :storm) (defparameter *speed-of-sound* 4) (defgeneric tick (entity)) (defmethod tick :around ((entity entity)) (unless (invalid entity) (call-next-method))) (defmethod tick :before ((unit ground-unit)) (setf (pos unit) (case (length (new-positions unit)) (0 (pos unit)) ...
4512308f3890ded1d8997bb17edbaabc3c5bd406b16fa4ea615031663270a306
panicz/grasp
define-type.scm
(import (conversions)) (import (define-syntax-rule)) (import (assert)) (import (define-interface)) ;;(define-alias Cloneable java.lang.Cloneable) (define-syntax maps (syntax-rules (to:) ((_ input-types to: output-type + ...) procedure))) (define-syntax-rule (list-of type) list) (define-syntax-rule (eit...
null
https://raw.githubusercontent.com/panicz/grasp/dcd0f92d58734efdd10191a31f8e80f47f98c3a7/src/define-type.scm
scheme
(define-alias Cloneable java.lang.Cloneable) (define-simple-class Struct () interface: #t ((typename) :: String #!abstract) ((fields->string) :: String #!abstract) ((toString) :: String #!abstract) ((assign source :: Struct) :: Struct #!abstract) ((clone) :: Struct #!abstract)) (embedded-in? object)::boo...
(import (conversions)) (import (define-syntax-rule)) (import (assert)) (import (define-interface)) (define-syntax maps (syntax-rules (to:) ((_ input-types to: output-type + ...) procedure))) (define-syntax-rule (list-of type) list) (define-syntax-rule (either type ...) java.lang.Object) (define-in...
765877a93eb82eb9105f9d5ab470ff74d4ee128697f7f8d24553fa1cfdd5d9c9
agda/agda
Library.hs
# LANGUAGE TemplateHaskell # module Internal.Interaction.Library ( tests ) where import Control.Applicative ( liftA2, (<$>), (<*>) ) import Test.QuickCheck import Agda.Interaction.Library import Agda.Utils.Functor import Internal.Helpers ------------------------------------------------------------------------ -- *...
null
https://raw.githubusercontent.com/agda/agda/f50c14d3a4e92ed695783e26dbe11ad1ad7b73f7/test/Internal/Interaction/Library.hs
haskell
---------------------------------------------------------------------- * Instances ---------------------------------------------------------------------- | Version numbers must be non-negative. ---------------------------------------------------------------------- * Properties ---------------------------------------...
# LANGUAGE TemplateHaskell # module Internal.Interaction.Library ( tests ) where import Control.Applicative ( liftA2, (<$>), (<*>) ) import Test.QuickCheck import Agda.Interaction.Library import Agda.Utils.Functor import Internal.Helpers instance Arbitrary VersionView where arbitrary = liftA2 VersionView (filte...
8a2c1488bd76fae99e9bdb74b7985f3a89ed53a45c8c4c3b4242b42ab4bd4ee2
aryx/yacfe
programming_language.ml
open Common type pl = | C | Cplusplus | Java todo detect false C file , look for " Mode : Objective - C++ " string in file ? let detect_pl_of_file file = let (d,b,e) = Common2.dbe_of_filename file in match e with | "c" -> C can also be a c++ , use Parser_cplusplus.is_problably_cplusplus_file | "h" ...
null
https://raw.githubusercontent.com/aryx/yacfe/86a4994822abca03ec9e03f1a7e60eca66db0a08/pl_info/programming_language.ml
ocaml
open Common type pl = | C | Cplusplus | Java todo detect false C file , look for " Mode : Objective - C++ " string in file ? let detect_pl_of_file file = let (d,b,e) = Common2.dbe_of_filename file in match e with | "c" -> C can also be a c++ , use Parser_cplusplus.is_problably_cplusplus_file | "h" ...
f93857390f987bfcfaff04c907840634ca8bd76823093fbdccee11dabd6ae64a
janestreet/async_smtp
test_smtp.ml
open! Core open! Async open! Async_smtp.Smtp_expect_test_helper open! Expect_test_helpers_core open! Expect_test_helpers_async let%expect_test "Smtp_expect_test_helper.smtp" = let%bind () = smtp [ envelope () ] in [%expect {| < 220 [SMTP TEST SERVER] > EHLO [SMTP TEST CLIENT] < 250-Ok: Continue, ex...
null
https://raw.githubusercontent.com/janestreet/async_smtp/f900fa3f028725539f1336900b5631d2522fc154/test/lib/test_smtp.ml
ocaml
open! Core open! Async open! Async_smtp.Smtp_expect_test_helper open! Expect_test_helpers_core open! Expect_test_helpers_async let%expect_test "Smtp_expect_test_helper.smtp" = let%bind () = smtp [ envelope () ] in [%expect {| < 220 [SMTP TEST SERVER] > EHLO [SMTP TEST CLIENT] < 250-Ok: Continue, ex...
fd8ed003f14fc45dea528d752eb81ff3daa8b53f1819f8be87acbb57c501f75f
ocaml-gospel/gospel
t23.mli
(**************************************************************************) (* *) GOSPEL -- A Specification Language for OCaml (* *) Copyright ( ...
null
https://raw.githubusercontent.com/ocaml-gospel/gospel/79841c510baeb396d9a695ae33b290899188380b/test/negative/t23.mli
ocaml
************************************************************************ (as described in file LICE...
GOSPEL -- A Specification Language for OCaml Copyright ( c ) 2018- The VOCaL Project This software is free software , distributed under the MIT license val f : ('a -> 'b -> 'c) -> 'a -> 'b -> 'c ERROR : Line 12 insufficient parameter...
52e576add29d88a4bb8eb2b0739fd658be189b0fdd416266295db416305007ec
mtolly/onyxite-customs
Venue.hs
{-# LANGUAGE DeriveFunctor #-} {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # # LANGUAGE TupleSections # module Onyx.Harmonix.RockBand.Milo.Venue where import Control.Monad (forM_, replicateM) import Data.Binary.Get import Data.Binary.Put im...
null
https://raw.githubusercontent.com/mtolly/onyxite-customs/0c8acd6248fe92ea0d994b18b551973816adf85b/haskell/packages/onyx-lib/src/Onyx/Harmonix/RockBand/Milo/Venue.hs
haskell
# LANGUAGE DeriveFunctor # # LANGUAGE OverloadedStrings # 0, only in postproc track? "song_anim" not sure of boundaries here always 0 always 0 like "bass_intensity" like "lightpreset_interp" but usually "" We'll see if we need to do anything more (new events in the added space or something)
# LANGUAGE RecordWildCards # # LANGUAGE TupleSections # module Onyx.Harmonix.RockBand.Milo.Venue where import Control.Monad (forM_, replicateM) import Data.Binary.Get import Data.Binary.Put import qualified Data.ByteString as B import qualified ...
2e893addfd1ebe88648b9e6a96f305c1e259456f0295c2d727ccfa86f92f12ad
kmi/irs
utilities.lisp
Mode : Lisp ; Package : Author : The Open University (in-package "OCML") (in-ontology wsmo) (def-class run-ocml-expression-goal-non-functional-properties (non-functional-properties) nil) (def-class run-ocml-expression-goal (goal) ?goal ((has-input-role :value has-variables :value has-expressi...
null
https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/ontologies/domains/wsmo/utilities.lisp
lisp
Package :
Author : The Open University (in-package "OCML") (in-ontology wsmo) (def-class run-ocml-expression-goal-non-functional-properties (non-functional-properties) nil) (def-class run-ocml-expression-goal (goal) ?goal ((has-input-role :value has-variables :value has-expression) (has-input-soap-bind...
85f65a2618f0fcf25e48614f558373a025d7022f06739514f8467da67d54bcb2
nilern/fell
core_test.clj
(ns fell.core-test (:require [clojure.test :refer :all] [cats.core :refer [return bind]] [fell.eff :refer [context]] [fell.core :refer :all]) (:import [fell.eff Pure Impure])) (deftest monad-test (testing "return" (let [eff (return context 23)] (is (instance? Pure e...
null
https://raw.githubusercontent.com/nilern/fell/57b2d7eaafefc2e311d6fa8b316bc03405258b3e/test/fell/core_test.clj
clojure
(ns fell.core-test (:require [clojure.test :refer :all] [cats.core :refer [return bind]] [fell.eff :refer [context]] [fell.core :refer :all]) (:import [fell.eff Pure Impure])) (deftest monad-test (testing "return" (let [eff (return context 23)] (is (instance? Pure e...
49c8f58ec37e60cd2f988c954eea0e07d08f9f7f4503955c04ad98f1217a8a60
craigl64/clim-ccl
defpackage.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : ( CLIM - LISP : USE LISP : COLON - MODE : EXTERNAL ) ; Base : 10 ; Lowercase : Yes -*- ;; See the file LICENSE for the full license governing this code. ;; " Copyright ( c ) 1989 , 1990 , 1991 by International Lisp Associates . All Rights Reserved . " #-...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/utils/defpackage.lisp
lisp
Syntax : ANSI - Common - Lisp ; Package : ( CLIM - LISP : USE LISP : COLON - MODE : EXTERNAL ) ; Base : 10 ; Lowercase : Yes -*- See the file LICENSE for the full license governing this code. Perhaps there is something non-standard we could do. Remove old nicknames, if any. Only Symbolics' find-package might return...
" Copyright ( c ) 1989 , 1990 , 1991 by International Lisp Associates . All Rights Reserved . " #-aclpc (warn "utils/defpackage should not be used anymore") #+aclpc (progn #+(or Allegro Lucid) (defpackage :clim-lisp) #-(or Allegro Lucid) (eval-when (compile load eval) (unless (find-package :clim-lisp) (mak...
bc1d60f81ca145b3c2b46771ac30d92649c7baeb20a18fb88cc6204c78e841a6
b-social/zebra
sources.clj
(ns zebra.sources (:refer-clojure :exclude [update]) (:require [zebra.utils :refer [transform-params transform-type-data]]) (:import [com.stripe.model Source Source$Card] [com.stripe.net RequestOptions] [java.util Map])) (def three-d-secure-requirements {:...
null
https://raw.githubusercontent.com/b-social/zebra/0dac502c2a493d3eeb74b35195dbcae206978d55/src/zebra/sources.clj
clojure
TODO: deprecate `type-data`, it does not match API. TODO: Why does this catch the exception?
(ns zebra.sources (:refer-clojure :exclude [update]) (:require [zebra.utils :refer [transform-params transform-type-data]]) (:import [com.stripe.model Source Source$Card] [com.stripe.net RequestOptions] [java.util Map])) (def three-d-secure-requirements {:...
04f4a8357ee53c15a1a4accca55910228a312d2859833c0fafc3a793e70cda5a
softwarelanguageslab/maf
R5RS_ad_heap-4.scm
; Changes: * removed : 1 * added : 2 * swaps : 2 ; * negated predicates: 0 * swapped branches : 1 ; * calls to id fun: 0 (letrec ((my-++ (lambda (n) (+ n 1))) (my--- (lambda (n) (- n 1))) (false #f) (true #t) (nil ()) (key (lambda ...
null
https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_ad_heap-4.scm
scheme
Changes: * negated predicates: 0 * calls to id fun: 0
* removed : 1 * added : 2 * swaps : 2 * swapped branches : 1 (letrec ((my-++ (lambda (n) (+ n 1))) (my--- (lambda (n) (- n 1))) (false #f) (true #t) (nil ()) (key (lambda (x) x)) (make-heap (lambda (a-vecto...
c167dc69882ded5916e5068449a4b43c20069955fbec2f8b1dfe92633a0f9ef3
nrepl/nrepl
completion.clj
(ns nrepl.util.completion "Code completion functionality. The functionality here is experimental and the API is subject to changes." {:author "Bozhidar Batsov" :added "0.8"} (:require [clojure.main] [nrepl.misc :as misc]) (:import [java.util.jar JarFile] [java.io File] ...
null
https://raw.githubusercontent.com/nrepl/nrepl/dfecc450ca936dd5716ba144f4d262d53b33be04/src/clojure/nrepl/util/completion.clj
clojure
Code adapted from Compliment (-yakushev/compliment) The results follow compliment's format, as it's richer and gives more useful data to clients. Utility functions some methods might exist in multiple classes Avoid using future directly on top-level for graalvm compatibility Avoid using future directly on top-le...
(ns nrepl.util.completion "Code completion functionality. The functionality here is experimental and the API is subject to changes." {:author "Bozhidar Batsov" :added "0.8"} (:require [clojure.main] [nrepl.misc :as misc]) (:import [java.util.jar JarFile] [java.io File] ...
75c490e3b635422e5173e25632089e1802235d544020b2f1ce8bb4b2433107ae
thheller/shadow-cljs
bg.cljs
(ns demo.chrome.bg) (defn init [] (js/console.log "chrome-bg") (js/console.log "▶❤◀") (js/chrome.runtime.onInstalled.addListener (fn [] (js/console.log "Installed!") )))
null
https://raw.githubusercontent.com/thheller/shadow-cljs/ba0a02aec050c6bc8db1932916009400f99d3cce/src/dev/demo/chrome/bg.cljs
clojure
(ns demo.chrome.bg) (defn init [] (js/console.log "chrome-bg") (js/console.log "▶❤◀") (js/chrome.runtime.onInstalled.addListener (fn [] (js/console.log "Installed!") )))
fdcf20a6b235c6080101fa9e3f4df7a4baf74ea130cb651e6bb5a39e1f7e8e0c
lingnand/VIMonad
NamedActions.hs
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE ExistentialQuantification , FlexibleContexts , FlexibleInstances , StandaloneDeriving # -------------------------------------------------------------------- -- | Module : XMonad . Util . NamedActions Copyright : 2009 < > -- License : BSD3-style (...
null
https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/XMonadContrib/XMonad/Util/NamedActions.hs
haskell
------------------------------------------------------------------ | License : BSD3-style (see LICENSE) Stability : unstable Portability : unportable A wrapper for keybinding configuration that can list the available keybindings. Note that xmonad>=0.11 has by default a list of the default keybindings...
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE ExistentialQuantification , FlexibleContexts , FlexibleInstances , StandaloneDeriving # Module : XMonad . Util . NamedActions Copyright : 2009 < > Maintainer : < > module XMonad.Util.NamedActions ( sendMessage', spawn', submapNam...
67722bb68411b5b81ec4b02c12e4d65c50d6c68996c7beaa7d67109625651c04
glguy/advent
23.hs
{-# Language ImportQualifiedPost #-} | Module : Main Description : Day 23 solution Copyright : ( c ) , 2021 License : ISC Maintainer : < > Search for the cheapest way to rearrange lizards in a maze to get all the lizards back into the correct rooms . Module : Main Descripti...
null
https://raw.githubusercontent.com/glguy/advent/7ab9f9e47208fd5720e36bac33fee2b78d4ec50b/solutions/src/2021/23.hs
haskell
# Language ImportQualifiedPost # | Compute all the information needed from a character in the input map. | Predicate for rooms (rather than hallways) | Step the simulation once tracking the cost of the move. | Check that all the amphis in a room are supposed to be there. | Check that everything on the map is where...
| Module : Main Description : Day 23 solution Copyright : ( c ) , 2021 License : ISC Maintainer : < > Search for the cheapest way to rearrange lizards in a maze to get all the lizards back into the correct rooms . Module : Main Description : Day 23 solution Copyright : (c...