_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 |
|---|---|---|---|---|---|---|---|---|
a18d86d51ca48d3c60614815792a7ec82bf6756cac87838dcd0187ad1291a173 | input-output-hk/ouroboros-network | Ledger.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingVia #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
{-# OPTIONS -Wno-orphans #-}
module Ouroboros.Consensus.By... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/af14789baae3df5c5c67ac0447954475bab9ba67/ouroboros-consensus-byronspec/src/Ouroboros/Consensus/ByronSpec/Ledger/Ledger.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingVia #
# OPTIONS -Wno-orphans #
* Type family instances
----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
module Ouroboros.Consensus.ByronSpec.Ledger.Ledger (
ByronSpecLedgerError (..)
, initByronSpecLedgerState
, LedgerState (..)
, Ticked (..)
) where
import ... |
aa4e0d03adb1851089178c01ee0c267599c5b8749898e3b63a810753d2709a47 | cpeikert/Lol | KHPRF.hs | |
Module : Crypto . Lol . Applications . Examples . KHPRF
Description : Example using .
Copyright : ( c ) , 2018
, 2018
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Example usage of ' Crypto . Lol . Applications . ' .
Module... | null | https://raw.githubusercontent.com/cpeikert/Lol/4416ac4f03b0bff08cb1115c72a45eed1fa48ec3/lol-apps/Crypto/Lol/Applications/Examples/KHPRF.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
| Simple example of how to use the | |
Module : Crypto . Lol . Applications . Examples . KHPRF
Description : Example using .
Copyright : ( c ) , 2018
, 2018
License : GPL-3
Maintainer :
Stability : experimental
Portability : POSIX
Example usage of ' Crypto . Lol . Applications . ' .
Module... |
b3ec48b3a83ff376a0f44413dc2e9d04107660a51d84975744e2cb0a9e7d139f | xebia/VisualReview | integration_test.clj | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Copyright 2015 Xebia B.V.
;
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 requir... | null | https://raw.githubusercontent.com/xebia/VisualReview/c74c18ff73cbf11ece23203cb7a7768e626a03e2/src/integration/clojure/com/xebia/visualreview/itest/integration_test.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2015 Xebia B.V.
Licensed under the Apache License , Version 2.0 ( the " License " )
distributed under the License is distributed on an " AS IS " BASIS ,
(ns com.xebia.visualreview.itest.integration-test
(:require [clojure.test :refer :all]
[com.xebia.visualreview.api-test :as api]
... |
b2c54b2b3e613eb75ff8cdaae2abdbe8440f40700aacb9584c9d147411eb1a8c | batsh-dev-team/Batsh | bash_ast.ml | open Core_kernel
type identifier = string
and identifiers = identifier list
and leftvalue =
| Identifier of identifier
| ListAccess of (leftvalue * arithmetic)
| EntireList of leftvalue
| Cardinal of leftvalue
and arithmetic =
| Leftvalue of leftvalue
| Int of int
| Float of float
| ArithUnary of (s... | null | https://raw.githubusercontent.com/batsh-dev-team/Batsh/5c8ae421e0eea5dcb3da01643152ad96af941f07/lib/bash_ast.ml | ocaml | open Core_kernel
type identifier = string
and identifiers = identifier list
and leftvalue =
| Identifier of identifier
| ListAccess of (leftvalue * arithmetic)
| EntireList of leftvalue
| Cardinal of leftvalue
and arithmetic =
| Leftvalue of leftvalue
| Int of int
| Float of float
| ArithUnary of (s... | |
cb161ef087a10db75b254f1fb1b11d802ed6638c179337cd4a1d0a7834559917 | dnlkrgr/hsreduce | Inline.hs | module Inline where
data Arst = Arst String
type Brst = Int
f :: Arst -> ()
f (Arst "arst") = ()
g :: Brst -> ()
g 3 = ()
| null | https://raw.githubusercontent.com/dnlkrgr/hsreduce/8f66fdee036f8639053067572b55d9a64359d22c/test-cases/trying-out/Inline.hs | haskell | module Inline where
data Arst = Arst String
type Brst = Int
f :: Arst -> ()
f (Arst "arst") = ()
g :: Brst -> ()
g 3 = ()
| |
04ba0f033e94fd5429aad22490f3e7ab76c6d0a1c10e3c95ea7a982336fea4a4 | edicl/hunchentoot | util.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;; * Redistribut... | null | https://raw.githubusercontent.com/edicl/hunchentoot/0023dd3927e5840f1f02f9a8bdab2b4a7037c652/url-rewrite/util.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the... |
Copyright ( c ) 2004 - 2010 , Dr. . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :url-rewrite)
(declaim (inline skip-whitespace))
(defun skip-whitespace (&key (skip t) (write-throug... |
b896a19237862e5d4f6ead0b1bf8ed1a601aeddf6177e138711c72dc713f8c07 | greghendershott/frog | load.rkt | #lang racket/base
(require (for-syntax racket/base
racket/function
racket/syntax))
(begin-for-syntax
(define provide-syms '(init
enhance-body
clean))
(provide provide-syms))
(define-syntax (define-the-things stx)
(with-... | null | https://raw.githubusercontent.com/greghendershott/frog/93d8b442c2e619334612b7e2d091e4eb33995021/frog/config/private/load.rkt | racket | #lang racket/base
(require (for-syntax racket/base
racket/function
racket/syntax))
(begin-for-syntax
(define provide-syms '(init
enhance-body
clean))
(provide provide-syms))
(define-syntax (define-the-things stx)
(with-... | |
1eaaa577ef6360b8d0e6d658f57c915046412197d8eb2e551910ebb9a83560df | ConsumerDataStandardsAustralia/validation-prototype | PayeesGens.hs | module Web.ConsumerData.Au.Api.Types.Banking.PayeesGens where
import Control.Applicative (liftA2)
import Control.Monad (replicateM)
import Country.Gens (countryGen)
import Data.Text (Text)
import qualified Data.Text as Text
import Hedge... | null | https://raw.githubusercontent.com/ConsumerDataStandardsAustralia/validation-prototype/ff63338b77339ee49fa3e0be5bb9d7f74e50c28b/consumer-data-au-api-types/tests/Web/ConsumerData/Au/Api/Types/Banking/PayeesGens.hs | haskell | module Web.ConsumerData.Au.Api.Types.Banking.PayeesGens where
import Control.Applicative (liftA2)
import Control.Monad (replicateM)
import Country.Gens (countryGen)
import Data.Text (Text)
import qualified Data.Text as Text
import Hedge... | |
0071f8cd44f69afa8896cac4c078042bedd8be3edc7c7f008bcdece76175ac0f | kupl/FixML | sub6.ml | type nat = ZERO | SUCC of nat
let rec natadd (a, b) = match a
with ZERO -> b
| SUCC ap -> SUCC (natadd (ap, b))
let rec natmul (a, b) =
if a=ZERO || b=ZERO then ZERO
else match a
with SUCC ZERO -> b
| SUCC ap -> (natadd (a, (natmul (ap, b))));;
| null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/nat/nat/submissions/sub6.ml | ocaml | type nat = ZERO | SUCC of nat
let rec natadd (a, b) = match a
with ZERO -> b
| SUCC ap -> SUCC (natadd (ap, b))
let rec natmul (a, b) =
if a=ZERO || b=ZERO then ZERO
else match a
with SUCC ZERO -> b
| SUCC ap -> (natadd (a, (natmul (ap, b))));;
| |
0b1f896d9aa32bbbc766438ed523b70e6867a262d8edd2ad6a5b1bb654b1f4bb | lispnik/iup | counter.lisp | (eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload "iup"))
(defpackage #:iup-examples.counter
(:use #:common-lisp)
(:export #:counter))
(in-package #:iup-examples.counter)
(defun counter ()
(iup:with-iup ()
(let* ((count (iup:text :readonly :yes :value 0 :size 60))
(button (iup:butt... | null | https://raw.githubusercontent.com/lispnik/iup/f8e5f090bae47bf8f91ac6fed41ec3bc01061186/examples/7guis/counter.lisp | lisp | (eval-when (:compile-toplevel :load-toplevel :execute)
(ql:quickload "iup"))
(defpackage #:iup-examples.counter
(:use #:common-lisp)
(:export #:counter))
(in-package #:iup-examples.counter)
(defun counter ()
(iup:with-iup ()
(let* ((count (iup:text :readonly :yes :value 0 :size 60))
(button (iup:butt... | |
83fac62b2e9a6bd6ae1e2c5a55c47d4dbc44c0a353c125dd9e48e15e4ba754b0 | shayne-fletcher/zen | ml_typedtree.mli | (** Abstract syntax tree after typing *)
open Ml_asttypes (*[type rec_flag], [type 'a loc]*)
open Ml_types (*Constructor and value descriptions*)
(**{2 Types}*)
(**The type of "partiality" information indiciating partial or total
patten matchings*)
type partial = | Partial | Total
(**The type of a pattern*)
type... | null | https://raw.githubusercontent.com/shayne-fletcher/zen/10a1d0b9bf261bb133918dd62fb1593c3d4d21cb/ocaml/cos/src/typing/ml_typedtree.mli | ocaml | * Abstract syntax tree after typing
[type rec_flag], [type 'a loc]
Constructor and value descriptions
*{2 Types}
*The type of "partiality" information indiciating partial or total
patten matchings
*The type of a pattern
*The type of a pattern description
* _
* x
* P as a
* P1 | P2
*The type of an expression
*The... |
type partial = | Partial | Total
type pattern = {
pat_desc : pattern_desc;
pat_loc : Ml_location.t;
}
and pattern_desc =
| Tpat_any
| Tpat_var of Ml_ident.t * string loc
| Tpat_alias of pattern * Ml_ident.t * string loc
| Tpat_constant of constant
* 1 , ' a ' , " true " , 1.0 , 1l , 1L , 1n
| Tpat_tu... |
822da27f30f44a2dfb8adcea470c85222039d22652b1879f2b6f718181e878a6 | tmattio/js-bindings | es2020_intl.ml | [@@@js.dummy "!! This code has been generated by gen_js_api !!"]
[@@@ocaml.warning "-7-32-39"]
[@@@ocaml.warning "-7-11-32-33-39"]
open Es2019
module Intl =
struct
include struct include Intl end
module BCP47LanguageTag =
struct
type t = string
let rec t_of_js : Ojs.t -> t =
fu... | null | https://raw.githubusercontent.com/tmattio/js-bindings/f1d36bba378e4ecd5310542a0244dce9258b6496/lib/es2020/es2020_intl.ml | ocaml | [@@@js.dummy "!! This code has been generated by gen_js_api !!"]
[@@@ocaml.warning "-7-32-39"]
[@@@ocaml.warning "-7-11-32-33-39"]
open Es2019
module Intl =
struct
include struct include Intl end
module BCP47LanguageTag =
struct
type t = string
let rec t_of_js : Ojs.t -> t =
fu... | |
e92019538ab5323c50660ac3951d56d6386576a2d597562e780c9b28dfeb6921 | slyrus/clem | defmatrix-mult-block.lisp |
(in-package :clem)
(defparameter *max-block-size* 32)
(declaim (type fixnum *max-block-size*))
(defmacro fixnum1+ (place)
`(the fixnum (1+ ,place)))
(defgeneric %mat-mult-block (m n p
mstartr mendr mstartc mendc
nstartr nendr nstartc nendc))
(defgen... | null | https://raw.githubusercontent.com/slyrus/clem/5eb055bb3f45840b24fd44825b975aa36bd6d97c/src/typed-ops/defmatrix-mult-block.lisp | lisp | m_11 * n_11
m_21 * n_11 |
(in-package :clem)
(defparameter *max-block-size* 32)
(declaim (type fixnum *max-block-size*))
(defmacro fixnum1+ (place)
`(the fixnum (1+ ,place)))
(defgeneric %mat-mult-block (m n p
mstartr mendr mstartc mendc
nstartr nendr nstartc nendc))
(defgen... |
26699b52600c60965bb85298f49c79fe3f146a7076272be933a177d786e876bc | spell-music/amsterdam | Comparison.hs | | additional parameters : none
In instrument 1 PLUCK uses a set of random numbers , made by PLUCK itself ,
while in instrument 2 the table f77 is created from the soundfile " Sflib/10_02_1.SF " .
This soundfile also contains random numbers , but gives additional control over the
bandwidth of the noise . For ... | null | https://raw.githubusercontent.com/spell-music/amsterdam/ab491022c7826c74eab557ecd11794268f5a5ae0/15-karplus-strong/Comparison.hs | haskell | how to read tables from files ??? | | additional parameters : none
In instrument 1 PLUCK uses a set of random numbers , made by PLUCK itself ,
while in instrument 2 the table f77 is created from the soundfile " Sflib/10_02_1.SF " .
This soundfile also contains random numbers , but gives additional control over the
bandwidth of the noise . For ... |
0fd04ce6341c3ff0bd0a1d6cb36e08b336b6fc484128f436362f1cc4cb1ac38e | coding-robots/iwl | app.rkt | #lang racket
(require web-server/servlet
web-server/servlet-env
web-server/templates
srfi/43
net/uri-codec
racket/runtime-path
mzlib/defmacro)
(require "bayes.rkt"
"crc32.rkt"
"utils.rkt")
(define *app-version* 10)
(define *app-date* "November 2... | null | https://raw.githubusercontent.com/coding-robots/iwl/bf13ab3f75aff0fe63c07555a41574e919bb11db/app.rkt | racket | Hash with crc32 mappings to author names
unused, but required
-"- | #lang racket
(require web-server/servlet
web-server/servlet-env
web-server/templates
srfi/43
net/uri-codec
racket/runtime-path
mzlib/defmacro)
(require "bayes.rkt"
"crc32.rkt"
"utils.rkt")
(define *app-version* 10)
(define *app-date* "November 2... |
876abda94e2b425a0df8c7039926e3b3a539ba2863e9a9f22d621ce6e9955d47 | pink-gorilla/pinkie | resolve.cljc | (ns viz.resolve
(:require
[viz.unknown :refer [no-renderer]]))
(defn resolve-fn
[resolve fn-symbol]
(if-let [f (resolve fn-symbol)]
f
(no-renderer (pr-str fn-symbol))))
(comment
(defn clj-vega [spec]
(str "vega spec: " (pr-str spec)))
(clj-vega "test")
(defn clj [s]
(cond
(= s ... | null | https://raw.githubusercontent.com/pink-gorilla/pinkie/a0d26fdc6e6b8499dd957c8ad5f16493a35b4bc3/src/viz/resolve.cljc | clojure | (ns viz.resolve
(:require
[viz.unknown :refer [no-renderer]]))
(defn resolve-fn
[resolve fn-symbol]
(if-let [f (resolve fn-symbol)]
f
(no-renderer (pr-str fn-symbol))))
(comment
(defn clj-vega [spec]
(str "vega spec: " (pr-str spec)))
(clj-vega "test")
(defn clj [s]
(cond
(= s ... | |
fe7e649778a11fe0fcf3db0c80c01938647b19150e38b222f56507485c5b9cac | tnelson/Forge | always-tests.rkt | #lang forge
option run_sterling off
option verbose 0
option problem_type temporal
sig Node {
first : set Node,
var second : set Node
}
pred secondIsFirst {
first = second implies first' = second'
}
// WHOOPS I NEVER FINISHED THIS ONE
| null | https://raw.githubusercontent.com/tnelson/Forge/a7187ef110f46493c1d45011035b05646b9ccd22/forge/tests/forge/electrum/always-tests.rkt | racket | #lang forge
option run_sterling off
option verbose 0
option problem_type temporal
sig Node {
first : set Node,
var second : set Node
}
pred secondIsFirst {
first = second implies first' = second'
}
// WHOOPS I NEVER FINISHED THIS ONE
| |
a64e89af3addbe512ccd51bddb2701e1398696479ae9fd63d75c99b59d89d3aa | nominolo/lambdachine | ReadP.hs | # LANGUAGE NoImplicitPrelude , Rank2Types , MagicHash #
module Text.ParserCombinators.ReadP
(
: : * - > * ; instance Functor , Monad , MonadPlus
: :
look, -- :: ReadP String
(+++), -- :: ReadP a -> ReadP a -> ReadP a
(<++), -- :: ReadP a -> ReadP a -> ReadP a
gather, -- :: ReadP a ... | null | https://raw.githubusercontent.com/nominolo/lambdachine/49d97cf7a367a650ab421f7aa19feb90bfe14731/libraries/base/Text/ParserCombinators/ReadP.hs | haskell | :: ReadP String
:: ReadP a -> ReadP a -> ReadP a
:: ReadP a -> ReadP a -> ReadP a
:: ReadP a -> ReadP (String, a)
* Other operations
:: ReadP a
:: String -> ReadP String
:: [ReadP a] -> ReadP a
:: Int -> ReadP a -> ReadP [a]
:: ReadP open -> ReadP close -> ReadP a -> ReadP a
:: a -> ReadP a -> ReadP a
:: Re... | # LANGUAGE NoImplicitPrelude , Rank2Types , MagicHash #
module Text.ParserCombinators.ReadP
(
: : * - > * ; instance Functor , Monad , MonadPlus
: :
: : ( )
: : ( Bool ) - > ReadP Char
: : ReadP Char
: : ( Bool ) - > ReadP String
: : ( Bool ) - > ReadP String
: : ( )
ReadS,
r... |
7084f2bebd1bbbb2fe76145cbd945c30414937e59d5e39bbd32d2ca1e70eb5d0 | eryx67/vk-api-example | Pagination.hs | {-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
{-# LANGUAGE TypeFamilies #-}
-- | Common widgets for views
module VK.App.Widgets.Pa... | null | https://raw.githubusercontent.com/eryx67/vk-api-example/4ce634e2f72cf0ab6ef3b80387ad489de9d8c0ee/src/VK/App/Widgets/Pagination.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
| Common widgets for views | # LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE TupleSections #
module VK.App.Widgets.Pagination where
import Control.Monad (join)
import Data.Foldable (forM_)
import Data.List (unfoldr)
i... |
0a8dac708bece366dc027390243eeba5e7a7eba49aec4d77fb1df2fc1632cbd7 | pokepay/aws-sdk-lisp | api.lisp | ;; DO NOT EDIT: File is generated by AWS-SDK/GENERATOR.
(common-lisp:defpackage #:aws-sdk/services/importexport/api
(:use)
(:nicknames #:aws/importexport)
(:import-from #:aws-sdk/generator/shape)
(:import-from #:aws-sdk/generator/operation)
(:import-from #:aws-sdk/api)
(:import-from #:aws-sdk/request)
(:... | null | https://raw.githubusercontent.com/pokepay/aws-sdk-lisp/ad9a8f9294a9799cef5f4d85e0cd34eca418be24/services/importexport/api.lisp | lisp | DO NOT EDIT: File is generated by AWS-SDK/GENERATOR. |
(common-lisp:defpackage #:aws-sdk/services/importexport/api
(:use)
(:nicknames #:aws/importexport)
(:import-from #:aws-sdk/generator/shape)
(:import-from #:aws-sdk/generator/operation)
(:import-from #:aws-sdk/api)
(:import-from #:aws-sdk/request)
(:import-from #:aws-sdk/error))
(common-lisp:in-package #:... |
94343fff8434cd1c5de6c7f9022ad488151881320142463d455f5343404aea35 | well-typed/optics | Optics.hs | -- |
-- Module: Numeric.Optics
-- Description: Optics for working with numeric types.
--
module Numeric.Optics
( base
, integral
-- * Predefined bases
, binary
, octal
, decimal
, hex
-- * Arithmetic lenses
, adding
, subtracting
, multiplying
, dividing
, exponentiating
, negated
, pa... | null | https://raw.githubusercontent.com/well-typed/optics/ba3c5a4d2f110c82238bc2fe7bb187023ab516f5/optics-core/src/Numeric/Optics.hs | haskell | |
Module: Numeric.Optics
Description: Optics for working with numeric types.
* Predefined bases
* Arithmetic lenses
through unmodified when re-extracted.
| Pattern synonym that can be used to construct or pattern match on an
Just 256
"helloworld"
| A safe variant of 'digitToInt''
| Select digits that fa... | module Numeric.Optics
( base
, integral
, binary
, octal
, decimal
, hex
, adding
, subtracting
, multiplying
, dividing
, exponentiating
, negated
, pattern Integral
) where
import Data.Char (chr, ord, isAsciiLower, isAsciiUpper, isDigit)
import Data.Maybe (fromMaybe)
import GHC.Stack
impo... |
5de21bd59346c464392fcfc97b046331690baeae2ef8aa1a150906b3d5945d03 | inhabitedtype/ocaml-aws | describeDBProxyTargetGroups.ml | open Types
open Aws
type input = DescribeDBProxyTargetGroupsRequest.t
type output = DescribeDBProxyTargetGroupsResponse.t
type error = Errors_internal.t
let service = "rds"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_op... | null | https://raw.githubusercontent.com/inhabitedtype/ocaml-aws/b6d5554c5d201202b5de8d0b0253871f7b66dab6/libraries/rds/lib/describeDBProxyTargetGroups.ml | ocaml | open Types
open Aws
type input = DescribeDBProxyTargetGroupsRequest.t
type output = DescribeDBProxyTargetGroupsResponse.t
type error = Errors_internal.t
let service = "rds"
let signature_version = Request.V4
let to_http service region req =
let uri =
Uri.add_query_params
(Uri.of_string (Aws.Util.of_op... | |
36a866aae57276a94b113881618bbeeaeb360d9ae9c5e7af9ebc12fa2d004047 | grin-compiler/ghc-grin | Main.hs | # LANGUAGE ScopedTypeVariables #
import Control.Monad
import Data.Maybe
import Data.List (sortBy)
import Data.Monoid
import Data.Ord
import Options.Applicative
import Text.PrettyPrint.ANSI.Leijen hiding ((<$>), (<>))
import qualified Text.PrettyPrint.ANSI.Leijen as PP
import qualified Data.ByteString.Char8 as BS8
im... | null | https://raw.githubusercontent.com/grin-compiler/ghc-grin/ebc4dca2e1f5b3581d4b84726730564ce909d786/external-stg-util/app/Main.hs | haskell | # LANGUAGE ScopedTypeVariables #
import Control.Monad
import Data.Maybe
import Data.List (sortBy)
import Data.Monoid
import Data.Ord
import Options.Applicative
import Text.PrettyPrint.ANSI.Leijen hiding ((<$>), (<>))
import qualified Text.PrettyPrint.ANSI.Leijen as PP
import qualified Data.ByteString.Char8 as BS8
im... | |
7eb1377b9969ff603c9990a1585d93e0269296353aff850ac9939a7ec6bf7066 | tsloughter/kuberl | kuberl_v1beta1_event.erl | -module(kuberl_v1beta1_event).
-export([encode/1]).
-export_type([kuberl_v1beta1_event/0]).
-type kuberl_v1beta1_event() ::
#{ 'action' => binary(),
'apiVersion' => binary(),
'deprecatedCount' => integer(),
'deprecatedFirstTimestamp' => kuberl_date_time:kuberl_date_time(),
'deprecated... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_event.erl | erlang | -module(kuberl_v1beta1_event).
-export([encode/1]).
-export_type([kuberl_v1beta1_event/0]).
-type kuberl_v1beta1_event() ::
#{ 'action' => binary(),
'apiVersion' => binary(),
'deprecatedCount' => integer(),
'deprecatedFirstTimestamp' => kuberl_date_time:kuberl_date_time(),
'deprecated... | |
e77c56d8f2f54f99fed2aa3f7895d18bd92cda6ecfe1fba75f12d3eb9873face | byorgey/AoC | 17.hs | #!/usr/bin/env stack
stack --resolver lts-19.28 script --package containers --package split --package lens --package mtl --package array
# LANGUAGE FlexibleContexts #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
import Contr... | null | https://raw.githubusercontent.com/byorgey/AoC/03f250a121a8214e12fe9708908fe41704c5d1bc/2022/17/17.hs | haskell | resolver lts-19.28 script --package containers --package split --package lens --package mtl --package array
# LANGUAGE LambdaCase #
----------------------------------------------------------
----------------------------------------------------------
----------------------------------------------------------
that... | #!/usr/bin/env stack
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
import Control.Arrow (first, (***), (>>>))
import Control.Lens (imap, makeLenses, use, (%=), (+=), (-=),
... |
6ba593886c1a4f06732c93907730769cd1b1467f709b7f0d82256380c5148319 | blindglobe/clocc | clex.lisp | -*- Mode : Lisp ; Syntax : Common - Lisp ; Package : CLEX ; -*-
;;; --------------------------------------------------------------------------------------
;;; Title: A flex like scanner generator for Common LISP
Created : 1997 - 10 - 12
Author : < >
;;; License: LGPL (See file COPYING for details).
... | null | https://raw.githubusercontent.com/blindglobe/clocc/a50bb75edb01039b282cf320e4505122a59c59a7/src/gui/clx/docs/clex.lisp | lisp | Syntax : Common - Lisp ; Package : CLEX ; -*-
--------------------------------------------------------------------------------------
Title: A flex like scanner generator for Common LISP
License: LGPL (See file COPYING for details).
-----------------------------------------------------------------------------... | Created : 1997 - 10 - 12
Author : < >
( c ) copyright 1997 - 1999 by
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
Library General Public License for more details .
You should have received a copy of the GNU Lib... |
bc59c3449bfceefe941349729c56424618aa10c88ccf28c64ca2d6fe77dff6c0 | haskell-effectful/effectful | Utils.hs | module Utils
( runShallow
, runDeep
) where
import Effectful
import Effectful.State.Dynamic
runShallow :: Eff '[IOE] a -> IO a
runShallow = runEff
runDeep
:: Eff '[ State (), State (), State (), State (), State ()
, State (), State (), State (), State (), State ()
, IOE
] a
->... | null | https://raw.githubusercontent.com/haskell-effectful/effectful/20848432bd29f648dbbae671da5dff3216b60e44/effectful/bench/Utils.hs | haskell | module Utils
( runShallow
, runDeep
) where
import Effectful
import Effectful.State.Dynamic
runShallow :: Eff '[IOE] a -> IO a
runShallow = runEff
runDeep
:: Eff '[ State (), State (), State (), State (), State ()
, State (), State (), State (), State (), State ()
, IOE
] a
->... | |
4777e0ceb3edcbb9d3799eb93166bde57cc5a92da0e89919e0a74c377212aab9 | chrisdone/lucid | RunHtmlBenchmarks.hs | | This is a module which runs the ' HtmlBenchmarks ' module using the different
-- renderers available.
--
module RunHtmlBenchmarks where
import Criterion.Main
import qualified Data.ByteString.Lazy as LB
import qualified Data.Text.Lazy.Encoding as LT
import qualified Data.Text.Lazy as LT
import qualified ... | null | https://raw.githubusercontent.com/chrisdone/lucid/cc7b2e77c65fc87d5729fabd942486d5729789de/lucid1/benchmarks/RunHtmlBenchmarks.hs | haskell | renderers available.
| Function to run the benchmarks using criterion
| | This is a module which runs the ' HtmlBenchmarks ' module using the different
module RunHtmlBenchmarks where
import Criterion.Main
import qualified Data.ByteString.Lazy as LB
import qualified Data.Text.Lazy.Encoding as LT
import qualified Data.Text.Lazy as LT
import qualified Text.Blaze.Renderer.Utf8 as... |
ea797b2fbcd166b04b35e22763ccbdd136863578888ea624b7b22ffc8e1a6568 | eeng/shevek | save.cljs | (ns shevek.pages.reports.save
(:require [reagent.core :as r]
[shevek.rpc :as rpc]
[shevek.i18n :refer [t]]
[shevek.reflow.core :refer [dispatch] :refer-macros [defevh]]
[shevek.components.modal :refer [show-modal close-modal]]
[shevek.components.form :refer ... | null | https://raw.githubusercontent.com/eeng/shevek/7783b8037303b8dd5f320f35edee3bfbb2b41c02/src/cljs/shevek/pages/reports/save.cljs | clojure | (ns shevek.pages.reports.save
(:require [reagent.core :as r]
[shevek.rpc :as rpc]
[shevek.i18n :refer [t]]
[shevek.reflow.core :refer [dispatch] :refer-macros [defevh]]
[shevek.components.modal :refer [show-modal close-modal]]
[shevek.components.form :refer ... | |
18d0174e93a718da74a8a9fd4d4f42d8cdcd8407ed1af021a69a6778374a6f00 | Gbury/dolmen | value.mli |
(* This file is free software, part of dolmen. See file "LICENSE" for more information *)
* { 2 Type definitions }
(** ************************************************************************ *)
type t
type 'a ops
type any_ops = Ops : _ ops -> any_ops
exception Extraction_failed of t * any_ops
(* Creating/extracti... | null | https://raw.githubusercontent.com/Gbury/dolmen/12bf280df3d886ddc0faa110effbafb71bffef7e/src/model/value.mli | ocaml | This file is free software, part of dolmen. See file "LICENSE" for more information
* ************************************************************************
Creating/extracting values
*************************************************************************
* ***************************************************... |
* { 2 Type definitions }
type t
type 'a ops
type any_ops = Ops : _ ops -> any_ops
exception Extraction_failed of t * any_ops
val mk : ops:'a ops -> 'a -> t
val extract : ops:'a ops -> t -> 'a option
val extract_exn : ops:'a ops -> t -> 'a
val abstract_cst : Dolmen.Std.Expr.Term.Const.t -> t
* { 2 Custom oper... |
9c73d1173dbde4d236a4de48fdcf100cf0f3116bae1551a19df0506d1972b9ce | metosin/kekkonen | client.clj | (ns example.client)
(require '[kekkonen.core :as k])
(require '[schema.core :as s])
(require '[plumbing.core :as p])
;;
;; Handlers
;;
; simplest thing that works
(def hello-world
(k/handler
{:name "hello-world"
:handle (fn [_]
"hello world.")}))
(hello-world {})
; with more stuff
(def ec... | null | https://raw.githubusercontent.com/metosin/kekkonen/5a38c52af34a0eb0f19d87e9f549e93e6d87885f/dev-src/example/client.clj | clojure |
Handlers
simplest thing that works
with more stuff
defnk
stateful inc!
Dispatcher
create
get a handler
invoke a handler
can i call it? | (ns example.client)
(require '[kekkonen.core :as k])
(require '[schema.core :as s])
(require '[plumbing.core :as p])
(def hello-world
(k/handler
{:name "hello-world"
:handle (fn [_]
"hello world.")}))
(hello-world {})
(def echo
(k/handler
{:description "this is a handler for echoing... |
b27d3da12ee10c3cd2bc55d1b0fed302af15e58c95edef6817bb94996f57fc1d | omcljs/om | next.cljc | (ns om.next
(:refer-clojure :exclude #?(:clj [deftype replace var? force]
:cljs [var? key replace force]))
#?(:cljs (:require-macros [om.next :refer [defui invariant]]))
(:require #?@(:clj [clojure.main
[cljs.core :refer [deftype specify! this-as js-arguments... | null | https://raw.githubusercontent.com/omcljs/om/3a1fbe9c0e282646fc58550139b491ff9869f96d/src/main/om/next.cljc | clojure | single method case
TODO: #?:clj invariant - António
=============================================================================
CLJS
=============================================================================
Globals & Dynamics
=============================================================================
SU... | (ns om.next
(:refer-clojure :exclude #?(:clj [deftype replace var? force]
:cljs [var? key replace force]))
#?(:cljs (:require-macros [om.next :refer [defui invariant]]))
(:require #?@(:clj [clojure.main
[cljs.core :refer [deftype specify! this-as js-arguments... |
bf5625f7f9a683b614944afdaf14e8f2a188ffdf799bb1d3253444a0f1df2513 | Perry961002/SICP | exe3.76-smooth.scm | smooth模块
(define (smooth s)
(stream-map (lambda (x y) (/ (+ x y) 2))
s
(stream-cdr s)))
(define (make-zero-crossings input-stream smooth)
(let ((smooth-stream (smooth input-stream)))
(stream-map sign-change-detector
smooth-stream
... | null | https://raw.githubusercontent.com/Perry961002/SICP/89d539e600a73bec42d350592f0ac626e041bf16/Chap3/exercise/exe3.76-smooth.scm | scheme | smooth模块
(define (smooth s)
(stream-map (lambda (x y) (/ (+ x y) 2))
s
(stream-cdr s)))
(define (make-zero-crossings input-stream smooth)
(let ((smooth-stream (smooth input-stream)))
(stream-map sign-change-detector
smooth-stream
... | |
adc9301f96f2a925e8e95a29859fcc752d9958b53f36b77cf7b42caad2f81a0c | derekslager/advent-of-code-2015 | day6.clj | (ns advent-of-code-2015.day6
(:require [clojure.java.io :as io])
(:import java.util.BitSet))
(def grid-x 1000)
(def grid-y 1000)
(def grid-size (* grid-x grid-y))
(defn translate [x y]
(+ (* x grid-x) y))
(defn run []
(let [resource (slurp (io/resource "day6.txt"))
;; lines (str/split-lines resource)... | null | https://raw.githubusercontent.com/derekslager/advent-of-code-2015/bbc589d29613c594178d9305741096f3688b05f2/src/advent_of_code_2015/day6.clj | clojure | lines (str/split-lines resource) | (ns advent-of-code-2015.day6
(:require [clojure.java.io :as io])
(:import java.util.BitSet))
(def grid-x 1000)
(def grid-y 1000)
(def grid-size (* grid-x grid-y))
(defn translate [x y]
(+ (* x grid-x) y))
(defn run []
(let [resource (slurp (io/resource "day6.txt"))
ops (re-seq #"(turn off|turn on|tog... |
9b408a8c472502b076c2380a225b7d431fcda4e36bc6b428db9b1ee2c59dc369 | lispcord/lispcord | guild.lisp | (in-package :lispcord.classes)
(defclass partial-role ()
((name :initarg :name :accessor name)
(color :initarg :color :accessor color)
(hoist :initarg :hoist :accessor hoistp)
(permissions :initarg :perms :accessor permissions)
(mentionable :initarg :mention :accessor menti... | null | https://raw.githubusercontent.com/lispcord/lispcord/448190cc503a0d7e59bdc0ffddb2e9dba0a706af/src/classes/guild.lisp | lisp | The Modify and Add Member REST-calls can use this
It always has the same id as the guild | (in-package :lispcord.classes)
(defclass partial-role ()
((name :initarg :name :accessor name)
(color :initarg :color :accessor color)
(hoist :initarg :hoist :accessor hoistp)
(permissions :initarg :perms :accessor permissions)
(mentionable :initarg :mention :accessor menti... |
2165759581cef655146b33fc2cc4d17e7b83a76cc856bd5f9c0fc4314dfbefe2 | ftovagliari/ocamleditor | dot.ml |
OCamlEditor
Copyright ( C ) 2010 - 2014
This file is part of OCamlEditor .
OCamlEditor 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 y... | null | https://raw.githubusercontent.com/ftovagliari/ocamleditor/53284253cf7603b96051e7425e85a731f09abcd1/src/dot.ml | ocaml | * mk_ocamldoc_cmd
* mk_dot_cmd
* draw
let re1 = Str.regexp "\\(\".*\"\\) \\[style=filled, color=darkturquoise\\];$" in |
OCamlEditor
Copyright ( C ) 2010 - 2014
This file is part of OCamlEditor .
OCamlEditor 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 y... |
a8731ee446c2938e0c9e9be38230994142dcbaf93ec0fd7c2c136c11608fd479 | dyne/freecoin-lib | core.clj | (ns freecoin-lib.test.core
(:require [midje.sweet :refer :all]
[freecoin-lib
[core :as blockchain]
[schemas :as fc]]
[freecoin-lib.db.freecoin :as db]
[clj-storage.db.mongo :as mongo]
[clj-storage.core :as storage]
[schema.core :as... | null | https://raw.githubusercontent.com/dyne/freecoin-lib/70eca6858b3765310fdf134378a3026de9adb121/test/freecoin_lib/test/core.clj | clojure | (ns freecoin-lib.test.core
(:require [midje.sweet :refer :all]
[freecoin-lib
[core :as blockchain]
[schemas :as fc]]
[freecoin-lib.db.freecoin :as db]
[clj-storage.db.mongo :as mongo]
[clj-storage.core :as storage]
[schema.core :as... | |
eeb34f31a6106acbca1fa465733d2aef1ea1ae6232c9be43887e2043a77e934a | janestreet/universe | test.ml | let f x = x
let g x = x
let h x = x
let _ =
(1 |> f) |> (g |> h)
type 'a t = X | F of 'a
let _constr_on_left f = X |> f
let _constr_on_right x = x |> F
| null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/ppx_pipebang/example/test.ml | ocaml | let f x = x
let g x = x
let h x = x
let _ =
(1 |> f) |> (g |> h)
type 'a t = X | F of 'a
let _constr_on_left f = X |> f
let _constr_on_right x = x |> F
| |
da8ba6f4b1eaef79336e461ce76239d8409a27501f668a442d14176a8845f3ae | Decentralized-Pictures/T4L3NT | delegate_services.mli | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/proto_alpha/lib_protocol/delegate_services.mli | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2018 Dynamic Ledger Solutions , Inc. < >
Copyright ( c ) 2020 Metastate AG < >
Copyright ( c ) 2021 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit perso... |
06031ce5f8887b791b7a3a22dbf545fc088d7b456041386a83b555424c7dae72 | athensresearch/athens | help.cljs | (ns athens.views.help
(:require
["@chakra-ui/react" :refer [Text Heading Box Modal ModalOverlay ModalContent ModalHeader ModalBody ModalCloseButton]]
[athens.util :as util]
[clojure.string :as str]
[re-frame.core :refer [dispatch subscribe]]
[reagent.core :as r]))
;; Helpers to create the help c... | null | https://raw.githubusercontent.com/athensresearch/athens/73cb4fa8f88f0730e2fe7a0d38505493b96f4d4b/src/cljs/athens/views/help.cljs | clojure | Helpers to create the help content
==========================
Help content
The examples use a small template language to insert the text (opaque) in the examples.
$text -> placeholder that will be replaced with opaque text, there can be many. The args passed
passed after the template will replace the $te... | (ns athens.views.help
(:require
["@chakra-ui/react" :refer [Text Heading Box Modal ModalOverlay ModalContent ModalHeader ModalBody ModalCloseButton]]
[athens.util :as util]
[clojure.string :as str]
[re-frame.core :refer [dispatch subscribe]]
[reagent.core :as r]))
(defn faded-text
[text]
[:>... |
fb911723f5e0066e14efa68ae7ee56ff7f360be86608257d2043c950ed7ff02b | BekaValentine/SimpleFP-v2 | Unification.hs | {-# OPTIONS -Wall #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE UndecidableInstances #
-- | This module defines unification of dependent types.
module OpenDefs.Unification.Unification where
import Utils.ABT
i... | null | https://raw.githubusercontent.com/BekaValentine/SimpleFP-v2/ae00ec809caefcd13664395b0ae2fc66145f6a74/src/OpenDefs/Unification/Unification.hs | haskell | # OPTIONS -Wall #
# LANGUAGE TypeSynonymInstances #
| This module defines unification of dependent types.
| Equating terms by trivial structural equations.
| Equating case motives as a special helper for the main 'equate' method.
Equating clauses as a special helper for the main 'equate' method. | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
module OpenDefs.Unification.Unification where
import Utils.ABT
import Utils.Elaborator
import Utils.Names
import Utils.Pretty
import Utils.Telescope
import Utils.Unifier
import Open... |
a2663195a89266780bbf035f6779d92592bec182299cba5d06e29e8eb1acb0d2 | alex-gutev/generic-cl | arithmetic.lisp | ;;;; arithmetic.lisp
;;;;
Copyright 2018 - 2021
;;;;
;;;; 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 use,
;... | null | https://raw.githubusercontent.com/alex-gutev/generic-cl/1a49eb43a2212689dba292fb1ee4ddf191153fe5/test/arithmetic.lisp | lisp | arithmetic.lisp
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the... | Copyright 2018 - 2021
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
(in-package :generic-cl/test)
... |
b00bf777661c28dbe7b9edac5a72bd9c34a16bf0c03d409dae89725664cf3e2a | alexandergunnarson/quantum | core.cljc | (ns quantum.test.db.datomic.core
(:require [quantum.db.datomic.core :as ns]))
(defn test:unhandled-type [type obj])
PREDICATES
#?(:clj (defn test:entity? [x]))
#?(:clj (defn test:tempid? [x]))
#?(:clj (defn test:dbfn? [x]))
#?(:clj (defn test:tempid-like? [x]))
#?(:clj (defn test:db? [x]))
(defn test:mdb? [... | null | https://raw.githubusercontent.com/alexandergunnarson/quantum/0c655af439734709566110949f9f2f482e468509/test/quantum/test/db/datomic/core.cljc | clojure | TRANSFORMATIONS/CONVERSIONS
===== QUERIES =====
==== OPERATIONS ====
==== MORE COMPLEX OPERATIONS ==== | (ns quantum.test.db.datomic.core
(:require [quantum.db.datomic.core :as ns]))
(defn test:unhandled-type [type obj])
PREDICATES
#?(:clj (defn test:entity? [x]))
#?(:clj (defn test:tempid? [x]))
#?(:clj (defn test:dbfn? [x]))
#?(:clj (defn test:tempid-like? [x]))
#?(:clj (defn test:db? [x]))
(defn test:mdb? [... |
08a0380f4adcf89cce57c79c0f3dbe947fd07dc48173871ea57ba11cf7e5d68e | phylogeography/spread | continuous_mcc_tree.cljs | (ns ui.new-analysis.continuous-mcc-tree
(:require [re-frame.core :as re-frame]
[reagent-material-ui.core.circular-progress :refer [circular-progress]]
[reagent-material-ui.core.linear-progress :refer [linear-progress]]
[reagent.core :as r]
[shared.components :refer [but... | null | https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/cljs/ui/new_analysis/continuous_mcc_tree.cljs | clojure | we have a filename
we have a filename | (ns ui.new-analysis.continuous-mcc-tree
(:require [re-frame.core :as re-frame]
[reagent-material-ui.core.circular-progress :refer [circular-progress]]
[reagent-material-ui.core.linear-progress :refer [linear-progress]]
[reagent.core :as r]
[shared.components :refer [but... |
041aafe623550c377cd01098ae3cb35556c39dd2b5ff3c700db75bb288abc2d4 | racket/typed-racket | dotted-identity2.rkt | #lang typed/racket/shallow
;; I don't believe the below should work, but it points out where that internal error is coming from.
(: f (All (a ...) ((a ... a -> Integer) -> (a ... a -> Integer))))
(define (f x) x)
(: g (All (b ...) ( -> (b ... b -> Integer))))
(define (g) (lambda xs 0))
(f (g))
| null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/dotted-identity2.rkt | racket | I don't believe the below should work, but it points out where that internal error is coming from. | #lang typed/racket/shallow
(: f (All (a ...) ((a ... a -> Integer) -> (a ... a -> Integer))))
(define (f x) x)
(: g (All (b ...) ( -> (b ... b -> Integer))))
(define (g) (lambda xs 0))
(f (g))
|
d76f0c5d54f65331fb4bdfe4d73a08e99948b3b97dbc7d6c3f6becbf1500baff | xh4/web-toolkit | ed448.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
;;;; ed448.lisp -- implementation of the ed448 signature algorithm
(in-package :crypto)
;;; class definitions
(defclass ed448-public-key ()
((y :initarg :y :reader ed448-key-y :type (simple-array (unsigned-byte 8) (*)))))
(defclass ed448-private-key ()
((x :initar... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/ironclad-v0.47/src/public-key/ed448.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*-
ed448.lisp -- implementation of the ed448 signature algorithm
class definitions
Internally, a point (x, y) is represented using the projective coordinates
(X, Y, Z), with x = X / Z and y = Y / Z.
constant and function definitions
Ed448 (x = 0), no context (y = #()) |
(in-package :crypto)
(defclass ed448-public-key ()
((y :initarg :y :reader ed448-key-y :type (simple-array (unsigned-byte 8) (*)))))
(defclass ed448-private-key ()
((x :initarg :x :reader ed448-key-x :type (simple-array (unsigned-byte 8) (*)))
(y :initarg :y :reader ed448-key-y :type (simple-array (unsigned... |
def75a2bd4fff692e3e45925d858710e223416468239a0baca6f6686eccad0f3 | afronski/wolves-and-rabbits-world-simulation | carrot_protocol_SUITE.erl | -module(carrot_protocol_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("../include/simulation_records.hrl").
-export([ all/0, init_per_testcase/2, end_per_testcase/2 ]).
-export([ carrot_entity_should_have_world_state_applied/1,
carrot_entity_should_notify_about_state_changes/1,
... | null | https://raw.githubusercontent.com/afronski/wolves-and-rabbits-world-simulation/245cbff5a87f3cae0f4cc7bc422e0a4d139fcecc/test/carrot_protocol_SUITE.erl | erlang | -module(carrot_protocol_SUITE).
-include_lib("common_test/include/ct.hrl").
-include_lib("../include/simulation_records.hrl").
-export([ all/0, init_per_testcase/2, end_per_testcase/2 ]).
-export([ carrot_entity_should_have_world_state_applied/1,
carrot_entity_should_notify_about_state_changes/1,
... | |
15ee3cd0f503ffdc520c8cd8f117ac687433fe96966d026112f3bb0969758616 | achesnais/clj-jupyter | heartbeat.clj | (ns clj-jupyter.heartbeat
(:require [taoensso.timbre :as log])
(:import zmq.ZMQ))
(set! *warn-on-reflection* true)
(defn start [{:keys [transport ip hb-port]} shutdown-signal]
(future
(log/info "Starting hearbeat...")
(let [ctx (ZMQ/createContext)
hb-socket (ZMQ/socket ctx ZMQ/ZMQ_REP)]
... | null | https://raw.githubusercontent.com/achesnais/clj-jupyter/3e90a87d5025e4d908c9b6baf75ef20b7c3618ce/src/clj_jupyter/heartbeat.clj | clojure | (ns clj-jupyter.heartbeat
(:require [taoensso.timbre :as log])
(:import zmq.ZMQ))
(set! *warn-on-reflection* true)
(defn start [{:keys [transport ip hb-port]} shutdown-signal]
(future
(log/info "Starting hearbeat...")
(let [ctx (ZMQ/createContext)
hb-socket (ZMQ/socket ctx ZMQ/ZMQ_REP)]
... | |
1a4afd19869ffa0b4fe824d4a0719662bb1eb8bf019ea8409ce54563e099f6b2 | abrantesasf/sicp-abrantes-study-guide | exercise-1.5.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Structure and Interpretation of Computer Programs , 2 . ed . ; ; ; ; ;
Section 1.1 , Exercise 1.5 ; ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Student : ;... | null | https://raw.githubusercontent.com/abrantesasf/sicp-abrantes-study-guide/c8d41093ed3d9944f003e88b7e1b7b29fbb6874a/1/1.1/sicp/exercise-1.5.scm | scheme |
; ; ; ;
; ; ; ;
; ; ; ;
; ; ; ;
QUESTION:
interpreter he is faced with is using applicative-order
evaluation or normal-order evaluation. He defines the following
Then he evaluates the expression
applicative-order evaluation? What behavior will he observe with
an interpreter that uses normal-order evaluatio... |
has invented a test to determine whether the
two procedures :
(define (p) (p))
(define (test x y)
(if (= x 0)
0
y))
(test 0 (p))
What behavior will observe with an interpreter that uses
order : The predicate expression is evaluated first , and the result
The first DEFINE it 's used ... |
927d21c3d4b6206e0cf40286044c6bb10e9a8dadf07740b48e5231df6d718189 | kitlang/kit | Base.hs | module Kit.Compiler.Typers.Base where
| null | https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/src/Kit/Compiler/Typers/Base.hs | haskell | module Kit.Compiler.Typers.Base where
| |
2fa52512ec99987caeb33192d4a1ef5f6fbde168a9bcd8deced790688d55ba97 | ygmpkk/house | Texturing.hs | --------------------------------------------------------------------------------
-- |
-- Module : Graphics.Rendering.OpenGL.GL.Texturing
Copyright : ( c ) 2003
-- License : BSD-style (see the file libraries/OpenGL/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : portab... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/OpenGL/Graphics/Rendering/OpenGL/GL/Texturing.hs | haskell | ------------------------------------------------------------------------------
|
Module : Graphics.Rendering.OpenGL.GL.Texturing
License : BSD-style (see the file libraries/OpenGL/LICENSE)
Maintainer :
Stability : provisional
Portability : portable
-------------------------------------------... | Copyright : ( c ) 2003
This module corresponds to section 3.8 ( Texturing ) of the OpenGL 1.4 specs .
module Graphics.Rendering.OpenGL.GL.Texturing (
TextureTarget(..), marshalTextureTarget,
PixelInternalFormat(..),
marshalPixelInternalFormat, unmarshalPixelInternalFormat
) where
import Graphics.R... |
5b60950aea5e97223364ef57136b7202d64ee0eedaa02a280e497364bc6b593d | xsc/lein-ancient | collect.clj | (ns leiningen.ancient.collect
(:require [leiningen.ancient.artifact.files :as f]
[clojure.java.io :as io])
(:import [java.io File]
[org.apache.commons.io FileUtils]))
# # Project
(defn project-file-at
"Find project file in the given directory.
Returns `nil` "
[path]
(let [f (io/f... | null | https://raw.githubusercontent.com/xsc/lein-ancient/ddcb0a1d655eda37daa47bea63e5eee72985a1ed/src/leiningen/ancient/collect.clj | clojure | ## Profiles | (ns leiningen.ancient.collect
(:require [leiningen.ancient.artifact.files :as f]
[clojure.java.io :as io])
(:import [java.io File]
[org.apache.commons.io FileUtils]))
# # Project
(defn project-file-at
"Find project file in the given directory.
Returns `nil` "
[path]
(let [f (io/f... |
acd11abd2d67f26efd77126345c1ca1b498d58cb4d312bbc1fc499f4ea4315a6 | craigl64/clim-ccl | layout.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : SILICA ; Base : 10 ; Lowercase : Yes -*-
;; See the file LICENSE for the full license governing this code.
;;
(in-package :silica)
" Copyright ( c ) 1991 , 1992 Franz , Inc. All rights reserved .
Portions copyright ( c ) 1992 Symbolics , Inc. All rig... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/silica/layout.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : SILICA ; Base : 10 ; Lowercase : Yes -*-
See the file LICENSE for the full license governing this code.
(defmethod space-requirement-width ((sr simple-space-requirement))
(slot-value sr 'width))
(defmethod space-requirement-height ((sr simple-space-requirement))
(slot-... |
(in-package :silica)
" Copyright ( c ) 1991 , 1992 Franz , Inc. All rights reserved .
Portions copyright ( c ) 1992 Symbolics , Inc. All rights reserved .
Portions copyright ( c ) 1989 , 1990 Xerox Corp. All rights reserved . "
(define-protocol-class space-requirement ())
(defmethod print-object ((object... |
830db5f279e47812f15e003eff27227e4e131c8a9d3a30d00c17528190d8d160 | yallop/ocaml-reex | reex_print.mli |
* Copyright ( c ) 2022 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2022 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
val pp : Format.formatter -> ... | null | https://raw.githubusercontent.com/yallop/ocaml-reex/8941fb7033762f6b87fa2f33afa87440001eccbe/lib/reex_print.mli | ocaml |
* Copyright ( c ) 2022 .
*
* This file is distributed under the terms of the MIT License .
* See the file LICENSE for details .
* Copyright (c) 2022 Jeremy Yallop.
*
* This file is distributed under the terms of the MIT License.
* See the file LICENSE for details.
*)
val pp : Format.formatter -> ... | |
aed798c28ec2c3c6f3d1897461714d338ee05156ac6a2a993a9d796def9dadd3 | nirum-lang/nirum | Identifier.hs | # LANGUAGE OverloadedLists #
module Nirum.Constructs.Identifier ( Identifier
, fromString
, fromText
, identifierRule
, normalize
, reservedKeywo... | null | https://raw.githubusercontent.com/nirum-lang/nirum/4d4488b0524874abc6e693479a5cc70c961bad33/src/Nirum/Constructs/Identifier.hs | haskell | | Constructs an 'Identifier' value from the given identifier string.
It could return 'Nothing' if the given identifier is invalid. | # LANGUAGE OverloadedLists #
module Nirum.Constructs.Identifier ( Identifier
, fromString
, fromText
, identifierRule
, normalize
, reservedKeywo... |
eaa8f1f26db2fd37ca309cc2ac8f5b3535a3f6e11353e11285b9901fc74c5151 | Zulu-Inuoe/clution | copy-array.lisp | (in-package :cl-utilities)
(defun copy-array (array &key (undisplace nil))
"Shallow copies the contents of any array into another array with
equivalent properties. If array is displaced, then this function will
normally create another displaced array with similar properties,
unless UNDISPLACE is non-NIL, in which c... | null | https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/cl-utilities-1.2.4/copy-array.lisp | lisp | (in-package :cl-utilities)
(defun copy-array (array &key (undisplace nil))
"Shallow copies the contents of any array into another array with
equivalent properties. If array is displaced, then this function will
normally create another displaced array with similar properties,
unless UNDISPLACE is non-NIL, in which c... | |
6d8b3b516fed147bb1b6ac26cd39b3eee3c6de041902ab0416ab4c9df3fd273f | facebook/duckling | UK_XX.hs | Copyright ( c ) 2016 - present , Facebook , Inc.
-- All rights reserved.
--
-- This source code is licensed under the BSD-style license found in the
-- LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory .
-------------... | null | https://raw.githubusercontent.com/facebook/duckling/72f45e8e2c7385f41f2f8b1f063e7b5daa6dca94/Duckling/Ranking/Classifiers/UK_XX.hs | haskell | All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
---------------------------------------------------------------
Auto-generated by regenClassifiers
DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW W... | Copyright ( c ) 2016 - present , Facebook , Inc.
of patent rights can be found in the PATENTS file in the same directory .
@generated
module Duckling.Ranking.Classifiers.UK_XX (classifiers) where
import Data.String
import Prelude
import qualified Data.HashMap.Strict as HashMap
import Duckling.Ranking.Types
cla... |
e6f603ab3a84f44cb47f92f3e8c5d1dc14d5a476e0541df10c99633d1a1b41cb | epiccastle/spire | test_utils.clj | (ns spire.test-utils
(:require
[clojure.test :refer :all]
[clojure.java.shell :as shell]
[clojure.java.io :as io]
[clojure.string :as string]
[spire.ssh :as ssh]
[spire.state]
)
(:import [java.nio.file Files]))
(defn test-pipelines [func]
(func "localhost" nil))
(defn test-ssh-exec [sessi... | null | https://raw.githubusercontent.com/epiccastle/spire/3c61a22daa685b7e8bda09d135ada00606de1aec/test/clojure/spire/test_utils.clj | clojure | (println command)
just handles a single file for now
stat -f "%OLp" <file>
stat -c '%a' <file>
file size
File type
file name
access rights
last access seconds since epoch
often after an operation we want to check that files contain certain
contents, have certain flags and attributes, or match the contents
... | (ns spire.test-utils
(:require
[clojure.test :refer :all]
[clojure.java.shell :as shell]
[clojure.java.io :as io]
[clojure.string :as string]
[spire.ssh :as ssh]
[spire.state]
)
(:import [java.nio.file Files]))
(defn test-pipelines [func]
(func "localhost" nil))
(defn test-ssh-exec [sessi... |
21cbaaee3d77c022c8b6973874abbf432b36f2016ee9c416707445f9929291d6 | csabahruska/jhc-grin | Val.hs | # LANGUAGE FlexibleInstances #
module Grin.Val(
FromVal(..),
ToVal(..),
tn_2Tup,
valToList,
cChar,
cWord,
cInt,
convertName,
region_heap,
region_atomic_heap,
region_stack,
region_block
) where
import Data.Char
import Cmm.Number
import Grin.Grin
import Name.Name
impo... | null | https://raw.githubusercontent.com/csabahruska/jhc-grin/30210f659167e357c1ccc52284cf719cfa90d306/src/Grin/Val.hs | haskell | This allocates data on the heap.
This allocates data on the atomic heap.
This allocates data in the innermost enclosing region, including implicit regions.
This allocates data on the stack, generally equivalent to 'block' for most back ends. | # LANGUAGE FlexibleInstances #
module Grin.Val(
FromVal(..),
ToVal(..),
tn_2Tup,
valToList,
cChar,
cWord,
cInt,
convertName,
region_heap,
region_atomic_heap,
region_stack,
region_block
) where
import Data.Char
import Cmm.Number
import Grin.Grin
import Name.Name
impo... |
bbf55051ef72bf84b4388f6f4f75cba9847fca65ae295701870c4fe3a4d912e9 | ultralisp/ultralisp | check.lisp | (uiop:define-package #:ultralisp/models/check
(:use #:cl)
(:import-from #:rove
#:deftest)
(:import-from #:mito)
(:import-from #:ultralisp-test/utils
#:with-test-db)
(:import-from #:ultralisp/models/dist-source
#:add-source-to-dist)
(:import-from #:ultralisp-te... | null | https://raw.githubusercontent.com/ultralisp/ultralisp/37bd5d92b2cf751cd03ced69bac785bf4bcb6c15/t/models/check.lisp | lisp | And to switch dist into a READY state
(build-dists)
At this point source will be bound to default "ultralisp" dist
and to the "lispworks" dist.
check's implementation should match the dist ones | (uiop:define-package #:ultralisp/models/check
(:use #:cl)
(:import-from #:rove
#:deftest)
(:import-from #:mito)
(:import-from #:ultralisp-test/utils
#:with-test-db)
(:import-from #:ultralisp/models/dist-source
#:add-source-to-dist)
(:import-from #:ultralisp-te... |
77ebb7fdf1fd6e332778f2de25e415fd50cab1ffb1dfa8e8b2e04b49120c2170 | kaoskorobase/mescaline | Time.hs | # LANGUAGE GeneralizedNewtypeDeriving #
module Mescaline.Time (
Duration
, Seconds
, Beats
, HasDelta(..)
, HasDuration(..)
, ToRest(..)
) where
import Control.Lens
type Time = Double -- ^ Absolute or relative time stamp
type Duration = Double -- ^ Difference of times
newtype Seconds = Seconds D... | null | https://raw.githubusercontent.com/kaoskorobase/mescaline/13554fc4826d0c977d0010c0b4fb74ba12ced6b9/lib/mescaline-patterns/src/Mescaline/Time.hs | haskell | ^ Absolute or relative time stamp
^ Difference of times | # LANGUAGE GeneralizedNewtypeDeriving #
module Mescaline.Time (
Duration
, Seconds
, Beats
, HasDelta(..)
, HasDuration(..)
, ToRest(..)
) where
import Control.Lens
newtype Seconds = Seconds Double deriving (Eq, Fractional, Num, Ord, Real, RealFrac, Show)
newtype Beats = Beats Double deriving (Eq, Frac... |
94780627d12156fc53d9338e73b5f857bde90d09cb1eb121ecc96d41be1a0c40 | alaricsp/chicken-scheme | private-namespace.scm | ;;;; compiler-namespace.scm - A simple namespace system to keep compiler variables hidden
;
Copyright ( c ) 2007 ,
Copyright ( c ) 2008 - 2009 , The Chicken Team
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
;... | null | https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/private-namespace.scm | scheme | compiler-namespace.scm - A simple namespace system to keep compiler variables hidden
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following
conditions are met:
Redistributions of source code must retain the above copyrigh... | Copyright ( c ) 2007 ,
Copyright ( c ) 2008 - 2009 , The Chicken Team
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED TO... |
daa2ca158b9da23ca48324ea0128378b8c5b69015e62601e755f6a1728955527 | tnelson/Forge | lexer.rkt | #lang racket/base
(require brag/support)
(require (rename-in br-parser-tools/lex-sre [- :-] [+ :+]))
(define forge-lexer
(lexer
;; Embedded s-expressions for escaping to forge/core
[(from/to "<$>" "</$>")
(token+ 'SEXPR-TOK "<$>" lexeme "</$>" lexeme-start lexeme-end)]
[(from/to "--$" "\n")
(token+... | null | https://raw.githubusercontent.com/tnelson/Forge/995b47b0138709ff3858f567b0008277505dd2fc/forge/lang/alloy-syntax/lexer.rkt | racket | Embedded s-expressions for escaping to forge/core
file paths
old instances (old, to remove)
[(from/to "<instance" "</instance>")
[(from/to "<alloy" "</alloy>")
[(from/to "<sig" "</sig>")
comments
numeric
keywords
Electrum operators
Used by the evaluator
Electrum var relation label
Electrum prime
int stuff
... | #lang racket/base
(require brag/support)
(require (rename-in br-parser-tools/lex-sre [- :-] [+ :+]))
(define forge-lexer
(lexer
[(from/to "<$>" "</$>")
(token+ 'SEXPR-TOK "<$>" lexeme "</$>" lexeme-start lexeme-end)]
[(from/to "--$" "\n")
(token+ 'SEXPR-TOK "--$" lexeme "\n" lexeme-start lexeme-end)]
... |
fffa02ce999f9664bc9f44af0128ab045556dfd6e4af8a5c06188a2923cf8f93 | purescript/purescript | Types.hs | module Language.PureScript.Sugar.Operators.Types where
import Prelude
import Control.Monad.Except
import Language.PureScript.AST
import Language.PureScript.Errors
import Language.PureScript.Names
import Language.PureScript.Sugar.Operators.Common
import Language.PureScript.Types
matchTypeOperators
:: MonadError Mul... | null | https://raw.githubusercontent.com/purescript/purescript/02bd6ae60bcd18cbfa892f268ef6359d84ed7c9b/src/Language/PureScript/Sugar/Operators/Types.hs | haskell | module Language.PureScript.Sugar.Operators.Types where
import Prelude
import Control.Monad.Except
import Language.PureScript.AST
import Language.PureScript.Errors
import Language.PureScript.Names
import Language.PureScript.Sugar.Operators.Common
import Language.PureScript.Types
matchTypeOperators
:: MonadError Mul... | |
b9b77e7eba8280d91565e9ce14922e86eeb36caeb532e436a299d144e95fdbfa | maranget/hevea | tagout.mli | (***********************************************************************)
(* *)
(* HEVEA *)
(* *)
, projet , INRIA R... | null | https://raw.githubusercontent.com/maranget/hevea/226eac8c506f82a600d453492fbc1b9784dd865f/tagout.mli | ocaml | *********************************************************************
HEVEA
... | , projet , INRIA Rocquencourt
Copyright 2012 Institut National de Recherche en Informatique et
Automatique . Distributed only by permission .
exception Error
val tagout : string -> string
|
8d821d225335ec8c236c9b4fdc307bfd9abeae91995fb4951018950b2278964d | anton-k/hindley-milner-type-check | Subst.hs | -- | Capture-avoiding substitutions.
module Type.Check.HM.Subst(
CanApply(..)
, Subst(..)
, delta
, applyToVar
) where
import Data.Fix
import qualified Data.Map.Strict as M
import Type.Check.HM.Type
-- | Substitutions of type variables for monomorphic types.
newtype Subst loc v = Subst { unSubst :: M.Map v... | null | https://raw.githubusercontent.com/anton-k/hindley-milner-type-check/6c8e9de630f347ac8bc8590906b7e3b509fa57c0/src/Type/Check/HM/Subst.hs | haskell | | Capture-avoiding substitutions.
| Substitutions of type variables for monomorphic types.
| Singleton substitution.
-------------------------------------------------------------
| Class for application of substitutions to various types. | module Type.Check.HM.Subst(
CanApply(..)
, Subst(..)
, delta
, applyToVar
) where
import Data.Fix
import qualified Data.Map.Strict as M
import Type.Check.HM.Type
newtype Subst loc v = Subst { unSubst :: M.Map v (Type loc v) }
deriving (Eq, Ord, Monoid)
instance Ord v => Semigroup (Subst loc v) where
(... |
08d7d6356e1abe1f55135477dfd681f452acc9663ec16ca086ea8df5a94c9fff | ocaml/opam | split_install.ml | #!/usr/bin/env opam-admin.top
#directory "+../opam-lib";;
#directory "+../re";;
open Opam_admin_top;;
open OpamTypes;;
iter_packages ~opam:(fun _ opam ->
let module O = OpamFile.OPAM in
if O.install opam <> [] then opam else
let rec rev_split_while acc cond = function
| [] -> acc, []
| x... | null | https://raw.githubusercontent.com/ocaml/opam/074df6b6d87d4114116ea41311892b342cfad3de/admin-scripts/split_install.ml | ocaml | #!/usr/bin/env opam-admin.top
#directory "+../opam-lib";;
#directory "+../re";;
open Opam_admin_top;;
open OpamTypes;;
iter_packages ~opam:(fun _ opam ->
let module O = OpamFile.OPAM in
if O.install opam <> [] then opam else
let rec rev_split_while acc cond = function
| [] -> acc, []
| x... | |
ca31bd8fe50bef6830860c4bebf97d892f06a8e1512c9afe439ac590a2a1647b | ocharles/blog | 2014-02-25-dtypes-1.hs | # LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE TypeFamilies #
data PgType = PgInt | PgString
type family InterpretType (t :: PgType) :: *
type instance InterpretType 'PgInt = Int
type instance InterpretType 'PgString = String
data SPgType :: PgType -> * where
SPgInt :: SPgType 'PgInt
SPgString :: SPgTyp... | null | https://raw.githubusercontent.com/ocharles/blog/fa8e911d3c03b134eee891d187a1bb574f23a530/code/2014-02-25-dtypes-1.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
data PgType = PgInt | PgString
type family InterpretType (t :: PgType) :: *
type instance InterpretType 'PgInt = Int
type instance InterpretType 'PgString = String
data SPgType :: PgType -> * where
SPgInt :: SPgType 'PgInt
SPgString :: SPgType 'PgString
exampleVal... |
1454aaa5028c2cc4c4240029ce276533f477a417092d1b50e48ade68c1d9e7f5 | f-o-a-m/kepler | Application.hs | module SimpleStorage.Application
( SimpleStorageModules
, handlersContext
) where
import Data.Proxy
import SimpleStorage.Modules.SimpleStorage as SimpleStorage
import Tendermint.SDK.Application (HandlersContext (..),
Mod... | null | https://raw.githubusercontent.com/f-o-a-m/kepler/6c1ad7f37683f509c2f1660e3561062307d3056b/hs-abci-docs/simple-storage/src/SimpleStorage/Application.hs | haskell | ------------------------------------------------------------------------------ | module SimpleStorage.Application
( SimpleStorageModules
, handlersContext
) where
import Data.Proxy
import SimpleStorage.Modules.SimpleStorage as SimpleStorage
import Tendermint.SDK.Application (HandlersContext (..),
Mod... |
755ca27caac5eae47232abd23a973d13ae0bd3b6f1e8bca85161dbd7512e7c91 | ocaml-opam/opam2web | o2wJson.mli | (**************************************************************************)
(* *)
Copyright 2012 - 2019 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/ocaml-opam/opam2web/0797940ad5fa779555d34a5561dc288e10fca0b1/src/o2wJson.mli | ocaml | ************************************************************************
All rights reserved.This file is distributed under the terms of the
exception. ... | Copyright 2012 - 2019 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 3.0 with linking
OPAM is distributed in the hope that it will be useful , but WITHOUT
or FITNESS FOR A P... |
e14bbcc31b725f4e0fa8da18cab78ca9b9e351b98865a261befa8bedf3cc45cb | waxeye-org/waxeye | expand.rkt | ;; Waxeye Parser Generator
;; www.waxeye.org
Copyright ( C ) 2008 - 2010 Orlando Hill
Licensed under the MIT license . See ' LICENSE ' for details .
#lang racket/base
(require waxeye/ast
"gen.rkt")
(provide (all-defined-out))
(define (expand-grammar grammar)
(define (lift-only-sub-exp visitor exp)
... | null | https://raw.githubusercontent.com/waxeye-org/waxeye/723da0475fc0c8e3dd43da46665ef7c62734857b/src/waxeye/expand.rkt | racket | Waxeye Parser Generator
www.waxeye.org
Lift that to become our new expression
The order of ranges with the same start doesn't matter as they get
merged no matter what their ends are.
Is duplicate char?
Is a next to b?
Is a next to range b?
Is b within range a?
Is b next to range a?
Can we merge the ranges? | Copyright ( C ) 2008 - 2010 Orlando Hill
Licensed under the MIT license . See ' LICENSE ' for details .
#lang racket/base
(require waxeye/ast
"gen.rkt")
(provide (all-defined-out))
(define (expand-grammar grammar)
(define (lift-only-sub-exp visitor exp)
(let ((chil (ast-c exp)))
(for-each vis... |
e49091aaa535a275e6221c8b23d2a0041ba45455e92cd1c2a721bac9ce83d455 | lazy-cat-io/metaverse | path.cljs | (ns metaverse.runner.path
(:require
[metaverse.runner.config :as config]
[metaverse.runner.utils.path :as path]))
(def assets-dir
(path/join config/root-dir "assets"))
(def icons-dir
(path/join assets-dir "icons"))
| null | https://raw.githubusercontent.com/lazy-cat-io/metaverse/2e5754967ac0e4219197da3ff6937b666d2d26fa/src/main/clojure/metaverse/runner/path.cljs | clojure | (ns metaverse.runner.path
(:require
[metaverse.runner.config :as config]
[metaverse.runner.utils.path :as path]))
(def assets-dir
(path/join config/root-dir "assets"))
(def icons-dir
(path/join assets-dir "icons"))
| |
8a097f1411cdb5b922484e71e11e9b3bdad284f6b466587524fc3c687a072075 | mirage/bechamel | measurement_raw.mli | type t
(** Type of samples. *)
val make : measures:float array -> labels:string array -> float -> t
* [ make ~measures ~labels run ] is samples of one record of [ run ] runs .
[ labels.(i ) ] is associated to [ measures.(i ) ] .
[labels.(i)] is associated to [measures.(i)]. *)
val run : t -> float
(** [run ... | null | https://raw.githubusercontent.com/mirage/bechamel/3e1887305badf5dcc1ecb06beb5b023f55b4193c/lib/measurement_raw.mli | ocaml | * Type of samples.
* [run t] is the number of runs of [t].
* [get_index ~label t] is the index of the measure identified by [label].
* [get ~label t] is the recorded measure [label] into [t].
* Pretty-printer of {!t}.
* [exists ~label t] returns [true] if the measure [label] exists into [t].
Otherwise, it retu... | type t
val make : measures:float array -> labels:string array -> float -> t
* [ make ~measures ~labels run ] is samples of one record of [ run ] runs .
[ labels.(i ) ] is associated to [ measures.(i ) ] .
[labels.(i)] is associated to [measures.(i)]. *)
val run : t -> float
val get_index : label:string -> ... |
a8613a0070fb91b9aeddd885e1f2080e48f24a05da168eb1f4250e29b9e6add1 | lisp/de.setf.xml | namespace.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*-
(in-package :xml-query-data-model)
(setq xml-query-data-model:*namespace*
(xml-query-data-model:defnamespace "#"
(:use)
(:ni... | null | https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/www-w3-org/2000/10/swap/pim/contact/namespace.lisp | lisp | Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*-
(xqdm:find-namespace "#" :if-does-not-exist :load) |
(in-package :xml-query-data-model)
(setq xml-query-data-model:*namespace*
(xml-query-data-model:defnamespace "#"
(:use)
(:nicknames)
(:export)
(:docu... |
0c13f6eb43b1e938d1ef193263285a8506fb5c6591316855643ee0378c2a4dd0 | hyperfiddle/electric | ssr.cljc | (ns hyperfiddle.server.ssr
(:require [hfdl.impl.switch :refer [switch]]
[hfdl.lang :refer [vars]]
[missionary.core :as m]))
TODO use org.w3c.dom instead , or just drop this aspect of the UI .
(defprotocol ITextNode
(-get-text-content [this])
(-set-text-content! [this text]))
(deftype T... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c75f9e0a429cbf42fc7feb9e443062b37cf876a/scratch/server/ssr.cljc | clojure | (ns hyperfiddle.server.ssr
(:require [hfdl.impl.switch :refer [switch]]
[hfdl.lang :refer [vars]]
[missionary.core :as m]))
TODO use org.w3c.dom instead , or just drop this aspect of the UI .
(defprotocol ITextNode
(-get-text-content [this])
(-set-text-content! [this text]))
(deftype T... | |
d9565f5632638095eb3d180059f8192e9766de2601d691693b523f0fb97c55b1 | nuty/rapider | item.rkt | #lang racket
(require
sxml
racket/logging)
(define (extract-data html partern)
((sxpath partern) html))
(define (item-field
#:name name
#:xpath xpath
#:filter [filter (void)])
(list name xpath filter))
(define (make-item-hash fields)
(define item-hash (make-hash))
(for/... | null | https://raw.githubusercontent.com/nuty/rapider/f167aa91522788e70affd49e8f350cd055dba3c4/rapider-lib/rapider/item.rkt | racket | #lang racket
(require
sxml
racket/logging)
(define (extract-data html partern)
((sxpath partern) html))
(define (item-field
#:name name
#:xpath xpath
#:filter [filter (void)])
(list name xpath filter))
(define (make-item-hash fields)
(define item-hash (make-hash))
(for/... | |
6563226f325980f769538debbcaa02e353a549eb11554b99289d982181ba3681 | liamoc/holbert | Rule.hs | # LANGUAGE TypeFamilies , , DeriveGeneric , OverloadedStrings #
module Rule where
import qualified ProofTree as PT
import qualified Prop as P
import qualified Terms as T
import Controller
import Unification
import Debug.Trace
import Miso.String (MisoString, pack)
import Data.String
import qualified Miso.String as MS
i... | null | https://raw.githubusercontent.com/liamoc/holbert/2733be72ac99cab4db9a804c097e5e6e3a7c3334/Rule.hs | haskell | warning, do not use this lens to assign to anything that might invalidate the proof state
use propUpdate for that (which will reset the proof state)
disjoint product of prop and name
bool is whether to show non-intro rules
bool is rewrite direction
bool is to show non-intro rules or not
These define the action wh... | # LANGUAGE TypeFamilies , , DeriveGeneric , OverloadedStrings #
module Rule where
import qualified ProofTree as PT
import qualified Prop as P
import qualified Terms as T
import Controller
import Unification
import Debug.Trace
import Miso.String (MisoString, pack)
import Data.String
import qualified Miso.String as MS
i... |
9af92d39e526d32640f1777c1013e633f56129881b472407fdb71de31cbe0cd7 | mwotton/Hubris-Haskell | Setup.hs | # LANGUAGE NamedFieldPuns #
import Distribution.Simple
import Distribution.Simple.Setup
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.Utils
import qualified Distribution.PackageDescription as D
import Distribution.Verbosity
import System.Directory
import System.Process
import Maybe
import qualifi... | null | https://raw.githubusercontent.com/mwotton/Hubris-Haskell/3b81cb8244118c63dab8b415fb1a59960d728c0f/Setup.hs | haskell | probably a nicer way of getting that directory...
FILTHY HACK
show (configExtraIncludeDirs flags)) | # LANGUAGE NamedFieldPuns #
import Distribution.Simple
import Distribution.Simple.Setup
import Distribution.Simple.LocalBuildInfo
import Distribution.Simple.Utils
import qualified Distribution.PackageDescription as D
import Distribution.Verbosity
import System.Directory
import System.Process
import Maybe
import qualifi... |
b0a11081c31aefb31953dea00f43889a794895fbb326ba672c94531bc978f31a | rudymatela/speculate | arithficial.hs | import QuickSpec
f :: Num a => a -> a -> a
f x y = x*17+23
g :: Num a => a -> a -> a
g x y = 42
h :: Num a => a -> a -> a
h x y = y*13+19
main = quickSpec signature
{ maxTermSize = Just 5
, constants =
[ constant "0" (0 :: Int)
, constant "id" (id :: Int -> Int)
, constant "+" ((+) :: Int -> I... | null | https://raw.githubusercontent.com/rudymatela/speculate/8ec39747d03033db4349d554467d4b78bb72935d/bench/qs2/arithficial.hs | haskell | import QuickSpec
f :: Num a => a -> a -> a
f x y = x*17+23
g :: Num a => a -> a -> a
g x y = 42
h :: Num a => a -> a -> a
h x y = y*13+19
main = quickSpec signature
{ maxTermSize = Just 5
, constants =
[ constant "0" (0 :: Int)
, constant "id" (id :: Int -> Int)
, constant "+" ((+) :: Int -> I... | |
e44c754513e64127bf7644665a89b9372ab72720f93c21166ad15d6233fc3d30 | semerdzhiev/fp-2020-21 | solutions.rkt | #lang racket
(define (id x) x)
(define (accumulate from to op term acc)
(if (> from to)
acc
(accumulate (+ from 1)
to
op
term
(op acc (term from)))))
(define (meetTwice? f g a b)
(define (p? x) (= (f x) (g x)))
(define (op acc x)
(... | null | https://raw.githubusercontent.com/semerdzhiev/fp-2020-21/64fa00c4f940f75a28cc5980275b124ca21244bc/group-d/pre-exam-1/solutions.rkt | racket | 10^n
n - 2 (дължината на acc - 2)
1234567
k m
... | #lang racket
(define (id x) x)
(define (accumulate from to op term acc)
(if (> from to)
acc
(accumulate (+ from 1)
to
op
term
(op acc (term from)))))
(define (meetTwice? f g a b)
(define (p? x) (= (f x) (g x)))
(define (op acc x)
(... |
e5acaef551c5fc8bd16fedd1950dad19c116499a91c50a556de558a369ef3400 | OCamlPro/typerex-lint | web_main.ml | (**************************************************************************)
(* *)
(* OCamlPro Typerex *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/typerex-lint/6d9e994c8278fb65e1f7de91d74876531691120c/tools/ocp-lint-web/src/web_main.ml | ocaml | ************************************************************************
OCamlPro Typerex
This file is distributed ... | Copyright OCamlPro 2011 - 2016 . All rights reserved .
( GNU General Public Licence version 3.0 ) .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
NONINFRINGEMENT . IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE... |
5b202d43385a7c5428931eb610967c2311b5965029edb8620f8f546be95508cb | joelburget/react-haskell | HLint.hs | import "hint" HLint.HLint
ignore "Use camelCase"
| null | https://raw.githubusercontent.com/joelburget/react-haskell/5de76473b7cfdd6b85ac618bea31e658794b54e2/HLint.hs | haskell | import "hint" HLint.HLint
ignore "Use camelCase"
| |
701e7c23cc06a99b54d923bf3c997ed1f3977211ac247839c7f6554d10194d77 | AvisoNovate/pretty | binary.clj | (ns io.aviso.binary
"Utilities for formatting binary data (byte arrays) or binary deltas."
(:require [io.aviso.ansi :as ansi]
[io.aviso.columns :as c])
(:import (java.nio ByteBuffer)))
(defprotocol BinaryData
"Allows various data sources to be treated as a byte-array data type that
supports a len... | null | https://raw.githubusercontent.com/AvisoNovate/pretty/b82222670cf623b945adcee5aa75423ccedf2368/src/io/aviso/binary.clj | clojure | Extends String as a convenience; assumes that the
:,./<>?`~"))))
each line formatted as:
This could be made a lot more efficient!
Exact match on both sides is easy, just print it out.
Some kind of mismatch, so decorate with this side's color
Are we out of data on this side? Print a "--" decorated with the color.... | (ns io.aviso.binary
"Utilities for formatting binary data (byte arrays) or binary deltas."
(:require [io.aviso.ansi :as ansi]
[io.aviso.columns :as c])
(:import (java.nio ByteBuffer)))
(defprotocol BinaryData
"Allows various data sources to be treated as a byte-array data type that
supports a len... |
8803558a61b88a400c7b61d3cd164d779631148005448295d1475e69dd055581 | OlivierSohn/hamazed | Conversion.hs | {-# OPTIONS_HADDOCK hide #-}
# LANGUAGE NoImplicitPrelude #
module Imj.Geo.Continuous.Conversion
( -- * Conversion to / from discrete coordinates
| Discrete positions are converted to continuous positions by
placing them at the " pixel center " , ie by applying an offset of ( 0.5 , 0.5 ) in
' pos2v... | null | https://raw.githubusercontent.com/OlivierSohn/hamazed/6c2b20d839ede7b8651fb7b425cb27ea93808a4a/imj-base/src/Imj/Geo/Continuous/Conversion.hs | haskell | # OPTIONS_HADDOCK hide #
* Conversion to / from discrete coordinates
| Convert a discrete position to a continuous position.
| Convert a continuous position to a discrete position.
| Convert a discrete speed to a continuous speed.
| Convert a continuous speed to a discrete speed. |
# LANGUAGE NoImplicitPrelude #
module Imj.Geo.Continuous.Conversion
| Discrete positions are converted to continuous positions by
placing them at the " pixel center " , ie by applying an offset of ( 0.5 , 0.5 ) in
' pos2vec ' .
Then , during the inverse transformation - in ' vec2pos ' , coordinates are just... |
9d1e23d79b672977ce745ca1b6281ba090af2067e6d112585cc75f5b9351bae5 | haskell-foundation/foundation | UUID.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeOperators #
module Foundation.UUID
( UUID(..)
, newUUID
, nil
, fromBinary
, uuidParser
) where
import Data.Maybe (fromMaybe)
import Basement.Compat.Base
import Foundation.Collection (Element, ... | null | https://raw.githubusercontent.com/haskell-foundation/foundation/39985b94b4de4d02e8decb5e378b53ad3f72c0cc/foundation/Foundation/UUID.hs | haskell | # LANGUAGE OverloadedStrings #
# UNPACK #
# UNPACK # | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators #
module Foundation.UUID
( UUID(..)
, newUUID
, nil
, fromBinary
, uuidParser
) where
import Data.Maybe (fromMaybe)
import Basement.Compat.Base
import Foundation.Collection (Element, Sequential, foldl')
import ... |
253111629f8cb2d513204a99775fe937c5c660b99cf5df9b2a2dbe46e13377e6 | marick/structural-typing | f_ALL_variants.clj | (ns structural-typing.use.condensed-type-descriptions.f-ALL-variants
(:require [structural-typing.preds :as pred])
(:use midje.sweet
structural-typing.type
structural-typing.global-type
structural-typing.clojure.core
structural-typing.assist.testutil)
(:refer-clojure :except [any?]... | null | https://raw.githubusercontent.com/marick/structural-typing/9b44c303dcfd4a72c5b75ec7a1114687c809fba1/test/structural_typing/use/condensed_type_descriptions/f_ALL_variants.clj | clojure | Most of the checking is common to these and ALL. | (ns structural-typing.use.condensed-type-descriptions.f-ALL-variants
(:require [structural-typing.preds :as pred])
(:use midje.sweet
structural-typing.type
structural-typing.global-type
structural-typing.clojure.core
structural-typing.assist.testutil)
(:refer-clojure :except [any?]... |
f930d129ec96708ebc2e3c5adecf036a82691dc0d5a9a2efc267e0684ff60d0e | mzp/coq-ide-for-ios | implicit_quantifiers.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/interp/implicit_quantifiers.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
i
i
Auxiliary functions for the inf... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
i $ I d : implicit_quantifier... |
56e2f3f44d5af7635284e4981c69f4b35deb76df4def56ef10ba2b51051c9b9c | guibou/PyF | Class.hs | # LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
-- | You want to add formatting support for your custom type. This is the ri... | null | https://raw.githubusercontent.com/guibou/PyF/ff1780e0567aacc4637834dda83499572e655a6d/src/PyF/Class.hs | haskell | | You want to add formatting support for your custom type. This is the right module.
- Integral numbers, which are numbers without fractional part
- Fractional numbers, which are numbers with a fractional part
- String, which represents text.
The formatting can be either explicit or implicit. For example:
Is... | # LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
In PyF , formatters are in three categories :
> > > let x = 10 in [ fmt|... |
34374ad82fd5c030f257ede72d66bf11c8bf6183cfcfad5a8eb05c034e08fbe6 | haskell-mafia/tinfoil | Foreign.hs | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
{-# LANGUAGE OverloadedStrings #-}
module Test.IO.Tinfoil.AEAD.AESGCM.Foreign where
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import qualified Data.Text as T
import Disorder.Core.IO (testIO)
import ... | null | https://raw.githubusercontent.com/haskell-mafia/tinfoil/f46b2ea0b9984ac9a97073932b5584ce0a2e0554/test/Test/IO/Tinfoil/AEAD/AESGCM/Foreign.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
module Test.IO.Tinfoil.AEAD.AESGCM.Foreign where
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import qualified Data.Text as T
import Disorder.Core.IO (testIO)
import Disorder.Core.Property (failWith... |
c24293c620ce2f06ed9630ec1231fdf02a38e7b3c53383c62893a65b60833a8c | cyga/real-world-haskell | ParMap.hs | -- file: ch24/ParMap.hs
import Control.Parallel (par)
parallelMap :: (a -> b) -> [a] -> [b]
parallelMap f (x:xs) = let r = f x
in r `par` r : parallelMap f xs
parallelMap _ _ = []
-- file: ch24/ParMap.hs
forceList :: [a] -> ()
forceList (x:xs) = x `pseq` forceList xs
forceList _ = ()
... | null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch24/ParMap.hs | haskell | file: ch24/ParMap.hs
file: ch24/ParMap.hs
file: ch24/ParMap.hs
file: ch24/ParMap.hs | import Control.Parallel (par)
parallelMap :: (a -> b) -> [a] -> [b]
parallelMap f (x:xs) = let r = f x
in r `par` r : parallelMap f xs
parallelMap _ _ = []
forceList :: [a] -> ()
forceList (x:xs) = x `pseq` forceList xs
forceList _ = ()
stricterMap :: (a -> b) -> [a] -> [b]
stricterM... |
9065d955507123ff904d1d346ed8c2f2f2e5fab3325d0236bafaf8c78df723fc | YoshikuniJujo/test_haskell | TH.hs | # LANGUAGE BlockArguments #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Data.Swizzle.TH (swizzle) where
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
import Data.Maybe
import Data.List
import Data.Char
import Data.Swizzle.Class.Pkg
swizzle :: String -> DecsQ
swizzle nm = sequence [mkSwizzleSig i ... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/75d6f5df14aa0f254215c3ae700a35d1493910d5/themes/swizzle/try-swizzle/src/Data/Swizzle/TH.hs | haskell | # LANGUAGE BlockArguments #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module Data.Swizzle.TH (swizzle) where
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
import Data.Maybe
import Data.List
import Data.Char
import Data.Swizzle.Class.Pkg
swizzle :: String -> DecsQ
swizzle nm = sequence [mkSwizzleSig i ... | |
953b5a30d3a53f60c1d20618988dd81a4bd27c78da20574df3db1b17718226eb | liebke/avout | state.clj | (ns avout.state)
;; shared protocols
(defprotocol Identity
(getName [this])
(init [this])
(destroy [this]))
(defprotocol StateContainer
(initStateContainer [this])
(destroyStateContainer [this])
(getState [this])
(setState [this value]))
(defprotocol VersionedStateContainer
(initVersionedStateCont... | null | https://raw.githubusercontent.com/liebke/avout/06f3e00d63f487ebd01581343302e96b915f5b03/src/avout/state.clj | clojure | shared protocols | (ns avout.state)
(defprotocol Identity
(getName [this])
(init [this])
(destroy [this]))
(defprotocol StateContainer
(initStateContainer [this])
(destroyStateContainer [this])
(getState [this])
(setState [this value]))
(defprotocol VersionedStateContainer
(initVersionedStateContainer [this])
(des... |
e12721785a7eb4863c73023d843a246e0adf89afd61cdf8aabf7bb945834f2aa | azimut/shiny | incudine.lisp | (in-package :shiny)
( dsp !
( ( buf buffer ) rate start - pos
( loop - p boolean ) attenuation rms ( ) )
(: defaults 0d0 -1 0 nil .00001 0 10 )
;; (with-samples
;; ((in (incudine.vug:buffer-play
buf rate start - pos loop - p # ' stop ) )
;; (inn (* in attenuation))
... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/compositions/drafts/incudine.lisp | lisp | (with-samples
((in (incudine.vug:buffer-play
(inn (* in attenuation))
; ( inn ( incudine.vug : downsamp ) )
)
(out inn inn)))
(with-samples
((in (incudine.vug:buffer-play
(inn (* in attenuation))
(inn (+ inn
; ( incudine.vug : buzz 2 .1 2 )
; ... | (in-package :shiny)
( dsp !
( ( buf buffer ) rate start - pos
( loop - p boolean ) attenuation rms ( ) )
(: defaults 0d0 -1 0 nil .00001 0 10 )
buf rate start - pos loop - p # ' stop ) )
( dsp !
( ( buf buffer ) rate start - pos
( loop - p boolean ) attenuation rms... |
20ef3b9cc6d0e5418de1266c5a7e9cb1aa239f79aee4fb0d2029534c43c5c977 | michiakig/LispInSmallPieces | reflisp.scm | $ I d : reflisp.scm , v 1.6 2006/11/24 18:37:22
;;;(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
;;; This file is part of the files that accompany the book:
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
;;; Newest version may b... | null | https://raw.githubusercontent.com/michiakig/LispInSmallPieces/0a2762d539a5f4c7488fffe95722790ac475c2ea/si/reflisp.scm | scheme | (((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
This file is part of the files that accompany the book:
Newest version may be retrieved from:
Check the README file before using this file.
(((((((((((((((((((((((((((((((( L i S P ))))))))))))))))))))))))))))))))
A reflective interpreter wit... | $ I d : reflisp.scm , v 1.6 2006/11/24 18:37:22
LISP Implantation Semantique Programmation ( InterEditions , France )
By Christian Queinnec < >
( IP 128.93.2.54 ) ftp.inria.fr : INRIA / Projects / icsla / Books / LiSP*.tar.gz
Bytecode size roughly 1 K bytes ( actually 1362 bytes )
cons - size :... |
adff2bd1a5ca6dfceb871602d21407b35940d59cc16bfebc90574adfb836b993 | LennMars/algorithms_in_OCaml | util.ml | include UtilPervasives
module List = struct
include List
include UtilList
end
module Array = struct
include Array
include UtilArray
end
| null | https://raw.githubusercontent.com/LennMars/algorithms_in_OCaml/f7fb8ca9f497883d86be3167bfc98a4a28ac73c9/util/util.ml | ocaml | include UtilPervasives
module List = struct
include List
include UtilList
end
module Array = struct
include Array
include UtilArray
end
| |
eee477b602cbe19986ed667423e493ac18b4a06b04fdf60e02b4ade8192acb96 | georgjz/raylib-gambit-scheme | npatchinfo.scm | ;;;-----------------------------------------------------------------------------
This file is the interface to the struct RenderNPatchInfo in .
;;;-----------------------------------------------------------------------------
(c-declare #<<c-declare-end
#include "raylib.h"
NPatchInfo MakeNPatchInfo( Rectangle sour... | null | https://raw.githubusercontent.com/georgjz/raylib-gambit-scheme/df7ea6db54a3196d13c66dac4909c64cea6e5a88/src/raylibbinding/structs/npatchinfo.scm | scheme | -----------------------------------------------------------------------------
-----------------------------------------------------------------------------
/* return allocation error */
}
}
| This file is the interface to the struct RenderNPatchInfo in .
(c-declare #<<c-declare-end
#include "raylib.h"
NPatchInfo MakeNPatchInfo( Rectangle sourceRec,
int left, int top,
int right, int bottom,
int type )
{
}
___SCMOBJ SCMOBJ... |
d0b101fd51358e7c2a67d6998c386b8fabb8ad0bd4da6f8846a93952850f1e26 | scrintal/heroicons-reagent | clipboard_document.cljs | (ns com.scrintal.heroicons.solid.clipboard-document)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M17.663 3.118c.225.015.45.032.673.05C19.876 3.298 21 4.604 21 6.109v9.6... | null | https://raw.githubusercontent.com/scrintal/heroicons-reagent/572f51d2466697ec4d38813663ee2588960365b6/src/com/scrintal/heroicons/solid/clipboard_document.cljs | clojure | (ns com.scrintal.heroicons.solid.clipboard-document)
(defn render []
[:svg {:xmlns ""
:viewBox "0 0 24 24"
:fill "currentColor"
:aria-hidden "true"}
[:path {:fillRule "evenodd"
:d "M17.663 3.118c.225.015.45.032.673.05C19.876 3.298 21 4.604 21 6.109v9.6... | |
4ef19da7926b5a42a200dbffd6b884efec74387ba899a5e81c487f32947770bd | mu-chaco/ReWire | ToVHDL.hs | module ReWire.Core.Transformations.ToVHDL where
import ReWire.Scoping
import ReWire.Core.Syntax
import ReWire.Core.Transformations.Monad
import ReWire.Core.Transformations.CheckNF
import ReWire.Core.Transformations.Types
import qualified Data.Map.Strict as Map
import Data.Map.Strict (Map)
import Data.List (intercalate... | null | https://raw.githubusercontent.com/mu-chaco/ReWire/a8dcea6ab0989474988a758179a1d876e2c32370/cruft/ToVHDL.hs | haskell | FIXME: hack hack hack?
isNil = (=="\"\"")
removeNils (FunCall f ss) = FunCall f (filter (not . isNil) ss)
removeNils (LocalVariable v) = LocalVariable v
removeNils (Slice s i j) = Slice s i j
removeNils (Conditional cs) = Conditional (map removeNilsCase cs)
removeNilsCase :: (Condition,String) -> (Condition,St... | module ReWire.Core.Transformations.ToVHDL where
import ReWire.Scoping
import ReWire.Core.Syntax
import ReWire.Core.Transformations.Monad
import ReWire.Core.Transformations.CheckNF
import ReWire.Core.Transformations.Types
import qualified Data.Map.Strict as Map
import Data.Map.Strict (Map)
import Data.List (intercalate... |
9e15767ef5dd6fab7b2f3b95085d113573bb508b49f62a9476fb5b4531c3e45d | processone/xmpp | xep0158.erl | Created automatically by XML generator ( fxml_gen.erl )
%% Source: xmpp_codec.spec
-module(xep0158).
-compile(export_all).
do_decode(<<"captcha">>, <<"urn:xmpp:captcha">>, El,
Opts) ->
decode_captcha(<<"urn:xmpp:captcha">>, Opts, El);
do_decode(Name, <<>>, _, _) ->
erlang:error({xmpp_codec, {miss... | null | https://raw.githubusercontent.com/processone/xmpp/88c43c3cf5843a8a0f76eac390980a3a39c972dd/src/xep0158.erl | erlang | Source: xmpp_codec.spec | Created automatically by XML generator ( fxml_gen.erl )
-module(xep0158).
-compile(export_all).
do_decode(<<"captcha">>, <<"urn:xmpp:captcha">>, El,
Opts) ->
decode_captcha(<<"urn:xmpp:captcha">>, Opts, El);
do_decode(Name, <<>>, _, _) ->
erlang:error({xmpp_codec, {missing_tag_xmlns, Name}});
do_... |
08f683e4204e85bd3378ad7354091858ec5e5ffdb73c0b71196440e6332b2b0f | softwarelanguageslab/maf | R5RS_scp1_polynome-4.scm | ; Changes:
* removed : 0
* added : 1
* swaps : 0
* negated predicates : 1
; * swapped branches: 0
* calls to i d fun : 2
(letrec ((make-point (lambda (x y)
(letrec ((dispatch (lambda (msg)
(if (eq? msg 'x-value)
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_polynome-4.scm | scheme | Changes:
* swapped branches: 0 | * removed : 0
* added : 1
* swaps : 0
* negated predicates : 1
* calls to i d fun : 2
(letrec ((make-point (lambda (x y)
(letrec ((dispatch (lambda (msg)
(if (eq? msg 'x-value)
x
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.