_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 |
|---|---|---|---|---|---|---|---|---|
22ee319b17619d10a564464b083c3d382664da66e1caabc7a5b4f81a3e32521c | day8/re-com | misc_test.cljs | (ns re-com.misc-test
(:require-macros [re-com.core :refer [handler-fn]])
(:require [cljs.test :refer-macros [is deftest]]
[reagent.core :as reagent]))
(deftest test-handler-fn
(let [atm (reagent/atom false)]
(is (false? @atm))
(is (false? (reset! atm false)))
... | null | https://raw.githubusercontent.com/day8/re-com/07451b1d19c59eb185548efe93e2d00b5d3eab89/test/re_com/misc_test.cljs | clojure | (ns re-com.misc-test
(:require-macros [re-com.core :refer [handler-fn]])
(:require [cljs.test :refer-macros [is deftest]]
[reagent.core :as reagent]))
(deftest test-handler-fn
(let [atm (reagent/atom false)]
(is (false? @atm))
(is (false? (reset! atm false)))
... | |
0107eb4f6e5fb7e8b809bc18fefbc402afeda4882e6f6d68c7f32064633f7eb3 | juspay/atlas | Types.hs | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | null | https://raw.githubusercontent.com/juspay/atlas/e64b227dc17887fb01c2554db21c08284d18a806/app/public-transport-bap/src/API/UI/Booking/BookingList/Types.hs | haskell | |
Copyright 2022 Juspay Technologies Pvt Ltd
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compliance with the License .
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing , software
dis... | |
84d232dbf85b54d316873d0d83d983b52a3de7c1384e3a4fccf4ff768b806563 | adamdoupe/find_ear_rails | path_queue.ml | type 'a path_queue = Empty | Pq of ('a * ('a path_queue) * ('a path_queue))
let empty = (Empty,0)
let heap_min compare pq =
let rec aux pq cont = match pq with
| Empty | Pq(_,Empty,Empty) -> cont pq
| Pq (a,Pq (b,Empty,Empty),Empty) ->
let c = compare a b in
if c = -1 then cont ... | null | https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/dypgen-20070627/dyplib/path_queue.ml | ocaml | type 'a path_queue = Empty | Pq of ('a * ('a path_queue) * ('a path_queue))
let empty = (Empty,0)
let heap_min compare pq =
let rec aux pq cont = match pq with
| Empty | Pq(_,Empty,Empty) -> cont pq
| Pq (a,Pq (b,Empty,Empty),Empty) ->
let c = compare a b in
if c = -1 then cont ... | |
81bdb3f8591fe00a0e8e7ef348d47fb8e3162209b8e6c0f8683ec9152ffacff6 | cddr/ksml | core_test.clj | (ns cddr.ksml.core-test
(:require
[clojure.test :refer :all]
[cddr.ksml.core :refer [ksml* ksml v->]]))
(deftest test-v->
(is [:bar [:baz [:foo]]]
(v-> [:foo]
[:bar]
[:baz])))
| null | https://raw.githubusercontent.com/cddr/ksml/03b8d9ba5ea8059cfa2898eaa0c070d4c35c02eb/test/cddr/ksml/core_test.clj | clojure | (ns cddr.ksml.core-test
(:require
[clojure.test :refer :all]
[cddr.ksml.core :refer [ksml* ksml v->]]))
(deftest test-v->
(is [:bar [:baz [:foo]]]
(v-> [:foo]
[:bar]
[:baz])))
| |
4c823dcf0c2bb8b81f5e9d6c4d27ce0bf3deea4571c176b5ad86e440baf16294 | alesaccoia/festival_flinger | cmu_us_ksp_lexicon.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; ;;;
Carnegie Mellon University ; ; ;
and and ; ; ;
Copyright ( c ) 1998 - 2000 ... | null | https://raw.githubusercontent.com/alesaccoia/festival_flinger/87345aad3a3230751a8ff479f74ba1676217accd/lib/voices/us/cmu_us_ksp_cg/festvox/cmu_us_ksp_lexicon.scm | scheme |
;;;
; ;
; ;
; ;
; ;
;;;
Permission is hereby granted, free of charge, to use and distribute ;;;
this software and its documentation without restriction, including ;;;
withou... | CMU lexicon for US English
(require 'postlex)
(setup_cmu_lex)
(define (cmu_us_ksp::select_lexicon)
"(cmu_us_ksp::select_lexicon)
Set up the CMU lexicon for US English."
(lex.select "cmu")
Post lexical rules
(set! postlex_rules_hooks (list postlex_apos_s_check))
)
(define (cmu_us_ksp::reset_lexicon)
"(cm... |
59e42a5311bfa4122b0f05b34c8bd3e9bf5cf003a4cc017e84452ca12f8159ea | clojure-interop/aws-api | AmazonServiceException.clj | (ns com.amazonaws.AmazonServiceException
"Extension of SdkClientException that represents an error response returned
by an Amazon web service. Receiving an exception of this type indicates that
the caller's request was correctly transmitted to the service, but for some
reason, the service was not able to proces... | null | https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws/src/com/amazonaws/AmazonServiceException.clj | clojure | (ns com.amazonaws.AmazonServiceException
"Extension of SdkClientException that represents an error response returned
by an Amazon web service. Receiving an exception of this type indicates that
the caller's request was correctly transmitted to the service, but for some
reason, the service was not able to proces... | |
adbd4baf37e649f6309090d93b8308e44c082fd6942590f248259af14e8723e7 | alex-hhh/data-frame | tcx.rkt | #lang racket/base
tcx.rkt -- read TCX files into data frames
;;
;; This file is part of data-frame -- -hhh/data-frame
Copyright ( c ) 2018 < >
;;
;; This program is free software: you can redistribute it and/or modify it
;; under the terms of the GNU Lesser General Public License as published by
the Free Soft... | null | https://raw.githubusercontent.com/alex-hhh/data-frame/92ee03006e6b12797d5b427ff1c78080b920b055/private/tcx.rkt | racket |
This file is part of data-frame -- -hhh/data-frame
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT
without even... | #lang racket/base
tcx.rkt -- read TCX files into data frames
Copyright ( c ) 2018 < >
the Free Software Foundation , either version 3 of the License , or ( at your
You should have received a copy of the GNU Lesser General Public License
(require racket/contract
racket/date
racket/flonum
... |
40ad60cfa4a74177819c864b82c2c306b0d26a47d40947de836256d735f38ea0 | mkremins/drawille-clj | project.clj | (defproject mkremins/drawille-clj "0.2.1-SNAPSHOT"
:description "Drawing in terminal with unicode braille characters"
:url "-clj"
:license {:name "MIT License"
:url ""
:distribution :repo}
:dependencies [[org.clojure/clojure "1.6.0"]]
:plugins [[com.keminglabs/cljx "0.3.2"]]
:cljx {:... | null | https://raw.githubusercontent.com/mkremins/drawille-clj/9868014a2ae25851c42e788719ba8816371a81d2/project.clj | clojure | (defproject mkremins/drawille-clj "0.2.1-SNAPSHOT"
:description "Drawing in terminal with unicode braille characters"
:url "-clj"
:license {:name "MIT License"
:url ""
:distribution :repo}
:dependencies [[org.clojure/clojure "1.6.0"]]
:plugins [[com.keminglabs/cljx "0.3.2"]]
:cljx {:... | |
0abcc952acd320ee5444260d4f33eb3c4af2b2113bef667e982455daafc7a343 | rurban/clisp | functions.lisp | Utilities for function objects
2001 - 2005 , 2008
2004
(in-package "COMMON-LISP")
(export '(function-lambda-expression))
(in-package "SYSTEM")
;; The signature of a function object.
(defstruct (signature (:type vector) (:conc-name sig-))
;; (name nil :type (or symbol cons))
(req-num 0 :type fixnu... | null | https://raw.githubusercontent.com/rurban/clisp/75ed2995ff8f5364bcc18727cde9438cca4e7c2c/src/functions.lisp | lisp | The signature of a function object.
(name nil :type (or symbol cons))
ff_name
compiled closure?
interpreted closure?
lambda-expression without docstring (from clos_form)
environment
fenv
benv
genv
name
ff_name
compiled closure?
interpreted closure?
Return extended information about a function object,... | Utilities for function objects
2001 - 2005 , 2008
2004
(in-package "COMMON-LISP")
(export '(function-lambda-expression))
(in-package "SYSTEM")
(defstruct (signature (:type vector) (:conc-name sig-))
(req-num 0 :type fixnum)
(opt-num 0 :type fixnum)
(rest-p nil :type boolean)
(keys-p nil :t... |
195f94653b00f4066aa09c90ed063273e3443b8e28c8a8abd7c73fceced37639 | kyleburton/sandbox | core.clj | (ns xchart-examples.core
(:require
[clojure.tools.nrepl.server :refer [start-server stop-server]]
[cider.nrepl :refer [cider-nrepl-handler]]
[clojure.tools.logging :as log]
#_[schema.core :as s]))
(defonce ... | null | https://raw.githubusercontent.com/kyleburton/sandbox/cccbcc9a97026336691063a0a7eb59293a35c31a/examples/clojure/xchart-examples/src/xchart_examples/core.clj | clojure | (ns xchart-examples.core
(:require
[clojure.tools.nrepl.server :refer [start-server stop-server]]
[cider.nrepl :refer [cider-nrepl-handler]]
[clojure.tools.logging :as log]
#_[schema.core :as s]))
(defonce ... | |
b7acd7bb59c2b6272cf184583e4a653303317fbb824fbd055f70601ad2a8b7ea | awakesecurity/grpc-mqtt | RemoteClient.hs | # LANGUAGE TemplateHaskell #
-- |
Module : Network .
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see COPYING
--
-- Stability : stable
Portability : non - portable ( GHC extensions )
--
-- @since 1.0.0
module Network.GRPC.MQTT.TH.RemoteClient
( Clie... | null | https://raw.githubusercontent.com/awakesecurity/grpc-mqtt/fbde6f3fe90e82260469bab922c5ebb9f0b40e95/src/Network/GRPC/MQTT/TH/RemoteClient.hs | haskell | |
Stability : stable
@since 1.0.0
------------------------------------------------------------------------------ | # LANGUAGE TemplateHaskell #
Module : Network .
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see COPYING
Portability : non - portable ( GHC extensions )
module Network.GRPC.MQTT.TH.RemoteClient
( Client,
MethodMap,
mqttRemoteClientMethodMap,
... |
6f77688d25bb30854bb2db54c061f61af008760b5015d2b25a91a5cf59a938b2 | nokia/web-assembly-self-certifying-compilation-framework | cfg_builder.ml | *
Copyright 2020 Nokia
Licensed under the BSD 3 - Clause License .
SPDX - License - Identifier : BSD-3 - Clause
Copyright 2020 Nokia
Licensed under the BSD 3-Clause License.
SPDX-License-Identifier: BSD-3-Clause
*)
open Wasm
open Source
open Wasm_utils
open Instr_graph
open Func_types
open T... | null | https://raw.githubusercontent.com/nokia/web-assembly-self-certifying-compilation-framework/8c31df0bd7d2d94cfbc22089944f5cabb3a61158/src/validator/validator-api/cfg_builder.ml | ocaml | Quick instruction constructors
Constructing a graph | *
Copyright 2020 Nokia
Licensed under the BSD 3 - Clause License .
SPDX - License - Identifier : BSD-3 - Clause
Copyright 2020 Nokia
Licensed under the BSD 3-Clause License.
SPDX-License-Identifier: BSD-3-Clause
*)
open Wasm
open Source
open Wasm_utils
open Instr_graph
open Func_types
open T... |
7ea32d766258c732c8e09b6b05e44c0c761a472f13a655eb5c2779c192612f2c | Incanus3/ExiL | tst-rete-walk.lisp | (in-package :rete-tests)
(declaim (optimize (debug 3) (compilation-speed 0) (space 0) (speed 0)))
(defclass walk-graph-tests (test-case)
((graph :accessor graph)
(n1 :accessor n1)
(n2 :accessor n2)
(n3 :accessor n3)))
(defclass graph-node () ((id :initform 0 :initarg :id :reader id)
(neighbors :initfo... | null | https://raw.githubusercontent.com/Incanus3/ExiL/de0f7c37538cecb7032cc1f2aa070524b0bc048d/src/tests/rete/tst-rete-walk.lisp | lisp | - alpha-top-node, alpha-subtop-node for simple facts
- alpha-memory-node connected to the last alpha-test-node
- beta-top-node, beta-join-node connected to the alpha-memory-node
- beta-memory-node connected to the beta-join-node, storing the rule
- which is satisfied, when this node is activated
(textui-test-run (... | (in-package :rete-tests)
(declaim (optimize (debug 3) (compilation-speed 0) (space 0) (speed 0)))
(defclass walk-graph-tests (test-case)
((graph :accessor graph)
(n1 :accessor n1)
(n2 :accessor n2)
(n3 :accessor n3)))
(defclass graph-node () ((id :initform 0 :initarg :id :reader id)
(neighbors :initfo... |
d2eb36775d984bd79f12053f614a6ef2d6c68a1ab6413ca43480460abdf3dc47 | functionally/pigy-genetics | Main.hs | -----------------------------------------------------------------------------
--
-- Module : $Headers
Copyright : ( c ) 2021
License : MIT
--
Maintainer : < >
-- Stability : Experimental
Portability : Portable
--
-- | Command-line for image-token service.
--
-------------------... | null | https://raw.githubusercontent.com/functionally/pigy-genetics/ed2784faabfa77d8a94a147e9f7b11cac0f545b6/app/Main.hs | haskell | ---------------------------------------------------------------------------
Module : $Headers
Stability : Experimental
| Command-line for image-token service.
---------------------------------------------------------------------------
* Service
| Run the service. | Copyright : ( c ) 2021
License : MIT
Maintainer : < >
Portability : Portable
module Main (
main
) where
import Mantra.Types (runMantraToIO)
import Pigy.Chain (runChain)
import Pigy.Types (makeContext, readConfiguration)
import System.Environment (getArgs)
imp... |
52fce6edec70492f65a4f2be5788f741d2101c723bb2f6fe734a7d8cd2e6bdcb | lthms/spatial-sway | raw_message.ml | type t = int32 * string
type raw_message = t
let int32_to_string x =
let buffer = Bytes.create 4 in
Bytes.set_int32_ne buffer 0 x;
Bytes.to_string buffer
let string_to_int32 x =
let buffer = Bytes.of_string x in
Bytes.get_int32_ne buffer 0
let to_string ~magic_string (code, payload) =
magic_string
^ in... | null | https://raw.githubusercontent.com/lthms/spatial-sway/5e5072c75e0a1a1d58de9409e2ef09ef033cc569/lib/mltp_ipc/raw_message.ml | ocaml | type t = int32 * string
type raw_message = t
let int32_to_string x =
let buffer = Bytes.create 4 in
Bytes.set_int32_ne buffer 0 x;
Bytes.to_string buffer
let string_to_int32 x =
let buffer = Bytes.of_string x in
Bytes.get_int32_ne buffer 0
let to_string ~magic_string (code, payload) =
magic_string
^ in... | |
ee8389b50729644225015651ba84df98dc3b11608fe04a624165df3aab7fa4fb | tfausak/patrol | TransactionSourceSpec.hs | # LANGUAGE QuasiQuotes #
module Patrol.Type.TransactionSourceSpec where
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.QQ.Simple as Aeson
import qualified Patrol.Type.TransactionSource as TransactionSource
import qualified Test.Hspec as Hspec
spec :: Hspec.Spec
spec = Hspec.describe "Patrol.Type.Tr... | null | https://raw.githubusercontent.com/tfausak/patrol/1cae55b3840b328cda7de85ea424333fcab434cb/source/test-suite/Patrol/Type/TransactionSourceSpec.hs | haskell | # LANGUAGE QuasiQuotes #
module Patrol.Type.TransactionSourceSpec where
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.QQ.Simple as Aeson
import qualified Patrol.Type.TransactionSource as TransactionSource
import qualified Test.Hspec as Hspec
spec :: Hspec.Spec
spec = Hspec.describe "Patrol.Type.Tr... | |
7f9aa72b41ed082d0da00be73cadd41532ef00b53fa1a45438ffb474037a9e3a | tisnik/clojure-examples | core.clj | (ns htmltest2.core
(:gen-class))
(require '[hiccup.page :as page])
(defn fact
[n]
(apply * (range 1 (inc n))))
(defn html-page
[]
(page/xhtml
[:head
[:title "Hiccup test #2"]
[:meta {:name "Generator" :content "Clojure"}]
[:meta {:http-equiv "Content-ty... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/htmltest2/src/htmltest2/core.clj | clojure | (ns htmltest2.core
(:gen-class))
(require '[hiccup.page :as page])
(defn fact
[n]
(apply * (range 1 (inc n))))
(defn html-page
[]
(page/xhtml
[:head
[:title "Hiccup test #2"]
[:meta {:name "Generator" :content "Clojure"}]
[:meta {:http-equiv "Content-ty... | |
b2a9eb8f10bbf2f8d71cf3822f58e53b4dbd152075a5793cd88e55ad7ba93705 | lucasdicioccio/deptrack-project | Git.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
module Devops.Git where
import Data.Monoid ((<>))
import Data.String.Conversions (convertString)
import Data.Text (Text)
import qualified Data.Text as Text
import System.P... | null | https://raw.githubusercontent.com/lucasdicioccio/deptrack-project/cd3d59a796815af8ae8db32c47b1e1cdc209ac71/deptrack-devops-recipes/src/Devops/Git.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DataKinds #
module Devops.Git where
import Data.Monoid ((<>))
import Data.String.Conversions (convertString)
import Data.Text (Text)
import qualified Data.Text as Text
import System.Posix.Files (fileGroup, fileOwn... |
2b01ee3f23cf99da279f37049e17d18dba227d7413242e50822d9726ba04610b | elaforge/karya | Mohra.hs | Copyright 2021
-- This program is distributed under the terms of the GNU General Public
-- License 3.0, see COPYING or -3.0.txt
module Solkattu.Score.Mohra where
import Prelude hiding ((.), (^), repeat)
import qualified Solkattu.Korvai as Korvai
import Solkattu.Dsl.Generic
korvai :: ([Korva... | null | https://raw.githubusercontent.com/elaforge/karya/07bdeac32293a18f9ce982fab18d2802ea26b962/Solkattu/Score/Mohra.hs | haskell | This program is distributed under the terms of the GNU General Public
License 3.0, see COPYING or -3.0.txt
| Make a mohra in the standard structure. | Copyright 2021
module Solkattu.Score.Mohra where
import Prelude hiding ((.), (^), repeat)
import qualified Solkattu.Korvai as Korvai
import Solkattu.Dsl.Generic
korvai :: ([Korvai.Section (SequenceT sollu)] -> Korvai)
-> (a -> SequenceT sollu) -> (a, a, a) -> (a, a, a) -> Korvai
korvai ... |
073ed80727b730354e63ddd5b03bda8d5498382c72c6e09183429d8683bbc704 | owlbarn/owl_ode | types.ml |
* OWL - OCaml Scientific and Engineering Computing
* OWL - ODE - Ordinary Differential Equation Solvers
*
* Copyright ( c ) 2019 >
* Copyright ( c ) 2019 < >
* OWL - OCaml Scientific and Engineering Computing
* OWL-ODE - Ordinary Differential Equation Solvers
*
* Copyright (c) 2019 Ta-Chu... | null | https://raw.githubusercontent.com/owlbarn/owl_ode/5d934fbff87eea9f060d6c949bf78467024d8791/src/base/types.ml | ocaml | * The Types module provides some common types for
Owl_ode ODEs integrators.
* Time specification for the ODE solvers.
* The [T1] constructor allow to specify the initial
and final integration time, in the sense that the
solver starts with t=t0 and integrates until it
reaches t=t0+duration, and ... |
* OWL - OCaml Scientific and Engineering Computing
* OWL - ODE - Ordinary Differential Equation Solvers
*
* Copyright ( c ) 2019 >
* Copyright ( c ) 2019 < >
* OWL - OCaml Scientific and Engineering Computing
* OWL-ODE - Ordinary Differential Equation Solvers
*
* Copyright (c) 2019 Ta-Chu... |
1eb87e25c1bf1e057f92d0f0e1a5647bfa2994a2e33066c0ed263d4c126a822d | leviroth/ocaml-reddit-api | wiki_page.mli | open! Core
module Id : sig
type t =
{ subreddit : Subreddit_name.t option
; page : string
}
[@@deriving sexp]
end
module Revision : sig
type t [@@deriving sexp]
include Json_object.S_with_fields with type t := t
module Id : sig
type t [@@deriving sexp]
include Stringable with type t :... | null | https://raw.githubusercontent.com/leviroth/ocaml-reddit-api/0ce219356a5b3b38445868eb5dce10951f3eb4e0/reddit_api_kernel/wiki_page.mli | ocaml | open! Core
module Id : sig
type t =
{ subreddit : Subreddit_name.t option
; page : string
}
[@@deriving sexp]
end
module Revision : sig
type t [@@deriving sexp]
include Json_object.S_with_fields with type t := t
module Id : sig
type t [@@deriving sexp]
include Stringable with type t :... | |
74c352b0cd3845ad6ccb7e18969b21011be135c89d1082aecdcd8dd1bd222d72 | baskeboler/cljs-karaoke-client | songs.cljs | (ns cljs-karaoke.songs
(:require [reagent.core :as reagent :refer [atom]]
[re-frame.core :as rf :include-macros true]
[clojure.string :as str]
[cljs-karaoke.events.common]
[cljs-karaoke.subs :as s]
[cljs-karaoke.events :as events]
[cljs-karaoke.e... | null | https://raw.githubusercontent.com/baskeboler/cljs-karaoke-client/bb6512435eaa436d35034886be99213625847ee0/src/main/cljs_karaoke/songs.cljs | clojure | (str "#/songs/" name)}
[_]
(let [random-song-name (rand-nth @(rf/subscribe [::s]))])) | (ns cljs-karaoke.songs
(:require [reagent.core :as reagent :refer [atom]]
[re-frame.core :as rf :include-macros true]
[clojure.string :as str]
[cljs-karaoke.events.common]
[cljs-karaoke.subs :as s]
[cljs-karaoke.events :as events]
[cljs-karaoke.e... |
773fbfdc5d1f346bbcb95507b9be9a9a280f95b9812d36dfa60a828b70b9e6b8 | f-me/carma-public | AverageCommissioner.hs | module Carma.Model.Service.AverageCommissioner where
import Data.Text
import Data.Typeable
import Data.Aeson(Value, (.=), object)
import Data.Scientific
import Data.Model
import Data.Model.View
import Carma.Model.Types()
import Carma.Model.LegacyTypes
import Carma.Model.Activity (Activity)
import Carma.Model.Requ... | null | https://raw.githubusercontent.com/f-me/carma-public/82a9f44f7d919e54daa4114aa08dfec58b01009b/carma-models/src/Carma/Model/Service/AverageCommissioner.hs | haskell | module Carma.Model.Service.AverageCommissioner where
import Data.Text
import Data.Typeable
import Data.Aeson(Value, (.=), object)
import Data.Scientific
import Data.Model
import Data.Model.View
import Carma.Model.Types()
import Carma.Model.LegacyTypes
import Carma.Model.Activity (Activity)
import Carma.Model.Requ... | |
dac023074e8b19a5956a907fa7eea8146e3ed2142db6e369fbcd28b4f40ec77c | fortytools/holumbus | Client.hs | -- ----------------------------------------------------------------------------
|
Module : Holumbus . Query . Distribution
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
Process a ... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/searchengine/source/Holumbus/Query/Distribution/Client.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
# OPTIONS -fno-warn-type-defaults #
* Client types
* Client
| The configuration for distributed query processing.
^ The list of query server to use for process... |
|
Module : Holumbus . Query . Distribution
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
Process a Holumbus query in distributed ( concurrent ) manner . Note that
this current... |
d4e8ee811c961d199e23b2ef1cf2e10c85c55bccfba1bf64963977f0a27a8290 | langston-barrett/CoverTranslator | Simple.hs | module Simple where
data Simple = A | B | C deriving ( Eq , Ord )
data Simple = A | B | C
instance where
A = = A = True
B = = B = True
C = = C = True
_ = = _ = False
instance where
B < = A = False
C < = A = False
C < = B = False
_ < = _ = True
instance Eq ... | null | https://raw.githubusercontent.com/langston-barrett/CoverTranslator/4172bef9f4eede7e45dc002a70bf8c6dd9a56b5c/examples/merge/Simple.hs | haskell |
less A B = True
less A C = True
less B C = True
less A A = True
less B B = True
less C C = True
| module Simple where
data Simple = A | B | C deriving ( Eq , Ord )
data Simple = A | B | C
instance where
A = = A = True
B = = B = True
C = = C = True
_ = = _ = False
instance where
B < = A = False
C < = A = False
C < = B = False
_ < = _ = True
instance Eq ... |
69f77cf896dfe7eed7cf4a178ea48a03407919c1456838eb7c7284afc3cf2ffc | fukamachi/integral | error.lisp | (in-package :cl-user)
(defpackage integral.error
(:use :cl))
(in-package :integral.error)
(cl-syntax:use-syntax :annot)
@export
(define-condition <integral-error> (simple-error) ())
@export
(define-condition <connection-not-established-error> (<integral-error>)
()
(:report
(lambda (condition stream)
(d... | null | https://raw.githubusercontent.com/fukamachi/integral/5fdf506233e9f6aa814a2da529bed0a551183110/src/error.lisp | lisp | (in-package :cl-user)
(defpackage integral.error
(:use :cl))
(in-package :integral.error)
(cl-syntax:use-syntax :annot)
@export
(define-condition <integral-error> (simple-error) ())
@export
(define-condition <connection-not-established-error> (<integral-error>)
()
(:report
(lambda (condition stream)
(d... | |
855054a9091a753189d2800321fc2ae9ef4e3b6239bf9650166369416c43a890 | techascent/tvm-clj | op.clj | (ns tvm-clj.impl.fns.test.op
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "test.op") | null | https://raw.githubusercontent.com/techascent/tvm-clj/1088845bd613b4ba14b00381ffe3cdbd3d8b639e/src/tvm_clj/impl/fns/test/op.clj | clojure | (ns tvm-clj.impl.fns.test.op
(:require [tvm-clj.impl.tvm-ns-fns :as tvm-ns-fns]))
(tvm-ns-fns/export-tvm-functions "test.op") | |
88eb19ade32d7e95b4faf65c8f41b7f26d3b308143acfe897dbfd075cc67e5d4 | tommaisey/aeon | tw-index.help.scm | ;; Assuming normalized values
(hear
(let* ((prob (mce3 1/5 2/5 2/5))
(freq (mce3 400 500 600))
(f (select (tw-index (impulse kr 6 0) 0.0 prob) freq)))
(mul (sin-osc ar f 0) 0.2)))
;; Modulating probability values
(hear
(let* ((t (impulse kr 6 0))
(a (mce3 1/4 1/2 (mul-add (sin-osc kr 0.3 0) 0.5 0.5)))
(f (s... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/oscillators/tw-index.help.scm | scheme | Assuming normalized values
Modulating probability values |
(hear
(let* ((prob (mce3 1/5 2/5 2/5))
(freq (mce3 400 500 600))
(f (select (tw-index (impulse kr 6 0) 0.0 prob) freq)))
(mul (sin-osc ar f 0) 0.2)))
(hear
(let* ((t (impulse kr 6 0))
(a (mce3 1/4 1/2 (mul-add (sin-osc kr 0.3 0) 0.5 0.5)))
(f (select (tw-index t 1.0 a) (mce3 400 500 600))))
(mul (sin-osc... |
c9acf9792726d2b69dec1da3898978ff132bc1b1473a8c973e8469e693919d99 | tsoding/kgbotka | Bttv.hs | # LANGUAGE QuasiQuotes #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
module KGBotka.Bttv
( updateBttvEmotes
, getBttvEmoteByName
, BttvEmote(..)
) where
import Control.Monad.Trans.Class
import Control.Monad.Trans.Except
import Control.Monad.Trans.Maybe
import Data.Aeson
import Data.Aeson.Type... | null | https://raw.githubusercontent.com/tsoding/kgbotka/67278a93611b0abe4e07df7967559884263147aa/src/KGBotka/Bttv.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE QuasiQuotes #
# LANGUAGE ViewPatterns #
module KGBotka.Bttv
( updateBttvEmotes
, getBttvEmoteByName
, BttvEmote(..)
) where
import Control.Monad.Trans.Class
import Control.Monad.Trans.Except
import Control.Monad.Trans.Maybe
import Data.Aeson
import Data.Aeson.Types
import Data.Foldable
import Data.... |
89dfc9be2ef1d4e47fe917b7cebf0900bb16c5e7317984a43ac933c8cda8c5cf | hurryabit/pukeko | Forget.hs | # LANGUAGE TemplateHaskell #
| A type whose contents do not influence derive ' ' and ' ' instances .
module Data.Forget
( Forget (Forget)
, remember
)
where
import Prelude
import Control.Lens (Iso, iso)
import Data.Aeson.TH
newtype Forget a = Forget{_remember :: a}
remember :: Iso (Forget a) (Forget b) a ... | null | https://raw.githubusercontent.com/hurryabit/pukeko/d11a101a41123c5151bcdd7dd2d0ef53c65483c2/src/Data/Forget.hs | haskell | # LANGUAGE TemplateHaskell #
| A type whose contents do not influence derive ' ' and ' ' instances .
module Data.Forget
( Forget (Forget)
, remember
)
where
import Prelude
import Control.Lens (Iso, iso)
import Data.Aeson.TH
newtype Forget a = Forget{_remember :: a}
remember :: Iso (Forget a) (Forget b) a ... | |
6468547910ab1975aaa7178d69b798dfce9e7a947f993d766b3b8368f001a709 | aeternity/aeternity | aesc_session_noise.erl | -*- mode : erlang ; erlang - indent - level : 4 ; indent - tabs - mode : nil -*-
-module(aesc_session_noise).
-behaviour(gen_server).
-include("aesc_codec.hrl").
%% ==================================================================
%% Process API
called by FSM
called by FSM
, close/1
, start_ge... | null | https://raw.githubusercontent.com/aeternity/aeternity/9d58aa927a5d7ac037ca49258bb280e464e365a8/apps/aechannel/src/aesc_session_noise.erl | erlang | ==================================================================
Process API
called by acceptor pool
==================================================================
Protocol API
==================================================================
gen_server API
===============================================... | -*- mode : erlang ; erlang - indent - level : 4 ; indent - tabs - mode : nil -*-
-module(aesc_session_noise).
-behaviour(gen_server).
-include("aesc_codec.hrl").
called by FSM
called by FSM
, close/1
, start_link/1
]).
-export([ channel_open/2
, channel_accept/2
, fundi... |
5e1ffcf26e8ad4bb0eb8b3d17d7953b69dd15af2033dddb7f583b07ffca2ee11 | futurice/clojure-workshop | 12_lazy_sequences.clj | (ns koans.12-lazy-sequences
(:require [koan-engine.core :refer :all]))
(meditations
"There are many ways to generate a sequence"
(= __ (range 1 5))
"The range starts at the beginning by default"
(= __ (range 5))
"Only take what you need when the sequence is large"
(= [0 1 2 3 4 5 6 7 8 9]
(take __ (range... | null | https://raw.githubusercontent.com/futurice/clojure-workshop/c1e64a03e1115289898838d4f19f727bc51e2b34/materials/section-1/src/koans/12_lazy_sequences.clj | clojure | (ns koans.12-lazy-sequences
(:require [koan-engine.core :refer :all]))
(meditations
"There are many ways to generate a sequence"
(= __ (range 1 5))
"The range starts at the beginning by default"
(= __ (range 5))
"Only take what you need when the sequence is large"
(= [0 1 2 3 4 5 6 7 8 9]
(take __ (range... | |
71865310e68347ca5c5b7a326df4e0658864b22468fab1930d990eb39f4807c1 | spawngrid/htoad | ec_lists.erl | %%%-------------------------------------------------------------------
( C ) 2011 , Erlware LLC
%%% @doc
%%% Provides useful functionionality on standard lists that are
%%% not provided in the standard library.
%%% @end
%%%-------------------------------------------------------------------
-module(ec_lists).
%% A... | null | https://raw.githubusercontent.com/spawngrid/htoad/f0c7dfbd911b29fb0c406b7c26606f553af11194/deps/erlware_commons/src/ec_lists.erl | erlang | -------------------------------------------------------------------
@doc
Provides useful functionionality on standard lists that are
not provided in the standard library.
@end
-------------------------------------------------------------------
API
=================================================================... | ( C ) 2011 , Erlware LLC
-module(ec_lists).
-export([find/2,
fetch/2,
search/2]).
where the second value is the term returned from the function and
the third value is the element passed to the function . The purpose
-spec search(fun(), list()) -> {ok, Result::term(), Element::term()}.
search... |
1f931897d0626053fd0981690baae7ea014a2269c4eb1bff2484c223eb7b051a | eugeneia/athens | derived-class.lisp | (in-package :trivia.level2.impl)
;;;; class pattern etc.
(defpattern class (name &rest slots)
"Synonym to STRUCTURE pattern."
;; in v2, class pattern is just a sugar
`(structure ,name ,@slots))
(defpattern structure (name &rest slots)
"Complex pattern. Matches against a structure or a class named NAME.
Match... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/trivia-20180711-git/level2/derived-class.lisp | lisp | class pattern etc.
in v2, class pattern is just a sugar
checking the class type predicate
checking the slots
slot is actually used from the specified keyword, slot name and so on.
We then discuss the slot specification in the pattern. A slot
specification is a list (slot-name subpattern) where slot-name might be... | (in-package :trivia.level2.impl)
(defpattern class (name &rest slots)
"Synonym to STRUCTURE pattern."
`(structure ,name ,@slots))
(defpattern structure (name &rest slots)
"Complex pattern. Matches against a structure or a class named NAME.
Match the slots against the subpatterns described in SLOTS.
In order to... |
b642b3388a3918a49ffbeeb4e68cfb4c8c1c89ad129a0c9457bde6500a7d649f | LauraVoinea/protocol-reengineering-implementation | resource_stub.erl | -module(resource_stub).
-behaviour(gen_statem).
-define(SERVER, ?MODULE).
-export([act_l/1,
act_m/1,
act_r/1,
callback_mode/0,
init/1,
start_link/0,
state1/3,
stop/0,
terminate/3]).
start_link() -> gen_statem:start_link({local, ?SERVER}, ?MODUL... | null | https://raw.githubusercontent.com/LauraVoinea/protocol-reengineering-implementation/c20263e4fb7f88005444638cb23227407d29d698/src/examples/resource/resource_stub.erl | erlang | assert n
assert n
assert n | -module(resource_stub).
-behaviour(gen_statem).
-define(SERVER, ?MODULE).
-export([act_l/1,
act_m/1,
act_r/1,
callback_mode/0,
init/1,
start_link/0,
state1/3,
stop/0,
terminate/3]).
start_link() -> gen_statem:start_link({local, ?SERVER}, ?MODUL... |
560fe9d5f40afcb3e843c00fe5ec7d9591f30eed69da8ee656f3f29391a7a968 | revelytix/carbonite | serializer.clj | (ns carbonite.serializer
(:require [clojure.string :as s])
(:import [com.esotericsoftware.kryo Kryo Serializer SerializationException]
[com.esotericsoftware.kryo.serialize StringSerializer MapSerializer IntSerializer
LongSerializer BigDecimalSerializer BigIntegerSerializer DateSerializer]
... | null | https://raw.githubusercontent.com/revelytix/carbonite/c0199e4f82c16d1681638336c226ffe26b50852a/src/carbonite/serializer.clj | clojure | collections where we can use transients for perf
list/seq collections
maps - use transients for perf
Copyright 2011 Revelytix, Inc.
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, s... | (ns carbonite.serializer
(:require [clojure.string :as s])
(:import [com.esotericsoftware.kryo Kryo Serializer SerializationException]
[com.esotericsoftware.kryo.serialize StringSerializer MapSerializer IntSerializer
LongSerializer BigDecimalSerializer BigIntegerSerializer DateSerializer]
... |
bc10ac77016b0dcc96aa56386c57678a9cf64a2854a51dafca4192aced404c56 | crategus/cl-cffi-gtk | rtest-gtk-page-setup-unix-dialog.lisp | (def-suite gtk-page-setup-unix-dialog :in gtk-suite)
(in-suite gtk-page-setup-unix-dialog)
;;; --- Types and Values -------------------------------------------------------
(test gtk-page-setup-unix-dialog-class
;; Type check
(is (g-type-is-object "GtkPageSetupUnixDialog"))
;; Check the registered name
... | null | https://raw.githubusercontent.com/crategus/cl-cffi-gtk/22156e3e2356f71a67231d9868abcab3582356f3/test/rtest-gtk-page-setup-unix-dialog.lisp | lisp | --- Types and Values -------------------------------------------------------
Type check
Check the registered name
Check the type initializer
Check the parent
Check the children
Check the interfaces
Check the class properties
Get the names of the style properties.
Get the names of the child properties
Check t... | (def-suite gtk-page-setup-unix-dialog :in gtk-suite)
(in-suite gtk-page-setup-unix-dialog)
(test gtk-page-setup-unix-dialog-class
(is (g-type-is-object "GtkPageSetupUnixDialog"))
(is (eq 'gtk-page-setup-unix-dialog
(registered-object-type-by-name "GtkPageSetupUnixDialog")))
(is (eq (gtype "Gtk... |
0acc615281e8dbc0c4dfa7661b0d766d9753fd066ec3cca71f3d6a141c560d80 | albertoruiz/easyVision | Camera.hs | # LANGUAGE ViewPatterns #
-----------------------------------------------------------------------------
|
Module : Vision . Camera
Copyright : ( c ) 2006 - 7
License : GPL - style
Maintainer : ( aruiz at um dot es )
Stability : very provisional
Portability : hmm ...
... | null | https://raw.githubusercontent.com/albertoruiz/easyVision/26bb2efaa676c902cecb12047560a09377a969f2/packages/geometry/src/Vision/Camera.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
| A nice camera parameterization.
| Computes the camera parameters given the projection center,
the point imaged in the image center and roll angle.
^ field of vi... | # LANGUAGE ViewPatterns #
|
Module : Vision . Camera
Copyright : ( c ) 2006 - 7
License : GPL - style
Maintainer : ( aruiz at um dot es )
Stability : very provisional
Portability : hmm ...
Projective camera synthesis and analysis
Module : Vision.Camera
Copy... |
36fa0147a689880cc4cc77b4c116bcd100a13371c248f8cf61d46fcc69942dfc | Kah0ona/re-datagrid | views.cljs | (ns re-datagrid-demo.views
(:require [fipp.clojure :refer [pprint]]
[re-datagrid.views :as datagrid]
[re-frame.core :as rf]
[reagent.core :as r]
[taoensso.timbre :as timbre
:refer-macros (log trace debug info warn error fatal report
... | null | https://raw.githubusercontent.com/Kah0ona/re-datagrid/d05a9224b75c272aac896a801e4962f4e33a09f0/src/cljs/re_datagrid_demo/views.cljs | clojure | max_allowed_packet | (ns re-datagrid-demo.views
(:require [fipp.clojure :refer [pprint]]
[re-datagrid.views :as datagrid]
[re-frame.core :as rf]
[reagent.core :as r]
[taoensso.timbre :as timbre
:refer-macros (log trace debug info warn error fatal report
... |
6e2577ade48025e7fb85893aaca800d8c5ad6dcfe823fe869dfd97d6381c04c6 | liqd/aula | Persistent.hs | # OPTIONS_GHC -Werror -Wall #
-- | Placeholder module for separate DSL and other
-- high level combinators.
module Persistent (module X) where
import Persistent.Pure as X
import Persistent.Idiom as X
import Persistent.Implementation as X
| null | https://raw.githubusercontent.com/liqd/aula/f96dbf85cd80d0b445e7d198c9b2866bed9c4e3d/src/Persistent.hs | haskell | | Placeholder module for separate DSL and other
high level combinators. | # OPTIONS_GHC -Werror -Wall #
module Persistent (module X) where
import Persistent.Pure as X
import Persistent.Idiom as X
import Persistent.Implementation as X
|
362d1428d80d5e2767aef7828589786e33421bb81c0ec2cef715d97cab786633 | kazu-yamamoto/SKI | Test.hs | module Test where
import Command
import Test.Framework (defaultMain, testGroup, Test, TestName)
import Test.Framework.Providers.HUnit
import Test.HUnit hiding (Test)
define :: IO ()
define = do
def "I=SKK"
def "B=S(KS)K"
def "C=S(BBS)(KK)"
def "T=CI"
def "W=ST"
def "M=SII"
def "L=CBM"
... | null | https://raw.githubusercontent.com/kazu-yamamoto/SKI/a4dabc81d7f24dd490903cf8d195d14a4e8efbd7/Test.hs | haskell | module Test where
import Command
import Test.Framework (defaultMain, testGroup, Test, TestName)
import Test.Framework.Providers.HUnit
import Test.HUnit hiding (Test)
define :: IO ()
define = do
def "I=SKK"
def "B=S(KS)K"
def "C=S(BBS)(KK)"
def "T=CI"
def "W=ST"
def "M=SII"
def "L=CBM"
... | |
a1f2e115f3e294cb383d59534f63d708e27642a8c76a31e9541288cf6044b4c7 | atgreen/red-light-green-light | test-prepared-statements.lisp | -*- Mode : LISP ; Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : POSTMODERN - TESTS ; -*-
(in-package :postmodern-tests)
(def-suite :postmodern-prepare
:description "Prepared query suite for postmodern"
:in :postmodern)
(in-suite :postmodern-prepare)
(defun prepare-fixture ()
(drop-prepared-statement ... | null | https://raw.githubusercontent.com/atgreen/red-light-green-light/f067507721bbab4aa973866db5276c83df3e8784/local-projects/postmodern-20220220-git/postmodern/tests/test-prepared-statements.lisp | lisp | Syntax : Ansi - Common - Lisp ; Base : 10 ; Package : POSTMODERN - TESTS ; -*-
Defprepared does not change the prepared statements logged in the postmodern connection or
in the postgresql connection. That will only happen when the prepared statement is
funcalled.
CHANGE HERE TO SIGNALS ERROR
mismatched parameter t... | (in-package :postmodern-tests)
(def-suite :postmodern-prepare
:description "Prepared query suite for postmodern"
:in :postmodern)
(in-suite :postmodern-prepare)
(defun prepare-fixture ()
(drop-prepared-statement "all")
(when (table-exists-p 'test-data) (execute (:drop-table 'test-data)))
(execute (:create-... |
3caff66a91a7f3634a14f164500b81aadd9576326621f06ce9c91b880553e934 | racket/typed-racket | tc-app-helper.rkt | #lang racket/base
(require "../utils/utils.rkt"
"../utils/identifier.rkt"
racket/match racket/sequence racket/set racket/list
(contract-req)
"check-below.rkt"
"tc-subst.rkt"
"tc-metafunctions.rkt"
"possible-domains.rkt"
"../utils/tc-utils.rkt"
... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-lib/typed-racket/typecheck/tc-app-helper.rkt | racket | update tooltip-table with inferred function type
we check that all kw args are optional
Currently do nothing with rest args and keyword args
as there are no support for them in objects yet.
if the range is an existential result, we need to
instantiate it with the original names so as to make the
error message re... | #lang racket/base
(require "../utils/utils.rkt"
"../utils/identifier.rkt"
racket/match racket/sequence racket/set racket/list
(contract-req)
"check-below.rkt"
"tc-subst.rkt"
"tc-metafunctions.rkt"
"possible-domains.rkt"
"../utils/tc-utils.rkt"
... |
f9a71f94c8b28c9fe9d9df956a4f401690f96a9e0e0bb06c22b539ffc1e9b3dd | quicklisp/quicklisp-controller | upstream-file.lisp | ;;;; upstream-file.lisp
(in-package #:quicklisp-controller)
(defclass single-file-source (http-source) ())
(defun asdf-external-symbol-p (thing)
"Returns true if THING is a symbol exported from ASDF."
(and (symbolp thing)
(multiple-value-bind (symbol class)
(find-symbol (symbol-name thing) :asd... | null | https://raw.githubusercontent.com/quicklisp/quicklisp-controller/9fc95237f0f2f86cafc3afb2f1e7666610e8561b/upstream-file.lisp | lisp | upstream-file.lisp |
(in-package #:quicklisp-controller)
(defclass single-file-source (http-source) ())
(defun asdf-external-symbol-p (thing)
"Returns true if THING is a symbol exported from ASDF."
(and (symbolp thing)
(multiple-value-bind (symbol class)
(find-symbol (symbol-name thing) :asdf)
(and (eq sym... |
abed48319f68c9f9d0d24659fe946c27315bb6a1362743cb02706bf4ac5473c0 | dreixel/syb | Basics.hs | -----------------------------------------------------------------------------
-- |
-- Module : Generics.SYB.Basics
Copyright : ( c ) The University of Glasgow , CWI 2001 - -2004
-- License : BSD-style (see the LICENSE file)
--
Maintainer :
-- Stability : experimental
-- Portability : non-p... | null | https://raw.githubusercontent.com/dreixel/syb/f741a437f18768f71586eeb47ffb43c0915f331b/src/Generics/SYB/Basics.hs | haskell | ---------------------------------------------------------------------------
|
Module : Generics.SYB.Basics
License : BSD-style (see the LICENSE file)
Stability : experimental
Portability : non-portable (local universal quantification)
-------------------------------------------------------------... | Copyright : ( c ) The University of Glasgow , CWI 2001 - -2004
Maintainer :
Convenience alias for " Data . Generics . Basics " .
module Generics.SYB.Basics (module Data.Generics.Basics) where
import Data.Generics.Basics
|
1cbe0624f1c2ad2df659e5b0ddff0ae637ee66b3d0b7302dbee579ac95f49be8 | stchang/macrotypes | ext-stlc-tests.rkt | #lang s-exp turnstile/examples/optimize/ext-stlc
(require rackunit/turnstile)
;; tests for define-type-alias
(define-type-alias (A X) (add1 X))
(typecheck-fail (λ ([f : (A 1)]) f) #:with-msg "not a well-formed type")
;; tests for stlc extensions
;; new literals and base types
(check-type "one" : String) ; literal no... | null | https://raw.githubusercontent.com/stchang/macrotypes/05ec31f2e1fe0ddd653211e041e06c6c8071ffa6/turnstile-test/tests/turnstile/optimize/ext-stlc-tests.rkt | racket | tests for define-type-alias
tests for stlc extensions
new literals and base types
literal now supported
literal now supported
Bool is now valid type
Unit
begin
(typecheck-fail
ascription
let
letrec
recursive
mutually recursive
most should pass, some failing may now pass due to added types/forms
(typecheck-... | #lang s-exp turnstile/examples/optimize/ext-stlc
(require rackunit/turnstile)
(define-type-alias (A X) (add1 X))
(typecheck-fail (λ ([f : (A 1)]) f) #:with-msg "not a well-formed type")
(check-type (void) : Unit)
(check-type void : (→ Unit))
(typecheck-fail
((λ ([x : Unit]) x) 2)
#:with-msg "expected Unit, give... |
f429e2bf4cae7ab8e56616fb910cab942a23e5a2c54874a182361aa327735d9a | aws-beam/aws-erlang | aws_ecr.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
%% @doc Amazon Elastic Container Registry
%%
Amazon Elastic Container Registry ( Amazon ECR ) is a managed container
%% image registry service.
%%
Customers can use the familiar CLI , or their preferred client , to
push , p... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_ecr.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
@doc Amazon Elastic Container Registry
image registry service.
access repositories and images.
Reference.
====================================================================
API
====================================================================
When an image is p... | See -beam/aws-codegen for more details .
Amazon Elastic Container Registry ( Amazon ECR ) is a managed container
Customers can use the familiar CLI , or their preferred client , to
push , pull , and manage images . Amazon ECR provides a secure , scalable , and
reliable registry for your or Open Container I... |
56d69b86f67b7a99f632a343765e48bd0630b96ba406e1c99f8d18d3c6aba419 | BillHallahan/G2 | M06.hs | {-@ LIQUID "--no-termination" @-}
module M6 (main) where
data List a = Cons a (List a) | Nil
@ main : : List Bool - > List ( List ) - > { b : | b } @
main :: List Bool -> List (List Bool) -> Bool
main xs ys =
case while1 xs ys cond1 loop1 (1, 0, 0, 0) of
(w', z', x', y') -> x' == y'
while1 :: List Boo... | null | https://raw.githubusercontent.com/BillHallahan/G2/f2584eb2ec211aed73b3ccd88c6e232c3cf4386d/tests/LiquidInf/Paper/Eval/Compare/M06.hs | haskell | @ LIQUID "--no-termination" @
@ cond1 :: List Bool -> (Int, Int, Int, Int) -> Bool @
@ loop1 :: List Bool -> (Int, Int, Int, Int) -> (Int, Int, Int, Int) @
@ loop2 :: Int -> Int -> (Int, Int) -> (Int, Int) @ |
module M6 (main) where
data List a = Cons a (List a) | Nil
@ main : : List Bool - > List ( List ) - > { b : | b } @
main :: List Bool -> List (List Bool) -> Bool
main xs ys =
case while1 xs ys cond1 loop1 (1, 0, 0, 0) of
(w', z', x', y') -> x' == y'
while1 :: List Bool -> List (List Bool) -> (List Boo... |
cda82fb94124d2eb13635b8224c04327bc2826267cfae12913962f89aa0524e2 | ryanprior/guix-packages | harvey.scm | (define-module (testing harvey)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gtk)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages)
#:use-module (guix build-system meson)
#:use-module (guix download)
... | null | https://raw.githubusercontent.com/ryanprior/guix-packages/a5cdd6ec5b8418024dfcafdf79436d567dd3759b/testing/harvey.scm | scheme | (define-module (testing harvey)
#:use-module (gnu packages gettext)
#:use-module (gnu packages glib)
#:use-module (gnu packages gnome)
#:use-module (gnu packages gtk)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages)
#:use-module (guix build-system meson)
#:use-module (guix download)
... | |
ed3596a68932d1e924cfb7e6604ac31feda4d6f80fd55f902d3700b658a3ba91 | DerekCuevas/interview-cake-clj | core_test.clj | (ns rectangular-love.core-test
(:require [clojure.test :refer :all]
[rectangular-love.core :refer :all]))
(def rect-a {:x 1 :y 5 :width 10 :height 4})
(def rect-b {:x 3 :y 7 :width 5 :height 8})
(def rect-c {:x -5 :y 3 :width 7 :height 10})
(def rect-d {:x 0 :y 0 :width 8 :height 12})
(def rect-e {:x 1 :... | null | https://raw.githubusercontent.com/DerekCuevas/interview-cake-clj/f17d3239bb30bcc17ced473f055a9859f9d1fb8d/rectangular-love/test/rectangular_love/core_test.clj | clojure | (ns rectangular-love.core-test
(:require [clojure.test :refer :all]
[rectangular-love.core :refer :all]))
(def rect-a {:x 1 :y 5 :width 10 :height 4})
(def rect-b {:x 3 :y 7 :width 5 :height 8})
(def rect-c {:x -5 :y 3 :width 7 :height 10})
(def rect-d {:x 0 :y 0 :width 8 :height 12})
(def rect-e {:x 1 :... | |
76bc03c1b9f746c7bbb96abe33aa72b3541124e67980ce767503d090f78e5c19 | catseye/Robin | RandomSource.hs | module Language.Robin.Facilities.RandomSource where
import Data.Int
import System.Random
import Language.Robin.Expr
import Language.Robin.Facilities
init :: IO Facility
init = return Facility{ handler=handleEvent, waiter=nullWaiter }
handleEvent :: FacilityHandler
handleEvent (List [Symbol "obtain-random-u16", pa... | null | https://raw.githubusercontent.com/catseye/Robin/964ea82edef9f6a9a8e6363ee915ab48b0d2ec50/src/Language/Robin/Facilities/RandomSource.hs | haskell | module Language.Robin.Facilities.RandomSource where
import Data.Int
import System.Random
import Language.Robin.Expr
import Language.Robin.Facilities
init :: IO Facility
init = return Facility{ handler=handleEvent, waiter=nullWaiter }
handleEvent :: FacilityHandler
handleEvent (List [Symbol "obtain-random-u16", pa... | |
6760374b08d083ccae6948616a9a7ab25bbfc33b750673a8ec590bdd8d2adb3d | cram2/cram | polynomial.lisp | ;; Polynomials
, Tue Mar 21 2006 - 18:33
Time - stamp : < 2016 - 06 - 15 22:31:17EDT polynomial.lisp >
;;
Copyright 2009 , 2011 , 2012 , 2014 , 2016
Distributed under the terms of the GNU General Public License
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms ... | null | https://raw.githubusercontent.com/cram2/cram/dcb73031ee944d04215bbff9e98b9e8c210ef6c5/cram_3rdparty/gsll/src/polynomial.lisp | lisp | Polynomials
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU ... | , Tue Mar 21 2006 - 18:33
Time - stamp : < 2016 - 06 - 15 22:31:17EDT polynomial.lisp >
Copyright 2009 , 2011 , 2012 , 2014 , 2016
Distributed under the terms of the GNU General Public License
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either ver... |
f69937e1e5aa2cb1ae4651edeb43fbeef85da766d61bbe794b527c0573b6e377 | incoherentsoftware/defect-process | Data.hs | module Enemy.All.Dog.Data
( DogEnemyData(..)
, mkDogEnemyData
, rollWillUseAttackProjectile
) where
import Control.Monad.IO.Class (MonadIO, liftIO)
import System.Random (randomRIO)
import Configs
import Configs.All.Enemy
import Configs.All.Enemy.Dog
import Enemy.All.Dog.AttackDescriptions
imp... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/8797aad1d93bff5aadd7226c39a48f45cf76746e/src/Enemy/All/Dog/Data.hs | haskell | module Enemy.All.Dog.Data
( DogEnemyData(..)
, mkDogEnemyData
, rollWillUseAttackProjectile
) where
import Control.Monad.IO.Class (MonadIO, liftIO)
import System.Random (randomRIO)
import Configs
import Configs.All.Enemy
import Configs.All.Enemy.Dog
import Enemy.All.Dog.AttackDescriptions
imp... | |
6638790a7a4ae2ea8753b20a064e77e64fe541fee690cd9e19724f59afd11c38 | chrisdone/ace | Syntax.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE StandaloneDeriving #
{-# LANGUAGE BangPatterns #-}
-- | Types for the syntax tree.
module ACE.Types.Syntax where
import Data.Text (Text)
import Prelude hiding (String)
-- | Specifications consist of a sentence coordination followed by a
per... | null | https://raw.githubusercontent.com/chrisdone/ace/fab8fa45fc2af11cdc90e6cca2f565d866356a09/src/ACE/Types/Syntax.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE BangPatterns #
| Types for the syntax tree.
| Specifications consist of a sentence coordination followed by a
logical conjunction, while @or@ de-notes the logical disjunction. The
logical conjunction has a higher precedence than the disjunction.
Both connectors are right... | # LANGUAGE DeriveGeneric #
# LANGUAGE StandaloneDeriving #
module ACE.Types.Syntax where
import Data.Text (Text)
import Prelude hiding (String)
period and optionally one ore more subsequent specifications .
data Specification =
Specification !SentenceCoord !(Maybe Specification)
deriving (Show,Eq)
| Senten... |
30a36795262178755ce8d27d695d501a8c7df6ae53afec6a659798e79afb12c0 | Rainist/kubeletter | mem_store.clj | (ns kubeletter.stores.mem-store
)
(def ^:private db {})
(defn debug []
(println db))
(defn set-val [key value]
(->> (assoc db key value)
(def db)))
(defn get-val [key]
(db key))
(defn tidy []
;;TODO: tidy old data
)
| null | https://raw.githubusercontent.com/Rainist/kubeletter/da326a067147f45b069a49d22730ea07675f9e16/kubeletter/src/kubeletter/stores/mem_store.clj | clojure | TODO: tidy old data | (ns kubeletter.stores.mem-store
)
(def ^:private db {})
(defn debug []
(println db))
(defn set-val [key value]
(->> (assoc db key value)
(def db)))
(defn get-val [key]
(db key))
(defn tidy []
)
|
d0deedb593b81494d3599e095a94bc0c0515e46d2c268eeddd7cc33976f80362 | txkaduo/weixin-mp-sdk | Misc.hs | {-# LANGUAGE RankNTypes #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE CPP #
module WeiXin.PublicPlatform.Misc where
{ { { 1 imports
import ClassyPrelude hiding (try)
#if MIN_VERSION_base(4, 13, 0)
import Control . ( MonadFail ( .. ) )
#else
import Control.DeepSeq ... | null | https://raw.githubusercontent.com/txkaduo/weixin-mp-sdk/5bab123eb3e1c74b4cae14d30003bc4e6b75b3b3/WeiXin/PublicPlatform/Misc.hs | haskell | # LANGUAGE RankNTypes #
| parseMultiWxppAppConfig 相似
但使用这个解释得到的字典是 wxpp~xxx 中的 xxx 作为键值(而不是app id)
| 为方便在 URL 上使用 code name 而设(与 parseMultWxppAppConfig2 的结果配合使用)
| 用于构造 的工具
^ 用于记录上次成功配置的,可用的,消息处理规则列表
^ 找到相应配置的函数
这里可以选择使用 tryEveryInMsgHandler '
那样就会所有 handler 保证处理一次
tryEveryInMsgHandler '
| 用于构造 MaybeW... | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE CPP #
module WeiXin.PublicPlatform.Misc where
{ { { 1 imports
import ClassyPrelude hiding (try)
#if MIN_VERSION_base(4, 13, 0)
import Control . ( MonadFail ( .. ) )
#else
import Control.DeepSeq (($!!))
#endif
import qua... |
ed77203b6464a96a8324e7971d41260614ca61c3e17af5e76355c9372fe62167 | ashinn/chibi-scheme | column.scm | ;; column.scm -- formatting columns and tables
Copyright ( c ) 2006 - 2017 . All rights reserved .
;; BSD-style license:
(define (string-split-words str separator?)
(let ((start (string-cursor-start str))
(end (string-cursor-end str)))
(let lp ((sc start) (res '()))
(cond
((string-cur... | null | https://raw.githubusercontent.com/ashinn/chibi-scheme/8b27ce97265e5028c61b2386a86a2c43c1cfba0d/lib/srfi/166/column.scm | scheme | column.scm -- formatting columns and tables
BSD-style license:
(show-columns (fmt gen [infinite?]) ...)
(columnar ['infinite|'right|'left|'center|width] string-or-formatter ...)
line formatter
generator
break lines only, don't join short lines or justify
TODO: when splitting by string-width, substring needs
t... | Copyright ( c ) 2006 - 2017 . All rights reserved .
(define (string-split-words str separator?)
(let ((start (string-cursor-start str))
(end (string-cursor-end str)))
(let lp ((sc start) (res '()))
(cond
((string-cursor>=? sc end)
(reverse res))
(else
(let ((sc2 ... |
79640a11efe9004c8ea61e697d7060329b1193b9e4b0f0caa14282dc22eac7e1 | tommaisey/aeon | lf-noise0.help.scm | (hear (mul (lf-noise0 ar 1000) 0.25))
(hear (mul (lf-noise1 ar 1000) 0.25))
(hear (mul (lf-noise2 ar 1000) 0.25))
;; Modulate frequency.
(hear (mul (lf-noise0 ar (x-line kr 1000 10000 10 remove-synth)) 0.25))
(hear (mul (lf-noise1 ar (x-line kr 1000 10000 10 remove-synth)) 0.25))
(hear (mul (lf-noise2 ar (x-line kr 1... | null | https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/noise/lf-noise0.help.scm | scheme | Modulate frequency.
Use as frequency control. | (hear (mul (lf-noise0 ar 1000) 0.25))
(hear (mul (lf-noise1 ar 1000) 0.25))
(hear (mul (lf-noise2 ar 1000) 0.25))
(hear (mul (lf-noise0 ar (x-line kr 1000 10000 10 remove-synth)) 0.25))
(hear (mul (lf-noise1 ar (x-line kr 1000 10000 10 remove-synth)) 0.25))
(hear (mul (lf-noise2 ar (x-line kr 1000 10000 10 remove-syn... |
44f0bef1d8b64d118c0241ffcc134f94bcaec06a3a40a710feabed20de8daf99 | gedge-platform/gedge-platform | Elixir.RabbitMQ.CLI.Ctl.Commands.RestartShovelCommand.erl | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
%%
-module('Elixir.RabbitMQ.CLI.Ctl.Commands.Restart... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/rabbitmq_shovel/src/Elixir.RabbitMQ.CLI.Ctl.Commands.RestartShovelCommand.erl | erlang |
----------------------------------------------------------------------------
Callbacks
---------------------------------------------------------------------------- | This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
Copyright ( c ) 2007 - 2021 VMware , Inc. or its affiliates . All rights reserved .
-module('Elixir.RabbitMQ.CLI.Ctl.Commands.RestartShovel... |
deefe00611c3696cf56ac0621e872d2f71a56802c3016fb62633e721995e3123 | icicle-lang/zebra-ambiata | Striped.hs | # LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
module Zebra.Serial.Json.Striped (
encodeStriped
, decodeStriped
, JsonStripedEncodeError(..)
, renderJsonStripedEncodeError
, JsonStripedDecodeError(..)
, renderJsonStripedDecodeError
) where
import D... | null | https://raw.githubusercontent.com/icicle-lang/zebra-ambiata/394ee5f98b4805df2c76abb52cdaad9fd7825f81/zebra-core/src/Zebra/Serial/Json/Striped.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE LambdaCase #
# LANGUAGE NoImplicitPrelude #
module Zebra.Serial.Json.Striped (
encodeStriped
, decodeStriped
, JsonStripedEncodeError(..)
, renderJsonStripedEncodeError
, JsonStripedDecodeError(..)
, renderJsonStripedDecodeError
) where
import Data.ByteString (ByteString)
import... |
6baee1adcc36e1cea89c677564bde9b08966f6e490b4e32eec2c975ebf2f8769 | tonyg/pi-nothing | info.rkt | #lang setup/infotab
(define collection "nothingc")
(define deps '("base"
"make"))
(define pre-install-collection "private/install.rkt")
(define compile-omit-files '("private/install.rkt"
"private/alternatives/intervals-bitset.rkt"
"private/altern... | null | https://raw.githubusercontent.com/tonyg/pi-nothing/4b2b59d42babd72cfd007cb71ed295dcdbf53d4a/nothingc/info.rkt | racket | #lang setup/infotab
(define collection "nothingc")
(define deps '("base"
"make"))
(define pre-install-collection "private/install.rkt")
(define compile-omit-files '("private/install.rkt"
"private/alternatives/intervals-bitset.rkt"
"private/altern... | |
734d80a590dd024bfea45fc5fd96d95be6a7235b719c381a3b66ad700bb5475b | semilin/layoup | ev13.1.lisp |
(MAKE-LAYOUT :NAME "ev13.1" :MATRIX
(APPLY #'KEY-MATRIX '("yfouzkdlmv" "isea.ptncr" "jx',;bwhgq"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | null | https://raw.githubusercontent.com/semilin/layoup/27ec9ba9a9388cd944ac46206d10424e3ab45499/data/layouts/ev13.1.lisp | lisp |
(MAKE-LAYOUT :NAME "ev13.1" :MATRIX
(APPLY #'KEY-MATRIX '("yfouzkdlmv" "isea.ptncr" "jx',;bwhgq"))
:SHIFT-MATRIX NIL :KEYBOARD NIL) | |
b6652a5e5225bf108263d54356def7f92f9451f6501e6641bb77c34b3c07bbee | brandonbloom/fipp | edn_test.cljc | (ns fipp.edn-test
(:require [clojure.test :refer [deftest is are testing]]
[fipp.test-util :refer [clean]]
[fipp.edn :refer [pprint]]
[fipp.ednize :refer [IEdn IOverride]]))
(defrecord Person [first-name last-name])
(def data [
#?(:clj (list 1 2 3 4 [:a :b :c :d] 5 6 7M 8N 9)
... | null | https://raw.githubusercontent.com/brandonbloom/fipp/3e29a69cd7b93310441efa1de66c98459384ee9c/test/fipp/edn_test.cljc | clojure | XXX CLJS doesn't report addresses, so these tests fail.
CLJS doesn't have futures, so dummy one up.
XXX Is IOverride working correctly for CLJS?
(with-meta [] {:blah true}) | (ns fipp.edn-test
(:require [clojure.test :refer [deftest is are testing]]
[fipp.test-util :refer [clean]]
[fipp.edn :refer [pprint]]
[fipp.ednize :refer [IEdn IOverride]]))
(defrecord Person [first-name last-name])
(def data [
#?(:clj (list 1 2 3 4 [:a :b :c :d] 5 6 7M 8N 9)
... |
352525936c22ef78a64772b715a978c4b3ca3f0d1cf599688fee975ee2edb969 | McCLIM/McCLIM | file-types.lisp | ;;; File types
(in-package :clim-listener)
; This implementation of MIME types is rather silly.
; I'm not sure that it's that important to do a better job
; at the moment.
;; TODO:
;; * Link mime-types with presentation-types
;; * ..then, tie them into presentation-type-of to make it automagic.
;; * Smarter detec... | null | https://raw.githubusercontent.com/McCLIM/McCLIM/7c890f1ac79f0c6f36866c47af89398e2f05b343/Apps/Listener/file-types.lisp | lisp | File types
This implementation of MIME types is rather silly.
I'm not sure that it's that important to do a better job
at the moment.
TODO:
* Link mime-types with presentation-types
* ..then, tie them into presentation-type-of to make it automagic.
* Smarter detection of file types
Note that specific mime t... |
(in-package :clim-listener)
(defclass mime-media-type ()
((media-type-name :reader media-type-name))
(:documentation "MIME top-level media type"))
(defclass text (mime-media-type)
((media-type-name :initform 'text))
(:documentation "Textual information"))
(defclass image (mime-media-type)
((media-type-... |
a5e2566ef19fbb9ad1188ac7315d9cee809e4d2a3199248958aeb61c9fcc21a9 | johnlawrenceaspden/hobby-code | fileio.clj | ;;output hello, append world, read it back
There 's no line - by line reader function in clojure , so we have to make one
;;This is lazy, but I can't see how the file ever gets closed.
(require 'clojure.java.io)
(defn slurp-lines [f] (line-seq (clojure.java.io/reader f)))
;;However, this loop seems to run quite happ... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/fileio.clj | clojure | output hello, append world, read it back
This is lazy, but I can't see how the file ever gets closed.
However, this loop seems to run quite happily, so presumably file handles
are getting garbage collected.
have I always been able to do this?
This is eager, reading the whole file in and closing it, which seems like |
There 's no line - by line reader function in clojure , so we have to make one
(require 'clojure.java.io)
(defn slurp-lines [f] (line-seq (clojure.java.io/reader f)))
(loop []
(println (first (slurp-lines "hello.txt")))
(recur))
(defn doom []
(lazy-cons (slurp-lines "hello.txt")) (doom))
(take 10000 (map fir... |
9625e4579070cb3cea690849b2d6f1f06cb79d037d8f489c6a2a5a0fc0e51d4a | Apress/haskell-quick-syntax-reference | ch17.hs | import qualified Data.ByteString.Lazy as BL
import Data.Binary.Get
import Data.Word
deserialiseHeader :: Get (Word32, Word32, Word32)
deserialiseHeader = do
alen <- getWord32be
plen <- getWord32be
chksum <- getWord32be
return (alen, plen, chksum)
main :: IO ()
main = do
input <- BL.getContents
print $ run... | null | https://raw.githubusercontent.com/Apress/haskell-quick-syntax-reference/8bcb2773532de752d6297a91a3aaf49fd92ed03b/ch17.hs | haskell | import qualified Data.ByteString.Lazy as BL
import Data.Binary.Get
import Data.Word
deserialiseHeader :: Get (Word32, Word32, Word32)
deserialiseHeader = do
alen <- getWord32be
plen <- getWord32be
chksum <- getWord32be
return (alen, plen, chksum)
main :: IO ()
main = do
input <- BL.getContents
print $ run... | |
3b91576b1392f7f357ff7aaf7fafd9c6ac00479917daaa2ccccd70bc32b5733d | ocaml-ppx/ocamlformat | Params.mli | (**************************************************************************)
(* *)
(* OCamlFormat *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-ppx/ocamlformat/95ee0a16f2d2d7d57f4df1a1c2a9410f4c0e637a/lib/Params.mli | ocaml | ************************************************************************
OCamlFormat
... | Copyright ( c ) Facebook , Inc. and its affiliates .
This source code is licensed under the MIT license found in
open Extended_ast
val parens_if : bool -> Conf.t -> ?disambiguate:bool -> Fmt.t -> Fmt.t
val parens : Conf.t -> ?disambiguate:bool -> Fmt.t -> Fmt.t
module Exp : si... |
e24512db8eb24d60f641a5a4a4b80c7aa65dc453ddf1503aa77e3cd6b75a8f13 | rigidus/rigidus.ru | test.lisp | ;;; To see how this file was used, visit: -onwards/why-is-a-raised-to-zero-one-64966392efbe
;;;
;;; See bottom of file for run examples.
;;;
;;; The code was written to generate images for the blog, not for
;;; performance or maintenance.
To load , download skippy
To load the library in your CL implementation :
... | null | https://raw.githubusercontent.com/rigidus/rigidus.ru/16612a9b2c1e448a93c8f61e0f95c267eeeaf014/org/prj/test.lisp | lisp | To see how this file was used, visit: -onwards/why-is-a-raised-to-zero-one-64966392efbe
See bottom of file for run examples.
The code was written to generate images for the blog, not for
performance or maintenance.
(let ((asdf:*central-registry* '(#p"/path/to/library/skippy/")))
(asdf:load-system 'skippy))
... |
To load , download skippy
To load the library in your CL implementation :
(defpackage #:loggy
(:use #:cl #:skippy))
(in-package #:loggy)
(use-package '#:skippy)
(defun example1 ()
(let* ((height 100)
(width 100)
(data-stream (make-data-stream :height height
... |
3dad3949c76c554790fed9154a7e0524e48700ce5f4556ae42ac98d61a76e511 | openmusic-project/openmusic | array.lisp | ;=========================================================================
OpenMusic : Visual Programming Language for Music Composition
;
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
;
This file is part of the OpenMusic environment sources
;
OpenMusic is free software : you can redist... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/4159c467288e5b9e24d87588394bca9acbfb49d2/OPENMUSIC/code/projects/basicproject/classes/array.lisp | lisp | =========================================================================
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
=================... | OpenMusic : Visual Programming Language for Music Composition
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
This file is part of the OpenMusic environment sources
OpenMusic is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public License ... |
533f11eb06c2f4b6257c3f63dc1da163610d44c483780d7bad3c9f8aacf7a154 | tweag/lagoon | Logging.hs | Copyright 2020 Pfizer Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
-- -2.0
-- Unless required by applicable law or agreed to in writing, software
distributed under th... | null | https://raw.githubusercontent.com/tweag/lagoon/2ef0440db810f4f45dbed160b369daf41d92bfa4/server/src/Lagoon/Server/Logging.hs | haskell | 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 permiss... | Copyright 2020 Pfizer Inc.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
# OPTIONS_GHC -fno - warn - orphans #
module Lagoon.Server.Logging (logging) where
import Data.ByteString.Builder (Builder)
import Data.CaseInse... |
1f64b678c8a711c49d3a59b2a0d187e062a38b37ed67e95925ff9d76dbd5b2f3 | fetburner/Coq2SML | metasyntax.mli | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/fetburner/Coq2SML/322d613619edbb62edafa999bff24b1993f37612/coq-8.4pl4/toplevel/metasyntax.mli | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
* Adding a tactic notation in the en... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2014
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open Util
open Names
open Lib... |
dfbd9fc2593f1d13adfb5373d37f26c502d8f081e895f666c90156ed55e44de6 | stevejenkins/UBNT-EdgeRouter-Example-Configs | config.boot.erl | /* -EdgeRouter-Example-Configs */
firewall {
all-ping enable
broadcast-ping disable
ipv6-name WANv6_IN {
default-action drop
description "WAN inbound traffic forwarded to LAN"
rule 10 {
action accept
description "Allow established/related"
state {
... | null | https://raw.githubusercontent.com/stevejenkins/UBNT-EdgeRouter-Example-Configs/2eb96e7e618db69ff0481833f57044ac3060d99a/Google-Fiber/config.boot.erl | erlang | /* -EdgeRouter-Example-Configs */
firewall {
all-ping enable
broadcast-ping disable
ipv6-name WANv6_IN {
default-action drop
description "WAN inbound traffic forwarded to LAN"
rule 10 {
action accept
description "Allow established/related"
state {
... | |
47217993a1c4a725419bb23d72c4c59fd24d2a8cec66916246b843ad65777d8e | aeternity/enoise | enoise_crypto_tests.erl | %%%-------------------------------------------------------------------
( C ) 2018 , Aeternity Anstalt
%%%-------------------------------------------------------------------
-module(enoise_crypto_tests).
-include_lib("eunit/include/eunit.hrl").
curve25519_test() ->
KeyPair1 = enoise_keypair:new(dh25519),
K... | null | https://raw.githubusercontent.com/aeternity/enoise/11ca32c72f1f9ee1054ce5882d3a385b94a8d4a7/test/enoise_crypto_tests.erl | erlang | -------------------------------------------------------------------
-------------------------------------------------------------------
Sanity check
blake2s_test() ->
#{ input := In, output := Out } = test_utils:blake2s_data(), | ( C ) 2018 , Aeternity Anstalt
-module(enoise_crypto_tests).
-include_lib("eunit/include/eunit.hrl").
curve25519_test() ->
KeyPair1 = enoise_keypair:new(dh25519),
KeyPair2 = enoise_keypair:new(dh25519),
SharedA = enoise_crypto:dh(dh25519, KeyPair1, KeyPair2),
SharedB = enoise_crypto:dh(dh25519, K... |
c64b328b0b53ed8baeec143485408174dbeb2ed7c7a7091b3b1fb1d9f544bbbc | Andreshk/FunctionalProgramming2018 | 20181213-week11.hs | -- iei
kol :: [Int]
kol = 1:2:2:gen 1 [2]
where gen x (1:q) = x:gen (3-x) (q++[x])
gen x (2:q) = x:x:gen (3-x) (q++[x,x])
countGroups :: [Int] -> [Int]
countGroups (x:y:xs)
| x == y = 2 : countGroups xs
| otherwise = 1 : countGroups (y:xs)
брой тактове , размер ,
typedef ( Int , I... | null | https://raw.githubusercontent.com/Andreshk/FunctionalProgramming2018/9ac91beb503c2d06ba3d882b3d38d469ffca3288/20181213-week11.hs | haskell | iei
template<int N>
template<int N>
| kol :: [Int]
kol = 1:2:2:gen 1 [2]
where gen x (1:q) = x:gen (3-x) (q++[x])
gen x (2:q) = x:x:gen (3-x) (q++[x,x])
countGroups :: [Int] -> [Int]
countGroups (x:y:xs)
| x == y = 2 : countGroups xs
| otherwise = 1 : countGroups (y:xs)
брой тактове , размер ,
typedef ( Int , Int , Int... |
5369489208e3a3bdc45f49e2e7cab5e940c9b485af08a529ba7b4968a5146f4c | fortytools/holumbus | PdfToText.hs | # OPTIONS #
-- ------------------------------------------------------------
module Holumbus.Crawler.PdfToText
where
import qualified Control.Exception as CE
import qualified Data.ByteString.Lazy as BS
import System.Directory ( getTemporaryDirectory
, removeFile
)
import System... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/crawl2/src/Holumbus/Crawler/PdfToText.hs | haskell | ------------------------------------------------------------
------------------------------------------------------------
| Converstion of pdf data into plain text. The conversion is done
by calling an external program @pdftotext@ (contained in linux packages @xpdf@).
----------------------------------------------... | # OPTIONS #
module Holumbus.Crawler.PdfToText
where
import qualified Control.Exception as CE
import qualified Data.ByteString.Lazy as BS
import System.Directory ( getTemporaryDirectory
, removeFile
)
import System.FilePath ( (</>) )
import System.Process ... |
d8287a61c7cfc4fbcbe4f2a4c85b2975d30ea59f8ae1643ad25e2f844ebc8aec | larcenists/larceny | 16while1.scm | (bits 16)
(text
(if (while (= al 3)
(seq (pop bx)
(pop ax)
(= bh 2)))
(push dx)
(push cx)))
00000000 EB07 short 0x9
00000002 5B pop bx
00000003 58 pop ax
00000004 80FF02 cmp bh,0x2
00000007 7507 jnz 0x10... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/src/Lib/Sassy/tests/prims16/16while1.scm | scheme | (bits 16)
(text
(if (while (= al 3)
(seq (pop bx)
(pop ax)
(= bh 2)))
(push dx)
(push cx)))
00000000 EB07 short 0x9
00000002 5B pop bx
00000003 58 pop ax
00000004 80FF02 cmp bh,0x2
00000007 7507 jnz 0x10... | |
8111ed3137cdea4d8cf6d354f4492fb7e74a0e04016d67d78cb4f6531e020100 | Decentralized-Pictures/T4L3NT | test_addition_output.ml | let _ =
Tezos_time_measurement_runtime.Default.Time_measurement.duration
("addition", [])
(fun () -> 1 + 3)
| null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/lib_time_measurement/ppx/test/valid/test_addition_output.ml | ocaml | let _ =
Tezos_time_measurement_runtime.Default.Time_measurement.duration
("addition", [])
(fun () -> 1 + 3)
| |
7dc5246d9965464e2030105f8f9346ed4eb0118bee0bd8bb9ef538015552ed3a | martijnbastiaan/doctest-parallel | InterpreterSpec.hs | module InterpreterSpec (main, spec) where
import Prelude ()
import Prelude.Compat
import Test.Hspec
import qualified Test.DocTest.Internal.Interpreter as Interpreter
import Test.DocTest.Internal.Interpreter
(haveInterpreterKey, ghcInfo, withInterpreter)
import Test... | null | https://raw.githubusercontent.com/martijnbastiaan/doctest-parallel/077f07f9262e5d3db5abb07f4e256a3a85973a4d/test/InterpreterSpec.hs | haskell | module InterpreterSpec (main, spec) where
import Prelude ()
import Prelude.Compat
import Test.Hspec
import qualified Test.DocTest.Internal.Interpreter as Interpreter
import Test.DocTest.Internal.Interpreter
(haveInterpreterKey, ghcInfo, withInterpreter)
import Test... | |
0a4ff41980a28a1ac64d8656c718fd834c1e5c1020f40bcd56363b2924ee8d9d | grin-compiler/ghc-grin | Syntax.hs | module Syntax where
import Data.List
------------------------------------------------------------------
-- Abstract syntax -----------------------------------------------
------------------------------------------------------------------
-- info for all primops; the totality of the info in primops.txt(.pp)
data Info... | null | https://raw.githubusercontent.com/grin-compiler/ghc-grin/ebc4dca2e1f5b3581d4b84726730564ce909d786/ghc-primop-gen/genprimopcode/Syntax.hs | haskell | ----------------------------------------------------------------
Abstract syntax -----------------------------------------------
----------------------------------------------------------------
info for all primops; the totality of the info in primops.txt(.pp)
PrimOp name
name in prog text
type
category
descript... | module Syntax where
import Data.List
data Info
defaults , primops
deriving Show
info for one primop
data Entry
vector
vector
deriving Show
is_primop :: Entry -> Bool
is_primop (PrimOpSpec _ _ _ _ _ _) = True
is_primop _ = False
is_primtype :: Entry -> Bool
is_primtype (PrimTypeSpec {}) = True
i... |
3aef1cb82c22947b9f4b8b28c58206c544808d52ebc7291edc7a8648db3c7aaf | dariusf/ppx_debug | debug.ml | [%%generate print_value]
let () = Ppx_debug_runtime.Main.main ~print_value ()
| null | https://raw.githubusercontent.com/dariusf/ppx_debug/4709e74d37672aee3f774e713b188fd986563137/demo/debug/debug.ml | ocaml | [%%generate print_value]
let () = Ppx_debug_runtime.Main.main ~print_value ()
| |
4aebd2ba062ffbbeebff2d387889eeea9eebac0c6350de78d80fda61355b2a43 | Ericson2314/lighthouse | Rabbids.hs | module Scratch(scratchMain) where
import Foreign.C(CString, withCString)
import H.Monad(H, liftIO)
import H.Concurrency
foreign import ccall unsafe "start.h c_print" c_print :: CString -> IO ()
cPrint :: String -> H ()
cPrint str = liftIO $ withCString str c_print
MVar implementation test : multiple threads bloc... | null | https://raw.githubusercontent.com/Ericson2314/lighthouse/210078b846ebd6c43b89b5f0f735362a01a9af02/kernel/Tests/MVar/Rabbids.hs | haskell | the + n is to foil ghc -O | module Scratch(scratchMain) where
import Foreign.C(CString, withCString)
import H.Monad(H, liftIO)
import H.Concurrency
foreign import ccall unsafe "start.h c_print" c_print :: CString -> IO ()
cPrint :: String -> H ()
cPrint str = liftIO $ withCString str c_print
MVar implementation test : multiple threads bloc... |
aab08d18ee4526f7274297345c702c8592ae18bb108fcf2e0aff88fe1792dd5f | flambard/cl-epmd | package.lisp | (defpackage #:epmd-test
(:documentation "Unit tests for the EPMD functions.")
(:use #:cl
#:epmd-protocol
#:epmd-client
#:epmd-server
#:fiveam
#:flexi-streams)
(:shadow #:run-all-tests)
(:export
#:all-tests
#:run-all-tests
))
(in-package :epmd-test)
(def-suite... | null | https://raw.githubusercontent.com/flambard/cl-epmd/9cda99284bcfa8e09c7e3219f3ed1f5cb227a064/test/package.lisp | lisp | (defpackage #:epmd-test
(:documentation "Unit tests for the EPMD functions.")
(:use #:cl
#:epmd-protocol
#:epmd-client
#:epmd-server
#:fiveam
#:flexi-streams)
(:shadow #:run-all-tests)
(:export
#:all-tests
#:run-all-tests
))
(in-package :epmd-test)
(def-suite... | |
fb22968f1f8373dae09fcef307dbeb27a4ad555420df8edc84a49421778b4db9 | clj-pdf/clj-pdf | cell.clj | (ns clj-pdf.section.cell
(:require [clj-pdf.utils :refer [get-color get-alignment]]
[clj-pdf.section :refer [render make-section-or]])
(:import [com.lowagie.text Cell Rectangle]
[com.lowagie.text.pdf PdfPCell PdfPCellEvent PdfPTable PdfContentByte]))
(defn- get-border [borders]
(reduce +
... | null | https://raw.githubusercontent.com/clj-pdf/clj-pdf/76b0e5a4425ca063cb6907ac426dd85f848b6067/src/clj/clj_pdf/section/cell.clj | clojure | (ns clj-pdf.section.cell
(:require [clj-pdf.utils :refer [get-color get-alignment]]
[clj-pdf.section :refer [render make-section-or]])
(:import [com.lowagie.text Cell Rectangle]
[com.lowagie.text.pdf PdfPCell PdfPCellEvent PdfPTable PdfContentByte]))
(defn- get-border [borders]
(reduce +
... | |
df1ecb64d55003da546eb452a3a4b825b3e7e34f381680e1674fc591927b340e | exercism/common-lisp | sieve.lisp | (defpackage :sieve
(:use :cl)
(:export :primes-to)
(:documentation "Generates a list of primes up to a given limit."))
(in-package :sieve)
(defun primes-to (n)
"List primes up to `n' using sieve of Eratosthenes."
)
| null | https://raw.githubusercontent.com/exercism/common-lisp/f3cdf6cf7e607138d1bb4d26c57999d4364af243/exercises/practice/sieve/sieve.lisp | lisp | (defpackage :sieve
(:use :cl)
(:export :primes-to)
(:documentation "Generates a list of primes up to a given limit."))
(in-package :sieve)
(defun primes-to (n)
"List primes up to `n' using sieve of Eratosthenes."
)
| |
7b6170b01aa8eae4be4935ca16561ead6f9dc964e4fcdfa0615b86d4ddf74236 | frenetic-lang/ocaml-openflow | OpenFlow0x04_Core.ml | open Packet
type 'a mask = { m_value : 'a; m_mask : 'a option }
type 'a asyncMask = { m_master : 'a ; m_slave : 'a }
type payload =
| Buffered of int32 * bytes
* [ Buffered ( i d , buf ) ] is a packet buffered on a switch .
| NotBuffered of bytes
type xid = OpenFlow_Header.xid
type int12 = int16
type int24 = i... | null | https://raw.githubusercontent.com/frenetic-lang/ocaml-openflow/289ffb8a692cf32b8413cc58044aae9c151ddd44/lib/OpenFlow0x04_Core.ml | ocaml | OFPTT_ALL
OFPG_ANY | open Packet
type 'a mask = { m_value : 'a; m_mask : 'a option }
type 'a asyncMask = { m_master : 'a ; m_slave : 'a }
type payload =
| Buffered of int32 * bytes
* [ Buffered ( i d , buf ) ] is a packet buffered on a switch .
| NotBuffered of bytes
type xid = OpenFlow_Header.xid
type int12 = int16
type int24 = i... |
1e19dd147de6e80e9f24cd45b7f3ccfdef8ef5637fe95f126855d2d18c0c480a | nuvla/ui | utils.cljs | (ns
sixsq.nuvla.ui.apps.utils
(:require [clojure.string :as str]
[sixsq.nuvla.ui.apps.spec :as spec]
[sixsq.nuvla.ui.utils.general :as utils-general]
[sixsq.nuvla.ui.utils.semantic-ui :as ui]))
(def publish-icon
"check circle outline")
(def un-publish-icon
"times circle o... | null | https://raw.githubusercontent.com/nuvla/ui/c10704eabd339489722fa53bc99f11f21103c070/code/src/cljs/sixsq/nuvla/ui/apps/utils.cljs | clojure | ui forcing path immutability to not loose children | (ns
sixsq.nuvla.ui.apps.utils
(:require [clojure.string :as str]
[sixsq.nuvla.ui.apps.spec :as spec]
[sixsq.nuvla.ui.utils.general :as utils-general]
[sixsq.nuvla.ui.utils.semantic-ui :as ui]))
(def publish-icon
"check circle outline")
(def un-publish-icon
"times circle o... |
00b774544173e0ef93b6d5ca8a114b0392b27717a7709f03c1f27873774e13d2 | static-analysis-engineering/codehawk | jCHCostUtils.ml | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... | null | https://raw.githubusercontent.com/static-analysis-engineering/codehawk/98ced4d5e6d7989575092df232759afc2cb851f6/CodeHawk/CHJ/jchcost/jCHCostUtils.ml | ocaml | chutil
jchlib
jchsys | = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
CodeHawk Java Analyzer
Author :
------------------------------------------------------------------------------
The MIT License ( MIT )
... |
e2458d1ba88a473d94abda09855a8e5d5d52cbd492d533dafd7d7483f4210e40 | bpiel/guildsman | composite_grad.clj | (in-ns 'com.billpiel.guildsman.ops.composite)
(defn grad-desc-opt-clj
"MACRO"
([id alpha target] (grad-desc-opt-clj id {} alpha target))
([id {:keys [scope] :as attrs} alpha target]
(sc/with-push-both-scopes (or scope :gradients)
(sc/assoc-scopes-to-plan
{:macro :grad-desc-opt-clj
:id id
... | null | https://raw.githubusercontent.com/bpiel/guildsman/59c9a7459de19525cfc54112f02127e0777a00ce/src/clj/com/billpiel/guildsman/ops/composite_grad.clj | clojure | (in-ns 'com.billpiel.guildsman.ops.composite)
(defn grad-desc-opt-clj
"MACRO"
([id alpha target] (grad-desc-opt-clj id {} alpha target))
([id {:keys [scope] :as attrs} alpha target]
(sc/with-push-both-scopes (or scope :gradients)
(sc/assoc-scopes-to-plan
{:macro :grad-desc-opt-clj
:id id
... | |
09d5e472520f04c8b6c228e171154bbc77e815604453ac0ae99b48218548377c | cxxxr/lemshot | utilities.lisp | (defpackage :lemshot/utilities
(:use :cl)
(:export :trim-whitespaces
:get-plist-values
:compute-text-size
:lines
:random-case))
(in-package :lemshot/utilities)
(defun trim-whitespaces (string)
(string-trim '(#\newline #\space) string))
(defun get-plist-values (plist k... | null | https://raw.githubusercontent.com/cxxxr/lemshot/94e756456e7b144120b22f83683a3dfd6eca45eb/utilities.lisp | lisp | (defpackage :lemshot/utilities
(:use :cl)
(:export :trim-whitespaces
:get-plist-values
:compute-text-size
:lines
:random-case))
(in-package :lemshot/utilities)
(defun trim-whitespaces (string)
(string-trim '(#\newline #\space) string))
(defun get-plist-values (plist k... | |
fec89a8a12deb736655b153d2f772f4e528366d094c1e1697c5cf7b1c286c56a | xapi-project/xen-api-libs | xmlrpc_client.ml |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... | null | https://raw.githubusercontent.com/xapi-project/xen-api-libs/d603ee2b8456bc2aac99b0a4955f083e22f4f314/http-svr/xmlrpc_client.ml | ocaml | This is for backward compatability
This must be the server pre-dates system.isAlive
seconds
Call the {,un}set_stunnelpid_callback hooks around the remote call |
* Copyright ( C ) Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking described in file LI... |
596bdae8a96adb4d7c2042eaa2bc25865ae4610e7d6d030b15a813818f14c039 | haskell/haskell-ide-engine | Brittany.hs | {-# LANGUAGE OverloadedStrings #-}
-- | Brittany is a tool to format source code.
module Haskell.Ide.Engine.Plugin.Brittany where
import Control.Lens
import Control.Monad.IO.Class
import Control.Monad.Trans.Maybe (MaybeT, runMaybeT)
import Data.Aeson
import Data.Coerce... | null | https://raw.githubusercontent.com/haskell/haskell-ide-engine/d84b84322ccac81bf4963983d55cc4e6e98ad418/src/Haskell/Ide/Engine/Plugin/Brittany.hs | haskell | # LANGUAGE OverloadedStrings #
| Brittany is a tool to format source code.
Formats the given source in either a given Range or the whole Document.
If the provider fails an error is returned that can be displayed to the user.
| Primitive to format text with the given option.
Errors may be presented to the user.
^ ... | module Haskell.Ide.Engine.Plugin.Brittany where
import Control.Lens
import Control.Monad.IO.Class
import Control.Monad.Trans.Maybe (MaybeT, runMaybeT)
import Data.Aeson
import Data.Coerce
import Data.Semigroup
import Data.Text ... |
ec72f39926766c3550eb7d9281d524a0dce7ec9cede2411c4ea7c63748573174 | typelead/eta | TcLambdaCase.hs | # LANGUAGE LambdaCase #
module TcLambdaCase where
import Data.Bits ((.|.))
f1 :: (a -> a) -> (a -> a)
f1 = \case x -> x
f2 :: Num a => a -> a
f2 = \case x -> x + x
f3 :: Int -> (Int, Int)
f3 = (\case y -> (y + y, y * y)) . (.|. 12)
f4 = \case _ -> undefined
| null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/TcLambdaCase.hs | haskell | # LANGUAGE LambdaCase #
module TcLambdaCase where
import Data.Bits ((.|.))
f1 :: (a -> a) -> (a -> a)
f1 = \case x -> x
f2 :: Num a => a -> a
f2 = \case x -> x + x
f3 :: Int -> (Int, Int)
f3 = (\case y -> (y + y, y * y)) . (.|. 12)
f4 = \case _ -> undefined
| |
5a7a4f50fa2dcb5ccb813a184a0c32f4f76f900aad0e441a382a8c4f5948de5a | argp/bap | switch_condition.mli | (** Rewrite the outgoing edge conditions from (indirect jump) switches
so they are in terms of the input variable, and not the target
destination.
@author ejs
*)
* Adds switch conditions to a SSA graph . Takes the information
returned by the VSA CFG recovery analysis as input . Returns a
mo... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/ocaml/switch_condition.mli | ocaml | * Rewrite the outgoing edge conditions from (indirect jump) switches
so they are in terms of the input variable, and not the target
destination.
@author ejs
|
* Adds switch conditions to a SSA graph . Takes the information
returned by the VSA CFG recovery analysis as input . Returns a
modified CFG where as many indirect jumps are rewritten as posible
and a success flag . The success flag is true when all indirect
jumps were rewritten .
return... |
10f1903935bcb23d6e09080707ed67ab821847dbd7c36dfc8b57a481933b1cd9 | pink-gorilla/webly | github.clj | (ns rest.github
(:require
[clojure.pprint :refer [print-table]]
[taoensso.timbre :as timbre :refer [info error]]
[martian.core :as martian]
[modular.rest.martian.github :refer [martian-github]]))
(defn github []
; github token does not expire.
(let [m (martian-github)]
(->> (martian/response-for m... | null | https://raw.githubusercontent.com/pink-gorilla/webly/957785f98a096772439a022417a751a429638274/demo-rest/src/rest/github.clj | clojure | github token does not expire.
| (ns rest.github
(:require
[clojure.pprint :refer [print-table]]
[taoensso.timbre :as timbre :refer [info error]]
[martian.core :as martian]
[modular.rest.martian.github :refer [martian-github]]))
(defn github []
(let [m (martian-github)]
(->> (martian/response-for m :userinfo {})
:body
... |
213208db55ba00ee72c434691eaacd125b352a7712a4225778c0bdce35bced6a | AndreaCrotti/elo | core.cljs | (ns ^:figwheel-hooks byf.core
(:require [accountant.core :as accountant]
[byf.admin.handlers :as admin-handlers]
[byf.config :as config]
[byf.admin.views :as admin-views]
[byf.firebase :as firebase]
[byf.league-detail.handlers :as league-detail-handlers]
... | null | https://raw.githubusercontent.com/AndreaCrotti/elo/98c4b13b2c4e0605015d5d17a8be6cbb78c3f3f6/src/cljs/byf/core.cljs | clojure | (ns ^:figwheel-hooks byf.core
(:require [accountant.core :as accountant]
[byf.admin.handlers :as admin-handlers]
[byf.config :as config]
[byf.admin.views :as admin-views]
[byf.firebase :as firebase]
[byf.league-detail.handlers :as league-detail-handlers]
... | |
fb42fd6ca1cfcb4e4c9832f33603a9ebf35d1ea6543c1523dce98e69768a52b2 | aws-beam/aws-erlang | aws_personalize.erl | %% WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
See -beam/aws-codegen for more details .
@doc Amazon Personalize is a machine learning service that makes it easy
%% to add individualized recommendations to customers.
-module(aws_personalize).
-export([create_batch_inference_job/2,
create_batch_inference_jo... | null | https://raw.githubusercontent.com/aws-beam/aws-erlang/699287cee7dfc9dc8c08ced5f090dcc192c9cba8/src/aws_personalize.erl | erlang | WARNING: DO NOT EDIT, AUTO-GENERATED CODE!
to add individualized recommendations to customers.
====================================================================
API
====================================================================
@doc Creates a batch inference job.
be in JSON format. For more information, ... | See -beam/aws-codegen for more details .
@doc Amazon Personalize is a machine learning service that makes it easy
-module(aws_personalize).
-export([create_batch_inference_job/2,
create_batch_inference_job/3,
create_batch_segment_job/2,
create_batch_segment_job/3,
create_campai... |
ee7b9fb3958f3c8d1d0fe87122bf36a5c9fd09f49487d88bb50926096e2682bb | konfig-xyz/rust-reason-parser | Types.hs | module Types where
import qualified Data.Map as M
import qualified Data.Set as S
import qualified Data.Text as T
------------------
-- Schema Types
------------------
type TypePair = (T.Text, T.Text)
type Table = (T.Text, [TypePair])
type Schema = [Table]
data Visibility a = Visible a | Hidden
deriving (Eq, Or... | null | https://raw.githubusercontent.com/konfig-xyz/rust-reason-parser/71b7d79bca485e0c67835ec477dbf9760746385f/src/Types.hs | haskell | ----------------
Schema Types
----------------
----------------
Configuration Types
---------------- | module Types where
import qualified Data.Map as M
import qualified Data.Set as S
import qualified Data.Text as T
type TypePair = (T.Text, T.Text)
type Table = (T.Text, [TypePair])
type Schema = [Table]
data Visibility a = Visible a | Hidden
deriving (Eq, Ord)
type Mapping = M.Map T.Text T.Text
type Hidden = ... |
7315fe172f2b9b1f162369c6501e0c9d5dd0a8066a44d1c048964d5f83d2859c | 8c6794b6/hpc-codecov | Main.hs | module Main where
import Lib
main :: IO ()
main = someFunc 42
| null | https://raw.githubusercontent.com/8c6794b6/hpc-codecov/ad4f294cdb29766f828f7df171f7476ae111034b/test/data/project1/app/Main.hs | haskell | module Main where
import Lib
main :: IO ()
main = someFunc 42
| |
ef916d279fa472620bb78679baf3a14e99c31c480da25c2f5879a80eccdb2eb5 | tweag/asterius | Show.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE StandaloneDeriving #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Language.Haskell.GHC.Toolkit.Orphans.Show
(
)
where
import CLabel
import Cmm
import CoAxiom
import CostCentre
import CostCentreState
import Data.IORef
impor... | null | https://raw.githubusercontent.com/tweag/asterius/506fa3b3b79d973db064a3ef1dd6de5d29a3bf78/asterius/src/Language/Haskell/GHC/Toolkit/Orphans/Show.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
module Language.Haskell.GHC.Toolkit.Orphans.Show
(
)
where
import CLabel
import Cmm
import CoAxiom
import CostCentre
import CostCentreState
import Data.IORef
import ForeignCall
import Gh... |
928c3b860431fb22a62fc8b194db34516a01598aacb305ca1f81fbfcdda96dc2 | evrim/core-server | libev.lisp | (in-package :core-ffi)
;; helpers and reimplementations
(define-c-struct-wrapper ev-watcher ())
(defmacro defevfun (name return-type &body body)
`(defcfun ,name ,return-type
(loop :pointer)
,@body))
(defcfun "ev_default_loop_init" :pointer (flags :unsigned-int))
(defcvar "ev_default_loop_ptr" :pointer)
... | null | https://raw.githubusercontent.com/evrim/core-server/200ea8151d2f8d81b593d605b183a9cddae1e82d/src/io/libev/libev.lisp | lisp | helpers and reimplementations
GENERAL FUNS
ev_set_allocator (void *(*cb)(void *ptr, long size))
ev_set_syserr_cb (void (*cb)(const char *msg));
FUNCTIONS CONTROLLING THE EVENT LOOP
+----------------------------------------------------------------------------
+-----------------------------------------------------... | (in-package :core-ffi)
(define-c-struct-wrapper ev-watcher ())
(defmacro defevfun (name return-type &body body)
`(defcfun ,name ,return-type
(loop :pointer)
,@body))
(defcfun "ev_default_loop_init" :pointer (flags :unsigned-int))
(defcvar "ev_default_loop_ptr" :pointer)
(defun ev-default-loop (flags)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.