_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 |
|---|---|---|---|---|---|---|---|---|
b65ca45f0888a60f8fb94f569e137b865c5216c91efae64eee0b93ef00e4df0e | EwenG/replique | watch_protocols.clj | (ns replique.watch-protocols
(:import [clojure.lang IDeref IObj IMeta]))
(defprotocol IWatchHandler
(add-watch-handler [this buffer-id]))
(defprotocol IRecordable
(start-recording [this buffer-id record-size])
(stop-recording [this buffer-id])
(record-position [this])
(most-recent-value [this])
(value-a... | null | https://raw.githubusercontent.com/EwenG/replique/45719ec95f463107f4c4ca79b7f83a7882b450cb/src/replique/watch_protocols.clj | clojure | (ns replique.watch-protocols
(:import [clojure.lang IDeref IObj IMeta]))
(defprotocol IWatchHandler
(add-watch-handler [this buffer-id]))
(defprotocol IRecordable
(start-recording [this buffer-id record-size])
(stop-recording [this buffer-id])
(record-position [this])
(most-recent-value [this])
(value-a... | |
6897401b85dd6cd169fac34979b82456229f4f1b825cb4a12f33d22c7b43fc1d | grin-compiler/ghc-wpc-sample-programs | TestData.hs | module TestData where
import Data.IntMap as IMap
import Data.Set as Set
data Codegen = C | JS deriving (Show, Eq, Ord)
type Index = Int
data CompatCodegen = ANY | C_CG | NODE_CG | NONE
A TestFamily groups tests that share the same theme
data TestFamily = TestFamily {
-- A shorter lowcase name to use in filenames... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/idris-1.3.3/test/TestData.hs | haskell | A shorter lowcase name to use in filenames
A proper name for the test family that will be displayed
A map of test metadata:
- The value is the set of compatible code generators,
or Nothing if the test doesn't depend on a code generator
The data to instanciate testFamilies
FIXME: Re-enable interactive017 once... | module TestData where
import Data.IntMap as IMap
import Data.Set as Set
data Codegen = C | JS deriving (Show, Eq, Ord)
type Index = Int
data CompatCodegen = ANY | C_CG | NODE_CG | NONE
A TestFamily groups tests that share the same theme
data TestFamily = TestFamily {
id :: String,
name :: String,
- The key... |
876aaeed22697a7f607230315bcf0a7667b5f399eb7d3d48cb77ee65da487d63 | 2600hz-archive/whistle | webmachine_router.erl | @author < >
2007 - 2010 Basho Technologies
%%
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... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/webmachine-1.8.0/src/webmachine_router.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.
limitations under the License.
t... | @author < >
2007 - 2010 Basho Technologies
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
See the License for the specific language governing permissions and
@doc Module to add and remove dynamic route... |
653dd1771b7ca584abc2fa344c43c2144808bddda3626a52052e79b77809cedf | futurice/haskell-mega-repo | PowerAbsences.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE DerivingVia #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
{-# LANGUAGE TemplateHaskell #-}
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
{-# LANGUAGE TypeOperators #-}... | null | https://raw.githubusercontent.com/futurice/haskell-mega-repo/95fe8e33ad6426eb6e52a9c23db4aeffd443b3e5/reports-app/src/Futurice/App/Reports/PowerAbsences.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeOperators #
# LANGUAGE TypeSynonymInstances #
* Report
* Types
* Lenses
-----------------------------------------------------------------------------
Data
-------------------------------------------------------------------... | # LANGUAGE DerivingVia #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE OverloadedStrings #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE StandaloneDeriving #
| Missing hours report
module Futurice.App.Reports.PowerAbsences (
PowerAbsenc... |
c969ea37edc79ee82cfb38633dc16730d5711c2587741c895764696dda8b9704 | williamleferrand/accretio | accretio_grooming.ml | (*
* accretio grooming
*
* this playbook iterates over the db and asks missing information to the relevant users
*
*
*
*)
open Lwt
open Printf
open CalendarLib
open Api
open Eliom_content.Html5
open Eliom_content.Html5.D
open Message_parsers
let author = ""
let name = "Accretio grooming"
let description ... | null | https://raw.githubusercontent.com/williamleferrand/accretio/394f855e9c2a6a18f0c2da35058d5a01aacf6586/playbooks/accretio_grooming.ml | ocaml |
* accretio grooming
*
* this playbook iterates over the db and asks missing information to the relevant users
*
*
*
some helpers **************************************************************
the stages ****************************************************************
the playbook **************************... |
open Lwt
open Printf
open CalendarLib
open Api
open Eliom_content.Html5
open Eliom_content.Html5.D
open Message_parsers
let author = ""
let name = "Accretio grooming"
let description = "Iterates over the database and ask for missing names"
let version = 0
let tags = ""
let key_last_asked = sprintf "last-asked... |
d3b0d23532c9b4ea04cd49e5ac7d9f6e7154c7bbd95613b2de42a8a11ffb2282 | tpapp/cl-random | regressions.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Coding : utf-8 -*-
(in-package #:cl-random)
;;; dummy observations for regressions
(defun as-regression-covariates (x)
"If necessary, convert X to a matrix that can be used as regression
covariates (ie X)."
(typecase x
(matrix x)
(vector (as-column x))
... | null | https://raw.githubusercontent.com/tpapp/cl-random/5bb65911037f95a4260bd29a594a09df3849f4ea/src/regressions.lisp | lisp | Syntax : ANSI - Common - Lisp ; Coding : utf-8 -*-
dummy observations for regressions
linear regression
various accessors
(nu (posterior lr)))
(defmethod mean ((lr linear-regression))
(values (mean (posterior lr))
(* s^2 (mean (scaling-factor posterior))))))
(defmethod variance ((lr linear-re... |
(in-package #:cl-random)
(defun as-regression-covariates (x)
"If necessary, convert X to a matrix that can be used as regression
covariates (ie X)."
(typecase x
(matrix x)
(vector (as-column x))
(t (as-array x))))
(defun add-regression-dummies (y x prior dummy-generator)
"Add prior to Y and X in t... |
7f660e812e0705d4a15ac6d932f1cfee0e4311b2d44f9b46569b2923dc401a68 | Clozure/ccl-tests | in-package.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Apr 25 08:06:03 1998
;;;; Contains: Tests of IN-PACKAGE
(in-package :cl-test)
#-clozure
(eval-when (:compile-toplevel)
(declaim (optimize (safety 3))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; in-package
(deftest in-package.1
(let ((*package* *package... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/in-package.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of IN-PACKAGE
in-package | Author :
Created : Sat Apr 25 08:06:03 1998
(in-package :cl-test)
#-clozure
(eval-when (:compile-toplevel)
(declaim (optimize (safety 3))))
(deftest in-package.1
(let ((*package* *package*))
(safely-delete-package "H")
(make-package "H" :use ())
(let ((p2 (in-package "H")))
(and (eqt... |
838d57a9bc59b8e51886989d9c36dbfcab84165de05b7997c886e77d6291dc48 | adamdoupe/find_ear_rails | ast_printer.ml |
open Ast
open Format
open Utils
let format_uop ppf op = pp_print_string ppf (str_uop op)
let format_binop ppf op = pp_print_string ppf (str_binop op)
(*
let format_string_kind ppf = function
| String_Single _ -> pp_print_string ppf "Single"
| String_Double _ -> pp_print_string ppf "Double"
(* | String_User -> p... | null | https://raw.githubusercontent.com/adamdoupe/find_ear_rails/38f892f9962ad415a583973caf24fbab1a011be1/diamondback-ruby-0.20090726/src/parser/ast_printer.ml | ocaml |
let format_string_kind ppf = function
| String_Single _ -> pp_print_string ppf "Single"
| String_Double _ -> pp_print_string ppf "Double"
(* | String_User -> pp_print_string ppf "User" |
open Ast
open Format
open Utils
let format_uop ppf op = pp_print_string ppf (str_uop op)
let format_binop ppf op = pp_print_string ppf (str_binop op)
| String_Tick _ -> pp_print_string ppf "Tick"
| String_Heredoc _ -> pp_print_string ppf "Heredoc"
*)
let rec format_id ppf kind s = match kind with
| ID_Lowerca... |
08f6ad144577ccecd12039fff3f39aea0e52596d4ec3ab2a6e51ee4ed4129027 | y2q-actionman/cl-json-pointer | test-top-page.lisp | (in-package :cl-json-pointer/test)
;;; my top page
(defparameter *rfc6901-example*
"{
\"foo\": [\"bar\", \"baz\"],
\"\": 0,
\"a/b\": 1,
\"c%d\": 2,
\"e^f\": 3,
\"g|h\": 4,
\"i\\\\j\": 5,
\"k\\\"l\": 6,
\" \": 7,
\"m~n\": 8
}")
;; This test is intended only for `cl-json'.
(defun test... | null | https://raw.githubusercontent.com/y2q-actionman/cl-json-pointer/5be6850ec5fa2cd31eb8b8ffe99f62554e698675/test/test-top-page.lisp | lisp | my top page
This test is intended only for `cl-json'. | (in-package :cl-json-pointer/test)
(defparameter *rfc6901-example*
"{
\"foo\": [\"bar\", \"baz\"],
\"\": 0,
\"a/b\": 1,
\"c%d\": 2,
\"e^f\": 3,
\"g|h\": 4,
\"i\\\\j\": 5,
\"k\\\"l\": 6,
\" \": 7,
\"m~n\": 8
}")
(defun test-top-page ()
(let ((obj (cl-json:decode-json-from-string... |
70e806d241f5c3ec318ce43a1d321bbdf393c8aa17706fb7e37bca06070d224a | wireless-net/erlang-nommu | sets_SUITE.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 2013 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/stdlib/test/sets_SUITE.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2004 - 2013 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(sets_SUITE).
-export([all/0, sui... |
89dc31fc5330f8b2a4fee49e16781befbf0b57a8cfe5573cb385591bfbbdd6f0 | lambdaisland/witchcraft-workshop | s04_palettes_and_textures.clj | (ns s04-palettes-textures
(:require [lambdaisland.witchcraft :as wc]
[lambdaisland.witchcraft.cursor :as c]
[lambdaisland.witchcraft.matrix :as m]
[lambdaisland.witchcraft.palette :as palette]
[lambdaisland.witchcraft.shapes :as shapes]))
(def me (wc/player))
;; So fa... | null | https://raw.githubusercontent.com/lambdaisland/witchcraft-workshop/066862dc0192148b7d02b5c0546364cd0095cea3/repl_sessions/s04_palettes_and_textures.clj | clojure | So far we've looked at the shape of things with the shapes API, but in order
to put something into the world you need to decide which kinds of blocks to
use. Minecraft creators talk a lot about "palettes" and "gradients".
there are, how do you find out about blocks that go well with other blocks?
For these things... | (ns s04-palettes-textures
(:require [lambdaisland.witchcraft :as wc]
[lambdaisland.witchcraft.cursor :as c]
[lambdaisland.witchcraft.matrix :as m]
[lambdaisland.witchcraft.palette :as palette]
[lambdaisland.witchcraft.shapes :as shapes]))
(def me (wc/player))
If you... |
ded4750c64fc2c182918557d1bf54bd8d69cd44e23c389193154456219dbc010 | intermine/bluegenes-old | googlesignin.cljs | (ns bluegenes.components.googlesignin
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [re-frame.core :as re-frame]
[reagent.core :as reagent]
[cljs-http.client :as http]
[cljs.core.async :refer [<!]]))
(defn handle-authentication
"Tell re-frame that the user h... | null | https://raw.githubusercontent.com/intermine/bluegenes-old/5b719c7ac83a7340e0ff65790cf42413c15fb7e9/src/cljs/bluegenes/components/googlesignin.cljs | clojure | [email v] | (ns bluegenes.components.googlesignin
(:require-macros [cljs.core.async.macros :refer [go]])
(:require [re-frame.core :as re-frame]
[reagent.core :as reagent]
[cljs-http.client :as http]
[cljs.core.async :refer [<!]]))
(defn handle-authentication
"Tell re-frame that the user h... |
ffc67243a5dac3d7a08dd5e56542528aa3bd4c2315b09e64d3577533829213ee | exercism/clojurescript | example.cljs | (ns run-length-encoding
(:require [clojure.set]))
(defn- map-flip-vector
"Takes seq and flip it's k-v pair as v-k."
[m]
(map #(vector (second %) (first %)) m))
(defn- map->string
"Takes seq and reduce to it single string value."
[m]
(reduce #(str % (str (if (= 1 (first %2)) "" (first %2))
... | null | https://raw.githubusercontent.com/exercism/clojurescript/7700a33e17a798f6320aad01fb59a637bd21e12b/exercises/practice/run-length-encoding/.meta/src/example.cljs | clojure | (ns run-length-encoding
(:require [clojure.set]))
(defn- map-flip-vector
"Takes seq and flip it's k-v pair as v-k."
[m]
(map #(vector (second %) (first %)) m))
(defn- map->string
"Takes seq and reduce to it single string value."
[m]
(reduce #(str % (str (if (= 1 (first %2)) "" (first %2))
... | |
aec9031644484208601f640d7f474ecd9af6d1ad9d59ae747e4dc8819098af72 | saleyn/util | osx.erl | %%% vim:ts=4:sw=4:et
%%%-----------------------------------------------------------------------------
%%% @doc OS supporting commands
@author < >
%%% @end
%%%-----------------------------------------------------------------------------
Date : 2015 - 12 - 10
%%%----------------------------------------------... | null | https://raw.githubusercontent.com/saleyn/util/3c8efda7ac4734895644f0ce4a296c7877d8246f/src/osx.erl | erlang | vim:ts=4:sw=4:et
-----------------------------------------------------------------------------
@doc OS supporting commands
@end
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Permission is hereby granted... | @author < >
Date : 2015 - 12 - 10
Copyright ( c ) 2015
files ( the " Software " ) , to deal in the Software without restriction ,
publish , distribute , sublicense , and/or sell copies of the Software ,
and to permit persons to whom the Software is furnished to do
in all copies or substantial port... |
aa0559b2f50d2bab5d502ae3d7aae29d0a662ef57a643a0b599289676c20664b | input-output-hk/cardano-sl | WlogSpec.hs | module Test.Pos.Util.WlogSpec
( spec)
where
import Universum hiding (replicate)
import Control.Concurrent (threadDelay)
import qualified Data.HashMap.Strict as HM
import Data.Text (replicate)
import Data.Time.Clock.POSIX (POSIXTime, getPOSIXTime)
import Data.Time... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/util/test/Test/Pos/Util/WlogSpec.hs | haskell | | Count as many lines as you intended to log.
wait for empty queue
context: cardano-sl.testing
context: cardano-sl.testing.more
context: cardano-sl.final | module Test.Pos.Util.WlogSpec
( spec)
where
import Universum hiding (replicate)
import Control.Concurrent (threadDelay)
import qualified Data.HashMap.Strict as HM
import Data.Text (replicate)
import Data.Time.Clock.POSIX (POSIXTime, getPOSIXTime)
import Data.Time... |
b01aef7463af247d6e4dd6f5537947777644dc01b897f35ef22058a51fb40b88 | softwarelanguageslab/maf | R5RS_various_SICP-compiler-2.scm | ; Changes:
* removed : 0
* added : 7
* swaps : 1
* negated predicates : 2
* swapped branches : 2
* calls to i d fun : 9
(letrec ((true #t)
(false #f)
(self-evaluating? (lambda (exp)
(if (<change> (number? exp) (not (number? exp)))
... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_various_SICP-compiler-2.scm | scheme | Changes: | * removed : 0
* added : 7
* swaps : 1
* negated predicates : 2
* swapped branches : 2
* calls to i d fun : 9
(letrec ((true #t)
(false #f)
(self-evaluating? (lambda (exp)
(if (<change> (number? exp) (not (number? exp)))
true
... |
2211ce02e00fefc14608086a22d4d405fa51784a0ecfbee01a655f052bb23f10 | mk12/luminosity | Colour.hs | Copyright 2012 Mitchell Kember . Subject to the MIT License .
-- | An extension to "Luminosity.Vector" for the more specific usage of
-- vectors to represent colours, with some useful operations on them.
module Luminosity.Colour
(
-- * Type synonyms
Colour
, Colour24
, ColourT
-- * Re-exported types
, VectorT(..)
... | null | https://raw.githubusercontent.com/mk12/luminosity/b5899562f40d3e3d1c2c86950c4db4a10c1ceb2a/src/Luminosity/Colour.hs | haskell | | An extension to "Luminosity.Vector" for the more specific usage of
vectors to represent colours, with some useful operations on them.
* Type synonyms
* Re-exported types
* Functions
| A floating-point colour.
| Clip a colour to a maximum intensity of @1@ in each channel.
| Convert a single value from linear R... | Copyright 2012 Mitchell Kember . Subject to the MIT License .
module Luminosity.Colour
(
Colour
, Colour24
, ColourT
, VectorT(..)
, saturation
, sRGB24
) where
import Data.Word (Word8)
import Luminosity.Vector (VectorT(..))
type Colour = ColourT Double
| A 24 - bit colour , i.e. a colour which has 8 bits pe... |
899e227089e24833a36425614a26e288b9ecab491ea0562c8885f8aa6ba99c83 | kudu-dynamics/blaze | Graph.hs | # LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE NoFieldSelectors #
module Blaze.Types.Graph where
import Blaze.Prelude hiding (transpose)
import Data.HashMap.Strict ((!))
import qualified Data.HashMap.Strict as HMap
import qualified Data.HashSet as HSet... | null | https://raw.githubusercontent.com/kudu-dynamics/blaze/63e30781f4c7bd816118e855f6fa4ae6e59949fe/src/Blaze/Types/Graph.hs | haskell | | An integer node ID.
| Result includes starting search node
| A default dummy node that can be used
| Simple definition for using a node as own identifier.
-- The total number of
descendantFrequencyCount g =
m
where
mkNonLoopingNodeMap m ns = HMap.fromList $ do
n <- ns
let ss = HSet.to... | # LANGUAGE FunctionalDependencies #
# LANGUAGE FlexibleInstances #
# LANGUAGE UndecidableInstances #
# LANGUAGE NoFieldSelectors #
module Blaze.Types.Graph where
import Blaze.Prelude hiding (transpose)
import Data.HashMap.Strict ((!))
import qualified Data.HashMap.Strict as HMap
import qualified Data.HashSet as HSet... |
a73ef4a24bcc42df0b3a949a41be5caeabd6242f6af942a8ba0b6cbcd165b4f8 | anoma/juvix | Base.hs | module Juvix.Compiler.Core.Language.Base
( Info,
Key,
IsInfo,
module Juvix.Compiler.Core.Language.Builtins,
module Juvix.Prelude,
module Juvix.Compiler.Core.Language.Base,
)
where
import Juvix.Compiler.Core.Info (Info, IsInfo, Key)
import Juvix.Compiler.Core.Language.Builtins
import Juvix.Prelu... | null | https://raw.githubusercontent.com/anoma/juvix/c93013229ab84e81298ced674961ff30a39b888b/src/Juvix/Compiler/Core/Language/Base.hs | haskell | | Consecutive symbol IDs for reachable user functions.
| Tag of a constructor, uniquely identifying it. Tag values are consecutive
can treat them specially. | module Juvix.Compiler.Core.Language.Base
( Info,
Key,
IsInfo,
module Juvix.Compiler.Core.Language.Builtins,
module Juvix.Prelude,
module Juvix.Compiler.Core.Language.Base,
)
where
import Juvix.Compiler.Core.Info (Info, IsInfo, Key)
import Juvix.Compiler.Core.Language.Builtins
import Juvix.Prelu... |
772368c0ab3ad99aea02f7b5b3cdfd2f006a9b5a3d5e397259107bceb8442c99 | athensresearch/athens | patterns_test.cljc | (ns athens.patterns-test
(:require
[athens.patterns :as patterns]
[clojure.string :as string]
[clojure.test :refer [deftest is are]]))
(deftest contains-unlinked?
;; matches
(are [x] (patterns/contains-unlinked? "foo bar" x)
"foo bar"
"Foo Bar"
"foo bar baz"
"baz foo bar")
;; does... | null | https://raw.githubusercontent.com/athensresearch/athens/5869f32b6c9301fd231dafa5b684fd4aa52bc99b/test/athens/patterns_test.cljc | clojure | matches
does not match
matches
does not match | (ns athens.patterns-test
(:require
[athens.patterns :as patterns]
[clojure.string :as string]
[clojure.test :refer [deftest is are]]))
(deftest contains-unlinked?
(are [x] (patterns/contains-unlinked? "foo bar" x)
"foo bar"
"Foo Bar"
"foo bar baz"
"baz foo bar")
(are [x] (not (patte... |
ec92b8e165f0071c794652c0f7cf4432930e9657bd167e68bbdf67205d22a0f3 | jaredly/reason-language-server | omd_representation.ml | open Omd_utils
open Printf
(** references, instances created in [Omd_parser.main_parse] and
accessed in the [Omd_backend] module. *)
module R = Map.Make(String)
class ref_container : object
val mutable c : (string * string) R.t
method add_ref : R.key -> string -> string -> unit
method get_ref : R.key -... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/vendor/omd/omd_representation.ml | ocaml | * references, instances created in [Omd_parser.main_parse] and
accessed in the [Omd_backend] module.
Cs(n) means (n+2) times C | open Omd_utils
open Printf
module R = Map.Make(String)
class ref_container : object
val mutable c : (string * string) R.t
method add_ref : R.key -> string -> string -> unit
method get_ref : R.key -> (string * string) option
method get_all : (string * (string * string)) list
end = object
val mutable... |
838fa6bb307d4ac0e6eced9b93e2c630abc8408ee2dadddd0d28e4e1feccef46 | Ucombinator/parsing-with-zippers | arithTokenizer.ml | open ArithTags
exception FailedMatch
type token = string * int
let getInt (s : string) : token = (s, t_INT)
(* We only support the simple tokens for this arithmetic grammar. *)
let getToken (c : char) : token =
match c with
| '(' -> ("(", t_OPEN_PAREN)
| ')' -> (")", t_CLOSE_PAREN)
| '*' -> ("*", t_TIMES)
... | null | https://raw.githubusercontent.com/Ucombinator/parsing-with-zippers/168252c3598f7e704b8484bb469b37aa1a9b0313/arithTokenizer.ml | ocaml | We only support the simple tokens for this arithmetic grammar. | open ArithTags
exception FailedMatch
type token = string * int
let getInt (s : string) : token = (s, t_INT)
let getToken (c : char) : token =
match c with
| '(' -> ("(", t_OPEN_PAREN)
| ')' -> (")", t_CLOSE_PAREN)
| '*' -> ("*", t_TIMES)
| '+' -> ("+", t_PLUS)
| _ -> raise FailedMatch
The integer c... |
7edf94bc651faedcf901bd8f088e8a113efeec65f67d32fd5e88300665200175 | jsermeno/amby | Plot.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE MultiWayIf #-}
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - deprecations #
module Amby.Plot
( getEC
, getRenderable
, save
, saveSvg
... | null | https://raw.githubusercontent.com/jsermeno/amby/3c73501c75926eca8f3f7cc4274bc7751fc49788/src/Amby/Plot.hs | haskell | # LANGUAGE MultiWayIf #
------------------------
Instance declarations
------------------------
------------------------
------------------------
------------------------
------------------------
------------------------
Composable plotters
------------------------
------------------------
Rendering
----------------... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE InstanceSigs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE TypeFamilies #
# LANGUAGE ScopedTypeVariables #
# OPTIONS_GHC -fno - warn - deprecations #
module Amby.Plot
( getEC
, getRenderable
, save
, saveSvg
, cairoDefSave
, diagrams... |
f13bb29578cccc33e0e4e8ab535a85b45d98b8ff080472f4dc2c450962b03f84 | OpenC2-org/ocas | status_handler.erl | @author
( C ) 2017 , sFractal Consulting LLC
%%%
-module(status_handler).
-author("Duncan Sparrell").
-license("Apache 2.0").
%%%-------------------------------------------------------------------
%%% All rights reserved.
%%%
%%% Redistribution and use in source and binary forms, with or without
%%% modificatio... | null | https://raw.githubusercontent.com/OpenC2-org/ocas/c15132d9f37b1e0e29884456a520557c25b22f38/apps/ocas/src/status_handler.erl | erlang |
-------------------------------------------------------------------
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
* Redistributions of source code must retain the above copyright
notice, this... | @author
( C ) 2017 , sFractal Consulting LLC
-module(status_handler).
-author("Duncan Sparrell").
-license("Apache 2.0").
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
OWNER OR ANY DIRECT , INDIRECT , INCIDENTAL ,
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT... |
47f8ace03f33ea99f0ff19c3abe9a8b9e9929c61c0d6dd783104f7bfc1d2fb34 | vrnithinkumar/ETC | etc.erl | -module(etc).
-import(erl_syntax,[
function_clauses/1,
fun_expr_clauses/1,
clause_patterns/1,
clause_body/1,
clause_guard/1,
type/1
]).
PRINT
-ifndef(PRINT).
-define(PRINT(Var), io:format("DEBUG: ~p:~p - ~p~n~n ~p~n~n", [?MODULE, ?LINE, ??Var, Var])).
-endif.
-export([parse_transform/2, lo... | null | https://raw.githubusercontent.com/vrnithinkumar/ETC/3836052e3b5c2bb28237a71c557dab3bab56ef20/src/etc.erl | erlang | Get specs
?PRINT(SpecEnv),
add all user defined records
add all depend external module functions
get all functions
make strongly connected components (SCCs) (sorted in topological ordering)
TODO- VR we have to see
?PRINT(T),
Get specs
[Head | _Tail] = T ,
assign a fresh type variable to every function
Add a... | -module(etc).
-import(erl_syntax,[
function_clauses/1,
fun_expr_clauses/1,
clause_patterns/1,
clause_body/1,
clause_guard/1,
type/1
]).
PRINT
-ifndef(PRINT).
-define(PRINT(Var), io:format("DEBUG: ~p:~p - ~p~n~n ~p~n~n", [?MODULE, ?LINE, ??Var, Var])).
-endif.
-export([parse_transform/2, lo... |
1906c2298cf00706f6a779fdd8ecc8fbc267756bc5af3467948e3d32a67b5a6a | delaray/hypergraph | Graph.lisp | (in-package :HYPERGRAPH)
;;;************************************************************************
;;;
DIRECTED , LABELED & WEIGHTED HYPER API
;;;
;;;************************************************************************
;;;
;;; Variables
;;; ---------
;;;
* DEFAULT - VERTEX - WEIGHT *
;;; *DEFAULT-EDGE-WEIGH... | null | https://raw.githubusercontent.com/delaray/hypergraph/92edf8400cd9c757e389b17b5843f40e5b0bb2a0/Source/Graph.lisp | lisp | ************************************************************************
************************************************************************
Variables
---------
*DEFAULT-EDGE-WEIGHT*
*DEFAULT-EDGE-TYPE*
Classes
-------
EDGE-TABLES
Graph Functions
---------------
MAKE-GRAPH
FIND-GRAPH
CLEAR-... | (in-package :HYPERGRAPH)
DIRECTED , LABELED & WEIGHTED HYPER API
* DEFAULT - VERTEX - WEIGHT *
GRAPH
GRAPH - VERTEX
GRAPH - EDGE
GRAPH - PATH
ENSURE - GRAPH
DELETE - GRAPH
PRINT - GRAPH
MAP - GRAPH - VERTICES
MAP - GRAPH - EDGES
COUNT - GRAPH - EDGES
ENSURE - GRAPH - VERTEX
DELETE - GRAPH ... |
b5836f9883bc8a3df5a3c3d45faf2b00b9f6ebb5aa6f861181a668d29940ef6e | verystable/warframe-autobuilder | MeleeWeapons.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
-- |
Module : ArgInterface . MeleeWeapons
-- Maintainer :
-- Stability : experimental
--
This module contains all useable weapons ' name , linked to ' warframe - builder - data / Melee_Weapons '
module ArgInterface.MeleeWeapons
( listO... | null | https://raw.githubusercontent.com/verystable/warframe-autobuilder/015e0bb6812711ea27071816d054cbaa1c65770b/src/ArgInterface/MeleeWeapons.hs | haskell | # LANGUAGE OverloadedStrings #
|
Maintainer :
Stability : experimental
| List of available melee weapons. This list has to be modified
if a weapon is added to the 'warframe-autobuilder-data/Melee_Weapons' folder. | # LANGUAGE NoImplicitPrelude #
Module : ArgInterface . MeleeWeapons
This module contains all useable weapons ' name , linked to ' warframe - builder - data / Melee_Weapons '
module ArgInterface.MeleeWeapons
( listOfAvailableMelees
)
where
import ClassyPrelude
listOfAvailableMelees :: [Text]... |
e8f5e0eea06b81b12d5732e9d3115f7329b9595202f890083e23a943cf53dd69 | jkrivine/tl_interpreter | tools.ml | (*open Base*)
let (|?) a default = Option.value a ~default
let pp_to_str pp a =
ignore @@ Format.flush_str_formatter ();
pp Format.str_formatter a;
Format.flush_str_formatter ()
| null | https://raw.githubusercontent.com/jkrivine/tl_interpreter/c967c6578dd4491a6930c9842a0709fbc5939496/lib/tooling/tools.ml | ocaml | open Base |
let (|?) a default = Option.value a ~default
let pp_to_str pp a =
ignore @@ Format.flush_str_formatter ();
pp Format.str_formatter a;
Format.flush_str_formatter ()
|
c6bba0807c15fa5b25161557d70f779d568fab843a76eef2c7f7a1e57b33f980 | music-suite/music-score | Duration.hs |
module Music.Time.Duration (
module Music.Time.Transform,
* The HasDuration class
HasDuration(..),
-- * Absolute duration
duration,
stretchTo,
) where
import Control.Lens hiding (Indexable, Level, above, below,
inde... | null | https://raw.githubusercontent.com/music-suite/music-score/aa7182d8ded25c03a56b83941fc625123a7931f8/src/Music/Time/Duration.hs | haskell | * Absolute duration
|
Class of values that have a duration.
For any type that is also 'Transformable', you should ensure that:
@('transform' s x)^.'duration' = 'transform' s (x^.'duration')@
| Return the duration of a value.
# MINIMAL _duration #
By convention, we treat pairs and triplets as having the form
... |
module Music.Time.Duration (
module Music.Time.Transform,
* The HasDuration class
HasDuration(..),
duration,
stretchTo,
) where
import Control.Lens hiding (Indexable, Level, above, below,
index, inside, parts, reversed,
... |
7815b6b8a70f3f1b84cedb9f51c6daa742217338f0796ddf43fbf7abe418516e | diku-dk/futhark | GenericPython.hs | -- | A generic Python code generator which is polymorphic in the type
-- of the operations. Concretely, we use this to handle both
sequential and PyOpenCL Python code .
module Futhark.CodeGen.Backends.GenericPython
( compileProg,
CompilerMode,
Constructor (..),
emptyConstructor,
compileName,
co... | null | https://raw.githubusercontent.com/diku-dk/futhark/1fe93634d63df6005116f55f18e8a35b1a11987a/src/Futhark/CodeGen/Backends/GenericPython.hs | haskell | | A generic Python code generator which is polymorphic in the type
of the operations. Concretely, we use this to handle both
| A substitute expression compiler, tried before the main
compilation function.
| Write a scalar to the given memory block with the given index and
in the given memory space.
| Read a sca... | sequential and PyOpenCL Python code .
module Futhark.CodeGen.Backends.GenericPython
( compileProg,
CompilerMode,
Constructor (..),
emptyConstructor,
compileName,
compileVar,
compileDim,
compileExp,
compilePrimExp,
compileCode,
compilePrimValue,
compilePrimType,
compil... |
e225708b6e089dbdf0694ff6874b7a243d9a70ea9e9e79cd4b26f792046a6618 | aria42/flare | compute.clj | (ns flare.compute
(:require [flare.computation-graph :as cg]
[flare.core :as flare]
[flare.graph :as graph]
[clojure.set :as set]
[flare.cache-pool :as cache-pool]
[flare.model :as model])
(:import [flare.node Node]
[java.util LinkedList]
... | null | https://raw.githubusercontent.com/aria42/flare/9c7d90bf7bd876a154e705dd78645eb5c69ae590/src/flare/compute.clj | clojure |
Compiled Graph Protocols + Operations
This is nowhere near ready for use yet
Copy input values to node tensors | (ns flare.compute
(:require [flare.computation-graph :as cg]
[flare.core :as flare]
[flare.graph :as graph]
[clojure.set :as set]
[flare.cache-pool :as cache-pool]
[flare.model :as model])
(:import [flare.node Node]
[java.util LinkedList]
... |
6109a86d1d26967571fc1b056a9060b9a5b7db3cd63c5122b70df1fd799182ac | codingteam/Hyperspace | game.clj | (ns hyperspace.server.game
(:use clojure.tools.logging)
(:require [hyperspace.library.simulation :as simulation]
[hyperspace.library.world :as world]))
(defn get-player-by-id
"Finds game player by its identifier."
[game player-id]
(debug "searching player" player-id "in" game)
(let [index (->> ... | null | https://raw.githubusercontent.com/codingteam/Hyperspace/b04ec588968f3a9c94b2992010a3a737afbe7eb5/server/src/main/clojure/hyperspace/server/game.clj | clojure | Public contract: | (ns hyperspace.server.game
(:use clojure.tools.logging)
(:require [hyperspace.library.simulation :as simulation]
[hyperspace.library.world :as world]))
(defn get-player-by-id
"Finds game player by its identifier."
[game player-id]
(debug "searching player" player-id "in" game)
(let [index (->> ... |
1ea4dc8f9aea5c02e7d0bdcb66e8bcd00415a210e9631682fe192379480a5895 | melisgl/fsvd | package.lisp | (cl:defpackage :fsvd
(:use #:common-lisp)
(:export
;; Sparse matrix interface
#:map-matrix
#:height-of
#:width-of
#:size-of
#:dense-row-index
#:dense-column-index
#:do-matrix
#:do-matrix-macro-name
Core
#:sv
#:sv-left
#:sv-right
#:svd
#:make-sv
#:make-svd
#:save-svd... | null | https://raw.githubusercontent.com/melisgl/fsvd/fbc7450cf691be57c002559fb8e3a670e1e55b48/package.lisp | lisp | Sparse matrix interface | (cl:defpackage :fsvd
(:use #:common-lisp)
(:export
#:map-matrix
#:height-of
#:width-of
#:size-of
#:dense-row-index
#:dense-column-index
#:do-matrix
#:do-matrix-macro-name
Core
#:sv
#:sv-left
#:sv-right
#:svd
#:make-sv
#:make-svd
#:save-svd
#:load-svd
#:svd-value
... |
0da83cc5b006e16ff8e65622211fb77667b89146735241e7fd11ad43fd374279 | mbutterick/typesetting | stream-test.rkt | #lang racket/base
(require rackunit
racket/class
racket/stream
"../list.rkt"
"../base.rkt"
"../number.rkt"
"../stream.rkt"
"../base.rkt")
#|
approximates
|#
(test-case
"stream: decode should decode items lazily"
(parameterize ([current-input-port (open... | null | https://raw.githubusercontent.com/mbutterick/typesetting/6f7a8bbc422a64d3a54cbbbd78801a01410f5c92/xenomorph/xenomorph/test/stream-test.rkt | racket |
approximates
| #lang racket/base
(require rackunit
racket/class
racket/stream
"../list.rkt"
"../base.rkt"
"../number.rkt"
"../stream.rkt"
"../base.rkt")
(test-case
"stream: decode should decode items lazily"
(parameterize ([current-input-port (open-input-bytes (bytes ... |
93267dcc66b0c15ee71776278a88b6b1c9793ad2df8bafee751c075da49a6a49 | hverr/haskell-obd | Units.hs | # LANGUAGE DataKinds #
-- | Helper functions to work with dimensions.
module System.Hardware.ELM327.Utils.Units where
import Data.Ratio ((%))
import Numeric.Units.Dimensional.Prelude (DFrequency,
Metricality(NonMetric),
Unit,
... | null | https://raw.githubusercontent.com/hverr/haskell-obd/f7de2d2c392ad491671fda60552563af181c15dd/src/System/Hardware/ELM327/Utils/Units.hs | haskell | | Helper functions to work with dimensions.
| Declare rounds per minute | # LANGUAGE DataKinds #
module System.Hardware.ELM327.Utils.Units where
import Data.Ratio ((%))
import Numeric.Units.Dimensional.Prelude (DFrequency,
Metricality(NonMetric),
Unit,
hertz,
... |
7f05286152294da8d8fcd3f2425b2c70d46b4376b16878b271d977994126e0fd | mirage/irmin | errors.ml |
* Copyright ( c ) 2022 - 2022 Tarides < >
*
* 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... | null | https://raw.githubusercontent.com/mirage/irmin/ce09bb715c4e9f2b66eb78dec3c38c1de60a5bff/src/irmin-pack/unix/errors.ml | ocaml | * Finaliser for a function that returns a result and doesn't raise exceptions.
If the finaliser fails, it is recommended to log the error.
* Finaliser for a function that might raise exceptions.
* [base_error] is the type of most errors that can occur in a [result], except
for errors that have associated exc... |
* Copyright ( c ) 2022 - 2022 Tarides < >
*
* 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... |
c3ffc8f5d0e97b992840c70e3227d289e71385a79b56eee1febd678a69beb2cf | tfausak/rattletrap | Version.hs | module Rattletrap.Version where
import qualified Data.Version as Version
import qualified Paths_rattletrap as Package
string :: String
string = Version.showVersion Package.version
| null | https://raw.githubusercontent.com/tfausak/rattletrap/4d6e3cc0aa0f45beaf189255943f0d824c80a7df/src/lib/Rattletrap/Version.hs | haskell | module Rattletrap.Version where
import qualified Data.Version as Version
import qualified Paths_rattletrap as Package
string :: String
string = Version.showVersion Package.version
| |
13099d4f680a9d45887176293203291467718c6ad68367934de833133a8e4869 | google/lisp-koans | strings.lisp | Copyright 2013 Google Inc.
;;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;;; you may not use this file except in compliance with the License.
;;; You may obtain a copy of the License at
;;;
;;; -2.0
;;;
;;; Unless required by applicable law or agreed to in writing, software
distrib... | null | https://raw.githubusercontent.com/google/lisp-koans/df5e58dc88429ef0ff202d0b45c21ce572144ba8/koans/strings.lisp | lisp |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing per... | Copyright 2013 Google Inc.
distributed under the License is distributed on an " AS IS " BASIS ,
(define-test what-is-a-string
(let ((string "Do, or do not. There is no try."))
(true-or-false? ____ (typep string 'string))
(true-or-false? ____ (typep string 'array))
(true-or-false? ____ (typep string '... |
782683c3e62e3eae3dec0aefb4399c0eeaca420e2039c25bddd02ecbac67f16b | bootstrapworld/curr | Party.rkt | The first three lines of this file were inserted by . They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname Party) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f ... | null | https://raw.githubusercontent.com/bootstrapworld/curr/443015255eacc1c902a29978df0e3e8e8f3b9430/courses/reactive/resources/source-files/Party.rkt | racket | about the language level of this file in a form that our tools can easily process.
a party is a (make-party String String Number) | The first three lines of this file were inserted by . They record metadata
#reader(lib "htdp-beginner-reader.ss" "lang")((modname Party) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ())))
(define-struct party (location theme guests))
(define Halloween (mak... |
553664ec130658cdfbf9795855a20e30721a33afee230b4ca0baaf8b5ae3ebfa | jellelicht/guix | gcc.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2012 , 2013 , 2014 , 2015 < >
Copyright © 2014 , 2015 < >
Copyright © 2014 , 2015 , 2016 < >
Copyright © 2015 < >
Copyright © 2015 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it... | null | https://raw.githubusercontent.com/jellelicht/guix/83cfc9414fca3ab57c949e18c1ceb375a179b59c/gnu/packages/gcc.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2012 , 2013 , 2014 , 2015 < >
Copyright © 2014 , 2015 < >
Copyright © 2014 , 2015 , 2016 < >
Copyright © 2015 < >
Copyright © 2015 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along wit... |
d705ab5f2a28ea73f0a62de4ad591f5c60a3b6729bb9278a5f7788527d1efa8c | theodormoroianu/SecondYearCourses | lab13-sol_20210115191119.hs |
import Data.Char
import Data.List
prelStr strin = map toUpper strin
ioString = do
strin <- getLine
putStrLn $ "Intrare\n" ++ strin
let strout = prelStr strin
putStrLn $ "Iesire\n" ++ strout
prelNo noin = sqrt noin
ioNumber = do
noin <- readLn :: IO Double
... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab13/lab13-sol_20210115191119.hs | haskell |
import Data.Char
import Data.List
prelStr strin = map toUpper strin
ioString = do
strin <- getLine
putStrLn $ "Intrare\n" ++ strin
let strout = prelStr strin
putStrLn $ "Iesire\n" ++ strout
prelNo noin = sqrt noin
ioNumber = do
noin <- readLn :: IO Double
... | |
4900af36c4059af609e96bbc311df9ca09c72ef727f25726f8ec6edc88be9040 | DavidAlphaFox/RabbitMQ | rabbit_mqtt_frame.erl | The contents of this file are subject to the Mozilla Public License
%% Version 1.1 (the "License"); you may not use this file except in
%% compliance with the License. You may obtain a copy of the License
%% at /
%%
Software distributed under the License is distributed on an " AS IS "
%% basis, WITHOUT WARRANTY OF ... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-mqtt/src/rabbit_mqtt_frame.erl | erlang | Version 1.1 (the "License"); you may not use this file except in
compliance with the License. You may obtain a copy of the License
at /
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and
limitations under the License.
serialisation | The contents of this file are subject to the Mozilla Public License
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ .
The Initial Developer of the Original Code is GoPivotal , Inc.
Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved .
-module... |
d38fff20cad8754ec132ab3ef81f1713e208ae609ee977370ea60a1f154859d2 | jwiegley/notes | LensConduit.hs | module LensConduit where
import Control.Lens
import Data.Conduit
import Data.Conduit.List as CL
import Data.Monoid
import Data.Foldable
narrow :: Monad m => Getting (First a) i a -> ConduitM i a m ()
narrow l = awaitForever $ traverse_ yield . preview l
main :: IO ()
main = do
sourceList [Left 10, Right 20, Left... | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/f719a3d41696d48f6005/gists/8110327/LensConduit.hs | haskell | module LensConduit where
import Control.Lens
import Data.Conduit
import Data.Conduit.List as CL
import Data.Monoid
import Data.Foldable
narrow :: Monad m => Getting (First a) i a -> ConduitM i a m ()
narrow l = awaitForever $ traverse_ yield . preview l
main :: IO ()
main = do
sourceList [Left 10, Right 20, Left... | |
111bf01c9acae30206db8bf68627b8a6be41d4f2b575e9c81fe9d550f89b73a6 | inventi/jenkins-rabbitz | project.clj |
(defproject jenkins-rabbitz "1.0.0-SNAPSHOT"
:description "Jenkins karotz plugin"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/data.json "0.2.6"]
[org.jenkins-ci.main/jenkins-core "1.522"]
[javax.servlet/servlet-api "2.4"]
[com.goog... | null | https://raw.githubusercontent.com/inventi/jenkins-rabbitz/2a15a7df842ef9794df4a2932850867683d918d8/project.clj | clojure |
(defproject jenkins-rabbitz "1.0.0-SNAPSHOT"
:description "Jenkins karotz plugin"
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/data.json "0.2.6"]
[org.jenkins-ci.main/jenkins-core "1.522"]
[javax.servlet/servlet-api "2.4"]
[com.goog... | |
c6eb0e8e4d0c0ed4c5b0ec3b1a80220b7fa3953309294ef1b2d389e31839ea2d | hyperfiddle/electric | photon_bootstrap.cljc | (ns hyperfiddle.photon-bootstrap
(:refer-clojure :exclude [def fn defn for])
(:require [clojure.core :as cc]
[hyperfiddle.photon-impl.compiler :as c]
#?(:clj [hyperfiddle.rcf.analyzer :as ana]) ; todo remove
#?(:cljs [hyperfiddle.photon-client]))
#?(:cljs (:require-macros [... | null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/scratch/photon_bootstrap.cljc | clojure | todo remove
optional
Don't expand cc/binding (prevent infinite loop). Explicit implicit do
ClojureScript do not have vars at runtime and will not analyze or emit vars meta. No need to quote.
TODO self-refer
syntax quote doesn't qualify special forms like 'def | (ns hyperfiddle.photon-bootstrap
(:refer-clojure :exclude [def fn defn for])
(:require [clojure.core :as cc]
[hyperfiddle.photon-impl.compiler :as c]
#?(:cljs [hyperfiddle.photon-client]))
#?(:cljs (:require-macros [hyperfiddle.photon :refer [def defn fn for]])))
#?(:clj
(do
Optiona... |
a9c1f34423a830a97a075aee36db7a295543bd8395c18d24c4da573335bf8735 | Decentralized-Pictures/T4L3NT | test_funapp_input.ml | let f x y z = x + y + z
let _ = f 1 2 3 [@time.duration fun_app]
| null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/src/lib_time_measurement/ppx/test/valid/test_funapp_input.ml | ocaml | let f x y z = x + y + z
let _ = f 1 2 3 [@time.duration fun_app]
| |
f34832a6d20aba54dea4e9bf11dc5dcf233aae9486d59359b22bd60b4f3dd581 | ntestoc3/burp-clj | filter_exp.clj | (ns burp-clj.filter-exp
(:refer-clojure :exclude [eval])
(:require [instaparse.core :as insta :refer [defparser]]
[clojure.edn :as edn]
[clojure.string :as str]
[taoensso.timbre :as log]
[burp-clj.utils :as utils]))
(def whitespace (insta/parser "whitespace = #'\\s+'... | null | https://raw.githubusercontent.com/ntestoc3/burp-clj/436802d34fb77e183cf513ba767e3310d96f6946/src/burp_clj/filter_exp.clj | clojure | ]\\s*' | (ns burp-clj.filter-exp
(:refer-clojure :exclude [eval])
(:require [instaparse.core :as insta :refer [defparser]]
[clojure.edn :as edn]
[clojure.string :as str]
[taoensso.timbre :as log]
[burp-clj.utils :as utils]))
(def whitespace (insta/parser "whitespace = #'\\s+'... |
554ab8b679bfe9f309226c6bb3abb58446466a8e1d7c868dacfbc147d1064d3f | well-typed/visualize-cbn | Snoc.hs | -- | Snoc-lists
--
-- Intended for double import
--
> import CBN.Util . ( )
> import qualified CBN.Util . as
module CBN.Util.Snoc (
Snoc(..)
, fromList
) where
data Snoc a = Nil | Cons (Snoc a) a
deriving (Show, Eq, Ord)
fromList :: [a] -> Snoc a
fromList = foldl Cons Nil
| null | https://raw.githubusercontent.com/well-typed/visualize-cbn/499a8bc806ce03ce6d1bc12df1ea6e6df7768817/src/CBN/Util/Snoc.hs | haskell | | Snoc-lists
Intended for double import
| > import CBN.Util . ( )
> import qualified CBN.Util . as
module CBN.Util.Snoc (
Snoc(..)
, fromList
) where
data Snoc a = Nil | Cons (Snoc a) a
deriving (Show, Eq, Ord)
fromList :: [a] -> Snoc a
fromList = foldl Cons Nil
|
b7e817410211666a9c54c0a3b4921fae2090a60bfbdb0439c5ae10df4298014e | ocaml/ood | opam_user.ml | type metadata = {
name : string;
email : string option;
github_username : string;
avatar : string;
}
[@@deriving yaml]
let path = Fpath.v "data/opam-users.yml"
type t = {
name : string;
email : string option;
github_username : string;
avatar : string;
}
let parse s =
let yaml = Utils.decode_or_rais... | null | https://raw.githubusercontent.com/ocaml/ood/1db6cce7578eb2f358ead43ff398ed91cfdc0dbc/src/ood-gen/lib/opam_user.ml | ocaml | type metadata = {
name : string;
email : string option;
github_username : string;
avatar : string;
}
[@@deriving yaml]
let path = Fpath.v "data/opam-users.yml"
type t = {
name : string;
email : string option;
github_username : string;
avatar : string;
}
let parse s =
let yaml = Utils.decode_or_rais... | |
69a257372cf3d0a62fbcbddea2d571fee3a93b0de0f2f6c7cd5e1eab35df98fd | ptaoussanis/carmine | carmine.clj | (ns taoensso.carmine.tundra.carmine
"Secondary Redis server DataStore implementation for Tundra."
{:author "Peter Taoussanis"}
(:require [taoensso.encore :as enc]
[taoensso.timbre :as timbre]
[taoensso.carmine.tundra :as tundra])
(:import [taoensso.carmine.tundra IDataSt... | null | https://raw.githubusercontent.com/ptaoussanis/carmine/1ee878122f4ce5385ceaeb6b45935be68c93c68e/src/taoensso/carmine/tundra/carmine.clj | clojure | IDataStore
(put-key [dstore k v])
(fetch-keys [dstore ks])) | (ns taoensso.carmine.tundra.carmine
"Secondary Redis server DataStore implementation for Tundra."
{:author "Peter Taoussanis"}
(:require [taoensso.encore :as enc]
[taoensso.timbre :as timbre]
[taoensso.carmine.tundra :as tundra])
(:import [taoensso.carmine.tundra IDataSt... |
6f9b0372a69703c3549636484cdaa958671c6ab4e315e8dec1a0114df3b7f129 | MinaProtocol/mina | test.ml | open Core
open Async_kernel
open Pipe_lib
open Network_peer
module type Ledger_intf = sig
include Merkle_ledger.Syncable_intf.S
type account_id
val load_ledger : int -> int -> t * account_id list
end
module type Input_intf = sig
module Root_hash : sig
type t [@@deriving bin_io, compare, hash, sexp, comp... | null | https://raw.githubusercontent.com/MinaProtocol/mina/34961ab38efc5608c41e384489644948cad815a4/src/lib/syncable_ledger/test.ml | ocaml | not really kosher but the tests are run in-order, so this will get filled
* in before we need it.
Testing different ledger instantiations on Syncable_ledger
On the mask, all the children will have different values | open Core
open Async_kernel
open Pipe_lib
open Network_peer
module type Ledger_intf = sig
include Merkle_ledger.Syncable_intf.S
type account_id
val load_ledger : int -> int -> t * account_id list
end
module type Input_intf = sig
module Root_hash : sig
type t [@@deriving bin_io, compare, hash, sexp, comp... |
077322766b9265383c0f838f569bb9015139d63e2e8ce19cda262d0a63b731d5 | flipstone/haskell-for-beginners | 1_maximum_awesome.hs | -- Define a list of all Fibonacci numbers
fib :: Num a => [a]
fib = [ f n | n <- [1..] ]
where f 0 = 0
f 1 = 1
f n = (f (n - 1)) + (f (n - 2))
-- Implement a recursive function to find
-- the maximum element in a list of
-- pairs of elements.
maxPairElement :: Ord a => [(a,a)] -> a
maxPairElement [... | null | https://raw.githubusercontent.com/flipstone/haskell-for-beginners/e586a1f3ef08f21d5181171fe7a7b27057391f0b/answers/chapter_05/1_maximum_awesome.hs | haskell | Define a list of all Fibonacci numbers
Implement a recursive function to find
the maximum element in a list of
pairs of elements. |
fib :: Num a => [a]
fib = [ f n | n <- [1..] ]
where f 0 = 0
f 1 = 1
f n = (f (n - 1)) + (f (n - 2))
maxPairElement :: Ord a => [(a,a)] -> a
maxPairElement [] = error "Maximum of empty list"
maxPairElement [(x,y)]
| x >= y = x
| otherwise = y
maxPairElement ((x,y):rest) = max bigger (maxPairE... |
40f6a92c5b791c78fbc00b8e83d38ef66ddeebd3653db77219b1eaaf80915f0d | tisnik/clojure-examples | github_steps.clj | ;
( C ) Copyright 2018 , 2020
;
; All rights reserved. This program and the accompanying materials
; are made available under the terms of the Eclipse Public License v1.0
; which accompanies this distribution, and is available at
-v10.html
;
; Contributors:
;
(require '[expectations :refer [expe... | null | https://raw.githubusercontent.com/tisnik/clojure-examples/984af4a3e20d994b4f4989678ee1330e409fdae3/cucumber%2BexpectB/features/step_definitions/github_steps.clj | clojure |
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
Contributors:
| ( C ) Copyright 2018 , 2020
-v10.html
(require '[expectations :refer [expect]])
(require '[clojure.data.json :as json])
(def URL "/")
(def API-URL "")
(def context (atom {:response nil}))
(System/setProperty "https.protocols" "TLSv1,TLSv1.1,TLSv1.2")
(defn request
[address]
(let [url ... |
b7142623a0a15b234b44b979e0dd95ed3e4cea08ebd7db9f59bea870d63a9d68 | clj-kafka/franzy | dev.clj | (ns franzy.examples.embedded.dev
(:require [franzy.examples.embedded.kafka :as kafka]
[franzy.examples.embedded.zookeeper :as zookeeper]))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Naive dev environment
;;
;; Things to note... | null | https://raw.githubusercontent.com/clj-kafka/franzy/6c2e2e65ad137d2bcbc04ff6e671f97ea8c0e380/examples/src/franzy/examples/embedded/dev.clj | clojure |
Naive dev environment
Things to note:
and hold on to the reference somehow, in an atom, component, map, whatever
I can provided one, but I'm leaving this simple REPL friendly version for people who just want to fire something up
to evaluate.
| (ns franzy.examples.embedded.dev
(:require [franzy.examples.embedded.kafka :as kafka]
[franzy.examples.embedded.zookeeper :as zookeeper]))
1 . You should n't be using def for either the embedded zookeeper instance or kafka instance , instead create with a func
2 . This is the absolute barebones , see... |
11763dc4df39ef364100aeb4f2f654d349cd97726eeca611680d00c27c302cfb | inaimathi/house | model.lisp | (in-package :house)
(define-condition http-assertion-error (error)
((assertion :initarg :assertion :initform nil :reader assertion))
(:report (lambda (condition stream)
(format stream "Failed assertions '~s'"
(assertion condition)))))
(defmacro assert-http (assertion)
`(unless ,assertion
(erro... | null | https://raw.githubusercontent.com/inaimathi/house/ba30a381670c681fa722c22c5a03f329d4c67c2e/model.lisp | lisp | HTTP basic responses | (in-package :house)
(define-condition http-assertion-error (error)
((assertion :initarg :assertion :initform nil :reader assertion))
(:report (lambda (condition stream)
(format stream "Failed assertions '~s'"
(assertion condition)))))
(defmacro assert-http (assertion)
`(unless ,assertion
(erro... |
7315bdaebda96840ed41e6a5571a42c03aa19efdbd7564c2a3d925d95c2f8c86 | opencog/opencog | getNumberNode_WordInstanceNode.scm | Returning the NumberNode of a WordInstanceNode .
(define getNumberNode_WordInstanceNode
(BindLink
(VariableList
(VariableNode "$target")
(VariableNode "$number")
)
(AndLink
(ListLink
(AnchorNode "CurrentTarget")
(Variable... | null | https://raw.githubusercontent.com/opencog/opencog/53f2c2c8e26160e3321b399250afb0e3dbc64d4c/opencog/nlp/anaphora/rules/getNumberNode_WordInstanceNode.scm | scheme | Returning the NumberNode of a WordInstanceNode .
(define getNumberNode_WordInstanceNode
(BindLink
(VariableList
(VariableNode "$target")
(VariableNode "$number")
)
(AndLink
(ListLink
(AnchorNode "CurrentTarget")
(Variable... | |
06819d820af79a15271794ebfaf659e423cfa28fc83d707a9aa7aebc93b042d9 | the-concurrent-schemer/scm | scml_complex.erl | %%% The MIT License
%%%
Copyright ( C ) 2013 - 2014 by < >
%%%
%%% Permission is hereby granted, free of charge, to any person obtaining a copy
%%% of this software and associated documentation files (the "Software"), to deal
in the Software without restriction , including without limitation the rights
%%% to u... | null | https://raw.githubusercontent.com/the-concurrent-schemer/scm/1726ec2e94e766893d80c286f816599defb6a524/src/scml_complex.erl | erlang | The MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to do so, subject to the following conditions:
The above... | Copyright ( C ) 2013 - 2014 by < >
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , E... |
4dffde40c4fd524d1bc175ff0c11eb9b691c118508d5cc2c2eda26fc4b24be6e | racket/gui | main.rkt | (module main racket/base
(require "mred.rkt")
(provide (all-from-out "mred.rkt")))
| null | https://raw.githubusercontent.com/racket/gui/d1fef7a43a482c0fdd5672be9a6e713f16d8be5c/gui-lib/mred/main.rkt | racket | (module main racket/base
(require "mred.rkt")
(provide (all-from-out "mred.rkt")))
| |
e5bf354083861268408c6b7757fa88bc20e0b44ed38cdae4074306ee94b10aa1 | haskell/haskell-language-server | RefineIntro.hs | test :: a -> Either a b
test = _
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/f3ad27ba1634871b2240b8cd7de9f31b91a2e502/plugins/hls-tactics-plugin/new/test/golden/RefineIntro.hs | haskell | test :: a -> Either a b
test = _
| |
fcb92ddbb3282477679ef7ab5923c3b1fd17a9da83470dfa88301afa5b6b06ed | serras/cobalt | Syntax.hs | # LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
# LANGUAGE ViewPatterns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE ExistentialQuantification #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
# LANGUAGE Standalo... | null | https://raw.githubusercontent.com/serras/cobalt/cd8df75581a320fcca0d7d11b4b8c1788e8a5f9c/src/Cobalt/Language/Syntax.hs | haskell | * Terms
** Generic annotated terms
* Rules
* Whole program structure
** Environment
** Definitions
| RuleScriptMessage_VConcat TyVar (Bind TyVar RuleScriptMessage) RuleScriptMessage
| RuleScriptMessage_HConcat TyVar (Bind TyVar RuleScriptMessage)
| RuleScriptMessage_Vertical RuleScriptMessage RuleScrip... | # LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
# LANGUAGE ViewPatterns #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
# LANGUAGE ExistentialQuantification #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE UndecidableInstances #
# LANGUAGE Standalo... |
2ff3cecf2a120eeb5db81e0644096c2792d387d7c4a0e51dd376d8c136375ad0 | dmjio/miso | Main.hs | # LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Common
import Data.Proxy
import Miso
main :: IO ()
main = do
miso $ \currentURI ->
App { initialAction = NoOp
, model = Model currentURI "No event received"
, ..
}
where
update = updateModel
... | null | https://raw.githubusercontent.com/dmjio/miso/0be227bca6e0aec16a69a1c09f9a90624af070c1/examples/sse/client/Main.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE RecordWildCards #
module Main where
import Common
import Data.Proxy
import Miso
main :: IO ()
main = do
miso $ \currentURI ->
App { initialAction = NoOp
, model = Model currentURI "No event received"
, ..
}
where
update = updateModel
view m = case runRoute (Proxy ::... |
302974c95d8f56f149a107cc7bd3f663f8f67da855535ad4aa9e0a0d36c2d1fb | input-output-hk/cardano-wallet | Gen.hs | module Cardano.Tx.Balance.Internal.CoinSelection.Gen
( coarbitraryWalletUTxO
, genWalletUTxO
, genWalletUTxOFunction
, genWalletUTxOLargeRange
, shrinkWalletUTxO
)
where
import Prelude
import Cardano.Tx.Balance.Internal.CoinSelection
( WalletUTxO (..) )
import Cardano.Wallet.Primitive.... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/5c0d1ce9974eae8f7d7b1f87f97ab38895605c42/lib/balance-tx/lib/Cardano/Tx/Balance/Internal/CoinSelection/Gen.hs | haskell | ------------------------------------------------------------------------------
Wallet UTxO identifiers chosen according to the size parameter
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Wallet UTxO identi... | module Cardano.Tx.Balance.Internal.CoinSelection.Gen
( coarbitraryWalletUTxO
, genWalletUTxO
, genWalletUTxOFunction
, genWalletUTxOLargeRange
, shrinkWalletUTxO
)
where
import Prelude
import Cardano.Tx.Balance.Internal.CoinSelection
( WalletUTxO (..) )
import Cardano.Wallet.Primitive.... |
5c9daf129490acd5ab8e601840edde1cb78f6f3ec0b6b44e405f01af56ee9ee9 | xvw/quasar | binding.mli | * Tools to work with Node / NPM ecosystem
* { 2 API }
{ 3 Requiring }
{3 Requiring}
*)
(** OCaml version of [require]. *)
val require : string -> 'a
| null | https://raw.githubusercontent.com/xvw/quasar/a414d32ded53562802893590e2996bb8daeb0cf3/src/node/binding.mli | ocaml | * OCaml version of [require]. | * Tools to work with Node / NPM ecosystem
* { 2 API }
{ 3 Requiring }
{3 Requiring}
*)
val require : string -> 'a
|
71aadd9eeabacfad5e9329396ebdbceb78353a95cc430060e2dd1e9f0aac0529 | racket/drracket | get-defs-test.rkt | #lang racket
(require drracket/private/get-defs
framework
string-constants)
(define (get-definitions/string
string
#:define-prefix
[define-prefix
(list (define-popup-info "(define" "(define ...)" "δ"))])
(define text (new racket:text%))
(send text insert str... | null | https://raw.githubusercontent.com/racket/drracket/2d7c2cded99e630a69f05fb135d1bf7543096a23/drracket-test/tests/drracket/get-defs-test.rkt | racket | The end positions for f and the inner y look wrong to me.
If they look wrong to you too (but you know what you're doing),
please change the tests.
(module+ c 2) | #lang racket
(require drracket/private/get-defs
framework
string-constants)
(define (get-definitions/string
string
#:define-prefix
[define-prefix
(list (define-popup-info "(define" "(define ...)" "δ"))])
(define text (new racket:text%))
(send text insert str... |
43da643c1889b28b284b283f48c6ba3e16fbbc90812e2dbe14018918ed31bf37 | juxt-site/site | main.clj | Copyright © 2021 , JUXT LTD .
(ns juxt.site.main
(:require
juxt.site.schema
[aero.core :as aero]
[clojure.java.io :as io]
[clojure.tools.logging :as log]
[integrant.core :as ig]))
(def ^:dynamic *system* nil)
(def profile :prod)
(let [lock (Object.)]
(defn- load-namespaces
[system-config]
... | null | https://raw.githubusercontent.com/juxt-site/site/c96ae41b02688f231e3fbadb76e42d3d64e94565/src/juxt/site/main.clj | clojure | Copyright © 2021 , JUXT LTD .
(ns juxt.site.main
(:require
juxt.site.schema
[aero.core :as aero]
[clojure.java.io :as io]
[clojure.tools.logging :as log]
[integrant.core :as ig]))
(def ^:dynamic *system* nil)
(def profile :prod)
(let [lock (Object.)]
(defn- load-namespaces
[system-config]
... | |
438759124a00fcbeb80801a4a7d698d628e3a0b0719e4e980c920191a8b3cb28 | mbutterick/pollen | test-submodule.rkt | #lang racket/base
(require rackunit racket/runtime-path)
(define-runtime-path meta-test "data/metas/metatest.html.pm")
(define metas (dynamic-require `(submod ,meta-test metas) 'metas))
(check-equal? (hash-ref metas 'foo) 42) | null | https://raw.githubusercontent.com/mbutterick/pollen/a4910a86dc62d1147f3aad94b56cecd6499d7aa6/pollen/test/test-submodule.rkt | racket | #lang racket/base
(require rackunit racket/runtime-path)
(define-runtime-path meta-test "data/metas/metatest.html.pm")
(define metas (dynamic-require `(submod ,meta-test metas) 'metas))
(check-equal? (hash-ref metas 'foo) 42) | |
ac10fa5a833f2a32a5329a5f8fd8e80903444045ad1c1c049dd4ac02a58d2b53 | luochen1990/algebraic-json-spec | MultilingualShow.hs | Copyright 2018 LuoChen ( ) . Apache License 2.0
# language RankNTypes #
# language FlexibleInstances #
{-# language UndecidableInstances #-}
module Text.MultilingualShow where
class MultilingualShow a where
showEnWith, showZhWith :: (forall a'. MultilingualShow a' => a' -> String) -> (a -> String)
showZhW... | null | https://raw.githubusercontent.com/luochen1990/algebraic-json-spec/4bb5ad1c3c15cdd2cbe5bd57211ae505de1f154a/src/Text/MultilingualShow.hs | haskell | # language UndecidableInstances #
# Overlappable # | Copyright 2018 LuoChen ( ) . Apache License 2.0
# language RankNTypes #
# language FlexibleInstances #
module Text.MultilingualShow where
class MultilingualShow a where
showEnWith, showZhWith :: (forall a'. MultilingualShow a' => a' -> String) -> (a -> String)
showZhWith showPart = showEnWith showPart
... |
c591bda402add1d928254a702c18e00f8dc219e0529566c639db7531135d16cf | alanz/ghc-exactprint | records-exquant.hs | {-# LANGUAGE PatternSynonyms, ExistentialQuantification #-}
module ExQuant where
data Showable = forall a . Show a => Showable a
pattern Nasty{a} = Showable a
qux = a (Showable True)
foo = (Showable ()) { a = True }
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/records-exquant.hs | haskell | # LANGUAGE PatternSynonyms, ExistentialQuantification # | module ExQuant where
data Showable = forall a . Show a => Showable a
pattern Nasty{a} = Showable a
qux = a (Showable True)
foo = (Showable ()) { a = True }
|
c8a317fd4d0cebabe7544655e4ad41d1ef35388895298112304a3b593d7179ab | orbitz/kaiju | kaiju.ml | open Core.Std
open Async.Std
type s = { log : Zolog_std_event.t Zolog.t; config : Konfig.t }
module Flag = struct
open Command.Spec
let config_file () =
flag "-c" ~doc:" Path to config file"
(required string)
end
let logging = "logging"
let kaiju_kv_backends =
[ ("memory", Kaiju_kv_memory_backend.s... | null | https://raw.githubusercontent.com/orbitz/kaiju/9da6a07770cdfddde7d33b12f636df2615c36676/lib/kaiju/kaiju.ml | ocaml | open Core.Std
open Async.Std
type s = { log : Zolog_std_event.t Zolog.t; config : Konfig.t }
module Flag = struct
open Command.Spec
let config_file () =
flag "-c" ~doc:" Path to config file"
(required string)
end
let logging = "logging"
let kaiju_kv_backends =
[ ("memory", Kaiju_kv_memory_backend.s... | |
0074e03a4ddcdea289a903e4e3efd21a313d7864f3ab0fb40f24d145204946ad | Gadjib/ocamlhomeworks | p1.ml | type prefix = N of prefix*prefix | L of char;;
let rec add_to_list c l =
match l with
| [] -> [(c,1)]
| hd::tl -> if fst hd = c then [c,((snd hd)+1)]@tl else hd::(add_to_list c tl)
;;
let create_list p =
let rec f p l =
match p with
| L c -> add_to_list c l
| N (p1,p2) -> f... | null | https://raw.githubusercontent.com/Gadjib/ocamlhomeworks/d5568d4830d4306ea56749f17af355bc35001eff/9%20%D0%BA%D0%BB%D0%B0%D1%81%D1%81/2%20%D1%87%D0%B5%D1%82%D0%B2%D0%B5%D1%80%D1%82%D1%8C/CW%202019-11-06/p1.ml | ocaml | type prefix = N of prefix*prefix | L of char;;
let rec add_to_list c l =
match l with
| [] -> [(c,1)]
| hd::tl -> if fst hd = c then [c,((snd hd)+1)]@tl else hd::(add_to_list c tl)
;;
let create_list p =
let rec f p l =
match p with
| L c -> add_to_list c l
| N (p1,p2) -> f... | |
d0df9e619664abfe6c49cc568f6a260904603a9d9f536269ebada7348db39914 | aysylu/loom | io.clj | (ns ^{:doc "Output and view graphs in various formats"
:author "Justin Kramer"}
loom.io
(:require [loom.graph :refer [directed? weighted? nodes edges weight src dest]]
[loom.alg :refer [distinct-edges loners]]
[loom.attr :refer [attr? attr attrs]]
[clojure.string :refer [es... | null | https://raw.githubusercontent.com/aysylu/loom/add695a69f9e279e7246ffe966d52c1582a9db7e/src/loom/io.clj | clojure | Maybe it's ok for Linux? | (ns ^{:doc "Output and view graphs in various formats"
:author "Justin Kramer"}
loom.io
(:require [loom.graph :refer [directed? weighted? nodes edges weight src dest]]
[loom.alg :refer [distinct-edges loners]]
[loom.attr :refer [attr? attr attrs]]
[clojure.string :refer [es... |
5d04541ad8b654d8ca2bfe52d3d9f825454593b5141c6027162e077bcd6e91e3 | ggreif/omega | TyEqGen.hs | # LANGUAGE FlexibleInstances , GADTs , MultiParamTypeClasses , TypeOperators , TypeSynonymInstances , ViewPatterns #
module Data.Type.Equality.Generics where
import Data.Type.Equality
import GHC.Generics
import Unsafe.Coerce (unsafeCoerce)
sameRep' :: (Generic a, Generic b, Rep a ~ D1 d f, Rep b ~ D1 d' f', Datatype... | null | https://raw.githubusercontent.com/ggreif/omega/016a3b48313ec2c68e8d8ad60147015bc38f2767/mosaic/TyEqGen.hs | haskell | # LANGUAGE FlexibleInstances , GADTs , MultiParamTypeClasses , TypeOperators , TypeSynonymInstances , ViewPatterns #
module Data.Type.Equality.Generics where
import Data.Type.Equality
import GHC.Generics
import Unsafe.Coerce (unsafeCoerce)
sameRep' :: (Generic a, Generic b, Rep a ~ D1 d f, Rep b ~ D1 d' f', Datatype... | |
c6bbb91adca07d587662835134caa0e1367610e61180278a8ca61868cd57f378 | scrive/unjson | Compat.hs | # LANGUAGE CPP #
module Data.Unjson.Internal.Aeson.Compat
( module Map
#if !MIN_VERSION_aeson(2,0,1)
, KeyMap
#endif
, fromText
, toText
, convertPair
, LazyKeyMap
, testErrorMessage
, fromString
, toString
, lazyKeyMapFromList
) where
import Data.Text
import qualified Data.Aeson.Types as A
#if ... | null | https://raw.githubusercontent.com/scrive/unjson/7a8e6a8cda0f939dea07c3625b1fc7a6d5f5643d/src/Data/Unjson/Internal/Aeson/Compat.hs | haskell | # LANGUAGE CPP #
module Data.Unjson.Internal.Aeson.Compat
( module Map
#if !MIN_VERSION_aeson(2,0,1)
, KeyMap
#endif
, fromText
, toText
, convertPair
, LazyKeyMap
, testErrorMessage
, fromString
, toString
, lazyKeyMapFromList
) where
import Data.Text
import qualified Data.Aeson.Types as A
#if ... | |
5cbc0806500c81c1898227050745ab01790917155923ccda79a365325283af7c | tibbe/event | Args.hs | module Args
(
theLast
, ljust
, nonNegative
, parseArgs
, positive
, printUsage
) where
import Data.Monoid (Monoid(..), Last(..))
import System.Console.GetOpt (OptDescr, ArgOrder(Permute), getOpt, usageInfo)
import System.Environment (getProgName)
import System.Exit (ExitCode(..), exi... | null | https://raw.githubusercontent.com/tibbe/event/2ca43e49327aa7854396b800ff4184d8b00a69f0/benchmarks/Args.hs | haskell | | Deconstructor for 'Last' values.
^ Field to access.
| Constructor for 'Last' values.
| Parse a positive number.
| Parse a positive number.
| Display an error message from a command line parsing failure, and
exit. | module Args
(
theLast
, ljust
, nonNegative
, parseArgs
, positive
, printUsage
) where
import Data.Monoid (Monoid(..), Last(..))
import System.Console.GetOpt (OptDescr, ArgOrder(Permute), getOpt, usageInfo)
import System.Environment (getProgName)
import System.Exit (ExitCode(..), exi... |
7b44888e979bf2ab6e9ef4b4c603ddf5f179cc105531fac27ae31f8488095409 | ghc/testsuite | T7338a.hs | module T7338a where
a, b :: Int
a = undefined
b = undefined
c, a :: Int
c = undefined
c, d :: Int
d = undefined | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/rename/should_fail/T7338a.hs | haskell | module T7338a where
a, b :: Int
a = undefined
b = undefined
c, a :: Int
c = undefined
c, d :: Int
d = undefined | |
5fe65e084349c884db1050cd30e76f542c8df9bdca6047b3032685dbd74b2a9d | patperry/hs-linear-algebra | MMatrix.hs | -----------------------------------------------------------------------------
-- |
Module : Data . Matrix . Class .
Copyright : Copyright ( c ) , < >
-- License : BSD3
Maintainer : < >
-- Stability : experimental
--
-- An overloaded interface for mutable matrices. The type class associates a
-- ... | null | https://raw.githubusercontent.com/patperry/hs-linear-algebra/887939175e03687b12eabe2fce5904b494242a1a/lib/Data/Matrix/Class/MMatrix.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
An overloaded interface for mutable matrices. The type class associates a
matrix with a monad type in which operations can be perfomred. The
matrices provide access to rows and columns, and ... | Module : Data . Matrix . Class .
Copyright : Copyright ( c ) , < >
Maintainer : < >
module Data.Matrix.Class.MMatrix (
* The type class
MMatrix,
getRow,
getCol,
getRows,
getCols,
getRows',
getCols',
getApplyVector,
getSApplyVector,
getApplyMatri... |
5a667e6b93769f4044a0b4c7ef8ab922815900f229686b8c400cb041f5c916b5 | gfour/gic | LARBuiltins.hs | -- | The built-in functions and variables used in the generated
-- C code of the LAR back-end.
--
module SLIC.LAR.LARBuiltins (bfsLARInfo, blockNotApp, builtins,
builtinConstrsDecls, mulISig, prettyPrintersC,
prettyPrintersFor, pprinterName, pprinterSig) w... | null | https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/SLIC/LAR/LARBuiltins.hs | haskell | | The built-in functions and variables used in the generated
C code of the LAR back-end.
| Creates the C built-in functions that are needed by the generated code.
This contains automatically generated 'Show' functions and auxiliaries.
| The memory allocation function for arbitrary precision numbers.
| The ... |
module SLIC.LAR.LARBuiltins (bfsLARInfo, blockNotApp, builtins,
builtinConstrsDecls, mulISig, prettyPrintersC,
prettyPrintersFor, pprinterName, pprinterSig) where
import Data.List (intersperse)
import qualified Data.Map as M (lookup)
import SLIC.AuxFun
import... |
fe4068950f34c2eae0a1e4c3837ec1737c1a9b82d481f8ec84d9e4f2993d2dde | eugeneia/athens | quicklisp.lisp | ;;;;
This is quicklisp.lisp , the quickstart file for Quicklisp . To use
;;;; it, start Lisp, then (load "quicklisp.lisp")
;;;;
Quicklisp is beta software and comes with no warranty of any kind .
;;;;
For more information about the Quicklisp beta , see :
;;;;
/
;;;;
If you have any questions or comments ab... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/lib/quicklisp/quicklisp.lisp | lisp |
it, start Lisp, then (load "quicklisp.lisp")
contact:
Defining implementation-specific packages and functionality
Clozure CL
MKCL
Utility function
Low-level networking implementations
A text progress bar
A simple HTTP client
Octet data
ASCII characters as integers
Pattern matching (for find... | This is quicklisp.lisp , the quickstart file for Quicklisp . To use
Quicklisp is beta software and comes with no warranty of any kind .
For more information about the Quicklisp beta , see :
/
If you have any questions or comments about Quicklisp , please
< >
(cl:in-package #:cl-user)
(cl:defpackag... |
63653d2456c0fff06f6c0ae97f29c554fb566b8c78cd81928ff81993f8409d34 | kizzx2/haskell-qrcode | Blocks.hs | {-# OPTIONS_HADDOCK hide #-}
module Codec.Binary.QRCode.Blocks where
import Codec.Binary.QRCode.Utils
import Codec.Binary.QRCode.Spec
import Codec.Binary.QRCode.GaloisField
import Control.Monad
type Codewords = [BitStream]
mkPolyForEncode :: Version -> ErrorLevel -> BitStream -> GFPolynomial
mkPolyForEncode (Versi... | null | https://raw.githubusercontent.com/kizzx2/haskell-qrcode/be06628d4cb77381c55a788c11c1695ebe432c28/Codec/Binary/QRCode/Blocks.hs | haskell | # OPTIONS_HADDOCK hide # |
module Codec.Binary.QRCode.Blocks where
import Codec.Binary.QRCode.Utils
import Codec.Binary.QRCode.Spec
import Codec.Binary.QRCode.GaloisField
import Control.Monad
type Codewords = [BitStream]
mkPolyForEncode :: Version -> ErrorLevel -> BitStream -> GFPolynomial
mkPolyForEncode (Version v) errLevel bitstream = gf... |
09f242e2f274a214fcfdbbed9ff9390f900863f0e03214725d52ed64880bcc1a | dsheets/ocaml-unix-sys-stat | test.ml |
* Copyright ( c ) 2016 < >
*
* 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/dsheets/ocaml-unix-sys-stat/6e1b61bc9bc19933d4b28e4dccd146089808da95/lib_test/test.ml | ocaml |
* Copyright ( c ) 2016 < >
*
* 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... | |
1eaf3b1e6eb231a60b696a8538ba9f977d5a07344465e722b91430b8a91b9b0c | simhu/cubical | Eval.hs | # LANGUAGE CPP #
module Eval ( eval
, evals
, app
, conv
, fstSVal
) where
import Control.Arrow (second)
import Data.List
import Data.Maybe (fromMaybe)
import qualified Debug.Trace as DT
import CTT
debug :: Bool
#ifdef debugmode
debug = True
#else
debug = F... | null | https://raw.githubusercontent.com/simhu/cubical/53bab8a89246ec658d4a6436534242d0ce15eb35/Eval.hs | haskell | stop at lambdas
Application
app vext@(VExt x bv fv gv pv) w = do
-- NB: there are various choices how to construct this
let y = fresh (vext, w)
w0 <- w `face` (x,down)
left <- app fv w0
right <- app gv (swap w x y)
pvxw <- appNameM (app pv w0) x
v should be neutral
r should be neutral
p has... | # LANGUAGE CPP #
module Eval ( eval
, evals
, app
, conv
, fstSVal
) where
import Control.Arrow (second)
import Data.List
import Data.Maybe (fromMaybe)
import qualified Debug.Trace as DT
import CTT
debug :: Bool
#ifdef debugmode
debug = True
#else
debug = F... |
e170a85256a24610387b7d9e6fb1f6d68512102ddc0a95e729a139784d0356ac | roburio/unikernels | unikernel.ml | ( c ) 2018 , all rights reserved
open Lwt.Infix
module Main (R : Mirage_random.S) (P : Mirage_clock.PCLOCK) (M : Mirage_clock.MCLOCK) (T : Mirage_time.S) (S: Mirage_stack.V4) = struct
module D = Dns_certify_mirage.Make(R)(P)(T)(S)
module TLS = Tls_mirage.Make(S.TCPV4)
let rec handle flow =
TLS.read flow... | null | https://raw.githubusercontent.com/roburio/unikernels/1cd349fef3ffc4d3fbb51bd7d35421c8d8bb9671/certificate/unikernel.ml | ocaml | TODO: move to TLS | ( c ) 2018 , all rights reserved
open Lwt.Infix
module Main (R : Mirage_random.S) (P : Mirage_clock.PCLOCK) (M : Mirage_clock.MCLOCK) (T : Mirage_time.S) (S: Mirage_stack.V4) = struct
module D = Dns_certify_mirage.Make(R)(P)(T)(S)
module TLS = Tls_mirage.Make(S.TCPV4)
let rec handle flow =
TLS.read flow... |
af303e8a2f22ec7c121db4b41759612cdcbe34fc9edf960948eef0c4b6c065d3 | well-typed/large-records | R070.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
# OPTIONS_GHC -fplugin = TypeLet #
module Experiment.HListLetAsCPS.Sized.R070 where
import TypeLet
import Bench.HList
import Bench.Types
... | null | https://raw.githubusercontent.com/well-typed/large-records/f75ba52570d07e1171e2c87ad7e4c1f466d9367f/large-records-benchmarks/bench/typelet/Experiment/HListLetAsCPS/Sized/R070.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-ds-preopt -ddump-ds -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings # | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
# OPTIONS_GHC -fplugin = TypeLet #
module Experiment.HListLetAsCPS.Sized.R070 where
import TypeLet
import Bench.HList
import Bench.Types
import Common.HListOfSize.HL070
hlist :: HList Fields
hlist = constructLet $ \_ ->
69 .. 60
letAs' (MkT 69 :* Nil) $ ... |
094047fc683bf618f7c1b419812547220a7c9e5a898120fe244b65d1250f3fd6 | well-typed-lightbulbs/ocaml-esp32 | test5_plugin_b.ml | let () =
if Dynlink.is_native then begin
Dynlink.loadfile "test5_second_plugin.cmxs"
end else begin
Dynlink.loadfile "test5_second_plugin.cmo"
end
| null | https://raw.githubusercontent.com/well-typed-lightbulbs/ocaml-esp32/c24fcbfbee0e3aa6bb71c9b467c60c6bac326cc7/testsuite/tests/lib-dynlink-initializers/test5_plugin_b.ml | ocaml | let () =
if Dynlink.is_native then begin
Dynlink.loadfile "test5_second_plugin.cmxs"
end else begin
Dynlink.loadfile "test5_second_plugin.cmo"
end
| |
3d4ab255f194cf7adbe864117890d5c49e1a007ba2eeb4b30864660aa90f6a74 | bsansouci/bsb-native | odoc_latex.ml | (***********************************************************************)
(* *)
(* OCamldoc *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bsansouci/bsb-native/9a89457783d6e80deb0fba9ca7372c10a768a9ea/vendor/ocaml/ocamldoc/odoc_latex.ml | ocaml | *********************************************************************
OCamldoc
... | , projet Cristal , INRIA Rocquencourt
Copyright 2001 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
let print_DEBUG s = print_string s ; prin... |
1f86d099615762ebb7c982d3ea24f64871b881a9bf033e564401dfb8fa8ed952 | ocaml-ppx/ppx | test.ml | open Ppx_ast
open V4_07
let loc = Ocaml_common.Location.none
[@@warning "-3"]
let int x = eint ~loc x
let int32 x = eint32 ~loc x
let float x = efloat ~loc (Float.to_string x)
let ident x = pexp_ident ~loc (Located.lident ~loc x)
let class_infos =
let extension =
Extension.create ({ loc; txt = "ext" } , Payloa... | null | https://raw.githubusercontent.com/ocaml-ppx/ppx/40e5a35a4386d969effaf428078c900bd03b78ec/ppx_view/test/test.ml | ocaml | open Ppx_ast
open V4_07
let loc = Ocaml_common.Location.none
[@@warning "-3"]
let int x = eint ~loc x
let int32 x = eint32 ~loc x
let float x = efloat ~loc (Float.to_string x)
let ident x = pexp_ident ~loc (Located.lident ~loc x)
let class_infos =
let extension =
Extension.create ({ loc; txt = "ext" } , Payloa... | |
7ff2db15c7d39ffa93352f7b989a8deda56f16e1522bed94836ce28a5465e568 | juxt/jig | project.clj | Copyright © 2013 , JUXT LTD . 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 b... | null | https://raw.githubusercontent.com/juxt/jig/3997887e5a56faadb1b48eccecbc7034b3d31e41/extensions/ring/project.clj | clojure |
The use and distribution terms for this software are covered by the
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 this notice, or any other, from this software. | Copyright © 2013 , JUXT LTD . All Rights Reserved .
Eclipse Public License 1.0 ( -1.0.php )
(load-file "project-header.clj")
(def version (get-version))
(defproject jig/ring version
:description "A Jig extension that provides support for Ring-based web applications"
:url ""
:license {:name "Eclipse Public ... |
4fff4c9242a7846f1992e40a7ee4aa32e6ff8abbc704f6df52130b13f967063c | tweag/ormolu | operator-comments-0-out.hs | foo =
bar
++
{- some comment -}
case foo of
a -> a
foo =
bar
++ {- some comment -} case foo of
a -> a
foo =
bar
++ case foo {- some comment -} of
a -> a
| null | https://raw.githubusercontent.com/tweag/ormolu/34bdf62429768f24b70d0f8ba7730fc4d8ae73ba/data/examples/declaration/value/function/operator-comments-0-out.hs | haskell | some comment
some comment
some comment | foo =
bar
++
case foo of
a -> a
foo =
bar
a -> a
foo =
bar
a -> a
|
c5c5206b4b5e36c76e22b298d9efb172a63406b9a73c5e891822fab34ea05b1c | aryx/lfs | demo.ml | open Common
open Lfs
open Path
open Plugins
open Ioplugins
(*****************************************************************************)
(* note: to debug can be helpful to put some 'end let res () = begin'
* in the middle of a demo to end the demo at that point.
*
* could: as work with pure data-structu... | null | https://raw.githubusercontent.com/aryx/lfs/b931530c7132b77dfaf3c99d452dc044fce37589/demo.ml | ocaml | ***************************************************************************
note: to debug can be helpful to put some 'end let res () = begin'
* in the middle of a demo to end the demo at that point.
*
* could: as work with pure data-structure, could do a function undo;
* just need to save the old world and ... | open Common
open Lfs
open Path
open Plugins
open Ioplugins
let ls_ () = Lfs.ls_bis ()
let ls_print () = ls_() +> List.iter print_endline
let principles_demo () =
begin
mkdir "art";
mkdir "music";
mkdir "movie";
mkdir "port";
mkdir "seaside";
mkdir "USA";
mkdir "capital";
cd_ ... |
45ee0d5e13968a36af872938a6a3d6d6291de2ac7b265ceb8f023ecc9325b687 | sergv/hkanren | HKanren.hs | -- | /What's in hkanren?/
--
-- ['disconj']
-- Try the left and the right and gather solutions that satisfy
-- either one.
-- ['fresh']
-- Create a fresh logical variable
-- ['===']
Equate two terms . This will backtrack if we ca n't unify
-- them in this branch.
-- ['run']
-- Actually run a logical compu... | null | https://raw.githubusercontent.com/sergv/hkanren/94a9038f5885471c9f4d3b17a8e52af4e7747af3/src/Language/HKanren.hs | haskell | | /What's in hkanren?/
['disconj']
Try the left and the right and gather solutions that satisfy
either one.
['fresh']
Create a fresh logical variable
['===']
them in this branch.
['run']
Actually run a logical computation and return results and
the constraints on them.
In addition to these cor... | Equate two terms . This will backtrack if we ca n't unify
> , manyFresh $ \h t o - >
> > > map fst . runN 1 $ \t - > appendo t l l
> > > map fst . runN 1 $ \t - > appendo l t l
> > > map fst . runN 1 $ \t - > appendo l l t
' Language . HKanren . Core ' and some simple combinators from
' Languag... |
909807ebd33f62dba096227f8cdd36df9751da366564e586005c173b09d13975 | jaredly/reason-language-server | predef.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/407/predef.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Path
open Types
open Btype
let builtin_idents = ref []
let wrap create s =
let id = create s in... |
f49ccd3cbe6010a0d212976653ab9d01e771c89e332c6f18195b697b105b928b | sunshineclt/Racket-Helper | homework6-1.rkt | #lang racket
(require r5rs)
(define env (scheme-report-environment 5))
(eval ;only after evaluating your count-pairs, the program in the input can use count-pairs
'
(begin
(define counted '())
(define (count-pairs x)
(define (not-counted? x)
(define (not-counted-single x now)
(if (null? n... | null | https://raw.githubusercontent.com/sunshineclt/Racket-Helper/bf85f38dd8d084db68265bb98d8c38bada6494ec/%E9%99%88%E4%B9%90%E5%A4%A9/Week6/homework6-1.rkt | racket | only after evaluating your count-pairs, the program in the input can use count-pairs | #lang racket
(require r5rs)
(define env (scheme-report-environment 5))
'
(begin
(define counted '())
(define (count-pairs x)
(define (not-counted? x)
(define (not-counted-single x now)
(if (null? now)
#t
(if (eq? x (car now))
#f
(... |
e4f15030611dd209da332dfde05a46231659af9ad51feec92d8d7495f39384e4 | TrustInSoft/tis-interpreter | partition.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of WP plug - in of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/plugins/wp/qed/src/partition.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of WP plug - in of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat a l'energie atomique et aux energies
Lesser General Public License as published by the Free Soft... |
0b28d83d936e683fbe12c2e36960ddae80a25a60ea4418acfad3ee784e9f76b2 | simplegeo/erlang | sets_test_lib.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2004 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/stdlib/test/sets_test_lib.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2004 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(sets_test_lib, [Mod,Equal]).
-exp... |
f9ee7498bcbcdf854096c8eefcfd0e200821935c3011e22e8eab27483c80d072 | jumarko/clojure-experiments | day-02.clj | (ns advent-of-clojure.advent-2017.day-02
"Day 2 of Advent of Clojure 2017 - Corruption Checksum:
Part I:
------------------------------------------------------------------------------
As you walk through the door, a glowing humanoid shape yells in your direction.
\"You there! Your state appears to be idle. ... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/f0f9c091959e7f54c3fb13d0585a793ebb09e4f9/src/clojure_experiments/advent_of_code/advent_2017/day-02.clj | clojure |
force sequence eval with `mapv`
PART I:
| (ns advent-of-clojure.advent-2017.day-02
"Day 2 of Advent of Clojure 2017 - Corruption Checksum:
Part I:
------------------------------------------------------------------------------
As you walk through the door, a glowing humanoid shape yells in your direction.
\"You there! Your state appears to be idle. ... |
d80c37ea577e8fb04495c1215e56478885d921d96b5b0aa50a48e79ff875eea4 | RichiH/git-annex | ReadOnly.hs | Adds readonly support to remotes .
-
- Copyright 2013 , 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2013, 2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Remote.Helper.ReadOnly
( adjustReadOnly
, readonlyStoreKey
, readonlyStor... | null | https://raw.githubusercontent.com/RichiH/git-annex/bbcad2b0af8cd9264d0cb86e6ca126ae626171f3/Remote/Helper/ReadOnly.hs | haskell | Adds support for read-only remotes, by replacing the
- methods that write to a remote with dummies that fail.
-
- Note that disabling git pushes to remotes is not handled here.
| Adds readonly support to remotes .
-
- Copyright 2013 , 2015 < >
-
- Licensed under the GNU GPL version 3 or higher .
-
- Copyright 2013, 2015 Joey Hess <>
-
- Licensed under the GNU GPL version 3 or higher.
-}
module Remote.Helper.ReadOnly
( adjustReadOnly
, readonlyStoreKey
, readonlyStor... |
757623a5e03aa071ae4a4b3241f57957485e450eeabf759f0c8aca9d0ded66cc | manuel-serrano/hop | math.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / hopscript / math.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/c41c4185f34f984ab16d0060a99f0c6fa4be5d44/hopscript/math.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* -international.org/ecma... | * serrano / prgm / project / hop / hop / hopscript / math.scm * /
* Author : * /
* Creation : Fri Sep 20 10:47:16 2013 * /
* Last change : Fri Oct 14 14:59:10 2022 ( serrano ) * /
* Copy... |
9680063ed72d835e472f5859a1800efa91b53bc7a3387ddcfde8a09367932cc8 | ocamllabs/ocaml-modular-implicits | weak.mli | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/stdlib/weak.mli | ocaml | *********************************************************************
OCaml
... | , projet Para , INRIA Rocquencourt
Copyright 1997 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the GNU Library General Public License , with
* { 6 Low - level functions }
type 'a ... |
e0ae0cc1cd9da3be43506dc42d5a77d977a37dd7b81ed53532eaeb808a63e8f2 | clarkhillm/Hawkmoth | Test.clj | (ns
^{:author gavin}
MPU.Test
(:use :reload-all clodiuno.core)
(:use :reload-all clodiuno.firmata)
)
(System/setProperty "gnu.io.rxtx.SerialPorts" "/dev/ttyACM0")
(def board (arduino :firmata "/dev/ttyACM0"))
(i2c-ini board)
(def address 0x68)
(close board) | null | https://raw.githubusercontent.com/clarkhillm/Hawkmoth/608767bb86c380fadaf12f9201e2198e5766eabb/src/MPU/Test.clj | clojure | (ns
^{:author gavin}
MPU.Test
(:use :reload-all clodiuno.core)
(:use :reload-all clodiuno.firmata)
)
(System/setProperty "gnu.io.rxtx.SerialPorts" "/dev/ttyACM0")
(def board (arduino :firmata "/dev/ttyACM0"))
(i2c-ini board)
(def address 0x68)
(close board) | |
60212d1eb4385ed16d1751a7637069d5fea3bdc8c4a45dab7ba090dcf1b89e9d | avsm/mirage-duniverse | loc.mli | (** Located items *)
open! Import
type 'a t = 'a loc =
{ txt : 'a
; loc : Location.t
}
val txt : 'a t -> 'a
val loc : _ t -> Location.t
val make : loc:Location.t -> 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
| null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/ppxlib/src/loc.mli | ocaml | * Located items |
open! Import
type 'a t = 'a loc =
{ txt : 'a
; loc : Location.t
}
val txt : 'a t -> 'a
val loc : _ t -> Location.t
val make : loc:Location.t -> 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.