_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 |
|---|---|---|---|---|---|---|---|---|
b01c395737e232a7500272dabf58fe899ac0cbc890fd9c075d07248943c62ff0 | jmbr/cl-buchberger | polynomial.lisp | (in-package :com.superadditive.cl-buchberger)
Copyright ( C ) 2007 < >
;;
;; 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 3 of the License , or
;; (at your option) any l... | null | https://raw.githubusercontent.com/jmbr/cl-buchberger/4503216b4f2e3372daf4c9cca7b2e978cbc8256b/polynomial.lisp | lisp |
This program is free software: you can redistribute it and/or modify
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public... | (in-package :com.superadditive.cl-buchberger)
Copyright ( C ) 2007 < >
it under the terms of the GNU General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU General Public License
(defclass polynomial (ring-elem... |
7334913d9fbd961844d9d6c64c1e472af83239f2f820c287e6ba24157ef96650 | lpgauth/foil | foil_server.erl | -module(foil_server).
-include("foil.hrl").
-export([
start_link/0
]).
-behaviour(metal).
-export([
init/3,
handle_msg/2,
terminate/2
]).
%% public
-spec start_link() ->
{ok, pid()}.
start_link() ->
metal:start_link(?SERVER, ?SERVER, undefined).
%% metal callbacks
-spec init(atom(), pid(), ... | null | https://raw.githubusercontent.com/lpgauth/foil/e462829855a745d8f20fb0508ae3eb8e323b03bd/src/foil_server.erl | erlang | public
metal callbacks | -module(foil_server).
-include("foil.hrl").
-export([
start_link/0
]).
-behaviour(metal).
-export([
init/3,
handle_msg/2,
terminate/2
]).
-spec start_link() ->
{ok, pid()}.
start_link() ->
metal:start_link(?SERVER, ?SERVER, undefined).
-spec init(atom(), pid(), term()) ->
{ok, term()}.
... |
39d78798d52f4761f6f33396b508546dfc82e9011b882f5f7152080957875ad7 | flavioc/cl-hurd | file-chown.lisp |
(in-package :translator-test)
(def-test-method file-chown-test ((test fs-test))
(with-testport (p (file-name-lookup +translator-root+))
(let ((stat (io-stat p)))
(assert-equal 0 (stat-get stat 'st-uid))
(assert-equal 0 (stat-get stat 'st-gid))
(assert-true (file-chown p 101 102))
(setf s... | null | https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/tests/file-chown.lisp | lisp |
(in-package :translator-test)
(def-test-method file-chown-test ((test fs-test))
(with-testport (p (file-name-lookup +translator-root+))
(let ((stat (io-stat p)))
(assert-equal 0 (stat-get stat 'st-uid))
(assert-equal 0 (stat-get stat 'st-gid))
(assert-true (file-chown p 101 102))
(setf s... | |
94e7762b4ba0b2dd10760fab078f368e218f318d3f4a056a1424cd415a9805f8 | spurious/sagittarius-scheme-mirror | treemap.scm | -*- mode : scheme ; coding : utf-8 -*-
;;;
;;; treemap.scm - treemap utilities
;;;
Copyright ( c ) 2010 - 2014 < >
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; 1. Redist... | null | https://raw.githubusercontent.com/spurious/sagittarius-scheme-mirror/53f104188934109227c01b1e9a9af5312f9ce997/sitelib/util/treemap.scm | scheme | coding : utf-8 -*-
treemap.scm - treemap utilities
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditi... | Copyright ( c ) 2010 - 2014 < >
" AS IS " AND ANY EXPRESS OR IMPLIED WARRANTIES , INCLUDING , BUT NOT
SPECIAL , EXEMPLARY , OR CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIMITED
LIABILITY , WHETHER IN CONTRACT , STRICT LIABILITY , OR TORT ( INCLUDING
(library (util treemap)
(export make-rb-... |
5e4c64658c228484fc50f8c8f5439a322b079fa2cadffd95839898242ab04393 | protz/mezzo | GADT4.ml | module Stage1 (X : sig
type ('a, 'kind) tag
type 'kind univ =
Univ : ('a, 'kind) tag * 'a -> 'kind univ
end) = struct
open X
type 'a methods = {
map: 'a -> 'a
}
type 'a ty =
| TyUniv : 'kind univ ty
| TyUnit : unit ty
| TyPair : 'a ty * 'b ty -> ('a * 'b) ty
| TyOpaque : 'a metho... | null | https://raw.githubusercontent.com/protz/mezzo/4e9d917558bd96067437116341b7a6ea02ab9c39/alphaLib/GADT4.ml | ocaml | a kind | module Stage1 (X : sig
type ('a, 'kind) tag
type 'kind univ =
Univ : ('a, 'kind) tag * 'a -> 'kind univ
end) = struct
open X
type 'a methods = {
map: 'a -> 'a
}
type 'a ty =
| TyUniv : 'kind univ ty
| TyUnit : unit ty
| TyPair : 'a ty * 'b ty -> ('a * 'b) ty
| TyOpaque : 'a metho... |
17359d811b5740a7a0cc4c1c3d3c6ba4812b9d0bba24620656669fdaf30ea290 | fractalide/fractalide | loader.rkt | #lang racket
(require fractalide/modules/rkt/rkt-fbp/agent
fractalide/modules/rkt/rkt-fbp/def
fractalide/modules/rkt/rkt-fbp/graph)
(require (prefix-in g: graph)
json)
(define-agent
#:input '("in") ; in port
#:output '("out" "acc") ; out port
(define msg (recv (input "in")))
Conve... | null | https://raw.githubusercontent.com/fractalide/fractalide/9c54ec2615fcc2a1f3363292d4eed2a0fcb9c3a5/modules/rkt/rkt-fbp/agents/hyperflow/graph/loader.rkt | racket | in port
out port
TODO: possibility to have several mesg towards the same ports
Retrieve the position
Send the new graph
True, display
(send (output "out") (cons 'add-node (vector (string->number (car pos))
(hash-ref obj 'name))))
False, do nothing | #lang racket
(require fractalide/modules/rkt/rkt-fbp/agent
fractalide/modules/rkt/rkt-fbp/def
fractalide/modules/rkt/rkt-fbp/graph)
(require (prefix-in g: graph)
json)
(define-agent
(define msg (recv (input "in")))
Convert fractalide / graph - > g : graph
(define g (g:directed-grap... |
e8d857323fe6151c3ae78979c6bfce2417b225b2b94ccb107c2e203699c95f67 | examachine/parallpairs | test_score.ml |
* *
* * Author : < >
* *
* * Copyright ( C ) 2011 - 2017 Gok Us Sibernetik Ar&Ge Ltd.
* *
* * This program is free software ; you can redistribute it and/or modify it under * * the terms of the Affero GNU General Public License as published by the Free
* * Software Foundation ; either version 3 of the... | null | https://raw.githubusercontent.com/examachine/parallpairs/6fafe8d6de3a55490cb8ed5ffd3493a28a914e0a/src/test_score.ml | ocaml |
* *
* * Author : < >
* *
* * Copyright ( C ) 2011 - 2017 Gok Us Sibernetik Ar&Ge Ltd.
* *
* * This program is free software ; you can redistribute it and/or modify it under * * the terms of the Affero GNU General Public License as published by the Free
* * Software Foundation ; either version 3 of the... | |
82bad2fd2949f3fe75c30f191a0b0fb33188246521373e00d957b6c7d33f485c | wenkokke/MonoProc | TestCP1.hs | module Main where
import PROC
import PROC.MF.Analysis.CP
import PROC.Testing (testAnalysis)
import PROC.Parsing (pCP)
import Data.Foldable (forM_)
import Text.Printf (printf)
import qualified Data.Set as S (toList)
import Text.ParserCombinators.UU.Utils (runParser)
because CP analysis is non - distributive , I 'm ... | null | https://raw.githubusercontent.com/wenkokke/MonoProc/c3d00bd55ee8a6f2c12ebf5abb226c731e856350/test/TestCP1.hs | haskell | this one is kinda superfluous, since if we know that the
relation holds between these... well, then this will always succeed... | module Main where
import PROC
import PROC.MF.Analysis.CP
import PROC.Testing (testAnalysis)
import PROC.Parsing (pCP)
import Data.Foldable (forM_)
import Text.Printf (printf)
import qualified Data.Set as S (toList)
import Text.ParserCombinators.UU.Utils (runParser)
because CP analysis is non - distributive , I 'm ... |
e548851197d4d6f9d1cb645b685e9c27b95eafb69e753912446b9c5ed95af01a | jaredly/reason-language-server | depend.ml | (**************************************************************************)
(* *)
(* OCaml *)
(* *)
... | null | https://raw.githubusercontent.com/jaredly/reason-language-server/ce1b3f8ddb554b6498c2a83ea9c53a6bdf0b6081/ocaml_typing/407/depend.ml | ocaml | ************************************************************************
OCaml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1999 Institut National de Recherche en Informatique et
the GNU Lesser General Public License version 2.1 , with the
open Asttypes
open Location
open Longident
open Parsetree
let pp_deps = ref []
module StringSet = Set.M... |
fad0bd886d62e84f3b7cf9fb15b9151e2c894539ac6902c17ab5851ecf4b9c7e | camlp5/camlp5 | sexp.ml | (* camlp5r *)
(* sexp.ml,v *)
open Ploc;
type sexp = [
Atom of (vala string)
| Cons of (vala sexp) and (vala sexp)
| Nil
]
;
| null | https://raw.githubusercontent.com/camlp5/camlp5/15e03f56f55b2856dafe7dd3ca232799069f5dda/tutorials/sexp_example2/sexp.ml | ocaml | camlp5r
sexp.ml,v |
open Ploc;
type sexp = [
Atom of (vala string)
| Cons of (vala sexp) and (vala sexp)
| Nil
]
;
|
456d2872ea32fe613960f7d70a20889c83f7066c6f4e5dc6530383323e65acf2 | input-output-hk/hydra | TxOutValue.hs | module Hydra.Cardano.Api.TxOutValue where
import Hydra.Cardano.Api.Prelude
import Hydra.Cardano.Api.MultiAssetSupportedInEra (HasMultiAsset (..))
-- | Inject some 'Value' into a 'TxOutValue'
mkTxOutValue ::
forall era.
(HasMultiAsset era) =>
Value ->
TxOutValue era
mkTxOutValue =
TxOutValue (multiAssetSupp... | null | https://raw.githubusercontent.com/input-output-hk/hydra/d873c290b0d9f18fde6c53a9690a1e7d2559e76b/hydra-cardano-api/src/Hydra/Cardano/Api/TxOutValue.hs | haskell | | Inject some 'Value' into a 'TxOutValue' | module Hydra.Cardano.Api.TxOutValue where
import Hydra.Cardano.Api.Prelude
import Hydra.Cardano.Api.MultiAssetSupportedInEra (HasMultiAsset (..))
mkTxOutValue ::
forall era.
(HasMultiAsset era) =>
Value ->
TxOutValue era
mkTxOutValue =
TxOutValue (multiAssetSupportedInEra @era)
|
12aa5ada60d5cd6c05ab1b31028f9d87136d0d3b6033171a50925abec8bdb75c | tallaproject/talla | talla_or_circuit.erl | %%%
Copyright ( c ) 2016 The Talla Authors . All rights reserved .
%%% Use of this source code is governed by a BSD-style
%%% license that can be found in the LICENSE file.
%%%
%%% ----------------------------------------------------------------------------
@author < >
@doc Onion Router Circuit .
%%% @end
%%% ... | null | https://raw.githubusercontent.com/tallaproject/talla/72cfbd8f48705a7a390cac2b8310ab7550c21c15/apps/talla_or/src/talla_or_circuit.erl | erlang |
Use of this source code is governed by a BSD-style
license that can be found in the LICENSE file.
----------------------------------------------------------------------------
@end
----------------------------------------------------------------------------
API.
Types.
The ID of our circuit.
Key material used... | Copyright ( c ) 2016 The Talla Authors . All rights reserved .
@author < >
@doc Onion Router Circuit .
-module(talla_or_circuit).
-behaviour(gen_statem).
-export([start_link/2,
stop/1,
dispatch/2
]).
States .
-export([create/3,
relay/3
]).
Generic State Machin... |
e66122c25ba337e1c7f7b22a72f1823dd5bdbebe2bb6fa7366237b176d2257a9 | gregtatcam/imaplet-lwt | imaplet_irmin_build.ml |
* Copyright ( c ) 2013 - 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... | null | https://raw.githubusercontent.com/gregtatcam/imaplet-lwt/d7b51253e79cffa97e98ab899ed833cd7cb44bb6/servers/imaplet_irmin_build.ml | ocaml | sort by file name - hopefully it'll sort in chronological order based on the
* unique id
|
* Copyright ( c ) 2013 - 2014 < >
*
* Permission to use , copy , modify , and distribute this software for any
* purpose with or without fee is hereby granted , provided that the above
* copyright notice and this permission notice appear in all copies .
*
* THE SOFTWARE IS PROVIDED " AS IS " AND... |
e774d6447a77ae4008b578ddbed29751efa93c46ff08b1264cbc02c8af8b0366 | gfngfn/SATySFi | length.mli |
type t [@@deriving show]
val zero : t
val add : t -> t -> t
val subtr : t -> t -> t
val mult : t -> float -> t
val div : t -> t -> float
val max : t -> t -> t
val min : t -> t -> t
val negate : t -> t
val abs : t -> t
val less_than : t -> t -> bool
val leq : t -> t -> bool
val is_nearly_zero : t -> bool
... | null | https://raw.githubusercontent.com/gfngfn/SATySFi/9dbd61df0ab05943b3394830c371e927df45251a/src/backend/length.mli | ocaml |
type t [@@deriving show]
val zero : t
val add : t -> t -> t
val subtr : t -> t -> t
val mult : t -> float -> t
val div : t -> t -> float
val max : t -> t -> t
val min : t -> t -> t
val negate : t -> t
val abs : t -> t
val less_than : t -> t -> bool
val leq : t -> t -> bool
val is_nearly_zero : t -> bool
... | |
ad8f5e269b02b5a831b3836513bc55229399d6ea9b6585534c1527793583cebb | rcherrueau/rastache | twice.rkt | #lang racket/base
(require rastache)
(define template
#<<HERESTRING
{{#person}}{{name}}{{/person}}
{{#person}}{{name}}{{/person}}
HERESTRING
)
(rast-compile/render (open-input-string template)
#hash{(person . #hash{(name . "tom")})}
(current-output-port))
| null | https://raw.githubusercontent.com/rcherrueau/rastache/059d00c83416f8ba27cc38fa7f8321b075756d14/examples/twice.rkt | racket | #lang racket/base
(require rastache)
(define template
#<<HERESTRING
{{#person}}{{name}}{{/person}}
{{#person}}{{name}}{{/person}}
HERESTRING
)
(rast-compile/render (open-input-string template)
#hash{(person . #hash{(name . "tom")})}
(current-output-port))
| |
77cd200522a9ee456d73fc9c6e860b168b3a401c4243f04cce6994ab7c93708d | rudolph-miller/cl-gists | 9.gist-starred-p.lisp | (let ((id "gistid"))
(gist-starred-p id))
= > T or NIL
(let ((gist (git-gist "gistid")))
(gist-starred-p gist))
= > T or NIL
| null | https://raw.githubusercontent.com/rudolph-miller/cl-gists/bcf3687f0af8b2eb5acaeda5db94d67446e56daf/examples/9.gist-starred-p.lisp | lisp | (let ((id "gistid"))
(gist-starred-p id))
= > T or NIL
(let ((gist (git-gist "gistid")))
(gist-starred-p gist))
= > T or NIL
| |
5ccca2ad82e440f521eacec5055eb7ca82e669a8161b0a4d198330292b7e760e | blynn/compiler | Ast2.hs | FFI across multiple modules .
-- Rewrite with named fields, deriving.
module Ast where
import Base
import Map
data Type = TC String | TV String | TAp Type Type deriving Eq
arr a b = TAp (TAp (TC "->") a) b
data Extra = Basic String | Const Int | ChrCon Char | StrCon String | Link String String Qual
data Pat = PatLit... | null | https://raw.githubusercontent.com/blynn/compiler/b9fe455ad4ee4fbabe77f2f5c3c9aaa53cffa85b/inn/Ast2.hs | haskell | Rewrite with named fields, deriving.
Type, e.g. Int for Eq Int.
Dictionary name, e.g. "{Eq Int}"
Context.
Method definitions
| Typed ASTs, ready for compilation, including ADTs and methods,
e.g. (==), (Eq a => a -> a -> Bool, select-==) | FFI across multiple modules .
module Ast where
import Base
import Map
data Type = TC String | TV String | TAp Type Type deriving Eq
arr a b = TAp (TAp (TC "->") a) b
data Extra = Basic String | Const Int | ChrCon Char | StrCon String | Link String String Qual
data Pat = PatLit Extra | PatVar String (Maybe Pat) | Pat... |
a5e7a2a458bbc9eb591c525dde812edb71763c3fdb38faad3eb9c83e2e2a0294 | Ledest/otpbp | otpbp_lib.erl | -module(otpbp_lib).
-ifndef(HAVE_lib__nonl_1).
OTP < 21.0
-export([nonl/1]).
-endif.
-ifndef(HAVE_lib__send_2).
OTP < 21.0
-export([send/2]).
-endif.
-ifndef(HAVE_lib__sendw_2).
OTP < 21.0
-export([sendw/2]).
-endif.
-ifndef(HAVE_lib__flush_receive_0).
OTP < 21.0
-export([flush_receive/0]).
-endif.
-ifndef(HAV... | null | https://raw.githubusercontent.com/Ledest/otpbp/f93923239b33cc05500733027e6e775090ac80ad/src/otpbp_lib.erl | erlang | -module(otpbp_lib).
-ifndef(HAVE_lib__nonl_1).
OTP < 21.0
-export([nonl/1]).
-endif.
-ifndef(HAVE_lib__send_2).
OTP < 21.0
-export([send/2]).
-endif.
-ifndef(HAVE_lib__sendw_2).
OTP < 21.0
-export([sendw/2]).
-endif.
-ifndef(HAVE_lib__flush_receive_0).
OTP < 21.0
-export([flush_receive/0]).
-endif.
-ifndef(HAV... | |
ee565fefab2f032cce5cf69b952b40cef0c6868471037634ac8a90c0dd24cb07 | irastypain/sicp-on-language-racket | exercise_1_11i-test.rkt | #lang racket
(require rackunit
rackunit/text-ui
"../../src/chapter01/exercise_1_11i.rkt")
(define tests
(test-suite
"Function f(n) [Iterative process]"
(test-case
"When n is less than 3"
(check-equal? -1 (fn -1))
(check-equal? 0 (fn 0))
(check-equal? 1 (fn 1))
... | null | https://raw.githubusercontent.com/irastypain/sicp-on-language-racket/0052f91d3c2432a00e7e15310f416cb77eeb4c9c/test/chapter01/exercise_1_11i-test.rkt | racket | #lang racket
(require rackunit
rackunit/text-ui
"../../src/chapter01/exercise_1_11i.rkt")
(define tests
(test-suite
"Function f(n) [Iterative process]"
(test-case
"When n is less than 3"
(check-equal? -1 (fn -1))
(check-equal? 0 (fn 0))
(check-equal? 1 (fn 1))
... | |
afb5b4660d8623629aeacb0c8b107d69021406f7ce2f17863165e6c260b5c426 | GrammaticalFramework/gf-core | PGFToCFG.hs | ----------------------------------------------------------------------
-- |
-- Module : GF.Speech.PGFToCFG
--
Approximates PGF grammars with context - free grammars .
----------------------------------------------------------------------
module GF.Speech.PGFToCFG (bnfPrinter, pgfToCFG) where
import PGF(showCId)... | null | https://raw.githubusercontent.com/GrammaticalFramework/gf-core/f2e52d6f2c2bc90febceebdea0268b40ea37476c/src/compiler/GF/Speech/PGFToCFG.hs | haskell | --------------------------------------------------------------------
|
Module : GF.Speech.PGFToCFG
--------------------------------------------------------------------
^ Concrete syntax name
gets the number of fields in the lincat for the given category
-- ++ [t | Alt ss _ <- as, t <- ss]
-- should be alterna... | Approximates PGF grammars with context - free grammars .
module GF.Speech.PGFToCFG (bnfPrinter, pgfToCFG) where
import PGF(showCId)
import PGF.Internal as PGF
import GF.Infra . Ident
import GF.Grammar.CFG hiding (Symbol)
import Data.Array.IArray as Array
import Data . List
import Data.Map (Map)
import qualified Dat... |
51dc1c7648129c8058723246c8e30c3a3e156d5d908ca70a0482bce28caf2a71 | craigl64/clim-ccl | cloe-activities.lisp | -*- Mode : Lisp ; Syntax : ANSI - Common - Lisp ; Package : CLOE - CLIM ; Base : 10 ; Lowercase : Yes -*-
(in-package :cloe-clim)
"Copyright (c) 1990, 1991, 1992 Symbolics, Inc. All rights reserved."
(defun run-cloe-application (name &key (port (find-port)))
(win::show-window (win::get-term-window) :type :min... | null | https://raw.githubusercontent.com/craigl64/clim-ccl/301efbd770745b429f2b00b4e8ca6624de9d9ea9/cloe/cloe-activities.lisp | lisp | Syntax : ANSI - Common - Lisp ; Package : CLOE - CLIM ; Base : 10 ; Lowercase : Yes -*- |
(in-package :cloe-clim)
"Copyright (c) 1990, 1991, 1992 Symbolics, Inc. All rights reserved."
(defun run-cloe-application (name &key (port (find-port)))
(win::show-window (win::get-term-window) :type :minimize)
(run-frame-top-level
(make-application-frame name :frame-manager (find-frame-manager :port por... |
2e51f4540b43bb6c76c28d66a9e90f77d03d34309d1e82952e5fd5606aae9892 | LivewareProblems/hyper | hyper_binary.erl | @doc : Registers stored in one large binary
%%
This backend uses one plain Erlang binary to store registers . The
%% cost of rebuilding the binary is amortized by keeping a buffer of
%% inserts to perform in the future.
-module(hyper_binary).
-behaviour(hyper_register).
%%-compile(native).
-export([
new/1,
... | null | https://raw.githubusercontent.com/LivewareProblems/hyper/9f6ee16c6c0f8cb387737642d63ff153de913ae3/src/hyper_binary.erl | erlang |
cost of rebuilding the binary is amortized by keeping a buffer of
inserts to perform in the future.
-compile(native).
onto their new index, see
-operations-on-hlls-of-different-sizes/
NOTE: this function does not perform the max_registers step
We can just fold on the list i think | @doc : Registers stored in one large binary
This backend uses one plain Erlang binary to store registers . The
-module(hyper_binary).
-behaviour(hyper_register).
-export([
new/1,
set/3,
compact/1,
max_merge/1, max_merge/2,
reduce_precision/2,
bytes/1,
register_sum/1,
register_his... |
6374b062f2dbe79ff54d69d2f5ef744bba2fa5fc14f74cc84a4e3014c13e2e50 | rtoy/cmucl | pmax-vm.lisp | ;;; -*- Package: MIPS -*-
;;;
;;; **********************************************************************
This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
;;;
(ext:file-comment
"$Header: src/code/pmax-vm.lisp $")
;;;
;;; *******... | null | https://raw.githubusercontent.com/rtoy/cmucl/9b1abca53598f03a5b39ded4185471a5b8777dea/src/code/pmax-vm.lisp | lisp | -*- Package: MIPS -*-
**********************************************************************
**********************************************************************
$Header: src/code/pmax-vm.lisp $
This file contains the PMAX specific runtime stuff.
Add machine specific features to *features*
MACHINE-TYPE a... | This code was written as part of the CMU Common Lisp project at
Carnegie Mellon University , and has been placed in the public domain .
(ext:file-comment
"$Header: src/code/pmax-vm.lisp $")
(in-package "MIPS")
(use-package "SYSTEM")
(use-package "ALIEN")
(use-package "C-CALL")
(intl:textdomain "cmucl")
(export ... |
4cd7af4493a81d9b68ffcb28c0898da54bfcd8cfedc804f47737eb722cd4e0c5 | snapframework/snap-templates | Application.hs | # LANGUAGE TemplateHaskell #
------------------------------------------------------------------------------
-- | This module defines our application's state type and an alias for its
-- handler monad.
module Application where
------------------------------------------------------------------------------
import Contro... | null | https://raw.githubusercontent.com/snapframework/snap-templates/768db37547fc153ce00160af4bd5b603bfa8b8bb/project_template/default/src/Application.hs | haskell | ----------------------------------------------------------------------------
| This module defines our application's state type and an alias for its
handler monad.
----------------------------------------------------------------------------
----------------------------------------------------------------------------
... | # LANGUAGE TemplateHaskell #
module Application where
import Control.Lens
import Snap.Snaplet
import Snap.Snaplet.Heist
import Snap.Snaplet.Auth
import Snap.Snaplet.Session
data App = App
{ _heist :: Snaplet (Heist App)
, _sess :: Snaplet SessionManager
, _auth :: Snaplet (AuthManager App)
}
makeLen... |
82a29ecec986acc1096ea1263fcecfd336e982e36219623793779bdc88bb2307 | orbitz/web_typed | frame_test.ml | open OUnit
open Stomp
open Ort_prelude
let scaffold d f =
match d with
| Result.Error (Frame.Unknown_cmd cmd) ->
assert_string ("Unknown command: " ^ cmd)
| Result.Error Stream.Failure ->
assert_string "Stream failure"
| Result.Error (Stream.Error error) ->
assert_string ("Stream error... | null | https://raw.githubusercontent.com/orbitz/web_typed/e224c1be6a2d4fd0013ff9cdb27075c145a4b77e/libs/stomp/frame_test.ml | ocaml | open OUnit
open Stomp
open Ort_prelude
let scaffold d f =
match d with
| Result.Error (Frame.Unknown_cmd cmd) ->
assert_string ("Unknown command: " ^ cmd)
| Result.Error Stream.Failure ->
assert_string "Stream failure"
| Result.Error (Stream.Error error) ->
assert_string ("Stream error... | |
84ee4c92634a62133eba66280d0485494fa48b1cfd7e2cb99c5d475df6365618 | input-output-hk/project-icarus-importer | Monad.hs | # LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
-- | Monads used for explorer's toil.
module Pos.Explorer.Txp.Toil.Monad
(
ExplorerExtraM
, getTxExtra
, getAddrHistory
, getAddrBalance
, getUtxoSum
, putTxExtra
, delTxExtra
, updateAddrHistory
... | null | https://raw.githubusercontent.com/input-output-hk/project-icarus-importer/36342f277bcb7f1902e677a02d1ce93e4cf224f0/explorer/src/Pos/Explorer/Txp/Toil/Monad.hs | haskell | | Monads used for explorer's toil.
--------------------------------------------------------------------------
--------------------------------------------------------------------------
| Utility monad which allows to lookup extra values related to txp and modify them.
-------------------------------------------------... | # LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
module Pos.Explorer.Txp.Toil.Monad
(
ExplorerExtraM
, getTxExtra
, getAddrHistory
, getAddrBalance
, getUtxoSum
, putTxExtra
, delTxExtra
, updateAddrHistory
, putAddrBalance
, delAddr... |
ce60a5d1d8b03b1bbfc862574beb356249a14de0279ce49582fd0268c9f2e1e9 | syntax-objects/syntax-parse-example | rec-contract.rkt | #lang racket/base
(provide rec/c)
(require racket/contract (for-syntax racket/base syntax/parse))
(define-syntax-rule (rec/c t ctc)
(letrec ([rec-ctc
(let-syntax ([t (syntax-parser (_:id #'(recursive-contract rec-ctc)))])
ctc)])
rec-ctc))
| null | https://raw.githubusercontent.com/syntax-objects/syntax-parse-example/0675ce0717369afcde284202ec7df661d7af35aa/rec-contract/rec-contract.rkt | racket | #lang racket/base
(provide rec/c)
(require racket/contract (for-syntax racket/base syntax/parse))
(define-syntax-rule (rec/c t ctc)
(letrec ([rec-ctc
(let-syntax ([t (syntax-parser (_:id #'(recursive-contract rec-ctc)))])
ctc)])
rec-ctc))
| |
edbdbe14edc31a7902f4d5d9e091d9dd16b2a8ee8753efd32c1bf997539c9079 | DianaPajon/tiger | Parser.hs | import Text.Parsec
import TigerParser
import Tools
main :: IO ()
main =
putStrLn "\n======= Test PARSER in progress =======" >>
putStrLn "escapa.tig" >>
( test "./test/test_code" (badRes . show) (const $ bluenice) tester "escapa.tig") >>
putStrLn "intro.tig" >>
( test "./test/te... | null | https://raw.githubusercontent.com/DianaPajon/tiger/30d360f02f5fc57883f988a1cbb581208ecd2744/test/Parser.hs | haskell | import Text.Parsec
import TigerParser
import Tools
main :: IO ()
main =
putStrLn "\n======= Test PARSER in progress =======" >>
putStrLn "escapa.tig" >>
( test "./test/test_code" (badRes . show) (const $ bluenice) tester "escapa.tig") >>
putStrLn "intro.tig" >>
( test "./test/te... | |
56dc70dc194b454b15a5a3c38f5d7c1fddc226009adf84d8f1703065c07d51d9 | reactiveml/rml | subst.mli | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | null | https://raw.githubusercontent.com/reactiveml/rml/d178d49ed923290fa7eee642541bdff3ee90b3b4/toplevel-alt/js/js-of-ocaml/compiler/subst.mli | ocaml | Js_of_ocaml compiler
* /
* Copyright ( C ) 2010
* Laboratoire PPS - CNRS Université Paris Diderot
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , with linking... | |
3acc556452b053d9d5db768218a0d28e2f160905abd9aba9a955db79248286f7 | ucsd-progsys/liquidhaskell | BadData1.hs | {-@ LIQUID "--expect-error-containing=Data constructors in refinement do not match original datatype for `EntityField`" @-}
{-@ LIQUID "--no-adt" @-}
{-@ LIQUID "--exact-data-con" @-}
# LANGUAGE ExistentialQuantification , KindSignatures , TypeFamilies , GADTs #
module BadData1 where
class PersistEntity reco... | null | https://raw.githubusercontent.com/ucsd-progsys/liquidhaskell/f46dbafd6ce1f61af5b56f31924c21639c982a8a/tests/errors/BadData1.hs | haskell | @ LIQUID "--expect-error-containing=Data constructors in refinement do not match original datatype for `EntityField`" @
@ LIQUID "--no-adt" @
@ LIQUID "--exact-data-con" @
The reason this fails is because the refinement uses 'record'
OK
BAD |
# LANGUAGE ExistentialQuantification , KindSignatures , TypeFamilies , GADTs #
module BadData1 where
class PersistEntity record where
data EntityField record :: * -> *
instead of ' ' . Therefore , the lookup for the GHC datatype
will return no constructors , and consequently , LH complains
that our refin... |
114fe93b51f983afdfeaae303218dfa58af97c006008b685d25852c9d53c7fa5 | macalimlim/programming-in-haskell | CaesarCipher.hs | module CaesarCipher where
import Data.Char hiding (isLower, isUpper)
a Caesar cipher , also known as the shift cipher , 's code or Caesar shift ,
is one of the simplest and most widely known encryption techniques .
It is a type of substitution cipher in which each letter in the plaintext
is replac... | null | https://raw.githubusercontent.com/macalimlim/programming-in-haskell/47d7d9b92c3d79eeedc1123e6eb690f96fa8a4fc/CaesarCipher.hs | haskell |
Assignment: how to crack it! :D | module CaesarCipher where
import Data.Char hiding (isLower, isUpper)
a Caesar cipher , also known as the shift cipher , 's code or Caesar shift ,
is one of the simplest and most widely known encryption techniques .
It is a type of substitution cipher in which each letter in the plaintext
is replac... |
0201fb9abc3442397ddd811ba273e0e4401f7b752d55529101be1d604797c0bd | eval/deps-try | repl.clj | (ns rebel-readline.cljs.repl
(:require
[cljs.repl]
[clojure.tools.reader :as r]
[clojure.tools.reader.reader-types :as rtypes]
[rebel-readline.core :as rebel]
[rebel-readline.clojure.line-reader :as clj-line-reader]
[rebel-readline.cljs.service.local :as cljs-service]
[rebel-readline.jline-api :a... | null | https://raw.githubusercontent.com/eval/deps-try/da691c68b527ad5f9e770dbad82cce6cbbe16fb4/vendor/rebel-readline/rebel-readline-cljs/src/rebel_readline/cljs/repl.clj | clojure | enable evil alter-var-root | (ns rebel-readline.cljs.repl
(:require
[cljs.repl]
[clojure.tools.reader :as r]
[clojure.tools.reader.reader-types :as rtypes]
[rebel-readline.core :as rebel]
[rebel-readline.clojure.line-reader :as clj-line-reader]
[rebel-readline.cljs.service.local :as cljs-service]
[rebel-readline.jline-api :a... |
5f2bb36258d87b5f70aa65ea347b8a309517a012f68745bcf1e0d523531da89d | manuel-serrano/hop | event.scm | ;*=====================================================================*/
* serrano / prgm / project / hop / hop / runtime / event.scm * /
;* ------------------------------------------------------------- */
* Author : * /
* Creation ... | null | https://raw.githubusercontent.com/manuel-serrano/hop/481cb10478286796addd2ec9ee29c95db27aa390/runtime/event.scm | scheme | *=====================================================================*/
* ------------------------------------------------------------- */
* ------------------------------------------------------------- */
* The implementation of server events */
*===========================... | * serrano / prgm / project / hop / hop / runtime / event.scm * /
* Author : * /
* Creation : Tue Sep 27 05:45:08 2005 * /
* Last change : Fri Jun 14 14:57:28 2019 ( serrano ) * /
* Copy... |
367197b294618de77de1c7f3fd37a72067408abe152c1272bbaf33740141ceb3 | gnl/ghostwheel | core.cljc | Copyright ( c ) . All rights reserved .
;; The use and distribution terms for this software are covered by the
Eclipse Public License 2.0 ( -2.0/ )
;; which can be found in the file LICENSE at the root of this distribution.
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of ... | null | https://raw.githubusercontent.com/gnl/ghostwheel/a85c3510178fc4fbcb95125b86116d698e2a232a/src/ghostwheel/core.cljc | clojure | The use and distribution terms for this software are covered by the
which can be found in the file LICENSE at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove this notice, or any other, from this software.
REVIEW: ... | Copyright ( c ) . All rights reserved .
Eclipse Public License 2.0 ( -2.0/ )
(ns ghostwheel.core
#?(:cljs (:require-macros ghostwheel.core))
(:require [clojure.string :as string]
[clojure.set :refer [union difference map-invert]]
[clojure.walk :as walk]
[clojure.test :as t... |
55a481b0e3440431918c1823011de4964308ac0d9ea15c49c4bec401dd6338c5 | bjpop/haskell-mpi | PingPongFactorial.hs | # LANGUAGE ScopedTypeVariables #
.
Two processes calculate the factorial of the input .
Note : this is not a fast , nor sensible way to compute factorials .
It is merely intended to be used to demonstrate point - to - point
communications .
Ping Pong Factorial.
Two processes calc... | null | https://raw.githubusercontent.com/bjpop/haskell-mpi/1a4e6f0ed20c7b0760344640f1ba5f2141e61719/test/examples/simple/PingPongFactorial.hs | haskell | # LANGUAGE ScopedTypeVariables #
.
Two processes calculate the factorial of the input .
Note : this is not a fast , nor sensible way to compute factorials .
It is merely intended to be used to demonstrate point - to - point
communications .
Ping Pong Factorial.
Two processes calc... | |
8a8198e25439f61bfa721649afaa7daf073268db6e2f3a189c3cb66697c91038 | agda/agda2hs | Name.hs | module Agda2Hs.Compile.Name where
import Control.Arrow ( (>>>) )
import Control.Monad
import Data.List ( intercalate, isPrefixOf )
import qualified Language.Haskell.Exts as Hs
import Agda.Compiler.Backend hiding ( topLevelModuleName )
import Agda.Compiler.Common ( topLevelModuleName )
import Agda.Syntax.Common
im... | null | https://raw.githubusercontent.com/agda/agda2hs/037b8b8980254ff110733ff205e7d60e412287e3/src/Agda2Hs/Compile/Name.hs | haskell | Use the record name if no named constructor
TODO: this prints all names UNQUALIFIED. For names from
qualified imports, we need to add the proper qualification in | module Agda2Hs.Compile.Name where
import Control.Arrow ( (>>>) )
import Control.Monad
import Data.List ( intercalate, isPrefixOf )
import qualified Language.Haskell.Exts as Hs
import Agda.Compiler.Backend hiding ( topLevelModuleName )
import Agda.Compiler.Common ( topLevelModuleName )
import Agda.Syntax.Common
im... |
b62db0105f42c0ca2d9888e54f9f46179ab837de7f1d45ffa6128f4d4fbe0dea | binghe/PCL | bench.lisp | ;;;-*- Mode: Lisp; Syntax: Common-lisp; Package: user -*-
(in-package :bench :use '(:lisp :pcl))
;;;Here are a few homebrew benchmarks for testing out Lisp performance.
BENCH - THIS - LISP : benchmarks for common lisp .
BENCH - THIS - CLOS : benchmarks for CLOS .
BENCH - FLAVORS : ditto for Symbolics flavo... | null | https://raw.githubusercontent.com/binghe/PCL/7021c061c5eef1466e563c4abb664ab468ee0d80/bench/bench.lisp | lisp | -*- Mode: Lisp; Syntax: Common-lisp; Package: user -*-
Here are a few homebrew benchmarks for testing out Lisp performance.
so the scheduler isn't supposed to get in the way. Accuracy is generally
Elapsed time is measured using get-internal-run-time. Because the accuracy of
this number is fairly crude, it is i... |
(in-package :bench :use '(:lisp :pcl))
BENCH - THIS - LISP : benchmarks for common lisp .
BENCH - THIS - CLOS : benchmarks for CLOS .
BENCH - FLAVORS : ditto for Symbolics flavors .
BE SURE TO CHANGE THE PACKAGE DEFINITION TO GET THE CLOS + LISP YOU WANT TO TEST .
Each benchmark is reported as operations ... |
788002ecdb5d8373a7f1f9fb63510e0b8dfed6c23d48594fecea55e4b182199b | hiratara/Haskell-Nyumon-Sample | chap02-samples-2-6-2-case.hs | x = False :: Bool
main = print $ case x of True -> "x is True"
False -> "x is False"
| null | https://raw.githubusercontent.com/hiratara/Haskell-Nyumon-Sample/ac52b741e3b96722f6fc104cfa84078e39f7a241/chap02-samples/chap02-samples-2-6-2-case.hs | haskell | x = False :: Bool
main = print $ case x of True -> "x is True"
False -> "x is False"
| |
1fff063bfd8bc53db38024dc1fa90ba0384b2b44ca7ddd80965e28abd3d676fa | rbkmoney/cds | cds_card_validation_tests_SUITE.erl | -module(cds_card_validation_tests_SUITE).
-include_lib("damsel/include/dmsl_cds_thrift.hrl").
-export([all/0]).
-export([groups/0]).
-export([full_card_data_validation/1]).
-export([payment_system_detection/1]).
%%
%%
%% tests descriptions
%%
-define(AUTH_CVV(CVV), #{auth_data => #{cvv => CVV}}).
-type config() :... | null | https://raw.githubusercontent.com/rbkmoney/cds/6e6541c99d34b0633775f0c5304f5008e6b2aaf3/apps/cds/test/cds_card_validation_tests_SUITE.erl | erlang |
tests descriptions
tests
helpers
| -module(cds_card_validation_tests_SUITE).
-include_lib("damsel/include/dmsl_cds_thrift.hrl").
-export([all/0]).
-export([groups/0]).
-export([full_card_data_validation/1]).
-export([payment_system_detection/1]).
-define(AUTH_CVV(CVV), #{auth_data => #{cvv => CVV}}).
-type config() :: term().
-spec all() -> [{gro... |
19c7c57ec30e7ed30f74d82117536a9edae77d5a3ed2fed1f7daef293f4606b9 | ndmitchell/shake | Demo.hs |
-- | Demo tutorial, accessed with --demo
module Development.Shake.Internal.Demo(demo) where
import Development.Shake.Internal.Paths
import Development.Shake.Command
import Control.Exception.Extra
import Control.Monad
import Data.List.Extra
import Data.Maybe
import System.Directory
import System.Exit
import System.Fi... | null | https://raw.githubusercontent.com/ndmitchell/shake/99c5a7a4dc1d5a069b13ed5c1bc8e4bc7f13f4a6/src/Development/Shake/Internal/Demo.hs | haskell | | Demo tutorial, accessed with --demo
| Require the user to press @y@ before continuing.
| Replace exceptions with 'False'.
| Require a condition to be true, or exit with a message. |
module Development.Shake.Internal.Demo(demo) where
import Development.Shake.Internal.Paths
import Development.Shake.Command
import Control.Exception.Extra
import Control.Monad
import Data.List.Extra
import Data.Maybe
import System.Directory
import System.Exit
import System.FilePath
import General.Extra
import Develo... |
804970a37f7907fb073b0e9414fe3dc6e1ba6d706616c38857c957acf33eab7b | exercism/ocaml | example.ml | open Base
let is_empty = String.for_all ~f:Char.is_whitespace
let is_shouting s =
String.exists ~f:Char.is_alpha s &&
String.for_all ~f:(fun c -> not (Char.is_alpha c) || Char.is_uppercase c) s
let is_question s = Char.(s.[String.length s - 1] = '?')
let response_for s =
let s = String.strip s in
match s ... | null | https://raw.githubusercontent.com/exercism/ocaml/914e58d48e58a96fe7635fe4b06cc103af4ed683/exercises/practice/bob/.meta/example.ml | ocaml | open Base
let is_empty = String.for_all ~f:Char.is_whitespace
let is_shouting s =
String.exists ~f:Char.is_alpha s &&
String.for_all ~f:(fun c -> not (Char.is_alpha c) || Char.is_uppercase c) s
let is_question s = Char.(s.[String.length s - 1] = '?')
let response_for s =
let s = String.strip s in
match s ... | |
2aadb30a439324eacb81f9c7f5167e048bf40b6f0b2a653236265c1cddef93cb | ucsd-progsys/nate | lambda.mli | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
, projet ... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/bytecomp/lambda.mli | ocaml | *********************************************************************
Objective Caml
... | , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : lambda.mli , v 1.43 2007/02/0... |
9f8d27caff094a56a29eeb76172dc664812110e007ceea2280978542e1a9fbfc | jyh/metaprl | nuprl_prog_1.ml | extends Ma_num_thy_1
open Dtactic
define unfold_switch : "switch"[]{'"t";'"b"} <-->
('"b" '"t")
define unfold_switch_case : "switch_case"[]{'"v";'"case";'"cont"} <-->
"lambda"[]{"x"."ifthenelse"[]{"beq_int"[]{'"x";'"v"};'"case";('"cont" '"x")}}
define unfold_switch_default : "switch_default"[]{'"body... | null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/mesa/nuprl_prog_1.ml | ocaml | *** display forms *** | extends Ma_num_thy_1
open Dtactic
define unfold_switch : "switch"[]{'"t";'"b"} <-->
('"b" '"t")
define unfold_switch_case : "switch_case"[]{'"v";'"case";'"cont"} <-->
"lambda"[]{"x"."ifthenelse"[]{"beq_int"[]{'"x";'"v"};'"case";('"cont" '"x")}}
define unfold_switch_default : "switch_default"[]{'"body... |
b124840061473212a438d6b647674b9daa9af02375bd6a94f4023db1692bd93d | ddmcdonald/sparser | Note on what happens when Sparser loads.lisp | (in-package :sparser)
Notes on what happens when you load Sparser
Version 10/6/15
The proper way to load the Sparser system is to use the Lisp load
function to load the file load-nlp.lisp at the top of the directory
tree. The key part of this file is the selection of a 'script'
and starting the load process by loadin... | null | https://raw.githubusercontent.com/ddmcdonald/sparser/304bd02d0cf7337ca25c8f1d44b1d7912759460f/Sparser/documentation/notes/Note%20on%20what%20happens%20when%20Sparser%20loads.lisp | lisp | (in-package :sparser)
Notes on what happens when you load Sparser
Version 10/6/15
The proper way to load the Sparser system is to use the Lisp load
function to load the file load-nlp.lisp at the top of the directory
tree. The key part of this file is the selection of a 'script'
and starting the load process by loadin... | |
fcdfdc580febfa6a02bf78dd14e58e133edd6418c90f41c767cac43b10866c75 | pouriya/cfg | cfg_keeper_SUITE.erl | %% Auto-generated by -Jahanbakhsh/estuff
%% -----------------------------------------------------------------------------
-module(cfg_keeper_SUITE).
-author('').
%% -----------------------------------------------------------------------------
%% Exports:
%% ct callbacks:
-export([init_per_suite/1
,end_per_suit... | null | https://raw.githubusercontent.com/pouriya/cfg/b03eb73549e2fa11b88f91db73f700d7e6ef4617/test/cfg_keeper_SUITE.erl | erlang | Auto-generated by -Jahanbakhsh/estuff
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
Exports:
ct callbacks:
Testcases:
-----------------------------------------------------------------------------
------... | -module(cfg_keeper_SUITE).
-author('').
-export([init_per_suite/1
,end_per_suite/1
,all/0
,init_per_testcase/2
,end_per_testcase/2]).
-export(['1'/1
,'2'/1
,'3'/1
,'4'/1
,'5'/1
,'6'/1
,'7'/1
,'8'/1
,'9'/1]).
Records & M... |
7cc080bc50592b3f3e4909feebf10fe2db8f678e3173f820e44dba850458c873 | azimut/shiny | 3.lisp | (in-package :shiny)
;; Trying the ideas on the song
;;
;;
(freverb-toggle 1)
(freverb :roomsize .6d0 :damp .1d0 :level .9d0 :width 10d0)
sine 80 - 8
(fp 2 101 0)
(fp 10 14)
(fp 10 0 0)
(try-sounds (quant 4) 10 10 4)
;; !!
;; slow down and speed up chord rhythm and bar length
(let ((o (new palindrome :of '(.75... | null | https://raw.githubusercontent.com/azimut/shiny/774381a9bde21c4ec7e7092c7516dd13a5a50780/compositions/inlovewithaghost/3.lisp | lisp | Trying the ideas on the song
!!
slow down and speed up chord rhythm and bar length
a problem with a bass here is that it might not change from the previous
bass, a heap like structure would help. Also it won't matter that much if
the bass doesn't chant through the composition...i think
<3
alternate between:... | (in-package :shiny)
(freverb-toggle 1)
(freverb :roomsize .6d0 :damp .1d0 :level .9d0 :width 10d0)
sine 80 - 8
(fp 2 101 0)
(fp 10 14)
(fp 10 0 0)
(try-sounds (quant 4) 10 10 4)
(let ((o (new palindrome :of '(.75 .6 .5 .45) :elide t)))
(defun f (time)
(let ((offset (next o))
(mychord (make-cho... |
1a40d40758dc0a22f24590a4c25acd8656af1eb3a8e5bf75e617ce28f0ea1dbc | orx/ocaml-orx | tutorial_09_scrolling.ml | Adaptation of the scrolling tutorial from
This example is a direct adaptation of the 09_Scrolling.c tutorial from
module State = struct
type t = Orx.Camera.t
let state : t option ref = ref None
let get () = Option.get !state
end
let update (clock_info : Orx.Clock.Info.t) =
let camera = State.get () in... | null | https://raw.githubusercontent.com/orx/ocaml-orx/b1cf7d0efb958c72fbb9568905c81242593ff19d/examples/tutorial/tutorial_09_scrolling.ml | ocaml | Print out a hint to the user about what's to come | Adaptation of the scrolling tutorial from
This example is a direct adaptation of the 09_Scrolling.c tutorial from
module State = struct
type t = Orx.Camera.t
let state : t option ref = ref None
let get () = Option.get !state
end
let update (clock_info : Orx.Clock.Info.t) =
let camera = State.get () in... |
9879891fd4e770bcfdcb7c9da340db56e0e689b0dc5dbc5b132c13b4a7d47c3d | theodormoroianu/SecondYearCourses | lab5.hs | import Numeric.Natural
logistic :: Num a => a -> a -> Natural -> a
logistic rate start = f
where
f 0 = start
f n = rate * f (n - 1) * (1 - f (n - 1))
logistic0 :: Fractional a => Natural -> a
logistic0 = logistic 3.741 0.00079
ex1 :: Natural
ex1 = undefined
ex20 :: Fractional a => [a]
ex20 = [1, logis... | null | https://raw.githubusercontent.com/theodormoroianu/SecondYearCourses/99185b0e97119135e7301c2c7be0f07ae7258006/Haskell/l/lab5/lab5.hs | haskell | import Numeric.Natural
logistic :: Num a => a -> a -> Natural -> a
logistic rate start = f
where
f 0 = start
f n = rate * f (n - 1) * (1 - f (n - 1))
logistic0 :: Fractional a => Natural -> a
logistic0 = logistic 3.741 0.00079
ex1 :: Natural
ex1 = undefined
ex20 :: Fractional a => [a]
ex20 = [1, logis... | |
6ce5f239dd64672b087373db9dd74d87a3511fd0dcee11efce0adc014c6ebb0d | eugeneia/athens | suite.lisp | ;;; integrated testing including derived patterns
;;;
INCOMPATIBILITY NOTE : ` fail ' no longer effective by default : it is now exported
;;; separately from :trivia.fail to avoid the common conflict against fiveam.
;;; Also, :trivia.next and :trivia.skip exports `next' (conflicts with
` iterate : next ' ) and ` sk... | null | https://raw.githubusercontent.com/eugeneia/athens/cc9d456edd3891b764b0fbf0202a3e2f58865cbf/quicklisp/dists/quicklisp/software/trivia-20180711-git/test/suite.lisp | lisp | integrated testing including derived patterns
separately from :trivia.fail to avoid the common conflict against fiveam.
Also, :trivia.next and :trivia.skip exports `next' (conflicts with
`macroexpand': some tests are now replaced with eval
for debugging purpose
Pattern matching
integer
t
nil
keyword
float... | INCOMPATIBILITY NOTE : ` fail ' no longer effective by default : it is now exported
` iterate : next ' ) and ` skip ' , respectively . all 3 macros have the same meaning .
INCOMPATIBILITY NOTE : ` match ' no longer expanded in 1 - pass through
(defpackage :trivia.test
(:use :closer-common-lisp :fiveam
:... |
5bfb5327451d1bae40b004439d8b6edcae9fa3c53bf23079eb58043d5481e615 | boris-ci/boris | EitherT.hs | # LANGUAGE NoImplicitPrelude #
module Boris.Prelude.EitherT (
EitherT
, Except.ExceptT
, newEitherT
, runEitherT
, eitherT
, mapEitherT
, bimapEitherT
, firstEitherT
, secondEitherT
, left
, hoistEither
, bracketEitherT'
) where
import Control.Monad.Catch (MonadMask (..), SomeExce... | null | https://raw.githubusercontent.com/boris-ci/boris/c321187490afc889bf281442ac4ef9398b77b200/boris-core/src/Boris/Prelude/EitherT.hs | haskell | Acquire failed, we have nothing to release
Acquire succeeded, we need to try and release
Acquire failed, we have nothing to run
Acquire succeeded, we can do some work
Bracket where you care about the output of the finalizer. If the finalizer fails
with a value level fail, it will return the result of the finalize... | # LANGUAGE NoImplicitPrelude #
module Boris.Prelude.EitherT (
EitherT
, Except.ExceptT
, newEitherT
, runEitherT
, eitherT
, mapEitherT
, bimapEitherT
, firstEitherT
, secondEitherT
, left
, hoistEither
, bracketEitherT'
) where
import Control.Monad.Catch (MonadMask (..), SomeExce... |
c3c11a67f04ca06820f9bf79df7fc26a92e26a79496f7513f130addb146533c0 | coq/coq | fl.ml | (************************************************************************)
(* * The Coq Proof Assistant / The Coq Development Team *)
v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * *... | null | https://raw.githubusercontent.com/coq/coq/c4587fa780c885fda25a38a2f16e84dc9011f9bd/tools/coqdep/lib/fl.ml | ocaml | **********************************************************************
* The Coq Proof Assistant / The Coq Development Team
// * This file is distributed under the terms of the
* (see LICENSE file for the text of the license)
************************************... | v * Copyright INRIA , CNRS and contributors
< O _ _ _ , , * ( see version control and CREDITS file for authors & dates )
\VV/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* GNU Lesser Gener... |
904a03d7f88b986631609c3ec3ffa125362a58de5e94aa2cdca977981e6ed631 | hio/erlang-record_info | test.erl | % ----------------------------------------------------------------------------
% test.
% ----------------------------------------------------------------------------
-module(test).
-export([main/0]).
-export([test/0]).
-include("test.hrl").
-include("record_info.hrl").
-import(record_info, [record_to_proplist/2]).
-imp... | null | https://raw.githubusercontent.com/hio/erlang-record_info/0e8dd70a2b4c206296792875ed8d433337ce7b17/t/test.erl | erlang | ----------------------------------------------------------------------------
test.
----------------------------------------------------------------------------
non key-value element.
----------------------------------------------------------------------------
End of File.
----------------------------------------... | -module(test).
-export([main/0]).
-export([test/0]).
-include("test.hrl").
-include("record_info.hrl").
-import(record_info, [record_to_proplist/2]).
-import(record_info, [proplist_to_record/3]).
-export_record_info([rec]).
-export_record_info([rec2]).
-record(rec, {
a = 1 :: integer(),
b = 2 :: integer()
}).
-re... |
d4eeb136a7c5cfa3507524a7c8c7f526421eb8b8556a095348c00e6043687149 | dfinity-side-projects/winter | LEB128.hs | # LANGUAGE BinaryLiterals #
# LANGUAGE TypeApplications #
module Wasm.Binary.LEB128 where
import Control.Monad
import Data.Binary.Get
import Data.Binary.Put
import Data.Bits
import Data.Bool
import Data.Int
import Text.Printf
getULEB128 :: (Bits a... | null | https://raw.githubusercontent.com/dfinity-side-projects/winter/2cc31576fe029d85c37d21fc9ea4902c5c64b5a9/src/Wasm/Binary/LEB128.hs | haskell | # LANGUAGE BinaryLiterals #
# LANGUAGE TypeApplications #
module Wasm.Binary.LEB128 where
import Control.Monad
import Data.Binary.Get
import Data.Binary.Put
import Data.Bits
import Data.Bool
import Data.Int
import Text.Printf
getULEB128 :: (Bits a... | |
261280ab3921bb9fae78a8b510dc3edba6e4686812149d2b53b8723f7ec95553 | m4b/rdr | ElfProgramHeader.ml | type program_header32 =
{
p_type: int [@size 4];
p_offset: int [@size 4];
p_vaddr: int [@size 4];
p_paddr: int [@size 4];
p_filesz: int [@size 4];
p_memsz: int [@size 4];
p_flags: int [@size 4];
p_align: int [@size 4];
}
let sizeof_program_header32 = 8 * 4
64 bit
type program_hea... | null | https://raw.githubusercontent.com/m4b/rdr/2bf1f73fc317cd74f8c7cacd542889df729bd003/lib/elf/ElfProgramHeader.ml | ocaml | bytes
p type
Dynamic linking information
Auxiliary information
Reserved
Entry for header table itself
Thread-local storage segment
Number of defined types
Start of OS-specific
Indicates stack executability
Read-only after relocation
pax security header, _not_ in ELF header
End of OS-specific
... | type program_header32 =
{
p_type: int [@size 4];
p_offset: int [@size 4];
p_vaddr: int [@size 4];
p_paddr: int [@size 4];
p_filesz: int [@size 4];
p_memsz: int [@size 4];
p_flags: int [@size 4];
p_align: int [@size 4];
}
let sizeof_program_header32 = 8 * 4
64 bit
type program_hea... |
dc9b4156b221e8815177e4d4b6f1e9afda24e677324995e345b92f93e67cbcfa | wilkerlucio/multi-timer | core.cljs | (ns com.wsscode.multi-timer.core
(:require ["react" :as react]
[goog.object :as gobj]
[com.wsscode.multi-timer.ui :as ui]
[com.wsscode.multi-timer.rn-support :as support]
[com.wsscode.multi-timer.components.timer :as c.timer]
[fulcro.client :as fulcro]
... | null | https://raw.githubusercontent.com/wilkerlucio/multi-timer/efd2c04dc7f25249368bdabadc2a76d54a9bb5f8/src/com/wsscode/multi_timer/core.cljs | clojure | (ns com.wsscode.multi-timer.core
(:require ["react" :as react]
[goog.object :as gobj]
[com.wsscode.multi-timer.ui :as ui]
[com.wsscode.multi-timer.rn-support :as support]
[com.wsscode.multi-timer.components.timer :as c.timer]
[fulcro.client :as fulcro]
... | |
a81b7cf01112e633e35ac8646e714becab8d8b127de5cd1f510926d286bca658 | effectfully-ou/sketches | IO.hs | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Mineunifier.IO wh... | null | https://raw.githubusercontent.com/effectfully-ou/sketches/4fe60f38961300ff96f7a0713161f650ea40f0e7/mineunifier/src/Mineunifier/IO.hs | haskell | >>> :set -XDataKinds
>>> :set -XTypeApplications
>>> putStrLn $ displayBoard @('[ ["1", "1", "0"], ["x", "1", "0"] ])
1 1 0
x 1 0
>>> putStrLn $ displayBoard @('[ ["1", "1", "0"], ["?", "1", "0"] ])
<interactive>:546:13: error:
Probable fix: use a type annotation to specify what ‘r0’ should be.
The... | # LANGUAGE AllowAmbiguousTypes #
# LANGUAGE DataKinds #
# LANGUAGE FlexibleInstances #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PolyKinds #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE UndecidableInstances #
module Mineunifier.IO wh... |
6cbdc4ecc1a1e937fee655b292ceccb168e80d58ebaf11f6c73852dd24258899 | incoherentsoftware/defect-process | Think.hs | module Player.Think
( thinkPlayer
) where
import Control.Monad (when)
import Control.Monad.State (execState, gets, modify)
import Data.Maybe (isNothing)
import qualified Data.Set as S
import AppEnv
import Attack
import Msg
import Player
import Player.BufferedInputState
import Player.Gun
import ... | null | https://raw.githubusercontent.com/incoherentsoftware/defect-process/15f2569e7d0e481c2e28c0ca3a5e72d2c049b667/src/Player/Think.hs | haskell | module Player.Think
( thinkPlayer
) where
import Control.Monad (when)
import Control.Monad.State (execState, gets, modify)
import Data.Maybe (isNothing)
import qualified Data.Set as S
import AppEnv
import Attack
import Msg
import Player
import Player.BufferedInputState
import Player.Gun
import ... | |
ae1de1b89d86b4660b61f94da6a150290c36c4e03c0d47f595f7a5a03b26842f | REPROSEC/dolev-yao-star | Vale_Lib_MapTree.ml | open Prims
type ('a, 'isule) is_cmp = unit
type ('a, 'b) tree =
| Empty
| Node of 'a * 'b * Prims.nat * ('a, 'b) tree * ('a, 'b) tree
let uu___is_Empty : 'a 'b . ('a, 'b) tree -> Prims.bool =
fun projectee -> match projectee with | Empty -> true | uu___ -> false
let uu___is_Node : 'a 'b . ('a, 'b) tree -> Prims... | null | https://raw.githubusercontent.com/REPROSEC/dolev-yao-star/d97a8dd4d07f2322437f186e4db6a1f4d5ee9230/concrete/hacl-star-snapshot/ml/Vale_Lib_MapTree.ml | ocaml | open Prims
type ('a, 'isule) is_cmp = unit
type ('a, 'b) tree =
| Empty
| Node of 'a * 'b * Prims.nat * ('a, 'b) tree * ('a, 'b) tree
let uu___is_Empty : 'a 'b . ('a, 'b) tree -> Prims.bool =
fun projectee -> match projectee with | Empty -> true | uu___ -> false
let uu___is_Node : 'a 'b . ('a, 'b) tree -> Prims... | |
a8939abd0eac489b78ccb5297d0a504dba00a26cce30b6c71943c4b505429414 | sdiehl/elliptic-curve | SECP160K1.hs | module Data.Curve.Weierstrass.SECP160K1
( module Data.Curve.Weierstrass
, Point(..)
-- * SECP160K1 curve
, module Data.Curve.Weierstrass.SECP160K1
) where
import Protolude
import Data.Field.Galois
import GHC.Natural (Natural)
import Data.Curve.Weierstrass
--------------------------------------------------... | null | https://raw.githubusercontent.com/sdiehl/elliptic-curve/445e196a550e36e0f25bd4d9d6a38676b4cf2be8/src/Data/Curve/Weierstrass/SECP160K1.hs | haskell | * SECP160K1 curve
-----------------------------------------------------------------------------
Types
-----------------------------------------------------------------------------
| SECP160K1 curve.
| Field of points of SECP160K1 curve.
| Field of coefficients of SECP160K1 curve.
# INLINABLE a_ #
# INLINABLE h_ #
... | module Data.Curve.Weierstrass.SECP160K1
( module Data.Curve.Weierstrass
, Point(..)
, module Data.Curve.Weierstrass.SECP160K1
) where
import Protolude
import Data.Field.Galois
import GHC.Natural (Natural)
import Data.Curve.Weierstrass
data SECP160K1
type Fq = Prime Q
type Q = 0xfffffffffffffffffffffffffff... |
cc16c856513c137d6bc9167997d0d0f15104a28d3e55987b73dbb2e9a20c039d | Eduap-com/WordMat | nregex.lisp | -*- Mode : Lisp ; Package : USER ; -*-
;;;
;;; This code was written by:
;;;
< >
National Science Center Foundation
Augusta , Georgia 30909
;;;
;;; If you modify this code, please comment your modifications
;;; clearly and inform the author of any improvements so they
;;; can be incorporated in fu... | null | https://raw.githubusercontent.com/Eduap-com/WordMat/83c9336770067f54431cc42c7147dc6ed640a339/Windows/ExternalPrograms/maxima-5.45.1/share/maxima/5.45.1/src/nregex.lisp | lisp | Package : USER ; -*-
This code was written by:
If you modify this code, please comment your modifications
clearly and inform the author of any improvements so they
can be incorporated in future releases.
nregex.lisp - My 4/8/92 attempt at a Lisp based regular expression
parser.
... | < >
National Science Center Foundation
Augusta , Georgia 30909
(eval-when #-gcl(:compile-toplevel :load-toplevel :execute)
#+gcl(load compile eval)
(defpackage :maxima-nregex
(:use :common-lisp)
(:export
Vars
#:*regex-debug* #:*regex-groups* #:*regex-groupings*
... |
745780b35aa55a90e42fdc7cc52991f63c8ba8b4c1cb7ceffd5c0ef0eab58835 | basho/riak_kv | riak_kv_wm_object.erl | %% -------------------------------------------------------------------
%%
riak_kv_wm_object : Webmachine resource for KV object level operations .
%%
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
%%
This file is provided to you under the Apache License ,
%% Version 2.0 (the "Licens... | null | https://raw.githubusercontent.com/basho/riak_kv/e04bc998e2f48e083a875e290ca242f2d699830d/src/riak_kv_wm_object.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 permissi... | riak_kv_wm_object : Webmachine resource for KV object level operations .
Copyright ( c ) 2007 - 2013 Basho Technologies , Inc. All Rights Reserved .
This file is provided to you under the Apache License ,
except in compliance with the License . You may obtain
software distributed under the License is dist... |
3d882aa1d734db496111ab9da60c344101a5e5dfe7f425d9f741f074ad556a9d | nklein/userial | package.lisp | Copyright ( c ) 2011 nklein software
MIT License . See included LICENSE.txt file for licensing details .
(defpackage :userial-tests
(:use :cl :userial)
(:export :run-tests))
| null | https://raw.githubusercontent.com/nklein/userial/dc34fc73385678a61c39e98f77a4443433eedb1d/userial/tests/package.lisp | lisp | Copyright ( c ) 2011 nklein software
MIT License . See included LICENSE.txt file for licensing details .
(defpackage :userial-tests
(:use :cl :userial)
(:export :run-tests))
| |
605914bd5aca5e762be795de398285eb5c9e1173139d0c1dd44e4674d5039394 | jabber-at/ejabberd-contrib | fusco_cp_tests.erl | %%% ----------------------------------------------------------------------------
( C ) 2013 , Erlang Solutions Ltd
@author Corbacho < >
@doc Client Pool tests
%%% @end
%%%-----------------------------------------------------------------------------
-module(fusco_cp_tests).
-include_lib("eunit/include/eunit.... | null | https://raw.githubusercontent.com/jabber-at/ejabberd-contrib/d5eb036b786c822d9fd56f881d27e31688ec6e91/ejabberd_auth_http/deps/fusco/test/fusco_cp_tests.erl | erlang | ----------------------------------------------------------------------------
@end
----------------------------------------------------------------------------- | ( C ) 2013 , Erlang Solutions Ltd
@author Corbacho < >
@doc Client Pool tests
-module(fusco_cp_tests).
-include_lib("eunit/include/eunit.hrl").
-define(POOL, fusco_pool).
client_pool_test_() ->
{foreach,
fun() ->
{ok, Pid} = fusco_cp:start({"127.0.0.1", 5050, false}, [], 3),
... |
dee918581be68463b2dde658301c008f798e23f448499b392a90fc49260f7534 | aryx/syncweb | code.ml | Copyright 2009 - 2017 , see copyright.txt
open Common
(*****************************************************************************)
(* Prelude *)
(*****************************************************************************)
(*****************************************************************************)
(* Typ... | null | https://raw.githubusercontent.com/aryx/syncweb/8cc3f10599bf65ab57947950f30cb6b18d83db14/frontend/code.ml | ocaml | ***************************************************************************
Prelude
***************************************************************************
***************************************************************************
Types
**************************************************************************... | Copyright 2009 - 2017 , see copyright.txt
open Common
type t = codetree list
and codetree =
| RegularCode of string
| ChunkCode of
chunk_info *
and chunk_info = {
chunk_key: string;
chunk_md5sum: Signature.t option;
mutable pretty_print: position option;
... |
1f2bf85956f789b547f28b098d49c881fa33506f1f671fe24aec7ed45d616d1c | hyperledger-labs/fabric-chaincode-ocaml | FabricChaincodeShim.ml | include Shim
module Protobuf = Protobuf
| null | https://raw.githubusercontent.com/hyperledger-labs/fabric-chaincode-ocaml/bef9008ce8a20fb5155a855dc860f9062340b829/fabric-chaincode-shim/src/FabricChaincodeShim.ml | ocaml | include Shim
module Protobuf = Protobuf
| |
87fd79fa8fd73e2e3aadb27e3ee25001e1356054ee9c968dfff9128aef41da30 | rescript-lang/rescript-compiler | bsb_file_groups.mli | Copyright ( C ) 2018 - Hongbo Zhang , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) an... | null | https://raw.githubusercontent.com/rescript-lang/rescript-compiler/3aedb24ebbc3583adb04f65812fbfc49fb24cb5e/jscomp/bsb/bsb_file_groups.mli | ocaml | false means not in dev mode
output of [generators] should be added to [sources],
if it is [.ml,.mli,.res,.resi]
| Copyright ( C ) 2018 - Hongbo Zhang , Authors of ReScript
*
* This program is free software : you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation , either version 3 of the License , or
* ( at your option ) an... |
665e31a6f201cc10100766da850691f009a028cc1ef7b6951b5f71314be6751f | astrada/ocaml-extjs | ext_Date.mli | * A set of useful static methods to deal with dateNo ...
{ % < p > A set of useful static methods to deal with date
Note that if < a href="#!/api / Ext . Date " rel="Ext . Date " class="docClass">Ext . Date</a > is required and loaded , it will copy all methods / properties to
this object for convenience</p ... | null | https://raw.githubusercontent.com/astrada/ocaml-extjs/77df630a75fb84667ee953f218c9ce375b3e7484/lib/ext_Date.mli | ocaml | * {% <p>Date interval constant</p> %}
Defaults to: ["d"]
* {% <p>Date interval constant</p> %}
Defaults to: ["h"]
* {% <p>Date interval constant</p> %}
Defaults to: ["ms"]
* {% <p>Date interval constant</p> %}
Defaults to: ["mi"]
* {% <p>Date interval constant</p>... | * A set of useful static methods to deal with dateNo ...
{ % < p > A set of useful static methods to deal with date
Note that if < a href="#!/api / Ext . Date " rel="Ext . Date " class="docClass">Ext . Date</a > is required and loaded , it will copy all methods / properties to
this object for convenience</p ... |
269c851aff30c702e44a0073898bb8eeffb71f15f9e7ca1f0737dc714832ad9b | LeapYear/aeson-schemas | UnwrapQQ.hs | # LANGUAGE DataKinds #
# LANGUAGE QuasiQuotes #
# LANGUAGE TypeApplications #
module Tests.UnwrapQQ where
import qualified Data.Text as Text
import Test.Tasty
import Test.Tasty.HUnit
import Text.RawString.QQ (r)
import Data.Aeson.Schema (Object, get)
import TestUtils (json, testParseError)
import Tests.UnwrapQQ.TH
... | null | https://raw.githubusercontent.com/LeapYear/aeson-schemas/7693390d8f84da6498470ec0a61768a871967abc/test/Tests/UnwrapQQ.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE QuasiQuotes #
# LANGUAGE TypeApplications #
module Tests.UnwrapQQ where
import qualified Data.Text as Text
import Test.Tasty
import Test.Tasty.HUnit
import Text.RawString.QQ (r)
import Data.Aeson.Schema (Object, get)
import TestUtils (json, testParseError)
import Tests.UnwrapQQ.TH
... | |
f45d9fed33357d66f4181b51111388f745b80ad919d1a504d5328cd495c4a54e | JustusAdam/language-haskell | T0131.hs | SYNTAX TEST " source.haskell " " LiquidHaskell annotations "
@ incr : : x : { v : v > x } @
< --------------------------------------- block.liquidhaskell.haskell
^^ keyword.operator.double-colon.haskell
-- ^^ keyword.operator.arrow.haskell
-- -------------------------------- - comment.... | null | https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tickets/T0131.hs | haskell | ------------------------------------- block.liquidhaskell.haskell
^^ keyword.operator.arrow.haskell
-------------------------------- - comment.block.haskell
^^^ - keyword.type.operator.haskell | SYNTAX TEST " source.haskell " " LiquidHaskell annotations "
@ incr : : x : { v : v > x } @
^^ keyword.operator.double-colon.haskell
incr :: Int -> Int
incr x = x + 1
|
15c10902030259602dcf2b1d5e639a7dcec356593df03dca6ccab071f1457993 | scslab/gitstar | Config.hs | # LANGUAGE CPP #
#if PRODUCTION
{-# LANGUAGE Safe #-}
#endif
| This module exports the gitstar ssh server API location and
-- authorization. It is important that the real file not be added
-- to the git repo
module Config ( gitstar_ssh_web_url
, gitstar_ssh_web_authorization ) where
import qualified D... | null | https://raw.githubusercontent.com/scslab/gitstar/589663b54d26468a9407be3d9d5ffa4dfa4962a8/Config.hs | haskell | # LANGUAGE Safe #
authorization. It is important that the real file not be added
to the git repo
| Authorization for accessing server | # LANGUAGE CPP #
#if PRODUCTION
#endif
| This module exports the gitstar ssh server API location and
module Config ( gitstar_ssh_web_url
, gitstar_ssh_web_authorization ) where
import qualified Data.ByteString.Char8 as S8
import qualified Data.ByteString.Base64 as B64
| Url to the gitstar ssh API s... |
83c7f2ad8881eb19406ada3c1c2956f4a429328e346f4160f71668e9992b1ec2 | mzp/coq-for-ipad | printtyp.ml | (***********************************************************************)
(* *)
(* Objective Caml *)
(* *)
and , projet Crist... | null | https://raw.githubusercontent.com/mzp/coq-for-ipad/4fb3711723e2581a170ffd734e936f210086396e/src/ocaml-3.12.0/typing/printtyp.ml | ocaml | *********************************************************************
Objective Caml
... | and , projet Cristal , INRIA Rocquencourt
Copyright 1996 Institut National de Recherche en Informatique et
en Automatique . All rights reserved . This file is distributed
under the terms of the Q Public License version 1.0 .
$ I d : printtyp.ml 10333 2010 - 04 - 30 07:11:27Z ... |
a2d245824198744ab4dc6125ebc1a1efeeb147b83c88720bfffdd2e55bf5e7bc | AllAlgorithms/racket | array-median.rkt | #lang racket
(provide list-median
vector-median)
(define (list-median ls)
(let ([ls (sort ls <)]
[len (length ls)]
[avg (lambda (a b) (exact->inexact (/ (+ a b) 2)))])
(if (odd? len)
(list-ref ls (/ (sub1 len) 2))
(avg (list-ref ls (sub1 (/ len 2)))
(list-ref ls (... | null | https://raw.githubusercontent.com/AllAlgorithms/racket/46b2a4b963b0536351273ee8068f58fed4884dde/algorithms/dynamic-programming/array-median.rkt | racket | #lang racket
(provide list-median
vector-median)
(define (list-median ls)
(let ([ls (sort ls <)]
[len (length ls)]
[avg (lambda (a b) (exact->inexact (/ (+ a b) 2)))])
(if (odd? len)
(list-ref ls (/ (sub1 len) 2))
(avg (list-ref ls (sub1 (/ len 2)))
(list-ref ls (... | |
fcfeccf8f22c1ccd7cee8f8af4ed223db590044f0df5c8ad0aa4b793492ff851 | uim/uim | test-intl.scm | Copyright ( c ) 2003 - 2013 uim Project
;;;
;;; All rights reserved.
;;;
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
1 . Redistributions of source code must retain the above copyright
;;; notice, this ... | null | https://raw.githubusercontent.com/uim/uim/d1ac9d9315ff8c57c713b502544fef9b3a83b3e5/test/test-intl.scm | scheme |
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
notice, this list of conditions and the following disclaimer.
notice, this list of conditions and the following disclaimer in the
document... | Copyright ( c ) 2003 - 2013 uim Project
1 . Redistributions of source code must retain the above copyright
2 . Redistributions in binary form must reproduce the above copyright
3 . Neither the name of authors nor the names of its contributors
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTOR... |
7af6516ace7a2b1fe81a77cb26b2b1303a0d0644d52e410fd13a1fea23115452 | racket/typed-racket | new-metrics.rkt | #lang typed/racket/shallow
(provide results run-all-tests)
(require (except-in scheme/list count) scheme/math scheme/path mzlib/match
(prefix-in srfi13: srfi/13) scheme/file
(for-syntax scheme/base))
(require/typed (prefix-in srfi48: srfi/48)
[srfi48:format ( Port String String Any *... | null | https://raw.githubusercontent.com/racket/typed-racket/1dde78d165472d67ae682b68622d2b7ee3e15e1e/typed-racket-test/succeed/shallow/new-metrics.rkt | racket | ============================================================
collects-path : a path to the collects directory to compare
planet-code-path : a path to the "other" code to compare (i.e. unpacked, most recent versions
of all planet packages)
============================================================
STATS
compu... | #lang typed/racket/shallow
(provide results run-all-tests)
(require (except-in scheme/list count) scheme/math scheme/path mzlib/match
(prefix-in srfi13: srfi/13) scheme/file
(for-syntax scheme/base))
(require/typed (prefix-in srfi48: srfi/48)
[srfi48:format ( Port String String Any *... |
a00df78a9ce4ec0b9166a521547018a7a44210e5adca17c5c3445ecd72778004 | metabase/metabase | application.clj | (ns metabase-enterprise.advanced-permissions.api.application
"`/advanced-permisisons/application` Routes.
Implements the Permissions routes needed for application permission - a class of permissions that control access to features
like access Setting pages, access monitoring tools ... etc"
(:require
[compoju... | null | https://raw.githubusercontent.com/metabase/metabase/7e3048bf73f6cb7527579446166d054292166163/enterprise/backend/src/metabase_enterprise/advanced_permissions/api/application.clj | clojure | (ns metabase-enterprise.advanced-permissions.api.application
"`/advanced-permisisons/application` Routes.
Implements the Permissions routes needed for application permission - a class of permissions that control access to features
like access Setting pages, access monitoring tools ... etc"
(:require
[compoju... | |
d56d81633b38f163db201eb1cc0134876a401f42e2e84378cf9c2e17f0308c3b | ninenines/gun | gun_raw.erl | Copyright ( c ) 2019 - 2023 , < >
%%
%% Permission to use, copy, modify, and/or distribute this software for any
%% purpose with or without fee is hereby granted, provided that the above
%% copyright notice and this permission notice appear in all copies.
%%
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISC... | null | https://raw.githubusercontent.com/ninenines/gun/33223e751267c5f249f3db1277c13904a1801b92/src/gun_raw.erl | erlang |
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVE... | Copyright ( c ) 2019 - 2023 , < >
THE SOFTWARE IS PROVIDED " AS IS " AND THE AUTHOR DISCLAIMS ALL WARRANTIES
ANY SPECIAL , DIRECT , INDIRECT , OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE , DATA OR PROFITS , WHETHER IN AN
-module(gun_raw).
-export([check_options/1]).
-expor... |
92c1045418ce2957b54899b911a73ae1f63bd5ddb23d63d9c5dd92e09bf4f616 | zk/nsfw | devbus.cljs | (ns nsfw.devbus
(:require [nsfw.util :as nu]
[taoensso.timbre :as log :include-macros true]
[datascript.transit :as dt]
[cljs.test
:refer-macros [deftest is
testing run-tests
async]]
[cljs.core.async
... | null | https://raw.githubusercontent.com/zk/nsfw/ea07ba20cc5453b34a56b34c9d8738bf9bf8e92f/src/cljs/nsfw/devbus.cljs | clojure | (ns nsfw.devbus
(:require [nsfw.util :as nu]
[taoensso.timbre :as log :include-macros true]
[datascript.transit :as dt]
[cljs.test
:refer-macros [deftest is
testing run-tests
async]]
[cljs.core.async
... | |
045340405543b93da9b4f17c4dc5f92a6ccc444d2590079c0fbe14df5258e1f8 | roelvandijk/numerals | TestData.hs | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2@ ] -
[ @ISO639 - 3@ ] caf
[ @Native name@ ] Dakeł ( ᑕᗸᒡ )
[ @English name@ ] Southern Carrier
[@ISO639-1@] -
[@ISO639-2@] -
[@ISO639-3@] caf
[@Native name@] Dakeł (ᑕᗸᒡ)
[@English name@] Southern Carrier
-... | null | https://raw.githubusercontent.com/roelvandijk/numerals/b1e4121e0824ac0646a3230bd311818e159ec127/src-test/Text/Numeral/Language/CAF/TestData.hs | haskell | ------------------------------------------------------------------------------
Imports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
Test data
---------------------------------------------------------------... | |
[ @ISO639 - 1@ ] -
[ @ISO639 - 2@ ] -
[ @ISO639 - 3@ ] caf
[ @Native name@ ] Dakeł ( ᑕᗸᒡ )
[ @English name@ ] Southern Carrier
[@ISO639-1@] -
[@ISO639-2@] -
[@ISO639-3@] caf
[@Native name@] Dakeł (ᑕᗸᒡ)
[@English name@] Southern Carrier
-... |
02fa2dde32572aff58768ec3310590a91389b2e497cced8c1322f86cbb221199 | cljfx/cljfx | tree_table_column.clj | (ns cljfx.fx.tree-table-column
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle]
[cljfx.coerce :as coerce]
[cljfx.fx.table-column-base :as fx.table-column-base]
[cljfx.fx.tree-table-cell :as fx.tree-table-cell]
... | null | https://raw.githubusercontent.com/cljfx/cljfx/543f7409290051e9444771d2cd86dadeb8cdce33/src/cljfx/fx/tree_table_column.clj | clojure | overrides
definitions
has private default | (ns cljfx.fx.tree-table-column
"Part of a public API"
(:require [cljfx.composite :as composite]
[cljfx.lifecycle :as lifecycle]
[cljfx.coerce :as coerce]
[cljfx.fx.table-column-base :as fx.table-column-base]
[cljfx.fx.tree-table-cell :as fx.tree-table-cell]
... |
f36990ce55eb96f18464340fd789a7ca715dc651b8b2c1f92f6a2e9a9eedc506 | soegaard/web-tutorial | server.rkt | #lang racket/base
;;;
;;; Server
;;;
; This file configures a web-server.
; Starts the web-server.
Opens the start page in a browser .
(require web-server/dispatch web-server/servlet-env
"control.rkt")
(define-values (listit-dispatch listit-url)
(dispatch-rules
[("") dispatch-on-action]
[el... | null | https://raw.githubusercontent.com/soegaard/web-tutorial/511a03410a440ed32475484ae93483f4ddd6656c/listit2/server.rkt | racket |
Server
This file configures a web-server.
Starts the web-server.
Note: If you want to use the repl and have the web-server running in the
background, you can start the server in a new thread:
(thread (λ () (start))) | #lang racket/base
Opens the start page in a browser .
(require web-server/dispatch web-server/servlet-env
"control.rkt")
(define-values (listit-dispatch listit-url)
(dispatch-rules
[("") dispatch-on-action]
[else dispatch-on-action]))
(define (start)
(serve/servlet listit-dispatch
... |
334c366f925b8e57312110530873887ba25ba12399a30d7ff52b6df5bd050933 | soegaard/metapict | root-spiral.rkt | #lang racket
(require metapict)
;;; EXAMPLE
;;; Inspiration:
;;; -helix/
(def max-r 86)
(def dark-green (make-color* 175 193 36))
(def almost-black (make-color* 50 50 50))
(define (shade r) ; white -> dark-green -> almost-black
(cond
[(<= 0 r 1/2) (color-med (* 2 r) "white" dark-green )]... | null | https://raw.githubusercontent.com/soegaard/metapict/47ae265f73cbb92ff3e7bdd61e49f4af17597fdf/metapict/examples/root-spiral.rkt | racket | EXAMPLE
Inspiration:
-helix/
white -> dark-green -> almost-black | #lang racket
(require metapict)
(def max-r 86)
(def dark-green (make-color* 175 193 36))
(def almost-black (make-color* 50 50 50))
(cond
[(<= 0 r 1/2) (color-med (* 2 r) "white" dark-green )]
[(<= r 1) (color-med (* 2 (- r 1/2)) dark-green almost-black )]
[else (error 'shad... |
ea8e31600d56181da0ee1ccf86f41e37ef49dc19371a8a6985584bb5419fc406 | dradtke/Lisp-Text-Editor | glib.gerror.lisp | (in-package :glib)
(defcstruct g-error
(:domain g-quark)
(:code :int)
(:message (:string :free-from-foreign nil)))
(defcfun g-error-new-literal :pointer
(domain g-quark)
(code :int)
(message :string))
(defcfun g-error-free :void
(error :pointer))
(defcfun g-error-copy :pointer
(error :pointer))
(de... | null | https://raw.githubusercontent.com/dradtke/Lisp-Text-Editor/b0947828eda82d7edd0df8ec2595e7491a633580/cl-gtk2/glib/glib.gerror.lisp | lisp | const gchar *format,
...);
GError *src,
const gchar *format,
... | (in-package :glib)
(defcstruct g-error
(:domain g-quark)
(:code :int)
(:message (:string :free-from-foreign nil)))
(defcfun g-error-new-literal :pointer
(domain g-quark)
(code :int)
(message :string))
(defcfun g-error-free :void
(error :pointer))
(defcfun g-error-copy :pointer
(error :pointer))
(de... |
39fdb42de8570024499e5960f563ae7af1b3836952ca0971d3df88f3e5e47c4b | rayiner/amd64-asm | mach-o-binaries.lisp | macho-binaries.lisp
; Support for generating mach-o object files
(in-package "AMD64-ASM")
(defconstant +mh-magic-64+ #xFEEDFACF)
(defconstant +cpu-type-x86-64+ #x01000007)
(defconstant +cpu-subtype-all+ 3)
(defconstant +mh-object+ 1)
(defconstant +mh-def-flags+ #x0)
(defconstant +lc-segment-64+ #x19)
(defconstant +... | null | https://raw.githubusercontent.com/rayiner/amd64-asm/27ac3e683557d691cd68472c94d110f32334f61a/mach-o-binaries.lisp | lisp | Support for generating mach-o object files
mach-o file map
code section data
data section data
relocation entries
symbol table entries
string table | macho-binaries.lisp
(in-package "AMD64-ASM")
(defconstant +mh-magic-64+ #xFEEDFACF)
(defconstant +cpu-type-x86-64+ #x01000007)
(defconstant +cpu-subtype-all+ 3)
(defconstant +mh-object+ 1)
(defconstant +mh-def-flags+ #x0)
(defconstant +lc-segment-64+ #x19)
(defconstant +mh-def-prot+ #x7)
(defconstant +mh-def-text-f... |
e4fbb93489efaa611c183b81ce4f3b6349cef1e07c67fd798dd71b60310632f3 | Opetushallitus/ataru | suoritus_client.clj | (ns ataru.suoritus.suoritus-client
(:require [ataru.cas.client :as cas-client]
[ataru.config.url-helper :as url]
[cheshire.core :as json]
[clj-time.format :as format]
[clojure.core.match :refer [match]]
[clojure.string :as string]))
(def yo-komo "1.2.246.56... | null | https://raw.githubusercontent.com/Opetushallitus/ataru/a84743140d2a7c879572583ec412166f829fc030/src/clj/ataru/suoritus/suoritus_client.clj | clojure | (ns ataru.suoritus.suoritus-client
(:require [ataru.cas.client :as cas-client]
[ataru.config.url-helper :as url]
[cheshire.core :as json]
[clj-time.format :as format]
[clojure.core.match :refer [match]]
[clojure.string :as string]))
(def yo-komo "1.2.246.56... | |
355b54925ccea849c4e010250ca0aa3bbcb4559ee3228d4070ac84fe13205e92 | xxyzz/SICP | Exercise_4_35.rkt | #lang sicp
;; -lang.org/sicp-manual/Installation.html
(define (require p) (if (not p) (amb)))
(define (an-integer-between a b)
(require (<= a b))
(amb a (an-integer-between (+ a 1) b)))
(an-integer-between 1 5)
1
| null | https://raw.githubusercontent.com/xxyzz/SICP/e26aea1c58fd896297dbf5406f7fcd32bb4f8f78/4_Metalinguistic_Abstraction/4.3_Variations_on_a_Scheme_Nondeterministic_Computing/Exercise_4_35.rkt | racket | -lang.org/sicp-manual/Installation.html | #lang sicp
(define (require p) (if (not p) (amb)))
(define (an-integer-between a b)
(require (<= a b))
(amb a (an-integer-between (+ a 1) b)))
(an-integer-between 1 5)
1
|
4134edfb4ef8335cc6eb35a3b9c7d57c6fd797e3dc2dd577060144cdad0df3e1 | seanhess/robotquest | Types.hs | # LANGUAGE OverloadedStrings , DeriveGeneric , DeriveDataTypeable #
module Botland.Types where
import qualified Data.Aeson as A
import Data.Aeson (FromJSON(..), ToJSON(..), object, (.=), (.:), Value(..))
import qualified Data.Aeson.Types as AT
import Data.Aeson.Types (Parser)
import Data.Bson (Val(..), Value(..))
imp... | null | https://raw.githubusercontent.com/seanhess/robotquest/98328579d6bbfad2cd678811a9759c907cf6b268/Botland/Types.hs | haskell | DATA TYPES ---------------------------------------------------------------
heartbeat doesn't need to be a part of the client-side logic, just in the db
this is roughly what it looks like in the database
{x, y, _id, color, playerId, name, source}
sometimes you just need to talk about a point
gives the field and in... | # LANGUAGE OverloadedStrings , DeriveGeneric , DeriveDataTypeable #
module Botland.Types where
import qualified Data.Aeson as A
import Data.Aeson (FromJSON(..), ToJSON(..), object, (.=), (.:), Value(..))
import qualified Data.Aeson.Types as AT
import Data.Aeson.Types (Parser)
import Data.Bson (Val(..), Value(..))
imp... |
316b4de579ba0d89e49dc0ebd68f59018226feb13aba21fd81eeff17348f404e | ulisses/Static-Code-Analyzer | StrategyPrelude.hs | ------------------------------------------------------------------------------
-- |
Maintainer : ,
-- Stability : experimental
-- Portability : portable
--
This module is part of ' StrategyLib ' , a library of functional strategy
-- combinators, including combinators for generic traversal. This module
-- is... | null | https://raw.githubusercontent.com/ulisses/Static-Code-Analyzer/4c3f6423d43e1bccb9d1cf04e74ae60d9170186f/Analyzer/Strafunski/Data/Generics/Strafunski/StrategyLib/StrategyPrelude.hs | haskell | ----------------------------------------------------------------------------
|
Stability : experimental
Portability : portable
combinators, including combinators for generic traversal. This module
is basically a wrapper for the strategy primitives plus some extra
basic strategy combinators that can be defined ... | Maintainer : ,
This module is part of ' StrategyLib ' , a library of functional strategy
module Strafunski.Data.Generics.Strafunski.StrategyLib.StrategyPrelude (
module Strafunski.Data.Generics.Strafunski.StrategyLib.StrategyPrimitives,
module Strafunski.Data.Generics.Strafunski.StrategyLib.StrategyPrel... |
ffb1da72e87d82454d7faa9d3798a360388811ee3a74dff144c988267fc66dd9 | JustusAdam/language-haskell | T0028b.hs | SYNTAX TEST " source.haskell " " Highlighting type signature before do arrow "
someFunc :: IO ()
someFunc = do
result <- ioAction
result :: Int <- ioAction
^^^ storage.type.haskell
-- ^^ keyword.operator.arrow.left.haskell
( result :: Int ) <- ioAction
^^^ storage.type.hask... | null | https://raw.githubusercontent.com/JustusAdam/language-haskell/c9ee1b3ee166c44db9ce350920ba502fcc868245/test/tickets/T0028b.hs | haskell | ^^ keyword.operator.arrow.left.haskell
^^ keyword.operator.arrow.left.haskell | SYNTAX TEST " source.haskell " " Highlighting type signature before do arrow "
someFunc :: IO ()
someFunc = do
result <- ioAction
result :: Int <- ioAction
^^^ storage.type.haskell
( result :: Int ) <- ioAction
^^^ storage.type.haskell |
8b761c68c5383fb3d5283994f97ba48e6276aafe436e10cfabcaafbb9da0a074 | mentat-collective/emmy | exponent_test.cljc | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.polynomial.exponent-test
(:require [clojure.test :refer [is deftest testing]]
[clojure.test.check.generators :as gen]
[com.gfredericks.test.chuck.clojure-test :refer [checking]]
[emmy.generators :as sg]
[emmy.polynomial.exp... | null | https://raw.githubusercontent.com/mentat-collective/emmy/535b237a8e3fd7067b9c0ade8b2a4b3419f9f132/test/emmy/polynomial/exponent_test.cljc | clojure | #_"SPDX-License-Identifier: GPL-3.0"
(ns emmy.polynomial.exponent-test
(:require [clojure.test :refer [is deftest testing]]
[clojure.test.check.generators :as gen]
[com.gfredericks.test.chuck.clojure-test :refer [checking]]
[emmy.generators :as sg]
[emmy.polynomial.exp... | |
924c21f33b8d97e3a329a0bc7bcbb380d8d68616433312d06cce3b8f019bdb09 | lichtblau/CommonQt | marshal.lisp | ;;; -*- show-trailing-whitespace: t; indent-tabs-mode: nil -*-
Copyright ( c ) 2009 . All rights reserved .
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
;;; are met:
;;;
;;; * Redistributions of source code must ret... | null | https://raw.githubusercontent.com/lichtblau/CommonQt/fa14472594b2b2b34695ec3fff6f858a03ec5813/marshal.lisp | lisp | -*- show-trailing-whitespace: t; indent-tabs-mode: nil -*-
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the ... |
Copyright ( c ) 2009 . All rights reserved .
DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR CONSEQUENTIAL
INTERRUPTION ) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY ,
(in-package :qt)
(named-readtables:in-readtable :qt)
(defun resolve-cast (<from> <to>)
(let* ((module (ldb-module <from>))
... |
588b49e502277ee62604d656371a77e6df705162e32751adc3ff8620d73c41ec | discoproject/disco | worker_utils.erl | -module(worker_utils).
-include("common_types.hrl").
-include("disco.hrl").
-include("pipeline.hrl").
-export([annotate_input/1]).
-spec annotate_input(data_input()) -> {ok, data_input()} | {error, term()}.
annotate_input({data, _} = I) ->
% Note: we could compute data_size() here if really needed.
{ok, I};
... | null | https://raw.githubusercontent.com/discoproject/disco/be65272d3eecca184a3c8f2fa911b86ac87a4e8a/master/src/worker_utils.erl | erlang | Note: we could compute data_size() here if really needed.
TODO: We need to handle dir files with the old format,
i.e. without sizes. | -module(worker_utils).
-include("common_types.hrl").
-include("disco.hrl").
-include("pipeline.hrl").
-export([annotate_input/1]).
-spec annotate_input(data_input()) -> {ok, data_input()} | {error, term()}.
annotate_input({data, _} = I) ->
{ok, I};
annotate_input({dir, {Host, DirUrl, []}}) ->
Url = disco:dir... |
6af5d7c30e8a27865cfb15a20bcc879bc85ce3501b3c588a61e94e652a804068 | oakes/Nightweb | core.clj | (ns nightweb-desktop.core
(:gen-class)
(:require [clojure.java.io :as java.io]
[nightweb.router :as router]
[nightweb-desktop.server :as server]
[nightweb-desktop.utils :as utils]
[nightweb-desktop.window :as window]))
(defn get-data-dir
[]
(let [home-dir (System... | null | https://raw.githubusercontent.com/oakes/Nightweb/089c7a99a9a875fde33cc29d56e1faf54dc9de84/desktop/src/nightweb_desktop/core.clj | clojure | (ns nightweb-desktop.core
(:gen-class)
(:require [clojure.java.io :as java.io]
[nightweb.router :as router]
[nightweb-desktop.server :as server]
[nightweb-desktop.utils :as utils]
[nightweb-desktop.window :as window]))
(defn get-data-dir
[]
(let [home-dir (System... | |
f679aeef3f95586f1bbb1d11bad5e705dbf06221417f6e4a873548b7891a2bfd | gonzojive/sbcl | macros.lisp | ;;;; macros, global variable definitions, and other miscellaneous support stuff
used by the rest of the PCL subsystem
This software is part of the SBCL system . See the README file for
;;;; more information.
This software is derived from software originally released by Xerox
;;;; Corporation. Copyright and rele... | null | https://raw.githubusercontent.com/gonzojive/sbcl/3210d8ed721541d5bba85cbf51831238990e33f1/src/pcl/macros.lisp | lisp | macros, global variable definitions, and other miscellaneous support stuff
more information.
Corporation. Copyright and release statements follow. Later modifications
to the software are in the public domain and are provided with
absolutely no warranty. See the COPYING and CREDITS files for more
information.
Al... | used by the rest of the PCL subsystem
This software is part of the SBCL system . See the README file for
This software is derived from software originally released by Xerox
copyright information from original PCL sources :
Copyright ( c ) 1985 , 1986 , 1987 , 1988 , 1989 , 1990 Xerox Corporation .
deriva... |
d357833867589dc3d1b6fb833fa350bd2c0cb7a1d0ba1e11fa762b735ee541db | droundy/iolaus-broken | Exec.hs | Copyright ( C ) 2003
--
-- 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 , or ( at your option )
-- any later version.
--
-- This program is distributed in the hope that it... | null | https://raw.githubusercontent.com/droundy/iolaus-broken/e40c001f3c5a106bf39f437d6349858e7e9bf51e/Iolaus/Exec.hs | haskell |
This program is free software; you can redistribute it and/or modify
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 General Public License for more... | Copyright ( C ) 2003
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 , or ( at your option )
You should have received a copy of the GNU General Public License
the Free Software Foundation , Inc. , 51 Franklin Street , Fifth Floor ,
Bosto... |
570df2c3381efd75af2bc08e51a2adf7a82d947dfc6f046023251cd3652652d1 | softlab-ntua/bencherl | pcmark.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 Lice... | null | https://raw.githubusercontent.com/softlab-ntua/bencherl/317bdbf348def0b2f9ed32cb6621e21083b7e0ca/bench/pcmark/src/pcmark.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 limitat... | 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 "
Author :
Created : 17 Dec 2009 by Björn... |
706b35f1de60c7623f766317270a285c53a939a4dd14bd196f65d7fca976b5a8 | flora-pm/flora-server | File.hs | module Log.Backend.File where
import Data.Aeson qualified as Aeson
import Data.ByteString.Char8 qualified as BS
import Data.ByteString.Lazy qualified as BSL
import Data.Kind (Type)
import Effectful
import Effectful.Log qualified as Log
import GHC.Generics (Generic)
import Log (Logger)
import Log.Internal.Logger (withL... | null | https://raw.githubusercontent.com/flora-pm/flora-server/c214c0b5d5db71a8330eb69326284be5a4d5e858/src/orphans/Log/Backend/File.hs | haskell | module Log.Backend.File where
import Data.Aeson qualified as Aeson
import Data.ByteString.Char8 qualified as BS
import Data.ByteString.Lazy qualified as BSL
import Data.Kind (Type)
import Effectful
import Effectful.Log qualified as Log
import GHC.Generics (Generic)
import Log (Logger)
import Log.Internal.Logger (withL... | |
84adbf1c9959c4d27b013f4b4e08c5b2597fc0dd1d4649d3eeddf838f452cabf | DavidAlphaFox/RabbitMQ | rabbit_federation_status.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 WA... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/rabbitmq-federation/src/rabbit_federation_status.erl | erlang | 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.
We don't want to key off the entire upstream, bits of it may change | 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
Software distributed under the License is distributed on an " AS IS "
The Original Code is RabbitMQ Federation .
The Initial Developer of the Original Code is GoPivota... |
7753929492dd683c0d73aaee4f2f44a7e1c34796fd297a368850dd78f07ec1b5 | SKA-ScienceDataProcessor/RC | Namespace.hs | module Namespace where
import Control.Monad ( liftM, filterM )
import System.Directory
import System.FilePath
data NSType = RAM | Persistent
isRam :: NSType -> Bool
isRam RAM = True
isRam _ = False
createNameSpace :: NSType -> FilePath -> IO FilePath
createNameSpace nstyp fp = do
let dirs = case nstyp of
... | null | https://raw.githubusercontent.com/SKA-ScienceDataProcessor/RC/1b5e25baf9204a9f7ef40ed8ee94a86cc6c674af/MS3/Sketches/Utils/Namespace.hs | haskell | module Namespace where
import Control.Monad ( liftM, filterM )
import System.Directory
import System.FilePath
data NSType = RAM | Persistent
isRam :: NSType -> Bool
isRam RAM = True
isRam _ = False
createNameSpace :: NSType -> FilePath -> IO FilePath
createNameSpace nstyp fp = do
let dirs = case nstyp of
... | |
4ee652e0ce367c65420a96d7522f1258c00bfa73c54198479ca4ef44fa66f9e9 | fp-works/2019-winter-Haskell-school | HomeworkSpec.hs | module HomeworkSpec where
import Homework
import Test.Hspec
spec :: Spec
spec = do
describe "toDigits" $ do
it "returns an empty list for a negative integer" $ do
toDigits (-1) `shouldBe` []
it "returns an empty list for 0" $ do
toDigits 0 `shouldBe` []
it "returns al ist for an integer" $ do
... | null | https://raw.githubusercontent.com/fp-works/2019-winter-Haskell-school/823b67f019b9e7bc0d3be36711c0cc7da4eba7d2/cis194/week1/stevemao/test/HomeworkSpec.hs | haskell | module HomeworkSpec where
import Homework
import Test.Hspec
spec :: Spec
spec = do
describe "toDigits" $ do
it "returns an empty list for a negative integer" $ do
toDigits (-1) `shouldBe` []
it "returns an empty list for 0" $ do
toDigits 0 `shouldBe` []
it "returns al ist for an integer" $ do
... | |
afee60d041733fca516b92f3b67ad6107cca356756dc2e77c4fa37244842a265 | cruxlang/crux | Pos.hs | module Crux.Pos where
data ParsePos = ParsePos
{ ppLineStart :: Int
, ppLine :: Int
, ppColumn :: Int
}
deriving (Show)
-- TODO: we should record the start and end positions of tokens
All of these numbers are one - based , because that 's how editors standardized .
( Except emacs . Emacs use... | null | https://raw.githubusercontent.com/cruxlang/crux/883f642d15fb85ce17d9c485ee91158d9e826a2f/Crux/Pos.hs | haskell | TODO: we should record the start and end positions of tokens
by one.)
TODO: eliminate references to dummyPos | module Crux.Pos where
data ParsePos = ParsePos
{ ppLineStart :: Int
, ppLine :: Int
, ppColumn :: Int
}
deriving (Show)
All of these numbers are one - based , because that 's how editors standardized .
( Except emacs . Emacs users will have to deal with column numbers being off
data PosRec =... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.