_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
8d31acf57c91cc2bcea1721edbc1c52f2c497422c8482df8deb0884962c4931c
goldfirere/singletons
PolyKinds.hs
module Singletons.PolyKinds where import Data.Singletons.TH $(singletons [d| class Cls (a :: k) where fff :: Proxy (a :: k) -> () |])
null
https://raw.githubusercontent.com/goldfirere/singletons/70d622645b960d60411ab8f31d16ffb91e69379e/singletons-base/tests/compile-and-dump/Singletons/PolyKinds.hs
haskell
module Singletons.PolyKinds where import Data.Singletons.TH $(singletons [d| class Cls (a :: k) where fff :: Proxy (a :: k) -> () |])
45808aba8c4aab1a5d3617fa4907f175631310e0178662af496c9564d276b14c
AccelerateHS/accelerate-examples
Issue287.hs
{-# LANGUAGE ConstraintKinds #-} {-# LANGUAGE FlexibleContexts #-} # LANGUAGE ScopedTypeVariables # -- -- -- module Test.Issues.Issue287 (test_issue287) where import Config import Test.Framework import Test.Framework.Providers.HUnit import Prelude as P impo...
null
https://raw.githubusercontent.com/AccelerateHS/accelerate-examples/a973ee423b5eadda6ef2e2504d2383f625e49821/examples/icebox/nofib/Test/Issues/Issue287.hs
haskell
# LANGUAGE ConstraintKinds # # LANGUAGE FlexibleContexts # fExp :: Exp (Int,Int,Int,Int,Int,Int) -> Exp (Int,Int,Int,Int,Int,Int) -> Exp (Int,Int,Int,Int,Int,Int) fExp e1 e2 = let v1 = unlift6E e1 v2 = unlift6E e2 in unlift6E => Exp (a,b,c,d,e,f) -> (Exp a, Exp...
# LANGUAGE ScopedTypeVariables # module Test.Issues.Issue287 (test_issue287) where import Config import Test.Framework import Test.Framework.Providers.HUnit import Prelude as P import Data.Array.Accelerate as A import Data.Array.Ac...
ec6d29e7194f1a674af9e14166cbf2afd4c8428a3a0868557a6cbead7521257e
kitlang/kit
CTypeDecl.hs
module Kit.Compiler.Generators.C.CTypeDecl ( cTypeDecl, cTupleDecl, enumDiscriminant ) where import Data.List import Language.C import Kit.Ast import Kit.Compiler.Generators.C.CExpr import Kit.NameMangling import Kit.Ir import Kit.Str typeNameDecl name = CTypeSpec $ u $ CTypeDef $ cIdent name makeSUFields fiel...
null
https://raw.githubusercontent.com/kitlang/kit/2769a7a8e51fe4466c50439d1a1ebdad0fb79710/src/Kit/Compiler/Generators/C/CTypeDecl.hs
haskell
Simple enums (no variant has any fields) will generate a C enum.
module Kit.Compiler.Generators.C.CTypeDecl ( cTypeDecl, cTupleDecl, enumDiscriminant ) where import Data.List import Language.C import Kit.Ast import Kit.Compiler.Generators.C.CExpr import Kit.NameMangling import Kit.Ir import Kit.Str typeNameDecl name = CTypeSpec $ u $ CTypeDef $ cIdent name makeSUFields fiel...
0aacb9e0ad4e618aaaea705c9456b38f398fbbd246f6270c8eff522fcc2d3751
tonatona-project/tonatona
TonaParser.hs
| Integrated parser library created for meta application framework . It can construct system configuration from environment variables , command line arguments , and any IO values depends on them . See details for @example / Main.hs@. It can construct system configuration from environment variables, command...
null
https://raw.githubusercontent.com/tonatona-project/tonatona/b6b67bf0f14d345c01dcf9ea7870b657891f032c/tonaparser/src/TonaParser.hs
haskell
* Run parser * Construct primitive parsers * Modify parsers Types | Main type representing how to construct system configuration. ^ Environment variables. ^ Command line arguments and values. TODO: Handle short-hands options. argShort name = Source [ArgShort name]
| Integrated parser library created for meta application framework . It can construct system configuration from environment variables , command line arguments , and any IO values depends on them . See details for @example / Main.hs@. It can construct system configuration from environment variables, command...
6bb69c8c22edeff90983296beec26480bea579d7f1a5eea08e6e7290e68810f4
tweag/ormolu
test-0-with-fixity-info-expected.hs
instance A.ToJSON UpdateTable where toJSON a = A.object $ "TableName" .= updateTableName a : "ProvisionedThroughput" .= updateProvisionedThroughput a : case updateGlobalSecondaryIndexUpdates a of [] -> [] l -> ["GlobalSecondaryIndexUpdates" .= l]
null
https://raw.githubusercontent.com/tweag/ormolu/5e66897613bfd9f503643c6e6cc21033c45c864a/fixity-tests/test-0-with-fixity-info-expected.hs
haskell
instance A.ToJSON UpdateTable where toJSON a = A.object $ "TableName" .= updateTableName a : "ProvisionedThroughput" .= updateProvisionedThroughput a : case updateGlobalSecondaryIndexUpdates a of [] -> [] l -> ["GlobalSecondaryIndexUpdates" .= l]
c55ebfa661291864f01287185855ff395a28e27de6fa3724fad942cd764aebc8
septract/jstar-old
load_logic.mli
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This file is part of jStar src / parsing / load_logic.mli Release $ Release$ Version $ Rev$ $ Copyright$ jStar is distributed under a BSD license , see ...
null
https://raw.githubusercontent.com/septract/jstar-old/c3b4fc6c1efc098efcdb864edbf0c666130f5fe5/src/parsing/load_logic.mli
ocaml
* [load_logic f] loads logic file [f] (see [Cli_utils]) and parses it. * [load_abstractions f] loads logic file [f] (see [Cli_utils]) and parses it.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This file is part of jStar src / parsing / load_logic.mli Release $ Release$ Version $ Rev$ $ Copyright$ jStar is distributed under a BSD license , see ...
2d16d440bdf14d35e93a24aa220cf7b8b5758ed776156acf00cdf910622c92ea
racket/redex
type-all-info.rkt
#lang racket/base (require racket/runtime-path racket/list racket/path) (provide all-mods) (define-runtime-path here ".") (define (all-info-files) (for/list ([f (in-directory here)] #:when (and (file-exists? f) (regexp-match #rx"^.*typed-info\\.rkt$" ...
null
https://raw.githubusercontent.com/racket/redex/4c2dc96d90cedeb08ec1850575079b952c5ad396/redex-benchmark/redex/benchmark/models/type-all-info.rkt
racket
#lang racket/base (require racket/runtime-path racket/list racket/path) (provide all-mods) (define-runtime-path here ".") (define (all-info-files) (for/list ([f (in-directory here)] #:when (and (file-exists? f) (regexp-match #rx"^.*typed-info\\.rkt$" ...
9a484d80b593f59165e3015964ff19ae9aa4f0553f57a69a6c6a7b78e07286c0
haskell-tools/haskell-tools
UnicodeSyntax.hs
# LANGUAGE UnicodeSyntax # module Expr.UnicodeSyntax where import Data.List.Unicode ((∪)) main ∷ IO () main = print $ [1, 2, 3] ∪ [1, 3, 5]
null
https://raw.githubusercontent.com/haskell-tools/haskell-tools/b1189ab4f63b29bbf1aa14af4557850064931e32/src/refactor/examples/Expr/UnicodeSyntax.hs
haskell
# LANGUAGE UnicodeSyntax # module Expr.UnicodeSyntax where import Data.List.Unicode ((∪)) main ∷ IO () main = print $ [1, 2, 3] ∪ [1, 3, 5]
f35c73091749627291023c2ce183baa9d8737dc2154dc4d2f8c72e571f2beef6
donaldsonjw/bigloo
manager_simple.scm
;*=====================================================================*/ ;* .../project/bigloo/api/phidget/examples/manager_simple.scm */ ;* ------------------------------------------------------------- */ * Author : * / * Creation : Tue Sep 21...
null
https://raw.githubusercontent.com/donaldsonjw/bigloo/a4d06e409d0004e159ce92b9908719510a18aed5/api/phidget/examples/manager_simple.scm
scheme
*=====================================================================*/ * .../project/bigloo/api/phidget/examples/manager_simple.scm */ * ------------------------------------------------------------- */ * ------------------------------------------------------------- */ * Manager simple ...
* Author : * / * Creation : Tue Sep 21 11:41:59 2010 * / * Last change : We d Sep 22 11:55:02 2010 ( serrano ) * / * Copyright : 2010 * / (module manager_simple (libr...
7f539b29211cddcf4d458dd78bcebd2954d5be4ea0c7cf2993f7e7afd258dc98
gwkkwg/cl-containers
iterator-api.lisp
(in-package #:containers) (defgeneric make-iterator (iteratee &rest args &key iterator-class &allow-other-keys) (:documentation "")) (defgeneric print-iterator (iterator stream) (:documentation "")) (defgeneric finish (iterator) (:documentation "Tell Lisp that you are done with this iterator. Further call...
null
https://raw.githubusercontent.com/gwkkwg/cl-containers/3d1df53c22403121bffb5d553cf7acb1503850e7/dev/iterator-api.lisp
lisp
(in-package #:containers) (defgeneric make-iterator (iteratee &rest args &key iterator-class &allow-other-keys) (:documentation "")) (defgeneric print-iterator (iterator stream) (:documentation "")) (defgeneric finish (iterator) (:documentation "Tell Lisp that you are done with this iterator. Further call...
92741382a91950beb45693322000cceaeca4de9688bd8c494dcaf0bba4e4b9c1
simplegeo/erlang
wxGridCellNumberRenderer.erl
%% %% %CopyrightBegin% %% Copyright Ericsson AB 2009 . All Rights Reserved . %% The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in %% compliance with the License. You should have received a copy of the %% Erlang Public Lic...
null
https://raw.githubusercontent.com/simplegeo/erlang/15eda8de27ba73d176c7eeb3a70a64167f50e2c4/lib/wx/src/gen/wxGridCellNumberRenderer.erl
erlang
%CopyrightBegin% compliance with the License. You should have received a copy of the Erlang Public License along with this software. If not, it can be retrieved online at /. basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limita...
Copyright Ericsson AB 2009 . All Rights Reserved . The contents of this file are subject to the Erlang Public License , Version 1.1 , ( the " License " ) ; you may not use this file except in Software distributed under the License is distributed on an " AS IS " < br />{@link wxGridCellRenderer } -module(wxG...
bd8b7d141ef19fd08e0e05448b6e3feb5bdfa24608ae4b0f2f3f7d68fd638987
emqx/emqx-lwm2m
emqx_lwm2m_protocol.erl
%%-------------------------------------------------------------------- Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . %% Licensed under the Apache License , Version 2.0 ( the " License " ) ; %% you may not use this file except in compliance with the License. %% You may obtain a copy of the L...
null
https://raw.githubusercontent.com/emqx/emqx-lwm2m/6b02495beebe3b3596c75f730f4e64f3e92dd3a2/src/emqx_lwm2m_protocol.erl
erlang
-------------------------------------------------------------------- you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express ...
Copyright ( c ) 2020 EMQ Technologies Co. , Ltd. All Rights Reserved . Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , -module(emqx_lwm2m_protocol). -include("emqx_lwm2m.hrl"). -include_lib("emqx/include/emqx.hrl"). -in...
b93a39cf7b5abd6353e921f0a788e91ace2f1e5c0a4368b2ebf538e61b74d5c1
lucasdicioccio/prodapi
UserAuth.hs
module Prod.Gen.Docs.UserAuth where import Prod.UserAuth import Prod.UserAuth.Base import Prod.UserAuth.JWT import Servant.Docs import Data.Proxy import Web.Internal.FormUrlEncoded import Data.Aeson import Data.Text import Servant.API instance ToForm RegistrationRequest instance ToJSON RegistrationRequest instance To...
null
https://raw.githubusercontent.com/lucasdicioccio/prodapi/4c43e1d617832f8ae88cb15afada1d5ab5e46ea4/prodapi-gen/src/Prod/Gen/Docs/UserAuth.hs
haskell
module Prod.Gen.Docs.UserAuth where import Prod.UserAuth import Prod.UserAuth.Base import Prod.UserAuth.JWT import Servant.Docs import Data.Proxy import Web.Internal.FormUrlEncoded import Data.Aeson import Data.Text import Servant.API instance ToForm RegistrationRequest instance ToJSON RegistrationRequest instance To...
5c66a7541fae3e9671d7c8ad6622fc4654e75ae086123a4860c2fdf908fb5edf
aphyr/clj-antlr
json.clj
(ns clj-antlr-demo.json "An example JSON parser." (:use clj-antlr.core) (:require [clojure.string :as s]) (:import JsonBaseVisitor JsonVisitor JsonLexer JsonParser)) (defn read-json-string "Takes a JSON string and parses it." [^String s] (-> s (subs 1 (dec (.length s)...
null
https://raw.githubusercontent.com/aphyr/clj-antlr/d82f80e4d63341d4e04c81dc01a23321e2a2fc21/demo/src/clj_antlr_demo/json.clj
clojure
(ns clj-antlr-demo.json "An example JSON parser." (:use clj-antlr.core) (:require [clojure.string :as s]) (:import JsonBaseVisitor JsonVisitor JsonLexer JsonParser)) (defn read-json-string "Takes a JSON string and parses it." [^String s] (-> s (subs 1 (dec (.length s)...
019235293500e4e9482a3ba298ca90f3a1f62695516738f7ec5564898f865a17
kana/sicp
ex-3.55-test.scm
(load "./sec-3.5.scm") (load "./ex-3.55.scm") (define sums (partial-sums integers)) (print (stream-ref sums 0)) (print (stream-ref sums 1)) (print (stream-ref sums 2)) (print (stream-ref sums 3)) (print (stream-ref sums 4)) (print (stream-ref sums 5)) (print (stream-ref sums 6))
null
https://raw.githubusercontent.com/kana/sicp/912bda4276995492ffc2ec971618316701e196f6/ex-3.55-test.scm
scheme
(load "./sec-3.5.scm") (load "./ex-3.55.scm") (define sums (partial-sums integers)) (print (stream-ref sums 0)) (print (stream-ref sums 1)) (print (stream-ref sums 2)) (print (stream-ref sums 3)) (print (stream-ref sums 4)) (print (stream-ref sums 5)) (print (stream-ref sums 6))
767251e4d6bfa90eaf32cf9a579bfc9a2d05f5e1d17dee09611238aac958a73d
wavewave/hoodle
Primitive.hs
----------------------------------------------------------------------------- -- | -- Module : Data.Hoodle.Primitive Copyright : ( c ) 2013 -- -- License : BSD3 Maintainer : < > -- Stability : experimental Portability : GHC -- -- primitive types for hoodle module Data.Hoodle.Primitive wh...
null
https://raw.githubusercontent.com/wavewave/hoodle/fa7481d14a53733b2f6ae9debc95357d904a943c/types/src/Data/Hoodle/Primitive.hs
haskell
--------------------------------------------------------------------------- | Module : Data.Hoodle.Primitive License : BSD3 Stability : experimental primitive types for hoodle
Copyright : ( c ) 2013 Maintainer : < > Portability : GHC module Data.Hoodle.Primitive where
f5d14bfb1e14ced01a13bcca366d0b7a426ed7c8aa074bf308a46e5818b19e79
project-oak/hafnium-verification
Procedures.ml
* Copyright ( c ) Facebook , Inc. and its affiliates . * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree . * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the ...
null
https://raw.githubusercontent.com/project-oak/hafnium-verification/6071eff162148e4d25a0fedaea003addac242ace/experiments/ownership-inference/infer/infer/src/backend/Procedures.ml
ocaml
repeat the [condition] check so that we do not deserialize if there's nothing to do we could also register this statement but it's typically used only once per run so just prepare it inside the function
* 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 ...
8524fd56115336eded6d97d8863dc730d4309601160423d7442e58dd2e67a9ee
smarkets/smk_erlang_sdk
smk_client.erl
-module(smk_client). -behaviour(gen_fsm). -compile([{parse_transform, lager_transform}]). -define(SERVER, ?MODULE). -define(HEARTBEAT_TIMEOUT, 10000). -define(MAX_BACKOFF, ?HEARTBEAT_TIMEOUT). -define(SOCK_OPTS, [ binary, {active, once}, {packet, 0}, {recbuf, 8192}, {send_timeout, 5000}, {send_...
null
https://raw.githubusercontent.com/smarkets/smk_erlang_sdk/f56ba38201a8d3bc6e2621a402e16f486f8acf09/src/smk_client.erl
erlang
------------------------------------------------------------------ API Function Exports ------------------------------------------------------------------ send message ------------------------------------------------------------------ gen_fsm Function Exports -----------------------------------------------------...
-module(smk_client). -behaviour(gen_fsm). -compile([{parse_transform, lager_transform}]). -define(SERVER, ?MODULE). -define(HEARTBEAT_TIMEOUT, 10000). -define(MAX_BACKOFF, ?HEARTBEAT_TIMEOUT). -define(SOCK_OPTS, [ binary, {active, once}, {packet, 0}, {recbuf, 8192}, {send_timeout, 5000}, {send_...
e69eb329fd17f06cc26de847456473d8c8073e069fd651b39a6aaaaa551d29a7
cgrand/cljs-js-repl
dynvars.cljs
(ns net.cgrand.cljs.js.repl.dynvars (:require-macros [net.cgrand.cljs.js.repl.dynvars :refer [bound-fn binding dynvar with-bindings]]) (:refer-clojure :exclude [-lookup])) (defprotocol IDynVar (-restore [_ v])) (deftype DynVar [sym f] Object (toString [_] (str "#<dynvar " sym " >")) IDeref (-deref [...
null
https://raw.githubusercontent.com/cgrand/cljs-js-repl/46d73b70b0346a6dac3daf8be25e41db6ff8882b/src/net/cgrand/cljs/js/repl/dynvars.cljs
clojure
no pop because destructive
(ns net.cgrand.cljs.js.repl.dynvars (:require-macros [net.cgrand.cljs.js.repl.dynvars :refer [bound-fn binding dynvar with-bindings]]) (:refer-clojure :exclude [-lookup])) (defprotocol IDynVar (-restore [_ v])) (deftype DynVar [sym f] Object (toString [_] (str "#<dynvar " sym " >")) IDeref (-deref [...
b4b59128af4178b60481b11b1cdcaee4e8d71d4a77f1b46040d7f3ea56e0e956
lamdu/lamdu
TextColors.hs
# LANGUAGE TemplateHaskell # -- | The themes/ config format module Lamdu.Config.Theme.TextColors where import qualified Control.Lens as Lens import qualified Data.Aeson.TH.Extended as JsonTH import qualified GUI.Momentu.Draw as Draw import qualified GUI.Momentu.Widgets.TextEdit as TextEdit import Lamdu.Prel...
null
https://raw.githubusercontent.com/lamdu/lamdu/081e178ddb6ff9fa5308caa8cc9e080e026a073d/src/Lamdu/Config/Theme/TextColors.hs
haskell
| The themes/ config format Names:
# LANGUAGE TemplateHaskell # module Lamdu.Config.Theme.TextColors where import qualified Control.Lens as Lens import qualified Data.Aeson.TH.Extended as JsonTH import qualified GUI.Momentu.Draw as Draw import qualified GUI.Momentu.Widgets.TextEdit as TextEdit import Lamdu.Prelude data TextColors = TextColo...
a4987e34e8f1addb31dfc69626dd047d22cd1e54bcaf01828a2b650c127e9872
vitorenesduarte/ldb
m_vclock.erl
%% ------------------------------------------------------------------- %% Copyright ( c ) 2018 . All Rights Reserved . %% This file is provided to you under the Apache License , %% Version 2.0 (the "License"); you may not use this file except in compliance with the License . You may obtain %% a copy of the ...
null
https://raw.githubusercontent.com/vitorenesduarte/ldb/b4cdf62ccd00577d3589fd39bde37fcb58c0eb5d/src/m_vclock.erl
erlang
------------------------------------------------------------------- Version 2.0 (the "License"); you may not use this file a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, KIND, either express or implied. See the License for the specific language governing permissio...
Copyright ( c ) 2018 . All Rights Reserved . This file is provided to you under the Apache License , except in compliance with the License . You may obtain software distributed under the License is distributed on an " AS IS " BASIS , WITHOUT WARRANTIES OR CONDITIONS OF ANY -module(m_vclock). -author("...
3f4a9a0c08905fbeb47737117efbb95f91124df745499b77e053300495b0605b
erlcloud/erlcloud
erlcloud_ddb.erl
-*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*- @author > %% @doc An Erlang interface to Amazon 's DynamoDB . %% %% [-DynamoDB/8498019230173117] %% erlcloUd_ddb implements the entire 20111205 API . erlcloud_ddb2 %% implements a newer version. %% %% Method names match DynamoDB o...
null
https://raw.githubusercontent.com/erlcloud/erlcloud/d1d60130929436b5524a0e70ae17f6da6a2a14b9/src/erlcloud_ddb.erl
erlang
@doc [-DynamoDB/8498019230173117] implements a newer version. Method names match DynamoDB operations converted to Required parameters are passed as function arguments. In addition pass optional parameters. See function documentation for examples. Table names, key names, attribute names and any other input s...
-*- mode : erlang;erlang - indent - level : 4;indent - tabs - mode : nil -*- @author > An Erlang interface to Amazon 's DynamoDB . erlcloUd_ddb implements the entire 20111205 API . erlcloud_ddb2 lower_case_with_underscores . The one exception is query , which is an Erlang reserved word . The ` q ' meth...
3af40cf26e63c43358d583d372f008554a203626f97ee25eaf353ffc08c77cef
abtv/tech-radar
database.clj
(ns tech-radar.components.database (:require [com.stuartsierra.component :as component] [taoensso.timbre :as timbre] [clj-dbcp.core :as cp] [environ.core :refer [env]] [tech-radar.database.migrations :refer [migrate]])) (defrecord Database [database] component/Lifecy...
null
https://raw.githubusercontent.com/abtv/tech-radar/167c1c66ff2cf7140fe1de247d67a7134b0b1748/src/clj/tech_radar/components/database.clj
clojure
(ns tech-radar.components.database (:require [com.stuartsierra.component :as component] [taoensso.timbre :as timbre] [clj-dbcp.core :as cp] [environ.core :refer [env]] [tech-radar.database.migrations :refer [migrate]])) (defrecord Database [database] component/Lifecy...
c59e6d67ae71d5522f0b4609a9440fd9adc2785eaa9114eebcf7ba262b75dad6
DATX02-17-26/DATX02-17-26
Convert.hs
DATX02 - 17 - 26 , automated assessment of imperative programs . - Copyright , 2017 , see AUTHORS.md . - - This program is free software ; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation ; either version 2 - ...
null
https://raw.githubusercontent.com/DATX02-17-26/DATX02-17-26/f5eeec0b2034d5b1adcc66071f8cb5cd1b089acb/libsrc/CoreS/Convert.hs
haskell
* Types * Classes * Operations ------------------------------------------------------------------------------ Conversion computation type: ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Conversion class: ...
DATX02 - 17 - 26 , automated assessment of imperative programs . - Copyright , 2017 , see AUTHORS.md . - - This program is free software ; you can redistribute it and/or - modify it under the terms of the GNU General Public License - as published by the Free Software Foundation ; either version 2 - ...
42b884d79e1876e86a5cb49fc21e21298ab05ba8574dc333cbf60702d4b09047
Clozure/ccl-tests
sort.lsp
;-*- Mode: Lisp -*- Author : Created : We d Aug 21 00:11:24 2002 ;;;; Contains: Tests for SORT (in-package :cl-test) (deftest sort-list.1 (let ((a (list 1 4 2 5 3))) (sort a #'<)) (1 2 3 4 5)) (deftest sort-list.2 (let ((a (list 1 4 2 5 3))) (sort a #'< :key #'-)) (5 4 3 2 1)) (deftes...
null
https://raw.githubusercontent.com/Clozure/ccl-tests/0478abddb34dbc16487a1975560d8d073a988060/ansi-tests/sort.lsp
lisp
-*- Mode: Lisp -*- Contains: Tests for SORT Confirm that sort only permutes the sequence, even when given a comparison function that does not define a total order. Bit vectors Order of evaluation tests Error cases
Author : Created : We d Aug 21 00:11:24 2002 (in-package :cl-test) (deftest sort-list.1 (let ((a (list 1 4 2 5 3))) (sort a #'<)) (1 2 3 4 5)) (deftest sort-list.2 (let ((a (list 1 4 2 5 3))) (sort a #'< :key #'-)) (5 4 3 2 1)) (deftest sort-list.3 (let ((a (list 1 4 2 5 3))) (sort ...
1dddc9690e1c60c9c2e3536c871d2e5fca00b9ffe7d8dbc00961de04fc1cfd61
haskell/haskell-ide-engine
MonadTypes.hs
# LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeSynonymInstances #-} -- | IdeGhcM and associated types module Haskell.Ide.Engine.MonadTypes ( -- * All the good types ...
null
https://raw.githubusercontent.com/haskell/haskell-ide-engine/d84b84322ccac81bf4963983d55cc4e6e98ad418/hie-plugin-api/Haskell/Ide/Engine/MonadTypes.hs
haskell
# LANGUAGE GADTs # # LANGUAGE RankNTypes # # LANGUAGE TypeSynonymInstances # | IdeGhcM and associated types * All the good types
# LANGUAGE FlexibleContexts # # LANGUAGE MultiParamTypeClasses # # LANGUAGE FlexibleInstances # # LANGUAGE ScopedTypeVariables # module Haskell.Ide.Engine.MonadTypes ( module Haskell.Ide.Engine.MultiThreadState , module Haskell.Ide.Engine.PluginsIdeMonads , module Haskell.Ide.Engine.GhcModuleCache , module...
b418feb80ffcc10a1b5ea5f443692bc74b12870dfa97d0751e5564bdd0ecfd0f
lamdu/lamdu
Exec.hs
module Test.Lamdu.Exec (runJS) where import qualified Data.ByteString as BS import qualified Lamdu.Paths as Paths import qualified Language.JavaScript.Inline.Core as NodeJS import System.FilePath ((</>), splitFileName) import qualified System.IO as IO import qualified System.Process as Proc import ...
null
https://raw.githubusercontent.com/lamdu/lamdu/5b15688e53ccbf7448ff11134b3e51ed082c6b6c/test/Test/Lamdu/Exec.hs
haskell
module Test.Lamdu.Exec (runJS) where import qualified Data.ByteString as BS import qualified Lamdu.Paths as Paths import qualified Language.JavaScript.Inline.Core as NodeJS import System.FilePath ((</>), splitFileName) import qualified System.IO as IO import qualified System.Process as Proc import ...
7c9c82f67f9b348728db8768526cc51f51681e7e60bca31f5536598e27a93708
backtracking/ocamlgraph
dGraphView.ml
(**************************************************************************) (* *) (* This file is part of OcamlGraph. *) (* *) Copyright...
null
https://raw.githubusercontent.com/backtracking/ocamlgraph/1c028af097339ca8bc379436f7bd9477fa3a49cd/dgraph/dGraphView.ml
ocaml
************************************************************************ This file is part of OcamlGraph. ...
Copyright ( C ) 2009 - 2010 CEA ( Commissariat à ) Lesser General Public License as published by the Free Software Foundation , version 2.1 , with a linking exception . ( ) ...
ebfcb1bf15445f3c2b34c7e652e46918533350b9cba3f2f11052f0553fbeea48
RyanGlScott/text-show-instances
Binary.hs
# LANGUAGE CPP # {-# LANGUAGE OverloadedStrings #-} # OPTIONS_GHC -Wno - orphans # #if __GLASGOW_HASKELL__ == 800 -- See Note [Increased simpl-tick-factor on old GHCs] {-# OPTIONS_GHC -fsimpl-tick-factor=200 #-} #endif | Module : TextShow . Data . Binary Copyright : ( C ) 2014 - 2017 License : BS...
null
https://raw.githubusercontent.com/RyanGlScott/text-show-instances/b08f4b46466cdc3c3f3c979b7a0abf5590fa2916/src/TextShow/Data/Binary.hs
haskell
# LANGUAGE OverloadedStrings # See Note [Increased simpl-tick-factor on old GHCs] # OPTIONS_GHC -fsimpl-tick-factor=200 # # INLINE liftShowbPrec #
# LANGUAGE CPP # # OPTIONS_GHC -Wno - orphans # #if __GLASGOW_HASKELL__ == 800 #endif | Module : TextShow . Data . Binary Copyright : ( C ) 2014 - 2017 License : BSD - style ( see the file LICENSE ) Maintainer : Stability : Provisional Portability : GHC ' TextShow ' instance for '...
ad6bbee4c537a94a461097b963bcb897928136e8cc8e4cd01ef5731b346c49a3
melange-re/melange-compiler-libs
ast_mapper.ml
(**************************************************************************) (* *) (* OCaml *) (* *) ...
null
https://raw.githubusercontent.com/melange-re/melange-compiler-libs/b6db8fa122cd21b17d23e7bc801366d91b40a03f/parsing/ast_mapper.ml
ocaml
************************************************************************ OCaml ...
, LexiFi Copyright 2012 Institut National de Recherche en Informatique et the GNU Lesser General Public License version 2.1 , with the A generic Parsetree mapping class [ @@@ocaml.warning " +9 " ] ( * Ensure that record patterns do ...
931f53304a38b231470c38985be2d595723cb5bbd2c70ba983616e75058fe533
ecraven/r7rs-benchmarks
equal.scm
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Copyright 2007 . ;; ;; Permission to copy this software, in whole or in part, to use this ;; software for any lawful purpose, and to redistribute this software ;; is granted subject to the restriction that all copies made of this ;; software must ...
null
https://raw.githubusercontent.com/ecraven/r7rs-benchmarks/b0910c4759629fcd2fb84a323a4eeef3b6ffc6bf/src/equal.scm
scheme
Permission to copy this software, in whole or in part, to use this software for any lawful purpose, and to redistribute this software is granted subject to the restriction that all copies made of this software must include this copyright notice in full. I also request that you send me a copy of any improvement...
Copyright 2007 . (import (scheme base) (scheme read) (scheme write) (scheme time)) (define (make-test-list1 n x) (if (zero? n) '() (cons x (make-test-list1 (- n 1) x)))) (define (make-test-tree1 n) (if (zero? n) '() (make-test-list1 n (make-test-tree1 (- n 1))))) (define (make-te...
ee667c2c5e81221fe60856b0d3891f2483c23a93a8dc179814f59b880ccb6d6d
jonase/eastwood
constant_lifter.clj
Copyright ( c ) , Rich Hickey & contributors . ;; The use and distribution terms for this software are covered by the ;; Eclipse Public License 1.0 (-1.0.php) ;; which can be found in the file epl-v10.html at the root of this distribution. ;; By using this software in any fashion, you are agreeing to be b...
null
https://raw.githubusercontent.com/jonase/eastwood/c5b7d9f8ad8f8b38dc7138d853cc65f6987d6058/copied-deps/eastwood/copieddeps/dep1/clojure/tools/analyzer/passes/constant_lifter.clj
clojure
The use and distribution terms for this software are covered by the Eclipse Public License 1.0 (-1.0.php) which can be found in the file epl-v10.html at the root of this distribution. By using this software in any fashion, you are agreeing to be bound by the terms of this license. You must not remove ...
Copyright ( c ) , Rich Hickey & contributors . (ns eastwood.copieddeps.dep1.clojure.tools.analyzer.passes.constant-lifter (:require [eastwood.copieddeps.dep1.clojure.tools.analyzer.utils :refer [const-val]])) (defmulti constant-lift "If the node represents a collection with no metadata, and every item of th...
644e6eec99f94ba6695a7babf3e6400578dec31d675e46417b7ec3737d3822ba
tonymorris/geo-gpx
Metadata.hs
# LANGUAGE MultiParamTypeClasses , FlexibleInstances , TypeSynonymInstances # -- | Complex Type: @metadataType@ </#type_metadataType> module Data.Geo.GPX.Type.Metadata( Metadata , metadata ) where import Data.Geo.GPX.Type.Person import Data.Geo.GPX.Type.Copyright import Data.Geo.GPX.Type.Link import Data.Geo.GPX.Ty...
null
https://raw.githubusercontent.com/tonymorris/geo-gpx/526b59ec403293c810c2ba08d2c006dc526e8bf9/src/Data/Geo/GPX/Type/Metadata.hs
haskell
| Complex Type: @metadataType@ </#type_metadataType> ^ The name. ^ The desc. ^ The author. ^ The copyright. ^ The links (link). ^ The time. ^ The keywords. ^ The bounds. ^ The extensions
# LANGUAGE MultiParamTypeClasses , FlexibleInstances , TypeSynonymInstances # module Data.Geo.GPX.Type.Metadata( Metadata , metadata ) where import Data.Geo.GPX.Type.Person import Data.Geo.GPX.Type.Copyright import Data.Geo.GPX.Type.Link import Data.Geo.GPX.Type.Bounds import Data.Geo.GPX.Type.Extensions import Dat...
63c8b7e6e43f2f8e8d1b53a9e1f8dfb891353258d0b623fe735b1bd53cb7d252
xvw/preface
alt.mli
(** Functor that generate a suite for an [Alt]. *) module Suite (R : Model.COVARIANT_1) (F : Preface_specs.ALT with type 'a t = 'a R.t) (A : Model.T0) (B : Model.T0) (C : Model.T0) : Model.SUITE
null
https://raw.githubusercontent.com/xvw/preface/84a297e1ee2967ad4341dca875da8d2dc6d7638c/lib/preface_qcheck/alt.mli
ocaml
* Functor that generate a suite for an [Alt].
module Suite (R : Model.COVARIANT_1) (F : Preface_specs.ALT with type 'a t = 'a R.t) (A : Model.T0) (B : Model.T0) (C : Model.T0) : Model.SUITE
5c6fe05e915be4ac117dede5c228bcbf6f5fe5ae0c27e7f9c2f62a4cb23fb5ff
death/dbus
introspect.lisp
;;;; +----------------------------------------------------------------+ ;;;; | DBUS | ;;;; +----------------------------------------------------------------+ (defpackage #:dbus/introspect (:use #:cl #:dbus/messages) (:import-from #:alexandria #:hash-table-v...
null
https://raw.githubusercontent.com/death/dbus/f4d1a99cfb38ded33f4fb58bb5522815f530b3c3/introspect.lisp
lisp
+----------------------------------------------------------------+ | DBUS | +----------------------------------------------------------------+ Support for introspection of D-BUS objects TODO: annotation
(defpackage #:dbus/introspect (:use #:cl #:dbus/messages) (:import-from #:alexandria #:hash-table-values) (:import-from #:xspam #:with-xspam-source #:make-xspam-source #:element #:one-or-more #:attribute #:_ #:zero-or-more #:optional-attribute #:one-of) (:import-...
ae8ba7457579a6febfe0e679fac7ae359351f536b4d98069fb6c39fa92cd19e4
poroh/ersip
ersip_quoted_string_test.erl
%%% Copyright ( c ) 2020 Dmitry Poroh %%% All rights reserved. Distributed under the terms of the MIT License . See the LICENSE file . %%% %%% SIP Quoted string test %%% -module(ersip_quoted_string_test). -include_lib("eunit/include/eunit.hrl"). %%=================================================================...
null
https://raw.githubusercontent.com/poroh/ersip/f1b0d3c5713fb063a6cc327ea493f06cff6a6e5e/test/utils/ersip_quoted_string_test.erl
erlang
All rights reserved. SIP Quoted string test =================================================================== Cases ===================================================================
Copyright ( c ) 2020 Dmitry Poroh Distributed under the terms of the MIT License . See the LICENSE file . -module(ersip_quoted_string_test). -include_lib("eunit/include/eunit.hrl"). skip_test() -> ?assertEqual({ok, <<"">>}, ersip_quoted_string:skip(<<"\"abc\"">>)), ?assertEqual({ok, <<"abc">>}, ersip...
9c07b23dd50811eb649bb93b20f5a290c1c03a54befec04fb4d93ea50539734b
originrose/think.datatype
base.cljc
(ns think.datatype.base "Datatype library primitives shared between clojurescript and clojure. Contains: - base protocols - functions that operate purely at the protocol level." (:require [clojure.core.matrix :as m]) #?(:clj (:require [think.datatype.base-macros :as base-macros] [clojure.co...
null
https://raw.githubusercontent.com/originrose/think.datatype/31372d6e18fe3a5146262693c0df5256a2a58095/src/think/datatype/base.cljc
clojure
(ns think.datatype.base "Datatype library primitives shared between clojurescript and clojure. Contains: - base protocols - functions that operate purely at the protocol level." (:require [clojure.core.matrix :as m]) #?(:clj (:require [think.datatype.base-macros :as base-macros] [clojure.co...
24f4a9a2762a062334cd0fe6070f436fdbae82bc9b7ff5d10e84292cf2a1558e
input-output-hk/cardano-sl
Coeff.hs
module Pos.Core.Common.Coeff ( Coeff (..) ) where import Universum import qualified Data.Aeson as Aeson import Data.Fixed (Fixed (..), Nano, resolution, showFixed) import Data.SafeCopy (base, deriveSafeCopySimple) import qualified Formatting.Buildable as Buildable import ...
null
https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/core/src/Pos/Core/Common/Coeff.hs
haskell
| A fractional coefficient of fixed precision.
module Pos.Core.Common.Coeff ( Coeff (..) ) where import Universum import qualified Data.Aeson as Aeson import Data.Fixed (Fixed (..), Nano, resolution, showFixed) import Data.SafeCopy (base, deriveSafeCopySimple) import qualified Formatting.Buildable as Buildable import ...
d14f5d4dc2cfd85ba891270a60420202d7a50349da90f790befed0a44bdf138c
tsloughter/kuberl
kuberl_extensions_v1beta1_deployment_spec.erl
-module(kuberl_extensions_v1beta1_deployment_spec). -export([encode/1]). -export_type([kuberl_extensions_v1beta1_deployment_spec/0]). -type kuberl_extensions_v1beta1_deployment_spec() :: #{ 'minReadySeconds' => integer(), 'paused' => boolean(), 'progressDeadlineSeconds' => integer(), 'replic...
null
https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_extensions_v1beta1_deployment_spec.erl
erlang
-module(kuberl_extensions_v1beta1_deployment_spec). -export([encode/1]). -export_type([kuberl_extensions_v1beta1_deployment_spec/0]). -type kuberl_extensions_v1beta1_deployment_spec() :: #{ 'minReadySeconds' => integer(), 'paused' => boolean(), 'progressDeadlineSeconds' => integer(), 'replic...
a2bb597f630c5de2d8a92b635c73cd2bf960b1fb7e976a45ecc1171ce5d37a8a
sile/taomp-sbcl
backoff.lisp
(defpackage backoff (:use :common-lisp :util) (:export make backoff object)) (in-package :backoff) (defstruct backoff-obj (min-delay 0 :type fixnum) (max-delay 0 :type fixnum) (limit 0 :type fixnum)) (deftype object () 'backoff-obj) (defun make (min-delay max-delay) (make-backoff-ob...
null
https://raw.githubusercontent.com/sile/taomp-sbcl/6216891346160e613fae3bb73491bc8c8fbad1c4/c7/backoff.lisp
lisp
(defpackage backoff (:use :common-lisp :util) (:export make backoff object)) (in-package :backoff) (defstruct backoff-obj (min-delay 0 :type fixnum) (max-delay 0 :type fixnum) (limit 0 :type fixnum)) (deftype object () 'backoff-obj) (defun make (min-delay max-delay) (make-backoff-ob...
9049dabde30a67376ca2b9acb3bc96cf38c969104a809440e9c11b14812a790a
janegca/htdp2e
Exercise-286-create-bst-from-list.rkt
The first three lines of this file were inserted by . They record metadata ;; about the language level of this file in a form that our tools can easily process. #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-286-create-bst-from-list) (read-case-sensitive #t) (teachpacks ()) (htdp-settings...
null
https://raw.githubusercontent.com/janegca/htdp2e/2d50378135edc2b8b1816204021f8763f8b2707b/04-Intertwined%20Data/Exercise-286-create-bst-from-list.rkt
racket
about the language level of this file in a form that our tools can easily process. Design the function create-bst-from-list. It consumes a list of numbers and names and produces a binary search tree by repeatedly applying create-bst. Here is the signature: Once you have completed the design, create a BST from th...
The first three lines of this file were inserted by . They record metadata #reader(lib "htdp-intermediate-lambda-reader.ss" "lang")((modname Exercise-286-create-bst-from-list) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f ()))) Exercise 286 . [ List - o...
9098c2f49f68178e45577894a121316dbf511eac263e22e3808a554da4f43d04
threatgrid/asami
resolver.cljc
(ns ^{:doc "Handles resolving patterns on a graph" :author "Paula Gearon"} asami.durable.resolver (:require [asami.graph :refer [broad-node-type?]] [asami.common-index :as common-index :refer [?]] [asami.durable.decoder :as decoder] [asami.durable.common :as common :refer...
null
https://raw.githubusercontent.com/threatgrid/asami/c9bc1f033a32bb55702742026ba0854057242e5d/src/asami/durable/resolver.cljc
clojure
(set! *warn-on-reflection* true) If an embedded index is pulled out, then this is referred to as edx. use an unrolled map of find-object to speed up extraction follows a predicate transitively from a node finds all transitive paths that end at a node node is a subject/object, get all objects/subjects remove the ...
(ns ^{:doc "Handles resolving patterns on a graph" :author "Paula Gearon"} asami.durable.resolver (:require [asami.graph :refer [broad-node-type?]] [asami.common-index :as common-index :refer [?]] [asami.durable.decoder :as decoder] [asami.durable.common :as common :refer...
2cf0dfa90975cb17bfe5c38b1d8db5071ad5489db537e553a0014023bed80b84
Mikolaj/enummapset
IntSetValidity.hs
Copied from # LANGUAGE CPP # module IntSetValidity (valid) where import Data.Bits (xor, (.&.)) import Data.IntSet.Internal import Test.QuickCheck (Property, counterexample, property, (.&&.)) import Utils.Containers.Internal.BitUtil (bitcount) {-------------------------------------------------------------------- ...
null
https://raw.githubusercontent.com/Mikolaj/enummapset/8aad95c2c9e3d49a9630c10f3e8e0ec134776a17/tests/IntSetValidity.hs
haskell
------------------------------------------------------------------- Assertions ------------------------------------------------------------------- Invariant: Prefix is the common high-order bits that all elements share to the left of the Mask bit. don't have the mask bit set; right is all the...
Copied from # LANGUAGE CPP # module IntSetValidity (valid) where import Data.Bits (xor, (.&.)) import Data.IntSet.Internal import Test.QuickCheck (Property, counterexample, property, (.&&.)) import Utils.Containers.Internal.BitUtil (bitcount) | Returns true iff the internal structure of the is valid . valid ::...
6a0ae5923b69bb9fd6d75560d97dcded0ba675b85d09374208e1fd625ea2875f
callum-oakley/advent-of-code
10.clj
(ns aoc.2021.10 (:require [clojure.string :as str] [clojure.test :refer [deftest is]])) (def close {\( \) \[ \] \{ \} \< \>}) (def open? (set (keys close))) (defn parse [s] (map #(reduce (fn [pending c] (cond (open? c) (conj pending (close c)) (...
null
https://raw.githubusercontent.com/callum-oakley/advent-of-code/3cf44bcb8c57693639630f95f29d4abf49a6f0e4/src/aoc/2021/10.clj
clojure
(ns aoc.2021.10 (:require [clojure.string :as str] [clojure.test :refer [deftest is]])) (def close {\( \) \[ \] \{ \} \< \>}) (def open? (set (keys close))) (defn parse [s] (map #(reduce (fn [pending c] (cond (open? c) (conj pending (close c)) (...
fef2088d463c79b470827d86ffea83bb1b5033a8f3e04185fd57e212ba834928
hcarty/ocaml-gdal
field.mli
* { 1 OGR Fields } module Defn : sig * { 1 OGR Field Definitions } (** These are bindings and wrappers around the [OGR_Fld_*] API. *) type t (** Field definition *) val t : t Ctypes.typ * Values for proper Ctypes integration / extension type field_type_t = | Integer | IntegerList | Real |...
null
https://raw.githubusercontent.com/hcarty/ocaml-gdal/9c225c1e3f8002ec7614b3c1657e5f05e4e0e821/src/field.mli
ocaml
* These are bindings and wrappers around the [OGR_Fld_*] API. * Field definition * Possible field types * [get_type t] returns the data type associated with the field definition [t].
* { 1 OGR Fields } module Defn : sig * { 1 OGR Field Definitions } type t val t : t Ctypes.typ * Values for proper Ctypes integration / extension type field_type_t = | Integer | IntegerList | Real | RealList | String | StringList | WideString | WideStringList | Binary ...
2940d9219bf43b681f1cf74c96e6878fb44032c8e1ccde38db289d5a5bb53445
jcclinton/wow-emulator
move_info.erl
This is a World of Warcraft emulator written in erlang , supporting client 1.12.x %% Copyright ( C ) 2014 < jamieclinton.com > %% %% This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Found...
null
https://raw.githubusercontent.com/jcclinton/wow-emulator/21bc67bfc9eea131c447c67f7f889ba040dcdd79/src/lib/move_info.erl
erlang
This program is free software; you can redistribute it and/or modify (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU G...
This is a World of Warcraft emulator written in erlang , supporting client 1.12.x Copyright ( C ) 2014 < jamieclinton.com > it under the terms of the GNU General Public License as published by the Free Software Foundation ; either version 2 of the License , or You should have received a copy...
0ec5f5a3a23dfa715184716139880c7270d4286fe0bd5242147c4eae092d9175
headwinds/reagent-reframe-material-ui
demo_template.cljs
(ns example.demos.demo-template (:require [reagent.core :as r] ["material-ui" :as mui] ["material-ui-icons" :as mui-icons])) (defn demo-template [{:keys [classes] :as props}] (let [component-state (r/atom {:selected 0})] (fn [] (let [current-select (get @component-state :selected)]...
null
https://raw.githubusercontent.com/headwinds/reagent-reframe-material-ui/8a6fba82a026cfedca38491becac85751be9a9d4/resources/public/js/out/example/demos/demo_template.cljs
clojure
(ns example.demos.demo-template (:require [reagent.core :as r] ["material-ui" :as mui] ["material-ui-icons" :as mui-icons])) (defn demo-template [{:keys [classes] :as props}] (let [component-state (r/atom {:selected 0})] (fn [] (let [current-select (get @component-state :selected)]...
2a7aa1e0bcd85e99e4370f327b74b1bbb6049ca301693b3b2cdb999b9bc623ce
mirage/mirage-skeleton
unikernel.ml
open Lwt.Infix module Main (KV : Mirage_kv.RO) = struct let start kv = let our_secret = "foo\n" in KV.get kv (Mirage_kv.Key.v "secret") >|= function | Error e -> Logs.warn (fun f -> f "Could not compare the secret against a known constant: %a" KV.pp_error e) | Ok sto...
null
https://raw.githubusercontent.com/mirage/mirage-skeleton/144d68992a284730c383eb3d39c409a061bc452e/device-usage/kv_ro/unikernel.ml
ocaml
open Lwt.Infix module Main (KV : Mirage_kv.RO) = struct let start kv = let our_secret = "foo\n" in KV.get kv (Mirage_kv.Key.v "secret") >|= function | Error e -> Logs.warn (fun f -> f "Could not compare the secret against a known constant: %a" KV.pp_error e) | Ok sto...
880d18e29dcc8e3f3009dc737477785f045e5d41f535326a470f8417e4dabf31
spechub/Hets
DtdToHaskell.hs
# LANGUAGE CPP # module Main where This program is provided to convert an XML file containing a DTD into a Haskell module containing data / newtype definitions which mirror the DTD . Once you have used this program to generate your type definitions , you should import Xml2Haskell wherever you intend to rea...
null
https://raw.githubusercontent.com/spechub/Hets/c0f45a8caf3ea24aa95c58819587df36c3454cfc/utils/DtdToHaskell-src/DtdToHaskell.hs
haskell
# LANGUAGE CPP # module Main where This program is provided to convert an XML file containing a DTD into a Haskell module containing data / newtype definitions which mirror the DTD . Once you have used this program to generate your type definitions , you should import Xml2Haskell wherever you intend to rea...
5ba8071b053a52488c2ca581738ecc0a6836333c965b8efbb6238a1f6642d703
McCLIM/McCLIM
package.lisp
;;; --------------------------------------------------------------------------- ;;; License: LGPL-2.1+ (See file 'Copyright' for details). ;;; --------------------------------------------------------------------------- ;;; ( c ) copyright 2018 - 2022 Jan Moringen < > ;;; ;;; --------------------------------------...
null
https://raw.githubusercontent.com/McCLIM/McCLIM/ee506540cdf22bc9580e75e91f33c7fa335f35e4/Apps/Clouseau/src/objects/package.lisp
lisp
--------------------------------------------------------------------------- License: LGPL-2.1+ (See file 'Copyright' for details). --------------------------------------------------------------------------- --------------------------------------------------------------------------- Places, inspection methods ...
( c ) copyright 2018 - 2022 Jan Moringen < > (cl:in-package #:clouseau) (defclass package-data-place-mixin (read-only-descendants-mixin) ()) (defmethod supportsp :around ((place package-data-place-mixin) (operation (eql 'setf))) (and (not (package-locked-p (container place...
5fcd3751083fd04204046401fc3cd2798130eb7d378ce5ea991ffc49eaaa92be
Tclv/HaskellBook
Morse.hs
module Morse ( Morse , charToMorse , morseToChar , stringToMorse , letterToMorse , morseToLetter ) where import qualified Data.Map as M type Morse = String letterToMorse :: (M.Map Char Morse) letterToMorse = M.fromList [ ('a', ".-") , ('b', "-...") , ('c', "-.-.") , ('d...
null
https://raw.githubusercontent.com/Tclv/HaskellBook/78eaa5c67579526b0f00f85a10be3156bc304c14/ch14/morse/src/Morse.hs
haskell
module Morse ( Morse , charToMorse , morseToChar , stringToMorse , letterToMorse , morseToLetter ) where import qualified Data.Map as M type Morse = String letterToMorse :: (M.Map Char Morse) letterToMorse = M.fromList [ ('a', ".-") , ('b', "-...") , ('c', "-.-.") , ('d...
ad403b20051fa160ee62e460c2ae421a6be3ea648c4cbd28dff9ed04a5d30ec4
DavidAlphaFox/RabbitMQ
rabbit_amqp1_0_binary_parser.erl
The contents of this file are subject to the Mozilla Public License %% Version 1.1 (the "License"); you may not use this file except in %% compliance with the License. You may obtain a copy of the License %% at / %% Software distributed under the License is distributed on an " AS IS " %% basis, WITHOUT WARRANTY OF ...
null
https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-amqp1.0/src/rabbit_amqp1_0_binary_parser.erl
erlang
Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at / basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Constants Fixe...
The contents of this file are subject to the Mozilla Public License Software distributed under the License is distributed on an " AS IS " The Original Code is RabbitMQ . The Initial Developer of the Original Code is GoPivotal , Inc. Copyright ( c ) 2007 - 2014 GoPivotal , Inc. All rights reserved . -module...
61610154d60223c8516029c4f194d06323afbbe585a5a35f21d19bcfaaf88a3c
journeyman-cc/smeagol
diff2html.clj
(ns smeagol.test.diff2html (:require [clojure.test :refer :all] [smeagol.diff2html :refer :all])) (deftest test-mung-line (testing "conversion of individual lines" (is (= (mung-line "+This is a test") "<p><ins>This is a test</ins></p>") "Insertions should be marked as such") (is ...
null
https://raw.githubusercontent.com/journeyman-cc/smeagol/a775ef7b831a2fbcf9c98380367edc16d39c4c6c/test/smeagol/test/diff2html.clj
clojure
(ns smeagol.test.diff2html (:require [clojure.test :refer :all] [smeagol.diff2html :refer :all])) (deftest test-mung-line (testing "conversion of individual lines" (is (= (mung-line "+This is a test") "<p><ins>This is a test</ins></p>") "Insertions should be marked as such") (is ...
dc8f0cf8c3473ca62c71ee1043552a3d830ce1b68393170a996d87f012392f07
gethop-dev/hop-cli
ci.clj
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this ;; file, You can obtain one at / (ns hop-cli.bootstrap.profile.registry.ci (:require [hop-cli.bootstrap.profile.registry :as registry] [hop-cli.bootstrap.util :as ...
null
https://raw.githubusercontent.com/gethop-dev/hop-cli/325f61b2eaa9c6f18b1f70e6804eeb65a3c86fbb/src/hop_cli/bootstrap/profile/registry/ci.clj
clojure
file, You can obtain one at /
This Source Code Form is subject to the terms of the Mozilla Public License , v. 2.0 . If a copy of the MPL was not distributed with this (ns hop-cli.bootstrap.profile.registry.ci (:require [hop-cli.bootstrap.profile.registry :as registry] [hop-cli.bootstrap.util :as bp.util])) (defmethod registry/p...
a7bbdc60e1e7b0b51d6f87151894adda859ed61696783943e02d32d7777589b0
aryx/fork-efuns
graphics_efuns.ml
* * Copyright ( C ) 2015 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file license.txt ....
null
https://raw.githubusercontent.com/aryx/fork-efuns/8f2f8f66879d45e26ecdca0033f9c92aec2b783d/graphics/libdraw/graphics_efuns.ml
ocaml
*************************************************************************** Helpers *************************************************************************** *************************************************************************** Draw API ***********************************************************************...
* * Copyright ( C ) 2015 * * This library is free software ; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * version 2.1 as published by the Free Software Foundation , with the * special exception on linking described in file license.txt ....
a9645bd50b90a4f11f6b07f268673f93bfa937f72df50b8ab0d3092e45cb303b
webmachine/webmachine
decision_core_test.erl
@author < > 2007 - 2014 Basho Technologies %% 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 ...
null
https://raw.githubusercontent.com/webmachine/webmachine/c1966ca56afa0eda952bcc33446d0cb4bf6e3313/test/decision_core_test.erl
erlang
you may not use this file except in compliance with the License. You may obtain a copy of the License at -2.0 Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. limitations under the License. It doe...
@author < > 2007 - 2014 Basho Technologies Licensed under the Apache License , Version 2.0 ( the " License " ) ; distributed under the License is distributed on an " AS IS " BASIS , See the License for the specific language governing permissions and -module(decision_core_test). -ifdef(TEST). -...
c769e4998735db2d16380a7be7dd414d6066898ff1c8f883c362cb1c7dfa6bb0
tommaisey/aeon
pv-copy.help.scm
;; (pv-copy bufferA bufferB) ;; Copies the spectral frame in bufferA to bufferB at that point in ;; the chain of PV UGens. This allows for parallel processing of ;; spectral data without the need for multiple fft UGens, and to copy ;; out data at that point in the chain for other purposes. bufferA and ;; bufferB must ...
null
https://raw.githubusercontent.com/tommaisey/aeon/80744a7235425c47a061ec8324d923c53ebedf15/libs/third-party/sc3/rsc3/help/ugen/fft/pv-copy.help.scm
scheme
(pv-copy bufferA bufferB) Copies the spectral frame in bufferA to bufferB at that point in the chain of PV UGens. This allows for parallel processing of spectral data without the need for multiple fft UGens, and to copy out data at that point in the chain for other purposes. bufferA and bufferB must be the same s...
(with-sc3 (lambda (fd) (async fd (b-alloc 0 2048 1)) (async fd (b-alloc 1 2048 1)))) (let* ((in (lfclip-noise ar 100)) (c0 (fft* 0 in)) (c1 (pv-copy c0 1))) (audition (out 0 (sub (ifft* c0) (ifft* c1)))))
d66bd04cf994647febefd4108537bdbe4082a5efb6a69857cc637f8b0a22ad3d
brendanhay/terrafomo
Settings.hs
-- This module is auto-generated. # LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # -- | Module : . Heroku . Settings Copyright : ( c ) 2017 - 2018 License : ...
null
https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-heroku/gen/Terrafomo/Heroku/Settings.hs
haskell
This module is auto-generated. | Stability : auto-generated * AppOrganization * SpaceInboundRulesetRule * SpaceVpnConnectionTunnels | The @organization@ nested settings definition. ^ @locked@ - (Optional) ^ @name@ - (Required) ^ @personal@ - (Optional) | Construct a new @organization@ settings value. ...
# LANGUAGE NoImplicitPrelude # # LANGUAGE RecordWildCards # # LANGUAGE StrictData # # LANGUAGE UndecidableInstances # # OPTIONS_GHC -fno - warn - unused - imports # Module : . Heroku . Settings Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . Mai...
6df7904326e58e92ac53c647c26e636dacb21baee659ba1381ea1b6ed7cc2293
quchen/prettyprinter
Terminal.hs
# DEPRECATED " Use \"Prettyprinter . Render . Terminal\ " instead . " # module Prettyprinter.Render.Terminal ) where import Prettyprinter.Render.Terminal
null
https://raw.githubusercontent.com/quchen/prettyprinter/880f41eac31edfac71d2d66d338e6cfdae4f3715/prettyprinter-ansi-terminal/src/Data/Text/Prettyprint/Doc/Render/Terminal.hs
haskell
# DEPRECATED " Use \"Prettyprinter . Render . Terminal\ " instead . " # module Prettyprinter.Render.Terminal ) where import Prettyprinter.Render.Terminal
a366efb34add4cfb4fb878bcee9f6e6f264388921b739f68e81791f92440ccae
brendanhay/terrafomo
Types.hs
-- This module was auto-generated. If it is modified, it will not be overwritten. -- | -- Module : Terrafomo.VSphere.Types Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . Maintainer : < brendan.g.hay+ > -- Stability : auto-generated Portability : non - portable ( ...
null
https://raw.githubusercontent.com/brendanhay/terrafomo/387a0e9341fb9cd5543ef8332dea126f50f1070e/provider/terrafomo-vsphere/src/Terrafomo/VSphere/Types.hs
haskell
This module was auto-generated. If it is modified, it will not be overwritten. | Module : Terrafomo.VSphere.Types Stability : auto-generated import Formatting (Format, (%))
Copyright : ( c ) 2017 - 2018 License : Mozilla Public License , v. 2.0 . Maintainer : < brendan.g.hay+ > Portability : non - portable ( GHC extensions ) module Terrafomo.VSphere.Types where import Data . Text ( Text ) import Terrafomo import Terrafomo . VSphere . Lens import qualifie...
a28d7b86d301526597e2cf745291d504f65e9306a8c14c6eaf4a3e2882b7d88d
pascal-knodel/haskell-craft
E'11'14.hs
-- -- -- ------------------ Exercise 11.14 . ------------------ -- -- -- module E'11'14 where -- uncurry :: (a -> b -> c) -> ( (a , b) -> c ) -- uncurry f (x , y) = f x y -- Because -> is right associative, the type of uncurry -- is equivalent to "(a -> b -> c) -> (a , b) -> c". -- "uncurry ($)": -----------...
null
https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/_/links/E'11'14.hs
haskell
---------------- ---------------- uncurry :: (a -> b -> c) -> ( (a , b) -> c ) uncurry f (x , y) = f x y Because -> is right associative, the type of uncurry is equivalent to "(a -> b -> c) -> (a , b) -> c". "uncurry ($)": --------------- The effect of applying "uncurry" to "($)" is that the curried form o...
Exercise 11.14 . module E'11'14 where will be converted to an uncurried form where the first two arguments
3487e03b183a749b44e5e70cfe33abf5729ba806cbc4f80ea9fdf720a9728e8f
patricoferris/ocaml-multicore-monorepo
caqti_blocking.ml
Copyright ( C ) 2018 - -2021 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/patricoferris/ocaml-multicore-monorepo/22b441e6727bc303950b3b37c8fbc024c748fe55/duniverse/ocaml-caqti/lib-blocking/caqti_blocking.ml
ocaml
Copyright ( C ) 2018 - -2021 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...
0e6922d2a2f2054d4a90702f22d576b799ab4a03ba6644ec30bfa66178b23199
okuoku/nausicaa
make-inspector.sps
;;;!mosh -*- coding : utf-8 - unix -*- ;;; Part of : / ;;;Contents: foreign library inspection generator Date : Sat Dec 26 , 2009 ;;; ;;;Abstract ;;; ;;; ;;; Copyright ( c ) 2009 , 2010 < > ;;; ;;;This program is free software: you can redistribute it and/or modify ;;;it under the terms of the GNU General Publ...
null
https://raw.githubusercontent.com/okuoku/nausicaa/50e7b4d4141ad4d81051588608677223fe9fb715/gcrypt/make-inspector.sps
scheme
!mosh Contents: foreign library inspection generator Abstract This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ...
-*- coding : utf-8 - unix -*- Part of : / Date : Sat Dec 26 , 2009 Copyright ( c ) 2009 , 2010 < > the Free Software Foundation , either version 3 of the License , or ( at General Public License for more details . You should have received a copy of the GNU General Public License (import (nausicaa) (...
cb1c70ce47c7719d1c56a0a57384ba2ddcd5640ae623f87a675a5ee16701bea6
otherjoel/beeswax
template.html.rkt
#lang beeswax/template <html> <title>[BEESWAX was here]</title> <h1>◊(hash-ref metas 'title)</h1> ◊(->html doc) </html>
null
https://raw.githubusercontent.com/otherjoel/beeswax/6fef5b6977530175a4eaed8c1e0167585f89af40/scribblings/sample-proj/template.html.rkt
racket
#lang beeswax/template <html> <title>[BEESWAX was here]</title> <h1>◊(hash-ref metas 'title)</h1> ◊(->html doc) </html>
43de93c293785d30a7221a6f91aa340c8e0c53e9be86e1128ab8e8ed8b30aa13
danielmiladinov/joy-of-clojure
symbols_and_namespaces.clj
;; Symbols and Namespaces ;; --------------------------------------------------------------------------------------------------------------------- ;; Like keywords, symbols don't belong to any specific namespace. Take, for example, the following code: (ns where-is) (def a-symbol 'where-am-i) a-symbol ;;=> where-am-i (...
null
https://raw.githubusercontent.com/danielmiladinov/joy-of-clojure/cad7d1851e153beb12a2cd536eb467be12cb7a73/src/joy-of-clojure/chapter4/symbols_and_namespaces.clj
clojure
Symbols and Namespaces --------------------------------------------------------------------------------------------------------------------- Like keywords, symbols don't belong to any specific namespace. Take, for example, the following code: => where-am-i => #"where-is/a-symbol => where-is/a-symbol The initial eva...
(ns where-is) (def a-symbol 'where-am-i) a-symbol (resolve 'a-symbol) `a-symbol
2545dc769eecfb20ba222cc0474a37d74b05a4d52ae18017ac2646a73d4df790
Bogdanp/Noise
common.rkt
#lang racket/base (provide valid-name-stx?) (define (valid-name-stx? id-stx) (define id-str (symbol->string (syntax-e id-stx))) (regexp-match? #rx"^[_a-zA-Z][_a-zA-Z0-9-]*$" id-str))
null
https://raw.githubusercontent.com/Bogdanp/Noise/9dc4b05a6e2fbb390f2bc1d47998d02fdc651827/Racket/noise-serde-lib/private/common.rkt
racket
#lang racket/base (provide valid-name-stx?) (define (valid-name-stx? id-stx) (define id-str (symbol->string (syntax-e id-stx))) (regexp-match? #rx"^[_a-zA-Z][_a-zA-Z0-9-]*$" id-str))
0b660d1eb15d1e8475960062a7b3736d8d6d336073048f20664e86b4de42fd89
FlowerWrong/mblog
sherlock_app.erl
%% --- Excerpted from " Programming Erlang , Second Edition " , published by The Pragmatic Bookshelf . %% Copyrights apply to this code. It may not be used to create training material, %% courses, books, articles, and the like. Contact us if you are in doubt. %% We make no guarantees that this code is fit for...
null
https://raw.githubusercontent.com/FlowerWrong/mblog/3233ede938d2019a7b57391405197ac19c805b27/categories/erlang/demo/jaerlang2_code/sherlock/src/sherlock_app.erl
erlang
--- Copyrights apply to this code. It may not be used to create training material, courses, books, articles, and the like. Contact us if you are in doubt. We make no guarantees that this code is fit for any purpose. Visit for more book information. --- For license read the top level LICENSE file Applicati...
Excerpted from " Programming Erlang , Second Edition " , published by The Pragmatic Bookshelf . -module(sherlock_app). Copyright ( c ) 2009 Whoomph Software AB ( ) . All rights reserved . -behaviour(application). -export([start/2, stop/1]). start(_StartType, _StartArgs) -> sherlock_sup:start_link(). ...
95a1e9353ccfb16858febf830776887f6e182ae3c5232935fc1f89c37f136d1f
ssor/erlangDemos
rest_resource_etags.erl
-module(rest_resource_etags). -export([init/3, generate_etag/2, content_types_provided/2, get_text_plain/2]). init(_Transport, _Req, _Opts) -> {upgrade, protocol, cowboy_http_rest}. generate_etag(Req, State) -> case cowboy_http_req:qs_val(<<"type">>, Req) of %% Correct return values from generate_etag/2. {<<"tu...
null
https://raw.githubusercontent.com/ssor/erlangDemos/632cd905be2c4f275f1c1ae15238e711d7bb9147/cowboy_old/test/rest_resource_etags.erl
erlang
Correct return values from generate_etag/2. Backwards compatible return values from generate_etag/2.
-module(rest_resource_etags). -export([init/3, generate_etag/2, content_types_provided/2, get_text_plain/2]). init(_Transport, _Req, _Opts) -> {upgrade, protocol, cowboy_http_rest}. generate_etag(Req, State) -> case cowboy_http_req:qs_val(<<"type">>, Req) of {<<"tuple-weak">>, Req2} -> {{weak, <<"etag-header-v...
e2a0b04001e7a2d1fcf2fc532da18f184ede30c7a2361c3d565adac36135926c
spectrum-finance/cardano-dex-backend
OrdersGen.hs
{-# LANGUAGE RankNTypes #-} # LANGUAGE RecordWildCards # {-# LANGUAGE OverloadedStrings #-} module Gen.OrdersGen where import Hedgehog ( MonadGen ) import Hedgehog.Gen ( bytes, int ) import qualified Hedgehog.Range as Range import RIO ( (<&>), MonadIO ) import qualified Data.Map as Map import PlutusTx.Builti...
null
https://raw.githubusercontent.com/spectrum-finance/cardano-dex-backend/69d3ee06b33c966c2d21281214252c1fd2e77325/amm-executor/test/Gen/OrdersGen.hs
haskell
# LANGUAGE RankNTypes # # LANGUAGE OverloadedStrings #
# LANGUAGE RecordWildCards # module Gen.OrdersGen where import Hedgehog ( MonadGen ) import Hedgehog.Gen ( bytes, int ) import qualified Hedgehog.Range as Range import RIO ( (<&>), MonadIO ) import qualified Data.Map as Map import PlutusTx.Builtins.Internal ( BuiltinByteString(..) ) import Plutus.V1.Ledger...
783627e9b7d92a0c54af0cb52e2045ded0579da285b25dcbb1081d121c06e7c6
kupl/FixML
sol.ml
type aexp = | Const of int | Var of string | Power of string * int | Times of aexp list | Sum of aexp list let rec map : (aexp * string -> aexp) -> aexp list * string -> aexp list = fun f (l, x) -> match l with | [] -> [] | hd::tl -> (f (hd, x))::(map f (tl, x)) let rec diff : aexp * string -> aexp = fun (e,...
null
https://raw.githubusercontent.com/kupl/FixML/0a032a733d68cd8ccc8b1034d2908cd43b241fce/benchmarks/differentiate/diff1/sol.ml
ocaml
type aexp = | Const of int | Var of string | Power of string * int | Times of aexp list | Sum of aexp list let rec map : (aexp * string -> aexp) -> aexp list * string -> aexp list = fun f (l, x) -> match l with | [] -> [] | hd::tl -> (f (hd, x))::(map f (tl, x)) let rec diff : aexp * string -> aexp = fun (e,...
d99ad68495f946435cd479c6782df5557fb768e1a6a0e55450175c5a5f70b59f
arttuka/reagent-material-ui
form_label.cljs
(ns reagent-mui.material.form-label "Imports @mui/material/FormLabel as a Reagent component. Original documentation is at -ui/api/form-label/ ." (:require [reagent.core :as r] ["@mui/material/FormLabel" :as MuiFormLabel])) (def form-label (r/adapt-react-class (.-default MuiFormLabel)))
null
https://raw.githubusercontent.com/arttuka/reagent-material-ui/14103a696c41c0eb67fc07fc67cd8799efd88cb9/src/core/reagent_mui/material/form_label.cljs
clojure
(ns reagent-mui.material.form-label "Imports @mui/material/FormLabel as a Reagent component. Original documentation is at -ui/api/form-label/ ." (:require [reagent.core :as r] ["@mui/material/FormLabel" :as MuiFormLabel])) (def form-label (r/adapt-react-class (.-default MuiFormLabel)))
0b06cd5b7af11e4c9e0cb22bd6f03daca083d619cb60614828b17941cf8ce439
CompSciCabal/SMRTYPRTY
greg-7.rkt
#lang racket (require "tools.rkt") (print-as-expression #f) (pretty-print-abbreviate-read-macros #f) (define-syntax example (syntax-rules () ((_ e) (begin (newline) (pretty-print 'e) (displayln "==>") (pretty-print e))))) (define (rule pattern response) (lis...
null
https://raw.githubusercontent.com/CompSciCabal/SMRTYPRTY/4a5550789c997c20fb7256b81469de1f1fce3514/paip/gregr/greg-7.rkt
racket
TODO: import rule-based-translator. X = A -> X = n A = f(X) -> f(X) = A f(X)*A = B -> f(X) = B/A A*f(X) = B -> f(X) = B/A A/f(X) = B -> f(x) = A/B
#lang racket (require "tools.rkt") (print-as-expression #f) (pretty-print-abbreviate-read-macros #f) (define-syntax example (syntax-rules () ((_ e) (begin (newline) (pretty-print 'e) (displayln "==>") (pretty-print e))))) (define (rule pattern response) (lis...
fc04eed7329f9cde253f6fd2eedaf1c18da27972dbb7f5ed844fa5641fe47032
Kalimehtar/russian-lang
lang.rkt
#lang racket/base (require racket/string racket/class 1/syn (for-syntax (except-in racket/base =) 1/run-fast)) (provide (rename-out [module-begin #%module-begin]) (except-out (all-defined-out) module-begin русифицировать-вывод old-printer #;printer) #%top-interaction #%app #%datum + - / * < ...
null
https://raw.githubusercontent.com/Kalimehtar/russian-lang/79dc3ea9ebbca565fdb358dd4af31ea75ad93644/1/lang.rkt
racket
printer) This port is ready when the original is ready: Writing procedure: Close procedure — close original port: write-out-special Write event:
#lang racket/base (require racket/string racket/class 1/syn (for-syntax (except-in racket/base =) 1/run-fast)) (provide (rename-out [module-begin #%module-begin]) #%top-interaction #%app #%datum + - / * < > <= >= => #%top (all-from-out 'syn)) (provide (for-syntax #%app #%top #%datum + - / * < > <= >=...
516799238b4efb056bc08dad91b975e80a90153a512306f9210254d77f62e05a
ijvcms/chuanqi_dev
hook_star_reward_lib.erl
%%%------------------------------------------------------------------- @author zhengsiying ( C ) 2015 , < COMPANY > %%% @doc %%% %%% @end Created : 20 . 十月 2015 下午9:59 %%%------------------------------------------------------------------- -module(hook_star_reward_lib). -include("common.hrl"). -include("record.h...
null
https://raw.githubusercontent.com/ijvcms/chuanqi_dev/7742184bded15f25be761c4f2d78834249d78097/server/trunk/server/src/business/hook/hook_star_reward_lib.erl
erlang
------------------------------------------------------------------- @doc @end ------------------------------------------------------------------- API ==================================================================== API functions ==================================================================== 初始化挂机星级奖励 ...
@author zhengsiying ( C ) 2015 , < COMPANY > Created : 20 . 十月 2015 下午9:59 -module(hook_star_reward_lib). -include("common.hrl"). -include("record.hrl"). -include("cache.hrl"). -include("config.hrl"). -include("proto.hrl"). -include("language_config.hrl"). -include("log_type_config.hrl"). -export([ init/1, g...
6acaad86ca7f83f581baf9e45fafdfa0c01068fa35a8ab3ae226603a28181816
kwanghoon/polyrpc
Simpl.hs
module Simpl (simpl) where import Location import Prim import Literal import CSType import CSExpr import CSSubst import Control.Monad import Data.HashMap.Strict as H import Data.List as L import Data.Maybe as M import Debug.Trace --------------------------------------------------------------------------- -- Simplif...
null
https://raw.githubusercontent.com/kwanghoon/polyrpc/49ba773bd3f1b22dce1ad64cda44683553d27c89/app/Simpl.hs
haskell
------------------------------------------------------------------------- Simplification: ------------------------------------------------------------------------- ------------------- Simplify CS programs ------------------- To prevent the infinite loop! trace (show (cNameUseInfo useInfo1) ++ "\n") (trace (sho...
module Simpl (simpl) where import Location import Prim import Literal import CSType import CSExpr import CSSubst import Control.Monad import Data.HashMap.Strict as H import Data.List as L import Data.Maybe as M import Debug.Trace ( 1 ) simplify bound unit values : BindM [ Binding False x ty ( ( UnitM v ...
db7b06c7b2a8c36c15a3e36194fbed2590783cff6e9003105378cb00a14dc014
mbj/stratosphere
UserProfile.hs
module Stratosphere.SageMaker.UserProfile ( module Exports, UserProfile(..), mkUserProfile ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import {-# SOURCE #-} Stratosphere.SageMaker.UserProfile.UserSettingsProperty as Exports import...
null
https://raw.githubusercontent.com/mbj/stratosphere/c70f301715425247efcda29af4f3fcf7ec04aa2f/services/sagemaker/gen/Stratosphere/SageMaker/UserProfile.hs
haskell
# SOURCE #
module Stratosphere.SageMaker.UserProfile ( module Exports, UserProfile(..), mkUserProfile ) where import qualified Data.Aeson as JSON import qualified Stratosphere.Prelude as Prelude import Stratosphere.Property import Stratosphere.ResourceProperties import Stratosphere.Tag import Stratosphere.Value data U...
0db7fe4a109991374afd8b09f67558dfab5188fb0d461723261c6991bfb9f179
futurice/haskell-mega-repo
Ctx.hs
# LANGUAGE DataKinds # module Futurice.App.HoursApi.Ctx where import Control.Concurrent.STM (TVar) import Futurice.Cache (Cache) import Futurice.Integrations import Futurice.Prelude import Prelude () import qualified FUM.Types.Login as FUM import qualified Personio as P import qualified PlanMill ...
null
https://raw.githubusercontent.com/futurice/haskell-mega-repo/2647723f12f5435e2edc373f6738386a9668f603/hours-api/src/Futurice/App/HoursApi/Ctx.hs
haskell
# LANGUAGE DataKinds # module Futurice.App.HoursApi.Ctx where import Control.Concurrent.STM (TVar) import Futurice.Cache (Cache) import Futurice.Integrations import Futurice.Prelude import Prelude () import qualified FUM.Types.Login as FUM import qualified Personio as P import qualified PlanMill ...
03ece143adf5e182d65770b1355dbe03f9de31a678449350aab996f59a2f8b9e
mirage/ptt
common.ml
open Colombe.Sigs open Sigs open Rresult let ( <.> ) f g x = f (g x) let src = Logs.Src.create "ptt.common" module Log = (val Logs.src_log src) module Make (Scheduler : SCHEDULER) (IO : IO with type 'a t = 'a Scheduler.s) (Flow : FLOW with type 'a io = 'a IO.t) (Resolver : RESOLVER with type 'a io = ...
null
https://raw.githubusercontent.com/mirage/ptt/c4851958be6a3a98c5c267ae963e10cb41eb72e4/lib/common.ml
ocaml
open Colombe.Sigs open Sigs open Rresult let ( <.> ) f g x = f (g x) let src = Logs.Src.create "ptt.common" module Log = (val Logs.src_log src) module Make (Scheduler : SCHEDULER) (IO : IO with type 'a t = 'a Scheduler.s) (Flow : FLOW with type 'a io = 'a IO.t) (Resolver : RESOLVER with type 'a io = ...
cb8aae71e3fbd6fb8f95ae7fb6f049625924897312e1bc9b1bfc081bc0ed0211
csabahruska/jhc-grin
Main.hs
# LANGUAGE ViewPatterns # module Grin.Main(compileToGrin,compileGrinToC) where import Control.Monad import Data.List import Data.Monoid(mappend) import System.Directory import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as LBS import qualified Data.ByteString.Lazy.UTF8 as LBS import qualified...
null
https://raw.githubusercontent.com/csabahruska/jhc-grin/30210f659167e357c1ccc52284cf719cfa90d306/src/Grin/Main.hs
haskell
^ file path to compiler ^ compiler arguments x <- return $ normalizeGrin x x <- return $ twiddleGrin x ("rts/slub.c",slub_c),
# LANGUAGE ViewPatterns # module Grin.Main(compileToGrin,compileGrinToC) where import Control.Monad import Data.List import Data.Monoid(mappend) import System.Directory import qualified Data.ByteString as BS import qualified Data.ByteString.Lazy as LBS import qualified Data.ByteString.Lazy.UTF8 as LBS import qualified...
91c1300d2816cbce6f7ce08390d5f3da07854a99f1f6454ceda3f3a9fe1c0390
lijunsong/fl-compiler
test_compile.ml
open OUnit2 open Parse open Batteries (** this test only tests the compilation process. Execution testing is in other tests. *) let compile (content : string) : unit = let ast = Parse.parse_string content in let frags = Semant.trans_prog ast in let procs, str_frags = List.partition (fun frag -> match...
null
https://raw.githubusercontent.com/lijunsong/fl-compiler/6d2938855012a7a0a8767dc342f6abb454c43eec/tests/test_compile.ml
ocaml
* this test only tests the compilation process. Execution testing is in other tests. generate body let it fail if it fails get the body section * run in project root
open OUnit2 open Parse open Batteries let compile (content : string) : unit = let ast = Parse.parse_string content in let frags = Semant.trans_prog ast in let procs, str_frags = List.partition (fun frag -> match frag with | Arch.PROC (_) -> true | _ -> false) frags in let () = List.ite...
900e52bd086a5b1b1ffefeddaec0024398228062e517bb50469615fc8c930131
objectionary/try-phi
PrettyPrintTerm.hs
{-# LANGUAGE TypeSynonymInstances #-} # LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # {-# LANGUAGE OverloadedStrings #-} # LANGUAGE BlockArguments # # LANGUAGE NamedFieldPuns # module PrettyPrintTerm (pprintTermProgram) where import Numeric (showHex) import ToTerm( Term(..), DataValue(..), DByte(..)...
null
https://raw.githubusercontent.com/objectionary/try-phi/4adae4bf7b9c9604d61a00cd9e5ef228a9b188db/back/language-utils/eo-utils/src/PrettyPrintTerm.hs
haskell
# LANGUAGE TypeSynonymInstances # # LANGUAGE OverloadedStrings # | print with given indentation level | print inline TO-DO print datavalue indented TO-DO print dot before methodname TO-DO improve performance a. b. | takes indentation level, term, name of this term and produces a string -- TO-DO don't parenthesi...
# LANGUAGE FlexibleInstances # # LANGUAGE RecordWildCards # # LANGUAGE BlockArguments # # LANGUAGE NamedFieldPuns # module PrettyPrintTerm (pprintTermProgram) where import Numeric (showHex) import ToTerm( Term(..), DataValue(..), DByte(..), DRegexBody(..), DRegexSuffix(..), DLineBytes(..), HasName (..),...
19645a7d685965bbb51a1f98dee2495c15713f3d1faf5d6d3407702355e2d5bc
bmeurer/ocaml-arm
gc.mli
(***********************************************************************) (* *) (* OCaml *) (* *) , projet...
null
https://raw.githubusercontent.com/bmeurer/ocaml-arm/43f7689c76a349febe3d06ae7a4fc1d52984fd8b/stdlib/gc.mli
ocaml
********************************************************************* OCaml ...
, projet Para , INRIA Rocquencourt Copyright 1996 Institut National de Recherche en Informatique et en Automatique . All rights reserved . This file is distributed under the terms of the GNU Library General Public License , with $ Id$ type stat = { minor_words : f...
73f58b7326555e80bcf1793c10328a2f9d85065519a3e13961f4a193fa7a302a
videolang/interactive-syntax
editor.rkt
#lang racket/base (require "lang.rkt" racket/list racket/stxparam racket/class racket/splicing syntax/location racket/serialize racket/dict syntax/parse syntax/parse/define racket/runtime-path racket/match racke...
null
https://raw.githubusercontent.com/videolang/interactive-syntax/8c13d83ac0f5dbd624d59083b32f765952d1d440/editor/private/editor.rkt
racket
Keys for hidden methods. Only functions in this module should access these methods directly. Placed in a sub module because the define-interactive-syntax template uses these bindings in a begin-for-syntax block and the deserializer-submod block. Runtime test for persistence. In case the syntax check did not...
#lang racket/base (require "lang.rkt" racket/list racket/stxparam racket/class racket/splicing syntax/location racket/serialize racket/dict syntax/parse syntax/parse/define racket/runtime-path racket/match racke...
60822b40d51972bf13ef2abaf2e066ae7f8586e430eb3c358eb6905ffaa419d6
input-output-hk/io-sim
TVar.hs
# LANGUAGE ExplicitNamespaces # | This module corresponds to ` Control . Concurrent . STM.TVar ` in " stm " package -- module Control.Concurrent.Class.MonadSTM.TVar ( -- * MonadSTM type TVar , newTVar , newTVarIO , readTVar , readTVarIO , writeTVar , modifyTVar , modifyTVar' , stateTVar , swa...
null
https://raw.githubusercontent.com/input-output-hk/io-sim/b9824e8cab3429f0831e01dfc8f0fdecef1a2325/io-classes/src/Control/Concurrent/Class/MonadSTM/TVar.hs
haskell
* MonadSTM * MonadLabelSTM
# LANGUAGE ExplicitNamespaces # | This module corresponds to ` Control . Concurrent . STM.TVar ` in " stm " package module Control.Concurrent.Class.MonadSTM.TVar type TVar , newTVar , newTVarIO , readTVar , readTVarIO , writeTVar , modifyTVar , modifyTVar' , stateTVar , swapTVar , check , l...
b774d55122e339cc2d10eb8bd33fd87e57db037f689e186fa6f673f48dc99282
dmitryvk/cl-gtk2
gobject.foreign-gobject-subclassing.lisp
(in-package :gobject) (defvar *registered-types* (make-hash-table :test 'equal)) (defstruct object-type name class parent interfaces properties) (defun instance-init (instance class) (log-for :subclass "(instance-init ~A ~A)~%" instance class) (log-for :subclass "Initializing instance ~A for type ~A (creating ~A...
null
https://raw.githubusercontent.com/dmitryvk/cl-gtk2/a3108fbc701dbab93b899e04b9637ded2f813410/glib/gobject.foreign-gobject-subclassing.lisp
lisp
(in-package :gobject) (defvar *registered-types* (make-hash-table :test 'equal)) (defstruct object-type name class parent interfaces properties) (defun instance-init (instance class) (log-for :subclass "(instance-init ~A ~A)~%" instance class) (log-for :subclass "Initializing instance ~A for type ~A (creating ~A...
f21bfe60801e7cf0d1c6d2bedcd7589bb0d128debb368ccfc2230715b83babbf
cyverse-archive/DiscoveryEnvironmentBackend
iplant_groups.clj
(ns metadactyl.clients.iplant-groups (:require [cemerick.url :as curl] [clj-http.client :as http] [metadactyl.util.config :as config])) (defn- lookup-subject-url [short-username] (str (curl/url (config/ipg-base) "subjects" short-username))) (defn lookup-subject "Uses iplant-groups's su...
null
https://raw.githubusercontent.com/cyverse-archive/DiscoveryEnvironmentBackend/7f6177078c1a1cb6d11e62f12cfe2e22d669635b/services/metadactyl-clj/src/metadactyl/clients/iplant_groups.clj
clojure
(ns metadactyl.clients.iplant-groups (:require [cemerick.url :as curl] [clj-http.client :as http] [metadactyl.util.config :as config])) (defn- lookup-subject-url [short-username] (str (curl/url (config/ipg-base) "subjects" short-username))) (defn lookup-subject "Uses iplant-groups's su...
d53d708a2b792bfefc5a95df73a2ec570e75dbfc43d9bf3e371c2b9e1b2b684c
dharrigan/startrek
routes.clj
(ns startrek.ui.lcars.starships.routes {:author "David Harrigan"} (:require [startrek.ui.lcars.starships.handler :as handler] [startrek.ui.lcars.starships.spec :as spec])) (set! *warn-on-reflection* true) (defn private-routes [] [["/starships" ["" {:get {:handler handler/starships-dashboard}}] [...
null
https://raw.githubusercontent.com/dharrigan/startrek/a91caa3f504ffea502b79cfd29d0499574aaced6/src/startrek/ui/lcars/starships/routes.clj
clojure
(ns startrek.ui.lcars.starships.routes {:author "David Harrigan"} (:require [startrek.ui.lcars.starships.handler :as handler] [startrek.ui.lcars.starships.spec :as spec])) (set! *warn-on-reflection* true) (defn private-routes [] [["/starships" ["" {:get {:handler handler/starships-dashboard}}] [...
b58e5d2f3e080c63ba04c6f18901161ab18882fc412e8b0d814c6ea4b440d114
byorgey/AoC
08.hs
main = do f <- getContents This does n't work because e.g. " \xc6d " in Haskell is 1 Unicode character , but in the problem it 's supposed to be 2 chars , \xc6 + d. =( print . sum . map ( \l - > length l - length ( read l : : String ) ) $ lines f print . sum . map (\l -> length l - length (decode l)) ...
null
https://raw.githubusercontent.com/byorgey/AoC/30eb51eb41af9ca86b05de598a3a96d25bd428e3/2015/08/08.hs
haskell
This does work though =)
main = do f <- getContents This does n't work because e.g. " \xc6d " in Haskell is 1 Unicode character , but in the problem it 's supposed to be 2 chars , \xc6 + d. =( print . sum . map ( \l - > length l - length ( read l : : String ) ) $ lines f print . sum . map (\l -> length l - length (decode l)) ...
2ea14be2823e64e959158679ab0c88505e8c0b9a59d29cf0284ea2ff0150cac0
JeffreyBenjaminBrown/hode
RsltViewTree.hs
-- | This code could be a lot shorter if I understood and/or used: ( 1 ) prisms ? traversals ? ) something to let me lens into a Vector -- to modify it, where the return type is `Either String (Vector a)` -- rather than `Vector a`. ( 2 ) Zippers instead of Vectors . ( This would obviate the first task . ) -- (2a) M...
null
https://raw.githubusercontent.com/JeffreyBenjaminBrown/hode/79a54a6796fa01570cde6903b398675c42954e62/earlier-work/VTree/UI/RsltViewTree.hs
haskell
| This code could be a lot shorter if I understood and/or used: to modify it, where the return type is `Either String (Vector a)` rather than `Vector a`. (2a) Mutable Vectors instead of immutable ones. # LANGUAGE RankNTypes # Direction -> St -> Either String St St -> Either String St St -> Either String St St -...
( 1 ) prisms ? traversals ? ) something to let me lens into a Vector ( 2 ) Zippers instead of Vectors . ( This would obviate the first task . ) # LANGUAGE ScopedTypeVariables # module UI.VTree.ViewExprNodeTree ( St - > Either String ( MembersGroup , [ ] ) St - > Either String [ ( ViewCenterRole , [ ] ) ] ...
72a7110c50277ffaad117e040e4604b1351c887b5de3ca8dd8efe3fcae4d24ae
passy/coding-puzzles
day04.hs
module Main where import System.Environment (getArgs) import Data.List (isPrefixOf) import Data.ByteString.Base16 (encode) import qualified Crypto.Hash.MD5 as MD5 import qualified Data.ByteString.Char8 as BS isCoin :: Int -> String -> Bool isCoin = isPrefixOf . flip replicate '0' solve :: Int -> String -> (Int, Str...
null
https://raw.githubusercontent.com/passy/coding-puzzles/686bd0775ee5a98004229d44c913376d033b13de/advent-of-code/day04.hs
haskell
module Main where import System.Environment (getArgs) import Data.List (isPrefixOf) import Data.ByteString.Base16 (encode) import qualified Crypto.Hash.MD5 as MD5 import qualified Data.ByteString.Char8 as BS isCoin :: Int -> String -> Bool isCoin = isPrefixOf . flip replicate '0' solve :: Int -> String -> (Int, Str...
7cdb7295de12bb69bdf7b9f1889e7c260ba00cbd458095faa9fbae33da0ab870
commsor/titanoboa-tasklets
s3.clj
(ns io.titanoboa.tasklet.aws.s3 (:require [amazonica.aws.s3 :as s3] [amazonica.aws.s3transfer :as s3transfer])) (defn read [{:keys [credentials bucket key]}] {:s3-object (-> (s3/get-object credentials bucket key) :input-stream slurp)}) (defn download [...
null
https://raw.githubusercontent.com/commsor/titanoboa-tasklets/9e1efdf373243624b5def938900e0d250a5a8580/aws-s3/src/clj/io/titanoboa/tasklet/aws/s3.clj
clojure
(ns io.titanoboa.tasklet.aws.s3 (:require [amazonica.aws.s3 :as s3] [amazonica.aws.s3transfer :as s3transfer])) (defn read [{:keys [credentials bucket key]}] {:s3-object (-> (s3/get-object credentials bucket key) :input-stream slurp)}) (defn download [...
1931628117f9c75c3d14150c25a0ff753590f1e15958e4ba8e8532824450de05
ghcjs/ghcjs-dom
ApplePayPaymentAuthorizedEvent.hs
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # -- For HasCallStack compatibility {-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-} module GHCJS.DOM.JSFFI.Generated.ApplePayPaymentAuthorizedEvent (js_getPayment, getPayment, ApplePayPaymentAuthorizedEve...
null
https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/ApplePayPaymentAuthorizedEvent.hs
haskell
For HasCallStack compatibility # LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | <-US/docs/Web/API/ApplePayPaymentAuthorizedEvent.payment Mozilla ApplePayPaymentAuthorizedEvent.payment documentation>
# LANGUAGE PatternSynonyms # # LANGUAGE ForeignFunctionInterface # # LANGUAGE JavaScriptFFI # module GHCJS.DOM.JSFFI.Generated.ApplePayPaymentAuthorizedEvent (js_getPayment, getPayment, ApplePayPaymentAuthorizedEvent(..), gTypeApplePayPaymentAuthorizedEvent) where import Prelude ((.), (==), (>>=),...
25daf44023ef93f0a8fa284b24c7182fe98b03ffe6565e53895c31768f8fa80b
pbrisbin/devsite
Posts.hs
module Handler.Posts ( getPostR , postPostR , getManagePostsR , postManagePostsR , getNewPostR , postNewPostR , getEditPostR , postEditPostR , getDelPostR ) where import Import import Prelude (init, last) import Helpers.Post import Yesod.Comments (addComments) import Yesod.Link...
null
https://raw.githubusercontent.com/pbrisbin/devsite/d12682cf9add9ac1f91abd51cb576f12ca7ca424/Handler/Posts.hs
haskell
look for pandoc files with no associated post and present them for easy creation we can pass a slug via GET param to prepopulate the form when we've got something on the filesystem to start from
module Handler.Posts ( getPostR , postPostR , getManagePostsR , postManagePostsR , getNewPostR , postNewPostR , getEditPostR , postEditPostR , getDelPostR ) where import Import import Prelude (init, last) import Helpers.Post import Yesod.Comments (addComments) import Yesod.Link...
909f2a1518402e662ebc49cd2a485cd2db99dc3beebd8eb2c7644c33d7835e4d
maryrosecook/islaclj
user.clj
(ns isla.user) (deftype IslaList [vector] clojure.lang.IPersistentCollection (cons [this item] (if (and (map? item) (:ref item) (some #{item} vector)) this (IslaList. (conj vector item)))) (seq [_] (seq vector)) (empty [_] (IslaList. [])) (equiv [this o] ...
null
https://raw.githubusercontent.com/maryrosecook/islaclj/4394ddcbd05d3d2da91c89f28e57c764bfef8d88/src/isla/user.clj
clojure
(ns isla.user) (deftype IslaList [vector] clojure.lang.IPersistentCollection (cons [this item] (if (and (map? item) (:ref item) (some #{item} vector)) this (IslaList. (conj vector item)))) (seq [_] (seq vector)) (empty [_] (IslaList. [])) (equiv [this o] ...
7c6c3cfaa0e3d876048b0c487485fc0597844ef8324c5db6ebdcb587454c9f04
heraldry/heraldicon
potenty.cljs
(ns heraldicon.heraldry.line.type.potenty (:require [heraldicon.options :as options])) (def pattern {:display-name :string.line.type/potenty :function (fn [{:keys [height eccentricity width]} _line-options] (let [l (-> width...
null
https://raw.githubusercontent.com/heraldry/heraldicon/7bf4dd4149e1f69c9e4f9a0b6b826f73f532a01d/src/heraldicon/heraldry/line/type/potenty.cljs
clojure
(ns heraldicon.heraldry.line.type.potenty (:require [heraldicon.options :as options])) (def pattern {:display-name :string.line.type/potenty :function (fn [{:keys [height eccentricity width]} _line-options] (let [l (-> width...
ebbe8620d2d113a0f7d563f3485aad661f52b050c583f41130f5d52178bd2f38
lambdaisland/nrepl
nrepl.clj
(ns lambdaisland.nrepl (:require [clojure.tools.nrepl.server :as nrepl] [clojure.tools.nrepl.middleware :as nrepl-mw] [clojure.tools.nrepl.middleware.session :as nrepl-mw-session])) (def ^:dynamic *default-opts* {:bind "127.0.0.1" :port 7888 :init-ns 'user}) (defn- wrap-init-vars "...
null
https://raw.githubusercontent.com/lambdaisland/nrepl/f358977d05ed49ca1cda38f81ac96e746848cce2/src/lambdaisland/nrepl.clj
clojure
-clj/boot/blob/master/boot/pod/src/boot/repl_server.clj
(ns lambdaisland.nrepl (:require [clojure.tools.nrepl.server :as nrepl] [clojure.tools.nrepl.middleware :as nrepl-mw] [clojure.tools.nrepl.middleware.session :as nrepl-mw-session])) (def ^:dynamic *default-opts* {:bind "127.0.0.1" :port 7888 :init-ns 'user}) (defn- wrap-init-vars "...
c8433a1071254d54fb9bc47a05808e5cc98ed86af2bd0c9717de948623eab183
clojurewerkz/eep
visualization.clj
This source code is dual - licensed under the Apache License , version 2.0 , and the Eclipse Public License , version 1.0 . ;; ;; The APL v2.0: ;; ;; ---------------------------------------------------------------------------------- Copyright ( c ) 2014 - 2014 , , and the ClojureWerkz Team ;; Licensed unde...
null
https://raw.githubusercontent.com/clojurewerkz/eep/b1f76fc4ff53f7e18baef26a7bf877757237adbd/src/clojurewerkz/eep/visualization.clj
clojure
The APL v2.0: ---------------------------------------------------------------------------------- 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 CONDIT...
This source code is dual - licensed under the Apache License , version 2.0 , and the Eclipse Public License , version 1.0 . Copyright ( c ) 2014 - 2014 , , and the ClojureWerkz Team distributed under the License is distributed on an " AS IS " BASIS , The EPL v1.0 : Copyright ( c ) 2014 - 2014 , , ...
b2c112536076143212647d9102cbb2044d58b0c08993b17dfa6ebddb02d5d008
Zulu-Inuoe/clution
arrows.lisp
(in-package :cl-arrows) (defun simple-inserter (insert-fun) (lambda (acc next) (if (listp next) (funcall insert-fun acc next) (list next acc)))) (defmacro -> (initial-form &rest forms) "Inserts INITIAL-FORM as first argument into the first of FORMS, the result into the next, etc., before evalu...
null
https://raw.githubusercontent.com/Zulu-Inuoe/clution/b72f7afe5f770ff68a066184a389c23551863f7f/cl-clution/qlfile-libs/cl-arrows-20160318-git/arrows.lisp
lisp
(in-package :cl-arrows) (defun simple-inserter (insert-fun) (lambda (acc next) (if (listp next) (funcall insert-fun acc next) (list next acc)))) (defmacro -> (initial-form &rest forms) "Inserts INITIAL-FORM as first argument into the first of FORMS, the result into the next, etc., before evalu...
150d0ff8392d71faa55d162020796c64082161639cd16bf02852bbb0713bce9e
uroboros/haskell_design_patterns
2_existentials.hs
# LANGUAGE ExistentialQuantification # -- ------------------------------------------------------ -- Universally Qualified data type data ObjU a = ObjU a -- property (a -> Bool) -- obj method (a -> String) -- obj method obj_f1 :: ObjU a -> Bool obj_f1 (ObjU v f1 _) = f1 v obj...
null
https://raw.githubusercontent.com/uroboros/haskell_design_patterns/9786e4f21555e1850ef8ccb8176e838f731a9f38/chapter5/2_existentials.hs
haskell
------------------------------------------------------ Universally Qualified data type property obj method obj method False ------------------------------------------------------ data ObjU a = ObjU a (a -> Bool) (a -> String) ObjE hides the type a (because it is absent on the left-hand-side of "data ...
# LANGUAGE ExistentialQuantification # data ObjU a obj_f1 :: ObjU a -> Bool obj_f1 (ObjU v f1 _) = f1 v obj_f2 :: ObjU a -> String obj_f2 (ObjU v _ f2) = f2 v main1 = do apply ' even ' to 3 apply ' show ' to 3 " 3 " where obj = (ObjU 3 even show) Qualified data type : data ObjE = forall a....
ad8925f4202c6965eccc33c7ed0c5fd3d4d9bb42cb5fead19846563451508af7
huangz1990/real-world-haskell-cn
niceSum.hs
-- file: ch04/niceSum.hs niceSum :: [Integer] -> Integer niceSum xs = foldl (+) 0 xs
null
https://raw.githubusercontent.com/huangz1990/real-world-haskell-cn/f67b07dd846b1950d17ff941d650089fcbbe9586/code/ch04/niceSum.hs
haskell
file: ch04/niceSum.hs
niceSum :: [Integer] -> Integer niceSum xs = foldl (+) 0 xs