_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 |
|---|---|---|---|---|---|---|---|---|
33b16f491e2a1e1af2e9f33ccbf596891f71f1749ad6fdddd832b704851c2367 | 2600hz/kazoo | kazoo_services_app.erl | %%%-----------------------------------------------------------------------------
( C ) 2012 - 2020 , 2600Hz
%%% @doc
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% @end
%%%--------... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_services/src/kazoo_services_app.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
------------------------------------------------------------------------------
@doc Implement the application start behaviour.
@end
-----------------... | ( C ) 2012 - 2020 , 2600Hz
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(kazoo_services_app).
-behaviour(application).
-include("services.hrl").
-export([start/2, stop/1]).
-s... |
bc8a8d14a4312c5d4415ebc6c23816cbc9a28e712bfd68ea1c1dbe415b51365a | pentlandedge/s4607 | sutils.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright 2016 Pentland Edge Ltd.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
%% use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Un... | null | https://raw.githubusercontent.com/pentlandedge/s4607/b3cdae404ac5bd50419f33259dfa62af9d1a8d60/src/sutils.erl | erlang |
use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations... | Copyright 2016 Pentland Edge Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
@doc Utility functions for used in more than one module .
-module(sutils).
-export([
trim_trailing_spaces/1,
... |
4223fee5491c31f6ccfe485e54ca65dfcf071f0aa33f35d1918d22cff34b15c3 | Hans-Halverson/myte | lex_analyze.ml | open Program_context
let analyze_modules ~is_stdlib ~pcx mods_and_files =
Program_context.add_modules ~pcx mods_and_files;
let mods = List.map snd mods_and_files in
(* Check for main function for non-library compilation units *)
let main_errors =
if is_stdlib then
[]
else
let (main_loc, ma... | null | https://raw.githubusercontent.com/Hans-Halverson/myte/e7c0f8aa98080937d7071c93d0e7222779d1a33d/src/analyze/lex_analyze.ml | ocaml | Check for main function for non-library compilation units
Update module tree with modules in this compilation unit
Resolve symbols in this compilation unit. Updates the set of all bindings and store
the newly resolved ASTs
Only proceed to type checking if there are no pre-typechecking errors
Only proceed ... | open Program_context
let analyze_modules ~is_stdlib ~pcx mods_and_files =
Program_context.add_modules ~pcx mods_and_files;
let mods = List.map snd mods_and_files in
let main_errors =
if is_stdlib then
[]
else
let (main_loc, main_errors) = Main_function.analyze mods in
Program_context.s... |
e2b8b802e923b3bb3fa0648dc0d0a87be72ae03fe0c58e690c605ac7448573a0 | YoshikuniJujo/test_haskell | TypeNat.hs | # LANGUAGE BlockArguments #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module TypeNat where
import GHC.TypeLits
import Data.Proxy
withSomeNat :: SomeNat -> (forall n . KnownNat n => Proxy n -> a) -> a
withSomeNat (SomeNat p) f = f p
tryNat... | null | https://raw.githubusercontent.com/YoshikuniJujo/test_haskell/58bcea1b5d5721ddfaf43284c6669ca382256c3a/tribial/tribial-trials/src/TypeNat.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE BlockArguments #
# LANGUAGE DataKinds #
# LANGUAGE KindSignatures #
# OPTIONS_GHC -Wall -fno - warn - tabs #
module TypeNat where
import GHC.TypeLits
import Data.Proxy
withSomeNat :: SomeNat -> (forall n . KnownNat n => Proxy n -> a) -> a
withSomeNat (SomeNat p) f = f p
tryNat :: Integer -> IO ()
tryNat ... |
cfae1df39a22fafe3786ef9dec84558e8ffd99c28a17642d8f1f6ac1db98d629 | rpav/spell-and-dagger | presetup.lisp | (defpackage #:build
(:use #:cl))
(in-package :build)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun setup-library-paths ()
(let* ((argv0 (first sb-ext:*posix-argv*))
(path (directory-namestring argv0)))
(format t "Adding ~A~%" path)
(push path cffi:*foreign-library-directo... | null | https://raw.githubusercontent.com/rpav/spell-and-dagger/0424416ff14a6758d27cc0f84c21bf85df024a7b/src/presetup.lisp | lisp | (defpackage #:build
(:use #:cl))
(in-package :build)
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun setup-library-paths ()
(let* ((argv0 (first sb-ext:*posix-argv*))
(path (directory-namestring argv0)))
(format t "Adding ~A~%" path)
(push path cffi:*foreign-library-directo... | |
f14ff4194a7b45b10e1dff1b504857e18cd00cc53238bc5952ec925ac4c1f584 | clash-lang/clash-compiler | TypeFamilyReduction.hs | module TypeFamilyReduction where
import Clash.Prelude
-- See: -lang/clash-compiler/issues/352
div'
:: Vec (Div 4 2) Bit
-> Vec (Div 4 2) Bit
div' = id
# NOINLINE div ' #
mod'
:: Vec (Mod 6 4) Bit
-> Vec (Mod 6 4) Bit
mod' = id
# NOINLINE mod ' #
lcm'
:: Vec (LCM 1 2) Bit
-> Vec (LCM 1 2) Bit
lcm' = id
... | null | https://raw.githubusercontent.com/clash-lang/clash-compiler/8e461a910f2f37c900705a0847a9b533bce4d2ea/tests/shouldwork/Types/TypeFamilyReduction.hs | haskell | See: -lang/clash-compiler/issues/352 | module TypeFamilyReduction where
import Clash.Prelude
div'
:: Vec (Div 4 2) Bit
-> Vec (Div 4 2) Bit
div' = id
# NOINLINE div ' #
mod'
:: Vec (Mod 6 4) Bit
-> Vec (Mod 6 4) Bit
mod' = id
# NOINLINE mod ' #
lcm'
:: Vec (LCM 1 2) Bit
-> Vec (LCM 1 2) Bit
lcm' = id
# NOINLINE lcm ' #
gcd'
:: Vec (GCD 4... |
3cd3eb015d9008ac4e924fa49445311cf9e0f9e80a28c172cf9557eafb15a814 | silky/quipper | Example.hs | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
-- file COPYRIGHT for a list of authors, copyright holders, licensing,
-- and other details. All rights reserved.
--
-- ======================================================================
import Quipper
import Prelude hiding (and)
exam... | null | https://raw.githubusercontent.com/silky/quipper/1ef6d031984923d8b7ded1c14f05db0995791633/tests/Example.hs | haskell | file COPYRIGHT for a list of authors, copyright holders, licensing,
and other details. All rights reserved.
====================================================================== | This file is part of Quipper . Copyright ( C ) 2011 - 2016 . Please see the
import Quipper
import Prelude hiding (and)
example1 :: (Qubit, Qubit, Qubit) -> Circ (Qubit, Qubit, Qubit)
example1 (a,b,c) = do
qnot_at a `controlled` [b, c]
hadamard b `controlled` [a]
qnot_at a `controlled` [b, c]
hadamard c `co... |
e29d7ffca93f2f264062269d60e9775145c0e9c86813143a7b3e77a067f2ef96 | lspitzner/brittany | Test106.hs | func = (`abc` 1)
| null | https://raw.githubusercontent.com/lspitzner/brittany/a15eed5f3608bf1fa7084fcf008c6ecb79542562/data/Test106.hs | haskell | func = (`abc` 1)
| |
ec571ec1906942b150bf17882b964368c68c3ba4ed7cf404ba33a94c26b5570b | groundedsage/VeganBN-website | app.cljc | (ns vbn.app
#?(:cljs (:require-macros [vbn.styler :refer [css get-css-str]]))
(:require [rum.core :as rum]
[devcards.core :as dc]
[bidi.bidi :as b :refer [match-route path-for]]
[vbn.index :as i]
[vbn.veganism :as v]
[vbn.consulting :as ct]
[... | null | https://raw.githubusercontent.com/groundedsage/VeganBN-website/d04ebf49f409b7a1dfce98344556b479697995ae/src/cljc/vbn/app.cljc | clojure | [vbn.styler :refer [installer-hack]]
#?(:cljs [vbn.mediafixer :refer [get-atomic-css]])
Accessibility defaults
Site specific
define clojure version of link
NEED TO ASSOC "#MAIN" onto the current URL
#?(:cljs {:class [(styler/css {:background "blue"})]})
#?(:clj {:class [(clj-styler/css {:background "blue"})]})
{:cl... | (ns vbn.app
#?(:cljs (:require-macros [vbn.styler :refer [css get-css-str]]))
(:require [rum.core :as rum]
[devcards.core :as dc]
[bidi.bidi :as b :refer [match-route path-for]]
[vbn.index :as i]
[vbn.veganism :as v]
[vbn.consulting :as ct]
[... |
c0cecbef1226747a8f372d4bc6ca36b0e6d247d0706609c51ec5d4ae076fad7e | ghc/ghc | FamInstEnv.hs | {-# LANGUAGE DeriveFunctor #-}
# LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
( c ) The University of Glasgow 2006
--
-- FamInstEnv: Type checked family instance declarations
module GHC.Core.FamInstEnv (
FamInst(..), FamFlavor(..), famInstAxiom, fa... | null | https://raw.githubusercontent.com/ghc/ghc/93f0e3c49cea484bd6e838892ff8702ec51f34c3/compiler/GHC/Core/FamInstEnv.hs | haskell | # LANGUAGE DeriveFunctor #
FamInstEnv: Type checked family instance declarations
* CoAxioms
Normalisation
The new coercion axiom
introduced by this family
instance
INVARIANT: apart from freshening (see below)
fi_tvs = cab_tvs of the (single) axiom branch
fi_cvs = cab_cvs ...ditto...
fi_tys = c... | # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
( c ) The University of Glasgow 2006
module GHC.Core.FamInstEnv (
FamInst(..), FamFlavor(..), famInstAxiom, famInstTyCon, famInstRHS,
famInstsRepTyCons, famInstRepTyCon_maybe, dataFamInstRepTyCon,
... |
d4ff75c71d968fb3ace02b642b59ec8bb890cde174bc1e33f11d96d97fecae4a | juxt/reap | regex_test.clj | Copyright © 2020 , JUXT LTD .
(ns juxt.reap.alpha.regex-test
(:require
[juxt.reap.alpha.regex :as re]
[clojure.test :refer [deftest is]]))
(deftest int->regex-test
(is (= "\\x24" (re/int->regex (int \$))))
(is (= "\\u2282" (re/int->regex (int \⊂)))))
(deftest re-concat-test
(is (= "abc" (re/re-concat... | null | https://raw.githubusercontent.com/juxt/reap/29ffc8664df26041ebd93a53f009d2606d1a5b6c/test/juxt/reap/alpha/regex_test.clj | clojure | Copyright © 2020 , JUXT LTD .
(ns juxt.reap.alpha.regex-test
(:require
[juxt.reap.alpha.regex :as re]
[clojure.test :refer [deftest is]]))
(deftest int->regex-test
(is (= "\\x24" (re/int->regex (int \$))))
(is (= "\\u2282" (re/int->regex (int \⊂)))))
(deftest re-concat-test
(is (= "abc" (re/re-concat... | |
6dc83ad121a447f368d219fa9d27ef60917a85835bd48fd777b076cff5e8d910 | robert-strandh/Clump | 2-3-tree.lisp | (cl:in-package #:clump-2-3-tree)
(defclass tree ()
((%contents :initform nil :accessor contents)
(%leaf-class :initarg :leaf-class :reader leaf-class)
(%2-node-class :initarg :2-node-class :reader 2-node-class)
(%3-node-class :initarg :3-node-class :reader 3-node-class)))
(defclass node ()
((%parent :ini... | null | https://raw.githubusercontent.com/robert-strandh/Clump/1ea4dbac1cb86713acff9ae58727dd187d21048a/2-3-tree/2-3-tree.lisp | lisp | (cl:in-package #:clump-2-3-tree)
(defclass tree ()
((%contents :initform nil :accessor contents)
(%leaf-class :initarg :leaf-class :reader leaf-class)
(%2-node-class :initarg :2-node-class :reader 2-node-class)
(%3-node-class :initarg :3-node-class :reader 3-node-class)))
(defclass node ()
((%parent :ini... | |
c167d746d5bd9293e0966a81605bb3fa1b3765372d2fde775db98d4d7bc9d1b3 | marigold-dev/chusai | arg.ml | MIT License
Copyright ( c ) 2022 Marigold < >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal in
the Software without restriction , including without limitation the rights to
u... | null | https://raw.githubusercontent.com/marigold-dev/chusai/09f798c585121d3b02bf3fed0f52f15c3bdc79a1/layer2/lib/chusai_cli/arg.ml | ocaml | MIT License
Copyright ( c ) 2022 Marigold < >
Permission is hereby granted , free of charge , to any person obtaining a copy
of this software and associated documentation files ( the " Software " ) , to deal in
the Software without restriction , including without limitation the rights to
u... | |
b0223c18fbe86b69b07ca348b7af7c14eb037d69b81681355bdef1252c0575ed | aimyskk/competitive-haskell | Class.hs | module Class where
: Purely Functional Data Structure
class Heap h where
empty :: Ord a => h a
isEmpty :: Ord a => h a -> Bool
singleton :: Ord a => a -> h a
fromList :: Ord a => [a] -> h a
insert :: Ord a => a -> h a -> h a
merge :: Ord a => h a -> h a -> h a
findMin :: Ord a => h a -> a
delete... | null | https://raw.githubusercontent.com/aimyskk/competitive-haskell/703f78e29060459d8d857d785e473e9696e2d67f/Class.hs | haskell | module Class where
: Purely Functional Data Structure
class Heap h where
empty :: Ord a => h a
isEmpty :: Ord a => h a -> Bool
singleton :: Ord a => a -> h a
fromList :: Ord a => [a] -> h a
insert :: Ord a => a -> h a -> h a
merge :: Ord a => h a -> h a -> h a
findMin :: Ord a => h a -> a
delete... | |
28b2c750bfdfad76f860f856a41c65ce94bcc68dca1d466c0ea1dc51960316cf | gilith/hol-light | misc.ml | (* ========================================================================= *)
(* Various convenient background stuff not specifically to do with R^n. *)
(* *)
( c ) Copyright , 1998 - 2008
... | null | https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/Multivariate/misc.ml | ocaml | =========================================================================
Various convenient background stuff not specifically to do with R^n.
=========================================================================
---------------... | ( c ) Copyright , 1998 - 2008
( c ) Copyright , 2014
needs "Library/card.ml";;
needs "Library/floor.ml";;
prioritize_real();;
let ASSERT_TAC tm =
SUBGOAL_THEN tm STRIP_ASSUME_TAC;;
let EQ_TRANS_TAC tm =
MATCH_MP_TAC EQ_TRANS TH... |
7469ca3c65b9b0751441839ee8025d871cc46f0348c3d7a53a0f7f9447517d89 | mstksg/backprop-learn | Initialize.hs | # LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances ... | null | https://raw.githubusercontent.com/mstksg/backprop-learn/59aea530a0fad45de6d18b9a723914d1d66dc222/old2/src/Backprop/Learn/Initialize.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE GADTs #
# LANGUAGE RankNTypes ... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# OPTIONS_GHC -fplugin GHC.TypeLits . KnownNat . Solver #
module Backprop.Learn.Initialize (
In... |
a02fb72ce434c2c18b5f9f50939660f4a3303a7c70cfe98568fd10a0b4bd6da8 | lrascao/rebar3_appup_plugin | rebar3_appup_rel_utils.erl | %% -------------------------------------------------------------------
%%
Copyright ( c ) 2016 . All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except in compliance with the License . You may obtain
%% a copy of the ... | null | https://raw.githubusercontent.com/lrascao/rebar3_appup_plugin/25e05b45f4a5f7cc10c59014df4a263d1086baa4/src/rebar3_appup_rel_utils.erl | erlang | -------------------------------------------------------------------
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
specific language governing permissio... | Copyright ( c ) 2016 . All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
-module(rebar3_appup_rel_utils... |
da9f156f72d670598b48b67029206b534f7fa497b038aac5a7335de37334ee95 | bobatkey/foveran | Parser.hs | # LANGUAGE TupleSections #
module Language.Foveran.Parsing.Parser
( file )
where
import Control.Applicative
import Data.Maybe
import Data.Rec
import Data.Pair
import Text.ParserCombinators hiding (Return)
import Text.Position
import qualified Data.Te... | null | https://raw.githubusercontent.com/bobatkey/foveran/e57463e3f6923becdf1249cd2fd0ccfcd566f7c5/src/Language/Foveran/Parsing/Parser.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
------------------------------------------------------------------------------
FIXME: better source position here
---------------------------------------------------... | # LANGUAGE TupleSections #
module Language.Foveran.Parsing.Parser
( file )
where
import Control.Applicative
import Data.Maybe
import Data.Rec
import Data.Pair
import Text.ParserCombinators hiding (Return)
import Text.Position
import qualified Data.Te... |
8781c4410504713b9af209f71fdedde7562984007e02a332a48e7f1bc4210021 | runtimeverification/haskell-backend | Key.hs | module Test.Kore.Internal.Key (
test_retractKey,
) where
import Kore.Internal.TermLike (
Concrete,
DomainValue (..),
TermLike,
mkDomainValue,
mkStringLiteral,
retractKey,
)
import Prelude.Kore
import Test.Kore.Builtin.Definition (
mkBool,
mkBytes,
mkInt,
mkList,
mkMap,
... | null | https://raw.githubusercontent.com/runtimeverification/haskell-backend/b06757e252ee01fdd5ab8f07de2910711997d845/kore/test/Test/Kore/Internal/Key.hs | haskell | module Test.Kore.Internal.Key (
test_retractKey,
) where
import Kore.Internal.TermLike (
Concrete,
DomainValue (..),
TermLike,
mkDomainValue,
mkStringLiteral,
retractKey,
)
import Prelude.Kore
import Test.Kore.Builtin.Definition (
mkBool,
mkBytes,
mkInt,
mkList,
mkMap,
... | |
6919d34b89dcd974fbadbcc7a9bcb97c026f2628e6f875da7de5420a74fb4dc7 | svobot/janus | TypeSpec.hs | module TypeSpec
( spec
) where
import Control.Applicative ( liftA3 )
import Control.Monad.Except ( throwError )
import Data.Function ( on )
import Janus.Evaluation
import Janus.Infer
import Janus.Judgment
import ... | null | https://raw.githubusercontent.com/svobot/janus/b9d7832a45f9001cf37be1c90e167b46c24cf8f9/test/TypeSpec.hs | haskell | 1 ((λa b x y. x)
let 0 _ @ (_,_) = pair in M : U | module TypeSpec
( spec
) where
import Control.Applicative ( liftA3 )
import Control.Monad.Except ( throwError )
import Data.Function ( on )
import Janus.Evaluation
import Janus.Infer
import Janus.Judgment
import ... |
e7f15d83e821117057beda82850cffc89525b41d6c3487edb50c8637eb25ae67 | EFanZh/EOPL-Exercises | exercise-4.x-mutable-pairs-lang.rkt | #lang eopl
;; Grammar.
(define the-lexical-spec
'([whitespace (whitespace) skip]
[comment ("%" (arbno (not #\newline))) skip]
[identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol]
[number (digit (arbno digit)) number]
[number ("-" digit (arbno digit)) number]))
(define the-grammar
'(... | null | https://raw.githubusercontent.com/EFanZh/EOPL-Exercises/11667f1e84a1a3e300c2182630b56db3e3d9246a/solutions/exercise-4.x-mutable-pairs-lang.rkt | racket | Grammar.
Data structures.
Environments.
Store.
Interpreter. | #lang eopl
(define the-lexical-spec
'([whitespace (whitespace) skip]
[comment ("%" (arbno (not #\newline))) skip]
[identifier (letter (arbno (or letter digit "_" "-" "?"))) symbol]
[number (digit (arbno digit)) number]
[number ("-" digit (arbno digit)) number]))
(define the-grammar
'([program (ex... |
8194aedf491fcaff1426aac79d01d7401aca30b1bbfc24b18ad7ddaa6d1b0a7d | onedata/op-worker | atm_tree_forest_store_test_SUITE.erl | %%%-------------------------------------------------------------------
@author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% Tests of automation tree forest st... | null | https://raw.githubusercontent.com/onedata/op-worker/f26f212f7c7ca54647c3c4e1afef851ab0660847/test_distributed/suites/automation/store/atm_tree_forest_store_test_SUITE.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
Tests of automation tree forest store.
@end
-------------------------------------------------------------------
exported for CT
tests
infinite_log_based_stores_common_... | @author
( C ) 2021 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
-module(atm_tree_forest_store_test_SUITE).
-author("Michal Stanisz").
-include("modules/automation/atm_execution.hrl").
-include("modules/datastore/datastore_runner.hrl").
-include("modules/logical... |
324d5f70eb61da55c01aae6d044c0ace6055a7b597f4ef6b0945844922249910 | ucsd-progsys/liquid-fixpoint | Utils.hs | -- | This module has various utility functions for accessing queries.
TODO : move the " clients " in Visitors into this module .
module Language.Fixpoint.Types.Utils (
-- * Domain of a kvar
kvarDomain
-- * Free variables in a refinement
, reftFreeVars
* a SortedReft
, sortedReftConcKVars
* Oper... | null | https://raw.githubusercontent.com/ucsd-progsys/liquid-fixpoint/021d7af56a39985170c78b07c842b853a6180f77/src/Language/Fixpoint/Types/Utils.hs | haskell | | This module has various utility functions for accessing queries.
* Domain of a kvar
* Free variables in a refinement
------------------------------------------------------------------------------
| Compute the domain of a kvar
------------------------------------------------------------------------------
--------... | TODO : move the " clients " in Visitors into this module .
module Language.Fixpoint.Types.Utils (
kvarDomain
, reftFreeVars
* a SortedReft
, sortedReftConcKVars
* Operators on DataDecl
, checkRegular
, orderDeclarations
) where
import qualified Data.HashMap.Strict as M
impo... |
b09ca838c8af0af2cb5eb35e8fd10092b416ff88014b70cb850e3e0fb9691c6c | aldosolorzano/structurizr-clj | shape.clj | (ns structurizr-clj.shape
(:import (com.structurizr.view Shape)))
(def box Shape/Box)
(def rounded-box Shape/RoundedBox)
(def circle Shape/Circle)
(def ellipse Shape/Ellipse)
(def hexagon Shape/Hexagon)
(def cylinder Shape/Cylinder)
(def pipe Shape/Pipe)
(def person Shape/Person)
(def robot Shape/Robot)
(def folder ... | null | https://raw.githubusercontent.com/aldosolorzano/structurizr-clj/20354fc97c660dd5ce44972f4a1d3935a4f32e4c/src/structurizr_clj/shape.clj | clojure | (ns structurizr-clj.shape
(:import (com.structurizr.view Shape)))
(def box Shape/Box)
(def rounded-box Shape/RoundedBox)
(def circle Shape/Circle)
(def ellipse Shape/Ellipse)
(def hexagon Shape/Hexagon)
(def cylinder Shape/Cylinder)
(def pipe Shape/Pipe)
(def person Shape/Person)
(def robot Shape/Robot)
(def folder ... | |
f27cd7d329d8bd75bb24969feaac64fbbeebc2511782a6ce164b24b61df5b0e6 | binsec/binsec | mnemonic.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/8ed9991d36451a3ae7487b966c4b38acca21a5b3/src/base/mnemonic.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
50d03afe5b299a4d9cb7b4dab119db5ce69982fa6ce14fd2a1ad4b8733da6157 | jrh13/hol-light | pythagoras.ml | (* ========================================================================= *)
A " proof " of Pythagoras 's theorem . Of course something similar is
(* implicit in the definition of "norm", but maybe this is still nontrivial. *)
(* ========================================================================= *)... | null | https://raw.githubusercontent.com/jrh13/hol-light/d125b0ae73e546a63ed458a7891f4e14ae0409e2/100/pythagoras.ml | ocaml | =========================================================================
implicit in the definition of "norm", but maybe this is still nontrivial.
=========================================================================
-------------------------------------------------------------------------
---------------... | A " proof " of Pythagoras 's theorem . Of course something similar is
needs "Multivariate/misc.ml";;
needs "Multivariate/vectors.ml";;
Direct vector proof ( could replace 2 by N and the proof still runs ) .
let PYTHAGORAS = prove
(`!A B C:real^2.
orthogonal (A - B) (C - B)
==> nor... |
638e1bd099df9d6a6d35fc2c02fbceb5770863bb2a89165413d8094b0a1a6758 | logseq/mldoc | opml.ml | open Prelude
open Conf
let default_state = Markdown.default_state
let empty_references = Reference.empty_parsed_t
let default_config =
{ toc = true
; parse_outline_only = false
; heading_number = true
; keep_line_break = false
; format = Conf.Markdown
; heading_to_list = true
; exporting_keep_propertie... | null | https://raw.githubusercontent.com/logseq/mldoc/0cdd2909b21ddf022727771fb797111608e973b4/lib/export/opml.ml | ocaml | only concat Leaf list, ignore Branch elem
title
head
body
body
opml | open Prelude
open Conf
let default_state = Markdown.default_state
let empty_references = Reference.empty_parsed_t
let default_config =
{ toc = true
; parse_outline_only = false
; heading_number = true
; keep_line_break = false
; format = Conf.Markdown
; heading_to_list = true
; exporting_keep_propertie... |
a2a57172fec1881ec3f6eea3a17e1848f61e1266f4123de5d720791802d5111d | facebook/flow | sourcemap.ml | *
* Copyright ( c ) 2018 - present , Facebook , Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2018-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENS... | null | https://raw.githubusercontent.com/facebook/flow/0890a09bad0adfeed27e56d9185074381bf31991/src/third-party/ocaml-sourcemaps/src/sourcemap.ml | ocaml | assumed to be sorted. switch to a Map?
Try to inform local search based on last found index, else binary search
Left and right can be deceiving. The array is sorted descending.
arbitrary length
end of stream
newline
separator between segments | *
* Copyright ( c ) 2018 - present , Facebook , Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) 2018-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENS... |
8b26603c6f272b18433b456225c1f57844032440d9195a7c4ad733c4ae8cc741 | cnuernber/tmdjs | copy_make_container.cljs | (ns tech.v3.datatype.copy-make-container
(:require [tech.v3.datatype.arrays :as dt-arrays]
[tech.v3.datatype.base :as dt-base]))
(defn make-container
[dtype len-or-data]
(let [data (if (number? len-or-data)
nil
(if-let [ag-data (dt-base/as-typed-array len-or-data)]
... | null | https://raw.githubusercontent.com/cnuernber/tmdjs/527a8be504b356560befc310003e433a5ccec391/src/tech/v3/datatype/copy_make_container.cljs | clojure | (ns tech.v3.datatype.copy-make-container
(:require [tech.v3.datatype.arrays :as dt-arrays]
[tech.v3.datatype.base :as dt-base]))
(defn make-container
[dtype len-or-data]
(let [data (if (number? len-or-data)
nil
(if-let [ag-data (dt-base/as-typed-array len-or-data)]
... | |
56992fa0dfad7cdf609d6a3a2371afe1e3adf94a0877c146fdf6abd14d94bbca | avsm/mirage-duniverse | crud_lwt.ml | * An example CRUD API for id - based operations on JSON objects . The objects are
stored in - memory and therefore will not persist across runs of the database .
The application does not perform any JSON validation at this time .
Build by running ` jbuilder ` :
[ jbuilder build _ build / def... | null | https://raw.githubusercontent.com/avsm/mirage-duniverse/983e115ff5a9fb37e3176c373e227e9379f0d777/ocaml_modules/webmachine/examples/crud_lwt.ml | ocaml | Toy database to store the items
create the database
the route table
If you'd like to see the path that the request took through the
* decision diagram, then run this example with the [DEBUG_PATH]
* environment variable set. This should suffice:
*
* [$ DEBUG_PATH= ./crud_lwt.native]
... | * An example CRUD API for id - based operations on JSON objects . The objects are
stored in - memory and therefore will not persist across runs of the database .
The application does not perform any JSON validation at this time .
Build by running ` jbuilder ` :
[ jbuilder build _ build / def... |
b97d811bbc2e6b824c0c056b8ffcd6798bbcc3285d5ca7e88bdb3b6fd86626a5 | mdedwards/slippery-chicken | dot-swank.lisp | (load "/lisp/cmn/cmn-all.lisp")
(load "/lisp/clm-4/all.lisp")
(load "/Users/medward2/lisp/sc/src/all.lsp")
(in-package :clm)
(compile-file "/lisp/clm-4/nrev.ins")
(load "/lisp/clm-4/nrev.dx32fsl")
| null | https://raw.githubusercontent.com/mdedwards/slippery-chicken/c1c11fadcdb40cd869d5b29091ba5e53c5270e04/doc/dot-swank.lisp | lisp | (load "/lisp/cmn/cmn-all.lisp")
(load "/lisp/clm-4/all.lisp")
(load "/Users/medward2/lisp/sc/src/all.lsp")
(in-package :clm)
(compile-file "/lisp/clm-4/nrev.ins")
(load "/lisp/clm-4/nrev.dx32fsl")
| |
085e4b7af94184cfce6e10e6e5f728b75d489f900b864724343dbfbb8a8957b8 | jacekschae/learn-datomic-course-files | handlers.clj | (ns cheffy.conversation.handlers
(:require [ring.util.response :as rr]
[cheffy.conversation.db :as conversation-db]
[cheffy.responses :as responses])
(:import (java.util UUID)))
(defn list-conversations
[{:keys [env claims] :as _request}]
(let [account-id (:sub claims)]
(rr/response... | null | https://raw.githubusercontent.com/jacekschae/learn-datomic-course-files/a62f02337751de887498daffe2e4eb0b28d8cf84/increments/41-create-message/src/main/cheffy/conversation/handlers.clj | clojure | FIXME: conversation-db/transact-conversation
FIXME: conversation-db/transact-message
FIXME: conversation-db/read-messages | (ns cheffy.conversation.handlers
(:require [ring.util.response :as rr]
[cheffy.conversation.db :as conversation-db]
[cheffy.responses :as responses])
(:import (java.util UUID)))
(defn list-conversations
[{:keys [env claims] :as _request}]
(let [account-id (:sub claims)]
(rr/response... |
a6f6c146d537f3c5a97bd1147d838f162f11189411214c490cd790d49de801c7 | ku-fpg/blank-canvas | Red_Line.hs | {-# LANGUAGE OverloadedStrings #-}
module Red_Line where
import Graphics.Blank -- import the blank canvas
( 600,200 )
main :: IO ()
start blank canvas on port 3000
send context $ do -- send commands to this specific context
moveTo(50,50)
... | null | https://raw.githubusercontent.com/ku-fpg/blank-canvas/39915c17561106ce06e1e3dcef85cc2e956626e6/wiki-suite/Red_Line.hs | haskell | # LANGUAGE OverloadedStrings #
import the blank canvas
send commands to this specific context
this draws the ink into the canvas | module Red_Line where
( 600,200 )
main :: IO ()
start blank canvas on port 3000
moveTo(50,50)
lineTo(200,100)
lineWidth 10
strokeStyle "red"
wiki $ snapShot context "images/Red_Line.png"
wiki $ close context
|
33905f0e69260030488223bec6eef4d70a899e3577b3238c9a364fa52675eebd | kazu-yamamoto/dns | RoundTripSpec.hs | # LANGUAGE OverloadedStrings , TransformListComp #
module RoundTripSpec where
import qualified Data.IP
import Data.IP (Addr, IP(..), IPv4, IPv6, toIPv4, toIPv6, makeAddrRange)
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BS
import qualified Data.CaseInsensitive as CI
import Test.Hsp... | null | https://raw.githubusercontent.com/kazu-yamamoto/dns/26c88f775247fdcc32fb4fe750ae22a5a1a6750e/test/RoundTripSpec.hs | haskell | --------------------------------------------------------------
| Choose from the range reserved for local use
#section-9
is consistent with the mask. | # LANGUAGE OverloadedStrings , TransformListComp #
module RoundTripSpec where
import qualified Data.IP
import Data.IP (Addr, IP(..), IPv4, IPv6, toIPv4, toIPv6, makeAddrRange)
import qualified Data.ByteString as B
import qualified Data.ByteString.Char8 as BS
import qualified Data.CaseInsensitive as CI
import Test.Hsp... |
360c61f8652e91fa6b4f7b710e7b1ad46f44a41c0ccbd9668cc687e0c6a22d94 | mzp/coq-ruby | okey.ml | (*********************************************************************************)
Cameleon
(* *)
Copyright ( C ) 2005 Institut National de Recherche en Informatiqu... | null | https://raw.githubusercontent.com/mzp/coq-ruby/99b9f87c4397f705d1210702416176b13f8769c1/ide/utils/okey.ml | ocaml | *******************************************************************************
en Automatique. All rights reserved.
... | Cameleon
Copyright ( C ) 2005 Institut National de Recherche en Informatique et
it under the terms of the GNU Library General Public License as
published by the Free Software Foundation ; either version 2 of the ... |
6175bae1bb1f1d55e7ca9c527f06ac22508ad2fa16f4ef3bb356a00aee02ff62 | gjord/gwern.net | Redirect-bot.hs |
This is a program to generate variant capitalizations of strings which
are also the names of articles on the English Wikipedia . It will
then check to see whether the variants already exist as either redirects
or articles in their own right . If they do n't , they will then
be created as redirects to the orig... | null | https://raw.githubusercontent.com/gjord/gwern.net/ea0bfea955d8e4c0c805728df7a2a48fb967ce3d/haskell/Redirect-bot.hs | haskell | We assume that a list of whitespace-delimited article names for us to consume os being fed to us. Break into words, and filter out the too long ones.</nowiki>
Clean up.
We must make a [article] equal in length to what z is; otherwise zip will truncate the list.
long(er) list of possible capitalizations.
if errors,... |
This is a program to generate variant capitalizations of strings which
are also the names of articles on the English Wikipedia . It will
then check to see whether the variants already exist as either redirects
or articles in their own right . If they do n't , they will then
be created as redirects to the orig... |
7b0e85eccfd561036ccce1256dce17b25c791e887338ffd5db806b033ed5745a | flipstone/orville | FieldDefinition.hs | module Test.FieldDefinition
( fieldDefinitionTests,
)
where
import qualified Control.Exception as E
import qualified Data.ByteString.Char8 as B8
import qualified Data.Maybe as Maybe
import qualified Data.Pool as Pool
import qualified Data.String as String
import qualified Data.Text as T
import qualified Data.UUID ... | null | https://raw.githubusercontent.com/flipstone/orville/62066911746eb9e56b09cbe991d926d9c8a04316/orville-postgresql-libpq/test/Test/FieldDefinition.hs | haskell | This generator generates alphanumeric values currently because of syntax
issues with random characters being generated. There is a story to built
help fix this. | module Test.FieldDefinition
( fieldDefinitionTests,
)
where
import qualified Control.Exception as E
import qualified Data.ByteString.Char8 as B8
import qualified Data.Maybe as Maybe
import qualified Data.Pool as Pool
import qualified Data.String as String
import qualified Data.Text as T
import qualified Data.UUID ... |
3d146b2e372fad04439c295aab56ab4476f702df0ade280b3bbaf5f9c4a65573 | qriollo/qriollo | Eval.hs |
-- Este archivo es parte de Qriollo.
Qriollo 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 version.
--
Qriollo is distributed in the... | null | https://raw.githubusercontent.com/qriollo/qriollo/b45ba0f4e9d444f786217ff931d7ecf74bfddbe4/src/Eval.hs | haskell | Este archivo es parte de Qriollo.
(at your option) any later version.
but 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.
not comparable
Primitives
For effect and value
For effect
For effect... |
Qriollo 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
Qriollo is distributed in the hope that it will be useful ,
You should have received a copy of the GNU Gen... |
31e0cea3ec87f67c463c4d5f3972f51a738937a38d3f8b73d8bdc60515af161c | transient-haskell/transient-stack | distributedApps.hs | # LANGUAGE CPP , NoMonomorphismRestriction , DeriveDataTypeable #
module Main where
import Prelude hiding (div,id)
import Transient.Internals
import GHCJS.HPlay.Cell
import GHCJS.HPlay.View
#ifdef ghcjs_HOST_OS
hiding (map, input,option)
#else
hiding (map, option,input)
#endif
import Transient.Move
im... | null | https://raw.githubusercontent.com/transient-haskell/transient-stack/dde6f6613a946d57bb70879a5c0e7e5a73a91dbe/transient-universe/examples/distributedApps.hs | haskell | thelink :: Cloud ()
menuApp :: Cloud ()
allw :: Cloud ()
A Web node launch a map-reduce computation in all the server nodes, getting data from a
textbox and render the results returned
mapReduce :: Cloud ()
a chat widget that run in the browser and in a cloud of servers
chat :: Cloud ()
create the chat box
se... | # LANGUAGE CPP , NoMonomorphismRestriction , DeriveDataTypeable #
module Main where
import Prelude hiding (div,id)
import Transient.Internals
import GHCJS.HPlay.Cell
import GHCJS.HPlay.View
#ifdef ghcjs_HOST_OS
hiding (map, input,option)
#else
hiding (map, option,input)
#endif
import Transient.Move
im... |
31dc956c615e1ab3483c265521ef1ec08b9427ae51a39bf2b1d9b07bf8e1be4e | hasura/graphql-data-specification | Name.hs | module Schema.Model.Type.SelectionSetFields.Name
( name,
)
where
import DDL qualified
import Language.GraphQL.Draft.Syntax qualified as GraphQL
import Schema.NamingConvention
name :: DDL.ModelName -> GraphQL.Name
name modelName = mkTypeName $ modelName.wrapped <> "_fields"
| null | https://raw.githubusercontent.com/hasura/graphql-data-specification/b82b899a7d015c810a571d31322619aff2154b81/tooling/lib/Schema/Model/Type/SelectionSetFields/Name.hs | haskell | module Schema.Model.Type.SelectionSetFields.Name
( name,
)
where
import DDL qualified
import Language.GraphQL.Draft.Syntax qualified as GraphQL
import Schema.NamingConvention
name :: DDL.ModelName -> GraphQL.Name
name modelName = mkTypeName $ modelName.wrapped <> "_fields"
| |
3389b7405a7e77a4342d7dd650b13d021302467213687ef57f1818c3d2749141 | richhickey/clojure-contrib | arithmetic.clj | Generic interfaces for arithmetic operations
by
last updated May 5 , 2009
Copyright ( c ) , 2009 . 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
;; di... | null | https://raw.githubusercontent.com/richhickey/clojure-contrib/40b960bba41ba02811ef0e2c632d721eb199649f/src/main/clojure/clojure/contrib/generic/arithmetic.clj | clojure | 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 this notice, or any other, from this software.
Addition
The minimal implementatio... | Generic interfaces for arithmetic operations
by
last updated May 5 , 2009
Copyright ( c ) , 2009 . All rights reserved . The use
and distribution terms for this software are covered by the Eclipse
(ns
#^{:author "Konrad Hinsen"
:doc "Generic arithmetic interface
This library defines... |
865f6fedf4ad1bb1d9f5e0a494e187e98e4294e7db19c48a80190ae72ce7d00f | composewell/unicode-data | Main.hs | module Main where
import Test.Hspec
import qualified Unicode.Char.General.ScriptsSpec as Scripts
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "Unicode.Char.General.Scripts" Scripts.spec
| null | https://raw.githubusercontent.com/composewell/unicode-data/3ba60c1a254e37b019c36feda9d1e82a889aec19/unicode-data-scripts/test/Main.hs | haskell | module Main where
import Test.Hspec
import qualified Unicode.Char.General.ScriptsSpec as Scripts
main :: IO ()
main = hspec spec
spec :: Spec
spec = describe "Unicode.Char.General.Scripts" Scripts.spec
| |
9fab5ac9621c07cc57cd604b922c2269f4de151c10fb4b92b1c6ab02a613aaa0 | ndmitchell/catch | Decode.hs |
module Transform.Decode(decode) where
import Hite.Type as R
import Transform.Type as L
import General.General
decode :: IHite -> Hite
decode ihite@(IHite datas funcs) = Hite datas (map (deFunc ihite) funcs)
deFunc :: IHite -> IFunc -> Func
deFunc ihite (L.Func name args body _) = R.Func name (map deVar args) (deEx... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/src/Transform/Decode.hs | haskell |
module Transform.Decode(decode) where
import Hite.Type as R
import Transform.Type as L
import General.General
decode :: IHite -> Hite
decode ihite@(IHite datas funcs) = Hite datas (map (deFunc ihite) funcs)
deFunc :: IHite -> IFunc -> Func
deFunc ihite (L.Func name args body _) = R.Func name (map deVar args) (deEx... | |
d43d54744ef8e8908e19e0e4d0c566f4a4e4b83671ccf4dffed64cf3c4ff3b30 | bennn/dissertation | main.rkt | #lang typed/racket
;; -----------------------------------------------------------------------------
(require
require-typed-check
typed/racket/class
"../base/cell-types.rkt"
racket/match
)
(require/typed racket/set
(set-intersect (All (A) (-> (Listof A) (Listof A) (Listof A))))
)
(: dict-set (-> Poss->Cells ... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/dungeon/typed/main.rkt | racket | -----------------------------------------------------------------------------
=============================================================================
dungeon generation
maps positions to cell constructors
(so that we can construct the room later when we commit to it)
where monsters or treasure co... | #lang typed/racket
(require
require-typed-check
typed/racket/class
"../base/cell-types.rkt"
racket/match
)
(require/typed racket/set
(set-intersect (All (A) (-> (Listof A) (Listof A) (Listof A))))
)
(: dict-set (-> Poss->Cells Pos Cell% Poss->Cells))
(define (dict-set pc p c)
(define ok : (Boxof Boolean) ... |
835d7d716e09e365d366e99ba57dc6ba9c53ea72a575de02d14d883e3936ec42 | ocaml-multicore/ocaml-tsan | moreLabels.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/ocaml-multicore/ocaml-tsan/ae9c1502103845550162a49fcd3f76276cdfa866/stdlib/moreLabels.mli | ocaml | ************************************************************************
OCaml
... | , Kyoto University RIMS
Copyright 2001 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
* Extra labeled libraries .
This meta - module provides labelized versions of the { ! } , { ! Map } an... |
ff101e12a4c268ca478238da0852681b3149a58f49505b300934626a7e191ac9 | Ekdohibs/camlboot | std_miniml.ml | let assert b = if b = 0 then raise (Assert_failure ("", 0, 0))
let lazy x = x
module Lazy = struct
let force x = x
end
| null | https://raw.githubusercontent.com/Ekdohibs/camlboot/506280c6e0813e0e794988151a8e46be55373ebc/miniml/interp/std_miniml.ml | ocaml | let assert b = if b = 0 then raise (Assert_failure ("", 0, 0))
let lazy x = x
module Lazy = struct
let force x = x
end
| |
2188b42fd425ebbff4006cec45ae598f8a94ba7c637aaf1c7b5e6e10a93df81e | startalkIM/ejabberd | ejabberd_service.erl | %%%----------------------------------------------------------------------
%%% File : ejabberd_service.erl
Author : < >
Purpose : External component management ( XEP-0114 )
Created : 6 Dec 2002 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
%%%
%%% This program is free software;... | null | https://raw.githubusercontent.com/startalkIM/ejabberd/718d86cd2f5681099fad14dab5f2541ddc612c8b/src/ejabberd_service.erl | erlang | ----------------------------------------------------------------------
File : ejabberd_service.erl
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without e... | Author : < >
Purpose : External component management ( XEP-0114 )
Created : 6 Dec 2002 by < >
ejabberd , Copyright ( C ) 2002 - 2016 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
You should have re... |
060f7301c0af68195f2d16e9108528346664ad289423ee8766db98ffed0d70a1 | tonyrog/bt | hci.erl | @author < tony@up13 >
( C ) 2015 ,
%%% @doc
HCI commands
%%% @end
Created : 18 Apr 2015 by < tony@up13 >
-module(hci).
-export([open/0, open/1]).
-export([close/1]).
-export([get_devices/0]).
-export([i/0]).
-export([scan/0, scan/1, scan/2]).
%%
-export([create_connection/6]).
-export([disconnect/4]... | null | https://raw.githubusercontent.com/tonyrog/bt/9f549b97f29273f60d6fa4660df74afc9d116abb/src/hci.erl | erlang | @doc
@end
-compile(export_all).
-define(debug, true).
limited Inquiry access code
dump information about bluetooth devices
optional lookup names
minor computer type
minor phone type
fixme: decode status
Bdaddr = list_to_binary(tuple_to_list(Bdaddr0)),
?dbg("call: saved_filter = ~p\n", [OldFilter]),
flush... | @author < tony@up13 >
( C ) 2015 ,
HCI commands
Created : 18 Apr 2015 by < tony@up13 >
-module(hci).
-export([open/0, open/1]).
-export([close/1]).
-export([get_devices/0]).
-export([i/0]).
-export([scan/0, scan/1, scan/2]).
-export([create_connection/6]).
-export([disconnect/4]).
-export([read_remo... |
581abcf1a62c351ace67ed614eadc800f6e24213460d0014064453cbc0187e11 | inaka/erlang_guidelines | trailing_whitespace.erl | -module(trailing_whitespace).
-export([bad/0, good/0]).
bad() -> "this line has trailing whitespace".
good() -> "this line has not".
| null | https://raw.githubusercontent.com/inaka/erlang_guidelines/7a802a23a08d120db7e94115b4600b26194dd242/src/trailing_whitespace.erl | erlang | -module(trailing_whitespace).
-export([bad/0, good/0]).
bad() -> "this line has trailing whitespace".
good() -> "this line has not".
| |
19cbce3c7ef44c781aaf6f3b61e3dc998778809ce549c73f9a56290d5825b77f | jasonstolaruk/CurryMUD | Chars.hs | module Mud.TopLvlDefs.Chars where
-- ==================================================
-- Cmd prefixes:
adminCmdChar, debugCmdChar :: Char
adminCmdChar = ':'
debugCmdChar = '!'
-- ==================================================
Denotative characters used in cmds :
adverbCloseChar, adverbOpenChar, allChar, amo... | null | https://raw.githubusercontent.com/jasonstolaruk/CurryMUD/f9775fb3ede08610f33f27bb1fb5fc0565e98266/lib/Mud/TopLvlDefs/Chars.hs | haskell | ==================================================
Cmd prefixes:
==================================================
Used in ":set".
==================================================
ANSI escape sequence characters:
============================================================
===================================... | module Mud.TopLvlDefs.Chars where
adminCmdChar, debugCmdChar :: Char
adminCmdChar = ':'
debugCmdChar = '!'
Denotative characters used in cmds :
adverbCloseChar, adverbOpenChar, allChar, amountChar, chanTargetChar, emoteChar, emoteNameChar, emoteTargetChar, expCmdChar, indexChar, multiLineEndChar, quoteChar, sayTo... |
ae885a4d35a6deb4794672ca463857cdc81c3098bdaa4a8c4e644c71db7191b5 | tobias/dynapath | util_test.clj | (ns dynapath.util-test
(:use clojure.test
dynapath.util
[dynapath.dynamic-classpath :only [DynamicClasspath]])
(:import clojure.lang.DynamicClassLoader
(java.net URL URLClassLoader)))
(def ^:dynamic *dynamic-cl*)
(def ^:dynamic *url-cl*)
(def ^:dynamic *basic-cl*)
(def ^:dynamic *type*)
... | null | https://raw.githubusercontent.com/tobias/dynapath/e82106dfcdc77f0091915f3bde76a99d4d8a6e1a/test/dynapath/util_test.clj | clojure | (ns dynapath.util-test
(:use clojure.test
dynapath.util
[dynapath.dynamic-classpath :only [DynamicClasspath]])
(:import clojure.lang.DynamicClassLoader
(java.net URL URLClassLoader)))
(def ^:dynamic *dynamic-cl*)
(def ^:dynamic *url-cl*)
(def ^:dynamic *basic-cl*)
(def ^:dynamic *type*)
... | |
1b33ca2b4b9d08c9a83e2676c1d14516900b287099784106a73540cbe2179350 | monadbobo/ocaml-core | daemon.mli | (* Describes how you would like to redirect stdio *)
type redirect_fds = [
| `Dev_null (* default *)
| `Do_not_redirect
| `File_append of string
| `File_truncate of string
]
* [ daemonize ? ( redirect_stdout=`Dev_null ) ? ( redirect_stderr=`Dev_null )
? ( cd = " / " ) ? umask=[0 ] ( ) ] makes the current
... | null | https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/daemon.mli | ocaml | Describes how you would like to redirect stdio
default |
type redirect_fds = [
| `Do_not_redirect
| `File_append of string
| `File_truncate of string
]
* [ daemonize ? ( redirect_stdout=`Dev_null ) ? ( redirect_stderr=`Dev_null )
? ( cd = " / " ) ? umask=[0 ] ( ) ] makes the current
executing process a daemon , and dups " /dev / null " , redirect_stdout , redir... |
a21e7d9c67e79067d2baf53c638a2ead3b87a94848c4f1bc8480c08781fdbc26 | jmingtan/clonings | bindings3.clj | ;; bindings3.clj
;; Make me run! Scroll down for hints :)
(ns bindings.bindings3)
(def x 5)
(defn -main []
(binding [x 7]
(println "x has the value" x)))
;; Here, we're trying to bind x to a different value. Bindings created using (def)
;; are immutable by default, but there is a ... | null | https://raw.githubusercontent.com/jmingtan/clonings/ca64b031ab26a1924bed91f5c9c98b6dd69fc129/exercises/bindings/bindings3.clj | clojure | bindings3.clj
Make me run! Scroll down for hints :)
Here, we're trying to bind x to a different value. Bindings created using (def)
are immutable by default, but there is a way to mark them as dynamic.
|
(ns bindings.bindings3)
(def x 5)
(defn -main []
(binding [x 7]
(println "x has the value" x)))
|
3ba4b05f733f5b9ea29bb5e6156ea4f66ee9f651894fcd74801cee426e64fdea | bmeurer/ocamljit2 | ocamlbuild.ml | (***********************************************************************)
(* ocamlbuild *)
(* *)
, , projet Gallium , INRIA Rocquencourt
(* ... | null | https://raw.githubusercontent.com/bmeurer/ocamljit2/ef06db5c688c1160acc1de1f63c29473bcd0055c/ocamlbuild/ocamlbuild.ml | ocaml | *********************************************************************
ocamlbuild
... | , , projet Gallium , INRIA Rocquencourt
Copyright 2007 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 .
Original author :
Ocamlbuild_unix_plugin.setup ()... |
a75cad3ffccc4e4d9fc09960c577ceaee3d50afe83695d6a53f72b2adf58452c | Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library | SourceOrder.hs | {-# LANGUAGE MultiWayIf #-}
CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
{-# LANGUAGE OverloadedStrings #-}
| Contains the types generated from the schema SourceOrder
module StripeAPI.Types.SourceOrder where
import qualified Contr... | null | https://raw.githubusercontent.com/Haskell-OpenAPI-Code-Generator/Stripe-Haskell-Library/ba4401f083ff054f8da68c741f762407919de42f/src/StripeAPI/Types/SourceOrder.hs | haskell | # LANGUAGE MultiWayIf #
# LANGUAGE OverloadedStrings #
# SOURCE #
# SOURCE #
| Defines the object schema located at @components.schemas.source_order@ in the specification.
| email: The email address of the customer placing the order.
Constraints:
| items: List of items constituting the order.
| shipping:
| Crea... | CHANGE WITH CAUTION : This is a generated code file generated by -OpenAPI-Code-Generator/Haskell-OpenAPI-Client-Code-Generator .
| Contains the types generated from the schema SourceOrder
module StripeAPI.Types.SourceOrder where
import qualified Control.Monad.Fail
import qualified Data.Aeson
import qualified Data... |
23d1747609ca96acc4c7ceaec6b01773b543b57bff25d06c6bf0479a98ea0600 | jxv/dino-rush | Lava.hs | module DinoRush.Engine.Lava where
import qualified Animate
import Data.Text (Text)
data LavaKey
= LavaKey'Idle
deriving (Show, Eq, Ord, Bounded, Enum)
instance Animate.KeyName LavaKey where
keyName = lavaKey'keyName
lavaKey'keyName :: LavaKey -> Text
lavaKey'keyName = \case
LavaKey'Idle -> "Idle"
| null | https://raw.githubusercontent.com/jxv/dino-rush/f888bc05fe734ced2c49bec81f9c804b47c81069/library/DinoRush/Engine/Lava.hs | haskell | module DinoRush.Engine.Lava where
import qualified Animate
import Data.Text (Text)
data LavaKey
= LavaKey'Idle
deriving (Show, Eq, Ord, Bounded, Enum)
instance Animate.KeyName LavaKey where
keyName = lavaKey'keyName
lavaKey'keyName :: LavaKey -> Text
lavaKey'keyName = \case
LavaKey'Idle -> "Idle"
| |
fcdcd12063200959773b1bce209de534e1b79486cb2df04aad97c8e5ffe874a8 | maiste/equinoxe | equinoxe_mock.ml | let () =
Alcotest.run "mock"
[
("errors", Mock_errors.tests);
("auth", Mock_auth.tests);
("orga", Mock_orga.tests);
("device", Mock_device.tests);
("project", Mock_project.tests);
("user", Mock_user.tests);
]
| null | https://raw.githubusercontent.com/maiste/equinoxe/ab5735056d97f4a9ca318e23255ee84625e5626b/tests/equinoxe_mock.ml | ocaml | let () =
Alcotest.run "mock"
[
("errors", Mock_errors.tests);
("auth", Mock_auth.tests);
("orga", Mock_orga.tests);
("device", Mock_device.tests);
("project", Mock_project.tests);
("user", Mock_user.tests);
]
| |
7897a78b117b246c3a98e0067d98edbc83ba6fbe4609e7f3fab677e9b05e378e | emqx/mria | mria_rlog_sup.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2021 , 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy o... | null | https://raw.githubusercontent.com/emqx/mria/5cf3f660c312a88d6b7953181061ed08f1484a92/src/mria_rlog_sup.erl | erlang | --------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ... | Copyright ( c ) 2021 , 2023 EMQ Technologies Co. , Ltd. All Rights Reserved .
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(mria_rlog_sup).
-behaviour(supervisor).
-export([init/1, start_link/0]).
-define(SUPE... |
e76dc76c1186c2b196cd51a821201d6c2e95a4ddabce4687cc6e924187d3301f | travitch/foreign-inference | RefCount.hs | # LANGUAGE TemplateHaskell , RankNTypes , ScopedTypeVariables #
# LANGUAGE ViewPatterns , DeriveGeneric #
-- | This analysis identifies the addRef and decRef functions for a library,
-- along with the set of types that is reference counted. This analysis is
-- unsound and incomplete, but still useful.
--
It first id... | null | https://raw.githubusercontent.com/travitch/foreign-inference/9cc0f7c730f7cd19afbd00d890abbc7109391cc6/src/Foreign/Inference/Analysis/RefCount.hs | haskell | | This analysis identifies the addRef and decRef functions for a library,
along with the set of types that is reference counted. This analysis is
unsound and incomplete, but still useful.
access path p (whose *base* is reachable from an argument to the
function), and
The incRef function is simply th... | # LANGUAGE TemplateHaskell , RankNTypes , ScopedTypeVariables #
# LANGUAGE ViewPatterns , DeriveGeneric #
It first identifies the decRef function with a heuristic :
1 ) Find a function that conditionally calls a finalizer
2 ) The finalizer call is guarded by a conditional check of an
3 ) That same access pat... |
0639e0f2c431c9c049a540a4d3b08afb644f7fcbcfb2040bca24a6370bcd112c | hidaris/thinking-dumps | 13_define_streams.rkt | #lang racket
; 1 1 1 1 1 ....
(define ones
(lambda ()
(cons 1 ones)))
( define ones - really - bad ( cons 1 ones - really - bad ) )
( define ones - bad ( lambda ( ) ( cons 1 ( ones - bad ) ) ) )
; 1 2 3 4 5
(define (f x)
(lambda ()
(cons x
(f (+ x 1)))))
(define nats
(lambda ()
(f 1... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/cse341/racket/13_define_streams.rkt | racket | 1 1 1 1 1 ....
1 2 3 4 5
2 4 8 16 ... | #lang racket
(define ones
(lambda ()
(cons 1 ones)))
( define ones - really - bad ( cons 1 ones - really - bad ) )
( define ones - bad ( lambda ( ) ( cons 1 ( ones - bad ) ) ) )
(define (f x)
(lambda ()
(cons x
(f (+ x 1)))))
(define nats
(lambda ()
(f 1)))
(define nats2
(letrec ... |
94e160038677fd4528baf54f87d372233550fc191ec1c3958c46b30fe43a8eed | codereport/SICP-2020 | lesley_lai_solutions.rkt | #lang racket
(require rackunit
threading)
1.11
(define (f-rec n)
(if (< n 3)
n
(+ (f-rec (- n 1)) (* 2 (f-rec (- n 2))) (* 3 (f-rec (- n 3))))))
(define (f-itr n)
(define (helper a b c n)
(if (< n 1)
a
(helper b c (+ c (* 2 b) (* 3 a)) (- n 1))))
(helper 0 1 2 n))
;;... | null | https://raw.githubusercontent.com/codereport/SICP-2020/2d1e60048db89678830d93fcc558a846b7f57b76/Chapter%201.2%20Solutions/lesley_lai_solutions.rkt | racket | I hold a grudge against this piece, to be honest
But this is the best I can get
Tests | #lang racket
(require rackunit
threading)
1.11
(define (f-rec n)
(if (< n 3)
n
(+ (f-rec (- n 1)) (* 2 (f-rec (- n 2))) (* 3 (f-rec (- n 3))))))
(define (f-itr n)
(define (helper a b c n)
(if (< n 1)
a
(helper b c (+ c (* 2 b) (* 3 a)) (- n 1))))
(helper 0 1 2 n))
(d... |
663a3a70026c75315583cc86d67e2778c89c2cb59bf0ebee2d90dbce9ca34116 | mzp/coq-for-ipad | printf.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
and , projet Cris... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/stdlib/printf.ml | ocaml | *********************************************************************
Objective Caml
... | and , 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
$ I d : printf.ml 9463 2009 - 12 - 09 08:28:59Z... |
40c8701fbdc199b3da31ad01dc54a99af0014082a379c45035f4b1ee3a1cf42f | helpshift/hydrox | hydrox.clj | (ns leiningen.hydrox
(:require [hydrox.core :as hydrox]
[hydrox.meta :as meta]
[hydrox.common.util :as util]
[leiningen.hydrox.init :as init]
[leiningen.hydrox.setup :as setup]))
(defn hydrox
"
metadata and documentation management:
usage:
lein hydrox (wa... | null | https://raw.githubusercontent.com/helpshift/hydrox/2beb3c56fad43bbf16f07db7ee72c5862978350c/lein/src/leiningen/hydrox.clj | clojure | (ns leiningen.hydrox
(:require [hydrox.core :as hydrox]
[hydrox.meta :as meta]
[hydrox.common.util :as util]
[leiningen.hydrox.init :as init]
[leiningen.hydrox.setup :as setup]))
(defn hydrox
"
metadata and documentation management:
usage:
lein hydrox (wa... | |
e038036f8597bd6b763fbd061d52f50ba804c69576236a95a1ef3d2a4b90df85 | conscell/hugs-android | Setup.hs | # OPTIONS_GHC -cpp #
-----------------------------------------------------------------------------
-- |
-- Module : Distribution.Setup
Copyright : 2003 - 2004
--
Maintainer : < >
-- Stability : alpha
-- Portability : portable
--
-- Explanation: Data types and parser for the standard command... | null | https://raw.githubusercontent.com/conscell/hugs-android/31e5861bc1a1dd9931e6b2471a9f45c14e3c6c7e/hugs/lib/hugs/packages/Cabal/Distribution/Setup.hs | haskell | ---------------------------------------------------------------------------
|
Module : Distribution.Setup
Stability : alpha
Portability : portable
Explanation: Data types and parser for the standard command-line
setup. Will also return commands it doesn't know about.
optionHelpString,
Misc:
type C... | # OPTIONS_GHC -cpp #
Copyright : 2003 - 2004
Maintainer : < >
All rights reserved .
Redistribution and use in source and binary forms , with or without
modification , are permitted provided that the following conditions are
met :
* Redistributions of source code must retain the above ... |
f49e88048e6f620eb6ec2b6d21ccad9aa0c0ecbe7e190131433518de1f4ca1de | shayan-najd/NativeMetaprogramming | T11724.hs | {-# LANGUAGE TypeInType #-}
module T11724 where
import GHC.Exts
data Foo (r :: RuntimeRep) (a :: TYPE r) = Foo a
| null | https://raw.githubusercontent.com/shayan-najd/NativeMetaprogramming/24e5f85990642d3f0b0044be4327b8f52fce2ba3/testsuite/tests/typecheck/should_fail/T11724.hs | haskell | # LANGUAGE TypeInType # |
module T11724 where
import GHC.Exts
data Foo (r :: RuntimeRep) (a :: TYPE r) = Foo a
|
a36646a3bd98139415cab9f67db0f34002e1a738f4f22747b72a61c6d3b3d440 | c4-project/c4f | payload_types.mli | * Module type of payload modules .
Each action takes in a payload record that can be :
- converted to and from S - expressions ;
- generated , in the context of a fuzzer state , subject , and RNG .
Each action takes in a payload record that can be:
- converted to and from S-expressions;
... | null | https://raw.githubusercontent.com/c4-project/c4f/e012641ec499875129513fa0d49fd0879d0d121c/lib/fuzz/src/payload_types.mli | ocaml | * The type of the payload.
* [gen] is a generator for this payload type. | * Module type of payload modules .
Each action takes in a payload record that can be :
- converted to and from S - expressions ;
- generated , in the context of a fuzzer state , subject , and RNG .
Each action takes in a payload record that can be:
- converted to and from S-expressions;
... |
07c2d9f895617d47517a5c2c305cc9732a02053507e41b0e2fdc6cedf2e30845 | fortytools/holumbus | AccuMap.hs | -- ----------------------------------------------------------------------------
|
Module : Holumbus . Data . AccuMap
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
A map of key - valu... | null | https://raw.githubusercontent.com/fortytools/holumbus/4b2f7b832feab2715a4d48be0b07dca018eaa8e8/distribution/source/Holumbus/Data/AccuMap.hs | haskell | ----------------------------------------------------------------------------
----------------------------------------------------------------------------
an empty list is returned.
significant for the order of the values-elements.
| Creates an AccuMap from a list.
| Creates an AccuMap from a tuple list.
| Tr... | |
Module : Holumbus . Data . AccuMap
Copyright : Copyright ( C ) 2008
License : MIT
Maintainer : ( )
Stability : experimental
Portability : portable
Version : 0.1
A map of key - value - pairs . The values are hold in a list , so adding the same
key - value -... |
bf90082eb16c29c0e3ad0978273022787686017e5e52805c49d6605686b2edae | borkdude/aoc2017 | day15.clj | (ns day15
(:require
[clojure.edn :as edn]
[clojure.string :as str]
[criterium.core :refer [quick-bench]]))
(def seed-a 591)
(def factor-a 16807)
(def seed-b 393)
(def factor-b 48271)
(def divider 2147483647)
(defn num-sequence
[seed ^long factor]
(rest
(iterate (fn [^long v]
(rem ^lo... | null | https://raw.githubusercontent.com/borkdude/aoc2017/0f5bce5e496d65d0e53a8983e71ea3462aa0569c/src/day15.clj | clojure | Scratch | (ns day15
(:require
[clojure.edn :as edn]
[clojure.string :as str]
[criterium.core :refer [quick-bench]]))
(def seed-a 591)
(def factor-a 16807)
(def seed-b 393)
(def factor-b 48271)
(def divider 2147483647)
(defn num-sequence
[seed ^long factor]
(rest
(iterate (fn [^long v]
(rem ^lo... |
4a226443e9695f1a4719a980e275904aaf88081f95725d1c28649a39bd55a35c | wdebeaum/step | webdav.lisp | ;;;;
;;;; W::webdav
;;;;
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::webdav
(SENSES
((LF-PARENT ONT::protocol)
(EXAMPLE "publish on a webdav enabled server")
(meta-data :origin task-learning :entry-date 20050824 :change-date nil :comments nil)
)
)
)
))
| null | https://raw.githubusercontent.com/wdebeaum/step/f38c07d9cd3a58d0e0183159d4445de9a0eafe26/src/LexiconManager/Data/new/webdav.lisp | lisp |
W::webdav
|
(define-words :pos W::n :templ COUNT-PRED-TEMPL
:words (
(W::webdav
(SENSES
((LF-PARENT ONT::protocol)
(EXAMPLE "publish on a webdav enabled server")
(meta-data :origin task-learning :entry-date 20050824 :change-date nil :comments nil)
)
)
)
))
|
7a28edbf104ea0f5228358c45a6c35b4fded67cab6d33285d7e06d88b40bfc22 | danr/hipspec | Streams.hs | Based on paper Concrete Stream Calculus , but so far
only the first few pages .
module Streams where
import Hip.Prelude
import Prelude (Show,show,take,(.),succ)
data Stream a = a :< Stream a
instance Show a => Show (Stream a) where
show = show . take 10 . toList
where
toList (x :< xs) = x : toList... | null | https://raw.githubusercontent.com/danr/hipspec/a114db84abd5fee8ce0b026abc5380da11147aa9/examples/old-examples/hip/Streams.hs | haskell | Based on paper Concrete Stream Calculus , but so far
only the first few pages .
module Streams where
import Hip.Prelude
import Prelude (Show,show,take,(.),succ)
data Stream a = a :< Stream a
instance Show a => Show (Stream a) where
show = show . take 10 . toList
where
toList (x :< xs) = x : toList... | |
fd433462d1e14103334ef03a31913846b651747bb5a5048ed8acb22e70e4eeab | binsec/binsec | loader_raw.ml | (**************************************************************************)
This file is part of BINSEC .
(* *)
Copyright ( C ) 2016 - 2022
CEA ( Co... | null | https://raw.githubusercontent.com/binsec/binsec/03024a20ba0b30b17122fcb2c9aa64eb247a68cb/src/loader/loader_raw.ml | ocaml | ************************************************************************
alternatives)
you can redistribute it an... | This file is part of BINSEC .
Copyright ( C ) 2016 - 2022
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , ve... |
877f8e81aa11871de2e68824c3161e9a202fae5212cb0f3e097cffde24b8e5d2 | erikd/vector-algorithms | Properties.hs | # LANGUAGE RankNTypes , FlexibleContexts , GADTs #
module Properties where
import Prelude
import Optimal
import Control.Monad
import Control.Monad.ST
import Data.List
import Data.Ord
import Data.Vector (Vector)
import qualified Data.Vector as V
import Data.Vector.Mutable (MVector)
import qualified Data.Vector.Mu... | null | https://raw.githubusercontent.com/erikd/vector-algorithms/a8b985c16ae9d6560376f57eb7a9a175b4e3ea78/tests/properties/Properties.hs | haskell | prop_stable algo arr = property $ modify algo arr == arr | # LANGUAGE RankNTypes , FlexibleContexts , GADTs #
module Properties where
import Prelude
import Optimal
import Control.Monad
import Control.Monad.ST
import Data.List
import Data.Ord
import Data.Vector (Vector)
import qualified Data.Vector as V
import Data.Vector.Mutable (MVector)
import qualified Data.Vector.Mu... |
2e3e0c799c22e6bb56e72e4a36d0ee0f8275fa6f048ad9b964aae1c5f75ad2e0 | yuanqing/code-problems | test.ml | open Anagram_detection
open OUnit2
let () = run_test_tt_main ("anagram_detection parent child" >::: [
"empty `parent`" >:: (fun _ ->
assert_equal 0 (anagram_detection "" "dAn");
);
"empty `child`" >:: (fun _ ->
assert_raises (Failure "child string must be non-empty")
(fun () -> anagram_detectio... | null | https://raw.githubusercontent.com/yuanqing/code-problems/30eb34ad616146306cddc50594a47deff111f341/src/anagram_detection/test.ml | ocaml | open Anagram_detection
open OUnit2
let () = run_test_tt_main ("anagram_detection parent child" >::: [
"empty `parent`" >:: (fun _ ->
assert_equal 0 (anagram_detection "" "dAn");
);
"empty `child`" >:: (fun _ ->
assert_raises (Failure "child string must be non-empty")
(fun () -> anagram_detectio... | |
eab0bf0312b3b4ea7a2621350ee8ae124042d1b53235fdf86d430c16269bb1ca | Clozure/ccl-tests | the.lsp | ;-*- Mode: Lisp -*-
Author :
Created : Tue May 6 06:48:48 2003
;;;; Contains: Tests of THE
(in-package :cl-test)
(deftest the.1
(the (values) (values)))
(deftest the.2
(let ((a 'a))
(the (values) a))
a)
(deftest the.3
(check-predicate #'(lambda (e)
(let ((x (multiple-value-... | null | https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/the.lsp | lisp | -*- Mode: Lisp -*-
Contains: Tests of THE
Test that explicit calls to macroexpand in subforms
are done in the correct environment | Author :
Created : Tue May 6 06:48:48 2003
(in-package :cl-test)
(deftest the.1
(the (values) (values)))
(deftest the.2
(let ((a 'a))
(the (values) a))
a)
(deftest the.3
(check-predicate #'(lambda (e)
(let ((x (multiple-value-list (eval `(let ((e (quote ,e))) (the (values) e)))... |
996d13b86245ceb67b6f2d4684ea232cddc967e7754692f32c8786832a711719 | ldmberman/HoneyBadgerBFT | CommonCoin.hs | # LANGUAGE ForeignFunctionInterface #
module CommonCoin (
generateSecretShares
) where
import Data.ByteString (ByteString, packCString)
import Foreign.C.String (CString (..))
import Foreign.C.Types (CUIntPtr (..))
foreign import ccall safe "generate_secret_shares"
generat... | null | https://raw.githubusercontent.com/ldmberman/HoneyBadgerBFT/73e6ee870cfe513a4e826abbc249848634869967/src/CommonCoin.hs | haskell | # LANGUAGE ForeignFunctionInterface #
module CommonCoin (
generateSecretShares
) where
import Data.ByteString (ByteString, packCString)
import Foreign.C.String (CString (..))
import Foreign.C.Types (CUIntPtr (..))
foreign import ccall safe "generate_secret_shares"
generat... | |
30101ec0811b7c738a7889a22741fb5fb1111b78e33a7846986f107a9404052b | lisp/de.setf.utility | types.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.utility.implementation ; -*-
(in-package :de.setf.utility.implementation)
(:documentation
"This file tests type definitions for the `de.setf.utility.codecs` library."
(:copyright
"Copyright 2010 [james anderson](mailto:) All R... | null | https://raw.githubusercontent.com/lisp/de.setf.utility/782cd79d99ebf40deeed60c492be9873bbe42a15/codecs/test/types.lisp | lisp | Syntax : ansi - common - lisp ; Base : 10 ; Package : de.setf.utility.implementation ; -*-
|
(in-package :de.setf.utility.implementation)
(:documentation
"This file tests type definitions for the `de.setf.utility.codecs` library."
(:copyright
"Copyright 2010 [james anderson](mailto:) All Rights Reserved
'de.setf.utility.codecs' is free software: you can redistribute it and/or modify
it under the ... |
25a82751f95dbc04439c2bd440db0cde3c20ff422adf7a98059f56218947d5cb | dylex/haskell-nfs | TH.hs | |Automatic code generation for .
One of those cases where it ended up being more work to automate , what with all the exceptions .
# LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
module Network.NFS.V4.Ops.TH
( thOps
) where
import Data.List ((\\))
import qualified Data.Set as Set
import qualified Lang... | null | https://raw.githubusercontent.com/dylex/haskell-nfs/07d213e09f7bf9e6fe3200aca3de494c3dcd54f7/nfs/Network/NFS/V4/Ops/TH.hs | haskell | |Automatic code generation for .
One of those cases where it ended up being more work to automate , what with all the exceptions .
# LANGUAGE CPP #
# LANGUAGE TemplateHaskell #
module Network.NFS.V4.Ops.TH
( thOps
) where
import Data.List ((\\))
import qualified Data.Set as Set
import qualified Lang... | |
5dd23a92e3361de61ab28bab77913e9e95878aa615113b9797f549720481ba56 | psholtz/MIT-SICP | exercise-01.scm | ;;
Exercise 1
;;
;;
;; Consider the following definitions:
;;
(define (our-display x)
(display x)
x)
(define (count1 x)
(cond ((= x 0) 0)
(else
(our-display x)
(count1 (- x 1)))))
(define (count2 x)
(cond ((= x 0) 0)
(else
(count2 (- x 1))
(our-display x))))
;;
What will " ( count1 4 ) " and "... | null | https://raw.githubusercontent.com/psholtz/MIT-SICP/01e9b722ac5008e26f386624849117ca8fa80906/Recitations-F2007/Recitation-03/mit-scheme/exercise-01.scm | scheme |
Consider the following definitions:
where they apply the recursion.
It is useful to work out the call graph for each invocation.
Let's start with the call "(count1 4)":
Let's think about what happens here:
and returned through a call to (count1 3).
Our console thus looks like:
Where "-->" sign... | Exercise 1
(define (our-display x)
(display x)
x)
(define (count1 x)
(cond ((= x 0) 0)
(else
(our-display x)
(count1 (- x 1)))))
(define (count2 x)
(cond ((= x 0) 0)
(else
(count2 (- x 1))
(our-display x))))
What will " ( count1 4 ) " and " ( count2 4 ) " display ?
These two procedures diff... |
4c64bfd931b569e96ec15c6ab592ee10a885c7e3058b563aa44cc25c36555d09 | ml4tp/tcoq | inductiveops.ml | (************************************************************************)
v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *... | null | https://raw.githubusercontent.com/ml4tp/tcoq/7a78c31df480fba721648f277ab0783229c8bece/pretyping/inductiveops.ml | ocaml | **********************************************************************
// * This file is distributed under the terms of the
* GNU Lesser General Public License Version 2.1
**********************************************************************
Return type as quoted by the user
... | v * The Coq Proof Assistant / The Coq Development Team
< O _ _ _ , , * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999 - 2017
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
open CErrors
open Util
open N... |
ee645f7fe6fdaafc781004fd7d6394b447035dd84ebb51a4278d897f99d2c721 | nodfur/os | 03-it8591.lisp | ;;
Driver for the IT8591 e - paper display controller via GPIO / SPI from
the Raspberry Pi 400 .
;;
Copyright ( C ) 2021 Restless Hypermedia , Inc.
;;
;; This program is free software: you can redistribute it and/or
modify it under the terms of the GNU Affero General Public License
as published by the Free ... | null | https://raw.githubusercontent.com/nodfur/os/5826a2c4547deb891221c10d8fcee2789fd464cc/epap/epap-lisp/03-it8591.lisp | lisp |
This program is free software: you can redistribute it and/or
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
Licens... | Driver for the IT8591 e - paper display controller via GPIO / SPI from
the Raspberry Pi 400 .
Copyright ( C ) 2021 Restless Hypermedia , Inc.
modify it under the terms of the GNU Affero General Public License
as published by the Free Software Foundation , either version 3 of
the License , or ( at your opt... |
abd3781e69777b513f1cb62c5ec64a2b939e8dcbc5b1367437debc3b99a9342e | AntidoteDB/antidote_aql | populate_index.erl | #!/usr/bin/env escript
! -smp enable -name populate@127.0.0.1 -setcookie antidote
%-mode(compile).
-define(ENTRY_TYPE, {antidote_crdt_register_lww, [assign]}).
main([Nodes, NumEntries, Key, CRDT, Bucket]) ->
try
{nodes_to_atoms(Nodes), list_to_integer(NumEntries), list_to_atom(Key),
list_to_atom(CRDT), l... | null | https://raw.githubusercontent.com/AntidoteDB/antidote_aql/e7ef4913d233c2fee8ebff582d91fe3e2e95786c/erl_scripts/populate_index.erl | erlang | -mode(compile). | #!/usr/bin/env escript
! -smp enable -name populate@127.0.0.1 -setcookie antidote
-define(ENTRY_TYPE, {antidote_crdt_register_lww, [assign]}).
main([Nodes, NumEntries, Key, CRDT, Bucket]) ->
try
{nodes_to_atoms(Nodes), list_to_integer(NumEntries), list_to_atom(Key),
list_to_atom(CRDT), list_to_binary(Buc... |
7c7514e9c1a44bb4a196c146449698223e6dc945dbafa91522328f75dfebbd46 | licht1stein/clj-telegram-bot | updates_test.clj | (ns telegram.updates-test
(:require [telegram.updates :as sut]
[telegram.schema :as s]
[clojure.test.check.generators :as gen]
[expectations.clojure.test
:refer [defexpect expect expecting
approximately between between' functionally
... | null | https://raw.githubusercontent.com/licht1stein/clj-telegram-bot/13c2ba2905e5da730af854d1d91a2c62fc70dd37/test/telegram/updates_test.clj | clojure | (ns telegram.updates-test
(:require [telegram.updates :as sut]
[telegram.schema :as s]
[clojure.test.check.generators :as gen]
[expectations.clojure.test
:refer [defexpect expect expecting
approximately between between' functionally
... | |
7fdb1d2d9c1f6d35dd47c723daaecc3e9c3703bb3a5270ae7c557c8aa72d5ba1 | tmattio/inquire | ansi.mli | File : Ansi.mli
Copyright 2004 Troestler .
This library is free software ; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License version 3 as published by
the Free Software Foundation , with the special exception on linking described
in file LI... | null | https://raw.githubusercontent.com/tmattio/inquire/f5bb64ab8d9ed8987c8e529007cf380ab67fd9fd/vendor/ocaml-ansi/src/ansi.mli | ocaml | * Available colors.
* Default color of the terminal
* Various styles for the text. [Blink] and [Hidden] may not work on every
terminal.
* Shortcut for [Foreground Magenta]
* Shortcut for [Background Black]
* Shortcut for [Background Red]
* Shortcut for [Background Green]
* Shortcut for [Background Yellow]
*... | File : Ansi.mli
Copyright 2004 Troestler .
This library is free software ; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License version 3 as published by
the Free Software Foundation , with the special exception on linking described
in file LI... |
c0c01f949ea6ef2624926973c6e68f8edb530d0d818a477baf0bdb6f750522c0 | erlyvideo/publisher | amf3_tests.erl | -module(amf3_tests).
-include_lib("eunit/include/eunit.hrl").
-define(assertEncode(Term, AMF), (AMF == amf3:encode(Term))).
-define(_assertEncode(Term, AMF), ?_assertEqual(AMF, amf3:encode(Term))).
-define(assertDecode(Term, AMF), ({Term,<<>>} == amf3:decode(AMF))).
-define(_assertDecode(Term, AMF), ?_assertEqua... | null | https://raw.githubusercontent.com/erlyvideo/publisher/5bb2dfa6477c46160dc5fafcc030fc3f5340ec80/apps/amf/src/amf3_tests.erl | erlang | All floating point Numbers are enoded as doubles
atoms are encoded as strings
dense
associative only
mixed | -module(amf3_tests).
-include_lib("eunit/include/eunit.hrl").
-define(assertEncode(Term, AMF), (AMF == amf3:encode(Term))).
-define(_assertEncode(Term, AMF), ?_assertEqual(AMF, amf3:encode(Term))).
-define(assertDecode(Term, AMF), ({Term,<<>>} == amf3:decode(AMF))).
-define(_assertDecode(Term, AMF), ?_assertEqua... |
14c07b833b8cddf70ffd1baba4dfe7faec25626d825ae39fcd03bb7278b30f69 | bhauman/devcards | maintain_state.cljs | (ns devdemos.maintain_state
(:require
[sablono.core :as sab :include-macros true]
[goog.object :as gobj]
[devcards.util.utils :refer-macros [define-react-class-once]]
[devcards.core]
[react])
(:require-macros
;; Notice that I am not including the 'devcards.core namespace
but only... | null | https://raw.githubusercontent.com/bhauman/devcards/65caa84c9438dd8bdf8cd21964e6033b1a22c178/example_src/devdemos/maintain_state.cljs | clojure | Notice that I am not including the 'devcards.core namespace | (ns devdemos.maintain_state
(:require
[sablono.core :as sab :include-macros true]
[goog.object :as gobj]
[devcards.util.utils :refer-macros [define-react-class-once]]
[devcards.core]
[react])
(:require-macros
but only the macros . This helps ensure that devcards will only
be created... |
a4dc0fc3560506d895c1cf278b14fa4e1bec84457c2c49d4d813f59228a04a89 | rpav/cl-cairo2 | xlib.lisp | (in-package :cl-cairo2)
;;;;
a limited interface to certain Xlib functions
;;;;
;;;; types
(defctype display :pointer)
(defctype xid :unsigned-long) ; X Id type
(defctype drawable xid)
(defctype window xid)
(defctype pixmap xid)
(defctype cursor xid)
(defctype colormap xid)
(defctype graphics-context xid)
(defctyp... | null | https://raw.githubusercontent.com/rpav/cl-cairo2/41ae45aac86553c46f4bb460f80e1fb620930f5b/src/xlib/xlib.lisp | lisp |
types
X Id type
constants
error code handling
display operations
defaults for the X11 display & screen
graphics contexts
window and pixmap management
synchronization & threads
atoms & protocols
events
hints & misc
marks which fields in this structure are defined
Obsolete
Obsolete
Obsolete
Obsolete
... | (in-package :cl-cairo2)
a limited interface to certain Xlib functions
(defctype display :pointer)
(defctype drawable xid)
(defctype window xid)
(defctype pixmap xid)
(defctype cursor xid)
(defctype colormap xid)
(defctype graphics-context xid)
(defctype visual :pointer)
(defctype xatom :unsigned-long)
(defctype bo... |
1ee46063fad858819556077004e37df073c3356fb7883099b134bcacd2218049 | mfoemmel/erlang-otp | tv_ets_rpc.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1998 - 2009 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/tv/src/tv_ets_rpc.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 1998 - 2009 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(tv_ets_rpc).
-export([all/2,
i... |
f986258d7bf8dcc7819c57795623d4ac4e7c59ed379848a2eaa2d8bb074f331a | zkat/sheeple | demo.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*-
This is a little demo put together to give a basic introduction of the Sheeple API
(in-package :sheeple-user)
;;;
;;; Basic object creation
;;;
(defparameter *obj* (object :nickname '*obj*)
"Create an empty object. This ... | null | https://raw.githubusercontent.com/zkat/sheeple/5393c74737ccf22c3fd5f390076b75c38453cb04/examples/demo.lisp | lisp | Syntax : ANSI - Common - Lisp ; Base : 10 ; indent - tabs - mode : nil -*-
Basic object creation
What's the difference?
*clone* won't be affected by changes to *obj*. *child* will:
In a diagram:
=T=
|
=standard-object=
| \
*obj* -> *clone* (properties copied direct... | This is a little demo put together to give a basic introduction of the Sheeple API
(in-package :sheeple-user)
(defparameter *obj* (object :nickname '*obj*)
"Create an empty object. This object only has =standard-object= as its parent.")
(defparameter *child* (object :parents (list *obj*) :nickname '*child*)
"Th... |
23d0e8e2cad6fb245b9dfa1f10c2770df86afd22064394d8d83c80feb1a3c015 | jrm-code-project/LISP-Machine | sim-tv.lisp | -*- Mode : LISP ; Package : SIM ; : CL ; -*-
(defflavor sim-frame
()
(tv:bordered-constraint-frame-with-shared-io-buffer)
(:default-init-plist :panes
'((lisp lam:sensitive-lisp-listener
:save-bits t)
... | null | https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/pace/sim/sim-tv.lisp | lisp | Package : SIM ; : CL ; -*- |
(defflavor sim-frame
()
(tv:bordered-constraint-frame-with-shared-io-buffer)
(:default-init-plist :panes
'((lisp lam:sensitive-lisp-listener
:save-bits t)
(display tv:window
... |
325355f78d4c282301d0d5048225b232bd97c862dbfb56df1dc21bd8cdba17d7 | chaitanyagupta/chronicity | repeater-fortnight.lisp | -*- Mode : LISP ; Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
;;; repeater-fortnight.lisp
;;; See the LICENSE file for licensing information.
(cl:in-package #:chronicity-test)
(define-test repeater-fortnight-next-future
(let* ((now (make-datetime 2006 8 16 14))
(fortnights (create-tag '... | null | https://raw.githubusercontent.com/chaitanyagupta/chronicity/5841d1548cad0ca6917d8e68933124a5af68f5ec/test/repeater-fortnight.lisp | lisp | Syntax : COMMON - LISP ; Package : CL - USER ; Base : 10 -*-
repeater-fortnight.lisp
See the LICENSE file for licensing information. |
(cl:in-package #:chronicity-test)
(define-test repeater-fortnight-next-future
(let* ((now (make-datetime 2006 8 16 14))
(fortnights (create-tag 'repeater-fortnight :fortnight :now now))
(next-fortnight))
(setf next-fortnight (r-next fortnights :future))
(assert-datetime= (make-datetime 20... |
cb06cc3f8715b1c797d49e06c63ae7c964d0dd5a4dfbbbd4a5823536d85b4a34 | hidaris/thinking-dumps | ast.rkt | #lang typed/racket
(provide (all-defined-out))
Expression
(define-type Expression
(U Const
Diff
IsZero
If
Var
Let
Minus
Add
Mult
Div))
(struct Const
([n : Real])
#:transparent)
(struct Diff
([n1 : Expression]
[n2 : Expression])
#:transparent)
(struct IsZe... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/eopl-solutions/chap3/3-07/ast.rkt | racket | Value | #lang typed/racket
(provide (all-defined-out))
Expression
(define-type Expression
(U Const
Diff
IsZero
If
Var
Let
Minus
Add
Mult
Div))
(struct Const
([n : Real])
#:transparent)
(struct Diff
([n1 : Expression]
[n2 : Expression])
#:transparent)
(struct IsZe... |
22bf838ab97d582fdc4fe1c14ad6ea9d9797325647dd0cdbd96834412b5d6e23 | sbcl/sbcl | copyprop.lisp | ;;;; This file implements the copy propagation phase of the compiler,
;;;; which uses global flow analysis to eliminate unnecessary copying
;;;; of variables.
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
... | null | https://raw.githubusercontent.com/sbcl/sbcl/377972ad76ac2f40d50e6eedbf2c99dfdfb5ffad/src/compiler/copyprop.lisp | lisp | This file implements the copy propagation phase of the compiler,
which uses global flow analysis to eliminate unnecessary copying
of variables.
more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more informatio... |
This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB-C")
In copy propagation , we manipulate sets of TNs . We only consider
TNs whose sole write is by a MOVE... |
013867b62c0ae663f53136f86cef07f9b14a910e697de26b03ef652f88cd701f | beerose/ocaml-parser-example | main.ml | open Core
open Lexer
open Lexing
let print_position outx lexbuf =
let pos = lexbuf.lex_curr_p in
fprintf outx "%s:%d:%d" pos.pos_fname
pos.pos_lnum (pos.pos_cnum - pos.pos_bol + 1)
let parse_with_error lexbuf =
try Parser.prog Lexer.read lexbuf with
| SyntaxError msg ->
fprintf stderr "%a: %s\n" print... | null | https://raw.githubusercontent.com/beerose/ocaml-parser-example/fe50b59700c05ebfd4a774dc44bc35ba9972344e/main.ml | ocaml | open Core
open Lexer
open Lexing
let print_position outx lexbuf =
let pos = lexbuf.lex_curr_p in
fprintf outx "%s:%d:%d" pos.pos_fname
pos.pos_lnum (pos.pos_cnum - pos.pos_bol + 1)
let parse_with_error lexbuf =
try Parser.prog Lexer.read lexbuf with
| SyntaxError msg ->
fprintf stderr "%a: %s\n" print... | |
b36960f41e5f497c8c34fc823df0a02f515326ea5e1682ee26d8fb79a6fbd463 | Leofltt/Kairos | longest.hs | -- init model : samples
addI "ms1" $ models csd1 1
addI "ms2" $ models csd1 2
addI "ms3" $ models csd1 3
addI "ms4" $ models csd1 4
addI "ms5" $ models csd1 5
addI "ms6" $ models csd1 6
cT 133
cPat "fourFloor" "ms1"
p "ms1"
prms "sSaw" [(cf,k,toPfs[1900]),(durTS,k,toPfs[(1/16)]),(pitch,nv,toPfs[47,47,47,51,47,47])... | null | https://raw.githubusercontent.com/Leofltt/Kairos/0ffaba6f043b5774626a26f924256857de533d4b/Performances/longest.hs | haskell | init model : samples
fxs |
addI "ms1" $ models csd1 1
addI "ms2" $ models csd1 2
addI "ms3" $ models csd1 3
addI "ms4" $ models csd1 4
addI "ms5" $ models csd1 5
addI "ms6" $ models csd1 6
cT 133
cPat "fourFloor" "ms1"
p "ms1"
prms "sSaw" [(cf,k,toPfs[1900]),(durTS,k,toPfs[(1/16)]),(pitch,nv,toPfs[47,47,47,51,47,47]),(sawmix,np 70,toPfs[0.6... |
7a8b4b058a71d79076e84eb07837104ead616acd06e081e22fd42d09bc9f12ff | Frama-C/Frama-C-snapshot | metrics_cabs.mli | (**************************************************************************)
(* *)
This file is part of Frama - C.
(* *)
Copyright ... | null | https://raw.githubusercontent.com/Frama-C/Frama-C-snapshot/639a3647736bf8ac127d00ebe4c4c259f75f9b87/src/plugins/metrics/metrics_cabs.mli | ocaml | ************************************************************************
alternatives)
... | This file is part of Frama - C.
Copyright ( C ) 2007 - 2019
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Software
Foundation , v... |
9c1698894c4ee27a3619c586f4ba8a3cd66b147c13a7878a3e96f59f642847ac | polyfy/polylith | m201_mismatching_parameters.clj | (ns polylith.clj.core.validator.m201-mismatching-parameters
(:require [clojure.string :as str]
[polylith.clj.core.util.interface :as util]
[polylith.clj.core.validator.shared :as shared]
[polylith.clj.core.util.interface.color :as color]))
(def types->message {#{"function"} "Funct... | null | https://raw.githubusercontent.com/polyfy/polylith/76936c752fb5b729c216b23d92c8a8d71cfdc92f/components/validator/src/polylith/clj/core/validator/m201_mismatching_parameters.clj | clojure | (ns polylith.clj.core.validator.m201-mismatching-parameters
(:require [clojure.string :as str]
[polylith.clj.core.util.interface :as util]
[polylith.clj.core.validator.shared :as shared]
[polylith.clj.core.util.interface.color :as color]))
(def types->message {#{"function"} "Funct... | |
fd41cf871c04da49a461b4dcc6da1c5144c067b808f73d7a8fecc9671e09ddc1 | Toeplitz/haskell | Figure.hs |
module Figure where
import Graphics.Rendering.Plot
makePlot :: Figure () -> FilePath -> IO ()
makePlot fig filename = writeFigure SVG filename (1200, 800) fig
createMatrixFigure :: Dataset a => a -> Figure ()
createMatrixFigure m = do
setPlots 1 1
withPlot (1,1) $ do
setDataset m
addAxis XAxis (Side... | null | https://raw.githubusercontent.com/Toeplitz/haskell/b686aff73033db5f77b7bc2ddc7478a4311f69d9/Figure.hs | haskell | createGraphFigure x y = do
setRangeFromData YAxis Lower Linear |
module Figure where
import Graphics.Rendering.Plot
makePlot :: Figure () -> FilePath -> IO ()
makePlot fig filename = writeFigure SVG filename (1200, 800) fig
createMatrixFigure :: Dataset a => a -> Figure ()
createMatrixFigure m = do
setPlots 1 1
withPlot (1,1) $ do
setDataset m
addAxis XAxis (Side... |
9ee736e395e15b07ba45b00f37559d1277f8382fccdd8ea24ceb957af5e197a8 | marick/Midje | test.clj | There are two kinds of functions now . Helper functions about records are in the ` specific `
;; namespace. But the generic functions come from the `generic` namespace.
(ns as-documentation.about-defrecord.using-refer--plain-tests.test
(:require [midje.sweet :refer :all])
(:require [as-documentation.about-defrec... | null | https://raw.githubusercontent.com/marick/Midje/2b9bcb117442d3bd2d16446b47540888d683c717/test/as_documentation/about_defrecord/using_refer__plain_tests/test.clj | clojure | namespace. But the generic functions come from the `generic` namespace. | There are two kinds of functions now . Helper functions about records are in the ` specific `
(ns as-documentation.about-defrecord.using-refer--plain-tests.test
(:require [midje.sweet :refer :all])
(:require [as-documentation.about-defrecord.using-refer--plain-tests.specific
:refer [->Record]])
(:... |
2623c6df276cea70c07fcf2ef76837974bb29969a46c642a180b770403141a51 | GaloisInc/regex-fsm | ENFA.hs | {-# LANGUAGE DeriveFunctor #-}
# LANGUAGE RecordWildCards #
{-# LANGUAGE OverloadedStrings #-}
-----------------------------------------------------------------------------
-- |
Module : Regex . ENFA
Copyright : ( C ) 2016 - 2017
-- License : BSD3-style (see the file LICENSE)
Maintaine... | null | https://raw.githubusercontent.com/GaloisInc/regex-fsm/80f371371f40ec842821b58eda44267dbde37c6a/src/Regex/ENFA.hs | haskell | # LANGUAGE DeriveFunctor #
# LANGUAGE OverloadedStrings #
---------------------------------------------------------------------------
|
License : BSD3-style (see the file LICENSE)
Stability : experimental
Portability : non-portable
-----------------------------------------------------------------------... | # LANGUAGE RecordWildCards #
Module : Regex . ENFA
Copyright : ( C ) 2016 - 2017
Maintainer : < >
module Regex.ENFA
Reg (..)
, ENFA (..)
, Transition
* ENFA smart constructors
, (#)
, (|->)
, (-|)
* Thompson 's construction
, thompsons
, simulateENFA
) where
i... |
5ca4da5bbfeb92c78aed19632dfa1bbcbcaba03fc6c2fa9e7af671bb64d7ce4b | haskell-game/sdl2 | Vect.hs | # LANGUAGE CPP #
| SDL 's vector representation .
--
By default , re - exports the " Linear " and " Linear . Affine " modules from the
' linear ' package . With the @no - linear@ flag , instead exports a
duplicate implementation of the ' V2 ' , ' V3 ' , ' V4 ' and ' Point ' types from
-- "SDL.Internal.Vect", ... | null | https://raw.githubusercontent.com/haskell-game/sdl2/a2646ede53d98aebf8f7c49b01f99236701b7e44/src/SDL/Vect.hs | haskell |
"SDL.Internal.Vect", which provides as many instances as possible for those
types while avoiding any additional dependencies.
* Point
* Vectors | # LANGUAGE CPP #
| SDL 's vector representation .
By default , re - exports the " Linear " and " Linear . Affine " modules from the
' linear ' package . With the @no - linear@ flag , instead exports a
duplicate implementation of the ' V2 ' , ' V3 ' , ' V4 ' and ' Point ' types from
module SDL.Vect
( module ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.