_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 |
|---|---|---|---|---|---|---|---|---|
ce26b3553d9b97b30a0da7297d57d3a58fda58a4c78e148c7e2710683b95c0e0 | hamidreza-s/Tecipe | echo_server_app.erl | -module(echo_server_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
application:ensure_started(tecipe),
tecipe:start_listener(echo_server, 8080, {echo_handler, echo, []},
[{monitor, true}],
[{reuseaddr, true}]),
echo_server_sup:start_link().
stop(_S... | null | https://raw.githubusercontent.com/hamidreza-s/Tecipe/bcafcafec4c9c5981e6b89537808f3c9e94ea290/examples/echo_server/src/echo_server_app.erl | erlang | -module(echo_server_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
application:ensure_started(tecipe),
tecipe:start_listener(echo_server, 8080, {echo_handler, echo, []},
[{monitor, true}],
[{reuseaddr, true}]),
echo_server_sup:start_link().
stop(_S... | |
134300d630cf9ec3384b61553689254a71081ad08f770821b7dcf9725c8ef4d7 | manuel-serrano/hop | propagation.scm | ;*=====================================================================*/
* serrano / prgm / project / hop/2.5.x / scheme2js / propagation.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation : ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/scheme2js/propagation.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
*=====================================================================*/
*---------------------------... | * serrano / prgm / project / hop/2.5.x / scheme2js / propagation.scm * /
* Author : * /
* Creation : 2007 - 12 * /
* Last change : Fri Jul 19 15:31:15 2013 ( serrano ) * /
* Copyr... |
8eb0825376c53dc541f3c1a3f9ca9051c2509680a194944c529bbeb5da65d36c | hellopatrick/xmas | main.ml | open Containers
let input = IO.read_lines_l stdin
module C = struct
type t = int * int * int
let compare (x0, y0, z0) (x1, y1, z1) =
match Int.compare x0 x1 with
| 0 -> (
match Int.compare y0 y1 with
| 0 -> ( match Int.compare z0 z1 with 0 -> 0 | e -> e)
| e -> e)
| e -> e
... | null | https://raw.githubusercontent.com/hellopatrick/xmas/ff2cbbfb2d569aabd33905e1caece50f88c8c54e/2022/day18/main.ml | ocaml | open Containers
let input = IO.read_lines_l stdin
module C = struct
type t = int * int * int
let compare (x0, y0, z0) (x1, y1, z1) =
match Int.compare x0 x1 with
| 0 -> (
match Int.compare y0 y1 with
| 0 -> ( match Int.compare z0 z1 with 0 -> 0 | e -> e)
| e -> e)
| e -> e
... | |
fd0b572c28f4a400806cb29565d5b56dd20baae782734a695936bcf170be554e | 2600hz-archive/whistle | rebar_xref.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
%% -------------------------------------------------------------------
%%
rebar : Erlang Build Tools
%%
Copyright ( c ) 2009 ( )
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this softw... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/utils/rebar/src/rebar_xref.erl | erlang | ex: ts=4 sw=4 et
-------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sel... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
rebar : Erlang Build Tools
Copyright ( c ) 2009 ( )
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the... |
f3223f1c476e9cf7919b1d8af4a7e8b379a459aae6a930edecdcf27cebd524ee | bgusach/exercises-htdp2e | ex-147.rkt | #lang htdp/bsl
A NEList - of - bools is one of
- ( cons Boolean ' ( ) )
- ( cons Boolean NEList - of - bools )
NEList - of - bools - > Boolean
; Returns whether all the elements of the list are true
(check-expect (all-true (cons #true '())) #true)
(check-expect (all-true (cons #false '())) #false)
(check-ex... | null | https://raw.githubusercontent.com/bgusach/exercises-htdp2e/c4fd33f28fb0427862a2777a1fde8bf6432a7690/ex-147.rkt | racket | Returns whether all the elements of the list are true | #lang htdp/bsl
A NEList - of - bools is one of
- ( cons Boolean ' ( ) )
- ( cons Boolean NEList - of - bools )
NEList - of - bools - > Boolean
(check-expect (all-true (cons #true '())) #true)
(check-expect (all-true (cons #false '())) #false)
(check-expect (all-true (cons #true (cons #true '()))) #true)
(ch... |
edac308b0dc26cad916949f861f941e856e3d8e76f572ffd364f71f7f1f8c11c | OtpChatBot/Ybot | ybot_plugin_memory_app.erl | %%%-----------------------------------------------------------------------------
@author < >
%%% @doc
Ybot memory plugin using OTP application
%%% @end
Created : 20 Mar 2013 by tgrk < >
%%%-----------------------------------------------------------------------------
-module(ybot_plugin_memory_app).
-behaviou... | null | https://raw.githubusercontent.com/OtpChatBot/Ybot/5ce05fea0eb9001d1c0ff89702729f4c80743872/plugins/memory/src/ybot_plugin_memory_app.erl | erlang | -----------------------------------------------------------------------------
@doc
@end
-----------------------------------------------------------------------------
Application callbacks
=============================================================================
Application callbacks
============================... | @author < >
Ybot memory plugin using OTP application
Created : 20 Mar 2013 by tgrk < >
-module(ybot_plugin_memory_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
ybot_plugin_memory_sup:start_link().
stop(_State) ->
ok.
Internal functionality
|
8dff5281e42ef86a0559afb04ca9055839e029ad9de05903308b3540d5d33c51 | arohner/spectrum | recur_bad_arity.clj | (ns spectrum.examples.bad.loop-change-type
(:require [clojure.spec.alpha :as s]))
(s/fdef foo :args (s/cat :i int?) :ret int?)
(defn foo [x]
(let [y 3]
(if (even? x)
(recur x y)
(inc x))))
| null | https://raw.githubusercontent.com/arohner/spectrum/72b47a91a5ce4567eed547507d25b2528f48c2d1/test/spectrum/examples/bad/recur_bad_arity.clj | clojure | (ns spectrum.examples.bad.loop-change-type
(:require [clojure.spec.alpha :as s]))
(s/fdef foo :args (s/cat :i int?) :ret int?)
(defn foo [x]
(let [y 3]
(if (even? x)
(recur x y)
(inc x))))
| |
24b13e8dea8bcdd84f1bbb8125457a552e00f38964810fc763ae386a1e768cec | andrenth/routemachine | rtm_config.erl | -module(rtm_config).
-export([parse/1, peers/1, get/2, get/3, networks/1]).
-include_lib("bgp.hrl").
-include_lib("session.hrl").
-type(conf() :: [term()]).
-spec parse(file:name()) -> conf().
parse(File) ->
{ok, Conf} = file:consult(File),
Conf.
-spec peers(conf()) -> [#session{}].
peers(Conf) ->
{local, Loc... | null | https://raw.githubusercontent.com/andrenth/routemachine/97fbc4997ac9bbe7d14c2b174aa84bc4a2fd5d20/src/rtm_config.erl | erlang | -module(rtm_config).
-export([parse/1, peers/1, get/2, get/3, networks/1]).
-include_lib("bgp.hrl").
-include_lib("session.hrl").
-type(conf() :: [term()]).
-spec parse(file:name()) -> conf().
parse(File) ->
{ok, Conf} = file:consult(File),
Conf.
-spec peers(conf()) -> [#session{}].
peers(Conf) ->
{local, Loc... | |
35a38e4b2968e4e9c3ff70630a85bba390881bfe76c5112675ed2a1a7be36e9c | jonatack/cl-kraken | trades.lisp | ;;;; cl-kraken/tests/trades.lisp
(defpackage #:cl-kraken/tests/trades
(:use #:cl #:cl-kraken #:rove)
(:import-from #:jsown
#:filter)
(:import-from #:parse-float
#:parse-float)
(:import-from #:cl-kraken
#:server-time))
(in-package #:cl-kraken/tests/trades)
(defte... | null | https://raw.githubusercontent.com/jonatack/cl-kraken/e5b438eb821bf7dc3514a44ff84f15f393b4e393/tests/trades.lisp | lisp | cl-kraken/tests/trades.lisp
Test invalid PAIR values.
Test RAW parameter.
Test invalid RAW values. |
(defpackage #:cl-kraken/tests/trades
(:use #:cl #:cl-kraken #:rove)
(:import-from #:jsown
#:filter)
(:import-from #:parse-float
#:parse-float)
(:import-from #:cl-kraken
#:server-time))
(in-package #:cl-kraken/tests/trades)
(deftest trades
(testing "when passed... |
b25200cd3b6069095e229bd7e4ea1a27b341ff0c924961d5966a2a0c13d54291 | SamirTalwar/advent-of-code | AOC_10_2.hs | # LANGUAGE ScopedTypeVariables #
import Data.Array
import qualified Data.List as List
import qualified Data.Maybe as Maybe
import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.IO as IO
import Text.Parsec
import Text.Parsec.Text
data Instruction
= Sta... | null | https://raw.githubusercontent.com/SamirTalwar/advent-of-code/66bd9e31f078c9b81ece0264fb869e48964afa63/2016/AOC_10_2.hs | haskell | # LANGUAGE ScopedTypeVariables #
import Data.Array
import qualified Data.List as List
import qualified Data.Maybe as Maybe
import qualified Data.Set as Set
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.IO as IO
import Text.Parsec
import Text.Parsec.Text
data Instruction
= Sta... | |
13eacf8e334f3790899751cbc55f6c0dae35adcd8a62c1f00eb263667ffa2277 | LLNL/rhizome | project.clj | (defproject rhizome "1.0.0-SNAPSHOT"
:description "Learn and process LDA topics for use in IRIS system"
:dependencies [[org.clojure/clojure "1.2.1"]
[org.clojure/clojure-contrib "1.2.0"]
[solrclj/solrclj "0.1.1"]
[incanter "1.2.2"]
[congomongo "0.1... | null | https://raw.githubusercontent.com/LLNL/rhizome/af8e00ac89a98e2d07fe7a6272857951c2781182/project.clj | clojure | (defproject rhizome "1.0.0-SNAPSHOT"
:description "Learn and process LDA topics for use in IRIS system"
:dependencies [[org.clojure/clojure "1.2.1"]
[org.clojure/clojure-contrib "1.2.0"]
[solrclj/solrclj "0.1.1"]
[incanter "1.2.2"]
[congomongo "0.1... | |
e9f1a6c5acb64b136838e5259dc9002e02c59cd17d36912f3871016a0c483a99 | pascalh/Astview | Types.hs | {- contains the GUI data types
-
-}
module Language.Astview.Gui.Types where
import Data.Label
import Data.IORef
import Control.Monad.Reader
import Graphics.UI.Gtk hiding (Language,get,set)
import Graphics.UI.Gtk.SourceView (SourceBuffer)
import Language.Astview.Language(Language,SrcSpan,Path,position)
|a type cla... | null | https://raw.githubusercontent.com/pascalh/Astview/3c0677b033a1d0366202048be273861e98a04e2a/src/gui/Language/Astview/Gui/Types.hs | haskell | contains the GUI data types
-
|run a 'AstAction' by providing values for the reader monad.
(in most cases 'ioRunner' is more useful)
|returns a transformer from 'AstAction' to 'IO'
|internal program state
^ intern program state
^ global program options
|data type for global options, which can be directly cha... | module Language.Astview.Gui.Types where
import Data.Label
import Data.IORef
import Control.Monad.Reader
import Graphics.UI.Gtk hiding (Language,get,set)
import Graphics.UI.Gtk.SourceView (SourceBuffer)
import Language.Astview.Language(Language,SrcSpan,Path,position)
|a type class for default values , compareable to... |
afb215c0b9467b7d7278f9f153fac33e599b63a11351f908a39b3860a5385c92 | JustusAdam/language-haskell | T0073b.hs | SYNTAX TEST " source.haskell " " Visible kind application "
type TF l = F @_ @(l :: Nat) A
-- ^ ^ meta.type-application.haskell | null | https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tickets/T0073b.hs | haskell | ^ ^ meta.type-application.haskell | SYNTAX TEST " source.haskell " " Visible kind application "
type TF l = F @_ @(l :: Nat) A |
1702a51beba4641b1d75fd66f4d8d6e567e6568f6a2ec493b0c4f0f9da2988e2 | mathematical-systems/clml | dgebal.lisp | ;;; Compiled by f2cl version:
( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:0... | null | https://raw.githubusercontent.com/mathematical-systems/clml/918e41e67ee2a8102c55a84b4e6e85bbdde933f5/lapack/dgebal.lisp | lisp | Compiled by f2cl version:
Options: ((:prune-labels nil) (:auto-save t)
(:relaxed-array-decls t) (:coerce-assigns :as-needed)
(:array-type ':array) (:array-slicing t)
(:declare-common nil) (:float-format double-float)) | ( " $ I d : f2cl1.l , v 1.209 2008/09/11 14:59:55 rtoy Exp $ "
" $ I d : f2cl2.l , v 1.37 2008/02/22 22:19:33 "
" $ I d : f2cl3.l , v 1.6 2008/02/22 22:19:33 rtoy Rel $ "
" $ I d : f2cl4.l , v 1.7 2008/02/22 22:19:34 rtoy Rel $ "
" $ I d : f2cl5.l , v 1.197 2008/09/11 15:03:25 rtoy Exp $ "
" $ I d :... |
5e6b5b1b21c8ee062612118a5c79008bf1597e701cb9fbbdd8775efdb34c37ce | haskell-haskey/haskey | Integration.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE RankNTypes #-}
module Main (main) where
import Test.Framework (Test, defaultMain)
import qualified Integration.CreateAndOpen
import qualified Integration.WriteOpenRead.Concurrent
tests :: [Test]
tests =
[ Integration.CreateAndOpen.tests
, Integration.WriteOpenRead.... | null | https://raw.githubusercontent.com/haskell-haskey/haskey/299f070fcb0d287404d78399f903cecf7ad48cdd/tests/Integration.hs | haskell | # LANGUAGE RankNTypes # | # LANGUAGE FlexibleInstances #
module Main (main) where
import Test.Framework (Test, defaultMain)
import qualified Integration.CreateAndOpen
import qualified Integration.WriteOpenRead.Concurrent
tests :: [Test]
tests =
[ Integration.CreateAndOpen.tests
, Integration.WriteOpenRead.Concurrent.tests
]
main... |
b8f9f9131cec14dcc4faa1a3ef4f3b23d0a89115a14de3a02c8f0cdd1075bd9d | Decentralized-Pictures/T4L3NT | tezos_client.ml | open Internal_pervasives
type t = {id: string; port: int; exec: Tezos_executable.t}
type client = t
let no_node_client ~exec = {id= "C-null"; port= 0; exec}
let of_node ~exec n =
let id = sprintf "C-%s" n.Tezos_node.id in
let port = n.Tezos_node.rpc_port in
{id; port; exec}
let base_dir t ~state = Paths.root ... | null | https://raw.githubusercontent.com/Decentralized-Pictures/T4L3NT/6d4d3edb2d73575384282ad5a633518cba3d29e3/vendors/flextesa-lib/tezos_client.ml | ocaml | TODO: Use --for-script when available
TODO: Use --for-script when available | open Internal_pervasives
type t = {id: string; port: int; exec: Tezos_executable.t}
type client = t
let no_node_client ~exec = {id= "C-null"; port= 0; exec}
let of_node ~exec n =
let id = sprintf "C-%s" n.Tezos_node.id in
let port = n.Tezos_node.rpc_port in
{id; port; exec}
let base_dir t ~state = Paths.root ... |
dfa4585d79a7a3341a1b6cc1b64ea1d227b24f4171a1a655131986703bb58128 | mitchellwrosen/dohaskell | Foundation.hs | module Foundation where
import Import.NoFoundation
import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
import Yesod.Auth.GoogleEmail2
import Yesod.Core.Types (Logger)
import Yesod.Default.Util (addStaticContentExt... | null | https://raw.githubusercontent.com/mitchellwrosen/dohaskell/69aea7a42112557ac3e835b9dbdb9bf60a81f780/src/Foundation.hs | haskell | anything that imports Import (which is everything).
How to run database actions. | module Foundation where
import Import.NoFoundation
import Database.Persist.Sql (ConnectionPool, runSqlPool)
import Text.Hamlet (hamletFile)
import Text.Jasmine (minifym)
import Yesod.Auth.GoogleEmail2
import Yesod.Core.Types (Logger)
import Yesod.Default.Util (addStaticContentExt... |
47a727ef0f1739194abfbffc36da3c9c0184fbbfda923ab7bfb5f6b97bc1ff18 | facebook/infer | TextualBasicVerification.mli |
* Copyright ( c ) Facebook , Inc. and its affiliates .
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree .
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
... | null | https://raw.githubusercontent.com/facebook/infer/8a02f19fb30b9d4f8d74a8b31dc8d7206070f419/infer/src/textual/TextualBasicVerification.mli | ocaml |
* 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
... | |
95868a230cb7c7677beb175da67babbe2c3477347fcc00e5afa34a24028ba8b6 | brianhempel/maniposynth | weak.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/brianhempel/maniposynth/8c8e72f2459f1ec05fefcb994253f99620e377f3/ocaml-4.07.1/stdlib/weak.ml | ocaml | ************************************************************************
OCaml
... | , projet Para , INRIA Rocquencourt
Copyright 1997 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
type 'a t
external create : int -> 'a t = "caml_weak_create"
let additional_values = 2
let length x = O... |
2a4edadaf8a4baf4af5f2f5c15ecb8f7145ac0962a5921475bb9493ad88416b4 | mochi/eswf | eswf_redir.erl | @author < >
2006
@doc Create URL redirect SWF files .
-module(eswf_redir).
-export([actions/2, swf/2, swf/4]).
%% @type iolist() = [char() | binary() | iolist()]
@type iodata ( ) = iolist ( ) | binary ( )
, { Width , } ) - > iodata ( )
@equiv swf(Url , { Width , , 12 , 6 )
swf(Url, Dimension... | null | https://raw.githubusercontent.com/mochi/eswf/51b60942cb34b8490aefe6f05e88852454681eee/src/eswf_redir.erl | erlang | @type iolist() = [char() | binary() | iolist()]
at the center. The center of the loaded movie clip will be at (0, 0).
@doc Return actions for a do_action tag that does a loadMovie to Url with a
registration point at the center. The center of the loaded movie clip
will be at (0, 0). | @author < >
2006
@doc Create URL redirect SWF files .
-module(eswf_redir).
-export([actions/2, swf/2, swf/4]).
@type iodata ( ) = iolist ( ) | binary ( )
, { Width , } ) - > iodata ( )
@equiv swf(Url , { Width , , 12 , 6 )
swf(Url, Dimensions) ->
swf(Url, Dimensions, 12, 6).
, { Wid... |
3fcdd569833775595e753f8562827e38ceeba5eb820b4bf4ca976c2d3a0aad3c | facjure/mesh | project.clj | (defproject facjure/mesh "0.6.0"
:description "A toolkit for responsive grids and web typography"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:scm {:name "git" :url ""}
:min-lein-version "2.8.1"
:global-vars {*warn-on-reflection* false *assert* false}
:dependencies [[org... | null | https://raw.githubusercontent.com/facjure/mesh/e37887304c271bacfc017055180f56935f893682/project.clj | clojure | (defproject facjure/mesh "0.6.0"
:description "A toolkit for responsive grids and web typography"
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:scm {:name "git" :url ""}
:min-lein-version "2.8.1"
:global-vars {*warn-on-reflection* false *assert* false}
:dependencies [[org... | |
6f5d6e2e7a3a9c5ea404aa2a5b5306d11c64da626458f82fcccbde2ac9c13613 | racket/web-server | dispatch-passwords.rkt | #lang racket/base
(require racket/list
net/url
racket/contract)
(require web-server/dispatchers/dispatch
web-server/private/util
web-server/configuration/responders
web-server/http
web-server/http/response)
(define denied?/c (request? . -> . (or/c false/c string?))... | null | https://raw.githubusercontent.com/racket/web-server/f718800b5b3f407f7935adf85dfa663c4bba1651/web-server-lib/web-server/dispatchers/dispatch-passwords.rkt | racket | Fail un-safe
to produce a function that checks if a given url path is accessible by a given user with a given
password. If not, the produced function returns a string, prompting for the password.
If the password file does not exist, all accesses are allowed. If the file is malformed, an
exn:password-file is rais... | #lang racket/base
(require racket/list
net/url
racket/contract)
(require web-server/dispatchers/dispatch
web-server/private/util
web-server/configuration/responders
web-server/http
web-server/http/response)
(define denied?/c (request? . -> . (or/c false/c string?))... |
0454af91bd8c958b573f04b3b792555f1a92e0dc06d668e1ae1dcc6a15638c68 | kcsongor/generic-lens | Types.hs | {-# LANGUAGE PackageImports #-}
# LANGUAGE AllowAmbiguousTypes #
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DefaultSignatures #-}
{-# LANGUAGE FlexibleContexts #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTyp... | null | https://raw.githubusercontent.com/kcsongor/generic-lens/de57d7a8ce7ce9f5b93f27565ec6fc98d659e03f/generic-lens-core/src/Data/Generics/Product/Internal/Types.hs | haskell | # LANGUAGE PackageImports #
# LANGUAGE ConstraintKinds #
# LANGUAGE DataKinds #
# LANGUAGE DefaultSignatures #
# LANGUAGE FlexibleContexts #
# LANGUAGE Rank2Types #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeOperators #
| The children of a type are the types of its ... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE UndecidableInstances #
module Data.Generics.Product.Int... |
17122f1c2917d2c595ef37adbadd7a86ad278cbda19d82f962166e96fac7e8ae | pfeodrippe/orchardia | info.clj | (ns nrepl.middleware.info ;; originally cider.nrepl.middleware.info
(:require
[clojure.string :as str]
[orchard.eldoc :as eldoc]
[orchard.info :as clj-info]
[orchard.misc :as u]))
(defn info
[{:keys [ns symbol class member] :as msg}]
(let [[ns symbol class member] (map u/as-sym [ns symbol class ... | null | https://raw.githubusercontent.com/pfeodrippe/orchardia/42cb2b663f59e3ee314e3e2fe128407162a0183a/src/nrepl/middleware/info.clj | clojure | originally cider.nrepl.middleware.info
we have to use the resolved (real) namespace and name here | (:require
[clojure.string :as str]
[orchard.eldoc :as eldoc]
[orchard.info :as clj-info]
[orchard.misc :as u]))
(defn info
[{:keys [ns symbol class member] :as msg}]
(let [[ns symbol class member] (map u/as-sym [ns symbol class member])]
(let [var-info (cond (and ns symbol) (clj-info/info ns symb... |
1d8a439b4b62c1683a6117194b6c631ea457e0690d636a6d730f32653ddf9869 | twosigma/waiter | spnego.clj | ;;
Copyright ( c ) Two Sigma Open Source , LLC
;;
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
;; you may not use this file except in compliance with the License.
;; You may obtain a copy of the License at
;;
;; -2.0
;;
;; Unless required by applicable law or agreed to in writing, software... | null | https://raw.githubusercontent.com/twosigma/waiter/8d3cdaed90078c188095ae1e65714edc72f9122c/token-syncer/src/token_syncer/spnego.clj | clojure |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permi... | Copyright ( c ) Two Sigma Open Source , LLC
distributed under the License is distributed on an " AS IS " BASIS ,
(ns token-syncer.spnego
(:require [clojure.tools.logging :as log])
(:import (java.net URI)
(org.apache.commons.codec.binary Base64)
(org.eclipse.jetty.client.api Authentication$... |
05c234ee42e01ef74350bb229bb8a2b197b73df0f8ae6c37c6cf0b2c5e8b951a | jmfirth/cljs-react-bootstrap | config.cljs | (ns cljs-react-bootstrap.config)
(def debug?
^boolean js/goog.DEBUG)
(when debug?
(enable-console-print!))
| null | https://raw.githubusercontent.com/jmfirth/cljs-react-bootstrap/4ef8383b7c6786f7093eb3a10f6983666c632ae2/src/cljs/cljs-react-bootstrap/config.cljs | clojure | (ns cljs-react-bootstrap.config)
(def debug?
^boolean js/goog.DEBUG)
(when debug?
(enable-console-print!))
| |
dbbc3c83545ce39488e965ab515a166ccd56375cb0c9e15819aa23e6b350403a | clj-commons/rewrite-clj | test_clj.clj | #!/usr/bin/env bb
(ns test-clj
(:require [helper.main :as main]
[helper.shell :as shell]
[lread.status-line :as status]))
(def allowed-clojure-versions '("1.8" "1.9" "1.10" "1.11"))
(defn run-unit-tests [clojure-version]
(status/line :head (str "testing clojure source against clojure v" c... | null | https://raw.githubusercontent.com/clj-commons/rewrite-clj/b879fe8cf7fe782929e896123e6b53ebd87d0bfe/script/test_clj.clj | clojure | #!/usr/bin/env bb
(ns test-clj
(:require [helper.main :as main]
[helper.shell :as shell]
[lread.status-line :as status]))
(def allowed-clojure-versions '("1.8" "1.9" "1.10" "1.11"))
(defn run-unit-tests [clojure-version]
(status/line :head (str "testing clojure source against clojure v" c... | |
89394b1263f374aa0bc0215c036050061bd6e18683d603d94191efb3ab953600 | scull7/bs-sql-common | SqlCommon_sql.ml | let commentsRe = [%re {|/(\/\*[\s\S]*?\*\/)|([^#:]|^)#.*$|(COMMENT ".*(.*)")/gmi|}]
let inRe = [%re "/\\bin\\b/i"]
let contains_in sql =
Js.String.replaceByRe commentsRe "" sql
|> Js.String.trim
|. Js.Re.test inRe
external format :
string ->
'a Js.Array.t ->
string
= "format" [@@bs.module "sqlstrin... | null | https://raw.githubusercontent.com/scull7/bs-sql-common/803c82d7438e94a55c67951358ee2077521c9341/src/SqlCommon_sql.ml | ocaml | let commentsRe = [%re {|/(\/\*[\s\S]*?\*\/)|([^#:]|^)#.*$|(COMMENT ".*(.*)")/gmi|}]
let inRe = [%re "/\\bin\\b/i"]
let contains_in sql =
Js.String.replaceByRe commentsRe "" sql
|> Js.String.trim
|. Js.Re.test inRe
external format :
string ->
'a Js.Array.t ->
string
= "format" [@@bs.module "sqlstrin... | |
4cd5802662e403348036a222693f59bf78cff15986da0c3883c995ff4fbbc2e4 | matsumonkie/izuna | Type.hs | {- | This module re export common used external types in this project for convenience
-}
module IzunaBuilder.Type where
import qualified Data.Array as Array
import qualified Data.ByteString as ByteString
import qualified Data.List.NonEmpty as NE
import qualified Data.Map as M
import qualified Dat... | null | https://raw.githubusercontent.com/matsumonkie/izuna/b21915617c4e3bb7d14d75814f72b8258689fb9b/izuna-builder/src/IzunaBuilder/Type.hs | haskell | | This module re export common used external types in this project for convenience
|
module IzunaBuilder.Type where
import qualified Data.Array as Array
import qualified Data.ByteString as ByteString
import qualified Data.List.NonEmpty as NE
import qualified Data.Map as M
import qualified Data.Set as S
import qualified Data.Text as T
import qualified DynFlags ... |
3ec45d378cdad5ebfd5aadd822550461636a313b2d747d033d2f257ae6875157 | puppetlabs/puppetdb | anonymizer_test.clj | (ns puppetlabs.puppetdb.anonymizer-test
(:require
[clojure.test :refer :all]
[puppetlabs.puppetdb.anonymizer :as anon
:refer [anonymize-aliases
anonymize-catalog
anonymize-catalog-inputs-input
anonymize-catalog-inputs-inputs
anonymize-catalog-resource
... | null | https://raw.githubusercontent.com/puppetlabs/puppetdb/b3d6d10555561657150fa70b6d1e609fba9c0eda/test/puppetlabs/puppetdb/anonymizer_test.clj | clojure | (ns puppetlabs.puppetdb.anonymizer-test
(:require
[clojure.test :refer :all]
[puppetlabs.puppetdb.anonymizer :as anon
:refer [anonymize-aliases
anonymize-catalog
anonymize-catalog-inputs-input
anonymize-catalog-inputs-inputs
anonymize-catalog-resource
... | |
e4ff1cfa068caada4a3c3e181e27352d8534ec75fb187722a2d7b82d286a69a4 | jfischoff/hasql-queue | AtMostOnceSpec.hs | module Hasql.Queue.High.AtMostOnceSpec where
import Hasql.Queue.High.AtMostOnce
import qualified Hasql.Encoders as E
import qualified Hasql.Decoders as D
import Test.Hspec (Spec, describe, parallel, it)
import Test.Hspec.Expectations.Lifted
import Test.Hspec.C... | null | https://raw.githubusercontent.com/jfischoff/hasql-queue/49f4cba713bedf6ce907cc89794f2567befed396/test/Hasql/Queue/High/AtMostOnceSpec.hs | haskell | module Hasql.Queue.High.AtMostOnceSpec where
import Hasql.Queue.High.AtMostOnce
import qualified Hasql.Encoders as E
import qualified Hasql.Decoders as D
import Test.Hspec (Spec, describe, parallel, it)
import Test.Hspec.Expectations.Lifted
import Test.Hspec.C... | |
ef1fcb1b1b31f6aa395adebb628ab3ae37242cc6894a377e6f1a8262c8639449 | formal-land/coq-of-ocaml | interface.mli | type t
val foo : t
type ('a, 'b) arg
val x : 'a -> 'b -> ('a, 'b) arg
module M : sig
type 'a l =
| Nil
| Cons of 'a * 'a l
val b : bool
end
| null | https://raw.githubusercontent.com/formal-land/coq-of-ocaml/c9c86b08eb19d7fd023f48029cc5f9bf53f6a11c/tests/interface.mli | ocaml | type t
val foo : t
type ('a, 'b) arg
val x : 'a -> 'b -> ('a, 'b) arg
module M : sig
type 'a l =
| Nil
| Cons of 'a * 'a l
val b : bool
end
| |
48b4d024a4cab0d6806976ce080c9e8f4edf4ed8dbff477147db88d30859c676 | zenhack/mule | build_js.ml | open Common_ast
module DC = Desugared_ast_common
module DT = Desugared_ast_type
` import " ffi / js".main ` : The type the entry point must
let js_main_type = DT.Path {
p_info = `Type;
p_var = `Import (DC.import_abs `Generated "ffi/js");
p_src = `Generated;
p_lbls = [Label.of_string "main"];
}
le... | null | https://raw.githubusercontent.com/zenhack/mule/f3e23342906d834abb9659c72a67c1405c936a00/src/mule/lib/build_js.ml | ocaml | Arbitrary, since we don't use the type directly. | open Common_ast
module DC = Desugared_ast_common
module DT = Desugared_ast_type
` import " ffi / js".main ` : The type the entry point must
let js_main_type = DT.Path {
p_info = `Type;
p_var = `Import (DC.import_abs `Generated "ffi/js");
p_src = `Generated;
p_lbls = [Label.of_string "main"];
}
le... |
961d16a09426d5102acf6bf2db04d2363f4633da2cac5a96f116c23a9a84f6df | chrisdone/sandbox | proj.hs | # LANGUAGE GeneralizedNewtypeDeriving #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE OverloadedLists #
# LANGUAGE LambdaCase #
# OPTIONS_GHC -Wall #
import Data.List.NonEmpty (NonEmpty(..))
import Data.Stri... | null | https://raw.githubusercontent.com/chrisdone/sandbox/c43975a01119a7c70ffe83c49a629c45f7f2543a/proj.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE FlexibleInstances #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
# LANGUAGE DataKinds #
# LANGUAGE OverloadedLists #
# LANGUAGE LambdaCase #
# OPTIONS_GHC -Wall #
import Data.List.NonEmpty (NonEmpty(..))
import Data.String
newtype Title =
Title String
... |
2ad93d4401903c0a70004261d4f959e380f24b02618dc059f3b7e643ff1cb472 | ptal/AbSolute | transformer.ml | Copyright 2019
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at your option ) any later version .
This program is distr... | null | https://raw.githubusercontent.com/ptal/AbSolute/469159d87e3a717499573c1e187e5cfa1b569829/src/fixpoint/transformer.ml | ocaml | Copyright 2019
This program is free software ; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the License , or ( at your option ) any later version .
This program is distr... | |
2536006c053aba1340ed84ba9ae4ecfc006759e42d3cba4594358053d93ced0f | kupl/FixML | sub1.ml | type formula = TRUE
| FALSE
| NOT of formula
| ANDALSO of formula * formula
| ORELSE of formula * formula
| IMPLY of formula * formula
| LESS of expr * expr
and expr = NUM of int
| PLUS of expr * expr
| MINUS of expr * expr
let rec eval f =
let rec eval2 e =
match e with (NUM n) -> n
... | null | https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/formula/formula/submissions/sub1.ml | ocaml | type formula = TRUE
| FALSE
| NOT of formula
| ANDALSO of formula * formula
| ORELSE of formula * formula
| IMPLY of formula * formula
| LESS of expr * expr
and expr = NUM of int
| PLUS of expr * expr
| MINUS of expr * expr
let rec eval f =
let rec eval2 e =
match e with (NUM n) -> n
... | |
3ce3fdebc3c435d40ff06785b301623290c2e26bda7f4fc3d2f0c110b1595af8 | gvolpe/exchange-rates | Time.hs | module Time where
data TimeUnit = Seconds | Minutes | Hours deriving Show
data Duration = Duration
{ unit :: Int
, timeunit :: TimeUnit
} deriving Show
seconds :: Int -> Duration
seconds n = Duration n Seconds
minutes :: Int -> Duration
minutes n = Duration n Minutes
hours :: Int -> Duration
hours n = Durati... | null | https://raw.githubusercontent.com/gvolpe/exchange-rates/161108bfc859f399f06df7a8ce10e786f01af533/src/Time.hs | haskell | module Time where
data TimeUnit = Seconds | Minutes | Hours deriving Show
data Duration = Duration
{ unit :: Int
, timeunit :: TimeUnit
} deriving Show
seconds :: Int -> Duration
seconds n = Duration n Seconds
minutes :: Int -> Duration
minutes n = Duration n Minutes
hours :: Int -> Duration
hours n = Durati... | |
69667298b47788e34e9dd3c3017679855b3bb2531bb0af07debf1b0058d37862 | nilenso/kulu-backend | 20150313160250630-add-role-to-orgs-users.clj | ;; migrations/20150313160250630-add-role-to-orgs-users.clj
(defn up []
["ALTER TABLE organizations_users ADD COLUMN role VARCHAR (50)"])
(defn down []
["ALTER TABLE organizations_users DROP COLUMN role"])
| null | https://raw.githubusercontent.com/nilenso/kulu-backend/0b404f76643e77219432dcbffa681172a61e591b/migrations/20150313160250630-add-role-to-orgs-users.clj | clojure | migrations/20150313160250630-add-role-to-orgs-users.clj |
(defn up []
["ALTER TABLE organizations_users ADD COLUMN role VARCHAR (50)"])
(defn down []
["ALTER TABLE organizations_users DROP COLUMN role"])
|
10029a4ab2a2fbcedae4f92884c69475145f44b64a25f4c42deecd8539495ead | xh4/web-toolkit | main-example.lisp | (in-package #:cffi-example)
(defcfun "puts" :int
"Put a string to standard output, return non-negative length output, or EOF"
(string :string))
(defun check-groveller ()
(assert (equal (list +a0+ +a1+ +a2+ +a3+ +a4+) '(2 4 8 16 32)))
(assert (equal (bn 1) 32)))
(defun entry-point ()
(when uiop:*command-lin... | null | https://raw.githubusercontent.com/xh4/web-toolkit/e510d44a25b36ca8acd66734ed1ee9f5fe6ecd09/vendor/cffi_0.20.1/examples/main-example.lisp | lisp | (in-package #:cffi-example)
(defcfun "puts" :int
"Put a string to standard output, return non-negative length output, or EOF"
(string :string))
(defun check-groveller ()
(assert (equal (list +a0+ +a1+ +a2+ +a3+ +a4+) '(2 4 8 16 32)))
(assert (equal (bn 1) 32)))
(defun entry-point ()
(when uiop:*command-lin... | |
2a403bd6586fcee933685ab6163eca70c3f247185a72b7f623dddb9e7223cf66 | Tatsuki-I/Vihs | Insert.hs | module Insert where
insert :: String -> String -> Int -> String
insert buff c x = take x buff ++ c ++ reverse (take (length buff - x) (reverse buff))
insertBuff :: [String] -> String -> Int -> Int -> [String]
insertBuff buff c x y = take y buff ++ [insert (buff !! y) c x] ++ reverse (take (length buff - y - 1) (rever... | null | https://raw.githubusercontent.com/Tatsuki-I/Vihs/18543d0e2d2970d28a72674d5c502384bb41d98d/src/Insert.hs | haskell | module Insert where
insert :: String -> String -> Int -> String
insert buff c x = take x buff ++ c ++ reverse (take (length buff - x) (reverse buff))
insertBuff :: [String] -> String -> Int -> Int -> [String]
insertBuff buff c x y = take y buff ++ [insert (buff !! y) c x] ++ reverse (take (length buff - y - 1) (rever... | |
7f1eabde780278fa2789e95cc0624f0798212467e0fb6944af4abc4bab9d7a69 | ocharles/hadoom | TestWorld.hs | {-# LANGUAGE GADTs #-}
# LANGUAGE DataKinds #
module TestWorld where
import BasePrelude
import Data.TList
import Hadoom.World
import Linear
import Linear.Affine
import Material
testWorld :: PWorld TWorld
testWorld =
PWorld (letrec (\_ ->
Texture "flat.jpg" Linear :::
TNil)
... | null | https://raw.githubusercontent.com/ocharles/hadoom/13d5ea590282cdbbd343fa4a3d9144d7a1bcf9fd/hadoom/TestWorld.hs | haskell | # LANGUAGE GADTs # | # LANGUAGE DataKinds #
module TestWorld where
import BasePrelude
import Data.TList
import Hadoom.World
import Linear
import Linear.Affine
import Material
testWorld :: PWorld TWorld
testWorld =
PWorld (letrec (\_ ->
Texture "flat.jpg" Linear :::
TNil)
(\(flat :... |
7b09b8751f936203ddac44d8635f0c903707b7ddb94572b560b2ed3782dd59d9 | serokell/qtah | QList.hs | This file is part of Qtah .
--
Copyright 2015 - 2018 The Qtah Authors .
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (at your option) ... | null | https://raw.githubusercontent.com/serokell/qtah/abb4932248c82dc5c662a20d8f177acbc7cfa722/qtah-generator/src/Graphics/UI/Qtah/Generator/Interface/Core/QList.hs | haskell |
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
(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... | This file is part of Qtah .
Copyright 2015 - 2018 The Qtah Authors .
the Free Software Foundation , either version 3 of the License , or
GNU Lesser General Public License for more details .
You should have received a copy of the GNU Lesser General Public License
| Bindings for @QList@.
module Graphics.UI.Q... |
3563d324bceaccef4ff3abd8dc39bf8c73a9f0efcaece98b19c2e94499212e2e | chef/chef-server | bifrost_wm_bulk_resource.erl | -module(bifrost_wm_bulk_resource).
-include("bifrost_wm_rest_endpoint.hrl").
-include_lib("stats_hero/include/stats_hero.hrl").
-mixin([{bifrost_wm_base, [create_path/2]}]).
-export([
post_is_create/2,
process_post/2
]).
init(Config) ->
bifrost_wm_base:init(?MODULE, Config).
post_is_create(Req, Sta... | null | https://raw.githubusercontent.com/chef/chef-server/437177e87677d116c0871e7269a509440e07e3e2/src/oc_bifrost/apps/bifrost/src/bifrost_wm_bulk_resource.erl | erlang | We're not creating anything (for a change), just processing information, so
be using process_post below
We really don't care if there's a requestor or not, because (1) we're not
limiting access permissions on this endpoint to any particular requestors, and
requesting information need not be the same.
The query ab... | -module(bifrost_wm_bulk_resource).
-include("bifrost_wm_rest_endpoint.hrl").
-include_lib("stats_hero/include/stats_hero.hrl").
-mixin([{bifrost_wm_base, [create_path/2]}]).
-export([
post_is_create/2,
process_post/2
]).
init(Config) ->
bifrost_wm_base:init(?MODULE, Config).
post_is_create(Req, Sta... |
9747f77cca138183aeb7d6213343034490b802684529bfa9cd9901fb062d97bd | paurkedal/ocaml-prime | prime.mli | Copyright ( C ) 2013 - -2022 Petter A. Urkedal < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any la... | null | https://raw.githubusercontent.com/paurkedal/ocaml-prime/5e527c03190474e7fdc87114c6bc9e8e4ddd0759/lib/prime.mli | ocaml | * Primitives.
* A type which is uninhabited by well-founded code. This is equivalent to a
variant type with no constructors, though syntax forbids naming or
defining such types.
* Computations in the scope of a variable [x : counit] can be assumed dead,
and thus be shortcut as [absurd x]. This is the an... | Copyright ( C ) 2013 - -2022 Petter A. Urkedal < >
*
* This library is free software ; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or ( at your
* option ) any la... |
093d9a8867719b061e06eff5791ef0b6dc7ec42762b2e8bdefe9d617186339ae | wedesoft/aiscm | compile.scm | (define-module (aiscm compile)
#:use-module (oop goops)
#:use-module (srfi srfi-1)
#:use-module (aiscm element)
#:use-module (aiscm int)
#:export (expr->params
expr->descr
expr->temps
expr->call
expr->method)
#:export-syntax (comp))
(define (expr->params expr)... | null | https://raw.githubusercontent.com/wedesoft/aiscm/2c3db8d00cad6e042150714ada85da19cf4338ad/etc/compile.scm | scheme | (define-module (aiscm compile)
#:use-module (oop goops)
#:use-module (srfi srfi-1)
#:use-module (aiscm element)
#:use-module (aiscm int)
#:export (expr->params
expr->descr
expr->temps
expr->call
expr->method)
#:export-syntax (comp))
(define (expr->params expr)... | |
bac5327235f8e76f8afb6ca6925ec9ac346a7a36512e4530cd66e4dc81e5e4d6 | janestreet/core | deque.ml | open! Import
open Std_internal
type 'a t =
{ (* [arr] is a cyclic buffer *)
mutable arr : 'a Option_array.t
; (* [front_index] and [back_index] are the positions in which new elements may be
enqueued. This makes the active part of [arr] the range from [front_index+1] to
[back_index-1] (modulo th... | null | https://raw.githubusercontent.com/janestreet/core/d0d1b3915c9350d8e9f2b395a817659e539e6155/core/src/deque.ml | ocaml | [arr] is a cyclic buffer
[front_index] and [back_index] are the positions in which new elements may be
enqueued. This makes the active part of [arr] the range from [front_index+1] to
[back_index-1] (modulo the length of [arr] and wrapping around if necessary). Note
that this means the active r... | open! Import
open Std_internal
type 'a t =
mutable arr : 'a Option_array.t
mutable front_index : int
; mutable back_index : int
mutable apparent_front_index : int
; mutable length : int
We keep arr_length here as a speed hack . Calling Array.length on is actually
meaningfully slower .
... |
d947d6f93bf427692ea66ffabc6057f6dbb7e432c4c904d223a0292a4d893ce6 | MinaProtocol/mina | endo.mli | (* Endo coefficients *)
(** [Step_inner_curve] contains the endo coefficients used by the step proof system *)
module Step_inner_curve : sig
val base : Backend.Tick.Field.t
val scalar : Backend.Tock.Field.t
val to_field :
Import.Challenge.Constant.t Import.Scalar_challenge.t
-> Backend.Tock.Field.t
... | null | https://raw.githubusercontent.com/MinaProtocol/mina/b19a220d87caa129ed5dcffc94f89204ae874661/src/lib/pickles/endo.mli | ocaml | Endo coefficients
* [Step_inner_curve] contains the endo coefficients used by the step proof system
* [Wrap_inner_curve] contains the endo coefficients used by the wrap proof system |
module Step_inner_curve : sig
val base : Backend.Tick.Field.t
val scalar : Backend.Tock.Field.t
val to_field :
Import.Challenge.Constant.t Import.Scalar_challenge.t
-> Backend.Tock.Field.t
end
module Wrap_inner_curve : sig
val base : Backend.Tock.Field.t
val scalar : Backend.Tick.Field.t
va... |
225c2e973c85eb32ec9d3de1d3a298db1368cd8816ddfe229a039ed31066d652 | pbrisbin/yesod-goodies | SimpleSearch.hs | -------------------------------------------------------------------------------
-- |
Module : Data . SimpleSearch
Copyright : ( c ) 2010
-- License : as-is
--
-- Maintainer :
-- Stability : unstable
-- Portability : unportable
--
-----------------------------------------------------------... | null | https://raw.githubusercontent.com/pbrisbin/yesod-goodies/effa9f67b45e7be236ae8037a60a21b406ef05f8/simple-search/Data/SimpleSearch.hs | haskell | -----------------------------------------------------------------------------
|
License : as-is
Maintainer :
Stability : unstable
Portability : unportable
-----------------------------------------------------------------------------
* predefined
| A ranked search result
| Any item can be searched ... | Module : Data . SimpleSearch
Copyright : ( c ) 2010
module Data.SimpleSearch
( SearchResult(..)
, Search(..)
, search
, search_
, weightedSearch
, weightedSearch_
, TextSearch(..)
, keywordMatch
) where
import Data.List (sortBy, intersect)
import Data.Ord (com... |
60cb69287b77382189bef6cad24e7ab45df8962daae93debc2ef45f352f04564 | dimitri/pgloader | queries.lisp | ;;;
;;; Load SQL queries at load-time into an hash table and offer a function to
;;; get the SQL query text from the source code. This allows to maintain
;;; proper .sql files in the source code, for easier maintenance.
;;;
(in-package :pgloader.queries)
(defparameter *src*
(uiop:pathname-directory-pathname
(asd... | null | https://raw.githubusercontent.com/dimitri/pgloader/75c00b5ff47c46c77ed22e84730ebdcb1fcfe7a1/src/utils/queries.lisp | lisp |
Load SQL queries at load-time into an hash table and offer a function to
get the SQL query text from the source code. This allows to maintain
proper .sql files in the source code, for easier maintenance.
we store SQL queries in a sql/ subdirectory because it's easier to
manage the code that way, but it's an imp... |
(in-package :pgloader.queries)
(defparameter *src*
(uiop:pathname-directory-pathname
(asdf:system-relative-pathname :pgloader "src/"))
"Source directory where to look for .sql query files.")
(defun load-static-file (fs pathname url)
"Load given PATHNAME contents at URL-PATH in FS."
(setf (gethash url fs)
... |
28c9a2c826653d40040156a28ad113374c934c66937a9745f3a539c761f4b8b8 | lpeterse/koka | ColorScheme.hs | -----------------------------------------------------------------------------
Copyright 2012 Microsoft Corporation .
--
-- This is free software; you can redistribute it and/or modify it under the
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the roo... | null | https://raw.githubusercontent.com/lpeterse/koka/43feefed258b9a533f07967d3f8867b02384df0e/src/Common/ColorScheme.hs | haskell | ---------------------------------------------------------------------------
This is free software; you can redistribute it and/or modify it under the
---------------------------------------------------------------------------
|
Global color scheme used for pretty printing.
* Flags
-------------------------------... | Copyright 2012 Microsoft Corporation .
terms of the Apache License , Version 2.0 . A copy of the License can be
found in the file " license.txt " at the root of this distribution .
module Common.ColorScheme( ColorScheme(..)
, Color(..)
, defaultColorScheme
... |
12495289a353a79d7cd9441fda23d1463a041bec6dbd9c87fdc74f08a7e06716 | ocsigen/js_of_ocaml | webSockets.mli | Js_of_ocaml library
* /
* Copyright ( C ) 2012
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linkin... | null | https://raw.githubusercontent.com/ocsigen/js_of_ocaml/58210fabc947c4839b6e71ffbbf353a4ede0dbb7/lib/js_of_ocaml/webSockets.mli | ocaml | * WebSocket binding | Js_of_ocaml library
* /
* Copyright ( C ) 2012
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linkin... |
4c23d34513330d5fbe57127dc775bd70c04d127d13d1abb704fb64be0b822b49 | halgari/mjolnir | ssa_rules.clj | (ns mjolnir.ssa-rules
(:require [clojure.pprint :refer [pprint]]
[datomic.api :refer [db q] :as d]))
(def rules (atom []))
(defmacro defrule [name args doc & body]
#_(println "Registered rule" name )
(swap! rules conj `[(~name ~@args)
~@body])
nil)
;; Utility
(defrule glob... | null | https://raw.githubusercontent.com/halgari/mjolnir/cfb82a55bc316a6a0e235b46f6ee04c6b55c8cc5/src/mjolnir/ssa_rules.clj | clojure | Utility
Inference Rules
decrement this, as we include :inst.call/fn
Cast subtype
Cmp predicate inference
For a block, gets the instructions in the block | (ns mjolnir.ssa-rules
(:require [clojure.pprint :refer [pprint]]
[datomic.api :refer [db q] :as d]))
(def rules (atom []))
(defmacro defrule [name args doc & body]
#_(println "Registered rule" name )
(swap! rules conj `[(~name ~@args)
~@body])
nil)
(defrule global-def [?id... |
f15838802b9075471cf0f6dd35ca6b9aabf71a2b72559c0ee8fb5c1cd635df5b | 8c6794b6/guile-tjit | x-triangle.scm | ;;; TRIANG from racket benchmark.
(define *board* (make-vector 16 1))
(define *sequence* (make-vector 14 0))
(define *a* (make-vector 37))
(define *b* (make-vector 37))
(define *c* (make-vector 37))
(define *answer* '())
(define *final* '())
(define (last-position)
(do ((i 1 (+ i 1)))
((or (= i 16) (= 1 (vect... | null | https://raw.githubusercontent.com/8c6794b6/guile-tjit/9566e480af2ff695e524984992626426f393414f/test-suite/tjit/x-triangle.scm | scheme | TRIANG from racket benchmark. |
(define *board* (make-vector 16 1))
(define *sequence* (make-vector 14 0))
(define *a* (make-vector 37))
(define *b* (make-vector 37))
(define *c* (make-vector 37))
(define *answer* '())
(define *final* '())
(define (last-position)
(do ((i 1 (+ i 1)))
((or (= i 16) (= 1 (vector-ref *board* i)))
(if (= ... |
307e8753a01cf7642d43b0e0bf60ed87666734c63069d7fe33d069ad4557f3cc | qfpl/applied-fp-course | CommentText.hs | module Level07.Types.CommentText
( CommentText
, mkCommentText
, getCommentText
, encodeCommentText
) where
import Waargonaut.Encode (Encoder)
import qualified Waargonaut.Encode as E
import Data.Functor.Contravariant ((>$<))
import Data.Text (... | null | https://raw.githubusercontent.com/qfpl/applied-fp-course/d5a94a9dcee677bc95a5184c2ed13329c9f07559/src/Level07/Types/CommentText.hs | haskell | module Level07.Types.CommentText
( CommentText
, mkCommentText
, getCommentText
, encodeCommentText
) where
import Waargonaut.Encode (Encoder)
import qualified Waargonaut.Encode as E
import Data.Functor.Contravariant ((>$<))
import Data.Text (... | |
d5b7374fe7b00c5b16a38cfd6f689656c990ce928baa16e3fd6d776a9e9acb07 | avatar29A/hs-aitubots-api | EditContainerMessage.hs |
# LANGUAGE RecordWildCards #
# LANGUAGE DuplicateRecordFields #
{-# LANGUAGE OverloadedStrings #-}
module Aitu.Bot.Commands.EditContainerMessage
( EditContainerMessage(..)
)
where
import Data.Aeson
import Data.Text
import Data.Maybe
import Data.UUID.Types
import ... | null | https://raw.githubusercontent.com/avatar29A/hs-aitubots-api/9cc3fd1e4e9e81491628741a6bbb68afbb85704e/src/Aitu/Bot/Commands/EditContainerMessage.hs | haskell | # LANGUAGE OverloadedStrings #
doc: -api-contract/EditContainerMessage.html |
# LANGUAGE RecordWildCards #
# LANGUAGE DuplicateRecordFields #
module Aitu.Bot.Commands.EditContainerMessage
( EditContainerMessage(..)
)
where
import Data.Aeson
import Data.Text
import Data.Maybe
import Data.UUID.Types
import Aitu.Bot.Types.Peer ... |
6af9c6710bce7310f85cac61b8efb54d6cfefbecbe3e66c0cb22568714285e68 | lilactown/apollo-cljs-example | core.cljs | (ns apollo-example.core
(:require [helix.core :refer [defnc $]]
[helix.dom :as d]
["react-dom" :as rdom]
["apollo-boost" :default ApolloClient :refer [gql]]
["@apollo/react-hooks" :as apollo :refer [useQuery]]
[cljs-bean.core :as b]))
(def client (ApolloCli... | null | https://raw.githubusercontent.com/lilactown/apollo-cljs-example/b769aa6a526e8ba21515c43521389e2a1f9ec307/src/apollo_example/core.cljs | clojure | wrap result in a bean to destructure | (ns apollo-example.core
(:require [helix.core :refer [defnc $]]
[helix.dom :as d]
["react-dom" :as rdom]
["apollo-boost" :default ApolloClient :refer [gql]]
["@apollo/react-hooks" :as apollo :refer [useQuery]]
[cljs-bean.core :as b]))
(def client (ApolloCli... |
74d00d1aec5ff736e8d900e956fb85bf950a5fed8522cc940ccf2dbe4f6dde4c | aitorres/firelink | ScalarTypesSpec.hs | module ScalarTypesSpec where
import FireLink.FrontEnd.Tokens
import Test.Hspec
import Utils (scanToken)
spec :: Spec
spec = describe "Lexer" $ do
-- Integers
it "accepts `humanity` as a valid token" $ do
let x = "humanity"
let atok = scanToken x
atok `s... | null | https://raw.githubusercontent.com/aitorres/firelink/075d7aad1c053a54e39a27d8db7c3c719d243225/test/Lexer/ScalarTypesSpec.hs | haskell | Integers
Tri-booleans
Hollow
Sign | module ScalarTypesSpec where
import FireLink.FrontEnd.Tokens
import Test.Hspec
import Utils (scanToken)
spec :: Spec
spec = describe "Lexer" $ do
it "accepts `humanity` as a valid token" $ do
let x = "humanity"
let atok = scanToken x
atok `shouldBe` TkBig... |
4d36d1ca4dc77959549ab2aa40c9a69f3eb5612751bc907fb2f4c4b200307140 | lambduli/frea | Evaluate.hs | module Interpreter.Evaluate where
import Data.Either
import Data.List
import Data.Map.Strict ((!?), (!))
import qualified Data.Map.Strict as Map
import Control.Monad.State.Lazy
import Compiler.Syntax.Expression
import Compiler.Syntax.Declaration
import Compiler.Syntax.Literal
import Interpreter.Value (EvaluationError... | null | https://raw.githubusercontent.com/lambduli/frea/3c227062e744d4df280987cc7b9680590da56e1f/src/Interpreter/Evaluate.hs | haskell | can't really happen thanks to the type system
TODO: do the same thing as for global bindings
first collect them all to the env
then store them all in the memory
then set new memory and evaluate the expr with the new env
wiring the String into the compiler | module Interpreter.Evaluate where
import Data.Either
import Data.List
import Data.Map.Strict ((!?), (!))
import qualified Data.Map.Strict as Map
import Control.Monad.State.Lazy
import Compiler.Syntax.Expression
import Compiler.Syntax.Declaration
import Compiler.Syntax.Literal
import Interpreter.Value (EvaluationError... |
f9d580767457ac79a016807479dcab9bf8ce169b147a1595f35fba41716f0da8 | jwiegley/notes | Koz.hs | cocataM :: (Monad m, Traversable f) => (a -> f b -> m b) -> Cofree f a -> m b
cocataM k (x :< xs) = k x =<< traverse (cocataM k) xs | null | https://raw.githubusercontent.com/jwiegley/notes/24574b02bfd869845faa1521854f90e4e8bf5e9a/gists/8d692e70cadbe4a3a4336825daa61f65/Koz.hs | haskell | cocataM :: (Monad m, Traversable f) => (a -> f b -> m b) -> Cofree f a -> m b
cocataM k (x :< xs) = k x =<< traverse (cocataM k) xs | |
2f076e575191784a35abda1884006fb1cd52fd60904f752b2affb15d18e43649 | well-typed/large-records | R010.hs | #if PROFILE_CORESIZE
{-# OPTIONS_GHC -ddump-to-file -ddump-simpl #-}
#endif
#if PROFILE_TIMING
{-# OPTIONS_GHC -ddump-to-file -ddump-timings #-}
#endif
# LANGUAGE OverloadedLabels #
# LANGUAGE RecordWildCards #
module Experiment.SR_SetEvens.Sized.R010 where
import SuperRecord (Rec)
import qualified SuperRecord as ... | null | https://raw.githubusercontent.com/well-typed/large-records/78d0966e4871847e2c17a0aa821bacf38bdf96bc/large-records-benchmarks/bench/superrecord/Experiment/SR_SetEvens/Sized/R010.hs | haskell | # OPTIONS_GHC -ddump-to-file -ddump-simpl #
# OPTIONS_GHC -ddump-to-file -ddump-timings #
00 .. 09 | #if PROFILE_CORESIZE
#endif
#if PROFILE_TIMING
#endif
# LANGUAGE OverloadedLabels #
# LANGUAGE RecordWildCards #
module Experiment.SR_SetEvens.Sized.R010 where
import SuperRecord (Rec)
import qualified SuperRecord as SR
import Bench.EvensOfSize.Evens010
import Common.RowOfSize.Row010
setEvens :: Evens -> Rec Exa... |
f91e2956f9753a1cd4373a99c832b145fd9fa814d329c9c0177add14c765aa29 | NorfairKing/intray | DoneSpec.hs | {-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
module Intray.Cli.Commands.DoneSpec (spec) where
import qualified Data.List.NonEmpty as NE
import Intray.API.Gen ()
import Intray.Cli.OptParse
import Intray.Cli.Sqlite
import Intray.Cli.TestUtils
import Intray.Data
import TestImport
spec :: Spec
spe... | null | https://raw.githubusercontent.com/NorfairKing/intray/3335692a5445e86bf308420d4ab025d6ab11b10d/intray-cli/test/Intray/Cli/Commands/DoneSpec.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE ScopedTypeVariables #
module Intray.Cli.Commands.DoneSpec (spec) where
import qualified Data.List.NonEmpty as NE
import Intray.API.Gen ()
import Intray.Cli.OptParse
import Intray.Cli.Sqlite
import Intray.Cli.TestUtils
import Intray.Data
import TestImport
spec :: Spec
spec = do
cliMSpec $ do
it "can ... |
565c95efbcf80aa9df4f83053c89abcaf6eeabd22574e6f4fb27933accf64d98 | ygrek/ocaml-extlib | check_stdlib.ml | (* check compatibility of interfaces *)
#directory "src";;
#load "extLib.cma";;
module XS = (struct
include ExtLib.String
external length : string -> int = "%string_length"
external get : string -> int -> char = "%string_safe_get"
external set : bytes -> int -> char -> unit = "%string_safe_set"
external cre... | null | https://raw.githubusercontent.com/ygrek/ocaml-extlib/cfb2d9632d117020f9c9bfdabea679ae9222a620/check_stdlib.ml | ocaml | check compatibility of interfaces |
#directory "src";;
#load "extLib.cma";;
module XS = (struct
include ExtLib.String
external length : string -> int = "%string_length"
external get : string -> int -> char = "%string_safe_get"
external set : bytes -> int -> char -> unit = "%string_safe_set"
external create : int -> bytes = "caml_create_string... |
cb1a00eee232da4c1957ffb782dced6e366857817888f84dc626a10b38f10329 | elastic/eui-cljs | icon_logo_metrics.cljs | (ns eui.icon-logo-metrics
(:require ["@elastic/eui/lib/components/icon/assets/logo_metrics.js" :as eui]))
(def logoMetrics eui/icon)
| null | https://raw.githubusercontent.com/elastic/eui-cljs/ad60b57470a2eb8db9bca050e02f52dd964d9f8e/src/eui/icon_logo_metrics.cljs | clojure | (ns eui.icon-logo-metrics
(:require ["@elastic/eui/lib/components/icon/assets/logo_metrics.js" :as eui]))
(def logoMetrics eui/icon)
| |
ed0bde06a159c05a0b38f621d41656de060031078a12c8b2d117e6ff7f4e8fef | pentlandedge/s4607 | job_req_tests.erl | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright 2018 Pentland Edge Ltd.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
%% use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% U... | null | https://raw.githubusercontent.com/pentlandedge/s4607/b3cdae404ac5bd50419f33259dfa62af9d1a8d60/test/job_req_tests.erl | erlang |
use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitati... | Copyright 2018 Pentland Edge Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ; you may not
distributed under the License is distributed on an " AS IS " BASIS , WITHOUT
-module(job_req_tests).
-include_lib("eunit/include/eunit.hrl").
-export([sample_params/0, sample_job_request/0, sampl... |
cf1101bc52afcf76c2413c6e06e1a3fd36209be286257ffc0681b4a6f8e44ac7 | ott-lang/ott | new_term_parser.ml | (**************************************************************************)
(* new_term_parser *)
(* *)
, Computer Laboratory , University of Cambridge
(* ... | null | https://raw.githubusercontent.com/ott-lang/ott/29ac9ef84967686da35b9b42608b3aec3539a689/src/new_term_parser.ml | ocaml | ************************************************************************
new_term_parser
... | , Computer Laboratory , University of Cambridge
Copyright 2007
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . The names of the authors... |
21cc07e41e7ba80dcc65ae0f10f668db5b16854fa730841002a13f3b903a46a7 | facebook/flow | reason.mli |
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... | null | https://raw.githubusercontent.com/facebook/flow/95b167abfb0c84213e10339ab40381f9f86a4442/src/common/reason.mli | ocaml | convenience
reason constructor
ranges
accessors
simple way to get derived reasons whose descriptions are
simple replacements of the original
replace desc, but keep loc, def_loc, annot_loc
replace desc, but keep loc, def_loc, annot_loc |
* Copyright ( c ) Meta Platforms , Inc. and 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) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in t... |
e96c80464cb2ec54fa8a98cae87d023318d7857102e86baedacccda021e65fb7 | flodihn/NextGen | libdist_migrate.erl | -module(libdist_migrate).
-include("obj.hrl").
-define(MAX_MESSAGES, 1000).
% API
-export([
init/0,
migrate/2
]).
% handlers
-export([
]).
% internal exports
-export([
migrate_loop/4
]).
init() ->
ok.
migrate(AreaSrv, ObjState) ->
Reply = rpc:call(AreaSrv, obj_sup, start, [ObjState#obj.... | null | https://raw.githubusercontent.com/flodihn/NextGen/3da1c3ee0d8f658383bdf5fccbdd49ace3cdb323/AreaServer/src/libdist/libdist_migrate.erl | erlang | API
handlers
internal exports
Migrated objects enter this loop to die gracefully.
If we migrated to a new area, unregister from the shared obj
registry. | -module(libdist_migrate).
-include("obj.hrl").
-define(MAX_MESSAGES, 1000).
-export([
init/0,
migrate/2
]).
-export([
]).
-export([
migrate_loop/4
]).
init() ->
ok.
migrate(AreaSrv, ObjState) ->
Reply = rpc:call(AreaSrv, obj_sup, start, [ObjState#obj.type,
ObjState]),
case Rep... |
7bf2ad0ca5c58275db3cda06d9b5e798f3b9d552976ea001902f09d0ca394ded | avsm/melange | hashcons.ml |
* hashcons : hash tables for hash consing
* Copyright ( C ) 2000 FILLIATRE
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License version 2 , as published by the Free Software Foundation .
*
* This library is ... | null | https://raw.githubusercontent.com/avsm/melange/e92240e6dc8a440cafa91488a1fc367e2ba57de1/lib/dns/hashcons.ml | ocaml | sum of the bucket sizes
max ratio totsize/table length
prevent resizing of newt
sum of the bucket sizes
max ratio totsize/table length
prevent resizing of newt |
* hashcons : hash tables for hash consing
* Copyright ( C ) 2000 FILLIATRE
*
* This library is free software ; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License version 2 , as published by the Free Software Foundation .
*
* This library is ... |
3304499eba07b9a18e3750f56ebe215cb3a4aff0591cf3481479bbd43c6914a4 | lambdacube3d/lambdacube-quake3 | Md3Show.hs | import Control.Monad
import System.Environment
import Text.Show.Pretty
import GameEngine.Loader.MD3
main = getArgs >>= mapM_ (loadMD3 >=> pPrint)
| null | https://raw.githubusercontent.com/lambdacube3d/lambdacube-quake3/2fbc17eeea7567f2876d86a7ccce4bd8c8e1927c/tools/md3-show/Md3Show.hs | haskell | import Control.Monad
import System.Environment
import Text.Show.Pretty
import GameEngine.Loader.MD3
main = getArgs >>= mapM_ (loadMD3 >=> pPrint)
| |
510fee712fca5cb9b0203ad603f4125c6fea1aa20fed6083ccfc56df215a5f59 | tenpureto/tenpureto | TenpuretoTest.hs | module TenpuretoTest where
import Test.Tasty
import Test.Tasty.HUnit
import Tenpureto.Effects.Git ( Committish(..) )
import Tenpureto.Messages
import qualified Tenpureto.OrderedMap as OrderedMap
import Tenpureto
test_extractTemplateName :: [TestTre... | null | https://raw.githubusercontent.com/tenpureto/tenpureto/886df860200e1a6f44ce07c24a5e7597009f71ef/test/TenpuretoTest.hs | haskell | module TenpuretoTest where
import Test.Tasty
import Test.Tasty.HUnit
import Tenpureto.Effects.Git ( Committish(..) )
import Tenpureto.Messages
import qualified Tenpureto.OrderedMap as OrderedMap
import Tenpureto
test_extractTemplateName :: [TestTre... | |
f511ee19130ffeb382dfecf39e20b2b59e93c9d4e754d46b3aaaf304c7bd3064 | wireless-net/erlang-nommu | shell_default.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 1996 - 2010 . All Rights Reserved .
%%
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Publi... | null | https://raw.githubusercontent.com/wireless-net/erlang-nommu/79f32f81418e022d8ad8e0e447deaea407289926/lib/stdlib/src/shell_default.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitatio... | Copyright Ericsson AB 1996 - 2010 . All Rights Reserved .
The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distributed under the License is distributed on an " AS IS "
-module(shell_default).
-export([help/0,... |
94e3f9148850444d978ba0870564de1f588297aefbe35f020b155b9ccca65e41 | janestreet/core | validated.ml | open! Import
open Std_internal
open Validated_intf
module type Raw = Raw
type ('raw, 'witness) t = 'raw
module type S = S with type ('a, 'b) validated := ('a, 'b) t
module type S_allowing_substitution =
S_allowing_substitution with type ('a, 'b) validated := ('a, 'b) t
module type S_bin_io = S_bin_io with type (... | null | https://raw.githubusercontent.com/janestreet/core/4b6635d206f7adcfac8324820d246299d6f572fe/core/src/validated.ml | ocaml | open! Import
open Std_internal
open Validated_intf
module type Raw = Raw
type ('raw, 'witness) t = 'raw
module type S = S with type ('a, 'b) validated := ('a, 'b) t
module type S_allowing_substitution =
S_allowing_substitution with type ('a, 'b) validated := ('a, 'b) t
module type S_bin_io = S_bin_io with type (... | |
78b2d9fc9a3105352605e216893d08a451be70dd476aa9f44eee5eb9ebfe2a95 | REPROSEC/dolev-yao-star | Vale_AES_OptPublic.ml | open Prims
let (shift_gf128_key_1 : Vale_Math_Poly2_s.poly -> Vale_Math_Poly2_s.poly) =
fun h ->
Vale_AES_GF128.shift_key_1 (Prims.of_int (128))
Vale_AES_GF128_s.gf128_modulus_low_terms h
let rec (g_power :
Vale_Math_Poly2_s.poly -> Prims.nat -> Vale_Math_Poly2_s.poly) =
fun a ->
fun n ->
if n... | null | https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Vale_AES_OptPublic.ml | ocaml | open Prims
let (shift_gf128_key_1 : Vale_Math_Poly2_s.poly -> Vale_Math_Poly2_s.poly) =
fun h ->
Vale_AES_GF128.shift_key_1 (Prims.of_int (128))
Vale_AES_GF128_s.gf128_modulus_low_terms h
let rec (g_power :
Vale_Math_Poly2_s.poly -> Prims.nat -> Vale_Math_Poly2_s.poly) =
fun a ->
fun n ->
if n... | |
7f397db97d33b67f837bfc33c58804a4751fe43891fda5106821b0bcad157c2c | janestreet/merlin-jst | linear_format.mli | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/janestreet/merlin-jst/980b574405617fa0dfb0b79a84a66536b46cd71b/upstream/ocaml_flambda/file_formats/linear_format.mli | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
, Jane Street Europe
Copyright 1996 Institut National de Recherche en Informatique et
Copyright 2019 Jane Street Group LLC
the GNU Lesser General Public License ... |
37adb8615146e9b4254a92d3894993347c0eb261438e2eb23ceb11861686813a | gvolpe/haskell-book-exercises | arith4.hs | module Arith4 where
-- id :: a -> a
-- id x = x
roundTrip :: (Show a, Read a) => a -> a
roundTrip = read . show
roundTripAlt :: (Show a, Read b) => a -> b
roundTripAlt = read . show
main = do
roundTrip 4
print (id 4)
| null | https://raw.githubusercontent.com/gvolpe/haskell-book-exercises/5c1b9d8dc729ee5a90c8709b9c889cbacb30a2cb/chapter7/arith4.hs | haskell | id :: a -> a
id x = x | module Arith4 where
roundTrip :: (Show a, Read a) => a -> a
roundTrip = read . show
roundTripAlt :: (Show a, Read b) => a -> b
roundTripAlt = read . show
main = do
roundTrip 4
print (id 4)
|
ae9874e7170f96fc2013b2a94921e2372ef2dc94fc11274a805089cabd46c31d | repl-acement/repl-acement | def.cljs | (ns replacement.forms.events.def
"A `def` form creates a global variable and can have an expression to set the initial value.
This namespace is concerned with breaking the def forms down using `spec/conform` and
putting them back together with `unform`. Editing by a human or a function may happen
in between pr... | null | https://raw.githubusercontent.com/repl-acement/repl-acement/2a1c5762ebe6225cd9c53e4ce0413046495ce0d8/repl-ui/replacement/forms/events/def.cljs | clojure | TODO: this should be from def.text that is built from unform
and such a change should be signalled per active CM
in short, this function is not needed
(fixed-items-update-cms! db source-cm-key)
First update the transacting code-mirror | (ns replacement.forms.events.def
"A `def` form creates a global variable and can have an expression to set the initial value.
This namespace is concerned with breaking the def forms down using `spec/conform` and
putting them back together with `unform`. Editing by a human or a function may happen
in between pr... |
7756b5790900dfcdc048228137d4effadce99528b3b5e80901f47ef44322c379 | gstew5/snarkl | Stack.hs | # LANGUAGE RebindableSyntax
, #
, DataKinds
#-}
module Stack where
import Prelude hiding
( (>>)
, (>>=)
, (+)
, (-)
, (*)
, (/)
, (&&)
, return
, fromRational
, negate
)
import Data.Typeable
import Compile
import SyntaxMonad
import Syntax
import ... | null | https://raw.githubusercontent.com/gstew5/snarkl/d6ce72b13e370d2965bb226f28a1135269e7c198/src/examples/Stack.hs | haskell | -
top_stack on empty stack
top_stack on non-empty stack
is_empty_stack on an empty stack
is_empty_stack on non-empty stack | # LANGUAGE RebindableSyntax
, #
, DataKinds
#-}
module Stack where
import Prelude hiding
( (>>)
, (>>=)
, (+)
, (-)
, (*)
, (/)
, (&&)
, return
, fromRational
, negate
)
import Data.Typeable
import Compile
import SyntaxMonad
import Syntax
import ... |
38e8b5a097168458253f8f59982819036e3396d9ed5cc9ec08f266d0be3e466c | esl/ejabberd_tests | metrics_roster_SUITE.erl | %%==============================================================================
Copyright 2013 Erlang Solutions Ltd.
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
... | null | https://raw.githubusercontent.com/esl/ejabberd_tests/913fb0a5a8c1ab753eb35c1e1b491e8572633b54/tests/metrics_roster_SUITE.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 ex... | Copyright 2013 Erlang Solutions Ltd.
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
-module(metrics_roster_SUITE).
-compile(export_all).
-include_lib("escalus/include/escalus.hrl").
-include_lib("common_test/include/ct.h... |
99d2a3b429291baabb889bb0c316e21612ccb605deb0f6b383df6f0e5a7bb4fa | rabbitmq/rabbitmq-erlang-client | uri_parser.erl | This file is a copy of http_uri.erl from the R13B-1 Erlang / OTP
%% distribution with several modifications.
All modifications are Copyright ( c ) 2009 - 2020 VMware , Inc. or its affiliates .
` ` The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may ... | null | https://raw.githubusercontent.com/rabbitmq/rabbitmq-erlang-client/2022e01c515d93ed1883e9e9e987be2e58fe15c9/src/uri_parser.erl | erlang | distribution with several modifications.
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved via the world wide web at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific l... | This file is a copy of http_uri.erl from the R13B-1 Erlang / OTP
All modifications are Copyright ( c ) 2009 - 2020 VMware , Inc. or its affiliates .
` ` The contents of this file are subject to the Erlang Public License ,
Version 1.1 , ( the " License " ) ; you may not use this file except in
Software distr... |
f00f38fa60c4e34fde1408e8a83f89e2d5e8595bda314ee14563338c4e18f806 | arcfide/chez-srfi | vectors-impl.scm | SRFI 43 : Vector library -*- Scheme -*-
;;;
$ Id$
;;;
wrote this code ; he places it in the public domain .
[ wdc ] made some corrections , also in the public domain .
modified this code for SRFI 133 ; his changes are also in
;;; the public domain. However, in jurisdictions w... | null | https://raw.githubusercontent.com/arcfide/chez-srfi/96fb553b6ba0834747d5ccfc08c181aa8fd5f612/%253a133/vectors-impl.scm | scheme |
he places it in the public domain .
his changes are also in
the public domain. However, in jurisdictions where it is not possible
to dedicate something to the public domain, the entire implementation
--------------------
Exported procedure index
* Constructors
vector-unfold vector-unfold-r... | SRFI 43 : Vector library -*- Scheme -*-
$ Id$
[ wdc ] made some corrections , also in the public domain .
is made available under the same license as SRFI 133 .
loops are lambda - lifted , and only if some routine has two possible
closure in their body ( VECTOR - PARSE - S... |
70619af80bd8bb93623503bdc93e9e951678b7ce90c8443e9f8660600045b192 | GlideAngle/flare-timing | FsEffortOptions.hs | module FsEffortOptions (description) where
import Text.RawString.QQ (r)
import Flight.Cmd.Options (Description(..))
description :: Description
description = Description [r|
Extracts the distance difficulty chunking from a competition.
|]
| null | https://raw.githubusercontent.com/GlideAngle/flare-timing/27bd34c1943496987382091441a1c2516c169263/lang-haskell/flare-timing/prod-apps/fs-effort/FsEffortOptions.hs | haskell | module FsEffortOptions (description) where
import Text.RawString.QQ (r)
import Flight.Cmd.Options (Description(..))
description :: Description
description = Description [r|
Extracts the distance difficulty chunking from a competition.
|]
| |
e137692bb1d80268a5d6c09749b793979d9b2b9083b73d46f4825d560d9a7702 | bnoordhuis/chicken-core | compiler-tests-3.scm | ;;; compiler-tests-3.scm - tests for unboxing
;;; unboxing introduced binding in test-position of conditional
MBROT -- Generation of set fractal .
(define (count r i step x y)
(let ((max-count 64)
(radius^2 16.0))
(let ((cr (fp+ r (fp* (exact->inexact x) step)))
(ci (fp+ i (fp* (exact-... | null | https://raw.githubusercontent.com/bnoordhuis/chicken-core/56d30e3be095b6abe1bddcfe10505fa726a43bb5/tests/compiler-tests-3.scm | scheme | compiler-tests-3.scm - tests for unboxing
unboxing introduced binding in test-position of conditional |
MBROT -- Generation of set fractal .
(define (count r i step x y)
(let ((max-count 64)
(radius^2 16.0))
(let ((cr (fp+ r (fp* (exact->inexact x) step)))
(ci (fp+ i (fp* (exact->inexact y) step))))
(let loop ((zr cr)
(zi ci)
(c 0))
... |
37712144145991e6d025e2ea8a2d80912d1b83913607b53f43fb09f3e62c64be | pixlsus/registry.gimp.org_static | SPMdeframe.scm | ; ------------------------------------------------------------------------------
Find & remove white framing from Stereophotomaker images
;
( c ) 2008 Stenschke < >
; All rights reserved
;
; This script is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License... | null | https://raw.githubusercontent.com/pixlsus/registry.gimp.org_static/ffcde7400f402728373ff6579947c6ffe87d1a5e/registry.gimp.org/files/SPMdeframe.scm | scheme | ------------------------------------------------------------------------------
All rights reserved
This script is free software; you can redistribute it and/or modify
either version 3 of the License , or
(at your option) any later version.
.
Changelog: (add new entries on top)
----------------------------... | Find & remove white framing from Stereophotomaker images
( c ) 2008 Stenschke < >
it under the terms of the GNU General Public License as published by
The GNU General Public License can be found at
V1.1 ( 2008 - 26 - 08 ) Changed script registration from Gimp 's toolbox window to a new sub menu " Script - F... |
b04801e54c59bd294442570bf84ab6feedf76766b519d3e6959f3a98d75a9395 | cyga/real-world-haskell | num.orig.hs | -- file: ch13/num.hs
import Data.List
--------------------------------------------------
-- Symbolic/units manipulation
--------------------------------------------------
-- The "operators" that we're going to support
data Op = Plus | Minus | Mul | Div | Pow
deriving (Eq, Show)
The core symbolic manipulati... | null | https://raw.githubusercontent.com/cyga/real-world-haskell/4ed581af5b96c6ef03f20d763b8de26be69d43d9/ch13/num.orig.hs | haskell | file: ch13/num.hs
------------------------------------------------
Symbolic/units manipulation
------------------------------------------------
The "operators" that we're going to support
A symbol, such as x
file: ch13/num.hs
file: ch13/num.hs
Make SymbolicManip an instance of Fractional
Make SymbolicManip an ... | import Data.List
data Op = Plus | Minus | Mul | Div | Pow
deriving (Eq, Show)
The core symbolic manipulation type . It can be a simple number ,
a symbol , a binary arithmetic operation ( such as + ) , or a unary
arithmetic operation ( such as cos )
Notice the types of BinaryArith and UnaryArith : ... |
6c018c0127c1e51210c4249c2992b247ce67e28e621c750a53596c48e809eaab | manuel-serrano/bigloo | rss.scm | ;*=====================================================================*/
* serrano / prgm / project / bigloo / bigloo / api / web / src / Llib / rss.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creatio... | null | https://raw.githubusercontent.com/manuel-serrano/bigloo/eb650ed4429155f795a32465e009706bbf1b8d74/api/web/src/Llib/rss.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* RSS parsing */
*===========================... | * serrano / prgm / project / bigloo / bigloo / api / web / src / Llib / rss.scm * /
* Author : * /
* Creation : Tue May 17 08:12:41 2005 * /
* Last change : Fri Sep 7 11:11:31 2018 ( serrano ) * /
* ... |
12e46d31cd9ca4948bc1b9d09e650e5bf52d6992c2b15a7b3f1a6f17f38e2d26 | riemann/riemann | nagios_test.clj | (ns riemann.nagios-test
(:require [riemann.logging :as logging]
[riemann.nagios :refer :all]
[cljr-nsca.core :refer :all]
[clojure.test :refer :all]))
(logging/init)
(def test-event
{:host "host01" :service "test_service" :state "ok" :description "Quick brown fox"})
(def expec... | null | https://raw.githubusercontent.com/riemann/riemann/1649687c0bd913c378701ee0b964a9863bde7c7c/test/riemann/nagios_test.clj | clojure | (ns riemann.nagios-test
(:require [riemann.logging :as logging]
[riemann.nagios :refer :all]
[cljr-nsca.core :refer :all]
[clojure.test :refer :all]))
(logging/init)
(def test-event
{:host "host01" :service "test_service" :state "ok" :description "Quick brown fox"})
(def expec... | |
38252e9574812e4ac402d7b33315161971ccd1ef9f4932beafd54bc6af5ec29f | UnkindPartition/monad-classes | State.hs | module Control.Monad.Classes.State where
import qualified Control.Monad.Trans.State.Lazy as SL
import qualified Control.Monad.Trans.State.Strict as SS
import Control.Monad.Trans.Class
import GHC.Prim (Proxy#, proxy#)
import Control.Monad.Classes.Core
import Control.Monad.Classes.Effects
type instance CanDo (SS.StateT ... | null | https://raw.githubusercontent.com/UnkindPartition/monad-classes/19e41e250615ad1121a958baed6c3081b0efb11b/Control/Monad/Classes/State.hs | haskell | | The @'MonadState' s m@ constraint asserts that @m@ is a monad stack
that supports state operations on type @s@
| Construct a state monad computation from a function
| @'put' s@ sets the state within the monad to @s@
| Fetch the current value of the state within the monad
| Gets specific component of the state, ... | module Control.Monad.Classes.State where
import qualified Control.Monad.Trans.State.Lazy as SL
import qualified Control.Monad.Trans.State.Strict as SS
import Control.Monad.Trans.Class
import GHC.Prim (Proxy#, proxy#)
import Control.Monad.Classes.Core
import Control.Monad.Classes.Effects
type instance CanDo (SS.StateT ... |
f9d3148efcea89a6293376d4fd6d121c631fec09a0a7bd44343c197ccd274345 | anurudhp/CPHaskell | c.hs | # LANGUAGE ParallelListComp #
import Control.Arrow ((>>>))
import Data.List (delete)
main :: IO ()
main = interact $ lines >>> map (words >>> map read) >>> solve >>> show
solve :: [[Int]] -> Int
solve ([n, k]:ts) = length . filter (== k) . map time $ perms
where
perms = map (\p -> 0 : p ++ [0]) $ permute [1 ..... | null | https://raw.githubusercontent.com/anurudhp/CPHaskell/01ae8dde6aab4f6ddfebd122ded0b42779dd16f1/contests/atcoder/abc183/c.hs | haskell | # LANGUAGE ParallelListComp #
import Control.Arrow ((>>>))
import Data.List (delete)
main :: IO ()
main = interact $ lines >>> map (words >>> map read) >>> solve >>> show
solve :: [[Int]] -> Int
solve ([n, k]:ts) = length . filter (== k) . map time $ perms
where
perms = map (\p -> 0 : p ++ [0]) $ permute [1 ..... | |
a5f4179b4cc3fe86be42c6ef0fecf6958d474a191c73fbb147654daa7b0a3c51 | tamarin-prover/tamarin-prover | Label.hs | # LANGUAGE TypeOperators #
-- |
Copyright : ( c ) 2011
-- License : GPL v3 (see LICENSE)
--
Maintainer : < >
Portability : GHC only
--
Extensions to the first - class labels ( fclabels ) package .
module Extension.Data.Label (
nthL
, fstL
, sndL
, module Data.Label
-- * Labels and app... | null | https://raw.githubusercontent.com/tamarin-prover/tamarin-prover/c78c7afd3b93b52dd4d2884952ec0fc273832a0d/lib/utils/src/Extension/Data/Label.hs | haskell | |
License : GPL v3 (see LICENSE)
* Labels and applicative functors
* Labels and Monads
| Lens for the nth element of the list.
| Effectful modification of a labeled value.
| Get part of the state from a reader.
| Set some part of the state.
| Get some part of the state.
| Modify some part of the state. | # LANGUAGE TypeOperators #
Copyright : ( c ) 2011
Maintainer : < >
Portability : GHC only
Extensions to the first - class labels ( fclabels ) package .
module Extension.Data.Label (
nthL
, fstL
, sndL
, module Data.Label
, modA
, askM
, setM
, getM
, modM
, (=:)
) where
impo... |
53e1c5d4f5f9ef17baf6ac595cc42821e50dc50198f8bbcdde12b2b144c5cc8d | spartango/CS153 | fishcomb_test.ml | open Test_framework
open Lcombinators.GenericParsing
open Comblexer
open Ast
open Combparser
open Lcombinators.CharParsing
open Explode
open Eval
open Pretty_print
Tests for the Parser
let test_token_equal =
(mk_expect_test
(fun () ->
let input_tokens = [ (Comblexer.Return, 0);] in
... | null | https://raw.githubusercontent.com/spartango/CS153/16faf133889f1b287cb95c1ea1245d76c1d8db49/ps1/fishcomb_test.ml | ocaml | Statement Parsing Tests
This test maker setup does not work for testing the individual
Gt, Lt, Not, Eq, and keyword combinators, due to longest match rule.
However, complete_combinator tests should validate them. | open Test_framework
open Lcombinators.GenericParsing
open Comblexer
open Ast
open Combparser
open Lcombinators.CharParsing
open Explode
open Eval
open Pretty_print
Tests for the Parser
let test_token_equal =
(mk_expect_test
(fun () ->
let input_tokens = [ (Comblexer.Return, 0);] in
... |
3f01c4efaaadab58e14a1ea7a4934e2865306114b76b0f25645e8b9125e86ea7 | coco-team/lustrec | horn_backend.ml | (********************************************************************)
(* *)
The LustreC compiler toolset / The LustreC Development Team
Copyright 2012 - -- ONERA - CNRS - INPT
(* ... | null | https://raw.githubusercontent.com/coco-team/lustrec/b21f9820df97e661633cd4418fdab68a6c6ca67d/src/backends/Horn/horn_backend.ml | ocaml | ******************************************************************
LustreC is free software, distributed WITHOUT ANY WARRANTY
under the terms of the GNU Lesser General Public L... | The LustreC compiler toolset / The LustreC Development Team
Copyright 2012 - -- ONERA - CNRS - INPT
version 2.1 .
The compilation presented here was first defined in Garoche , Gurfinkel ,
Kahsai , HCSV'14 .
This... |
e4de20cf4199cff438d326d6a912a1efb0c6321629ed2104a063f6b1c5cdbcd1 | GaloisInc/halfs | Types.hs | This module contains types and instances common to most of Halfs
# LANGUAGE GeneralizedNewtypeDeriving #
module Halfs.Types
where
import Control.Applicative
import Control.Monad
import Data.Bits
import qualified Data.Map as M
import Data.List (sort)
import Data.Serialize
import Data.Word
import Halfs.Protection
-... | null | https://raw.githubusercontent.com/GaloisInc/halfs/2eb16fb3744e6221ee706b6bd290681a08c18048/Halfs/Types.hs | haskell | ------------------------------------------------------------------------------
we either decide to do something more fancy or just to make the types
a bit more clear.
At this point, we assume a reference is equal to its block address,
and we fix references as Word64s. Note that if you change the
underlying field ... | This module contains types and instances common to most of Halfs
# LANGUAGE GeneralizedNewtypeDeriving #
module Halfs.Types
where
import Control.Applicative
import Control.Monad
import Data.Bits
import qualified Data.Map as M
import Data.List (sort)
import Data.Serialize
import Data.Word
import Halfs.Protection
... |
58bec9e31166e6fd705f34fe24a9f8eb1aeec973cde6474beb36fd109376a149 | marcoheisig/Petalisp | class-diagram.lisp | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(in-package #:petalisp.graphviz)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Classes
(defclass class-diagram (any-graph)
())
(defclass direct-subclass-edge (any-edge)
())
;;;;;;;;;;;;;;;;;;;;;;;... | null | https://raw.githubusercontent.com/marcoheisig/Petalisp/a1c85cf71da445ef9c7913cd9ddb5149373211a7/code/graphviz/class-diagram.lisp | lisp |
Classes
Connectivity
Graph Appearance
Node Appearance
Edge Appearance | © 2016 - 2023 - license : GNU AGPLv3 -*- coding : utf-8 -*-
(in-package #:petalisp.graphviz)
(defclass class-diagram (any-graph)
())
(defclass direct-subclass-edge (any-edge)
())
(defmethod graphviz-potential-edges append
((graph class-diagram)
(class class))
(list (make-instance 'dire... |
e37826702e909190665e3aaad8fa7af5969c450a49482609374815dc11cc2767 | Helium4Haskell/helium | UnifierList.hs | test x = [x, "hello", 13, x]
| null | https://raw.githubusercontent.com/Helium4Haskell/helium/5928bff479e6f151b4ceb6c69bbc15d71e29eb47/test/typeerrors/Heuristics/UnifierList.hs | haskell | test x = [x, "hello", 13, x]
| |
2a9230cde447081d278ea8293b6449c618e5f90c65daeb29107956e5303d91ed | SimulaVR/godot-haskell | VisualShaderNodeScalarInterp.hs | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.VisualShaderNodeScalarInterp () where
import Data.Coerce
im... | null | https://raw.githubusercontent.com/SimulaVR/godot-haskell/e8f2c45f1b9cc2f0586ebdc9ec6002c8c2d384ae/src/Godot/Core/VisualShaderNodeScalarInterp.hs | haskell | # LANGUAGE DerivingStrategies , GeneralizedNewtypeDeriving ,
TypeFamilies , TypeOperators , FlexibleContexts , DataKinds ,
MultiParamTypeClasses #
TypeFamilies, TypeOperators, FlexibleContexts, DataKinds,
MultiParamTypeClasses #-}
module Godot.Core.VisualShaderNodeScalarInterp () where
import Data.Coerce
im... | |
b0ec0cb19bb438ab9a7398cafe97b41be2871e191c7601ded3627d9a02654393 | ruliana/racket-examples | hate-define-use.rkt | #lang s-exp "hate-define.rkt"
( define x ( λ ( y ) ( add1 y ) ) )
( def x ( λ ( y ) ( add1 y ) ) )
| null | https://raw.githubusercontent.com/ruliana/racket-examples/688293c86132f3b5c924360d53238ca352d4cf5b/module-basic/hate-define-use.rkt | racket | #lang s-exp "hate-define.rkt"
( define x ( λ ( y ) ( add1 y ) ) )
( def x ( λ ( y ) ( add1 y ) ) )
| |
2a7d2b5897134eeb7aec3de745867feb0349a15c924ff8eed7601f6cb3a8024f | swarmpit/swarmpit | inbound.clj | (ns swarmpit.docker.hub.mapper.inbound)
(defn ->repository
[repository]
(into {:name (:repo_name repository)
:description (:short_description repository)
:private false
:stars (:star_count repository)
:pulls (:pull_count repository)
:official (... | null | https://raw.githubusercontent.com/swarmpit/swarmpit/38ffbe08e717d8620bf433c99f2e85a9e5984c32/src/clj/swarmpit/docker/hub/mapper/inbound.clj | clojure | (ns swarmpit.docker.hub.mapper.inbound)
(defn ->repository
[repository]
(into {:name (:repo_name repository)
:description (:short_description repository)
:private false
:stars (:star_count repository)
:pulls (:pull_count repository)
:official (... | |
f1599bc1878d7c8e3219b94a65da315b7827908964802b27474ff39665b6c4b7 | Smart-Sql/smart-sql | my_alter_table.clj | (ns org.gridgain.plus.ddl.my-alter-table
(:require
[org.gridgain.plus.dml.select-lexical :as my-lexical]
[org.gridgain.plus.dml.my-select-plus :as my-select]
[org.gridgain.plus.dml.my-insert :as my-insert]
[org.gridgain.plus.dml.my-update :as my-update]
[org.gridgain.plus.ini... | null | https://raw.githubusercontent.com/Smart-Sql/smart-sql/d2f237f935472942a143816925221cdcf8246aff/src/main/clojure/org/gridgain/plus/ddl/my_alter_table.clj | clojure | 生成 class 的类名
获取要添加或删除的 item 定义
获取 alter obj
(println (get_items_obj colums_line))
执行实时数据集中的 ddl
1、如果要修改的是实时数据集,则修改实时数据集的时候要同步修改在其它数据集中的表
2、判断要修改的表是否是实时数据集映射到,批处理数据集中的,如果是就不能修改,如果不是就可以修改
执行 alter table
(let [sql_code (str/lower-case sql_line)]
(run_ddl_real_time ignite sql_line group_id)
... | (ns org.gridgain.plus.ddl.my-alter-table
(:require
[org.gridgain.plus.dml.select-lexical :as my-lexical]
[org.gridgain.plus.dml.my-select-plus :as my-select]
[org.gridgain.plus.dml.my-insert :as my-insert]
[org.gridgain.plus.dml.my-update :as my-update]
[org.gridgain.plus.ini... |
930c8e7bc474dc71529eea116587b291c1f83fa10b49b42a084d5c81f5013ad5 | sgbj/MaximaSharp | csimp2.lisp | -*- Mode : Lisp ; Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; The data in this file contains enhancments. ;;;;;
;;; ;;;;;
... | null | https://raw.githubusercontent.com/sgbj/MaximaSharp/75067d7e045b9ed50883b5eb09803b4c8f391059/Test/bin/Debug/Maxima-5.30.0/share/maxima/5.30.0/src/csimp2.lisp | lisp | Package : Maxima ; Syntax : Common - Lisp ; Base : 10 -*- ; ; ; ;
The data in this file contains enhancments. ;;;;;
;;;;;
; ; ; ;
All rights reserved ;;;;;
; ;
Implementat... |
(in-package :maxima)
(macsyma-module csimp2)
(load-macsyma-macros rzmac)
(declare-top (special var %p%i varlist plogabs half%pi nn* dn* $factlim
$beta_expand))
(defmvar $gammalim 10000
"Controls simplification of gamma for rational number arguments.")
(defvar $gamma_expand nil
"Expand ga... |
2aa73b8c5876f78cda940a4c385e3f09b6e221e908ae743ca74c6a8ade88dcd1 | ericcervin/getting-started-with-sketching | pg025a.rkt | #lang sketching
(define (setup)
(size 480 120)
(smoothing 'smoothed)
(background 0)
(no-loop)
)
(define (draw)
(fill 204)
(ellipse 132 82 200 200)
(fill 153)
(ellipse 228 -16 200 200)
(fill 102)
(ellipse 268 118 200 200)
)
| null | https://raw.githubusercontent.com/ericcervin/getting-started-with-sketching/e7c15b2ac942a929297ac59db92dcd123421e7b7/pg025a.rkt | racket | #lang sketching
(define (setup)
(size 480 120)
(smoothing 'smoothed)
(background 0)
(no-loop)
)
(define (draw)
(fill 204)
(ellipse 132 82 200 200)
(fill 153)
(ellipse 228 -16 200 200)
(fill 102)
(ellipse 268 118 200 200)
)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.