_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 |
|---|---|---|---|---|---|---|---|---|
20f9d13fd981eeb1d620b961dd51e714c16604ea3229768ccb842a669d2e3a5f | koto-bank/lbge | primitives.lisp | (in-package :lbge.render)
(defun assemble-vertex-array (attributes)
(let ((attr-len (length (car attributes))))
(assert (loop
:for a :in attributes
:always (= (length a) attr-len))
nil "All attribute lists must have equal lenght")
(let ((result (make-array (* (length a... | null | https://raw.githubusercontent.com/koto-bank/lbge/6be4b3212ea87288b1ee2a655e9a1bb30a74dd27/src/render/primitives.lisp | lisp | (in-package :lbge.render)
(defun assemble-vertex-array (attributes)
(let ((attr-len (length (car attributes))))
(assert (loop
:for a :in attributes
:always (= (length a) attr-len))
nil "All attribute lists must have equal lenght")
(let ((result (make-array (* (length a... | |
c7ea633d240971b1a498e325e0435f244b981919c67c1e70e039853dfce275ef | phoityne/ghci-dap | Tags.hs | -----------------------------------------------------------------------------
--
GHCi 's : ctags and : commands
--
( c ) The GHC Team 2005 - 2007
--
-----------------------------------------------------------------------------
# OPTIONS_GHC -fno - warn - name - shadowing #
module GHCi.UI.Tags (
createCTagsWithL... | null | https://raw.githubusercontent.com/phoityne/ghci-dap/bcc921b1859df0f64a282a4dc3e2e04f2b57ddf7/app-ghc-8.10/GHCi/UI/Tags.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
---------------------------------------------------------------------------
create tags file for currently loaded modules.
- remove restriction that all modul... | GHCi 's : ctags and : commands
( c ) The GHC Team 2005 - 2007
# OPTIONS_GHC -fno - warn - name - shadowing #
module GHCi.UI.Tags (
createCTagsWithLineNumbersCmd,
createCTagsWithRegExesCmd,
createETagsFileCmd
) where
import Exception
import GHC
import GHCi.UI.Monad
import Outputable
ToDo : figure out whe... |
490fca04a86e67077a2f32b6b6c948a5fdeb3d89f4a195afb6aac680c3b68acc | iamFIREcracker/adventofcode | day17.lisp | (defpackage :aoc/2020/17 #.cl-user::*aoc-use*)
(in-package :aoc/2020/17)
(defun parse-coords (data)
(let* ((width (length (first data)))
(height (length data)))
(loop for y upto height for row in data nconc
(loop for x upto width for c across row
when (eql c #\#) collect (list ... | null | https://raw.githubusercontent.com/iamFIREcracker/adventofcode/c395df5e15657f0b9be6ec555e68dc777b0eb7ab/src/2020/day17.lisp | lisp | (defpackage :aoc/2020/17 #.cl-user::*aoc-use*)
(in-package :aoc/2020/17)
(defun parse-coords (data)
(let* ((width (length (first data)))
(height (length data)))
(loop for y upto height for row in data nconc
(loop for x upto width for c across row
when (eql c #\#) collect (list ... | |
d5b139a0e0bbd9d7344a5da3336cdb993a9d10098848192bd43cd775bbd89af6 | Abbath/Calculator | Messages.hs | # LANGUAGE DataKinds #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE TypeOperators #-}
module Web.Telegram.API.Bot.API.Messages
( -- * Functions
sendMessage
, sendMessageM
, forwardMessage
, forwardMessageM
, uploadPhoto
, uploadPhotoM
, sendPhoto
, sendPhotoM
, uploadAudio
, upl... | null | https://raw.githubusercontent.com/Abbath/Calculator/75985d5a9b4e602bc087462c8046bf2cf692a0e1/telegram-api-0.7.2.0/src/Web/Telegram/API/Bot/API/Messages.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE TypeOperators #
* Functions
* API
* Types
| Telegram Bot API
| Use this method to send text messages. On success, the sent 'Message' is returned.
| See 'sendMessage'
| Use this method to forward messages of any kind. On success, the sent 'Message' is returned.
| See... | # LANGUAGE DataKinds #
module Web.Telegram.API.Bot.API.Messages
sendMessage
, sendMessageM
, forwardMessage
, forwardMessageM
, uploadPhoto
, uploadPhotoM
, sendPhoto
, sendPhotoM
, uploadAudio
, uploadAudioM
, sendAudio
, sendAudioM
, uploadDocument
, uploadDocumentM
, sendDoc... |
5897bf26d2e051ac5413a59b6316d5989490a9e4584a2e2754a15ed198dfb41b | jafingerhut/dolly | project.clj | (defproject jafingerhut/dolly "0.2.0-SNAPSHOT"
:description "Clojure namespace cloning"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[ org.clojure/tools.namespace " 0.2.7 " ]
[rhizome "0.2.1"]]
:eval-in-leiningen t... | null | https://raw.githubusercontent.com/jafingerhut/dolly/6dfe7f3bcd58d81fba7793d214230792b6140ffd/project.clj | clojure | (defproject jafingerhut/dolly "0.2.0-SNAPSHOT"
:description "Clojure namespace cloning"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.5.1"]
[ org.clojure/tools.namespace " 0.2.7 " ]
[rhizome "0.2.1"]]
:eval-in-leiningen t... | |
bea11a04ff1f278e311f305e5318ef9223efefbe458deec3e5cc2ca8e986e8a9 | vinted/kafka-elasticsearch-tool | elasticsearch.clj | (ns source.elasticsearch
(:require [source.elasticsearch.records :as records]
[source.elasticsearch.search-after-with-pit :as pit]))
(defn fetch [opts]
(let [strategy (-> opts :source :strategy)]
(case strategy
:search-after-with-pit (pit/fetch opts)
(records/fetch opts))))
(comment
... | null | https://raw.githubusercontent.com/vinted/kafka-elasticsearch-tool/281de24d51cbd2a7ad78e3c1d13a4619b786210d/src/source/elasticsearch.clj | clojure | (ns source.elasticsearch
(:require [source.elasticsearch.records :as records]
[source.elasticsearch.search-after-with-pit :as pit]))
(defn fetch [opts]
(let [strategy (-> opts :source :strategy)]
(case strategy
:search-after-with-pit (pit/fetch opts)
(records/fetch opts))))
(comment
... | |
f240230de94429e4791a551ff1493ee62254fa833aa017df3bd58f50e27e5025 | runtimeverification/haskell-backend | Null.hs | |
Module : . Attribute . Null
Description : Null attribute parser
Copyright : ( c ) Runtime Verification , 2018 - 2021
License : BSD-3 - Clause
Maintainer :
The ' Null ' attribute is used when we need a type to satisfy the attribute
parser , but we do not actually care to parse any att... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/b06757e252ee01fdd5ab8f07de2910711997d845/kore/src/Kore/Attribute/Null.hs | haskell | |
Module : . Attribute . Null
Description : Null attribute parser
Copyright : ( c ) Runtime Verification , 2018 - 2021
License : BSD-3 - Clause
Maintainer :
The ' Null ' attribute is used when we need a type to satisfy the attribute
parser , but we do not actually care to parse any att... | |
8b57f112c7b140c1026eb070cab913a8ad0500035d47ee8c89361b5693879de2 | politrons/Dive_into_Haskell | ConditionsFunction.hs | module ConditionsFunction where
messageFunc :: String -> String -> String
-- | In this example we show how a simple nested if works
messageFunc name surname= if(name =="Paul")
then "Hey " ++ name ++ " how you doing!"
else if(surname == "Perez")
then surnam... | null | https://raw.githubusercontent.com/politrons/Dive_into_Haskell/fd9dec14b87aecba0b3561385c1d75cf969546a4/src/features/ConditionsFunction.hs | haskell | | In this example we show how a simple nested if works
| In this example we show how if else works more similar to pattern matching. | module ConditionsFunction where
messageFunc :: String -> String -> String
messageFunc name surname= if(name =="Paul")
then "Hey " ++ name ++ " how you doing!"
else if(surname == "Perez")
then surname ++".... Ah!, I know your family"
else... |
7a3b83e179778919e6d7b715974509c1d34c6d238d48398273d2f1cbe148589d | serokell/time-warp | MonadTimedSpec.hs | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE Rank2Types #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE ViewPatterns #-}
| RSCoin . Test . MonadTimed specification
module Test.Control.Ti... | null | https://raw.githubusercontent.com/serokell/time-warp/2783f81957a2e5b02e9d3425d760247a6c5a766b/test/Test/Control/TimeWarp/Timed/MonadTimedSpec.hs | haskell | # LANGUAGE Rank2Types #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeSynonymInstances #
# LANGUAGE ViewPatterns #
workaround warning, remove after it's used
TODO: fix tests for timeout in TimedIO.
describe "timeout" $ do
prop "should throw an exception if ... | # LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleInstances #
| RSCoin . Test . MonadTimed specification
module Test.Control.TimeWarp.Timed.MonadTimedSpec
( spec
) where
import Control.Concurrent.MVar (newEmptyMVar, putMVar, takeMVar)
import Control.Concurren... |
780da39913a2c4655a6fe45bad0675c9b41c3a5f8d542980a1bad99bce231e52 | maryrosecook/islaclj | library.clj | (ns isla.test.library
(:use [isla.interpreter])
(:use [isla.parser])
(:require [isla.library :as library])
(:use [clojure.test])
(:use [clojure.pprint])
(:require [mrc.utils :as utils]))
;; write
(deftest test-write-object-attributes
(let [result (interpret (parse "jimmy is a giraffe\njimmy instrument i... | null | https://raw.githubusercontent.com/maryrosecook/islaclj/4394ddcbd05d3d2da91c89f28e57c764bfef8d88/test/isla/test/library.clj | clojure | write | (ns isla.test.library
(:use [isla.interpreter])
(:use [isla.parser])
(:require [isla.library :as library])
(:use [clojure.test])
(:use [clojure.pprint])
(:require [mrc.utils :as utils]))
(deftest test-write-object-attributes
(let [result (interpret (parse "jimmy is a giraffe\njimmy instrument is 'guitar... |
2e9e6b8350b85cdfe9398e80f60e6c85aec696a7cb846695ccea8147fbb3f48e | khotyn/4clojure-answer | 117-for-science.clj | (fn [board]
(let [vec-board (vec (map vec board))
row-count (count vec-board)
column-count (count (first vec-board))]
(letfn [(get-pos [ch]
(mapcat #(mapcat (fn [j] (if (= ch ((vec-board %) j)) [% j])) (range 0 column-count)) (range 0 row-count)))
(continous-blank [ch coo... | null | https://raw.githubusercontent.com/khotyn/4clojure-answer/3de82d732faedceafac4f1585a72d0712fe5d3c6/117-for-science.clj | clojure | (fn [board]
(let [vec-board (vec (map vec board))
row-count (count vec-board)
column-count (count (first vec-board))]
(letfn [(get-pos [ch]
(mapcat #(mapcat (fn [j] (if (= ch ((vec-board %) j)) [% j])) (range 0 column-count)) (range 0 row-count)))
(continous-blank [ch coo... | |
8ffc3033746ecc0ca9613f3a5b266ed91d9882e7fa0c68ce9f66e6cfe64b80c8 | nikita-volkov/rebase | Join.hs | module Rebase.Data.Bifunctor.Join
(
module Data.Bifunctor.Join
)
where
import Data.Bifunctor.Join
| null | https://raw.githubusercontent.com/nikita-volkov/rebase/7c77a0443e80bdffd4488a4239628177cac0761b/library/Rebase/Data/Bifunctor/Join.hs | haskell | module Rebase.Data.Bifunctor.Join
(
module Data.Bifunctor.Join
)
where
import Data.Bifunctor.Join
| |
483be81d6313ab4ac75324ca1055f58c9e89fefe2ac723769483e10877acd898 | willijar/LENS | simple-aggregation.lisp | ;; SImple Aggregation application for WSN
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 a... | null | https://raw.githubusercontent.com/willijar/LENS/646bc4ca5d4add3fa7e0728f14128e96240a9f36/networks/wsn/application/simple-aggregation.lisp | lisp | SImple Aggregation application for WSN
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... | 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 ... |
519f3d5ef47b047e4ab0a4daaa73cf8e24313a64dafb43835e99e06488403551 | EFanZh/EOPL-Exercises | exercise-7.28.rkt | #lang eopl
Exercise 7.28 [ ★ ★ ] Our inferencer is very useful , but it is not powerful enough to allow the programmer to define
;; procedures that are polymorphic, like the polymorphic primitives pair or cons, which can be used at many types. For
;; example, our inferencer would reject the program
;;
;; let f =... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-7.28.rkt | racket | procedures that are polymorphic, like the polymorphic primitives pair or cons, which can be used at many types. For
example, our inferencer would reject the program
let f = proc (x : ?) x
in if (f zero?(0))
then (f 11)
else (f 22)
even though its execution is safe, because f is used both ... | #lang eopl
Exercise 7.28 [ ★ ★ ] Our inferencer is very useful , but it is not powerful enough to allow the programmer to define
inferencer of this section is allowed to find at most one type for f , it will reject this program .
? foo ( x : ? ) = if )
in
else if ) )
... |
8a220b59e0c6e12694b272ccc53b21642c2c90d6989dd37b3de926042d45cbb5 | WormBase/wormbase_rest | pseudogene.clj | (ns rest-api.classes.pseudogene
(:require
[rest-api.classes.pseudogene.widgets.overview :as overview]
[rest-api.classes.pseudogene.widgets.feature :as feature]
[rest-api.classes.pseudogene.widgets.genetics :as genetics]
[rest-api.classes.pseudogene.widgets.reagents :as reagents]
[rest-api.classes.... | null | https://raw.githubusercontent.com/WormBase/wormbase_rest/e51026f35b87d96260b62ddb5458a81ee911bf3a/src/rest_api/classes/pseudogene.clj | clojure | (ns rest-api.classes.pseudogene
(:require
[rest-api.classes.pseudogene.widgets.overview :as overview]
[rest-api.classes.pseudogene.widgets.feature :as feature]
[rest-api.classes.pseudogene.widgets.genetics :as genetics]
[rest-api.classes.pseudogene.widgets.reagents :as reagents]
[rest-api.classes.... | |
e33cd874da3fbd3b6e9ba792a23972058cdd3000507b5535e2ccf1d63d4e2321 | kudelskisecurity/scannerl | master.erl | % the master in the master/slave architecture of scannerl
-module(master).
-author("Adrien Giner - ").
-export([master/1, listen/2]).
-include("includes/opts.hrl").
-define(CHECKTO, 3000). % ms
-define(ENDTO, 10000). % ms
-define(ERLEXT, ".erl").
% that's the range start for TCP communication
will be expanded to ?... | null | https://raw.githubusercontent.com/kudelskisecurity/scannerl/8133065030d014401c47b2470e67a36e9df81b1e/src/master.erl | erlang | the master in the master/slave architecture of scannerl
ms
ms
that's the range start for TCP communication
remote related functions
this loads all modules for this specific node
then register master and scannerl on remote
start a list of slave
start all slave nodes using process
stop all slave nodes
start ... |
-module(master).
-author("Adrien Giner - ").
-export([master/1, listen/2]).
-include("includes/opts.hrl").
-define(ERLEXT, ".erl").
will be expanded to ? PORTMIN+nb_slaves for the
-define(PORTMIN, 11100).
rem_load_modules(_, []) ->
ok;
rem_load_modules(Node, [M|Rest]) ->
{Mod, Bin, _} = code:get_object_code(... |
32c3a471159fa371ccd263e02ea3fe8f75c914c7a32ffb1941a44b98c56fac6d | inanna-malick/merkle-schemes | Simple.hs | module DirTree.Diff.Simple where
import Control.Monad (join)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import qualified Data.Map.Merge.Strict as Map
import DirTree.Types
import DirTree.Diff.Types
import Control.RecursionSchemes
| Diff ... | null | https://raw.githubusercontent.com/inanna-malick/merkle-schemes/4eac64f4df12ea7d1d1f3bb34010424db19e0a9e/talk/src/DirTree/Diff/Simple.hs | haskell | dir replaced with file
file replaced with dir | module DirTree.Diff.Simple where
import Control.Monad (join)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import qualified Data.Map.Merge.Strict as Map
import DirTree.Types
import DirTree.Diff.Types
import Control.RecursionSchemes
| Diff ... |
c5e4e1475d46b429668b85241dad728485542da01d6e76edff5a5d75426934bb | urueedi/monster-ui-phonebook | cf_attributes.erl | %%%-------------------------------------------------------------------
( C ) 2011 - 2014 , 2600Hz INC
%%% @doc
%%% @end
%%% @contributors
%%%-------------------------------------------------------------------
-module(cf_attributes).
-include("callflow.hrl").
-export([temporal_rules/1]).
-export([groups... | null | https://raw.githubusercontent.com/urueedi/monster-ui-phonebook/00b1b54996785d7a67fa902a46c82ead12ef022b/kazoo-3/applications/callflows/cf_attributes.erl | erlang | -------------------------------------------------------------------
@doc
@end
@contributors
-------------------------------------------------------------------
-----------------------------------------------------------------------------
@doc
@end
-------------------------------------------------------------------... | ( C ) 2011 - 2014 , 2600Hz INC
-module(cf_attributes).
-include("callflow.hrl").
-export([temporal_rules/1]).
-export([groups/1, groups/2]).
-export([caller_id/2]).
-export([callee_id/2]).
-export([moh_attributes/2, moh_attributes/3]).
-export([owner_id/1, owner_id/2]).
-export([presence_id/1, presence... |
748da555458e696463741ec8d4a684b022cd5de5e9a1adc9699a2de319af1f12 | rd--/hsc3 | sumSqr.help.hs | -- sumSqr
let o1 = fSinOsc ar 800 0
o2 = fSinOsc ar (xLine kr 200 500 5 DoNothing) 0
in sumSqr o1 o2 * 0.125
-- sumSqr ; written out
let o1 = fSinOsc ar 800 0
o2 = fSinOsc ar (xLine kr 200 500 5 DoNothing) 0
in (o1 * o1 + o2 * o2) * 0.125
| null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/sumSqr.help.hs | haskell | sumSqr
sumSqr ; written out | let o1 = fSinOsc ar 800 0
o2 = fSinOsc ar (xLine kr 200 500 5 DoNothing) 0
in sumSqr o1 o2 * 0.125
let o1 = fSinOsc ar 800 0
o2 = fSinOsc ar (xLine kr 200 500 5 DoNothing) 0
in (o1 * o1 + o2 * o2) * 0.125
|
b7a882b2409eb2704bce22b7302b62235ab4660c2c2e5a4c48025b2232921eff | xu-hao/QueryArrow | GenericDatabase.hs | # LANGUAGE TypeFamilies #
module QueryArrow.DB.GenericDatabase where
import QueryArrow.Syntax.Term
import QueryArrow.DB.DB
import QueryArrow.Semantics.TypeChecker
import Data.Set
data GenericDatabase db a = GenericDatabase db a String [Pred]
class IGenericDatabase01 db where
type GDBQueryType db
type GDBFormul... | null | https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/QueryArrow-common/src/QueryArrow/DB/GenericDatabase.hs | haskell | # LANGUAGE TypeFamilies #
module QueryArrow.DB.GenericDatabase where
import QueryArrow.Syntax.Term
import QueryArrow.DB.DB
import QueryArrow.Semantics.TypeChecker
import Data.Set
data GenericDatabase db a = GenericDatabase db a String [Pred]
class IGenericDatabase01 db where
type GDBQueryType db
type GDBFormul... | |
fbf3a0f81d87390d6d7af365682cf1507a435937dcec839b785ae4eb76571832 | geophf/1HaskellADay | Exercise.hs | module Y2020.M10.D26.Exercise where
-
Great ! We have the airbases of the world . At some point we will want to
look at alliances of the world :
But FRIST ! ... let 's export our graph as a set of cypher statements
-
Great! We have the airbases of the world. At some point we will want to
look at alliance... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2020/M10/D26/Exercise.hs | haskell | }
to load the airbases
to load countries-continents
for the country map
cyphed countries-continents
for cyphed stuff
for ununicoded base names
and a loader, free of charge:
With the above, you should be able to implement the following
so we should be able to run this, no problems: | module Y2020.M10.D26.Exercise where
-
Great ! We have the airbases of the world . At some point we will want to
look at alliances of the world :
But FRIST ! ... let 's export our graph as a set of cypher statements
-
Great! We have the airbases of the world. At some point we will want to
look at alliance... |
17b6a88333b589287da89eeda03ef8bf6dc1be52b17fad0fce5f41afea75a748 | project-fifo/dhcp | dhcp_eqc.erl | -module(dhcp_eqc).
-compile(export_all).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("dhcp/include/dhcp.hrl").
-define(M, dhcp).
byte() ->
choose(0,255).
ip_tpl() ->
{byte(), byte(), byte(), byte()}.
prop_ip_tpl_conversion() ->
?FORALL(Tpl, ip_tpl(),
... | null | https://raw.githubusercontent.com/project-fifo/dhcp/c8ada117ca38b5d6cd202c4e62b5be79574ca602/eqc/dhcp_eqc.erl | erlang | -module(dhcp_eqc).
-compile(export_all).
-include_lib("eqc/include/eqc.hrl").
-include_lib("eunit/include/eunit.hrl").
-include_lib("dhcp/include/dhcp.hrl").
-define(M, dhcp).
byte() ->
choose(0,255).
ip_tpl() ->
{byte(), byte(), byte(), byte()}.
prop_ip_tpl_conversion() ->
?FORALL(Tpl, ip_tpl(),
... | |
bbb36d7235b0e18d102c433f927cdf83f9a913e07fa9d1ada4f901fbaf158621 | pink-gorilla/webly | routing.clj | (ns routing
(:require
[bidi.bidi :as bidi]))
(def routes
["/" {"" :demo/main
"x" :demo/bongo
"y" {:matched :demo/y :tag :uu}
"z" (bidi/tag :demo/z :bongo)}])
(meta (bidi/tag :demo/z :bongo))
(pr-str routes)
(bidi/match-route routes "/x")
(bidi/match-route routes "/y")
(bidi/match-rou... | null | https://raw.githubusercontent.com/pink-gorilla/webly/ae37a2b0eb201bade5f909ebecfa63a60c3bd4ca/demo-rest/src/routing.clj | clojure | (ns routing
(:require
[bidi.bidi :as bidi]))
(def routes
["/" {"" :demo/main
"x" :demo/bongo
"y" {:matched :demo/y :tag :uu}
"z" (bidi/tag :demo/z :bongo)}])
(meta (bidi/tag :demo/z :bongo))
(pr-str routes)
(bidi/match-route routes "/x")
(bidi/match-route routes "/y")
(bidi/match-rou... | |
ffe0da2183935c7e1f9aa43113d75938c5fcef1730ff881f067413b53c8dfc62 | kappelmann/engaging-large-scale-functional-programming | Exercise07.hs | module Exercise07 where
import Control.Monad (replicateM)
import Data.List (find)
import Data.Maybe (isJust, isNothing)
import Data.Sequence (sortBy)
main :: IO ()
main = do
people <- getLine
test <- replicateM (read people) getLine
print (getList test)
getList :: [String] -> [[Int]]
getList xs = [map read (wo... | null | https://raw.githubusercontent.com/kappelmann/engaging-large-scale-functional-programming/8ed2c056fbd611f1531230648497cb5436d489e4/resources/contest/example_data/07/uploads/foobar/Exercise07.hs | haskell | module Exercise07 where
import Control.Monad (replicateM)
import Data.List (find)
import Data.Maybe (isJust, isNothing)
import Data.Sequence (sortBy)
main :: IO ()
main = do
people <- getLine
test <- replicateM (read people) getLine
print (getList test)
getList :: [String] -> [[Int]]
getList xs = [map read (wo... | |
e77ff1e0c6cc15fe8c40097f15f110ef81d88639a4a023636c66f5d082d4245a | coq-community/vscoq | vscoqtop_tactic_worker.ml | (**************************************************************************)
(* *)
(* VSCoq *)
(* *)
(* ... | null | https://raw.githubusercontent.com/coq-community/vscoq/fc7f4449256b1d60e4ef18b2ade4dd1efd4a7f8d/language-server/dm/vscoqtop_tactic_worker.ml | ocaml | ************************************************************************
VSCoq
Copyright... | ( see version control and README file for authors & dates )
This file is distributed under the terms of the MIT License .
* This toplevel implements an LSP - based server language for VsCode ,
used by the VsCoq extension .
used by the VsCoq extension. *)
let log = Dm.ParTactic.T... |
d800709d00bf376935b208c3b81fd2b206543067fe9a774dd30c53e359cfdccf | SecPriv/webspec | uuid.ml | (********************************************************************************)
Copyright ( c ) 2022
(* *)
(* Permission is hereby granted, free of charge, to any person obtaining a *)
(* copy of this software and associated doc... | null | https://raw.githubusercontent.com/SecPriv/webspec/b7ff6b714b3a4b572c108cc3136506da3d263eff/verifier/src/uuid.ml | ocaml | ******************************************************************************
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
th... | Copyright ( c ) 2022
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN AN ACTION OF CONTRACT... |
55335d1bc557899ea3a738f2e7064eeb511f82d4e1cda3504a914cdd5e970f48 | ktakashi/sagittarius-scheme | executor.scm | -*- mode : scheme ; coding : utf-8 -*-
;;;
;;; util/concurrent/executor.scm - Concurrent executor
;;;
Copyright ( c ) 2010 - 2014 < >
;;;
;;; 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/ktakashi/sagittarius-scheme/34cf17ec7aee301562a2a1be09540819c1b3b210/sitelib/util/concurrent/executor.scm | scheme | coding : utf-8 -*-
util/concurrent/executor.scm - Concurrent executor
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, t... | Copyright ( c ) 2010 - 2014 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
#!nounbound
(library (util concurrent execut... |
17340be60ae36a4e503df082deb18958c9fce2513f3d187b4319632306aa8e8e | rvantonder/hack_parallel | multiWorker.mli | *
* Copyright ( c ) 2015 , Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD - style license found in the
* LICENSE file in the " hack " directory of this source tree . An additional grant
* of patent rights can be found in the PATENTS file in the same directory . ... | null | https://raw.githubusercontent.com/rvantonder/hack_parallel/c9d0714785adc100345835c1989f7c657e01f629/src/procs/multiWorker.mli | ocaml | The protocol for a next function is to return a list of elements.
* It will be called repeatedly until it returns an empty list.
See definition in Hack_bucket | *
* Copyright ( c ) 2015 , Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD - style license found in the
* LICENSE file in the " hack " directory of this source tree . An additional grant
* of patent rights can be found in the PATENTS file in the same directory . ... |
7bc6defd6725fc1d945881eaec0191b5fc229db60c06c868a814c20d21c9734b | MinaProtocol/mina | mina_state_blockchain_state.ml | module Poly = struct
module V2 = struct
type ( 'staged_ledger_hash
, 'snarked_ledger_hash
, 'local_state
, 'time
, 'body_reference
, 'signed_amount
, 'pending_coinbase_stack
, 'fee_excess
, 'sok_digest )
t =
{ staged_ledger_has... | null | https://raw.githubusercontent.com/MinaProtocol/mina/57e2ea1b87fe1a24517e1c62f51cc59fe9bc87cd/src/lib/mina_wire_types/mina_state/mina_state_blockchain_state.ml | ocaml | module Poly = struct
module V2 = struct
type ( 'staged_ledger_hash
, 'snarked_ledger_hash
, 'local_state
, 'time
, 'body_reference
, 'signed_amount
, 'pending_coinbase_stack
, 'fee_excess
, 'sok_digest )
t =
{ staged_ledger_has... | |
219ada82c79827035caa6545b8e572b7448bf5eb5fabe6470ea3fceca2f7b8f8 | Javran/advent-of-code | Main.hs | module Javran.AdventOfCode.Main (
main,
) where
import Control.Monad
import qualified Javran.AdventOfCode.Cli.New as CliNew
import qualified Javran.AdventOfCode.Cli.ProgressReport as CliReport
import qualified Javran.AdventOfCode.Cli.SolutionCommand as SolutionCommand
import qualified Javran.AdventOfCode.Cli.Sync as... | null | https://raw.githubusercontent.com/Javran/advent-of-code/676ef13c2f9d341cf7de0f383335a1cf577bd73d/src/Javran/AdventOfCode/Main.hs | haskell | module Javran.AdventOfCode.Main (
main,
) where
import Control.Monad
import qualified Javran.AdventOfCode.Cli.New as CliNew
import qualified Javran.AdventOfCode.Cli.ProgressReport as CliReport
import qualified Javran.AdventOfCode.Cli.SolutionCommand as SolutionCommand
import qualified Javran.AdventOfCode.Cli.Sync as... | |
c60040a92bd68ee38f7f25e8ad9c091bd9757774fb9ef6aa6eaa38c5cf6d0855 | Kalimehtar/gtk-cffi | offscreen-window.lisp | ;;;
;;; offscreen-window.lisp -- GtkOffscreenWindow
;;;
Copyright ( C ) 2012 , < >
;;;
(in-package :gtk-cffi)
(defclass offscreen-window (window) ())
(defcfun gtk-offscreen-window-new :pointer)
(defmethod gconstructor ((offscreen-window offscreen-window) &key)
(gtk-offscreen-window-new))
(deffuns offscreen-... | null | https://raw.githubusercontent.com/Kalimehtar/gtk-cffi/fbd8a40a2bbda29f81b1a95ed2530debfe2afe9b/gtk/offscreen-window.lisp | lisp |
offscreen-window.lisp -- GtkOffscreenWindow
| Copyright ( C ) 2012 , < >
(in-package :gtk-cffi)
(defclass offscreen-window (window) ())
(defcfun gtk-offscreen-window-new :pointer)
(defmethod gconstructor ((offscreen-window offscreen-window) &key)
(gtk-offscreen-window-new))
(deffuns offscreen-window
(:get pixbuf pobject))
(defcfun gtk-offscreen-wind... |
b4b6e9dfb7768b625ba16c642f3e23fd9b3c107b3b583a1d5ef72127742cf816 | ayamada/copy-of-svn.tir.jp | client.scm | ;;; coding: euc-jp
;;; -*- scheme -*-
;;; vim:set ft=scheme ts=8 sts=2 sw=2 et:
$ Id$
;;; setpサーバと通信を行うクライアント。
現在のところは非同期通信には対応していない 。
ToDo : 使い方を書いておく事
ToDo : connect時にプロトコルチェックを行うコードを追加する事
ToDo : 通信切断時の処理をどうするか考える必要がある
;;; ToDo: request->response等の実行前にconnectしたりするか?
;;; 少なくとも、事前にconnectしているかのチェック... | null | https://raw.githubusercontent.com/ayamada/copy-of-svn.tir.jp/101cd00d595ee7bb96348df54f49707295e9e263/Gauche-tir/branches/Gauche-tir03/0.0.6/lib/tir03/setp/client.scm | scheme | coding: euc-jp
-*- scheme -*-
vim:set ft=scheme ts=8 sts=2 sw=2 et:
setpサーバと通信を行うクライアント。
ToDo: request->response等の実行前にconnectしたりするか?
少なくとも、事前にconnectしているかのチェックは行い、
came from gauche.net
--------
came from gauche.net
--------
settings
internal slots
check slot
--------
エラー時には、close処理した方が良い???
------... | $ Id$
現在のところは非同期通信には対応していない 。
ToDo : 使い方を書いておく事
ToDo : connect時にプロトコルチェックを行うコードを追加する事
ToDo : 通信切断時の処理をどうするか考える必要がある
(define-module tir03.setp.client
(use gauche.net)
(use srfi-1)
(use util.list)
(use tir03.setp.protocol)
(export
<setp-client>
setp-client-connect
setp... |
ba7a616e196c417c0ef42da8fa2873bdc7b3ff6ef99089c556981447f95c821d | silverbullettt/SICP | 2.69.rkt | (define (make-leaf symbol weight)
(list 'leaf symbol weight))
(define (leaf? object) (eq? (car object) 'leaf))
(define (symbol-leaf x) (cadr x))
(define (weight-leaf x) (caddr x))
(define (make-code-tree left right)
(list left
right
(append (symbols left) (symbols right))
(+ (weight lef... | null | https://raw.githubusercontent.com/silverbullettt/SICP/e773a8071ae2fae768846a2b295b5ed96b019f8d/2.69.rkt | racket | iteration | (define (make-leaf symbol weight)
(list 'leaf symbol weight))
(define (leaf? object) (eq? (car object) 'leaf))
(define (symbol-leaf x) (cadr x))
(define (weight-leaf x) (caddr x))
(define (make-code-tree left right)
(list left
right
(append (symbols left) (symbols right))
(+ (weight lef... |
1ea14fb8b0c49adbf7138c668311ec7904ec1d9a869190617c86866283ec263e | well-typed/large-records | LowerBound.hs | # LANGUAGE TypeApplications #
-- | Simple example of a generic function
module Data.Record.Generic.LowerBound (
LowerBound(..)
, glowerBound
) where
import Data.Record.Generic
import qualified Data.Record.Generic.Rep as Rep
{-------------------------------------------------------------------------------
Ge... | null | https://raw.githubusercontent.com/well-typed/large-records/fbc9d886094b7b40d6b89db72ff4c7fb59d5b903/large-generics/src/Data/Record/Generic/LowerBound.hs | haskell | | Simple example of a generic function
------------------------------------------------------------------------------
General definition
------------------------------------------------------------------------------
| Types with a lower bound
-------------------------------------------------------------------------... | # LANGUAGE TypeApplications #
module Data.Record.Generic.LowerBound (
LowerBound(..)
, glowerBound
) where
import Data.Record.Generic
import qualified Data.Record.Generic.Rep as Rep
class LowerBound a where
lowerBound :: a
instance LowerBound Word where lowerBound = 0
instance LowerBound Bool where lower... |
543240163264f5762d0df77d83e6775dbf35632e67d553ae20fecbf5eed9bbfc | pingles/bandit | epsilon.clj | (ns ^{:doc "Epsilon-Greedy algorithm"
:author "Paul Ingles"}
bandit.algo.epsilon
(:use [bandit.arms :only (exploit total-pulls)]))
(defn- draw-arm
([epsilon arms]
(draw-arm epsilon (rand) arms))
([epsilon n arms]
(if (> n epsilon)
(exploit :value arms)
(rand-nth (seq arms)))))
(d... | null | https://raw.githubusercontent.com/pingles/bandit/795666f3938e28f389691094bb1e07e4202290f6/bandit-core/src/bandit/algo/epsilon.clj | clojure | allowing the | (ns ^{:doc "Epsilon-Greedy algorithm"
:author "Paul Ingles"}
bandit.algo.epsilon
(:use [bandit.arms :only (exploit total-pulls)]))
(defn- draw-arm
([epsilon arms]
(draw-arm epsilon (rand) arms))
([epsilon n arms]
(if (> n epsilon)
(exploit :value arms)
(rand-nth (seq arms)))))
(d... |
905e03cdc733183c66b5777f4319827f3d5124e19c8683804fc4368e8338c24b | dyzsr/ocaml-selectml | patmatch_for_multiple.ml | (* TEST
flags = "-drawlambda -dlambda"
* expect
*)
(* Note: the tests below contain *both* the -drawlambda and
the -dlambda intermediate representations:
-drawlambda is the Lambda code generated directly by the
pattern-matching compiler; it contain "alias" bindings or static
exits that are unused... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/3495de07186fd9e5e1c6b5802ede00199fb1900a/testsuite/tests/basic/patmatch_for_multiple.ml | ocaml | TEST
flags = "-drawlambda -dlambda"
* expect
Note: the tests below contain *both* the -drawlambda and
the -dlambda intermediate representations:
-drawlambda is the Lambda code generated directly by the
pattern-matching compiler; it contain "alias" bindings or static
exits that are unused, and w... |
match (3, 2, 1) with
| (_, 3, _)
| (1, _, _) -> true
| _ -> false
;;
[%%expect{|
match*/288 = 3 * match*/289 = 2 * match*/290 = 1 )
( catch
( catch
( catch ( if ( ! = * ) ( exit 3 ) ( exit 1 ) ) with ( 3 )
( if ( ! = * match*/288 1 ) ( exit 2 ) ( exit 1 ) ) )
with ( 2 ) 0 )
w... |
d58b6773412e7bdfa72752e4e217bf8f76fc78882e00f139a352bb5ae01aed4e | ahungry/ahungry-fleece | skeleton.run.tests.lisp | ;; skeleton - A project template generated by ahungry-fleece
Copyright ( C ) 2016 Your Name < >
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , o... | null | https://raw.githubusercontent.com/ahungry/ahungry-fleece/1cef1d3a3aa9cffe9f06b7632006565bbc986814/skel/t/skeleton.run.tests.lisp | lisp | skeleton - A project template generated by ahungry-fleece
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FIT... | Copyright ( C ) 2016 Your Name < >
it under the terms of the GNU Affero 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 Affero General Public License
(in-package #:cl-user)
(defpackage skeleton.run.tests
... |
676dec24a4f4863bd9bb634274df83e8f0d8da6ffe33dbf962eab3dc2b04fc2e | cofree-coffee/cofree-bot | Utils.hs | # LANGUAGE PatternSynonyms #
module Data.Chat.Utils
( -- * Product
type (/\),
pattern (:&),
(|*|),
type (/+\),
can,
*
type (\/),
-- * Wedge Product
type (\*/),
-- * MTL Helpers
Transformers,
duplicate,
indistinct,
-- * Misc
distinguish,
PointedChoic... | null | https://raw.githubusercontent.com/cofree-coffee/cofree-bot/2466a444f17c560bfbadcad328f8a8c08d8da896/chat-bots/src/Data/Chat/Utils.hs | haskell | * Product
* Wedge Product
* MTL Helpers
* Misc
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
----------------------------------... | # LANGUAGE PatternSynonyms #
module Data.Chat.Utils
type (/\),
pattern (:&),
(|*|),
type (/+\),
can,
*
type (\/),
type (\*/),
Transformers,
duplicate,
indistinct,
distinguish,
PointedChoice (..),
readFileMaybe,
)
where
import Control.Applicative
import Con... |
2a38858f047fab1f3d9bf2a9be46c2d2bc53d1f7640be7b98e95678679b78f7e | heraldry/heraldicon | attribution.cljs | (ns heraldicon.frontend.attribution
(:require
[clojure.string :as str]
[heraldicon.context :as c]
[heraldicon.entity.attribution :as attribution]
[heraldicon.frontend.language :refer [tr]]
[heraldicon.frontend.repository.entity-for-rendering :as entity-for-rendering]
[heraldicon.heraldry.escutcheon ... | null | https://raw.githubusercontent.com/heraldry/heraldicon/54e003614cf2c14cda496ef36358059ba78275b0/src/heraldicon/frontend/attribution.cljs | clojure | (ns heraldicon.frontend.attribution
(:require
[clojure.string :as str]
[heraldicon.context :as c]
[heraldicon.entity.attribution :as attribution]
[heraldicon.frontend.language :refer [tr]]
[heraldicon.frontend.repository.entity-for-rendering :as entity-for-rendering]
[heraldicon.heraldry.escutcheon ... | |
ae85fbd943d62e7c5ea8c7ef1736e0b5ff9b71ea300740d313d4798e0880d3aa | tonyrog/canopen | co_sdo_srv_SUITE.erl | %% coding: latin-1
%%%---- BEGIN COPYRIGHT --------------------------------------------------------
%%%
Copyright ( C ) 2007 - 2012 , Rogvall Invest AB , < >
%%%
%%% This software is licensed as described in the file COPYRIGHT, which
%%% you should have received as part of this distribution. The terms
%%% are also a... | null | https://raw.githubusercontent.com/tonyrog/canopen/b76c0c3503e3087cc7511fe5795e6053702d449e/test/co_sdo_srv_SUITE.erl | erlang | coding: latin-1
---- BEGIN COPYRIGHT --------------------------------------------------------
This software is licensed as described in the file COPYRIGHT, which
you should have received as part of this distribution. The terms
are also available at .
You may opt to use, copy, modify, merge, publish, distribute ... | Copyright ( C ) 2007 - 2012 , Rogvall Invest AB , < >
copies of the Software , and permit persons to whom the Software is
This software is distributed on an " AS IS " basis , WITHOUT WARRANTY OF ANY
@author Lönne < >
( C ) 2011 , Marina Westman Lönne
Created : 29 Nov 2011 by Marina Westman Lönne < >
-... |
16ed305fce805219d529fec996d862af8e03d2a9e1f50f68a92a06adb4aeb6e8 | andersfugmann/borderline | borderline.ml | open Core
(** Main file. *)
open Borderline_lib
open Common
module F = Frontend
let _ =
Sys.catch_break true;
try
let files = List.tl_exn (Array.to_list (Sys.get_argv ())) in
Printf.eprintf "Parsing file%s: %s\n%!"
(match List.length files > 1 with true -> "s" | false -> "")
(String.concat ... | null | https://raw.githubusercontent.com/andersfugmann/borderline/ca51ad98cff0c37a3cd6a7717535319233e6f062/bin/borderline.ml | ocaml | * Main file. | open Core
open Borderline_lib
open Common
module F = Frontend
let _ =
Sys.catch_break true;
try
let files = List.tl_exn (Array.to_list (Sys.get_argv ())) in
Printf.eprintf "Parsing file%s: %s\n%!"
(match List.length files > 1 with true -> "s" | false -> "")
(String.concat ~sep:", " files);
... |
5b4cfb53a0a646f6476e4254b694aa2a4e60f27f355b22ac3891eb41cfd78a39 | satos---jp/mincaml_self_hosting | io.ml | let a = read_int () in
let b = read_int () in
print_int (a+b);
print_char 10;
let p = read_int () in
let q = read_int () in
print_int (p+q);
print_char 10;
let c = read_float () in
let d = read_float () in
print_int (int_of_float (c *. d));
print_char 10;
let r = read_float () in
let s = read_float () in
print_int (int... | null | https://raw.githubusercontent.com/satos---jp/mincaml_self_hosting/5fdf8b5083437d7607a924142eea52d9b1de0439/test/io.ml | ocaml | let a = read_int () in
let b = read_int () in
print_int (a+b);
print_char 10;
let p = read_int () in
let q = read_int () in
print_int (p+q);
print_char 10;
let c = read_float () in
let d = read_float () in
print_int (int_of_float (c *. d));
print_char 10;
let r = read_float () in
let s = read_float () in
print_int (int... | |
a21a1922356f16848a5f8ec9235ed0dbaa6c70f16d98048d12cf10be710667ff | ocaml-multicore/effects-examples | delimcc_paper_example.ml | (* Example in the delimcc paper:
* -shift-journal.pdf *)
open Delimcc.M;;
(* A finite map: a search tree *)
type ('k, 'v) tree =
| Empty
| Node of ('k, 'v) tree * 'k * 'v * ('k, 'v) tree
;;
exception NotFound
;;
(* Update the value associated with the key k by applying the
update function f. Return the new ... | null | https://raw.githubusercontent.com/ocaml-multicore/effects-examples/4f07e1774b726eec0f6769da0a16b402582d37b5/multishot/delimcc_paper_example.ml | ocaml | Example in the delimcc paper:
* -shift-journal.pdf
A finite map: a search tree
Update the value associated with the key k by applying the
update function f. Return the new tree.
If the key is not found, throw an exception.
Add to the tree the association of the key k to the value v,
overriding any exis... |
open Delimcc.M;;
type ('k, 'v) tree =
| Empty
| Node of ('k, 'v) tree * 'k * 'v * ('k, 'v) tree
;;
exception NotFound
;;
let rec update1 : 'k -> ('v->'v) -> ('k,'v) tree -> ('k,'v) tree =
fun k f ->
let rec loop = function
| Empty -> raise NotFound
| Node (l,k1,v1,r) ->
begin
match compare k k... |
ff19a03fc69415dd9a551f8ec92d785340ad4c362c3ed6a521fe754a45aef4bf | Quid2/flat | Vector.hs |
{-# LANGUAGE NoMonomorphismRestriction, ExtendedDefaultRules#-}
module DocTest.Flat.Instances.Vector where
import qualified DocTest
import Test.Tasty(TestTree,testGroup)
import Flat.Instances.Vector
import Flat.Instances.Test
import Flat.Instances.Base()
import qualified Data.Vector as V
import quali... | null | https://raw.githubusercontent.com/Quid2/flat/95e5d7488451e43062ca84d5376b3adcc465f1cd/test/DocTest/Flat/Instances/Vector.hs | haskell | # LANGUAGE NoMonomorphismRestriction, ExtendedDefaultRules# |
module DocTest.Flat.Instances.Vector where
import qualified DocTest
import Test.Tasty(TestTree,testGroup)
import Flat.Instances.Vector
import Flat.Instances.Test
import Flat.Instances.Base()
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as U
import qualified Data.Ve... |
3ea91949c7e7a8adb5c4ad12c8cda2fd497a0ef718f503d12ced20998b58e2a6 | dcastro/haskell-flatbuffers | TestImports.hs | module TestImports
( module Hspec
, module Hedgehog
, HasCallStack
, shouldBeLeft
, shouldBeRightAnd
, shouldBeRightAndExpect
, evalRight
, evalJust
, evalRightJust
, liftA4
, PrettyJson(..)
, shouldBeJson
, showBuffer
, traceBufferM
) where
import Control.Monad ... | null | https://raw.githubusercontent.com/dcastro/haskell-flatbuffers/cea6a75109de109ae906741ee73cbb0f356a8e0d/test/TestImports.hs | haskell | | Like `expectationFailure`, but returns @IO a@ instead of @IO ()@. | module TestImports
( module Hspec
, module Hedgehog
, HasCallStack
, shouldBeLeft
, shouldBeRightAnd
, shouldBeRightAndExpect
, evalRight
, evalJust
, evalRightJust
, liftA4
, PrettyJson(..)
, shouldBeJson
, showBuffer
, traceBufferM
) where
import Control.Monad ... |
61d3d8959bb3565722da0ad962e9ddaa7c58cb28ecbf8bc6395766caf7a19ef5 | zcaudate/hara | resolve_test.clj | (ns hara.module.namespace.resolve-test
(:use hara.test)
(:require [hara.module.namespace.resolve :refer :all]))
^{:refer hara.module.namespace.resolve/resolve-ns :added "3.0"}
(fact "resolves the namespace or else returns nil if it does not exist"
(resolve-ns 'clojure.core) => 'clojure.core
(resolve-ns 'cloj... | null | https://raw.githubusercontent.com/zcaudate/hara/481316c1f5c2aeba5be6e01ae673dffc46a63ec9/test/hara/module/namespace/resolve_test.clj | clojure | (ns hara.module.namespace.resolve-test
(:use hara.test)
(:require [hara.module.namespace.resolve :refer :all]))
^{:refer hara.module.namespace.resolve/resolve-ns :added "3.0"}
(fact "resolves the namespace or else returns nil if it does not exist"
(resolve-ns 'clojure.core) => 'clojure.core
(resolve-ns 'cloj... | |
c72f777c32e83964b36cd027e23c82b4d23ae525ede74d6447b9184932517008 | esumii/min-caml | ppm.ml | open Bigarray
type pixmap = bytes * int
let get (img, width) i j k =
Char.code (Bytes.get img (((j * width) + i) * 3 + k))
let set (img, width) i j k v =
Bytes.set img (((j * width) + i) * 3 + k) (Char.unsafe_chr v)
let setp (img, width) i j r g b =
let p = ((j * width) + i) * 3 in
Bytes.set img p (Char.uns... | null | https://raw.githubusercontent.com/esumii/min-caml/8860b6fbc50786a27963aff1f7639b94c244618a/min-rt/ppm.ml | ocaml | open Bigarray
type pixmap = bytes * int
let get (img, width) i j k =
Char.code (Bytes.get img (((j * width) + i) * 3 + k))
let set (img, width) i j k v =
Bytes.set img (((j * width) + i) * 3 + k) (Char.unsafe_chr v)
let setp (img, width) i j r g b =
let p = ((j * width) + i) * 3 in
Bytes.set img p (Char.uns... | |
84880f1a122d994a473bd08ee765b289381b65d515f269bb14385535046ad527 | ngrunwald/datasplash | es.clj | (ns datasplash.es
(:require
[charred.api :as charred]
[datasplash.core :as ds])
(:import
(datasplash.fns ExtractKeyFn)
(org.apache.beam.sdk Pipeline)
(org.apache.beam.sdk.values PBegin PCollection)
(org.apache.beam.sdk.io.elasticsearch
ElasticsearchIO ElasticsearchIO$Read ElasticsearchIO$Write... | null | https://raw.githubusercontent.com/ngrunwald/datasplash/d221bba9ffc4807281dd9df549ed4010a38d0279/src/clj/datasplash/es.clj | clojure | (ns datasplash.es
(:require
[charred.api :as charred]
[datasplash.core :as ds])
(:import
(datasplash.fns ExtractKeyFn)
(org.apache.beam.sdk Pipeline)
(org.apache.beam.sdk.values PBegin PCollection)
(org.apache.beam.sdk.io.elasticsearch
ElasticsearchIO ElasticsearchIO$Read ElasticsearchIO$Write... | |
3865f1b6d3d4c5badc9bce4e7b838a0b6601a1e1c78a55b1b3e0cfbbf16f689d | beckyconning/haskell-snake | Snake.hs | # OPTIONS_GHC -Wall #
import Data.List
import System.IO
import System.Timeout
import System.Random
import System.Console.ANSI
import Control.Concurrent
import Control.Concurrent.Async
import Control.Monad.Loops
import Control.Applicative
type Vector = (Int, Int)
data State = State {
board :: Int,
snake :: ... | null | https://raw.githubusercontent.com/beckyconning/haskell-snake/c323fd34fc873f6c9ba33028f6add7e6d879c260/Snake.hs | haskell | # OPTIONS_GHC -Wall #
import Data.List
import System.IO
import System.Timeout
import System.Random
import System.Console.ANSI
import Control.Concurrent
import Control.Concurrent.Async
import Control.Monad.Loops
import Control.Applicative
type Vector = (Int, Int)
data State = State {
board :: Int,
snake :: ... | |
d2f1e8f0ac747f9ae02ec253ac8e82d6f41511cfd7b3d466a33f98de6ac536e4 | cmsc430/www | unload-bits-asm.rkt | #lang racket
(provide unload/free unload-value)
(require "types.rkt"
ffi/unsafe)
(struct struct-val () #:transparent)
;; Answer* -> Answer
(define (unload/free a)
(match a
['err 'err]
[(cons h v) (begin0 (unload-value v)
(free h))]))
;; Value* -> Value
(define (unload-value... | null | https://raw.githubusercontent.com/cmsc430/www/fc3165545c81d4da3d0aaae33a1e5f8f8cafe0e6/langs/neerdowell/unload-bits-asm.rkt | racket | Answer* -> Answer
Value* -> Value | #lang racket
(provide unload/free unload-value)
(require "types.rkt"
ffi/unsafe)
(struct struct-val () #:transparent)
(define (unload/free a)
(match a
['err 'err]
[(cons h v) (begin0 (unload-value v)
(free h))]))
(define (unload-value v)
(match v
[(? imm-bits?) (bits-... |
cc9f99a3541c084f888cbe72e04e121aa52b3c955edeaac4284cc2f74dd2c24c | mzp/coq-ide-for-ios | omega_plugin_mod.ml | let _=Mltop.add_known_module"Omega"
let _=Mltop.add_known_module"Coq_omega"
let _=Mltop.add_known_module"G_omega"
let _=Mltop.add_known_module"Omega_plugin_mod"
let _=Mltop.add_known_module"omega_plugin"
| null | https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/CoqIDE/coq-8.2pl2/plugins/omega/omega_plugin_mod.ml | ocaml | let _=Mltop.add_known_module"Omega"
let _=Mltop.add_known_module"Coq_omega"
let _=Mltop.add_known_module"G_omega"
let _=Mltop.add_known_module"Omega_plugin_mod"
let _=Mltop.add_known_module"omega_plugin"
| |
f7fd319787726ce999c0e8a3937933a272bc857164c1015cfe05717404fa2ccd | haskell-tools/haskell-tools | Definitions.hs | # LANGUAGE TypeOperators #
module Definitions where
data (:+:) a b = Plus a b
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/test/ExtensionOrganizerTest/ExplicitNamespacesTest/Definitions.hs | haskell | # LANGUAGE TypeOperators #
module Definitions where
data (:+:) a b = Plus a b
| |
aa571a7d2caf7d124ccdbc924f8888ea3b3bda7976d050782bfeb82260cca376 | raffy2010/grand-slam | video_item.cljs | (ns ui.component.video-item
(:require [clojure.string :refer [join split]]
[cljs.core.match :refer-macros [match]]
[reagent.core :as r]
[cljs-react-material-ui.reagent :as ui]
[cljs-react-material-ui.icons :as ic]
[reanimated.core :as anim]
[ui.utils.co... | null | https://raw.githubusercontent.com/raffy2010/grand-slam/752984d606f4e201b305c6ac931dd0d03a12f4b4/ui_src/ui/component/video_item.cljs | clojure | (ns ui.component.video-item
(:require [clojure.string :refer [join split]]
[cljs.core.match :refer-macros [match]]
[reagent.core :as r]
[cljs-react-material-ui.reagent :as ui]
[cljs-react-material-ui.icons :as ic]
[reanimated.core :as anim]
[ui.utils.co... | |
22c3da88a21224d58a4805f51b0666e8eb1bfd534df66d6fd3077759a2937897 | erlyvideo/publisher | wav.erl | @author < > [ ]
2010
%%% @doc WAV (un)packing module
%%% Read / for description of header
@reference See < a href=" " target="_top"></a > for more information
%%% @end
%%%
%%% This file is part of erlmedia.
%%%
%%% erlmedia is free software: you can redistribute it and/or modify
it under... | null | https://raw.githubusercontent.com/erlyvideo/publisher/5bb2dfa6477c46160dc5fafcc030fc3f5340ec80/apps/erlmedia/src/wav.erl | erlang | @doc WAV (un)packing module
Read / for description of header
@end
This file is part of erlmedia.
erlmedia is free software: you can redistribute it and/or modify
(at your option) any later version.
erlmedia is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the ... | @author < > [ ]
2010
@reference See < a href=" " target="_top"></a > for more information
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 Public License... |
636d8d5551ea8f578c00c5b8a3348e7dad34838fd4daa87da77215bc88090d15 | elastic/eui-cljs | in_memory_table.cljs | (ns eui.in-memory-table
(:require ["@elastic/eui/lib/components/basic_table/in_memory_table.js" :as eui]))
(def EuiInMemoryTable eui/EuiInMemoryTable)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/in_memory_table.cljs | clojure | (ns eui.in-memory-table
(:require ["@elastic/eui/lib/components/basic_table/in_memory_table.js" :as eui]))
(def EuiInMemoryTable eui/EuiInMemoryTable)
| |
0a1447ba97eba893d3f557514a6fb716a3ad50f69de2df2bd8900c8e8a9c3475 | happi/theBeamBook | stack_machine_compiler.erl | -module(stack_machine_compiler).
-export([compile/2]).
compile(Expression, FileName) ->
[ParseTree] = element(2,
erl_parse:parse_exprs(
element(2,
erl_scan:string(Expression)))),
file:write_file(FileName, generate_code(ParseTree) ++ [stop()]).
generate_code({op, _Line, '+', Arg1, Arg2}) ->... | null | https://raw.githubusercontent.com/happi/theBeamBook/3971e8e2d09e3676702a2a5fa8c494f1f803d555/code/beam_chapter/src/stack_machine_compiler.erl | erlang | -module(stack_machine_compiler).
-export([compile/2]).
compile(Expression, FileName) ->
[ParseTree] = element(2,
erl_parse:parse_exprs(
element(2,
erl_scan:string(Expression)))),
file:write_file(FileName, generate_code(ParseTree) ++ [stop()]).
generate_code({op, _Line, '+', Arg1, Arg2}) ->... | |
e2c0efeed86c4f16623c642ccfb82cf4b409f3007f2b9b82be63c39b2f8c0a44 | LPCIC/matita | notationUtil.mli | Copyright ( C ) 2004 - 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of ... | null | https://raw.githubusercontent.com/LPCIC/matita/794ed25e6e608b2136ce7fa2963bca4115c7e175/matita/components/content/notationUtil.mli | ocaml | * @return the list of proper (i.e. non recursive) IdRef of a term
* generalization of List.combine to n lists
* Symbol/Numbers instances
* Notation id handling | Copyright ( C ) 2004 - 2005 , HELM Team .
*
* This file is part of HELM , an Hypertextual , Electronic
* Library of Mathematics , developed at the Computer Science
* Department , University of Bologna , Italy .
*
* is free software ; you can redistribute it and/or
* modify it under the terms of ... |
aa4da5729e1a806ff55bc5518d17f78985a555ee87847d295f337acb398710e1 | jyp/nano-Agda | TestSyntax.hs | # LANGUAGE QuasiQuotes , TemplateHaskell #
module TestSyntax where
import Language.LBNF
dumpCode [lbnf|
ESigma. Exp ::= "×" ;
|]
test = tokens "×"
| null | https://raw.githubusercontent.com/jyp/nano-Agda/2003fa50db6c8e5647594f69cdda61b76f4ecf3f/TestSyntax.hs | haskell | # LANGUAGE QuasiQuotes , TemplateHaskell #
module TestSyntax where
import Language.LBNF
dumpCode [lbnf|
ESigma. Exp ::= "×" ;
|]
test = tokens "×"
| |
bdf8a7491c1f9f0b5eec8e303b2eacf0771f0601438b134922207207cb56c08a | d-cent/objective8 | facebook.clj | (ns objective8.front-end.workflows.facebook
(:require [ring.util.response :as response]
[objective8.utils :as utils]
[objective8.front-end.api.http :as http]
[cheshire.core :as json]
[bidi.ring :refer [make-handler]]
[objective8.front-end.front-end-requests ... | null | https://raw.githubusercontent.com/d-cent/objective8/db8344ba4425ca0b38a31c99a3b282d7c8ddaef0/src/objective8/front_end/workflows/facebook.clj | clojure | (ns objective8.front-end.workflows.facebook
(:require [ring.util.response :as response]
[objective8.utils :as utils]
[objective8.front-end.api.http :as http]
[cheshire.core :as json]
[bidi.ring :refer [make-handler]]
[objective8.front-end.front-end-requests ... | |
ee5a17a8bb56a4e1a98154611910bf67c12964ce0f67226ad9f5c9b7e645443b | roburio/caldav | rfc1123.ml | ----------------------------------------------------------------------------
Copyright ( c ) 2015 Inhabited Type LLC .
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/roburio/caldav/60d4aeec2711f7c6fdc76e1096288a1c453e9f2f/ocaml-webmachine/lib/rfc1123.ml | ocaml | ----------------------------------------------------------------------------
Copyright ( c ) 2015 Inhabited Type LLC .
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions
are met :
... | |
64f9f0c6aba678bf217db23d8a9ccc34725c65abfddce6975347568db7248359 | CarlosMChica/HaskellBook | AsyncExceptions.hs | module AsyncExceptions where
import Control.Concurrent (forkIO, threadDelay)
import Control.Exception
import System.IO
openAndWrite :: IO ()
openAndWrite = do
h <- openFile "test.dat" WriteMode
threadDelay 1500
hPutStr h (replicate 100000000 '0' ++ "abc")
hClose h
data PleaseDie... | null | https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter30/AsyncExceptions.hs | haskell | Exception ends up blowing up in main because by the time it reaches throwTo the child thread has finished | module AsyncExceptions where
import Control.Concurrent (forkIO, threadDelay)
import Control.Exception
import System.IO
openAndWrite :: IO ()
openAndWrite = do
h <- openFile "test.dat" WriteMode
threadDelay 1500
hPutStr h (replicate 100000000 '0' ++ "abc")
hClose h
data PleaseDie... |
fee5de30b203a49465b44d8f835740c3a502eb584337a64685cde72e09e22286 | csabahruska/jhc-components | Array.hs | # OPTIONS_JHC -funboxed - tuples #
module Data.Array (
module Data.Ix, -- export all of Ix
Array(),
array,
listArray,
accumArray,
(!),
bounds,
indices,
elems,
assocs,
(//),
accum,
ixmap
) where
import Data.Ix
import Jhc.Int
import Jhc.Prim.Array
import Jhc.Prim.... | null | https://raw.githubusercontent.com/csabahruska/jhc-components/a7dace481d017f5a83fbfc062bdd2d099133adf1/lib/haskell-extras/Data/Array.hs | haskell | export all of Ix
Precedence of the 'array' function is that of application itself | # OPTIONS_JHC -funboxed - tuples #
module Data.Array (
Array(),
array,
listArray,
accumArray,
(!),
bounds,
indices,
elems,
assocs,
(//),
accum,
ixmap
) where
import Data.Ix
import Jhc.Int
import Jhc.Prim.Array
import Jhc.Prim.IO
infixl 9 !, //
data Array a b = MkA... |
8ca56db15ebb63a4d4f0584f5751895d74aa3d4da403b946a09bcaadde48d8c9 | jakemcc/sicp-study | ex4_28.clj | exercise 4.28
(ns ex4-48
(:use section4))
(interpret '(define (p f x y z)
(f x y z)))
(interpret (define (sum x y z)
(+ x y z)))
(interpret (p sum 1 2 3))
; The above works.
; We need to get the actual value because otherwise when
; p is passed f to evaulaute it would be evaluating... | null | https://raw.githubusercontent.com/jakemcc/sicp-study/3b9e3d6c8cc30ad92b0d9bbcbbbfe36a8413f89d/clojure/section4.2/src/ex4_28.clj | clojure | The above works.
We need to get the actual value because otherwise when
p is passed f to evaulaute it would be evaluating a thunk
and not a function. Hence need to use the book version which
uses actual-value and not eval. | exercise 4.28
(ns ex4-48
(:use section4))
(interpret '(define (p f x y z)
(f x y z)))
(interpret (define (sum x y z)
(+ x y z)))
(interpret (p sum 1 2 3))
|
44a7f37e7c41e7564850eb6ce05731ee56147c1e030f10d10e801119bed4c61e | discoproject/disco | jc_utils.erl | -module(jc_utils).
-include("common_types.hrl").
-include("disco.hrl").
-include("pipeline.hrl").
-include("job_coordinator.hrl").
% This constant control the number of tasks that can be started from the
% following concurrent stages. The lower this value, the higher the degree of
concurrency , but the higher the ... | null | https://raw.githubusercontent.com/discoproject/disco/be65272d3eecca184a3c8f2fa911b86ac87a4e8a/master/src/jc_utils.erl | erlang | This constant control the number of tasks that can be started from the
following concurrent stages. The lower this value, the higher the degree of
the minimum value that guarantees there will be no deadlock if the number of
workers does not decrease.
information about a stage which may not have yet run.
informat... | -module(jc_utils).
-include("common_types.hrl").
-include("disco.hrl").
-include("pipeline.hrl").
-include("job_coordinator.hrl").
concurrency , but the higher the potential for job deadlock . The constant 1 is
-define(MIN_RATION_OF_FIRST_ACTIVE_TO_REST, 2).
-export([stage_info_opt/2, stage_info/2, last_stage_ta... |
11e9b25acdf169c72feace0533f5d14bdbf72b8594443bf75359752828ead558 | zotonic/zotonic | mod_zotonic_site_management.erl | @author < >
2016
%% @doc Site management module
Copyright 2016
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law o... | null | https://raw.githubusercontent.com/zotonic/zotonic/1bb4aa8a0688d007dd8ec8ba271546f658312da8/apps/zotonic_mod_zotonic_site_management/src/mod_zotonic_site_management.erl | erlang | @doc Site management module
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 spe... | @author < >
2016
Copyright 2016
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mod_zotonic_site_management).
-author("Marc Worrell <>").
-mod_title("Zotonic Site Management").
-mod_description("Mana... |
698662e66d00402047bce5e024eeedb0abb9e786ff78cd7686a58c86b939900c | screenshotbot/screenshotbot-oss | recent-runs.lisp | ;;;; Copyright 2018-Present Modern Interpreters Inc.
;;;;
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(uiop:define-package :screenshotbot/dashboard/recent-runs
(:use #:cl
#:alex... | null | https://raw.githubusercontent.com/screenshotbot/screenshotbot-oss/70e6d56619984ddeb85a4b94bda5a40eee381a8b/src/screenshotbot/dashboard/recent-runs.lisp | lisp | Copyright 2018-Present Modern Interpreters Inc.
| This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
(uiop:define-package :screenshotbot/dashboard/recent-runs
(:use #:cl
#:alexandria
#:screenshotbot/user-api
#:screensh... |
9136114420e6e86956bed2a1c50a067210cab1669ff3766da9741f7028bf57a4 | roryk/bcbio.rnaseq | t_simulate.clj | (ns bcbio.rnaseq.t-simulate
(:require [bcbio.rnaseq.t-simulate :refer :all]
[bcbio.rnaseq.simulate :as simulate]
[bcbio.rnaseq.simulator :as simulator]
[bcbio.rnaseq.test-setup :refer [test-setup]]
[clojure.test :refer :all]
[bcbio.rnaseq.util :as util]))
(... | null | https://raw.githubusercontent.com/roryk/bcbio.rnaseq/66c629eb737c9a0096082d6683657bf9d89eb271/test/bcbio/rnaseq/t_simulate.clj | clojure | (ns bcbio.rnaseq.t-simulate
(:require [bcbio.rnaseq.t-simulate :refer :all]
[bcbio.rnaseq.simulate :as simulate]
[bcbio.rnaseq.simulator :as simulator]
[bcbio.rnaseq.test-setup :refer [test-setup]]
[clojure.test :refer :all]
[bcbio.rnaseq.util :as util]))
(... | |
8410494c98132b3ee2237e94626347889e878d3f3e310b4c970213e04d6574e9 | adamwalker/clash-riscv | CacheTest.hs | -- | Instruction cache testbench
module CacheTest where
import Clash.Prelude as Clash
import qualified Prelude as P
import Data.Bool
import Data.List (sort)
import Cache.ICache
import Cache.Replacement
import Cache.PseudoLRUTree
import TestUtils
--Backing mem for cache. Delivers a line at a time
backingMem
::... | null | https://raw.githubusercontent.com/adamwalker/clash-riscv/84a90731a07c3427695b4926d7159f9e9902c1a1/test/CacheTest.hs | haskell | | Instruction cache testbench
Backing mem for cache. Delivers a line at a time
Test stimulus generation for instruction cache. Requests a sequence of addresses and checks the correct result is returned.
Cache test system consisting of cache, backing ram and stimulus generator
Cache QuickCheck property
TODO: generate a... | module CacheTest where
import Clash.Prelude as Clash
import qualified Prelude as P
import Data.Bool
import Data.List (sort)
import Cache.ICache
import Cache.Replacement
import Cache.PseudoLRUTree
import TestUtils
backingMem
:: HiddenClockReset dom sync gated
=> Signal dom Bool
-> Signal dom (BitVector... |
34df8afd4188c3480d429cecfdc9af301ff1006936f10df3d1a8346270308bdc | pauleve/pint | an_fixpoint.ml |
Copyright or © or Copr . 2015 - 2017
This software is a computer program whose purpose is to provide Process
Hitting related tools .
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software . You can use ,
modify and/ or redistrib... | null | https://raw.githubusercontent.com/pauleve/pint/7cf943ec60afcf285c368950925fd45f59f66f4a/anlib/an_fixpoint.ml | ocaml | Constraint: tr is not applicable |
Copyright or © or Copr . 2015 - 2017
This software is a computer program whose purpose is to provide Process
Hitting related tools .
This software is governed by the CeCILL license under French law and
abiding by the rules of distribution of free software . You can use ,
modify and/ or redistrib... |
58bced4e389490ff164f032b354e3ec1a924a4cc6c1aebd613a49569522be44d | psibi/streamly-bytestring | Lazy.hs | module Streamly.External.ByteString.Lazy
( readChunks
, read
, toChunks
, fromChunks
, fromChunksIO
)
where
import Data.Word (Word8)
import Streamly.Data.Unfold (many)
import Streamly.Data.Array.Foreign (Array)
import System.IO.Unsafe (unsafeInterleaveIO)
-- Internal imports
import Data.ByteString.Lazy.I... | null | https://raw.githubusercontent.com/psibi/streamly-bytestring/cb446333b795945bff85fde3db89bf172073985a/src/Streamly/External/ByteString/Lazy.hs | haskell | Internal imports
IMPORTANT NOTE: This function is lazy only for lazy monads
(e.g. Identity). For strict monads (e.g. /IO/) it consumes the entire input
before generating the output. For /IO/ monad please use fromChunksIO
instead.
For strict monads like /IO/ you could create a newtype wrapper to make the
monad ... | module Streamly.External.ByteString.Lazy
( readChunks
, read
, toChunks
, fromChunks
, fromChunksIO
)
where
import Data.Word (Word8)
import Streamly.Data.Unfold (many)
import Streamly.Data.Array.Foreign (Array)
import System.IO.Unsafe (unsafeInterleaveIO)
import Data.ByteString.Lazy.Internal (ByteString(... |
eb43a4e8699c7459e89a4b0b12fe31c6572590ce856a82b9efe8b754ca8bb0cf | choener/ADPfusion | Stream.hs |
-- | Build a backtracking function which uses @Stream@s internally.
Efficient fusion of these streams requires @HERMIT@ ! For most
-- backtracking cases, this is less of a problem since the backtracking
-- running time is much less than the forward case requires.
module ADPfusion.Core.TH.Stream where
import ... | null | https://raw.githubusercontent.com/choener/ADPfusion/fcbbf05d0f438883928077e3d8a7f1cbf8c2e58d/ADPfusion/Core/TH/Stream.hs | haskell | | Build a backtracking function which uses @Stream@s internally.
backtracking cases, this is less of a problem since the backtracking
running time is much less than the forward case requires.
| Build the single clause of our function. We shall need the functions bound
in the where part to create the joined functio... |
Efficient fusion of these streams requires @HERMIT@ ! For most
module ADPfusion.Core.TH.Stream where
import Data.List
import Data.Tuple.Select
import Language.Haskell.TH
import Language.Haskell.TH.Syntax
import qualified Data.Vector.Fusion.Stream.Monadic as SM
import ... |
16671b339ef9aee81c0ee15fe3df515d820d3d4fa7406dcb07a66e4a6762a4e0 | dm3/manifold-cljs | robpike.cljs | (ns manifold-test.robpike
(:require [cljs.core.async :as async :refer [<! >! chan close! timeout]]
[manifold-cljs.stream :as s]
[manifold-cljs.deferred :as d])
(:require-macros [cljs.core.async.macros :as m :refer [go alt!]]))
(defn run-async []
(let [fake-search (fn [kind]
... | null | https://raw.githubusercontent.com/dm3/manifold-cljs/85a2aee8a376f55b000739ee14acb073227422c8/examples/src/manifold_test/robpike.cljs | clojure | (ns manifold-test.robpike
(:require [cljs.core.async :as async :refer [<! >! chan close! timeout]]
[manifold-cljs.stream :as s]
[manifold-cljs.deferred :as d])
(:require-macros [cljs.core.async.macros :as m :refer [go alt!]]))
(defn run-async []
(let [fake-search (fn [kind]
... | |
a0748677752f45c5d183531f7f366d6c858c8a92c27c67572e8470b9d1d8bdfe | iambrj/imin | type-check-Rlambda.rkt | #lang racket
(require "utilities.rkt")
(require "type-check-Cvar.rkt")
(require "type-check-Cif.rkt")
(require "type-check-Cvec.rkt")
(require "type-check-Rfun.rkt")
(require "type-check-Cfun.rkt")
(provide type-check-Rlambda type-check-Rlambda-class typed-vars)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/iambrj/imin/baf9e829c2aa85b69a2e86bfba320969ddf05f95/type-check-Rlambda.rkt | racket |
;
type-check-Rlambda
lenient type checking for '_
before closure conversion
after closure conversion | #lang racket
(require "utilities.rkt")
(require "type-check-Cvar.rkt")
(require "type-check-Cif.rkt")
(require "type-check-Cvec.rkt")
(require "type-check-Rfun.rkt")
(require "type-check-Cfun.rkt")
(provide type-check-Rlambda type-check-Rlambda-class typed-vars)
(define typed-vars (make-parameter #f))
(define type-... |
c4010115d603ffa256ae96a930d352cd0966f5b2fec426d5e748c33387ce3218 | typedclojure/typedclojure | nthnext.clj | Copyright ( c ) , contributors .
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-1.0.php)
;; which can be found in the file epl-v10.html at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;... | null | https://raw.githubusercontent.com/typedclojure/typedclojure/1b3c9ef6786a792ae991c438ea8dca31175aa4a7/typed/clj.checker/src/typed/cljc/checker/check/nthnext.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) , contributors .
(ns ^:no-doc typed.cljc.checker.check.nthnext
(:require [typed.clojure :as t]
[typed.cljc.checker.check-below :as below]
[typed.cljc.checker.check.utils :as cu]
[typed.cljc.checker.cs-gen :as cgen]
[typed.cljc.checker.filter-... |
d7891fa39d77db4d40424d51750ed8036fcfddce987adb07594aa3f7b21afe71 | chetmurthy/typpx | ppx.ml | include Typpx.Make.F(struct
let tool_name = "ppx_type_of"
let args = []
let firstUntypedTransformation = Typpx.Default.untyped_identity
module Typemod = Typpx.Default.Typemod
module TypedTransformation = Mod.Map
let lastUntypedTransformation = Typpx.Default.untyped_identity
end)
;;
legacy_main ()
;;
| null | https://raw.githubusercontent.com/chetmurthy/typpx/a740750b75739e686da49b46ded7db7d6874e108/examples/ppx_type_of/ppx.ml | ocaml | include Typpx.Make.F(struct
let tool_name = "ppx_type_of"
let args = []
let firstUntypedTransformation = Typpx.Default.untyped_identity
module Typemod = Typpx.Default.Typemod
module TypedTransformation = Mod.Map
let lastUntypedTransformation = Typpx.Default.untyped_identity
end)
;;
legacy_main ()
;;
| |
a0947e06befd6c6520ebadbc42b3940711d4f889686641409424934d642ffa0d | lingnand/VIMonad | DeManage.hs | -----------------------------------------------------------------------------
-- |
Module : XMonad . Actions . DeManage
Copyright : ( c ) < >
-- License : BSD3-style (see LICENSE)
--
Maintainer : < >
-- Stability : stable
-- Portability : unportable
--
-- This module provides a met... | null | https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/XMonadContrib/XMonad/Actions/DeManage.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3-style (see LICENSE)
Stability : stable
Portability : unportable
This module provides a method to cease management of a window
without unmapping it. This is especially useful for applications
like kicker and g... | Module : XMonad . Actions . DeManage
Copyright : ( c ) < >
Maintainer : < >
' XMonad . Core . XConfig.defaultGaps '
* Convince the panel to move\/resize to the correct location . Changing the
module XMonad.Actions.DeManage (
demanage
... |
cb70b2efd73c3f2401df18b55b46865bf7ac6ff395b0aa4f344002da0699f2a1 | ghcjs/ghcjs-boot | num009.hs | trac # 2059
module Main(main) where
import Control.Monad
import Foreign.C
main = do let d = [0, pi, pi/2, pi/3, 1e10, 1e20] :: [Double]
f = [0, pi, pi/2, pi/3, 1e10, 1e20] :: [Float]
mapM_ (test "sind" sind sin) d
mapM_ (test "sinf" sinf sin) f
mapM_ (test "cosd" cosd co... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/base/tests/Numeric/num009.hs | haskell | trac # 2059
module Main(main) where
import Control.Monad
import Foreign.C
main = do let d = [0, pi, pi/2, pi/3, 1e10, 1e20] :: [Double]
f = [0, pi, pi/2, pi/3, 1e10, 1e20] :: [Float]
mapM_ (test "sind" sind sin) d
mapM_ (test "sinf" sinf sin) f
mapM_ (test "cosd" cosd co... | |
160a46029943a60472f176de1988af7498f46d79402406ca693eedd472cf81b7 | dmitryvk/sbcl-win32-threads | make-target-2-load.lisp | ;;; Now that we use the compiler for macros, interpreted /SHOW doesn't
;;; work until later in init.
#+sb-show (print "/hello, world!")
;;; Until PRINT-OBJECT and other machinery is set up, we want limits
;;; on printing to avoid infinite output. (Don't forget to undo these
;;; tweaks after the printer is set up. It'... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/make-target-2-load.lisp | lisp | Now that we use the compiler for macros, interpreted /SHOW doesn't
work until later in init.
Until PRINT-OBJECT and other machinery is set up, we want limits
on printing to avoid infinite output. (Don't forget to undo these
tweaks after the printer is set up. It'd be cleaner to use LET to
make sure that happens ... | #+sb-show (print "/hello, world!")
(setq *print-length* 10)
(setq *print-level* 5)
(setq *print-circle* t)
(defvar *compile-files-p* nil)
#+sb-show (print "/about to LOAD warm.lisp (with *compile-files-p* = NIL)")
(load "src/cold/warm.lisp")
Unintern no - longer - needed stuff before the possible PURIFY in
SAVE ... |
4caa7e38691abf6fc2e5ceab02a94b767375609a05fdde29f0291d39e1c0bc2a | Jobhdez/Yotta | utilities.lisp | (in-package #:yotta-tests)
(defun run-yotta-tests ()
(run-package-tests
:packages '(:yotta-tests)
:interactive t))
| null | https://raw.githubusercontent.com/Jobhdez/Yotta/84d91a5c6b685c7afece6e8dc2e1e6df8584594e/tests/utilities.lisp | lisp | (in-package #:yotta-tests)
(defun run-yotta-tests ()
(run-package-tests
:packages '(:yotta-tests)
:interactive t))
| |
55c78fbba886a77a0374309416aba53a0eb4839b521d4b0622321e591a1b08cc | flyingmachine/streaming-proxy | core_test.clj | (ns streaming-proxy.core-test
"Creates a test endpoint and a test proxy server, tests that
requests to proxy get sent to endpoint and that proxy can handle
responses"
(:require [streaming-proxy.core-test-helpers :refer :all]
[streaming-proxy.core :as sp]
[org.httpkit.server :as hks]
... | null | https://raw.githubusercontent.com/flyingmachine/streaming-proxy/6deba7d239e7a1281c9683dfe55a9f245b48a492/test/streaming_proxy/core_test.clj | clojure | server puts file at location, test checks that file is there | (ns streaming-proxy.core-test
"Creates a test endpoint and a test proxy server, tests that
requests to proxy get sent to endpoint and that proxy can handle
responses"
(:require [streaming-proxy.core-test-helpers :refer :all]
[streaming-proxy.core :as sp]
[org.httpkit.server :as hks]
... |
87d64ff84018a9a612bf38bd65eb44ccf1822f47334abc45c0149e702a1a3689 | sdiehl/kaleidoscope | Emit.hs | {-# LANGUAGE OverloadedStrings #-}
module Emit where
import LLVM.Module
import LLVM.Context
import qualified LLVM.AST as AST
import qualified LLVM.AST.Constant as C
import qualified LLVM.AST.Float as F
import qualified LLVM.AST.FloatingPointPredicate as FP
import Data.Word
import Data.Int
import Control.Monad.Excep... | null | https://raw.githubusercontent.com/sdiehl/kaleidoscope/682bdafe6d8f90caca4cdd0adb30bd3ebd9eff7b/src/chapter5/Emit.hs | haskell | # LANGUAGE OverloadedStrings #
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
%entry
----------------
if.then
----------------
Generate code for the true branch
Branch to the merge block
if.else
-----------... |
module Emit where
import LLVM.Module
import LLVM.Context
import qualified LLVM.AST as AST
import qualified LLVM.AST.Constant as C
import qualified LLVM.AST.Float as F
import qualified LLVM.AST.FloatingPointPredicate as FP
import Data.Word
import Data.Int
import Control.Monad.Except
import Control.Applicative
import... |
185e210317046950e18ec7ddac01c567b06be640d49198df09132e475e64cf30 | keoko/postgresql-simple-examples | Santa.hs | -- -12-03-postgresql-simple.html
{-# LANGUAGE OverloadedStrings #-}
module Santa where
import Data.Text
import Data.Int(Int64)
import Data.ByteString (ByteString)
import Control.Applicative
import Control.Monad
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.ToField
import Database.PostgreSQL.Simpl... | null | https://raw.githubusercontent.com/keoko/postgresql-simple-examples/f83b8e8b98e98695846104470fedbfe843510b7b/Santa.hs | haskell | -12-03-postgresql-simple.html
# LANGUAGE OverloadedStrings # | module Santa where
import Data.Text
import Data.Int(Int64)
import Data.ByteString (ByteString)
import Control.Applicative
import Control.Monad
import Database.PostgreSQL.Simple
import Database.PostgreSQL.Simple.ToField
import Database.PostgreSQL.Simple.FromRow
import Database.PostgreSQL.Simple.ToRow
data Present = Pr... |
6799a63b8ab236e80916648e78d6ec57acb20c7493627508a8be65dbcb12386b | GlideAngle/flare-timing | HLint.hs | module Main (main) where
import Language.Haskell.HLint (hlint)
import System.Exit (exitFailure, exitSuccess)
arguments :: [String]
arguments =
[ "library"
, "test-suite-hlint"
, "test-suite-math"
-- WARNING: HLint turns off QuasiQuotes even if turned on in
default - extensions in the cabal file , # ... | null | https://raw.githubusercontent.com/GlideAngle/flare-timing/172a9b199eb1ff72c967669dc349cbf8d9c4bc52/lang-haskell/gap-math/test-suite-hlint/HLint.hs | haskell | WARNING: HLint turns off QuasiQuotes even if turned on in
SEE: | module Main (main) where
import Language.Haskell.HLint (hlint)
import System.Exit (exitFailure, exitSuccess)
arguments :: [String]
arguments =
[ "library"
, "test-suite-hlint"
, "test-suite-math"
default - extensions in the cabal file , # 55 .
, "-XQuasiQuotes"
]
main :: IO ()
main = do
hin... |
bd962a6ce98cc86f5e596e82c7cbb8399230e94593e0f38204f585b3abfe0412 | dkochmanski/charming-clim | classes.lisp |
Copyright ( c ) 2018 , ( )
;;;;
Class definitions with brief commentary for a CLIM backend based on
cl - charms ( ncurses wrapper written in Common Lisp ) .
(in-package #:charming-clim)
;;; Port is a logical connection to a display server. It abstracts managament of
;;; windows, resources, incoming e... | null | https://raw.githubusercontent.com/dkochmanski/charming-clim/931da8f7f888499d880ae22187ce1779d13dc11c/src/classes.lisp | lisp |
Port is a logical connection to a display server. It abstracts managament of
windows, resources, incoming events etc.
Usually we want to subclass `basic-port' which has some functionality
implemented out of the box and provides a reasonable framework which is
suitable as a starting point for client-server commun... |
Copyright ( c ) 2018 , ( )
Class definitions with brief commentary for a CLIM backend based on
cl - charms ( ncurses wrapper written in Common Lisp ) .
(in-package #:charming-clim)
Note to myself : we define method ` frame - manager ' specialized on port in CLIM
(defclass charming-port (clim:basic-... |
c0d64f199c7fac2844a8ec0a168368df7fdf11fc04c8b57145ccbc42b44d376d | originrose/think.datatype | core.clj | (ns think.datatype.validation.core
(:require [think.gate.core :as gate])
(:gen-class))
(defn on-foo
[params] ;; consider destructuring your arguments
(+ (:a params) 41))
(def routing-map
{"foo" #'on-foo})
(defn gate
[]
(gate/open #'routing-map))
(defn other-thing
"Example of rendering a different co... | null | https://raw.githubusercontent.com/originrose/think.datatype/31372d6e18fe3a5146262693c0df5256a2a58095/validation-project/src/think/datatype/validation/core.clj | clojure | consider destructuring your arguments | (ns think.datatype.validation.core
(:require [think.gate.core :as gate])
(:gen-class))
(defn on-foo
(+ (:a params) 41))
(def routing-map
{"foo" #'on-foo})
(defn gate
[]
(gate/open #'routing-map))
(defn other-thing
"Example of rendering a different component with the gate/component multimethod."
[]
... |
732a7ee5d458faa907d7019edbc718a825c1235f49fe5a3cb7435b586fe9cbc1 | kostyushkin/erlworld | doc_gen.erl |
%%%
@author
%%% @doc
%%% This module is designed for handling generating the documentation for the
%%% project. As more packages are added, this should be expanded to include
%%% them.
%%%
-module( doc_gen ).
-author("Joseph Lenton").
-export([
start_halt/2,
star... | null | https://raw.githubusercontent.com/kostyushkin/erlworld/1c55c9eb0d12db9824144b4ff7535960c53e35c8/src/doc_gen.erl | erlang |
@doc
This module is designed for handling generating the documentation for the
project. As more packages are added, this should be expanded to include
them.
%%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%%
Public API
%%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %%% %... |
@author
-module( doc_gen ).
-author("Joseph Lenton").
-export([
start_halt/2,
start/0, start/2, start/3
]).
@doc This will run the start function once , and then halt the Erlang VM afterwoulds .
( Source::string ( ) , Destination::string ( ) ) - > ok
star... |
eb6e61d054e1f66d43a83be0ca8e9d60899c3195fd59d8b38553eeedd51581d4 | Zulu-Inuoe/clution | client-info.lisp | ;;;; client-info.lisp
(in-package #:quicklisp-client)
(defparameter *client-base-url* "/")
(defgeneric info-equal (info1 info2)
(:documentation "Return TRUE if INFO1 and INFO2 are 'equal' in some
important sense."))
;;; Information for checking the validity of files fetched for
;;; installing/updating the clien... | null | https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/systems/cl-clution/quicklisp/quicklisp/client-info.lisp | lisp | client-info.lisp
Information for checking the validity of files fetched for
installing/updating the client code.
TODO: check cryptographic digests too.
code
FIXME: So many other things could go wrong here; I think it
would be nice to catch and report them clearly as bogus URLs |
(in-package #:quicklisp-client)
(defparameter *client-base-url* "/")
(defgeneric info-equal (info1 info2)
(:documentation "Return TRUE if INFO1 and INFO2 are 'equal' in some
important sense."))
(defclass client-file-info ()
((plist-key
:initarg :plist-key
:reader plist-key)
(file-url
:initarg ... |
df9dc9cb91976ed7b4e46f1f96be083dff77af4e6c0076608b175282476c3b17 | samoht/camloo | make_lib.scm | (module camloo
(import __caml_buffcode
__caml_builtins
__caml_compiler
__caml_config
__caml_const
__caml_dump
__caml_emit_phr
__caml_emitcode
__caml_errors
__caml_front
__caml_globals
__caml_instruct
__caml_labels
__caml_lam
__caml_lambda
__caml_lexer
__... | null | https://raw.githubusercontent.com/samoht/camloo/29a578a152fa23a3125a2a5b23e325b6d45d3abd/src/camloo/Misc/make_lib.scm | scheme | (module camloo
(import __caml_buffcode
__caml_builtins
__caml_compiler
__caml_config
__caml_const
__caml_dump
__caml_emit_phr
__caml_emitcode
__caml_errors
__caml_front
__caml_globals
__caml_instruct
__caml_labels
__caml_lam
__caml_lambda
__caml_lexer
__... | |
2b47da5c0829f7c9e69a6157841bbb306b0cadd5a854ed9d816914f44352bc91 | klapaucius/vector-hashtables | Internal.hs | |
Module : Data . Vector . . Internal
Description : Provides internals of hashtables and set of utilities .
Copyright : ( c ) klapaucius , swamp_agr , 2016 - 2021
License :
Module : Data.Vector.Hashtables.Internal
Description : Provides internals of hashtables and set of utilities.
Copyrig... | null | https://raw.githubusercontent.com/klapaucius/vector-hashtables/820aa8616347a2634d5a86b9c2ab6e4eef9b6508/src/Data/Vector/Hashtables/Internal.hs | haskell | | Single-element mutable array of 'Dictionary_' with primitive state token parameterized with state, keys and values types.
*Example*:
>>> import qualified Data.Vector.Storable.Mutable as VM
Different vectors could be used for keys and values:
- storable,
- mutable,
- unboxed.
In most cases unboxed vectors... | |
Module : Data . Vector . . Internal
Description : Provides internals of hashtables and set of utilities .
Copyright : ( c ) klapaucius , swamp_agr , 2016 - 2021
License :
Module : Data.Vector.Hashtables.Internal
Description : Provides internals of hashtables and set of utilities.
Copyrig... |
98e35a2c42cd15a3e435cc401f074fc8a7ab3d9308e8f709c80631d0a8ba03a9 | amnh/PCG | Shared.hs | -----------------------------------------------------------------------------
-- |
-- Module : Bio.Character.Decoration.Shared
Copyright : ( c ) 2015 - 2021 Ward Wheeler
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
---------------------------... | null | https://raw.githubusercontent.com/amnh/PCG/9341efe0ec2053302c22b4466157d0a24ed18154/lib/core/data-structures/src/Bio/Character/Decoration/Shared.hs | haskell | ---------------------------------------------------------------------------
|
Module : Bio.Character.Decoration.Shared
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
# LANGUAGE Flexible... | Copyright : ( c ) 2015 - 2021 Ward Wheeler
# LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
module Bio.Character.Decoration.Shared where
import Control.Lens.Type
import Data.Range
import Numeric.Extended
class ( HasIntervalCharacter d c
, Ranged c
, ExtendedNumber (Bound... |
de24be593283a1b01101adf9984fb9960b1c929d715860d8b8253b8717b9c296 | open-company/open-company-web | seen.cljs | (ns oc.web.mixins.seen
(:require [rum.core :as rum]
[oops.core :refer (oget ocall)]
[oc.web.lib.responsive :as responsive]
[oc.web.dispatcher :as dis]
[oc.web.utils.activity :as au]
[oc.web.actions.activity :as aa]))
(defn container-nav-mixin []
(let [con... | null | https://raw.githubusercontent.com/open-company/open-company-web/700f751b8284d287432ba73007b104f26669be91/src/main/oc/web/mixins/seen.cljs | clojure | (ns oc.web.mixins.seen
(:require [rum.core :as rum]
[oops.core :refer (oget ocall)]
[oc.web.lib.responsive :as responsive]
[oc.web.dispatcher :as dis]
[oc.web.utils.activity :as au]
[oc.web.actions.activity :as aa]))
(defn container-nav-mixin []
(let [con... | |
d50eee212461f83c2daf615f6813a50b37720c38cc092151e60ca05fdfbf3799 | ghc/testsuite | T3743.hs | {-# LANGUAGE ImplicitParams, GADTs #-}
module T3743 where
class Foo a
data M where M :: Foo a => a -> M
x :: (?x :: ()) => ()
x = undefined
-- foo :: (?x :: ()) => M -> ()
foo y = case y of
M _ -> x
| null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_compile/T3743.hs | haskell | # LANGUAGE ImplicitParams, GADTs #
foo :: (?x :: ()) => M -> () |
module T3743 where
class Foo a
data M where M :: Foo a => a -> M
x :: (?x :: ()) => ()
x = undefined
foo y = case y of
M _ -> x
|
6c5983c18738d186c606187bc492fb76ecb1d922914bcc1ec63174c015b2c900 | mejgun/haskell-tdlib | DeleteMessages.hs | {-# LANGUAGE OverloadedStrings #-}
-- |
module TD.Query.DeleteMessages where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
-- |
-- Deletes messages @chat_id Chat identifier @message_ids Identifiers of the messages to be deleted @revoke Pass true to delete message... | null | https://raw.githubusercontent.com/mejgun/haskell-tdlib/81516bd04c25c7371d4a9a5c972499791111c407/src/TD/Query/DeleteMessages.hs | haskell | # LANGUAGE OverloadedStrings #
|
|
Deletes messages @chat_id Chat identifier @message_ids Identifiers of the messages to be deleted @revoke Pass true to delete messages for all chat members. Always true for supergroups, channels and secret chats
|
|
| |
module TD.Query.DeleteMessages where
import qualified Data.Aeson as A
import qualified Data.Aeson.Types as T
import qualified Utils as U
data DeleteMessages = DeleteMessages
revoke :: Maybe Bool,
message_ids :: Maybe [Int],
chat_id :: Maybe Int
}
deriving (Eq)
instance Show DeleteMessages where
sh... |
f0dc6065dc6b5fbfc5dc285c45c1b3ccfe3908ea9be655e53a605d8ca7ed1ff6 | oreillymedia/etudes-for-erlang | weather_sup.erl | -module(weather_sup).
-behaviour(supervisor).
-export([start_link/0]). % convenience call for startup
-export([init/1]). % supervisor calls
-define(SERVER, ?MODULE).
%%% convenience method for startup
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
%%% supervisor callback
init([]) ->
Res... | null | https://raw.githubusercontent.com/oreillymedia/etudes-for-erlang/07200372503a8819f9fcc2856f8cb82451be7b48/code/ch11-03/weather_sup.erl | erlang | convenience call for startup
supervisor calls
convenience method for startup
supervisor callback
or temporary, or transient
milliseconds, could be infinity or brutal_kill
could also be supervisor | -module(weather_sup).
-behaviour(supervisor).
-define(SERVER, ?MODULE).
start_link() ->
supervisor:start_link({local, ?SERVER}, ?MODULE, []).
init([]) ->
RestartStrategy = one_for_one,
one restart every
five seconds
SupFlags = {RestartStrategy, MaxRestarts, MaxSecondsBetweenRestarts},
Weather =... |
c5c9395cfe8f26de62e624b35e785b41d70e0e73a88a533d325ab5f3831fe7ec | simonmar/haxl-icfp14-sample-code | Fetch.hs | # LANGUAGE ExistentialQuantification , GADTs , StandaloneDeriving #
module Fetch where
import Types
import MockData
import Data.IORef
import Control.Applicative
import Data.Traversable
import Data.Sequence
import Data.Monoid
import Data.Foldable (toList)
-- <<Monad
data Result a
= Done a
| Blocked (Seq BlockedRe... | null | https://raw.githubusercontent.com/simonmar/haxl-icfp14-sample-code/31859f50e0548f3e581acd26944ceb00953f2c42/haxl/Fetch.hs | haskell | <<Monad
>>
>>
>>
<<Applicative
>>
<<runFetch
>> | # LANGUAGE ExistentialQuantification , GADTs , StandaloneDeriving #
module Fetch where
import Types
import MockData
import Data.IORef
import Control.Applicative
import Data.Traversable
import Data.Sequence
import Data.Monoid
import Data.Foldable (toList)
data Result a
= Done a
| Blocked (Seq BlockedRequest) (Fet... |
78e5c2ded3864f0163da28433ab60319f88d6d4820af0633054f47e5a65b4e13 | chaoslawful/zfor | zfor_client_SUITE.erl | -module(zfor_client_SUITE).
-compile([debug_info,export_all]).
-include("ct.hrl").
-include("zfor_client.hrl").
init_per_suite(Config) ->
Config.
end_per_suite(Config) ->
Config.
init_per_testcase(_TestCase, Config) ->
Config.
end_per_testcase(_TestCase, Config) ->
Config.
all() -> [basic_test, ... | null | https://raw.githubusercontent.com/chaoslawful/zfor/a8207bbd40ed73506e61d943b1a20467d5e6136a/priv/client/erlang_zfor/test/zfor_client_SUITE.erl | erlang | 单元测试 | -module(zfor_client_SUITE).
-compile([debug_info,export_all]).
-include("ct.hrl").
-include("zfor_client.hrl").
init_per_suite(Config) ->
Config.
end_per_suite(Config) ->
Config.
init_per_testcase(_TestCase, Config) ->
Config.
end_per_testcase(_TestCase, Config) ->
Config.
all() -> [basic_test, ... |
9d915ce2691454fd984f1920c836728b243f692438f7f10bf43c08d3d48c7a69 | bobjflong/stellar-haskell | Transaction.hs | {-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TemplateHaskell #
module Web.Stellar.Transaction (
fetchTransactions,
fetchTransactionsWithMarker,
Transaction(..),
earliestLedger,
currentLedger,
transactionAccount,
amount,
destination,
signingPubK... | null | https://raw.githubusercontent.com/bobjflong/stellar-haskell/b7beac482b0a78869de6090d5c13cda5d9601268/src/Web/Stellar/Transaction.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes # | # LANGUAGE TemplateHaskell #
module Web.Stellar.Transaction (
fetchTransactions,
fetchTransactionsWithMarker,
Transaction(..),
earliestLedger,
currentLedger,
transactionAccount,
amount,
destination,
signingPubKey,
transactionType,
TransactionType(..),
transactionSigna... |
258329b56801b80d105a4605b705bfe9afdf7206d8fd05c2fe14584c40e0c0cc | amperity/dialog | simple_test.clj | (ns dialog.format.simple-test
(:require
[clojure.string :as str]
[clojure.test :refer [deftest testing is]]
[dialog.format.simple :as simple]
[io.aviso.ansi :as ansi])
(:import
java.time.Instant))
(deftest thread-formatting
(let [format-thread #'simple/format-thread]
(is (= "[-]" (format... | null | https://raw.githubusercontent.com/amperity/dialog/1dda8ccdd5172113c126df2a0c5dd1ae31332127/test/dialog/format/simple_test.clj | clojure | (ns dialog.format.simple-test
(:require
[clojure.string :as str]
[clojure.test :refer [deftest testing is]]
[dialog.format.simple :as simple]
[io.aviso.ansi :as ansi])
(:import
java.time.Instant))
(deftest thread-formatting
(let [format-thread #'simple/format-thread]
(is (= "[-]" (format... | |
5fb50ddb15ef21981ed533ce26f37d87c8ba8373d1d5e4505a429272cf3e86d3 | fukamachi/clozure-cl | ppc64-arch.lisp | -*- Mode : Lisp ; Package : ( : use CL ) -*-
;;;
Copyright ( C ) 2009 Clozure Associates
Copyright ( C ) 1994 - 2001 Digitool , Inc
This file is part of Clozure CL .
;;;
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure ... | null | https://raw.githubusercontent.com/fukamachi/clozure-cl/4b0c69452386ae57b08984ed815d9b50b4bcc8a2/compiler/PPC/PPC64/ppc64-arch.lisp | lisp | Package : ( : use CL ) -*-
file "LICENSE". The LLGPL consists of a preamble and the LGPL,
conflict, the preamble takes precedence.
Clozure CL is referenced in the preamble as the "LIBRARY."
The LLGPL is also available online at
This file matches "ccl:lisp-kernel;constants64.h" &
"ccl:lisp-ker... | Copyright ( C ) 2009 Clozure Associates
Copyright ( C ) 1994 - 2001 Digitool , Inc
This file is part of Clozure CL .
Clozure CL is licensed under the terms of the Lisp Lesser GNU Public
License , known as the LLGPL and distributed with Clozure CL as the
which is distributed with Clozure CL as ... |
407db38d7fe5753e98f9e5ddbf639840bfafb1525c8ee1cc9a70e47e1849ded6 | acl2/acl2 | allegro-acl2-trace.lisp | ACL2 Version 8.5 -- A Computational Logic for Applicative Common Lisp
Copyright ( C ) 2023 , Regents of the University of Texas
This version of ACL2 is a descendent of ACL2 Version 1.9 , Copyright
( C ) 1997 Computational Logic , Inc. See the documentation topic NOTE-2 - 0 .
; This program is free software;... | null | https://raw.githubusercontent.com/acl2/acl2/65a46d5c1128cbecb9903bfee4192bb5daf7c036/allegro-acl2-trace.lisp | lisp | This program is free software; you can redistribute it and/or modify
it under the terms of the LICENSE file distributed with ACL2.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See... | ACL2 Version 8.5 -- A Computational Logic for Applicative Common Lisp
Copyright ( C ) 2023 , Regents of the University of Texas
This version of ACL2 is a descendent of ACL2 Version 1.9 , Copyright
( C ) 1997 Computational Logic , Inc. See the documentation topic NOTE-2 - 0 .
This file originally written... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.