_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 |
|---|---|---|---|---|---|---|---|---|
22a6b1318364a7a99b76beef95f588f33493b8519d081bf32a75fd760e5716c9 | falsetru/htdp | 28.1.3.scm | (define (neighbors orig g)
(second (assoc orig g)))
(define (find-route origination destination G)
(cond
[(symbol=? origination destination) (list destination)]
[else (local ((define possible-route
(find-route/list (neighbors origination G) destination G)))
(cond
[(boolean? possible-rout... | null | https://raw.githubusercontent.com/falsetru/htdp/4cdad3b999f19b89ff4fa7561839cbcbaad274df/28/28.1.3.scm | scheme | (define (neighbors orig g)
(second (assoc orig g)))
(define (find-route origination destination G)
(cond
[(symbol=? origination destination) (list destination)]
[else (local ((define possible-route
(find-route/list (neighbors origination G) destination G)))
(cond
[(boolean? possible-rout... | |
4cda2757105df05e43da67c897908a69c489f087072579cc64e3677e71d7f2d6 | docker-in-aws/docker-in-aws | layout.cljs | (ns swarmpit.component.layout
(:require [rum.core :as rum]
[clojure.string :as str]
[swarmpit.view :as view]
[swarmpit.component.state :as state]
[swarmpit.component.menu :as menu]
[swarmpit.component.header :as header]))
(enable-console-print!)
(def page-... | null | https://raw.githubusercontent.com/docker-in-aws/docker-in-aws/bfc7e82ac82ea158bfb03445da6aec167b1a14a3/ch16/swarmpit/src/cljs/swarmpit/component/layout.cljs | clojure | (ns swarmpit.component.layout
(:require [rum.core :as rum]
[clojure.string :as str]
[swarmpit.view :as view]
[swarmpit.component.state :as state]
[swarmpit.component.menu :as menu]
[swarmpit.component.header :as header]))
(enable-console-print!)
(def page-... | |
9ec0dacdbfeef1cb853431d592c4d413b265701a4e02e190c682ec79a3c00f70 | commercialhaskell/stack | Setup.hs | import Distribution.Simple
main = defaultMain | null | https://raw.githubusercontent.com/commercialhaskell/stack/255cd830627870cdef34b5e54d670ef07882523e/test/integration/tests/4783-doctest-deps/files/acme-dont-copy/Setup.hs | haskell | import Distribution.Simple
main = defaultMain | |
6038443b1b8ac2ba3845ce2fa7ac5a2d6f5ed1a4f19ce4d2d6104b726d339dd8 | samoht/camloo | emitcode.scm | ;; Le module
(module
__caml_emitcode
(library camloo-runtime)
(import
__caml_misc
__caml_const
__caml_instruct
__caml_prim
__caml_globals
__caml_opcodes
__caml_prim_opc
__caml_buffcode
__caml_config
__caml_labels
__caml_reloc)
(export
(out_bool_test_109@emitcode ... | null | https://raw.githubusercontent.com/samoht/camloo/29a578a152fa23a3125a2a5b23e325b6d45d3abd/src/camloo/Llib.bootstrap/emitcode.scm | scheme | Le module
Les variables globales
Les expressions globales | (module
__caml_emitcode
(library camloo-runtime)
(import
__caml_misc
__caml_const
__caml_instruct
__caml_prim
__caml_globals
__caml_opcodes
__caml_prim_opc
__caml_buffcode
__caml_config
__caml_labels
__caml_reloc)
(export
(out_bool_test_109@emitcode x1)
(2-192... |
4006680f2f465cc629ffe1a152b74ac0dc23189a964dd9d67716640717807d84 | fiddlerwoaroof/lisp-sandbox | asm.lisp | ;;; How to make the popcnt instruction available
(defpackage "POPCNT"
(:use "CL")
(:export "POPCNT"))
(in-package "POPCNT")
(sb-c:defknown popcnt ((unsigned-byte 64)) (integer 0 64)
(sb-c:foldable sb-c:flushable sb-c:movable)
:overwrite-fndb-silently t)
(in-package "SB-VM")
(define-vop (popcnt:popcnt)
(... | null | https://raw.githubusercontent.com/fiddlerwoaroof/lisp-sandbox/38ff817c95af35db042faf760b477675264220d2/asm.lisp | lisp | How to make the popcnt instruction available
only break the spurious dep. chain
if r isn't the same register as x. | (defpackage "POPCNT"
(:use "CL")
(:export "POPCNT"))
(in-package "POPCNT")
(sb-c:defknown popcnt ((unsigned-byte 64)) (integer 0 64)
(sb-c:foldable sb-c:flushable sb-c:movable)
:overwrite-fndb-silently t)
(in-package "SB-VM")
(define-vop (popcnt:popcnt)
(:policy :fast-safe)
(:translate popcnt:popcnt)
... |
2a933c435a6b8a811c159c1688ecd8493febf228fe759a0d2fd69446876601d0 | Verites/verigraph | Monad.hs | module Util.Monad
( -- * Boolean helpers
andM
, orM
, allM
, anyM
-- * List helpers
, concatMapM
, mapMaybeM
, partitionM
, breakM
, nubByM
-- * ListT helpers
, pickOne
, pickFromList
, guardM
-- * ExceptT helpers
, tryError
, mapMCollectErrors
, mapMCollectErrors_
, forM... | null | https://raw.githubusercontent.com/Verites/verigraph/754ec08bf4a55ea7402d8cd0705e58b1d2c9cd67/src/library/Util/Monad.hs | haskell | * Boolean helpers
* List helpers
* ListT helpers
* ExceptT helpers
| Given an action that may fail throwing and error, execute it for every item
of the list regardless if any action fails, accumulating the results or
errors. If any action fails, accumulates all errors and throw them together.
Be /very careful/... | module Util.Monad
andM
, orM
, allM
, anyM
, concatMapM
, mapMaybeM
, partitionM
, breakM
, nubByM
, pickOne
, pickFromList
, guardM
, tryError
, mapMCollectErrors
, mapMCollectErrors_
, forMCollectErrors
, forMCollectErrors_
) where
import Control.Applicative
import ... |
d2f3464bfe6916d37b2acd8e4a4e18126c9a0d2b6ce9576f7f0ffd4a55de97ec | jrh13/hol-light | lp_tests.ml | let rec_seq = ` !x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11:real.
x3 = abs(x2) - x1 /\ x4 = abs(x3) - x2 /\ x5 = abs(x4) - x3 /\
x6 = abs(x5) - x4 /\ x7 = abs(x6) - x5 /\
x8 = abs(x7) - x6 /\ x9 = abs(x8) - x7 /\ x10 = abs(x9) - x8 /\
x11 = abs(x10) - x9 ==> x1 = x10 /\ x2 = x11`;;
let test_std = `!a b c d.
((&0 + ... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/LP_arith/lp_tests.ml | ocaml | let rec_seq = ` !x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11:real.
x3 = abs(x2) - x1 /\ x4 = abs(x3) - x2 /\ x5 = abs(x4) - x3 /\
x6 = abs(x5) - x4 /\ x7 = abs(x6) - x5 /\
x8 = abs(x7) - x6 /\ x9 = abs(x8) - x7 /\ x10 = abs(x9) - x8 /\
x11 = abs(x10) - x9 ==> x1 = x10 /\ x2 = x11`;;
let test_std = `!a b c d.
((&0 + ... | |
844f7b4990ea432f35de3953d14c4ed70270097ed153325a188f4278245999c2 | imdea-software/leap | YicesPosQuery.ml |
(***********************************************************************)
(* *)
LEAP
(* *)
, IMDEA ... | null | https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/solvers/backend/query/yices/YicesPosQuery.ml | ocaml | *********************************************************************
... |
LEAP
, IMDEA Software Institute
Copyright 2011 IMDEA Software Institute
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compl... |
65715e4bf947de04d8376e22bd4934dec00ffbbe563fff745deaa2b3f371cbb2 | AndrasKovacs/setoidtt | L.hs |
module Data.Array.Dynamic.L (
empty
, Array
, clear
, push
, Data.Array.Dynamic.L.read
, Data.Array.Dynamic.L.show
, size
, unsafeRead
, unsafeWrite
, write
, modify'
, unsafeLast
, Data.Array.Dynamic.L.last
, isEmpty
-- , foldl'
, foldlIx '
-- , foldr'
, foldrIx '
-- , Data.Ar... | null | https://raw.githubusercontent.com/AndrasKovacs/setoidtt/621aef2c4ae5a6acb418fa1153575b21e2dc48d2/setoidtt/dynamic-array/Data/Array/Dynamic/L.hs | haskell | , foldl'
, foldr'
, Data.Array.Dynamic.any
, Data.Array.Dynamic.all
, anyIx
, forM_
, forMIx_
# inline empty #
# inline read #
# inline write #
# inline modify' #
# inlinable extendCapacity #
# inline push #
# inline size #
# inline isEmpty #
# inline last #
foldl' :: forall a b. (b -> a -> b) -> b -> Array a -... |
module Data.Array.Dynamic.L (
empty
, Array
, clear
, push
, Data.Array.Dynamic.L.read
, Data.Array.Dynamic.L.show
, size
, unsafeRead
, unsafeWrite
, write
, modify'
, unsafeLast
, Data.Array.Dynamic.L.last
, isEmpty
, foldlIx '
, foldrIx '
, allIx
) where
import Data.Unlifted
... |
f02f8c55dd699843d6ee78fd8d9e347434644012a7a03afc94fc1ea4e5d297c6 | c4-project/c4f | id.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/common/src/id.mli | ocaml | * [Id] is a module for compiler and machine identifiers.
Identifiers contain an ordered list of case-insensitive elements, called
'tags'.
* [t] is the type of compiler and machine identifiers.
* [of_string_list tags] produces an identifier from a tag list.
* [to_string_list id] returns a list of each tag in... | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
2bea8b60860d8493bac79599f5b8e099460e606f5da4273c75a068cc9577ef73 | logicmoo/logicmoo_nlu | randftre.lsp | ;;; % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% Example code from the book " Natural Language Processing in LISP " %
% published by %
% Copyright ( c ) 1989 , . %
;;; % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %... | null | https://raw.githubusercontent.com/logicmoo/logicmoo_nlu/c066897f55b3ff45aa9155ebcf799fda9741bf74/ext/nlp_book/lisp/randftre.lsp | lisp | % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
% % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % %
randftre.lsp [Chapter 7] random generation of trees from a PATR grammar | % Example code from the book " Natural Language Processing in LISP " %
% published by %
% Copyright ( c ) 1989 , . %
(uses 'randfgen)
(defun generate (dag)
(if (atom dag)
dag
(let ((rs (matching_rules dag)))
(if (null rs)
(throw 'genera... |
225c64e26bdec56d9388ea205c1cbf75c422679c20f39980068c7706c79a52b4 | BioHaskell/octree | test_Octree.hs | # LANGUAGE TemplateHaskell , ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
module Main where
import Data.Octree.Internal
import Data.Octree() -- test that interface module is not broken
import Prelude hiding(lookup)
import Data.List(sort, sortBy)
import qualified Data.List as List (delete, nub)
import Test.Qui... | null | https://raw.githubusercontent.com/BioHaskell/octree/a6c4dc406dfc6aad9defbefd90032e593f02565d/tests/test_Octree.hs | haskell | test that interface module is not broken
| These are tests for internal helper functions:
for easier testing
| These are tests for exposed functions:
unfortunately there is no Arbitrary for (a -> b)
worst splitting ratio possible when we take midpoint (and inputs are colinear) | # LANGUAGE TemplateHaskell , ScopedTypeVariables #
# LANGUAGE FlexibleInstances #
module Main where
import Data.Octree.Internal
import Prelude hiding(lookup)
import Data.List(sort, sortBy)
import qualified Data.List as List (delete, nub)
import Test.QuickCheck.All(quickCheckAll)
import Test.QuickCheck.Arbitrary
impor... |
4512a3672127994a6a04e3be69db8a7bc40ba53ded391c42ab5a026acae6af39 | dharrigan/startrek | fixtures.clj | (ns startrek.test.fixtures
{:author "David Harrigan"}
(:require
[clojure.tools.logging :as log]
[donut.system :as ds]
[next.jdbc :as jdbc]
[next.jdbc.transaction :as transaction]
[startrek.test.system :as test-system]))
(set! *warn-on-reflection* true)
(def ^:dynamic *test-system* nil)
(def with-t... | null | https://raw.githubusercontent.com/dharrigan/startrek/ee15b048c3a89d28161d77c36cb96db07082e98f/test/startrek/test/fixtures.clj | clojure | -jdbc/blob/develop/doc/migration-from-clojure-java-jdbc.md#transactions
mimic the behaviour of clojure.java.jdbc, whereby the outer transaction controls the inner transaction. See link above for more info. | (ns startrek.test.fixtures
{:author "David Harrigan"}
(:require
[clojure.tools.logging :as log]
[donut.system :as ds]
[next.jdbc :as jdbc]
[next.jdbc.transaction :as transaction]
[startrek.test.system :as test-system]))
(set! *warn-on-reflection* true)
(def ^:dynamic *test-system* nil)
(def with-t... |
1cdde50e59572e65907284cb358811b40820932069eb05079bd27f8d736af7b9 | xh4/web-toolkit | entity.lisp | (in-package :http)
(defclass entity (request response) ())
(defgeneric entity-header (entity)
(:method ((entity entity))
(slot-value entity 'header)))
(defgeneric entity-body (entity)
(:method ((entity entity))
(slot-value entity 'body)))
(defgeneric entity-status (entity)
(:method ((entity entity))
... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/http/entity.lisp | lisp | (in-package :http)
(defclass entity (request response) ())
(defgeneric entity-header (entity)
(:method ((entity entity))
(slot-value entity 'header)))
(defgeneric entity-body (entity)
(:method ((entity entity))
(slot-value entity 'body)))
(defgeneric entity-status (entity)
(:method ((entity entity))
... | |
ce487eb503120338980f3d1135fb181c3332fe0de665b2c1b0be346124a3b7c7 | mmontone/cl-xul | tabs.lisp | (in-package :xul)
(define-xul-element tab-box (container-element)
(eventnode handleCtrlPageUpDown handleCtrlTab
(selected-index :attribute-name "selectedIndex"))
(:documentation "A container used to display a set of tabbed pages of elements. A row of tabs is displayed at the top of tabbox which may be used t... | null | https://raw.githubusercontent.com/mmontone/cl-xul/049c8664bb58d177c71d93ac5b5e1a2ba9b9469b/src/controls/tabs.lisp | lisp | hiding the tab suffices to make the panel inaccessible.")) | (in-package :xul)
(define-xul-element tab-box (container-element)
(eventnode handleCtrlPageUpDown handleCtrlTab
(selected-index :attribute-name "selectedIndex"))
(:documentation "A container used to display a set of tabbed pages of elements. A row of tabs is displayed at the top of tabbox which may be used t... |
f1679e2727fc26a24c5f27885e426c87831c21d94618c30a7708d17ad3ca359c | mbj/stratosphere | CustomActionProperty.hs | module Stratosphere.NetworkFirewall.RuleGroup.CustomActionProperty (
module Exports, CustomActionProperty(..), mkCustomActionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import {-# SOURCE #-} Stratosphere.NetworkFirewall.R... | null | https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/networkfirewall/gen/Stratosphere/NetworkFirewall/RuleGroup/CustomActionProperty.hs | haskell | # SOURCE # | module Stratosphere.NetworkFirewall.RuleGroup.CustomActionProperty (
module Exports, CustomActionProperty(..), mkCustomActionProperty
) where
import qualified Data.Aeson as JSON
import qualified Stratosphere.Prelude as Prelude
import Stratosphere.Property
import Stratosphere.ResourceProperties
import Strato... |
a36e068d4dd36c5832f93a02291ffcd3ee246143c83c0ca0dc2bf7566f7c11f0 | mirage/ocaml-rpc | suite_async.ml | let () = Alcotest.run "rpc tests" [ "Client_async_new", Client_async_new.tests ]
| null | https://raw.githubusercontent.com/mirage/ocaml-rpc/fdbf7f5c3e4f0c75837f0a96d5d4d6458805fd57/tests/rpc/suite_async.ml | ocaml | let () = Alcotest.run "rpc tests" [ "Client_async_new", Client_async_new.tests ]
| |
75e273f704ffeb99d01cd7df37050eb409cec2dc1f74830f700c260d6c38b985 | kaizhang/bioinformatics-toolkit | Ensembl.hs | {-# LANGUAGE OverloadedStrings #-}
module Bio.RealWorld.Ensembl
( lookup
) where
import Prelude hiding (lookup)
import Data.Aeson
import Data.List.Split (chunksOf)
import qualified Data.ByteString.Char8 as B
import qualified Data.Aeson.KeyMap as M
import Network.HTTP.Conduit
import Bio.RealWorld.ID (BioID(..)... | null | https://raw.githubusercontent.com/kaizhang/bioinformatics-toolkit/9278d80a4d2398bddd2a432f5c86a6b27b423312/bioinformatics-toolkit/src/Bio/RealWorld/Ensembl.hs | haskell | # LANGUAGE OverloadedStrings # | module Bio.RealWorld.Ensembl
( lookup
) where
import Prelude hiding (lookup)
import Data.Aeson
import Data.List.Split (chunksOf)
import qualified Data.ByteString.Char8 as B
import qualified Data.Aeson.KeyMap as M
import Network.HTTP.Conduit
import Bio.RealWorld.ID (BioID(..), EnsemblID)
base :: String
base =... |
41f715209bf4dd30e47382d099aaef5f0ad8ddddd9a9155de75c09ddb7b0848c | borodust/claw-legacy | record.lisp | (cl:in-package :claw.spec)
(defclass foreign-record (aligned foreign-entity)
((fields :initarg :fields :initform nil :reader foreign-record-fields)))
(defclass foreign-struct (foreign-record) ())
(defclass foreign-union (foreign-record) ())
(defclass foreign-record-field (aligned foreign-entity)
((bit-offse... | null | https://raw.githubusercontent.com/borodust/claw-legacy/3cd4a96fca95eb9e8d5d069426694669f81b2250/src/spec/entity/record.lisp | lisp | from bit-size, because bit-size is the full width of the field
forward reference
UNIONS
| (cl:in-package :claw.spec)
(defclass foreign-record (aligned foreign-entity)
((fields :initarg :fields :initform nil :reader foreign-record-fields)))
(defclass foreign-struct (foreign-record) ())
(defclass foreign-union (foreign-record) ())
(defclass foreign-record-field (aligned foreign-entity)
((bit-offse... |
e083046f57e28595388ac6244414ef27cb0a9d3dc30d2ad3cea54dd0421538cb | cky/guile | util.scm | Copyright ( C ) 1999 , 2000 , 2001 , 2003 , 2006 , 2008 Free Software Foundation , Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License ,... | null | https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/module/oop/goops/util.scm | scheme |
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. S... | Copyright ( C ) 1999 , 2000 , 2001 , 2003 , 2006 , 2008 Free Software Foundation , Inc.
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
(define-module... |
bbe08d999d6088c28c64ff8bc01b6dc5624eaad7db93e2290a1d6fdbd48c800f | tonyg/racket-reloadable-example | config.rkt | #lang racket/base
;;
( Reloadable ) Configuration for the site .
;;
(provide configurable-text)
(define configurable-text "This is configurable text.")
| null | https://raw.githubusercontent.com/tonyg/racket-reloadable-example/6a341a7c8b3268a1be2933dfc7b7be3706c91fd0/src/config.rkt | racket | #lang racket/base
( Reloadable ) Configuration for the site .
(provide configurable-text)
(define configurable-text "This is configurable text.")
| |
18fcff63159caba59ded21dc47d2412efd9e5325cb8db1813d7c1ae7ba56c7f9 | heshrobe/joshua-dist | xml-parser.lisp | -*- package : nox ; Syntax : Common - lisp ; Base : 10 -*-
;;;
xml-parser.lisp
;;;
;;;
;;; ----------------------------------------------------------------------------
;;;
The contents of this file are subject to the NOKOS License Version 1.0a
;;; (the "License"); you may not use this file except in complia... | null | https://raw.githubusercontent.com/heshrobe/joshua-dist/f59f06303f9fabef3e945a920cf9a26d9c2fd55e/xml-parser/xml-parser.lisp | lisp | Syntax : Common - lisp ; Base : 10 -*-
----------------------------------------------------------------------------
(the "License"); you may not use this file except in compliance with
the License.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
License for the specific langu... |
xml-parser.lisp
The contents of this file are subject to the NOKOS License Version 1.0a
Software distributed under the License is distributed on an " AS IS "
The Original Software is
WILBUR : Nokia RDF / XML Processor for CLOS
Copyright ( c ) 2001 Nokia and others . All Rights Reserved .
P... |
57f19caf35e4d09ab7b21568ee3db9424fd49f4dfd6e277e4b33d025f663dfad | dorchard/effect-monad | Effect.hs | # LANGUAGE KindSignatures , TypeFamilies , ConstraintKinds , PolyKinds , MultiParamTypeClasses #
module Control.Effect where
import Prelude hiding (Monad(..))
import GHC.Exts ( Constraint )
{-| Specifies "parametric effect monads" which are essentially monads but
annotated by a type-level monoid formed by ... | null | https://raw.githubusercontent.com/dorchard/effect-monad/5750ef8438f750e528002a0a4e255514cbf3150a/src/Control/Effect.hs | haskell | | Specifies "parametric effect monads" which are essentially monads but
annotated by a type-level monoid formed by 'Plus' and 'Unit'
| Effect of a trivially effectful computation |
| 'Inv' provides a way to give instances of 'Effect' their own constraints for '>>='
| Effect-parameterised version of 'return'. Ann... | # LANGUAGE KindSignatures , TypeFamilies , ConstraintKinds , PolyKinds , MultiParamTypeClasses #
module Control.Effect where
import Prelude hiding (Monad(..))
import GHC.Exts ( Constraint )
class Effect (m :: k -> * -> *) where
type Unit m :: k
| Cominbing effects of two subcomputations |
type Plus m (f ... |
ffb1756f2270cd8058c5ce046101dd9a9ab1cc94bbc58ed9202c46ffc7c97fb0 | rtoy/cmucl | macros.lisp | ;;; -*- Package: PPC -*-
;;;
;;; **********************************************************************
This code was written as part of the Spice Lisp project at
Carnegie - Mellon University , and has been placed in the public domain .
If you want to use this code or any part of Spice Lisp , please contact
(... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/compiler/ppc/macros.lisp | lisp | -*- Package: PPC -*-
**********************************************************************
**********************************************************************
$Header: src/compiler/ppc/macros.lisp $
This file contains various useful macros for generating PC code.
Instruction-like macros.
return instruc... | This code was written as part of the Spice Lisp project at
Carnegie - Mellon University , and has been placed in the public domain .
If you want to use this code or any part of Spice Lisp , please contact
( FAHLMAN@CMUC ) .
Written by .
(in-package "PPC")
(defmacro move (dst src)
"Move SRC into DST... |
30a972d813bf8542ae90d83e9d9f4f29f1660e844a453d7b305b1d4f535fabf1 | mishoo/cl-daemonize | package.lisp | package.lisp
(defpackage #:cl-daemonize
(:use #:cl #:sb-alien #:cffi)
(:export #:daemonize #:restart-process))
| null | https://raw.githubusercontent.com/mishoo/cl-daemonize/05290067c9dab60777ae32b9c8586aa9a243f79e/package.lisp | lisp | package.lisp
(defpackage #:cl-daemonize
(:use #:cl #:sb-alien #:cffi)
(:export #:daemonize #:restart-process))
| |
5a46da078a2702e65a6a26214c7aba015b81473a9af26486cde338577291dbb8 | haskell-tools/haskell-tools | Duplicate.hs | # LANGUAGE NoImplicitPrelude #
module Refactor.OrganizeImports.InstanceCarry.Duplicate where
import Data.List ()
import Data.List ()
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/OrganizeImports/InstanceCarry/Duplicate.hs | haskell | # LANGUAGE NoImplicitPrelude #
module Refactor.OrganizeImports.InstanceCarry.Duplicate where
import Data.List ()
import Data.List ()
| |
baa9fa9cbd43d264eb62f6e668a4a432e6b8d520cf5d86b67352ebf8a1fcb3de | zotonic/zotonic | z_template.erl | @author < >
2009 - 2016
%% @doc Template handling, compiles and renders django compatible templates using the template_compiler
Copyright 2009 - 2016
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may o... | null | https://raw.githubusercontent.com/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_core/src/support/z_template.erl | erlang | @doc Template handling, compiles and renders django compatible templates using the template_compiler
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 CONDIT... | @author < >
2009 - 2016
Copyright 2009 - 2016
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(z_template).
-author("Marc Worrell <>").
-export([start_link/1]).
-export([
reset/1,
module_reind... |
a8b18f210d2081c0637070fbe6af9f83fcd25b550d7a2df70c3bbbd900a96657 | rizo/snowflake-os | char.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/libraries/stdlib/char.ml | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
$ I d : char.ml , v 1.13 2005 - 05 - ... |
8ed5b7228bcc26aa615d91979e2addeec10e23d13a7903ce27cab39a52bc45c5 | tomhanika/conexp-clj | editable_contexts.clj | ;; Copyright ⓒ the conexp-clj developers; 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 LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bou... | null | https://raw.githubusercontent.com/tomhanika/conexp-clj/5e4c15697f06446f925f53d1d143528155d7dd3a/src/main/clojure/conexp/gui/editors/context_editor/editable_contexts.clj | clojure | Copyright ⓒ the conexp-clj developers; all rights reserved.
The use and distribution terms for this software are covered by the
which can be found in the file LICENSE 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 re... | Eclipse Public License 1.0 ( -1.0.php )
This code has been written by
(ns conexp.gui.editors.context-editor.editable-contexts
(:require [clojure.set :refer [map-invert]]
[clojure.string :refer [join]]
[conexp.fca.contexts :refer :all]
[conexp.gui.editors.context-editor.tabl... |
0dc0e7a503c5d9c37dae330144ec9042032a557d08d87cfbe2d879f80ceec8be | callum-oakley/gotta-go-fast | UI.hs | module UI
( run
) where
import Brick (App (..), AttrName, BrickEvent (..),
EventM, Location (..), Next,
Padding (..), Widget, attrMap,
attrName, continue, defaultMai... | null | https://raw.githubusercontent.com/callum-oakley/gotta-go-fast/24010e6a2ba0e4f08700647880f3664cdd8fcead/src/UI.hs | haskell | We display an empty line as a single space so that it still occupies
vertical space.
abusing the fgErrorCode to use as a highlight colour for the results here | module UI
( run
) where
import Brick (App (..), AttrName, BrickEvent (..),
EventM, Location (..), Next,
Padding (..), Widget, attrMap,
attrName, continue, defaultMai... |
1ee8e64cecb3ec64c864a440050a189e7141ee2e6a1a18bb0019ce464d149947 | marianoguerra/flaviodb | flavio_ring_event_handler.erl | This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing,
software distributed under the Licens... | null | https://raw.githubusercontent.com/marianoguerra/flaviodb/0ca0c07e6c3f94b6c5b1e0891325fac4c7c12a6b/src/flavio_ring_event_handler.erl | erlang | Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
gen_event callbacks | 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
Copyright ( c ) 2007 - 2011 Basho Technologies , Inc. All Rights Reserved .
... |
1cd4a3c52e72d2f3cada3f28469a6fe598816bc96fd5565798550cfb916203a7 | dmjio/miso | Html.hs | -----------------------------------------------------------------------------
-- |
-- Module : Miso.Html
Copyright : ( C ) 2016 - 2018
-- License : BSD3-style (see the file LICENSE)
Maintainer : < >
-- Stability : experimental
-- Portability : non-portable
--
-- Example usage:
--
-- @... | null | https://raw.githubusercontent.com/dmjio/miso/339505587fd8576c7f89484d3a4244732a9f00e6/src/Miso/Html.hs | haskell | ---------------------------------------------------------------------------
|
Module : Miso.Html
License : BSD3-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
Example usage:
@
intView :: Int -> View IntAction
intView n = div_ [ class_ "main" ] [
btn_ [ o... | Copyright : ( C ) 2016 - 2018
Maintainer : < >
import Miso
data IntAction = Add | Subtract
More information on how to use ` miso ` is available on GitHub
module Miso.Html
( module Miso.Html.Element
, module Miso.Html.Event
, module Miso.Html.Types
, module Miso.Html.Property
) w... |
35d6c7078c6008f72a0280fa672897f3425f229d698a1d2af8c3869f305be355 | malcolmreynolds/GSLL | vector.lisp | ;; Vectors
2008 - 04 - 13 09:39:02EDT vector.lisp
Time - stamp : < 2009 - 06 - 06 10:04:13EDT vector.lisp >
(in-package :gsl)
;;; /usr/include/gsl/gsl_vector_double.h
;;;;****************************************************************************
Vector structure , CL object , and allocation
;;;;***********... | null | https://raw.githubusercontent.com/malcolmreynolds/GSLL/2f722f12f1d08e1b9550a46e2a22adba8e1e52c4/data/vector.lisp | lisp | Vectors
/usr/include/gsl/gsl_vector_double.h
****************************************************************************
****************************************************************************
Define all supported mvector subclasses
****************************************************************************
... | 2008 - 04 - 13 09:39:02EDT vector.lisp
Time - stamp : < 2009 - 06 - 06 10:04:13EDT vector.lisp >
(in-package :gsl)
Vector structure , CL object , and allocation
(export 'mvector)
(defclass mvector (marray)
()
(:documentation "GSL vectors."))
#.(data-defclass 'vector 'mvector)
(defmethod contents-from-... |
2923378085e91788405b72fd81cd476f92f960e70967b31547d8c7fe6b8de928 | bet365/soap | soap_parse_wsdl_2_0.erl | %%
%% %CopyrightBegin%
%%
Copyright Hillside Technology Ltd. 2016 . 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 ap... | null | https://raw.githubusercontent.com/bet365/soap/856b5c418d8d40a6b5bcbbe3fd390c6a0b8d4f18/src/soap_parse_wsdl_2_0.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 Hillside Technology Ltd. 2016 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Since this is based on the SOAP 1.1 version , SOAP 1.1 terminolgy is
-module(soap_parse_wsdl_2_0).
-include... |
fb6cd1c22812ed7a300d9b7c2b645aaad66700fe174e209edd810d6cce5eccd3 | xtdb/core2 | table.clj | (ns core2.operator.table
(:require [clojure.spec.alpha :as s]
[core2.error :as err]
[core2.expression :as expr]
[core2.logical-plan :as lp]
[core2.rewrite :refer [zmatch]]
[core2.types :as types]
[core2.util :as util]
[core2.vector.in... | null | https://raw.githubusercontent.com/xtdb/core2/3adeb391ca4dd73a3f79faba8024289376597d23/core/src/main/clojure/core2/operator/table.clj | clojure | HACK: this is quite heavyweight to calculate a single value - | (ns core2.operator.table
(:require [clojure.spec.alpha :as s]
[core2.error :as err]
[core2.expression :as expr]
[core2.logical-plan :as lp]
[core2.rewrite :refer [zmatch]]
[core2.types :as types]
[core2.util :as util]
[core2.vector.in... |
ca4355d04d380c1603fb2519678ba2dc82e239fb4f1e6194c73f9319cd0fca96 | mathematical-systems/clml | xerbla.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/blas/xerbla.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 :... |
a1163bf65959e9df136e5b42de5e427866762829d2e372b9157f975b83f51547 | dterei/SafeHaskellExamples | GenBin.hs | # LANGUAGE DefaultSignatures #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
module GenBin (Bin(..), Cerial(..), Private) where
import GHC.Generics
import Data.Bits
import Data.Char
data Private a = Private a
-- | Binary data encoding
data Bin = O | I deriving (Show, Eq)
| Serialize type class
class Ce... | null | https://raw.githubusercontent.com/dterei/SafeHaskellExamples/0f7bbb53cf1cbb8419ce3a4aa4258b84be30ffcc/Generics/GenBin.hs | haskell | | Binary data encoding
------------------------------------------------------------
Implementation Internals
------------------------------------------------------------
Generic Deriving | # LANGUAGE DefaultSignatures #
# LANGUAGE TypeOperators #
# LANGUAGE FlexibleContexts #
module GenBin (Bin(..), Cerial(..), Private) where
import GHC.Generics
import Data.Bits
import Data.Char
data Private a = Private a
data Bin = O | I deriving (Show, Eq)
| Serialize type class
class Cerial a where
put :: a ... |
cce8138163c7636a3b5a887f9cc5b48d4438c182c903a786025a872a11caf79a | jordwalke/rehp | main.ml | include Test_nats
include Test_big_ints
include Test_ratios
include Test_nums
include Test_io
let () = Test.end_tests ()
| null | https://raw.githubusercontent.com/jordwalke/rehp/f122b94f0a3f06410ddba59e3c9c603b33aadabf/lib/tests/lib-num/main.ml | ocaml | include Test_nats
include Test_big_ints
include Test_ratios
include Test_nums
include Test_io
let () = Test.end_tests ()
| |
9fb7b73ea13dc444bf235792c257c67feb8357d5f0d0ce06e95ad7d5507947f6 | awslabs/s2n-bignum | bignum_montsqr_p521.ml |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
(* =================================================================... | null | https://raw.githubusercontent.com/awslabs/s2n-bignum/824c15f908d7a343af1b2f378cfedd36e880bdde/arm/proofs/bignum_montsqr_p521.ml | ocaml | =========================================================================
=========================================================================
*** print_literal_from_elf "arm/p521/bignum_montsqr_p521.o";;
***
arm_CSETM X11 Condition_CC
arm_CINV X11 X11 Condition_CC
arm_ADDS X13 X12 X22
arm_ADDS X13 X13... |
* Copyright Amazon.com , Inc. or its affiliates . All Rights Reserved .
* SPDX - License - Identifier : Apache-2.0 OR ISC
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0 OR ISC
*)
Montgomery squaring modulo p_521 . ... |
bfa0ae8c11bab2745a2e2e2d578c0a2054eddde2dcb7624cfaa34e1b7bd9dd4c | abdulapopoola/SICPBook | Ex1.33.scm | #lang planet neil/sicp
(define (filtered-accumulate combiner null-value term a next b filter)
(define (iter a result)
(cond ((> a b) result)
((filter (term a)) (iter (next a) (combiner (term a) result)))
(else (iter (next a) result))))
(iter a null-value))
;;HELPERS
(define (inc x) (+ x 1)... | null | https://raw.githubusercontent.com/abdulapopoola/SICPBook/c8a0228ebf66d9c1ddc5ef1fcc1d05d8684f090a/Chapter%201/1.3/Ex1.33.scm | scheme | HELPERS
sum of primes; prime? predicate assumed to exist
product of all the positive integers less than n that are relatively prime to n
sum of even numbers | #lang planet neil/sicp
(define (filtered-accumulate combiner null-value term a next b filter)
(define (iter a result)
(cond ((> a b) result)
((filter (term a)) (iter (next a) (combiner (term a) result)))
(else (iter (next a) result))))
(iter a null-value))
(define (inc x) (+ x 1))
(define ... |
5615dce62174ca8e631367a5b8aac5adc6b54e3fce80a5d7fc23ce494a9e81f2 | craigl64/clim-ccl | system.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 -*-
(in-package :CL-USER)
#+ANSI-CL (pushnew :clx-ansi-common-lisp *features*)
(clsm:define-system :clim-xlib
(:pretty-name "CLIM XLIB"
:default-pathname "clim2:xlib;"
:journal-directory "clim2:patches;"
... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/xlib/system.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CL - USER ; Base : 10 -*- |
(in-package :CL-USER)
#+ANSI-CL (pushnew :clx-ansi-common-lisp *features*)
(clsm:define-system :clim-xlib
(:pretty-name "CLIM XLIB"
:default-pathname "clim2:xlib;"
:journal-directory "clim2:patches;"
:patchable t)
(:module pkg ("package") (:type :lisp-read-only))
(:serial pkg... |
3a853afc24f23b4ef3e3a320f34d5ea52d8b30026f65142a7b2a5bbaac552857 | ghc/testsuite | tcfail013.hs | module ShouldFail where
f [] = 1
f True = 2
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail013.hs | haskell | module ShouldFail where
f [] = 1
f True = 2
| |
5047697694d596986ac788f58fe5a000c747b223dc3ac6707f1b5ac61e602e9c | Liqwid-Labs/plutus-extra | Extra.hs | # OPTIONS_GHC -fno - omit - interface - pragmas #
module PlutusTx.AssocMap.Extra (alter) where
--------------------------------------------------------------------------------
import Data.Kind (Type)
--------------------------------------------------------------------------------
import PlutusTx.AssocMap (Map)
imp... | null | https://raw.githubusercontent.com/Liqwid-Labs/plutus-extra/347dd304e9b580d1747439a888bfaa79f1c5a25e/plutus-extra/src/PlutusTx/AssocMap/Extra.hs | haskell | ------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------------------------------------------------------------------
| Alter a value that may or may not already exist in a map given a key | # OPTIONS_GHC -fno - omit - interface - pragmas #
module PlutusTx.AssocMap.Extra (alter) where
import Data.Kind (Type)
import PlutusTx.AssocMap (Map)
import PlutusTx.AssocMap qualified as AssocMap
import PlutusTx.Prelude (Eq, Maybe (Just, Nothing))
It would be nice if PlutusTx . AssocMap exposed unionWith .
#... |
9c36e6c5dc869fea5a969c75a9bac8995dc40cba2f9024990af365384c4b1759 | sol/doctest | ModuleB.hs | module ModuleB (fib) where
-- |
> > > fib 10
55
> > > fib 5
5
fib :: Integer -> Integer
fib = foo
-- |
> > > foo 10
55
> > > foo 5
5
foo :: Integer -> Integer
foo 0 = 0
foo 1 = 1
foo n = foo (n - 1) + foo (n - 2)
| null | https://raw.githubusercontent.com/sol/doctest/ec6498542986b659f50e961b02144923f6f41eba/test/integration/bugfixMultipleModules/ModuleB.hs | haskell | |
| | module ModuleB (fib) where
> > > fib 10
55
> > > fib 5
5
fib :: Integer -> Integer
fib = foo
> > > foo 10
55
> > > foo 5
5
foo :: Integer -> Integer
foo 0 = 0
foo 1 = 1
foo n = foo (n - 1) + foo (n - 2)
|
02d13d71869a046c1cf41c8eb9909f9111ee778884c4e7a2640abe7e1af7ce69 | codinuum/cca | f_format.ml |
Copyright 2013 - 2018 RIKEN
Copyright 2018 - 2020 Chiba Institude of Technology
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 b... | null | https://raw.githubusercontent.com/codinuum/cca/88ea07f3fe3671b78518769d804fdebabcd28e90/src/ast/analyzing/langs/fortran/parsing/src/labels/f_format.ml | ocaml |
Copyright 2013 - 2018 RIKEN
Copyright 2018 - 2020 Chiba Institude of Technology
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 b... | |
b59ffc2464e44490045fe71f5d2a38692bce2df82b91f8b4eeef5bc433d8f9d9 | tommaisey/aeon | synthesis.scm | ;; Convenience functions and macros that streamline our use of
the rsc3 library to communicate with SuperCollider .
(library (synthesis)
(export send-synth
letc src-synth fx-synth
get-bus-num
private-bus
root-group
make-unused-group-id
make-env-gen
... | null | https://raw.githubusercontent.com/tommaisey/aeon/00fabee1a0639add66d5079e06be2963f2b80130/libs/synthesis.scm | scheme | Convenience functions and macros that streamline our use of
Events with :group will be added to the given node group.
Events with :fx will be added to the end of the given node group
Events with :control will send control messages to all nodes in
the :group they are assigned to.
Defines some globally reserved bus... | the rsc3 library to communicate with SuperCollider .
(library (synthesis)
(export send-synth
letc src-synth fx-synth
get-bus-num
private-bus
root-group
make-unused-group-id
make-env-gen
make-asr
make-adsr
make-ar
ma... |
42a8e99e78d213157342cbecede8d6c3a4654293dfe3dd0b65003b5572fc7cca | cubicle-model-checker/cubicle | functory.ml | (**************************************************************************)
(* *)
Cubicle
(* *)
... | null | https://raw.githubusercontent.com/cubicle-model-checker/cubicle/00f09bb2d4bb496549775e770d7ada08bc1e4866/why/extraction_api/functory.ml | ocaml | ************************************************************************
... | Cubicle
Copyright ( C ) 2011 - 2013
and
Universite Paris - Sud 11
This file is distributed under the terms ... |
d878569c8c83fb51c161c383d730019d2d8fa0c7fc52a7e869b4ec23cd66a372 | markandrus/twilio-haskell | Participants.hs | {-#LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
{-#LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
-------------------------------------------------------------------------------
-- |
-- Module : Twilio.Conference.Participants
Copyright : ( C ) 2017... | null | https://raw.githubusercontent.com/markandrus/twilio-haskell/00704dc86dbf2117b855b1e2dcf8b6c0eff5bfbe/src/Twilio/Conference/Participants.hs | haskell | #LANGUAGE DeriveDataTypeable #
#LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
|
Module : Twilio.Conference.Participants
License : BSD-style (see the file LICENSE)
Stability : provisional
------------------------------------------------------... | # LANGUAGE DeriveGeneric #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ViewPatterns #
Copyright : ( C ) 2017-
Maintainer : < >
module Twilio.Conference.Participants
Participants(..)
) where
import Control.Applicative
import Data.Aeson
import Data.Data
import Data.Maybe
import Data.Monoid
im... |
eeb911851243e9e750d3c8727406f60ba0e5f191d88f5b61a3009083599333d1 | tweag/funflow2 | Executor.hs | # LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
-- | Executor for external tasks.
--
-- An executor will poll for tasks on the co-ordinator, mark them as in
-- progress and then execute them.
--
-- You probably want... | null | https://raw.githubusercontent.com/tweag/funflow2/642cbb6a1eb3c03b31fe32d22886e4eba4b877cc/external-executor/src/Control/External/Executor.hs | haskell | # LANGUAGE OverloadedStrings #
| Executor for external tasks.
An executor will poll for tasks on the co-ordinator, mark them as in
progress and then execute them.
You probably want to start with 'executeLoop'.
| The result already exists in the store and there is no need
to execute. This is also returne... | # LANGUAGE LambdaCase #
# LANGUAGE QuasiQuotes #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TemplateHaskell #
module Control.External.Executor where
import Control.Arrow (second)
import Control.Concurrent (threadDelay)
import Control.Concurrent.Async
import Control.Concurrent.MVar
import Control.Exception.Safe
impor... |
1dcc709c170c671c7441983efe025b48db3611e16c68802b06b6b4e970032823 | georgegarrington/Syphon | Module.hs | module AST.Module where
import Data.Maybe
import qualified Data.Map as M
import qualified Data.Set as S
import AST.Definition as Dfn
import AST.Expression
All the definitions the user has defined will be bundled together in a module data type
i.e. the type aliases , traits defintiions and trait exhibitions , , ... | null | https://raw.githubusercontent.com/georgegarrington/Syphon/402a326b482e3ce627a15b651b3097c2e09e8a53/src/AST/Module.hs | haskell | Contains init, update, view, effect, subscribe and initEffect
Any modules that the import is contained in seperated by "."
The module being imported
If you want to explicitly reference the module as an alias, if no alias then ""
Any definitions hidden from the module
Check if the constructor takes arguments or not
Empt... | module AST.Module where
import Data.Maybe
import qualified Data.Map as M
import qualified Data.Set as S
import AST.Definition as Dfn
import AST.Expression
All the definitions the user has defined will be bundled together in a module data type
i.e. the type aliases , traits defintiions and trait exhibitions , , ... |
551ff47f72b83e435b8adcab27938a1dbc0560e918b48b189acbba626934811b | thierry-martinez/pyast | pyparse.ml | module Version = Pyast_utils.Version
type compile_mode = Exec | Eval | Single
module type S = sig
include Union.S
val version : Version.t
module Parse (Builder : Union.S) : sig
val mod_ : Py.Object.t -> Builder.mod_
end
module To (Builder : Union.S) : sig
val mod_ : mod_ -> Builder.mod_
end
... | null | https://raw.githubusercontent.com/thierry-martinez/pyast/6544e93827f2ddb02546d7e51522fc3ef1918aee/pyast/pyparse.ml | ocaml | module Version = Pyast_utils.Version
type compile_mode = Exec | Eval | Single
module type S = sig
include Union.S
val version : Version.t
module Parse (Builder : Union.S) : sig
val mod_ : Py.Object.t -> Builder.mod_
end
module To (Builder : Union.S) : sig
val mod_ : mod_ -> Builder.mod_
end
... | |
b66999d26ed64554cc796ab707fa1bbd42ee0e55f3c9c7017f68b07362ccc1a9 | jscl-project/jscl | string.lisp | ;;; string.lisp
JSCL is free software : you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation , either version 3 of the
;; License, or (at your option) any later version.
;;
JSCL is distributed in the hope that it will be useful ... | null | https://raw.githubusercontent.com/jscl-project/jscl/d38eec2aeb47d04f1caf3d1cda82dc968d67c305/src/string.lisp | lisp | string.lisp
License, or (at your option) any later version.
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.
ran off the end of s1
found a difference
just like string/= but with char-equal inst... |
JSCL is free software : you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation , either version 3 of the
JSCL is distributed in the hope that it will be useful , but
You should have received a copy of the GNU General Public Lice... |
a08bf3eb06bded504bcfc38ed9992783605c259a76720a3363c571d59f0e8ce9 | triffon/fp-2022-23 | 10.count-pairs-gcd.rkt | #lang racket
(require rackunit)
(require rackunit/text-ui)
(require "common.03.rkt")
# # # Зад 10
( ` x`,`y ` ) от интервала [ a , b ] , които делител равен на ` n ` .
(define (count-pairs-gcd n a b)
(define (term x)
(define (inner-term y)
(if (= n (gcd x y))
1
0))
(... | null | https://raw.githubusercontent.com/triffon/fp-2022-23/0c6f1c2b47bc67494f4ca6d004e0f6cf4de17be7/exercises/cs2/03.scheme.hof-accumulate/solutions/10.count-pairs-gcd.rkt | racket | #lang racket
(require rackunit)
(require rackunit/text-ui)
(require "common.03.rkt")
# # # Зад 10
( ` x`,`y ` ) от интервала [ a , b ] , които делител равен на ` n ` .
(define (count-pairs-gcd n a b)
(define (term x)
(define (inner-term y)
(if (= n (gcd x y))
1
0))
(... | |
0f4c84bbc90fcacb82068d43bb55167769cc5a68aeb3071d5f25cd08a374436e | typedclojure/typedclojure | recur.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/45556897356f3c9cbc7b1b6b4df263086a9d5803/typed/clj.checker/src/typed/cljc/checker/check/recur.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 ) , contributors .
(ns typed.cljc.checker.check.recur
(:require [typed.cljc.checker.utils :as u]
[typed.cljc.checker.type-rep :as r]
[clojure.core.typed.util-vars :as vs]
[typed.cljc.checker.check.recur-utils :as recur-u]
[clojure.core.typed.er... |
25c7e6ac0493aa772a6c10064117da0b05e0f80e87ed85b51af04cf5fda0a7e2 | ksaveljev/yampa-2048 | Yampa.hs | module Graphics.Gloss.Interface.FRP.Yampa (playYampa, InputEvent) where
import Control.Monad (when)
import Data.IORef (newIORef, writeIORef, readIORef)
import Graphics.Gloss (Display, Color, Picture, blank)
import Graphics.Gloss.Interface.IO.Game (playIO)
import FRP.Yampa (Event(..), SF, reactInit, react)
import Type... | null | https://raw.githubusercontent.com/ksaveljev/yampa-2048/c436e59cd6de3ef024f4f8cf9ddfdef9facd5529/src/Graphics/Gloss/Interface/FRP/Yampa.hs | haskell | | Play the game in a window, updating when the value of the provided
^ The display method
^ The background color
An action to convert the world to a picture
A function to handle input events | module Graphics.Gloss.Interface.FRP.Yampa (playYampa, InputEvent) where
import Control.Monad (when)
import Data.IORef (newIORef, writeIORef, readIORef)
import Graphics.Gloss (Display, Color, Picture, blank)
import Graphics.Gloss.Interface.IO.Game (playIO)
import FRP.Yampa (Event(..), SF, reactInit, react)
import Type... |
5402d27678ff512d04d45cbcea620aec93a1d65d1b6fd8fbab6673e5914c78f8 | grin-compiler/grin | SimpleDeadVariableElimination.hs | # LANGUAGE LambdaCase #
module Transformations.Optimising.SimpleDeadVariableElimination where
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Monoid
import Data.Functor.Foldable as Foldable
import qualified Data.Foldable
import Grin.Grin
impor... | null | https://raw.githubusercontent.com/grin-compiler/grin/44ac2958810ecee969c8028d2d2a082d47fba51b/grin/src/Transformations/Optimising/SimpleDeadVariableElimination.hs | haskell | TODO: Write for dead code elimination.???
if all the variables
and are not referred | # LANGUAGE LambdaCase #
module Transformations.Optimising.SimpleDeadVariableElimination where
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Monoid
import Data.Functor.Foldable as Foldable
import qualified Data.Foldable
import Grin.Grin
impor... |
770272efcca2d3eebb95d3ee11d86bc70d4a8016e309504608d067eeb2d183a5 | haskell-servant/servant-multipart | Upload.hs | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
import Data.Proxy
import Network.HTTP.Client hiding (Proxy)
import Network.Socket (withSocketsDo)
import Servant.API
import Servant.Client (client, mkClientEnv, runClientM)
import Ser... | null | https://raw.githubusercontent.com/haskell-servant/servant-multipart/909539ed934d2e4488c109aa49c0abbb33eb483c/servant-multipart-client/exe/Upload.hs | haskell | # LANGUAGE OverloadedStrings #
Our API, which consists in a single POST endpoint at /
that takes a multipart/form-data request body and
pretty-prints the data it got to stdout before returning 0.
We want to load our file from disk, so we need to convert
the 'Mem's in the serverside API to 'Tmp's | # LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE TypeFamilies #
import Data.Proxy
import Network.HTTP.Client hiding (Proxy)
import Network.Socket (withSocketsDo)
import Servant.API
import Servant.Client (client, mkClientEnv, runClientM)
import Servant.Client.Core (BaseUrl (Bas... |
45c594d085e457bb7a693efc96bb8c6acb0a659618a9f12c43eb2fc8303f5677 | coq/coq | coqargs.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/c2d9b66ddd5815b8e256b390950447e40cc57bb4/sysinit/coqargs.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
84ec5282219eaa7a956b218a16f6dbd4ed47c8dc6a186d10179b6b81abdd3d64 | joyofclojure/book-source | sql.clj | (ns joy.sql
(:use [clojure.string :as str :only []]))
(defn shuffle-expr [expr]
(if (coll? expr)
(if (= (first expr) `unquote)
"?"
(let [[op & args] expr]
(str "(" (str/join (str " " op " ")
(map shuffle-expr args)) ")")))
expr))
(comment
(shuffle-expr 42)... | null | https://raw.githubusercontent.com/joyofclojure/book-source/b76ef15248dac88c7b1c77c2d461f3aa522a1461/src/clj/joy/sql.clj | clojure | => " LEFT JOIN Y ON (X.a = Y.b)"
=> " LEFT JOIN Y ON (X.a = Y.b)"
=> " FROM X LEFT JOIN Y ON (X.a = Y.b)" | (ns joy.sql
(:use [clojure.string :as str :only []]))
(defn shuffle-expr [expr]
(if (coll? expr)
(if (= (first expr) `unquote)
"?"
(let [[op & args] expr]
(str "(" (str/join (str " " op " ")
(map shuffle-expr args)) ")")))
expr))
(comment
(shuffle-expr 42)... |
892238cf8c2cb2ba8114e88d45f91c63cc715aafabd8b4bbaf40313b62ce5961 | rosejn/Peer | distributed_queries.clj | (ns example.distributed-queries
(:use [plasma util graph api construct]
[peer core config url connection]
test-utils
clojure.stacktrace)
(:require [logjam.core :as log]
[lamina.core :as lamina]
[plasma.query :as q]))
People : alice , , , eve
; TODO: figure out ... | null | https://raw.githubusercontent.com/rosejn/Peer/f79c39f5155def9de224207922658587fa576e2a/test/example/distributed_queries.clj | clojure | TODO: figure out how to deal with timestamps
create our imaginary peers
add peer roots as proxies to local graph
Get peer projects of the genre jazz
(query me (with-project-info (peer-projects-by-genre "jazz")))
Add a proxy node to the local graph pointing to the root of the remote
graph.
Now issue a query that ... | (ns example.distributed-queries
(:use [plasma util graph api construct]
[peer core config url connection]
test-utils
clojure.stacktrace)
(:require [logjam.core :as log]
[lamina.core :as lamina]
[plasma.query :as q]))
People : alice , , , eve
(comment defn make... |
f3ca2968b540197531a46e5183102273ed00a1e552356b8290f9704d966e4df7 | graninas/Functional-Design-and-Architecture | Simulator.hs | module Andromeda.Simulator
( module Andromeda.Simulator.SimulationCompiler
, module Andromeda.Simulator.SimulationModel
) where
import Andromeda.Simulator.SimulationCompiler
import Andromeda.Simulator.SimulationModel
| null | https://raw.githubusercontent.com/graninas/Functional-Design-and-Architecture/1736abc16d3e4917fc466010dcc182746af2fd0e/First-Edition/BookSamples/CH05/5.2%20Pure%20State/Andromeda/Simulator.hs | haskell | module Andromeda.Simulator
( module Andromeda.Simulator.SimulationCompiler
, module Andromeda.Simulator.SimulationModel
) where
import Andromeda.Simulator.SimulationCompiler
import Andromeda.Simulator.SimulationModel
| |
350db4036802634ae55b953c0ebf385c8d7943c41ad08787d72e3f10daeda540 | coccinelle/coccinelle | get_constants2.ml |
* This file is part of Coccinelle , licensed under the terms of the GPL v2 .
* See copyright.txt in the Coccinelle source code for more information .
* The Coccinelle source code can be obtained at
* This file is part of Coccinelle, licensed under the terms of the GPL v2.
* See copyright.txt in the Cocci... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/2d0014efa4c67f4c3b4687cbcddef7456bad9aac/parsing_cocci/get_constants2.ml | ocaml | This doesn't do the . -> trick of get_constants for record fields, as
that does not fit well with the recursive structure. It was not clear
that that was completely safe either, although eg putting a newline
after the . or -> is probably unusual.
---------------------------------------------------------... |
* This file is part of Coccinelle , licensed under the terms of the GPL v2 .
* See copyright.txt in the Coccinelle source code for more information .
* The Coccinelle source code can be obtained at
* This file is part of Coccinelle, licensed under the terms of the GPL v2.
* See copyright.txt in the Cocci... |
9942992f9f7eb948a1ec1be126c6f9b91dc1ec560f09fe5e1f9c3ebf2e5fca8b | tov/shcaml | reader.ml | open Util
type raw_line = {
content : string;
before : string;
after : string;
}
let raw_of_string ?(before="") ?(after = "\n") s = {
content = s;
before = before;
after = after;
}
type t = in_channel -> raw_line
let lines = raw_of_string % input_line
This adds to the end of the last line... | null | https://raw.githubusercontent.com/tov/shcaml/43ae852a00e3a11520f90f2451baa71863409774/lib/reader.ml | ocaml | This could be optimized, but it's not necessary unless there are
* lines that get continued many times. | open Util
type raw_line = {
content : string;
before : string;
after : string;
}
let raw_of_string ?(before="") ?(after = "\n") s = {
content = s;
before = before;
after = after;
}
type t = in_channel -> raw_line
let lines = raw_of_string % input_line
This adds to the end of the last line... |
0391274ec634f9b1f4419292e0450b581d62dd6d794e02d5cf7c436d3f0e8e55 | mmsbrggr/hsudoku | SolverSpec.hs | module Sudoku.SolverSpec (main, spec) where
import Data.Maybe (fromJust, isJust)
import Sudoku.Solver
import Sudoku.Type
import Test.Hspec
import Test.QuickCheck
import TestData
-- `main` is here so that this module can be run from GHCi on its own. It ... | null | https://raw.githubusercontent.com/mmsbrggr/hsudoku/7f20491c2d13213a0ba311595f3294123f7dd89c/test/Sudoku/SolverSpec.hs | haskell | `main` is here so that this module can be run from GHCi on its own. It is
-- not needed for automatic spec discovery. | module Sudoku.SolverSpec (main, spec) where
import Data.Maybe (fromJust, isJust)
import Sudoku.Solver
import Sudoku.Type
import Test.Hspec
import Test.QuickCheck
import TestData
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "solve... |
36ca3b7af2636055f35769d196f8c6bbd31698c4417d072c6beef59b04a47814 | zkincaid/duet | bigtop.ml | open Srk
open Syntax
module Ctx = SrkAst.Ctx
module Infix = Syntax.Infix(Ctx)
let srk = Ctx.context
let generator_rep = ref false
let file_contents filename =
let chan = open_in filename in
let len = in_channel_length chan in
let buf = Bytes.create len in
really_input chan buf 0 len;
close_in chan;
buf
... | null | https://raw.githubusercontent.com/zkincaid/duet/162d3da830f12ab8e8d51f7757cddcb49c4084ca/srk/src/bigtop.ml | ocaml | TODO: let user pick iter operation | open Srk
open Syntax
module Ctx = SrkAst.Ctx
module Infix = Syntax.Infix(Ctx)
let srk = Ctx.context
let generator_rep = ref false
let file_contents filename =
let chan = open_in filename in
let len = in_channel_length chan in
let buf = Bytes.create len in
really_input chan buf 0 len;
close_in chan;
buf
... |
c4fa0bcca7c725ff1f0c8f9ac40cf8b27d6634c30d98b729f2a657773043551e | TDacik/Deadlock | test_main.ml | open Deadlock_options
let main () =
Self.feedback "Running %s unit tests" (Unit_tests.get ());
match Unit_tests.get () with
| "cycle_detection" -> Cycle_detection_test.run ()
| "lockset_analysis" -> Lockset_analysis_test.run ()
| "abstraction_refinement" -> Abstraction_refinement_test.run ()
... | null | https://raw.githubusercontent.com/TDacik/Deadlock/1b9965c04416885678b5ba7712960412193fd8e1/src/unit_tests/test_main.ml | ocaml | open Deadlock_options
let main () =
Self.feedback "Running %s unit tests" (Unit_tests.get ());
match Unit_tests.get () with
| "cycle_detection" -> Cycle_detection_test.run ()
| "lockset_analysis" -> Lockset_analysis_test.run ()
| "abstraction_refinement" -> Abstraction_refinement_test.run ()
... | |
8104817aaefec578307ea525c8531305b9987d402363cc68461a19932d3a6697 | coq/coq | termops.mli | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/8f1590f7840d0dff71fa9b7a7bbc1ed01d779359/engine/termops.mli | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
eeabe86975705d866fc3345d2bbec04017ac176512cacf4a14a166601cfc7130 | lsevero/abclj | core_test.clj | (ns abclj.core-test
(:import [org.armedbear.lisp Lisp LispObject LispInteger Cons StandardObject]
[abclj.java UnhandledCondition])
(:require [clojure.test :refer :all]
[abclj
[core :refer :all]]))
(deftest with-cl-test
(testing
(is (instance? LispInteger (with-cl '(progn 1... | null | https://raw.githubusercontent.com/lsevero/abclj/9f5a10aa98789a94f550b13d07e57b4fcefccfab/test/abclj/core_test.clj | clojure | (ns abclj.core-test
(:import [org.armedbear.lisp Lisp LispObject LispInteger Cons StandardObject]
[abclj.java UnhandledCondition])
(:require [clojure.test :refer :all]
[abclj
[core :refer :all]]))
(deftest with-cl-test
(testing
(is (instance? LispInteger (with-cl '(progn 1... | |
11a5403eeb2bb9e3ae95bd93e610a96f0dc6aa3aeb6793c8e56a941e1691a397 | oscoin/oscoin | Systemd.hs | # LANGUAGE DataKinds #
module Oscoin.Deployment.Internal.Systemd
( Unit
, mkUnit
, multiUserTarget
, gcrOnlineTarget
, UnitSection
, ServiceSection
, InstallSection
, RestartPolicy (..)
, Service
, renderService
, dockerDaemonService
)
where
import Oscoin.P... | null | https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/src/Oscoin/Deployment/Internal/Systemd.hs | haskell | # LANGUAGE DataKinds #
module Oscoin.Deployment.Internal.Systemd
( Unit
, mkUnit
, multiUserTarget
, gcrOnlineTarget
, UnitSection
, ServiceSection
, InstallSection
, RestartPolicy (..)
, Service
, renderService
, dockerDaemonService
)
where
import Oscoin.P... | |
57f6bfc5236ffe482ea6389ef746c5697bf504b160c5be305e82821a82b7c3de | mejgun/haskell-tdlib | SavedCredentials.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Data.SavedCredentials where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- |
data SavedCredentials = -- | Contains information about saved payment credentials @id Unique identifier of the saved credentials @titl... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/cf563ece2c2270b2079e233c73cbc7dfd2f70281/src/TD/Data/SavedCredentials.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
| Contains information about saved payment credentials @id Unique identifier of the saved credentials @title Title of the saved credentials
|
| |
module TD.Data.SavedCredentials where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
SavedCredentials
title :: Maybe String,
_id :: Maybe String
}
deriving (Eq)
instance Show SavedCredentials where
show
SavedCredentials
{ title = title_,... |
7c3147682773847fd71d11fe4bed4316d8752ec51f17511a7f733bff0af995de | ormf/cm-incudine | cm-incudine-examples.lisp | (ql:quickload "cm-incudine")
;;; enter common music:
(cm)
;;; start incudine's realtime scheduler
(rts)
open
(midi-open-default :direction :output)
;;; after connecting a midi device via qjackctl
(sprout (new midi :time 0))
fudi :
open pd , create an object " netreceive 3001 " and connect a " print " o... | null | https://raw.githubusercontent.com/ormf/cm-incudine/1be490608ce25e8562aafb299ec1178c9c068ba3/src/cm-incudine-examples.lisp | lisp | enter common music:
start incudine's realtime scheduler
after connecting a midi device via qjackctl
open the connection fomr cm to pd:
send a message: | (ql:quickload "cm-incudine")
(cm)
(rts)
open
(midi-open-default :direction :output)
(sprout (new midi :time 0))
fudi :
open pd , create an object " netreceive 3001 " and connect a " print " object to its left outlet
(fudi-open-default :direction :output)
(output (new fudi :time 0 :message "Hallo Pd... |
a9378fc6b69066d49e95a5eeaa1721511ef06045aefa3d13d5c0a76b70d0791e | mhallin/graphql_ppx | lists.ml | open Test_shared
module MyQuery = [%graphql {|
{
lists {
nullableOfNullable
nullableOfNonNullable
nonNullableOfNullable
nonNullableOfNonNullable
}
}
|}]
type qt = < lists : <
nullableOfNullable: string option array option;
nullableOfNonNullable: string array option;
non... | null | https://raw.githubusercontent.com/mhallin/graphql_ppx/5796b3759bdf0d29112f48e43a2f0623f7466e8a/tests_native/lists.ml | ocaml | open Test_shared
module MyQuery = [%graphql {|
{
lists {
nullableOfNullable
nullableOfNonNullable
nonNullableOfNullable
nonNullableOfNonNullable
}
}
|}]
type qt = < lists : <
nullableOfNullable: string option array option;
nullableOfNonNullable: string array option;
non... | |
853b27427c1bfe834293cd82d48c4a37fa2ad2a719c3115b337d51f075d006fa | cushon/project-euler | 17.rkt | #lang racket
; Find the number of (alphabetic) characters required to write out the numbers from
1 to 1000 .
(define (solve)
(define start '(one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen))
(define tens '(() twenty thirty forty fif... | null | https://raw.githubusercontent.com/cushon/project-euler/d7fcbfff0cd59b2c3691293ff35bb2043b409f68/17.rkt | racket | Find the number of (alphabetic) characters required to write out the numbers from | #lang racket
1 to 1000 .
(define (solve)
(define start '(one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen nineteen))
(define tens '(() twenty thirty forty fifty sixty seventy eighty ninety))
(define hundred 'hundred)
(define (list-ref ... |
165d5f54537f9ff58205b7da3d30fb5ef6a6ac197bda8837ddbafc8509d4aaaf | suvash/one-time | project.clj | (defproject one-time "0.9.0-SNAPSHOT"
:author "Suvash Thapaliya"
:description "One Time Password (TOTP and HOTP) library for Clojure. TOTP/HOTP is widely used for Two factor / Multi Factor Authentication."
:url "-time"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org... | null | https://raw.githubusercontent.com/suvash/one-time/2ceb70ecd454d1f4dcc4cf8365e943b45694cbaa/project.clj | clojure | (defproject one-time "0.9.0-SNAPSHOT"
:author "Suvash Thapaliya"
:description "One Time Password (TOTP and HOTP) library for Clojure. TOTP/HOTP is widely used for Two factor / Multi Factor Authentication."
:url "-time"
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org... | |
2869c16f2d8a9e5f61391258a6414f44b84832cc02ab726befdfcd7b8d9376d8 | ashinn/chibi-scheme | test00-read-string.scm |
(define (show-string str)
(display "string: ")
(display (substring str 0 (min (string-length str) 4)))
(display "...\n"))
2 MB
(define str1
(let ((tmp (make-string str-length #\a)))
(string-set! tmp 0 #\")
(string-set! tmp (- str-length 1) #\")
tmp))
(show-string str1)
(define str2 (call-with-i... | null | https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/tests/memory/test00-read-string.scm | scheme |
(define (show-string str)
(display "string: ")
(display (substring str 0 (min (string-length str) 4)))
(display "...\n"))
2 MB
(define str1
(let ((tmp (make-string str-length #\a)))
(string-set! tmp 0 #\")
(string-set! tmp (- str-length 1) #\")
tmp))
(show-string str1)
(define str2 (call-with-i... | |
207fc43b90345df938db6641a888a954581c7a61ac7a476a57822f5ac31cf13f | expipiplus1/orbits | QuickCheck.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE QuasiQuotes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - orphans #
module Physics.Orbit.QuickCheck
( CircularOrbit(..)
, EllipticOrbit(..)
, ParabolicOrbit(..)
, HyperbolicOrbit(..)
, CanonicalOrbit(..)
, pattern... | null | https://raw.githubusercontent.com/expipiplus1/orbits/6cc5c43f50aadc7517a6677ca04363b492474a6a/test/Physics/Orbit/QuickCheck.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE QuasiQuotes #
Also not a weird orbit like circular or non inclined
| Use aerobreaking to shrink an orbit without expending fuel
shrink (CanonicalOrbit o) = CanonicalOrbit <$> shrinkOrbit o
------------------------------------------------------------------------------
Shr... | # LANGUAGE RecordWildCards #
# LANGUAGE PatternSynonyms #
# OPTIONS_GHC -fno - warn - orphans #
module Physics.Orbit.QuickCheck
( CircularOrbit(..)
, EllipticOrbit(..)
, ParabolicOrbit(..)
, HyperbolicOrbit(..)
, CanonicalOrbit(..)
, pattern CircularOrbitF
, pattern EllipticOrbitF
, pattern ParabolicOr... |
bf14a016e8a9d64cb90f07c7d6ab42741a94da1ea3bc2a3e2592454d75ded5c3 | input-output-hk/hydra | Prelude.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
# LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Test.Hydra.P... | null | https://raw.githubusercontent.com/input-output-hk/hydra/130301c7f30a39d6d3419fed08864be0e34960e1/hydra-test-utils/src/Test/Hydra/Prelude.hs | haskell | # LANGUAGE ConstraintKinds #
| Create a unique temporary directory.
| Create a temporary directory for the given 'action' to use.
The directory is removed if and only if the action completes successfuly.
_sometimes_ generates an empty 'clean' file which prevents the 'db' folder
| Open given log file non-buffered i... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Test.Hydra.Prelude (
createSystemTempDirect... |
3a5887ca95672e4629099a67b42598eac3dc76f8ee627e76fce27c7d0d748ca4 | camlp5/camlp5 | location.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/ocaml_stuff/4.10.0/parsing/location.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* { 1 Source code locations ( ranges of positions ) , used in parsetree }
{ b Warning :} this module... |
d7c929e40040b5f941fb295163f08c196f39cbba3e6ef79e6563656bf5c28d72 | Cantido/horizons | core_test.clj | (ns horizons.core-test
(:require [clojure.test :refer :all]
[horizons.core :as core]
[instaparse.core :as insta]
[horizons.async-utils :as asu]
[horizons.test-utils :as test]
[clojure.core.async :as async]
[clojure.java.io :as io]
[co... | null | https://raw.githubusercontent.com/Cantido/horizons/989e0964d5eebb82c3968049ffd05649625bc25d/test/horizons/core_test.clj | clojure | (ns horizons.core-test
(:require [clojure.test :refer :all]
[horizons.core :as core]
[instaparse.core :as insta]
[horizons.async-utils :as asu]
[horizons.test-utils :as test]
[clojure.core.async :as async]
[clojure.java.io :as io]
[co... | |
ef869a81856ff4595fe006cdf85ad14eb415e16589483d0081e16fc5348f419d | ygmpkk/house | Win32Palette.hs | module Win32Palette where
import StdDIS
import Win32Types
import GDITypes
----------------------------------------------------------------
-- Palettes
----------------------------------------------------------------
type StockPalette = WORD
foreign import ccall unsafe "Win32Palette_stub_ffi.h prim_dEFAULT_PALET... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/hslibs/win32/Win32Palette.hs | haskell | --------------------------------------------------------------
Palettes
--------------------------------------------------------------
--------------------------------------------------------------
End
-------------------------------------------------------------- | module Win32Palette where
import StdDIS
import Win32Types
import GDITypes
type StockPalette = WORD
foreign import ccall unsafe "Win32Palette_stub_ffi.h prim_dEFAULT_PALETTE" dEFAULT_PALETTE :: StockPalette
getStockPalette :: StockPalette -> IO HPALETTE
getStockPalette arg1 =
prim_getStockPalette arg1
>>= \... |
5fd89ce40d1bdc4400877c50b2e2d6bafd86e9c9f9ab1234400cc830be898501 | jixiuf/helloerlang | echo_handle.erl | -module(echo_handle).
-export([handle_echo/1]).
-include("../include/base_header.hrl").
-include("../include/debug.hrl").
handle_echo(#c2s_echo{msg=Msg})->
try
echo:cmd_echo(Msg)
catch
throw:ErrorId->
[server_util:build_resp(ErrorId,?S2C_PROTOCOL_ECHO,#s2c_echo{})];
_:_->
... | null | https://raw.githubusercontent.com/jixiuf/helloerlang/3960eb4237b026f98edf35d6064539259a816d58/game_demo/src/logic/echo_handle.erl | erlang | -module(echo_handle).
-export([handle_echo/1]).
-include("../include/base_header.hrl").
-include("../include/debug.hrl").
handle_echo(#c2s_echo{msg=Msg})->
try
echo:cmd_echo(Msg)
catch
throw:ErrorId->
[server_util:build_resp(ErrorId,?S2C_PROTOCOL_ECHO,#s2c_echo{})];
_:_->
... | |
340739e6bfcf27b02cf90659e96f3ffd858457ed963a01333e1987045c421edc | janestreet/universe | parser_intf.ml | open Core_kernel
module type S = sig
* A value of type [ ' a t ] is a regex that parses [ ' a]s .
The matching is implemented using Re2 .
UTF-8 is supported by Re2 but not by this module . This is because we want to use
[ char ] as a character type , but that 's just wrong in a multibyte encod... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/re2/src/parser_intf.ml | ocaml | * [case_sensitive] defaults to [true].
* [to_regex_string] and [to_re2] both forget what a ['a t] knows
about turning the matching strings into ['a]s
* The applicative interface provides sequencing, e.g. [both a b] is a regex that
parses an [a] followed by a [b] and returns both results in a pair.
* [ign... | open Core_kernel
module type S = sig
* A value of type [ ' a t ] is a regex that parses [ ' a]s .
The matching is implemented using Re2 .
UTF-8 is supported by Re2 but not by this module . This is because we want to use
[ char ] as a character type , but that 's just wrong in a multibyte encod... |
54a00772261cc595a7bdebad59c3978638243aa97191ba67dfbde8b913acef2a | hiratara/Haskell-Nyumon-Sample | chap08-samples-8-6-2.hs | module Main where
import Control.Monad.Par
main = do
print $ parquicksort 4 [14, 43, 43, 4, 5, 654, 3, 4]
quicksort :: [Int] -> [Int]
quicksort [] = []
quicksort (x:xs) = quicksort smaller ++ [x] ++ quicksort greater
where
smaller = filter (< x) xs
greater = filter (>= x) xs
parquicksort :: Int -> [Int]... | null | https://raw.githubusercontent.com/hiratara/Haskell-Nyumon-Sample/ac52b741e3b96722f6fc104cfa84078e39f7a241/chap08-samples/chap08-samples-8-6-2.hs | haskell | 第一引数で深さ閾値を渡す
iv1の実行を待って値を取り出す
iv2の実行を待って値を取り出す | module Main where
import Control.Monad.Par
main = do
print $ parquicksort 4 [14, 43, 43, 4, 5, 654, 3, 4]
quicksort :: [Int] -> [Int]
quicksort [] = []
quicksort (x:xs) = quicksort smaller ++ [x] ++ quicksort greater
where
smaller = filter (< x) xs
greater = filter (>= x) xs
parquicksort maxdepth list =... |
f527161b4ce98b1e64e6dfb5a04437baef0db2ee1ee9c3541e18336cbfd0690f | janestreet/base | either.ml | open! Import
include Either_intf
module List = List0
include Either0
let swap = function
| First x -> Second x
| Second x -> First x
;;
let is_first = function
| First _ -> true
| Second _ -> false
;;
let is_second = function
| First _ -> false
| Second _ -> true
;;
let value (First x | Second x) = x
l... | null | https://raw.githubusercontent.com/janestreet/base/1462b7d5458e96569275a1c673df968ecbf3342f/src/either.ml | ocaml | Reuse the value in order to avoid allocation.
Reuse the value in order to avoid allocation, like [First.bind] above. | open! Import
include Either_intf
module List = List0
include Either0
let swap = function
| First x -> Second x
| Second x -> First x
;;
let is_first = function
| First _ -> true
| Second _ -> false
;;
let is_second = function
| First _ -> false
| Second _ -> true
;;
let value (First x | Second x) = x
l... |
2fd0e4fd9c85f4e479f0e08a0ff23ac8f1f61b1e3949a6fdbaff8a834ea29c05 | deadpendency/deadpendency | Server.hs | # LANGUAGE PartialTypeSignatures #
module CRC.Serve.Server
( runServer,
)
where
import CRC.Handler.CheckRunCreatorHandler (checkRunCreatorHandler)
import CRC.Model.AppContext
import CRC.Serve.Api (AppApi (..))
import CRC.Serve.AppHandler
import Network.Wai qualified as Wai
import Network.Wai.Handler.Warp qualifie... | null | https://raw.githubusercontent.com/deadpendency/deadpendency/170d6689658f81842168b90aa3d9e235d416c8bd/apps/check-run-creator/src/CRC/Serve/Server.hs | haskell | # LANGUAGE PartialTypeSignatures #
module CRC.Serve.Server
( runServer,
)
where
import CRC.Handler.CheckRunCreatorHandler (checkRunCreatorHandler)
import CRC.Model.AppContext
import CRC.Serve.Api (AppApi (..))
import CRC.Serve.AppHandler
import Network.Wai qualified as Wai
import Network.Wai.Handler.Warp qualifie... | |
4a768295050ed9cd0731eb60bc8ec8add3511295592c107438d48aa208b5a891 | tisnik/clojure-examples | core.clj | (ns testing2.core
(:gen-class))
(require '[clojure.java.jdbc :as jdbc])
(def changes-db
{:classname "org.sqlite.JDBC"
:subprotocol "sqlite"
:subname "changes.db"
})
(defn read-changes-for-user
[user-name]
(jdbc/query changes-db
[(str "select * from changes where user_name=... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/testing2/src/testing2/core.clj | clojure | (ns testing2.core
(:gen-class))
(require '[clojure.java.jdbc :as jdbc])
(def changes-db
{:classname "org.sqlite.JDBC"
:subprotocol "sqlite"
:subname "changes.db"
})
(defn read-changes-for-user
[user-name]
(jdbc/query changes-db
[(str "select * from changes where user_name=... | |
ac3539298d6d9a1515adeb70126f1054add4eb26c1a320fb4a8a8e0974a16cd8 | c-cube/stimsym | Eval.ml | (* This file is free software. See file "license" for more details. *)
(** {1 Evaluation} *)
open Base_types
module Fmt = CCFormat
module E = Expr
type eval_side_effect = Base_types.eval_side_effect =
| Print_doc of Document.t
| Print_mime of mime_content
let def_fun f = Fun f
let def_rule ~lhs ~rhs =
try
... | null | https://raw.githubusercontent.com/c-cube/stimsym/38c744b5f770b52980abbfe7636a0dc2b91bbeb7/src/core/Eval.ml | ocaml | This file is free software. See file "license" for more details.
* {1 Evaluation}
set of definitions and rules we can use for rewriting
tracing evaluation
@raise No_head if there is no head
lookup
lookup
return all the matches of [pat] against [e], modifying [st]
every time in a backtracking way
easy... |
open Base_types
module Fmt = CCFormat
module E = Expr
type eval_side_effect = Base_types.eval_side_effect =
| Print_doc of Document.t
| Print_mime of mime_content
let def_fun f = Fun f
let def_rule ~lhs ~rhs =
try
let r = Pattern.compile_rule lhs rhs in
Result.Ok (Rewrite r)
with Pattern.Invalid_r... |
7fbc4d295ef98c84e4c6e3f7dc3b66e63d6930f059d223415c0038ca2bdf196e | expipiplus1/vulkan | VK_AMD_display_native_hdr.hs | {-# language CPP #-}
-- | = Name
--
-- VK_AMD_display_native_hdr - device extension
--
= =
--
-- [__Name String__]
-- @VK_AMD_display_native_hdr@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
214
--
-- [__Revision__]
1
--
-- [__Extension and Version Depend... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/70d8cca16893f8de76c0eb89e79e73f5a455db76/src/Vulkan/Extensions/VK_AMD_display_native_hdr.hs | haskell | # language CPP #
| = Name
VK_AMD_display_native_hdr - device extension
[__Name String__]
@VK_AMD_display_native_hdr@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
- Requires @VK_KHR_get_physical_device_pro... | = =
214
1
- Requires support for Vulkan 1.0
-
< -Docs/issues/new?body=[VK_AMD_display_native_hdr ] @anteru%0A*Here describe the issue or question you have about the extension * >
2018 - 12 - 18
- , AMD
- , AMD
- , AMD
- , ... |
acbf8ab1087b27893e1bc2aa44993b7db9e1c1a3b63ebc4cb47c209eaa4ad0c5 | metametadata/aide | var_event.cljc | (ns aide.var-event
"Serializable [[aide.event-api/Event]] which delegates handling to the function stored in a var.
Deserialization currently is not supported in advanced compilation because function names will be minimized.
It can be implemented in the future lib versions."
(:require [aide.event-api :as event... | null | https://raw.githubusercontent.com/metametadata/aide/0828b53503e8c7f54f84e1b140a1d02ad80aff36/src/aide/var_event.cljc | clojure | Note that the instances do not really take the fn value from var. `fn-var-name` is needed for correct serialization/deserialization. | (ns aide.var-event
"Serializable [[aide.event-api/Event]] which delegates handling to the function stored in a var.
Deserialization currently is not supported in advanced compilation because function names will be minimized.
It can be implemented in the future lib versions."
(:require [aide.event-api :as event... |
8e2cafad86a70625987a3b0250b948666fcf4a70d958f7d25bd09218ca242f0d | leksah/leksah | ExternalTool.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE CPP #
# LANGUAGE LambdaCase #
-----------------------------------------------------------------------------
--
-- Module : IDE.Utils.Tools
Copyright : 2007 - 2013 ,
-- License : GPL Nothing
--
-- Maintainer :
-- Stability : provisional
-- Portabi... | null | https://raw.githubusercontent.com/leksah/leksah/ec95f33af27fea09cba140d7cddd010935a2cf52/src/IDE/Utils/ExternalTool.hs | haskell | ---------------------------------------------------------------------------
Module : IDE.Utils.Tools
License : GPL Nothing
Maintainer :
Stability : provisional
Portability :
|
---------------------------------------------------------------------------
the execuatble to "ssh" and the argument... | # LANGUAGE ScopedTypeVariables #
# LANGUAGE CPP #
# LANGUAGE LambdaCase #
Copyright : 2007 - 2013 ,
module IDE.Utils.ExternalTool (
runExternalTool'
, runExternalTool
, isRunning
, interruptBuild
) where
import Prelude ()
import Prelude.Compat
import IDE.Utils.Tool
(interruptProcessGroup... |
18a8b98ef2f41ceb7ac72eeeb87f57d5c5ce46dc2b5935652deffaf545915bf6 | haroldcarr/learn-haskell-coq-ml-etc | Lib.hs | {-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE MultiParamTypeClasses #
module Lib where
import System.Random
import Control.Monad.State
g1 = mkStdGen 1
(r1,g2) = randomR (1::Int, 6::Int) g1
(r2,g3) = randomR (1::Int, 6::Int) g2
(r... | null | https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/random/hc-random/src/Lib.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE RankNTypes # | # LANGUAGE MultiParamTypeClasses #
module Lib where
import System.Random
import Control.Monad.State
g1 = mkStdGen 1
(r1,g2) = randomR (1::Int, 6::Int) g1
(r2,g3) = randomR (1::Int, 6::Int) g2
(r3,g4) = randomR (1::Int, 6::Int) g3
newtype MyState = MyState
{ stdgen :: StdGen }
class RRandom s where
rRando... |
ff2fcab259af89ee44811e98e4432fd95e614e11350aba4d443f2ee9921e4292 | c4-project/c4f | expr_bool.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/fir_gen/src/expr_bool.mli | ocaml | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | |
717609aaf109cb6babca5647605235f02009c053d67c058040916a3476dd4640 | akshaymankar/jsonpath-hs | Execute.hs | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Data.JSONPath.Execute (executeJSONPath, executeJSONPathElement) where
import Data.Aeson
import qualified Data.Aeson.Key as Key
import qualified Data.Aeson.KeyMap as Map
import qualified Data.Foldable as Foldable
import Data.JSONPath.Types
import Data.May... | null | https://raw.githubusercontent.com/akshaymankar/jsonpath-hs/fa7719a62b14e88b3663b6920de16248c4c367b7/src/Data/JSONPath/Execute.hs | haskell | ORMOLU_DISABLE
| Implementation is based on
-wg-jsonpath.github.io/draft-ietf-jsonpath-base/draft-ietf-jsonpath-base.html#name-array-slice-selector | # LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
module Data.JSONPath.Execute (executeJSONPath, executeJSONPathElement) where
import Data.Aeson
import qualified Data.Aeson.Key as Key
import qualified Data.Aeson.KeyMap as Map
import qualified Data.Foldable as Foldable
import Data.JSONPath.Types
import Data.May... |
dc392302c5bc9e4204a8c861f04cfcefbb02f44ce9686896e983876a0b61eef9 | reflectionalist/S9fES | mode-to-string.scm | Scheme 9 from Empty Space , Function Library
By , 2010
; Placed in the Public Domain
;
; (mode->string integer) ==> string
;
; Return a symbolic representation of the access mode specified in
INTEGER . The resulting string is in the same format as used by
; the ls(1) Unix command.
;
; Example: (mode->strin... | null | https://raw.githubusercontent.com/reflectionalist/S9fES/0ade11593cf35f112e197026886fc819042058dd/ext/mode-to-string.scm | scheme | Placed in the Public Domain
(mode->string integer) ==> string
Return a symbolic representation of the access mode specified in
the ls(1) Unix command.
Example: (mode->string #o5751) ==> "rwsr-x--t" | Scheme 9 from Empty Space , Function Library
By , 2010
INTEGER . The resulting string is in the same format as used by
(require-extension sys-unix)
(load-from-library "bitops.scm")
(define (mode->string mode)
(letrec
((bit*?
(lambda (a b)
(not (zero? (bit* a b)))))
(flag
(l... |
05799cbbbc7b3a645580b9ae21a2e8ce210c96c3a92880d167304259259e8987 | hailstorm-hs/hailstorm | Clock.hs | module Hailstorm.Clock
( Clock(..)
, Partition
, Offset
, clockGt
) where
import qualified Data.Map as Map
type Partition = String
type Offset = Integer
newtype Clock = Clock {extractClockMap :: Map.Map Partition Offset}
deriving (Eq, Show, Read, Ord)
| @c1 ` clockGt ` @c2@ returns true if @c1@ ha... | null | https://raw.githubusercontent.com/hailstorm-hs/hailstorm/3c595336038a7a6417a31cb8b1fc38780f27c520/src/Hailstorm/Clock.hs | haskell | as @c2@ and is element-wise greater than @c2@. | module Hailstorm.Clock
( Clock(..)
, Partition
, Offset
, clockGt
) where
import qualified Data.Map as Map
type Partition = String
type Offset = Integer
newtype Clock = Clock {extractClockMap :: Map.Map Partition Offset}
deriving (Eq, Show, Read, Ord)
| @c1 ` clockGt ` @c2@ returns true if @c1@ ha... |
c5676527094d28484d41194c2c1cca1e2638189deedeccdd5d5126fe37cb8b70 | ozjongwon/clojure-fabric | event_hub.clj | Copyright 2017 < >
;;
Licensed under the Apache License , Version 2.0 ( the " License " )
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software
distributed under t... | null | https://raw.githubusercontent.com/ozjongwon/clojure-fabric/18c4e16cd15776d706f961d9b164c9defac60169/src/clojure_fabric/event_hub.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2017 < >
Licensed under the Apache License , Version 2.0 ( the " License " )
distributed under the License is distributed on an " AS IS " BASIS ,
(ns clojure-fabric.event-hub
(:require [clojure-fabric.crypto-suite :as crypto]
[clojure-fabric.proto :as proto]
[clojure-fabr... |
2e7d10f50a5417391ea5e33d1af14147aa12b20f657827fb144d8a05a3d3c578 | corneliuhoffman/spatchcoqocaml | guimarker.ml | open GMain
open GdkKeysyms
open Marker
type feedback ={students:int; cheataverage:float; worstcheat:Marker.cheat}
type score ={student:string; totalscore:float}
type lemma ={name:string; score:float; pen:float}
let remove_book notebook () =
while notebook#current_page >=0 do
notebook#remove_page notebook#current_... | null | https://raw.githubusercontent.com/corneliuhoffman/spatchcoqocaml/1c3416a32199a3bd5c601526783be61e71be61a9/guimarker.ml | ocaml | let strings = Str.split (Str.regexp " \|(") (String.trim res.title) in
let title = String.concat " " (firsttwo (List.filter (fun x-> x!="") strings)) in
let lab = notebook#get_nth_page 0 in
let txt = notebook#children in
let firstpage = (notebook#get_nth_page 0) in
let obj = GtkPack.Box.cast f... | open GMain
open GdkKeysyms
open Marker
type feedback ={students:int; cheataverage:float; worstcheat:Marker.cheat}
type score ={student:string; totalscore:float}
type lemma ={name:string; score:float; pen:float}
let remove_book notebook () =
while notebook#current_page >=0 do
notebook#remove_page notebook#current_... |
fce89a6032b66b9a5eeeffbd830dc3294b566185e55744a8fc28230cfc88498d | rd--/hsc3 | g_tail.help.hs | Sound.Sc3.Lang.Help.viewServerHelp "/g_tail"
| null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Server/g_tail.help.hs | haskell | Sound.Sc3.Lang.Help.viewServerHelp "/g_tail"
| |
2087b49ba244731125d8a1dc825afc8acefcf84a1831ca5ac852fc7a6dd0258d | LightAndLight/indexed-paths | DList.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE InstanceSigs #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
module Data.Path.DList (Path (..), fromList, toList) where
import Control.Category (Category)
import qualified Control.Category (Category (..))
import Data.Path.Class (IsPath (..), SplitAt (..), Uncons (..), Unsnoc (..... | null | https://raw.githubusercontent.com/LightAndLight/indexed-paths/08a0ea175e9756a965cbd45b3b066b92a68e9287/src/Data/Path/DList.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE RankNTypes # | # LANGUAGE InstanceSigs #
# LANGUAGE PolyKinds #
module Data.Path.DList (Path (..), fromList, toList) where
import Control.Category (Category)
import qualified Control.Category (Category (..))
import Data.Path.Class (IsPath (..), SplitAt (..), Uncons (..), Unsnoc (..), append)
import qualified Data.Path.List as List
... |
8e844cecbf3ffbc0400595259de4345cd54684dd038360471e60c494dac19869 | tonsky/Clojure-Sublimed | genclass.clj | Copyright ( c ) . 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 bound by
; ... | null | https://raw.githubusercontent.com/tonsky/Clojure-Sublimed/df1975808c3f2324c87c52d2ae4272a83fd557e4/test_parser/genclass.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 ) . All rights reserved .
(in-ns 'clojure.core)
(import '(java.lang.reflect Modifier Constructor)
'(clojure.asm ClassWriter ClassVisitor Opcodes Type)
'(clojure.asm.commons Method GeneratorAdapter)
'(clojure.lang IPersistentMap))
( defn method - sig [ ^java.lang.reflect . ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.