_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 |
|---|---|---|---|---|---|---|---|---|
1a14f0cc298a0fcd3405b5f804342cbaa91d2b77165e43fc989115d0609c3c2f | polyfy/polylith | m101_illegal_namespace_deps.clj | (ns polylith.clj.core.validator.m101-illegal-namespace-deps
(:require [clojure.string :as str]
[polylith.clj.core.deps.interface :as deps]
[polylith.clj.core.util.interface :as util]
[polylith.clj.core.util.interface.color :as color]))
(defn error-message [{:keys [namespace depend... | null | https://raw.githubusercontent.com/polyfy/polylith/febea3d8a9b30a60397594dda3cb0f25154b8d8d/components/validator/src/polylith/clj/core/validator/m101_illegal_namespace_deps.clj | clojure | (ns polylith.clj.core.validator.m101-illegal-namespace-deps
(:require [clojure.string :as str]
[polylith.clj.core.deps.interface :as deps]
[polylith.clj.core.util.interface :as util]
[polylith.clj.core.util.interface.color :as color]))
(defn error-message [{:keys [namespace depend... | |
4f1b94038248c95d09ea0b73ded0bef70d36b3084579d0f12456770d0b5d843a | sgbj/MaximaSharp | dqk15w.lisp | ;;; Compiled by f2cl version:
( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
;;; "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/numerical/slatec/dqk15w.lisp | lisp | Compiled by f2cl version:
"f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $"
Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
(:coerce-assigns :as-needed) (:array-type ':array)
(:array-slicing t) (:declare-common nil)
(:float-format double-float)) | ( " f2cl1.l , v 46c1f6a93b0d 2012/05/03 04:40:28 toy $ "
" f2cl2.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl3.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl4.l , v 96616d88fb7e 2008/02/22 22:19:34 rtoy $ "
" f2cl6.l , v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $ "
" macros.l , v fceac53... |
615e7cc6f20086c0798692438bc191e4f7a2f1c2cf2bb098c103a23e5202b62e | herd/herdtools7 | lexUtils.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/lib/lexUtils.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2010 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
ca02334a85552fcd1df028b53ea9c0320dc4e868010471209312c1ce5193edbd | ppaml-op3/insomnia | ConstructImportDefinitions.hs | module Insomnia.Typecheck.ConstructImportDefinitions (constructImportDefinitions) where
import Data.Monoid (Monoid(..), (<>), Endo(..))
import qualified Unbound.Generics.LocallyNameless as U
import Insomnia.Common.Stochasticity
import Insomnia.Identifier (Path(..), lastOfPath)
import Insomnia.Expr (QVar(..), Expr(..... | null | https://raw.githubusercontent.com/ppaml-op3/insomnia/5fc6eb1d554e8853d2fc929a957c7edce9e8867d/src/Insomnia/Typecheck/ConstructImportDefinitions.hs | haskell | sig f : T
val f = p.f
TODO: for polymorphic types this doesn't kindcheck.
if this is an alias for an abstract type or for another
manifest alias, just alias it. If this is an alias for a
data type, make a datatype copy; if it's an alias for a
datatype copy, propagate the copy. | module Insomnia.Typecheck.ConstructImportDefinitions (constructImportDefinitions) where
import Data.Monoid (Monoid(..), (<>), Endo(..))
import qualified Unbound.Generics.LocallyNameless as U
import Insomnia.Common.Stochasticity
import Insomnia.Identifier (Path(..), lastOfPath)
import Insomnia.Expr (QVar(..), Expr(..... |
5e7955d6fcb68e23609476981bee87128d68e64577883803490c00bad954b9c1 | axellang/axel | golden_StringSyntax.hs | module StringSyntax where
import Axel
import qualified Prelude as AxelRuntime_GHCPrelude
import qualified Axel.Parse.AST as AxelRuntime_AST
import qualified Axel.Sourcemap as AxelRuntime_Sourcemap
foo = "some\nstring\n multiline\t{- this should be in the string -} -- and this" | null | https://raw.githubusercontent.com/axellang/axel/91f323dac411e4932c9fa45da14acdbfff4af910/test/Axel/Test/Transpilation/syntax/golden_StringSyntax.hs | haskell | module StringSyntax where
import Axel
import qualified Prelude as AxelRuntime_GHCPrelude
import qualified Axel.Parse.AST as AxelRuntime_AST
import qualified Axel.Sourcemap as AxelRuntime_Sourcemap
foo = "some\nstring\n multiline\t{- this should be in the string -} -- and this" | |
445f1395c4ff5983d6f3037394a0164ba9c7d56128e81aa002395b6267649a97 | brevis-us/brevis | cylinder.clj | (ns us.brevis.shape.cylinder
(:import [us.brevis BrShape])
(:require [brevis-utils.parameters :as parameters])
(:use [us.brevis vector]
[us.brevis.shape.core]))
(defn create-cylinder
"Create a cone object."
([]
(create-cylinder 1 1))
([length radius]
(create-cylinder length radius radius))
... | null | https://raw.githubusercontent.com/brevis-us/brevis/de51c173279e82cca6d5990010144167050358a3/src/main/clojure/us/brevis/shape/cylinder.clj | clojure | (ns us.brevis.shape.cylinder
(:import [us.brevis BrShape])
(:require [brevis-utils.parameters :as parameters])
(:use [us.brevis vector]
[us.brevis.shape.core]))
(defn create-cylinder
"Create a cone object."
([]
(create-cylinder 1 1))
([length radius]
(create-cylinder length radius radius))
... | |
2d0cffa336a1030a0bb1dc021fab2b5f8c236532f22764ef461789941505472f | dyzsr/ocaml-selectml | ast_iterator.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/dyzsr/ocaml-selectml/875544110abb3350e9fb5ec9bbadffa332c270d2/parsing/ast_iterator.mli | ocaml | ************************************************************************
OCaml
... | , LexiFi
Copyright 2012 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* { ! Ast_iterator.iterator } enables AST inspection using open recursion . A
typical mapper would be ... |
adb5cf69316dba5004b725fa1d50c1e2fad43a365f63726662624399cbcf2f7d | herbelin/coq-hh | typed_notebook.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/herbelin/coq-hh/296d03d5049fea661e8bdbaf305ed4bf6d2001d2/ide/typed_notebook.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
XXX - Temporary hack to compile wit... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2010
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
class ['a] typed_notebook mak... |
f1eeaeac2c9b8f55a78c1304df319b166189b5225ce89d8cbc801b4672bd58d7 | webyrd/mediKanren | transform.rkt | #lang racket
(provide transform)
(require "transform-node-tsv.rkt"
"transform-edge-tsv.rkt")
(define transform
(lambda (import-directory-path
export-directory-path
nodes-import-file-name
edges-import-file-name
export-base-file-name)
(define node-export-file-n... | null | https://raw.githubusercontent.com/webyrd/mediKanren/105054f426652b8f8b0d16527448d2ced1c4b0a3/medikanren2/neo/neo-data-import/transform-2tsv-to-4tsv-kgs/transform.rkt | racket | --- nodes ---
--- edges --- | #lang racket
(provide transform)
(require "transform-node-tsv.rkt"
"transform-edge-tsv.rkt")
(define transform
(lambda (import-directory-path
export-directory-path
nodes-import-file-name
edges-import-file-name
export-base-file-name)
(define node-export-file-n... |
f2341ef8ca9ab57e229b1008fe19ecfe243fec76b05a74f7c21ec413d514aefd | rvantonder/hack_parallel | hack_bucket.ml | *
* Copyright ( c ) 2015 , Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD - style license found in the
* LICENSE file in the " hack " directory of this source tree . An additional grant
* of patent rights can be found in the PATENTS file in the same directory . ... | null | https://raw.githubusercontent.com/rvantonder/hack_parallel/c9d0714785adc100345835c1989f7c657e01f629/src/procs/hack_bucket.ml | ocaml | **************************************************************************
Moduling Making buckets.
* When we parallelize, we need to create "buckets" of tasks for the
* workers.
* Given a list of files, we want to split it up into buckets such that
* every worker is busy long enough. If the bucket is too big, it ... | *
* Copyright ( c ) 2015 , Facebook , Inc.
* All rights reserved .
*
* This source code is licensed under the BSD - style license found in the
* LICENSE file in the " hack " directory of this source tree . An additional grant
* of patent rights can be found in the PATENTS file in the same directory . ... |
10b16edc913982018255da490c80f9a73f6e2c58ffa9c4d20963da0e070d456d | geophf/1HaskellADay | Exercise.hs | module Y2018.M10.D09.Exercise where
-
Yesterday we picked some ids from our ' database ' of ids for screening . Today ,
we are given a set of ids to add to our database or to update information . So ,
we need to determine from the below list , what are new ids and what are pre-
existing ones , given our databa... | null | https://raw.githubusercontent.com/geophf/1HaskellADay/514792071226cd1e2ba7640af942667b85601006/exercises/HAD/Y2018/M10/D09/Exercise.hs | haskell | }
-
Given the 'database' of ids, and the set of new ids that came in to be added
or updated, determine which ids are new and which ids are already in the
database.
- | module Y2018.M10.D09.Exercise where
-
Yesterday we picked some ids from our ' database ' of ids for screening . Today ,
we are given a set of ids to add to our database or to update information . So ,
we need to determine from the below list , what are new ids and what are pre-
existing ones , given our databa... |
bdba44fc38d9496e003114a2dabd5908f5d21292d561d3c57b87f13a035fbe04 | OCamlPro/ocp-build | ocpp_version.ml | (**************************************************************************)
(* *)
(* Typerex Tools *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-pp/compat/4.11.0/ocpp_version.ml | ocaml | ************************************************************************
Typerex Tools
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU General Public License version 3 described in the file
module OcpCompat = struct
module Bytes = Bytes
module Buffer = Buffer
module String = struct
include String
let set = Bytes.set
end
end
module String... |
010b1b5e70019c8d22f8c4a3a3a90fd0023271eeffe21ed64f58c351cdf0c1e7 | ucsd-progsys/liquidhaskell | Date.hs | {-@ LIQUID "--expect-any-error" @-}
# LANGUAGE ScopedTypeVariables #
-- via -haskell-dates.hs
-- | Modelling a calendar date statically.
module Date where
We define invariants on dates , such as how many days per month , including leap years .
{-@ inline okDay @-}
okDay :: Int -> Bool
okDay v = v > 0 && v <= 31
... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/datacon/neg/Date.hs | haskell | @ LIQUID "--expect-any-error" @
via -haskell-dates.hs
| Modelling a calendar date statically.
@ inline okDay @
@ inline okYear @
We define a date type with a shadow liquid type encoding our invariants.
In order to construct a valid `Date`, we need to do all the proper runtime tests, or
Examples:
Does not compile: | # LANGUAGE ScopedTypeVariables #
module Date where
We define invariants on dates , such as how many days per month , including leap years .
okDay :: Int -> Bool
okDay v = v > 0 && v <= 31
@ inline okMonth @
okMonth :: Int -> Int -> Bool
okMonth day v = v > 0 && v <= 12 && (day < 31 || not (v == 04 || v == 06 ||... |
828b0b1ca83d5098e31f82a6bd5677b487577560106b6d30f7c4ffd0051b14c8 | rvantonder/CryptOSS | record.ml | open Core
type t =
{ date : Date.t
; cryptocurrency_name : string
; repo_name : string
; is_forked : string
; language : string
; last_updated : string
; commits_24h : int
; commits_7d : int
; changes_24h_loc_added : int
; changes_24h_loc_removed : int
; changes_7d_loc_added : int
; changes_7d_... | null | https://raw.githubusercontent.com/rvantonder/CryptOSS/acd931433f70fd097930b2e62a294af6d31a2a77/command-line/record.ml | ocaml | with fin data
without fin data | open Core
type t =
{ date : Date.t
; cryptocurrency_name : string
; repo_name : string
; is_forked : string
; language : string
; last_updated : string
; commits_24h : int
; commits_7d : int
; changes_24h_loc_added : int
; changes_24h_loc_removed : int
; changes_7d_loc_added : int
; changes_7d_... |
fbdeaff651ae698ffda8bb353ca5acdd5fa588617a01cb240eea4dab04316725 | mrosset/nomad | lib.scm | ;; lib.scm
Copyright ( C ) 2017 - 2018 < >
This file is part of Nomad
Nomad is free software : you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation , either version 3 of the License , or
;; (at your option) any later versi... | null | https://raw.githubusercontent.com/mrosset/nomad/c94a65ede94d86eff039d2ef62d5ef3df609568a/scheme/tests/lib.scm | scheme | lib.scm
(at your option) any later version.
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
with this program. If not, see </>. | Copyright ( C ) 2017 - 2018 < >
This file is part of Nomad
Nomad is free software : you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation , either version 3 of the License , or
Nomad is distributed in the hope that it wi... |
ff93fb307ea3540a02cb32f78e9b30ae5e036a2fe8ac3f1990455d058dae466c | OCamlPro/ocp-build | buildOCamlTest.mli | (**************************************************************************)
(* *)
(* Typerex Tools *)
(* *)
Copyrigh... | null | https://raw.githubusercontent.com/OCamlPro/ocp-build/56aff560bb438c12b2929feaf8379bc6f31b9840/tools/ocp-build/ocaml/buildOCamlTest.mli | ocaml | ************************************************************************
Typerex Tools
... | Copyright 2011 - 2017 OCamlPro SAS
the GNU General Public License version 3 described in the file
type stats = {
mutable tests_nsuccesses : int;
mutable tests_nfailures : int;
mutable tests_failures : (string * string) list;
mutable tests_timings : (string * ... |
a24bbb53d7abd23be033c7ab89ecf1d86017abea3597dbaf0325e655a86f4175 | tonsky/grumpy | fetch.cljs | (ns grumpy.core.fetch
(:require
[grumpy.core.macros :refer [oget oset!]]))
(defn fetch! [method url opts]
(let [xhr (js/XMLHttpRequest.)
success (:success opts)
error (:error opts)]
(.addEventListener xhr "load"
(fn []
(this-as resp
(let [status (oget resp "sta... | null | https://raw.githubusercontent.com/tonsky/grumpy/5d4876535cd1fd6ab2b5a2c6e21f522a9c3e4e21/src/grumpy/core/fetch.cljs | clojure | (ns grumpy.core.fetch
(:require
[grumpy.core.macros :refer [oget oset!]]))
(defn fetch! [method url opts]
(let [xhr (js/XMLHttpRequest.)
success (:success opts)
error (:error opts)]
(.addEventListener xhr "load"
(fn []
(this-as resp
(let [status (oget resp "sta... | |
02b97a248d7b6fad69020c55e14f913bf3ce43d0306c176704aebfddcf92393f | project-oak/hafnium-verification | starvationDomain.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/concurrency/starvationDomain.mli | ocaml | * Class of the root variable of the path representing the lock
* make a lock if the expression is rooted at a global or a formal parameter, or represents a
class object
* create the monitor locked when entering a synchronized java method
* a stable order for avoiding reporting deadlocks twice based on the root... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
c8fd72cb660956578fa09f346091b4b345ac028dfcdbe21f18ffb68d1bb8f425 | janestreet/universe | resource_cache_intf.ml | open! Core_kernel
open! Async_kernel
open! Import
module type S = sig
type key
type common_args
type resource
module Status : Status.S with type Key.t = key
type t
val init : config:Config.t -> log_error:(string -> unit) -> common_args -> t
val status : t -> Status.t
val config : t -> Config.t
* [ ... | null | https://raw.githubusercontent.com/janestreet/universe/b6cb56fdae83f5d55f9c809f1c2a2b50ea213126/resource_cache/src/resource_cache_intf.ml | ocaml | * default [None]
* default [Deferred.never]
* Like [with_] but classify the different errors
* Tries [with_any'] in a loop (removing args that have open errors) until receiving an
[`Ok], or until it has failed to open all resources in [args_list].
* Close all currently open resources and prevent the creation ... | open! Core_kernel
open! Async_kernel
open! Import
module type S = sig
type key
type common_args
type resource
module Status : Status.S with type Key.t = key
type t
val init : config:Config.t -> log_error:(string -> unit) -> common_args -> t
val status : t -> Status.t
val config : t -> Config.t
* [ ... |
0875cb2c881213c86b4d4c29b48b64b9d7ed88bbd93042b0a36792f1d1000bd4 | lokedhs/containers | blocking-sets.lisp | (in-package :receptacle)
(defclass generic-set ()
()
(:documentation "Generic unordered sets"))
(defgeneric contains-element-p (set object)
(:documentation "Returns non-NIL if SET contains OBJECT"))
(defclass hash-set (generic-set)
((content :type hash-map
:reader hash-set/content))
(:documenta... | null | https://raw.githubusercontent.com/lokedhs/containers/5d4ce688bddd51ee34a4259e37b698b84f650bdf/src/blocking-sets.lisp | lisp | (in-package :receptacle)
(defclass generic-set ()
()
(:documentation "Generic unordered sets"))
(defgeneric contains-element-p (set object)
(:documentation "Returns non-NIL if SET contains OBJECT"))
(defclass hash-set (generic-set)
((content :type hash-map
:reader hash-set/content))
(:documenta... | |
befa06ab318af5b425658ae5793829cbfe2e397d91bcc8cd92238f70e4021f3e | mlang/chessIO | Internal.hs | # LANGUAGE BangPatterns #
# LANGUAGE BinaryLiterals #
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE DeriveLift #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE MultiWayIf ... | null | https://raw.githubusercontent.com/mlang/chessIO/38781c0a1cda66968eb6abc5f1f5e0b8dabd82ef/src/Game/Chess/Internal.hs | haskell | # LANGUAGE DeriveGeneric #
# LANGUAGE DeriveLift #
# LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
# LANGUAGE PatternSynonyms #
# UNPACK #
^ active color
# UNPACK #
# UNPACK #
# UNPACK #
^ number of the full move
identical to another if the same... | # LANGUAGE BangPatterns #
# LANGUAGE BinaryLiterals #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE NamedFieldPuns #
# LANGUAGE TypeFamilies #
# LANGUAGE UnboxedTuples ... |
948e6754a0cce88c4bd9c685762bff08060b8d3687fd4241e1d239e298e70ab3 | G-Corp/kafe | kafe_protocol_offset.erl | % @hidden
-module(kafe_protocol_offset).
-include("../include/kafe.hrl").
-define(MAX_VERSION, 1).
-export([
run/2,
request/3,
response/2
]).
run(ReplicaID, []) ->
case maps:keys(kafe:topics()) of
Topics when is_list(Topics), length(Topics) > 0 ->
run(ReplicaID, maps:ke... | null | https://raw.githubusercontent.com/G-Corp/kafe/78e014ae5b6d7e1077aa5cabf4adc21ed7abe203/src/kafe_protocol_offset.erl | erlang | @hidden
topics => topic [partitions]
topic => STRING
partitions => partition timestamp max_num_offsets
partition => INT32
timestamp => INT64
max_num_offsets => INT32
topics => topic [partitions]
topic => STRING
partitions => partition timestamp
partition => INT32
... | -module(kafe_protocol_offset).
-include("../include/kafe.hrl").
-define(MAX_VERSION, 1).
-export([
run/2,
request/3,
response/2
]).
run(ReplicaID, []) ->
case maps:keys(kafe:topics()) of
Topics when is_list(Topics), length(Topics) > 0 ->
run(ReplicaID, maps:keys(kafe:to... |
9ce380969eb315b768db355c51d8ac286f84ea026a9d2cbf6a5dea8a428eb724 | theodormoroianu/SecondYearCourses | lab6-sol_20210115151559.hs | -- /
import Data.Char
import Data.List
import Test.QuickCheck
1 .
rotate :: Int -> [Char] -> [Char]
rotate n l
| n > 0
, n < length l
= suf ++ pre
where
(pre, suf) = splitAt n l
rotate _ _ = error "număr negativ sau prea mare"
2 .
prop_rotate :: Int -> String -> Bool
prop_rotate k str = rotate (l ... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/.history/lab6/lab6-sol_20210115151559.hs | haskell | / |
import Data.Char
import Data.List
import Test.QuickCheck
1 .
rotate :: Int -> [Char] -> [Char]
rotate n l
| n > 0
, n < length l
= suf ++ pre
where
(pre, suf) = splitAt n l
rotate _ _ = error "număr negativ sau prea mare"
2 .
prop_rotate :: Int -> String -> Bool
prop_rotate k str = rotate (l + 1 -... |
e624226db11bc7b3ab3c89b7915015c34d5b2bdd08be86fe22a17f62b626216c | brendanhay/amazonka | GetSamplingStatisticSummaries.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE StrictData #-}
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused -... | null | https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-xray/gen/Amazonka/XRay/GetSamplingStatisticSummaries.hs | haskell | # LANGUAGE OverloadedStrings #
# LANGUAGE StrictData #
|
Stability : auto-generated
Retrieves information about recent sampling results for all sampling
rules.
This operation returns paginated results.
* Creating a Request
* Request Lenses
* Destructuring the Response
* Response Lenses
| /See:/ 'newGetSam... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE NamedFieldPuns #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE NoImplicitPrelude #
# OPTIONS_GHC -fno - warn - unused - binds #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno - warn - unused - matches #
De... |
049c5aeb673a64eebb7e036010d7d00a1354fba665a02da1bcb7c303db13cc6e | rescript-lang/rescript-compiler | pattern_printer.mli | (* Should be used just for error messages. slightly tweaks rescript printer's logic*)
val print_pattern : Typedtree.pattern -> string
| null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/486c93306a96d85fcd38d5933ed5d361d518b25e/jscomp/common/pattern_printer.mli | ocaml | Should be used just for error messages. slightly tweaks rescript printer's logic | val print_pattern : Typedtree.pattern -> string
|
e81d1ef5d3e8dc2e645112d3e77d4324172637b27b36fa9d4432bae284baabf8 | luqui/manifesto | Grammar.hs | {-# OPTIONS -Wall #-}
# LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PolyKinds #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGU... | null | https://raw.githubusercontent.com/luqui/manifesto/09a70581376295c14d24f8cd0771941d7a613361/old/Grammar.hs | haskell | # OPTIONS -Wall #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes #
... Looks a lot like a bidirectional applicative/alternative.
--------------- S expression builder -----------------
----------------- tangible values --------------------------
----------------- destructuring traversal -------------------
----------------- ... | # LANGUAGE DeriveFunctor #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE LambdaCase #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TemplateHaskell #
# LANGUAGE TupleSections #
# LANGUAGE TypeFamilies ... |
fb92ab3fe4bc1505763d9e7b12c8d058d096954ab8b890f1529a53f3af284a34 | mhuebert/chia | core.cljs | (ns chia.routing.core
(:refer-clojure :exclude [resolve])
(:require [chia.routing :as routing]
[chia.routing.aux :as aux]
[chia.routing.routers :refer [db-id]]
[chia.db :as db]
[chia.util :as u]
[kitchen-async.promise :as p]
[chia.routing.regis... | null | https://raw.githubusercontent.com/mhuebert/chia/74ee3ee9f86efbdf81d8829ab4f0a44d619c73d3/routing/src/chia/routing/core.cljs | clojure |
Generating paths
:some/handler > [:some/handler]
[:some/handler] > {:router/x [:some/handler]}
look up router for handler
Begin listening to changes in pushState routes | (ns chia.routing.core
(:refer-clojure :exclude [resolve])
(:require [chia.routing :as routing]
[chia.routing.aux :as aux]
[chia.routing.routers :refer [db-id]]
[chia.db :as db]
[chia.util :as u]
[kitchen-async.promise :as p]
[chia.routing.regis... |
93c78c0af4a376d13efe747b79fb7c35c516d59272a54bb363438e7b87802bc3 | alanz/ghc-exactprint | OverloadedRecFldsRun02_A.hs | # LANGUAGE DuplicateRecordFields #
module OverloadedRecFldsRun02_A (U(..), V(MkV, x), Unused(..), u) where
data U = MkU { x :: Bool, y :: Bool }
data V = MkV { x :: Int }
data Unused = MkUnused { unused :: Bool }
u = MkU False True
| null | https://raw.githubusercontent.com/alanz/ghc-exactprint/b6b75027811fa4c336b34122a7a7b1a8df462563/tests/examples/ghc80/OverloadedRecFldsRun02_A.hs | haskell | # LANGUAGE DuplicateRecordFields #
module OverloadedRecFldsRun02_A (U(..), V(MkV, x), Unused(..), u) where
data U = MkU { x :: Bool, y :: Bool }
data V = MkV { x :: Int }
data Unused = MkUnused { unused :: Bool }
u = MkU False True
| |
09bde3aa3868984adc33e3e5a74a04c712b5cc79df4e361a0a48cf7196577302 | haskell/haskell-language-server | Construction.expected.hs | {-# LANGUAGE Haskell2010 #-}
# LANGUAGE RecordWildCards #
# LANGUAGE NamedFieldPuns #
module Construction where
data MyRec = MyRec
{ foo :: Int
, bar :: Int
, baz :: Char
}
convertMe :: () -> MyRec
convertMe _ =
let foo = 3
bar = 5
baz = 'a'
in MyRec {foo, bar, baz}
| null | https://raw.githubusercontent.com/haskell/haskell-language-server/85f788135175a007d3db4ac911c4115b30ab9d87/plugins/hls-explicit-record-fields-plugin/test/testdata/Construction.expected.hs | haskell | # LANGUAGE Haskell2010 # | # LANGUAGE RecordWildCards #
# LANGUAGE NamedFieldPuns #
module Construction where
data MyRec = MyRec
{ foo :: Int
, bar :: Int
, baz :: Char
}
convertMe :: () -> MyRec
convertMe _ =
let foo = 3
bar = 5
baz = 'a'
in MyRec {foo, bar, baz}
|
3dc6263ec2e24ae2f18471e9ae30267a37694f02340cfece34d84ead007bf0bf | jarcane/heresy | option-type.rkt | #lang heresy
(def >>= maybe-bind)
(def fn // (x y)
(>>= x
(fn (a)
(>>= y
(fn (b)
(if (= b 0) then None else (some (/ a b))))))))
(def fn //- (x y)
(maybe-do
(a <- x)
(b <- y)
(yield (if (zero? b) then None else (/ a b)))))
(-> (//- (some 4) (some 2))
(... | null | https://raw.githubusercontent.com/jarcane/heresy/a736b69178dffa2ef97f5eb5204f3e06840088c2/examples/option-type.rkt | racket | #lang heresy
(def >>= maybe-bind)
(def fn // (x y)
(>>= x
(fn (a)
(>>= y
(fn (b)
(if (= b 0) then None else (some (/ a b))))))))
(def fn //- (x y)
(maybe-do
(a <- x)
(b <- y)
(yield (if (zero? b) then None else (/ a b)))))
(-> (//- (some 4) (some 2))
(... | |
30020de8188cfbd60f342f6984d6a82b995ef862305aa417be943c5a9de8b831 | aggieben/weblocks | helpers.lisp |
(in-package :weblocks)
(export '(make-slot-writer))
(defun make-slot-writer (slot-name slot-reader)
"Returns a function that accepts a value and object and stores the
value transformed by 'slot-reader' in the object's 'slot-name'. This
is useful when declaring writers in the UI that should record the
object ID ins... | null | https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/src/views/formview/helpers.lisp | lisp |
(in-package :weblocks)
(export '(make-slot-writer))
(defun make-slot-writer (slot-name slot-reader)
"Returns a function that accepts a value and object and stores the
value transformed by 'slot-reader' in the object's 'slot-name'. This
is useful when declaring writers in the UI that should record the
object ID ins... | |
3eac1280b8d96ff70b755110b6d307e845797cd9d7468bae819825c481ee11ed | jrh13/hol-light | misc.ml | (* ========================================================================= *)
(* Miscellanea *)
(* *)
( c ) Copyright , , 2020 - 2022 .
(* ======================... | null | https://raw.githubusercontent.com/jrh13/hol-light/ab57c07ff0105fef75a9fcdd179eda0d26854ba3/GL/misc.ml | ocaml | =========================================================================
Miscellanea
=========================================================================
---------------... | ( c ) Copyright , , 2020 - 2022 .
let THEN_GTCL (ttcl1:thm_tactical) (ttcl2:thm_tactical) : thm_tactical =
fun ttac th -> ttcl1 ttac th THEN ttcl2 ttac th;;
let ORELSE_GTCL (ttcl1:thm_tactical) (ttcl2:thm_tactical) : thm_tactical =
fun ttac th -> ttcl1 ttac th ORELSE ttcl2 ttac th;;
st... |
4dc191074550ab69dae127dc45e5fdbb51195910826712df2b5099fd77fd3ae6 | cedlemo/OCaml-GI-ctypes-bindings-generator | File_chooser_button_private.ml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "File_chooser_button_private"
| null | https://raw.githubusercontent.com/cedlemo/OCaml-GI-ctypes-bindings-generator/21a4d449f9dbd6785131979b91aa76877bad2615/tools/Gtk3/File_chooser_button_private.ml | ocaml | open Ctypes
open Foreign
type t
let t_typ : t structure typ = structure "File_chooser_button_private"
| |
b690f4b594a204db1b84d3f818518a13fd34305fd2c9a0559343fa1e429bca8f | grin-compiler/ghc-wpc-sample-programs | Except.hs |
------------------------------------------------------------------------------
| Wrapper for Control . . Except from the mtl library ( > = 2.2.1 )
------------------------------------------------------------------------------
module Agda.Utils.Except
( Error(noMsg, strMsg)
, ExceptT
, mapExceptT
, mkExcept... | null | https://raw.githubusercontent.com/grin-compiler/ghc-wpc-sample-programs/0e3a9b8b7cc3fa0da7c77fb7588dd4830fb087f7/Agda-2.6.1/src/full/Agda/Utils/Except.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
----------------------------------------------------------------------
| We cannot define data constructors synonymous, so we define the
@mkExceptT@ function to be ... |
| Wrapper for Control . . Except from the mtl library ( > = 2.2.1 )
module Agda.Utils.Except
( Error(noMsg, strMsg)
, ExceptT
, mapExceptT
, mkExceptT
, MonadError(catchError, throwError)
, runExceptT
) where
import Control.Monad.Except
mkExceptT :: m (Either e a) -> ExceptT e m a
mkExceptT = Exce... |
fa275c53c46f02950844da7b183bae676d434f1d92bc1cfbaa8f4e4b76f3aaba | binsec/haunted | Parsing_gueb.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
(* VERIMAG... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/dynamic/dse/path_exploration/Parsing_gueb.ml | ocaml | ************************************************************************
VERIMAG
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
Lesser General Public License as published by the Free Software
Foundation , version 2.1 .
See the GNU Le... |
6c48313e092dffe6fc070a673d7dff2681cfaa54d83b382d0556a0b111ebe60e | Naproche-SAD/Naproche-SAD | Rewrite.hs |
Authors : ( 2017 - 2018 )
Term rewriting : extraction of rules and proof of equlities .
Authors: Steffen Frerix (2017 - 2018)
Term rewriting: extraction of rules and proof of equlities.
-}
# LANGUAGE FlexibleContexts #
module SAD.Core.Rewrite (equalityReasoning) where
import SAD.Core.SourcePos
import SAD.D... | null | https://raw.githubusercontent.com/Naproche-SAD/Naproche-SAD/da131a6eaf65d4e02e82082a50a4febb6d42db3d/src/SAD/Core/Rewrite.hs | haskell | simplification
type to record conditions and intermediate steps during simplification
simplified term must be lighter
finds ALL normalforms and their corresponding simplification paths
check for matching normalforms and output the paths to them
logging and user communication
formatting of paths
applies comput... |
Authors : ( 2017 - 2018 )
Term rewriting : extraction of rules and proof of equlities .
Authors: Steffen Frerix (2017 - 2018)
Term rewriting: extraction of rules and proof of equlities.
-}
# LANGUAGE FlexibleContexts #
module SAD.Core.Rewrite (equalityReasoning) where
import SAD.Core.SourcePos
import SAD.D... |
108cff949b87a7bda5c404eda2c6c360416f7e8d351b3ba982d83886c5c241e2 | vmware-archive/vprobe-toolkit | predef.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright 2009 VMware , Inc. All rights reserved .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright 2009 VMware,... | null | https://raw.githubusercontent.com/vmware-archive/vprobe-toolkit/81ec188659b3da53e81c2922691fb0a04dd85092/emmett/predef.ml | ocaml |
* Predef module: pre-defined types, functions, and variables.
* Predefined types, functions, and variables.
The memmodel is irrelevant as long as we match the desired int size.
Supported builtins
Unsupported builtins
Globals from vprobeVMMVMX.h
Globals from vmkProbes.h
"TSC_HZ";
Common NULL pointer... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright 2009 VMware , Inc. All rights reserved .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Copyright 2009 VMware,... |
2412ab53dcec14c78b5408d7324f643b1319cf57ef30e256c894d0939b30f467 | hercules-ci/hercules-ci-agent | Message.hs | {-# LANGUAGE DeriveAnyClass #-}
module Hercules.API.Message where
import Hercules.API.Prelude
data Message = Message
{ index :: Int,
typ :: Type,
message :: Text
}
deriving (Generic, Show, Eq, NFData, ToJSON, FromJSON, ToSchema)
data Type
= -- | Something went wrong, inform user about possible
-... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/216a1d178d57471b05f60bf3e21ce46d3fdc5f94/hercules-ci-api/src/Hercules/API/Message.hs | haskell | # LANGUAGE DeriveAnyClass #
| Something went wrong, inform user about possible
cause. Examples: source could not be fetched, could not
find a nix expression file to call.
| The nix expression contained a @builtins.trace@
call. Ideally we should keep track of during which
attribute it was encountered. It is not an... |
module Hercules.API.Message where
import Hercules.API.Prelude
data Message = Message
{ index :: Int,
typ :: Type,
message :: Text
}
deriving (Generic, Show, Eq, NFData, ToJSON, FromJSON, ToSchema)
data Type
Error
Trace
deriving (Generic, Show, Eq, NFData, ToJSON, FromJSON, ToSchema)
|
c72b4381678cb7e113b81b47ba805c18cad5fff0a3fb9a9c9bbab6f0c603ae5e | links-lang/links | lens_sugar_conv.ml | open Lens.Operators
open Operators
open SourceCode
open Lens.Utility
module LPS = Lens.Phrase.Sugar
module S = Sugartypes
let unary_of_sugartype_op v =
let open Unary in
match v with
| UnaryOp.Minus -> Some Minus
| UnaryOp.FloatMinus -> Some Minus
| _ -> None
let binary_of_sugartype_op v =
let open Binary... | null | https://raw.githubusercontent.com/links-lang/links/e2ae13de8a9bd253e0972d564bc14eb58c83b34a/core/lens_sugar_conv.ml | ocaml | If the given argument is a function of the form `fun (x) { body }`, check
if body contains any external references. If it does, then it is dynamic,
otherwise it is static. | open Lens.Operators
open Operators
open SourceCode
open Lens.Utility
module LPS = Lens.Phrase.Sugar
module S = Sugartypes
let unary_of_sugartype_op v =
let open Unary in
match v with
| UnaryOp.Minus -> Some Minus
| UnaryOp.FloatMinus -> Some Minus
| _ -> None
let binary_of_sugartype_op v =
let open Binary... |
0d791160f7b90ffb21acaa0e8ddb925733c20c719aa94a5f483548f46c13f3ca | brendanhay/terrafomo | Resources.hs | -- This module is auto-generated.
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - unused - imports #
-- |
Module : . Heroku . Resources
Copyright : ( c ) 2017 - 2018
License :... | null | https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-heroku/gen/Terrafomo/Heroku/Resources.hs | haskell | This module is auto-generated.
|
Stability : auto-generated
* heroku_addon_attachment
* heroku_app_feature
* heroku_app
* heroku_cert
* heroku_domain
* heroku_drain
* heroku_formation
* heroku_pipeline_coupling
* heroku_pipeline
* heroku_slug
* heroku_space_app_access
* heroku_space_inbound_ruleset
*... |
# LANGUAGE NoImplicitPrelude #
# LANGUAGE RecordWildCards #
# LANGUAGE StrictData #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -fno - warn - unused - imports #
Module : . Heroku . Resources
Copyright : ( c ) 2017 - 2018
License : Mozilla Public License , v. 2.0 .
Ma... |
34b9a32d408de8f169f7b432b036dc83ab33b3bad495b8e0797a4467bd90a7f3 | swiftbiosciences/primerclip | Paths_primerclip.hs | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - missing - import - lists #
# OPTIONS_GHC -fno - warn - implicit - prelude #
module Paths_primerclip (
version,
getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception... | null | https://raw.githubusercontent.com/swiftbiosciences/primerclip/5742e717c2dc409a98c2c1691555c7175e83b4ca/.stack-work/dist/x86_64-linux/Cabal-2.0.1.0/build/primerclip/autogen/Paths_primerclip.hs | haskell | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - missing - import - lists #
# OPTIONS_GHC -fno - warn - implicit - prelude #
module Paths_primerclip (
version,
getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
getDataFileName, getSysconfDir
) where
import qualified Control.Exception as Exception... | |
3bb2b8d93e85177c9dbcc27bf8980386fdf92c44377072ee9f96577589ff76ad | tolitius/obiwan | tools.clj | (ns obiwan.tools
(:require [clojure.string :as s])
(:import [redis.clients.jedis Jedis Connection]
[redis.clients.jedis.util SafeEncoder]
[redis.clients.jedis.commands ProtocolCommand]))
(defn super-public-method
"e.g. (super-public-method Connection
client
... | null | https://raw.githubusercontent.com/tolitius/obiwan/538aab43da653ff8021a1147077785a311f1244b/src/obiwan/tools.clj | clojure | (println "calling " m ", with params:" mparams ", and args:" args)
:mparams "interface redis.clients.jedis.commands.ProtocolCommandclass [[B"} | (ns obiwan.tools
(:require [clojure.string :as s])
(:import [redis.clients.jedis Jedis Connection]
[redis.clients.jedis.util SafeEncoder]
[redis.clients.jedis.commands ProtocolCommand]))
(defn super-public-method
"e.g. (super-public-method Connection
client
... |
b7b2363bf1768f5e26578f9408eaa22368079f30b65379df4a086c299ab23158 | vaibhavsagar/experiments | Env.hs | --
-- Calling a static method
--
module Env where
import Dotnet
foreign import dotnet
"static System.Environment.GetEnvironmentVariable"
getEnv :: String -> IO String
test :: IO ()
test = do
let var = "COMSPEC"
s <- getEnv var
putStrLn (var ++ " = " ++ s)
| null | https://raw.githubusercontent.com/vaibhavsagar/experiments/378d7ba97eabfc7bbeaa4116380369ea6612bfeb/hugs/dotnet/examples/basic/Env.hs | haskell |
Calling a static method
| module Env where
import Dotnet
foreign import dotnet
"static System.Environment.GetEnvironmentVariable"
getEnv :: String -> IO String
test :: IO ()
test = do
let var = "COMSPEC"
s <- getEnv var
putStrLn (var ++ " = " ++ s)
|
be8b1d45886cc0ed10f943ea1021200aafa6cf9fe64fcdcee2dfe28873457f77 | nikita-volkov/stm-hamt | Hamt.hs | module StmHamt.Hamt
(
Hamt,
new,
newIO,
null,
focus,
focusExplicitly,
insert,
insertExplicitly,
lookup,
lookupExplicitly,
reset,
unfoldlM,
listT,
)
where
import StmHamt.Prelude hiding (empty, insert, update, lookup, delete, null)
import StmHamt.Types
import qualified Focus as Focus
import qua... | null | https://raw.githubusercontent.com/nikita-volkov/stm-hamt/4b89e0c8eec3712c0cb41b56eaf9bd86facc3bd3/library/StmHamt/Hamt.hs | haskell | # SCC "focus" #
|
Returns a flag, specifying, whether the size has been affected.
|
Returns a flag, specifying, whether the size has been affected.
# SCC "insertExplicitly" #
# SCC "pair" #
|
Returns a flag, specifying, whether the size has been affected.
# SCC "lookupExplicitly" # | module StmHamt.Hamt
(
Hamt,
new,
newIO,
null,
focus,
focusExplicitly,
insert,
insertExplicitly,
lookup,
lookupExplicitly,
reset,
unfoldlM,
listT,
)
where
import StmHamt.Prelude hiding (empty, insert, update, lookup, delete, null)
import StmHamt.Types
import qualified Focus as Focus
import qua... |
e5872603d64886a31241ffbc9179a11b8e0444580fa7ac5c7c060cd8e6cbfc51 | vyzo/gerbil | core__rt.scm | (declare (block) (standard-bindings) (extended-bindings))
(begin
(begin
(load-module "gerbil/expander/common__rt")
(load-module "gerbil/expander/stx__rt"))
(load-module "gerbil/expander/core__0"))
| null | https://raw.githubusercontent.com/vyzo/gerbil/17fbcb95a8302c0de3f88380be1a3eb6fe891b95/src/bootstrap/gerbil/expander/core__rt.scm | scheme | (declare (block) (standard-bindings) (extended-bindings))
(begin
(begin
(load-module "gerbil/expander/common__rt")
(load-module "gerbil/expander/stx__rt"))
(load-module "gerbil/expander/core__0"))
| |
10143d439e7ab8ecb641be5f23b56bac857f4e99caf0c5c426f18ec9d087ce59 | SparkFund/sails-forth | clojurify.clj | (ns sails-forth.clojurify
"Translates between SalesForce string API type/attribute names and
more Clojure-y keywords."
(:require [clj-time.coerce :as tc]
[clj-time.format :as tf]
[clojure.spec.alpha :as s]
[clojure.string :as string]
[sails-forth.spec :as spec])
(... | null | https://raw.githubusercontent.com/SparkFund/sails-forth/acc97f01d5d1bf21ee7139eee9360d363515d737/src/sails_forth/clojurify.clj | clojure | (ns sails-forth.clojurify
"Translates between SalesForce string API type/attribute names and
more Clojure-y keywords."
(:require [clj-time.coerce :as tc]
[clj-time.format :as tf]
[clojure.spec.alpha :as s]
[clojure.string :as string]
[sails-forth.spec :as spec])
(... | |
03fff93f168cb58b309c6716b236ce712c81ed5957ee32cad95f42604f5e863c | input-output-hk/cardano-wallet | CoinSelection.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
{-# LANGUAGE EmptyDataDecls #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE OverloadedLabels #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
-- |
Copyright : © 2022 IOHK
-- License: Apa... | null | https://raw.githubusercontent.com/input-output-hk/cardano-wallet/41deda8a7e31f8e054dc149473461613492fbc7a/lib/balance-tx/lib/Cardano/Tx/Balance/Internal/CoinSelection.hs | haskell | # LANGUAGE EmptyDataDecls #
|
License: Apache-2.0
This module provides a wallet-specific interface for coin selection.
Coin selection handles the following responsibilities:
- producing change outputs to return excess value to the wallet;
- balancing a selection to pay for the transaction fee.
Use the 'per... | # LANGUAGE DeriveGeneric #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE OverloadedLabels #
# LANGUAGE RecordWildCards #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
Copyright : © 2022 IOHK
- selecting inputs from the set to pay for user ... |
216886383df403d806e816197c912450ff7ac30bdfa9d0dd50c3e9d221fba7e4 | chaw/r7rs-libs | db-1.sps | ;; Simple database example
;; -- create the database
;; -- add a table
;; -- put some data in
;; -- retrieve some data
Note : leaves a .#mydb lock file
(import (scheme base)
(scheme file)
(scheme write)
(slib databases)
(slib alist-table))
(define *filename* "mydb")
;; ensure it i... | null | https://raw.githubusercontent.com/chaw/r7rs-libs/b8b625c36b040ff3d4b723e4346629a8a0e8d6c2/slib-examples/db-1.sps | scheme | Simple database example
-- create the database
-- add a table
-- put some data in
-- retrieve some data
ensure it is not already there
create database only needs to run once |
Note : leaves a .#mydb lock file
(import (scheme base)
(scheme file)
(scheme write)
(slib databases)
(slib alist-table))
(define *filename* "mydb")
(when (file-exists? *filename*) (delete-file *filename*))
(define db (create-database *filename* 'alist-table))
(define rdb (open-d... |
566de40eefd772753224a6ea76fa8ae1e98b3395a507a4059d5db60917c5889e | ygmpkk/house | Ratio.hs | -----------------------------------------------------------------------------
-- |
-- Module : Data.Ratio
Copyright : ( c ) The University of Glasgow 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : stable
-- Portability : portable
--
-- Stand... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/base/Data/Ratio.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Ratio
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : stable
Portability : portable
Standard functions on rational numbers
-----------------------------------------... | Copyright : ( c ) The University of Glasgow 2001
module Data.Ratio
( Ratio
, Rational
: : ( RealFrac a ) = > a - > a - > Rational
( Integral a ) = > ( Ratio a )
( Integral a ) = > ( Ratio a )
) where
import Prelude
#ifdef __GLASGOW_HASKELL__
#endif
#ifdef __HUGS__
import Hugs.Pr... |
10393290d3054d1c87377a34af4421cb60beb2775897f42ff6a529aa2cfd3900 | mirage/ocaml-dkim | body.ml | type decode = [ `Data of string | `Await | `End | `CRLF | `Spaces of string ]
type decoder = {
mutable i : bytes;
mutable i_pos : int;
mutable i_len : int;
mutable has_cr : bool;
b : Buffer.t;
(* XXX(dinosaure): we should replace it by something else
where it can be an entry point for an attack. *)
... | null | https://raw.githubusercontent.com/mirage/ocaml-dkim/5712202045b6e1b212787187a9376c397b1dd6ca/lib/body.ml | ocaml | XXX(dinosaure): we should replace it by something else
where it can be an entry point for an attack. | type decode = [ `Data of string | `Await | `End | `CRLF | `Spaces of string ]
type decoder = {
mutable i : bytes;
mutable i_pos : int;
mutable i_len : int;
mutable has_cr : bool;
b : Buffer.t;
mutable k : decoder -> decode;
}
let i_rem d = d.i_len - d.i_pos + 1
let end_of_input d =
d.i <- Bytes.empty ;... |
f8cdfd538af7dcfef5ec007c5cea5bfc44e7fecafb21e36198c5edf24385ecb8 | vbmithr/ocaml-libbitcoin | block.ml | open Ctypes
open Foreign
module Header = struct
type header_ptr = unit ptr
type t = {
version : int ;
prev_block_hash : Hash.Hash32.t ;
merkle : Hash.Hash32.t ;
timestamp : Ptime.t ;
bits : Int32.t ;
nonce : Int32.t ;
hash : Hash.Hash32.t ;
header_ptr : header_ptr ;
}
let pp p... | null | https://raw.githubusercontent.com/vbmithr/ocaml-libbitcoin/b93a5cca1d430c38dd822b45e47fc5132fb28ab9/src/block.ml | ocaml | open Ctypes
open Foreign
module Header = struct
type header_ptr = unit ptr
type t = {
version : int ;
prev_block_hash : Hash.Hash32.t ;
merkle : Hash.Hash32.t ;
timestamp : Ptime.t ;
bits : Int32.t ;
nonce : Int32.t ;
hash : Hash.Hash32.t ;
header_ptr : header_ptr ;
}
let pp p... | |
5f3bcf996bf9ab7993305856a7624de1e18a8718beb18751ba3056198cd5aa5c | fulcrologic/fulcro-inspect | card_helpers.cljc | (ns fulcro.inspect.card-helpers
#?(:cljs (:require-macros fulcro.inspect.card-helpers))
(:require #?(:clj [fulcro.client.dom-server :as dom]
:cljs [fulcro.client.dom :as dom])
[fulcro-css.css :as css]
[fulcro.i18n :as i18n]
[fulcro.client.pr... | null | https://raw.githubusercontent.com/fulcrologic/fulcro-inspect/a03b61cbd95384c0f03aa936368bcf5cf573fa32/devcards/fulcro/inspect/card_helpers.cljc | clojure | (ns fulcro.inspect.card-helpers
#?(:cljs (:require-macros fulcro.inspect.card-helpers))
(:require #?(:clj [fulcro.client.dom-server :as dom]
:cljs [fulcro.client.dom :as dom])
[fulcro-css.css :as css]
[fulcro.i18n :as i18n]
[fulcro.client.pr... | |
7009b7d3b192cedc47b6bc7214fa1c4d933d64be2a9c65c6d72b70e88fa87f3b | soupi/yh | Attack.hs | # LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
module Attack where
import qualified SDL
import Play.Engine.Utils
import Play.Engine.Types
import Control.Lens
import qualified Data.DList as DL
... | null | https://raw.githubusercontent.com/soupi/yh/4cfbcc7da6f3ca5e330b7fd7d4adeacee7e2dff4/app/Attack.hs | haskell | # LANGUAGE FunctionalDependencies #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE DuplicateRecordFields #
# LANGUAGE FlexibleInstances #
# LANGUAGE TemplateHaskell #
module Attack where
import qualified SDL
import Play.Engine.Utils
import Play.Engine.Types
import Control.Lens
import qualified Data.DList as DL
... | |
ac29666e3ce0cfd483b792bdd8a95646ce26c8eaff68624471b5fda9626377c7 | bmeurer/ocamljit2 | digest.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/stdlib/digest.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 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
$ Id$
* MD5 message digest .
T... |
d55b523b5b46cc981da19a41b84877c2fc7d6b93f26a39a86eef44857f093966 | mro/geohash | route.ml |
* path and Query string
*
* We have either a
*
* path : /<geohash>/<format >
* or
* query_string : ? q=<lat><sep><lon >
* Parse path and Query string
*
* We have either a
*
* path: /<geohash>/<format>
* or
* query_string: ?q=<lat><sep><lon>
*)
module P = struct
open Tyre
let lat... | null | https://raw.githubusercontent.com/mro/geohash/6a8ab5102b6bc1b7fd8f090f54329273ed9a68c4/lib/route.ml | ocaml |
* path and Query string
*
* We have either a
*
* path : /<geohash>/<format >
* or
* query_string : ? q=<lat><sep><lon >
* Parse path and Query string
*
* We have either a
*
* path: /<geohash>/<format>
* or
* query_string: ?q=<lat><sep><lon>
*)
module P = struct
open Tyre
let lat... | |
86f2e85c016d4055a29e4bd2ac9b37b87d1a8598d65fe60686c3169cc610ebd3 | scicloj/clj-djl | ndarray_element_comparison_test.clj | (ns clj-djl.ndarray.ndarray-element-comparison-test
(:require [clojure.test :refer :all]
[clj-djl.ndarray :as nd]
[clj-djl.utils :refer :all]))
(deftest content-equal-test
(with-open [ndm (nd/new-base-manager)]
(let [array1 (nd/create ndm (float-array [1 2]))
array2 (nd/create... | null | https://raw.githubusercontent.com/scicloj/clj-djl/f089b10a22c869c0e643d456dc9bbad8233bd6ac/test/clj_djl/ndarray/ndarray_element_comparison_test.clj | clojure | scalar
different data type
test scalar
test scalar | (ns clj-djl.ndarray.ndarray-element-comparison-test
(:require [clojure.test :refer :all]
[clj-djl.ndarray :as nd]
[clj-djl.utils :refer :all]))
(deftest content-equal-test
(with-open [ndm (nd/new-base-manager)]
(let [array1 (nd/create ndm (float-array [1 2]))
array2 (nd/create... |
f4495ca96d57e1b44393e437a6f81aeef80dcb8fe6b91db325548f3bfc523d35 | thegeez/w3a | migrator.clj | (ns net.thegeez.w3a.components.sql-database.migrator
(:require [io.pedestal.log :as log]
[com.stuartsierra.component :as component]
[clojure.java.jdbc :as jdbc]
[clojure.string :as string]))
(def version-migration
(let [table :migration_version]
{:up (fn [db]
(jdb... | null | https://raw.githubusercontent.com/thegeez/w3a/186e507389628f20381d155d91058a1804d421e3/src/net/thegeez/w3a/components/sql_database/migrator.clj | clojure | might fail with the latest down migration that drops :migration_version | (ns net.thegeez.w3a.components.sql-database.migrator
(:require [io.pedestal.log :as log]
[com.stuartsierra.component :as component]
[clojure.java.jdbc :as jdbc]
[clojure.string :as string]))
(def version-migration
(let [table :migration_version]
{:up (fn [db]
(jdb... |
eef27220707d047e1c237dbf0b42984eced60747c29a2217af418d057e21429d | stonebuddha/eopl | main.ml | open Syntax
open Core
let string_of_loc loc =
let fp = Ploc.first_pos loc in
let lp = Ploc.last_pos loc in
let ln = Ploc.line_nb loc in
let lnl = Ploc.line_nb_last loc in
let bp = Ploc.bol_pos loc in
let bpl = Ploc.bol_pos_last loc in
string_of_int ln ^ "-" ^ string_of_int lnl ^ ":" ^ string_of_int (fp -... | null | https://raw.githubusercontent.com/stonebuddha/eopl/88ea636110421706f900e753c30240ff1ea26f67/CALL-BY-REFERENCE-EXT/main.ml | ocaml | open Syntax
open Core
let string_of_loc loc =
let fp = Ploc.first_pos loc in
let lp = Ploc.last_pos loc in
let ln = Ploc.line_nb loc in
let lnl = Ploc.line_nb_last loc in
let bp = Ploc.bol_pos loc in
let bpl = Ploc.bol_pos_last loc in
string_of_int ln ^ "-" ^ string_of_int lnl ^ ":" ^ string_of_int (fp -... | |
fbad8b204c9ceadb637969d31aa1ddbb7f67914841441b2afedb5756fa8e7cb8 | Plutonomicon/plutarch-plutus | UPLCSpec.hs | module Plutarch.UPLCSpec (spec) where
import PlutusCore qualified as PLC
import Plutarch.Internal (punsafeConstantInternal)
import Plutarch.Prelude
import Plutarch.Test
import Plutarch.Unsafe (punsafeBuiltin)
import Test.Hspec
spec :: Spec
spec = do
Tests for the behaviour of UPLC itself .
describe "uplc-behavio... | null | https://raw.githubusercontent.com/Plutonomicon/plutarch-plutus/9b83892057f2aaaed76e3af6193ad1ae242244cc/plutarch-test/tests/Plutarch/UPLCSpec.hs | haskell | hoist id 0 => 0
hoist fstPair => fstPair | module Plutarch.UPLCSpec (spec) where
import PlutusCore qualified as PLC
import Plutarch.Internal (punsafeConstantInternal)
import Plutarch.Prelude
import Plutarch.Test
import Plutarch.Unsafe (punsafeBuiltin)
import Test.Hspec
spec :: Spec
spec = do
Tests for the behaviour of UPLC itself .
describe "uplc-behavio... |
8b25bbdd1dd88ffea519ed92c2dd07852d6c39eb89afb40197ad64bd63753c6b | dongcarl/guix | services.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2015 , 2016 , 2017 , 2018 , 2019 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation ; ... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/tests/services.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 © 2015 , 2016 , 2017 , 2018 , 2019 < >
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 with GNU . If not , see < / > .
(define-module (test-services)
#:use-module (gnu services)
#:use-module (gnu servi... |
d11510d323965b6f2bcab11f985e196afb06c07df2e08a72eb012335f9747a1c | input-output-hk/plutus | CostModelInterface.hs | -- editorconfig-checker-disable-file
{-# LANGUAGE DeriveAnyClass #-}
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE RecordWildCards #
module PlutusCore.Evaluation.Machine.CostModelInterface
( CostModelParams
, CekMachineCosts
, extractCostModelParams
, applyCostMode... | null | https://raw.githubusercontent.com/input-output-hk/plutus/ece3115856b370e259d88e6b45a4f59db7756ca6/plutus-core/plutus-core/src/PlutusCore/Evaluation/Machine/CostModelInterface.hs | haskell | editorconfig-checker-disable-file
# LANGUAGE DeriveAnyClass #
# LANGUAGE OverloadedStrings #
-
-
| A raw representation of the ledger's cost model parameters.
The associated keys/names to the parameter values are arbitrarily set by the plutus team; the ledger does not hold any such names.
See Note [Cost model pa... | # LANGUAGE LambdaCase #
# LANGUAGE RecordWildCards #
module PlutusCore.Evaluation.Machine.CostModelInterface
( CostModelParams
, CekMachineCosts
, extractCostModelParams
, applyCostModelParams
, CostModelApplyError (..)
, CostModelApplyWarn (..)
)
where
import PlutusCore.Evaluat... |
53adf71ccff271a6421fc2714c9f068a29da79b80772686893d8215e4b0e23e8 | erikd/exceptT-demo | Cat.hs | module Improved.Cat
( Cat (..)
, CatParseError (..)
, parseCat
, renderCatParseError
) where
import Data.ByteString.Char8 (ByteString)
import Data.Text (Text, pack)
-- A trivial Cat data type
data Cat = Cat
-- An error type.
data CatParseError
= CatParseErrorOne
| CatParseErrorTwo
deriving Show
-- A... | null | https://raw.githubusercontent.com/erikd/exceptT-demo/ceadf646000bfa27c3dfea81064caa21747c6ab5/Improved/Cat.hs | haskell | A trivial Cat data type
An error type.
A trival parser for a Cat data type.
This can't fail, but obviously a real parser could.
Would not use `show` for a real error type. | module Improved.Cat
( Cat (..)
, CatParseError (..)
, parseCat
, renderCatParseError
) where
import Data.ByteString.Char8 (ByteString)
import Data.Text (Text, pack)
data Cat = Cat
data CatParseError
= CatParseErrorOne
| CatParseErrorTwo
deriving Show
parseCat :: ByteString -> Either CatParseError Ca... |
4b2638bb943555ce0f0900f0b7c6e5e313f6d76e1083f392d2a5b4b6d05a779f | metametadata/aide | core.cljs | (ns aide-reagent.core
(:require [aide.core :as aide]
[reagent.core :as r]
[reagent.ratom :refer [reaction]]))
(defn atom->reaction
"Creates a reaction which syncs its value with the specified atom."
[*a]
(let [*ra (r/atom @*a)]
(add-watch *a
*ra ... | null | https://raw.githubusercontent.com/metametadata/aide/0828b53503e8c7f54f84e1b140a1d02ad80aff36/contrib/reagent/src/aide_reagent/core.cljs | clojure | Unique key | (ns aide-reagent.core
(:require [aide.core :as aide]
[reagent.core :as r]
[reagent.ratom :refer [reaction]]))
(defn atom->reaction
"Creates a reaction which syncs its value with the specified atom."
[*a]
(let [*ra (r/atom @*a)]
(add-watch *a
(fn [_key _ref _old-state ... |
c099f7a00fc5c74bd404deed8feec3ed844df2672e830fbc1de308a8fadf8b6e | cs136/seashell | place-main.rkt | #lang racket/base
Seashell 's Clang interface .
Copyright ( C ) 2013 - 2015 The Seashell Maintainers .
;;
;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , ... | null | https://raw.githubusercontent.com/cs136/seashell/17cc2b0a6d2cdac270d7168e03aa5fed88f9eb02/src/collects/seashell/compiler/place-main.rkt | racket |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
See also 'ADDITIONAL TERMS' at the end of the included LICENSE file.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTAB... | #lang racket/base
Seashell 's Clang interface .
Copyright ( C ) 2013 - 2015 The Seashell Maintainers .
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(mod... |
81bceede32d5c50cc2fd314c212f87782b855bd32e36487b29ac86375df2039c | lillo/compiler-course-unipi | cfa_solver.ml |
Our solver is parametric on the type of constraint variables
and on the type of tokens .
The module type OrderedType represent the requirement we asked
on the type implementing constraint variables and tokens .
Our solver is parametric on the type of constraint variables
and on the type of tokens... | null | https://raw.githubusercontent.com/lillo/compiler-course-unipi/7aa1c2e5ac536b8d508c220b1ef3c2c432fd2473/semantic-analysis-material/code/fun-cfa/cfa_solver.ml | ocaml |
The functor that allow us to create a solver.
Constraint variables denote set of tokens.
A solution is an assignment from variables to set of tokens.
* The constraints the solver is able to handle
IsIn(t,v) means {t} ⊆ v
Subseteq(v1, v2) means v1 ⊆ v2
* A pretty printer
* A pretty printer
* [t @^ v] bui... |
Our solver is parametric on the type of constraint variables
and on the type of tokens .
The module type OrderedType represent the requirement we asked
on the type implementing constraint variables and tokens .
Our solver is parametric on the type of constraint variables
and on the type of tokens... |
0bd7d03e6ba3c513bf2156d850ede17b8fce96de26cb3b6c13a11aa6847a13bc | larcenists/larceny | read0.scm | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
Tests for read .
Uses exception handlers to recover from lexical errors .
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; FIXME: this needs a lot of work to convert all of its tests
to R7RS .
(import (scheme base)
... | null | https://raw.githubusercontent.com/larcenists/larceny/fef550c7d3923deb7a5a1ccd5a628e54cf231c75/test/Benchmarking/R7RS/src/read0.scm | scheme |
FIXME: this needs a lot of work to convert all of its tests
Fake R6RS procedure.
Test framework.
Change to #t if you want to test extensions.
Implementation-specific flag that enables extensions.
Help procedures (mainly for using a non-R6RS reader to construct test cases)
Given a string, returns the list... | Tests for read .
Uses exception handlers to recover from lexical errors .
to R7RS .
(import (scheme base)
(scheme char)
(scheme file)
(scheme read)
(scheme write)
(scheme time))
(define (char-general-category c)
(cond ((char-alphabetic? c)
'Ll)
((ch... |
50b2ffdad32e74bae392f7e7cd2e3e8e64f795b421ecc68e57823417b5a58cff | bcc32/advent-of-code | claim.ml | open! Core
open! Async
open! Import
type t =
{ id : int
; x : int
; y : int
; w : int
; h : int
}
let claim_re =
Re.(
compile
(seq
[ char '#'
; group (rep1 digit)
; str " @ "
; group (rep1 digit)
; char ','
; group (rep1 digit)
; s... | null | https://raw.githubusercontent.com/bcc32/advent-of-code/653c0f130e2fb2f599d4e76804e02af54c9bb19f/2018/03/claim.ml | ocaml | open! Core
open! Async
open! Import
type t =
{ id : int
; x : int
; y : int
; w : int
; h : int
}
let claim_re =
Re.(
compile
(seq
[ char '#'
; group (rep1 digit)
; str " @ "
; group (rep1 digit)
; char ','
; group (rep1 digit)
; s... | |
896a7dd974731af9f1b3384b5bb34cd28af3c9f77568eb8b2b37e35f4c0df2b7 | nd/sicp | 3.62.scm | (define (div-series s1 s2)
(if (null? (stream-car s2))
(error "Division by zero")
(mul-series s1 (scale-stream (invert-unit-series s2) (stream-car s2))))) | null | https://raw.githubusercontent.com/nd/sicp/d8587a0403d95af7c7bcf59b812f98c4f8550afd/ch03/3.62.scm | scheme | (define (div-series s1 s2)
(if (null? (stream-car s2))
(error "Division by zero")
(mul-series s1 (scale-stream (invert-unit-series s2) (stream-car s2))))) | |
018f0c3ef75a15cf5bf42320dbe1398f29978d2be79d258325898c8e608f879f | chetmurthy/ensemble | endpt.mli | (**************************************************************)
ENDPT.MLI
Author : , 7/95
(**************************************************************)
open Trans
(**************************************************************)
(* Type of endpoints.
*)
type id
type full = id * Addr.set
(* Constructors. T... | null | https://raw.githubusercontent.com/chetmurthy/ensemble/8266a89e68be24a4aaa5d594662e211eeaa6dc89/ensemble/server/type/endpt.mli | ocaml | ************************************************************
************************************************************
************************************************************
Type of endpoints.
Constructors. The named endpoints are only used for
* debugging purposes. Named endpoints (as opposed to named
... | ENDPT.MLI
Author : , 7/95
open Trans
type id
type full = id * Addr.set
val extern : string -> id
val string_of_id : id -> string
val string_of_id_short : id -> string
val string_of_id_very_short : id -> string
val string_of_full : full -> string
val string_of_id_list : id list -> string
|
7a484f76297a0f6599fbaf97276da60643124d15a8327fb896f63b698eed9686 | OCamlPro/drom | main.ml | !{header-ml}
If you delete or rename this file , you should add ' ' to the ' skip ' field in " drom.toml "
let main () =
if Array.length Sys.argv <> 2 then begin
Format.eprintf "usage: %s <file>@." Sys.argv.(0);
exit 1
end;
let file = Sys.argv.(1) in
if not @@ Sys.file_exists file then begin
... | null | https://raw.githubusercontent.com/OCamlPro/drom/7bc86026e0e170f1a468b437d369aefc5dbea5d7/src/drom_lib/share/drom/skeletons/packages/menhir_lib/main.ml | ocaml | !{header-ml}
If you delete or rename this file , you should add ' ' to the ' skip ' field in " drom.toml "
let main () =
if Array.length Sys.argv <> 2 then begin
Format.eprintf "usage: %s <file>@." Sys.argv.(0);
exit 1
end;
let file = Sys.argv.(1) in
if not @@ Sys.file_exists file then begin
... | |
4814e08db49a9c7d07aacea79ed2375f01bcd9298d93f0b42d6e104df41b96f6 | BranchTaken/Hemlock | rudimentsInt0.ml | open RudimentsFunctions
type i64 = int64
type u64 = int64
type sint = int64
type uns = int64
type u128 = {w0: u64; w1: u64}
let uns_of_sint t =
t
let sint_of_uns t =
t
let int_of_sint t =
if (t <> Int64.(of_int (to_int t))) then halt "Lossy conversion";
Int64.to_int t
let sint_of_int t =
Int64.of_int t
... | null | https://raw.githubusercontent.com/BranchTaken/Hemlock/53da5c0d9cf0c94d58b4391735d917518eec67fa/bootstrap/src/basis/rudimentsInt0.ml | ocaml | open RudimentsFunctions
type i64 = int64
type u64 = int64
type sint = int64
type uns = int64
type u128 = {w0: u64; w1: u64}
let uns_of_sint t =
t
let sint_of_uns t =
t
let int_of_sint t =
if (t <> Int64.(of_int (to_int t))) then halt "Lossy conversion";
Int64.to_int t
let sint_of_int t =
Int64.of_int t
... | |
dd3bcde139226ffc0070c3ba487aef9af41c913b4bd35024b02f5a4b32b64cdd | DavidAlphaFox/ailib | ailib_error.erl | -module(ailib_error).
-include("ailib.hrl").
-export([new/2]).
-export([message/1]).
-export([hash/1]).
-export([to_binary/1]).
-export_type([type/0]).
-type type() :: #{
?TYPE => ?M,
module => undefined,
message => binary()
}.
-spec new(binary(),module()) -> type().
new(Message,Module)
when is_binary(Message... | null | https://raw.githubusercontent.com/DavidAlphaFox/ailib/af10e9bff608b6aaf491007f737d7cb5d98ffc08/src/errors/ailib_error.erl | erlang | -module(ailib_error).
-include("ailib.hrl").
-export([new/2]).
-export([message/1]).
-export([hash/1]).
-export([to_binary/1]).
-export_type([type/0]).
-type type() :: #{
?TYPE => ?M,
module => undefined,
message => binary()
}.
-spec new(binary(),module()) -> type().
new(Message,Module)
when is_binary(Message... | |
1df93ca52343db6c98a6e0f155e6a9a48bdf1dfdd34ab51ed875cae6b6255de9 | igorhvr/bedlam | srfi-78.scm | ; <PLAINTEXT>
Copyright ( c ) 2005 - 2006 .
;
; Permission is hereby granted, free of charge, to any person obtaining
; a copy of this software and associated documentation files (the
` ` Software '' ) , to deal in the Software without restriction , including
; without limitation the rights to use, copy,... | null | https://raw.githubusercontent.com/igorhvr/bedlam/b62e0d047105bb0473bdb47c58b23f6ca0f79a4e/sisc/sisc-cvs/src/sisc/modules/srfi/srfi-78.scm | scheme | <PLAINTEXT>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall be
... | Copyright ( c ) 2005 - 2006 .
` ` Software '' ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
included in all copies or substantial portions of the... |
7bcd1c26034e17c0c02ce654974f0c1e45e6cf9af927d9dea2fbe708d6e54e83 | nasser/magic | other_functions.clj | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/nasser/magic/7a46f773bc7785c82d9527d52c1a8c28ac16e195/tests/clojure/test_clojure/other_functions.clj | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns clojure.test-clojure.other-functions
(:use clojure.test))
[= not= ( tests in data_structures.clj and elsewhere ) ]
(deftest test-identity
exactly 1 argument needed
(are [x] (= (identity x) x)
nil
false true
0 42
0.0 3.14
2/3... |
a894c08f55e1f4025bcb4c831c61fb776cb9220d07c7bfd49107fd2f5d204db2 | Octachron/tensority | nat.mli | *
This modules provides natural numbers ( non - negative integers ) extended with
a type - level predicate on the associated value .
More precisely , this module assumes that there is a type - level
embedding of integer intervals [ % nat S ] and that any values of type
nat satisfies the follow... | null | https://raw.githubusercontent.com/Octachron/tensority/2689fba0bb9c693ef51bebe9cf92c37ab30ca17e/lib/nat.mli | ocaml | * Underneath, a [nat] or [Nat.t] is just an integer
* A natural [k : [%nat n] lt] is a couple of value [k] and integer interval
type [[%nat n]] such that [ k < min n ]
* A natural [k : [%nat n] eq] is a couple of value [k] and type [[%nat n]] such
that [ k = n ]
* A natural [k : [%nat n] lt] is a couple of ... | *
This modules provides natural numbers ( non - negative integers ) extended with
a type - level predicate on the associated value .
More precisely , this module assumes that there is a type - level
embedding of integer intervals [ % nat S ] and that any values of type
nat satisfies the follow... |
16b4a0d0a3051eba74498c1ab97822017ae4c18e87fbac0f53b79aad7ef94be3 | maitria/avi | test_helpers.clj | (ns avi.test-helpers
(:import [java.io FileNotFoundException])
(:require [midje.sweet :refer :all]
[avi.color :as color]
[avi.core]
[avi.editor :as e]
[avi.events :as ev]
[avi.main]
[avi.world :refer :all]
[avi.test-helpers properti... | null | https://raw.githubusercontent.com/maitria/avi/c641e9e32af4300ea7273a41e86b4f47d0f2c092/test/avi/test_helpers.clj | clojure | Added to compare only lines in buffer without status and command line | (ns avi.test-helpers
(:import [java.io FileNotFoundException])
(:require [midje.sweet :refer :all]
[avi.color :as color]
[avi.core]
[avi.editor :as e]
[avi.events :as ev]
[avi.main]
[avi.world :refer :all]
[avi.test-helpers properti... |
ff54973f30084a6868a16040de4a1884356188348c9b0c22cca45b92e719c861 | ocamllabs/ocaml-modular-implicits | bdd.ml | (***********************************************************************)
(* *)
(* OCaml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ocamllabs/ocaml-modular-implicits/92e45da5c8a4c2db8b2cd5be28a5bec2ac2181f1/testsuite/tests/misc/bdd.ml | ocaml | *********************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 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 .
Translated to OCaml by
Original c... |
ae830710744537685a57c2fb20dd0a9730dea1696ba9a68fabc4d12b82fd2181 | hercules-ci/hercules-ci-agent | Spec.hs | # LANGUAGE BlockArguments #
module Spec where
import qualified Hercules.API.Agent.Effect.EffectTaskSpec
import qualified Hercules.API.Agent.Evaluate.EvaluateEvent.AttributeEffectEventSpec
import qualified Hercules.API.Agent.Evaluate.EvaluateEvent.DerivationInfoSpec
import qualified Hercules.API.Agent.LifeCycle.AgentI... | null | https://raw.githubusercontent.com/hercules-ci/hercules-ci-agent/be8142e7f38eba5e3805f21d5b6423ce7239e0f0/hercules-ci-api-agent/test/Spec.hs | haskell | # LANGUAGE BlockArguments #
module Spec where
import qualified Hercules.API.Agent.Effect.EffectTaskSpec
import qualified Hercules.API.Agent.Evaluate.EvaluateEvent.AttributeEffectEventSpec
import qualified Hercules.API.Agent.Evaluate.EvaluateEvent.DerivationInfoSpec
import qualified Hercules.API.Agent.LifeCycle.AgentI... | |
4474b6ddc6ee586d02bd8d5e1694cfb95938c3dba4615bc3401c7c1e900f8592 | Clozure/ccl-tests | copy-list.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Sat Apr 19 21:55:19 2003
;;;; Contains: Tests of COPY-LIST
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest copy-list.1
(check-copy-list '(a b c d))
(a b c d))
;; Check that copy-list works on dotted lists
(deftest copy-list.2
(check-copy-... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/copy-list.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of COPY-LIST
Check that copy-list works on dotted lists
Error tests | Author :
Created : Sat Apr 19 21:55:19 2003
(in-package :cl-test)
(compile-and-load "cons-aux.lsp")
(deftest copy-list.1
(check-copy-list '(a b c d))
(a b c d))
(deftest copy-list.2
(check-copy-list '(a . b))
(a . b))
(deftest copy-list.3
(check-copy-list '(a b c . d))
(a b c . d))
(deftest... |
9ad82ac5dde90a73bf243f767031bbf85eaef0443c06e6ad1a02a1f7c96b7d01 | aleator/CV | Pixelwise.hs | | This module is an applicative wrapper for images . It introduces Pixelwise type that
-- can be converted from and to grayscale images and which has an applicative and functor
-- instances.
# LANGUAGE TypeFamilies , FlexibleContexts , RankNTypes , ScopedTypeVariables #
module CV.Pixelwise (Pixelwise(..)
... | null | https://raw.githubusercontent.com/aleator/CV/1e2c9116bcaacdf305044c861a1b36d0d8fb71b7/CV/Pixelwise.hs | haskell | can be converted from and to grayscale images and which has an applicative and functor
instances.
,toImagePar
| A wrapper for allowing functor and applicative instances for non-polymorphic image types.
| Re-arrange pixel positions and values
| Convert image to a function, which returns pixe... | | This module is an applicative wrapper for images . It introduces Pixelwise type that
# LANGUAGE TypeFamilies , FlexibleContexts , RankNTypes , ScopedTypeVariables #
module CV.Pixelwise (Pixelwise(..)
,fromImage
,fromFunction
,toImage
... |
6e0f092902bfcc187d9e9e4c98b1e3a82f8f03c1927d2aa6e7c67740ba82839f | goblint/analyzer | relationDomain.apron.ml | (** Interfaces/implementations that generalize the apronDomain and affineEqualityDomain. *)
open Prelude
open GoblintCil
* Abstracts the extended apron Var .
module type Var =
sig
type t
val compare : t -> t -> int
val of_string : string -> t
val to_string : t -> string
val hash : t -> int
val equal : t -... | null | https://raw.githubusercontent.com/goblint/analyzer/a5d0acefff054a22dc53dba09acdea752a12cbae/src/cdomains/apron/relationDomain.apron.ml | ocaml | * Interfaces/implementations that generalize the apronDomain and affineEqualityDomain. |
open Prelude
open GoblintCil
* Abstracts the extended apron Var .
module type Var =
sig
type t
val compare : t -> t -> int
val of_string : string -> t
val to_string : t -> string
val hash : t -> int
val equal : t -> t -> bool
end
module type VarMetadata =
sig
type t
val var_name: t -> string
end
mod... |
85874fd3989eb8b580b7fee2c699db0094d82440ad7cd7c9a91163746563bf3a | ocaml/oasis | TestOASISSourcePatterns.ml | (******************************************************************************)
OASIS : architecture for building OCaml libraries and applications
(* *)
Copyright ( C ) 2011 - 2016 ,
Copyrig... | null | https://raw.githubusercontent.com/ocaml/oasis/3d1a9421db92a0882ebc58c5df219b18c1e5681d/test/test-main/TestOASISSourcePatterns.ml | ocaml | ****************************************************************************
This library is free software; you can redistribute it and/or modify it
under the t... | OASIS : architecture for building OCaml libraries and applications
Copyright ( C ) 2011 - 2016 ,
Copyright ( C ) 2008 - 2011 , OCamlCore SARL
the Free Software Foundation ; either version 2.1 of the License , or ( at
You s... |
46619e38d39037884ccdc1cc625f1fe11550b49e8914eb451f511e9a88afc1f6 | binsec/haunted | mcount_main.mli | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2019
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/haunted/7ffc5f4072950fe138f53fe953ace98fff181c73/src/examples/mcount/mcount_main.mli | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
6b18748fabfc88c8fca0fc98c3236eccbd3ead97ffc799ea5b456aa1be699452 | ghcjs/ghcjs-boot | Ppr.hs | -- | contains a prettyprinter for the
Template Haskell datatypes
module Language.Haskell.TH.Ppr where
-- All of the exports from this module should
be " public " functions . The main module TH
-- re-exports them all.
import Text.PrettyPrint (render)
import Language.Haskell.TH.PprLib
import Language.Hask... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-boot/8c549931da27ba9e607f77195208ec156c840c8a/boot/template-haskell/Language/Haskell/TH/Ppr.hs | haskell | | contains a prettyprinter for the
All of the exports from this module should
re-exports them all.
Argument of a function application
Argument of an infix operator
Argument of an unresolved infix operator
Others
----------------------------
----------------------------
----------------------------
--------------... | Template Haskell datatypes
module Language.Haskell.TH.Ppr where
be " public " functions . The main module TH
import Text.PrettyPrint (render)
import Language.Haskell.TH.PprLib
import Language.Haskell.TH.Syntax
import Data.Word ( Word8 )
import Data.Char ( toLower, chr, ord, isSymbol )
import GHC.Show ( showMul... |
b560373f816aa864600c1033c3f8e6209692b0c3c620ec7fd06f5d374eabb476 | alt-romes/slfl | Eval1.hs | data Bool = False | True;
t = 2;
main = case (4 + 3 + t == t + 7) => 4 < t of
True -> 0 - 1
| False -> 0 - 2;
| null | https://raw.githubusercontent.com/alt-romes/slfl/4956fcce8ff2ca7622799fe0715c118b568b74eb/STLLC/tests/support/Eval1.hs | haskell | data Bool = False | True;
t = 2;
main = case (4 + 3 + t == t + 7) => 4 < t of
True -> 0 - 1
| False -> 0 - 2;
| |
86d24446f8418620712d66ac691d795c048cee8bb3012e7701db4c468e1b496d | burkaydurdu/muggle | subs.cljs | (ns muggle.home.subs
(:require
[re-frame.core :refer [reg-sub]]))
(reg-sub
:sorting-value
(fn [db _]
(:sorting-value db)))
| null | https://raw.githubusercontent.com/burkaydurdu/muggle/8c457397305be6ea2848a2537669a700d0147997/src/muggle/home/subs.cljs | clojure | (ns muggle.home.subs
(:require
[re-frame.core :refer [reg-sub]]))
(reg-sub
:sorting-value
(fn [db _]
(:sorting-value db)))
| |
0cb153ab3e31e1063ada4b9e789d4f0ef8369a838da7855a2c470e33013b6040 | haskell/hackage-server | ContentType.hs | module Distribution.Server.Util.ContentType (
parseContentAccept
) where
import Happstack.Server.Types (ContentType(..))
import qualified Text.ParserCombinators.ReadP as Parse
import Control.Monad
import Data.List (find, sortBy)
import Data.Char (isAlphaNum, isDigit)
import Data.Ord (comparing)
data VaryForm... | null | https://raw.githubusercontent.com/haskell/hackage-server/6c8689a779b688b3e6b927614c90318936d5bb3f/src/Distribution/Server/Util/ContentType.hs | haskell | a more 'accurate' type than (String, String)
might be Maybe (String, Maybe String)
TODO: parse other parameters
TODO: parse optional extensions
other characters technically allowed but never found in the wild: !#$%&^_`|~ | module Distribution.Server.Util.ContentType (
parseContentAccept
) where
import Happstack.Server.Types (ContentType(..))
import qualified Text.ParserCombinators.ReadP as Parse
import Control.Monad
import Data.List (find, sortBy)
import Data.Char (isAlphaNum, isDigit)
import Data.Ord (comparing)
data VaryForm... |
deba9061ae1cd49c00901687354ba150f1837deb831b53726eafbd834c92c3ae | c4-project/c4f | postcondition.mli | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... | null | https://raw.githubusercontent.com/c4-project/c4f/8939477732861789abc807c8c1532a302b2848a5/lib/litmus/src/postcondition.mli | ocaml | * {1 Quantifiers}
* The variant type of quantifiers.
* {2 Constructors}
* [exists predicate] is shorthand for constructing an existentially
quantified predicate.
* [for_all predicate] is shorthand for constructing a universally
quantified predicate.
* {2 Accessors}
* [quantifier post] gets [post]'s quanti... | This file is part of c4f .
Copyright ( c ) 2018 - 2022 C4 Project
c4 t itself is licensed under the MIT License . See the LICENSE file in the
project root for more information .
Parts of c4 t are based on code from the Herdtools7 project
( ) : see the LICENSE.herd file in the
project... |
93360bdbf3b18660b547ea0ca080d63c170736b5d55f4efda0e34c924fbfe8e6 | FieryCod/holy-lambda | tasks.clj | (ns holy-lambda.tasks
(:require
[clojure.string :as s]
[clojure.pprint :as pprint]
[clojure.java.shell :as csh]
[clojure.edn :as edn]
[cheshire.core :as json]
[babashka.deps :as deps]
[babashka.curl :as curl]
[babashka.fs :as fs]
[babashka.process :as p]
[clojure.java.io :as io]
[holy... | null | https://raw.githubusercontent.com/FieryCod/holy-lambda/afb214b065c2d244bb4b21cbc73c03feab74f978/modules/holy-lambda-babashka-tasks/src/holy_lambda/tasks.clj | clojure | Bind to true to have the colorize functions not apply coloring to
their arguments.
[START] HELPERS
[END] HELPERS | (ns holy-lambda.tasks
(:require
[clojure.string :as s]
[clojure.pprint :as pprint]
[clojure.java.shell :as csh]
[clojure.edn :as edn]
[cheshire.core :as json]
[babashka.deps :as deps]
[babashka.curl :as curl]
[babashka.fs :as fs]
[babashka.process :as p]
[clojure.java.io :as io]
[holy... |
ac8531dbf3f8b9f00d71072c4e85f0c1d6ac1d51cce31bc7c1165533099cdbac | hyperfiddle/electric | hyperfiddle.cljc | (ns hyperfiddle)
; See discussion of single-segment namespaces here
; -style-guide/pull/100
Clojure is fine if no gen - class
ClojureScript compiler warns
Just use hyperfiddle.api : as hf , for specs as well as fns ,
; it's a little ugly but with the require alias it works out.
| null | https://raw.githubusercontent.com/hyperfiddle/electric/1c6c3891cbf13123fef8d33e6555d300f0dac134/src/hyperfiddle.cljc | clojure | See discussion of single-segment namespaces here
-style-guide/pull/100
it's a little ugly but with the require alias it works out. | (ns hyperfiddle)
Clojure is fine if no gen - class
ClojureScript compiler warns
Just use hyperfiddle.api : as hf , for specs as well as fns ,
|
777522a5bf5bf77e178efa64386c1a8671981f10a269ed0b6527d917b602d569 | hakaru-dev/hakaru | Quadrotor.hs | # LANGUAGE NoMonomorphismRestriction #
module Main where
import Data.List
import Data.Dynamic
import System.Directory
import System.IO
import System.Environment (getArgs, getProgName)
import System.Exit (exitFailure)
import Text.Parsec
import qualified Data.Map.Strict as M
import qualified Data.Number.LogFloat as LF... | null | https://raw.githubusercontent.com/hakaru-dev/hakaru/94157c89ea136c3b654a85cce51f19351245a490/haskell/Examples/Quadrotor.hs | haskell | particle filtering
quad rotor model (kalman filter)
helper functions
main program
ignore orientation column | # LANGUAGE NoMonomorphismRestriction #
module Main where
import Data.List
import Data.Dynamic
import System.Directory
import System.IO
import System.Environment (getArgs, getProgName)
import System.Exit (exitFailure)
import Text.Parsec
import qualified Data.Map.Strict as M
import qualified Data.Number.LogFloat as LF... |
6528dff282bc94f55129dc1cee193775ef5fdeadef23254931b649d1b2f6824c | jashmenn/smoker | NormalizeURL.clj |
(ns smoker.udf.NormalizeURL
(:import
[org.apache.hadoop.hive.ql.exec UDF]
[java.net URI URL]
[org.apache.hadoop.io Text])
(:require
[clojure.contrib.str-utils2 :as su]
[smoker.url-utils :as ru]
[url-normalizer.core :as norm])
(:gen-class
:name smoker.udf.NormalizeURL
:extends org.apache... | null | https://raw.githubusercontent.com/jashmenn/smoker/79048c99a69d8fb8d1a57796a6881bf2e732fe0e/src/clj/smoker/udf/NormalizeURL.clj | clojure |
(ns smoker.udf.NormalizeURL
(:import
[org.apache.hadoop.hive.ql.exec UDF]
[java.net URI URL]
[org.apache.hadoop.io Text])
(:require
[clojure.contrib.str-utils2 :as su]
[smoker.url-utils :as ru]
[url-normalizer.core :as norm])
(:gen-class
:name smoker.udf.NormalizeURL
:extends org.apache... | |
cb01607c4d4e4557f0835bd680efa718b4d49529f9f543c0b9eb06caaf320823 | ghc/ghc | PtrEq.hs | # LANGUAGE Unsafe #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE MagicHash #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
-----------------------------------------------------------------------------
-- |
Module : GHC.Prim .
License : see l... | null | https://raw.githubusercontent.com/ghc/ghc/f70a0239490ebea25e50c61c01f945d8df41e92f/libraries/ghc-prim/GHC/Prim/PtrEq.hs | haskell | ---------------------------------------------------------------------------
|
Maintainer :
Stability : internal
Comparing underlying pointers for equality.
Use GHC.Exts from the base package instead of importing this
module directly.
----------------------------------------------------------------------... | # LANGUAGE Unsafe #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE MagicHash #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE KindSignatures #
# LANGUAGE DataKinds #
# LANGUAGE PolyKinds #
Module : GHC.Prim .
License : see libraries / ghc - prim / LICENSE
Portability : non - portable ( GHC Extensions )... |
10c5f0274ae976577a2ff8f305c1d60cca9bbf7ff1eff0b2c39d19af57f9f0e6 | kmi/irs | find-ocml-object.lisp | ;;; Mode: Lisp; Package: web-onto
Author :
The Open University
(in-package "WEB-ONTO")
(defun java-true-p (x)
(eq x 'ocml::true))
(defun send-find-object-result (stream result)
(http::princ-to-binary-stream
(if result
(format nil
"~(~a~)[~{~{~(~a~){~{~(~a~){~{~(~a~)%~}{~}[~}~}~%"... | null | https://raw.githubusercontent.com/kmi/irs/e1b8d696f61c6b6878c0e92d993ed549fee6e7dd/src/webonto/find-ocml-object.lisp | lisp | Mode: Lisp; Package: web-onto
the find_object bit
filters |
Author :
The Open University
(in-package "WEB-ONTO")
(defun java-true-p (x)
(eq x 'ocml::true))
(defun send-find-object-result (stream result)
(http::princ-to-binary-stream
(if result
(format nil
"~(~a~)[~{~{~(~a~){~{~(~a~){~{~(~a~)%~}{~}[~}~}~%"
(ok-p-result (or (... |
75043cadd2758b6dcc02ae0478ccd5bb667531edc9afb18e6039456abc5dbcf9 | Octachron/codept | schematic_indices.ml | open Schematic
module N = struct
let zero = Var Zn and next = Sn Zn
let one = Var next and next = Sn next
let two = Var next and next = Sn next
let three = Var next and next = Sn next
let four = Var next and next = Sn next
let five = Var next and next = Sn next
let six = Var next and next = Sn next
le... | null | https://raw.githubusercontent.com/Octachron/codept/2d2a95fde3f67cdd0f5a1b68d8b8b47aefef9290/lib/schematic_indices.ml | ocaml | open Schematic
module N = struct
let zero = Var Zn and next = Sn Zn
let one = Var next and next = Sn next
let two = Var next and next = Sn next
let three = Var next and next = Sn next
let four = Var next and next = Sn next
let five = Var next and next = Sn next
let six = Var next and next = Sn next
le... | |
9733dc736dedc54c7a274119d968b8d66c7e4045e28ce27e672b4145b7ac96b0 | amccausl/Swish | ClassRestrictionRule.hs | {-# OPTIONS -XMultiParamTypeClasses #-}
--------------------------------------------------------------------------------
$ I d : ClassRestrictionRule.hs , v 1.15 2004/01/07 19:49:12 graham Exp $
--
Copyright ( c ) 2003 , . All rights reserved .
-- See end of this file for licence information.
--------... | null | https://raw.githubusercontent.com/amccausl/Swish/9a7356300960c62e3f0468067bda0c34ee3606bd/Swish/HaskellRDF/ClassRestrictionRule.hs | haskell | # OPTIONS -XMultiParamTypeClasses #
------------------------------------------------------------------------------
See end of this file for licence information.
------------------------------------------------------------------------------
|
Module : ClassRestrictionRule
Stability : provisional... | $ I d : ClassRestrictionRule.hs , v 1.15 2004/01/07 19:49:12 graham Exp $
Copyright ( c ) 2003 , . All rights reserved .
Copyright : ( c ) 2003 ,
License : GPL V2
Maintainer :
membership of one or more values .
module Swish.HaskellRDF.ClassRestrictionRule
( C... |
dfbf4211e22122f3137feeb2419e0857654413aa52d46e67de66edd68ac186e6 | panda-planner-dev/ipc2020-domains | d-11.lisp | (defdomain domain (
(:operator (!navigate ?x ?y ?z)
;; preconditions
(
(type_rover ?x) (type_waypoint ?y) (type_waypoint ?z)
(can_traverse ?x ?y ?z) (available ?x) (at ?x ?y) (visible ?y ?z)
)
;; delete effects
((at ?x ?y))
;; add effects
((at ?x ?z))
)
(:operator (!sample_... | null | https://raw.githubusercontent.com/panda-planner-dev/ipc2020-domains/9adb54325d3df35907adc7115fcc65f0ce5953cc/partial-order/Rover/other/SHOP2/d-11.lisp | lisp | preconditions
delete effects
add effects
preconditions
delete effects
add effects
preconditions
delete effects
add effects
preconditions
delete effects
add effects
preconditions
delete effects
add effects
preconditions
delete effects
add effects
preconditions
delete effects
add effects
preconditio... | (defdomain domain (
(:operator (!navigate ?x ?y ?z)
(
(type_rover ?x) (type_waypoint ?y) (type_waypoint ?z)
(can_traverse ?x ?y ?z) (available ?x) (at ?x ?y) (visible ?y ?z)
)
((at ?x ?y))
((at ?x ?z))
)
(:operator (!sample_soil ?x ?s ?p)
(
(type_rover ?x) (type_store ?s) (ty... |
af034d86a8d567af86ead4f0c147375b1555aa02e9dfb5488a168fd474305866 | gojek/ziggurat | stream_joins_diff_test.clj | (ns ziggurat.middleware.metrics.stream-joins-diff-test
(:require [clojure.test :refer :all]
[ziggurat.middleware.metrics.stream-joins-diff :as mw]
[ziggurat.metrics :as metrics]
[ziggurat.fixtures :as fix]))
(use-fixtures :once (join-fixtures [fix/mount-only-config
... | null | https://raw.githubusercontent.com/gojek/ziggurat/f5e0822af8410ea79b7734ef2f41bc98fad3c17f/test/ziggurat/middleware/metrics/stream_joins_diff_test.clj | clojure | (ns ziggurat.middleware.metrics.stream-joins-diff-test
(:require [clojure.test :refer :all]
[ziggurat.middleware.metrics.stream-joins-diff :as mw]
[ziggurat.metrics :as metrics]
[ziggurat.fixtures :as fix]))
(use-fixtures :once (join-fixtures [fix/mount-only-config
... | |
7e0201f336720550a3126bbe2453d4a9bd1aa0f9875557131299fa0eaa2973fb | ghc/ghc | Utils.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE TypeFamilies #
( c ) The University of Glasgow 2006
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
Utilities for desugaring
This module exports some utility functions of no great interest .
(c) The University of Glasgow 20... | null | https://raw.githubusercontent.com/ghc/ghc/083f701553852c4460159cd6deb2515d3373714d/compiler/GHC/HsToCore/Utils.hs | haskell | LHs tuples
# SOURCE #
# SOURCE #
************************************************************************
* *
\subsection{ Selecting match variables}
* *
**************************... | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
# LANGUAGE TypeFamilies #
( c ) The University of Glasgow 2006
( c ) The GRASP / AQUA Project , Glasgow University , 1992 - 1998
Utilities for desugaring
This module exports some utility functions of no great interest .
(c) The University of Glasgow 20... |
00b7b15fa40e92fa217c079b5a7d2b8081b6b7809ba4146fa6efd63d3478885d | LeastAuthority/haskell-magic-wormhole | Integration.hs | | Test our interoperability with Python Magic Wormhole .
--
-- Some notes:
-- * it is the developer's / CI server's responsibility to provide a Python installation and a magic-wormhole installation
-- * we currently make no attempt to handle different versions of magic-wormhole
-- * if Python is not present, these te... | null | https://raw.githubusercontent.com/LeastAuthority/haskell-magic-wormhole/2d44b940deb86dba442935ff10ebcabe2f1f5ce8/tests/Integration.hs | haskell |
Some notes:
* it is the developer's / CI server's responsibility to provide a Python installation and a magic-wormhole installation
* we currently make no attempt to handle different versions of magic-wormhole
* if Python is not present, these tests will pass
* if magic-wormhole is not present, these tests will p... | | Test our interoperability with Python Magic Wormhole .
module Integration (tests) where
import Protolude hiding (phase, stdin, stdout, toS)
import Protolude.Conv (toS)
import Control.Concurrent.STM.TChan
( newTChan
, readTChan
, writeTChan
)
import qualified Crypto.Saltine.Class as Saltine
import qualifie... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.