_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 |
|---|---|---|---|---|---|---|---|---|
d83475a2b3f25842430ed8b34c82b30fd364bb84293b62c5c373fb270ecf3a7a | kana/sicp | ex-2.84.scm | Exercise 2.84 . Using the raise operation of exercise 2.83 , modify the
;;; apply-generic procedure so that it coerces its arguments to have the same
;;; type by the method of successive raising, as discussed in this section. You
will need to devise a way to test which of two types is higher in the
;;; tower. Do ... | null | https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-2.84.scm | scheme | apply-generic procedure so that it coerces its arguments to have the same
type by the method of successive raising, as discussed in this section. You
tower. Do this in a manner that is ``compatible'' with the rest of the
system and will not lead to problems in adding new levels to the tower.
This apply-generic tri... | Exercise 2.84 . Using the raise operation of exercise 2.83 , modify the
will need to devise a way to test which of two types is higher in the
(define (supertype type)
(get 'supertype type))
(put 'supertype 'complex #f)
(put 'supertype 'real 'complex)
(put 'supertype 'rational 'real)
(put 'supertype 'integer '... |
652660f843c575fee89d4a2508e3a5134c9d4ecad0a4adf5734a84f48628bcc3 | hikettei/cl-waffe | network.lisp |
(in-package :cl-waffe-test)
(in-suite :test)
(defparameter x (parameter (!randn `(10 100))))
(defparameter linearlayer1 (linearlayer 100 10 t))
(defparameter linearlayer2 (linearlayer 100 10 nil))
(defparameter denselayer1 (denselayer 100 10 t :relu))
(defparameter denselayer2 (denselayer 100 10 t :sigmoid))
(def... | null | https://raw.githubusercontent.com/hikettei/cl-waffe/b892d5b4b3a031c8cde0b45bb45ac736b8355ef8/t/network.lisp | lisp |
(in-package :cl-waffe-test)
(in-suite :test)
(defparameter x (parameter (!randn `(10 100))))
(defparameter linearlayer1 (linearlayer 100 10 t))
(defparameter linearlayer2 (linearlayer 100 10 nil))
(defparameter denselayer1 (denselayer 100 10 t :relu))
(defparameter denselayer2 (denselayer 100 10 t :sigmoid))
(def... | |
0f88c183a2121d2ededc359f77aab9cd17c4c732dd2e4f65a8513057fcba9c63 | nuvla/api-server | configuration_template_test.cljc | (ns sixsq.nuvla.server.resources.spec.configuration-template-test
(:require
[clojure.spec.alpha :as s]
[clojure.test :refer [deftest]]
[sixsq.nuvla.server.app.params :as p]
[sixsq.nuvla.server.resources.configuration-template :as ct]
[sixsq.nuvla.server.resources.spec.configuration-template :as ct... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/test/sixsq/nuvla/server/resources/spec/configuration_template_test.cljc | clojure | (ns sixsq.nuvla.server.resources.spec.configuration-template-test
(:require
[clojure.spec.alpha :as s]
[clojure.test :refer [deftest]]
[sixsq.nuvla.server.app.params :as p]
[sixsq.nuvla.server.resources.configuration-template :as ct]
[sixsq.nuvla.server.resources.spec.configuration-template :as ct... | |
93ecf9b286927f3b9a91942618c8c685ae502af7d877f90ebb4fd65472725026 | zotonic/zotonic | zotonic_cmd_configtest.erl | @author < >
2019
%% @doc Test if the config files are syntactically ok
Copyright 2019
%%
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 requi... | null | https://raw.githubusercontent.com/zotonic/zotonic/852f627c28adf6e5212e8ad5383d4af3a2f25e3f/apps/zotonic_launcher/src/command/zotonic_cmd_configtest.erl | erlang | @doc Test if the config files are syntactically ok
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 ... | @author < >
2019
Copyright 2019
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(zotonic_cmd_configtest).
-author("Marc Worrell").
-export([info/0, run/1]).
info() ->
"Test if the Zotonic config f... |
b0d2ab6f22b6ff671c288551d1235a15132669e0ec25f5ba8dff94bc8940080b | hjcapple/reading-sicp | exercise_2_30.scm | #lang racket
P75 - [ 练习 2.30 ]
(define (square x)
(* x x))
(define (square-tree tree)
(cond ((null? tree) null)
((not (pair? tree)) (square tree))
(else (cons (square-tree (car tree))
(square-tree (cdr tree))))))
(define (square-tree-2 tree)
(define (f sub-tree)
(if (... | null | https://raw.githubusercontent.com/hjcapple/reading-sicp/7051d55dde841c06cf9326dc865d33d656702ecc/chapter_2/exercise_2_30.scm | scheme | #lang racket
P75 - [ 练习 2.30 ]
(define (square x)
(* x x))
(define (square-tree tree)
(cond ((null? tree) null)
((not (pair? tree)) (square tree))
(else (cons (square-tree (car tree))
(square-tree (cdr tree))))))
(define (square-tree-2 tree)
(define (f sub-tree)
(if (... | |
1dd6bb7f037ac44dd3482773ac6f9dcc79b250c2b983575939551f5625f37f38 | tmfg/mmtis-national-access-point | page.cljs | (ns ote.style.page)
(def page-controls
{:background-color "#F0F0F0"
:margin-bottom "1rem"
:padding-top "2rem"
:width "100%"
:box-shadow "3px 3px 8px -1px rgba(0, 0, 0, .2)"})
(def content
{:padding-bottom "1.25rem"})
| null | https://raw.githubusercontent.com/tmfg/mmtis-national-access-point/6ad0c5a871fba3fb9bbe4595f520571b0a1b7004/ote/src/cljs/ote/style/page.cljs | clojure | (ns ote.style.page)
(def page-controls
{:background-color "#F0F0F0"
:margin-bottom "1rem"
:padding-top "2rem"
:width "100%"
:box-shadow "3px 3px 8px -1px rgba(0, 0, 0, .2)"})
(def content
{:padding-bottom "1.25rem"})
| |
9092a7efb38af805c753ec7a928f971429725d036f5c347bcc97f2c94287c2f9 | UnkindPartition/tasty-html | pass.hs | module Main where
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.SmallCheck as SC
import Test.Tasty.QuickCheck as QC
import Test.Tasty.Runners.Html
import Data.List
import Data.Ord
main = defaultMainWithIngredients (htmlRunner:defaultIngredients) tests
tests :: TestTree
tests = testGroup "Tests" [prope... | null | https://raw.githubusercontent.com/UnkindPartition/tasty-html/0a551207a25bc7b9821db0a3e3cc3910dbc357bb/examples/pass.hs | haskell | the following property does not hold
the following property does not hold
-- the following test does not hold | module Main where
import Test.Tasty
import Test.Tasty.HUnit
import Test.Tasty.SmallCheck as SC
import Test.Tasty.QuickCheck as QC
import Test.Tasty.Runners.Html
import Data.List
import Data.Ord
main = defaultMainWithIngredients (htmlRunner:defaultIngredients) tests
tests :: TestTree
tests = testGroup "Tests" [prope... |
3a80fa0684f8013e6b23386c65f1bcd1659e5fa48668463338124a3f4c42b7eb | graninas/GraphServer | GOCompile.hs | module Structure.GOCompile
(
compileGraphObject
, compileGraphObjectSpec
) where
import qualified Graphics.Rendering.OpenGL as GL
import Structure.GraphObject
import Structure.Texture
import Common.Units
import Common.GLTypes
import Common.Constants
import Misc.BoxSide
-- | Sets texture or/and c... | null | https://raw.githubusercontent.com/graninas/GraphServer/088c234ae840162002f707559cfefc96bcc02bda/src/Structure/GOCompile.hs | haskell | | Sets texture or/and current color to draw next objects.
| Collects actions for specified box side drawings.
| It should be used only in this module.
| Compiles GraphObject into action list structure, which is ready-to-eval. ([IO ()]) | module Structure.GOCompile
(
compileGraphObject
, compileGraphObjectSpec
) where
import qualified Graphics.Rendering.OpenGL as GL
import Structure.GraphObject
import Structure.Texture
import Common.Units
import Common.GLTypes
import Common.Constants
import Misc.BoxSide
setQuadColorSpec :: Prepar... |
6e14eefe7e1a1f0a1b1a8fa1a91ae678d15c555dcf0de27b478fd5e8c9242d58 | isovector/circuitry | Coproduct.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fplugin - opt GHC.TypeLits . : allow - negated - numbers #
module Circuitry.Coproduct where
import Circuitry.Category
import Clash.Sized.Vector (Vec (..))
import qualified Clash.Sized.Vector as V
import ... | null | https://raw.githubusercontent.com/isovector/circuitry/878752b47676ef2f56c1ba9fc1ad427074fd88bb/src/Circuitry/Coproduct.hs | haskell | # OVERLAPPING #
# OVERLAPPING #
This makes the 'fromJust' in 'inj' safe lol
component "scrutinize" | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fplugin - opt GHC.TypeLits . : allow - negated - numbers #
module Circuitry.Coproduct where
import Circuitry.Category
import Clash.Sized.Vector (Vec (..))
import qualified Clash.Sized.Vector as V
import ... |
0d1c38c916c0a06539933c57150e6d80a47eabfce48f77c836c915d0e621e80f | racket/draw | pen.rkt | #lang racket/base
(require racket/class
ffi/unsafe/atomic
"color.rkt"
"syntax.rkt"
"local.rkt"
"bitmap.rkt")
(provide pen%
make-pen
pen-list% the-pen-list
pen-width?
pen-style-symbol?)
(define (pen-style-symbol? s)
(memq s '(transparen... | null | https://raw.githubusercontent.com/racket/draw/a6558bdc18438e784c23d452ffd877dac867a7fd/draw-lib/racket/draw/private/pen.rkt | racket | color width style cap join stipple -> pen%
produce an immutable pen% object
---------------------------------------- | #lang racket/base
(require racket/class
ffi/unsafe/atomic
"color.rkt"
"syntax.rkt"
"local.rkt"
"bitmap.rkt")
(provide pen%
make-pen
pen-list% the-pen-list
pen-width?
pen-style-symbol?)
(define (pen-style-symbol? s)
(memq s '(transparen... |
26474b8ae326ed67dbf8a0d950b2754aa901d5f56f57f4aab7943284d1d24616 | emotiq/emotiq | state-tracker.lisp | (in-package :emotiq/tracker)
(defclass system-state ()
((leader :accessor system-leader :initform nil)
(witnesses :accessor system-witness-list :initform nil)))
;(let (state
; tracking-actor)
a lexical binding at the top - level reduces the effectiveness of the LW debugger
(defparameter *state* nil)
(... | null | https://raw.githubusercontent.com/emotiq/emotiq/9af78023f670777895a3dac29a2bbe98e19b6249/src/state-tracker.lisp | lisp | (let (state
tracking-actor)
don't care about this condition
tbd
whatever is most appropriate - is node-ip is useful, then export it | (in-package :emotiq/tracker)
(defclass system-state ()
((leader :accessor system-leader :initform nil)
(witnesses :accessor system-witness-list :initform nil)))
a lexical binding at the top - level reduces the effectiveness of the LW debugger
(defparameter *state* nil)
(defparameter *tracking-actor* nil)
... |
18cf99c5ea04062f1d07c70f31a2265c86e0121bb53d68b7248b36e9ad999bc3 | nklein/draw | transform.lisp | (in-package #:draw-backend)
(defgeneric %translate (renderer dx dy)
(:documentation "This method shifts the canvas DX points horizontally and DY points vertically."))
(defgeneric %rotate (renderer d)
(:documentation "This method rotates the canvas D degrees."))
(defgeneric %scale (renderer sx sy)
(:documentati... | null | https://raw.githubusercontent.com/nklein/draw/2b7a51fa06c81a46dffc439a35b3b0ac18c94893/src/base/backend/transform.lisp | lisp | (in-package #:draw-backend)
(defgeneric %translate (renderer dx dy)
(:documentation "This method shifts the canvas DX points horizontally and DY points vertically."))
(defgeneric %rotate (renderer d)
(:documentation "This method rotates the canvas D degrees."))
(defgeneric %scale (renderer sx sy)
(:documentati... | |
28cd29bf422f80aa76a4f06581ec41b8df1f4cc79074b6ac9f4e429b8c3b543d | d-cent/objective8 | middleware_test.clj | (ns objective8.unit.middleware-test
(:require [midje.sweet :refer :all]
[cemerick.friend :as friend]
[cemerick.friend.workflows :as workflows]
[objective8.middleware :refer :all]))
(def request {:headers {"api-bearer-token" "some-secure-token"
"api-bearer-n... | null | https://raw.githubusercontent.com/d-cent/objective8/db8344ba4425ca0b38a31c99a3b282d7c8ddaef0/test/objective8/unit/middleware_test.clj | clojure | (ns objective8.unit.middleware-test
(:require [midje.sweet :refer :all]
[cemerick.friend :as friend]
[cemerick.friend.workflows :as workflows]
[objective8.middleware :refer :all]))
(def request {:headers {"api-bearer-token" "some-secure-token"
"api-bearer-n... | |
fd5829a33bb03218bac71412e36bc3c4590513e3d33c6d0dd7cc414fb96c456d | racket/syntax-color | info.rkt | #lang info
(define collection 'multi)
(define deps '("syntax-color-lib"
"syntax-color-doc"))
(define implies '("syntax-color-lib"
"syntax-color-doc"))
(define pkg-desc "Program syntax coloring for editors and typesetting")
(define pkg-authors '(mflatt))
(define license
'(Apache-2... | null | https://raw.githubusercontent.com/racket/syntax-color/02c5faaf6cb3f08ef07069763755e373ef11cd50/syntax-color/info.rkt | racket | #lang info
(define collection 'multi)
(define deps '("syntax-color-lib"
"syntax-color-doc"))
(define implies '("syntax-color-lib"
"syntax-color-doc"))
(define pkg-desc "Program syntax coloring for editors and typesetting")
(define pkg-authors '(mflatt))
(define license
'(Apache-2... | |
e3207ed90983e004c4c357737c23cd1dc998f195033094b8fdb6f3e5a5cb239b | lwhjp/ecmascript | util.rkt | #lang racket/base
(require racket/lazy-require)
(lazy-require
["function.rkt" (make-native-function)])
(provide
make-native-function
native-method)
(define-syntax-rule (native-method args body0 body ...)
(make-native-function
(λ args body0 body ...)))
| null | https://raw.githubusercontent.com/lwhjp/ecmascript/69fcfa42856ea799ff9d9d63a60eaf1b1783fe50/lib/util.rkt | racket | #lang racket/base
(require racket/lazy-require)
(lazy-require
["function.rkt" (make-native-function)])
(provide
make-native-function
native-method)
(define-syntax-rule (native-method args body0 body ...)
(make-native-function
(λ args body0 body ...)))
| |
376a05b64c45c438f71176cd57114820a7024d03da4cfed1b8e7eb2a7308e48b | ghc/hsc2hs | Common.hs | # LANGUAGE CPP #
module Common where
import qualified Control.Exception as Exception
import qualified Compat.TempFile as Compat
import qualified Compat.Process as Proc
import Control.Monad ( when )
import Data.Char ( isSpace )
import Data.List ( foldl' )
import System.IO
#if d... | null | https://raw.githubusercontent.com/ghc/hsc2hs/0b44990f0282755b75091838363ad4a1f4cb245d/Common.hs | haskell | ----------------------------------------------------------------------
Write the output files.
Because of the response files being written and removed after the process
terminates we now need to use process jobs here to correctly wait for all
child processes to terminate. Not doing so would causes a race condition... | # LANGUAGE CPP #
module Common where
import qualified Control.Exception as Exception
import qualified Compat.TempFile as Compat
import qualified Compat.Process as Proc
import Control.Monad ( when )
import Data.Char ( isSpace )
import Data.List ( foldl' )
import System.IO
#if d... |
e7ede676b8ef589d760e9daefa4494cce7dc2771b4640e847a15cca11f955eeb | dgiot/dgiot | emqx_channel.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2019 - 2022 EMQ Technologies Co. , Ltd. 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 o... | null | https://raw.githubusercontent.com/dgiot/dgiot/c601555e45f38d02aafc308b18a9e28c543b6f2c/src/emqx_channel.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2019 - 2022 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
MQTT Channel
-module(emqx_channel).
-include("emqx.hrl").
-include("emqx_mqtt.hrl").
-include... |
ef002109300ef2b23e7e9291536da278224db6f16ad24646abd72b9ff924b442 | input-output-hk/cardano-sl | ChainDifficulty.hs | module Pos.Core.Common.ChainDifficulty
( ChainDifficulty (..)
, HasDifficulty (..)
, isMoreDifficult
) where
import Universum
import Data.Aeson.TH (defaultOptions, deriveJSON)
import Data.SafeCopy (base, deriveSafeCopySimple)
import Pos.Binary.Class... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/src/Pos/Core/Common/ChainDifficulty.hs | haskell | | Chain difficulty represents necessary effort to generate a
chain. In the simplest case it can be number of blocks in chain. | module Pos.Core.Common.ChainDifficulty
( ChainDifficulty (..)
, HasDifficulty (..)
, isMoreDifficult
) where
import Universum
import Data.Aeson.TH (defaultOptions, deriveJSON)
import Data.SafeCopy (base, deriveSafeCopySimple)
import Pos.Binary.Class... |
955da67b8c4b9af1804b00391cc99fcac80fd5ad8a36210a0fac6a9444570dee | bmeurer/ocamljit2 | t02bad.ml | (* Bad (t = t) *)
module rec A : sig type t = B.t end = struct type t = B.t end
and B : sig type t = A.t end = struct type t = A.t end;;
| null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/testsuite/tests/typing-recmod/t02bad.ml | ocaml | Bad (t = t) | module rec A : sig type t = B.t end = struct type t = B.t end
and B : sig type t = A.t end = struct type t = A.t end;;
|
a4bf3c5344ac3575cb746bf2b6e3c7a39eb2a3818c1067e2adbce0200c9e8b3d | Gbury/dolmen | base.ml |
(* Merging builtin parser functions *)
(* ************************************************************************ *)
let noop _ _ = `Not_found
let rec merge l env s =
match l with
| [] -> `Not_found
| f :: r ->
begin match f env s with
| `Not_found -> merge r env s
| ret -> ret
end
(* Smt... | null | https://raw.githubusercontent.com/Gbury/dolmen/21bfd8d221b39dfd72a7938a09a6b2ae85b3c391/src/typecheck/base.ml | ocaml | Merging builtin parser functions
************************************************************************
Smtlib ID splitting
************************************************************************
Low level helpers
************************************************************************
High level helper... |
let noop _ _ = `Not_found
let rec merge l env s =
match l with
| [] -> `Not_found
| f :: r ->
begin match f env s with
| `Not_found -> merge r env s
| ret -> ret
end
type 'ret indexed = [
| `Not_indexed
| `Unary of (string -> 'ret)
| `Binary of (string -> string -> 'ret)
| `Ternar... |
40247c3def485b537f0c466847ac606f0e7ac18c7ac88a7abd1d15848f28c0d4 | MyDataFlow/ttalk-server | ejabberd_sm_backend_sup.erl | %%%-------------------------------------------------------------------
@author
( C ) 2011 ,
%%% @doc
%%%
%%% @end
Created : 18 Nov 2011 by
%%%-------------------------------------------------------------------
-module(ejabberd_sm_backend_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% S... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/apps/ejabberd/src/ejabberd_sm_backend_sup.erl | erlang | -------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------
API
Supervisor callbacks
===================================================================
API functions
=============================================================... | @author
( C ) 2011 ,
Created : 18 Nov 2011 by
-module(ejabberd_sm_backend_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(SERVER, ?MODULE).
( ) - > { ok , Pid } | ignore | { error , Error }
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).... |
409ee456b7bd120d28f1c7022c131ee79e6ce2c576ba08a958ca73b51d38223d | footprintanalytics/footprint-web | activity.clj | (ns metabase.api.activity
(:require [clojure.set :as set]
[clojure.string :as str]
[compojure.core :refer [GET]]
[medley.core :as m]
[metabase.api.common :refer [*current-user-id* defendpoint define-routes]]
[metabase.models.activity :refer [Activity]]
... | null | https://raw.githubusercontent.com/footprintanalytics/footprint-web/d3090d943dd9fcea493c236f79e7ef8a36ae17fc/src/metabase/api/activity.clj | clojure | pull the referenced card IDs out of the dashcards for dashboard activites
that involve adding/removing cards
only existing ids go back
only existing ids go back
don't care about other models
hidden tables, archived cards/dashboards
cards and dashboards? can be 'verified' in enterprise
items may exist in an 'off... | (ns metabase.api.activity
(:require [clojure.set :as set]
[clojure.string :as str]
[compojure.core :refer [GET]]
[medley.core :as m]
[metabase.api.common :refer [*current-user-id* defendpoint define-routes]]
[metabase.models.activity :refer [Activity]]
... |
cf8f934a5114f7b4e87b606f31eb20365a6f0343fa4d93935e9eb132b6a5ea87 | hellonico/origami-fun | morph.clj | (ns opencv4.morph
(:require [opencv4.core :refer :all]))
; -beta/doc/py_tutorials/py_imgproc/py_morphological_ops/py_morphological_ops.html
1 . Erosion
The basic idea of erosion is just like soil erosion only , it erodes away the boundaries of foreground object ( Always try to keep foreground in white ) . So wha... | null | https://raw.githubusercontent.com/hellonico/origami-fun/80117788530d942eaa9a80e2995b37409fa24889/test/opencv4/morph.clj | clojure | -beta/doc/py_tutorials/py_imgproc/py_morphological_ops/py_morphological_ops.html
Opening is just another name of erosion followed by dilation. It is useful in removing noise, as we explained above. Here we use the function, cv2.morphologyEx()
It is the difference between dilation and erosion of an image.
The result... | (ns opencv4.morph
(:require [opencv4.core :refer :all]))
1 . Erosion
The basic idea of erosion is just like soil erosion only , it erodes away the boundaries of foreground object ( Always try to keep foreground in white ) . So what it does ? The kernel slides through the image ( as in 2D convolution ) . A pixel ... |
00242dc09417e94d2d690d98e00a3af2e28649ec3038739f3285463091f4f8d7 | keithfancher/kept | Markdown.hs | module Markdown
( Markdown,
MarkdownOpts (..),
TimeZones (..),
noteToMarkdown,
noteToMarkdownSystemTZ,
)
where
import Data.List (intercalate)
import Data.Text qualified as T
import Data.Time (TimeZone, UTCTime, getTimeZone, utcToZonedTime)
import Data.Time.Format.ISO8601 (iso8601Show)
import Note (... | null | https://raw.githubusercontent.com/keithfancher/kept/21ca2b1f1ac87bb01364962f330562998ae5697a/src/Markdown.hs | haskell | default fields included in YAML front-matter
includes all default fields PLUS the note title, removes title heading in note body
no YAML front-matter at all
below for some more context.
Convert a note to markdown. The time zones are used to display the timestamp
metadata in the user's time zone, rather than the d... | module Markdown
( Markdown,
MarkdownOpts (..),
TimeZones (..),
noteToMarkdown,
noteToMarkdownSystemTZ,
)
where
import Data.List (intercalate)
import Data.Text qualified as T
import Data.Time (TimeZone, UTCTime, getTimeZone, utcToZonedTime)
import Data.Time.Format.ISO8601 (iso8601Show)
import Note (... |
b4c9c78b02a5e0aec6b7db2c3545f2d631b89325b71c8f1e1d80d4bf5cd09f5a | conscell/hugs-android | Signals.hs | -----------------------------------------------------------------------------
-- |
Module : System . . Signals
Copyright : ( c ) The University of Glasgow 2002
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : non-p... | null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/base/System/Posix/Signals.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : provisional
Portability : non-portable (requires POSIX)
POSIX signal support
------------------------------------------------------------... | Module : System . . Signals
Copyright : ( c ) The University of Glasgow 2002
... |
f5bc2b4113a4af772bfd4c8e7497a7b5c6af14311245a7f2b4d87e66ceedffdb | haskell-github/github | ShowUser2.hs | {-# LANGUAGE OverloadedStrings #-}
module Main (main) where
import qualified GitHub as GH
main :: IO ()
main = do
possibleUser <- GH.executeRequest' $ GH.userInfoForR "phadej"
print possibleUser
| null | https://raw.githubusercontent.com/haskell-github/github/81d9b658c33a706f18418211a78d2690752518a4/samples/Users/ShowUser2.hs | haskell | # LANGUAGE OverloadedStrings # | module Main (main) where
import qualified GitHub as GH
main :: IO ()
main = do
possibleUser <- GH.executeRequest' $ GH.userInfoForR "phadej"
print possibleUser
|
22cda38ff661cd863f0bfee96ed5421984e1be9493f7311ab400152ef5fc986b | seven1240/idp_proxy | idp_proxy_app.erl | @author author < >
YYYY author .
%% @doc Callbacks for the idp_proxy application.
-module(idp_proxy_app).
-author('author <>').
-behaviour(application).
-export([start/2,stop/1]).
, _ ) - > ServerRet
%% @doc application start callback for idp_proxy.
start(_Type, _StartArgs) ->
idp_proxy_deps:ensure(... | null | https://raw.githubusercontent.com/seven1240/idp_proxy/bdae5f9b4f6844cb49df108a4cab7658df8e46e8/src/idp_proxy_app.erl | erlang | @doc Callbacks for the idp_proxy application.
@doc application start callback for idp_proxy.
@doc application stop callback for idp_proxy. | @author author < >
YYYY author .
-module(idp_proxy_app).
-author('author <>').
-behaviour(application).
-export([start/2,stop/1]).
, _ ) - > ServerRet
start(_Type, _StartArgs) ->
idp_proxy_deps:ensure(),
idp_proxy_sup:start_link().
@spec stop(_State ) - > ServerRet
stop(_State) ->
ok.
|
baa9ef7f28948e371eb50bc88cb5e06e108c107b1fa39c2d6cd2558b51597c44 | ghcjs/ghcjs | either.hs | raw :: Either Int Int -> Int
raw x = case x of Left a -> a + 1
Right b -> b + 2
func :: Either Int Int -> Int
func x = either (\x -> x + 1) (\x -> x + 2) x
main = do
print $ raw $ Left 5
print $ raw $ Right 5
print $ func $ Left 5
print $ func $ Right 5
| null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/fay/either.hs | haskell | raw :: Either Int Int -> Int
raw x = case x of Left a -> a + 1
Right b -> b + 2
func :: Either Int Int -> Int
func x = either (\x -> x + 1) (\x -> x + 2) x
main = do
print $ raw $ Left 5
print $ raw $ Right 5
print $ func $ Left 5
print $ func $ Right 5
| |
c7c628e162602afba41df50c3dd84622ced6e93fd7676afc4927b0ce7c3caa88 | google/ghc-source-gen | GhcVersion.hs | A module for changing behavior based on the version of GHC .
# LANGUAGE CPP #
module GhcVersion where
import Data.Version
import Text.ParserCombinators.ReadP
ghcVersion :: Version
ghcVersion = case readP_to_S (parseVersion <* eof) VERSION_ghc of
[(v,"")] -> v
_ -> error $ "Unable to parse GHC version " ++ s... | null | https://raw.githubusercontent.com/google/ghc-source-gen/756d4cdc82f0aa86a8fd703fbc08b285ff3995ff/tests/GhcVersion.hs | haskell | A module for changing behavior based on the version of GHC .
# LANGUAGE CPP #
module GhcVersion where
import Data.Version
import Text.ParserCombinators.ReadP
ghcVersion :: Version
ghcVersion = case readP_to_S (parseVersion <* eof) VERSION_ghc of
[(v,"")] -> v
_ -> error $ "Unable to parse GHC version " ++ s... | |
aee0be53893e4a29057eb8c9d9da92f2471191679c7a6128f7f0be0d90359545 | Gbury/dolmen | strings.mli |
(** Smtlib string builtins *)
module Smtlib2 : sig
module Tff
(Type : Tff_intf.S)
(Ty : Dolmen.Intf.Ty.Smtlib_String with type t := Type.Ty.t)
(T : Dolmen.Intf.Term.Smtlib_String with type t := Type.T.t) : sig
type _ Type.err +=
| Invalid_hexadecimal : string -> Dolmen.Std.Term.t Type.... | null | https://raw.githubusercontent.com/Gbury/dolmen/55566c8db8a9c7636743b49a8c0bfaa061bbeb0c/src/typecheck/strings.mli | ocaml | * Smtlib string builtins |
module Smtlib2 : sig
module Tff
(Type : Tff_intf.S)
(Ty : Dolmen.Intf.Ty.Smtlib_String with type t := Type.Ty.t)
(T : Dolmen.Intf.Term.Smtlib_String with type t := Type.T.t) : sig
type _ Type.err +=
| Invalid_hexadecimal : string -> Dolmen.Std.Term.t Type.err
| Invalid_string_cha... |
871792c57b0fc0ccd77c589bce9be100ad53c01cd24eb240f182ac0b2a84bd40 | samply/blaze | system_stats_test_util.clj | (ns blaze.db.impl.index.system-stats-test-util
(:require
[blaze.byte-buffer :as bb]
[blaze.db.impl.codec :as codec]))
(set! *unchecked-math* :warn-on-boxed)
(defn decode-key [byte-array]
(let [buf (bb/wrap byte-array)]
{:t (codec/descending-long (bb/get-long! buf))}))
(defn decode-val [byte-array]... | null | https://raw.githubusercontent.com/samply/blaze/c4120e944bdf0ffbbe7d5bc4e0378c49278e31fe/modules/db/test/blaze/db/impl/index/system_stats_test_util.clj | clojure | (ns blaze.db.impl.index.system-stats-test-util
(:require
[blaze.byte-buffer :as bb]
[blaze.db.impl.codec :as codec]))
(set! *unchecked-math* :warn-on-boxed)
(defn decode-key [byte-array]
(let [buf (bb/wrap byte-array)]
{:t (codec/descending-long (bb/get-long! buf))}))
(defn decode-val [byte-array]... | |
77c5574b760bb7f3429c582fecfc1541a5a546a69217436ecf3a477d241e9866 | strint/sicpAns | 2047_picture_language_frame_selectors.scm | ; origin-frame, edge1-frame, and edge2-frame
(define (make-frame1 origin edge1 edge2)
(list origin edge1 edge2))
(define (origin-frame1 f)
(car f))
(define (edge1-frame1 f)
(car (cdr f)))
(define (edge2-frame1 f)
(car (cdr (cdr f))))
; frame
; the origin vector specifies the offset of the frame’s origin from s... | null | https://raw.githubusercontent.com/strint/sicpAns/efc4bdfaab7583117d42f2141d4b3b9e12792b79/2.2.4-4_PictureLanguage/2047_picture_language_frame_selectors.scm | scheme | origin-frame, edge1-frame, and edge2-frame
frame
the origin vector specifies the offset of the frame’s origin from some absolute origin in the plane, and the edge vectors specify the offsets of the frame’s corners from its origin.
according to the implemtation of 'frame-coord-map', 'edge1-frame' and 'edge2-frame' r... | (define (make-frame1 origin edge1 edge2)
(list origin edge1 edge2))
(define (origin-frame1 f)
(car f))
(define (edge1-frame1 f)
(car (cdr f)))
(define (edge2-frame1 f)
(car (cdr (cdr f))))
(define (make-frame origin edge1 edge2)
(cons origin (cons edge1 edge2)))
(define (origin-frame f)
(car f))
(define (e... |
7ca88f10a250115ee2969d418bb1f24a07ee0bf609421e62bc3dbbe44cb623db | janestreet/learn-ocaml-workshop | suggested_frogger.mli | open Scaffold
module Direction : sig
type t
end
module Frog : sig
type t
val facing : t -> Direction.t
val position : t -> Position.t
end
module Non_frog_character : sig
module Kind : sig
type t =
| Car
| Log
end
type t
val kind : t -> Kind.t
val position : t -> Position.t
(**... | null | https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/03-frogger/suggested_frogger.mli | ocaml | * In units of grid-points/tick. Positive values indicate rightward motion,
negative values leftward motion. | open Scaffold
module Direction : sig
type t
end
module Frog : sig
type t
val facing : t -> Direction.t
val position : t -> Position.t
end
module Non_frog_character : sig
module Kind : sig
type t =
| Car
| Log
end
type t
val kind : t -> Kind.t
val position : t -> Position.t
val... |
f3ecd5a61a61cc0fcd993c8cc221732d7c849b0774d4a2e3163d0b4041ca3389 | nvim-treesitter/nvim-treesitter | indents.scm | [
(array)
(inline_table)
] @indent
[
"["
"]"
"{"
"}"
] @branch
| null | https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/ddc0f1b606472b6a1ab85ee9becfd4877507627d/queries/toml/indents.scm | scheme | [
(array)
(inline_table)
] @indent
[
"["
"]"
"{"
"}"
] @branch
| |
d27a029eb15c07ec0f97ac7ed3683c07261b2f115b34ead10ed87b0d432a3274 | SjVer/Som-Lang | on_notification.ml | open Lsp
module JsonError = Jsonrpc.Response.Error
* the ' entrypoint 's for lsp notification
let worker (server: T.server): Client_notification.t -> unit =
let open Client_notification in function
| TextDocumentDidOpen p ->
if p.textDocument.languageId = "som" then
let doc = Store.add server.sto... | null | https://raw.githubusercontent.com/SjVer/Som-Lang/c130d86018c485252b6a78364b38e8a3188d85f1/tools/language-server/lib/on_notification.ml | ocaml | open Lsp
module JsonError = Jsonrpc.Response.Error
* the ' entrypoint 's for lsp notification
let worker (server: T.server): Client_notification.t -> unit =
let open Client_notification in function
| TextDocumentDidOpen p ->
if p.textDocument.languageId = "som" then
let doc = Store.add server.sto... | |
98b28ab44225d978e2e7f3b573b3ba78248b8a0b2119eb80db74eef71160ff29 | GillianPlatform/Gillian | test.ml | type ('info, 'category) t = {
name : string;
path : string;
category : 'category;
info : 'info;
}
let pp fmt test = Fmt.pf fmt "%s" test.path
let make ~name ~path ~category ~info = { name; path; info; category }
| null | https://raw.githubusercontent.com/GillianPlatform/Gillian/1c8d65120c04ef87cda689a9d41268e25b5ffa7e/GillianCore/BulkTesting/test.ml | ocaml | type ('info, 'category) t = {
name : string;
path : string;
category : 'category;
info : 'info;
}
let pp fmt test = Fmt.pf fmt "%s" test.path
let make ~name ~path ~category ~info = { name; path; info; category }
| |
4e4f3c7ba20c6b28f59f98c4b61114190f19bb3faf8433b72af765d2e0ba0258 | startalkIM/ejabberd | ejabberd_auth_riak.erl | %%%----------------------------------------------------------------------
File : ejabberd_auth_riak.erl
Author : < >
Purpose : Authentification via Riak
Created : 12 Nov 2012 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
%%%
%%% This program is free software; you can redistri... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/ejabberd_auth_riak.erl | erlang | ----------------------------------------------------------------------
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | File : ejabberd_auth_riak.erl
Author : < >
Purpose : Authentification via Riak
Created : 12 Nov 2012 by < >
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
... |
5a4d93ea200f0e3ad8287f15f393bb0fb0dc0220abe12095158047cdf63e0540 | mpickering/apply-refact | Lambda11.hs | f = flip op x | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Lambda11.hs | haskell | f = flip op x | |
9c32c6b544b3dceb90cc908a773b5dab40ca91ca95693569dc16fd54596f435c | Octachron/tensority | range.ml | type ('n_in, 'n_out) t = { start:int; stop:int; step:int }
let create ~start ~stop ~step ~len =
let diff = Nat.to_int stop - Nat.to_int start in
let dyn_len = 1 + diff / step and len = Nat.to_int len in
if len <> dyn_len then
raise @@ Signatures.Dimension_error
("Slices.range.create", dyn_len , len )
... | null | https://raw.githubusercontent.com/Octachron/tensority/2689fba0bb9c693ef51bebe9cf92c37ab30ca17e/lib/range.ml | ocaml | type ('n_in, 'n_out) t = { start:int; stop:int; step:int }
let create ~start ~stop ~step ~len =
let diff = Nat.to_int stop - Nat.to_int start in
let dyn_len = 1 + diff / step and len = Nat.to_int len in
if len <> dyn_len then
raise @@ Signatures.Dimension_error
("Slices.range.create", dyn_len , len )
... | |
0b5a0b0a22008260a9cd83f55f89b63e51101b6af13f64af7dc1b3f6f20c0754 | sKabYY/palestra | p58.scm | (load "stream.scm")
(define (expand0 num den radix)
(cons
(quotient (* num radix) den)
(delay (expand0 (remainder (* num radix) den) den radix))))
(stream-for-n
println
(expand0 1 7 10)
10)
(newline)
(stream-for-n
println
(expand0 3 8 10)
10)
| null | https://raw.githubusercontent.com/sKabYY/palestra/0906cc3a1fb786093a388d5ae7d59120f5aae16c/old1/sicp/3/p58.scm | scheme | (load "stream.scm")
(define (expand0 num den radix)
(cons
(quotient (* num radix) den)
(delay (expand0 (remainder (* num radix) den) den radix))))
(stream-for-n
println
(expand0 1 7 10)
10)
(newline)
(stream-for-n
println
(expand0 3 8 10)
10)
| |
a7c446a28f08800677d1652959a21e1811fe2c241dcc9db5adc609cc5b649b08 | robert-strandh/SICL | mapl-defun.lisp | (cl:in-package #:sicl-cons)
(defun mapl (function &rest lists)
(when (null lists)
(error 'at-least-one-list-required))
(loop for remaining = lists
then (loop for list in remaining collect (cdr list))
until (loop for list in remaining thereis (atom list))
do (apply function remaining)
... | null | https://raw.githubusercontent.com/robert-strandh/SICL/9d939d4c054d6a68a35024f8af53edae50a59b8a/Code/Cons/mapl-defun.lisp | lisp | (cl:in-package #:sicl-cons)
(defun mapl (function &rest lists)
(when (null lists)
(error 'at-least-one-list-required))
(loop for remaining = lists
then (loop for list in remaining collect (cdr list))
until (loop for list in remaining thereis (atom list))
do (apply function remaining)
... | |
12c0736bff71ad7e6e4bba44cbde90fbddff28fca2ca913e0536e0ec8c23f492 | dparis/gen-phzr | text.cljs | (ns phzr.impl.accessors.text)
(def text-get-properties
{:align "align"
:alive "alive"
:alpha "alpha"
:anchor "anchor"
:angle "angle"
:animations "animations"
:auto-cull "autoCull"
:auto-round "autoRound"
:blend-mode "blendMode"
:body "body"
:bottom "bottom"
:bounds-align-h "boundsAli... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/impl/accessors/text.cljs | clojure | (ns phzr.impl.accessors.text)
(def text-get-properties
{:align "align"
:alive "alive"
:alpha "alpha"
:anchor "anchor"
:angle "angle"
:animations "animations"
:auto-cull "autoCull"
:auto-round "autoRound"
:blend-mode "blendMode"
:body "body"
:bottom "bottom"
:bounds-align-h "boundsAli... | |
db8ca647a8c2ae766393625e17db9a85a822e4035ff8e5dd65024f3edf7a2e5d | erlang/otp | ei_accept_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2001 - 2023 . 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 applic... | null | https://raw.githubusercontent.com/erlang/otp/2b397d7e5580480dc32fa9751db95f4b89ff029e/lib/erl_interface/test/ei_accept_SUITE.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 l... | Copyright Ericsson AB 2001 - 2023 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(ei_accept_SUITE).
-include_lib("common_test/include/ct.hrl").
-include("ei_accept_SUITE_data/ei_accept_test... |
5fde0bdb1ba398dd33b4779d9ab4c3983c8c05d2fb01bdcfc4ab013280ea6d07 | athos/pogonos | main.cljc | (ns pogonos.main
This namespace is only available for clj / bb , and so all the following
;;; reader conditionals are effectively unnecessary and are only used
;;; to suppress linter warnings.
#?(:clj
(:require [babashka.cli :as cli]
pogonos.api)))
#?(:clj
(do
(defn- print-usage []
... | null | https://raw.githubusercontent.com/athos/pogonos/d1f86c77ff9ae28f2cf690e45ce282ef8f58bfbc/src/pogonos/main.cljc | clojure | reader conditionals are effectively unnecessary and are only used
to suppress linter warnings. | (ns pogonos.main
This namespace is only available for clj / bb , and so all the following
#?(:clj
(:require [babashka.cli :as cli]
pogonos.api)))
#?(:clj
(do
(defn- print-usage []
(println
(str #?@(:bb
["Usage: pgns <command> <options>\n"
... |
6ead6352520985ca4f07e9562b24cdfa54c53733f4dbedc502ba8602cfb64770 | scarvalhojr/haskellbook | section27.14-2.hs |
-- Type code in GHCI instead of loading the file
-- What will :sprint output?
1 .
let x1 = 1
-- x1 = _
2 .
let x2 = ['1']
x2 = " 1 "
3 .
let x3 = [1]
-- x3 = _
4 .
let x4 = 1 :: Int
x4 = 1
5 .
let f = \x -> x
let x5 = f 1
-- x5 = _
6 .
let f' :: Int -> Int; f' = \x -> x
let x6 = f' 1
... | null | https://raw.githubusercontent.com/scarvalhojr/haskellbook/6016a5a78da3fc4a29f5ea68b239563895c448d5/chapter27/section27.14-2.hs | haskell | Type code in GHCI instead of loading the file
What will :sprint output?
x1 = _
x3 = _
x5 = _
x6 = _ |
1 .
let x1 = 1
2 .
let x2 = ['1']
x2 = " 1 "
3 .
let x3 = [1]
4 .
let x4 = 1 :: Int
x4 = 1
5 .
let f = \x -> x
let x5 = f 1
6 .
let f' :: Int -> Int; f' = \x -> x
let x6 = f' 1
|
d5243229e4a48a7ccbcc57dd486b07273bc11e2ef71bebe9bf1de38e6ac55f16 | alanz/ghc-exactprint | T9951b.hs | {-# LANGUAGE OverloadedStrings #-}
# OPTIONS_GHC -fwarn - incomplete - patterns -fwarn - overlapping - patterns #
module T9951b where
f :: String -> Bool
f "ab" = True
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/T9951b.hs | haskell | # LANGUAGE OverloadedStrings # | # OPTIONS_GHC -fwarn - incomplete - patterns -fwarn - overlapping - patterns #
module T9951b where
f :: String -> Bool
f "ab" = True
|
65437b585c50dfd1fca5698ec642dcafbd8eb7547c8b521e79b6afe24cecd77b | oscoin/oscoin | Options.hs | module Oscoin.Telemetry.Options
( Options(..)
, telemetryOptionsParser
, telemetryOptionsOpts
, renderTelemetryOptionsOpts
)
where
import Oscoin.Prelude hiding (option)
import qualified Oscoin.Telemetry.Logging as Log
import qualified Formatting as F
import Options.Applicativ... | null | https://raw.githubusercontent.com/oscoin/oscoin/2eb5652c9999dd0f30c70b3ba6b638156c74cdb1/src/Oscoin/Telemetry/Options.hs | haskell | module Oscoin.Telemetry.Options
( Options(..)
, telemetryOptionsParser
, telemetryOptionsOpts
, renderTelemetryOptionsOpts
)
where
import Oscoin.Prelude hiding (option)
import qualified Oscoin.Telemetry.Logging as Log
import qualified Formatting as F
import Options.Applicativ... | |
45f4bc37ccfde627aea22c9e10f78ac9493ba3e392c734d217e9e8ad93ff5ef8 | guildhall/guile-sly | simple.scm |
Copyright ( C ) 2013 , 2014 >
;;;
;;; This program is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation , either version 3 of the
;;; License, or (at your option) any later version.
;;;
;;; This program is ... | null | https://raw.githubusercontent.com/guildhall/guile-sly/92f5f21da76986c5b606b36afc4bb984cc63da5b/examples/simple.scm | scheme |
This program is free software: you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General P... |
Copyright ( C ) 2013 , 2014 >
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation , either version 3 of the
You should have received a copy of the GNU General Public License
(use-modules (sly game)
(sly window)
(sly utils)
... |
82a0cdd3a51ec5db0db7b728065e44867f6004ac1ec0ae4c597971b7c2d77845 | avsm/eeww | ocamlcmt.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
(* ... | null | https://raw.githubusercontent.com/avsm/eeww/23ca8b36127b337512e13c6fb8e86b3a7254d4f9/boot/ocaml/tools/ocamlcmt.ml | ocaml | ************************************************************************
OCaml
Fabrice L... | Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
let gen_annot = ref false
let gen_ml = ref false
let print_info_arg = ref false
let target_filename = ref None
let save_cmt_info = ref false
let arg_list = Arg.align [
... |
86bbc423b3e1ca39ccb88c73c544a92c9d1bc8583d7dec3016aed15cb7717a5a | funkywork/nightmare | nightmare_service.mli | MIT License
Copyright ( c ) 2023 funkywork
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
to... | null | https://raw.githubusercontent.com/funkywork/nightmare/05858823d01925cb8cb02a6b29ed8a223822a0e8/lib/service/nightmare_service.mli | ocaml | * {1 Types aliases}
* [method_] is an alias for {!type:Method.t}.
* [path] is an alias for {!type:Path.t}.
* [wrapped_path] is an alias for {!type:Path.wrapped}.
* [endpoint] is an alias for {!type:Endpoint.t}.
* [wrapped_endpoint] is an alias for {!type:Endpoint.wrapped}.
* [handler] is an alias for {!type:Handl... | MIT License
Copyright ( c ) 2023 funkywork
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
to... |
9d559a54975d1ca8e630b938bdea4b577761f31f1b038a3720e527d62ac7053f | chebert/schemeish | for-macros.lisp | (in-package #:schemeish.internals)
(defmacro for-macros (&body body)
"Expands to `(eval-when (:compile-toplevel :load-toplevel :execute) ,@body).
Used to annotate functions and/or variable definitions that are used in macros."
`(eval-when (:compile-toplevel :load-toplevel :execute) ,@body))
(defmacro no-compile (... | null | https://raw.githubusercontent.com/chebert/schemeish/93ea08b17e6d8876f086e1a34a21b538174b2c39/src/for-macros.lisp | lisp | (in-package #:schemeish.internals)
(defmacro for-macros (&body body)
"Expands to `(eval-when (:compile-toplevel :load-toplevel :execute) ,@body).
Used to annotate functions and/or variable definitions that are used in macros."
`(eval-when (:compile-toplevel :load-toplevel :execute) ,@body))
(defmacro no-compile (... | |
46ea3835333c99caca463f98092d4803045eb130650252c8302d0118ab33fa8d | OCamlPro/ocp-ocamlres | oCamlResFormats.mli | (** Formatters for the main resource tree structure *)
This file is part of ocp - ocamlres - formats
* ( C ) 2013 OCamlPro - Benjamin CANOU
*
* ocp - ocamlres 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 Fr... | null | https://raw.githubusercontent.com/OCamlPro/ocp-ocamlres/8ec8bce4afb55dd13f6df30eccda60ca1f6f0d6b/src/oCamlResFormats.mli | ocaml | * Formatters for the main resource tree structure
* Format modules essentially wrap an output function which takes a
resource tree as input and produces an output.
* The type of leaves in the resource tree
* Parameters to the output function
* See {!OCaml}
* Maximum line width
* Specify the output
* This for... |
This file is part of ocp - ocamlres - formats
* ( C ) 2013 OCamlPro - Benjamin CANOU
*
* ocp - ocamlres 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.0 of the... |
d656256f4673768784cb84c48dc07751c308be3399ed1f63edd5b3bc625caa58 | koto-bank/lbge | entity.lisp | (in-package :lbge.ecs)
(define-symbol-macro null-entity 0)
(defclass entity-storage ()
((sparse
:initform (make-array '(0)
:adjustable t
:element-type '(unsigned-byte 64))
:documentation "Sparse set of the entity storage")
(packed
:initform (make-ar... | null | https://raw.githubusercontent.com/koto-bank/lbge/6be4b3212ea87288b1ee2a655e9a1bb30a74dd27/src/ecs/entity.lisp | lisp | Already deleted
Increase gen
Current one will be recycled next
Increase available counter
Create brand new entity, nothing to recycle
Restore previous recycle-next
Decrease available count
Restore new entity | (in-package :lbge.ecs)
(define-symbol-macro null-entity 0)
(defclass entity-storage ()
((sparse
:initform (make-array '(0)
:adjustable t
:element-type '(unsigned-byte 64))
:documentation "Sparse set of the entity storage")
(packed
:initform (make-ar... |
0d35d751225220611c645cdeb44be8d1edd1a778431965174f95732c568ba23d | polyvios/locksmith | mycfl.mli |
*
* Copyright ( c ) 2004 - 2007 ,
* Polyvios Pratikakis < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1... | null | https://raw.githubusercontent.com/polyvios/locksmith/3a9d60ed9c801d65fbb79e9aa6e7dec68f6289e3/src/mycfl.mli | ocaml | call this to freeze the number of instantiations.
* flow edges & nodes can still be added
|
*
* Copyright ( c ) 2004 - 2007 ,
* Polyvios Pratikakis < >
* < >
* < >
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are
* met :
*
* 1... |
1d878ba80ed84ce009c1bedad005f54e8d3dc6fa7d5cd2feb94e8d1383d7f49a | spl/emgm | ZipWith.hs | # LANGUAGE FlexibleContexts #
-----------------------------------------------------------------------------
-- |
Module : ZipWith
Copyright : ( c ) 2008 , 2009 Universiteit Utrecht
-- License : BSD3
--
Maintainer :
---------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/spl/emgm/dc16c10137487d7eb97aa851a577be66b46070a2/tests/ZipWith.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
---------------------------------------------------------------------------
---------------------------------------------------------------------------
Tests
------------------------------------------------------------... | # LANGUAGE FlexibleContexts #
Module : ZipWith
Copyright : ( c ) 2008 , 2009 Universiteit Utrecht
Maintainer :
module ZipWith (tests) where
import Prelude hiding (zipWith, zip)
import qualified Prelude as P (zipWith, zip)
import Test.HUnit
import Generics.EMGM
test_zipWith1 =
let ls = [1.... |
8c004f6d4a9f3f391bb01d246c00e6b14535ba3ebf7c99d019f675819df13616 | cl-unix-cybernetics/cl-unix-cybernetics | build.lisp | ;; cl-unix-cybernetics
Copyright 2013 - 2022 < >
;;
;; Permission is hereby granted to use this software granted
;; the above copyright notice and this permission paragraph
;; are included in all copies and substantial portions of this
;; software.
;;
;; THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
... | null | https://raw.githubusercontent.com/cl-unix-cybernetics/cl-unix-cybernetics/63e4862274e170bda7540b4caec6c94ed850a31c/build.lisp | lisp | cl-unix-cybernetics
Permission is hereby granted to use this software granted
the above copyright notice and this permission paragraph
are included in all copies and substantial portions of this
software.
THIS SOFTWARE IS PROVIDED "AS-IS" WITHOUT ANY GUARANTEE OF
PURPOSE AND PERFORMANCE. IN NO EVENT WHATSOEVER... | Copyright 2013 - 2022 < >
(in-package :common-lisp-user)
(declaim (optimize (speed 1)
(space 1)
(safety 3)
(debug 3)
(compilation-speed 0)))
(defun compile-lisp (path)
(let* ((fasl (make-pathname :type "fasl" :defaults path))
... |
98dbdfeb6ea6252a9dd0dc63d64eae1759928619b35bdc54c612d84fcf86999e | rescript-lang/rescript-compiler | ext_js_file_kind.ml | Copyright ( C ) 2020- , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later vers... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/486c93306a96d85fcd38d5933ed5d361d518b25e/jscomp/ext/ext_js_file_kind.ml | ocaml | Copyright ( C ) 2020- , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) any later vers... | |
b6640527311516a6d862ab11339c3d009694611d609e7dc32ff17724ce70137c | OCamlPro/freeton_ocaml_sdk | mod_tvm.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2021 OCamlPro SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/freeton_ocaml_sdk/9f106db6461707984e1c2f2bafcd75b2850b3e5b/src/freeton_client_lib/mod_tvm.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2021 OCamlPro SAS
Public License version 2.1 , with the special exception on linking
open Mod_abi
open Mod_boc
enum TvmErrorCode {
CanNotReadTransaction = 401 ,
CanNotReadBlockchainConfig = 402 ,
TransactionAborted = 403 ,
Int... |
6278d30fb9694716703648dbb427a95956ed8fbf1265642269e7cb40abe3a05e | jrm-code-project/LISP-Machine | new-copy-file.lisp | -*- Mode : LISP ; Package : FILE - SYSTEM ; ; : ZL -*-
More robust COPY - FILE function , in progress . --Keith 24 - oct-88
(defvar *new-copy-file-debug* nil)
(defmacro ncf (&rest args)
`(and *new-copy-file-debug*
(format *trace-output* ,@args)))
(DEFUN NEW-COPY-FILE (PATHNAME-OR-STREAM NEW-NAME
... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/io/file/new-copy-file.lisp | lisp | Package : FILE - SYSTEM ; ; : ZL -*-
make you the new file's author.
Not a stream |
More robust COPY - FILE function , in progress . --Keith 24 - oct-88
(defvar *new-copy-file-debug* nil)
(defmacro ncf (&rest args)
`(and *new-copy-file-debug*
(format *trace-output* ,@args)))
(DEFUN NEW-COPY-FILE (PATHNAME-OR-STREAM NEW-NAME
&REST OPTIONS
&KEY (ERROR T)... |
fa3fa1d42f0b69654aca14804b95b875f0075d74e94fbc4843343165f85fd20d | ocaml-gospel/gospel | file_to_string.ml | open Format
let input = Sys.argv.(1)
let output = Sys.argv.(2)
let ic = open_in_bin input
let contents = really_input_string ic (in_channel_length ic)
let () = close_in ic
let oc = open_out output
let fmt = formatter_of_out_channel oc
let () = fprintf fmt "let contents = %S@." contents
let () = close_out oc
| null | https://raw.githubusercontent.com/ocaml-gospel/gospel/5b467a00525def455fc2f510353e62df660b9aa1/src/stdlib/file_to_string.ml | ocaml | open Format
let input = Sys.argv.(1)
let output = Sys.argv.(2)
let ic = open_in_bin input
let contents = really_input_string ic (in_channel_length ic)
let () = close_in ic
let oc = open_out output
let fmt = formatter_of_out_channel oc
let () = fprintf fmt "let contents = %S@." contents
let () = close_out oc
| |
e0428cadf2c76bfe55c718aec7fbb3ed73824854c98a2779c93ee93c3b231c93 | BrownCS1260/class-compiler | asm.ml | type register = Rax | Rcx | R8 | Rsp | Rdi
let string_of_register ?(last_byte = false) (reg : register) : string =
match (reg, last_byte) with
| Rax, false -> "rax"
| Rax, true -> "al"
| Rcx, false -> "rcx"
| Rcx, true -> "cl"
| R8, false -> "r8"
| R8, true -> "r8b"
| Rsp, true -> "rsp"
| Rsp, false ... | null | https://raw.githubusercontent.com/BrownCS1260/class-compiler/7cf440416104792cce6e8f856b124346553b89c7/asm/asm.ml | ocaml | frontmatter
labels
actual instructions | type register = Rax | Rcx | R8 | Rsp | Rdi
let string_of_register ?(last_byte = false) (reg : register) : string =
match (reg, last_byte) with
| Rax, false -> "rax"
| Rax, true -> "al"
| Rcx, false -> "rcx"
| Rcx, true -> "cl"
| R8, false -> "r8"
| R8, true -> "r8b"
| Rsp, true -> "rsp"
| Rsp, false ... |
56dee50acc00de791194078c2a5de57e34460b7e1bbc362cba2d28b572b5b944 | exercism/erlang | example.erl | -module(example).
-export([convert/1]).
convert(Number) ->
case sounds(Number, [{3, "Pling"}, {5, "Plang"}, {7, "Plong"}], []) of
[] -> integer_to_list(Number);
Sounds -> lists:flatten(Sounds)
end.
sounds(_, [], Acc) ->
lists:reverse(Acc);
sounds(N, [{F, Sound}|Sounds], Acc) when N rem F=... | null | https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/raindrops/.meta/example.erl | erlang | -module(example).
-export([convert/1]).
convert(Number) ->
case sounds(Number, [{3, "Pling"}, {5, "Plang"}, {7, "Plong"}], []) of
[] -> integer_to_list(Number);
Sounds -> lists:flatten(Sounds)
end.
sounds(_, [], Acc) ->
lists:reverse(Acc);
sounds(N, [{F, Sound}|Sounds], Acc) when N rem F=... | |
1483e753884259445cbf3851175fd52a82a7a1210f2b5a926b89d41a52f8ab60 | bmeurer/ocaml-arm | parameters.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet Cr... | null | https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/debugger/parameters.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
OCaml port by and
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ Id$
... |
0a6a9c1a3391e5ac9c801a94ff7f9c3cbdb29d83dfed5e046b381f63e1df30e2 | databrary/databrary | ORCID.hs | # LANGUAGE TemplateHaskell , DataKinds #
module Model.ORCID
( ORCID(..)
, blankORCID
, orcidURL
) where
import Control.Monad (guard)
import qualified Data.ByteString.Char8 as BSC
import Data.Char (isDigit, digitToInt, intToDigit)
import Data.List (foldl')
import Database.PostgreSQL.Typed.Types (PGParameter(..)... | null | https://raw.githubusercontent.com/databrary/databrary/685f3c625b960268f5d9b04e3d7c6146bea5afda/src/Model/ORCID.hs | haskell | deriving (Eq) | # LANGUAGE TemplateHaskell , DataKinds #
module Model.ORCID
( ORCID(..)
, blankORCID
, orcidURL
) where
import Control.Monad (guard)
import qualified Data.ByteString.Char8 as BSC
import Data.Char (isDigit, digitToInt, intToDigit)
import Data.List (foldl')
import Database.PostgreSQL.Typed.Types (PGParameter(..)... |
dbc86c57485f5d0768b20c0902219a0cfe24e79f035a05a1ea71c7970260a4a2 | r0man/sqlingvo | db.cljc | (ns sqlingvo.db
(:require [clojure.spec.alpha :as s]
[sqlingvo.compiler :as compiler]
[sqlingvo.url :as url]
[sqlingvo.util :as util]))
(s/def ::classname string?)
(s/def ::eval-fn ifn?)
(s/def ::sql-quote ifn?)
(s/def ::db
(s/keys :req-un [::classname ::eval-fn ::sql-quote]))
... | null | https://raw.githubusercontent.com/r0man/sqlingvo/1f13624ed60ec0866fe51311d92da73638708172/src/sqlingvo/db.cljc | clojure | (ns sqlingvo.db
(:require [clojure.spec.alpha :as s]
[sqlingvo.compiler :as compiler]
[sqlingvo.url :as url]
[sqlingvo.util :as util]))
(s/def ::classname string?)
(s/def ::eval-fn ifn?)
(s/def ::sql-quote ifn?)
(s/def ::db
(s/keys :req-un [::classname ::eval-fn ::sql-quote]))
... | |
3e0f17352b87f5b5ce7653b9f1d661474675ac46cea2fc7a9185dd00c54c2eb7 | NetComposer/nkservice | nkservice_srv_listen_sup.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2015 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the... | null | https://raw.githubusercontent.com/NetComposer/nkservice/affbd5b9c914e2c8775dd45733a0b5c15d784e34/src/nkservice_srv_listen_sup.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2015 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
@private
-module(nkservice... |
4eab087d343c2ee928a51832050f7ef7a0f16cefc05df5dd17c34d7d576b1904 | johnyob/dromedary | test_pr7636.ml | open! Import
open Util
let%expect_test "pr7637-1" =
let str =
{|
type ('a, 'b) elt = 'a;;
type 'a iter = { f : 'b. ('a, 'b) elt -> unit };;
let promote =
exists (type 'a) ->
fun (f : 'a -> unit) ->
let g = fun x -> f x in
{ f = g }
;;
|}
in
... | null | https://raw.githubusercontent.com/johnyob/dromedary/a9359321492ff5c38c143385513e673d8d1f05a4/test/typing/first_class_poly/test_pr7636.ml | ocaml | open! Import
open Util
let%expect_test "pr7637-1" =
let str =
{|
type ('a, 'b) elt = 'a;;
type 'a iter = { f : 'b. ('a, 'b) elt -> unit };;
let promote =
exists (type 'a) ->
fun (f : 'a -> unit) ->
let g = fun x -> f x in
{ f = g }
;;
|}
in
... | |
c48baa33b3d5387822018c51599b43a5e8d14c4492584eb9cf24e25f0cbb47a7 | stackbuilders/stache | Compile.hs | -- |
-- Module : Text.Mustache.Compile
Copyright : © 2016 – present Stack Builders
License : BSD 3 clause
--
Maintainer : < >
-- Stability : experimental
-- Portability : portable
--
-- Mustache 'Template' creation from file or a 'Text' value. You don't
-- usually need to import the m... | null | https://raw.githubusercontent.com/stackbuilders/stache/1abf06c81cffaddf28d7ef0a423cde0aa984cfbf/Text/Mustache/Compile.hs | haskell | |
Module : Text.Mustache.Compile
Stability : experimental
Portability : portable
Mustache 'Template' creation from file or a 'Text' value. You don't
usually need to import the module, because "Text.Mustache" re-exports
everything you may need, import that module instead.
| Compile all templates in t... | Copyright : © 2016 – present Stack Builders
License : BSD 3 clause
Maintainer : < >
module Text.Mustache.Compile
( compileMustacheDir,
compileMustacheDir',
getMustacheFilesInDir,
getMustacheFilesInDir',
isMustacheFile,
compileMustacheFile,
compileMustacheText,
)
wher... |
aa407cf1088d282087b9ec81503a5f3cbafa5ea2383c3b6b54a5e4003b05d957 | clojurewerkz/triennium | mqtt_generative_test.clj | (ns clojurewerkz.triennium.mqtt-generative-test
(:require [clojure.test :refer :all]
[clojurewerkz.triennium.mqtt :as tr]
[clojure.string :as cs]
[clojure.test.check :as sc]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
... | null | https://raw.githubusercontent.com/clojurewerkz/triennium/ba4ab9debc3319b2f86ab66037b5000152e70eb3/test/clojurewerkz/triennium/mqtt_generative_test.clj | clojure | (ns clojurewerkz.triennium.mqtt-generative-test
(:require [clojure.test :refer :all]
[clojurewerkz.triennium.mqtt :as tr]
[clojure.string :as cs]
[clojure.test.check :as sc]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]
... | |
8cf1e43ce06c3cfcf508666315062d290d115edbe4705f006b71060e81e047ed | GaloisInc/tower | Identifier.hs |
module Ivory.Compile.AADL.Identifier where
identifier :: String -> String
identifier s = escapeReserved $ map aux s
where
aux '-' = '_'
aux ' ' = '_'
aux a = a
escapeReserved :: String -> String
escapeReserved w | w `elem` reserved = 'x':w
| otherwise = w
where
reserved =
[ "mode"
... | null | https://raw.githubusercontent.com/GaloisInc/tower/a43f5e36c6443472ea2dc15bbd49faf8643a6f87/tower-aadl/src/Tower/AADL/Identifier.hs | haskell |
module Ivory.Compile.AADL.Identifier where
identifier :: String -> String
identifier s = escapeReserved $ map aux s
where
aux '-' = '_'
aux ' ' = '_'
aux a = a
escapeReserved :: String -> String
escapeReserved w | w `elem` reserved = 'x':w
| otherwise = w
where
reserved =
[ "mode"
... | |
f075d7a5dc496e52eaa130f0e9566a59267e37de0593d104e40ca64d222048ab | protz/mezzo | KindPrinter.mli | val pgroup: Buffer.t -> TypeCore.env * TypeCore.data_type_group -> unit
val print_kinds_and_facts: TypeCore.env -> MzPprint.document
| null | https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/typing/KindPrinter.mli | ocaml | val pgroup: Buffer.t -> TypeCore.env * TypeCore.data_type_group -> unit
val print_kinds_and_facts: TypeCore.env -> MzPprint.document
| |
da50f284a9e2043d65becbaaf79cdde3078af3ecc769535f8104d0721b5a842d | yav/hobbit | Algs.hs | module Type.Algs
( solveGoals, simplify, withSkolems, depsOf, closureFrom
, instantiate, instantiate', generalize, generalize', noSkolems
, nicerPreds, nicerPoly
, unify, unifyWith, match
) where
import AST
import Error
import Type.Monad
import Type.Error
import Type.FVS
import Type.Subst
import Opts(maxWi... | null | https://raw.githubusercontent.com/yav/hobbit/31414ba1188f4b39620c2553b45b9e4d4aa40169/src/Type/Algs.hs | haskell | Skolem constants (i.e., variable that cannot be bound to anything)
Predicate solver ------------------------------------------------------------
| Compute an equavalent but simpler set of goals.
- Uses improvement to defined variables.
- Removes things that can be solved by instances with no context.
False
Pr... | module Type.Algs
( solveGoals, simplify, withSkolems, depsOf, closureFrom
, instantiate, instantiate', generalize, generalize', noSkolems
, nicerPreds, nicerPoly
, unify, unifyWith, match
) where
import AST
import Error
import Type.Monad
import Type.Error
import Type.FVS
import Type.Subst
import Opts(maxWi... |
6e3c5050a36551f68d231c2d26facc8537cc720c3a744cc8b7537f46dd4bc9fd | willghatch/racket-udelim | defaults.rkt | #lang racket/base
(provide
#%ornate-parens
#%s-shaped-bag-delim
#%inequality-brackets
#%double-inequality-brackets
#%moon-faces
#%cjk-corner-quotes
)
(require (for-syntax racket/base))
(define-syntax (pass-through-list stx)
(syntax-case stx ()
[(ptm e ...) #'(e ...)]))
(define-syntax #%ornate-parens (m... | null | https://raw.githubusercontent.com/willghatch/racket-udelim/58420f53c37e0bee451daa3dc5e2d72f7fc4d967/udelim/defaults.rkt | racket | #lang racket/base
(provide
#%ornate-parens
#%s-shaped-bag-delim
#%inequality-brackets
#%double-inequality-brackets
#%moon-faces
#%cjk-corner-quotes
)
(require (for-syntax racket/base))
(define-syntax (pass-through-list stx)
(syntax-case stx ()
[(ptm e ...) #'(e ...)]))
(define-syntax #%ornate-parens (m... | |
2ad3406e3f7ce726c9fbad9ffeb582d8e5a5fe8673c16798f03e46551d5b8966 | cmsc430/www | interp.rkt | #lang racket
(provide interp interp-env)
(require "ast.rkt"
"env.rkt"
"interp-prims.rkt")
type Answer = Value | ' err
;; type Value =
| Datum
;; | Eof
;; | Void
;; | (cons Value Value)
;; | (box Value)
;; | (vector Value ...)
| ( string ... )
;; | (Value ... -> Answer)
type REnv = ( ( Lis... | null | https://raw.githubusercontent.com/cmsc430/www/97c578bc40fab76afe17f054277402a08f9609af/langs/mountebank/interp.rkt | racket | type Value =
| Eof
| Void
| (cons Value Value)
| (box Value)
| (vector Value ...)
| (Value ... -> Answer)
Prog -> Answer
check arity matches
Pat Value Env -> [Maybe Env] | #lang racket
(provide interp interp-env)
(require "ast.rkt"
"env.rkt"
"interp-prims.rkt")
type Answer = Value | ' err
| Datum
| ( string ... )
type REnv = ( ( List I d Value ) )
type Defns = ( )
(define (interp p)
(match p
[(Prog ds e)
(interp-env e '() ds)]))
Answ... |
7fcbe6639d943b96a59025754318e6e7bd47e96c0e631c41af626b5c454089ee | jasonstolaruk/CurryMUD | FeelingFuns.hs | # LANGUAGE LambdaCase , OverloadedStrings #
module Mud.Misc.FeelingFuns (feelingFuns) where
import Mud.Data.Misc
import Mud.Data.State.MudData
import Mud.TheWorld.Foods
import Mud.TheWorld.Liqs
import Data.Monoid ((<>))
import Data.Text (Text)
import qualif... | null | https://raw.githubusercontent.com/jasonstolaruk/CurryMUD/f9775fb3ede08610f33f27bb1fb5fc0565e98266/lib/Mud/Misc/FeelingFuns.hs | haskell | ---
---
---
---
Intentionally blank.
---
Intentionally blank.
---
---
---
---
---
--- | # LANGUAGE LambdaCase , OverloadedStrings #
module Mud.Misc.FeelingFuns (feelingFuns) where
import Mud.Data.Misc
import Mud.Data.State.MudData
import Mud.TheWorld.Foods
import Mud.TheWorld.Liqs
import Data.Monoid ((<>))
import Data.Text (Text)
import qualif... |
23b8c3e0f171979b6d3538e4e9193754dfed3f033bae0e0061feac01160f85b8 | dnikolovv/haskell-tic-tac-toe | Commands.hs | module Commands where
import ClassyPrelude
import Data.Aeson
import Domain
import Json
import Data.UUID (UUID)
data InviteUser =
InviteUser
{ invitingUserId :: UserId
, invitedUserId :: UserId
}
deriving (Generic)
instance FromJSON InviteUser where
parseJSON = genericParseWithPrefix "inviteUser"
d... | null | https://raw.githubusercontent.com/dnikolovv/haskell-tic-tac-toe/d8282dfcd73a07d49a86312a1f7f7275dadabc3a/src/Commands.hs | haskell | module Commands where
import ClassyPrelude
import Data.Aeson
import Domain
import Json
import Data.UUID (UUID)
data InviteUser =
InviteUser
{ invitingUserId :: UserId
, invitedUserId :: UserId
}
deriving (Generic)
instance FromJSON InviteUser where
parseJSON = genericParseWithPrefix "inviteUser"
d... | |
7879c7cda9e14638bada9776518b1321fb046410ef79bb523c994851c300c85c | clj-kondo/clj-kondo | spec_syntax.clj | (ns spec-syntax
(:require
[clojure.spec.alpha :as s]
[clojure.string :as str]))
(s/fdef my-inc ;; symbol isn't reported as unresolved
:args (s/cat :x int?))
(s/fdef 1 :args) ;; expected symbol, missing value for :args
(s/fdef foo :xargs (s/cat :x int?))
(defn my-inc [x]
(+ 1 x))
;; this takes care of "... | null | https://raw.githubusercontent.com/clj-kondo/clj-kondo/df5b49e27ea1976714b76a9454b4239d08699f2e/corpus/spec_syntax.clj | clojure | symbol isn't reported as unresolved
expected symbol, missing value for :args
this takes care of "using" clojure.string, so it's not reported as unused anymore
fine
unkown
namespace is used because of below s/keys call
no unresolved-symbol | (ns spec-syntax
(:require
[clojure.spec.alpha :as s]
[clojure.string :as str]))
:args (s/cat :x int?))
(s/fdef foo :xargs (s/cat :x int?))
(defn my-inc [x]
(+ 1 x))
(s/fdef str/starts-with? :args (s/cat :s string?
:substr string?))
unresolved symbol , but should... |
2dbdc1d5cf5dd07f5333180b404c540407d43bb9d8bee12e229f026d0ab239d1 | fmi/clojure-examples | 03-pmap.clj | ;;; Illustrates the performance characteristics of pmap. It makes a comparison with
map on two different datasets - one that involves a slow operation and one that
;;; involves a faster one.
;;;
;;; The dataset would be "files" containing phone numbers and the operation
;;; will be extracting the phone numbers from t... | null | https://raw.githubusercontent.com/fmi/clojure-examples/46ec0fe7bdfdfccde1ab74a94c64dbd73ea58269/2013/07-concurrency/03-pmap.clj | clojure | Illustrates the performance characteristics of pmap. It makes a comparison with
involves a faster one.
The dataset would be "files" containing phone numbers and the operation
will be extracting the phone numbers from the files. Each file will have a
coordinating the threads is larger than the benefit form parale... | map on two different datasets - one that involves a slow operation and one that
bunch of spaces before the actual phone numbers . We will have two
collection of files - one that has a small amount of large files and one
that has a large amount of small files . pmap will have better performance
in the first ca... |
c820b3b1aa60c2344cafbb98b266e6e610c9700526fb8f1e8d7030d27775e1a3 | thwfhk/lambdaQ | Syntax.hs | module Syntax where
data Command
= Def String Term
-- | Ano Term
deriving (Show, Eq)
data Type
= TyUnit
| TyBool
| TyProd Type Type
| TyArr Type Type
| TyCir Wtype Wtype
deriving (Show, Eq)
data Term
De Bruijn index , name
| TmUnit
| TmTrue
| TmFalse
| TmNot Term
| TmAbs String Type Ter... | null | https://raw.githubusercontent.com/thwfhk/lambdaQ/d3e167d650fb63ecaf03e519bb0c1392b82047f5/src/Frontend/src/Syntax.hs | haskell | | Ano Term
a syntactic sugar
Name | module Syntax where
data Command
= Def String Term
deriving (Show, Eq)
data Type
= TyUnit
| TyBool
| TyProd Type Type
| TyArr Type Type
| TyCir Wtype Wtype
deriving (Show, Eq)
data Term
De Bruijn index , name
| TmUnit
| TmTrue
| TmFalse
| TmNot Term
| TmAbs String Type Term
| TmApp Term ... |
70c53bad8cc1c2020830d64fa01177238785bba0cee49b6925f1f4ed6f850508 | duckyuck/flare | indexed_test.cljc | (ns flare.indexed-test
(:require [clojure.test :refer [is deftest testing]]
[flare.indexed :refer [flatten-indexed-diffs report-indexed-diff]]))
(deftest flatten-indexed-diffs-test
(is (= (flatten-indexed-diffs
[:x])
{[] [:x]}))
(is (= (flatten-indexed-diffs
[:x :y])
... | null | https://raw.githubusercontent.com/duckyuck/flare/4d983fda75fab718b5ec0bf4e3f8ab4bfa1a2080/test/flare/indexed_test.cljc | clojure | (ns flare.indexed-test
(:require [clojure.test :refer [is deftest testing]]
[flare.indexed :refer [flatten-indexed-diffs report-indexed-diff]]))
(deftest flatten-indexed-diffs-test
(is (= (flatten-indexed-diffs
[:x])
{[] [:x]}))
(is (= (flatten-indexed-diffs
[:x :y])
... | |
37844b0a90671ea90daeca6dc1e9ee8628cbb4b0841098a709dc3b8e96f0e9c6 | graninas/The-Amoeba-World | GameLogicAccessor.hs | module Amoeba.GameLogic.GameLogicAccessor where
import Amoeba.GameLogic.Data.Facade as GL
import Amoeba.GameLogic.Interpreter.Language as I
import Amoeba.GameLogic.Runtime as Rt
import qualified Amoeba.Middleware.Tracing.Log as Log
import qualified Control.Concurrent.STM.TVar as STM
import qualified Control.Concurren... | null | https://raw.githubusercontent.com/graninas/The-Amoeba-World/a147cd4dabf860bec8a6ae1c45c02b030916ddf4/src/Amoeba/GameLogic/GameLogicAccessor.hs | haskell | This function should be refactored in the future.
TODO: is it possible to do this simpler?
holdGame :: GameLogicAccessor -> IO ()
holdGame glAccessor = STM.atomically $ STM.modifyTVar' glAccessor setRunning | module Amoeba.GameLogic.GameLogicAccessor where
import Amoeba.GameLogic.Data.Facade as GL
import Amoeba.GameLogic.Interpreter.Language as I
import Amoeba.GameLogic.Runtime as Rt
import qualified Amoeba.Middleware.Tracing.Log as Log
import qualified Control.Concurrent.STM.TVar as STM
import qualified Control.Concurren... |
3e74f4d14d398183e07efc4fe770f1741236d531aa637002cb831fc26d3634e8 | uw-unsat/serval-sosp19 | ni.rkt | #lang rosette/safe
(require
serval/lib/unittest
serval/lib/core
"state.rkt"
"spec.rkt"
(only-in racket/base exn:fail? struct-copy string-append parameterize)
(prefix-in keystone: "generated/monitors/keystone/verif/asm-offsets.rkt")
)
(provide (all-defined-out))
(define (enclave-state-equiv s t)
(define... | null | https://raw.githubusercontent.com/uw-unsat/serval-sosp19/175c42660fad84b44e4c9f6f723fd3c9450d65d4/monitors/keystone/verif/ni.rkt | racket | #lang rosette/safe
(require
serval/lib/unittest
serval/lib/core
"state.rkt"
"spec.rkt"
(only-in racket/base exn:fail? struct-copy string-append parameterize)
(prefix-in keystone: "generated/monitors/keystone/verif/asm-offsets.rkt")
)
(provide (all-defined-out))
(define (enclave-state-equiv s t)
(define... | |
6b8e941d3e8d21ee986e37c2b508bc25647eaaf749c582c8b3b900e4b80402e0 | Emmanuel-PLF/facile | fcl_arith.ml | (***********************************************************************)
(* *)
FaCiLe
A Functional Constraint Library
(* ... | null | https://raw.githubusercontent.com/Emmanuel-PLF/facile/3b6902e479019c25b582042d9a02152fec145eb0/lib/fcl_arith.ml | ocaml | *********************************************************************
under the terms of the GNU Lesser Gener... | FaCiLe
A Functional Constraint Library
, , LOG , CENA
Copyright 2004 CENA . All rights reserved . This file is distributed
open Fcl_misc.Operators
open Fcl_var
open Fcl_expr
type t... |
9e996d2e2bc43a8baf45cbb64b2c77764c1381163689c29744a5ef49e8ed00b9 | hexlet-codebattle/battle_asserts | luke_relations.clj | (ns battle-asserts.issues.luke-relations
(:require [clojure.test.check.generators :as gen]))
(def level :elementary)
(def tags ["strings" "star-wars"])
(def description
{:en "Luke Skywalker has family and friends. Help him remind them who is who. Given a string with a name, return the relation of that person to ... | null | https://raw.githubusercontent.com/hexlet-codebattle/battle_asserts/cf62af2bfc16dc1b570f8b78170a34cd97af3a2a/src/battle_asserts/issues/luke_relations.clj | clojure | (ns battle-asserts.issues.luke-relations
(:require [clojure.test.check.generators :as gen]))
(def level :elementary)
(def tags ["strings" "star-wars"])
(def description
{:en "Luke Skywalker has family and friends. Help him remind them who is who. Given a string with a name, return the relation of that person to ... | |
bfeb254a9739e575c5b3608a9e15f69842cbde941b7764d941453caa7a93027a | SNePS/SNePS2 | dynamic-add.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : SNIP ; Base : 10 -*-
Copyright ( C ) 1993 - -2013
Research Foundation of State University of New York
Version : $ I d : dynamic - add.lisp , v 1.2 2013/08/28 19:07:27 shapiro Exp $
;; This file is part of SNePS.
$ BEGIN LICENSE$
The contents of this ... | null | https://raw.githubusercontent.com/SNePS/SNePS2/d3862108609b1879f2c546112072ad4caefc050d/snip/fns/dynamic-add.lisp | lisp | Syntax : Common - Lisp ; Package : SNIP ; Base : 10 -*-
This file is part of SNePS.
you may
not use this file except in compliance with the License. You
may obtain a copy of the License at
. edu/sneps/Downloads/ubpl.pdf.
or implied. See the License for the specific language gov
erning rights and limitations ... |
Copyright ( C ) 1993 - -2013
Research Foundation of State University of New York
Version : $ I d : dynamic - add.lisp , v 1.2 2013/08/28 19:07:27 shapiro Exp $
$ BEGIN LICENSE$
The contents of this file are subject to the University at
Software distributed under the License is distributed on an
" AS ... |
460aa0e9e2639838be43cf1553502eeec2edc539d43d450079708344689220c1 | josefs/Gradualizer | refine_comparison.erl | -module(refine_comparison).
-compile([export_all, nowarn_export_all]).
-spec comp1(integer()) -> pos_integer() | neg_integer().
comp1(N) when 0 < N -> N;
comp1(N) when 0 > N -> N;
comp1(_) -> 1.
-spec comp2(2..10) -> 2..5 | 8..10.
comp2(N) when N =< 5 -> N;
comp2(N) when N >= 8 -> N;
comp2(_) -> 10.
-spec comp3(1..... | null | https://raw.githubusercontent.com/josefs/Gradualizer/208f5816b0157f282212fc036ba7560f0822f9fc/test/should_pass/refine_comparison.erl | erlang | -module(refine_comparison).
-compile([export_all, nowarn_export_all]).
-spec comp1(integer()) -> pos_integer() | neg_integer().
comp1(N) when 0 < N -> N;
comp1(N) when 0 > N -> N;
comp1(_) -> 1.
-spec comp2(2..10) -> 2..5 | 8..10.
comp2(N) when N =< 5 -> N;
comp2(N) when N >= 8 -> N;
comp2(_) -> 10.
-spec comp3(1..... | |
f4c8c7ff1052224ccfdc1d7b037c9bfc2e50e0b4199a6c232e89830542562464 | spurious/sagittarius-scheme-mirror | helper.scm | ;; -*- scheme -*-
(library (sagittarius test helper)
(export current-reporter
push-report
push-error
push-success
show-report
generate-reporter)
(import (rnrs)
(core))
(define current-reporter
(let ((dict (make-eqv-hashtable)))
(lambda (id . rep)
(if (null? rep)
(... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/sagittarius/test/helper.scm | scheme | -*- scheme -*-
todo get thread-id | (library (sagittarius test helper)
(export current-reporter
push-report
push-error
push-success
show-report
generate-reporter)
(import (rnrs)
(core))
(define current-reporter
(let ((dict (make-eqv-hashtable)))
(lambda (id . rep)
(if (null? rep)
(hashtable-ref dict... |
d249cbc4325d65129ca6ffbbd8d6123812a29416ee9a6a7154c48853fec15594 | angelhof/flumina | util.erl | -module(util).
-export([err/2,
crash/2,
exec/1,
sink/0,
sink/1,
sink_no_log/1,
sink/2,
run_experiment/3,
log_time_and_number_of_messages_before_producers_spawn/2,
merge_with/3,
take_at_most/2,
map_focus/2,
nothing/0,
always_ok/1,
unregister_if_registered/0,
... | null | https://raw.githubusercontent.com/angelhof/flumina/9602454b845cddf8e3dff8c54089c7f970ee08e1/src/util.erl | erlang | It shouldn't be the case that both log tags and
message logger init fun have been given.
Sinks can't know what they receive (or can they?)
TODO: Optimize sinks to be able to know what
they will receive to specialize the logger.
Sinks can't know what they receive (or can they?)
TODO: Optimize sinks to be able t... | -module(util).
-export([err/2,
crash/2,
exec/1,
sink/0,
sink/1,
sink_no_log/1,
sink/2,
run_experiment/3,
log_time_and_number_of_messages_before_producers_spawn/2,
merge_with/3,
take_at_most/2,
map_focus/2,
nothing/0,
always_ok/1,
unregister_if_registered/0,
... |
fe5140c58b4359d3ea3508dcac03efe0a002a8effccfd9c0f720a4e37fbc457a | AbstractMachinesLab/caramel | dyn.ml | module Array = Stdlib.ArrayLabels
module List = Stdlib.ListLabels
module String = Stdlib.StringLabels
module Bytes = Stdlib.Bytes
type t =
| Opaque
| Unit
| Int of int
| Int64 of int64
| Bool of bool
| String of string
| Bytes of bytes
| Char of char
| Float of float
| Option of t option
| List o... | null | https://raw.githubusercontent.com/AbstractMachinesLab/caramel/7d4e505d6032e22a630d2e3bd7085b77d0efbb0c/vendor/ocaml-lsp-1.4.0/vendor/stdune/dyn.ml | ocaml | don't need to handle tabs because those are already escaped | module Array = Stdlib.ArrayLabels
module List = Stdlib.ListLabels
module String = Stdlib.StringLabels
module Bytes = Stdlib.Bytes
type t =
| Opaque
| Unit
| Int of int
| Int64 of int64
| Bool of bool
| String of string
| Bytes of bytes
| Char of char
| Float of float
| Option of t option
| List o... |
b66f24c444037b115c8b467b10e234bd41ad9b0ac06b9c2c53ecf23319adc6e9 | kappelmann/engaging-large-scale-functional-programming | Exercise06.hs | module Exercise06 where
import Prelude
import Data.List
import Data.Either
import Data.Eq
data Colour = Gold | RustyBrown | TurtleGreen deriving (Eq)
type Number = Int
data Card = Card Colour Number
tweedledumTweedledee :: [Either Colour Number] -> Integer
tweedledumTweedledee xs = genericLength [x|x<- rights xs, ev... | null | https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/06/uploads/turtlemasters/Exercise06.hs | haskell | module Exercise06 where
import Prelude
import Data.List
import Data.Either
import Data.Eq
data Colour = Gold | RustyBrown | TurtleGreen deriving (Eq)
type Number = Int
data Card = Card Colour Number
tweedledumTweedledee :: [Either Colour Number] -> Integer
tweedledumTweedledee xs = genericLength [x|x<- rights xs, ev... | |
2cb669c6aa3c57d89de444b10cb37738284dce08c64e4a3eb8da1c736cf2b86e | FranklinChen/hugs98-plus-Sep2006 | Ix.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.Ix
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : stable
-- Portability : portable
--
-- The 'Ix'... | null | https://raw.githubusercontent.com/FranklinChen/hugs98-plus-Sep2006/54ab69bd6313adbbed1d790b46aca2a0305ea67e/packages/base/Data/Ix.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Ix
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : stable
Portability : portable
The 'Ix' class is used to map a contiguous subrange of values in
type onto integers... | Copyright : ( c ) The University of Glasgow 2001
( see " Data . Array " , " Data . Array . IArray " and " Data . Array . MArray " ) .
module Data.Ix
(
Ix
)
Ix Int
Ix Integer
Ix Bool
Implementation checked wrt . 98 lib report , 1/99 .
is the same numbering defined by the ' ' class . For... |
7d7a0d38096bbb639532fa40df1be370f7ff3fc10965959e26c5ba93bbf4cc35 | atlas-engineer/nyxt | password.lisp | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :password)
(define-class password-interface ()
((executable
nil
:type (or null string)
:documentation "The program to query for password information.")
(sleep-timer
15
:type alexandria:n... | null | https://raw.githubusercontent.com/atlas-engineer/nyxt/4f21c75f6d4bb992d1905a94ecc413ea4c293eb7/libraries/password-manager/password.lisp | lisp | xclip errors out when the clipboard contains non-text:
#issuecomment-466625564.
Prerequisite Functions
Reset the clipboard so that the user does not accidentally paste
something else.
Commands to wrap together. | SPDX - FileCopyrightText : Atlas Engineer LLC
SPDX - License - Identifier : BSD-3 - Clause
(in-package :password)
(define-class password-interface ()
((executable
nil
:type (or null string)
:documentation "The program to query for password information.")
(sleep-timer
15
:type alexandria:n... |
6be91053ceab625a47e0834ec5284fe927c03553cf7e348133a54728c94601f5 | vlstill/hsExprTest | foldr.q.hs | import qualified Prelude
-- @ INJECT BEGIN
import Prelude hiding ( foldr, foldl, scanr, scanl, foldr1, foldl1, scanr1, scanl1 )
-- @ INJECT END
expr = "myfoldr"
timeout = 4
myfoldr :: (a -> b -> b) -> b -> [a] -> b
myfoldr = Prelude.foldr
| null | https://raw.githubusercontent.com/vlstill/hsExprTest/391fc823c1684ec248ac8f76412fefeffb791865/examples/foldr.q.hs | haskell | @ INJECT BEGIN
@ INJECT END | import qualified Prelude
import Prelude hiding ( foldr, foldl, scanr, scanl, foldr1, foldl1, scanr1, scanl1 )
expr = "myfoldr"
timeout = 4
myfoldr :: (a -> b -> b) -> b -> [a] -> b
myfoldr = Prelude.foldr
|
8c6099bb7d39f69fb976915ff0b98c883bd3f852dca6a7db5be9e21acc93d763 | lemaetech/wtr | wtr_ppx.ml | -------------------------------------------------------------------------
* Copyright ( c ) 2021 . All rights reserved .
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License , v. 2.0 . If a copy of the MPL was not distributed with this
* file , You can obtain one at /.
... | null | https://raw.githubusercontent.com/lemaetech/wtr/2db23853fe4e9613629fc3c1e6bad1a5a2a3d943/ppx/wtr_ppx.ml | ocaml |
Default method is `GET | -------------------------------------------------------------------------
* Copyright ( c ) 2021 . All rights reserved .
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License , v. 2.0 . If a copy of the MPL was not distributed with this
* file , You can obtain one at /.
... |
e3d0ca5cab8847d94f5abb68d568b0b95c785d419ec5297c9e10526000cfbad8 | inaka/katana-test | ktn_meta_suite_SUITE.erl | -module(ktn_meta_suite_SUITE).
-include_lib("mixer/include/mixer.hrl").
-mixin([{ ktn_meta_SUITE
, [ all/0
, xref/1
, dialyzer/1
, elvis/1
]
}]).
-export([init_per_suite/1, end_per_suite/1]).
-type config() :: [{atom(), term()}].
-if(?OTP_RELEASE >= 23).
-beha... | null | https://raw.githubusercontent.com/inaka/katana-test/a99e56b8a49d751e16644d8d035512c2925f28b8/test/ktn_meta_suite_SUITE.erl | erlang | -module(ktn_meta_suite_SUITE).
-include_lib("mixer/include/mixer.hrl").
-mixin([{ ktn_meta_SUITE
, [ all/0
, xref/1
, dialyzer/1
, elvis/1
]
}]).
-export([init_per_suite/1, end_per_suite/1]).
-type config() :: [{atom(), term()}].
-if(?OTP_RELEASE >= 23).
-beha... | |
60f99037c82330961f015e1323db36ef2a0d16d8fa7074ed9090f7b5d957b0a6 | jeromesimeon/Galax | planio_common.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/planio/planio_common.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : planio_common.mli , v 1.14 2007/10/16 01:25:35 mff Exp $
open Namespace_names
open Namespace_symbols
val algebra_prefix : prefix
val algebra_uri : uri
val algebra_bindings : Namespace_context.binding_table
val alg_elem ... |
d5e11e66cd03ef115055e0c7cbebefccc8b2c00dac3f93d84873c4ada2d8ca73 | nasa/Common-Metadata-Repository | collection_query.clj | (ns cmr.search.services.parameters.converters.collection-query
"Contains functions for converting query parameters to collection query condition"
(:require
[cmr.search.models.query :as qm]
[cmr.common-app.services.search.params :as p]))
;; Converts parameter and values into collection query condition
(defmet... | null | https://raw.githubusercontent.com/nasa/Common-Metadata-Repository/cc56dd75c4c78c07e4a4d209bdd1759c39265964/search-app/src/cmr/search/services/parameters/converters/collection_query.clj | clojure | Converts parameter and values into collection query condition | (ns cmr.search.services.parameters.converters.collection-query
"Contains functions for converting query parameters to collection query condition"
(:require
[cmr.search.models.query :as qm]
[cmr.common-app.services.search.params :as p]))
(defmethod p/parameter->condition :collection-query
[context concept-t... |
474cdc9c46eb39e5e309f308c67c3f4610cde36b973e2ca5a45f03846d615915 | cbaggers/rtg-math | base-vectors.lisp | (in-package :rtg-math.base-vectors)
(defmacro def-v! (name type)
(let* ((one-arg (intern (format nil "V!ONE-ARG-~s" name)))
(name-string (symbol-name name))
(v2name (intern (format nil "V2!~a" (subseq name-string 2))))
(v3name (intern (format nil "V3!~a" (subseq name-string 2))))
... | null | https://raw.githubusercontent.com/cbaggers/rtg-math/29fc5b3d0028a4a11a82355ecc8cca62662c69e0/vectors/base/base-vectors.lisp | lisp | deprecated
deprecated
----------------------------------------------------------------
---------------------------------------------------------------- | (in-package :rtg-math.base-vectors)
(defmacro def-v! (name type)
(let* ((one-arg (intern (format nil "V!ONE-ARG-~s" name)))
(name-string (symbol-name name))
(v2name (intern (format nil "V2!~a" (subseq name-string 2))))
(v3name (intern (format nil "V3!~a" (subseq name-string 2))))
... |
9a98cdcdf2b0121d7bfe69ca14687dbfdee457609b0dff91a27979ff7ddd25d5 | JohnLato/iteratee | Char.hs | {-# LANGUAGE ScopedTypeVariables, FlexibleContexts #-}
| Utilities for - based iteratee processing .
module Data.Iteratee.Char (
-- * Word and Line processors
printLines
,printLinesUnterminated
,enumLines
,enumLinesBS
,enumWords
,enumWordsBS
)
where
import Data.Iteratee.Iteratee
import qu... | null | https://raw.githubusercontent.com/JohnLato/iteratee/83852cebab1051999d70d2abce86f5ab88c6d7ec/src/Data/Iteratee/Char.hs | haskell | # LANGUAGE ScopedTypeVariables, FlexibleContexts #
* Word and Line processors
with non-trivial actions during chunk processing
Only lines ending with a newline are printed,
|Print lines as they are received.
no newline is printed.
as it is more efficient with long lines.
|Convert the stream of characters to... |
| Utilities for - based iteratee processing .
module Data.Iteratee.Char (
printLines
,printLinesUnterminated
,enumLines
,enumLinesBS
,enumWords
,enumWordsBS
)
where
import Data.Iteratee.Iteratee
import qualified Data.Iteratee.ListLike as I
import Data.Iteratee.ListLike (heads)
imp... |
25afd20d16972b93958b3433b03d28ed027c4fe139ad1f16a9447d895b3d0ddd | manifest/jose-erlang | jose_jws_compact.erl | %% ----------------------------------------------------------------------------
%% The MIT License
%%
Copyright ( c ) 2016 - 2017 < >
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this software and associated documentation files (the "Software"), to
deal in the Software... | null | https://raw.githubusercontent.com/manifest/jose-erlang/9541a477eea6c4312ff0734b426e7ac7e3f658de/src/jose_jws_compact.erl | erlang | ----------------------------------------------------------------------------
The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
rights to use, copy, modify, merge, publish, distribute, sublicense, a... | Copyright ( c ) 2016 - 2017 < >
deal in the Software without restriction , including without limitation the
sell copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EX... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.