_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 |
|---|---|---|---|---|---|---|---|---|
6b5c921a793e8ef71720ec14f184b899ac5df9270d052e30fcccda75ea794660 | callum-oakley/advent-of-code | 01.clj | (ns aoc.2016.01
(:require
[aoc.vector :refer [+v *v manhattan-distance]]
[clojure.test :refer [deftest is]]))
(defn parse [s]
(map (fn [[_ turn steps]] [(symbol turn) (read-string steps)])
(re-seq #"(R|L)(\d+)" s)))
(defn turn [state t]
(case t
L (update state :dir (fn [[x y]] [(- y) x]))
R... | null | https://raw.githubusercontent.com/callum-oakley/advent-of-code/da5233fc0fd3d3773d35ee747fd837c59c2b1c04/src/aoc/2016/01.clj | clojure | (ns aoc.2016.01
(:require
[aoc.vector :refer [+v *v manhattan-distance]]
[clojure.test :refer [deftest is]]))
(defn parse [s]
(map (fn [[_ turn steps]] [(symbol turn) (read-string steps)])
(re-seq #"(R|L)(\d+)" s)))
(defn turn [state t]
(case t
L (update state :dir (fn [[x y]] [(- y) x]))
R... | |
3a4958973628941bc0c2d49dfbdfc06c1e1cc056f80e03756fd9f62ac49ecd5e | danieljharvey/mimsa | Repl.hs | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS -Wno-orphans #-}
module Calc.Repl
( repl,
)
where
import qualified Calc.Compile.RunLLVM as Run
import Calc.Compile.ToLLVM
import Calc.Pars... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/296ab9bcbdbaf682fa76921ce3c80d4bbafb52ae/llvm-calc/src/Calc/Repl.hs | haskell | # LANGUAGE OverloadedStrings #
# OPTIONS -Wno-orphans # | # LANGUAGE DerivingStrategies #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
module Calc.Repl
( repl,
)
where
import qualified Calc.Compile.RunLLVM as Run
import Calc.Compile.ToLLVM
import Calc.Parser
import Calc.Parser.Types
import Control.Monad.IO.Class
import... |
115a0972420ca9fc7fcfcd593c10fd245f2f0632afb04e4ab47ec2a79cc8461c | UU-ComputerScience/uhc | DerivingRead1.hs | {- ----------------------------------------------------------------------------------------
what : deriving, for Read (and Show), on some datatype
expected: ok
---------------------------------------------------------------------------------------- -}
module DerivingRead1 where
data T a = S | L Int | T a a |... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/DerivingRead1.hs | haskell | ----------------------------------------------------------------------------------------
what : deriving, for Read (and Show), on some datatype
expected: ok
---------------------------------------------------------------------------------------- |
module DerivingRead1 where
data T a = S | L Int | T a a | a :^: a
deriving (Show,Read)
main :: IO ()
main
= do putStrLn (show (read "S" :: T Int))
putStrLn (show (read "L 5" :: T Int))
putStrLn (show (read "T 2 3" :: T Int))
putStrLn (show (read "5 :^: 4" :: T Int))
|
c6f671c3fdaf5e7b47f7d5391eb83172685cdcc5a54b69dc9c95657dcee960b7 | paulrzcz/hquantlib | Models.hs | module QuantLib.Models
( module QuantLib.Models.Volatility
) where
import QuantLib.Models.Volatility | null | https://raw.githubusercontent.com/paulrzcz/hquantlib/7689b93fa9724b44755148b104ec6c6916d241c3/src/QuantLib/Models.hs | haskell | module QuantLib.Models
( module QuantLib.Models.Volatility
) where
import QuantLib.Models.Volatility | |
f2c6abaab7334c2df73121d7f327de537e277033aa6b41930c838ec641e81205 | arrdem/katamari | extensions.clj | Copyright ( c ) . All rights reserved .
; 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/arrdem/katamari/55e2da2c37c02774a1332e410ceebee0a0742d27/src/clojure-tools-deps/src/clojure/tools/deps/alpha/extensions.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 ) . All rights reserved .
(ns clojure.tools.deps.alpha.extensions
(:require [me.raynes.fs :as fs]))
(def manifest-types
["deps.edn" :deps,
"pom.xml" :pom
" project.clj " :
])
(defn detect-manifest
"Given a directory, detect the manifest type and return the manifest info."
[dir]
... |
ce212a29850b37ccf00674cc5c3bbc4cd3595709dd87363cdebb29214c8c28e1 | input-output-hk/ouroboros-network | Common.hs | {-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DerivingStrategies #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
| Various things common to iterations of the Praos protocol ... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/17889be3e1b6d9b5ee86022b91729837051e6fbb/ouroboros-consensus-protocol/src/Ouroboros/Consensus/Protocol/Praos/Common.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric #
# LANGUAGE DerivingStrategies #
* node support
| The maximum major protocol version.
Must be at least the current major protocol version. For Cardano mainnet, the
| View of the ledger tip... | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE TypeFamilies #
| Various things common to iterations of the Praos protocol .
module Ouroboros.Consensus.Protocol.Praos.Common (
MaxMajorProtVer (..)
, PraosCanBeLeader (..)
, PraosChainSelectView (..)
, PraosNonces (..)
, PraosProtocolSupp... |
0027430f0809f58fd65740ffa97447792344a4a887d8a26dc16dd744a76fc12c | al3623/rippl | ast.mli | type expr =
| IntLit of int | FloatLit of float | BoolLit of bool
| CharLit of char | WildCard
| Add | Sub | Mult | Div | Mod | Pow
| AddF | SubF | MultF | DivF | PowF | Neg | NegF
| Eq | EqF | Neq | NeqF | Geq | GeqF | Leq | LeqF
| Less | LessF | Greater | GreaterF
| And | Or | Not
| ... | null | https://raw.githubusercontent.com/al3623/rippl/a7e5c24f67935b3513324148279791042856a1fa/src/ast.mli | ocaml | Tuple operations
Maybe operations | type expr =
| IntLit of int | FloatLit of float | BoolLit of bool
| CharLit of char | WildCard
| Add | Sub | Mult | Div | Mod | Pow
| AddF | SubF | MultF | DivF | PowF | Neg | NegF
| Eq | EqF | Neq | NeqF | Geq | GeqF | Leq | LeqF
| Less | LessF | Greater | GreaterF
| And | Or | Not
| ... |
3e2ac6ef391066cf9412955260c6884fdd4277ef7bc3256ea3267bbda14be2ef | input-output-hk/marlowe-cardano | FSSemantics.hs | {-# OPTIONS_GHC -Wno-name-shadowing #-}
# OPTIONS_GHC -Wno - incomplete - uni - patterns #
# OPTIONS_GHC -Wno - incomplete - patterns #
{-# OPTIONS_GHC -Wno-unused-matches #-}
{-# OPTIONS_GHC -Wno-unused-imports #-}
module Language.Marlowe.Analysis.FSSemantics
where
import Data.List (foldl', genericIndex)
import Dat... | null | https://raw.githubusercontent.com/input-output-hk/marlowe-cardano/78a3dbb1cd692146b7d1a32e1e66faed884f2432/marlowe/src/Language/Marlowe/Analysis/FSSemantics.hs | haskell | # OPTIONS_GHC -Wno-name-shadowing #
# OPTIONS_GHC -Wno-unused-matches #
# OPTIONS_GHC -Wno-unused-imports #
-------------------------------------------------
Static analysis logic and symbolic operations --
-------------------------------------------------
Symbolic version of Input (with symbolic value but concrete i... | # OPTIONS_GHC -Wno - incomplete - uni - patterns #
# OPTIONS_GHC -Wno - incomplete - patterns #
module Language.Marlowe.Analysis.FSSemantics
where
import Data.List (foldl', genericIndex)
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as M
import Data.Maybe (isNothing)
import Data.SBV
import qualified ... |
8ed841788edab29cafb1a838131465448369463c16e33efc343f8d5c1fa44963 | yapsterapp/er-cassandra | statement_test.clj | (ns er-cassandra.record.statement-test
(:require
[er-cassandra.record.statement :as sut]
[clojure.test :as t]
[er-cassandra.util.test :as tu]
[schema.test :as st]
[clojure.test :refer [deftest is testing use-fixtures]]
[clj-uuid :as uuid])
(:import
[clojure.lang ExceptionInfo]))
(use-fixture... | null | https://raw.githubusercontent.com/yapsterapp/er-cassandra/1d059f47bdf8654c7a4dd6f0759f1a114fdeba81/test/er_cassandra/record/statement_test.clj | clojure | (ns er-cassandra.record.statement-test
(:require
[er-cassandra.record.statement :as sut]
[clojure.test :as t]
[er-cassandra.util.test :as tu]
[schema.test :as st]
[clojure.test :refer [deftest is testing use-fixtures]]
[clj-uuid :as uuid])
(:import
[clojure.lang ExceptionInfo]))
(use-fixture... | |
8cee795fc7a477bb7ef57d566d7db4ec95fe959813901a7e3a74ca68c8a97749 | raviksharma/bartosz-basics-of-haskell | ex3.hs | the sentence parser from ( Ex 2 ) to take a pluggable parser . The new function is called several and takes as an argument a generic function String->(a , String ) , which is supposed to parse a string and return the result of type a together with the leftover string . Use it to split a string into a list of numbers... | null | https://raw.githubusercontent.com/raviksharma/bartosz-basics-of-haskell/86d40d831f61415ef0022bff7fe7060ae6a23701/08-parser/ex3.hs | haskell | the sentence parser from ( Ex 2 ) to take a pluggable parser . The new function is called several and takes as an argument a generic function String->(a , String ) , which is supposed to parse a string and return the result of type a together with the leftover string . Use it to split a string into a list of numbers... | |
153ecb616301ff5755574914939563df2c09e3af5e9a1fd49f448aaa5ec37887 | herd/herdtools7 | mapply.ml | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/tools/mapply.ml | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2015 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
3471d7795aca9883a699acbbffeb520205a73566f118a639fc78bc3b5b647d35 | minad/intro | Intro.hs | {-# OPTIONS_HADDOCK show-extensions #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE TypeFamilies #
{-# LANGUAGE Safe #-}
-----------------------------------------------------------------------------
-- |
-- Module : Intro
Copyright : ( c ) 2... | null | https://raw.githubusercontent.com/minad/intro/45a0bbcfebae747c77e39d30f7ed9c7bb52ac098/src/Intro.hs | haskell | # OPTIONS_HADDOCK show-extensions #
# LANGUAGE OverloadedStrings #
# LANGUAGE Safe #
---------------------------------------------------------------------------
|
Module : Intro
Maintainer :
Stability : experimental
Portability : portable
for most of the partial functions and follows other
best pr... | # LANGUAGE FlexibleContexts #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TypeFamilies #
Copyright : ( c ) 2016 - 2017
License : MIT
Intro is a modern Prelude which provides safe alternatives
For String overloading the extension ' OverloadedStrings ' should be used .
Container types and Monad tra... |
04eca003bd429a7182eb54bae3c4b303b9d549d85de76b73b6b54b230914640e | eugeneia/athens | testfuns.lisp | ;;;; -*- mode: lisp; indent-tabs-mode: nil -*-
(in-package :crypto-tests)
(defun hex-string-to-byte-array (string &key (start 0) (end nil))
This function disappears from profiles if SBCL can inline the
;; POSITION call, so declare SPEED high enough to trigger that.
(declare (type string string) (optimize (speed ... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/ironclad-v0.40/testing/testfuns.lisp | lisp | -*- mode: lisp; indent-tabs-mode: nil -*-
POSITION call, so declare SPEED high enough to trigger that.
test vector files
cipher testing
encryption mode consistency checking
digest testing routines
Calling produce-digest twice should not give a wrong hash
mac testing routines
PRNG testing routines
Public key t... | (in-package :crypto-tests)
(defun hex-string-to-byte-array (string &key (start 0) (end nil))
This function disappears from profiles if SBCL can inline the
(declare (type string string) (optimize (speed 2)))
(let* ((end (or end (length string)))
(length (/ (- end start) 2))
(key (make-array leng... |
420bcd24756a51b50f795fca7855a011464b8a88cadc30d5031e63104ec48b22 | larandaA/hgraphs | BfsSpec.hs | module Data.Graph.Abstract.Accessor.Algorithm.BfsSpec (spec) where
import Control.Monad
import qualified Data.Graph.Abstract as GA
import qualified Data.Graph.Abstract.Accessor as GAA
import qualified Data.Graph.Abstract.Accessor.Algorithm.Bfs as Bfs
import qualified Data.Graph.Abstract.Builder as GAB
import qu... | null | https://raw.githubusercontent.com/larandaA/hgraphs/322b5cdfafbae851b4251c907e2c81b82cf02d4a/test/Data/Graph/Abstract/Accessor/Algorithm/BfsSpec.hs | haskell | module Data.Graph.Abstract.Accessor.Algorithm.BfsSpec (spec) where
import Control.Monad
import qualified Data.Graph.Abstract as GA
import qualified Data.Graph.Abstract.Accessor as GAA
import qualified Data.Graph.Abstract.Accessor.Algorithm.Bfs as Bfs
import qualified Data.Graph.Abstract.Builder as GAB
import qu... | |
556b5e22c435ac884bbb4087e16830c2dcfb4061ec342d958bbbab7109449f85 | xapi-project/xen-api | quicktest_http.ml |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... | null | https://raw.githubusercontent.com/xapi-project/xen-api/6c2aadbb44166b389a3bd956c8a6af5787003d68/ocaml/quicktest/quicktest_http.ml | ocaml | root:bar
* Tests that invalid pool secrets are rejected.
* Tests that invalid basic authentication fails. |
* Copyright ( C ) 2006 - 2009 Citrix Systems Inc.
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation ; version 2.1 only . with the special
* exception on linking describe... |
a4e41bffe0b95ea1e9a9eb00dcdd8270085bcaaa60d44767d3bbb2015851f672 | adlai/scalpl | qd.lisp | (defpackage #:scalpl.qd
(:use #:cl #:chanl #:anaphora #:local-time
#:scalpl.util #:scalpl.exchange #:scalpl.actor)
(:export #:ope-placed #:ope-place #:ope-cancel
#:prioritizer #:prioriteaze
#:next-bids #:next-asks #:sufficiently-different?))
(in-package #:scalpl.qd)
;;;
;;; ENGINE
;... | null | https://raw.githubusercontent.com/adlai/scalpl/39a0d49be18f36b0f339fc5482e946924b658e21/qd.lisp | lisp |
ENGINE
bids asks
response: placed offer if successful, nil if not
response: trueish = offer no longer placed, nil = unknown badness
FIXME: s/ll/sh/!?
TODO: deal with partially completed orders
do (break)
FIXME: s/ll/sh/
this is starting to rhyme
someday dispatch on market
which o... | (defpackage #:scalpl.qd
(:use #:cl #:chanl #:anaphora #:local-time
#:scalpl.util #:scalpl.exchange #:scalpl.actor)
(:export #:ope-placed #:ope-place #:ope-cancel
#:prioritizer #:prioriteaze
#:next-bids #:next-asks #:sufficiently-different?))
(in-package #:scalpl.qd)
(defun ope-place... |
c09db15dde6e7bbda644b3b78f1fbb89e9f61b7d585b91cbad83131ea285ab74 | exercism/erlang | grade_school_tests.erl | Generated with ' v0.2.0 '
%% Revision 1 of the exercises generator was used
%% -specifications/raw/7a8722ac4546baae28b4b2c1bdae14e04fdba88c/exercises/grade-school/canonical-data.json
%% This file is automatically generated from the exercises canonical data.
-module(grade_school_tests).
-include_lib("erl_exercism/i... | null | https://raw.githubusercontent.com/exercism/erlang/9b3d3c14ef826e7efbc4fcd024fd20ed09332562/exercises/practice/grade-school/test/grade_school_tests.erl | erlang | Revision 1 of the exercises generator was used
-specifications/raw/7a8722ac4546baae28b4b2c1bdae14e04fdba88c/exercises/grade-school/canonical-data.json
This file is automatically generated from the exercises canonical data. | Generated with ' v0.2.0 '
-module(grade_school_tests).
-include_lib("erl_exercism/include/exercism.hrl").
-include_lib("eunit/include/eunit.hrl").
'1_roster_is_empty_when_no_student_is_added_test_'() ->
S0 = grade_school:new(),
{"Roster is empty when no student is added",
?_assertEqual([], lists:s... |
d8eb00f691b0d0ba1b797aacbafaa8ba6e0238d3548032c3a9548369cba79445 | janestreet/memtrace_viewer_with_deps | weak_pointer.ml | (* We implement a weak pointer using a [Weak_array.t]. *)
open! Core_kernel
type 'a t = 'a Weak_array.t
let create () = Weak_array.create ~len:1
We use a weak array of length 1 , so the weak pointer is at index 0 .
let index = 0
let get t = Weak_array.get t index
let sexp_of_t sexp_of_a t = [%sexp (get t : a He... | null | https://raw.githubusercontent.com/janestreet/memtrace_viewer_with_deps/5a9e1f927f5f8333e2d71c8d3ca03a45587422c4/vendor/core_kernel/weak_pointer/src/weak_pointer.ml | ocaml | We implement a weak pointer using a [Weak_array.t]. |
open! Core_kernel
type 'a t = 'a Weak_array.t
let create () = Weak_array.create ~len:1
We use a weak array of length 1 , so the weak pointer is at index 0 .
let index = 0
let get t = Weak_array.get t index
let sexp_of_t sexp_of_a t = [%sexp (get t : a Heap_block.t option)]
let is_none t = Weak_array.is_none t ... |
339d662e5158c8a64310d7f22881ba889a39f568ed8829ac5194f84c54a45b65 | gfour/gic | exmh20.hs | result = apply four 3;
apply f x = f x;
four y = w y;
z y1 = y1 * y1;
w y2 = z y2 * z y2
| null | https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/Examples/Num/exmh20.hs | haskell | result = apply four 3;
apply f x = f x;
four y = w y;
z y1 = y1 * y1;
w y2 = z y2 * z y2
| |
126b6d186dc96e5d0f027313815125fbc396726bd8955c627c5fe2725a14bf6f | ocaml-opam/opam-compiler | main.ml | let () = Opam_compiler.Cli.main ()
| null | https://raw.githubusercontent.com/ocaml-opam/opam-compiler/5fa28d623f06d8be6856ac167a11fbf347caef19/bin/main.ml | ocaml | let () = Opam_compiler.Cli.main ()
| |
d7af35b021fac10ea8b623eb8f3fd624aa898b9475af56b0a4546051eda6a817 | senapk/funcional_arcade | solver.hs | concatmap :: (a -> [b]) -> [a] -> [b]
concatmap fn xs = foldl (++) [] (map fn xs)
| null | https://raw.githubusercontent.com/senapk/funcional_arcade/70fa04b4799d5a8c7e5add39d9f217f38f418600/base/067/solver.hs | haskell | concatmap :: (a -> [b]) -> [a] -> [b]
concatmap fn xs = foldl (++) [] (map fn xs)
| |
e2da88043a36bf6a0807827e287257ad2260dee708bf653d80c4f47bb2aed122 | con-kitty/categorifier | Client.hs | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wno - orphans #
module Categorifier.LinearBase.Client
( HasRep (..),
deriveHasRep,
)
where
import Categorifier.Client (HasRep (..), deriveHasRep)
import Control.Functor.Linear (Data, ReaderT, StateT)
import Control.Optics.Linear (Optic_)
im... | null | https://raw.githubusercontent.com/con-kitty/categorifier/d8dc1106c4600c2168889519d2c3f843db2e9410/integrations/linear-base/integration/Categorifier/LinearBase/Client.hs | haskell | # LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -Wno - orphans #
module Categorifier.LinearBase.Client
( HasRep (..),
deriveHasRep,
)
where
import Categorifier.Client (HasRep (..), deriveHasRep)
import Control.Functor.Linear (Data, ReaderT, StateT)
import Control.Optics.Linear (Optic_)
im... | |
a0293339f1b0341111e72d7176ad2308f62f271219e2ec5178dba726b6bf7294 | well-typed/cborg | PkgAesonGeneric.hs | # OPTIONS_GHC -fno - warn - orphans #
module Micro.PkgAesonGeneric where
import Micro.Types
import Data.Aeson as Aeson
import Data.ByteString.Lazy as BS
import Data.Maybe
serialise :: Tree -> BS.ByteString
serialise = Aeson.encode
deserialise :: BS.ByteString -> Tree
deserialise = fromJust . Aeson.decode'
instance ... | null | https://raw.githubusercontent.com/well-typed/cborg/9be3fd5437f9d2ec1df784d5d939efb9a85fd1fb/serialise/bench/micro/Micro/PkgAesonGeneric.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Micro.PkgAesonGeneric where
import Micro.Types
import Data.Aeson as Aeson
import Data.ByteString.Lazy as BS
import Data.Maybe
serialise :: Tree -> BS.ByteString
serialise = Aeson.encode
deserialise :: BS.ByteString -> Tree
deserialise = fromJust . Aeson.decode'
instance ... | |
684d960dc3841a1136ea74606e7f51d845b720716cc19c6502a3ddb483a1d715 | janestreet/hardcaml_circuits | rac.mli | * ROM - accumulator .
Evaluate [ a0.x0 + a1.x1 + ... + an.xn ] where the [ ai ] are constants , using
distributed arithmetic . The architecture uses a rom and add / shift circuit and
requires no multipliers .
The ROM - accumulator extends the idea of multiplication by adding and shifting .
... | null | https://raw.githubusercontent.com/janestreet/hardcaml_circuits/a2c2d1ea3e6957c3cda4767d519e94c20f1172b2/src/rac.mli | ocaml | * Width of the accumulator.
* Width of input data.
* Number of coefficients.
* Extra least significant bits added to the accumulator. This can add extra
precision without extending the rom size.
Load input data to internal shift registers
* Create the Rom-accumulator. | * ROM - accumulator .
Evaluate [ a0.x0 + a1.x1 + ... + an.xn ] where the [ ai ] are constants , using
distributed arithmetic . The architecture uses a rom and add / shift circuit and
requires no multipliers .
The ROM - accumulator extends the idea of multiplication by adding and shifting .
... |
62e140aa01f0b2924b26848467e39b260e286a748617347474110608772bffda | nuvla/api-server | configuration_session_mitreid_token.clj | (ns sixsq.nuvla.server.resources.configuration-session-mitreid-token
(:require
[sixsq.nuvla.server.resources.common.std-crud :as std-crud]
[sixsq.nuvla.server.resources.common.utils :as u]
[sixsq.nuvla.server.resources.configuration :as p]
[sixsq.nuvla.server.resources.spec.configuration-template-sess... | null | https://raw.githubusercontent.com/nuvla/api-server/a64a61b227733f1a0a945003edf5abaf5150a15c/code/src/sixsq/nuvla/server/resources/configuration_session_mitreid_token.clj | clojure |
multimethods for validation
initialization
| (ns sixsq.nuvla.server.resources.configuration-session-mitreid-token
(:require
[sixsq.nuvla.server.resources.common.std-crud :as std-crud]
[sixsq.nuvla.server.resources.common.utils :as u]
[sixsq.nuvla.server.resources.configuration :as p]
[sixsq.nuvla.server.resources.spec.configuration-template-sess... |
0ccbb9c58abdfab966e6d32723a0ed44bb3ccde445b4b20ebe35cd6bdbc930e5 | juxt/site | nrepl.clj | Copyright © 2021 , JUXT LTD .
(ns juxt.site.alpha.nrepl
(:require
[clojure.tools.logging :as log]
[integrant.core :as ig]
[nrepl.server :refer [start-server stop-server]]))
(alias 'site (create-ns 'juxt.site.alpha))
(defmethod ig/init-key ::server [_ {::site/keys [port] :as opts}]
(log/infof "Starting... | null | https://raw.githubusercontent.com/juxt/site/f45326476e9793e812839f1f0a465e11d29e2bb4/src/juxt/site/alpha/nrepl.clj | clojure | Copyright © 2021 , JUXT LTD .
(ns juxt.site.alpha.nrepl
(:require
[clojure.tools.logging :as log]
[integrant.core :as ig]
[nrepl.server :refer [start-server stop-server]]))
(alias 'site (create-ns 'juxt.site.alpha))
(defmethod ig/init-key ::server [_ {::site/keys [port] :as opts}]
(log/infof "Starting... | |
cef8ecd378842e9cb4b2a482c429886b6725c7e0ec8289677916268ed9e34e96 | racket/rhombus-prototype | entry-point-macro.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse/pre)
"space-provide.rkt"
"entry-point.rkt"
"space.rkt"
"name-root.rkt")
(define+provide-space entry_point rhombus/entry_point
#:fields
(macro))
(define-syntax macro
(lambda (stx)
(raise-s... | null | https://raw.githubusercontent.com/racket/rhombus-prototype/4e66c1361bdde51c2df9332644800baead49e86f/rhombus/private/entry-point-macro.rkt | racket | #lang racket/base
(require (for-syntax racket/base
syntax/parse/pre)
"space-provide.rkt"
"entry-point.rkt"
"space.rkt"
"name-root.rkt")
(define+provide-space entry_point rhombus/entry_point
#:fields
(macro))
(define-syntax macro
(lambda (stx)
(raise-s... | |
de4dc5644ab295a6cba808fccc9d7d97c71d0a29d36f8f5d22e54b6aa3335e4f | pallet/pallet | plugin.clj | (ns pallet.plugin (:require
[chiba.plugin :refer [plugins]]))
(defn load-plugins
"Load pallet plugins"
[]
(let [plugin-namespaces (plugins "pallet.plugin." #".*test.*")]
(doseq [plugin plugin-namespaces]
(require plugin)
(when-let [init (ns-resolve plugin 'init)]
(init)... | null | https://raw.githubusercontent.com/pallet/pallet/30226008d243c1072dcfa1f27150173d6d71c36d/src/pallet/plugin.clj | clojure | (ns pallet.plugin (:require
[chiba.plugin :refer [plugins]]))
(defn load-plugins
"Load pallet plugins"
[]
(let [plugin-namespaces (plugins "pallet.plugin." #".*test.*")]
(doseq [plugin plugin-namespaces]
(require plugin)
(when-let [init (ns-resolve plugin 'init)]
(init)... | |
380f581c20c4b0edb2c8f7b33788f318001c9ed87c2350a31b26414f97290c84 | haskus/haskus-system | Devices.hs | {-# LANGUAGE OverloadedStrings #-}
module Haskus.Tests.System.Devices
( testsDevices
)
where
import Test.Tasty
import Test.Tasty.QuickCheck as QC
import Test.QuickCheck.Monadic
import Haskus.System.Devices
import Data.Maybe
import qualified Data.Map as Map
import Control.Concurrent.STM
treeRoot :: IO Device... | null | https://raw.githubusercontent.com/haskus/haskus-system/38b3a363c26bc4d82e3493d8638d46bc35678616/haskus-system/src/tests/Haskus/Tests/System/Devices.hs | haskell | # LANGUAGE OverloadedStrings # |
module Haskus.Tests.System.Devices
( testsDevices
)
where
import Test.Tasty
import Test.Tasty.QuickCheck as QC
import Test.QuickCheck.Monadic
import Haskus.System.Devices
import Data.Maybe
import qualified Data.Map as Map
import Control.Concurrent.STM
treeRoot :: IO DeviceTree
treeRoot = deviceTreeCreate No... |
4ace5f7c04d6251fcbba54dd187534b81ef5f83f4ce9a802c4c79103d5face21 | Opetushallitus/ataru | lomake.cljs | (ns ataru.virkailija.dev.lomake)
(def translations {:translations #js {}})
(def controller {:controller
(clj->js {:getCustomComponentTypeMapping (fn [] #js [])
:componentDidMount (fn [field value])
:createCustomComponent (fn [p... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/2d8ef1d3f972621e301a3818567d4e11219d2e82/src/cljs/ataru/virkailija/dev/lomake.cljs | clojure | (ns ataru.virkailija.dev.lomake)
(def translations {:translations #js {}})
(def controller {:controller
(clj->js {:getCustomComponentTypeMapping (fn [] #js [])
:componentDidMount (fn [field value])
:createCustomComponent (fn [p... | |
3583df8b0c7fc3853a3eaa760f68dd33d597349ad4c2759a0b5cf6fdace1361f | 5HT/ant | Opaque.ml |
exception Type_error;
type opaque 'a =
{
data : !'b . 'b;
type_info : type_info 'a
}
and type_info 'a =
{
name : string;
apply : opaque 'a -> 'a -> 'a;
compare : opaque 'a -> opaque 'a -> bool;
unify : opaque 'a -> opaque 'a -> bool
};
value type_name x = x.type_info.name;
value same_type x ... | null | https://raw.githubusercontent.com/5HT/ant/6acf51f4c4ebcc06c52c595776e0293cfa2f1da4/VM/Opaque.ml | ocaml |
exception Type_error;
type opaque 'a =
{
data : !'b . 'b;
type_info : type_info 'a
}
and type_info 'a =
{
name : string;
apply : opaque 'a -> 'a -> 'a;
compare : opaque 'a -> opaque 'a -> bool;
unify : opaque 'a -> opaque 'a -> bool
};
value type_name x = x.type_info.name;
value same_type x ... | |
9d1ddf449c5f69be08ec74b5a984b8573f2aef42542bce1615e24c2e9e6eaf8f | FundingCircle/jackdaw | edn.clj | (ns jackdaw.serdes.edn
"DEPRECATION NOTICE:
This namespace is deprecated. Please use jackdaw.serdes/edn-serde.
The behavior of the new EDN serde is different. It does not print
the newline.
Implements an EDN SerDes (Serializer/Deserializer)."
{:license "BSD 3-Clause License <>"}
(:require [clojure.edn]... | null | https://raw.githubusercontent.com/FundingCircle/jackdaw/e0c66d386277282219e070cfbd0fe2ffa3c9dca5/src/jackdaw/serdes/edn.clj | clojure | (ns jackdaw.serdes.edn
"DEPRECATION NOTICE:
This namespace is deprecated. Please use jackdaw.serdes/edn-serde.
The behavior of the new EDN serde is different. It does not print
the newline.
Implements an EDN SerDes (Serializer/Deserializer)."
{:license "BSD 3-Clause License <>"}
(:require [clojure.edn]... | |
66b6d2f6be95989d1ad4cdb1d5edc5825d32eac02cc87b418936a02d1b86655d | emqx/emqx | emqx_pqueue_SUITE.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2018 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/emqx/dbc10c2eed3df314586c7b9ac6292083204f1f68/apps/emqx/test/emqx_pqueue_SUITE.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2018 - 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(emqx_pqueue_SUITE).
-compile(export_all).
-compile(nowarn_export_all).
-include_lib("e... |
6189856fc4dc2e9ee984d5c16bb7545893f5478d8e95d5675973cfa7a21160f3 | andrenth/srsly | milter_callbacks.mli | type ops =
{ is_remote_sender : (string -> bool Lwt.t)
; choose_forward_domain : (string list -> string option Lwt.t)
}
val init : ops -> unit
val connect : Milter.ctx -> string option -> Unix.sockaddr option -> Milter.stat
val helo : Milter.ctx -> string -> Milter.stat
val envfrom : Milter.ctx -> string ->... | null | https://raw.githubusercontent.com/andrenth/srsly/fce92645781a6a6037512be4d35116ec53737b17/src/milter_callbacks.mli | ocaml | type ops =
{ is_remote_sender : (string -> bool Lwt.t)
; choose_forward_domain : (string list -> string option Lwt.t)
}
val init : ops -> unit
val connect : Milter.ctx -> string option -> Unix.sockaddr option -> Milter.stat
val helo : Milter.ctx -> string -> Milter.stat
val envfrom : Milter.ctx -> string ->... | |
63f5ba8d056ee803532b0dba4b52d10d13c4edb5843d1aff20e2201b60651195 | mark-gerarts/nature-of-code | sketch.lisp | (defpackage :nature-of-code.vectors.example-5
(:export :start-sketch)
(:use :cl :trivial-gamekit)
(:import-from :cl-bodge.engine :vector-length))
(in-package :nature-of-code.vectors.example-5)
(defvar *width* 800)
(defvar *height* 600)
(defvar *black* (vec4 0 0 0 1))
(defun draw-magnitude (magnitude)
(let ((... | null | https://raw.githubusercontent.com/mark-gerarts/nature-of-code/4f8612e18a2a62012e44f08a8e0a4f8aec21a1ec/01.%20Vectors/Example%201.5%20-%20Vector%20magnitude/sketch.lisp | lisp | The vector
The magnitude | (defpackage :nature-of-code.vectors.example-5
(:export :start-sketch)
(:use :cl :trivial-gamekit)
(:import-from :cl-bodge.engine :vector-length))
(in-package :nature-of-code.vectors.example-5)
(defvar *width* 800)
(defvar *height* 600)
(defvar *black* (vec4 0 0 0 1))
(defun draw-magnitude (magnitude)
(let ((... |
2b74d363cc6cc9251f9b7a190ff8daee78d37d910d3841008c9867627704406b | kuenishi/riak_scr_jp | otp_intro_sup.erl |
-module(otp_intro_sup).
-behaviour(supervisor).
%% API
-export([start_link/0]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
%% ========================================================... | null | https://raw.githubusercontent.com/kuenishi/riak_scr_jp/7b556227b4439bb18f5eb53822a4247fcbe0ecdd/talks/%235/sample/src/otp_intro_sup.erl | erlang | API
Supervisor callbacks
Helper macro for declaring children of supervisor
===================================================================
API functions
===================================================================
===================================================================
Supervisor callback... |
-module(otp_intro_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
-define(CHILD(I, Type), {I, {I, start_link, []}, permanent, 5000, Type, [I]}).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
{ok, { {one_for_one, 5, 10}, [?CHILD(otp_echo_serv... |
e31a2ef14d693b71cbed843811d80e5936a708bc5ed0df9a16e7a4fee4bb4f71 | the-real-blackh/sodium-2d-game-engine | Cache.hs | module FRP.Sodium.GameEngine2D.Cache (
Cache,
readCache,
writeCache,
newCache,
flipCache
) where
import FRP.Sodium.GameEngine2D.Geometry
import FRP.Sodium.GameEngine2D.Platform (Key)
import Control.Applicative
import Control.Monad
import Data.IORef
import Data.Map (Map)
imp... | null | https://raw.githubusercontent.com/the-real-blackh/sodium-2d-game-engine/fb765eb50d39f0297274c2d24cd71dcec2dc2c2a/FRP/Sodium/GameEngine2D/Cache.hs | haskell | when (not $ M.null toClean) $ print (M.keys toClean) | module FRP.Sodium.GameEngine2D.Cache (
Cache,
readCache,
writeCache,
newCache,
flipCache
) where
import FRP.Sodium.GameEngine2D.Geometry
import FRP.Sodium.GameEngine2D.Platform (Key)
import Control.Applicative
import Control.Monad
import Data.IORef
import Data.Map (Map)
imp... |
aeea8b29e98b6f79f082a2481f6d6d3d7e110c208b460e7f998c6e6221171524 | ivanperez-keera/Yampa | TestsCommon.hs | -- |
Module : TestsCommon
-- Description : Common definitions for the regression test modules.
Copyright : Yale University , 2003
Authors : and
module TestsCommon where
import FRP.Yampa
-- * Rough equality with instances
-- Rough equality. Only intended to be good enough for test cases in thi... | null | https://raw.githubusercontent.com/ivanperez-keera/Yampa/af3a3393e7e059ffb813dc4381e91b2ffab7efc6/yampa-test/tests/TestsCommon.hs | haskell | |
Description : Common definitions for the regression test modules.
* Rough equality with instances
Rough equality. Only intended to be good enough for test cases in this
module.
A relative measure should be used.
A relative measure should be used.
----------------------------------------------------------------... | Module : TestsCommon
Copyright : Yale University , 2003
Authors : and
module TestsCommon where
import FRP.Yampa
class REq a where
(~=) :: a -> a -> Bool
epsilon :: Fractional a => a
epsilon = 0.0001
instance REq Float where
instance REq Double where
instance REq Int where
(~=) = (==)... |
53fa021627116112f924af521ce544f15f2d6ff94c107dde121a1a2a4ca0bd90 | michalkonecny/aern2 | Conversions.hs | # OPTIONS_GHC -Wno - orphans #
|
Module : AERN2.MP.Float . Conversions
Description : Conversions and comparisons of arbitrary precision floats
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Conversions and comparisons o... | null | https://raw.githubusercontent.com/michalkonecny/aern2/f42a9cc59006bdeda270ac969e1e7b414ad2223d/aern2-mp/src/AERN2/MP/Float/Conversions.hs | haskell | * comparisons and constants (see also instances)
import AERN2.Norm
comparisons
constants | # OPTIONS_GHC -Wno - orphans #
|
Module : AERN2.MP.Float . Conversions
Description : Conversions and comparisons of arbitrary precision floats
Copyright : ( c ) : :
Stability : experimental
Portability : portable
Conversions and comparisons o... |
f9c0e1285005c7560879330ce2cf9a7cb7bca641f89bfc51b2cd8c614bd3445b | IndecisionTree/adventofcode2022 | Tree.hs | module Utils.Tree (
BTree (..),
Context (..),
Zipper,
mkZipper,
unZipper,
up,
down,
topmost,
insert,
findChild,
modify
) where
import Data.Bifunctor (first)
import Data.List (elemIndex, findIndex)
data BTree a = Node a [BTree a] | Leaf a
deriving (Eq, Show, Functor)
data Context a = Root | Br... | null | https://raw.githubusercontent.com/IndecisionTree/adventofcode2022/3ef082dc306acca983ff1c4e9845c0638cc6f390/solutions/Utils/Tree.hs | haskell | module Utils.Tree (
BTree (..),
Context (..),
Zipper,
mkZipper,
unZipper,
up,
down,
topmost,
insert,
findChild,
modify
) where
import Data.Bifunctor (first)
import Data.List (elemIndex, findIndex)
data BTree a = Node a [BTree a] | Leaf a
deriving (Eq, Show, Functor)
data Context a = Root | Br... | |
e056d90c7d91fd4472c5b82ba1a474518092614ad96b2b85c297df13eee5f947 | MarcosPividori/push-notify | Types.hs | # LANGUAGE OverloadedStrings , DeriveGeneric #
| This Module defines the main data types for the Push Service .
module Network.PushNotify.General.Types
( -- * Push Settings
Device(..)
, PushServiceConfig(..)
, RegisterResult(..)
, GCMConfig(..)
, PushConfig(..)
-- * Push Manager
... | null | https://raw.githubusercontent.com/MarcosPividori/push-notify/4c023c3fd731178d1d114774993a5e337225baa1/push-notify-general/Network/PushNotify/General/Types.hs | haskell | * Push Settings
* Push Manager
* Push Message
* Push Result
| Unique identifier of an app/device.
^ An iOS app.
| General notification to be sent.
| 'generalNotif' Builds a general notification from JSON data.
| Settings for GCM service.
^ Main configuration.
^ The callback function to be called when ... | # LANGUAGE OverloadedStrings , DeriveGeneric #
| This Module defines the main data types for the Push Service .
module Network.PushNotify.General.Types
Device(..)
, PushServiceConfig(..)
, RegisterResult(..)
, GCMConfig(..)
, PushConfig(..)
, PushManager(..)
, PushNotification(..)
, ... |
001056b5646aebf78a9ef750cb215e63ff39b8412b9b352f5954ed73459b8b04 | part-cw/lambdanative | graph-ccode.scm | ;; graph c code snippets
(c-declare #<<end-of-c-declare
#include <stdio.h>
#include <string.h>
#include <math.h>
#define TRUE 1
#define FALSE 0
#define DOWN 0
#define UP 1
#define EVEN 2
static char *graph_wc_linecomp(char *line, int Ept){
int count;
if (line[Ept-1] == '.'){ /* ERASE THE DECIMAL ... | null | https://raw.githubusercontent.com/part-cw/lambdanative/74ec19dddf2f2ff787ee70ad677bc13b9dfafc29/modules/graph/graph-ccode.scm | scheme | graph c code snippets
var<=range;var += numsep*ticks) {
// original
/* "-" --> "\261" */
/* just copy */
/* string terminator */
/* return ptr to the fixed string */ | (c-declare #<<end-of-c-declare
#include <stdio.h>
#include <string.h>
#include <math.h>
#define TRUE 1
#define FALSE 0
#define DOWN 0
#define UP 1
#define EVEN 2
static char *graph_wc_linecomp(char *line, int Ept){
if (line[Ept-1] == '.'){ /* ERASE THE DECIMAL POINT */
while (line[count] ... |
957cf1e9a4b008052b5fc0f253b6a75489928f535a888cb67250b882f0e21995 | lspitzner/brittany | Test501.hs | -- brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft }
func = do
Foo
{ _lstate_indent = _lstate_indent lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd
, _lstate_foo = _lstate_foo lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd
}
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test501.hs | haskell | brittany { lconfig_columnAlignMode: { tag: ColumnAlignModeDisabled }, lconfig_indentPolicy: IndentPolicyLeft } | func = do
Foo
{ _lstate_indent = _lstate_indent lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd
, _lstate_foo = _lstate_foo lkasdlkjalsdjlakjsdlkjasldkjalskdjlkajsd
}
|
90dd471c754c0b3fa092ab1b22304a1066431a306881222c488dc5c157ebb305 | lingnand/VIMonad | InsertPosition.hs | module XMonad.Vim.InsertPosition
(
InsertPosition(..)
, insertPositionKeys
) where
data InsertPosition = Before | After | Head | Last deriving Eq
instance Show InsertPosition where
show Before = "insert before"
show After = "insert after"
show Head = "insert head"
show Last = "insert ... | null | https://raw.githubusercontent.com/lingnand/VIMonad/048e419fc4ef57a5235dbaeef8890faf6956b574/XMonadContrib/XMonad/Vim/InsertPosition.hs | haskell | module XMonad.Vim.InsertPosition
(
InsertPosition(..)
, insertPositionKeys
) where
data InsertPosition = Before | After | Head | Last deriving Eq
instance Show InsertPosition where
show Before = "insert before"
show After = "insert after"
show Head = "insert head"
show Last = "insert ... | |
335e422f17b1001e5675de79db777d44091e2075f4dee76f3784a1f1eee24857 | hannesm/gmap | gmap.ml | ( c ) 2017 , 2018 , all rights reserved
this code would n't exist without , thanks for the help !
module Order = struct
type (_,_) t =
| Lt : ('a, 'b) t
| Eq : ('a, 'a) t
| Gt : ('a, 'b) t
end
module type KEY = sig
type _ t
val compare : 'a t -> 'b t -> ('a, 'b) Order.t
end
module type S =... | null | https://raw.githubusercontent.com/hannesm/gmap/10496da1ff70c5872fc5c7e28ee8cb73720dfae6/gmap.ml | ocaml | Map.merge never calls f None None, just for the types
see above comment about compare
see above comment about compare | ( c ) 2017 , 2018 , all rights reserved
this code would n't exist without , thanks for the help !
module Order = struct
type (_,_) t =
| Lt : ('a, 'b) t
| Eq : ('a, 'a) t
| Gt : ('a, 'b) t
end
module type KEY = sig
type _ t
val compare : 'a t -> 'b t -> ('a, 'b) Order.t
end
module type S =... |
5e62388041a42a02037d75f85c2cc5b318268b0245cd1d399cce7f865f49b603 | alavrik/piqi-erlang | piqic_erlang_out.erl | Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, ... | null | https://raw.githubusercontent.com/alavrik/piqi-erlang/063ecc4f8fd54543acf01953b0a63b2b7ebf17a9/src/piqic_erlang_out.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing perm... | Copyright 2009 , 2010 , 2011 , 2012 , 2013 , 2014
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
generation of gen_*/1,2,3 functions for Protocol Buffers , JSON , XML and Piq
-module(piqic_erlang_out).
-compile([expor... |
3924560b64d4f9726e14c45f267cf2c7ff95da38fb43b28d64f89309c44a2ea0 | lexi-lambda/hackett | require.rkt | #lang racket/base
(require (for-syntax racket/base)
racket/require
racket/require-syntax
syntax/parse/define)
(provide postfix-in)
(define-for-syntax ((add-postfix postfix) str)
(string-append str postfix))
(define-require-syntax postfix-in
(syntax-parser
[(_ post-id:id require-sp... | null | https://raw.githubusercontent.com/lexi-lambda/hackett/e90ace9e4a056ec0a2a267f220cb29b756cbefce/hackett-lib/hackett/private/util/require.rkt | racket | #lang racket/base
(require (for-syntax racket/base)
racket/require
racket/require-syntax
syntax/parse/define)
(provide postfix-in)
(define-for-syntax ((add-postfix postfix) str)
(string-append str postfix))
(define-require-syntax postfix-in
(syntax-parser
[(_ post-id:id require-sp... | |
d70e0b765b3cce4bf33509f5d034050ce8d2df44f79a7384101440d0d74c666a | srid/neuron | Query.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE GADTs #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoImplicitPrelude #
module Neuron.CLI.Query
( runQuery,
)
where
import Colog (WithLog)
import Data.Ae... | null | https://raw.githubusercontent.com/srid/neuron/bfa276ee6eb7b146408e16653b2188d974ee993e/src/Neuron/CLI/Query.hs | haskell | # LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
Sort hash map by keys for consistency | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE NoImplicitPrelude #
module Neuron.CLI.Query
( runQuery,
)
where
import Colog (WithLog)
import Data.Aeson (ToJSON)
import qualified Data.Aeson as Aeson
import qualified Data.Aeson.Encode.P... |
b50c8b40ee4161db9e6e92bd85b9485b7ad9aca5a6ae3e42ca0d8dad7d97aa03 | jesperes/aoc_erlang | aoc2020_day11.erl | %%%=============================================================================
%%% @doc Advent of code puzzle solution
%%% @end
%%%=============================================================================
-module(aoc2020_day11).
-behavior(aoc_puzzle).
-export([ parse/1
, solve1/1
, solve2/1
... | null | https://raw.githubusercontent.com/jesperes/aoc_erlang/cd92fe4ae4203876e6d7d3e8ea55c73544faac78/src/2020/aoc2020_day11.erl | erlang | =============================================================================
@doc Advent of code puzzle solution
@end
=============================================================================
------------------------------------------------------------------------------
@doc info/0
Returns info about this puzz... | -module(aoc2020_day11).
-behavior(aoc_puzzle).
-export([ parse/1
, solve1/1
, solve2/1
, info/0
]).
-include("aoc_puzzle.hrl").
-spec info() -> aoc_puzzle().
info() ->
#aoc_puzzle{ module = ?MODULE
, year = 2020
, day = 11
, name = "Seating Sy... |
5aa34f3ecf73eb27491dca94e9a7726304da6e16a61303451c19909796b63d91 | racket/old-plt | update-binding-counts.scm | ;; This library is used by match.ss
(define-values (update-binding-counts update-binding-count)
(letrec
(
;;!(function update-binding-count
;; (form (update-binding-count render-list) -> list)
;; (contract list -> list))
;; This function is normally executed for i... | null | https://raw.githubusercontent.com/racket/old-plt/a580d75deae2a0d2f3d8a93bc3c4f8f1f619b5b7/collects/mzlib/private/plt-match/update-binding-counts.scm | scheme | This library is used by match.ss
!(function update-binding-count
(form (update-binding-count render-list) -> list)
(contract list -> list))
This function is normally executed for its side effect of
setting the count for the number of times an expression used in
a test if found in the rest of the... |
(define-values (update-binding-counts update-binding-count)
(letrec
(
(update-binding-count
(lambda (render-list)
(define (inc-bind-count test)
(set-test-bind-count! test
(add1 (test-bind-count test))))
(if (null? render-list)
... |
aec93583d0bc458596627041d9f45bf91f994c31f9afe0a8d941ff8a12537487 | neilprosser/mr-maestro | setup_test.clj | (ns maestro.setup-test
(:require [cheshire.core :as json]
[clj-time.core :as time]
[maestro.setup :refer :all]
[midje.sweet :refer :all]))
(fact "that we configurate Joda correctly"
(configure-joda)
(json/generate-string (time/now)) => truthy)
| null | https://raw.githubusercontent.com/neilprosser/mr-maestro/469790fd712262016729c1d83d4b4e11869237a2/test/maestro/setup_test.clj | clojure | (ns maestro.setup-test
(:require [cheshire.core :as json]
[clj-time.core :as time]
[maestro.setup :refer :all]
[midje.sweet :refer :all]))
(fact "that we configurate Joda correctly"
(configure-joda)
(json/generate-string (time/now)) => truthy)
| |
a21342b034a6e1357d4ae5f1e4445dedfb3cfa5d4e6bb00ce7731b1dcd765a22 | fujita-y/ypsilon | parameters.scm | #!nobacktrace
(library (srfi :39 parameters) (export make-parameter parameterize) (import (srfi srfi-39)))
| null | https://raw.githubusercontent.com/fujita-y/ypsilon/820aa1b0258eb1854172c7909aef7462bb0e2adb/sitelib/srfi/%253a39/parameters.scm | scheme | #!nobacktrace
(library (srfi :39 parameters) (export make-parameter parameterize) (import (srfi srfi-39)))
| |
801bef20eb2a6bdf22d4570f0dfad64ce79169289593404f7f06bf4e136f3df2 | yomimono/stitchcraft | notty_canvas.ml | open Stitchy.Types
open Canvas
let input =
let doc = "file from which to read. -, the default, is stdin." in
Cmdliner.Arg.(value & pos 0 string "-" & info [] ~doc)
let start_view = { Canvas__Controls.x_off = 0; y_off = 0; zoom = 1; block_display = `Symbol }
let disp input =
let open Lwt.Infix in
let initializ... | null | https://raw.githubusercontent.com/yomimono/stitchcraft/6b57efa8a145541e976c9cb1f04ffde984b318bd/notty_canvas/src/notty_canvas.ml | ocaml | we don't care about the fabric part of the estimate,
* so it's OK to pass 0 for margin inches here | open Stitchy.Types
open Canvas
let input =
let doc = "file from which to read. -, the default, is stdin." in
Cmdliner.Arg.(value & pos 0 string "-" & info [] ~doc)
let start_view = { Canvas__Controls.x_off = 0; y_off = 0; zoom = 1; block_display = `Symbol }
let disp input =
let open Lwt.Infix in
let initializ... |
5d85430a97605c263fa18345df89c38d0073094c4775b98c43a8bf2dd1db480d | geneweb/geneweb | dag.mli | TODOCP
module Pset : sig
type t = Gwdb.iper list
type elt = Gwdb.iper
val add : 'a -> 'a list -> 'a list
val empty : 'a list
val elements : 'a list -> 'a list
val mem : 'a -> 'a list -> bool
end
val get_dag_elems : Config.config -> Gwdb.base -> Gwdb.iper list
type ('a, 'b) sum = ('a, 'b) Def.choice
va... | null | https://raw.githubusercontent.com/geneweb/geneweb/747f43da396a706bd1da60d34c04493a190edf0f/lib/dag.mli | ocaml | TODOCP
module Pset : sig
type t = Gwdb.iper list
type elt = Gwdb.iper
val add : 'a -> 'a list -> 'a list
val empty : 'a list
val elements : 'a list -> 'a list
val mem : 'a -> 'a list -> bool
end
val get_dag_elems : Config.config -> Gwdb.base -> Gwdb.iper list
type ('a, 'b) sum = ('a, 'b) Def.choice
va... | |
68c0ccc4535853d88b6b02a26b9f10e3a50a2622d9cead7fcb544533c8db26a1 | rd--/hsc3 | numBuffers.help.hs | numBuffers ; the number of audio buffers available at the server ( by default 1024 , printing only )
poll (impulse kr 1 0) numBuffers 0 (label "numBuffers")
numBuffers
let f = 110 + numBuffers in sinOsc ar f 0 * 0.1
| null | https://raw.githubusercontent.com/rd--/hsc3/60cb422f0e2049f00b7e15076b2667b85ad8f638/Help/Ugen/numBuffers.help.hs | haskell | numBuffers ; the number of audio buffers available at the server ( by default 1024 , printing only )
poll (impulse kr 1 0) numBuffers 0 (label "numBuffers")
numBuffers
let f = 110 + numBuffers in sinOsc ar f 0 * 0.1
| |
a65b13748e912a69ee1349a0ffa25e731aa76a64d0952afd898a85248d8cef06 | philopon/apiary-benchmark | apiary.hs | # LANGUAGE QuasiQuotes #
# LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
import System.Environment
import Web.Apiary
import Control.Concurrent (runInUnboundThread)
import Network.Wai.Handler.Warp (run)
import qualified Data.ByteString as S
import Control.Monad
#define SIMPLE(r) [capture|/deep/foo/bar/baz/r|] . me... | null | https://raw.githubusercontent.com/philopon/apiary-benchmark/015322b87d1789682a8b9b91182ac2eaa2ba17e9/src/apiary.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE QuasiQuotes #
# LANGUAGE CPP #
import System.Environment
import Web.Apiary
import Control.Concurrent (runInUnboundThread)
import Network.Wai.Handler.Warp (run)
import qualified Data.ByteString as S
import Control.Monad
#define SIMPLE(r) [capture|/deep/foo/bar/baz/r|] . method GET . action $ contentType "te... |
4c9130f671d82c23038f47463bb52b60287789eac416c477998e5ec90ae46e84 | LambdaHack/LambdaHack | DungeonGen.hs | # LANGUAGE TupleSections #
-- | The dungeon generation routine. It creates empty dungeons, without
-- actors and without items, either lying on the floor or embedded inside tiles.
module Game.LambdaHack.Server.DungeonGen
( FreshDungeon(..), dungeonGen
#ifdef EXPOSE_INTERNAL
-- * Internal operations
, convertTil... | null | https://raw.githubusercontent.com/LambdaHack/LambdaHack/824351574a4e7cd68aa4eec4d7ec406ec6b22486/engine-src/Game/LambdaHack/Server/DungeonGen.hs | haskell | | The dungeon generation routine. It creates empty dungeons, without
actors and without items, either lying on the floor or embedded inside tiles.
* Internal operations
all walkable; passes OK
no walkable tiles for filling the map
some tiles walkable, so ensure connectivity
If no point blocks on both ends, then ... | # LANGUAGE TupleSections #
module Game.LambdaHack.Server.DungeonGen
( FreshDungeon(..), dungeonGen
#ifdef EXPOSE_INTERNAL
, convertTileMaps, buildTileMap, anchorDown, buildLevel
, snapToStairList, placeDownStairs, levelFromCave
#endif
) where
import Prelude ()
import Game.LambdaHack.Core.Prelude
import quali... |
4bd589e08962d684397722e67f97432cad2990c22e5be5e87274c13f3f2d64cd | MastodonC/kixi.datastore | dynamodb.clj | (ns kixi.datastore.metadatastore.dynamodb
(:require [com.stuartsierra.component :as component]
[kixi.comms :as c]
[kixi.datastore
[communication-specs :as cs]
[dynamodb :as db :refer [migrate]]
[metadatastore :as md :refer [MetaDataStore]]]
[t... | null | https://raw.githubusercontent.com/MastodonC/kixi.datastore/f33bba4b1fdd8c56cc7ac0f559ffe35254c9ca99/src/kixi/datastore/metadatastore/dynamodb.clj | clojure | (ns kixi.datastore.metadatastore.dynamodb
(:require [com.stuartsierra.component :as component]
[kixi.comms :as c]
[kixi.datastore
[communication-specs :as cs]
[dynamodb :as db :refer [migrate]]
[metadatastore :as md :refer [MetaDataStore]]]
[t... | |
0397565fce929cbefe713844e990b128b5d6af0ab9ca0ae9d1be4d720e0735be | modular-macros/ocaml-macros | w51.ml |
let rec fact = function
| 1 -> 1
| n -> n * (fact [@tailcall]) (n-1)
;;
| null | https://raw.githubusercontent.com/modular-macros/ocaml-macros/05372c7248b5a7b1aa507b3c581f710380f17fcd/testsuite/tests/warnings/w51.ml | ocaml |
let rec fact = function
| 1 -> 1
| n -> n * (fact [@tailcall]) (n-1)
;;
| |
5c4713820d807e6c0996337a7a93e55f9b06a89c023b6d012750e2e03e009514 | graninas/Pragmatic-Type-Level-Design | GameOfLife.hs | module TCA2.GameOfLife where
import CPrelude
import qualified Data.Map as Map
import qualified Data.Vector as V
import TCA2.Types
import TCA2.Automaton
data GoLRule
instance Dim2Automaton GoLRule TwoStateCell where
emptyCell _ = Dead
step = golStep
-- TODO: the actual logic
golStep :: Dim2Board GoLRule... | null | https://raw.githubusercontent.com/graninas/Pragmatic-Type-Level-Design/54b346bd0949f5d89407fd02e9477e07d9f6cfdc/demo-apps/type-class-automaton2/src/TCA2/GameOfLife.hs | haskell | TODO: the actual logic | module TCA2.GameOfLife where
import CPrelude
import qualified Data.Map as Map
import qualified Data.Vector as V
import TCA2.Types
import TCA2.Automaton
data GoLRule
instance Dim2Automaton GoLRule TwoStateCell where
emptyCell _ = Dead
step = golStep
golStep :: Dim2Board GoLRule TwoStateCell -> Dim2Board... |
ad49cb878e95540ea54e3ab62b2741e2ef485e6c67f38c8661c6c9ee4bf21242 | Jyothsnasrinivas/eta-android-2048 | GameModel.hs | module GameModel ( emptyBoard
, initialGameState
, rotateBoard
, setTile
, tileToInt
, intToTile
, tilesWithCoordinates
, readTile
) where
import System.Random (StdGen)
import Data.Li... | null | https://raw.githubusercontent.com/Jyothsnasrinivas/eta-android-2048/82dfefeeb36129d480609bd2997822878f99f589/app/src/main/eta/GameModel.hs | haskell | column
| Set tile on a given board to a given row and column
| Convert a tile to the int it represents. Empty tile is treated like 0
| Convert an int into a tile representing it. 0 is treated like Empty
tile
| Convert a board into a list of all tiles with their respective
coordinates
| A board of empty tiles | module GameModel ( emptyBoard
, initialGameState
, rotateBoard
, setTile
, tileToInt
, intToTile
, tilesWithCoordinates
, readTile
) where
import System.Random (StdGen)
import Data.Li... |
0bd29696512be9b0d369146cfbf586a37585ae371dc313b2bde6636dc5ce5362 | mentat-collective/functional-numerics | golden_test.cljc | ;;
Copyright © 2017 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
;;
;; This is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation ;... | null | https://raw.githubusercontent.com/mentat-collective/functional-numerics/44856b0e3cd1f0dd9f8ebb2f67f4e85a68aa8380/test/numerical/unimin/golden_test.cljc | clojure |
This is free software; you can redistribute it and/or modify
either version 3 of the License , or ( at
your option) any later version.
This software 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 PUR... | Copyright © 2017 .
This work is based on the Scmutils system of MIT / GNU Scheme :
Copyright © 2002 Massachusetts Institute of Technology
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
(ns sicmutils.numerical.unimin.gol... |
659114e35472edd1bd506974230391dfa15c7f7c203892199e4ee30c997b8778 | BranchTaken/Hemlock | test_bit_not.ml | open! Basis.Rudiments
open! Basis
open U128
let test () =
let rec test = function
| [] -> ()
| x :: xs' -> begin
File.Fmt.stdout
|> Fmt.fmt "bit_not "
|> fmt ~alt:true ~zpad:true ~width:32L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt " -> "
|> fmt ~alt:true ~zpad:true ~... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/a07e362d66319108c1478a4cbebab765c1808b1a/bootstrap/test/basis/u128/test_bit_not.ml | ocaml | open! Basis.Rudiments
open! Basis
open U128
let test () =
let rec test = function
| [] -> ()
| x :: xs' -> begin
File.Fmt.stdout
|> Fmt.fmt "bit_not "
|> fmt ~alt:true ~zpad:true ~width:32L ~radix:Radix.Hex ~pretty:true x
|> Fmt.fmt " -> "
|> fmt ~alt:true ~zpad:true ~... | |
fae33b18ae75caaf2d5a77bc8ba4d1f98fc52e74f562a90d621c17a3db29a3f3 | thiagozg/GitHubJobs-Clojure-Service | job.clj | (ns github-jobs.logic.job
(:require [github-jobs.model.job :as model-job]
[schema.core :as s]
[github-jobs.schemata.job :as schemata]
[schema.coerce :as coerce])
(:import (java.util UUID)))
(s/defn datom-job->wire :- schemata/JobReference
[{:job/keys [github-id title url categ... | null | https://raw.githubusercontent.com/thiagozg/GitHubJobs-Clojure-Service/9b17da56ebe773f6aed96337ac516307d91a1403/src/github_jobs/logic/job.clj | clojure | (ns github-jobs.logic.job
(:require [github-jobs.model.job :as model-job]
[schema.core :as s]
[github-jobs.schemata.job :as schemata]
[schema.coerce :as coerce])
(:import (java.util UUID)))
(s/defn datom-job->wire :- schemata/JobReference
[{:job/keys [github-id title url categ... | |
b292c139d0807aacc0a923e209b81775fb96c11136730bccec5be26c79e09e15 | data61/Mirza | Client.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
module Mirza.SupplyChain.Tests.Client where
import Control.Exception (bracket)
import Data.Either (fromRight, isRight)
import Data.UUID (nil)
import Test.... | null | https://raw.githubusercontent.com/data61/Mirza/24e5ccddfc307cceebcc5ce26d35e91020b8ee10/projects/or_scs/test/Mirza/SupplyChain/Tests/Client.hs | haskell | === SCS Client tests
TODO: Create a user for associating with tests.
let userOR = ORT.NewUser "EventSign Test Same User OAuthSub"
TODO Note: The org will now be associated with the token
and not created user, expect this may have to be fixed when we
devise a means of authing test users.
TODO: Create a user for as... | # LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
module Mirza.SupplyChain.Tests.Client where
import Control.Exception (bracket)
import Data.Either (fromRight, isRight)
import Data.UUID (nil)
import Test.... |
94b6c69786f6b9c88b092338a6e589e868ba457029d92375cf91aab34853244c | bia-technologies/statsbit | user.clj | Copyright 2020 BIA - Technologies Limited Liability Company
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed t... | null | https://raw.githubusercontent.com/bia-technologies/statsbit/4102ca5e5d39b1c06541b49615c6de83e7f4ef36/backend/dev/user.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governi... | Copyright 2020 BIA - Technologies Limited Liability Company
distributed under the License is distributed on an " AS IS " BASIS ,
(ns user
(:require
[com.stuartsierra.component :as component]
[ru.bia-tech.statsbit.init]
[ru.bia-tech.statsbit.system :as system]
[ru.bia-tech.statsbit.migration :as mig... |
04200334869e3383e2c76b569f3bc013a7b8e9e4ba9c4c14ce98c0376ad09229 | CloudI/CloudI | hackney_request.erl | %%% -*- erlang -*-
%%%
This file is part of hackney released under the Apache 2 license .
%%% See the NOTICE for more information.
%%%
%% @doc module handling the request
-module(hackney_request).
-include("hackney.hrl").
-include("hackney_lib.hrl").
-include_lib("hackney_internal.hrl").
-export([perform/2,
... | null | https://raw.githubusercontent.com/CloudI/CloudI/3e45031c7ee3e974ead2612ea7dd06c9edf973c9/src/external/cloudi_x_hackney/src/hackney_request.erl | erlang | -*- erlang -*-
See the NOTICE for more information.
@doc module handling the request
basic & Cookies authorization handling
detect the request type: normal or chunked
add host eventually
get expect headers
build headers with the body.
build final client record
request to send
@doc stream multipart
part wi... | This file is part of hackney released under the Apache 2 license .
-module(hackney_request).
-include("hackney.hrl").
-include("hackney_lib.hrl").
-include_lib("hackney_internal.hrl").
-export([perform/2,
location/1,
send/2, send_chunk/2,
sendfile/3,
stream_body/2, end_stream_b... |
2297b5a27fd0d84cfc33ecb5f755515713dead5755a30e006ecf00c5b19a7f22 | avsm/eeww | semantics_of_primitives.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/avsm/eeww/651d8da20a3cc9e88354ed0c8da270632b9c0c19/boot/ocaml/middle_end/semantics_of_primitives.ml | ocaml | ************************************************************************
OCaml
... | , OCamlPro
and ,
Copyright 2014 - -2016 Jane Street Group LLC
the GNU Lesser General Public License version 2.1 , with the
[@@@ocaml.warning "+a-4-9-30-40-41-42"]
type effects = No_effects |... |
0728e4db6361d6846a8b08956ff13225b4205ecbec40254db345830abd53b2f8 | skanev/playground | 36.scm | SICP exercise 3.36
;
; Suppose we evaluate the following sequence of expressions in the global
; environment:
;
; (define a (make-connector))
; (define b (make-connector))
( set - value ! a 10 ' user )
;
; At some time during evaluation of the set-value!, the following expression
; from the connector's local ... | null | https://raw.githubusercontent.com/skanev/playground/d88e53a7f277b35041c2f709771a0b96f993b310/scheme/sicp/03/36.scm | scheme |
Suppose we evaluate the following sequence of expressions in the global
environment:
(define a (make-connector))
(define b (make-connector))
At some time during evaluation of the set-value!, the following expression
from the connector's local procedure is evaluated:
(for-each-except
setter inform-... | SICP exercise 3.36
( set - value ! a 10 ' user )
| newval : 10 |
|
a319342704ac1b9e0bd3db11aac3768eb979225c857b33f42133f6f9cfe9659e | mbutterick/beautiful-racket | tokenizer.rkt | #lang br/quicklang
(require brag/support)
(define (make-tokenizer port)
(define (next-token)
(define jsonic-lexer
(lexer
[(from/to "//" "\n") (next-token)]
[(from/to "@$" "$@")
(token 'SEXP-TOK (trim-ends "@$" lexeme "$@"))]
[any-char (token 'CHAR-TOK lexeme)]))
(jsonic-lex... | null | https://raw.githubusercontent.com/mbutterick/beautiful-racket/f0e2cb5b325733b3f9cbd554cc7d2bb236af9ee9/beautiful-racket-demo/jsonic-demo/tokenizer.rkt | racket | #lang br/quicklang
(require brag/support)
(define (make-tokenizer port)
(define (next-token)
(define jsonic-lexer
(lexer
[(from/to "//" "\n") (next-token)]
[(from/to "@$" "$@")
(token 'SEXP-TOK (trim-ends "@$" lexeme "$@"))]
[any-char (token 'CHAR-TOK lexeme)]))
(jsonic-lex... | |
40d9845401387a84a5cdc4f486dfbaeb8ad0e28f406ffaaf3de96c234bb99d9b | jeromesimeon/Galax | typing_util.mli | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/typing/typing_util.mli | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : , v 1.9 2007/02/01 22:08:55 simeon Exp $
Module : Typing_util
Description :
This modules implements some basic operations used during static
typing .
Description:
This modules implements some basic ope... |
e8df86a0da1bb8c4abad780907619781d9e56de198a1062a9ae34eec37d7b974 | hatemogi/misaeng | user.clj | (ns user
(:use [미생.기본]
[미생.검사])
(:require [미생.기본-검사]
[미생.검사-검사]
[미생.예제.계승]
[미생.예제.총합]
[미생.예제.쿼드트리]
[미생.예제.피보나치]))
(defn T [& namespaces]
(적용 검사하기 (or namespaces
['미생.기본-검사
'미생.검사-검사
... | null | https://raw.githubusercontent.com/hatemogi/misaeng/7b097d9d9ae497606cf54be586fe7a0f50bb7ffc/test/user.clj | clojure | (ns user
(:use [미생.기본]
[미생.검사])
(:require [미생.기본-검사]
[미생.검사-검사]
[미생.예제.계승]
[미생.예제.총합]
[미생.예제.쿼드트리]
[미생.예제.피보나치]))
(defn T [& namespaces]
(적용 검사하기 (or namespaces
['미생.기본-검사
'미생.검사-검사
... | |
488550f7ab37779969cc44271afd4553b504f37e91ee13f5025ed7cd6acc0dbb | WhatsApp/power_shell | power_shell_SUITE.erl | %%%-------------------------------------------------------------------
@author < >
( c ) WhatsApp Inc. and its affiliates . All rights reserved .
@private
%%%-------------------------------------------------------------------
-module(power_shell_SUITE).
-author("").
%%----------------------------------------... | null | https://raw.githubusercontent.com/WhatsApp/power_shell/12b25ed66963a930a25ff341a26cd8cbba9bff56/test/power_shell_SUITE.erl | erlang | -------------------------------------------------------------------
-------------------------------------------------------------------
--------------------------------------------------------------------
IMPORTANT: DO NOT USE EXPORT_ALL!
This test relies on functions _not_ being exported from the module.
It is the ... | @author < >
( c ) WhatsApp Inc. and its affiliates . All rights reserved .
@private
-module(power_shell_SUITE).
-author("").
-export([all/0,
groups/0,
init_per_group/2,
end_per_group/2,
suite/0]).
-export([echo/0, echo/1,
self_echo/0, self_echo/1,
calling_local/0, calling_local/1,
... |
9b861c9d26e79773c33e89f56f4d336f7dfde03df48fe64cb6f00974d3f903c7 | acieroid/scala-am | f-10.scm | (letrec ((f (lambda (x) (+ (* x x) (* x x)))) (g (lambda (x) (+ (* x x) (* x x))))) (let ((_tmp1 (f 1))) (let ((_tmp2 (f 2))) (let ((_tmp3 (f 3))) (let ((_tmp4 (f 4))) (let ((_tmp5 (f 5))) (let ((_tmp6 (f 6))) (let ((_tmp7 (f 7))) (let ((_tmp8 (f 8))) (let ((_tmp9 (f 9))) (g 10))))))))))) | null | https://raw.githubusercontent.com/acieroid/scala-am/13ef3befbfc664b77f31f56847c30d60f4ee7dfe/test/changesBenevolPaper/f1-tests/f-10.scm | scheme | (letrec ((f (lambda (x) (+ (* x x) (* x x)))) (g (lambda (x) (+ (* x x) (* x x))))) (let ((_tmp1 (f 1))) (let ((_tmp2 (f 2))) (let ((_tmp3 (f 3))) (let ((_tmp4 (f 4))) (let ((_tmp5 (f 5))) (let ((_tmp6 (f 6))) (let ((_tmp7 (f 7))) (let ((_tmp8 (f 8))) (let ((_tmp9 (f 9))) (g 10))))))))))) | |
5694a97f6bd6885bedf0ebb8aaf68725f7ed884761b451fc31061803d89bcc71 | aristidb/aws | ListIdentities.hs | module Aws.Ses.Commands.ListIdentities
( ListIdentities(..)
, ListIdentitiesResponse(..)
, IdentityType(..)
) where
import Data.Text (Text)
import qualified Data.ByteString.Char8 as BS
import Data.Maybe (catMaybes)
import Control.Applicative
import Data.Text.Encoding as T (encodeUtf8)
import Data.Type... | null | https://raw.githubusercontent.com/aristidb/aws/9bdc4ee018d0d9047c0434eeb21e2383afaa9ccf/Aws/Ses/Commands/ListIdentities.hs | haskell | | List email addresses and/or domains
| ServiceConfiguration: 'SesConfiguration' | module Aws.Ses.Commands.ListIdentities
( ListIdentities(..)
, ListIdentitiesResponse(..)
, IdentityType(..)
) where
import Data.Text (Text)
import qualified Data.ByteString.Char8 as BS
import Data.Maybe (catMaybes)
import Control.Applicative
import Data.Text.Encoding as T (encodeUtf8)
import Data.Type... |
a7a0144f3169f9bb03c3d26ac2defa34d2689ceedea07e60d3dd144640ee74b2 | typedclojure/typedclojure | fn_method_one.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/668ee1ef3953eb37f2c748209a6ad25bbfb6165c/typed/clj.checker/src/typed/cljc/checker/check/fn_method_one.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 typed.cljc.checker.check.fn-method-one
(:require [clojure.core.typed.ast-utils :as ast-u]
[clojure.core.typed.contract-utils :as con]
[clojure.core.typed.current-impl :as impl]
[clojure.core.typed.errors :as err]
[clojure... |
b57953ef1060f7e106e37a9961cb14234052d9b16aafa5db415d165fe2f08f81 | profmaad/bitcaml | bitcoin_blockchain_db.ml | open! Core.Std
open Bitcoin_protocol;;
module Sqlexpr = Sqlexpr_sqlite.Make(Sqlexpr_concurrency.Id);;
module S = Sqlexpr;;
type t = S.db;;
let difficulty_1_target = {
bits_base = 0x00ffff;
bits_exponent = 0x1d;
}
let float_log_difficulty_1_base = log (float_of_int difficulty_1_target.bits_base);;
let float_log_di... | null | https://raw.githubusercontent.com/profmaad/bitcaml/18cfbca46c989f43dfb1bcfd50ee2ff500f9ab8d/src/bitcoin_blockchain_db.ml | ocaml | S.execute db
[%sqlinit "CREATE INDEX IF NOT EXISTS transactions_block_index ON transactions (block);"];
since a transaction can spend an output that only appeard in the same block, we have to handle transactions in order
we need a special implementation for this, since no previous block exists for the genesis ... | open! Core.Std
open Bitcoin_protocol;;
module Sqlexpr = Sqlexpr_sqlite.Make(Sqlexpr_concurrency.Id);;
module S = Sqlexpr;;
type t = S.db;;
let difficulty_1_target = {
bits_base = 0x00ffff;
bits_exponent = 0x1d;
}
let float_log_difficulty_1_base = log (float_of_int difficulty_1_target.bits_base);;
let float_log_di... |
33549e03afbfa4e865f04e92497ae6f1eea043524b2a158265ae03b8155d3170 | exercism/erlang | crypto_square.erl | -module(crypto_square).
-export([ciphertext/1]).
ciphertext(_PlainText) -> undefined.
| null | https://raw.githubusercontent.com/exercism/erlang/57ac2707dae643682950715e74eb271f732e2100/exercises/practice/crypto-square/src/crypto_square.erl | erlang | -module(crypto_square).
-export([ciphertext/1]).
ciphertext(_PlainText) -> undefined.
| |
b5cc37563ebd8fffb7d63bf1dcd723192e1ec6754af62189c07f12c6f960c81b | rd--/hsc3 | rd-20061017.hs | crotale ( rd , 2006 - 10 - 17 ) ; i d
let crotale_data =
([35.45
,128.59
,346.97
,483.55
,1049.24
,1564.02
,1756.33
,3391.66
,3451.80
,3497.26
,3596.89
,3696.73
,3835.23
,3845.95
,4254.85
,4407.53
,44... | null | https://raw.githubusercontent.com/rd--/hsc3/fb2ae8fb1923515938b69481a8971cc6b6d7a258/Help/Graph/rd-20061017.hs | haskell | crotale ( rd , 2006 - 10 - 17 ) ; i d
let crotale_data =
([35.45
,128.59
,346.97
,483.55
,1049.24
,1564.02
,1756.33
,3391.66
,3451.80
,3497.26
,3596.89
,3696.73
,3835.23
,3845.95
,4254.85
,4407.53
,44... | |
6f9d06734534fcdaa09c6eda0e38ca01bb3aa03f3afa59b7179b4759c51b2871 | sbcl/sbcl | c-call.lisp | This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
;;;; provided with absolutely no wa... | null | https://raw.githubusercontent.com/sbcl/sbcl/eb76e6340e390a9238973e7bc6c26f61c94f509b/src/code/c-call.lisp | lisp | more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
C string support.
Can't use C-STRING-EXTERNAL-FORMAT here,
changes.
Check whether we need to do a full external-format
conversion, or wheth... | This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB-ALIEN")
(defun load-alien-c-string-type (element-type external-format not-null)
(make-alien-c-string-type... |
7a3e5a4fbc394ca5b97720c8f82cdec3fafe26e65bb058220535532fcdc45d9e | realworldocaml/mdx | cram.ml |
* Copyright ( c ) 2018 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... | null | https://raw.githubusercontent.com/realworldocaml/mdx/aa5551a8eb0669fa4561aeee55d6f1528661a510/lib/cram.ml | ocaml | -docs.html |
* Copyright ( c ) 2018 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND THE AU... |
6a70f39d887d01b8da888fecd5204e0f656a5a99c82725535cc9dbf2d6bd2b73 | tqtezos/vesting-contract | Vesting.hs | { - # LANGUAGE DuplicateRecordFields # - }
{ - # LANGUAGE FunctionalDependencies # - }
# LANGUAGE RebindableSyntax #
{ - # LANGUAGE UndecidableSuperClasses # - }
{-# OPTIONS -Wno-missing-export-lists #-}
{-# OPTIONS -Wno-orphans #-}
{-# OPTIONS -Wno-unused-do-bind #-}
module Lorentz.Contracts.Vesting where
imp... | null | https://raw.githubusercontent.com/tqtezos/vesting-contract/bc72106631fa82bef71723dd4d0bb4cf1147cdc4/src/Lorentz/Contracts/Vesting.hs | haskell | # OPTIONS -Wno-missing-export-lists #
# OPTIONS -Wno-orphans #
# OPTIONS -Wno-unused-do-bind #
| The number of `ticksSinceEpoch` that have not been vested
| Given a number of ticks to vest, assert that it's at most
unvested & to_vest
to_vest & unvested & to_vest
to_vest <= unvested
delegateAdmin
target
| Print ... | { - # LANGUAGE DuplicateRecordFields # - }
{ - # LANGUAGE FunctionalDependencies # - }
# LANGUAGE RebindableSyntax #
{ - # LANGUAGE UndecidableSuperClasses # - }
module Lorentz.Contracts.Vesting where
import Data.Bool
import Data.Functor
import Control.Monad (Monad((>>=)))
import Data.Eq
import Data.Function
i... |
bbfa48a9c13d8e4c74d218b8a9a78255e813462df1ea216f4a30d08ba654f276 | coccinelle/coccinelle | nativeint.mli | val zero : nativeint
val one : nativeint
val minus_one : nativeint
external neg : nativeint -> nativeint = "%nativeint_neg"
external add : nativeint -> nativeint -> nativeint = "%nativeint_add"
external sub : nativeint -> nativeint -> nativeint = "%nativeint_sub"
external mul : nativeint -> nativeint -> nativeint = "%n... | null | https://raw.githubusercontent.com/coccinelle/coccinelle/5448bb2bd03491ffec356bf7bd6ddcdbf4d36bc9/bundles/stdcompat/stdcompat-current/interfaces/4.13/nativeint.mli | ocaml | val zero : nativeint
val one : nativeint
val minus_one : nativeint
external neg : nativeint -> nativeint = "%nativeint_neg"
external add : nativeint -> nativeint -> nativeint = "%nativeint_add"
external sub : nativeint -> nativeint -> nativeint = "%nativeint_sub"
external mul : nativeint -> nativeint -> nativeint = "%n... | |
5f3ba25f13a7dcab155c18190ee9dc6a64a3e471cf33becf404d6c0fd084c8c6 | vult-dsp/vult | passes.ml |
The MIT License ( MIT )
Copyright ( c ) 2014 ,
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
... | null | https://raw.githubusercontent.com/vult-dsp/vult/860b2b7a8e891aa729578175a931ce2a9345428b/src/passes/passes.ml | ocaml | * Transformations and optimizations of the syntax tree
Basic transformations |
The MIT License ( MIT )
Copyright ( c ) 2014 ,
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal
in the Software without restriction , including without limitation the rights
... |
775519c578f4240850b7eb0f13092bfc3d415c28ab14ef093502fe6b2edeca04 | openeuler-mirror/secGear | Genheader.ml |
* Copyright ( c ) Huawei Technologies Co. , Ltd. 2020 . All rights reserved .
* secGear is licensed under the Mulan PSL v2 .
* You can use this software according to the terms and conditions of the Mulan PSL v2 .
* You may obtain a copy of Mulan PSL v2 at :
*
* THIS SOFTWARE IS PROVIDED ON AN " ... | null | https://raw.githubusercontent.com/openeuler-mirror/secGear/a2dd0e8ac1f8117c78ef9e3abfa8ff48f3c4420d/tools/codegener/Genheader.ml | ocaml |
* Copyright ( c ) Huawei Technologies Co. , Ltd. 2020 . All rights reserved .
* secGear is licensed under the Mulan PSL v2 .
* You can use this software according to the terms and conditions of the Mulan PSL v2 .
* You may obtain a copy of Mulan PSL v2 at :
*
* THIS SOFTWARE IS PROVIDED ON AN " ... | |
d57d08f4ff4e53d33c82ec421e5795e1cabd4fe134fb5fdd2734d6e6030227b9 | redbadger/karma-tracker | repositories.cljs | (ns karma-tracker-ui.views.repositories
(:require [re-frame.core :as re-frame]
[karma-tracker-ui.views.contribution-totals :refer [map-totals]]
[karma-tracker-ui.views.bar-chart :as bar-chart]))
(defn repository-bar-segment [type {:keys [count]} scale]
[:span.bar-chart__bar.repository__bar ... | null | https://raw.githubusercontent.com/redbadger/karma-tracker/c5375f32f4cd0386f6bb1560d979b79bceea19e2/ui/src/cljs/karma_tracker_ui/views/repositories.cljs | clojure | (ns karma-tracker-ui.views.repositories
(:require [re-frame.core :as re-frame]
[karma-tracker-ui.views.contribution-totals :refer [map-totals]]
[karma-tracker-ui.views.bar-chart :as bar-chart]))
(defn repository-bar-segment [type {:keys [count]} scale]
[:span.bar-chart__bar.repository__bar ... | |
987372f7f032d96d68b3a66a11f596d5044e0fdac5c134f8fd059d767b4b6aef | Bike/mother | core.lisp | ;;;; core.lisp
;;;; miscellaneous core combiners
(in-package #:mother)
(defun $set! (in-env ptree val)
;; ($define! ptree form) is ($set! (get-current-environment) ptree form)
;; this primitive however does not take a form, it takes an already-evaluated thing!
(labels ((assign (ptree val)
(etypecase ptree... | null | https://raw.githubusercontent.com/Bike/mother/be571bcc8ed2a9f6c65a5d73e5e711509499420b/core.lisp | lisp | core.lisp
miscellaneous core combiners
($define! ptree form) is ($set! (get-current-environment) ptree form)
this primitive however does not take a form, it takes an already-evaluated thing! |
(in-package #:mother)
(defun $set! (in-env ptree val)
(labels ((assign (ptree val)
(etypecase ptree
(null (unless (null val) (error "could not match ~:a with ~a" nil args)))
(symbol (setf (flat-lookup in-env ptree) val))
(%ignore)
(cons
(unless (consp val) (error "could not m... |
237e44f5555a9655ec418263105e8176f8b501c31e00819d0b95b104f42ea29d | janestreet/learn-ocaml-workshop | frogger.mli | open Scaffold
module World : sig
type t
end
val create : unit -> World.t
val tick : World.t -> World.t
val handle_input : World.t -> Key.t -> World.t
val handle_event : World.t -> Event.t -> World.t
val draw : World.t -> Display_list.t
val finished : World.t -> bool
| null | https://raw.githubusercontent.com/janestreet/learn-ocaml-workshop/1ba9576b48b48a892644eb20c201c2c4aa643c32/03-frogger/frogger.mli | ocaml | open Scaffold
module World : sig
type t
end
val create : unit -> World.t
val tick : World.t -> World.t
val handle_input : World.t -> Key.t -> World.t
val handle_event : World.t -> Event.t -> World.t
val draw : World.t -> Display_list.t
val finished : World.t -> bool
| |
607ceceb341876c919dd3acfc5c47edcbfb1d3294344de7cd0ae80bcd17d7703 | clojurewerkz/ogre | where_test.clj | (ns clojurewerkz.ogre.suite.where-test
(:refer-clojure :exclude [and count drop filter group-by key key identity iterate loop map max min next not or range repeat reverse shuffle sort])
(:require [clojurewerkz.ogre.core :refer :all]
[clojurewerkz.ogre.util :as util])
(:import (org.apache.tinkerpop.gre... | null | https://raw.githubusercontent.com/clojurewerkz/ogre/cfc5648881d509a55f8a951e01d7b2a166e71d17/test/clojure/clojurewerkz/ogre/suite/where_test.clj | clojure | (ns clojurewerkz.ogre.suite.where-test
(:refer-clojure :exclude [and count drop filter group-by key key identity iterate loop map max min next not or range repeat reverse shuffle sort])
(:require [clojurewerkz.ogre.core :refer :all]
[clojurewerkz.ogre.util :as util])
(:import (org.apache.tinkerpop.gre... | |
7ab5436a99b52b7c0bc8e85bc15c3863084d457d22bf139f840c291209f068b9 | input-output-hk/cardano-ledger | Translation.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeApplications #
module Test.Cardano.Ledger.Mary.Translation (
maryTranslationTests,
maryEncodeDecodeTests,
)
where
import Cardano.Ledger.Allegra (Allegra)
import Cardano.Ledger.Binary
import Cardano.Ledger.Core
import C... | null | https://raw.githubusercontent.com/input-output-hk/cardano-ledger/b9aa1ad1728c0ceeca62657ec94d6d099896c052/eras/shelley-ma/test-suite/test/Test/Cardano/Ledger/Mary/Translation.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeApplications #
module Test.Cardano.Ledger.Mary.Translation (
maryTranslationTests,
maryEncodeDecodeTests,
)
where
import Cardano.Ledger.Allegra (Allegra)
import Cardano.Ledger.Binary
import Cardano.Ledger.Core
import Cardano.Ledger.Mary (Mary)
im... |
9e056538b25e5f4eac2b18fded64bc6c485f5640962e94f51debcad7ec99b2ec | coq/bot | Utils.ml | open Base
open Bot_info
open Cohttp
open Cohttp_lwt_unix
open Lwt
let f = Printf.sprintf
let string_match ~regexp string =
try
let _ = Str.search_forward (Str.regexp regexp) string 0 in
true
with Stdlib.Not_found -> false
let headers ~bot_info header_list =
Header.init ()
|> (fun headers -> Header.ad... | null | https://raw.githubusercontent.com/coq/bot/307bb9eea5bf8253926c1c2a4c4d3836f3679a09/bot-components/Utils.ml | ocaml | print_endline "JSON decoded."; | open Base
open Bot_info
open Cohttp
open Cohttp_lwt_unix
open Lwt
let f = Printf.sprintf
let string_match ~regexp string =
try
let _ = Str.search_forward (Str.regexp regexp) string 0 in
true
with Stdlib.Not_found -> false
let headers ~bot_info header_list =
Header.init ()
|> (fun headers -> Header.ad... |
00dc0c273e8982eddb6a88e891f0c22134feb1c9dff705547ec5ee957189c74f | haskell-tools/haskell-tools | ExtractedFormatting_res.hs | module Refactor.ExtractBinding.ExtractedFormatting where
stms
= extracted
where extracted = id
. id
| null | https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/builtin-refactorings/examples/Refactor/ExtractBinding/ExtractedFormatting_res.hs | haskell | module Refactor.ExtractBinding.ExtractedFormatting where
stms
= extracted
where extracted = id
. id
| |
46b8d459d908f3f3fc532f226ceeda28ddf25e64476bff85fd095e4e315ebbac | aiya000/haskell-examples | Proxy.hs | {-# LANGUAGE DeriveDataTypeable #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
import Data.Proxy (Proxy(..))
import Data.Typeable
data Saya = Saya
deriving (Typeable)
-- Values of `a` cannot be getten
data Void1 a
deriving instance Typeable a => Typeable (Void1 a)
getTypeNameWithoutValue :: ... | null | https://raw.githubusercontent.com/aiya000/haskell-examples/a337ba0e86be8bb1333e7eea852ba5fa1d177d8a/Data/Typeable/Proxy.hs | haskell | # LANGUAGE DeriveDataTypeable #
Values of `a` cannot be getten | # LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
import Data.Proxy (Proxy(..))
import Data.Typeable
data Saya = Saya
deriving (Typeable)
data Void1 a
deriving instance Typeable a => Typeable (Void1 a)
getTypeNameWithoutValue :: Typeable a => Void1 a -> String
getTypeNameWithoutValue (_ :: Void1 a)... |
ee59eee03f82fcd71b44b6e1d6f8aef5c736d80d5914229afbf377eee13ec3d8 | awakesecurity/grpc-mqtt | Response.hs | # LANGUAGE RecordWildCards #
-- |
-- Module : Network.GRPC.MQTT.Message.Response
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see COPYING
--
-- Stability : stable
Portability : non - portable ( GHC extensions )
--
-- @since 1.0.0
module Network.GRPC.MQTT.M... | null | https://raw.githubusercontent.com/awakesecurity/grpc-mqtt/fbde6f3fe90e82260469bab922c5ebb9f0b40e95/src/Network/GRPC/MQTT/Message/Response.hs | haskell | |
Module : Network.GRPC.MQTT.Message.Response
Stability : stable
@since 1.0.0
* Wire Encoding
* Wire Decoding
* Response Handlers
------------------------------------------------------------------------------
------------------------------------------------------------------------------
--------------... | # LANGUAGE RecordWildCards #
Copyright : ( c ) Arista Networks , 2022 - 2023
License : Apache License 2.0 , see COPYING
Portability : non - portable ( GHC extensions )
module Network.GRPC.MQTT.Message.Response
unwrapResponse,
unwrapUnaryResponse,
unwrapClientStreamResponse,
unwrapS... |
46815fff9117b6a7a1c777673b33f28a76a145a0fcd56450ef2ed475cc791d9f | rametta/retros | Sessions.hs | module Web.Controller.Sessions where
import Web.Controller.Prelude
import Web.View.Sessions.New ()
import qualified IHP.AuthSupport.Controller.Sessions as Sessions
instance Controller SessionsController where
action NewSessionAction = Sessions.newSessionAction @User
action CreateSessionAction = Sessions.creat... | null | https://raw.githubusercontent.com/rametta/retros/624290889df98cd2eb3c37848eeae15281eeda54/Web/Controller/Sessions.hs | haskell | module Web.Controller.Sessions where
import Web.Controller.Prelude
import Web.View.Sessions.New ()
import qualified IHP.AuthSupport.Controller.Sessions as Sessions
instance Controller SessionsController where
action NewSessionAction = Sessions.newSessionAction @User
action CreateSessionAction = Sessions.creat... | |
6b35eae84cb72408d8b3c3557774ba193f942d188e82864d9ec2bc1b630cabe7 | gwkkwg/cl-mathstats | class-defs.lisp | (in-package #:cl-mathstats)
(defcondition data-error (error)
())
;;; ---------------------------------------------------------------------------
(defcondition insufficient-data (data-error)
())
;;; ---------------------------------------------------------------------------
(defcondition no-data (insufficient-... | null | https://raw.githubusercontent.com/gwkkwg/cl-mathstats/39af1b5e1ebbad6f75dab2c4214ce48852031bbf/dev/class-defs.lisp | lisp | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
---------------------------------------------------------------------------
---------------------------------------------------------------------------
-----------... | (in-package #:cl-mathstats)
(defcondition data-error (error)
())
(defcondition insufficient-data (data-error)
())
(defcondition no-data (insufficient-data)
())
(defcondition zero-standard-deviation (data-error)
())
(defcondition zero-variance (data-error)
())
(defcondition unmatched-sequences (dat... |
3a8fb77a15db0c09acfde8d761b861424b2b72fe06f7bed450316394723c11f6 | fossas/fossa-cli | Scala.hs | | The scala strategy leverages the machinery from maven - pom .
--
Sbt has a command to export pom files , with one caveat -- in multi - project
-- setups, parent/child relationships are not present in the generated poms.
--
-- The only non-trivial logic that exists in this strategy is adding edges
-- between poms ... | null | https://raw.githubusercontent.com/fossas/fossa-cli/ad4ab0b369995c7fc6d6056d0038141c492ad8cb/src/Strategy/Scala.hs | haskell |
in multi - project
setups, parent/child relationships are not present in the generated poms.
The only non-trivial logic that exists in this strategy is adding edges
between poms in the maven "global closure", before building the individual
multi-project closures.
treeJson are written in /module/target/
where a... | | The scala strategy leverages the machinery from maven - pom .
module Strategy.Scala (
discover,
findProjects,
ScalaProject (..),
) where
import App.Fossa.Analyze.Types (AnalyzeProject (analyzeProject'), analyzeProject)
import Control.Effect.Diagnostics (
Diagnostics,
errCtx,
fatalText,
fromMaybeText,... |
2d47be89f9c4a01abd1c11c00f51c2a319d005d8c4f19caceb9f657e77fbee1b | ocamllabs/opam-doc | html_utils.mli | (** Utility functions to generate html tags and html pages (+ quick hacks to
be removed) *)
open Cow
* { 3 Html tags generators }
* Generate a < div class="info">xxx</div > tag or if None
val make_info : Html.t option -> Html.t
(** Convert options to nil **)
val opt_to_nil: Html.t option -> Html.t
(** Generat... | null | https://raw.githubusercontent.com/ocamllabs/opam-doc/4f5a332750177e3016b82d5923a681510335af4c/src/opam-doc-index/html_utils.mli | ocaml | * Utility functions to generate html tags and html pages (+ quick hacks to
be removed)
* Convert options to nil *
* Generate a <div class="ocaml_summary">xxx</div> tag
* Wrap the content into a <span class="keyword"> html tag
* Wrap the column list into a <table class="typetable"> by wraping the
elements wit... |
open Cow
* { 3 Html tags generators }
* Generate a < div class="info">xxx</div > tag or if None
val make_info : Html.t option -> Html.t
val opt_to_nil: Html.t option -> Html.t
val make_summary : Html.t -> Html.t
val keyword : string -> Html.t
val make_type_table : Html.t list -> Html.t
* Wrap the content into ... |
9484745394697becf04e02bd29a7b9367cb2cb689bf9472b6aba365cda61b370 | roelvandijk/numerals | BUL.hs | |
[ @ISO639 - 1@ ] bg
[ @ISO639 - 2@ ] bul
[ @ISO639 - 3@ ] bul
[ @Native name@ ]
[ @English name@ ] Bulgarian
[@ISO639-1@] bg
[@ISO639-2@] bul
[@ISO639-3@] bul
[@Native name@] Български език
[@English name@] Bulgarian
-}
module Text.Nu... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src/Text/Numeral/Language/BUL.hs | haskell | * Language entry
* Conversions
* Structure
* Bounds
------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
------------------... | |
[ @ISO639 - 1@ ] bg
[ @ISO639 - 2@ ] bul
[ @ISO639 - 3@ ] bul
[ @Native name@ ]
[ @English name@ ] Bulgarian
[@ISO639-1@] bg
[@ISO639-2@] bul
[@ISO639-3@] bul
[@Native name@] Български език
[@English name@] Bulgarian
-}
module Text.Nu... |
0f5e3574c0f4411d1fab9650227d71b136f79c1ed38a40b9529d713e4e6fe0e7 | acowley/Frames | Melt.hs | # LANGUAGE ConstraintKinds , DataKinds , FlexibleContexts , FlexibleInstances ,
KindSignatures , MultiParamTypeClasses , PolyKinds ,
ScopedTypeVariables , TypeFamilies , TypeOperators ,
UndecidableInstances #
KindSignatures, MultiParamTypeClasses, PolyKinds,
... | null | https://raw.githubusercontent.com/acowley/Frames/aeca953fe608de38d827b8a078ebf2d329edae04/src/Frames/Melt.hs | haskell | | Transform a record into a list of its fields, retaining proof
that each field is part of the whole.
| This is 'melt', but the variables are at the front of the record,
which reads a bit odd.
| Turn a cons into a snoc after the fact.
stacks multiple columns into a single column over multiple
rows. Takes a speci... | # LANGUAGE ConstraintKinds , DataKinds , FlexibleContexts , FlexibleInstances ,
KindSignatures , MultiParamTypeClasses , PolyKinds ,
ScopedTypeVariables , TypeFamilies , TypeOperators ,
UndecidableInstances #
KindSignatures, MultiParamTypeClasses, PolyKinds,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.