_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
4354b943dcc1a1e126ce9d764910203fd4fea1a741af03d4f1e9ad807c8310d4
RefactoringTools/HaRe
Printf.hs
# LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # Printf.hs module TH.Printf where -- Skeletal printf from the paper. -- It needs to be in a separate module to the one where -- you intend to use it. -- Import some Template Haskell syntax import Language . Haskell . THSyntax import Language.Haskell.TH import L...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/test/testdata/TH/Printf.hs
haskell
Skeletal printf from the paper. It needs to be in a separate module to the one where you intend to use it. Import some Template Haskell syntax Describe a format string of the format string. This code will be spliced into the module which calls "pr", at compile time. from an input format string. str = QuasiQuo...
# LANGUAGE TemplateHaskell # # LANGUAGE QuasiQuotes # Printf.hs module TH.Printf where import Language . Haskell . THSyntax import Language.Haskell.TH import Language.Haskell.TH.Quote import qualified Language.Haskell.TH as TH data Format = D | S | L String Parse a format string . This is left largely to yo...
1e14c175e55e37f8f0fb8b44e53fd2b440ab3b70ba83a40449ca4961ce256f05
bishboria/learnyouahaskell
15_editing_a_tree.hs
data Tree a = Empty | Node a (Tree a) (Tree a) deriving (Show) freeTree :: Tree Char freeTree = Node 'P' (Node 'O' (Node 'L' (Node 'N' Empty Empty) (Node 'T' Empty Empty) ) (Node 'Y' (Node 'S' Empty Empty) (...
null
https://raw.githubusercontent.com/bishboria/learnyouahaskell/d8c7b41398e9672db18c1b1360372fc4a4adefa8/15/15_editing_a_tree.hs
haskell
'P'
data Tree a = Empty | Node a (Tree a) (Tree a) deriving (Show) freeTree :: Tree Char freeTree = Node 'P' (Node 'O' (Node 'L' (Node 'N' Empty Empty) (Node 'T' Empty Empty) ) (Node 'Y' (Node 'S' Empty Empty) (...
88f0bf6de80e54d625fd0040718a4e2ec75d66f195e330fdeddaf32c64884b1c
craigl64/clim-ccl
sysdcl.lisp
-*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 ; Lowercase : Yes -*- ;; See the file LICENSE for the full license governing this code. ;; (in-package :cl-user) (defsystem aclnt-clim (:default-pathname "clim2:;aclpc;") (:serial clim-standalone "pkgdcl" "winwidgh" ...
null
https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/aclpc/sysdcl.lisp
lisp
Syntax : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 ; Lowercase : Yes -*- See the file LICENSE for the full license governing this code.
(in-package :cl-user) (defsystem aclnt-clim (:default-pathname "clim2:;aclpc;") (:serial clim-standalone "pkgdcl" "winwidgh" "climpat" "acl-prel" "acl-class" "acl-dc" "acl-port" "acl-mirror" "acl-medium" "acl-pixmaps" "acl-frames" "acl-widget" "acl-scroll" last))
c63ec5aa82f0442b898e174a3e1d5f6b151bc909ba3931c96253cea80c5dee8d
basho/riak_core
riak_core_metadata_exchange_fsm.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2013 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 ob...
null
https://raw.githubusercontent.com/basho/riak_core/2972270953925290ffc8f06b6a2aaf6fbc0a1996/src/riak_core_metadata_exchange_fsm.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 permissio...
Copyright ( c ) 2013 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 OF ANY -module(...
574dbfd44f3fe282bf7daf0f9399183f3dd0687b9edc1d558f633c5895eb413c
ijp/guildhall
pkg-list.scm
(package (discrepancy (0)))
null
https://raw.githubusercontent.com/ijp/guildhall/2fe2cc539f4b811bbcd69e58738db03eb5a2b778/tests/repository/discrepancy/pkg-list.scm
scheme
(package (discrepancy (0)))
9594131daab136d6075c912411ca641f36de4581055fb2a70605c18717ef66e2
dyzsr/ocaml-selectml
host.ml
TEST include dynlink readonly_files = " host.ml plugin.ml " libraries = " " flags + = " -g " ocamldebug_script = " $ { test_source_directory}/input_script " * debugger * * shared - libraries * * * setup - ocamlc.byte - build - env * * * * ocamlc.byte module = " host.ml " * * * * * ocamlc.byte...
null
https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/testsuite/tests/tool-debugger/dynlink/host.ml
ocaml
TEST include dynlink readonly_files = " host.ml plugin.ml " libraries = " " flags + = " -g " ocamldebug_script = " $ { test_source_directory}/input_script " * debugger * * shared - libraries * * * setup - ocamlc.byte - build - env * * * * ocamlc.byte module = " host.ml " * * * * * ocamlc.byte...
07dbf2387ccd143445340a1d6f28d56ee60cdd5c35be34ea1d21a61869a872ad
zotonic/zotonic
filter_utc.erl
@author < > 2010 %% @doc 'utc' filter, translate a datetime to UTC Copyright 2010 %% 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 ...
null
https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_mod_base/src/filters/filter_utc.erl
erlang
@doc 'utc' filter, translate a datetime to UTC 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 ...
@author < > 2010 Copyright 2010 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(filter_utc). -export([utc/2]). utc(undefined, _Context) -> undefined; utc(Input, _Context) -> hd(calendar:local_time_...
f81d977ee9a4066dbb5226378f0e9a7b46072bfcabd95b10a4e1a072b869e4a3
chicken-mobile/chicken-sdl2-android-builder
gl.scm
;; chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2 ;; Copyright © 2013 , 2015 - 2016 . ;; All rights reserved. ;; ;; Redistribution and use in source and binary forms, with or without ;; modification, are permitted provided that the following conditions ;; are met: ;; ;; - Redistributions...
null
https://raw.githubusercontent.com/chicken-mobile/chicken-sdl2-android-builder/90ef1f0ff667737736f1932e204d29ae615a00c4/eggs/sdl2/lib/sdl2-internals/enums/gl.scm
scheme
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. - Redistributio...
chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2 Copyright © 2013 , 2015 - 2016 . " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT N...
344ede0156ebb7db97497aa4fe0efbfc19c70e1b692bf0cd23e5a51a7b96f99f
erlang/otp
tls_client_ticket_store.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2007 - 2022 . 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/erlang/otp/2d59a2cc95977d55a95fa1d4810f7b68ef4f3193/lib/ssl/src/tls_client_ticket_store.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 2007 - 2022 . All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , Purpose : Handle client side TLS-1.3 session ticket storage -module(tls_client_ticket_store). -behaviour(gen_serv...
f4c82b8b7e21668649a8bd49eb9fd1e4d3f96997f584b9b971c2e26ff19ec070
dmjio/stripe
Prelude.hs
# LANGUAGE DeriveFunctor # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE RebindableSyntax # # LANGUAGE NoImplicitPrelude # # LANGUAGE TypeFamilies # {-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE UndecidableInstances # {-# LANGUAGE RankNTypes #-} module...
null
https://raw.githubusercontent.com/dmjio/stripe/967334629933fcb55247eb3270c7801c05d6bf61/stripe-tests/tests/Web/Stripe/Test/Prelude.hs
haskell
# LANGUAGE TypeSynonymInstances # # LANGUAGE RankNTypes # ---------------------------------------------------------------------------- Stripe free monad ---------------------------------------------------------------------------- leaves everything else alone. ---------------------------------------------------------...
# LANGUAGE DeriveFunctor # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE RebindableSyntax # # LANGUAGE NoImplicitPrelude # # LANGUAGE TypeFamilies # # LANGUAGE UndecidableInstances # module Web.Stripe.Test.Prelude ( ($) , (-&-) , Char...
09da7654a427b4e8194f0238ecf5500393d9c958de33adcdd485498eb31b7034
yesodweb/wai
Internal.hs
-- | Internal constructors and helper functions. Note that no guarantees are given for stability of these interfaces. module Network.Wai.Middleware.RequestSizeLimit.Internal ( RequestSizeLimitSettings(..) , setMaxLengthForRequest , setOnLengthExceeded ) where import Data.Word (Word64) import Network.Wa...
null
https://raw.githubusercontent.com/yesodweb/wai/5d1fd4926d0f210eb77c2bc0e546cb3cca6bc197/wai-extra/Network/Wai/Middleware/RequestSizeLimit/Internal.hs
haskell
| Internal constructors and helper functions. Note that no guarantees are given for stability of these interfaces. | Settings to configure 'requestSizeLimitMiddleware'. then set the values using 'setMaxLengthForRequest' and 'setOnLengthExceeded' (See the examples below). ==== __Examples__ ===== Conditionally s...
module Network.Wai.Middleware.RequestSizeLimit.Internal ( RequestSizeLimitSettings(..) , setMaxLengthForRequest , setOnLengthExceeded ) where import Data.Word (Word64) import Network.Wai (Middleware, Request) This type ( but not the constructor , or record fields ) is exported from " Network . Wai ....
260a0f804faed9aa71e62f4a55e0de9668c4bbfe0d7178fa1a108b80a102e7e0
40ants/multitrainer
tips.lisp
(defpackage multiplication/tips (:use #:cl) (:import-from #:multiplication/i18n #:i18n) (:export #:make-tip)) (in-package multiplication/tips) (defclass op () ((left :initarg :left) (right :initarg :right))) (defclass trivial (op) ()) (defclass plus (op) ()) (defclass mul (op) ()) (defmet...
null
https://raw.githubusercontent.com/40ants/multitrainer/201c5b9049a0e45ac85f44437e7508299571032b/tips.lisp
lisp
TODO: тут надо провеять на тривиалльлность new-left ((oddp left) (let ((new-right (simplify (1- left) right))) ; TODO : тут надо провеять на тривиалльлность new - left (make-instance 'plus :left new-right :right left))) If we are here, then both...
(defpackage multiplication/tips (:use #:cl) (:import-from #:multiplication/i18n #:i18n) (:export #:make-tip)) (in-package multiplication/tips) (defclass op () ((left :initarg :left) (right :initarg :right))) (defclass trivial (op) ()) (defclass plus (op) ()) (defclass mul (op) ()) (defmet...
c079e288a55227bc5bda5866cb211a684d9a8d264e0b49ef1a9b91ed6cba8396
grin-compiler/ghc-wpc-sample-programs
CodegenJavaScript.hs
| Module : IRTS.CodegenJavaScript Description : The JavaScript code generator . License : : The Idris Community . Module : IRTS.CodegenJavaScript Description : The JavaScript code generator. License : BSD3 Maintainer : The Idris Community. -} {-# LANGUAGE OverloadedStrings, PatternGu...
null
https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/src/IRTS/CodegenJavaScript.hs
haskell
# LANGUAGE OverloadedStrings, PatternGuards #
| Module : IRTS.CodegenJavaScript Description : The JavaScript code generator . License : : The Idris Community . Module : IRTS.CodegenJavaScript Description : The JavaScript code generator. License : BSD3 Maintainer : The Idris Community. -} module IRTS.CodegenJavaScript (codegenJav...
46908b753d1123bbcdd0612314a1c364b79fcdc44c9d43a5e91767db12794a11
runtimeverification/haskell-backend
Axiom.hs
| Module : . Attribute . Axiom Description : Axiom sentence attributes Copyright : ( c ) Runtime Verification , 2018 - 2021 License : BSD-3 - Clause Maintainer : Module : Kore.Attribute.Axiom Description : Axiom sentence attributes Copyright : (c) Runtime Verification, 2018-2021 L...
null
https://raw.githubusercontent.com/runtimeverification/haskell-backend/93a705112305a2d7e084e98dca93ec33e0d661d5/kore/src/Kore/Attribute/Axiom.hs
haskell
| The identifier from the front-end identifying a rule or group of rules. | A number associated to each rule, which specifies the order of application | The axiom is an associativity axiom. | The axiom is a commutativity axiom. | The axiom is a left- or right-unit axiom. | The axiom is an idempotency axiom. | T...
| Module : . Attribute . Axiom Description : Axiom sentence attributes Copyright : ( c ) Runtime Verification , 2018 - 2021 License : BSD-3 - Clause Maintainer : Module : Kore.Attribute.Axiom Description : Axiom sentence attributes Copyright : (c) Runtime Verification, 2018-2021 L...
650d99b93cf0007d056a65439ffa489640a47aac9e54ef4114ff6f1b947aa63d
sirherrbatka/vellum
functions.lisp
(cl:in-package #:vellum.header) (declaim (inline validate-active-row)) (defun validate-active-row () (when (null *row*) (error 'no-row))) (declaim (inline validate-active-header)) (defun validate-active-header () (when (null *header*) (error 'no-header))) (declaim (inline set-row)) (defun set-row (row...
null
https://raw.githubusercontent.com/sirherrbatka/vellum/5ba920c9733a290226cde4738de28255b4307b69/src/header/functions.lisp
lisp
(cl:in-package #:vellum.header) (declaim (inline validate-active-row)) (defun validate-active-row () (when (null *row*) (error 'no-row))) (declaim (inline validate-active-header)) (defun validate-active-header () (when (null *header*) (error 'no-header))) (declaim (inline set-row)) (defun set-row (row...
0bf24ef199a9c96c3975ca8ba6d74051d500e44ed47355f9476b6ee7d756fdfb
PacktWorkshops/The-Clojure-Workshop
tennis_test.clj
(ns packt-clj.tennis-test (:require [packt-clj.tennis :as tennis] [clojure.test :refer [testing is deftest]])) (def tennis-data-csv "../tennis-data/match_scores_1991-2016_unindexed_csv.csv") (deftest federer-win-match-query (let [fed-wins (tennis/match-query tennis-data-csv ...
null
https://raw.githubusercontent.com/PacktWorkshops/The-Clojure-Workshop/3d309bb0e46a41ce2c93737870433b47ce0ba6a2/Chapter04/Exercise4.14/test/packt_clj/tennis_test.clj
clojure
(ns packt-clj.tennis-test (:require [packt-clj.tennis :as tennis] [clojure.test :refer [testing is deftest]])) (def tennis-data-csv "../tennis-data/match_scores_1991-2016_unindexed_csv.csv") (deftest federer-win-match-query (let [fed-wins (tennis/match-query tennis-data-csv ...
c2b49f6b2d959e9d9d7f59a323ec5b936cb5daf1cfecf9c0da550816630c0003
nokia/web-assembly-self-certifying-compilation-framework
proof_types.ml
* Copyright 2020 Nokia Licensed under the BSD 3 - Clause License . SPDX - License - Identifier : BSD-3 - Clause Copyright 2020 Nokia Licensed under the BSD 3-Clause License. SPDX-License-Identifier: BSD-3-Clause *) open Wasm open Wasm_utils open Instr_graph open Func_types open Script_types ...
null
https://raw.githubusercontent.com/nokia/web-assembly-self-certifying-compilation-framework/8c31df0bd7d2d94cfbc22089944f5cabb3a61158/src/validator/proofs/proof_types.ml
ocaml
mathematical integer relations | ArrsRangeEqForm of array_ * array_ * pointer * pointer uninterpreted boolean function Typical logical conjunctions Add comments to our formula; can only wrap an existing formula A simpler representation than the one in digraphs Define the OCaml modules needed for some d...
* Copyright 2020 Nokia Licensed under the BSD 3 - Clause License . SPDX - License - Identifier : BSD-3 - Clause Copyright 2020 Nokia Licensed under the BSD 3-Clause License. SPDX-License-Identifier: BSD-3-Clause *) open Wasm open Wasm_utils open Instr_graph open Func_types open Script_types ...
307b0e67bb68254291ff8753aca59148dbd17242eda65c62abda8c31a613824e
Clojure2D/clojure2d-examples
texture.clj
(ns rt4.the-next-week.ch06.texture (:require [fastmath.core :as m] [fastmath.vector :as v] [clojure2d.pixels :as p] [clojure2d.core :as c2d] [rt4.color :as color] [rt4.the-next-week.ch06.perlin :as perlin] [fastmath.random :as r])) (set! *warn-o...
null
https://raw.githubusercontent.com/Clojure2D/clojure2d-examples/ead92d6f17744b91070e6308157364ad4eab8a1b/src/rt4/the_next_week/ch06/texture.clj
clojure
using fastmath fbm-noise, which is much much faster also using code from version 3.x
(ns rt4.the-next-week.ch06.texture (:require [fastmath.core :as m] [fastmath.vector :as v] [clojure2d.pixels :as p] [clojure2d.core :as c2d] [rt4.color :as color] [rt4.the-next-week.ch06.perlin :as perlin] [fastmath.random :as r])) (set! *warn-o...
792109eed02e762a8cb9d8f035558ee8534a1b1aeecdfc01724c90b48fd01372
fakedata-haskell/fakedata
VentureBros.hs
# LANGUAGE TemplateHaskell # {-# LANGUAGE OverloadedStrings #-} module Faker.TvShow.VentureBros where import Data.Text import Faker import Faker.Internal import Faker.Provider.VentureBros import Faker.TH $(generateFakeField "ventureBros" "character") $(generateFakeField "ventureBros" "organization") $(generateFake...
null
https://raw.githubusercontent.com/fakedata-haskell/fakedata/e6fbc16cfa27b2d17aa449ea8140788196ca135b/src/Faker/TvShow/VentureBros.hs
haskell
# LANGUAGE OverloadedStrings #
# LANGUAGE TemplateHaskell # module Faker.TvShow.VentureBros where import Data.Text import Faker import Faker.Internal import Faker.Provider.VentureBros import Faker.TH $(generateFakeField "ventureBros" "character") $(generateFakeField "ventureBros" "organization") $(generateFakeField "ventureBros" "vehicle") $(g...
a90814a52ae9fcf6cdc0a6f5475daa11a824a2ba267dc17ca2ef866b98284687
MyDataFlow/ttalk-server
exometer_info.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved . %% This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtai...
null
https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/exometer/src/exometer_info.erl
erlang
------------------------------------------------------------------- ------------------------------------------------------------------- to generate accessor functions for exometer data structures. Note that the `value' attribute in `exometer_entry{}' records may not represent the true value of the metric, sin...
Copyright ( c ) 2014 Basho Technologies , Inc. All Rights Reserved . This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this file , You can obtain one at /. @doc Accessor function for exometer data structures This modu...
8619a8b0a9493dbb5a154d3803f0427548063934e2328e88433fcd74c9948490
well-typed/large-records
R070.hs
{-# LANGUAGE DataKinds #-} # LANGUAGE PatternSynonyms # {-# LANGUAGE ViewPatterns #-} #if PROFILE_CORESIZE {-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-} #endif #if PROFILE_TIMING {-# OPTIONS_GHC -ddump-to-file -ddump-timings #-} #endif module Experiment.PatternSynonym_Default.Siz...
null
https://raw.githubusercontent.com/well-typed/large-records/c6c2b51af11e90f30822543d7ce4d1cb28cee294/large-records-benchmarks/bench/experiments/Experiment/PatternSynonym_Default/Sized/R070.hs
haskell
# LANGUAGE DataKinds # # LANGUAGE ViewPatterns # # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl # # OPTIONS_GHC -ddump-to-file -ddump-timings #
# LANGUAGE PatternSynonyms # #if PROFILE_CORESIZE #endif #if PROFILE_TIMING #endif module Experiment.PatternSynonym_Default.Sized.R070 where import Bench.Types data R viewR :: R -> ( (T 00, T 01, T 02, T 03, T 04, T 05, T 06, T 07, T 08, T 09) , (T 10, T 11, T 12, T 13, T 14, T 15, T 16, T 17, T 18, T 19...
53756283eb296d50c51d89efb484deab0543b87036c8bf095e260002c4a64355
ekmett/algebra
Class.hs
module Numeric.Algebra.Distinguished.Class ( Distinguished(..) ) where import Numeric.Covector -- a basis with a distinguished point class Distinguished t where e :: t instance Distinguished a => Distinguished (Covector r a) where e = return e
null
https://raw.githubusercontent.com/ekmett/algebra/12dd33e848f406dd53d19b69b4f14c93ba6e352b/src/Numeric/Algebra/Distinguished/Class.hs
haskell
a basis with a distinguished point
module Numeric.Algebra.Distinguished.Class ( Distinguished(..) ) where import Numeric.Covector class Distinguished t where e :: t instance Distinguished a => Distinguished (Covector r a) where e = return e
9be5aaf9ef24bf4511be4b1cc11fb17b234d35534345e507e0e659fe5596a62a
music-suite/music-suite
Dynamic.hs
------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------- -- | Copyright : ( c ) 2012 - 2014 -- -- License : BSD-style -- Maintainer : -- Stability : experimental Portability : non - p...
null
https://raw.githubusercontent.com/music-suite/music-suite/7f01fd62334c66418043b7a2d662af127f98685d/src/Music/Notation/Standard/Dynamic.hs
haskell
----------------------------------------------------------------------------------- ----------------------------------------------------------------------------------- | License : BSD-style Stability : experimental * Utility () Given a dynamic value and its context, decide: 1) Whether we should begin ...
Copyright : ( c ) 2012 - 2014 Maintainer : Portability : non - portable ( TF , ) module Music.Notation.Standard.Dynamic ( CrescDim (..), DynamicNotation (..), crescDim, dynamicLevel, notateDynamic, removeCloseDynMarks, ) where import Data.AffineSpace import Data.Functor.Contex...
b95588458fc442be2d0e30fd5e1fd500a0bd4baa335ec41b40f550d6064100fc
skanev/playground
77.scm
SICP exercise 3.77 ; ; The integral procedure used above was analogous to the "implicit" definition of the infinite stream of integers in section 3.5.2 . Alternatively , we can ; give a definition of integral that is more like integres-strating-from (also in section 3.5.2 ): ; ; (define (integral integrand init...
null
https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/77.scm
scheme
The integral procedure used above was analogous to the "implicit" definition give a definition of integral that is more like integres-strating-from (also (define (integral integrand initial-value dt) (cons-stream initial-value (if (stream-null? integrand) the-empty-st...
SICP exercise 3.77 of the infinite stream of integers in section 3.5.2 . Alternatively , we can in section 3.5.2 ): (define (integral delayed-integrand initial-value dt) (cons-stream initial-value (if (stream-null? delayed-integrand) the-empty-stream (let (...
b85af43c95b7c590cbdd710674acb62a17abc38f5f304b7f233a6f79caafbf51
jimrthy/frereth
main.clj
(ns backend.main (:require [integrant.core :as ig] integrant.repl) (:gen-class)) (defn init ([] (init nil)) ([opts] (require 'backend.system) ((resolve 'backend.system/ctor) opts))) (defn setup-app! [opts] (integrant.repl/set-prep! #(init opts))) (defn -main [& args] ;; FIXME: Use a lib...
null
https://raw.githubusercontent.com/jimrthy/frereth/e1c4a5c031355ff1ff3bb60741eb03dff2377e1d/apps/log-viewer/src/clj/backend/main.clj
clojure
FIXME: Use a library like environ that pulls the configuration from the environment
(ns backend.main (:require [integrant.core :as ig] integrant.repl) (:gen-class)) (defn init ([] (init nil)) ([opts] (require 'backend.system) ((resolve 'backend.system/ctor) opts))) (defn setup-app! [opts] (integrant.repl/set-prep! #(init opts))) (defn -main [& args] (setup-app! {}) (...
cf4354364a031aa586f3c22f75eb133332d146a79dd5164962b22c8e853acf96
Practical-Formal-Methods/adiff
SearchDef.hs
-- Simple example demonstrating the syntax - semantic interplay: search and print definitions module Main where import System.Environment import Control.Arrow import Control.Monad import Control.Applicative import qualified Data.Map as Map import Language.C -- simple API import Language.C.Analysis -- ...
null
https://raw.githubusercontent.com/Practical-Formal-Methods/adiff/c18872faf3e31572437686d766f9972e00274588/language-c-extensible/examples/SearchDef.hs
haskell
Simple example demonstrating the syntax - semantic interplay: search and print definitions simple API analysis API preprocessor used get cpp options and input file parse
module Main where import System.Environment import Control.Arrow import Control.Monad import Control.Applicative import qualified Data.Map as Map main :: IO () main = do let usage = error "Example Usage: ./ShowDef '((struct|union|enum) tagname|typename|objectname)' -I/usr/include my_file.c" args <- getArgs ...
27ac9f1b79f49f8caedfb7bd161f6031e2f35c05aef0bc3cac89a649f6fa1965
mirage/irmin
import.ml
* Copyright ( c ) 2019 - 2021 < > * Copyright ( c ) 2018 - 2022 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . ...
null
https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin/import.ml
ocaml
* @closed * @closed For compatibility with versions older than ocaml.4.11.0 [list_insert l 0 v] is [v :: l] * @closed For compatibility with versions older than ocaml.4.11.0
* Copyright ( c ) 2019 - 2021 < > * Copyright ( c ) 2018 - 2022 Tarides < > * * Permission to use , copy , modify , and distribute this software for any * purpose with or without fee is hereby granted , provided that the above * copyright notice and this permission notice appear in all copies . ...
51b29b5a8091742dd1a9d0c59609124e7e3b40abd6c7d8f2a81c7c295eb1fc4c
exercism/erlang
leap_tests.erl
Generated with ' v0.2.0 ' %% Revision 1 of the exercises generator was used %% -specifications/raw/a2c75d2e71c6a2efa1ce3d756292cc89d811136c/exercises/leap/canonical-data.json %% This file is automatically generated from the exercises canonical data. -module(leap_tests). -include_lib("erl_exercism/include/exercism....
null
https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/leap/test/leap_tests.erl
erlang
Revision 1 of the exercises generator was used -specifications/raw/a2c75d2e71c6a2efa1ce3d756292cc89d811136c/exercises/leap/canonical-data.json This file is automatically generated from the exercises canonical data.
Generated with ' v0.2.0 ' -module(leap_tests). -include_lib("erl_exercism/include/exercism.hrl"). -include_lib("eunit/include/eunit.hrl"). '1_year_not_divisible_by_4_in_common_year_test_'() -> {"year not divisible by 4 in common year", ?_assertNot(leap:leap_year(2015))}. '2_year_divisible_by_2_not_di...
a400e372bc439abd655c0999b890c24c678f56bb0a0dc036344890d348ed8987
soegaard/metapict
svg-path.rkt
#lang racket/base ;;; ;;; SVG Paths ;;; ;; The SVG path parser returns an s-expression representation of the SVG path. ;; The function `svg-path->paths` will convert this represenration into a list ;; of dc-path% instances. These paths can be drawn using the `draw-path` method ;; of a drawing context. A dc - path%...
null
https://raw.githubusercontent.com/soegaard/metapict/e2a10be413b0465371e79cc2d0b5941b4c628bcf/metapict/svg/svg-path.rkt
racket
SVG Paths The SVG path parser returns an s-expression representation of the SVG path. The function `svg-path->paths` will convert this represenration into a list of dc-path% instances. These paths can be drawn using the `draw-path` method of a drawing context. The method `move-to` thus closes the current curve...
#lang racket/base A dc - path% contains zero or more closed curves and possibly one open curve . (require "elliptical-arc.rkt" "svg-path-lexer-and-parser.rkt") (provide parse-svg-path svg-path->paths) (require racket/gui) (define (svg-path->paths p) (define dc-paths '()) (define dc-path (n...
c1c56f937c8ed19201ed7f5932e8e0159cc69434e2ec3d99c66f71ed49fb3564
cognitect-labs/pedestal.views
server.clj
(ns sample.server for -main method in uberjar (:require [io.pedestal.http :as server] [io.pedestal.http.route :as route] [sample.service :as service])) ;; This is an adapted service map, that can be started and stopped ;; From the REPL you can call server/start and server/stop on this servi...
null
https://raw.githubusercontent.com/cognitect-labs/pedestal.views/2e581d69ad7344f3859bebc7cab0ea5bcdfa0099/samples/basic/src/sample/server.clj
clojure
This is an adapted service map, that can be started and stopped From the REPL you can call server/start and server/stop on this service start with production configuration do not block thread that starts web server Routes can be a function that resolve routes, we can use this to set the routes to be reloadable ...
(ns sample.server for -main method in uberjar (:require [io.pedestal.http :as server] [io.pedestal.http.route :as route] [sample.service :as service])) (defonce runnable-service (server/create-server service/service)) (defn run-dev "The entry-point for 'lein run-dev'" [& args] (print...
9cbd254bc898ab7442c757cdd046e9ec177f3f5a7e52db3487bca36aa3064cc5
McParen/croatoan
ansi.lisp
(in-package :de.anvi.ansi-escape) Basic terminal control functions based on 7bit escape sequences according to ANSI X3.64 / ECMA 48 / ISO / IEC 6429 / VT10X / XTerm ECMA-6 : 7bit character set 0 - 127 ;; ECMA-35: Bit notation 01/07 ;; ECMA-48: ANSI escape sequences 1 - char 7bit controls C0 1 - char 8bit c...
null
https://raw.githubusercontent.com/McParen/croatoan/5f8a198f689970439b9b00c8170e1446f84c949a/ansi/ansi.lisp
lisp
ECMA-35: Bit notation 01/07 ECMA-48: ANSI escape sequences escape sequences Acronym Character Decimal Octal Hexadecimal Code code x/y = column/line x/y: x y Bit: 7 6 5 4 3 2 1 add windows as gray streams Pn2 H Pn2 H m H cursor-position TODO 200530 write csi in terms of esc? no because CSI...
(in-package :de.anvi.ansi-escape) Basic terminal control functions based on 7bit escape sequences according to ANSI X3.64 / ECMA 48 / ISO / IEC 6429 / VT10X / XTerm ECMA-6 : 7bit character set 0 - 127 1 - char 7bit controls C0 1 - char 8bit controls C1 7bit CSI sequences 8bit CSI sequences DEL ...
1df483071386cef0bd8de601d240aa789169e4e3b5539d6e1f1cbc977ca1084a
ghollisjr/cl-ana
package.lisp
cl - ana is a Common Lisp data analysis library . Copyright 2013 , 2014 Copyright 2019 ;;;; This file is part of cl - ana . ;;;; ;;;; cl-ana is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation , eit...
null
https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/table-utils/package.lisp
lisp
cl-ana is free software: you can redistribute it and/or modify it (at your option) any later version. cl-ana 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 General Public Lice...
cl - ana is a Common Lisp data analysis library . Copyright 2013 , 2014 Copyright 2019 This file is part of cl - ana . under the terms of the GNU General Public License as published by the Free Software Foundation , either version 3 of the License , or You should have received a copy of the GNU Gene...
b8d47dbb6ed0a8dcc16b018b720a796039df24234e4581517d22936f8152d961
sgbj/MaximaSharp
sloop.lisp
(in-package :cl-sloop) (defmacro sloop (&rest body) (warn (intl:gettext "Using deprecated macro 'sloop'. Use 'loop' instead.")) `(loop ,@body))
null
https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/sloop.lisp
lisp
(in-package :cl-sloop) (defmacro sloop (&rest body) (warn (intl:gettext "Using deprecated macro 'sloop'. Use 'loop' instead.")) `(loop ,@body))
c6a9ccd6fd51c1d9e4ddb7ee1e79fb76198b13893c0483c59d7172957d6ba094
Convex-Dev/convex-web
explorer.cljs
(ns convex-web.site.explorer (:require [cljs.spec.alpha :as s] [reitit.frontend.easy :as rfe] [reagent.core :as reagent] [convex-web.site.runtime :as runtime] [convex-web.site.backend :as backend] [convex-web.site.gui :as gui] [convex-web.site.gui.sandbox :as guis] [convex-web.site.gui.accou...
null
https://raw.githubusercontent.com/Convex-Dev/convex-web/8fc63b838c3ab925be02a7f312dff8d8204396ee/src/main/clojure/convex_web/site/explorer.cljs
clojure
Add index to Transaction Header ====================== -- Block -- TR# -- Signer -- Timestamp -- Type -- Sequence Number -- Status Source ====================== Result ====================== ====================== Query Block if result is lazy. Blocks in the Explorer are lazy, but a Block in the Block...
(ns convex-web.site.explorer (:require [cljs.spec.alpha :as s] [reitit.frontend.easy :as rfe] [reagent.core :as reagent] [convex-web.site.runtime :as runtime] [convex-web.site.backend :as backend] [convex-web.site.gui :as gui] [convex-web.site.gui.sandbox :as guis] [convex-web.site.gui.accou...
4a00aa687d5e21a1937e4fe8e2e1e747321294507954478f6efb2322656723f8
DaveWM/lobster-writer
utils.cljs
(ns lobster-writer.utils (:require [lobster-writer.constants :as constants] [clojure.string :as s])) (defn current-essay-path [db] [:essays (:current-essay-id db)]) (defn next-step [step] (let [step-idx (.indexOf constants/steps step)] (get constants/steps (inc step-idx)))) (defn step-before-or...
null
https://raw.githubusercontent.com/DaveWM/lobster-writer/98eef942cc61725f0a2e00c34e6952c1e262f1ad/src/cljs/lobster_writer/utils.cljs
clojure
(ns lobster-writer.utils (:require [lobster-writer.constants :as constants] [clojure.string :as s])) (defn current-essay-path [db] [:essays (:current-essay-id db)]) (defn next-step [step] (let [step-idx (.indexOf constants/steps step)] (get constants/steps (inc step-idx)))) (defn step-before-or...
884a88e0d75448ae1c4904f616451c02d7bf5773c2c3a3545fb16e3b716cf636
tiancaiamao/yasfs
main.scm
(define thread-queue '()) (define halt #f) (define (void) (begin)) (define (current/cc) (call/cc (lambda (cc) cc))) (define (spawn thunk) (let ((cc (current/cc))) (if (procedure? cc) (set! thread-queue (append thread-queue (list cc))) (begin (thunk) (quit))))) (define (yield) (let ((cc (current/cc))) ...
null
https://raw.githubusercontent.com/tiancaiamao/yasfs/c138b7bf9a16ee70b90e5d18bdd45c60cd8e2f44/srfi-18/main.scm
scheme
(define thread-queue '()) (define halt #f) (define (void) (begin)) (define (current/cc) (call/cc (lambda (cc) cc))) (define (spawn thunk) (let ((cc (current/cc))) (if (procedure? cc) (set! thread-queue (append thread-queue (list cc))) (begin (thunk) (quit))))) (define (yield) (let ((cc (current/cc))) ...
f2daf3551e715502a605d73b4c235e1d10685f007d0a5158640176929704cc69
ekmett/reactive
Improving.hs
# LANGUAGE CPP , FlexibleInstances , MultiParamTypeClasses , ScopedTypeVariables # # OPTIONS_GHC -Wall # ---------------------------------------------------------------------- -- | Module : FRP.Reactive . Improving Copyright : ( c ) Conal Elliott 2008 -- License : GNU AGPLv3 (see COPYING) -- -- M...
null
https://raw.githubusercontent.com/ekmett/reactive/61b20b7a2e92af372b5bd9a2af294db0fbdfa9d8/src/FRP/Reactive/Improving.hs
haskell
-------------------------------------------------------------------- | License : GNU AGPLv3 (see COPYING) Maintainer : Stability : experimental Improving values -- efficient version -------------------------------------------------------------------- import Test.QuickCheck.Instances ---------------...
# LANGUAGE CPP , FlexibleInstances , MultiParamTypeClasses , ScopedTypeVariables # # OPTIONS_GHC -Wall # Module : FRP.Reactive . Improving Copyright : ( c ) Conal Elliott 2008 module FRP.Reactive.Improving ( Improving(..), exactly, before, after, minI, maxI #ifdef TEST , batch #endif ) where...
55cab03014132aa13dbf5fe2d9925c04129234dc29625af6f88030826b639fa4
conal/Fran
Types.hs
-- Sokoban types. module Types where import Array import Fran (Behavior, IntB, lift1) -- Board location: (column, row) Most of the Loc and stuff is swiped from Fifteen.hs Factor out -- into a common module somewhere. type Loc = (Int,Int) type LocB = Behavior Loc cols, rows :: Num a => a cols = 19...
null
https://raw.githubusercontent.com/conal/Fran/a113693cfab23f9ac9704cfee9c610c5edc13d9d/demos/NewSoko/Types.hs
haskell
Sokoban types. Board location: (column, row) into a common module somewhere. Level configuration Configuration for starting and save/load. Level number, pusher location, and box locations. The permanent aspects of the level are determined from the level number. Permanent features of a level. A fixed ...
module Types where import Array import Fran (Behavior, IntB, lift1) Most of the Loc and stuff is swiped from Fifteen.hs Factor out type Loc = (Int,Int) type LocB = Behavior Loc cols, rows :: Num a => a cols = 19; rows = 12 boundLoc :: (Loc, Loc) boundLoc = ((0, 0), (cols - 1, rows - 1)) data ...
a255afa51e553e8f75192a0b1f0e10f928109177943f2b3f7594af2b06625b35
andrei-dubovik/centrality
messages.lisp
Copyright ( c ) 2020 < > ;; Functions for inter-thread communication and for handling BitTorrent messages (in-package :centrality) (defgeneric call (object method &rest rest) (:documentation "A generic function for processing messages")) (defmacro match-prefix (((prefix test) &rest rest) form &body body) ...
null
https://raw.githubusercontent.com/andrei-dubovik/centrality/b2f86bc045fe3712b543ae28843127781ffee80f/src/messages.lisp
lisp
Functions for inter-thread communication and for handling TODO: make object explicit (so that tooltips are informative) Pool available Pool unavailable "send" and "recieve" are there for naming consistency
Copyright ( c ) 2020 < > BitTorrent messages (in-package :centrality) (defgeneric call (object method &rest rest) (:documentation "A generic function for processing messages")) (defmacro match-prefix (((prefix test) &rest rest) form &body body) "Destructuring-bind with a guard on the first element" `(d...
3d37a63e13f1352149a884c95eff247c4576fb27bb55ca0f400cdea0b0fde62c
xclerc/ocamljava
javaReferenceArray.mli
* This file is part of library . * Copyright ( C ) 2007 - 2015 . * * 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 version 3 of the License , or * ( at yo...
null
https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/library/javalib/src/javaReferenceArray.mli
ocaml
* Support for [pack.Class[]] and [prim[]...[]] types. * The type of arrays. * [length a] returns the length of [a]. @raise Java_exception if [a] is [null] * [get a i] returns the element at index [i] in [a]. @raise Java_exception if [a] is [null], or [i] is out of bounds * [set a i x] changes the element ...
* This file is part of library . * Copyright ( C ) 2007 - 2015 . * * 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 version 3 of the License , or * ( at yo...
2eefcfd3543ce4eb7e13bf61d7b167dfe8e71bb6739aa2ac2b6eebc4cd83cf54
kivra/mechanus_fsm
mechanus_action.erl
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright ( c ) 2015 Kivra %%% %%% Permission to use, copy, modify, and/or distribute this software for any %%% purpose with or without fee is hereby granted, provided that the above %%% copyright notice and this permission notice appear ...
null
https://raw.githubusercontent.com/kivra/mechanus_fsm/e7dfcd5d4b7d5d1843b746b76f9e11ad9dadaeec/src/mechanus_action.erl
erlang
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EV...
Copyright ( c ) 2015 Kivra THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN -module(mechanus_action). -callback perform(mechanus:data()) -...
485fcdf91c682a98d8ce43c36f6284a489a10609d78a9f060cc6fc4ad5bc5500
zotonic/zotonic
zotonic_listen_smtp_spam.erl
@author < > 2014 , 2011 Maximonster Interactive Things %% @doc Check spam score for received e-mail. Accept, bounce, drop or soft-error. Copyright 2011 Maximonster Interactive Things Copyright 2014 %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file e...
null
https://raw.githubusercontent.com/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_listen_smtp/src/zotonic_listen_smtp_spam.erl
erlang
@doc Check spam score for received e-mail. Accept, bounce, drop or soft-error. 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, eith...
@author < > 2014 , 2011 Maximonster Interactive Things Copyright 2011 Maximonster Interactive Things Copyright 2014 Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(zotonic_listen_smtp_spam). -author(...
2623d0018acd286516dace98010e791ab953ed851330c010d0b13bb9f1b81552
alt-romes/hegg
Monad.hs
# LANGUAGE TupleSections # | Monadic interface to e - graph stateful computations Monadic interface to e-graph stateful computations -} module Data.Equality.Graph.Monad ( egraph , represent , add , merge , rebuild , EG.canonicalize , EG.find , EG.emptyEGraph -- * E-graph stateful computat...
null
https://raw.githubusercontent.com/alt-romes/hegg/3ad7f8bc7e1d0a0b99d00c5485bfb4a0e1ca121a/src/Data/Equality/Graph/Monad.hs
haskell
* E-graph stateful computations * E-graph definition re-export * 'State' monad re-exports | E-graph stateful computation | Run EGraph computation on an empty e-graph === Example @ egraph $ do id1 <- represent t1 id2 <- represent t2 merge id1 id2 @ | Represent an expression (@Fix l@) in an e-graph by re...
# LANGUAGE TupleSections # | Monadic interface to e - graph stateful computations Monadic interface to e-graph stateful computations -} module Data.Equality.Graph.Monad ( egraph , represent , add , merge , rebuild , EG.canonicalize , EG.find , EG.emptyEGraph , EGraphM , runEGraphM , ...
00e7f5b8345c9b4b59a6db137635481d24f3f9cc64a20c7aa4475b062187c1c9
Shirakumo/kandria
save-v0.lisp
(in-package #:org.shirakumo.fraf.kandria) (defclass save-v0 (v0) ()) (defclass save-v1 (save-v0) ()) (defclass save-v1.1 (save-v1) ()) (defclass save-v1.2 (save-v1.1) ()) (defclass save-v1.3 (save-v1.2) ()) (defclass save-v1.4 (save-v1.3) ()) (defclass save-v1.5 (save-v1.4) ()) (defclass save-v2 (save-v1.5) ()) (defm...
null
https://raw.githubusercontent.com/Shirakumo/kandria/0eafe60b5f50c18980a6acc977dc45987e8e26c1/versions/save-v0.lisp
lisp
achieve the default changes from the quest definition. Typically from loading the initial state. Note: we want to avoid causing the on-activate trigger to fire here as its changes should already be reflected by the rest of the save-state. the list of interactions. Remove all entities that ar...
(in-package #:org.shirakumo.fraf.kandria) (defclass save-v0 (v0) ()) (defclass save-v1 (save-v0) ()) (defclass save-v1.1 (save-v1) ()) (defclass save-v1.2 (save-v1.1) ()) (defclass save-v1.3 (save-v1.2) ()) (defclass save-v1.4 (save-v1.3) ()) (defclass save-v1.5 (save-v1.4) ()) (defclass save-v2 (save-v1.5) ()) (defm...
c6b7a76010d45c6af603991abac8ccfe90685364f1028943996aee72a5679133
CloudI/CloudI
epgsql_command.erl
%%% @doc Behaviour module for epgsql_sock commands. %%% @end Copyright ( C ) 2017 - . All rights reserved . -module(epgsql_command). -export([init/2, execute/3, handle_message/5]). -export_type([command/0, state/0]). -type command() :: module(). -type state() :: any(). Initialize command 's state . Called w...
null
https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_epgsql/src/epgsql_command.erl
erlang
@doc Behaviour module for epgsql_sock commands. @end Execute command. It should send commands to socket. Do nothing; remember changed state It may be returned many times for eg, `squery' with multiple queries separated by ';' See epgsql_sock:get_results/1 Add new row to current resultset; See epgsql_sock:get_r...
Copyright ( C ) 2017 - . All rights reserved . -module(epgsql_command). -export([init/2, execute/3, handle_message/5]). -export_type([command/0, state/0]). -type command() :: module(). -type state() :: any(). Initialize command 's state . Called when command is received by epgsql_sock process . -callback in...
f293dc326afc190b7f2c5463130c08105c775a510fb33c3b27918dff7446a396
sionescu/iolib
grovel.lisp
;;;; -*- Mode: Lisp; indent-tabs-mode: nil -*- ;;; ;;; --- Grovelling for socket constants and types. ;;; Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2007 , < > Copyright ( C ) 2007 , ;;; ;;; Permission is hereby granted, free of charge, to any person...
null
https://raw.githubusercontent.com/sionescu/iolib/010b7a6bdd2e918ebf2ec85edd3853179f01cb30/src/sockets/grovel.lisp
lisp
-*- Mode: Lisp; indent-tabs-mode: nil -*- --- Grovelling for socket constants and types. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation restriction, including without limitation the rights to use, copy, modify, merge, publish, distribu...
Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2005 - 2006 , < > Copyright ( C ) 2007 , < > Copyright ( C ) 2007 , files ( the " Software " ) , to deal in the Software without of the Software , and to permit persons to whom the Software is included in all copies or substantial port...
040d6236b8fa7300b738fe5db38ee647bdad82676442c3e7c0cc23e37917dad5
realworldocaml/book
test_bigarrays.ml
* Copyright ( c ) 2013 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) module Std_array = Array type...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/ocaml-ctypes/tests/test-bigarrays/test_bigarrays.ml
ocaml
View ctypes-managed memory through a bigarray lens. Array1 Array2 Array3 View bigarray-managed memory through a ctypes lens Array1 Array2 Array3 array1 array2 genarray Test passing bigarrays to c functions. Test returning bigarrays from c functions. For the purposes of the tes...
* Copyright ( c ) 2013 . * * This file is distributed under the terms of the MIT License . * See the file LICENSE for details . * Copyright (c) 2013 Jeremy Yallop. * * This file is distributed under the terms of the MIT License. * See the file LICENSE for details. *) module Std_array = Array type...
920c7a787ea71826969aa671c66fb0be4a8d069d4bdb01f29c28faf7a6b21dc4
gebi/jungerl
eradius_acc.erl
-module(eradius_acc). %%%------------------------------------------------------------------- %%% File : eradius_acc.erl Author : < > %%% Desc : RADIUS accounting. Created : 9 Apr 2003 by < > %%% $ Id$ %%%------------------------------------------------------------------- -behaviour(gen_server). %...
null
https://raw.githubusercontent.com/gebi/jungerl/8f5c102295dbe903f47d79fd64714b7de17026ec/lib/eradius/src/eradius_acc.erl
erlang
------------------------------------------------------------------- File : eradius_acc.erl Desc : RADIUS accounting. ------------------------------------------------------------------- -------------------------------------------------------------------- Include files ------------------------------------------...
-module(eradius_acc). Author : < > Created : 9 Apr 2003 by < > $ Id$ -behaviour(gen_server). -include("eradius_lib.hrl"). -include_lib("kernel/include/inet.hrl"). -export([start_link/0, acc_on/1, acc_off/1, acc_start/1, acc_stop/1, validate_servers/1, start/0, set_user/2, set_nas_ip_address/...
e24dd334616f7bba98fa7a0631429eb594a3abcfdd3816bb1fe9e16614fa4970
GaloisInc/pate
MemoryDomain.hs
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # {-# LANGUAGE GADTs #-} # LANGUAGE MultiParamTypeClasses # {-# LANGUAGE RankNTypes #-} # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # # LANGUAGE TypeApplications # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE LambdaCase ...
null
https://raw.githubusercontent.com/GaloisInc/pate/6983c1ca27f8e8df312ec3a591b737d322c27838/src/Pate/Equivalence/MemoryDomain.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # # LANGUAGE OverloadedStrings # ------------------------------------------- Memory domain | This wrapper around a 'PMC.MemCellPred' describes ranges of memory covered by this domain. A memory domain is defined exclusively - all addresses are considered to be "in" the doma...
# LANGUAGE DataKinds # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE MultiParamTypeClasses # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeOperators # # LANGUAGE TypeApplications # # LANGUAGE LambdaCase # # LANGUAGE UndecidableInstances # module Pate.Equivalence.MemoryDomain ( Memory...
bdd744a7326f5317ce5662f6f2d2577c518327d1ff407fb342e67c5088e1dbed
GaloisInc/saw-script
PermParser.hs
{-# LANGUAGE GADTs #-} # LANGUAGE TypeOperators # # LANGUAGE KindSignatures # # LANGUAGE DataKinds # module Verifier.SAW.Heapster.PermParser ( parseFunPermString, parseParsedCtxString, parseCtxString, parseTypeString, parsePermsString, parseFunPermStringMaybeRust, parseAtomicPermsInCtxString, parsePer...
null
https://raw.githubusercontent.com/GaloisInc/saw-script/ec8a060fe397f81cc31903fe5fdbf8d941021fc8/heapster-saw/src/Verifier/SAW/Heapster/PermParser.hs
haskell
# LANGUAGE GADTs # -------------------------------------------------------------------- -------------------------------------------------------------------- which is intended to be used with 'Verifier.SAW.Heapster.Lexer.lexer' | Harness for running the lexer, parser, and type-checker. Human-readable errors are raise...
# LANGUAGE TypeOperators # # LANGUAGE KindSignatures # # LANGUAGE DataKinds # module Verifier.SAW.Heapster.PermParser ( parseFunPermString, parseParsedCtxString, parseCtxString, parseTypeString, parsePermsString, parseFunPermStringMaybeRust, parseAtomicPermsInCtxString, parsePermInCtxString, parseEx...
fe2556f9944ca3f099e135dd75ca8057c7708b0601a769927d37eb8076586d49
panda-planner-dev/ipc2020-domains
d-16.lisp
(defdomain domain ( (:operator (!epsilon) ;; preconditions ( ) ;; delete effects () ;; add effects () ) (:operator (!t1G1) ;; preconditions ( (turnA) ) ;; delete effects ((turnA)) ;; add effects ((turnB) (lt1)) ) (:operator (!t...
null
https://raw.githubusercontent.com/panda-planner-dev/ipc2020-domains/9adb54325d3df35907adc7115fcc65f0ce5953cc/partial-order/PCP/other/SHOP2/d-16.lisp
lisp
preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditions delete effects add effects preconditio...
(defdomain domain ( (:operator (!epsilon) ( ) () () ) (:operator (!t1G1) ( (turnA) ) ((turnA)) ((turnB) (lt1)) ) (:operator (!t2G1) ( (turnA) ) ((turnA)) ((turnB) (lt2)) ) (:operator (!t3G1) ( (turnA) ...
74e106f17e266656b992e1fb6ab1ccf5e5c851db95032bf743305f1e48b7fde1
erlang/otp
oc_statem.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2017 - 2022 . 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/erlang/otp/4162ca58e686921973174e3207ac5809f54a1867/lib/stdlib/test/gen_statem_SUITE_data/oc_statem.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 2017 - 2022 . 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(oc_statem). -behaviour(gen_statem). -export([start/1]). -export([init/1, callback_mode/0, handle_event/4])...
504dc70c7106cd243344f009ee0bf17cd63a9fadfdda418aec675ddb1cb3c385
purescript/purescript
Types.hs
-- | -- This module implements the type checker -- module Language.PureScript.TypeChecker.Types ( BindingGroupType(..) , typesOf , checkTypeKind ) where The following functions represent the corresponding type checking judgements : infer a type for a value check Check a value...
null
https://raw.githubusercontent.com/purescript/purescript/02bd6ae60bcd18cbfa892f268ef6359d84ed7c9b/src/Language/PureScript/TypeChecker/Types.hs
haskell
| This module implements the type checker | The result of a successful type check. | Convert an type checked value into an expression. | Lookup data about a type class in the @Environment@ | Infer the types of multiple mutually-recursive values, and return elaborated values including type class dictionaries and...
module Language.PureScript.TypeChecker.Types ( BindingGroupType(..) , typesOf , checkTypeKind ) where The following functions represent the corresponding type checking judgements : infer a type for a value check Check a value has a given type checkProperties Ch...
94fd95003937d58817e0820e69b090e694ad9ad80bce7be77041ce4f59fa77e5
chunsj/TH
pp-disaster.lisp
(defpackage :pp-disaster (:use #:common-lisp #:mu #:th #:th.pp)) (in-package :pp-disaster) ;; mining disaster problem (defparameter *disasters* (tensor '(4 5 4 0 1 4 3 4 0 6 3 3 4 0 2 6 3 3 5 4 5 3 1 4 4 1 5 5 3 4 2 5 ...
null
https://raw.githubusercontent.com/chunsj/TH/890f05ab81148d9fe558be3979c30c303b448480/examples/pp/pp-disaster.lisp
lisp
mining disaster problem fitting checking autocorrelation thinning
(defpackage :pp-disaster (:use #:common-lisp #:mu #:th #:th.pp)) (in-package :pp-disaster) (defparameter *disasters* (tensor '(4 5 4 0 1 4 3 4 0 6 3 3 4 0 2 6 3 3 5 4 5 3 1 4 4 1 5 5 3 4 2 5 2 2 3 4 2 1 3 2 ...
252e207c0ee8939fe8e09632fff9a5f85b4978b33117e4ce88eaecd561c160c1
BoeingX/haskell-programming-from-first-principles
Ciphers.hs
module AlgebraicDataTypes.ChapterExercises.Ciphers where import Data.List import Data.Char -- Repeat the keyword for as many characters as there are in the original message calculateCompanion :: String -> String -> String calculateCompanion message keyword = (snd . foldl' f (0, "")) message where len = length key...
null
https://raw.githubusercontent.com/BoeingX/haskell-programming-from-first-principles/ffb637f536597f552a4e4567fee848ed27f3ba74/src/AlgebraicDataTypes/ChapterExercises/Ciphers.hs
haskell
Repeat the keyword for as many characters as there are in the original message API
module AlgebraicDataTypes.ChapterExercises.Ciphers where import Data.List import Data.Char calculateCompanion :: String -> String -> String calculateCompanion message keyword = (snd . foldl' f (0, "")) message where len = length keyword f (i, s) c | c == ' ' = (i, s ++ " ") | oth...
b8d15878f96e8268a97cabad68b7758ec10d3243f2219c3f6dddcc31a2e8d5a4
incoherentsoftware/defect-process
RicochetGun.hs
module Configs.All.PlayerGun.RicochetGun ( RicochetGunConfig(..) ) where import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON) import GHC.Generics (Generic) import qualified Data.Map as M import qualified Data.Vector as V import Attack.Util import Player.Gun.FireDrawAngle import Player.Gun.FireD...
null
https://raw.githubusercontent.com/incoherentsoftware/defect-process/1549238a7eede1a60515f1afc26cbece63e479cd/src/Configs/All/PlayerGun/RicochetGun.hs
haskell
module Configs.All.PlayerGun.RicochetGun ( RicochetGunConfig(..) ) where import Data.Aeson.Types (FromJSON, genericParseJSON, parseJSON) import GHC.Generics (Generic) import qualified Data.Map as M import qualified Data.Vector as V import Attack.Util import Player.Gun.FireDrawAngle import Player.Gun.FireD...
00c7f0ce1e4cfd7a0f8d3fe2c3715d0cb58e3f70b6e4ae1ee013b991c60acb30
jyh/metaprl
nuprl_int_2.ml
extends Ma_quot_1 open Dtactic interactive nuprl_int_trichot : [wf] sequent { <H> >- '"i" in "int"[]{} } --> [wf] sequent { <H> >- '"j" in "int"[]{} } --> sequent { <H> >- "or"[]{"lt"[]{'"i";'"j"};"or"[]{"equal"[]{"int"[]{};'"i";'"j"};"gt"[]{'"i";'"j"}}} } interactive nuprl_le_transitivity '"j" : ...
null
https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/mesa/nuprl_int_2.ml
ocaml
*** display forms ***
extends Ma_quot_1 open Dtactic interactive nuprl_int_trichot : [wf] sequent { <H> >- '"i" in "int"[]{} } --> [wf] sequent { <H> >- '"j" in "int"[]{} } --> sequent { <H> >- "or"[]{"lt"[]{'"i";'"j"};"or"[]{"equal"[]{"int"[]{};'"i";'"j"};"gt"[]{'"i";'"j"}}} } interactive nuprl_le_transitivity '"j" : ...
e288caab4758108a9040b0ccef315ff80c835d60c0726e64b30d8ae243df8971
benedekfazekas/trin
find_used_locals_trin_poc_test.clj
(ns thomasa.find-used-locals-trin-poc-test (:require [clojure.test :as t] [thomasa.find-used-locals-trin-poc :as sut])) (t/deftest a-test (t/testing "I pass" (t/is (= 1 1))) (t/testing "depending on local trin" (t/is (= :foo (sut/foo :ignore))))) (def no-args-defn-with-let "(defn not-doing...
null
https://raw.githubusercontent.com/benedekfazekas/trin/95c8ac36226c4aea0e7f5abb238b9c7b149e1f29/find-used-locals-trin-poc/test/thomasa/find_used_locals_trin_poc_test.clj
clojure
remove parameters to run the tests
(ns thomasa.find-used-locals-trin-poc-test (:require [clojure.test :as t] [thomasa.find-used-locals-trin-poc :as sut])) (t/deftest a-test (t/testing "I pass" (t/is (= 1 1))) (t/testing "depending on local trin" (t/is (= :foo (sut/foo :ignore))))) (def no-args-defn-with-let "(defn not-doing...
692ac4efcce44f4de578caed3931e3243f4c16d23704d931f1209cb819b8c4ba
richhickey/clojure-contrib
error_kit.clj
Copyright ( c ) , Jan 2009 . All rights reserved . ; The use and distribution terms for this software are covered by the ; Eclipse Public License 1.0 (-1.0.php) ; which can be found in the file epl-v10.html at the root of this distribution. ; By using this software in any fashion, you are agreeing to be b...
null
https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/main/clojure/clojure/contrib/error_kit.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , Jan 2009 . All rights reserved . Please contact if you have any suggestions for better names (ns #^{:author "Chris Houser", :doc "EXPERIMENTAL System for defining and using custom errors Please contact Chouser if you have any suggestions for better names or API adjustments."} clo...
e25089366a7cc45671dada80cfe33f4755fb48a0e38ab5cde82e3285d3e2d734
composewell/streamly
File.hs
#include "inline.hs" -- | Module : Streamly . Internal . FileSystem . File Copyright : ( c ) 2019 Composewell Technologies -- -- License : BSD3 -- Maintainer : -- Stability : pre-release Portability : GHC -- -- Read and write streams and arrays to and from files specified by their paths -- in th...
null
https://raw.githubusercontent.com/composewell/streamly/7263d811534b62615e8d1ad8cc14cfa49abe8081/core/src/Streamly/Internal/FileSystem/File.hs
haskell
| License : BSD3 Maintainer : Stability : pre-release Read and write streams and arrays to and from files specified by their paths in the file system. Unlike the handle based APIs which can have a read/write session consisting of multiple reads and writes to the handle, these APIs the handle based API...
#include "inline.hs" Module : Streamly . Internal . FileSystem . File Copyright : ( c ) 2019 Composewell Technologies Portability : GHC are one shot read or write APIs . These APIs open the file handle , perform the requested operation and close the handle . Thease are safer compared to > import q...
ae707240438e93240c6d1db64fd45d28c5316a451c8c37320bfda723c1bc186e
psg-mit/marshall
print.ml
(* Fancy printing of expressions and errors. At the moment we just use the old routines for converting to strings. *) let fprintf = Format.fprintf let print ?(max_level=9999) ?(at_level=0) ppf = if max_level < at_level then begin Format.fprintf ppf "(@["; Format.kfprintf (fun ppf -> Format.fprin...
null
https://raw.githubusercontent.com/psg-mit/marshall/65f20ebe02ce71c306c4bb334d119d939f1afdf9/src/print.ml
ocaml
Fancy printing of expressions and errors. At the moment we just use the old routines for converting to strings.
let fprintf = Format.fprintf let print ?(max_level=9999) ?(at_level=0) ppf = if max_level < at_level then begin Format.fprintf ppf "(@["; Format.kfprintf (fun ppf -> Format.fprintf ppf "@])") ppf end else begin Format.fprintf ppf "@["; Format.kfprintf (fun ppf -> Format.fprintf...
0db554dbb928fd912d07717f0b7ab707dc1596fe92d4996f7e23908d7f37ba27
wdebeaum/step
winged.lisp
;;;; ;;;; W::WINGED ;;;; (define-words :pos W::n :words ( ((W::WINGED W::BEAN) (senses ((LF-PARENT ONT::BEANS-PEAS) (TEMPL COUNT-PRED-TEMPL) ) ) ) ))
null
https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/winged.lisp
lisp
W::WINGED
(define-words :pos W::n :words ( ((W::WINGED W::BEAN) (senses ((LF-PARENT ONT::BEANS-PEAS) (TEMPL COUNT-PRED-TEMPL) ) ) ) ))
d84772d076d0a3172b1aea359fe8e9ad648e97ef2ac6aabef489f3957c5d333c
tonymorris/fp-course
Chat.hs
module Network.Server.Chat.Chat where import Network.Server.Common.Line import Network.Server.Chat.Loop import Data.Maybe(fromMaybe) import Data.Foldable(msum) import Data.IORef(atomicModifyIORef) import Control.Applicative((<$), (<$>)) import Control.Monad.Trans(MonadIO(..)) type Chat a = IORefLoop Integer a data...
null
https://raw.githubusercontent.com/tonymorris/fp-course/73a64c3d4d0df58654a1a9a0ee9d9b11c3818911/projects/NetworkServer/haskell/src/Network/Server/Chat/Chat.hs
haskell
| >>> chatCommand "CHAT hi" Chat "hi" >>> chatCommand "Chat bye" Chat "bye" >>> chatCommand "Nothing" UNKNOWN "Nothing"
module Network.Server.Chat.Chat where import Network.Server.Common.Line import Network.Server.Chat.Loop import Data.Maybe(fromMaybe) import Data.Foldable(msum) import Data.IORef(atomicModifyIORef) import Control.Applicative((<$), (<$>)) import Control.Monad.Trans(MonadIO(..)) type Chat a = IORefLoop Integer a data...
19bf670b71210298c6b437bcd621be8b48896e9afd0d4398a66c7a459b6d4bb5
Gbury/archsat
ext_logic.ml
This file is free software , part of Archsat . See file " LICENSE " for more details . let section = Section.make ~parent:Dispatcher.section "logic" (* Module aliases & initialization *) (* ************************************************************************ *) module H = Hashtbl.Make(Expr.Formula) type info ...
null
https://raw.githubusercontent.com/Gbury/archsat/322fbefa4a58023ddafb3fa1a51f8199c25cde3d/src/core/ext_logic.ml
ocaml
Module aliases & initialization ************************************************************************ Small wrappers ************************************************************************ clause is trivially true clause is trivially true Main function ************************************************...
This file is free software , part of Archsat . See file " LICENSE " for more details . let section = Section.make ~parent:Dispatcher.section "logic" module H = Hashtbl.Make(Expr.Formula) type info = | True | And of Expr.formula * Expr.formula | Not_or of Expr.formula * Expr.formula | Or of Expr.formula ...
985fb0ca34a202622dfd3db2f15d485d7a5086b20fbe6c50dd00a06465ea7411
Shirakumo/kandria
menu.lisp
(in-package #:org.shirakumo.fraf.kandria) (defclass menu-layout (alloy:border-layout alloy:renderable) ()) (presentations:define-realization (ui menu-layout) ((:bg simple:rectangle) (alloy:margins) :pattern (colored:color 0.15 0.15 0.15 0.5))) (defmethod alloy:handle ((ev alloy:pointer-event) (focus menu-l...
null
https://raw.githubusercontent.com/Shirakumo/kandria/5bde3e568967063a37341454a70d0424ffff0484/ui/menu.lisp
lisp
(in-package #:org.shirakumo.fraf.kandria) (defclass menu-layout (alloy:border-layout alloy:renderable) ()) (presentations:define-realization (ui menu-layout) ((:bg simple:rectangle) (alloy:margins) :pattern (colored:color 0.15 0.15 0.15 0.5))) (defmethod alloy:handle ((ev alloy:pointer-event) (focus menu-l...
0628f5d2e8db61e41b507059c4482b2c259b6208d314bf6bbb5424a661f7277a
EFanZh/EOPL-Exercises
exercise-4.x-explicit-refs-lang.rkt
#lang eopl ;; Grammar. (define the-lexical-spec '([whitespace (whitespace) skip] [comment ("%" (arbno (not #\newline))) skip] [identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol] [number (digit (arbno digit)) number] [number ("-" digit (arbno digit)) number])) (define the-grammar '(...
null
https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-4.x-explicit-refs-lang.rkt
racket
Grammar. Data structures. Environments. Store. Interpreter.
#lang eopl (define the-lexical-spec '([whitespace (whitespace) skip] [comment ("%" (arbno (not #\newline))) skip] [identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol] [number (digit (arbno digit)) number] [number ("-" digit (arbno digit)) number])) (define the-grammar '([program (ex...
c511052d1b9b3674bcbe90879eff0e79346f9d2284134c9f02f664bcfdaba36c
geoffder/dometyl-keyboard
plate.mli
(** Switch plate generation. *) open OCADml open OSCADml * Provides per - column lookup functions to be used by { ! : make } for placement of { ! Key.t}s to form { ! Column.t}s , and for arrangment and orientation of the generated columns to form the plate . {!Key.t}s to form {!Column.t}s, and for ar...
null
https://raw.githubusercontent.com/geoffder/dometyl-keyboard/5efa847361e0ceb80de5b03dd28a702d6b42412d/lib/plate.mli
ocaml
* Switch plate generation. * Record containing the column generation and placement functions. When each column is being generated (and placed) its index will be given to the lookup functions here to get the relevant settings. * Translation of columns following default spacing and tenting. * Distribution ...
open OCADml open OSCADml * Provides per - column lookup functions to be used by { ! : make } for placement of { ! Key.t}s to form { ! Column.t}s , and for arrangment and orientation of the generated columns to form the plate . {!Key.t}s to form {!Column.t}s, and for arrangment and orientation of the ...
7687e60f8a0df8659a10c3ad6bac80c4b00872f87ae3105408d0fb06c5bfe73c
orbitz/web_typed
ort_prelude.mli
module Result : sig include module type of Core.Result val lift : (unit -> 'a) -> ('a, exn) t val bind : ('a, 'b) t -> ('a -> ('c, 'b) t) -> ('c, 'b) t val return : 'a -> ('a, _) t end val (|>) : 'a -> ('a -> 'b) -> 'b val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c val string_of_list : char list -> string
null
https://raw.githubusercontent.com/orbitz/web_typed/e224c1be6a2d4fd0013ff9cdb27075c145a4b77e/libs/ort_prelude/ort_prelude.mli
ocaml
module Result : sig include module type of Core.Result val lift : (unit -> 'a) -> ('a, exn) t val bind : ('a, 'b) t -> ('a -> ('c, 'b) t) -> ('c, 'b) t val return : 'a -> ('a, _) t end val (|>) : 'a -> ('a -> 'b) -> 'b val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c val string_of_list : char list -> string
9e5dc30a82e8624337c2789f4dac99ae6d696423fb78ea64e39d1381bab6b567
soegaard/sketching
time-and-date.rkt
#lang racket/base (require racket/date "parameters.rkt") (provide year month day hour minute second millis) the year (define now (current-date)) (date-year now)) month in the year from 1 to 12 (define now (current-date)) (date-month now)) day in the month , from 1 to 31 (define now...
null
https://raw.githubusercontent.com/soegaard/sketching/3773cb790ac69201c967201a2fa1727d90a4ad62/sketching-lib/sketching/time-and-date.rkt
racket
#lang racket/base (require racket/date "parameters.rkt") (provide year month day hour minute second millis) the year (define now (current-date)) (date-year now)) month in the year from 1 to 12 (define now (current-date)) (date-month now)) day in the month , from 1 to 31 (define now...
f16d7a9c2cc9e4fab122622a04b5daa26c5843d4f8a895fc6edcbbfd164963d7
openmusic-project/openmusic
iconview.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 ...
null
https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/kernel/graphics/icons/iconview.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 ...
b6d54c3877679f2adb751c0ff46d4b3661cc38c2c4d46c1618b9338abf0d4c87
input-output-hk/marlowe-cardano
Types.hs
----------------------------------------------------------------------------- -- -- Module : $Headers License : Apache 2.0 -- -- Stability : Experimental Portability : Portable -- | Types for the CLI tool . -- ----------------------------------------------------------------------------- # LAN...
null
https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/4b652fbaeafdea9a6b499a695db86e621813a23f/marlowe-cli/src/Language/Marlowe/CLI/Types.hs
haskell
--------------------------------------------------------------------------- Module : $Headers Stability : Experimental --------------------------------------------------------------------------- # LANGUAGE DeriveAnyClass # # LANGUAGE GADTs # # LANGUAGE OverloadedStrings # # LANGUAGE RankNTypes # * eUTxO...
License : Apache 2.0 Portability : Portable | Types for the CLI tool . # LANGUAGE BlockArguments # # LANGUAGE DerivingStrategies # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE R...
75e1759a1b84977688b5ad06b98f66fec79527f38eb69ff825de916d5edba080
mfikes/fifth-postulate
ns461.cljs
(ns fifth-postulate.ns461) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
null
https://raw.githubusercontent.com/mfikes/fifth-postulate/22cfd5f8c2b4a2dead1c15a96295bfeb4dba235e/src/fifth_postulate/ns461.cljs
clojure
(ns fifth-postulate.ns461) (defn solve-for01 [xs v] (for [ndx0 (range 0 (- (count xs) 3)) ndx1 (range (inc ndx0) (- (count xs) 2)) ndx2 (range (inc ndx1) (- (count xs) 1)) ndx3 (range (inc ndx2) (count xs)) :when (= v (+ (xs ndx0) (xs ndx1) (xs ndx2) (xs ndx3)))] (list (x...
3a84542c4b4c54a8ef9221e08c62bb6b26474ec4650228861f82fef9928ab3de
alanz/ghc-exactprint
Records2.hs
module Records where data Record = Record { rOne :: Int , rTwo :: String } defR :: Record defR = Record 1 "record" main :: IO () main = do print $ defR { rOne = 42 + 12 } print $ Record { rTwo = "foo" ++ "foo" }
null
https://raw.githubusercontent.com/alanz/ghc-exactprint/309efa8689e1ce2407523ba2ebe058b97757ba8b/tests/examples/ghc92/Records2.hs
haskell
module Records where data Record = Record { rOne :: Int , rTwo :: String } defR :: Record defR = Record 1 "record" main :: IO () main = do print $ defR { rOne = 42 + 12 } print $ Record { rTwo = "foo" ++ "foo" }
184e516870b618dc859520d39ee1a7e00c089252531629f645a5aef2fee42294
xclerc/ocamljava
bytecodegen_size.mli
* This file is part of compiler . * Copyright ( C ) 2007 - 2015 . * * compiler is free software ; you can redistribute it and/or modify * it under the terms of the Q Public License as published by * ( with a change to choice of law ) . * * compiler is distributed in the hope that it ...
null
https://raw.githubusercontent.com/xclerc/ocamljava/8330bfdfd01d0c348f2ba2f0f23d8f5a8f6015b1/compiler/javacomp/bytecodegen_size.mli
ocaml
* Utilities for size optimization.
* This file is part of compiler . * Copyright ( C ) 2007 - 2015 . * * compiler is free software ; you can redistribute it and/or modify * it under the terms of the Q Public License as published by * ( with a change to choice of law ) . * * compiler is distributed in the hope that it ...
5d0c62ee9a87848bca6b30e01b4c5dc7a78294367214738a44d014f4484bf915
arianvp/haskell-fido2
Main.hs
# LANGUAGE BlockArguments # # LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedLists # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Main ( main, ) where import Control.Concurrent.STM (TVar) import qualified Control.Concurrent.STM as STM import Control.Monad (when)...
null
https://raw.githubusercontent.com/arianvp/haskell-fido2/d6181dbe427769573166085e27ea0beba2c5d316/server/Main.hs
haskell
Generate a new session for the current user and expose it as a @SetCookie@. Does not work on localhost: the browser doesn't send any cookies to a non-TLS version of localhost. TODO: Use mkcert to get a HTTPS setup for localhost. , Cookie.setCookieSecure = True for the headers. The API does not expose this, so her...
# LANGUAGE BlockArguments # # LANGUAGE DeriveGeneric # # LANGUAGE NamedFieldPuns # # LANGUAGE OverloadedLists # # LANGUAGE ScopedTypeVariables # # LANGUAGE TypeApplications # module Main ( main, ) where import Control.Concurrent.STM (TVar) import qualified Control.Concurrent.STM as STM import Control.Monad (when)...
9470cb8ffc5920de0fb9a8667704f53e011d6007daf0220d3c0b7d84601548ae
cblp/crdt
ORSet.hs
# OPTIONS_GHC -Wno - missing - signatures # # LANGUAGE FlexibleContexts # # LANGUAGE PatternSynonyms # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Cm.ORSet where import Control.Monad.State.Strict (evalStateT) import qualified Data.MultiMap as MultiMap import Test.QuickCheck (co...
null
https://raw.githubusercontent.com/cblp/crdt/175d7ee7df66de1f013ee167ac31719752e0c20b/crdt-test/test/Cm/ORSet.hs
haskell
# OPTIONS_GHC -Wno - missing - signatures # # LANGUAGE FlexibleContexts # # LANGUAGE PatternSynonyms # # LANGUAGE TypeApplications # # LANGUAGE TypeFamilies # module Cm.ORSet where import Control.Monad.State.Strict (evalStateT) import qualified Data.MultiMap as MultiMap import Test.QuickCheck (co...
c3df553a1e0d8f216c4ee4324cca7bb44833d4f93a78f744ebb33b187b5304bc
mathematical-systems/clml
dlas2.lisp
;;; Compiled by f2cl version: ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ " " $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 " " $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ " " $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ " " $ I d : f2cl5.l , v 1.197 2008/09/11 15:0...
null
https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/lapack/dlas2.lisp
lisp
Compiled by f2cl version: Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t) (:coerce-assigns :as-needed) (:array-type ':array) (:array-slicing t) (:declare-common nil) (:float-format double-float))
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ " " $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 " " $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ " " $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ " " $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ " " $ I d :...
052fe61f240593cc50b2f20a1b55c8e202260cfdee458a5348ee9fffa7f56656
camfort/fortran-src
Fortran66Spec.hs
module Language.Fortran.Parser.Fixed.Fortran66Spec ( spec ) where import Test.Hspec import TestUtil import Language.Fortran.AST import Language.Fortran.Version import Language.Fortran.Parser import Language.Fortran.Parser.Monad ( Parse ) import qualified Language.Fortran.Parser.Fixed.Fortran66 as F66 import qualified...
null
https://raw.githubusercontent.com/camfort/fortran-src/9229338d6b09a724d38e46bd852f76fe3329d64f/test/Language/Fortran/Parser/Fixed/Fortran66Spec.hs
haskell
module Language.Fortran.Parser.Fixed.Fortran66Spec ( spec ) where import Test.Hspec import TestUtil import Language.Fortran.AST import Language.Fortran.Version import Language.Fortran.Parser import Language.Fortran.Parser.Monad ( Parse ) import qualified Language.Fortran.Parser.Fixed.Fortran66 as F66 import qualified...
072f3f49f144020676e8856045d0b710e41e1a8868a6e4daee159ea54162eef9
Apress/common-lisp-condition-system
1am.lisp
t/1am.lisp (in-package #:portable-condition-system/test) (defvar *tests* nil) (defvar *pass-count* nil) (defvar *running* nil) (defun report (test-count pass-count) (format t "~&~S test~:p, ~S check~:p.~%" test-count pass-count)) (defun %run (fn test-count) (let ((*pass-count* 0)) (multiple-value-prog1 (f...
null
https://raw.githubusercontent.com/Apress/common-lisp-condition-system/7f4533e20d6397a59ca5bbfdc139b3389a135c34/Sources%20-%20PCS/t/1am.lisp
lisp
Checks done outside a test run are not tallied.
t/1am.lisp (in-package #:portable-condition-system/test) (defvar *tests* nil) (defvar *pass-count* nil) (defvar *running* nil) (defun report (test-count pass-count) (format t "~&~S test~:p, ~S check~:p.~%" test-count pass-count)) (defun %run (fn test-count) (let ((*pass-count* 0)) (multiple-value-prog1 (f...
17978ddbc7129a551b0afea109379aaf4e41c60b8bdf438f932a0051e0d84f31
adbrowne/dynamodb-eventstore
InMemoryDynamoTable.hs
# LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # module DynamoDbEventStore.InMemoryDynamoTable (InMemoryDynamoTable , emptyDynamoTable , readDb , writeDb , updateDb , queryDb , scanNeedsPagingDb ) where import BasicPrelude import Control.Lens import qualified Data.HashMap....
null
https://raw.githubusercontent.com/adbrowne/dynamodb-eventstore/e3c16976582bf7727091a718d794662565f41280/dynamodb-eventstore/tests/DynamoDbEventStore/InMemoryDynamoTable.hs
haskell
# LANGUAGE RecordWildCards # # LANGUAGE TemplateHaskell # module DynamoDbEventStore.InMemoryDynamoTable (InMemoryDynamoTable , emptyDynamoTable , readDb , writeDb , updateDb , queryDb , scanNeedsPagingDb ) where import BasicPrelude import Control.Lens import qualified Data.HashMap....
4d7edbe572f808886fca674b3e2a6bea8c5726e447ef525331685fe081eb60aa
kmyokoyama/nsclojure
core_test.clj
(ns nsclojure.core-test (:require [clojure.test :refer :all] [nsclojure.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
null
https://raw.githubusercontent.com/kmyokoyama/nsclojure/7cbc8c395cf641ec9a54ba752b1596660c1a659c/test/nsclojure/core_test.clj
clojure
(ns nsclojure.core-test (:require [clojure.test :refer :all] [nsclojure.core :refer :all])) (deftest a-test (testing "FIXME, I fail." (is (= 0 1))))
e72eaf2fbcef82538c3d1f77b3be5971655fc581be4f4667649a576e6155a1fa
gsakkas/rite
20060321-17:41:14-5ad417e97b8ab19fbfb89db95c99c846.seminal.ml
type exp = Int of int | Var of string | Plus of exp * exp | Times of exp * exp type stmt = Skip | Assign of string * exp | Seq of stmt * stmt | If of exp * stmt * stmt | While of exp * stmt | SaveHeap of string | RestoreHeap of string type heap = heap_el...
null
https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/features/data/seminal/20060321-17%3A41%3A14-5ad417e97b8ab19fbfb89db95c99c846.seminal.ml
ocaml
type exp = Int of int | Var of string | Plus of exp * exp | Times of exp * exp type stmt = Skip | Assign of string * exp | Seq of stmt * stmt | If of exp * stmt * stmt | While of exp * stmt | SaveHeap of string | RestoreHeap of string type heap = heap_el...
a65dc0d19d0f2f86a037a1c6fcb5faf94b75eaadd1c05a6ebae8334b2378b484
pauleve/pint
debug.ml
Copyright or © or Copr . , Morgan Magnin , ( 2010 ) This software is a computer program whose purpose is to provide Process Hitting related tools . This software is governed by the CeCILL license under French law and abiding by the rules of distribution of free software . You can use , m...
null
https://raw.githubusercontent.com/pauleve/pint/7cf943ec60afcf285c368950925fd45f59f66f4a/pintlib/debug.ml
ocaml
Copyright or © or Copr . , Morgan Magnin , ( 2010 ) This software is a computer program whose purpose is to provide Process Hitting related tools . This software is governed by the CeCILL license under French law and abiding by the rules of distribution of free software . You can use , m...
9452e768353630d054f8e05be5dfd7bc141126691b57386a4e1417971cc572df
priestjim/gen_rpc
gen_rpc_client_sup.erl
-*-mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et : %%% Copyright 2015 . All Rights Reserved . %%% -module(gen_rpc_client_sup). -author("Panagiotis Papadomitsos <>"). %%% Behaviour -behaviour(supervisor). Include the HUT lib...
null
https://raw.githubusercontent.com/priestjim/gen_rpc/6e17cac4e886f36ecb35bbda91e6bb3293aaa723/src/supervisor/gen_rpc_client_sup.erl
erlang
Behaviour Include helpful guard macros Include helpful guard macros Supervisor functions API functions Supervisor callbacks =================================================== Supervisor functions =================================================== If we've already started the child, terminate it and start ...
-*-mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et : Copyright 2015 . All Rights Reserved . -module(gen_rpc_client_sup). -author("Panagiotis Papadomitsos <>"). -behaviour(supervisor). Include the HUT library -include_lib("hut...
f8e303ebe33f5f033213dcac46a454a93b675fc18f1f85cf6dbea94b157094ab
ConsenSys/constellation
Either.hs
# LANGUAGE NoImplicitPrelude # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE StrictData #-} module Constellation.Util.Either where import ClassyPrelude import Control.Monad.Except (ExceptT(ExceptT)) fromRight :: Either a b -> b fromRight (Left _) = error "fromRight: Got Left" fromRight (Right x) = x fromShowRight...
null
https://raw.githubusercontent.com/ConsenSys/constellation/8fcd2d38b097da5242f511d2fb2149a9764f2f7b/Constellation/Util/Either.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData #
# LANGUAGE NoImplicitPrelude # module Constellation.Util.Either where import ClassyPrelude import Control.Monad.Except (ExceptT(ExceptT)) fromRight :: Either a b -> b fromRight (Left _) = error "fromRight: Got Left" fromRight (Right x) = x fromShowRight :: Show a => Either a b -> b fromShowRight (Left err) = error ...
530178fd0e100977b911daa90f0a4a82177001cdaec15555a3ef96ce7c206e4d
alasconnect/reflex-material
Types.hs
{-# LANGUAGE OverloadedStrings #-} module Reflex.Material.Types ( Img(..) , CssClass(..) , Default (..) , Enabled(..) , Selected (..) , SelectOption (..) ) where import Data.Monoid ((<>)) import Data.Text (Text) newtype CssClass = CssClass { unCssClass :: Text } instance Monoid CssClass where mempty...
null
https://raw.githubusercontent.com/alasconnect/reflex-material/0e8ef843a570378ebaf2449b8c4b72616e25f70c/src/Reflex/Material/Types.hs
haskell
# LANGUAGE OverloadedStrings # file, width, height, alt
module Reflex.Material.Types ( Img(..) , CssClass(..) , Default (..) , Enabled(..) , Selected (..) , SelectOption (..) ) where import Data.Monoid ((<>)) import Data.Text (Text) newtype CssClass = CssClass { unCssClass :: Text } instance Monoid CssClass where mempty = CssClass "" mappend (CssClass ...
0c7de35532795c73c28c9cb977237671829ac3add67ae8918e5faef1a3b75c44
stylewarning/deprecated-coalton-prototype
toplevel-define-type.lisp
;;;; toplevel-define-type.lisp (in-package #:coalton-impl) Handling of toplevel COALTON : DEFINE - TYPE . (defun parse-out-tycon (form) "Return a list: (TYCON UNPARSED-TYPE . CTORS) where TYCON is the new type constructor UNPARSED-TYPE is the raw type expression with unchanged bound variables ...
null
https://raw.githubusercontent.com/stylewarning/deprecated-coalton-prototype/4a42ffb4222fde3abfd1b50d96e455ff2eef9fe8/src/toplevel-define-type.lisp
lisp
toplevel-define-type.lisp The point of this check is to see if the tycon we already know is "compatible" with the one we are parsing. If it is, we'll use the one we know. However, if the one we know is inconsistent with the one we are parsing, we should error. TODO: Should we also verify the constructors here? ...
(in-package #:coalton-impl) Handling of toplevel COALTON : DEFINE - TYPE . (defun parse-out-tycon (form) "Return a list: (TYCON UNPARSED-TYPE . CTORS) where TYCON is the new type constructor UNPARSED-TYPE is the raw type expression with unchanged bound variables CTORS are the raw constructor...
d6fd50931eb1244297b31afcb47c94bc4acba036fdb9b1dabb436ec07a8b8de5
clojure-interop/google-cloud-clients
TransactionManager$TransactionState.clj
(ns com.google.cloud.spanner.TransactionManager$TransactionState (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.spanner TransactionManager$TransactionState])) (def STARTED "Enum Constant. type: com.google.cloud.spanner.TransactionManager$TransactionState" TransactionManager$Tran...
null
https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.spanner/src/com/google/cloud/spanner/TransactionManager%24TransactionState.clj
clojure
(ns com.google.cloud.spanner.TransactionManager$TransactionState (:refer-clojure :only [require comment defn ->]) (:import [com.google.cloud.spanner TransactionManager$TransactionState])) (def STARTED "Enum Constant. type: com.google.cloud.spanner.TransactionManager$TransactionState" TransactionManager$Tran...
7f683760dceb70f9f015f1de8b2153481ee11839f121fd0328eaa34c9695afe8
haroldcarr/learn-haskell-coq-ml-etc
ListComprehension.hs
module ListComprehension where [ i | i < - [ 0 .. 20 ] , i ` mod ` 2 = = 0 ] [ x | x < - [ 10 .. 20 ] , x /= 13 , x /= 15 , x /= 19 ] take 10 [ 2*x | x < - [ 0 .. ] , x^2 > 3 ] -- never gets past i==1 because 2nd generator is infinite take 10 [ ( i , j ) | i < - [ 1,2 ] , j < - [ 1 .. ] ] -- nested...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/playpen/misc/src/ListComprehension.hs
haskell
never gets past i==1 because 2nd generator is infinite nested now cycles through i ( but with nested lists ) a list comprehension that builds the list of all Pythagorean triples with elements between 1 and n A Pythagorean triple is defined as three positive integers ( a , b , c ) where a < b < c , and c^2 . ...
module ListComprehension where [ i | i < - [ 0 .. 20 ] , i ` mod ` 2 = = 0 ] [ x | x < - [ 10 .. 20 ] , x /= 13 , x /= 15 , x /= 19 ] take 10 [ 2*x | x < - [ 0 .. ] , x^2 > 3 ] take 10 [ ( i , j ) | i < - [ 1,2 ] , j < - [ 1 .. ] ] take 5 [ [ ( i , j ) | i < - [ 1,2 ] ] | j < - [ 1 .. ] ] take 1...
1e88fa309b49f99f3b930dad6aa7b4d544902ede73eec9e44fed5f1166bf14d0
Clozure/ccl
xppcfasload.lisp
-*- Mode : Lisp ; Package : CCL -*- ;;; Copyright 1994 - 2001 Clozure Associates ;;; 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 appl...
null
https://raw.githubusercontent.com/Clozure/ccl/6c1a9458f7a5437b73ec227e989aa5b825f32fd3/xdump/xppcfasload.lisp
lisp
Package : CCL -*- 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 la...
Copyright 1994 - 2001 Clozure Associates distributed under the License is distributed on an " AS IS " BASIS , (in-package "CCL") (eval-when (:compile-toplevel :execute) (require "FASLENV" "ccl:xdump;faslenv") (require "PPC-LAP")) (eval-when (:compile-toplevel :load-toplevel :execute) (require "XFASLOAD" "c...
9da93bd70ad0a47c7e111e6f69655166a4a36f16c3c3009e2a703e23b6b82f26
Olical/clojure-dap
util_test.clj
(ns clojure-dap.util-test (:require [clojure.test :as t] [cognitect.anomalies :as anom] [clojure-dap.util :as util])) (t/deftest anomaly? (t/is (not (util/anomaly? nil))) (t/is (not (util/anomaly? {:hi :world}))) (t/is (util/anomaly? {::anom/category ::anom/fault})))
null
https://raw.githubusercontent.com/Olical/clojure-dap/365d67ab0e216ea0cc55253783397254c3ea6c80/test/clojure_dap/util_test.clj
clojure
(ns clojure-dap.util-test (:require [clojure.test :as t] [cognitect.anomalies :as anom] [clojure-dap.util :as util])) (t/deftest anomaly? (t/is (not (util/anomaly? nil))) (t/is (not (util/anomaly? {:hi :world}))) (t/is (util/anomaly? {::anom/category ::anom/fault})))
911dd6fb6044d5829d9d597eea7242b1976a1cdf6efc395dd3801dce07859d70
thi-ng/demos
project.clj
(defproject physics-strands "0.1.0-SNAPSHOT" :description "physics-strands demo" :url "-ng/demos" :license {:name "Apache Software License" :url "-2.0"} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/clojurescript "1.10.238"] [thi.ng/g...
null
https://raw.githubusercontent.com/thi-ng/demos/048cd131099a7db29be56b965c053908acad4166/physics-strands/project.clj
clojure
(defproject physics-strands "0.1.0-SNAPSHOT" :description "physics-strands demo" :url "-ng/demos" :license {:name "Apache Software License" :url "-2.0"} :dependencies [[org.clojure/clojure "1.9.0"] [org.clojure/clojurescript "1.10.238"] [thi.ng/g...
0544212361660f243d2664a1ba61e1ebdeaee51cbde899ee6853687fbb757579
jbowles/artifact
quicksort_one.clj
;; Quicksort (defn qsort [L] (if (empty? L) '() (let [[pivot & L2] L] (lazy-cat (qsort (for [y L2 :when (< y pivot)] y)) (list pivot) (qsort (for [y L2 :when (>= y pivot)] y )))))) (qsort [1000 3456 57464 36384 23648 4759 38 10374 3047 1 3946 39 540 27 3 6 6 3 9 8 67 4])...
null
https://raw.githubusercontent.com/jbowles/artifact/0c093f5ac4480328fd2a2f42a74cc97ca463f8be/src/artifact/quicksort_one.clj
clojure
Quicksort
(defn qsort [L] (if (empty? L) '() (let [[pivot & L2] L] (lazy-cat (qsort (for [y L2 :when (< y pivot)] y)) (list pivot) (qsort (for [y L2 :when (>= y pivot)] y )))))) (qsort [1000 3456 57464 36384 23648 4759 38 10374 3047 1 3946 39 540 27 3 6 6 3 9 8 67 4])
fc68d09be433da226bc7942778c34079c81aab79c154ba12b4a8e03b3ab580df
kupl/LearnML
original.ml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let rec eval (f : formula) : bool = let pre (a : formula) : formula = ...
null
https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/formula/sub91/original.ml
ocaml
type formula = | True | False | Not of formula | AndAlso of (formula * formula) | OrElse of (formula * formula) | Imply of (formula * formula) | Equal of (exp * exp) and exp = Num of int | Plus of (exp * exp) | Minus of (exp * exp) let rec eval (f : formula) : bool = let pre (a : formula) : formula = ...
10f8f44d12be143fae7904c163cae67ea0ff68286204bd0e2d08c2b52e3da650
lambe-lang/nethra
response.ml
type ('a, 'b) t = | Success of ('a * bool * 'b) | Failure of (string option * bool * 'b) module Construct = struct let success (a, c, b) = Success (a, c, b) let failure (m, c, b) = Failure (m, c, b) end module Destruct = struct let fold ~success ~failure = function | Success (a, c, b) -> success (a, c, ...
null
https://raw.githubusercontent.com/lambe-lang/nethra/bf68fa1d0e002cbb871ce2a21d99287e99405a8d/lib/nethra/syntax/parser/response.ml
ocaml
type ('a, 'b) t = | Success of ('a * bool * 'b) | Failure of (string option * bool * 'b) module Construct = struct let success (a, c, b) = Success (a, c, b) let failure (m, c, b) = Failure (m, c, b) end module Destruct = struct let fold ~success ~failure = function | Success (a, c, b) -> success (a, c, ...
7b04b36f101aa6d4e3cc94e5a6754151d0e7a28d4687569de0cad8cc2033e470
joinr/spork
simpleq.clj
;;A trivial queue implementation ;;intended for efficient operations ;;on message queues of small(ish) ;;sizes. ;;EXPERIMENTAL (ns spork.data.simpleq (:require [spork.util.general :as gen] ;[clojure.core.rrb-vector :as rrb] ;[clojure.data.finger-tree :as ft] [spork.data.priorityq :as pq] [spork.data.p...
null
https://raw.githubusercontent.com/joinr/spork/bb80eddadf90bf92745bf5315217e25a99fbf9d6/src/spork/data/simpleq.clj
clojure
A trivial queue implementation intended for efficient operations on message queues of small(ish) sizes. EXPERIMENTAL [clojure.core.rrb-vector :as rrb] [clojure.data.finger-tree :as ft] be better than the avl tree, we'll see. We maintain a persistent queue in sorted order. more items leaves us with a copied array, sorte...
(ns spork.data.simpleq (:require [spork.util.general :as gen] [spork.data.priorityq :as pq] [spork.data.protocols] [clj-tuple :as tpl] )) we can use counted double lists as deques . in theory , they should (defn insert-by [keyf v coll] (let [lk (keyf v) inserted? (volatil...
78de69ad768e22ae4634e3868fea9e7bf2c3d1ec141f42107a1a2087f0b20bca
Chris00/ocaml-cairo
pango_demo.ml
open Cairo let two_pi = 2. *. acos(-1.) let radius = 150. (* Based on the example given at -Cairo-Rendering.html *) let draw_text (cr: context) = let n_words = 10 in let font = "Sans Bold 26" in Cairo.translate cr radius radius; let layout = Cairo_pango.create_layout cr in Pango.Layout.set_text layout "...
null
https://raw.githubusercontent.com/Chris00/ocaml-cairo/202674a8d0c533b689ceacdb523ca167611e1b4c/examples-pango/pango_demo.ml
ocaml
Based on the example given at -Cairo-Rendering.html
open Cairo let two_pi = 2. *. acos(-1.) let radius = 150. let draw_text (cr: context) = let n_words = 10 in let font = "Sans Bold 26" in Cairo.translate cr radius radius; let layout = Cairo_pango.create_layout cr in Pango.Layout.set_text layout "Text"; let desc = Pango.Font.from_string font in Pango.La...
3f39a06c3787bd71ca318a1d2d825b3eed6c510b68c5d0c013e044a486910478
jarvinet/scheme
foo.scm
(define (f . args) (display args) (newline) (if (null? (car args)) (begin (display "null") (newline)) (begin (display (car args)) (newline) (f (cdr args))))) (define (fib n) (if (< n 2) n (+ (fib (- n 2)) (fib (- n 1))))) (define (fib n) (fib-iter 1 0 n)) (define (fib-iter a ...
null
https://raw.githubusercontent.com/jarvinet/scheme/47633d7fc4d82d739a62ceec75c111f6549b1650/bin/test/foo.scm
scheme
Demonstration that failure to save the env register in evaluation of and-special form produces wrong results -------------------------------------------------- section 1.2.6 Searching for Divisors find-divisor: find the smallest integral divisor number is a prime if its smallest divisor is the number itself The ...
(define (f . args) (display args) (newline) (if (null? (car args)) (begin (display "null") (newline)) (begin (display (car args)) (newline) (f (cdr args))))) (define (fib n) (if (< n 2) n (+ (fib (- n 2)) (fib (- n 1))))) (define (fib n) (fib-iter 1 0 n)) (define (fib-iter a ...
e371c210ccd4c1da2cc89503fe54fd2dfd2a630d9d1074af02fd96fb8ec93337
hemmi/coq2scala
sos_lib.ml
(* ========================================================================= *) - This code originates from HOL LIGHT 2.30 ( see file LICENSE.sos for license , copyright and disclaimer ) (* This code is the HOL LIGHT library code used by sos.ml *) - ( ) has i...
null
https://raw.githubusercontent.com/hemmi/coq2scala/d10f441c18146933a99bf2088116bd213ac3648d/coq-8.4pl2-old/plugins/micromega/sos_lib.ml
ocaml
========================================================================= This code is the HOL LIGHT library code used by sos.ml independent bits ========================================================================= ---------------...
- This code originates from HOL LIGHT 2.30 ( see file LICENSE.sos for license , copyright and disclaimer ) - ( ) has isolated the HOL - ( ) is using it to feed micromega open Sos_types open Num open List let debugging = ref false;; Comparisons th...
f434ad8f6218ddbc2edf11ab69f6b088f40df694a71ca18100cf9a4e7ef9c74c
zwizwa/erl_tools
redo.erl
-module(redo). -export([pull/1, pull/2, pull_vals/1, pull_vals/2, with_eval/2, make_var/1, make_var/2, make_var/3, push/3, push/2, start_link/1, handle_outer/2, handle/2, file_changed/3, from_list_dir/2, from_list_dir_type/3, files_from_filename/2, ...
null
https://raw.githubusercontent.com/zwizwa/erl_tools/07645992e968c1456c9d0212f380afd1ffce4c1f/src/redo.erl
erlang
FIXME: Clear up the confusion between pull_valls, need_vals and get_vals. retrieval is always parallel put is sequential TL;DR It is customary to apologize for writing yet another build system. I've tried many existing approaches, and I've come to the conclusion that for my case it was necessary. enough fo...
-module(redo). -export([pull/1, pull/2, pull_vals/1, pull_vals/2, with_eval/2, make_var/1, make_var/2, make_var/3, push/3, push/2, start_link/1, handle_outer/2, handle/2, file_changed/3, from_list_dir/2, from_list_dir_type/3, files_from_filename/2, ...