_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 |
|---|---|---|---|---|---|---|---|---|
b6a713e2799d344b2a3e86ac87c19cbda5fcf5c9e1cf647851bba46480b40eb4 | superhuman/rxxr2 | Run.ml | © Copyright University of Birmingham , UK
open ParsingData
open Nfa
open Common
let rec print_exp e = match e with
|Zero -> Printf.sprintf "\\0"
|One -> Printf.sprintf "\\1"
|Dot -> Printf.sprintf "."
|Pred(Bol) -> Printf.sprintf "\\p(^)"
|Pred(Eol) -> Printf.sprintf "\\p($)"
|Pred(Wordb) -> Printf.spri... | null | https://raw.githubusercontent.com/superhuman/rxxr2/0eea5e9f0e0cde6c39e0fc12614f64edb6189cd5/code/Run.ml | ocaml |
let _ = print_nfa nfa in
print_newline ();
match AnalyserMain.search_exhaustive nfa with
default z search limit, rarely touched | © Copyright University of Birmingham , UK
open ParsingData
open Nfa
open Common
let rec print_exp e = match e with
|Zero -> Printf.sprintf "\\0"
|One -> Printf.sprintf "\\1"
|Dot -> Printf.sprintf "."
|Pred(Bol) -> Printf.sprintf "\\p(^)"
|Pred(Eol) -> Printf.sprintf "\\p($)"
|Pred(Wordb) -> Printf.spri... |
376df0d707c47ad1e7d3b697aafbd4ad08ad3a70db7f751a14095c4e581bb3eb | windorg/app-old | Board.hs | module Web.Controller.Board where
import qualified Optics
import Web.Controller.Authorization
import Web.Controller.Prelude
import Web.Helper.Common
import Web.View.Board.Edit
import Web.View.Board.Index
import Web.View.Board.New
import Web.View.Board.Show
import Data.Text (strip)
import Named
instance Controller Bo... | null | https://raw.githubusercontent.com/windorg/app-old/ed9c5322c8ab8a0275bdcd479be12a3f230da8c9/Web/Controller/Board.hs | haskell | module Web.Controller.Board where
import qualified Optics
import Web.Controller.Authorization
import Web.Controller.Prelude
import Web.Helper.Common
import Web.View.Board.Edit
import Web.View.Board.Index
import Web.View.Board.New
import Web.View.Board.Show
import Data.Text (strip)
import Named
instance Controller Bo... | |
a8452438993ef6536e270ed1cc9cd27b0cc520bd444bcb90e60591b8366b1bf1 | jwiegley/parsec-free | Perm.hs | -----------------------------------------------------------------------------
-- |
Module : Text . Parsec . Perm
Copyright : ( c ) 1999 - 2001 , ( c ) 2007
-- License : BSD-style (see the file libraries/parsec/LICENSE)
--
-- Maintainer :
-- Stability : provisional
-- Portability : non-... | null | https://raw.githubusercontent.com/jwiegley/parsec-free/b8bbaaa0457e1871747af889fea4be97d20b41b1/Text/Parsec/Perm.hs | haskell | ---------------------------------------------------------------------------
|
License : BSD-style (see the file libraries/parsec/LICENSE)
Maintainer :
Stability : provisional
Portability : non-portable (uses existentially quantified data constructors)
This module implements permutation parsers. Th... | Module : Text . Parsec . Perm
Copyright : ( c ) 1999 - 2001 , ( c ) 2007
by , and .
Published as a functional pearl at the Haskell Workshop 2001 .
# LANGUAGE ExistentialQuantification , StandaloneDeriving #
module Text.Parsec.Perm
( PermParser
, permute
, (<||>), (<$$>)
... |
35c52b7bd230d5b5a827c5eb49d3baf4e86ab41d6ff7235ba05ac2e642701987 | cojna/iota | SieveSpec.hs | module Math.Prime.SieveSpec (main, spec) where
import qualified Data.Vector.Unboxed as U
import Math.Prime
import Math.Prime.Sieve
import Test.Prelude
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "withPrimes 46337 generates smallPrimes" $
it "equal to smallPrimes" $
withPrimes 46337 U.... | null | https://raw.githubusercontent.com/cojna/iota/6d2ad5b71b1b50bca9136d6ed84f80a0b7713d7c/test/Math/Prime/SieveSpec.hs | haskell | module Math.Prime.SieveSpec (main, spec) where
import qualified Data.Vector.Unboxed as U
import Math.Prime
import Math.Prime.Sieve
import Test.Prelude
main :: IO ()
main = hspec spec
spec :: Spec
spec = do
describe "withPrimes 46337 generates smallPrimes" $
it "equal to smallPrimes" $
withPrimes 46337 U.... | |
2528cb866a72dd0ab9705bfab9c3d6e2f1e707b2f88bfaf31fbeb411c868c514 | SonyCSLParis/BENG | config.lisp | Copyright ( C ) 2019 Sony Computer Science Laboratories Paris
( www.remivantrijp.eu )
;;;
;;; This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation , version 3 o... | null | https://raw.githubusercontent.com/SonyCSLParis/BENG/1eb525e132d2b1f74ae18532657561725f6fbb78/signature/config.lisp | lisp |
This program is free software: you can redistribute it and/or modify
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for mo... | Copyright ( C ) 2019 Sony Computer Science Laboratories Paris
( www.remivantrijp.eu )
it under the terms of the GNU General Public License as published by
the Free Software Foundation , version 3 of the License .
You should have received a copy of the GNU General Public Li... |
814b64d0a9dec64888afd8a9f56615889c15eee9060328bb73d475a53ce6ef06 | mdsebald/link_blox_app | lblx_select_pri.erl | %%% @doc
BLOCKTYPE
Select Higest Priority Active Input Value
%%% DESCRIPTION
%%% Set the block output value to the highest priority actvive input value
%%% LINKS
%%% @end
-module(lblx_select_pri).
-author("Mark Sebald").
-include("../block_state.hrl").
%% =====================================... | null | https://raw.githubusercontent.com/mdsebald/link_blox_app/64034fa5854759ad16625b93e3dde65a9c65f615/src/block_types/lblx_select_pri.erl | erlang | @doc
DESCRIPTION
Set the block output value to the highest priority actvive input value
LINKS
@end
====================================================================
API functions
====================================================================
Merge the block type specific, Config, Input... | BLOCKTYPE
Select Higest Priority Active Input Value
-module(lblx_select_pri).
-author("Mark Sebald").
-include("../block_state.hrl").
-export([groups/0, version/0]).
-export([create/2, create/4, create/5, upgrade/1, initialize/1, execute/2, delete/1]).
groups() -> [select].
version() -> "0.1.0".
-spec ... |
8940185e3f690583849e6b129bea00ac242cac4e116e1d9fb4ba59632d4413fe | witan-org/witan | stdlib.ml | (********************************************************************)
(* *)
The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2017 -- INRIA - CNRS - Paris - Sud University
(* ... | null | https://raw.githubusercontent.com/witan-org/witan/d26f9f810fc34bf44daccb91f71ad3258eb62037/src/popop_lib/stdlib.ml | ocaml | ******************************************************************
This software is distributed under the terms of the GNU Lesser
on linking described in file LICENSE. ... | The Why3 Verification Platform / The Why3 Development Team
Copyright 2010 - 2017 -- INRIA - CNRS - Paris - Sud University
General Public License version 2.1 , with the special exception
module Map = Extmap
module XHashtbl = Exthtbl.Hashtbl
Set , Map , on structures with a unique tag
mod... |
8b90897afaa59e0b68d583bebb88f3b1b7dab72aadc079739eecb5c8ced5a14a | lindenbaum/lbm_kv | lbm_kv_vclock.erl | %% -------------------------------------------------------------------
%%
%% riak_core: Core Riak Application
%%
Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "License"); you may not use this file
except... | null | https://raw.githubusercontent.com/lindenbaum/lbm_kv/121467ae4766753b052b923d202e8b17dc14e054/src/lbm_kv_vclock.erl | erlang | -------------------------------------------------------------------
riak_core: Core Riak Application
Version 2.0 (the "License"); you may not use this file
a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing,
KIND, either express or implied. See the License for the
sp... | Copyright ( c ) 2007 - 2010 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is distributed on an
" AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY
... |
522068b730c21f06da6567f420ef2976e96e25c8e64a3c2d57a0653dc285603a | purebred-mua/purebred | Main.hs | -- This file is part of purebred
Copyright ( C ) 2017 - 2019 and
--
-- purebred is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) any later ... | null | https://raw.githubusercontent.com/purebred-mua/purebred/14f50e8406dd81f6f506f1352f623948a1ea63ed/test/Main.hs | haskell | This file is part of purebred
purebred is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ... | Copyright ( C ) 2017 - 2019 and
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU Affero General Public License
import Test.Tasty (defaultMain, testGroup)
import qualifi... |
6294ba8da81739875b0bec8e12ddb40eff29236c507e9eeb41ba0c60acf5e930 | awolven/cl-vulkan | render-pass.lisp | Copyright 2019 , 2020
;;
;; Permission is hereby granted, free of charge, to any person obtaining
;; a copy of this software and associated documentation files (the
" Software " ) , to deal in the Software without restriction , including
;; without limitation the rights to use, copy, modify, merge, publish,
d... | null | https://raw.githubusercontent.com/awolven/cl-vulkan/dd64af0ceb57cfc4aedbd3ba8d3340e2e922e16f/src/render-pass.lisp | lisp |
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
the following conditions:
The above copyright notice and this permission notice shall be
EXPRESS OR IMPLIE... | Copyright 2019 , 2020
" Software " ) , to deal in the Software without restriction , including
distribute , sublicense , and/or sell copies of the Software , and to
permit persons to whom the Software is furnished to do so , subject to
included in all copies or substantial portions of the Software .
THE ... |
0d73dd4963bd8f73aa333b2b0d80760fb34f7e491ab56f6f3db802d2770a2762 | threatgrid/ctia | keyword.clj | (ns ctia.lib.keyword
(:require [clojure.string :as str]))
(defn singular
"remove the last s of a keyword see test for an example."
[k]
(-> k
name
(str/replace #"s$" "")
keyword))
| null | https://raw.githubusercontent.com/threatgrid/ctia/32857663cdd7ac385161103dbafa8dc4f98febf0/src/ctia/lib/keyword.clj | clojure | (ns ctia.lib.keyword
(:require [clojure.string :as str]))
(defn singular
"remove the last s of a keyword see test for an example."
[k]
(-> k
name
(str/replace #"s$" "")
keyword))
| |
a48c759695bac0daaa49a0a4387cbcdd44a9d984199a175b80f2700dcb297e5c | haskell-numerics/hmatrix | LinearAlgebra.hs | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - missing - signatures #
-----------------------------------------------------------------------------
|
Module : Numeric . LinearAlgebra
Copyright : ( c ) 2006 - 15
License : :
Stability : provision... | null | https://raw.githubusercontent.com/haskell-numerics/hmatrix/2694f776c7b5034d239acb5d984c489417739225/packages/base/src/Numeric/LinearAlgebra.hs | haskell | ---------------------------------------------------------------------------
---------------------------------------------------------------------------
* Basic types and data manipulation
| This package works with 2D ('Matrix') and 1D ('Vector')
arrays of real ('R') or complex ('C') double precision numbers.
Single... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# OPTIONS_GHC -fno - warn - missing - signatures #
|
Module : Numeric . LinearAlgebra
Copyright : ( c ) 2006 - 15
License : :
Stability : provisional
Module : Numeric.LinearAlgebra
Copyright : (c) Alberto Ruiz 20... |
ecf714fe02996f01bf2d870c11aba857b49e1df90d0f73486d12085f59a5a788 | poscat0x04/telegram-types | File.hs | module Web.Telegram.Types.Internal.File where
import Common
-- | a file ready to be downloaded. The file can be downloaded via the link
@ / file / bot < token>/<file_path>@. It is guaranteed
that the link will be valid for at least 1 hour . When the link expires ,
-- a new one can be requested by calling [g... | null | https://raw.githubusercontent.com/poscat0x04/telegram-types/c09ccc81cff10399538894cf2d1273022c797e18/src/Web/Telegram/Types/Internal/File.hs | haskell | | a file ready to be downloaded. The file can be downloaded via the link
a new one can be requested by calling [getFile](#getfile).
| Identifier for this file, which can be used to download or reuse the file
| Unique identifier for this file, which is supposed to be the same over time
and for different bots. ... | module Web.Telegram.Types.Internal.File where
import Common
@ / file / bot < token>/<file_path>@. It is guaranteed
that the link will be valid for at least 1 hour . When the link expires ,
_ _ Note : _ _ Maximum file size to download is 20 MB
data File = File
fileId :: Text,
fileUniqueId :: Text,
... |
4bd11ad8718507d14e549ea1f85e7c54e99adda066cbaa80e0a47cef940e8d7c | sonowz/advent-of-code-haskell | Day15.hs | module Y2021.Day15 where
import Algebra.Graph.Label (Distance, distance, finite, getDistance, getFinite)
import qualified Algebra.Graph.Labelled.AdjacencyMap as A
import Data.Vector (Vector)
import qualified Data.Vector as V
import Lib.Graph (dijkstra)
import Lib.IO
import Lib.Types
import Lib.Vector2D
import Relude
i... | null | https://raw.githubusercontent.com/sonowz/advent-of-code-haskell/d725764162d2d3886dfbecf9e8a10305e8868329/src/Y2021/Day15.hs | haskell | ---------------------
Type declarations --
---------------------
----------
Part 1 --
----------
----------
----------
where 'dijkstra' function takes majority of time
[[0,1,2,3,4],[1,2,3,4,5],[2,3,4,5,6],[3,4,5,6,7],[4,5,6,7,8]]
------------------
------------------ | module Y2021.Day15 where
import Algebra.Graph.Label (Distance, distance, finite, getDistance, getFinite)
import qualified Algebra.Graph.Labelled.AdjacencyMap as A
import Data.Vector (Vector)
import qualified Data.Vector as V
import Lib.Graph (dijkstra)
import Lib.IO
import Lib.Types
import Lib.Vector2D
import Relude
i... |
843309a502bb935cb838159ed0d7178485c40264ad04130a83cadf5779cd00de | senapk/fn_2020_1 | Main.hs | soma x y = x + y
1 1
2,3,4,4,4
key last qtd = if qtd /= 1 then [[qtd, last]] else [[last]]
compac' [] last qtd = key last qtd
compac' (x:xs) last qtd = if x == last
then compac' xs last (qtd + 1)
else key last qtd ++ compac' xs x 1
compac (x:xs) = compac' xs x 1
-
... | null | https://raw.githubusercontent.com/senapk/fn_2020_1/dd30b5d49300459a62b00299d65309f09638d8fc/s04e02_colaboracao/Main.hs | haskell | } | soma x y = x + y
1 1
2,3,4,4,4
key last qtd = if qtd /= 1 then [[qtd, last]] else [[last]]
compac' [] last qtd = key last qtd
compac' (x:xs) last qtd = if x == last
then compac' xs last (qtd + 1)
else key last qtd ++ compac' xs x 1
compac (x:xs) = compac' xs x 1
-
... |
042ff52e42d098f1bfc175eefc2684e814973dda5220dd5c0b66c135721615c5 | mbutterick/brag | colorer.rkt | #lang racket/base
(require brag/support (submod brag/rules/lexer lex-abbrevs) racket/match)
(provide color-brag)
(define brag-syntax-lexer
(lexer-srcloc
[(eof) (return-without-srcloc eof)]
need to lex whitespace to keep accurate
( for DrRacket selections etc )
[whitespace (token 'WHITE lexeme)]
[(:or (... | null | https://raw.githubusercontent.com/mbutterick/brag/6c161ae31df9b4ae7f55a14f754c0b216b60c9a6/brag-lib/brag/private/colorer.rkt | racket | empty set symbols | #lang racket/base
(require brag/support (submod brag/rules/lexer lex-abbrevs) racket/match)
(provide color-brag)
(define brag-syntax-lexer
(lexer-srcloc
[(eof) (return-without-srcloc eof)]
need to lex whitespace to keep accurate
( for DrRacket selections etc )
[whitespace (token 'WHITE lexeme)]
[(:or (... |
7a68c203ce7543f02f101f1cd66606ad1607c23d29de4294ea031f72ad0c5b97 | cac-t-u-s/om-sharp | graphics.lisp | ;=========================================================================
OM API
Multiplatform API for OpenMusic
LispWorks Implementation
;=========================================================================
;
; This program is free software: you can redistribute it and/or modify
it under ... | null | https://raw.githubusercontent.com/cac-t-u-s/om-sharp/80f9537368471d0e6e4accdc9fff01ed277b879e/src/api/om-api-LW/graphics.lisp | lisp | =========================================================================
=========================================================================
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed; in the hope that i... | OM API
Multiplatform API for OpenMusic
LispWorks Implementation
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
Authors : ,
... |
697c15cb0319520699da45799bd1ca2d835287b7ef78058cb4daf75185fbea59 | rnons/lord | User.hs | # LANGUAGE DeriveGeneric #
module Web.Radio.EightTracks.User where
import Data.Aeson (FromJSON)
import GHC.Generics (Generic)
data User = User
{ user_token:: String
, id :: Int
, login :: String
, web_path :: String
} deriving (Show, Generic)
instance FromJSON Use... | null | https://raw.githubusercontent.com/rnons/lord/31d632306c3a972da2c3fd1f5359277543bfa669/Web/Radio/EightTracks/User.hs | haskell | # LANGUAGE DeriveGeneric #
module Web.Radio.EightTracks.User where
import Data.Aeson (FromJSON)
import GHC.Generics (Generic)
data User = User
{ user_token:: String
, id :: Int
, login :: String
, web_path :: String
} deriving (Show, Generic)
instance FromJSON Use... | |
8e550b8e444643a3e04406fb6345b1ab8ce2ecede6b47190b32fc552483f7afe | project-oak/hafnium-verification | frontend.ml |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/sledge/src/llair/frontend.ml | ocaml | WARNING: SLOW on instructions and functions
gather names and debug locations
escape to avoid clash with names of anonymous values
inline casts
translate shufflevector <N x t> %x, _, <N x i32> zeroinitializer to
%x
add to tbl without initializer in case of recursive occurrences in
its own in... |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... |
be540e88e4b6ae7c72b6d4ab0d6c8e4108a90c83ad45fd5f4c53075ea335c113 | gowthamk/ocaml-irmin | icounter.ml | open Lwt.Infix
open Irmin_unix
Config module has three functions root , shared and init .
module type Config = sig
val root: string
val shared: string
val init: unit -> unit
end
MakeVersioned is a functor which takes Config and Atom as arguments
module MakeVersioned (Config: Config) = struct
module OM = ... | null | https://raw.githubusercontent.com/gowthamk/ocaml-irmin/54775f6c3012e87d2d0308f37a2ec7b27477e887/counter/icounter.ml | ocaml | storage backhend: Append-only store
Immutable collection of all versionedt
And creates a Git backend
Store is defined as follows which is a module
store is a type which is basically of type BC_store.t
st is a record type with fields as master, local, name and next_id
Ideally, the following has to happen:
... | open Lwt.Infix
open Irmin_unix
Config module has three functions root , shared and init .
module type Config = sig
val root: string
val shared: string
val init: unit -> unit
end
MakeVersioned is a functor which takes Config and Atom as arguments
module MakeVersioned (Config: Config) = struct
module OM = ... |
2996ff4673a0034f7fd6d1162ce83e271ccc501d5f9a124d4d2b0c87d2de2b90 | drewr/copycat | Opts.hs | module Copycat.Opts ( CommandLine(..)
, Opts(..)
, Verbosity(..)
, Columns
, parseArgs
) where
import Options.Applicative
type Url = String
type Command = String
type Columns = String
data Verbosity = Normal
... | null | https://raw.githubusercontent.com/drewr/copycat/18193200e9ff7b10b24dfb23c9da6a443da8f19d/src/Copycat/Opts.hs | haskell | module Copycat.Opts ( CommandLine(..)
, Opts(..)
, Verbosity(..)
, Columns
, parseArgs
) where
import Options.Applicative
type Url = String
type Command = String
type Columns = String
data Verbosity = Normal
... | |
bcb4d395a170b1dd0cb361b87a1de7dcd166528474575826681e54ebe3e0a351 | argp/bap | batInt64.ml |
* BatInt64 - Extended 64 - bit integers
* Copyright ( C ) 2007 Bluestorm < bluestorm dot dylc on - the - server gmail dot com >
* 2008
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as publis... | null | https://raw.githubusercontent.com/argp/bap/2f60a35e822200a1ec50eea3a947a322b45da363/batteries/src/batInt64.ml | ocaml |
* BatInt64 - Extended 64 - bit integers
* Copyright ( C ) 2007 Bluestorm < bluestorm dot dylc on - the - server gmail dot com >
* 2008
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as publis... | |
c10fab19c53088def394b4cd204140ff575a4c620ad6b82d9cfe0b7571c7fb1b | grin-compiler/ghc-whole-program-compiler-project | IO.hs | module Stg.IO
( -- * Convenient Modpak IO
readModpakS
, readModpakL
, doesModpakEntryExist
-- * Convenient Decoding
, decodeStgbin
, decodeStgbin'
, decodeStgbinInfo
, decodeStgbinStubs
, decodeStgbinModuleName
.fullpak and .modpak content structure
, fullpakAppInfoPath... | null | https://raw.githubusercontent.com/grin-compiler/ghc-whole-program-compiler-project/fee2d7b513f1201c17309f9a928c9da17dfe8ff7/external-stg/lib/Stg/IO.hs | haskell | * Convenient Modpak IO
* Convenient Decoding | module Stg.IO
readModpakS
, readModpakL
, doesModpakEntryExist
, decodeStgbin
, decodeStgbin'
, decodeStgbinInfo
, decodeStgbinStubs
, decodeStgbinModuleName
.fullpak and .modpak content structure
, fullpakAppInfoPath
, modpakHaskellSourcePath
, modpakStgbinPath
) whe... |
dc211fbb30fe313c3fd21810b419ceefe6ed4ec85202d8f3ec1c0f384531773d | weavejester/integrant | core_test.cljc | (ns integrant.core-test
(:require [clojure.spec.alpha :as s]
#?(:clj [clojure.test :refer :all]
:cljs [cljs.test :refer-macros [are deftest is testing]])
[integrant.core :as ig]
[weavejester.dependency :as dep]))
(def log (atom []))
(defmethod ig/prep-key ::p [_ v]
(merge {:a (ig... | null | https://raw.githubusercontent.com/weavejester/integrant/32a46f5dca8a6b563a6dddf88bec887be3201b08/test/integrant/core_test.cljc | clojure | (ns integrant.core-test
(:require [clojure.spec.alpha :as s]
#?(:clj [clojure.test :refer :all]
:cljs [cljs.test :refer-macros [are deftest is testing]])
[integrant.core :as ig]
[weavejester.dependency :as dep]))
(def log (atom []))
(defmethod ig/prep-key ::p [_ v]
(merge {:a (ig... | |
2ed85a2eb4368009ce5b64ce8cb71cc13a63e5211f19fab116d499e2fa773063 | fgalassi/cs61a-sp11 | 3.40.scm | (define x 10)
(parallel-execute (lambda () (set! x (* x x)))
(lambda () (set! x (* x x x))))
; a1 => x; a2 => x; a3 => * a1 a2; a4 => !set x a3
; b1 => x; b2 => x; b3 => x; b4 => * b1 b2 b3; b5 => set! x b4
;
the minimum is 100
; a1 a2 a3 b1...b5 a4
;
the maximum is 1000000
; a1...a4 b1...b... | null | https://raw.githubusercontent.com/fgalassi/cs61a-sp11/66df3b54b03ee27f368c716ae314fd7ed85c4dba/homework/3.40.scm | scheme | a1 => x; a2 => x; a3 => * a1 a2; a4 => !set x a3
b1 => x; b2 => x; b3 => x; b4 => * b1 b2 b3; b5 => set! x b4
a1 a2 a3 b1...b5 a4
a1...a4 b1...b5
b1 b2 b3 b4 a1...a4 b5
b1 b2 a1...a4 b3...b5
b1 a1..a4 b2..b5
so 100 1000 10000 1000000 | (define x 10)
(parallel-execute (lambda () (set! x (* x x)))
(lambda () (set! x (* x x x))))
the minimum is 100
the maximum is 1000000
a result x must be x = 10^n with 2 < = n < = 5
1000
10000
100000
(define x 10)
(parallel-execute (s lambda () (set! x (* x x)))
(s lam... |
c9cc88094bc332688a7b18ce92ca9d68a9eab9c91492f5b21b9ceb1988c5f981 | manuel-serrano/bigloo | http.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / runtime / Unsafe / http.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/runtime/Unsafe/http.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* Dealing with HTTP requests */
*===========================... | * serrano / prgm / project / bigloo / runtime / Unsafe / http.scm * /
* Author : * /
* Creation : Thu Aug 9 15:02:05 2007 * /
* Last change : Thu Oct 13 11:56:13 2016 ( serrano ) * /
* Cop... |
2c6c80ee56aa4933c70ff46db421227491390dabd09f499665d78cc2cca89f01 | bhauman/figwheel-template | figwheel.clj | (ns leiningen.new.figwheel
(:require [leiningen.new.templates :refer [renderer name-to-path ->files]]
[leiningen.core.main :as main]
[clojure.string :as string]))
(def render (renderer "figwheel"))
(defn os? []
(let [os-name
(-> (System/getProperty "os.name" "generic")
... | null | https://raw.githubusercontent.com/bhauman/figwheel-template/04b527a5c03e1ef6bd0f399c6b634d0adc231fae/src/leiningen/new/figwheel.clj | clojure | Check if om or reagent are in the options
I copy this levenshtein impl everywhere | (ns leiningen.new.figwheel
(:require [leiningen.new.templates :refer [renderer name-to-path ->files]]
[leiningen.core.main :as main]
[clojure.string :as string]))
(def render (renderer "figwheel"))
(defn os? []
(let [os-name
(-> (System/getProperty "os.name" "generic")
... |
e09026090da46200dc4e208ebc92fec90391facaf5187485a002be90506aef1e | WhatsApp/eqwalizer | wip_maps.erl | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
%%%
This source code is licensed under the Apache 2.0 license found in
%%% the LICENSE file in the root directory of this source tree.
-module(wip_maps).
-compile([export_all, nowarn_export_all]).
% only atom keys can be updated
% uncon... | null | https://raw.githubusercontent.com/WhatsApp/eqwalizer/8017d486c025eaa5c35ced1481ad5bad0f665efa/eqwalizer/test_projects/debug/src/wip_maps.erl | erlang |
the LICENSE file in the root directory of this source tree.
only atom keys can be updated
unconditionally
"mixed" updates are not supported | Copyright ( c ) Meta Platforms , Inc. and affiliates . All rights reserved .
This source code is licensed under the Apache 2.0 license found in
-module(wip_maps).
-compile([export_all, nowarn_export_all]).
-spec update_req_non_atom_neg
(map()) -> map().
update_req_non_atom_neg(M) ->
M#{1 := 1}.
( they... |
45ec882d3f9dd19109110dda74716b4497fc1c0e639a5a82c3d1cbfefe61b617 | kwantam/lviv | lviv-funcalls.scm | ;
Copyright ( c ) 2011 < >
;
;Permission is hereby granted, free of charge, to any person obtaining a copy
;of this software and associated documentation files (the "Software"), to deal
;in the Software without restriction, including without limitation the rights
;to use, copy, modify, merge, publish, distribute, s... | null | https://raw.githubusercontent.com/kwantam/lviv/bbfda50a4801f92b79631f77e7fa997dc10f0516/src/lviv-funcalls.scm | scheme |
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
furnished to... | Copyright ( c ) 2011 < >
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
IMPLIED , INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY ,
OR COPYRIGHT... |
38f5b6cd4f2297cf297f487c244da3781badda92c0a76bd105860649fb39d71d | replete-repl/replete-shared | repl_resources.cljs | (ns replete.repl-resources)
(def special-doc-map
'{. {:forms [(.instanceMethod instance args*)
(.-instanceField instance)]
:doc "The instance member form works for methods and fields.
They all expand into calls to the dot operator at macroexpansion time."}
ns {:forms [(n... | null | https://raw.githubusercontent.com/replete-repl/replete-shared/8c289b6c8be4eb7ffabcd92a712155b03d8dc665/src/replete/repl_resources.cljs | clojure | (ns replete.repl-resources)
(def special-doc-map
'{. {:forms [(.instanceMethod instance args*)
(.-instanceField instance)]
:doc "The instance member form works for methods and fields.
They all expand into calls to the dot operator at macroexpansion time."}
ns {:forms [(n... | |
b6b14a43b23c8c13e11bf9775b03aa7592d75d059951094197f37d51e9afca6a | metametadata/carry | core.cljs | (ns carry-history.core
(:require [cljs.core.match :refer-macros [match]]
[goog.events]
[goog.history.EventType :as EventType]
[clojure.string]
[clojure.set])
(:import goog.history.Html5History
[goog History]))
;;;;;;;;;;;;;;;;;;;;;;;;; History
(defprotocol... | null | https://raw.githubusercontent.com/metametadata/carry/fa5c7cd0d8f1b71edca70330acc97c6245638efb/contrib/history/src/carry_history/core.cljs | clojure | History
prevent firing an event if token is going to stay the same
initial signal
Link | (ns carry-history.core
(:require [cljs.core.match :refer-macros [match]]
[goog.events]
[goog.history.EventType :as EventType]
[clojure.string]
[clojure.set])
(:import goog.history.Html5History
[goog History]))
(defprotocol HistoryProtocol
"Protocol for o... |
1e813e6cf3d9c60aa7d50b81cb6044b365638e1c3c0c430a57dd9d6c7dbe1d6c | danieljharvey/mimsa | Wasm.hs | {-# LANGUAGE OverloadedStrings #-}
module Test.Backend.Wasm
( spec,
)
where
import Data.Bifunctor
import Data.Text (Text)
import Language.Mimsa.Backend.Wasm.Compile
import Language.Mimsa.Core
import Language.Mimsa.Typechecker.NumberVars
import Language.Mimsa.Typechecker.Typecheck
import qualified Language.Wasm as... | null | https://raw.githubusercontent.com/danieljharvey/mimsa/e6b177dd2c38e8a67d6e27063ca600406b3e6b56/compiler/test/Test/Backend/Wasm.hs | haskell | # LANGUAGE OverloadedStrings # |
module Test.Backend.Wasm
( spec,
)
where
import Data.Bifunctor
import Data.Text (Text)
import Language.Mimsa.Backend.Wasm.Compile
import Language.Mimsa.Core
import Language.Mimsa.Typechecker.NumberVars
import Language.Mimsa.Typechecker.Typecheck
import qualified Language.Wasm as Wasm
import qualified Language.Was... |
4e86c1a4f7076ecbe619d0b4f3f6f3f3f90e26162c06afbbed420fe9d2a89d55 | rd--/hsc3 | diskIn.help.hs | diskIn ; requires = dsk ; c.f . sndfileIn
let (buf, nc) = (control kr "dsk" 0, 2) in diskIn nc buf Loop
---- ; setup & cleanup
{fn = sfResolve "20.2-LW+RD.flac";nc = 2;dsk = 0}
withSc3 (mapM_ async [b_alloc dsk 65536 2,b_read dsk fn 0 (-1) 0 True])
withSc3 (mapM_ async [b_close dsk,b_free dsk])
| null | https://raw.githubusercontent.com/rd--/hsc3/024d45b6b5166e5cd3f0142fbf65aeb6ef642d46/Help/Ugen/diskIn.help.hs | haskell | -- ; setup & cleanup | diskIn ; requires = dsk ; c.f . sndfileIn
let (buf, nc) = (control kr "dsk" 0, 2) in diskIn nc buf Loop
{fn = sfResolve "20.2-LW+RD.flac";nc = 2;dsk = 0}
withSc3 (mapM_ async [b_alloc dsk 65536 2,b_read dsk fn 0 (-1) 0 True])
withSc3 (mapM_ async [b_close dsk,b_free dsk])
|
cc351c525a157d712edf894bdf21300b3fb20590b490ba1a5be4e70772b80733 | hidaris/thinking-dumps | chap4.rkt | #lang racket/base
;; Load the J-Bob language:
(require "j-bob/j-bob-lang.rkt")
;; Load J-Bob, our little proof assistant:
(require "j-bob/j-bob.rkt")
;; to part of this total breakfast.
(defun my-list0? (x)
(if (equal x 'oatmeal)
'nil
(if (equal x '())
't
(if (equal x '(toast))
... | null | https://raw.githubusercontent.com/hidaris/thinking-dumps/3fceaf9e6195ab99c8315749814a7377ef8baf86/the-little-series/the-little-prover/chap4.rkt | racket | Load the J-Bob language:
Load J-Bob, our little proof assistant:
to part of this total breakfast.
Given the total function (defun name (x1 ... xn) body),
(name e1 ... en) = body where x1 is e1, ..., xn is en.
Here is a partial functions.
A measure is an expression that is
included with a function definition. It... | #lang racket/base
(require "j-bob/j-bob-lang.rkt")
(require "j-bob/j-bob.rkt")
(defun my-list0? (x)
(if (equal x 'oatmeal)
'nil
(if (equal x '())
't
(if (equal x '(toast))
'nil
'nil))))
(defun my-list0?₂ (x)
(equal x '()))
(defun list1? (x)
(if (atom... |
778e3e9943a49c3cce9eda8b4948accc62ecadbeda6975123018c95aecbe8b98 | fission-codes/fission | ServerError.hs | # OPTIONS_GHC -fno - warn - orphans #
module Fission.Web.Server.Internal.Orphanage.ServerError () where
import RIO
import qualified RIO.Text as Text
import Servant.Server
instance Display ServerError where
display = displayShow
instance Display [ServerError] where
textDisplay errs = T... | null | https://raw.githubusercontent.com/fission-codes/fission/ae177407dccc20be67948a901956b99f40d37ac8/fission-web-server/library/Fission/Web/Server/Internal/Orphanage/ServerError.hs | haskell | # OPTIONS_GHC -fno - warn - orphans #
module Fission.Web.Server.Internal.Orphanage.ServerError () where
import RIO
import qualified RIO.Text as Text
import Servant.Server
instance Display ServerError where
display = displayShow
instance Display [ServerError] where
textDisplay errs = T... | |
ccdb8c83642bce5078cc3fcbedd0c27a84a847ce34b5349f313d544377730a5c | jabber-at/ejabberd | mod_adhoc.erl | %%%----------------------------------------------------------------------
File :
Author : < >
Purpose : Handle incoming ad - doc requests ( XEP-0050 )
Created : 15 Nov 2005 by < >
%%%
%%%
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
%%%
%%% This program is free software; you can redistrib... | null | https://raw.githubusercontent.com/jabber-at/ejabberd/7bfec36856eaa4df21b26e879d3ba90285bad1aa/src/mod_adhoc.erl | erlang | ----------------------------------------------------------------------
This program is free software; you can redistribute it and/or
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MER... | File :
Author : < >
Purpose : Handle incoming ad - doc requests ( XEP-0050 )
Created : 15 Nov 2005 by < >
ejabberd , Copyright ( C ) 2002 - 2018 ProcessOne
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation ; either version 2 of the
Y... |
6ddb3b83bfc3af985451307c653dd0550408046de6ab3a2606adfc890d98ff0b | philc/clj-maxmind-geoip | core.clj | A thin clojure wrapper around 's java APIs which access its geoip database .
; Currently this handles only countries.
(ns clj-maxmind-geoip.core
(:import com.maxmind.geoip.LookupService
com.maxmind.geoip.regionName
java.io.File
java.util.Locale))
(set! *warn-on-reflection* true)
... | null | https://raw.githubusercontent.com/philc/clj-maxmind-geoip/065b2d7410fd0981b3261e7aadd49580ed44c526/src/clj_maxmind_geoip/core.clj | clojure | Currently this handles only countries.
NOTE: We define init-geoip as a multimethod so that we can provide the contract of accepting either a
string or file while still preventing reflection. | A thin clojure wrapper around 's java APIs which access its geoip database .
(ns clj-maxmind-geoip.core
(:import com.maxmind.geoip.LookupService
com.maxmind.geoip.regionName
java.io.File
java.util.Locale))
(set! *warn-on-reflection* true)
(def ^:private geoip-access-modes {:memor... |
06a08e7d745d5b74ffdabaaceacc891a40ecaa42b2af79146fc02b726751b7a2 | broom-lang/broom | Untuple.mli | val untuple : Cps.Program.t -> Cps.Program.t
| null | https://raw.githubusercontent.com/broom-lang/broom/2b9869c79c52f5879db7ac27d4c61fff042b4ca4/compiler/lib/Optimizer/Untuple.mli | ocaml | val untuple : Cps.Program.t -> Cps.Program.t
| |
0e05e59a41bcf295a4f7a9304c66a136800c4343c160df596dc26ef35f29c29d | nunchaku-inria/nunchaku | Tip_ast.ml |
(* This file is free software. See file "license" for more details. *)
* { 1 Trivial AST for parsing }
open Nunchaku_core
let pp_str = Format.pp_print_string
let pp_to_string pp x =
let buf = Buffer.create 64 in
let fmt = Format.formatter_of_buffer buf in
pp fmt x;
Format.pp_print_flush fmt ();
Buffer.co... | null | https://raw.githubusercontent.com/nunchaku-inria/nunchaku/16f33db3f5e92beecfb679a13329063b194f753d/src/parsers/Tip_ast.ml | ocaml | This file is free software. See file "license" for more details.
* Polymorphic types
higher-order application
type cast
selector+type
arity
* {2 Errors} |
* { 1 Trivial AST for parsing }
open Nunchaku_core
let pp_str = Format.pp_print_string
let pp_to_string pp x =
let buf = Buffer.create 64 in
let fmt = Format.formatter_of_buffer buf in
pp fmt x;
Format.pp_print_flush fmt ();
Buffer.contents buf
module Loc = Location
type var = string
type ty_var = stri... |
4aa382c2eae594c98f201cc16c68f0689a26fb06f58efa1ae8d8054e7fdde9d7 | openmusic-project/openmusic | ominterface.lisp | ;=========================================================================
OpenMusic : Visual Programming Language for Music Composition
;
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
;
This file is part of the OpenMusic environment sources
;
OpenMusic is free software : you ... | null | https://raw.githubusercontent.com/openmusic-project/openmusic/9560c064512a1598cd57bcc9f0151c0815178e6f/OPENMUSIC/code/projects/mathtools/groups/dn/ominterface.lisp | lisp | =========================================================================
(at your option) any later version.
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
======... | OpenMusic : Visual Programming Language for Music Composition
Copyright ( c ) 1997- ... IRCAM - Centre , Paris , France .
This file is part of the OpenMusic environment sources
OpenMusic is free software : you can redistribute it and/or modify
it under the terms of the GNU General Public ... |
9e5a0e1db29e6ed27507204293d131d7bb6d1f6b5688203551eee62ea1a28673 | ocaml-flambda/ocaml-jst | deprecated_module.ml | (* TEST
flags = "-w +A"
* bytecode
*)
module M = struct
type t = int
let x = 10
end
[@@ocaml.deprecated]
let _ = M.x
include M
| null | https://raw.githubusercontent.com/ocaml-flambda/ocaml-jst/5bf2820278c58f6715dcfaf6fa61e09a9b0d8db3/testsuite/tests/warnings/deprecated_module.ml | ocaml | TEST
flags = "-w +A"
* bytecode
|
module M = struct
type t = int
let x = 10
end
[@@ocaml.deprecated]
let _ = M.x
include M
|
60071fbb11d208f510355448cef5dd0cfaba07fa2cfbbde93efda97709d6f4af | ghc/packages-dph | Options.hs |
module DPH.War.Options
( MainArg(..)
, mainArgs)
where
import System.Console.ParseArgs
data MainArg
= ArgHelp
| ArgVerbose
| ArgTestDir
| ArgJobs
| ArgClean
deriving (Show, Eq, Ord)
mainArgs :: [Arg MainArg]
mainArgs
= [ Arg { argIndex = ArgHelp
, argAbbr = Just 'h'
... | null | https://raw.githubusercontent.com/ghc/packages-dph/64eca669f13f4d216af9024474a3fc73ce101793/dph-test/framework/DPH/War/Options.hs | haskell |
module DPH.War.Options
( MainArg(..)
, mainArgs)
where
import System.Console.ParseArgs
data MainArg
= ArgHelp
| ArgVerbose
| ArgTestDir
| ArgJobs
| ArgClean
deriving (Show, Eq, Ord)
mainArgs :: [Arg MainArg]
mainArgs
= [ Arg { argIndex = ArgHelp
, argAbbr = Just 'h'
... | |
e926aa94757a09d814180c435acb7b670891f27b7a826a608e95e027041a1b8d | dmitryvk/sbcl-win32-threads | early-impl.lisp | This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
;;;; public domain. The software is in the public domain and is
;;;; provided with absolutely no wa... | null | https://raw.githubusercontent.com/dmitryvk/sbcl-win32-threads/5abfd64b00a0937ba2df2919f177697d1d91bde4/src/code/early-impl.lisp | lisp | more information.
public domain. The software is in the public domain and is
provided with absolutely no warranty. See the COPYING and CREDITS
files for more information.
as though they're special variables
FIXME: These should be listed once and only once, instead of
slightly differently) elsewhere.
FIXME: Th... | This software is part of the SBCL system . See the README file for
This software is derived from the CMU CL system , which was
written at Carnegie Mellon University and released into the
(in-package "SB!IMPL")
entries in STATIC - SYMBOLS table , references to which can be compiled
listed here and then liste... |
3e5934d7ca4a6c29ba4ebd230c12c0375dddf6a6962433ca913af7d54978cee6 | steffan-westcott/clj-otel | programmatic_sdk_config.clj | ! { : style [: respect - nl ] }
(ns example.programmatic_sdk_config
"An example application demonstrating programmatic configuration,
initialisation and shutdown of the OpenTelemetry SDK."
#_{:clj-kondo/ignore [:unsorted-required-namespaces]}
(:require
;; Require desired span exporters
[steffan-westcot... | null | https://raw.githubusercontent.com/steffan-westcott/clj-otel/3103cef4a0badf946e1511521ab764202e7eb1f7/examples/programmatic-sdk-config/src/example/programmatic_sdk_config.clj | clojure | Require desired span exporters
[steffan-westcott.clj-otel.exporter.otlp.http.trace :as otlp-http-trace]
[steffan-westcott.clj-otel.exporter.jaeger-thrift :as jaeger-thrift]
[steffan-westcott.clj-otel.exporter.zipkin :as zipkin]
[steffan-westcott.clj-otel.exporter.logging :as logging]
[steffan-westcott.clj-otel.exporte... | ! { : style [: respect - nl ] }
(ns example.programmatic_sdk_config
"An example application demonstrating programmatic configuration,
initialisation and shutdown of the OpenTelemetry SDK."
#_{:clj-kondo/ignore [:unsorted-required-namespaces]}
(:require
[steffan-westcott.clj-otel.exporter.otlp.grpc.trace :... |
d245bcde8131f301fa0bdb0a01989a3976be8d98e6a49c98898d1bb4a772f22b | haskell-CI/hackage-matrix-builder | Test.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -Wno - orphans #
module Main where
import Prelude
import Test.Tasty
import Test . Tasty . SmallCheck as SC
import Test.Tasty.QuickCheck as QC
import Test . Tasty . HUnit
... | null | https://raw.githubusercontent.com/haskell-CI/hackage-matrix-builder/bb813e9e4cf0d08352f33004c00ede987f45da56/src-test/Test.hs | haskell | -------------------------------------------------------------------------- | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE StandaloneDeriving #
# OPTIONS_GHC -Wno - orphans #
module Main where
import Prelude
import Test.Tasty
import Test . Tasty . SmallCheck as SC
import Test.Tasty.QuickCheck as QC
import Test . Tasty . HUnit
... |
b59ffbe3cd5a9956136972b7b1f6df82e0a77e649b85bd11cd0bcf43bae04f62 | haskell-numerics/hmatrix | Tests.hs | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - unused - imports -fno - warn - incomplete - patterns -fno - warn - missing - signatures #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
# LANGUAGE TypeOperators #
# LANGUAGE ViewPatterns #
------------------------... | null | https://raw.githubusercontent.com/haskell-numerics/hmatrix/2694f776c7b5034d239acb5d984c489417739225/packages/tests/src/Numeric/LinearAlgebra/Tests.hs | haskell | # LANGUAGE RankNTypes #
---------------------------------------------------------------------------
, findNaN
eps = peps :: Double
i = 0:+1 :: Complex Double
---------------------------------------------------------
-------------------------------------------------------------------
-----------------------------------... | # LANGUAGE CPP #
# OPTIONS_GHC -fno - warn - unused - imports -fno - warn - incomplete - patterns -fno - warn - missing - signatures #
# LANGUAGE DataKinds #
# LANGUAGE TypeFamilies #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeOperators #
# LANGUAGE ViewPatterns #
|
Module : Numeric . LinearAlgebra . Tes... |
f7b7a8e6309a7b172a9dcf49bc1dcf313820a8dcf0887baccbc468d51de83768 | dparis/gen-phzr | flex_grid.cljs | (ns phzr.flex-grid
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->FlexGrid
"WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete.
Please try to avoid using ... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/out/flex_grid.cljs | clojure | (ns phzr.flex-grid
(:require [phzr.impl.utils.core :refer [clj->phaser phaser->clj]]
[phzr.impl.extend :as ex]
[cljsjs.phaser]))
(defn ->FlexGrid
"WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete.
Please try to avoid using ... | |
5b636b6eab720893ca4383d12541a36c6663dd3e2f072f110e466284b5f4b1c6 | clojure-interop/google-cloud-clients | TranslateRpc.clj | (ns com.google.cloud.translate.spi.v2.TranslateRpc
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.translate.spi.v2 TranslateRpc]))
(defn list-supported-languages
"Returns a list of the languages supported by Google Translation.
option-map - options to listing language translations... | null | https://raw.githubusercontent.com/clojure-interop/google-cloud-clients/80852d0496057c22f9cdc86d6f9ffc0fa3cd7904/com.google.cloud.translate/src/com/google/cloud/translate/spi/v2/TranslateRpc.clj | clojure | (ns com.google.cloud.translate.spi.v2.TranslateRpc
(:refer-clojure :only [require comment defn ->])
(:import [com.google.cloud.translate.spi.v2 TranslateRpc]))
(defn list-supported-languages
"Returns a list of the languages supported by Google Translation.
option-map - options to listing language translations... | |
c64f1ccd678d0fdc530971311dff6a2daae49236bb611e77c1127b9fa0d09dbb | janestreet/bonsai | types.ml | open! Core
module type Name = sig
module Count : sig
type t
val zero : t
val succ : t -> t
end
type t
val to_string : t -> string
val create : unit -> t
val next : Count.t -> t * Count.t
include Comparable.S_binable with type t := t
include Sexpable.S with type t := t
end
module Defaul... | null | https://raw.githubusercontent.com/janestreet/bonsai/4baeedc75bf73a0915e04dc02d8a49b78779e9b0/experimental/dagviz/src/types.ml | ocaml | This ugly recursive type / recursive module structure is
required in order to get sexp-deriving to work correctly | open! Core
module type Name = sig
module Count : sig
type t
val zero : t
val succ : t -> t
end
type t
val to_string : t -> string
val create : unit -> t
val next : Count.t -> t * Count.t
include Comparable.S_binable with type t := t
include Sexpable.S with type t := t
end
module Defaul... |
a7c3bdb26f678b74223435c14abd0e397408126108c856db5edc5b69a1796339 | ku-fpg/haskino | SemExample.hs | {-# OPTIONS_GHC -fplugin=System.Hardware.Haskino.ShallowDeepPlugin #-}
-------------------------------------------------------------------------------
-- |
Module : System . Hardware . Haskino . SamplePrograms . Rewrite.semExample
Copyright : ( c ) University of Kansas
-- License : BSD3
-- Stabili... | null | https://raw.githubusercontent.com/ku-fpg/haskino/9a0709c92c2da9b9371e292b00fd076e5539eb18/legacy/Rewrite/SemExample.hs | haskell | # OPTIONS_GHC -fplugin=System.Hardware.Haskino.ShallowDeepPlugin #
-----------------------------------------------------------------------------
|
License : BSD3
Stability : experimental
-----------------------------------------------------------------------------
Create the tasks
Execute this function to... | Module : System . Hardware . Haskino . SamplePrograms . Rewrite.semExample
Copyright : ( c ) University of Kansas
This is an example of using semaphores to communicate between two tasks .
One task gives a semaphore then delays for 2 seconds . The other task
waits for the semaphore then blinks t... |
50085c9efc088773aaff6a5599cb8fb65e23314ed8bec4ce8fc9248f77b9deae | CarlosMChica/HaskellBook | enumFromTo.hs | module EnumFromTo where
eftBool :: Bool -> Bool -> [Bool]
eftBool = eft'
eftOrd :: Ordering -> Ordering -> [Ordering]
eftOrd = eft'
eftInt :: Int -> Int -> [Int]
eftInt = eft'
eftChar :: Char -> Char -> String
eftChar = eft'
eft' :: (Ord a, Enum a) => a -> a -> [a]
eft' x y
| x > y = []
| otherwi... | null | https://raw.githubusercontent.com/CarlosMChica/HaskellBook/86f82cf36cd00003b1a1aebf264e4b5d606ddfad/chapter9/enumFromTo.hs | haskell | module EnumFromTo where
eftBool :: Bool -> Bool -> [Bool]
eftBool = eft'
eftOrd :: Ordering -> Ordering -> [Ordering]
eftOrd = eft'
eftInt :: Int -> Int -> [Int]
eftInt = eft'
eftChar :: Char -> Char -> String
eftChar = eft'
eft' :: (Ord a, Enum a) => a -> a -> [a]
eft' x y
| x > y = []
| otherwi... | |
ac80526687aa26906cbf691242fcfa3978b5df9c34155eb73b92d8dd25b6e105 | PrincetonUniversity/lucid | tofinoCore.ml | Core syntax with a few extra nodes for the Tofino .
Core syntax with two new declarations that are
useful for organizing core Lucid code into a
form that is easy to translate into P4 .
The new declarations in tofinocore are :
1 . a " main handler " is the union of all
handlers . It is... | null | https://raw.githubusercontent.com/PrincetonUniversity/lucid/8ca93fd803caaa80cf2e301154791564dd3fed7e/src/lib/backend/tofinoCore.ml | ocaml | All sizes should be inlined and precomputed
count the number of recirc / self events
generated on this path
all possible sequences of events
that this program can generate.
find all the possible sequences of events that get generated
make sure we only find the _unique_ paths
print_endline ("IF");... | Core syntax with a few extra nodes for the Tofino .
Core syntax with two new declarations that are
useful for organizing core Lucid code into a
form that is easy to translate into P4 .
The new declarations in tofinocore are :
1 . a " main handler " is the union of all
handlers . It is... |
77937c6484b48ee7ac1ccd3daf6ce0aa00f206c27f2c39619b9c89b1b325fb71 | TrustInSoft/tis-interpreter | property.ml | Modified by TrustInSoft
(**************************************************************************)
(* *)
This file is part of Frama - C.
(* ... | null | https://raw.githubusercontent.com/TrustInSoft/tis-interpreter/33132ce4a825494ea48bf2dd6fd03a56b62cc5c3/src/kernel_services/ast_data/property.ml | ocaml | ************************************************************************
alternatives)
... | Modified by TrustInSoft
This file is part of Frama - C.
Copyright ( C ) 2007 - 2015
CEA ( Commissariat à l'énergie atomique et aux énergies
Lesser General Public License as published by the Free Softwa... |
9d13f94f28a95fc073ec73916c65e30ad7c6266e07f20d48c7ad70f48e6b5ce3 | ghc/packages-base | Utils.hs | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
-----------------------------------------------------------------------------
-- |
-- Module : Foreign.Marshal.Utils
Copyright : ( c ) The FFI task force 2001
-- License : BSD-style (see the file libraries/base/LICENSE)
--
Maintainer :
-... | null | https://raw.githubusercontent.com/ghc/packages-base/52c0b09036c36f1ed928663abb2f295fd36a88bb/Foreign/Marshal/Utils.hs | haskell | ---------------------------------------------------------------------------
|
Module : Foreign.Marshal.Utils
License : BSD-style (see the file libraries/base/LICENSE)
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
* Gen... | # LANGUAGE Trustworthy #
# LANGUAGE NoImplicitPrelude #
Copyright : ( c ) The FFI task force 2001
Maintainer :
Utilities for primitive marshaling
module Foreign.Marshal.Utils (
with,
new,
* * Marshalling of Boolean values ( non - zero corresponds to ' True ' )
fromBool,
toBool,
maybeNew... |
fd54f237aab924c9002832571772f8bba37f91c9b0afb8ce3aa5bb3d32de1aa8 | input-output-hk/ouroboros-network | ChainDB.hs | -- | The storage layer is a highly specialized database for storing the blockchain.
It consists of five subcomponents :
--
* An abstract file system API , ' Ouroboros . Consensus . Storage . FS.API.HasFS ' ,
-- that smooths out over some differences between the file systems of
-- different operating systems a... | null | https://raw.githubusercontent.com/input-output-hk/ouroboros-network/959fa23d0a2bf963b109063ad998fb83edce73e4/ouroboros-consensus/src/Ouroboros/Consensus/Storage/ChainDB.hs | haskell | | The storage layer is a highly specialized database for storing the blockchain.
that smooths out over some differences between the file systems of
different operating systems and, more importantly, allows us to simulate
all kinds of failures. This is then used for stress-testing the other
components belo... | It consists of five subcomponents :
* An abstract file system API , ' Ouroboros . Consensus . Storage . FS.API.HasFS ' ,
* The _ _ [ Immutable . Consensus . Storage . " ) _ _ , stores
chain . ' Ouroboros . Consensus . Storage . ImmutableDB.API.ImmutableDB ' defines the
* The _ _ [ Volatile DB]("Ouroboro... |
869fa2e57aabecb5b40995e997d6131f39c69bf2574b2a0453f24ce729e12317 | ghc/packages-Cabal | ShowBuildInfo.hs | -- |
-- This module defines a simple JSON-based format for exporting basic
information about a Cabal package and the compiler configuration Cabal
-- would use to build it. This can be produced with the
new - show - build - info@ command .
--
--
-- This format is intended for consumption by external tooling and sho... | null | https://raw.githubusercontent.com/ghc/packages-Cabal/6f22f2a789fa23edb210a2591d74ea6a5f767872/Cabal/Distribution/Simple/ShowBuildInfo.hs | haskell | |
This module defines a simple JSON-based format for exporting basic
would use to build it. This can be produced with the
This format is intended for consumption by external tooling and should
therefore be rather stable. Moreover, this allows tooling users to avoid
tends to be rather fragile in the presence of ... | information about a Cabal package and the compiler configuration Cabal
new - show - build - info@ command .
linking against Cabal . This is an important advantage as direct API usage
Cabal .
" flavour " : " GHC " ,
" name " : " lib : " ,
" modules " : [ " Project . " , " Project . ModB ... |
71edfdcee37b4b6efb83006b78c83ad64b9f12b03151822c1bbe43ecea11e272 | MyDataFlow/ttalk-server | cowboy_req.erl | Copyright ( c ) 2011 - 2014 , < >
Copyright ( c ) 2011 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVID... | null | https://raw.githubusercontent.com/MyDataFlow/ttalk-server/07a60d5d74cd86aedd1f19c922d9d3abf2ebf28d/deps/cowboy/src/cowboy_req.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2011 - 2014 , < >
Copyright ( c ) 2011 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(cowboy_req).
... |
95c7d087c0cb479b605e4207ff1cd2836bc06bb55993dce254773ab64d6b0c1e | petelliott/pscheme | string.scm | (define-library (pscheme string)
(import (scheme base)
(scheme read))
(export string-join
string-starts-with
string-split
string->object)
(begin
(define (string-join sep strings)
(if (null? strings)
""
(apply string-append
(ca... | null | https://raw.githubusercontent.com/petelliott/pscheme/3be8671116c1d9ea840a9cc7cffd3632fe03d6ac/scm/pscheme/string.scm | scheme | (define-library (pscheme string)
(import (scheme base)
(scheme read))
(export string-join
string-starts-with
string-split
string->object)
(begin
(define (string-join sep strings)
(if (null? strings)
""
(apply string-append
(ca... | |
9f94fc4e42d3fae1c7cf86533f65f49d5581d51c85effb1b34e5f93a926e0af8 | xtdb/xtdb | api.clj | (ns xtdb.api
"Public API of XTDB."
(:refer-clojure :exclude [sync])
(:require [clojure.spec.alpha :as s]
[xtdb.codec :as c]
[xtdb.system :as sys])
(:import [xtdb.api IXtdb IXtdbSubmitClient RemoteClientOptions]
java.lang.AutoCloseable
java.time.Duration
[... | null | https://raw.githubusercontent.com/xtdb/xtdb/f415b666f48e112271c7eeac3c4224cd7144999a/core/src/xtdb/api.clj | clojure | can be false in the case of a rollback or failure, for example, if an ::xt/fn op throws, or a match condition is not met.
if :with-tx-ops? is true
| (ns xtdb.api
"Public API of XTDB."
(:refer-clojure :exclude [sync])
(:require [clojure.spec.alpha :as s]
[xtdb.codec :as c]
[xtdb.system :as sys])
(:import [xtdb.api IXtdb IXtdbSubmitClient RemoteClientOptions]
java.lang.AutoCloseable
java.time.Duration
[... |
a7c5941669b28fd9f3cf091792ef1e8bbcccaa6ca56c3479fb3879051edfa1d5 | 7theta/re-frame-via | msg_handler.clj | ;; Copyright (c) 7theta. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (-v10.html)
;; which can be found in the LICENSE file at the root of this
;; distribution.
;;
;; By using this software in any fashion, you are agreeing to be bo... | null | https://raw.githubusercontent.com/7theta/re-frame-via/ae530337eff4098991e937d6e06aa413d8ad7b45/example/src/clj/example/msg_handler.clj | clojure | Copyright (c) 7theta. All rights reserved.
The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-v10.html)
which can be found in the LICENSE file at the root of this
distribution.
By using this software in any fashion, you are agreeing to be bound by
the ... |
(ns example.msg-handler
(:require [re-frame-via.authenticator :as auth]
[integrant.core :as ig]))
(defmulti msg-handler (fn [opts message] (:id message)))
(defmethod ig/init-key :example/msg-handler
[_ {:keys [authenticator] :as opts}]
(fn [message] (msg-handler opts message)))
(defmethod msg-han... |
d90a3f2d5d28f5d309428ebb0b200ede93d5c22cb7d934f43129ddb0e90c09e8 | kazu-yamamoto/http2 | Main.hs | {-# LANGUAGE BangPatterns #-}
module Main where
import Control.Concurrent.STM
import Gauge.Main
import Data.List (foldl')
import System.Random.MWC
import qualified RingOfQueuesSTM as A
import qualified RingOfQueues as AIO
import qualified BinaryHeapSTM as B
import qualified BinaryHeap as BIO
import qualified Heap as... | null | https://raw.githubusercontent.com/kazu-yamamoto/http2/3c29763be147a3d482eff28f427ad80f1d4df706/bench-priority/Main.hs | haskell | # LANGUAGE BangPatterns #
--------------------------------------------------------------
--------------------------------------------------------------
--------------------------------------------------------------
--------------------------------------------------------------
------------------------------------------... |
module Main where
import Control.Concurrent.STM
import Gauge.Main
import Data.List (foldl')
import System.Random.MWC
import qualified RingOfQueuesSTM as A
import qualified RingOfQueues as AIO
import qualified BinaryHeapSTM as B
import qualified BinaryHeap as BIO
import qualified Heap as O
import qualified Network.HT... |
6c5c6954dd792711be32f1f4632a4570eb2142a6531a4519a79581b3a5fa1dfc | keechma/keechma-toolbox | cursor.cljs | (ns keechma.toolbox.forms.cursor)
(defn set-selection! [el pos]
(set! (.-selectionStart el) pos)
(set! (.-selectionEnd el) pos))
(defn calc-caret-pos-add [format-chars caret-start old-value new-value]
(loop [start-pos caret-start
rest-old (drop caret-start old-value)
rest-new (drop caret-start... | null | https://raw.githubusercontent.com/keechma/keechma-toolbox/61bf68cbffc1540b56b7b1925fef5e0aa12d60e7/src/cljs/keechma/toolbox/forms/cursor.cljs | clojure | (ns keechma.toolbox.forms.cursor)
(defn set-selection! [el pos]
(set! (.-selectionStart el) pos)
(set! (.-selectionEnd el) pos))
(defn calc-caret-pos-add [format-chars caret-start old-value new-value]
(loop [start-pos caret-start
rest-old (drop caret-start old-value)
rest-new (drop caret-start... | |
d850ed834ef3dee8bef1671678e3e1b41b47f026b72c97a6f71290d5a51bf95c | greglook/cljstyle | util.clj | (ns cljstyle.task.util
"Common utilities for output and option sharing."
(:require
[cljstyle.config :as config]
[clojure.java.io :as io]
[clojure.pprint :as pp]
[clojure.string :as str]))
# # Exit Handling
(def ^:dynamic *suppress-exit*
"Bind this to prevent tasks from exiting the system proc... | null | https://raw.githubusercontent.com/greglook/cljstyle/1f58e2e7af4c193aa77ad0695f6c2b9ac2c5c5ec/src/cljstyle/task/util.clj | clojure | ## Coloring
## Message Output
## Reporting
else
100 ms
any longer | (ns cljstyle.task.util
"Common utilities for output and option sharing."
(:require
[cljstyle.config :as config]
[clojure.java.io :as io]
[clojure.pprint :as pp]
[clojure.string :as str]))
# # Exit Handling
(def ^:dynamic *suppress-exit*
"Bind this to prevent tasks from exiting the system proc... |
6caf1dee977bd7c72c48c9f74fff8f15ce208fbcce74591eb9a31dca6ff3bfeb | electric-sql/vaxine | multiple_dcs_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/electric-sql/vaxine/872a83ea8d4935a52c7b850bb17ab099ee9c346b/apps/antidote/test/multidc/multiple_dcs_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... |
4ad04256a7e47a632fe0d340399201c741f9d31d4ffb1ff92265a3782f7b169c | rampion/tree-traversals | TreeLike.hs | {-# OPTIONS_GHC -Wno-name-shadowing #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE ViewPatterns #
# LANGUAGE DataKinds #
{-# LANGUAGE GADTs #-}
# LANGUAGE TypeOperators #
# LANGUAGE DeriveFunctor #
# LANGUAGE ScopedTypeVariables #
-- | By providing a 'TreeLike' instance, a functor can be traversed in several
-- orders:
--... | null | https://raw.githubusercontent.com/rampion/tree-traversals/f9304f532bca56c455463ea66e148a4a02e908d9/src/Data/Traversable/TreeLike.hs | haskell | # OPTIONS_GHC -Wno-name-shadowing #
# LANGUAGE RankNTypes #
# LANGUAGE GADTs #
| By providing a 'TreeLike' instance, a functor can be traversed in several
orders:
['inorder' / 'InOrder']
Viewing a 'TreeLike' functor as a sequence of values and subtrees, an
/__inorder__/ traversal iterates through this seque... | # LANGUAGE ViewPatterns #
# LANGUAGE DataKinds #
# LANGUAGE TypeOperators #
# LANGUAGE DeriveFunctor #
# LANGUAGE ScopedTypeVariables #
┌ ─ ─ 2 ┴ ─ ─ ─ ┐ ┌ 7 ─ ┴ ─ ─ ┐
┌ 0 ┴ ┐ ┌ ─ ┴ 5 ┐ ╵ ┌ ─ 9 ┴ ─ ┐
╵ ┌ 1 ┐ ┌ 3 ┴ ┐ ╵ ┌ 8 ┐ ┌ 10 ┐
[ ' preorder ' / ' PreOrder ' ]
> ... |
d2b5de776895d91b11bcf3cab43b4dc4712c621821413305f2b3850abb16123d | sunng87/slacker | bench.clj | (ns slacker.example.bench
(:require [slacker.client :refer :all])
(:import [java.util.concurrent Executors CountDownLatch]))
(def conn (slackerc "127.0.0.1:2104" :content-type :nippy))
(defn-remote conn slacker.example.api/rand-ints)
(defn -main [& args]
(let [task-count 500000
pool (Executors/newFixed... | null | https://raw.githubusercontent.com/sunng87/slacker/60e5372782bed6fc58cb8ba55951516a6b971513/examples/slacker/example/bench.clj | clojure | (ns slacker.example.bench
(:require [slacker.client :refer :all])
(:import [java.util.concurrent Executors CountDownLatch]))
(def conn (slackerc "127.0.0.1:2104" :content-type :nippy))
(defn-remote conn slacker.example.api/rand-ints)
(defn -main [& args]
(let [task-count 500000
pool (Executors/newFixed... | |
6e5f4a5a2f2d9e96512323c0a9f392652c96bbb7cae8da81c41a4d809f48e1bf | nomeata/haskell-rec-def | P2.hs | # LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE CPP #
| A propagator for the two - point lattice
--
module Data.Propagator.P2
( P2
, newP2
, newTopP2
, setTop
, whenTop
, implies
, isTop
)
where
import Data.Propagator.Class
I want to test this code with d... | null | https://raw.githubusercontent.com/nomeata/haskell-rec-def/3365379b6c29aa32a5170b8d0336c73413ca7434/Data/Propagator/P2.hs | haskell |
^ Just act: Still bottom, run act (once!) when triggered
^ Definitely bottom
^ Definitely top
| A new propagator, initialized at bottom
| A new propagator, already set to top
| Set a propagator to top.
If it was bottom before, runs the actions queued with 'whenTop'. It does so
/after/ setting the propagator ... | # LANGUAGE LambdaCase #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE CPP #
| A propagator for the two - point lattice
module Data.Propagator.P2
( P2
, newP2
, newTopP2
, setTop
, whenTop
, implies
, isTop
)
where
import Data.Propagator.Class
I want to test this code with deja... |
57738936b7367561dd199be5dd39ce5dfbb0eac491b2e5d1b9cf0a6d0d517187 | VisionsGlobalEmpowerment/webchange | cover_back.clj | (ns webchange.templates.library.flipbook.cover-back
(:require
[webchange.templates.library.flipbook.display-names :refer [get-text-display-name]]
[webchange.utils.scene-data :refer [generate-name rename-object]]))
(def page-name "page-cover-back")
(def resources ["/raw/img/flipbook/logo_2.png"])
(def templ... | null | https://raw.githubusercontent.com/VisionsGlobalEmpowerment/webchange/4be2784b170befe245d60e32271b88e6fae31c13/src/clj/webchange/templates/library/flipbook/cover_back.clj | clojure | (ns webchange.templates.library.flipbook.cover-back
(:require
[webchange.templates.library.flipbook.display-names :refer [get-text-display-name]]
[webchange.utils.scene-data :refer [generate-name rename-object]]))
(def page-name "page-cover-back")
(def resources ["/raw/img/flipbook/logo_2.png"])
(def templ... | |
0685a7af69d2d01f61531b0af3ffd3c15a4363b480db0e95ca65aa55e1b490b7 | rmloveland/scheme48-0.53 | jar-defrecord.scm | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
; This knows about the implementation of records and creates the various
accessors , mutators , etc . directly instead of calling the procedures
; from the record structure. This is done to allow the optional auto-inlining
optimizer to inline the acce... | null | https://raw.githubusercontent.com/rmloveland/scheme48-0.53/1ae4531fac7150bd2af42d124da9b50dd1b89ec1/scheme/rts/jar-defrecord.scm | scheme | This knows about the implementation of records and creates the various
from the record structure. This is done to allow the optional auto-inlining
LOOPHOLE is used to get a little compile-time type checking (in addition to
the usual complete run-time checking).
(define-constructor <id> <type> ((<arg> <arg-type>)*... | Copyright ( c ) 1993 - 1999 by and . See file COPYING .
accessors , mutators , etc . directly instead of calling the procedures
optimizer to inline the accessors , mutators , etc .
(define-syntax define-record-type
(syntax-rules ()
((define-record-type ?id ?type
(?constructor ?arg ...)
... |
884ec20dbe6e3072d6904dfd668b2d47c829cd16d2e7d33429d4a67a01aeb7d7 | haskellari/strict | Strict.hs | {-# LANGUAGE Safe #-}
-----------------------------------------------------------------------------
-- |
-- Module : System.IO.Strict
Copyright : ( c ) 2007
-- License : BSD-style (see the file libraries/base/LICENSE)
--
-- Maintainer :
-- Stability : stable
-- Portability : portable
--
Th... | null | https://raw.githubusercontent.com/haskellari/strict/4691acdfbe95dcd49725baec09127fa0077d93ba/strict/src/System/IO/Strict.hs | haskell | # LANGUAGE Safe #
---------------------------------------------------------------------------
|
Module : System.IO.Strict
License : BSD-style (see the file libraries/base/LICENSE)
Maintainer :
Stability : stable
Portability : portable
---------------------------------------------------------... | Copyright : ( c ) 2007
The standard IO input functions using strict IO .
module System.IO.Strict (
) where
import Prelude ( String, (>>=), seq, return, (.), (=<<), FilePath, length)
import System.IO (IO)
import qualified System.IO as IO
Strict hGetContents
| Computation ' hGetContents ' @hdl@ re... |
501ff1cf4a5b387234a47e52edc3c4718fc4e2e24e30f5c513605e8e2f02e795 | nick8325/quickspec | Refinements.hs | import QuickSpec
import Test.QuickCheck hiding (NonZero)
{- The universe of types -}
type NonZero = { x : Int | x /= 0 }
newtype NonZero = NonZero Int deriving (Ord, Eq, Show)
instance Arbitrary NonZero where
arbitrary = NonZero <$> arbitrary `suchThat` (/= 0)
{- type Odd = { x : Int | odd x } -}
newtype Odd = ... | null | https://raw.githubusercontent.com/nick8325/quickspec/cb61f719d3d667674431867037ff44dec22ca4f9/examples/tests/Refinements.hs | haskell | The universe of types
type Odd = { x : Int | odd x }
NonZero <= Int
Odd <= Int
The functions of interest | import QuickSpec
import Test.QuickCheck hiding (NonZero)
type NonZero = { x : Int | x /= 0 }
newtype NonZero = NonZero Int deriving (Ord, Eq, Show)
instance Arbitrary NonZero where
arbitrary = NonZero <$> arbitrary `suchThat` (/= 0)
newtype Odd = Odd Int deriving (Ord, Eq, Show)
instance Arbitrary Odd where
... |
567024d2e2c05c4936e09094e763060f8e06d25b763d89d157f82c123e38eb03 | ghcjs/ghcjs-dom | CSSImportRule.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.CSSImportRule
(js_getHref, getHref, getHrefUnsafe, getHrefUnchecked, js_getMedia,
... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/CSSImportRule.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.CSSImportRule
(js_getHref, getHref, getHrefUnsafe, getHrefUnchecked, js_getMedia,
getMedia, js_getStyleSheet, getStyleSheet, CSSImportRule(..),
gTypeCSSImportRule)
... |
11cee03f8ac2a82ce6f3ec3247dfa1c2d6dd3b94b51f65db8242af8522929e1d | metawilm/cl-python | mod-string-test.lisp | ;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CLPYTHON.TEST -*-
;;
This software is Copyright ( c ) Franz Inc. and .
Franz Inc. and grant you the rights to
;; distribute and use this software as governed by the terms
of the Lisp Lesser GNU Public License
;; (),
;; known as the LLGPL.
(in-package :clpython... | null | https://raw.githubusercontent.com/metawilm/cl-python/bce7f80b0c67d3c9f514556f2d14d098efecdde8/test/mod-string-test.lisp | lisp | -*- Mode: LISP; Syntax: COMMON-LISP; Package: CLPYTHON.TEST -*-
distribute and use this software as governed by the terms
(),
known as the LLGPL. | This software is Copyright ( c ) Franz Inc. and .
Franz Inc. and grant you the rights to
of the Lisp Lesser GNU Public License
(in-package :clpython.test)
(defun run-mod-string-test ()
(with-subtest (:name "module String")
(run-no-error "
import string
t = string.maketrans('ab', 'xy')
string.translate... |
c9611e56f1bb28e28015e7047120f42054fe28830d288d623871fe955477b2e8 | unnohideyuki/bunny | sample247.hs | main = putStrLn $ concat ["abc", "", "xyz"]
| null | https://raw.githubusercontent.com/unnohideyuki/bunny/501856ff48f14b252b674585f25a2bf3801cb185/compiler/test/samples/sample247.hs | haskell | main = putStrLn $ concat ["abc", "", "xyz"]
| |
47d4db21e0f30dba14e27aa3401db5dbc7568fcb2676a8b8e974c57a09bbc148 | kwanghoon/polyrpc | Prim.hs | # LANGUAGE DeriveDataTypeable , DeriveGeneric #
module Prim where
import GHC.Generics hiding (Prefix, Infix)
import Text.JSON.Generic
import Data.Text.Prettyprint.Doc hiding (Pretty)
import Data.Text.Prettyprint.Doc.Util
data PrimOp =
{ l } . -l- >
{ l } . ( , ) -l- >
{ l } . ( , ) -l- >
| EqPrimOp --{l}... | null | https://raw.githubusercontent.com/kwanghoon/polyrpc/49ba773bd3f1b22dce1ad64cda44683553d27c89/app/ast/Prim.hs | haskell | {l}. (?, ?) -l-> Bool (Overloaded)
{l}. (?, ?) -l-> Bool (Overloaded)
{l}. Int -l-> Int
For basic libraries
For creating recursive closures
| MkRecOp -- MkRecOp closure f
Predefined type names
Todo: to implement ppPrim | # LANGUAGE DeriveDataTypeable , DeriveGeneric #
module Prim where
import GHC.Generics hiding (Prefix, Infix)
import Text.JSON.Generic
import Data.Text.Prettyprint.Doc hiding (Pretty)
import Data.Text.Prettyprint.Doc.Util
data PrimOp =
{ l } . -l- >
{ l } . ( , ) -l- >
{ l } . ( , ) -l- >
{ l } . ( String , ... |
e7ff36e23da51ab720a3c070f468d19c6fb70ed09302ea07d06428979fc5e51a | kushidesign/kushi | state.cljs | (ns kushi.playground.state
(:require
[kushi.ui.dom :as dom]
[applied-science.js-interop :as j]
[reagent.core :as r]))
(def *state (r/atom {
;; :init-focused-component "button"
:components-expanded? false
:snippet-by-component {}
... | null | https://raw.githubusercontent.com/kushidesign/kushi/6a50dc0336a8e7fe8ddd776fcf41689f9110e590/src/kushi/playground/state.cljs | clojure | :init-focused-component "button" | (ns kushi.playground.state
(:require
[kushi.ui.dom :as dom]
[applied-science.js-interop :as j]
[reagent.core :as r]))
(def *state (r/atom {
:components-expanded? false
:snippet-by-component {}
:dev {:show-focused-section? false}}))
(def *focuse... |
fa7ba016a0378c5d08e6cfe0df824e388f547a54754b4202909847510ed11aa1 | W-Net-AI/LISP-CV | contrib.lisp | ;;;; -*- mode: lisp; indent-tabs: nil -*-
;;;; contrib.lisp
;;;; OpenCV bindings
;;;; Contributed/Experimental Stuff
(in-package :lisp-cv)
;;; ColorMaps in OpenCV
void applyColorMap(InputArray src , OutputArray dst , )
void cv_applyColorMap(Mat * src , dst , )
(defcfun ("cv_applyColorMap" apply-color-map... | null | https://raw.githubusercontent.com/W-Net-AI/LISP-CV/10d5c7c1a6fa026de488ca89a28e8a5c519ff8f2/contrib.lisp | lisp | -*- mode: lisp; indent-tabs: nil -*-
contrib.lisp
OpenCV bindings
Contributed/Experimental Stuff
ColorMaps in OpenCV |
(in-package :lisp-cv)
void applyColorMap(InputArray src , OutputArray dst , )
void cv_applyColorMap(Mat * src , dst , )
(defcfun ("cv_applyColorMap" apply-color-map) :void
(src mat)
(dest mat)
(colormap :int))
|
755e95c1ea2425c78525f99e27926966d7561dfe48d397170734adfd12fdb722 | UU-ComputerScience/uhc | NameIntro1.hs | {- ----------------------------------------------------------------------------------------
what : name introduction
expected: ok, for function binding
---------------------------------------------------------------------------------------- -}
module Main where
-- ok
fok x = '4'
fok x = '5'
main :: IO ()
ma... | null | https://raw.githubusercontent.com/UU-ComputerScience/uhc/f2b94a90d26e2093d84044b3832a9a3e3c36b129/EHC/test/regress/99/NameIntro1.hs | haskell | ----------------------------------------------------------------------------------------
what : name introduction
expected: ok, for function binding
----------------------------------------------------------------------------------------
ok |
module Main where
fok x = '4'
fok x = '5'
main :: IO ()
main = putStr "Dummy"
|
defc6b453a0566623eef57de2be2aee1df1a2c873180a3da9d32ed66ca4f78cb | alexbs01/OCaml | command.ml |
open Context;;
open Arith;;
exception End_of_program;;
type command =
Eval of arith
| Var_def of string * arith
| Quit;;
let rec run ctx = function
Eval e ->
let f = eval ctx e in
let _ = print_endline (string_of_float f) in
ctx
| Var_def (name, value) ->
let v = eval ctx value in
let _ = pri... | null | https://raw.githubusercontent.com/alexbs01/OCaml/92a28522a8467d8ed87ef380b6175f1c21616f85/p12/command.ml | ocaml |
open Context;;
open Arith;;
exception End_of_program;;
type command =
Eval of arith
| Var_def of string * arith
| Quit;;
let rec run ctx = function
Eval e ->
let f = eval ctx e in
let _ = print_endline (string_of_float f) in
ctx
| Var_def (name, value) ->
let v = eval ctx value in
let _ = pri... | |
695cb792a1d659b6f91d14a696f970523dc6e1250de3eb1e35c3b05d0437780c | sirherrbatka/vellum | types.lisp | (cl:in-package #:vellum.table)
(defclass fundamental-table (cl-ds:traversable)
())
(defclass standard-table (fundamental-table)
((%header :reader header
:initarg :header)
(%columns :reader read-columns
:writer write-columns
:initarg :columns
:type vector)))
... | null | https://raw.githubusercontent.com/sirherrbatka/vellum/92e133e0d2592b51a6cd5683761d37bbc663b17b/src/table/types.lisp | lisp | (cl:in-package #:vellum.table)
(defclass fundamental-table (cl-ds:traversable)
())
(defclass standard-table (fundamental-table)
((%header :reader header
:initarg :header)
(%columns :reader read-columns
:writer write-columns
:initarg :columns
:type vector)))
... | |
a8c05c4feb8c28bc6089bdd3219386b51e4558a4b7c645e14c4cfabd16a976a9 | charlieg/Sparser | head-of.lisp | ;;; -*- Mode:LISP; Syntax:Common-Lisp; Package:(CTI-source LISP) -*-
copyright ( c ) 1991 Content Technologies Inc. -- all rights reserved
;;;
;;; File: "head of"
Module : " model;sl : whos news : posts : "
version : April 1991 system version 1.8.4
initiated 5/9
(in-package :CTI-source)
... | null | https://raw.githubusercontent.com/charlieg/Sparser/b9bb7d01d2e40f783f3214fc104062db3d15e608/Sparser/code/s/grammar/model/core/titles/head-of.lisp | lisp | -*- Mode:LISP; Syntax:Common-Lisp; Package:(CTI-source LISP) -*-
File: "head of"
it should get flushed in favor of the verb
-------------------------------------------
rules specific to "head" taken as a title
------------------------------------------- | copyright ( c ) 1991 Content Technologies Inc. -- all rights reserved
Module : " model;sl : whos news : posts : "
version : April 1991 system version 1.8.4
initiated 5/9
(in-package :CTI-source)
5/26 --this is the only rule that mentions " head " literally
(def-cfr title ("head" ThisCo)
... |
b77edc20b57030339f0c9bc9a7b44d2870b7b59cfd71dae25d7534d5959d8fed | greglook/alphabase | bytes_test.cljc | (ns alphabase.bytes-test
(:require
[alphabase.bytes :as b]
[clojure.test :refer [deftest is are testing]]))
(deftest bytes-tests
(testing "bytes?"
(is (not (b/bytes? nil)))
(is (not (b/bytes? "foo")))
(is (b/bytes? (b/byte-array 0)))
(is (b/bytes? (b/byte-array 1))))
(testing "bytes="
... | null | https://raw.githubusercontent.com/greglook/alphabase/21f03acd09520e298e2c42dc767bd2b63a718e6e/test/alphabase/bytes_test.cljc | clojure | (ns alphabase.bytes-test
(:require
[alphabase.bytes :as b]
[clojure.test :refer [deftest is are testing]]))
(deftest bytes-tests
(testing "bytes?"
(is (not (b/bytes? nil)))
(is (not (b/bytes? "foo")))
(is (b/bytes? (b/byte-array 0)))
(is (b/bytes? (b/byte-array 1))))
(testing "bytes="
... | |
e4599b6e2a182d1d3ad648b4e8e8615deb2702fa4265b88832df79464bb8207a | finnishtransportagency/harja | toimenpidekilometrit_test.clj | (ns harja.palvelin.raportointi.toimenpidekilometrit-test
(:require [clojure.test :refer :all]
[harja.palvelin.komponentit.tietokanta :as tietokanta]
[harja.palvelin.palvelut.toimenpidekoodit :refer :all]
[harja.palvelin.palvelut.urakat :refer :all]
[harja.testi :refer :... | null | https://raw.githubusercontent.com/finnishtransportagency/harja/cf1afd011f3db3ba41e20971b11add36f5a6ab97/test/clj/harja/palvelin/raportointi/toimenpidekilometrit_test.clj | clojure | (ns harja.palvelin.raportointi.toimenpidekilometrit-test
(:require [clojure.test :refer :all]
[harja.palvelin.komponentit.tietokanta :as tietokanta]
[harja.palvelin.palvelut.toimenpidekoodit :refer :all]
[harja.palvelin.palvelut.urakat :refer :all]
[harja.testi :refer :... | |
5b5e4f36a966a35e11f00b7f22e1c3b07077fa778c2a31e158fd972f88e8f6b3 | esl/MongooseIM | run_common_test.erl | %% During dev you would use something similar to:
%% TEST_HOSTS="mim" ./tools/test.sh -c false -s false -p odbc_mssql_mnesia
%%
%% If you also want to start just mim1 node use:
%% DEV_NODES="mim1" TEST_HOSTS="mim" ./tools/test.sh -c false -s false -p odbc_mssql_mnesia
%%
TEST_HOSTS variable contains host names from h... | null | https://raw.githubusercontent.com/esl/MongooseIM/25757b1b433afd54f35baa13877a138b5a243bb6/big_tests/run_common_test.erl | erlang | During dev you would use something similar to:
TEST_HOSTS="mim" ./tools/test.sh -c false -s false -p odbc_mssql_mnesia
If you also want to start just mim1 node use:
DEV_NODES="mim1" TEST_HOSTS="mim" ./tools/test.sh -c false -s false -p odbc_mssql_mnesia
Release names are also used to name directories in the _bui... | TEST_HOSTS variable contains host names from hosts in big_tests / test.config .
DEV_NODES variable contains release names from profiles in rebar.config .
Valid TEST_HOSTS are , , mim3 , fed , reg .
Valid DEV_NODES are mim1 , , mim3 , fed1 , reg1 .
Example with two nodes :
-module(run_common_test).
-export... |
c64fdf37cbe5b5dd351d52848bca0b2c4a86309cf3124b9ef3061fa85ce8d3a6 | mbenke/zpf2013 | PlusMinusParsec.hs | import Text.ParserCombinators.Parsec
import Data.Char(digitToInt)
import Criterion.Main
gen 0 = "1"
gen n = ('1':'+':'1':'-':gen (n-1))
pNum :: Parser Int
pNum = fmap digitToInt digit
pExp = pNum `chainl1` addop
addop = do{ char '+'; return (+) }
<|> do{ char '-'; return (-) }
test n = parse pExp "ge... | null | https://raw.githubusercontent.com/mbenke/zpf2013/85f32747e17f07a74e1c3cb064b1d6acaca3f2f0/Code/Parse1/PlusMinusParsec.hs | haskell | import Text.ParserCombinators.Parsec
import Data.Char(digitToInt)
import Criterion.Main
gen 0 = "1"
gen n = ('1':'+':'1':'-':gen (n-1))
pNum :: Parser Int
pNum = fmap digitToInt digit
pExp = pNum `chainl1` addop
addop = do{ char '+'; return (+) }
<|> do{ char '-'; return (-) }
test n = parse pExp "ge... | |
a9f27ef1bb6b8d3ac7b3db89dc52674febf9264bed04d5c3543ba8e1bcebba7d | OCamlPro/freeton_wallet | commandAccountState.ml | (**************************************************************************)
(* *)
Copyright ( c ) 2021 OCamlPro SAS
(* *)
(* All right... | null | https://raw.githubusercontent.com/OCamlPro/freeton_wallet/b97877379e51d96cb3544141d386d502348cfca9/src/freeton_wallet_lib/commandAccountState.ml | ocaml | ************************************************************************
All rights reserved.
This file is distributed u... | Copyright ( c ) 2021 OCamlPro SAS
Public License version 2.1 , with the special exception on linking
open Ezcmd.V2
open EZCMD.TYPES
open Types
let get_address_info config address =
let addr = Misc.raw_address address in
let open Ton_sdk in
let level = if !Global... |
c276c58e86abba94fa2ccc04365fd0777385b163fea49b0cce1bf36a07ac3604 | jumarko/clojure-experiments | tracer.clj | # 👩 🏻 💻 Show the code
^{:nextjournal.clerk/visibility #{:hide-ns}}
(ns tracer
(:require [nextjournal.clerk :as clerk]
[clojure.walk :as walk]))
# # Tracer
;; This is a minimal implementation of the code to trace a quoted form
;; and record the result from evaluating each sub-expresison. It
;; cu... | null | https://raw.githubusercontent.com/jumarko/clojure-experiments/a87098fe69044ad65813a68cb870d824c2c2d18f/src/clojure_experiments/visualizations/clerk/notebooks/tracer.clj | clojure | This is a minimal implementation of the code to trace a quoted form
and record the result from evaluating each sub-expresison. It
currently returns the data in a somewhat awkward shape. How would
you improve the API?
This section provides a recursive function to show the nested the
code with results (currently in... | # 👩 🏻 💻 Show the code
^{:nextjournal.clerk/visibility #{:hide-ns}}
(ns tracer
(:require [nextjournal.clerk :as clerk]
[clojure.walk :as walk]))
# # Tracer
(def ^:dynamic *trace-accumulator* nil)
(defn add-trace [id form result]
(swap! *trace-accumulator* conj [id [form result]])
result)
(... |
21413ef0e33c23985e81dc90580d743537e7b1f6ad094f7dcd402212853ef59c | softwarelanguageslab/maf | R5RS_scp1_organigram-2.scm | ; Changes:
* removed : 0
* added : 3
* swaps : 0
; * negated predicates: 0
* swapped branches : 1
* calls to i d fun : 1
(letrec ((organigram (__toplevel_cons
'directeur
(__toplevel_cons
(__toplevel_cons
'hoof... | null | https://raw.githubusercontent.com/softwarelanguageslab/maf/11acedf56b9bf0c8e55ddb6aea754b6766d8bb40/test/changes/scheme/generated/R5RS_scp1_organigram-2.scm | scheme | Changes:
* negated predicates: 0 | * removed : 0
* added : 3
* swaps : 0
* swapped branches : 1
* calls to i d fun : 1
(letrec ((organigram (__toplevel_cons
'directeur
(__toplevel_cons
(__toplevel_cons
'hoofd-verkoop
... |
d1c7ef4d8025e75815d396c5fbb020b1ce127162bcb5fea3a8f9159f3809d06b | haskell/cabal | LibV09.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE RankNTypes #-}
module Distribution.Simple.Test.LibV09
( runTest
-- Test stub
, simpleTestStub
, stubFilePath, stubMain, stubName, stubWriteLog
, writeSimpleTestStub
) where
import Prelude ()
import Distribution.Compat.Prelude
impor... | null | https://raw.githubusercontent.com/haskell/cabal/ab24689731e9fb45efa6277f290624622a6c214f/Cabal/src/Distribution/Simple/Test/LibV09.hs | haskell | # LANGUAGE RankNTypes #
Test stub
Check that the test executable exists.
Remove old .tix files if appropriate.
Write summary notices indicating start of test suite
Run test executable
Add (DY)LD_LIBRARY_PATH if needed
TODO: this setup is broken,
if the test output is too big, we will deadlock.
Append contents ... | # LANGUAGE FlexibleContexts #
module Distribution.Simple.Test.LibV09
( runTest
, simpleTestStub
, stubFilePath, stubMain, stubName, stubWriteLog
, writeSimpleTestStub
) where
import Prelude ()
import Distribution.Compat.Prelude
import Distribution.Types.UnqualComponentName
import D... |
d5eb901837a208d3e0384a6bc3fa1bd09247b811838d0adef5ba313e3c4e1b7b | con-kitty/categorifier | BuildDictionary.hs | # LANGUAGE ExistentialQuantification #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE QuasiQuotes #
-- |
Module : ConCat . BuildDictionary
Copyright : ( c ) 2016 Conal Elliott
-- License : BSD3
--
-- Maintainer :
-- Stability : experimental
--
Adaptation of HERMIT 's buildDictionaryT via C... | null | https://raw.githubusercontent.com/con-kitty/categorifier/7a829e6b1e700c13089d39c52912870ca79b12e6/plugin/Categorifier/Core/BuildDictionary.hs | haskell | # LANGUAGE OverloadedStrings #
|
License : BSD3
Maintainer :
Stability : experimental
| The result type is a slight improvement of the situation handed to us by
`Typechecker.runTcInteractive`, so not too much we can do about it other than hide it a bit and
try to keep it from leaking all over eve... | # LANGUAGE ExistentialQuantification #
# LANGUAGE QuasiQuotes #
Module : ConCat . BuildDictionary
Copyright : ( c ) 2016 Conal Elliott
Adaptation of HERMIT 's buildDictionaryT via ConCat 's BuildDictonary
module Categorifier.Core.BuildDictionary (buildDictionary) where
import qualified Categorifier... |
aa84aaa727b1eebbf7cf51675cc0fc2d8ad32f3ee0a8736872e1e05ecae6b50c | MLstate/opalang | listMap.ml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | null | https://raw.githubusercontent.com/MLstate/opalang/424b369160ce693406cece6ac033d75d85f5df4f/ocamllib/libbase/listMap.ml | ocaml |
Copyright © 2011 MLstate
This file is part of .
is free software : you can redistribute it and/or modify it under the
terms of the GNU Affero General Public License , version 3 , as published by
the Free Software Foundation .
is distributed in the hope that it will be useful , ... | |
9b3383fbbf65625e324589e04bda8c343713dd2d9d8ca7d2d8d2e014267d695a | 2600hz/kazoo | pqc_httpd.erl | %%%-----------------------------------------------------------------------------
( C ) 2018 - 2020 , 2600Hz
%%% @doc
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
%%%
%%% @end
%%%--------... | null | https://raw.githubusercontent.com/2600hz/kazoo/24519b9af9792caa67f7c09bbb9d27e2418f7ad6/core/kazoo_proper/src/pqc_httpd.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
gen_server
Cowboy callbacks
@doc fetches the value and removes it from the state if found
@doc fetches the value and removes it from the state if f... | ( C ) 2018 - 2020 , 2600Hz
This Source Code Form is subject to the terms of the Mozilla Public
License , v. 2.0 . If a copy of the MPL was not distributed with this
file , You can obtain one at /.
-module(pqc_httpd).
-behaviour(cowboy_handler).
-behaviour(gen_server).
-export([fetch_req/1, fetch_req/2
... |
fe87e58bcc36a77fb5c842e7fbb2626a01df1562d58384879d78aa5371510e09 | racket/redex | ls-typed-gen.rkt | #lang racket
(define the-error "no error")
(require redex/reduction-semantics
racket/list
racket/match)
(provide (all-defined-out))
(define-language list-machine
(a nil
(cons a a))
(v variable-not-otherwise-mentioned)
(r empty
(r v ↦ a))
(l variable-not-otherwise-mentioned)
(ι ... | null | https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-benchmark/redex/benchmark/models/list-machine/ls-typed-gen.rkt | racket | (if the #:stop-when condition is true, we get back an empty list,
and the same thing for a reduction cycle)
note : changed from l-⊂
see if any succeed... | #lang racket
(define the-error "no error")
(require redex/reduction-semantics
racket/list
racket/match)
(provide (all-defined-out))
(define-language list-machine
(a nil
(cons a a))
(v variable-not-otherwise-mentioned)
(r empty
(r v ↦ a))
(l variable-not-otherwise-mentioned)
(ι ... |
25a975102032e70601af06e0e273a865097990a3cc51746b6a042028081ff6b0 | GrammaTech/sel | limit-stream.lisp | (defpackage :software-evolution-library/utility/limit-stream
(:use :gt/full)
(:local-nicknames (:gray :trivial-gray-streams))
(:export :make-limit-stream))
(in-package :software-evolution-library/utility/limit-stream)
(defclass limit-stream (gray:fundamental-character-output-stream)
((newlines :initform 0)
... | null | https://raw.githubusercontent.com/GrammaTech/sel/52e037780e877467b0bff60bd0625f4be49557a1/utility/limit-stream.lisp | lisp | the actual number of newlines may be | (defpackage :software-evolution-library/utility/limit-stream
(:use :gt/full)
(:local-nicknames (:gray :trivial-gray-streams))
(:export :make-limit-stream))
(in-package :software-evolution-library/utility/limit-stream)
(defclass limit-stream (gray:fundamental-character-output-stream)
((newlines :initform 0)
... |
e9c5940728729f9c2a25ecaf87d3321084ca0f7a19b556f70f727aaf9cc20aae | huangz1990/real-world-haskell-cn | Prettify2.hs | file : ch11 / Prettify2.hs
module Prettify2 where
import Data.Monoid hiding ((<>))
data Doc = Empty
| Char Char
| Text String
| Line
| Concat Doc Doc
| Union Doc Doc
deriving (Show,Eq)
instance Monoid Doc where
mempty = empty
mappend = (<>)
(<>) :: Do... | null | https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch11/Prettify2.hs | haskell | file : ch11 / Prettify2.hs
module Prettify2 where
import Data.Monoid hiding ((<>))
data Doc = Empty
| Char Char
| Text String
| Line
| Concat Doc Doc
| Union Doc Doc
deriving (Show,Eq)
instance Monoid Doc where
mempty = empty
mappend = (<>)
(<>) :: Do... | |
837101d32ee94552f90dbe8bfa13b68a1e4d6a6577c9aa6cb301fb7074d8db4a | hargettp/raft | Log.hs | # LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
-----------------------------------------------------------------------------
-- |
-- Module : Control.Consensus.Raft.St... | null | https://raw.githubusercontent.com/hargettp/raft/1ed007986a908e43d9867935af759bccc3b9a57f/src/Control/Consensus/Raft/Log.hs | haskell | ---------------------------------------------------------------------------
|
Module : Control.Consensus.Raft.State
Maintainer :
Stability : experimental
there are no constraints on the entries that change the 'Data.Log.State' of the underlying
state machine. For Raft, however, such entries must be... | # LANGUAGE DeriveGeneric #
# LANGUAGE ExistentialQuantification #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE StandaloneDeriving #
Copyright : ( c ) 2014
License : MIT ( see LICENSE file )
Portability : non - portable ( requires STM )
... |
85db3f82e3240802a850f2728c9be51c596a4a43be49e7654e460485755f1d2d | generateme/cljplot | math.clj | (ns cljplot.impl.math
(:require [cljplot.common :refer :all]
[fastmath.core :as m]
[fastmath.vector :as v]
[clojure2d.color :as c]
[fastmath.complex :as cx]
[fastmath.random :as r]
[fastmath.fields :as f]
[clojure2d.core :refer :all]
... | null | https://raw.githubusercontent.com/generateme/cljplot/1eb865439653c95940be18421298c574b7ce8db6/src/cljplot/impl/math.clj | clojure | scalar
contour
field
vectors
| (ns cljplot.impl.math
(:require [cljplot.common :refer :all]
[fastmath.core :as m]
[fastmath.vector :as v]
[clojure2d.color :as c]
[fastmath.complex :as cx]
[fastmath.random :as r]
[fastmath.fields :as f]
[clojure2d.core :refer :all]
... |
28f2133b7608dea1d1387e7427546105b2df2d9f522ed87cf4170756edc7b1f6 | facebookarchive/pfff | database_juju_php.mli |
type database
val juju_db_of_files:
?show_progress:bool ->
Common.filename list -> database
val code_database_of_juju_db:
database -> Env_interpreter_php.code_database
| null | https://raw.githubusercontent.com/facebookarchive/pfff/ec21095ab7d445559576513a63314e794378c367/lang_php/analyze/foundation/database_juju_php.mli | ocaml |
type database
val juju_db_of_files:
?show_progress:bool ->
Common.filename list -> database
val code_database_of_juju_db:
database -> Env_interpreter_php.code_database
| |
7c048154d37504f49cdd34042c132afef4ace569e192b2614ffceaa3d6101e9d | softmechanics/warp | Timeout.hs | module Timeout
( Manager
, Handle
, initialize
, register
, registerKillThread
, tickle
, pause
, resume
, cancel
) where
import qualified Data.IORef as I
import Control.Concurrent (forkIO, threadDelay, myThreadId, killThread)
import Control.Monad (forever)
import qualified Cont... | null | https://raw.githubusercontent.com/softmechanics/warp/6cfc88aefc87a0ce33a44b1f95ad5ebf379583d4/Timeout.hs | haskell | module Timeout
( Manager
, Handle
, initialize
, register
, registerKillThread
, tickle
, pause
, resume
, cancel
) where
import qualified Data.IORef as I
import Control.Concurrent (forkIO, threadDelay, myThreadId, killThread)
import Control.Monad (forever)
import qualified Cont... | |
db6e6af5258a1befdbd3aa02df888920e41eb544f9a8767b2c8fbe3aae7af432 | dgiot/dgiot | dgiot_rule_funcs.erl | %%--------------------------------------------------------------------
Copyright ( c ) 2020 - 2021 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/dgiot/dgiot/777c878acd0c89e445c3b8992febbc925b8ee060/apps/dgiot/src/rules/dgiot_rule_funcs.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 ) 2020 - 2021 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(dgiot_rule_funcs).
-include("rule_engine.hrl").
-export([ msgid/0
, qos/0
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.