_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 |
|---|---|---|---|---|---|---|---|---|
b34d3f711472c743586d0464bc1695010b40e74550066b1a290fb0c892cd593e | erlcloud/erlcloud | erlcloud_sns_tests.erl | -*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*-
-module(erlcloud_sns_tests).
-include_lib("eunit/include/eunit.hrl").
% -include("erlcloud.hrl").
-include("erlcloud_aws.hrl").
Unit tests for sns .
These tests work by using meck to mock httpc . There are two classes of test : input an... | null | https://raw.githubusercontent.com/erlcloud/erlcloud/2ffddcd0527414580e9956bea24cebc2953a088b/test/erlcloud_sns_tests.erl | erlang | -include("erlcloud.hrl").
Input tests verify that different function args produce the desired JSON request.
An input test list provides a list of funs and the JSON that is expected to result.
Output tests verify that the http response produces the correct return from the fun.
An output test lists provides a list... | -*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*-
-module(erlcloud_sns_tests).
-include_lib("eunit/include/eunit.hrl").
-include("erlcloud_aws.hrl").
Unit tests for sns .
These tests work by using meck to mock httpc . There are two classes of test : input and output .
-define(_sns_tes... |
9f2cd6545ab9b0ecb496116f93262b823bdd6bef4106bb379834a3e44d2f25d8 | AndrasKovacs/ELTE-func-lang | Template.hs | # LANGUAGE DeriveFunctor #
{-# OPTIONS_GHC -Wincomplete-patterns #-}
import Control.Applicative
import Control.Monad
import Data.Char
State monad
--------------------------------------------------------------------------------
newtype State s a = State {runState :: s -> (a, s)}
deriving Functor
instance Applica... | null | https://raw.githubusercontent.com/AndrasKovacs/ELTE-func-lang/88d41930999d6056bdd7bfaa85761a527cce4113/2019-20-2/vizsga_minta/minta5/Template.hs | haskell | # OPTIONS_GHC -Wincomplete-patterns #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Feladatok
------------------------------------------------------------------------------
-----... | # LANGUAGE DeriveFunctor #
import Control.Applicative
import Control.Monad
import Data.Char
State monad
newtype State s a = State {runState :: s -> (a, s)}
deriving Functor
instance Applicative (State s) where
pure = return
(<*>) = ap
instance Monad (State s) where
return a = State $ \s -> (a, s)
Stat... |
7c05afe7254053199fa25f99538c419225f6d00cf200ca2842947971dfa254a8 | aeternity/aeternity | sc_ws_handler.erl | -module(sc_ws_handler).
%% WS API
-export([init/2]).
-export([websocket_init/1]).
-export([websocket_handle/2]).
-export([websocket_info/2]).
-export([terminate/3]).
-include_lib("aecontract/include/hard_forks.hrl").
-export([time_since_last_dispatch/1]).
-record(handler, {fsm_pid :: pid() | undefined,
... | null | https://raw.githubusercontent.com/aeternity/aeternity/7038703a1ff281f1b6544037e4c7039cc1c5441a/apps/aehttp/src/sc_ws_handler.erl | erlang | WS API
?CATCH_LOG/1 macro
===========================================================================
@doc API to check if session is potentially hanging, waiting for socket close
We use the process dictionary for this. The cowboy_websocket module
maintains an inactivity timer, but this resides in the inner stat... | -module(sc_ws_handler).
-export([init/2]).
-export([websocket_init/1]).
-export([websocket_handle/2]).
-export([websocket_info/2]).
-export([terminate/3]).
-include_lib("aecontract/include/hard_forks.hrl").
-export([time_since_last_dispatch/1]).
-record(handler, {fsm_pid :: pid() | undefined,
... |
2221d7c7ce376f53984e6c62c1277d7709acbd206dbf38d86dee34b80f2555a1 | asivitz/Hickory | Types.hs | # LANGUAGE NamedFieldPuns , DerivingStrategies , , DeriveGeneric #
module Hickory.Text.Types where
import Data.Hashable (Hashable (..))
import GHC.Generics (Generic)
import qualified Data.Text as Text
data XAlign
= AlignRight
| AlignCenter
| AlignLeft
deriving (Show, Eq, Generic)
deriving anyclass Hashabl... | null | https://raw.githubusercontent.com/asivitz/Hickory/359eeff77dd31bb7b12826eef521c871a656ca3e/core/Hickory/Text/Types.hs | haskell | # LANGUAGE NamedFieldPuns , DerivingStrategies , , DeriveGeneric #
module Hickory.Text.Types where
import Data.Hashable (Hashable (..))
import GHC.Generics (Generic)
import qualified Data.Text as Text
data XAlign
= AlignRight
| AlignCenter
| AlignLeft
deriving (Show, Eq, Generic)
deriving anyclass Hashabl... | |
782fb479b73ccb5b6a776806b86dbf4758d4be8cfee432832f69f5ec64738588 | ghcjs/ghcjs | match.hs | -- Pattern synonyms
# LANGUAGE PatternSynonyms #
module Main where
pattern Single x y = [(x,y)]
foo [] = 0
foo [(True, True)] = 1
foo (Single True True) = 2
foo (Single False False) = 3
foo _ = 4
main = mapM_ (print . foo) tests
where
tests = [ [(True, True)]
... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/test/ghc/patsyn/match.hs | haskell | Pattern synonyms |
# LANGUAGE PatternSynonyms #
module Main where
pattern Single x y = [(x,y)]
foo [] = 0
foo [(True, True)] = 1
foo (Single True True) = 2
foo (Single False False) = 3
foo _ = 4
main = mapM_ (print . foo) tests
where
tests = [ [(True, True)]
, []
... |
08eb000fad2aa0910deecb3065c3dd4ad80fc12640fab087a822da0f56379807 | Metaxal/racket-paint | event-listener.rkt | #lang racket
(require "keymap.rkt"
"misc.rkt"
(except-in racket/gui/base keymap%)
search-list-box)
(provide (all-defined-out))
(define (get-mouse-state)
(define-values (pt mods) (get-current-mouse-state))
(list* (send pt get-x) (send pt get-y) mods))
(define (system-info)
(for/list (... | null | https://raw.githubusercontent.com/Metaxal/racket-paint/905c8c0f8048c8d918900ff3692e1e9b904e1fef/event-listener.rkt | racket | Give the focus back to the canvas.
Another tool to map an existing function to a new event
refreshing would be better… | #lang racket
(require "keymap.rkt"
"misc.rkt"
(except-in racket/gui/base keymap%)
search-list-box)
(provide (all-defined-out))
(define (get-mouse-state)
(define-values (pt mods) (get-current-mouse-state))
(list* (send pt get-x) (send pt get-y) mods))
(define (system-info)
(for/list (... |
abd4665190debb63a30b8110a5f477f20b67e81c7e45f8008406c0e08922ae40 | mankyKitty/cautious-sniffle | Types.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
{-# LANGUAGE LambdaCase #-}
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeFam... | null | https://raw.githubusercontent.com/mankyKitty/cautious-sniffle/8916ef6e2d310158a76f8f573841e09ce3a0d7da/lib/Protocol/Webdriver/ClientAPI/Types.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
| Source of the various types and their respective
The types vary in complexity but are provided to try to provide at least a minimal
simple ... | # LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
encoders / decoders for use with the WebDriver API .
level of type safety when dealing with the WebDriver API . Some types are deliberately
module Protocol.Webdriver.ClientA... |
9fbea9ed76c0dfd6de32cd2962b2a1f2c1ffe0f4e870223ccac653c0e2dbb0ed | tnelson/Forge | commands.rkt | #lang racket
(require syntax/parse/define)
(require (except-in forge/sigs test example)
(prefix-in tree: "../../lazy-tree.rkt"))
(provide (all-from-out forge/sigs)
test example
(struct-out test-report))
(struct test-report (name passed?) #:transparent)
(define-syntax-rule (test name args ... | null | https://raw.githubusercontent.com/tnelson/Forge/1687cba0ebdb598c29c51845d43c98a459d0588f/forge/testme/library/commands.rkt | racket | #lang racket
(require syntax/parse/define)
(require (except-in forge/sigs test example)
(prefix-in tree: "../../lazy-tree.rkt"))
(provide (all-from-out forge/sigs)
test example
(struct-out test-report))
(struct test-report (name passed?) #:transparent)
(define-syntax-rule (test name args ... | |
ad6be68536fcfa716243cc78aa7bb8f54dd1d2d34b1652b1da5298258f828687 | m1kal/charbel | alu.clj | (module alu {:parameters [WIDTH 16]} [[cmd 4] [a WIDTH] [b WIDTH] [en 1]]
(cond* result_d0
(= cmd 0) (+ a b)
(= cmd 1) (- a b)
(= cmd 2) (* a b)
(= cmd 3) (mod a b)
(bit-or a b))
(register result_d (width (inc WIDTH) (cond (= en ... | null | https://raw.githubusercontent.com/m1kal/charbel/5f5f615d7c60dcebd88f250bfdc018ff97d672b8/test-resources/alu.clj | clojure | (module alu {:parameters [WIDTH 16]} [[cmd 4] [a WIDTH] [b WIDTH] [en 1]]
(cond* result_d0
(= cmd 0) (+ a b)
(= cmd 1) (- a b)
(= cmd 2) (* a b)
(= cmd 3) (mod a b)
(bit-or a b))
(register result_d (width (inc WIDTH) (cond (= en ... | |
142a35e5e49f4e7a694a7f527958d96e1662c80fc5a0ba76e764586c054d6a65 | waddlaw/haskell-stack-trace-plugin | Main.hs | module Main where
import Data.Maybe (fromJust)
import GHC.Stack
main :: IO ()
main = print f1
f1 :: Int
f1 = f2
f2 :: Int
f2 = f3
-- HsQualTy
f3 :: HasCallStack => Int
f3 = f4 0
-- HsQualTy
f4 :: Show a => a -> Int
f4 n = f5 (show n) 0
HsFunTy
f5 :: String -> Int -> Int
f5 _ _ = head f6
-- HsListTy
f6 :: [Int... | null | https://raw.githubusercontent.com/waddlaw/haskell-stack-trace-plugin/0ccb73efe8b42cf090c986613463a39ec966b9b7/example/Main.hs | haskell | HsQualTy
HsQualTy
HsListTy
HsTupleTy
HsAppTy | module Main where
import Data.Maybe (fromJust)
import GHC.Stack
main :: IO ()
main = print f1
f1 :: Int
f1 = f2
f2 :: Int
f2 = f3
f3 :: HasCallStack => Int
f3 = f4 0
f4 :: Show a => a -> Int
f4 n = f5 (show n) 0
HsFunTy
f5 :: String -> Int -> Int
f5 _ _ = head f6
f6 :: [Int]
f6 = [fst f7]
f7 :: (Int, Int)
f7... |
8f14ee401962f03147315239c53486c3b365c4a91cf2f9956ee0cc26bd4b4ddd | travelping/dike | dike_master.erl | % __ __ _
% / /__________ __ _____ / /___ (_)___ ____ _
/ _ _ / _ _ _ / _ _ ` / | / / _ \/ / _ _ \/ / _ _ \/ _ _ ` /
% / /_/ / / /_/ /| |/ / __/ / /_/ / / / / / /_/ /
% \__/_/ \__,_/ |___/\___/_/ .___/_/_/ /_/\__, /
% /_/ /____/
%
Copyr... | null | https://raw.githubusercontent.com/travelping/dike/2849b9018b6fe5a4fa3f2df48ca9ed99204685ed/src/dike_master.erl | erlang | __ __ _
/ /__________ __ _____ / /___ (_)___ ____ _
/ /_/ / / /_/ /| |/ / __/ / /_/ / / / / / /_/ /
\__/_/ \__,_/ |___/\___/_/ .___/_/_/ /_/\__, /
/_/ /____/
API
single node mode
bahaviour callbacks
internals
this must be do... | / _ _ / _ _ _ / _ _ ` / | / / _ \/ / _ _ \/ / _ _ \/ _ _ ` /
Copyright ( c ) Travelping GmbH < >
-module(dike_master).
-behaviour(paxos_server).
-export([handle_call/3, init/1, init/2, export_state/1]).
-include_lib("../include/dike.hrl").
-export([start_link/1,
join/1,
join/0,
stop/1,
add_group/2,
... |
60ac1d417600b069d2a255ee9ae998646b6005a563b8a4156cda3ae1fc9e9b69 | karamellpelle/grid | Helpers.hs | # LANGUAGE ForeignFunctionInterface #
module OpenGL.Helpers
(
module Linear,
localMatrix,
statevarLocal,
enableLocal,
disableLocal,
setProjModV,
setModelView,
setProjection,
color4,
multMat4,
rotateX,
rotateY,
rotateZ,
scaleXYZ,
module OpenGL.Helpers.GL... | null | https://raw.githubusercontent.com/karamellpelle/grid/56729e63ed6404fd6cfd6d11e73fa358f03c386f/designer/source/OpenGL/Helpers.hs | haskell | todo: only rely on OpenGLRaw. create
localMatrix, localPrimitive
| set 'var' to 'v' in 'ma', else unchanged
| set enabled in 'ma', else unchanged
| set disabled in 'ma', else unchanged
| sets ModelView matrix
| sets Projection matrix
| set current rgba color
| rotating radians around x-axis
| rotating radians... | # LANGUAGE ForeignFunctionInterface #
module OpenGL.Helpers
(
module Linear,
localMatrix,
statevarLocal,
enableLocal,
disableLocal,
setProjModV,
setModelView,
setProjection,
color4,
multMat4,
rotateX,
rotateY,
rotateZ,
scaleXYZ,
module OpenGL.Helpers.GL... |
312d34171dc0a66c766dcae3db8ff3786b64adfed49b6c8152c13f804e3d4ea8 | haskell-game/tiny-games-hs | pong2.0-metapong.hs | {-
metapong.hs
-terminal-game/docs/Terminal-Game.html
-}
# LANGUAGE RecordWildCards #
module Main where
import Terminal.Game
-- import Lib
--------------------------------------------------------------------------------
-- Data types
Game st - an ANSI terminal game with custom state , from Terminal . Game .
-... | null | https://raw.githubusercontent.com/haskell-game/tiny-games-hs/6b0a4da1a46068b4d9c40053d905706fe3e32b64/hackage/pong2/pong2.0-metapong.hs | haskell |
metapong.hs
-terminal-game/docs/Terminal-Game.html
import Lib
------------------------------------------------------------------------------
Data types
The "world" state of a pong game.
A pong game.
------------------------------------------------------------------------------
Setup
---------------------------... |
# LANGUAGE RecordWildCards #
module Main where
import Terminal.Game
Game st - an ANSI terminal game with custom state , from Terminal . Game .
data Pong = Pong {
sQuit :: Bool
,sBallX :: Column
,sBallY :: Row
,sBallVX :: Int
,sBallVY :: Int
}
type PongGame = Game Pong
fps = 30
w = 80
h = ... |
ecc43a630cf5c1bf2684e01b572c7caa96a2293f4a105ef2c7976a9adfe82fb8 | haskell-tls/hs-tls | Record.hs | -- |
Module : Network . TLS.Record
-- License : BSD-style
Maintainer : < >
-- Stability : experimental
-- Portability : unknown
--
The Record Protocol takes messages to be transmitted , fragments the
-- data into manageable blocks, optionally compresses the data, applies
a MAC , encrypts , and ... | null | https://raw.githubusercontent.com/haskell-tls/hs-tls/31e95f40b75b541c9817b6b56c363e74c2f3b57d/core/Network/TLS/Record.hs | haskell | |
License : BSD-style
Stability : experimental
Portability : unknown
data into manageable blocks, optionally compresses the data, applies
decrypted, verified, decompressed, reassembled, and then delivered to
higher-level clients.
* Fragment manipulation types
* Engage and disengage from the record laye... | Module : Network . TLS.Record
Maintainer : < >
The Record Protocol takes messages to be transmitted , fragments the
a MAC , encrypts , and transmits the result . Received data is
module Network.TLS.Record
( Record(..)
, Fragment
, fragmentGetBytes
, fragmentPlaintext
, fragmentC... |
43348f8a4199be549c511bcf04c5f0f8a1115f9db0ad5d2ad33182a509c7b3be | xtdb-labs/crux-inspector | inspector_test.clj | (ns crux.inspector-test
(:require [crux.inspector.query-plan]
[crux.io :as cio]
[crux.api :as api]
[clojure.test :as t]
[crux.tx :as tx])
(:import java.util.UUID
[crux.api Crux ICruxAPI]
[java.util ArrayList List]))
(def ^:dynamic ^ICruxAPI *api... | null | https://raw.githubusercontent.com/xtdb-labs/crux-inspector/ee2905b90437795cf926e6559b952a0c4594dc63/test/crux/inspector_test.clj | clojure | (ns crux.inspector-test
(:require [crux.inspector.query-plan]
[crux.io :as cio]
[crux.api :as api]
[clojure.test :as t]
[crux.tx :as tx])
(:import java.util.UUID
[crux.api Crux ICruxAPI]
[java.util ArrayList List]))
(def ^:dynamic ^ICruxAPI *api... | |
423d92214d001dab0c376c3c072b76b304c8d96fd54965d5f1d0feed2dc58fe4 | zhugecaomao/AutoLISP | 116550_ttr4.lsp | ;;去除表中指定索引处的表项
(defun cutnum_lst (oldlst num / k templst)
(setq k 0
templst '()
)
(foreach n oldlst
(if (/= k num)
(setq templst (cons n templst)
k (1+ k)
)
)
(setq k (1+ k))
)
(setq newlst (reverse templst))
)
;;去除表中指定项
(defun drop (lst item)
(append (reverse (cdr (member ... | null | https://raw.githubusercontent.com/zhugecaomao/AutoLISP/3e97f911068124f3ea8a1cf6f1d8be9f8227c64b/116550_ttr4.lsp | lisp | 去除表中指定索引处的表项
去除表中指定项
将点表中在多边形内的点组成新表
判断点是否在方框内
测试点是否在多边形内.
清理表中的重复项
)
执行操作
| (defun cutnum_lst (oldlst num / k templst)
(setq k 0
templst '()
)
(foreach n oldlst
(if (/= k num)
(setq templst (cons n templst)
k (1+ k)
)
)
(setq k (1+ k))
)
(setq newlst (reverse templst))
)
(defun drop (lst item)
(append (reverse (cdr (member item (reverse lst))))
... |
225cb9a1b4b149c5a06f0f2d7cd29c72c622c9edad28597fd3ec528c1fb2bfc1 | benzap/eden | ast.cljc | (ns eden.std.ast
(:require
[eden.state-machine.environment :as environment]
[eden.std.token :as token :refer [identifier?]]
[eden.std.exceptions :as exceptions :refer [parser-error *file-path*]]
[eden.std.expression :as std.expression]
[eden.std.impl.expression :as expression]
[eden.std.statement :r... | null | https://raw.githubusercontent.com/benzap/eden/dbfa63dc18dbc5ef18a9b2b16dbb7af0e633f6d0/src/eden/std/ast.cljc | clojure | local function declaration
function declaration
Local Declaration with assignment, local x = value
Local Declaration, local x
Declare global, or general assignment
Lookahead and determine if it's an association chain
Determine if the expression has a chain of function calls, accessors, etc.
Prevent function cal... | (ns eden.std.ast
(:require
[eden.state-machine.environment :as environment]
[eden.std.token :as token :refer [identifier?]]
[eden.std.exceptions :as exceptions :refer [parser-error *file-path*]]
[eden.std.expression :as std.expression]
[eden.std.impl.expression :as expression]
[eden.std.statement :r... |
66aafbd4b312a2f204990e0033b2d5067ce8c9fb4f43c0756e065923aa8c53ae | cbilson/Camp | deploy.clj | (ns camp.tasks.deploy
"Functions for deploying project artifacts."
(:require [clojure.string :as str]))
(defn clojure-name->nuget-name [name]
(-> (str/replace name "/" ".")
(str/replace name "/" ".")))
(defn deploy
"Deploy a nupkg of the project to a nuget repository.
***NOT IMPLEMENTED YET***"
[{:... | null | https://raw.githubusercontent.com/cbilson/Camp/57320423a4a78df32d8edee58a6e3857e03f7af2/src/camp/tasks/deploy.clj | clojure | (ns camp.tasks.deploy
"Functions for deploying project artifacts."
(:require [clojure.string :as str]))
(defn clojure-name->nuget-name [name]
(-> (str/replace name "/" ".")
(str/replace name "/" ".")))
(defn deploy
"Deploy a nupkg of the project to a nuget repository.
***NOT IMPLEMENTED YET***"
[{:... | |
8aff692baea1f454c58c1f1464d9d5132edcb67950d6f48799c2c4a901f35d55 | spawnfest/eep49ers | wxUpdateUIEvent.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 2020 . All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicab... | null | https://raw.githubusercontent.com/spawnfest/eep49ers/d1020fd625a0bbda8ab01caf0e1738eb1cf74886/lib/wx/src/gen/wxUpdateUIEvent.erl | erlang |
%CopyrightBegin%
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific lan... | Copyright Ericsson AB 2008 - 2020 . All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(wxUpdateUIEvent).
-include("wxe.hrl").
-export([canUpdate/1,check/2,enable/2,getChecked/1,getEnabled/1,getMo... |
a6f961fffe8ed229ac28c7847423a793d939edc4ca9b35ea0d38cf2f35c9c3d2 | s3team/uroboros | trace_profiling.ml |
This instrumentation plugin is for 32 - bit binary .
It records the instruction addresses of an execution trace .
The purpose is to record the execution trace and de - bloat
the code for just that execution .
This instrumentation plugin is for 32-bit binary.
It records the instruction addre... | null | https://raw.githubusercontent.com/s3team/uroboros/cdb379a4678ba912bde5d53f7302ad9409abee71/src/plugins/trace_profiling.ml | ocaml | print_endline "done"; |
This instrumentation plugin is for 32 - bit binary .
It records the instruction addresses of an execution trace .
The purpose is to record the execution trace and de - bloat
the code for just that execution .
This instrumentation plugin is for 32-bit binary.
It records the instruction addre... |
611e78e6060a56afa63aa85d0e3b59a1e4b4e5dc227209a03e68e47f4129a9ee | brendanhay/gogol | Delete.hs | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
{-# LANGUAGE St... | null | https://raw.githubusercontent.com/brendanhay/gogol/fffd4d98a1996d0ffd4cf64545c5e8af9c976cda/lib/services/gogol-mirror/gen/Gogol/Mirror/Subscriptions/Delete.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Deletes a subscription.
* Resource
** Constructing a Request
'MirrorSubscriptionsDelete' request conforms to.
| Deletes a subscription.
| The ID of the subscription.
| Creates a value of 'MirrorSubscriptionsDelete' with th... | # LANGUAGE DataKinds #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PatternSynonyms #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators... |
1daff12baa0df9617665ded5db68e8c5b9413be73bc451e22c736e9ae0b49d48 | fulcrologic/fulcro-rad-kvstore | server.clj | (ns com.example.components.server
(:require
[org.httpkit.server :refer [run-server]]
[mount.core :as mount :refer [defstate]]
[taoensso.timbre :as log]
[com.example.components.config :refer [config]]
[com.example.components.ring-middleware :refer [middleware]]))
(defstate http-server
:s... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-rad-kvstore/366300dc7903261b607a632b36473e21c836752c/src/demo-project/com/example/components/server.clj | clojure | (ns com.example.components.server
(:require
[org.httpkit.server :refer [run-server]]
[mount.core :as mount :refer [defstate]]
[taoensso.timbre :as log]
[com.example.components.config :refer [config]]
[com.example.components.ring-middleware :refer [middleware]]))
(defstate http-server
:s... | |
740c5cf2da03fec175fa4b5e96696476cabee6105d2d088b62eb2b5feb2fef42 | brendanhay/terrafomo | RabbitMQ.hs | -- This module is auto-generated.
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - dodgy - exports #
-- |
Module : . RabbitMQ
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
-- Stability : auto-generat... | null | https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-rabbitmq/gen/Terrafomo/RabbitMQ.hs | haskell | This module is auto-generated.
|
Stability : auto-generated
* Provider
* Types
* Resources
* Settings |
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - dodgy - exports #
Module : . RabbitMQ
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Maintainer : < brendan.g.hay+ >
Portability : non - portable ( GHC extensions )
module Terrafomo.R... |
c97ce871663eba9b2767c16bea8d8047bc24d50e1948a2199dede4a1066cbf69 | dwayne/eopl3 | parser.rkt | #lang eopl
;; Program ::= Expression
;;
;; Expression ::= Number
;;
;; ::= Identifier
;;
;; ::= -(Expression, Expression)
;;
;; ::= zero?(Expression)
;;
;; ::= if Expression then Expression else Expression
;;
;; ::= let Identifier = Expression in Expression
;;
... | null | https://raw.githubusercontent.com/dwayne/eopl3/9d5fdb2a8dafac3bc48852d49cda8b83e7a825cf/solutions/04-ch4/interpreters/racket/MUTABLE-PAIRS-4.29/parser.rkt | racket | Program ::= Expression
Expression ::= Number
::= Identifier
::= -(Expression, Expression)
::= zero?(Expression)
::= if Expression then Expression else Expression
::= let Identifier = Expression in Expression
::= proc (Identifier) Expres... | #lang eopl
: : Expression
(provide
AST
program
a-program
expression expression?
const-exp
var-exp
diff-exp
zero?-exp
if-exp
let-exp
proc-exp
letrec-exp
call-exp
begin-exp
assign-exp
newpair-exp
left-exp
right-exp
setleft-exp
setright-exp
newarray-exp
arrayref-exp
arr... |
eef049774618fcc13359524dc73f8d26fc6eeebc247714692955a087aa4074db | fossas/fossa-cli | PackageResolvedSpec.hs | module Swift.PackageResolvedSpec (
spec,
) where
import Data.Aeson (decodeFileStrict')
import Strategy.Swift.PackageResolved (
SwiftPackageResolvedFile (..),
SwiftResolvedPackage (..),
)
import Test.Hspec (Spec, describe, it, shouldBe)
expectedV1ResolvedContent :: SwiftPackageResolvedFile
expectedV1ResolvedCon... | null | https://raw.githubusercontent.com/fossas/fossa-cli/929f3eb576c317b716cf5fcfe7feda7384904dce/test/Swift/PackageResolvedSpec.hs | haskell | module Swift.PackageResolvedSpec (
spec,
) where
import Data.Aeson (decodeFileStrict')
import Strategy.Swift.PackageResolved (
SwiftPackageResolvedFile (..),
SwiftResolvedPackage (..),
)
import Test.Hspec (Spec, describe, it, shouldBe)
expectedV1ResolvedContent :: SwiftPackageResolvedFile
expectedV1ResolvedCon... | |
c0eeb85a38675df3ab93e2912a16f15de7f941503258e83033587202a70ff632 | racket/sgl | bitmap.rkt |
(module bitmap mzscheme
(require mred
mzlib/class
sgl/gl-vectors
sgl
sgl/gl
mzlib/kw)
(provide bitmap->gl-list)
(define (argb->rgba argb)
(let* ((length (bytes-length argb))
(rgba (make-gl-ubyte-vector length)))
(let loop ((i 0))
... | null | https://raw.githubusercontent.com/racket/sgl/7999abdf79058cc709da0e49dee4ec0569249085/bitmap.rkt | racket |
(module bitmap mzscheme
(require mred
mzlib/class
sgl/gl-vectors
sgl
sgl/gl
mzlib/kw)
(provide bitmap->gl-list)
(define (argb->rgba argb)
(let* ((length (bytes-length argb))
(rgba (make-gl-ubyte-vector length)))
(let loop ((i 0))
... | |
ce1e31c461aaf02cf45e3ea59afc6e3c8697f3cf42f409faf85d361bd4039714 | expipiplus1/vulkan | VK_INTEL_performance_query.hs | {-# language CPP #-}
-- | = Name
--
-- VK_INTEL_performance_query - device extension
--
-- == VK_INTEL_performance_query
--
-- [__Name String__]
-- @VK_INTEL_performance_query@
--
-- [__Extension Type__]
-- Device extension
--
-- [__Registered Extension Number__]
211
--
-- [__Revision__]
2
--
-- [__... | null | https://raw.githubusercontent.com/expipiplus1/vulkan/ebc0dde0bcd9cf251f18538de6524eb4f2ab3e9d/src/Vulkan/Extensions/VK_INTEL_performance_query.hs | haskell | # language CPP #
| = Name
VK_INTEL_performance_query - device extension
== VK_INTEL_performance_query
[__Name String__]
@VK_INTEL_performance_query@
[__Extension Type__]
Device extension
[__Registered Extension Number__]
[__Revision__]
[__Extension and Version Dependencies__]
[__Special Use_... | 211
2
- Requires support for Vulkan 1.0
2018 - 05 - 16
- , Intel
- , Intel
- ' Vulkan . Extensions . Handles . PerformanceConfigurationINTEL '
- ' cmdSetPerformanceStreamMarkerINTEL '
- ' queueSetPerformanceConfigurationINTEL '
- ' InitializePerforman... |
2d17a57780e3e207153c66b9882b2635d7243d8c2da46126b77dd39e8b1b1aaf | wdebeaum/step | professional.lisp | ;;;;
;;;; W::PROFESSIONAL
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::PROFESSIONAL
(SENSES
((meta-data :origin calo :entry-date 20031230 :change-date nil :comments html-purchasing-corpus :wn ("professional%1:18:00"))
(LF-PARENT ONT::PERSON-DEFINED-BY-ACTIVITY) ;professional)
)... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/professional.lisp | lisp |
W::PROFESSIONAL
professional) |
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::PROFESSIONAL
(SENSES
((meta-data :origin calo :entry-date 20031230 :change-date nil :comments html-purchasing-corpus :wn ("professional%1:18:00"))
)
)
)
))
|
2bab8ec58435d3821c273ffc61b1f0dd326b3ce864a419a00f85e859a1522b34 | wiseman/cl-zeroconf | uffi-callbacks.lisp | (in-package :uffi)
(export 'defcallback)
#+allegro
(defun callback-definer (name args return-type body)
(let ((internal-name (intern (format nil "%~A" name))))
`(progn
(ff:defun-foreign-callable ,internal-name ,args
,@body)
(defparameter ,name (ff:register-foreign-callable ,internal-name)))))
#+... | null | https://raw.githubusercontent.com/wiseman/cl-zeroconf/f677c6fd6a86ed58d14a5e64859be23cee6d1e67/old/uffi-callbacks.lisp | lisp | (in-package :uffi)
(export 'defcallback)
#+allegro
(defun callback-definer (name args return-type body)
(let ((internal-name (intern (format nil "%~A" name))))
`(progn
(ff:defun-foreign-callable ,internal-name ,args
,@body)
(defparameter ,name (ff:register-foreign-callable ,internal-name)))))
#+... | |
d959d999f0308b51036b556c1c7facfdd12b68e3c7c1add43d1d0a32f44c0760 | roman/Haskell-etc | Plain.hs | {-# LANGUAGE NamedFieldPuns #-}
# LANGUAGE NoImplicitPrelude #
module System.Etc.Internal.Resolver.Cli.Plain (PlainConfigSpec, resolvePlainCli, resolvePlainCliPure) where
import RIO
import qualified RIO.HashMap as HashMap
import qualified RIO.Text as Text
import qualified Data.Aeson as JSON
... | null | https://raw.githubusercontent.com/roman/Haskell-etc/5c88575fa5d742aece4669c460e0ae72e039b45e/etc/src/System/Etc/Internal/Resolver/Cli/Plain.hs | haskell | # LANGUAGE NamedFieldPuns #
------------------------------------------------------------------------------
------------------------------------------------------------------------------
^ Name of the program running the CLI
^ returns Configuration Map
^ returns Configuration Map | # LANGUAGE NoImplicitPrelude #
module System.Etc.Internal.Resolver.Cli.Plain (PlainConfigSpec, resolvePlainCli, resolvePlainCliPure) where
import RIO
import qualified RIO.HashMap as HashMap
import qualified RIO.Text as Text
import qualified Data.Aeson as JSON
import qualified Options.Applicativ... |
1aedbe2da64048e0504f6bd52af32c79e01f5aba3be56c07c7aebefb8e17ef0f | mattjbray/ocaml-decoders | basic.ml | * { 2 Yojson implementation }
open Decoders
module Json_decodeable : Decode.Decodeable with type value = Yojson.Basic.t =
struct
type value = Yojson.Basic.t
let pp fmt json =
Format.fprintf fmt "@[%s@]" (Yojson.Basic.pretty_to_string json)
let of_string : string -> (value, string) result =
fun string ... | null | https://raw.githubusercontent.com/mattjbray/ocaml-decoders/00d930a516805f1bb8965fed36971920766dce60/src-yojson/basic.ml | ocaml | * { 2 Yojson implementation }
open Decoders
module Json_decodeable : Decode.Decodeable with type value = Yojson.Basic.t =
struct
type value = Yojson.Basic.t
let pp fmt json =
Format.fprintf fmt "@[%s@]" (Yojson.Basic.pretty_to_string json)
let of_string : string -> (value, string) result =
fun string ... | |
6ad242d09bcfea7c29d3555e43d0e860616f50d09aeed16662d6f856b322a311 | minoki/yurumath | Meaning.hs | # LANGUAGE ScopedTypeVariables #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE TypeOperators #
# LANGUAGE DefaultSignatures #
module Text.YuruMath.TeX.Meaning
(MessageString(..)
,MessageContext(..)
,showMessageStringM
,throwError... | null | https://raw.githubusercontent.com/minoki/yurumath/8529390f351654b3ea3157e2852497d0d09e7601/src/Text/YuruMath/TeX/Meaning.hs | haskell | You can't use a prefix with ...
Show a command name, without a space appended. Used by \show
Show a token, with a space appended if necessary.
?
?
?
?
?
? | # LANGUAGE ScopedTypeVariables #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE TypeOperators #
# LANGUAGE DefaultSignatures #
module Text.YuruMath.TeX.Meaning
(MessageString(..)
,MessageContext(..)
,showMessageStringM
,throwError... |
0286b01afbbfbf348474f737400b7f6ea74bed7de167e0a0559271b1fcf48aa9 | hugoduncan/oldmj | filesystem_test.clj | (ns makejack.api.filesystem-test
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.test :refer [deftest is testing]]
[makejack.api.filesystem :as filesystem]
[makejack.api.path :as path])
(:import [java.nio.file
CopyOption
Fi... | null | https://raw.githubusercontent.com/hugoduncan/oldmj/0a97488be7457baed01d2d9dd0ea6df4383832ab/api/test/makejack/api/filesystem_test.clj | clojure | (ns makejack.api.filesystem-test
(:require [clojure.java.io :as io]
[clojure.string :as str]
[clojure.test :refer [deftest is testing]]
[makejack.api.filesystem :as filesystem]
[makejack.api.path :as path])
(:import [java.nio.file
CopyOption
Fi... | |
687f8a0fa2e584f4310085ce7181cd2f10e69815cb61ed6496af876e33eb63b0 | aphyr/prism | prism_test.clj | (ns com.aphyr.prism-test
(:use clojure.test
com.aphyr.prism))
(deftest slur-test
(let [a (atom [])
dt 10
f (fn [_] (swap! a #(conj % (System/currentTimeMillis))))
g (slur dt f)]
(doseq [x (range 1 10000)] (g 1))
(is (= true (if (> (count @a) 1)
... | null | https://raw.githubusercontent.com/aphyr/prism/9a7a2165d287ab2f929c4a697b0668d7e7126753/test/com/aphyr/prism_test.clj | clojure | (ns com.aphyr.prism-test
(:use clojure.test
com.aphyr.prism))
(deftest slur-test
(let [a (atom [])
dt 10
f (fn [_] (swap! a #(conj % (System/currentTimeMillis))))
g (slur dt f)]
(doseq [x (range 1 10000)] (g 1))
(is (= true (if (> (count @a) 1)
... | |
132d520ded85a792b8b328d59071f5ed1c767555a8937fc1472cf1e3480491c9 | haskell-tools/haskell-tools | InPattern.hs | # LANGUAGE LambdaCase ,
ViewPatterns
#
ViewPatterns
#-}
module InPattern where
* LambdaCase , ViewPatterns *
* LambdaCase , ViewPatterns *
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/test/ExtensionOrganizerTest/LambdaCaseTest/InPattern.hs | haskell | # LANGUAGE LambdaCase ,
ViewPatterns
#
ViewPatterns
#-}
module InPattern where
* LambdaCase , ViewPatterns *
* LambdaCase , ViewPatterns *
| |
1d8bc510170cec1f2008f27112713fb04b1e379ad52ac7fa92282e5651ddd2eb | fakedata-haskell/fakedata | Construction.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TemplateHaskell #
module Faker.Provider.Construction where
import Config
import Control.Monad.IO.Class
import Data.Map.Strict (Map)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Yaml
import Faker
import Faker.Internal
import Fak... | null | https://raw.githubusercontent.com/fakedata-haskell/fakedata/7b0875067386e9bb844c8b985c901c91a58842ff/src/Faker/Provider/Construction.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE TemplateHaskell #
module Faker.Provider.Construction where
import Config
import Control.Monad.IO.Class
import Data.Map.Strict (Map)
import Data.Monoid ((<>))
import Data.Text (Text)
import Data.Vector (Vector)
import Data.Yaml
import Faker
import Faker.Internal
import Faker.Provider.TH
import Language.Hask... |
90a14501fa9b1c803f46d140fd796e4f7894d085ac97c53552c8c9976ede2e94 | facebook/infer | CType_decl.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/4ce24d97ea317ab8fec9e9d13bcb4b997b310e7b/infer/src/clang/CType_decl.mli | ocaml | * WARNING: functions from this module should not be used if full decl is available in AST
* Processes types and record declarations by adding them to the tenv
* Add the predefined types objc_class which is a struct, and Class, which is a pointer to
objc_class. |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
9bf53963386e0b4fc3f973eb3f99fd4ef039c2e75d0f34092dc5b1b689e43394 | TrustInSoft/tis-interpreter | CodeSemantics.mli | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/CodeSemantics.mli | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
a0a05f8a76f7c8a9c6954f0b8e9b15e00c178efc863842a2a7bfcdd04690500c | mstksg/advent-of-code-2018 | DynoMap.hs | module AOC.Util.DynoMap (
DynoMap(..)
, lookupDyno
, lookupDynoWith
) where
import Control.Monad
import Data.Dynamic
import Data.Map (Map)
import Data.Maybe
import qualified Data.Map as M
newtype DynoMap = Dyno { runDyno :: Map String Dynamic }
deriving (S... | null | https://raw.githubusercontent.com/mstksg/advent-of-code-2018/fc76f763ece2db87dc5e30b8540559a539665f17/src/AOC/Util/DynoMap.hs | haskell | | Lookup the value at a given key in a 'Dyno'.
> lookupDyno "hello"
| Like 'lookupDyno', but with a default value to be returned if the key
is not found or has the wrong type. | module AOC.Util.DynoMap (
DynoMap(..)
, lookupDyno
, lookupDynoWith
) where
import Control.Monad
import Data.Dynamic
import Data.Map (Map)
import Data.Maybe
import qualified Data.Map as M
newtype DynoMap = Dyno { runDyno :: Map String Dynamic }
deriving (S... |
e383a73d5b25de738b6e00be502386068c200d62a0e23b74a29da1ed14179420 | jabber-at/ejabberd | ejabberd_redis_sup.erl | %%%-------------------------------------------------------------------
@author < >
Created : 6 Apr 2017 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
%%%
%%% This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as... | null | https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/ejabberd_redis_sup.erl | erlang | -------------------------------------------------------------------
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHA... | @author < >
Created : 6 Apr 2017 by < >
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have received a copy of the GNU General Public License along
wi... |
4f18a6f3f249e9e4fcd17ba4f5821bc39eb1953f301ae9d1bc817115c3c1fa1d | zmaril/callcongressnow | web_test.clj | (ns callcongressnow.web-test
(:require [clojure.test :refer :all]
[callcongressnow.web :refer :all]))
(deftest first-test
(is false "Tests should be written"))
| null | https://raw.githubusercontent.com/zmaril/callcongressnow/c6a9eef9fd02b8141e87f34ff73a128c0d9cdc7f/test/callcongressnow/web_test.clj | clojure | (ns callcongressnow.web-test
(:require [clojure.test :refer :all]
[callcongressnow.web :refer :all]))
(deftest first-test
(is false "Tests should be written"))
| |
f70bd763b71b425ecedc9be62c32077f78541ab4096f0b1de4168cabdce43e8b | den1k/root | views.cljs | (ns examples.nested.views
(:require [xframe.core.alpha :as xf]
[den1k.shortcuts :refer [shortcuts global-shortcuts]]
[root.impl.core :as rc]
[clojure.spec.alpha :as s]
[cljs.js :as cljs]
[cljs.analyzer :as ana]
[goog.functions :as gfns]
... | null | https://raw.githubusercontent.com/den1k/root/1d12a77737f29c183f0c7d394edb5e079a2614ac/dev/examples/nested/views.cljs | clojure | (ent->styles ent)
.mv1 | (ns examples.nested.views
(:require [xframe.core.alpha :as xf]
[den1k.shortcuts :refer [shortcuts global-shortcuts]]
[root.impl.core :as rc]
[clojure.spec.alpha :as s]
[cljs.js :as cljs]
[cljs.analyzer :as ana]
[goog.functions :as gfns]
... |
82188b6a229af8233e0d6a99e08d968e04a6d6d23c67e90afd4e90708c5f2fc2 | xapi-project/xen-api | vbd_store.ml | open Lwt.Infix
let section = Lwt_log.Section.make "Vbd_store"
module Make (Config : sig
val vbd_list_dir : string
val vbd_list_file_name : string
end) =
struct
let vbd_list_dir = Config.vbd_list_dir
let vbd_list_file_name = Config.vbd_list_file_name
let vbd_list_file = vbd_list_dir ^ "/" ^ vbd_list_file_... | null | https://raw.githubusercontent.com/xapi-project/xen-api/f3bdd07bc0dd082d03d3fc6837a669abb217588e/ocaml/nbd/lib/vbd_store.ml | ocaml | In any other case we let the client fail. In this case the user/admin should go and fix the root cause of the issue
In any other case we let the client fail. In this case the user/admin should go and fix the root cause of the issue
Nothing should delete the vbd_list_file, so we do not have to use a
Lwt.catc... | open Lwt.Infix
let section = Lwt_log.Section.make "Vbd_store"
module Make (Config : sig
val vbd_list_dir : string
val vbd_list_file_name : string
end) =
struct
let vbd_list_dir = Config.vbd_list_dir
let vbd_list_file_name = Config.vbd_list_file_name
let vbd_list_file = vbd_list_dir ^ "/" ^ vbd_list_file_... |
ea8bff7446e0070abbd38e9600f86ede5894b6e6d52804a57fa981c534349afa | anmonteiro/gluten | gluten_lwt_unix.mli | ----------------------------------------------------------------------------
* Copyright ( c ) 2019 - 2020
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
... | null | https://raw.githubusercontent.com/anmonteiro/gluten/56fbc168c0e88335315433625b58f54a429b096b/lwt-unix/gluten_lwt_unix.mli | ocaml | For an example, see [examples/lwt_get.ml]. | ----------------------------------------------------------------------------
* Copyright ( c ) 2019 - 2020
*
* All rights reserved .
*
* Redistribution and use in source and binary forms , with or without
* modification , are permitted provided that the following conditions are met :
*
... |
2b9a79965372e2a2b9d922ef322d6dc95a2eb947d28c51731317a355febb81eb | slindley/dependent-haskell | FreeArrow0.hs | {- Free arrow over a bifunctor -}
{- (plain version - no type-level computation) -}
{- An arrow computation is a sequence of effectful steps, each of
which generates an output value, followed by a pure function that
processes the generated values to output a final return value.
An effectful step comprises a pure fun... | null | https://raw.githubusercontent.com/slindley/dependent-haskell/f0ea64b4e50464e8c60c11a82a7f432b0fccf122/Free/FreeArrow0.hs | haskell | Free arrow over a bifunctor
(plain version - no type-level computation)
An arrow computation is a sequence of effectful steps, each of
which generates an output value, followed by a pure function that
processes the generated values to output a final return value.
An effectful step comprises a pure function and an... |
import Prelude hiding (id, (.))
import Control.Category
import Control.Arrow
data Step f (ts :: *) b where
Step :: (ts -> a) -> f a b -> Step f ts b
data AList (f :: * -> * -> *) (ts :: *) (ts' :: *) where
ANil :: AList f ts ()
(:>) :: Step f ts t -> AList f (t , ts) ... |
860fdbac39207ed4b7f072f05e2b37613e183e8e43e40c2300eb32cedb0a621d | HaskellZhangSong/Introduction_to_Haskell | 13.5.hs | import Data.List
import Control.Monad.Writer
import Control.Monad.State
data Exp = Val Int | Var Name | App Op Exp Exp deriving Show
data Op = Add | Sub | Mul | Div deriving (Show, Eq)
type Name = Char
data Prog = Assign Name Exp
| If Exp Prog Prog
| While Exp Prog
| Seqn [Prog]
... | null | https://raw.githubusercontent.com/HaskellZhangSong/Introduction_to_Haskell/0478693817f761c17624b1eebf20b0cad8810993/Chapter13/13.5.hs | haskell | import Data.List
import Control.Monad.Writer
import Control.Monad.State
data Exp = Val Int | Var Name | App Op Exp Exp deriving Show
data Op = Add | Sub | Mul | Div deriving (Show, Eq)
type Name = Char
data Prog = Assign Name Exp
| If Exp Prog Prog
| While Exp Prog
| Seqn [Prog]
... | |
3c00c0e751c2808b4e37fb56143e50ee5ab5dc41b1bcf7dc3a4bfdcb54f5c899 | jhedev/todobackend-haskell | Main.hs | # LANGUAGE OverloadedStrings #
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
import qualified Database.Persist.Sqlite as Sqlite
import Network.Wai.Handler.Warp (run)
import System.Environ... | null | https://raw.githubusercontent.com/jhedev/todobackend-haskell/4b2fb81db7b0ad91646d1d4461a5e25b4b4e38eb/todobackend-yesod/src/Main.hs | haskell | # LANGUAGE QuasiQuotes #
# LANGUAGE TemplateHaskell # | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeFamilies #
# LANGUAGE ViewPatterns #
import qualified Database.Persist.Sqlite as Sqlite
import Network.Wai.Handler.Warp (run)
import System.Environment
import Yesod
import TodoBackend.Model
import ... |
80f3a9728c84aeead6f151639a90345eb7e5ab7eab82b40e68d4428ae2116425 | grzm/awyeah-api | impl.clj | Copyright ( c ) Cognitect , Inc.
;; All rights reserved.
(ns ^:skip-wiki com.grzm.awyeah.client.impl
"Impl, don't call directly."
(:require
[clojure.core.async :as a]
[com.grzm.awyeah.client.protocol :as client.protocol]
[com.grzm.awyeah.client.shared :as shared]
[com.grzm.awyeah.client.validation :a... | null | https://raw.githubusercontent.com/grzm/awyeah-api/5111c627f73955af8d2529f7ae793ca8203cff15/src/com/grzm/awyeah/client/impl.clj | clojure | All rights reserved.
->Client is intended for internal use | Copyright ( c ) Cognitect , Inc.
(ns ^:skip-wiki com.grzm.awyeah.client.impl
"Impl, don't call directly."
(:require
[clojure.core.async :as a]
[com.grzm.awyeah.client.protocol :as client.protocol]
[com.grzm.awyeah.client.shared :as shared]
[com.grzm.awyeah.client.validation :as validation]
[com.gr... |
d757f64daa87c37fc190fb7af26e2c41c86d98942d23c9728aa1088433857a33 | alex-gutev/cl-environments | macrolet.lisp | ;;;; macrolet.lisp
;;;;
Copyright 2021
;;;;
;;;; Permission is hereby granted, free of charge, to any person
;;;; obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
;;;; restriction, including without limitation the rights to use,
;;;; copy,... | null | https://raw.githubusercontent.com/alex-gutev/cl-environments/ca57285e355e9628c72f9e2ba960018898ff4a7d/test/cltl2/macrolet.lisp | lisp | macrolet.lisp
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the f... | Copyright 2021
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
Test that environment information is ... |
78386703ce35fafdcf98a9a07839a966b937037650350e10bfffab8bc9787f33 | dktr0/estuary | CineCer0.hs | {-# LANGUAGE OverloadedStrings #-}
module Estuary.Help.CineCer0.CineCer0 where
import Reflex hiding (Request,Response)
import Reflex.Dom hiding (Request,Response)
import Control.Monad.Fix (MonadFix)
import Estuary.Types.Language
import Estuary.Widgets.Reflex
import Estuary.Widgets.W
import Data.Map.Strict
cineCer0He... | null | https://raw.githubusercontent.com/dktr0/estuary/c08a4790533c983ba236468e0ae197df50f2109f/client/src/Estuary/Help/CineCer0/CineCer0.hs | haskell | # LANGUAGE OverloadedStrings # | module Estuary.Help.CineCer0.CineCer0 where
import Reflex hiding (Request,Response)
import Reflex.Dom hiding (Request,Response)
import Control.Monad.Fix (MonadFix)
import Estuary.Types.Language
import Estuary.Widgets.Reflex
import Estuary.Widgets.W
import Data.Map.Strict
cineCer0Help :: (DomBuilder t m, PostBuild t ... |
05a5963b48273ceb0b1cef3b668329e946be4dd22c7f5e8089d7d7d80c254717 | FreeProving/free-compiler | WithHelpers.hs | -- | This module contains functions for converting mutually recursive
function declarations by splitting them into one or more recursive helper
-- function, whose decreasing argument is not lifted to the @Free@ monad, and
-- a non-recursive main function.
module FreeC.Backend.Coq.Converter.FuncDecl.Rec.WithHelp... | null | https://raw.githubusercontent.com/FreeProving/free-compiler/6931b9ca652a185a92dd824373f092823aea4ea9/src/lib/FreeC/Backend/Coq/Converter/FuncDecl/Rec/WithHelpers.hs | haskell | | This module contains functions for converting mutually recursive
function, whose decreasing argument is not lifted to the @Free@ monad, and
a non-recursive main function.
| Converts recursive function declarations into recursive helper and
non-recursive main functions.
| Like 'convertRecFuncDeclsWithHelpe... | function declarations by splitting them into one or more recursive helper
module FreeC.Backend.Coq.Converter.FuncDecl.Rec.WithHelpers
( convertRecFuncDeclsWithHelpers
, convertRecFuncDeclsWithHelpers'
) where
import Control.Monad
( forM, join, mapAndUnzipM )
import Data.List
( delete,... |
5a82f2989c5cac9f9a2c5885d23c1ae92abe10b95210620b7ec808e496f87099 | metabase/metabase | task_test.clj | (ns ^:mb/once metabase.task-test
(:require
[clojure.test :refer :all]
[clojurewerkz.quartzite.jobs :as jobs]
[clojurewerkz.quartzite.schedule.cron :as cron]
[clojurewerkz.quartzite.scheduler :as qs]
[clojurewerkz.quartzite.triggers :as triggers]
[metabase.task :as task]
[metabase.test :as mt]
... | null | https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/test/metabase/task_test.clj | clojure | every hour | (ns ^:mb/once metabase.task-test
(:require
[clojure.test :refer :all]
[clojurewerkz.quartzite.jobs :as jobs]
[clojurewerkz.quartzite.schedule.cron :as cron]
[clojurewerkz.quartzite.scheduler :as qs]
[clojurewerkz.quartzite.triggers :as triggers]
[metabase.task :as task]
[metabase.test :as mt]
... |
7c4cd8ddb33866228e0e8bc58c05c5b4c11e4405ef2a664e117fb6d7dc6b67dd | Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator | MonadHTTP.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
module Test.MonadHTTP where
import Control.Exception
import Control.Monad
import Control.Monad.Reader
import Control.Monad.Trans.Class
import Data.ByteString.Char8
import qualified Data.ByteString.Lazy.Char8 as L... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator/5d8f5da48273d006dd0e2cdb6d2425fb6b52f0c5/testing/level2/level2-base/src/Test/MonadHTTP.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
module Test.MonadHTTP where
import Control.Exception
import Control.Monad
import Control.Monad.Reader
import Control.Monad.Trans.Class
import Data.ByteString.Char8
import qualified Data.ByteString.Lazy.Char8 as LBS
import Data.Maybe
import Network... |
29ce93ca63ef83d607fcb60334488514b3bbcbba79d64ce008afaffb6819cf62 | hasufell/file-io | Windows.hs | # LANGUAGE CPP #
module System.File.Windows where
import Control.Exception (bracketOnError)
import Data.Bits
import System.IO (IOMode(..), Handle)
import System.OsPath.Windows ( WindowsPath )
import qualified System.Win32 as Win32
import qualified System.Win32.WindowsString.File as WS
import Control.Monad (when, voi... | null | https://raw.githubusercontent.com/hasufell/file-io/9f8210da5c925e639a9b03316c833ecfd0783f54/System/File/Windows.hs | haskell | | Open a file and return the 'Handle'.
| Open an existing file and return the 'Handle'. | # LANGUAGE CPP #
module System.File.Windows where
import Control.Exception (bracketOnError)
import Data.Bits
import System.IO (IOMode(..), Handle)
import System.OsPath.Windows ( WindowsPath )
import qualified System.Win32 as Win32
import qualified System.Win32.WindowsString.File as WS
import Control.Monad (when, voi... |
35a7466d249e8c7c727f47f0a6ccd64e20196fa665871ce18ece9df8cff51fad | Yuras/scanner | Zepto.hs | {-# LANGUAGE OverloadedStrings #-}
module Redis.Zepto
( reply
)
where
import Redis.Reply
import Prelude hiding (error)
import Data.ByteString (ByteString)
import Data.Attoparsec.Zepto (Parser)
import qualified Data.Attoparsec.Zepto as Zepto
import qualified Data.Text.Encoding as Text
import qualified Data.Text.Read ... | null | https://raw.githubusercontent.com/Yuras/scanner/7d655b915f3b7ebec136e38b6fb8ca721d3e9dd1/examples/Redis/Zepto.hs | haskell | # LANGUAGE OverloadedStrings #
# INLINE reply #
# INLINE bulk #
don't inline it to break the circle between reply and multi |
module Redis.Zepto
( reply
)
where
import Redis.Reply
import Prelude hiding (error)
import Data.ByteString (ByteString)
import Data.Attoparsec.Zepto (Parser)
import qualified Data.Attoparsec.Zepto as Zepto
import qualified Data.Text.Encoding as Text
import qualified Data.Text.Read as Text
import Control.Monad
reply... |
a37ba0a54951a8f77af225237c362ab36fc4634a771469a8f39af00bcce42ff4 | ekmett/succinct | rank9Test.hs | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Main (main) where
import Control.Monad
import Succinct.Dictionary.Class
import Succinct.Dictionary.Rank9
import Succinct.Dictionary.RankNaive
import Test.Framework.Providers.HUnit
import Test.Framework.TH
import Test.HUnit hiding (... | null | https://raw.githubusercontent.com/ekmett/succinct/7e884138c2e943f5ca08f56b58b409d08b870ab9/tests/rank9Test.hs | haskell | # LANGUAGE TemplateHaskell #
# OPTIONS_GHC -fno - warn - missing - signatures #
module Main (main) where
import Control.Monad
import Succinct.Dictionary.Class
import Succinct.Dictionary.Rank9
import Succinct.Dictionary.RankNaive
import Test.Framework.Providers.HUnit
import Test.Framework.TH
import Test.HUnit hiding (... | |
a10d0e1c8a4982df63f41257fbaf075913f2edd8dcd97f45f17fe4a5b7188b30 | qnikst/HaskellNet | IMAP.hs | module Network.HaskellNet.IMAP
( connectIMAP, connectIMAPPort, connectStream
-- * IMAP commands
-- ** any state commands
, noop, capability, logout
-- ** not authenticated state commands
, login, authenticate
-- ** autenticated state commands
, select, examine, create, delete, re... | null | https://raw.githubusercontent.com/qnikst/HaskellNet/1a74df9f8a16e0438a082e31ebb9c70bcb3e91df/src/Network/HaskellNet/IMAP.hs | haskell | * IMAP commands
** any state commands
** not authenticated state commands
** autenticated state commands
** selected state commands
* fetch commands
* other types
support old toolchains
suffixed by `s'
--------------------------------------------------------------------
establish connection
------------------... | module Network.HaskellNet.IMAP
( connectIMAP, connectIMAPPort, connectStream
, noop, capability, logout
, login, authenticate
, select, examine, create, delete, rename
, subscribe, unsubscribe
, list, lsub, status, append, appendFull
, check, close, expunge
, search, store, copy
, id... |
c2594ace590ae7444257a76cd5e36b6d1f4dbfe4aee6b97a6f341f7262cb21eb | JunSuzukiJapan/cl-reex | amb-test.lisp | (defpackage amb-test
(:use :cl
:cl-reex
:cl-reex-test.logger
:prove)
(:shadowing-import-from :cl-reex :skip))
(in-package :amb-test)
NOTE : To run this test file , execute ` ( asdf : test - system : cl - reex ) ' in your Lisp .
(plan 1)
;; blah blah blah.
(defparameter logger (make-instance 'logge... | null | https://raw.githubusercontent.com/JunSuzukiJapan/cl-reex/94928c7949c235b41902138d9e4a5654b92d67eb/tests/amb-test.lisp | lisp | blah blah blah. | (defpackage amb-test
(:use :cl
:cl-reex
:cl-reex-test.logger
:prove)
(:shadowing-import-from :cl-reex :skip))
(in-package :amb-test)
NOTE : To run this test file , execute ` ( asdf : test - system : cl - reex ) ' in your Lisp .
(plan 1)
(defparameter logger (make-instance 'logger))
(defparameter ... |
75c2be062fb2e8ffe19da1b0aaa1ae718e12f399a7c7827eacdf0fcbbbf8db04 | ghc/testsuite | BadImport05.hs | {-# LANGUAGE Safe #-}
-- | Import unsafe module Foreign.Unsafe to make sure it fails
module Main where
import System.IO.Unsafe (unsafePerformIO)
f :: Int
f = unsafePerformIO $ putStrLn "What kind of swallow?" >> return 2
main :: IO ()
main = putStrLn $ "X is: " ++ show f
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/safeHaskell/unsafeLibs/BadImport05.hs | haskell | # LANGUAGE Safe #
| Import unsafe module Foreign.Unsafe to make sure it fails | module Main where
import System.IO.Unsafe (unsafePerformIO)
f :: Int
f = unsafePerformIO $ putStrLn "What kind of swallow?" >> return 2
main :: IO ()
main = putStrLn $ "X is: " ++ show f
|
4bef81e95cbc2199c6ffa1ee19f80a19164eda5481229a836ed83d524b0c8c0b | dradtke/Lisp-Text-Editor | gtk.dialog.example.lisp | (in-package :gtk-examples)
(defun test-dialog ()
(let ((window (make-instance 'gtk-window :type :toplevel :title "Testing dialogs"))
(v-box (make-instance 'v-box)))
(g-signal-connect window "destroy" (lambda (w) (declare (ignore w)) (leave-gtk-main)))
(container-add window v-box)
(let ((button (m... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/cl-gtk2/gtk/gtk.dialog.example.lisp | lisp | (in-package :gtk-examples)
(defun test-dialog ()
(let ((window (make-instance 'gtk-window :type :toplevel :title "Testing dialogs"))
(v-box (make-instance 'v-box)))
(g-signal-connect window "destroy" (lambda (w) (declare (ignore w)) (leave-gtk-main)))
(container-add window v-box)
(let ((button (m... | |
4d3a7005749abfd3521ee5de6df66bbcbde7dccf71b94bd9673ca70c1528c149 | mbutterick/pollen | info.rkt | #lang info
210309
;; for unknown reason "mode-indentation.rkt"
started causing CI failures since 210215
consistently on 6.7 , 6.8 , 6.9 , 7.7CS , 7.8CS , 7.9CS
;; I assume it has something to do with the fact that
;; it imports `framework` and `racket/gui`,
OTOH why does it fail in these ?
(define test-omit... | null | https://raw.githubusercontent.com/mbutterick/pollen/a4910a86dc62d1147f3aad94b56cecd6499d7aa6/pollen/private/external/info.rkt | racket | for unknown reason "mode-indentation.rkt"
I assume it has something to do with the fact that
it imports `framework` and `racket/gui`, | #lang info
210309
started causing CI failures since 210215
consistently on 6.7 , 6.8 , 6.9 , 7.7CS , 7.8CS , 7.9CS
OTOH why does it fail in these ?
(define test-omit-paths '("mode-indentation.rkt")) |
fab324d8c818b8657071c51b3d0150c22c80d77f4ee3f909384a2a61982739a7 | GaloisInc/saw-script | Term.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE DerivingStrategies #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ViewPatterns #
{-# LANGUAGE TypeSynonymInstances #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators #
# LANGUAGE DefaultSignatures #
# LANG... | null | https://raw.githubusercontent.com/GaloisInc/saw-script/acbf3031288828e2a3484673a57984b132b84e1d/src/SAWScript/Prover/MRSolver/Term.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE DeriveAnyClass #
--------------------------------------------------------------------
* MR Solver Term Representation
--------------------------------------------------------------------
| A variable used by the MR solver
| A tuple or record... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE DerivingStrategies #
# LANGUAGE LambdaCase #
# LANGUAGE ViewPatterns #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators #
# LANGUAGE DefaultSignatures #
# LANGUAGE StandaloneDeriving #
# LANGUAGE EmptyCase #
# LANGUAGE DeriveGeneric... |
1e9aa45efed21dbd749bb2a5f9e97b43aacbed180a5577d535eb7971536d5e33 | lem-project/lem | js-mode.lisp | (defpackage :lem-js-mode
(:use :cl :lem :lem.language-mode :lem.language-mode-tools)
(:import-from :lem-xml-mode
:xml-calc-indent)
(:export :*js-mode-hook*
:js-mode))
(in-package :lem-js-mode)
#|
link :
|#
(defvar *js-floating-point-literals* "\\b([+-]?[1-9]\\d*(.\\d)?([Ee][+... | null | https://raw.githubusercontent.com/lem-project/lem/389d0631ebda86ed28959814741e447ccc9289b6/modes/js-mode/js-mode.lisp | lisp |
link :
TODO function* yeild*
Indent for ternaries & method chain
Continuing const/let
Block end | (defpackage :lem-js-mode
(:use :cl :lem :lem.language-mode :lem.language-mode-tools)
(:import-from :lem-xml-mode
:xml-calc-indent)
(:export :*js-mode-hook*
:js-mode))
(in-package :lem-js-mode)
(defvar *js-floating-point-literals* "\\b([+-]?[1-9]\\d*(.\\d)?([Ee][+-]?\\d+)?)\\b")
(defvar... |
b3b490f0488754178d7003a4e0d77f339c62b105b8a6866930797ff09a623cf5 | RichiH/git-annex | EnableTor.hs | git - annex command
-
- Copyright 2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Command.EnableTor where
import Command
import qualified Annex
import P2P.Address
impo... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Command/EnableTor.hs | haskell | This runs as root, so avoid making any commits or initializing
git-annex, or doing other things that create root-owned files.
we just want to know if the tor circuit works.
Unless the remotedaemon is already listening on the hidden
service's socket, start a listener. This is only run during the
check, and it refu... | git - annex command
-
- Copyright 2016 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2016 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
# LANGUAGE CPP #
module Command.EnableTor where
import Command
import qualified Annex
import P2P.Address
impo... |
7e3787a7cf9fac37de04db2c207811f0b3237939e5883e5c1c8a51628edff0f1 | zwizwa/rai | doodle.rkt | #lang s-exp rai/stream
(require rai/stream-lib
rai/synth-lib)
(provide (all-defined-out))
;; A simple form of "live coding", not necessarily aimed at
;; performance, but at making it more convenient to perform parameter
adjustments when building a DSP effect or a synthesis module . It
is based on two pr... | null | https://raw.githubusercontent.com/zwizwa/rai/6bcacb7da4172971816027fd88a0209adbd60e30/test/doodle.rkt | racket | A simple form of "live coding", not necessarily aimed at
performance, but at making it more convenient to perform parameter
- Number edits in the source can be linked to live parameter
updates in the running code without recompiling anything.
- Structural changes in the source needs a recompile, but starting
... | #lang s-exp rai/stream
(require rai/stream-lib
rai/synth-lib)
(provide (all-defined-out))
adjustments when building a DSP effect or a synthesis module . It
is based on two priciples :
To make this more convenient ( in Emacs ):
corresponding Emacs code can walk the code in a lambda / params
Emacs... |
318674c06b5a8f0d4a941317c34978f09bef1ac992564f413c28edd0308d3a1b | johnwhitington/ocamli | for.ml | for x = 1 to 5 do print_string "foo\n" done
| null | https://raw.githubusercontent.com/johnwhitington/ocamli/28da5d87478a51583a6cb792bf3a8ee44b990e9f/examples/for.ml | ocaml | for x = 1 to 5 do print_string "foo\n" done
| |
eb1118437786a601d195d7b8b9d5c177c6328b1250de71b8f7f85df2eae2e6e8 | vikram/lisplibraries | stores.lisp |
(in-package :weblocks-demo-popover)
;;; Multiple stores may be defined. The last defined store will be the
default . In the case of weblocks demo static store configuration
;;; isn't used - we dynamically create stores for each session because
;;; we need to sandbox users. We only create static configurations to
;;... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/weblocks-stable/contrib/yarek/examples/weblocks-demo-popover/conf/stores.lisp | lisp | Multiple stores may be defined. The last defined store will be the
isn't used - we dynamically create stores for each session because
we need to sandbox users. We only create static configurations to
load appropriate store code during application startup.
Memory store
Prevalence store...
:database-type :mysql... |
(in-package :weblocks-demo-popover)
default . In the case of weblocks demo static store configuration
(defstore *scratch-store* :memory)
(defstore *prevalence-store* :prevalence
(merge-pathnames (make-pathname :directory '(:relative "data"))
(asdf-system-directory :weblocks-demo-popover)))
CLSQL store
... |
b91b078fc07ed7b7cba3d6d06181d27e6c5547a5f5fec1414c4ac5a60d036e38 | karamaan/karamaan-opaleye | ReexportsTable.hs | module Karamaan.Opaleye.ReexportsTable (
module Karamaan.Opaleye.QueryArr
, module Karamaan.Opaleye.Table
, module Karamaan.Opaleye.TableColspec
, module Karamaan.Opaleye.Wire
) where
import Karamaan.Opaleye.QueryArr (Query)
import Karamaan.Opaleye.Wire (Wire)
import Karamaan.Opaleye.Table (makeTable)
impo... | null | https://raw.githubusercontent.com/karamaan/karamaan-opaleye/2863dc1dba9ea1e810cb0860a9b8de53f50af354/Karamaan/Opaleye/ReexportsTable.hs | haskell | module Karamaan.Opaleye.ReexportsTable (
module Karamaan.Opaleye.QueryArr
, module Karamaan.Opaleye.Table
, module Karamaan.Opaleye.TableColspec
, module Karamaan.Opaleye.Wire
) where
import Karamaan.Opaleye.QueryArr (Query)
import Karamaan.Opaleye.Wire (Wire)
import Karamaan.Opaleye.Table (makeTable)
impo... | |
6ea61c548cff305fe5c62774644075842b576a1d36886cd50d6f4d0daad1f387 | oakes/tile-soup | polyline.cljc | (ns tile-soup.polyline
(:require [clojure.spec.alpha :as s]
[tile-soup.utils :as u]))
(s/def ::points u/comma-str->vector)
(s/def ::attrs (s/keys :req-un [::points]))
(s/def ::polyline (s/keys :req-un [::attrs]))
| null | https://raw.githubusercontent.com/oakes/tile-soup/e2d495523af59322891f667859d39478d118a7c2/src/tile_soup/polyline.cljc | clojure | (ns tile-soup.polyline
(:require [clojure.spec.alpha :as s]
[tile-soup.utils :as u]))
(s/def ::points u/comma-str->vector)
(s/def ::attrs (s/keys :req-un [::points]))
(s/def ::polyline (s/keys :req-un [::attrs]))
| |
0fc65ac7194e5eebb6a686e3a22acb1c0dd3c860d8b9ef36a337d2c7027d051a | alexandroid000/improv | PointStamped.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Geometry_msgs.PointStamped where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBi... | null | https://raw.githubusercontent.com/alexandroid000/improv/ef0f4a6a5f99a9c7ff3d25f50529417aba9f757c/roshask/msgs/Geometry_msgs/Ros/Geometry_msgs/PointStamped.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE DeriveDataTypeable # | # LANGUAGE DeriveGeneric #
# LANGUAGE TemplateHaskell #
module Ros.Geometry_msgs.PointStamped where
import qualified Prelude as P
import Prelude ((.), (+), (*))
import qualified Data.Typeable as T
import Control.Applicative
import Ros.Internal.RosBinary
import Ros.Internal.Msg.MsgInfo
import qualified GHC.Generics as G... |
64d1897d0a3de00f476cda7652b7c85166c1ae182b19f79e80fb05e0309cc80c | quoll/asami | pool_test.cljc | (ns ^{:doc "Tests the Data Pool"
:author "Paula Gearon"}
asami.durable.pool-test
(:require [clojure.test #?(:clj :refer :cljs :refer-macros) [deftest is]]
#?(:clj [clojure.java.io :as io])
[clojure.string :as s]
[asami.durable.common-utils :as common-utils]
[a... | null | https://raw.githubusercontent.com/quoll/asami/db42e4c1f4593ee1e22d5a644af21bb72d539417/test/asami/durable/pool_test.cljc | clojure | the following should not have changed, since the same words were loaded | (ns ^{:doc "Tests the Data Pool"
:author "Paula Gearon"}
asami.durable.pool-test
(:require [clojure.test #?(:clj :refer :cljs :refer-macros) [deftest is]]
#?(:clj [clojure.java.io :as io])
[clojure.string :as s]
[asami.durable.common-utils :as common-utils]
[a... |
574e20f087e35fcecdf220cf3269f91788b4a467c39ca25fe57f7aa892054475 | bobzhang/ocaml-book | test_pa_apply.ml | (* To force it to be inlined. If not it's not well typed. *)
let ( & ) = ( )
let test = fun f g h x -> f & g & h x
| null | https://raw.githubusercontent.com/bobzhang/ocaml-book/09a575b0d1fedfce565ecb9a0ae9cf0df37fdc75/camlp4/examples/test_pa_apply.ml | ocaml | To force it to be inlined. If not it's not well typed. | let ( & ) = ( )
let test = fun f g h x -> f & g & h x
|
f75df833c1323cb037cc5f601768300c1be27f82afb683a0c58719d78c8fa95e | voicerepublic/vr-logorrhoe | shout.clj | (ns vr-logorrhoe.shout
(:require
[vr-logorrhoe
[config :as config]]
[clj-http.client :as client]))
(defn- stream-endpoint []
(str "http://"
(get-in (config/state :venue) [:icecast :public-ip-address])
":"
(get-in (config/state :venue) [:icecast :port])
"/"
(get-in (conf... | null | https://raw.githubusercontent.com/voicerepublic/vr-logorrhoe/e01c4a8599cdbbd25f982acece474669dd7fd6ef/src/vr_logorrhoe/shout.clj | clojure | :content-type "application/ogg"
:ice-genre "Rock"
:ice-private "0" | (ns vr-logorrhoe.shout
(:require
[vr-logorrhoe
[config :as config]]
[clj-http.client :as client]))
(defn- stream-endpoint []
(str "http://"
(get-in (config/state :venue) [:icecast :public-ip-address])
":"
(get-in (config/state :venue) [:icecast :port])
"/"
(get-in (conf... |
2edbd7b89e0dd7d7c357bd5b92433a76b1085b7e5acaddcb6f5f13ca422e13df | mkremins/starfreighter | loans.cljs | (ns starfreighter.cards.loans
(:refer-clojure :exclude [rand rand-int rand-nth shuffle])
(:require [starfreighter.db :as db]
[starfreighter.desc :refer [o r]]
[starfreighter.gen :as gen]
[starfreighter.rand :as rand]
[starfreighter.util :as util]))
TODO
;; * Allow ... | null | https://raw.githubusercontent.com/mkremins/starfreighter/2be40b4aa5f288bb9829a2e1362a7bfc1e7f12dc/src/starfreighter/cards/loans.cljs | clojure | * Allow multiple simultaneous loans (up to one per merchant at a time)
* Provide an option to defer full repayment by paying some now + added interest later
* Track how fed up with you the lender is based on how many repayments you've deferred
* Expand fight with collector into a "real"/systematic fight (like the b... | (ns starfreighter.cards.loans
(:refer-clojure :exclude [rand rand-int rand-nth shuffle])
(:require [starfreighter.db :as db]
[starfreighter.desc :refer [o r]]
[starfreighter.gen :as gen]
[starfreighter.rand :as rand]
[starfreighter.util :as util]))
TODO
* Vary lo... |
2af5d354b110b88d0b5bdb8622895e5abf251040528fd466b3bfc00d9739f33f | nh2/call-haskell-from-anything | Test1.hs | # LANGUAGE ForeignFunctionInterface #
# LANGUAGE TemplateHaskell #
module Test1 where
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
import qualified Data.MessagePack as MSG
import Foreign.C
import FFI.Anything . TH ( deriveCallabl... | null | https://raw.githubusercontent.com/nh2/call-haskell-from-anything/550c25cbe67ba378c7bebf4df3a970ef5bfe7702/test/Test1.hs | haskell | | Example function to be called from Python.
To be translated to:
TODO check who deallocs - it seems to work magically!
foreign export ccall fib_print_export :: CString -> IO CString
fib_print_export :: CString -> IO CString
-- TODO the sole *presence* of this function seems to make the calls in Python slower
fo... | # LANGUAGE ForeignFunctionInterface #
# LANGUAGE TemplateHaskell #
module Test1 where
import Data.ByteString (ByteString)
import qualified Data.ByteString as BS
import qualified Data.ByteString.Lazy as BSL
import qualified Data.MessagePack as MSG
import Foreign.C
import FFI.Anything . TH ( deriveCallabl... |
a632a7192df1a7cbaa678e35d5fb5b13d17ba71e1a828ce0fc3c49dbd024b4c5 | shenxs/about-scheme | Exercise-160- riot.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname |Exercise-160- riot|) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "... | null | https://raw.githubusercontent.com/shenxs/about-scheme/d458776a62cb0bbcbfbb2a044ed18b849f26fd0f/HTDP/Exercise-160-%20riot.rkt | racket | about the language level of this file in a form that our tools can easily process. | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname |Exercise-160- riot|) (read-case-sensitive #t) (teachpacks ((lib "image.rkt" "teachpack" "2htdp") (lib "universe.rkt" "teachpack" "2htdp"))) (htdp-settings #(#t constructor rep... |
17d0db2f3e9100264686d700b66d2be3bf0a6ba7b9c1ee24760a068204978c2e | alura-cursos/clojure-mutabilidade-atomos-e-refs | aula3.clj | (ns hospital.aula3
(:use [clojure pprint])
(:require [hospital.logic :as h.logic]
[hospital.model :as h.model]))
simbolo que qq thread que acessar esse namespace vai ter acesso a ele com o valor padrao guilherme
(def nome "guilherme")
; redefinir o simbolo (refiz o binding)
(def nome 32567)
(let [n... | null | https://raw.githubusercontent.com/alura-cursos/clojure-mutabilidade-atomos-e-refs/18c70bc13862df53377ac607b53b8f210f4239dd/aula3.1/hospital/src/hospital/aula3.clj | clojure | redefinir o simbolo (refiz o binding)
coisa 1
SHADOWING
indo pra swap | (ns hospital.aula3
(:use [clojure pprint])
(:require [hospital.logic :as h.logic]
[hospital.model :as h.model]))
simbolo que qq thread que acessar esse namespace vai ter acesso a ele com o valor padrao guilherme
(def nome "guilherme")
(def nome 32567)
(let [nome "guilherme"]
coisa 2
(println no... |
deec5cb7d1deb1672db9676846e0b301400ac2b6b1995a68512827ff1cb05525 | dgiot/dgiot | rebar.config.erl | -module('rebar.config').
-export([do/2]).
do(Dir, CONFIG) ->
case iolist_to_binary(Dir) of
<<".">> ->
{HasElixir, C1} = deps(CONFIG),
Config = dialyzer(C1),
maybe_dump(Config ++ [{overrides, overrides()}] ++ coveralls() ++ config(HasElixir));
_ ->
CO... | null | https://raw.githubusercontent.com/dgiot/dgiot/b8f6ee7c7b08b57ba8c8dd9a4864b85aca3c3fc3/apps/dgiot/conf/rebar.config.erl | erlang | emqx main project does not require port-compiler
pin at root level for deterministic
test plugins are concatenated to default profile plugins
otherwise rebar3 test profile runs are super slow
alwyas include debug_info
RelType: cloud (full size) | edge (slim size)
vars per release type, cloud or edge
modules is ... | -module('rebar.config').
-export([do/2]).
do(Dir, CONFIG) ->
case iolist_to_binary(Dir) of
<<".">> ->
{HasElixir, C1} = deps(CONFIG),
Config = dialyzer(C1),
maybe_dump(Config ++ [{overrides, overrides()}] ++ coveralls() ++ config(HasElixir));
_ ->
CO... |
f8f0f02a25c7bb57daf9cd75896e0119e73b81cfc90e6005d2a40fb78fd0ef1d | ruedigergad/cli4clj | example.clj | ;;;
Copyright 2015 - 2021
;;;
This software is released under the terms of the Eclipse Public License
( EPL ) 1.0 . You can find a copy of the EPL at :
;;; -1.0.php
;;;
(ns
^{:author "Ruediger Gad",
:doc "This is a simple example for using cli4clj.
The example can be run via \"lein run\... | null | https://raw.githubusercontent.com/ruedigergad/cli4clj/f70755d0231e90b8bb4dae7c71b918af553705f3/src/cli4clj/example.clj | clojure |
-1.0.php
This function is just used for providing an example below.
Simple cli4clj usage example:
In the simplest scenario only the commands have to be defined.
In the following, an example using a simple scenario along with some explanations is provided:
| Commands are stored in a nested map us... | Copyright 2015 - 2021
This software is released under the terms of the Eclipse Public License
( EPL ) 1.0 . You can find a copy of the EPL at :
(ns
^{:author "Ruediger Gad",
:doc "This is a simple example for using cli4clj.
The example can be run via \"lein run\"."}
cli4clj.example
... |
06e34092e130efd28f947e41854aa47f2c627d52d4b0851dfde9fa3e2e427fba | yi-editor/yi | Abella.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
-- Module : Yi.Mode.Abella
-- License : GPL-2
-- Maintainer :
-- Stability : experimental
-- Portability : portable
--
' Mode ... | null | https://raw.githubusercontent.com/yi-editor/yi/58c239e3a77cef8f4f77e94677bd6a295f585f5f/yi-misc-modes/src/Yi/Mode/Abella.hs | haskell | # LANGUAGE DeriveDataTypeable #
# LANGUAGE OverloadedStrings #
# OPTIONS_HADDOCK show-extensions #
|
Module : Yi.Mode.Abella
License : GPL-2
Maintainer :
Stability : experimental
Portability : portable
interactive theorem prover.
| Start Abella in a buffer
| Return Abella's ... | # LANGUAGE GeneralizedNewtypeDeriving #
' Mode 's and utility function for working with the Abella
module Yi.Mode.Abella
( abellaModeEmacs
, abella
, abellaEval
, abellaEvalFromProofPoint
, abellaUndo
, abellaGet
, abellaSend
) where
import Lens.Micro.Platform (use, (%~), (&), (.=), (.~))... |
d85d402f4aabc283e83c09cebc160f86f5d2dc9d1801a1767ccf17e443ef3d52 | janestreet/bonsai | checkbox_style.mli | include module type of Checkbox_style__generated
| null | https://raw.githubusercontent.com/janestreet/bonsai/782fecd000a1f97b143a3f24b76efec96e36a398/web_ui/view/kado/checkbox_style.mli | ocaml | include module type of Checkbox_style__generated
| |
8c238cf62d3c92a2bbbdd51c224302b543bd0e97ec7f9e87f7e2c14658b616fe | erlcloud/erlcloud | erlcloud_securityhub.erl | -module(erlcloud_securityhub).
-include("erlcloud.hrl").
-include("erlcloud_aws.hrl").
%% API
-export([
describe_hub/1,
describe_hub/2
]).
-type securityhub() :: proplist().
-type param_name() :: binary() | string() | atom().
-type param_value() :: binary() | string() | atom() | integer().
-type params() ::... | null | https://raw.githubusercontent.com/erlcloud/erlcloud/6e36f7f4dc91f229cad1e156020d2a985f3d61d3/src/erlcloud_securityhub.erl | erlang | API | -module(erlcloud_securityhub).
-include("erlcloud.hrl").
-include("erlcloud_aws.hrl").
-export([
describe_hub/1,
describe_hub/2
]).
-type securityhub() :: proplist().
-type param_name() :: binary() | string() | atom().
-type param_value() :: binary() | string() | atom() | integer().
-type params() :: [param... |
4fa2f44e0b83ccb65deaa820f94a717098397812f89b786dd217f397af0e6059 | evolutics/haskell-formatter | Output.hs | predecessor = predecessor
{-^ {- inner -} outer -}
successor :: a
successor = successor
| null | https://raw.githubusercontent.com/evolutics/haskell-formatter/3919428e312db62b305de4dd1c84887e6cfa9478/testsuite/resources/source/comments/treats_nested_comments/Output.hs | haskell | ^ {- inner | predecessor = predecessor
successor :: a
successor = successor
|
d0ffa17f92c8f2abb914c4111b2298cc4a617f26eadd46a47330071659d04c9d | ddmcdonald/sparser | statistical-measurements.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER COMMON-LISP) -*-
Copyright ( c ) 2020 - 2021 SIFT LLC . All Rights Reserved
;;;
;;; File: "statistical-measurements"
;;; Module: "grammar/model/sl/score-stats
version : January 2021
started 9/2020 to gather tests and their metrics for reading
articles... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/304bd02d0cf7337ca25c8f1d44b1d7912759460f/Sparser/code/s/grammar/model/sl/score-stats/statistical-measurements.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(SPARSER COMMON-LISP) -*-
File: "statistical-measurements"
Module: "grammar/model/sl/score-stats
especially in the behavioral sciences
range for confidence intervals (also (x,y) for confidence
(described-value )
t or chi-squared
F measures
confidence intervals
r... | Copyright ( c ) 2020 - 2021 SIFT LLC . All Rights Reserved
version : January 2021
started 9/2020 to gather tests and their metrics for reading
articles for the SCORE project and other articles with statistics ,
(in-package :sparser)
(define-category stat-measure :specializes abstract
:binds ... |
098023f0360e2a8d73e7b8de6ec923b058426b6e0e86688c7b8b7329336758cf | waldheinz/bling | Bezier.hs |
module Graphics.Bling.Primitive.Bezier (
*
Patch, mkPatch, tesselateBezier
) where
import Control.Monad (forM_)
import Control.Monad.ST
import qualified Data.Vector.Unboxed as V
import qualified Data.Vector.Unboxed.Mutable as MV
import Graphics.Bling.Math
import Graphics.Bling.Reflection
import Graphics... | null | https://raw.githubusercontent.com/waldheinz/bling/1f338f4b8dbd6a2708cb10787f4a2ac55f66d5a8/src/lib/Graphics/Bling/Primitive/Bezier.hs | haskell | ^ the patch to evaluate
# SCC "onePatch" #
# SCC "tesselateBezier" #
indices
points
normals |
module Graphics.Bling.Primitive.Bezier (
*
Patch, mkPatch, tesselateBezier
) where
import Control.Monad (forM_)
import Control.Monad.ST
import qualified Data.Vector.Unboxed as V
import qualified Data.Vector.Unboxed.Mutable as MV
import Graphics.Bling.Math
import Graphics.Bling.Reflection
import Graphics... |
7e7035a4fec1e9839fb6b445d5a49a93cf2a2141bd0934aafcb5e62989aa73f7 | wdebeaum/step | unwilling.lisp | ;;;;
;;;; w::unwilling
;;;;
(define-words :pos W::adj
:templ CENTRAL-ADJ-TEMPL
:words (
(w::unwilling
(SENSES
((meta-data :origin sense :entry-date 200901027 :change-date nil :comments nil)
(LF-PARENT ONT::unwilling)
(templ adj-action-templ)
(example "he is unwilling to go")
... | null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/unwilling.lisp | lisp |
w::unwilling
|
(define-words :pos W::adj
:templ CENTRAL-ADJ-TEMPL
:words (
(w::unwilling
(SENSES
((meta-data :origin sense :entry-date 200901027 :change-date nil :comments nil)
(LF-PARENT ONT::unwilling)
(templ adj-action-templ)
(example "he is unwilling to go")
)
((meta-data :ori... |
77541ee31ee94db90c65a0f4ca264f6d23f2346e4afa1d013941a0a06a2d5177 | cabol/west | west_dist_cmd_fsm_sup.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2013 , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of ... | null | https://raw.githubusercontent.com/cabol/west/c3c31dff9ad727ce9b82dde6eb690f7b11cd4d24/src/west_dist_cmd_fsm_sup.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2013 , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
@author < >
( C... |
6a6a0607d389ddf9f6314ce1c9b60d5b53657fa58cd781b1e1d47601a40795c0 | bldl/magnolisp | test-literal-1.rkt | #lang magnolisp
(require (only-in racket/base string->number))
(typedef int #:: (foreign))
(typedef CString #:: ([foreign |char const*|]))
(define (atoi s)
#:: (foreign ^(-> CString int))
;; not the same semantics if does not fully parse as a number
(string->number s))
(define (string-identity s)
#:: (expor... | null | https://raw.githubusercontent.com/bldl/magnolisp/191d529486e688e5dda2be677ad8fe3b654e0d4f/tests/test-literal-1.rkt | racket | not the same semantics if does not fully parse as a number | #lang magnolisp
(require (only-in racket/base string->number))
(typedef int #:: (foreign))
(typedef CString #:: ([foreign |char const*|]))
(define (atoi s)
#:: (foreign ^(-> CString int))
(string->number s))
(define (string-identity s)
#:: (export ^(-> CString CString))
s)
(define (main)
#:: (export)
... |
9d96ad627301c5c6385d6315e562b011098a259a4987eabfb82d78ceb0dca8ec | willijar/LENS | network.lisp | ;; main WSN network definition
Copyright ( C ) 2014 Dr.
Author : Dr. < >
;; Keywords:
;;; Copying:
This file is part of Lisp Educational Network Simulator ( LENS )
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published... | null | https://raw.githubusercontent.com/willijar/LENS/646bc4ca5d4add3fa7e0728f14128e96240a9f36/networks/wsn/core/network.lisp | lisp | main WSN network definition
Keywords:
Copying:
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
LENS 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 PARTICUL... | Copyright ( C ) 2014 Dr.
Author : Dr. < >
This file is part of Lisp Educational Network Simulator ( LENS )
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General ... |
99a55546c04105d60b38050f52b24ff42d8dbe3022e74ba5d9cd750640974338 | hibari/cluster-info | cluster_info.erl | %%%----------------------------------------------------------------------
Copyright ( c ) 2009 - 2015 Hibari developers . All rights reserved .
%%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%%% you may not use this file except in compliance with the License.
%%% You may obtain a copy o... | null | https://raw.githubusercontent.com/hibari/cluster-info/93d79cabc7fd323281c0fe8f6a0057b134518d2c/src/cluster_info.erl | erlang | ----------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either expres... | Copyright ( c ) 2009 - 2015 Hibari developers . All rights reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
File :
-module(cluster_info).
-behaviour(application).
-export([start/0, start/2, stop/1]).
... |
f6ce02d04466757995c5e7ac1fae1995976a5da53c515fc18e579a3089e8ae8a | merlin-lang/merlin | Test_TC.ml | open Merlin_FrontEnd
let test_tc input =
let t = Printf.sprintf "./examples/%s/%s.dot" input input in
let p = Printf.sprintf "./examples/%s/%s.mln" input input in
let topo = parse_topo_file t in
let ir = policy_file_to_ir p in
let flows = match ir with
|Some ir -> solve ir topo
| None -> [] in
... | null | https://raw.githubusercontent.com/merlin-lang/merlin/35a88bce024a8b8be858c796f1cd718e4a660529/test/Test_TC.ml | ocaml | TODO: this test will only check that there should be
one tc command for the max.mln example. We need something
more extensible.
(\* These are expected to pass *\) | open Merlin_FrontEnd
let test_tc input =
let t = Printf.sprintf "./examples/%s/%s.dot" input input in
let p = Printf.sprintf "./examples/%s/%s.mln" input input in
let topo = parse_topo_file t in
let ir = policy_file_to_ir p in
let flows = match ir with
|Some ir -> solve ir topo
| None -> [] in
... |
f73d86d561df51d4b6d5cf11c022038bdac16b80a9cc13026acb7dcd4d90c398 | sharplispers/cl-string-match | strings.lisp | ;;; Test the ASCII strings implementation
;; --------------------------------------------------------
;; some tests
;; --------------------------------------------------------
(in-package :cl-string-match-test)
;; --------------------------------------------------------
(define-test test-ub-read-line
(:tag :contr... | null | https://raw.githubusercontent.com/sharplispers/cl-string-match/aa660127ba230b8dda5bf45bb9ac6903cafb402d/t/strings.lisp | lisp | Test the ASCII strings implementation
--------------------------------------------------------
some tests
--------------------------------------------------------
--------------------------------------------------------
--------------------------------------------------------
check if putting the reader into the... |
(in-package :cl-string-match-test)
(define-test test-ub-read-line
(:tag :contrib :ascii-strings)
(with-open-file (in "test.txt"
:direction :input
:element-type 'ascii:ub-char)
(assert-equal 5
(loop :with reader = (ascii:make-ub-line-reader :stream in)
:for i :from 0 :below 10
... |
c6cf7b37adccd53498959802f9be29163a21a3dd012bb571063e7b523c90bcc3 | haskell-repa/repa | Unpacker.hs |
module Data.Repa.Convert.Internal.Unpacker
( Unpacker (..)
, unsafeRunUnpacker)
where
import Data.IORef
import Data.Word
import GHC.Exts
import Prelude hiding (fail)
import qualified Foreign.Ptr as F
------------------------------------------------------------------------------------------... | null | https://raw.githubusercontent.com/haskell-repa/repa/c867025e99fd008f094a5b18ce4dabd29bed00ba/repa-convert/Data/Repa/Convert/Internal/Unpacker.hs | haskell | -------------------------------------------------------------------------------------------------
after the buffer; a predicate to detect a field terminator;
a failure action; and a continuation.
The field terminator is used by variable length encodings where
the length of the encoded data cannot be deter... |
module Data.Repa.Convert.Internal.Unpacker
( Unpacker (..)
, unsafeRunUnpacker)
where
import Data.IORef
import Data.Word
import GHC.Exts
import Prelude hiding (fail)
import qualified Foreign.Ptr as F
data Unpacker a
= Unpacker
| Takes pointers to the first byte in the buffer ; the fi... |
af41ab2e18b429ac466d08f107075b22fe55bffda6b75ff30d37bf4e67cf5163 | softwarelanguageslab/maf | R5RS_scp1_coca-cola-4.scm | ; Changes:
* removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
* swapped branches : 2
* calls to i d fun : 1
(letrec ((foldr (lambda (f base lst)
(letrec ((foldr-aux (lambda (lst)
(if (null? lst)
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_coca-cola-4.scm | scheme | Changes: | * removed : 0
* added : 0
* swaps : 0
* negated predicates : 1
* swapped branches : 2
* calls to i d fun : 1
(letrec ((foldr (lambda (f base lst)
(letrec ((foldr-aux (lambda (lst)
(if (null? lst)
base
... |
3b1f801a3425dc6c1c31cc0db0d99476a8b8e9cd169f761bb8ca04888d631381 | janestreet/ecaml | sync_or_async.mli | open! Core
open! Import0
open! Async_kernel
type ('a, 'b) t =
| Sync : ('a, 'a) t
| Async : ('a, 'a Deferred.t) t
[@@deriving sexp_of]
val return : ('a, 'b) t -> 'a -> 'b
(** See [Background] for the invariants that must be maintained when running an async job
in the background. *)
val protect
: ?allow_in... | null | https://raw.githubusercontent.com/janestreet/ecaml/7c16e5720ee1da04e0757cf185a074debf9088df/src/sync_or_async.mli | ocaml | * See [Background] for the invariants that must be maintained when running an async job
in the background.
* default: false | open! Core
open! Import0
open! Async_kernel
type ('a, 'b) t =
| Sync : ('a, 'a) t
| Async : ('a, 'a Deferred.t) t
[@@deriving sexp_of]
val return : ('a, 'b) t -> 'a -> 'b
val protect
-> Source_code_position.t
-> (_, 'a) t
-> f:(unit -> 'a)
-> finally:(unit -> unit)
-> 'a
|
ced7f9d1794bdbd498815f8bd3b80c12e43a1096a80e636e8ce290025ed13a65 | zwizwa/staapl | double-math.rkt | #lang staapl/pic18 \ -*- forth -*-
provide-all
\ double word math 8 -> 16 bit
: _dup over over ;
: _2drop _drop
: _drop drop drop ;
: _nip >r >r drop drop r> r> ;
: _<< clc 2nd rot<<c! rot<<c ;
: _>> >> 2nd rot>>c! ; \ unsigned
: _2/ 2/ 2nd rot>>c! ; \ signed
: _+ ... | null | https://raw.githubusercontent.com/zwizwa/staapl/e30e6ae6ac45de7141b97ad3cebf9b5a51bcda52/pic18/double-math.rkt | racket |
\ unsigned
\ signed
then
\ defined in execute.f
\ lo hi addr -- | #lang staapl/pic18 \ -*- forth -*-
provide-all
\ double word math 8 -> 16 bit
: _2drop _drop
: _+ \ ( a b c d ) ( )
>r swap>r \ ( a c ) ( b d )
: _-
>r swap>r \ ( a c ) ( b d )
: _invert
WREG comf d=reg
: _not
\ these leave carry flag intact, but n... |
373577f4243992455fa965e69252ce28db17dde917a91fda109a3404dfa19326 | okuoku/nausicaa | hashtables.sps | Copyright ( c ) 2008
;;;
;;;This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Library General Public License as
published by the Free Software Foundation ; either version 2 of the
;;;License, or (at your option) any later version.
;;;
;;;This library... | null | https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/scheme/tests/r6rs/run/hashtables.sps | scheme |
This library is free software; you can redistribute it and/or modify
either version 2 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR ... | Copyright ( c ) 2008
it under the terms of the GNU Library General Public License as
Library General Public License for more details .
You should have received a copy of the GNU Library General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , MA
02110 - 1301 U... |
f81787d27600027e8844a53f2330d24996eda0e7e63ba11e40f68f25de8356c1 | eudoxia0/rock | assets.lisp | (in-package :cl-user)
(defpackage rock-web.assets
(:use :cl :rock))
(in-package :rock-web.assets)
(defenv :rock
:assets ((:jquery :2.1.1)
(:bootstrap :3.2.0)
(:highlight-lisp :0.1))
:bundles ((:js
:assets ((:jquery :2.1.1)
(:bootstrap :3.2.0)
... | null | https://raw.githubusercontent.com/eudoxia0/rock/3223ac31dd3f783ffd978b45d3b8bcc38bf37abc/web/assets.lisp | lisp | (in-package :cl-user)
(defpackage rock-web.assets
(:use :cl :rock))
(in-package :rock-web.assets)
(defenv :rock
:assets ((:jquery :2.1.1)
(:bootstrap :3.2.0)
(:highlight-lisp :0.1))
:bundles ((:js
:assets ((:jquery :2.1.1)
(:bootstrap :3.2.0)
... | |
c5a09f7ab04a682b530d29896f0ec6dae9dec4b5571ad8431134f8f166b082c8 | Eventuria/demonstration-gsd | Settings.hs | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
module Eventuria.GSD.Write.CommandConsumer.API.HealthCheck.Client.Settings where
import Eventuria.Commons.Logger.Core
import Eventuria.Commons.Network.Core
data Settings = Settings {loggerId :: LoggerId , url :: URL} | null | https://raw.githubusercontent.com/Eventuria/demonstration-gsd/5c7692b310086bc172d3fd4e1eaf09ae51ea468f/src/Eventuria/GSD/Write/CommandConsumer/API/HealthCheck/Client/Settings.hs | haskell | # LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
module Eventuria.GSD.Write.CommandConsumer.API.HealthCheck.Client.Settings where
import Eventuria.Commons.Logger.Core
import Eventuria.Commons.Network.Core
data Settings = Settings {loggerId :: LoggerId , url :: URL} | |
d0fdc078414bb0cb383be53429d89b9a81f079a6cef3f4e0bed1de46ac855a4a | mumuki/mulang | ObjectOrientedSpec.hs | {-# LANGUAGE QuasiQuotes, OverloadedStrings #-}
module ObjectOrientedSpec (spec) where
import Test.Hspec
import Language.Mulang.Parsers.JavaScript
import Language.Mulang.Parsers.Java (java)
import Language.Mulang.Ast
import Language.Mulang.Identifier
import ... | null | https://raw.githubusercontent.com/mumuki/mulang/92684f687566b2adafb331eae5b5916e2d90709e/spec/ObjectOrientedSpec.hs | haskell | # LANGUAGE QuasiQuotes, OverloadedStrings # |
module ObjectOrientedSpec (spec) where
import Test.Hspec
import Language.Mulang.Parsers.JavaScript
import Language.Mulang.Parsers.Java (java)
import Language.Mulang.Ast
import Language.Mulang.Identifier
import Language.Mulang.Inspector.ObjectOriented
import ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.