_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
77b07a56d31e0f27c81a97a0b5bd3059082229e087d9d3a633848007e8bc1572
runtimeverification/haskell-backend
Expand.hs
| Copyright : ( c ) Runtime Verification , 2019 - 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2019-2021 License : BSD-3-Clause -} module Kore.Rewrite.Rule.Expand ( ExpandSingleConstructors (..), ) where import Control.Lens ( (%=), ) import Control.Monad.State.Stri...
null
https://raw.githubusercontent.com/runtimeverification/haskell-backend/40ec7d6fab13e7e1fd73943b5fbe98ad76d5bddf/kore/src/Kore/Rewrite/Rule/Expand.hs
haskell
| Instantiate variables on sorts with a single constructor TODO(ttuegel): make this a strategy step, so that we expand any single-constructor variables at the start of each proof step. Going even further: make this a step in the variable simplifier? | We don't need to generate a new variable, we are at the ...
| Copyright : ( c ) Runtime Verification , 2019 - 2021 License : BSD-3 - Clause Copyright : (c) Runtime Verification, 2019-2021 License : BSD-3-Clause -} module Kore.Rewrite.Rule.Expand ( ExpandSingleConstructors (..), ) where import Control.Lens ( (%=), ) import Control.Monad.State.Stri...
c81683ba4cf598f574abbee95c81bc79b9ce642ff8075b221b7472a58b71db7b
higherkindness/mu-haskell
Client.hs
# language DataKinds # # language OverloadedStrings # {-# language ScopedTypeVariables #-} # language TypeApplications # module Main where import Data.Conduit import qualified Data.Conduit.Combinators as C import qualified Data.Text as T import Mu.GRpc.Client.TyApp...
null
https://raw.githubusercontent.com/higherkindness/mu-haskell/e41ba786f556cfac962e0f183b36bf9ae81d69e4/examples/with-persistent/src/Client.hs
haskell
# language ScopedTypeVariables #
# language DataKinds # # language OverloadedStrings # # language TypeApplications # module Main where import Data.Conduit import qualified Data.Conduit.Combinators as C import qualified Data.Text as T import Mu.GRpc.Client.TyApps import System.Environment...
b21c68baefea718a43d4c93eaf4bb63dd79d739a485813edc2c08d089d67e7a1
orbitz/scow
scow.ml
open Core.Std open Async.Std module Make = functor (Statem : Scow_statem.S) -> functor (Log : Scow_log.S with type elt = Statem.op) -> functor (Store : Scow_store.S) -> functor (Transport : Scow_transport.S with type Node.t = Store.node and type elt = Log.elt) ...
null
https://raw.githubusercontent.com/orbitz/scow/feb633ef94824f44f0ffc679a548f97288c8ae48/lib/scow/scow.ml
ocaml
****************************************************************** * API Functions ******************************************************************
open Core.Std open Async.Std module Make = functor (Statem : Scow_statem.S) -> functor (Log : Scow_log.S with type elt = Statem.op) -> functor (Store : Scow_store.S) -> functor (Transport : Scow_transport.S with type Node.t = Store.node and type elt = Log.elt) ...
065ae0fc9ae20491c375829249bbbe7ae5ee201a3488676975ca2c86accbe658
techascent/tech.io
io_test.clj
(ns tech.v3.io-test (:require [tech.v3.io :as io] [tech.v3.io.temp-file :as temp-file] [tech.v3.resource :as resource] [clojure.test :refer [deftest is]]) (:import [java.io File])) (deftest interlocked-copy-test (resource/stack-resource-context (temp-file/with-temp-dir ...
null
https://raw.githubusercontent.com/techascent/tech.io/91a387678c8a9a79eb13f8533cc8cd01424d273b/test/tech/v3/io_test.clj
clojure
(ns tech.v3.io-test (:require [tech.v3.io :as io] [tech.v3.io.temp-file :as temp-file] [tech.v3.resource :as resource] [clojure.test :refer [deftest is]]) (:import [java.io File])) (deftest interlocked-copy-test (resource/stack-resource-context (temp-file/with-temp-dir ...
9855c07ee862a723d1a7c72ca91930798f287b48ba02d98f0386d631a09a8854
arsenm/Clutterhs
TextureTest.hs
import Prelude hiding (catch) import qualified Prelude as P import Data.Maybe import Graphics.UI.Clutter import System.Glib.GError import System.Glib.Attributes import System.Glib.Signals import Data.Array.MArray main = do clutterInit stage <- stageGetDefault actorSetSize stage 800 800 rec1 <- rectangleNe...
null
https://raw.githubusercontent.com/arsenm/Clutterhs/ad3390895264c46906b5d3d954c4b04b04d96b1d/clutter/demo/TextureTest.hs
haskell
import Prelude hiding (catch) import qualified Prelude as P import Data.Maybe import Graphics.UI.Clutter import System.Glib.GError import System.Glib.Attributes import System.Glib.Signals import Data.Array.MArray main = do clutterInit stage <- stageGetDefault actorSetSize stage 800 800 rec1 <- rectangleNe...
a11ce7d2d75128b544ed7deaf9bbe338dab716206b92a6ed784b3c53676f8dca
input-output-hk/cardano-wallet-legacy
Settings.hs
module Cardano.Wallet.API.V1.Settings where import Cardano.Wallet.API.Response (APIResponse, ValidJSON) import Cardano.Wallet.API.Types import Cardano.Wallet.API.V1.Types import Servant type API = Tag "Settings" 'NoTagDescription :> ( "node-settings" :> Summary "Retr...
null
https://raw.githubusercontent.com/input-output-hk/cardano-wallet-legacy/143e6d0dac0b28b3274600c6c49ec87e42ec9f37/src/Cardano/Wallet/API/V1/Settings.hs
haskell
module Cardano.Wallet.API.V1.Settings where import Cardano.Wallet.API.Response (APIResponse, ValidJSON) import Cardano.Wallet.API.Types import Cardano.Wallet.API.V1.Types import Servant type API = Tag "Settings" 'NoTagDescription :> ( "node-settings" :> Summary "Retr...
06a810facece8a80b7bba52288aa9623c1f48635f67d02d3d16f449a633c6dc7
elastic/eui-cljs
eui_popover_title_styles.cljs
(ns eui.eui-popover-title-styles (:require ["@elastic/eui/lib/components/popover/popover_title.styles.js" :as eui])) (def euiPopoverTitleStyles eui/euiPopoverTitleStyles)
null
https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/eui_popover_title_styles.cljs
clojure
(ns eui.eui-popover-title-styles (:require ["@elastic/eui/lib/components/popover/popover_title.styles.js" :as eui])) (def euiPopoverTitleStyles eui/euiPopoverTitleStyles)
e3176af723e47d4ffe692e03115189f4137980fa741da57a33fe36c946ec55a0
promesante/hn-clj-pedestal-re-frame
config.cljs
(ns hn-clj-pedestal-re-frame.config) ;----------------------------------------------------------------------- ; Links per page ;----------------------------------------------------------------------- (def new-links-per-page 5) (def top-links-per-page 100) ;----------------------------------------------------------...
null
https://raw.githubusercontent.com/promesante/hn-clj-pedestal-re-frame/76b62dbbcc1c803c8e233809796eda75893cf7c9/src/cljs/hn_clj_pedestal_re_frame/config.cljs
clojure
----------------------------------------------------------------------- Links per page ----------------------------------------------------------------------- ----------------------------------------------------------------------- Dates ----------------------------------------------------------------------- ---------...
(ns hn-clj-pedestal-re-frame.config) (def new-links-per-page 5) (def top-links-per-page 100) (def date-messages [ {:conv 60 :message "less than 1 min ago"} {:conv 60 :message " min ago"} {:conv 24 :message " h ago"} {:conv 30 :message " days ago"} {:conv 365 :message " mo ago"} {:conv 10 :...
06c3f4f26428e69530d5d31d59460dfdfd18e8882ca6089f3a41fc4a75179b5c
racket/typed-racket
pr10594.rkt
#; (exn-pred exn:fail:contract? #rx"shape-check") #lang scheme/load (module T typed/racket/shallow (define-struct: [a] thing ([get : a])) (: thing->string ((thing String) -> String)) (define (thing->string x) (string-append "foo" (thing-get x))) (provide (all-defined-out))) (module U scheme (require...
null
https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/fail/shallow/pr10594.rkt
racket
(exn-pred exn:fail:contract? #rx"shape-check") #lang scheme/load (module T typed/racket/shallow (define-struct: [a] thing ([get : a])) (: thing->string ((thing String) -> String)) (define (thing->string x) (string-append "foo" (thing-get x))) (provide (all-defined-out))) (module U scheme (require 'T...
30a060abffde9aeb9a613f9cddb71cec9042d7a83978ada64966a75599a8b517
gpwwjr/LISA
semi-mab.lisp
(in-package "LISA") (use-default-engine) (deftemplate monkey () (slot location) (slot on-top-of) (slot holding)) (deftemplate thing () (slot name) (slot location) (slot on-top-of) (slot weight)) (deftemplate chest () (slot name) (slot contents) (slot unlocked-by)) (deftemplate goal-is-to () ...
null
https://raw.githubusercontent.com/gpwwjr/LISA/bc7f54b3a9b901d5648d7e9de358e29d3b794c78/misc/semi-mab.lisp
lisp
(in-package "LISA") (use-default-engine) (deftemplate monkey () (slot location) (slot on-top-of) (slot holding)) (deftemplate thing () (slot name) (slot location) (slot on-top-of) (slot weight)) (deftemplate chest () (slot name) (slot contents) (slot unlocked-by)) (deftemplate goal-is-to () ...
52e62d5b41be5f8503392a5997126a5f0c7a2704f68dd09d0885c49e61fdf231
goldfirere/th-desugar
Run.hs
Tests for the th - desugar package ( c ) 2013 (c) Richard Eisenberg 2013 -} # LANGUAGE TemplateHaskell , UnboxedTuples , ParallelListComp , CPP , RankNTypes , TypeFamilies , DataKinds , ConstraintKinds , PolyKinds , MultiParamTypeClasses , FlexibleInstances , ...
null
https://raw.githubusercontent.com/goldfirere/th-desugar/968a106d860cccf1dfdd384ebaf9a5704589a25a/Test/Run.hs
haskell
# OPTIONS -Wno-incomplete-patterns -Wno-overlapping-patterns -Wno-unused-matches -Wno-type-defaults -Wno-missing-signatures -Wno-unused-do-bind -Wno-missing-fields -Wno-incomplete-record-updates -Wno-partial-type-signatures -Wno-redundant-constraints # | Must fix nested...
Tests for the th - desugar package ( c ) 2013 (c) Richard Eisenberg 2013 -} # LANGUAGE TemplateHaskell , UnboxedTuples , ParallelListComp , CPP , RankNTypes , TypeFamilies , DataKinds , ConstraintKinds , PolyKinds , MultiParamTypeClasses , FlexibleInstances , ...
6c908aaa2c0eea9eec1d846ee41f53bf6f11a9e7cd4a8fe0f358a2722582d219
liqula/react-hs
PropertiesAndEvents.hs
{-# LANGUAGE BangPatterns #-} # LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # {-# LANGUAGE EmptyDataDecls #-} # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE LambdaCase # # LANGUAGE MagicHash # # LANGUA...
null
https://raw.githubusercontent.com/liqula/react-hs/204c96ee3514b5ddec65378d37872266b05e8954/react-hs/src/React/Flux/PropertiesAndEvents.hs
haskell
# LANGUAGE BangPatterns # # LANGUAGE EmptyDataDecls # # LANGUAGE OverloadedStrings # | This module contains the definitions for creating properties to pass to javascript elements and foreign javascript classes. In addition, it contains definitions for the * Creating Properties ** Combinators * Creating Events **...
# LANGUAGE CPP # # LANGUAGE DataKinds # # LANGUAGE DeriveGeneric # # LANGUAGE ExistentialQuantification # # LANGUAGE FlexibleContexts # # LANGUAGE FlexibleInstances # # LANGUAGE FunctionalDependencies # # LANGUAGE LambdaCase # # LANGUAGE MagicHash # # LANGUAGE MultiParamTypeClasses # # LANGUAGE PolyKinds # # LANGUAGE S...
a733e34bf8613906855b37d531eb18ba7791d86abd9d092567a53e7cfdacae8a
sealchain-project/sealchain
ApiServer.hs
# LANGUAGE DeriveGeneric # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE RankNTypes #-} # LANGUAGE TemplateHaskell # # LANGUAGE FlexibleContexts # {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE BangPatterns #-} -- | -- Module : Pact.Server.ApiServer Copyright : ( C ) 2016 -...
null
https://raw.githubusercontent.com/sealchain-project/sealchain/e97b4bac865fb147979cb14723a12c716a62e51e/pact/src-ghc/Pact/Server/ApiServer.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE OverloadedStrings # # LANGUAGE BangPatterns # | Module : Pact.Server.ApiServer License : BSD-style (see the file LICENSE) Servant server for Pact REST API.
# LANGUAGE DeriveGeneric # # LANGUAGE RecordWildCards # # LANGUAGE ScopedTypeVariables # # LANGUAGE TemplateHaskell # # LANGUAGE FlexibleContexts # Copyright : ( C ) 2016 Maintainer : < > module Pact.Server.ApiServer ( runApiServer , ApiEnv(..), aiLog, aiHistoryChan , sendHandler, pollHandler,...
f7172df63247cd32bfdf0cbc1866d7570862eb91a3c7108d467fa0f761a8c0e6
hkuplg/fcore
JavaEDSL.hs
| EDSL for Language - Java module JavaEDSL where import Language.Java.Syntax import StringPrefixes -- Type arrayTy :: Type -> Type arrayTy ty = RefType (ArrayType ty) classTy :: String -> Type classTy t = RefType $ ClassRefType $ classTyp t classTyp :: String -> ClassType classTyp t = ClassType [(Ident t, [])]...
null
https://raw.githubusercontent.com/hkuplg/fcore/e27b6dec5bfd319edb8c3e90d94a993bcc7b4c95/backend/JavaEDSL.hs
haskell
Type var transform method class construction field member class member method member constructor for constructor: this.name = name classbody ,assign (name ["c", closureInput]) (ExpName $ name ["this", closureInput]) class decl expression lit op type cast class field access class instantiation assign...
| EDSL for Language - Java module JavaEDSL where import Language.Java.Syntax import StringPrefixes arrayTy :: Type -> Type arrayTy ty = RefType (ArrayType ty) classTy :: String -> Type classTy t = RefType $ ClassRefType $ classTyp t classTyp :: String -> ClassType classTyp t = ClassType [(Ident t, [])] intTy ...
b764377fbcda4c183054c264ba6394083731ff2a7bd7bc4d117771e533a4df8e
lemenkov/erlrtpproxy
rtpproxy_notifier_backend_radius.erl
-module(rtpproxy_notifier_backend_radius). -behaviour(gen_server). -export([init/1]). -export([handle_call/3]). -export([handle_cast/2]). -export([handle_info/2]). -export([code_change/3]). -export([terminate/2]). -include_lib("eradius/include/eradius_lib.hrl"). -include_lib("eradius/include/dictionary_cisco.hrl"). ...
null
https://raw.githubusercontent.com/lemenkov/erlrtpproxy/47b0bb92f6cf9dbc012ea6f1bb757d07ea06734d/src/rtpproxy_notifier_backend_radius.erl
erlang
%
-module(rtpproxy_notifier_backend_radius). -behaviour(gen_server). -export([init/1]). -export([handle_call/3]). -export([handle_cast/2]). -export([handle_info/2]). -export([code_change/3]). -export([terminate/2]). -include_lib("eradius/include/eradius_lib.hrl"). -include_lib("eradius/include/dictionary_cisco.hrl"). ...
c574c11b337a071d735ffb2bd99e0701c9c0d6602f5f4897f37b2c5ace628a64
vyzo/gerbil
srfi-19.scm
;; SRFI-19 : Time Data Types and Procedures . ;; Copyright ( C ) I / NET , Inc. ( 2000 , 2002 , 2003 ) . All Rights Reserved . Copyright ( C ) 2008 Per Eckerdal Copyright ( C ) 2009 , 2012 , 2013 More ;; ;; ## History 2008 : This file is modified by Per Eckerdal to work in Gambit and the Black ;; ...
null
https://raw.githubusercontent.com/vyzo/gerbil/17fbcb95a8302c0de3f88380be1a3eb6fe891b95/src/std/srfi/srfi-19.scm
scheme
## History Hole module system. The other change I did (which is rather large) is that I renamed current-time to current-time-tc to avoid name clash with the built-in Gambit function with the same name. Implemented (:optional), needed for a lot of procedures to wor...
SRFI-19 : Time Data Types and Procedures . Copyright ( C ) I / NET , Inc. ( 2000 , 2002 , 2003 ) . All Rights Reserved . Copyright ( C ) 2008 Per Eckerdal Copyright ( C ) 2009 , 2012 , 2013 More 2008 : This file is modified by Per Eckerdal to work in Gambit and the Black 2009 - 10 - 02 : define - typ...
2436c9850e689176538cfe6d39d39dc6fef010339cee6fe8f2c78427d027f659
tov/dssl2
dll-nested-class.rkt
#lang dssl2 def MaybeC(X): OrC(False, X) class Dll[X]: let Node_ let _sentinel let _len def __init__(self): class Node: let prev_ let data_ let next_ def __init__(self, prev, data, next): self.data_ = data if pre...
null
https://raw.githubusercontent.com/tov/dssl2/105d18069465781bd9b87466f8336d5ce9e9a0f3/test/dssl2/dll-nested-class.rkt
racket
if this if this i + 1, 0) self.len()]
#lang dssl2 def MaybeC(X): OrC(False, X) class Dll[X]: let Node_ let _sentinel let _len def __init__(self): class Node: let prev_ let data_ let next_ def __init__(self, prev, data, next): self.data_ = data if pre...
a4eb633488ab5f4cbb40d8c73281efe589692206b6a72b1fbc53d64f69f5b8f0
okeuday/erlbench
hashtl3.erl
-*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et nomod : %%% %%%------------------------------------------------------------------------ %%% @doc %%% ==Hash Table Layered Implementation.== %%% @end %%% MIT License %%% Copyright ( ...
null
https://raw.githubusercontent.com/okeuday/erlbench/9fc02a2e748b287b85f6e9641db6b2ca68791fa4/src/hashtl3.erl
erlang
------------------------------------------------------------------------ @doc ==Hash Table Layered Implementation.== @end Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), the rights to use, copy, modify, merge, p...
-*-Mode : erlang;coding : utf-8;tab - width:4;c - basic - offset:4;indent - tabs - mode:()-*- ex : set utf-8 sts=4 ts=4 sw=4 et nomod : MIT License Copyright ( c ) 2011 - 2017 < mjtruog at protonmail dot com > to deal in the Software without restriction , including without limitation and/or sell copies...
6ca6503ea0402811bd91e274d7e39eef8bac033b79d5e4c8177d5f281ae1936a
abhay/eunit
eunit_proc.erl
%% This library is free software; you can redistribute it and/or modify %% it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation ; either version 2 of the %% License, or (at your option) any later version. %% %% This library is distributed in the hope that it will be...
null
https://raw.githubusercontent.com/abhay/eunit/fa9b549955101d6e98d31876e2e44feb96ca4d54/src/eunit_proc.erl
erlang
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHA...
published by the Free Software Foundation ; either version 2 of the You should have received a copy of the GNU Lesser General Public Foundation , Inc. , 59 Temple Place , Suite 330 , Boston , MA 02111 - 1307 USA $ Id:$ @author < > 2006 @private -module(eunit_proc). -include("eunit.hrl"). -includ...
6bc31638e4cb51536e5aec767d4adcd8832fd0f16b60086ce83edb48f99e4a75
harpocrates/inline-rust
Prelude.hs
| Module : Language . Rust . Inline . Context . Prelude Description : Defines contexts for Prelude types Copyright : ( c ) , 2017 License : BSD - style Maintainer : Stability : experimental Portability : GHC Module : Language.Rust.Inline.Context.Prelude Description : Defines c...
null
https://raw.githubusercontent.com/harpocrates/inline-rust/5ecff8c92526000e5fc358a2dfede9b60ef59a1a/src/Language/Rust/Inline/Context/Prelude.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE ExplicitForAll # Some 'Storable' instances * 'Maybe' * 'Either' | Make a generic path type (e.g. something like @Vec<T>@). | Make a generic path from an idenitifer | Context for 'Maybe' type | Context for 'Either' type | Context for tuple types Filter out incorre...
| Module : Language . Rust . Inline . Context . Prelude Description : Defines contexts for Prelude types Copyright : ( c ) , 2017 License : BSD - style Maintainer : Stability : experimental Portability : GHC Module : Language.Rust.Inline.Context.Prelude Description : Defines c...
cd1fe28f7b2efcfb1b11d84a4cb7d3b85e0e415613ed2e1c839d7d84be34ed93
ghc/ghc
A.hs
module A where a1 = ()
null
https://raw.githubusercontent.com/ghc/ghc/1c050ed26f50f3a8788e650f23d6ff55badc1072/testsuite/tests/driver/multipleHomeUnits/order-matters1/A.hs
haskell
module A where a1 = ()
022039bf5ed5608634e39c66e12243b198ced3c56e81b883180754ef6e604b6f
grapesmoker/cl-sfml
font.lisp
(in-package :sfml) (defcstruct (sf-font-info :class font-info-type) (family :pointer)) ;; You can't really modify the font in any way after it's loaded, so all ;; this does is wrap the pointer in a lispy interface. (defclass font () ((pointer :initarg :pointer :initform nil :accessor font-pointer) (info :read...
null
https://raw.githubusercontent.com/grapesmoker/cl-sfml/3e587b431bbdd23dde2d0031f979d859ac436bca/graphics/font.lisp
lisp
You can't really modify the font in any way after it's loaded, so all this does is wrap the pointer in a lispy interface.
(in-package :sfml) (defcstruct (sf-font-info :class font-info-type) (family :pointer)) (defclass font () ((pointer :initarg :pointer :initform nil :accessor font-pointer) (info :reader font-info))) (defclass font-info () ((pointer :initarg :pointer :initform nil :accessor font-info-pointer))) (defmethod t...
ed8b8a94ec2b5f5d1b5b5748b01425b193f522e377b2c62ac80bddaabe8517ee
nvim-treesitter/nvim-treesitter
folds.scm
( [ (conditional) (rule) ] @fold (#trim! @fold) )
null
https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/2eaf18826988f921ddb39e4a2e7d23d95bb0e52a/queries/make/folds.scm
scheme
( [ (conditional) (rule) ] @fold (#trim! @fold) )
27485d40060a3e89b5a741e1ea45bfcdc7bb94a2209931677d9be588791c5011
anoma/juvix
Options.hs
module Commands.Dev.Core.Strip.Options where import CommonOptions import Juvix.Compiler.Core.Pretty.Options qualified as Core data CoreStripOptions = CoreStripOptions { _coreStripShowDeBruijn :: Bool, _coreStripNoPrint :: Bool, _coreStripInputFile :: AppPath File } deriving stock (Data) makeLenses ''Co...
null
https://raw.githubusercontent.com/anoma/juvix/f2298bd67464d595d1e6ec46b227c17b4a18871d/app/Commands/Dev/Core/Strip/Options.hs
haskell
module Commands.Dev.Core.Strip.Options where import CommonOptions import Juvix.Compiler.Core.Pretty.Options qualified as Core data CoreStripOptions = CoreStripOptions { _coreStripShowDeBruijn :: Bool, _coreStripNoPrint :: Bool, _coreStripInputFile :: AppPath File } deriving stock (Data) makeLenses ''Co...
bd554fccc414de77cd44ce81a4ba99a28eead8ec069f6b0ac2fcead12693428c
mikera/imagez
test_io.clj
(ns mikera.image.test-io (:use mikera.image.core) (:use clojure.test) (:require [clojure.java.io :refer [as-file resource input-stream]]) (:import javax.imageio.ImageIO javax.imageio.ImageWriter javax.imageio.ImageWriteParam)) (set! *warn-on-reflection* true) (set! *unchecked-math* true) ...
null
https://raw.githubusercontent.com/mikera/imagez/474cd2c0c95887187b5c5b226bd7d32cd198c36e/src/test/clojure/mikera/image/test_io.clj
clojure
is just validates that it doesn't crash
(ns mikera.image.test-io (:use mikera.image.core) (:use clojure.test) (:require [clojure.java.io :refer [as-file resource input-stream]]) (:import javax.imageio.ImageIO javax.imageio.ImageWriter javax.imageio.ImageWriteParam)) (set! *warn-on-reflection* true) (set! *unchecked-math* true) ...
02d936e560bbffa23c101bd7f05c8ecce685002b1aef97df9a4227ec8c970a84
avsm/platform
opamPinned.mli
(**************************************************************************) (* *) Copyright 2012 - 2015 OCamlPro Copyright 2012 INRIA (* ...
null
https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/state/opamPinned.mli
ocaml
************************************************************************ All rights reserved. This file is distributed under the terms of the exception on linking descr...
Copyright 2012 - 2015 OCamlPro Copyright 2012 INRIA GNU Lesser General Public License version 2.1 , with the special open OpamTypes open OpamStateTypes val version: 'a switch_state -> name -> version val pack...
905994c6580d85c897d91e853ddd8ac5ae69f7f88f6ec2bbf02df74266a7c761
aggieben/weblocks
runtime-class.lisp
(in-package :weblocks-test) (deftest make-class-1 (let ((obj (make-instance (make-class '(foo bar baz))))) (values (slot-value obj 'foo) (slot-value obj 'bar) (slot-value obj 'baz))) nil nil nil) (deftest make-class-2 (let ((obj (make-instance (make-class '(foo bar baz))))) (setf ...
null
https://raw.githubusercontent.com/aggieben/weblocks/8d86be6a4fff8dde0b94181ba60d0dca2cbd9e25/test/utils-test/runtime-class.lisp
lisp
(in-package :weblocks-test) (deftest make-class-1 (let ((obj (make-instance (make-class '(foo bar baz))))) (values (slot-value obj 'foo) (slot-value obj 'bar) (slot-value obj 'baz))) nil nil nil) (deftest make-class-2 (let ((obj (make-instance (make-class '(foo bar baz))))) (setf ...
c02dd9d774e2cd0a972a9be5c7b55c1c06a6a128c0ac524a446444dbcd52cf52
michaelmelanson/cminus-compiler
RuntimeEnvironment.hs
module Compiler.CodeGeneration.RuntimeEnvironment where import Compiler.Syntax import Compiler.SymbolTable import Compiler.CodeGeneration.CompilationState import Compiler.CodeGeneration.InstructionSet import Compiler.TypeChecking.Nameable frame = Memory (-1) fp assign name reg = do addr...
null
https://raw.githubusercontent.com/michaelmelanson/cminus-compiler/667d760d74fbb239335f1a5266006cf3baca4959/Compiler/CodeGeneration/RuntimeEnvironment.hs
haskell
push return address push frame pop frame Call the function as if it were void Get its return value
module Compiler.CodeGeneration.RuntimeEnvironment where import Compiler.Syntax import Compiler.SymbolTable import Compiler.CodeGeneration.CompilationState import Compiler.CodeGeneration.InstructionSet import Compiler.TypeChecking.Nameable frame = Memory (-1) fp assign name reg = do addr...
a7cfcaddebbd52cfbd5e5aab8936d93f0393f91ee499d458a59cd1a06744fbc7
pkel/cpr
orderedQueue.ml
(* ordered queue * invariant: top element is next in queue *) type ('a, 'b) tree = | Empty | Node of 'a * 'b * ('a, 'b) tree * ('a, 'b) tree type ('a, 'b) t = { tree : ('a, 'b) tree ; compare : 'a -> 'a -> int ; len : int } let init compare = { compare; tree = Empty; len = 0 } let length t = t.len let ...
null
https://raw.githubusercontent.com/pkel/cpr/f552ada6297069de73bb7403adf3df0c65e7d5c5/simulator/lib/orderedQueue.ml
ocaml
ordered queue * invariant: top element is next in queue
type ('a, 'b) tree = | Empty | Node of 'a * 'b * ('a, 'b) tree * ('a, 'b) tree type ('a, 'b) t = { tree : ('a, 'b) tree ; compare : 'a -> 'a -> int ; len : int } let init compare = { compare; tree = Empty; len = 0 } let length t = t.len let queue time evt t = let rec h time evt = function | Empty -...
229f247be1b5bbb6a4f25041eb8c4550deecabedda367df78fb1a21582d7f704
dmitryvk/sbcl-win32-threads
compiler.impure-cload.lisp
(eval-when (:compile-toplevel :load-toplevel :execute) (load "assertoid.lisp") (load "compiler-test-util.lisp") (load "test-util.lisp") (use-package "ASSERTOID")) bug 254 : compiler falure (defpackage :bug254 (:use :cl)) (in-package :bug254) (declaim (optimize (safety 3) (debug 2) (speed 2) (space 1))) (defs...
null
https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/tests/compiler.impure-cload.lisp
lisp
compiler failure BLOCK-LAST in CONSTANT-FOLD-CALL and DO-NODES zombie variables, arising from constraints of FIND-RESULT-TYPE in dealing with deleted code; reported by Nikodemus Siivola (simplified version) (iter (for i in '(1 2 3)) (+ i 50)) this be a nasal demon, but test anyways broken inference of an uppe...
(eval-when (:compile-toplevel :load-toplevel :execute) (load "assertoid.lisp") (load "compiler-test-util.lisp") (load "test-util.lisp") (use-package "ASSERTOID")) bug 254 : compiler falure (defpackage :bug254 (:use :cl)) (in-package :bug254) (declaim (optimize (safety 3) (debug 2) (speed 2) (space 1))) (defs...
ca58750638028d33e96aea196eab1297943fa8d6f11c8db511f5488abff76812
liquidz/frontmatter
core_test.clj
(ns frontmatter.core-test (:require [frontmatter.core :refer :all] [midje.sweet :refer :all] [conjure.core :refer :all])) (defn- test-path [name] (str "./test/files/" name)) (def ^:private expected-data {:frontmatter {:hello "world" :nums ["one" "two" "three"]} :body ...
null
https://raw.githubusercontent.com/liquidz/frontmatter/34a86ed3c6524f63cb457079c1316d9707be061a/test/frontmatter/core_test.clj
clojure
(ns frontmatter.core-test (:require [frontmatter.core :refer :all] [midje.sweet :refer :all] [conjure.core :refer :all])) (defn- test-path [name] (str "./test/files/" name)) (def ^:private expected-data {:frontmatter {:hello "world" :nums ["one" "two" "three"]} :body ...
76e7e4c992c227e8fc128301d6b9d62c3001837e55e2a3a09c11a7427ef414a2
snoyberg/haskellers
Job.hs
# LANGUAGE QuasiQuotes , OverloadedStrings , TemplateHaskell # module Handler.Job ( getJobsR , postJobsR , getJobR , getJobsFeedR , postCloseJobR ) where import Import import Data.Maybe (fromMaybe) import Data.Time import Yesod.Form.Jquery import Yesod.Form.Nic import Control.Monad (unless) imp...
null
https://raw.githubusercontent.com/snoyberg/haskellers/ff152a73902f0e0e55615c83cfc5e888d052f1e3/src/Handler/Job.hs
haskell
# LANGUAGE QuasiQuotes , OverloadedStrings , TemplateHaskell # module Handler.Job ( getJobsR , postJobsR , getJobR , getJobsFeedR , postCloseJobR ) where import Import import Data.Maybe (fromMaybe) import Data.Time import Yesod.Form.Jquery import Yesod.Form.Nic import Control.Monad (unless) imp...
a675c226e05ff879b453e475117ff52d7194dd29faa12cdb81f942525808d5ae
bdeket/rktsicm
frame-maker.rkt
#lang s-exp "../generic.rkt" (provide (all-defined-out)) (require (only-in "../rkt/glue.rkt" if) "../general/assert.rkt" "../general/eq-properties.rkt" ) bdk ; ; start original file ;;;; System code for making frames ;;; Every frame has a name, and a frame that it is built on (which may ...
null
https://raw.githubusercontent.com/bdeket/rktsicm/225a43bc3d9953f9dbbdbfb2fa4a50028a7a41ce/rktsicm/sicm/calculus/frame-maker.rkt
racket
; start original file System code for making frames Every frame has a name, and a frame that it is built on (which may be #f). Every frame owns coordinates that it may coerce to an absolute event or that it may export as its representation of an absolute event.
#lang s-exp "../generic.rkt" (provide (all-defined-out)) (require (only-in "../rkt/glue.rkt" if) "../general/assert.rkt" "../general/eq-properties.rkt" ) (define ((frame-maker c->e e->c) name ancestor-frame . params) (define (coordinates->event coords) (assert (eq? (frame-owner...
52cda0f65cc3a0835de28ed796e03673b528b463e1451894d05458411c259878
jgoerzen/configfile
Types.hs
Copyright ( C ) 2004 - 2008 < > This program is free software ; you can redistribute it and/or modify it , as specified in the COPYRIGHT file , under the terms of either version 2.1 of the LGPL ( or , at your option , any later version ) or the 3 - clause BSD license . Copyright (C) 2004-2008 John Goerzen...
null
https://raw.githubusercontent.com/jgoerzen/configfile/d0a2e654be0b73eadbf2a50661d00574ad7b6f87/src/Data/ConfigFile/Types.hs
haskell
| Internal output from parser | Names of sections | Names of options | Storage of options. | Possible ConfigParser errors. ^ Attempt to create an already-existing ection ^ The section does not exist ^ The option does not exist ^ Miscellaneous error ^ Raised by 'Data.ConfigFile.interpolatingAccess' if a r...
Copyright ( C ) 2004 - 2008 < > This program is free software ; you can redistribute it and/or modify it , as specified in the COPYRIGHT file , under the terms of either version 2.1 of the LGPL ( or , at your option , any later version ) or the 3 - clause BSD license . Copyright (C) 2004-2008 John Goerzen...
1bd24eb08bbea5f4d5e39aadf528638319b8402d4b8550c9b0ba30ef9f44e9d2
zadean/xqerl
xqerl_mod_array.erl
Copyright ( c ) 2017 - 2020 . SPDX - FileCopyrightText : 2022 % SPDX - License - Identifier : Apache-2.0 %% @doc Implements the "-functions/array" namespace. -module(xqerl_mod_array). -include("xqerl.hrl"). -define(NS, <<"-functions/array">>). -define(PX, <<"array">>). -'module-namespace'({?NS, ?PX...
null
https://raw.githubusercontent.com/zadean/xqerl/06c651ec832d0ac2b77bef92c1b4ab14d8da8883/src/xqerl_mod_array.erl
erlang
@doc Implements the "-functions/array" namespace. internal use Returns an array containing all the members of a supplied array, Returns an array containing those members of the $array for which $function returns true. Replaces any array appearing in a supplied sequence with the members of the array, recursively....
Copyright ( c ) 2017 - 2020 . SPDX - FileCopyrightText : 2022 SPDX - License - Identifier : Apache-2.0 -module(xqerl_mod_array). -include("xqerl.hrl"). -define(NS, <<"-functions/array">>). -define(PX, <<"array">>). -'module-namespace'({?NS, ?PX}). -functions([ { {qname, ?NS, ?PX, <<"ap...
cb2cebdcaf55a88928f883f8b22808428bca73892f20cd1146115d04a1b95ccc
jbclements/molis-hai
word-model.rkt
#lang typed/racket (require "shared-types.rkt" "build-model.rkt" "use-model.rkt") (provide build-word-model generate-word-pwd) ;; run the analyses for a given "order" (: build-word-model (Natural (Listof String) -> (Model (Listof String) String))) (define (build-word-model n text) (kvcou...
null
https://raw.githubusercontent.com/jbclements/molis-hai/6a335ec73c144f9d8ac538752ca8e6fd0b3b3cce/molis-hai/word-model.rkt
racket
run the analyses for a given "order" given a list of strings and a source text, build a hash ofthe number of times each n-gram transitions to a given word add the beginning to the end to get the wraparound transitions, too: make a list of random booleans of the specified length
#lang typed/racket (require "shared-types.rkt" "build-model.rkt" "use-model.rkt") (provide build-word-model generate-word-pwd) (: build-word-model (Natural (Listof String) -> (Model (Listof String) String))) (define (build-word-model n text) (kvcount->model (n-word-kvcount n text) all-go...
814c4baf389e03abe70f21d08db9da587cd3e0646c59e81ce500b58c76671b63
ocaml-sf/learn-ocaml-corpus
solution.ml
(* The type [parser] satisfies the monad API: [return], [>>=]. *) (* [return a] always succeeds, consumes no input, and returns [a]. *) let return (a : 'a) : 'a parser = fun cursor -> NonDet.return (a, cursor) (* [p >>= f] is the sequential composition of the parsers [p] and [f]. *) let (>>=) (p : 'a parser) ...
null
https://raw.githubusercontent.com/ocaml-sf/learn-ocaml-corpus/7dcf4d72b49863a3e37e41b3c3097aa4c6101a69/exercises/fpottier/parser_combinators/solution.ml
ocaml
The type [parser] satisfies the monad API: [return], [>>=]. [return a] always succeeds, consumes no input, and returns [a]. [p >>= f] is the sequential composition of the parsers [p] and [f]. The type [parser] supports the nondeterminism monad API: [fail], [choose], [at_most_once]. The parser [fail] accepts...
let return (a : 'a) : 'a parser = fun cursor -> NonDet.return (a, cursor) let (>>=) (p : 'a parser) (f : 'a -> 'b parser) : 'b parser = fun cursor -> let open NonDet in p cursor >>= fun (a, cursor) -> f a cursor let fail : 'a parser = fun cursor -> NonDet.fail let choose (p : 'a parse...
dd610cec3e939d1fc028f76e232c66bdebc53f96e035bc96252254e1f36d554c
backtracking/mlpost
types.ml
(**************************************************************************) (* *) Copyright ( C ) Johannes Kanig , , and (* *) (* This software is f...
null
https://raw.githubusercontent.com/backtracking/mlpost/e82db2d3766f24392956478496fa26c8837c1fef/src/types.ml
ocaml
************************************************************************ This software is free software; you can redistribute it and/or described in file LICENSE....
Copyright ( C ) Johannes Kanig , , and modify it under the terms of the GNU Library General Public License version 2.1 , with the special exception on linking type name = string include Concrete_types type corner = [ `Northwest | `Northeast | `Southwest ...
d3fc503007c4af73737404c6c101b90792e153ff8bd94f925f2a1e0424bc2ae4
AntidoteDB/gingko
clocksi_SUITE.erl
%% ------------------------------------------------------------------- %% Copyright < 2013 - 2018 > < Technische Universität Kaiserslautern , Germany , France Universidade NOVA de Lisboa , Portugal Université catholique de Louvain ( UCL ) , Belgique , Portugal %% > %% This file is provided...
null
https://raw.githubusercontent.com/AntidoteDB/gingko/a965979aefb2868abcd0b3bf5ed1b5e4f9fdd163/test/singledc/clocksi_SUITE.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 expressed or implied. See the License for the specific language governing perm...
Copyright < 2013 - 2018 > < Technische Universität Kaiserslautern , Germany , France Universidade NOVA de Lisboa , Portugal Université catholique de Louvain ( UCL ) , Belgique , Portugal This file is provided to you under the Apache License , except in compliance with the License . You...
681a09398919be8c687d2116f9ef14449107ed5a48584f5aea6e33083f5b8d6b
b4winckler/tag
Main.hs
-- -- Operation: * When one or more filenames are specified the program will look for audio -- tags in those files (and ignore files with no tag). If an option to -- modify a tag is used then the files will be modified. Otherwise all -- recognized tags are printed to stdout. * When no filenames are spe...
null
https://raw.githubusercontent.com/b4winckler/tag/e08bc91da8c1d2759cfc28f7e3f7e3c2c683615d/src/Main.hs
haskell
Operation: tags in those files (and ignore files with no tag). If an option to modify a tag is used then the files will be modified. Otherwise all recognized tags are printed to stdout. from audio files and pipe the output to a filter (e.g. awk) and finally a limitation of the program, but rathe...
* When one or more filenames are specified the program will look for audio * When no filenames are specified TSV formatted input is read from stdin ( the first line must be a header ) . The use case is to first read tags to pipe this to the program which reads the TSV from stdin . * The TSV header ...
ddeffaca365151e8c195597e658ac4ffa39ae1e25480c7e9f47cf9a204bafb22
clojure-interop/aws-api
AmazonRoute53ResolverClientBuilder.clj
(ns com.amazonaws.services.route53resolver.AmazonRoute53ResolverClientBuilder "Fluent builder for AmazonRoute53Resolver. Use of the builder is preferred over using constructors of the client class." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.services.route53resolver AmazonRoute53Re...
null
https://raw.githubusercontent.com/clojure-interop/aws-api/59249b43d3bfaff0a79f5f4f8b7bc22518a3bf14/com.amazonaws.services.route53resolver/src/com/amazonaws/services/route53resolver/AmazonRoute53ResolverClientBuilder.clj
clojure
(ns com.amazonaws.services.route53resolver.AmazonRoute53ResolverClientBuilder "Fluent builder for AmazonRoute53Resolver. Use of the builder is preferred over using constructors of the client class." (:refer-clojure :only [require comment defn ->]) (:import [com.amazonaws.services.route53resolver AmazonRoute53Re...
68fd13b5ce43d7c2ab6b88cfdb8996795c9461667e973c78643cd03a5c7bbe73
JHU-PL-Lab/jaylang
inductive.ml
let rec loop x i = if i < 0 then x else if x < 1 then loop (x - 1) (i - 1) else if x > 2 then loop x (i - 1) else loop (3 - x) (i - 1) let main n = assert (loop 3 n >= 3); assert (loop 1 n >= 0)
null
https://raw.githubusercontent.com/JHU-PL-Lab/jaylang/484b3876986a515fb57b11768a1b3b50418cde0c/benchmark/cases/mochi_origin/fpice/inductive.ml
ocaml
let rec loop x i = if i < 0 then x else if x < 1 then loop (x - 1) (i - 1) else if x > 2 then loop x (i - 1) else loop (3 - x) (i - 1) let main n = assert (loop 3 n >= 3); assert (loop 1 n >= 0)
fd6c1ae5c2d31fbdd54e81a80b1b620d75bdf5734706f324d2907591cd6baf1e
jvf/scalaris
sup_yaws.erl
2011 , 2012 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; % you may not use this file except in compliance with the License. % You may obtain a copy of the License at % % -2.0 % % Unless required by applicable law or agreed to in writing, software di...
null
https://raw.githubusercontent.com/jvf/scalaris/c069f44cf149ea6c69e24bdb08714bda242e7ee0/src/sup_yaws.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language gov...
2011 , 2012 Zuse Institute Berlin Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , @author < > -module(sup_yaws). -author(''). -vsn('$Id$'). -behaviour(supervisor). -export([start_link/0, init/1, check_config/0...
9cfd747ebc92e515178f5b098d7d119d8b1526b644dea2d5c158711d52212b54
herd/herdtools7
word.ml
(****************************************************************************) (* the diy toolsuite *) (* *) , University College London , UK . , INRIA Par...
null
https://raw.githubusercontent.com/herd/herdtools7/b86aec8db64f8812e19468893deb1cdf5bbcfb83/litmus/word.ml
ocaml
************************************************************************** the diy toolsuite en Automatique and ...
, University College London , UK . , INRIA Paris - Rocquencourt , France . Copyright 2013 - present Institut National de Recherche en Informatique et This software is governed by the CeCILL - B license under French law and modify and/ or redistribu...
d12056f7192819a6c21be65ba50f39ba6075e1b381febf0f8c4965f07028ffa4
DavidAlphaFox/RabbitMQ
ws_timeout_hibernate_handler.erl
%% Feel free to use, reuse and abuse the code in this file. -module(ws_timeout_hibernate_handler). -behaviour(cowboy_http_handler). -behaviour(cowboy_http_websocket_handler). -export([init/3, handle/2, terminate/2]). -export([websocket_init/3, websocket_handle/3, websocket_info/3, websocket_terminate/3]). init(_Any,...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/cowboy-wrapper/cowboy-git/test/ws_timeout_hibernate_handler.erl
erlang
Feel free to use, reuse and abuse the code in this file.
-module(ws_timeout_hibernate_handler). -behaviour(cowboy_http_handler). -behaviour(cowboy_http_websocket_handler). -export([init/3, handle/2, terminate/2]). -export([websocket_init/3, websocket_handle/3, websocket_info/3, websocket_terminate/3]). init(_Any, _Req, _Opts) -> {upgrade, protocol, cowboy_http_websocket}...
4b2c20b0b4c3340b7e428c307a07b6dc7969090a6aee2de2a9de6bc7422ce75b
RefactoringTools/HaRe
P4.hs
module P4 where --Any type/data constructor name declared in this module can be renamed. --Any type variable can be renamed. Rename type Constructor ' BTree ' to ' MyBTree ' data BTree a = Empty | T a (BTree a) (BTree a) deriving Show buildtree :: Ord a => [a] -> BTree a buildtree [] = Empty buildtre...
null
https://raw.githubusercontent.com/RefactoringTools/HaRe/ef5dee64c38fb104e6e5676095946279fbce381c/old/testing/unfoldAsPatterns/P4.hs
haskell
Any type/data constructor name declared in this module can be renamed. Any type variable can be renamed.
module P4 where Rename type Constructor ' BTree ' to ' MyBTree ' data BTree a = Empty | T a (BTree a) (BTree a) deriving Show buildtree :: Ord a => [a] -> BTree a buildtree [] = Empty buildtree (x:xs) = insert x (buildtree xs) insert :: Ord a => a -> (BTree a, BTree a) -> BTree a insert val (Empty, ...
e6a86bb3070ecdafc197efe7a63a0e33838073e9ca2992a3a4c287c9ac4a627a
dimitri/pgcharts
cache.lisp
(in-package #:pgcharts) ;;; ;;; Cache all the on-disk static files (bootstrap, jquery, css, markdown ;;; docs etc) at load time so that we can have an all-included binary file ;;; for real. ;;; Hunchentoot web server integration ;;; (defun handle-loaded-file (script-name &optional content-type) "A function whic...
null
https://raw.githubusercontent.com/dimitri/pgcharts/9b9549c53cca77039e8aaca18bce939ecb2b6549/src/utils/cache.lisp
lisp
Cache all the on-disk static files (bootstrap, jquery, css, markdown docs etc) at load time so that we can have an all-included binary file for real. file does not exist To simplify stealing code from hunchentoot Rework some hunchentoot internals that expect file streams so that they work with our in-memor...
(in-package #:pgcharts) Hunchentoot web server integration (defun handle-loaded-file (script-name &optional content-type) "A function which act like the hunchentoot::handle-static-file function, against our *fs* in-memory pseudo file-system." (let ((content (gethash script-name *fs*))) (unless content ...
c0dab82ee667eb3af67eecc0ada62c94e6ff2abf943dcb4d72114f311dac79fe
slipstream/SlipStreamServer
configuration_github_lifecycle_test.clj
(ns com.sixsq.slipstream.ssclj.resources.configuration-github-lifecycle-test (:require [clojure.test :refer [deftest use-fixtures]] [com.sixsq.slipstream.ssclj.resources.configuration-lifecycle-test-utils :as test-utils] [com.sixsq.slipstream.ssclj.resources.configuration-template-session-github :as githu...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/test/com/sixsq/slipstream/ssclj/resources/configuration_github_lifecycle_test.clj
clojure
(ns com.sixsq.slipstream.ssclj.resources.configuration-github-lifecycle-test (:require [clojure.test :refer [deftest use-fixtures]] [com.sixsq.slipstream.ssclj.resources.configuration-lifecycle-test-utils :as test-utils] [com.sixsq.slipstream.ssclj.resources.configuration-template-session-github :as githu...
95e90ad9a59b8e71a4536682c9eb4db89d2074df71d7748c77bfa9e6565b242d
mcorbin/tour-of-clojure
variable.clj
(def foo 1) (println foo "\n") (def bar [1 2 3]) (println bar "\n") ;; variables in clojure are immutable (println (conj bar 4)) ;; bar has not changed (println bar "\n")
null
https://raw.githubusercontent.com/mcorbin/tour-of-clojure/57f97b68ca1a8c96904bfb960f515217eeda24a6/resources/public/pages/code/variable.clj
clojure
variables in clojure are immutable bar has not changed
(def foo 1) (println foo "\n") (def bar [1 2 3]) (println bar "\n") (println (conj bar 4)) (println bar "\n")
a084853aadcabd8f016841b9e6cbe2eb9a6568bb97be1698742de88941938fae
charlieg/Sparser
loader.lisp
;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- copyright ( c ) 1993 -- all rights reserved ;;; ;;; File: "loader" Module : " objects;chart : generics : " Version : July 1993 initiated 7/16/93 v2.3 -- repackaging files from objects : forms : (in-package :sparser) (lload "c...
null
https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/objects/chart/generics/loader.lisp
lisp
-*- Mode:LISP; Syntax:Common-Lisp; Package:SPARSER -*- File: "loader"
copyright ( c ) 1993 -- all rights reserved Module : " objects;chart : generics : " Version : July 1993 initiated 7/16/93 v2.3 -- repackaging files from objects : forms : (in-package :sparser) (lload "chart;generics:resolve1") (lload "chart;generics:delete") (lload "chart;generics:plist") (...
be1dcc3064bd833608e5145a05e9267aebfcd1ee3c4af94fb233fc6e997699a7
lem-project/lem
ncurses-pdcurseswin32.lisp
(in-package :lem-ncurses) ;; load windows dll ;; (we load ntdll.dll and winmm.dll with a full path because they aren't listed in ) (cffi:load-foreign-library '(:default "kernel32")) (let* ((csize 1024) (cbuf (cffi:foreign-alloc :char :count csize :initial-element 0)) (sysdir "")) (if (zerop (...
null
https://raw.githubusercontent.com/lem-project/lem/5ef351568db6cf7a3ae832dd88ecfab482f4e0f4/frontends/pdcurses/ncurses-pdcurseswin32.lisp
lisp
load windows dll (we load ntdll.dll and winmm.dll with a full path because they aren't ( -win10-jp ) windows console code page escape key delay setting because some combination input with alt key doesn't work (e.g. M-< ). However, if you use vi-mode, you might need to set it to a small value popup window m...
(in-package :lem-ncurses) listed in ) (cffi:load-foreign-library '(:default "kernel32")) (let* ((csize 1024) (cbuf (cffi:foreign-alloc :char :count csize :initial-element 0)) (sysdir "")) (if (zerop (cffi:foreign-funcall "GetSystemDirectoryA" :pointer cbuf :i...
ceb85a289f61056d754660f04c966829e6d5c9c83fd56fc813ca60502230847b
tolitius/verter
tools.clj
(ns verter.test.tools (:require [next.jdbc :as jdbc] [hikari-cp.core :as hk] [clojure.java.io :as io] [verter.store :as vs]) (:import [com.zaxxer.hikari.pool HikariProxyConnection])) (defn make-db [db-name] (hk/make-datasource {:jdbc-url (str "jdbc:sqlite:/tmp/" db-name ".db")...
null
https://raw.githubusercontent.com/tolitius/verter/8619372d44e86bee4c4c4f4da5b12709cb8b7e43/test/verter/test/tools.clj
clojure
(ns verter.test.tools (:require [next.jdbc :as jdbc] [hikari-cp.core :as hk] [clojure.java.io :as io] [verter.store :as vs]) (:import [com.zaxxer.hikari.pool HikariProxyConnection])) (defn make-db [db-name] (hk/make-datasource {:jdbc-url (str "jdbc:sqlite:/tmp/" db-name ".db")...
81049b5078f1673dfbcc05270dda86668f0fa7d3a84eb3d813c04ef659365fef
quil-lang/quilc
qubit-heuristic.lisp
(in-package :cl-quil) (defvar *addresser-swap-lookahead-depth* 2 "Controls the length of SWAP chains explored the GREEDY-QUBIT heuristic. WARNING: This value makes the SWAP-selection stage run as O((# 2Q links)^(*addresser-swap-lookahead-depth*)). Beware making it too large.") (defun cost-lowering-candidates (rewi...
null
https://raw.githubusercontent.com/quil-lang/quilc/3f3260aaa65cdde25a4f9c0027959e37ceef9d64/src/addresser/qubit-heuristic.lisp
lisp
make sure we haven't been here before compute the cost for this rewiring compute the new cost value cost-function expects its instruction to be logically-addressed, and will then use the provided rewiring to map back to physical addresses before nativizing the instruction. TODO: this assumes only SWAPs exist i...
(in-package :cl-quil) (defvar *addresser-swap-lookahead-depth* 2 "Controls the length of SWAP chains explored the GREEDY-QUBIT heuristic. WARNING: This value makes the SWAP-selection stage run as O((# 2Q links)^(*addresser-swap-lookahead-depth*)). Beware making it too large.") (defun cost-lowering-candidates (rewi...
9467f65c76ec9d7fa5bae41534a1443aa42ada09ac7e328a6e0c74dad1ab4d72
muyinliu/cl-disruptor
cl-disruptor.lisp
(in-package :disruptor) (defun list-form-length (form) (cond ((and (listp form) (eq 'quote (first form)) (listp (first (rest form)))) (length (first (rest form)))) ((and (listp form) (eq 'list (first form)) (listp (rest form))) (length...
null
https://raw.githubusercontent.com/muyinliu/cl-disruptor/7488b9c23d3ee50a92cd33b500e74eff3f1bcee4/src/cl-disruptor.lisp
lisp
(in-package :disruptor) (defun list-form-length (form) (cond ((and (listp form) (eq 'quote (first form)) (listp (first (rest form)))) (length (first (rest form)))) ((and (listp form) (eq 'list (first form)) (listp (rest form))) (length...
8974fbc4a3c1d4d55db95e6791924a78d4b1bf71b55ff9c840738e3a5b968b8b
monadbobo/ocaml-core
core_filename.ml
module String = Core_string module List = Core_list open Core_printf include struct open Caml.Filename let check_suffix = check_suffix let chop_extension = chop_extension let chop_suffix = chop_suffix let current_dir_name = current_dir_name let is_implicit = is_implicit let is_relative = is_relative l...
null
https://raw.githubusercontent.com/monadbobo/ocaml-core/9c1c06e7a1af7e15b6019a325d7dbdbd4cdb4020/base/core/lib/core_filename.ml
ocaml
Pathname resolution Finds the largest index i in [s] that is less than [from] and for which [f s.[i]] returns true. Then it returns [i+1]. Raises an exception if [from] isn't a valid index in [s]. [max_pathname_component_size] comes from getconf _POSIX_NAME_MAX / these functions are the same ...
module String = Core_string module List = Core_list open Core_printf include struct open Caml.Filename let check_suffix = check_suffix let chop_extension = chop_extension let chop_suffix = chop_suffix let current_dir_name = current_dir_name let is_implicit = is_implicit let is_relative = is_relative l...
89a340091fe9852a18a8e57dee6ce47844f372863ca1a760deb41f3d410e8f99
dariusf/ppx_polyprint
PPTypemod.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet ...
null
https://raw.githubusercontent.com/dariusf/ppx_polyprint/6cd87e948a27888d251f851424ad8bd5545989ad/src/typing/PPTypemod.mli
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . open Types open Format val type_modul...
7641f98c5f9e1f0898d3ad17e7780c626d90d04b706723509c0954c2a3c0244d
cram-code/cram_core
run-tests.lisp
Copyright ( c ) 2012 , < > ;;; All rights reserved. ;;; ;;; Redistribution and use in source and binary forms, with or without ;;; modification, are permitted provided that the following conditions are met: ;;; ;;; * Redistributions of source code must retain the above copyright ;;; notice, this list o...
null
https://raw.githubusercontent.com/cram-code/cram_core/984046abe2ec9e25b63e52007ed3b857c3d9a13c/cram_process_modules/test/run-tests.lisp
lisp
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Red...
Copyright ( c ) 2012 , < > * Neither the name of the Intelligent Autonomous Systems Group/ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED . IN NO EVENT SHALL THE COPYRIGHT OWNER OR ...
3ede2bd9d936d778df864c0a0121addd2c1705a453006393bb84d4f1b7110716
stephenpascoe/hs-arrow
FileOutputStream.hs
| Copyright : , and License : LGPL-2.1 Maintainer : ( ) It wraps @arrow::io::FileOutputStream@. Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria () It wraps @arrow::io::FileOutputStream@. -} #define ENABLE_O...
null
https://raw.githubusercontent.com/stephenpascoe/hs-arrow/86c7c452a8626b1d69a3cffd277078d455823271/gi-arrow/GI/Arrow/Objects/FileOutputStream.hs
haskell
* Exported types * Methods # SOURCE # # SOURCE # # SOURCE # | Memory-managed wrapper type. | Type class for types which can be safely cast to `FileOutputStream`, for instance with `toFileOutputStream`. # OVERLAPPABLE # | A convenience alias for `Nothing` :: `Maybe` `FileOutputStream`. method type : Constructor L...
| Copyright : , and License : LGPL-2.1 Maintainer : ( ) It wraps @arrow::io::FileOutputStream@. Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria () It wraps @arrow::io::FileOutputStream@. -} #define ENABLE_O...
a3043dba976f35640dc4abd5adec03659f62fcb39586b75e0ec0bc59b0b61588
mzp/coq-ide-for-ios
environ.mli
open Names open Term (* Environments *) type globals = { env_constants : Declarations.constant_body Cmap_env.t; env_inductives : Declarations.mutual_inductive_body Mindmap_env.t; env_inductives_eq : kernel_name KNmap.t; env_modules : Declarations.module_body MPmap.t; env_modtypes : Declarations.module_type_...
null
https://raw.githubusercontent.com/mzp/coq-ide-for-ios/4cdb389bbecd7cdd114666a8450ecf5b5f0391d3/coqlib/checker/environ.mli
ocaml
Environments Engagement de Bruijn variables Named variables Constants Inductives Modules
open Names open Term type globals = { env_constants : Declarations.constant_body Cmap_env.t; env_inductives : Declarations.mutual_inductive_body Mindmap_env.t; env_inductives_eq : kernel_name KNmap.t; env_modules : Declarations.module_body MPmap.t; env_modtypes : Declarations.module_type_body MPmap.t} type ...
8fce775731c0d1c9c6d376c5106c2ecd6871f36bb55e7def9dc5f167a7df773a
GaloisInc/cryptol
Sat.hs
# LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE ViewPatterns # module CryptolServer.Sat ( proveSat , proveSatDescr , ProveSatParams(..) ) where import qualified Argo.Doc as Doc import Control...
null
https://raw.githubusercontent.com/GaloisInc/cryptol/69f07cc4e389bb7ccd3c5e2ca5ddbdc5f39ea7a3/cryptol-remote-api/src/CryptolServer/Sat.hs
haskell
# LANGUAGE OverloadedStrings # TODO validEvalContext expr, ty, schema | Prover name. | Prover name. | Whether hash consing is enabled. | Prover name. | Type of expression sat is being called for.
# LANGUAGE LambdaCase # # LANGUAGE MultiParamTypeClasses # # LANGUAGE NamedFieldPuns # # LANGUAGE ScopedTypeVariables # # LANGUAGE ViewPatterns # module CryptolServer.Sat ( proveSat , proveSatDescr , ProveSatParams(..) ) where import qualified Argo.Doc as Doc import Control.Applicative import Control.Monad.I...
657b312f01c0b1dc9cd29beb1360975218908e5c616fc07985815132d0291a74
hasufell/stack2cabal
Types.hs
module StackageToHackage.Hackage.Types where import StackageToHackage.Stackage.Types (Ghc, Git, GhcOptions, PkgName, FlagName) import Data.List.NonEmpty (NonEmpty) import Data.Map.Strict (Map) import Distribution.Types.PackageId (PackageIdentifier(..)) import Distribution.Types.PackageName (unPackageName) import qua...
null
https://raw.githubusercontent.com/hasufell/stack2cabal/afa113beb77569ff21f03fade6ce39edc109598d/lib/StackageToHackage/Hackage/Types.hs
haskell
module StackageToHackage.Hackage.Types where import StackageToHackage.Stackage.Types (Ghc, Git, GhcOptions, PkgName, FlagName) import Data.List.NonEmpty (NonEmpty) import Data.Map.Strict (Map) import Distribution.Types.PackageId (PackageIdentifier(..)) import Distribution.Types.PackageName (unPackageName) import qua...
18b697428b440bce9892a61141a5d10d6c6715d282210c7309ac7d9b77ca6037
qnikst/irc-simple
Protocol.hs
После , я начал с этого , я понял что мне очень не нравится это файл и я бы все переделал . -- Отображать все сообщения для ADT та ещё задача тем более , что их будет много . и нормально , то парсер написан не самым эффективным образом . объединить парсер с case split в коде Server.hs . -- -- В...
null
https://raw.githubusercontent.com/qnikst/irc-simple/6deaec9c240b0e9023257b96e0328e883e0760a8/src/Protocol.hs
haskell
Впрочем это работает и можно обосновать. # LANGUAGE OverloadedStrings # у нас какие-то проблемы с контентом сообщения то мы это увидим. | присоединиться к каналу | Послать сообщение | Сменить ник
После , я начал с этого , я понял что мне очень не нравится это файл и я бы все переделал . Отображать все сообщения для ADT та ещё задача тем более , что их будет много . и нормально , то парсер написан не самым эффективным образом . объединить парсер с case split в коде Server.hs . module Pro...
79dfe3fef512f6079605f97e1e53055b7e6994943df69ff313c6ae3daa92105d
mumuki/mulang
TypedInspectorSpec.hs
module TypedInspectorSpec (spec) where import Test.Hspec import Language.Mulang.Inspector.Typed import Language.Mulang.Identifier (named) import Language.Mulang.Parsers.Haskell import Language.Mulang.Parsers.Java (java) spec :: Spec spec = do describe "typesReturnAs...
null
https://raw.githubusercontent.com/mumuki/mulang/92684f687566b2adafb331eae5b5916e2d90709e/spec/TypedInspectorSpec.hs
haskell
module TypedInspectorSpec (spec) where import Test.Hspec import Language.Mulang.Inspector.Typed import Language.Mulang.Identifier (named) import Language.Mulang.Parsers.Haskell import Language.Mulang.Parsers.Java (java) spec :: Spec spec = do describe "typesReturnAs...
8edf86aa6f051dd177bd3e4236d5b9c87facc4a4e564934ebc4e2a23455576bb
chicken-mobile/chicken-sdl2-android-builder
surface.scm
;; chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2 ;; Copyright © 2013 , 2015 - 2016 . ;; 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...
null
https://raw.githubusercontent.com/chicken-mobile/chicken-sdl2-android-builder/90ef1f0ff667737736f1932e204d29ae615a00c4/eggs/sdl2/lib/sdl2-internals/enums/surface.scm
scheme
All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributio...
chicken - sdl2 : CHICKEN Scheme bindings to Simple DirectMedia Layer 2 Copyright © 2013 , 2015 - 2016 . " AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT COPYRIGHT HOLDER OR FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT N...
7886a520fa40c98f62087fcaab39055f689ddc5d613b4497819907f2a4b42d7c
tfausak/monadoc-5
UrlSpec.hs
module Monadoc.Type.UrlSpec where import qualified Database.SQLite.Simple as Sql import qualified Database.SQLite.Simple.FromField as Sql import qualified Database.SQLite.Simple.Internal as Sql import qualified Database.SQLite.Simple.Ok as Sql import qualified Database.SQLite.Simple.ToField as Sql import Monadoc.Prelu...
null
https://raw.githubusercontent.com/tfausak/monadoc-5/5361dd1870072cf2771857adbe92658118ddaa27/src/test/Monadoc/Type/UrlSpec.hs
haskell
module Monadoc.Type.UrlSpec where import qualified Database.SQLite.Simple as Sql import qualified Database.SQLite.Simple.FromField as Sql import qualified Database.SQLite.Simple.Internal as Sql import qualified Database.SQLite.Simple.Ok as Sql import qualified Database.SQLite.Simple.ToField as Sql import Monadoc.Prelu...
9ee0398e1dea986e47e24407fea9c068039c17d0ba463c21d92b3353fd206620
TrustInSoft/tis-kernel
cabsvisit.mli
(**************************************************************************) (* *) This file is part of . (* *) is a fork of Frama - C. Al...
null
https://raw.githubusercontent.com/TrustInSoft/tis-kernel/748d28baba90c03c0f5f4654d2e7bb47dfbe4e7d/src/kernel_services/visitors/cabsvisit.mli
ocaml
************************************************************************ ...
This file is part of . is a fork of Frama - C. All the differences are : Copyright ( C ) 2016 - 2017 is released under GPLv2 Copyright ( C ) 2001 - 2003 < > ...
30e9238508cce0b8216888e8b3a9f77b83950cd2b40e69f738974fc6b5ca4e63
litxio/ptghci
WebBrowser.hs
module Language.Haskell.PtGhci.WebBrowser where import Language.Haskell.PtGhci.Prelude import Language.Haskell.PtGhci.Env import System.Exit (ExitCode(..)) import System.Process (rawSystem) import Data.Text (unpack) import qualified Web.Browser as WB openBrowser :: Env -> Text -> IO Bool openBrowser env url = do ca...
null
https://raw.githubusercontent.com/litxio/ptghci/bbb3c5fdf2e73a557864b6b1e26833fffb34fc84/src/Language/Haskell/PtGhci/WebBrowser.hs
haskell
module Language.Haskell.PtGhci.WebBrowser where import Language.Haskell.PtGhci.Prelude import Language.Haskell.PtGhci.Env import System.Exit (ExitCode(..)) import System.Process (rawSystem) import Data.Text (unpack) import qualified Web.Browser as WB openBrowser :: Env -> Text -> IO Bool openBrowser env url = do ca...
b9828f345a471d84339a3a30a7bd5bde7bcfb1feb1b9dce16511b673f8985458
slipstream/SlipStreamServer
logger.clj
(ns com.sixsq.slipstream.ssclj.middleware.logger (:require [clojure.string :as str] [clojure.tools.logging :as log] [com.sixsq.slipstream.ssclj.middleware.authn-info-header :as aih])) (defn- display-querystring [request] (str "?" (-> request :query-string (or "") ...
null
https://raw.githubusercontent.com/slipstream/SlipStreamServer/3ee5c516877699746c61c48fc72779fe3d4e4652/cimi/src/com/sixsq/slipstream/ssclj/middleware/logger.clj
clojure
(ns com.sixsq.slipstream.ssclj.middleware.logger (:require [clojure.string :as str] [clojure.tools.logging :as log] [com.sixsq.slipstream.ssclj.middleware.authn-info-header :as aih])) (defn- display-querystring [request] (str "?" (-> request :query-string (or "") ...
cc2c22d4b55e985cc188136dc96bff8c818cb0bb19c1986138b789cb6c05b0fa
ghc/nofib
Main.hs
Taken from paper " Power series , power serious " JFP 9(3 ) May 1999 "Power series, power serious" JFP 9(3) May 1999 -} module Main where import System.IO import Data.Ratio import System.Environment (getArgs) infixl 7 .* infixr 5 :+: default (Integer, Rational, Double) main = do { (n:_) <- getArgs ...
null
https://raw.githubusercontent.com/ghc/nofib/f34b90b5a6ce46284693119a06d1133908b11856/gc/power/Main.hs
haskell
The main implementation follows (0) (0) Convert power series to a list; used in printing. at end of product of polynomials; it works because x is a finite series. but not for infinite series. because this would defeat the property that its operand--a property used in solving differential equati...
Taken from paper " Power series , power serious " JFP 9(3 ) May 1999 "Power series, power serious" JFP 9(3) May 1999 -} module Main where import System.IO import Data.Ratio import System.Environment (getArgs) infixl 7 .* infixr 5 :+: default (Integer, Rational, Double) main = do { (n:_) <- getArgs ...
341e70c460ce998e18532047f1e1f4d3cea93c391acde075948a86ed8cf6bbff
cyverse-archive/DiscoveryEnvironmentBackend
job_view.clj
(ns metadactyl.service.apps.de.job-view (:use [korma.core :exclude [update]] [kameleon.core] [kameleon.entities] [metadactyl.util.conversions :only [remove-nil-vals]]) (:require [metadactyl.metadata.params :as mp] [metadactyl.persistence.app-metadata :as amp])) (defn- mapped-inp...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadactyl-clj/src/metadactyl/service/apps/de/job_view.clj
clojure
(ns metadactyl.service.apps.de.job-view (:use [korma.core :exclude [update]] [kameleon.core] [kameleon.entities] [metadactyl.util.conversions :only [remove-nil-vals]]) (:require [metadactyl.metadata.params :as mp] [metadactyl.persistence.app-metadata :as amp])) (defn- mapped-inp...
cf2c5300ed2f3c1e72950d5aba3f86b7bef3b39d5eed0fe86737cc1f1cbe8276
jaredly/reason-language-server
translobj.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet Cri...
null
https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/402/translobj.mli
ocaml
********************************************************************* OCaml ...
, projet Cristal , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the Q Public License version 1.0 . open Lambda val oo_prim: string -> lambda...
d857e89160d049f0f02f5ebcc668099a34e489fb2de8237d62823bb9fff8980d
imandra-ai/socket.io-client-ocaml
client.ml
Lwt_log.default := Lwt_log.channel ~template:"$(date).$(milliseconds) [$(section)] $(level): $(message)" ~close_mode:`Close ~channel:Lwt_io.stdout () let ( ) = Lwt_log.add_rule " * " . Debug let () = Lwt_main.run Lwt.(Socketio_client.Engineio_client.( Lwt_io.printl "Starting..." >>= fun...
null
https://raw.githubusercontent.com/imandra-ai/socket.io-client-ocaml/c14c048aaeaf80a1848c0a5881855f137f73c2dc/examples/engine.io/client.ml
ocaml
Lwt_log.default := Lwt_log.channel ~template:"$(date).$(milliseconds) [$(section)] $(level): $(message)" ~close_mode:`Close ~channel:Lwt_io.stdout () let ( ) = Lwt_log.add_rule " * " . Debug let () = Lwt_main.run Lwt.(Socketio_client.Engineio_client.( Lwt_io.printl "Starting..." >>= fun...
5fadce02ac9da70d251698d340583ac03f6ce6cf21af18eebc9f6e8d0fc588c6
nikita-volkov/rerebase
WeekDate.hs
module Data.Time.Calendar.WeekDate ( module Rebase.Data.Time.Calendar.WeekDate ) where import Rebase.Data.Time.Calendar.WeekDate
null
https://raw.githubusercontent.com/nikita-volkov/rerebase/25895e6d8b0c515c912c509ad8dd8868780a74b6/library/Data/Time/Calendar/WeekDate.hs
haskell
module Data.Time.Calendar.WeekDate ( module Rebase.Data.Time.Calendar.WeekDate ) where import Rebase.Data.Time.Calendar.WeekDate
8a329c2a2d3216eb8e57affd1b913b6a842389dc57ba09d2074f49e480596f41
phylogeography/spread
core.cljs
(ns ui.router.core (:require [bide.core :as bide] [clojure.string :as string] [mount.core :as mount :refer [defstate]] [re-frame.core :refer [dispatch dispatch-sync]])) (declare router) (defn- hostname-html5-host? [html5-hosts] (when html5-hosts (contains? (cond-> html5-hos...
null
https://raw.githubusercontent.com/phylogeography/spread/56f3500e6d83e0ebd50041dc336ffa0697d7baf8/src/cljs/ui/router/core.cljs
clojure
(ns ui.router.core (:require [bide.core :as bide] [clojure.string :as string] [mount.core :as mount :refer [defstate]] [re-frame.core :refer [dispatch dispatch-sync]])) (declare router) (defn- hostname-html5-host? [html5-hosts] (when html5-hosts (contains? (cond-> html5-hos...
fd3e5a0a7236c78cf04d6101567e5d030225ac7c58e5e16e47350fe6cd214175
realworldocaml/book
expect_test_helpers_core.ml
open! Core include Expect_test_helpers_base include Expect_test_helpers_core_intf module Allocation_limit = struct include Allocation_limit let is_ok t ~major_words_allocated ~minor_words_allocated = match t with | Major_words n -> major_words_allocated <= n | Minor_words n -> major_words_allocated = ...
null
https://raw.githubusercontent.com/realworldocaml/book/d822fd065f19dbb6324bf83e0143bc73fd77dbf9/duniverse/expect_test_helpers_core/src/expect_test_helpers_core.ml
ocaml
open! Core include Expect_test_helpers_base include Expect_test_helpers_core_intf module Allocation_limit = struct include Allocation_limit let is_ok t ~major_words_allocated ~minor_words_allocated = match t with | Major_words n -> major_words_allocated <= n | Minor_words n -> major_words_allocated = ...
08855d58fdb1860f088d0e1e1e31fe08aa2b34ec70a559a07e102ba5dc0381b1
yetanalytics/flint
path_test.cljc
(ns com.yetanalytics.flint.format.path-test (:require [clojure.test :refer [deftest testing is]] [com.yetanalytics.flint.format :as f] [com.yetanalytics.flint.format.path])) (defn- format-ast [ast] (f/format-ast ast {})) (deftest format-path-test (testing "Formatting paths" (is (= "(...
null
https://raw.githubusercontent.com/yetanalytics/flint/b0a2530582e04f5592869b0152b846864c283d77/src/test/com/yetanalytics/flint/format/path_test.cljc
clojure
(ns com.yetanalytics.flint.format.path-test (:require [clojure.test :refer [deftest testing is]] [com.yetanalytics.flint.format :as f] [com.yetanalytics.flint.format.path])) (defn- format-ast [ast] (f/format-ast ast {})) (deftest format-path-test (testing "Formatting paths" (is (= "(...
8fce06214228c59e138dd8a8d328d975ab856887ae222dba12075daca2084775
sarabander/p2pu-sicp
Ex1.25.scm
(define (expmod base exp m) (remainder (fast-expt base exp) m)) ;; recursive process (define (fast-expt b n) (cond ((= n 0) 1) ((even? n) (square (fast-expt b (/ n 2)))) (else (* b (fast-expt b (- n 1)))))) ;; iterative process from Ex 1.16 (define (fast-expt b n) (fast-expt-iter 1 b n)) (define (fast-expt-...
null
https://raw.githubusercontent.com/sarabander/p2pu-sicp/fbc49b67dac717da1487629fb2d7a7d86dfdbe32/1.2/Ex1.25.scm
scheme
recursive process iterative process from Ex 1.16 In principle, we could use fast-expt, but it makes the calculation terribly slow. I would guess it's because of the procedure-calling Better to use inline expressions here. This hypothesis is supported by the observation that using the iterative fast-expt makes ...
(define (expmod base exp m) (remainder (fast-expt base exp) m)) (define (fast-expt b n) (cond ((= n 0) 1) ((even? n) (square (fast-expt b (/ n 2)))) (else (* b (fast-expt b (- n 1)))))) (define (fast-expt b n) (fast-expt-iter 1 b n)) (define (fast-expt-iter a b n) (cond ((= n 0) a) ((even? n) (fast-expt-i...
49c93aae547fb09a0df2c3fd3e9d3a8de586d250e047fc7f97d7cee91af64649
Kappa-Dev/KappaTools
export_to_KaSim.ml
* * export_to_KaSim.ml * openkappa * , projet Abstraction / Antique , INRIA Paris - Rocquencourt * * Creation : June 30 2016 * Last modification : Time - stamp : < Dec 30 2018 > * * * * Copyright 2010,2011 Institut National de Recherche en Informatique et * en Automatique . A...
null
https://raw.githubusercontent.com/Kappa-Dev/KappaTools/eef2337e8688018eda47ccc838aea809cae68de7/core/KaSa_rep/export/export_to_KaSim.ml
ocaml
* * export_to_KaSim.ml * openkappa * , projet Abstraction / Antique , INRIA Paris - Rocquencourt * * Creation : June 30 2016 * Last modification : Time - stamp : < Dec 30 2018 > * * * * Copyright 2010,2011 Institut National de Recherche en Informatique et * en Automatique . A...
5aac673105f3e667e0177445af72cca4631fc423606def4a3735850bf77d470b
supki/liblastfm
mobile-authentication.hs
{-# LANGUAGE OverloadedStrings #-} -- | Mobile application authentication flow example -- -- Please remember to substitute __YOUR_API_KEY__, -- __YOUR_SECRET__, __USERNAME__ and __PASSWORD__ -- for real values import Control.Lens -- lens import Data.Aeson.Lens -- lens-aeson import qua...
null
https://raw.githubusercontent.com/supki/liblastfm/754be163c4ce14c9b4819f1359b5f95a0f91a29d/example/mobile-authentication.hs
haskell
# LANGUAGE OverloadedStrings # | Mobile application authentication flow example Please remember to substitute __YOUR_API_KEY__, __YOUR_SECRET__, __USERNAME__ and __PASSWORD__ for real values lens lens-aeson text text
liblastfm liblastfm main :: IO () main = withConnection $ \conn -> do r <- lastfm conn . sign s $ getMobileSession <*> username u <*> password p <*> apiKey ak <* json let maybeSk = r ^? folded.key "session".key "key"._String Text.putStrLn $ case maybeSk of Just sk -> "Mobile session key: " `Text.append` ...
520eab3ad617349dc24b054a198919dbea28ee3b96856a8b46cf5c2d7f242a07
janestreet/base_quickcheck
from_docs.ml
open Core open Quickcheck module Initial_example = struct let%test_unit "fold_left vs fold_right" = Quickcheck.test (List.quickcheck_generator Int.quickcheck_generator) ~sexp_of:[%sexp_of: int list] ~f:(fun list -> [%test_eq: int] (List.fold_left ~init:0 ~f:( + ) list) ...
null
https://raw.githubusercontent.com/janestreet/base_quickcheck/b7f9c75fa9fdc8b8897880f3253ff60ec26131e7/examples/from_docs.ml
ocaml
any string, including weird strings like "\000" any int, from [min_value] to [max_value] use [filter] sparingly! pushback until stack empties wait until element is available
open Core open Quickcheck module Initial_example = struct let%test_unit "fold_left vs fold_right" = Quickcheck.test (List.quickcheck_generator Int.quickcheck_generator) ~sexp_of:[%sexp_of: int list] ~f:(fun list -> [%test_eq: int] (List.fold_left ~init:0 ~f:( + ) list) ...
a08c45525c22121c64a10a4fa7738e0567e3e47d9ad7a3f0f17077e5b88a0f83
rorokimdim/stash
DB.hs
module DB ( addNode , bootstrap , checkEncryptionKey , decryptNode , deleteNodes , getAllNodeVersions , getAllNodes , getAllPlainNodeVersions , getAllPlainNodes , getConfig , getIds , getIdsInPath , getKeys , getNodes , getDBPath , getPath , getPlainKeys , getPlainNodeById , getPla...
null
https://raw.githubusercontent.com/rorokimdim/stash/18bdb25b9d1cb0386daf7a2c93bcb4ef654729d9/src/DB.hs
haskell
module DB ( addNode , bootstrap , checkEncryptionKey , decryptNode , deleteNodes , getAllNodeVersions , getAllNodes , getAllPlainNodeVersions , getAllPlainNodes , getConfig , getIds , getIdsInPath , getKeys , getNodes , getDBPath , getPath , getPlainKeys , getPlainNodeById , getPla...
cfdfbaebba9164cfe64f853773bdff39828823f7c5e8d03f7aee171db878fde4
Octachron/codept
stdlib_403.ml
let modules= let open Module in let open Sig in Dict.of_list [("Arg",Sig ({origin=Unit {source={source=Special "stdlib"; file={name="Arg";namespace=["Stdlib"]}};path={name="Arg";namespace=["Stdlib"]}}; signature=empty})); ("Array",Sig ({origin=Unit {source={source=Special "stdlib"; file={name="Array";n...
null
https://raw.githubusercontent.com/Octachron/codept/1ecb2389a9a936dd937624e79970d4d6f112f16b/tests/bundle_refs/stdlib_403.ml
ocaml
let modules= let open Module in let open Sig in Dict.of_list [("Arg",Sig ({origin=Unit {source={source=Special "stdlib"; file={name="Arg";namespace=["Stdlib"]}};path={name="Arg";namespace=["Stdlib"]}}; signature=empty})); ("Array",Sig ({origin=Unit {source={source=Special "stdlib"; file={name="Array";n...
dc166fa1548ed60a1684739772729fc396872c0909956b5f3b18b8f3b8dcb9b4
lem-project/lem
ex-core.lisp
(defpackage :lem-vi-mode.ex-core (:use :cl) (:export :*point* :syntax-error :search-forward :search-backward :goto-line :current-line :last-line :marker :offset-line :goto-current-point :range :a...
null
https://raw.githubusercontent.com/lem-project/lem/ea6ded09fb8f374ed317ec33c0f84b409afae5f3/modes/vi-mode/ex-core.lisp
lisp
(defpackage :lem-vi-mode.ex-core (:use :cl) (:export :*point* :syntax-error :search-forward :search-backward :goto-line :current-line :last-line :marker :offset-line :goto-current-point :range :a...
62e9e1cbaf8d99ac63957cdbc2918aabca6dea4c4759c19ca1fc73ac0b41b5aa
gilith/hol-light
complexes.ml
(* ========================================================================= *) (* The type "real^2" regarded as the complex numbers. *) (* *) ( c ) Copyright , 1998 - 2008 ...
null
https://raw.githubusercontent.com/gilith/hol-light/f3f131963f2298b4d65ee5fead6e986a4a14237a/Multivariate/complexes.ml
ocaml
========================================================================= The type "real^2" regarded as the complex numbers. ========================================================================= ---------------...
( c ) Copyright , 1998 - 2008 ( c ) Copyright , 2010 needs "Multivariate/convex.ml";; new_type_abbrev("complex",`:real^2`);; let prioritize_complex() = overload_interface("--",`vector_neg:complex->complex`); overload_interface("+"...
90120adbd5147c056397b4d23d0784358c012477db843668d85db17156e5a56a
softlab-ntua/bencherl
class_ForestDweller.erl
Copyright ( C ) 2008 - 2014 EDF R&D This file is part of Sim - Diasca . Sim - Diasca is free software : you can redistribute it and/or modify % it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation , either version 3 of the License , or ( at your option ) a...
null
https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/app/sim-diasca/mock-simulators/ssi-test/src/class_ForestDweller.erl
erlang
it under the terms of the GNU Lesser General Public License as but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the If not, see </>. Class modeling a forest dweller. This module is an abstract one derived from class_Actor.erl and defining some...
Copyright ( C ) 2008 - 2014 EDF R&D This file is part of Sim - Diasca . Sim - Diasca is free software : you can redistribute it and/or modify published by the Free Software Foundation , either version 3 of the License , or ( at your option ) any later version . Sim - Diasca is distributed in the hope tha...
2fb254982b49862d205520072e9dd4361bf2eee14df114fc228aafd169d7ca25
dmsurti/sudoku
package.lisp
package.lisp (in-package #:cl-user) (defpackage #:sudoku (:use #:cl) (:export #:solve #:solve-board-in-grid-format #:solve-board-in-line-format #:solve-boards-in-grid-format #:solve-boards-in-line-format #:print-board #:file-lines))
null
https://raw.githubusercontent.com/dmsurti/sudoku/f4401c28a49f2e7c104b49afdb4a3ec123965f53/package.lisp
lisp
package.lisp (in-package #:cl-user) (defpackage #:sudoku (:use #:cl) (:export #:solve #:solve-board-in-grid-format #:solve-board-in-line-format #:solve-boards-in-grid-format #:solve-boards-in-line-format #:print-board #:file-lines))
09aa0f2d95fe25978965a22ee918bbb9ea6cd3960a700b85d11951bdf493424f
lisp-korea/sicp
ex-2-1-likerivers12.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ch 2 데이터를 끌어올리는 방법 ;;; Ch 2.1 데이터 요약 = = = = = = = = = = = = = = = = = < ch 2.1.1 연습 : 유리수를 위한 산술 연산>===================== ;;; p108 ;;; p109 (define (eadd-rat x y) (make-rat (+ (* (numer x) (denom y)) (* (numer y) (denom x))) (*...
null
https://raw.githubusercontent.com/lisp-korea/sicp/4cdc1b1d858c6da7c9f4ec925ff4a724f36041cc/ch02/2.1/ex-2-1-likerivers12.scm
scheme
Ch 2.1 데이터 요약 p108 p109 유리수 만들기 p111 --- --- 기약분수로 만들기 --------------------------< ex 2.1 >-------------------------- p113 p113 p115 p115,116 - 시작점, 끝점 p1 seg1 p2 +------------+ seg4 | | seg2 +------------+ p4 seg3 p3 p1과 p3로 rectangle 표현 +------------+...
Ch 2 데이터를 끌어올리는 방법 = = = = = = = = = = = = = = = = = < ch 2.1.1 연습 : 유리수를 위한 산술 연산>===================== (define (eadd-rat x y) (make-rat (+ (* (numer x) (denom y)) (* (numer y) (denom x))) (* (denom x) (denom y)))) (define (sub-rat x y) (make-rat (- (* (numer x) (denom y)) (* (numer y) ...
401c9ad9d768fd1bff9c4f91dfd286beed2937c05afaf625a6aa02775273ad8b
emqx/mria
mria_membership.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2019 - 2022 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/4bab0646674aa7224fc3124bb3ac3a189d8ab772/src/mria_membership.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 ) 2019 - 2022 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_membership). -behaviour(gen_server). -include("mria.hrl"). -include_lib("snabbkaf...
b030b9ce5f000538ad8bf649c01d91b2955c16d9880379917b7c547b161ac1f5
tari3x/csec-modex
display.mli
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
null
https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/cryptoverif1.12/src/display.mli
ocaml
The next functions are made public so that displaytex can call them
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Cryptographic protocol verifier * * * ...
93021c152023850400c3fe422286f569a398020b78919ae82f8cf1d07d7fdff6
3b/3bil
cl-arrays.lisp
(in-package #:avm2-compiler) ;;; cl array functions ;; using untyped arrays for now, so don't have the specialized arrays ;; required by the spec (let ((*symbol-table* *cl-symbol-table*)) #+nil (swf-defmacro aref (array &rest subscripts) (let ((a (gensym))) (if (= 1 (length sub...
null
https://raw.githubusercontent.com/3b/3bil/c852181848bedf476373e901869ca29471f926ee/lib/cl-arrays.lisp
lisp
cl array functions using untyped arrays for now, so don't have the specialized arrays required by the spec fixme: probably should check for our special type here instead of just array, since some other types might act like arrays too
(in-package #:avm2-compiler) (let ((*symbol-table* *cl-symbol-table*)) #+nil (swf-defmacro aref (array &rest subscripts) (let ((a (gensym))) (if (= 1 (length subscripts)) `(let ((,a ,array)) (if (%typep ,a flash:array) ...
d68ea199a6646c19db1781e7edb8869f1e2de49dbbcbe67db892fa820e5e39a6
blancas/kern
java_style.clj
Copyright ( c ) 2013 . All rights reserved . ;; The use and distribution terms for this software are covered by the Eclipse Public License 1.0 ( -1.0.php ) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be bound by ;; ...
null
https://raw.githubusercontent.com/blancas/kern/3ef65e559658c06a321a9ca7c85a541edc7b9ff2/src/main/clojure/blancas/kern/lexer/java_style.clj
clojure
The use and distribution terms for this software are covered by the which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove this notice, or any other, from this software.
Copyright ( c ) 2013 . All rights reserved . Eclipse Public License 1.0 ( -1.0.php ) (ns ^{:doc "The Kern Java-style Lexer library. This namespace is a version of blancas.kern.lexer with the following settings: comment-start /* comment-end */ comment-line // nested-comments No iden...
5e4738b28f1f59f2c8628b562745e75ec2b6e1ec2027cecb75267d6225749b19
brendanhay/amazonka
DeleteWorkspaceBundle.hs
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE RecordWildCards # {-# LANGUAGE StrictData #-} # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused -...
null
https://raw.githubusercontent.com/brendanhay/amazonka/09f52b75d2cfdff221b439280d3279d22690d6a6/lib/services/amazonka-workspaces/gen/Amazonka/WorkSpaces/DeleteWorkspaceBundle.hs
haskell
# LANGUAGE OverloadedStrings # # LANGUAGE StrictData # | Module : Amazonka.WorkSpaces.DeleteWorkspaceBundle Stability : auto-generated * Creating a Request * Request Lenses * Destructuring the Response * Response Lenses | /See:/ 'newDeleteWorkspaceBundle' smart constructor. | The identifier of the bund...
# LANGUAGE DeriveGeneric # # LANGUAGE DuplicateRecordFields # # LANGUAGE NamedFieldPuns # # LANGUAGE RecordWildCards # # LANGUAGE TypeFamilies # # LANGUAGE NoImplicitPrelude # # OPTIONS_GHC -fno - warn - unused - binds # # OPTIONS_GHC -fno - warn - unused - imports # # OPTIONS_GHC -fno - warn - unused - matches # De...
372d66672f88eda8f11ace8170c97240010e970bfc9f2c6a379fad42800668c7
avras/nsime
nsime_data_rate.erl
%% Copyright ( C ) 2012 < > %% %% This file is part of nsime. %% nsime 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....
null
https://raw.githubusercontent.com/avras/nsime/fc5c164272aa649541bb3895d9f4bea34f45beec/src/nsime_data_rate.erl
erlang
This file is part of nsime. (at your option) any later version. nsime 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 General Public License for more details. along with...
Copyright ( C ) 2012 < > nsime 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 You should have received a copy of the GNU General Public License Author :...
d609e7f837cc69f866dcbcba1ae80c1ce814dc796e54a744e0c1106c4ca9b49b
jimcrayne/jhc
read005.hs
module ShouldCompile where -- !!! Empty comments terminating a file.. main = print "Hello" --
null
https://raw.githubusercontent.com/jimcrayne/jhc/1ff035af3d697f9175f8761c8d08edbffde03b4e/regress/tests/0_parse/2_pass/ghc/read005.hs
haskell
!!! Empty comments terminating a file..
module ShouldCompile where
7320c3830c1f53da1ce6c4aa3f4ea3e841dad7eec15d65ed13c4ab97ab154d16
ardumont/haskell-lab
Tree.hs
module Tree.Tree where data Tree a = Leaf a | Node (Tree a) a (Tree a) deriving Show t :: Tree Int t = Node (Node (Leaf 1) 2 (Leaf 3)) 4 (Node (Leaf 5) 6 (Leaf 7)) occurs :: Eq a => Tree a -> a -> Bool occurs (Leaf n) m = n == m occurs (Node l n r) m = (n == m) || (occurs l m) || ...
null
https://raw.githubusercontent.com/ardumont/haskell-lab/6d1f130300f33dc982c9a6b5d0b6a63af2c2666d/src/Tree/Tree.hs
haskell
[False,True,True,True,True,True,True,True,False] for search trees (left nodes have inferior values, right nodes superior values) so we can rewrite occurs to be faster
module Tree.Tree where data Tree a = Leaf a | Node (Tree a) a (Tree a) deriving Show t :: Tree Int t = Node (Node (Leaf 1) 2 (Leaf 3)) 4 (Node (Leaf 5) 6 (Leaf 7)) occurs :: Eq a => Tree a -> a -> Bool occurs (Leaf n) m = n == m occurs (Node l n r) m = (n == m) || (occurs l m) || ...
c6604ae2f25c236d6730375c8b808333b6a24f999a6625a0a1f37582985f6543
couchbase/chronicle
dynamic_supervisor.erl
@author Couchbase < > 2020 Couchbase , Inc. %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the License at %% %% -2.0 %% %% Unless required by applicable law or agreed to in writing, sof...
null
https://raw.githubusercontent.com/couchbase/chronicle/78f05a055082d67e8a985eed3166bcc17d03f410/src/dynamic_supervisor.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing per...
@author Couchbase < > 2020 Couchbase , Inc. Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(dynamic_supervisor). -include("chronicle.hrl"). -behavior(gen_server). -export([start_link/2, start_link/3, sync/2, ...
9fbc1b2b427e6563286c69a702e589f448ab57d30bd923b7784dd30014a049f0
haroldcarr/learn-haskell-coq-ml-etc
StaticConfig.hs
# OPTIONS_GHC -fno - warn - orphans # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE TupleSections # module StaticConfig where import Control.Concurrent (threadDelay) import Control.Concurrent.MVar (MVar, modifyMVar, newMVar, ...
null
https://raw.githubusercontent.com/haroldcarr/learn-haskell-coq-ml-etc/b4e83ec7c7af730de688b7376497b9f49dc24a0e/haskell/topic/distributed/static-config/StaticConfig.hs
haskell
# LANGUAGE OverloadedStrings # | Shut down the logger process. Ensures that any pending messages are flushed before the process exits. TODO: monitor the logger process to avoid deadlock if it has already died.
# OPTIONS_GHC -fno - warn - orphans # # LANGUAGE TupleSections # module StaticConfig where import Control.Concurrent (threadDelay) import Control.Concurrent.MVar (MVar, modifyMVar, newMVar, readMVar) import qualified C...
85846d60c80bafd2219a985fd0d80bf494365e9e971a0c71351b7f745471228e
jrm-code-project/LISP-Machine
window.lisp
-*- Mode : LISP ; Package : SITE - DATA - EDIT ; ; : CL -*- Copyright ( c ) Lisp Machine Inc. , 1986 . ;;; Mouse buttons stuff so you don't have to remember the byte constants. (defvar *mouse-button* :unbound "The mouse key that invoked this command: one of :L, :M, :R") (defconstant mouse-button-symbols #(:l ...
null
https://raw.githubusercontent.com/jrm-code-project/LISP-Machine/0a448d27f40761fafabe5775ffc550637be537b2/lambda/network/edit/window.lisp
lisp
Package : SITE - DATA - EDIT ; ; : CL -*- Mouse buttons stuff so you don't have to remember the byte constants. !!! These might become instance variables of the window someday. I'd like to use tv:set-standard-font here, but it seems to be impossible to name new purposes after a screen is created ! Also contain...
Copyright ( c ) Lisp Machine Inc. , 1986 . (defvar *mouse-button* :unbound "The mouse key that invoked this command: one of :L, :M, :R") (defconstant mouse-button-symbols #(:l :m :r) "Maps the byte field into the key") (defun mouse-key-keyword-p (thing) (and (keywordp thing) (find thing mouse-button-sym...
daef7542c95908b8c87ecfcd5553064fb299fd05b97fcd49c16ab7093bc3e6e7
c-cube/poc-modular-io
IO_helpers.ml
open IO let in_of_bytes ?(off=0) ?len s : In.t = (* invariant: !i+!len is constant *) let i = ref off in let len = ref ( match len with | Some n -> if n > Bytes.length s - off then ( invalid_arg "IO.in_of_bytes"; ); n | None -> Bytes.length s - off ) ...
null
https://raw.githubusercontent.com/c-cube/poc-modular-io/cfc40b78b519cb187d77d2f17c575320dbec1a0a/src/IO_helpers.ml
ocaml
invariant: !i+!len is constant find index of [c] in slice, or raise [Not_found] see if we can directly extract a line from current buffer easy case: buffer already contains a full line create new buffer, already filled with beginning of line without '\n' consume, including '\n' cannot modify input buffer...
open IO let in_of_bytes ?(off=0) ?len s : In.t = let i = ref off in let len = ref ( match len with | Some n -> if n > Bytes.length s - off then ( invalid_arg "IO.in_of_bytes"; ); n | None -> Bytes.length s - off ) in let consume n = assert (n>=0 && ...
448f4e01af24fc77fdec881b8c3c6effbf5039dfb938fb983f42bf8490f7eaa3
aws-beam/aws-erlang
aws_datapipeline.erl
%% WARNING: DO NOT EDIT, AUTO-GENERATED CODE! See -beam/aws-codegen for more details . @doc AWS Data Pipeline configures and manages a data - driven workflow %% called a pipeline. %% AWS Data Pipeline handles the details of scheduling and ensuring that data %% dependencies are met so that your application can fo...
null
https://raw.githubusercontent.com/aws-beam/aws-erlang/6d397ab64649fbde8b5e57a5c2c22d007ce54e65/src/aws_datapipeline.erl
erlang
WARNING: DO NOT EDIT, AUTO-GENERATED CODE! called a pipeline. dependencies are met so that your application can focus on processing the data. logic for common data management scenarios, such as performing database you can write your own task runner to provide custom data management. set to create a pipeline a...
See -beam/aws-codegen for more details . @doc AWS Data Pipeline configures and manages a data - driven workflow AWS Data Pipeline handles the details of scheduling and ensuring that data AWS Data Pipeline provides a JAR implementation of a task runner called AWS Data Pipeline Task Runner . AWS Data Pipeline ...