_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 |
|---|---|---|---|---|---|---|---|---|
dbdc027ccce4390068e86c74a4fb17fc286a963b6ce826bbbbdf7f6b09f90dd3 | mflatt/shrubbery-rhombus-0 | definition-syntax.rkt | #lang racket/base
(require (for-syntax racket/base
syntax/parse
syntax/boundmap
enforest/proc-name
"srcloc.rkt"
"tail.rkt")
"name-root.rkt"
"definition.rkt"
"syntax.rkt"
"parse.rk... | null | https://raw.githubusercontent.com/mflatt/shrubbery-rhombus-0/b6ee40b64b19623d5a8c1ee735378761fd25110a/rhombus/private/definition-syntax.rkt | racket | ----------------------------------------
---------------------------------------- | #lang racket/base
(require (for-syntax racket/base
syntax/parse
syntax/boundmap
enforest/proc-name
"srcloc.rkt"
"tail.rkt")
"name-root.rkt"
"definition.rkt"
"syntax.rkt"
"parse.rk... |
df33dfacc493cd8477f28dc6d5b6924e344d8b0d5724970b8bff5122ae205661 | ners/dosh | Server.hs | {-# OPTIONS_GHC -Wno-name-shadowing #-}
# OPTIONS_GHC -Wno - orphans #
module Dosh.LSP.Server where
import Development.IDE (Recorder (..), WithPriority, noLogging)
import Development.IDE.Main (Arguments (..), Log, defaultArguments, defaultMain)
import Dosh.Prelude
import Ide.Types (IdePlugins (IdePlugins))
import Lan... | null | https://raw.githubusercontent.com/ners/dosh/6214b24ad595abc34ba6fb02dd9722bcd31eb8ce/src/Dosh/LSP/Server.hs | haskell | # OPTIONS_GHC -Wno-name-shadowing #
TODO: can we get rid of handles altogether? | # OPTIONS_GHC -Wno - orphans #
module Dosh.LSP.Server where
import Development.IDE (Recorder (..), WithPriority, noLogging)
import Development.IDE.Main (Arguments (..), Log, defaultArguments, defaultMain)
import Dosh.Prelude
import Ide.Types (IdePlugins (IdePlugins))
import Language.LSP.Test qualified as LSP
import R... |
f8b9900f3700f084bb939a5c7d788f81b06a385487b03e40ed47dde3dc02ef9b | mmontone/erudite | package.lisp | (defpackage #:erudite
(:use #:cl #:cl-ppcre)
(:export #:erudite
#:*short-comments-prefix*
#:*syntax*
#:*output-type*
#:*title*
#:*subtitle*
#:*catch-errors-p*
#:*verbose*
#:*debug*
#:*code-indexing*
#:*erudite-package*
#:*implicit-doc*
#:*implicit-code*)
(:documenta... | null | https://raw.githubusercontent.com/mmontone/erudite/d421f4ed27faa636d5d4d768c4b64274023d63b2/package.lisp | lisp | (defpackage #:erudite
(:use #:cl #:cl-ppcre)
(:export #:erudite
#:*short-comments-prefix*
#:*syntax*
#:*output-type*
#:*title*
#:*subtitle*
#:*catch-errors-p*
#:*verbose*
#:*debug*
#:*code-indexing*
#:*erudite-package*
#:*implicit-doc*
#:*implicit-code*)
(:documenta... | |
5a5ba42fc58968395d41dc2f40ed7700bab5bbca0a759fe42e96ffb4033d1811 | aoh/led | led.scm | #!/usr/bin/ol --run
;;;
;;; LED - lisp editor
;;;
;
; This is the entry file of led. In addition to compiling led, you can start it
; with ol --run led/led.scm [flags here]. This is typically used while developing
; led by running 'bin/ol --run led/led.scm -L out .', so that you can read log messages.
;
(define versi... | null | https://raw.githubusercontent.com/aoh/led/e012b34b743f936ceb9ffc590be3ad4f0d4c596a/led/led.scm | scheme |
LED - lisp editor
This is the entry file of led. In addition to compiling led, you can start it
with ol --run led/led.scm [flags here]. This is typically used while developing
led by running 'bin/ol --run led/led.scm -L out .', so that you can read log messages.
Visual mode actions and utilities
movement ar... | #!/usr/bin/ol --run
(define version-str "led v0.2.1")
(define usage-text "led [args] [file-or-directory] ...")
(define *expected-owl-version* "0.2.2a")
(if (not (equal? *owl-version* *expected-owl-version*))
(begin
(print-to stderr "Warning: expected owl version " *expected-owl-version* ", but running in ... |
9c025968f98564921069aa8a1cfe9f7e3c172c2b4a05a93d9eea41c48cc4f053 | jeromesimeon/Galax | compile_update.ml | (***********************************************************************)
(* *)
(* GALAX *)
(* XQuery Engine *)
(* ... | null | https://raw.githubusercontent.com/jeromesimeon/Galax/bc565acf782c140291911d08c1c784c9ac09b432/compile/compile_update.ml | ocaml | *********************************************************************
GALAX
XQuery Engine
... | Copyright 2001 - 2007 .
$ I d : compile_update.ml , v 1.10 2007/02/01 22:08:45 simeon Exp $
open Xquery_core_ast
open Xquery_core_ast_util
open Xquery_algebra_ast
open Xquery_algebra_ast_util
open Compile_context
open Compile_expr
open Compile_util
open Namespac... |
0092090b7b6201d5d4c0919d31c0d94548c4054bf1525a670cf3669b61cd5698 | cchalmers/diagrams | Attributes.hs | # LANGUAGE CPP #
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveFunctor #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamType... | null | https://raw.githubusercontent.com/cchalmers/diagrams/d091a3727817905eea8eeabc1e284105f618db21/src/Diagrams/TwoD/Attributes.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE DeriveDataTypeable #
# LANGUAGE DeriveFunctor #
# LANGUAGE TemplateHaskell #
# LANGUAGE UndecidableInstances #
---------------------------------------------------------------------------
|
Module : Diagrams.TwoD.Attributes
... | # LANGUAGE CPP #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies ... |
53548f890df2d7d79ee4d2980e23c4bf83965664ebc8b4ac9ffaa2cb481c6869 | erlang/rebar3 | rebar_pkg_repos_SUITE.erl | Test suite for the handling hexpm repo configurations
-module(rebar_pkg_repos_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include("rebar.hrl").
all() ->
[default_repo, repo_merging, repo_replacing,
auth_read_write_read, auth_remove_fr... | null | https://raw.githubusercontent.com/erlang/rebar3/048412ed4593e19097f4fa91747593aac6706afb/apps/rebar/test/rebar_pkg_repos_SUITE.erl | erlang | should continue anyway
should continue anyway
should continue anyway
should continue anyway
tests that even though an easier repo has C-1.3.1 it doesn't use it since its hash is different
allow prerelease through configuration
| Test suite for the handling hexpm repo configurations
-module(rebar_pkg_repos_SUITE).
-compile(export_all).
-include_lib("common_test/include/ct.hrl").
-include_lib("eunit/include/eunit.hrl").
-include("rebar.hrl").
all() ->
[default_repo, repo_merging, repo_replacing,
auth_read_write_read, auth_remove_fr... |
dc12bbb32ef99051b704680dae112b4807ff1a0630069161fa4908fe603a1e77 | GumTreeDiff/cgum | ograph.mli |
* Copyright 2014 , INRIA
*
* This file is part of Cgen . Much of it comes from Coccinelle , which is
* also available under the GPLv2 license
*
* Cgen 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 So... | null | https://raw.githubusercontent.com/GumTreeDiff/cgum/8521aa80fcf4873a19e60ce8c846c886aaefb41b/commons/ograph.mli | ocaml |
* Copyright 2014 , INRIA
*
* This file is part of Cgen . Much of it comes from Coccinelle , which is
* also available under the GPLv2 license
*
* Cgen 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 So... | |
0137316fb066744ad6036d3d7eecca6e85476234144565b7576e27a954251a2e | 0install/0install | host_python.ml | Copyright ( C ) 2017 , the README file for details , or visit .
* See the README file for details, or visit .
*)
open Support
open Support.Common
module Q = Support.Qdom
module FeedAttr = Constants.FeedAttr
type info = {
path : filepath;
version : string;
}
type package_set = {
python : info;
p... | null | https://raw.githubusercontent.com/0install/0install/22eebdbe51a9f46cda29eed3e9e02e37e36b2d18/src/zeroinstall/host_python.ml | ocaml | * Get quick-test-file and quick-test-mtime from path.
Ensure we round the same way as in [is_installed_quick]
(hopefully)
We support Python on platforms with unsupported package managers
by running it manually and parsing the output. Ideally we would
cache this information on disk. | Copyright ( C ) 2017 , the README file for details , or visit .
* See the README file for details, or visit .
*)
open Support
open Support.Common
module Q = Support.Qdom
module FeedAttr = Constants.FeedAttr
type info = {
path : filepath;
version : string;
}
type package_set = {
python : info;
p... |
f8aa6939307491e01e82eaf6f5fb5a4c8dc86326578bb55422b21836bf0cb5b9 | conal/lambda-ccc | Reify.hs | # LANGUAGE TemplateHaskell , TypeOperators , GADTs , KindSignatures #
# LANGUAGE ViewPatterns , PatternGuards , LambdaCase #
# LANGUAGE FlexibleContexts , ConstraintKinds #
# LANGUAGE MagicHash , MultiWayIf , TupleSections , CPP #
{-# LANGUAGE Rank2Types #-}
# OPTIONS_GHC -Wall #
# OPTIONS_GHC -fno - warn - unused - i... | null | https://raw.githubusercontent.com/conal/lambda-ccc/141a713456d447d27dbe440fa27a9372cd44dc7f/src/LambdaCCC/Unused/Reify.hs | haskell | # LANGUAGE Rank2Types #
--------------------------------------------------------------------
|
Module : LambdaCCC.Reify
LICENSE : BSD3
Maintainer :
Stability : experimental
--------------------------------------------------------------------
hiding (apply)
May need this one later
-------------... | # LANGUAGE TemplateHaskell , TypeOperators , GADTs , KindSignatures #
# LANGUAGE ViewPatterns , PatternGuards , LambdaCase #
# LANGUAGE FlexibleContexts , ConstraintKinds #
# LANGUAGE MagicHash , MultiWayIf , TupleSections , CPP #
# OPTIONS_GHC -Wall #
# OPTIONS_GHC -fno - warn - unused - imports #
# OPTIONS_GHC -fno ... |
7ae20c0ca8f7716d1ee6548486b36f368555857f76735739e272aa538fb5a082 | Liqwid-Labs/liqwid-plutarch-extra | FixedDecimal.hs | module Plutarch.Extra.FixedDecimal (
FixedDecimal (..),
fixedNumerator,
fixedDenominator,
emul,
ediv,
toFixedZero,
fromFixedZero,
convertExp,
PFixedDecimal (..),
pfixedNumerator,
pfixedDenominator,
pemul,
pediv,
ptoFixedZero,
pfromFixedZero,
pconvertExp,
pfromFixedDecimal,
ptoFixedDe... | null | https://raw.githubusercontent.com/Liqwid-Labs/liqwid-plutarch-extra/79604ece6d24c1e5d6e11c02e88f9e7907a19399/src/Plutarch/Extra/FixedDecimal.hs | haskell | ---- Haskell
--
> PString :--> PString)
> PFixedDecimal exp)
> PInteger)
> PFixedDecimal exp)
> PRational)
> PFixedDecimal exp) | module Plutarch.Extra.FixedDecimal (
FixedDecimal (..),
fixedNumerator,
fixedDenominator,
emul,
ediv,
toFixedZero,
fromFixedZero,
convertExp,
PFixedDecimal (..),
pfixedNumerator,
pfixedDenominator,
pemul,
pediv,
ptoFixedZero,
pfromFixedZero,
pconvertExp,
pfromFixedDecimal,
ptoFixedDe... |
d27d224bddf516340d67d593fd5ad3a0cc2e8417b488bfebf30183f08cd0f6c1 | pgj/mirage-kfreebsd | lwt.ml | Lightweight thread library for
* Module Lwt
* Copyright ( C ) 2005 - 2008
* Laboratoire PPS - CNRS Université Paris Diderot
* 2009 - 2012
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License... | null | https://raw.githubusercontent.com/pgj/mirage-kfreebsd/0ff5b2cd7ab0975e3f2ee1bd89f8e5dbf028b102/packages/lwt/src/core/lwt.ml | ocaml | +-----------------------------------------------------------------+
| Types |
+-----------------------------------------------------------------+
Type of data carried by threads
A type + a thread of this type.
a_thread = exists 'a. 'a t
Pack a thr... | Lightweight thread library for
* Module Lwt
* Copyright ( C ) 2005 - 2008
* Laboratoire PPS - CNRS Université Paris Diderot
* 2009 - 2012
*
* This program is free software ; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License... |
693e6b8a850a8d8ff80a79fccb537c39dd3daf3d615ec4495ec46d8a7e510698 | alt-romes/slfl | tree3.hs | data BinTree a = Nil | Node (a * BinTree a * BinTree a);
synth map :: ((a -o b) -> BinTree a -o BinTree b);
| null | https://raw.githubusercontent.com/alt-romes/slfl/4956fcce8ff2ca7622799fe0715c118b568b74eb/STLLC/bench/tree3.hs | haskell | data BinTree a = Nil | Node (a * BinTree a * BinTree a);
synth map :: ((a -o b) -> BinTree a -o BinTree b);
| |
1e5ccffd536fc817bf3bead14d2d3462b1292b07f5ecf3f19ac2a6baab9e2f44 | mfikes/self-host-etl-pipeline | user.clj | (ns user
(:require
[tubular.core]))
(defn connect []
(tubular.core/connect 49723))
| null | https://raw.githubusercontent.com/mfikes/self-host-etl-pipeline/239ec11487b977962fc8eee25f566910b3236ecf/dev/user.clj | clojure | (ns user
(:require
[tubular.core]))
(defn connect []
(tubular.core/connect 49723))
| |
b29b2d270f7727180b0b1710d8ab61d04e999277f6ca702c2352f846aaed4144 | stchang/pasterack | pasterack-parsing-utils.rkt | #lang racket
(require syntax/stx syntax/parse)
(require "pasterack-utils.rkt")
;; parsing utility functions used by pasterack.org
(provide (all-defined-out))
;; lang regexp patterns
(define hashlang-pat #px"^\\#lang ([\\w/\\-\\+]+)\\s*(.*)")
(define weblang-pat #px"^web-server.*")
(define scribblelang-pat #px"^scrib... | null | https://raw.githubusercontent.com/stchang/pasterack/b78ca8ea227222f762fd4d6d744a8a40f111ff4d/pasterack-parsing-utils.rkt | racket | parsing utility functions used by pasterack.org
lang regexp patterns
Returns #t if str has "#lang" somewhere.
ie maps htdp/bsl -> lang/htdp-beginner
for now, only accept certain forms
(ie reject strings)
returns list of datums
not identifier always means %#app, %#datum, or %#top (?)
ie, an expression?
(fprint... | #lang racket
(require syntax/stx syntax/parse)
(require "pasterack-utils.rkt")
(provide (all-defined-out))
(define hashlang-pat #px"^\\#lang ([\\w/\\-\\+]+)\\s*(.*)")
(define weblang-pat #px"^web-server.*")
(define scribblelang-pat #px"^scribble/.*")
(define htdplang-pat #px"^lang/htdp-(.*)")
(define TRlang-pat #px"... |
2890060d88f22b8f6573370867b48a8c0c10402905eed6a39b311f72f982f567 | volhovm/orgstat | Timeline.hs | # LANGUAGE RankNTypes , ScopedTypeVariables , TemplateHaskell #
-- | Timeline reporting output. Prouces a svg with columns.
module OrgStat.Outputs.Timeline
( processTimeline
) where
import Data.Colour.CIE (luminance)
import Data.List (lookup, nub)
import qualified Data.List as L
import qualified Data.T... | null | https://raw.githubusercontent.com/volhovm/orgstat/292fd909b4ea16e2fdf12c0fd6f85ecaa86f5579/src/OrgStat/Outputs/Timeline.hs | haskell | | Timeline reporting output. Prouces a svg with columns.
--------------------------------------------------------------------------
Processing clocks
--------------------------------------------------------------------------
[(a, [b])] -> [(a, b)]
total time for each task
list of leaves
let path = pr <> "/" <> _or... | # LANGUAGE RankNTypes , ScopedTypeVariables , TemplateHaskell #
module OrgStat.Outputs.Timeline
( processTimeline
) where
import Data.Colour.CIE (luminance)
import Data.List (lookup, nub)
import qualified Data.List as L
import qualified Data.Text as T
import Data.Time (Day, DiffTime, LocalTime(..), def... |
d243531bd6c39bac11c56756b32c7b712cb90ed89be427537303139592b19a41 | micahcantor/comp-to-assembly-from-scratch-hs | Expr.hs | module Expr where
import Data.Text (Text)
data Expr
= Number Integer
| Identifier Text
| Boolean Bool
| ArrayLiteral [Expr]
| ArrayLookup Expr Expr -- array, index
| Length Expr
| Null
| Undefined
| Not Expr
| Equal Expr Expr
| NotEqual Expr Expr
| Add Expr Expr
| Subtract Expr Expr
| Mult... | null | https://raw.githubusercontent.com/micahcantor/comp-to-assembly-from-scratch-hs/5871ac187d24399483119c9e8e7f3fd7e786cecd/src/Expr.hs | haskell | array, index
name, args
name, params, body
name, value
name, value
condition, body | module Expr where
import Data.Text (Text)
data Expr
= Number Integer
| Identifier Text
| Boolean Bool
| ArrayLiteral [Expr]
| Length Expr
| Null
| Undefined
| Not Expr
| Equal Expr Expr
| NotEqual Expr Expr
| Add Expr Expr
| Subtract Expr Expr
| Multiply Expr Expr
| Divide Expr Expr
| Re... |
23b8bac0b546f6dc7133a1edf74942d3197bd9b58b11e9ca3725026a538401d9 | xu-hao/QueryArrow | Auxiliary.hs | # LANGUAGE FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , OverloadedStrings , GADTs , ExistentialQuantification , TypeApplications , ScopedTypeVariables #
module QueryArrow.FFI.Auxiliary where
import QueryArrow.Syntax.Term
import QueryArrow.Syntax.Type
import QueryArrow.Semantics.TypeChecker
import Qu... | null | https://raw.githubusercontent.com/xu-hao/QueryArrow/4dd5b8a22c8ed2d24818de5b8bcaa9abc456ef0d/QueryArrow-ffi-service/src/QueryArrow/FFI/Auxiliary.hs | haskell | # LANGUAGE FlexibleContexts , MultiParamTypeClasses , FlexibleInstances , OverloadedStrings , GADTs , ExistentialQuantification , TypeApplications , ScopedTypeVariables #
module QueryArrow.FFI.Auxiliary where
import QueryArrow.Syntax.Term
import QueryArrow.Syntax.Type
import QueryArrow.Semantics.TypeChecker
import Qu... | |
d9f7c0cdfc667604edd3ea15170c8efa9670eeb051daa4ac1da735d515e4adcf | sirherrbatka/vellum | tests.lisp | (cl:in-package #:vellum)
(prove:plan 5)
(let* ((frame-1 (transform (make-table :columns '(a b))
(vellum:bind-row (a b)
(setf a vellum.table:*current-row*)
(setf b (format nil "a~a" a)))
:end 5))
(fra... | null | https://raw.githubusercontent.com/sirherrbatka/vellum/6c13df927e2a9ea7060de85c171277baea88a5ca/src/api/tests.lisp | lisp | (cl:in-package #:vellum)
(prove:plan 5)
(let* ((frame-1 (transform (make-table :columns '(a b))
(vellum:bind-row (a b)
(setf a vellum.table:*current-row*)
(setf b (format nil "a~a" a)))
:end 5))
(fra... | |
89eb0d3effab2a09d2a626410de815358fa209ea6971a8b2907ac4086f1aba10 | bendoerr/real-world-haskell | AlgebraicVector.hs | -- file: ch03/AlgebraicVector.hs
-- x and y coordinates or lengths.
data Cartesian2D = Cartesian2D Double Double
deriving (Eq, Show)
-- Angle and distance (magnitude).
data Polar2D = Polar2D Double Double
deriving (Eq, Show)
| null | https://raw.githubusercontent.com/bendoerr/real-world-haskell/fa43aa59e42a162f5d2d5655b274b964ebeb8f0a/ch03/AlgebraicVector.hs | haskell | file: ch03/AlgebraicVector.hs
x and y coordinates or lengths.
Angle and distance (magnitude).
| data Cartesian2D = Cartesian2D Double Double
deriving (Eq, Show)
data Polar2D = Polar2D Double Double
deriving (Eq, Show)
|
8d17b570644b2e66ecfb0aec1053750695534ec7ab53b6de018a87959e4b587e | smtcoq/smtcoq | verit_checker.ml | (**************************************************************************)
(* *)
(* SMTCoq *)
Copyright ( C ) 2011 - 2022
(* ... | null | https://raw.githubusercontent.com/smtcoq/smtcoq/de9c46d059ddd38c0c1922d91cb788c3d550d488/src/extraction/verit_checker.ml | ocaml | ************************************************************************
SMTCoq
... | Copyright ( C ) 2011 - 2022
See file " " for the list of authors
open Smtcoq_plugin
let error_hole = "The proof contains a hole, which is not supported by the current version of the extracted checker; in a future version, a warning will... |
7d5d679ba6a56d786cb969debb2f28d4e15ed38aefcf57c8432662fcb31a6755 | haskell-effectful/effectful | Static.hs | -- | Support for access to a read only value of a particular type.
module Effectful.Reader.Static
( -- * Effect
Reader
-- ** Handlers
, runReader
, withReader
-- ** Operations
, ask
, asks
, local
) where
import Effectful
import Effectful.Dispatch.Static
| Provide access to a strict ( WH... | null | https://raw.githubusercontent.com/haskell-effectful/effectful/4a40f8db404cb4e494d9ba642fc65e59cff8829a/effectful-core/src/Effectful/Reader/Static.hs | haskell | | Support for access to a read only value of a particular type.
* Effect
** Handlers
** Operations
| Run a 'Reader' effect with the given initial environment.
^ The initial environment.
| Execute a computation in a modified environment.
@since 1.1.0.0
^ The function to modify the environment.
^ Computation t... | module Effectful.Reader.Static
Reader
, runReader
, withReader
, ask
, asks
, local
) where
import Effectful
import Effectful.Dispatch.Static
| Provide access to a strict ( WHNF ) , thread local , read only value of type
@r@.
data Reader r :: Effect
type instance DispatchOf (Reader r) = Static ... |
cc624cb7e64a42bfb69835e3c5076c86baa32d1d1a828875d7e95b6ecf73cbef | gfour/gic | DFI.hs | -- | The defunctionalization interfaces needed to combine defunctionalization with
-- support for partial compilation.
--
DFI serialization is done with auto - deriving Read / Show for the required
-- data types.
--
module SLIC.DFI (DfConstrs, DFI(..), DfInfo(..), DFC(..), ExtAppFuns,
LARInf... | null | https://raw.githubusercontent.com/gfour/gic/d5f2e506b31a1a28e02ca54af9610b3d8d618e9a/SLIC/DFI.hs | haskell | | The defunctionalization interfaces needed to combine defunctionalization with
support for partial compilation.
data types.
* Defunctionalization interfaces
| A closure constructor.
^ closure constructor name
^ binding arity
^ type
^ original function (and its type)
| A set of closure constructors.
... | DFI serialization is done with auto - deriving Read / Show for the required
module SLIC.DFI (DfConstrs, DFI(..), DfInfo(..), DFC(..), ExtAppFuns,
LARInfo(..), addApp, calcExtDFInfo, dfiFile, dfiFor,
dfiSuffix, emptyDfInfo, getMainDepth, mergeDFIs, mergeLARInfo,
me... |
48c3f493b0c53acbd5a0147c9d0aef91b282cacfa63372cd2736158e30b5548b | weavejester/hiccup | form.clj | (ns hiccup.form
"Functions for generating HTML forms and input fields."
(:require [hiccup.def :refer [defelem]]
[hiccup.util :as util]))
(def ^:dynamic ^:no-doc *group* [])
(defmacro with-group
"Group together a set of related form fields for use with the Ring
nested-params middleware."
[group &... | null | https://raw.githubusercontent.com/weavejester/hiccup/80e48352dd2bce5277ccdd06334cfb9be915afb4/src/hiccup/form.clj | clojure | (ns hiccup.form
"Functions for generating HTML forms and input fields."
(:require [hiccup.def :refer [defelem]]
[hiccup.util :as util]))
(def ^:dynamic ^:no-doc *group* [])
(defmacro with-group
"Group together a set of related form fields for use with the Ring
nested-params middleware."
[group &... | |
99e40f6a6615f1eef37478a0ed8960d113b8dc49ccb2f5d4abf51ffaf9898467 | lambdaisland/glogi | glogi_test.cljs | (ns lambdaisland.glogi-test
(:require [lambdaisland.glogi :as log]
[clojure.test :refer [deftest testing is are use-fixtures run-tests join-fixtures]]))
(enable-console-print!)
(deftest smoke-test
(let [captured (atom [])
handler (fn [record] (swap! captured conj record))
example-val 5... | null | https://raw.githubusercontent.com/lambdaisland/glogi/96487504deafc25cceac4e1bd2f4de2c37b8711d/test/lambdaisland/glogi_test.cljs | clojure | Debug covers spy | (ns lambdaisland.glogi-test
(:require [lambdaisland.glogi :as log]
[clojure.test :refer [deftest testing is are use-fixtures run-tests join-fixtures]]))
(enable-console-print!)
(deftest smoke-test
(let [captured (atom [])
handler (fn [record] (swap! captured conj record))
example-val 5... |
75f86c4d18c50ced62b9c7603b12605609b83ff4598af215a64078e23a311c5c | mentat-collective/MathLive.cljs | build.clj | (ns build
"tools.build declarations for the mathlive.cljs library."
(:require [clojure.data.xml :as xml]
[clojure.tools.build.api :as b]
[clojure.tools.build.tasks.write-pom :as write-pom]))
(xml/alias-uri 'pom "")
(alter-var-root
#'write-pom/to-dep
(fn [old]
(fn [[_ {:keys [mvn/scope... | null | https://raw.githubusercontent.com/mentat-collective/MathLive.cljs/346536f57a1636e2516561f6044c547e081adf8b/build.clj | clojure | source for jar creation.
## Tasks | (ns build
"tools.build declarations for the mathlive.cljs library."
(:require [clojure.data.xml :as xml]
[clojure.tools.build.api :as b]
[clojure.tools.build.tasks.write-pom :as write-pom]))
(xml/alias-uri 'pom "")
(alter-var-root
#'write-pom/to-dep
(fn [old]
(fn [[_ {:keys [mvn/scope... |
c295d6eb7b066170da5b4e2878c4881ab5e9ee7ca84368ce9a7f6993f4865a21 | mpickering/apply-refact | Duplicate1.hs | main = do a; a; a; a; a; a | null | https://raw.githubusercontent.com/mpickering/apply-refact/a4343ea0f4f9d8c2e16d6b16b9068f321ba4f272/tests/examples/Duplicate1.hs | haskell | main = do a; a; a; a; a; a | |
a70bdc0bfdc2f3084e88c27d5ad4228f72405b2dbcd3d0c3bfc3d1406f54e321 | findmyway/reinforcement-learning-an-introduction | project.clj | (defproject rl "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "MIT License"
:url ""
:year 2016
:key "mit"}
:dependencies [[org.clojure/clojure "1.8.0"]
[philoskim/debux "0.2.1"]
[incanter "1.5.7"]
... | null | https://raw.githubusercontent.com/findmyway/reinforcement-learning-an-introduction/6911efbe7a6478658b188022ebad542751146ddd/project.clj | clojure | (defproject rl "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "MIT License"
:url ""
:year 2016
:key "mit"}
:dependencies [[org.clojure/clojure "1.8.0"]
[philoskim/debux "0.2.1"]
[incanter "1.5.7"]
... | |
91dfea47f571b4031dbb049a9c1fd2dcfbdc5b79a305d0ad4d0fecd448e8ed92 | danielecapo/sfont | simple-frames.rkt | #lang racket
(require "draw-property.rkt"
racket/gui/base
"../../main.rkt"
"../../utilities.rkt")
(provide
(contract-out
(animate (->* ((-> real? font?) natural-number/c natural-number/c) (real? real? (-> real? real?)) font?)))
animate-fonts
slider-application)
(struct world (cu... | null | https://raw.githubusercontent.com/danielecapo/sfont/c854f9734f15f4c7cd4b98e041b8c961faa3eef2/sfont/private/gui/simple-frames.rkt | racket | (Real -> Font) Real Real (Real -> Real) -> Font
Show an animation frame and return the last font in animation
The idea is that the user call animate with a function that accept a time parameter
and return a font at time t, start and end numbers, and an increment function.
I understand this is not a good way to do ... | #lang racket
(require "draw-property.rkt"
racket/gui/base
"../../main.rkt"
"../../utilities.rkt")
(provide
(contract-out
(animate (->* ((-> real? font?) natural-number/c natural-number/c) (real? real? (-> real? real?)) font?)))
animate-fonts
slider-application)
(struct world (cu... |
9120530c2d7ba982bbce7a6d04fbc86c5fb8b12dad5ab6e37f3b609d9f546be1 | gafiatulin/codewars | ProductOf?and!.hs | Exclamation marks series # 13 : Count the number of exclamation marks and question marks , return the product
--
module Kata (product') where
product' :: String -> Int
product' s = let f c s = length . filter (== c) $ s in (f '!' s) * (f '?' s)
| null | https://raw.githubusercontent.com/gafiatulin/codewars/535db608333e854be93ecfc165686a2162264fef/src/7%20kyu/ProductOf%3Fand!.hs | haskell | Exclamation marks series # 13 : Count the number of exclamation marks and question marks , return the product
module Kata (product') where
product' :: String -> Int
product' s = let f c s = length . filter (== c) $ s in (f '!' s) * (f '?' s)
| |
e9fe9adc722628bcaf5a977f5a51e92cc1e297dfd2906522e6a46bfdba561878 | epiccastle/spire | test_line_in_file.clj | (ns test-pod.test-line-in-file
(:require [test-pod.conf :as conf]
[test-pod.utils :as utils]
[clojure.test :refer [is deftest]]
[babashka.pods :as pods]
[babashka.process :refer [process check]]
[clojure.string :as string]
[clojure.java.io :as io... | null | https://raw.githubusercontent.com/epiccastle/spire/f1161ae5ff74124d603c1679507fc0a1b31c26eb/test/test_pod/test_line_in_file.clj | clojure | (ns test-pod.test-line-in-file
(:require [test-pod.conf :as conf]
[test-pod.utils :as utils]
[clojure.test :refer [is deftest]]
[babashka.pods :as pods]
[babashka.process :refer [process check]]
[clojure.string :as string]
[clojure.java.io :as io... | |
4f7a3ac35d85de2aff77f08645f73fadbbea1cb5961910aa72111822492dbed4 | feeley/etos | ast-comp.scm | ; file: "ast-comp.scm"
Copyright ( C ) 1998 - 1999 Universite de Montreal , All Rights Reserved .
AST compilation
(include "ast-build.scm")
(include "ast-analyze.scm")
(include "pm-comp.scm")
(include "scm-build.scm")
;; Compiles a side-effect free expression
returns # f if AST is not detected as a side - eff... | null | https://raw.githubusercontent.com/feeley/etos/da9f089c1a7232d97827f8aa4f4b0862b7c5551f/compiler/ast-comp.scm | scheme | file: "ast-comp.scm"
Compiles a side-effect free expression
Compiles a new bindings free expression
Only fcases may introduce new bindings
List of fully named remote calls
`(time ,x))
Compiles an AST to scheme code,
given: a continuation kont(scheme code)
(display "** ") (write (node-val1 ast)) (display "... |
Copyright ( C ) 1998 - 1999 Universite de Montreal , All Rights Reserved .
AST compilation
(include "ast-build.scm")
(include "ast-analyze.scm")
(include "pm-comp.scm")
(include "scm-build.scm")
returns # f if AST is not detected as a side - effect free expression
(define (compile-sexpr ast)
(case (node-typ... |
93ca5954a8a3aee642d4c8553997569358770fec2e232c145864ba84119420d0 | matthiasn/inspect | graphviz.cljs | (ns inspect.main.graphviz
(:require [viz.js :as Viz]
[fs :refer [writeFileSync]]))
(defn sanitize [cmp-id] (str "\"" cmp-id "\""))
(defn sub-graph [[label nodes]]
(let [cluster-name (str "cluster_" label)]
(str "subgraph " cluster-name " { label =< <B>" label " </B>>; "
(apply str (map (f... | null | https://raw.githubusercontent.com/matthiasn/inspect/963ae5e29fc1c836c620cfed67787f1b99c3fe0c/src/cljs/inspect/main/graphviz.cljs | clojure | (ns inspect.main.graphviz
(:require [viz.js :as Viz]
[fs :refer [writeFileSync]]))
(defn sanitize [cmp-id] (str "\"" cmp-id "\""))
(defn sub-graph [[label nodes]]
(let [cluster-name (str "cluster_" label)]
(str "subgraph " cluster-name " { label =< <B>" label " </B>>; "
(apply str (map (f... | |
3ef7c148b880e803517a293703b211ab4515b8d79c2f7d3c2f63ef5ac450f52c | atzeus/reflectionwithoutremorse | TermMonad.hs | # LANGUAGE ExistentialQuantification , GADTs #
module Fixed.TermMonad(TermM,TermMView(..), fromView, toView) where
import Data.Interface.TSequence
import Data.FastTCQueue
type TCQueue = FastTCQueue
newtype TermMCont r a b = TC (a -> TermM r b)
type TermCExp r a b = TCQueue (TermMCont r) a b
data TermMView r a where
... | null | https://raw.githubusercontent.com/atzeus/reflectionwithoutremorse/2ab000be1ddc49a2ec36afaaa58485df56aef654/Fixed/TermMonad.hs | haskell | # LANGUAGE ExistentialQuantification , GADTs #
module Fixed.TermMonad(TermM,TermMView(..), fromView, toView) where
import Data.Interface.TSequence
import Data.FastTCQueue
type TCQueue = FastTCQueue
newtype TermMCont r a b = TC (a -> TermM r b)
type TermCExp r a b = TCQueue (TermMCont r) a b
data TermMView r a where
... | |
75ee0bb74738cb91b6f9ae9665c22ce6d170242ed6c63734d5c6953ff4e137b3 | hyperfiddle/electric | element_syntax.cljc | (ns contrib.element-syntax
"Experimental electric-dom syntax contributed by @tatut. Unsupported, expect breaking changes,
use at your own risk!"
#?(:cljs (:require-macros [contrib.element-syntax :refer [<%]]))
(:require [clojure.string :as str]
[hyperfiddle.electric-dom2 :as dom]))
(defn element-cl... | null | https://raw.githubusercontent.com/hyperfiddle/electric/39b898831ad9234f842352385da21c67794ea080/src/contrib/element_syntax.cljc | clojure | Gotchas:
session-id -> user | (ns contrib.element-syntax
"Experimental electric-dom syntax contributed by @tatut. Unsupported, expect breaking changes,
use at your own risk!"
#?(:cljs (:require-macros [contrib.element-syntax :refer [<%]]))
(:require [clojure.string :as str]
[hyperfiddle.electric-dom2 :as dom]))
(defn element-cl... |
6fb0db61ed18ae193a96232b58cb7d5cf23feee1771a4f08440bccbef20698c0 | byorgey/diagrams-play | GraphvizLabels.hs | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Backend.Rasterific.CmdLine
import Diagrams.Prelude
import Diagrams.TwoD.GraphViz
import Data.GraphViz
import Data.GraphViz.Attributes.Complete
import Data.GraphViz.Commands
hex = mkGraph [0..19]
... | null | https://raw.githubusercontent.com/byorgey/diagrams-play/5362c715db394be6848ff5de1bbe71178e5f173f/GraphvizLabels.hs | haskell | (\_ _ _ _ _ p -> stroke p) | # LANGUAGE NoMonomorphismRestriction #
import Diagrams.Backend.Rasterific.CmdLine
import Diagrams.Prelude
import Diagrams.TwoD.GraphViz
import Data.GraphViz
import Data.GraphViz.Attributes.Complete
import Data.GraphViz.Commands
hex = mkGraph [0..19]
... |
ac3b096f6a7dff7b18655ec48ff3837925dda50cba7a97cc04b5dbdf52baa8c8 | CryptoKami/cryptokami-core | Socket.hs | | Web API parts of cryptokami - explorer
module Pos.Explorer.Socket
( module Socket
) where
import Pos.Explorer.Socket.App as Socket
import Pos.Explorer.Socket.Methods as Socket
import Pos.Explorer.Socket.Util as Socket
| null | https://raw.githubusercontent.com/CryptoKami/cryptokami-core/12ca60a9ad167b6327397b3b2f928c19436ae114/explorer/src/Pos/Explorer/Socket.hs | haskell | | Web API parts of cryptokami - explorer
module Pos.Explorer.Socket
( module Socket
) where
import Pos.Explorer.Socket.App as Socket
import Pos.Explorer.Socket.Methods as Socket
import Pos.Explorer.Socket.Util as Socket
| |
1eb5734bf78af711c1fc8aa7ca2043efc29cbc6e5c10838ec39872b4b8327aa1 | layerware/hugsql | clojure_java_jdbc.clj | (ns hugsql.adapter.clojure-java-jdbc
(:gen-class)
(:require [hugsql.adapter :as adapter]
[clojure.java.jdbc :as jdbc]))
(deftype HugsqlAdapterClojureJavaJdbc []
adapter/HugsqlAdapter
(execute [this db sqlvec options]
(if (some #(= % (:command options)) [:insert :i!])
(jdbc/db-do-prepared... | null | https://raw.githubusercontent.com/layerware/hugsql/052c04a2a6dc99c3c35810ddf83416c2fd93c5e5/hugsql-adapter-clojure-java-jdbc/src/hugsql/adapter/clojure_java_jdbc.clj | clojure | (ns hugsql.adapter.clojure-java-jdbc
(:gen-class)
(:require [hugsql.adapter :as adapter]
[clojure.java.jdbc :as jdbc]))
(deftype HugsqlAdapterClojureJavaJdbc []
adapter/HugsqlAdapter
(execute [this db sqlvec options]
(if (some #(= % (:command options)) [:insert :i!])
(jdbc/db-do-prepared... | |
18e6d81c5b2bffece123266972956fcdb880d839547a285065b35ef387cd4311 | andrewray/DefinitelyMaybeTyped | test_lib.ml | let w : Lib._Object Js.t = Js.Unsafe.variable "window"
let log s = Firebug.console##log(s)
let olog s = log (Js.string s)
(* check some Object methods *)
let () = log (w##toString(()))
let () = log (w##toLocaleString(()))
let hasProp s =
if w##hasOwnProperty(Js.string s) = Js._true then
log (Js.string ("has... | null | https://raw.githubusercontent.com/andrewray/DefinitelyMaybeTyped/088fbb99b1eea704d37e4897de7fe18531b66fc2/test/jsoo/test_lib.ml | ocaml | check some Object methods
String
Math
let math : Lib._Math Js.t = (Js.Unsafe.variable "window")##_Math
via a hack to lib.ml
Date
object literal for date object, not implemented | let w : Lib._Object Js.t = Js.Unsafe.variable "window"
let log s = Firebug.console##log(s)
let olog s = log (Js.string s)
let () = log (w##toString(()))
let () = log (w##toLocaleString(()))
let hasProp s =
if w##hasOwnProperty(Js.string s) = Js._true then
log (Js.string ("has property " ^ s))
else
log... |
77eba14e0c38cedb20437c82d98a8006d185b6fcda13832645ea13e3853d2f31 | v-kolesnikov/sicp | 1_16_test.clj | (ns sicp.chapter01.1-16-test
(:require [clojure.test :refer :all]
[sicp.test-helper :refer :all]
[sicp.chapter01.1-16 :refer :all]))
(deftest test-fast-expt
(assert-equal 1 (fast-expt 3 0))
(assert-equal 3 (fast-expt 3 1))
(assert-equal 27 (fast-expt 3 3))
(assert-equal 81 (fast-expt ... | null | https://raw.githubusercontent.com/v-kolesnikov/sicp/4298de6083440a75898e97aad658025a8cecb631/test/sicp/chapter01/1_16_test.clj | clojure | (ns sicp.chapter01.1-16-test
(:require [clojure.test :refer :all]
[sicp.test-helper :refer :all]
[sicp.chapter01.1-16 :refer :all]))
(deftest test-fast-expt
(assert-equal 1 (fast-expt 3 0))
(assert-equal 3 (fast-expt 3 1))
(assert-equal 27 (fast-expt 3 3))
(assert-equal 81 (fast-expt ... | |
2640f1528a13de36f9c8a33289f2c8440230c75a955fdce1a3ce0518de7db1ee | jackfirth/rebellion | windowing.rkt | #lang racket/base
(require racket/contract/base)
(provide
(contract-out
[windowing (->* (exact-positive-integer?) (#:into reducer?) transducer?)]))
(require racket/match
rebellion/base/impossible-function
rebellion/base/variant
rebellion/private/static-name
rebellion/collection... | null | https://raw.githubusercontent.com/jackfirth/rebellion/64f8f82ac3343fe632388bfcbb9e537759ac1ac2/streaming/transducer/private/windowing.rkt | racket | @------------------------------------------------------------------------------ | #lang racket/base
(require racket/contract/base)
(provide
(contract-out
[windowing (->* (exact-positive-integer?) (#:into reducer?) transducer?)]))
(require racket/match
rebellion/base/impossible-function
rebellion/base/variant
rebellion/private/static-name
rebellion/collection... |
e1efb49d8b4afc0a9f30a43158fceae791b8834c852042a9fbe91ff8eefbe7d4 | davidar/stochaskell | Main.hs | # LANGUAGE FlexibleContexts , MonadComprehensions , RebindableSyntax #
module Main where
import Language.Stochaskell
import Language.Stochaskell.Plot
kernel kappa eta part x y =
eta * exp (- kappa * ((x - y) / part)^2)
kernelCP :: Int -> R -> RVec -> R -> R -> R -> R -> R
kernelCP n t cs kappa eta x y = go 1 where... | null | https://raw.githubusercontent.com/davidar/stochaskell/d28f9245f5e07c004fb8fd3c828ac2e1cc561673/stochaskell/app/mgp/Main.hs | haskell |
kernelCP n t cs kappa eta x y =
if i == j then kernel kappa eta (cs' i - cs' (i-1)) x y else 0
where i = findSortedInsertIndex x cs
j = findSortedInsertIndex y cs
cs' i = if i == 0 then 0 else if i == integer (n+1) then t else (cs!i)
go 0 = matrix [ kernel kappa eta0 t (s!i) (s!j) | i <- 1...n, j ... | # LANGUAGE FlexibleContexts , MonadComprehensions , RebindableSyntax #
module Main where
import Language.Stochaskell
import Language.Stochaskell.Plot
kernel kappa eta part x y =
eta * exp (- kappa * ((x - y) / part)^2)
kernelCP :: Int -> R -> RVec -> R -> R -> R -> R -> R
kernelCP n t cs kappa eta x y = go 1 where... |
af2712f77b3c579a277d78c381dba8570c3dc86758b21c892c0b961c2aee0c02 | W-Net-AI/LISP-CV | with-macros.lisp | ;;;; -*- mode: lisp; indent-tabs: nil -*-
;;;; with-macros.lisp
;;;; OpenCV bindings
;;;; WITH-* Macros for memory management
(in-package :lisp-cv)
(defmacro with-ann-mlp (bind &body body)
"Ensures DEL-ANN-MLP gets called when
a ANN-MLP object goes out of scope."
`(let* ,(mapcar #!(cons (car %1) (cdr %1)) b... | null | https://raw.githubusercontent.com/W-Net-AI/LISP-CV/10d5c7c1a6fa026de488ca89a28e8a5c519ff8f2/with-macros.lisp | lisp | -*- mode: lisp; indent-tabs: nil -*-
with-macros.lisp
OpenCV bindings
WITH-* Macros for memory management |
(in-package :lisp-cv)
(defmacro with-ann-mlp (bind &body body)
"Ensures DEL-ANN-MLP gets called when
a ANN-MLP object goes out of scope."
`(let* ,(mapcar #!(cons (car %1) (cdr %1)) bind)
(unwind-protect (progn ,@body)
(mapcar #!(del-ann-mlp %1) ,(cons 'list (mapcar #!(car %1) bind)))
(val... |
68c6b1a852654a9d5cf925671b039d01aa1e3be6f90dd0a35cbb00a6fb003a5f | zellige/zellige | DouglasPeucker.hs | using Shortest Distance
module Data.Geometry.Simplify.DouglasPeucker
( distance
, shortestDistance
, splitAtMaxDistance
, douglasPeucker
) where
import qualified Data.Geospatial as Geospatial
import qualified Data.Sequence as Sequence
import qualified Data.Geometr... | null | https://raw.githubusercontent.com/zellige/zellige/87e6dab11ac4c1843009043580f14422a1d83ebf/src/Data/Geometry/Simplify/DouglasPeucker.hs | haskell | using Shortest Distance
module Data.Geometry.Simplify.DouglasPeucker
( distance
, shortestDistance
, splitAtMaxDistance
, douglasPeucker
) where
import qualified Data.Geospatial as Geospatial
import qualified Data.Sequence as Sequence
import qualified Data.Geometr... | |
437cdc51694294fd95461d88cd22add1bb3f289464c8ba54ddd957e859e75b41 | ghosthamlet/algorithm-data-structure | shortest_common_supersequence.clj | (ns algorithm-data-structure.algorithms.sets.shortest-common-supersequence)
(defn run [set1 set2]
(let [lcs (run set1 set2)
llen (count lcs)]
(if (and (= 1 llen) (= '' (first lcs)))
(concat set1 set2)
(let [supersequence (atom [])
set-index1 (atom 0)
set-index2 (atom 0... | null | https://raw.githubusercontent.com/ghosthamlet/algorithm-data-structure/017f41a79d8b1d62ff5a6cceffa1b0f0ad3ead6b/src/algorithm_data_structure/algorithms/sets/shortest_common_supersequence.clj | clojure | (ns algorithm-data-structure.algorithms.sets.shortest-common-supersequence)
(defn run [set1 set2]
(let [lcs (run set1 set2)
llen (count lcs)]
(if (and (= 1 llen) (= '' (first lcs)))
(concat set1 set2)
(let [supersequence (atom [])
set-index1 (atom 0)
set-index2 (atom 0... | |
9ea3b5763b59fc6b139c46ca3c89f32fd72d3a440dfc20c8774209aba66d0d89 | tari3x/csec-modex | selfun.ml | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... | null | https://raw.githubusercontent.com/tari3x/csec-modex/5ab2aa18ef308b4d18ac479e5ab14476328a6a50/deps/proverif1.84/src/selfun.ml | ocaml | Standard, equivalent to the old version without selection function
The conclusion is never selected if an hypothesis can be
The conclusion can be selected if we don't find better in
the hypothesis
Very good for skeme, but slightly slower for some other protocols
The conclusion is never selected if an hy... | * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Cryptographic protocol verifier *
* *
... |
6c53d2f6cb8294a3565327e29df294a09910ea735712852b86827030be9c7fbc | RedHatQE/katello.auto | validation.clj | (ns katello.validation
(:refer-clojure :exclude [fn])
(:require [clojure.string :as string]
[slingshot.slingshot :refer :all]
[katello.tasks :refer [expecting-error]]
[katello.ui-common :refer [errtype]]
[serializable.fn :refer [fn]]
[test.assert :as asse... | null | https://raw.githubusercontent.com/RedHatQE/katello.auto/79fec96581044bce5db5350d0da325e517024962/src/katello/validation.clj | clojure | Types of bad data
allowed data
Named types of validation errors | (ns katello.validation
(:refer-clojure :exclude [fn])
(:require [clojure.string :as string]
[slingshot.slingshot :refer :all]
[katello.tasks :refer [expecting-error]]
[katello.ui-common :refer [errtype]]
[serializable.fn :refer [fn]]
[test.assert :as asse... |
caa1e4e4f84d49cd56ef5da82a12ce0e3685a174095f5e5f8cefbf8d13607006 | andreasabel/helf | Util.hs | # LANGUAGE TupleSections
, UndecidableInstances
, TypeSynonymInstances
, FlexibleInstances
, MultiParamTypeClasses
, , FlexibleContexts
, FunctionalDependencies
#
, UndecidableInstances
, TypeSynonymInstances
, FlexibleInstances
, MultiParamTypeClasses
, GeneralizedNewtypeDerivin... | null | https://raw.githubusercontent.com/andreasabel/helf/b0f9a48598012af4ab8459b94cd0de90553b5b7b/src/Util.hs | haskell | * pretty printing
* categories
* monads
| Binary version of @=<<@.
| Ternary version of @=<<@.
loop :: [a] -> m [a]
run computation
| An application view where function and argument are of the same
syntactic class.
* records
| @Field@ is a specification of a lens (see Data.Record.Labels).
* error
| Expec... | # LANGUAGE TupleSections
, UndecidableInstances
, TypeSynonymInstances
, FlexibleInstances
, MultiParamTypeClasses
, , FlexibleContexts
, FunctionalDependencies
#
, UndecidableInstances
, TypeSynonymInstances
, FlexibleInstances
, MultiParamTypeClasses
, GeneralizedNewtypeDerivin... |
27cab9f7812bccbf0c680e6c04aa5e3165396b8b3ea80cec71e10a01e5a9a0bb | openbadgefactory/salava | block.cljs | (ns salava.oauth.ui.block
(:require [salava.oauth.ui.helper :refer [linkedin-link google-link facebook-link]]
[reagent.session :as session]
[salava.core.i18n :refer [t]]))
(defn ^:export oauth-login-form []
(fn []
[:div {:class "row"}
(if (some #(= % "oauth") (session/get :plugins))
... | null | https://raw.githubusercontent.com/openbadgefactory/salava/97f05992406e4dcbe3c4bff75c04378d19606b61/src/cljs/salava/oauth/ui/block.cljs | clojure | (ns salava.oauth.ui.block
(:require [salava.oauth.ui.helper :refer [linkedin-link google-link facebook-link]]
[reagent.session :as session]
[salava.core.i18n :refer [t]]))
(defn ^:export oauth-login-form []
(fn []
[:div {:class "row"}
(if (some #(= % "oauth") (session/get :plugins))
... | |
581cd2122447dc141ac98dc7664f144dc02119b4e89974cb0c4ccf4777c71f31 | ocramz/xeno | SAX.hs | # LANGUAGE CPP #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE BinaryLiterals #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
{-# LANGUAGE OverloadedStrings #-}
# LANGUAGE ScopedTypeVariables #
| SAX parser and API for XML .
module Xeno.SAX
( process
, Process(..)
, StringLike(..... | null | https://raw.githubusercontent.com/ocramz/xeno/9099ce01aec9eed2fb08aada0ed7a0bc29c203fe/src/Xeno/SAX.hs | haskell | # LANGUAGE BangPatterns #
# LANGUAGE OverloadedStrings #
# INLINE s_index' #
# INLINE elemIndexFrom' #
# INLINE drop' #
# INLINE substring' #
# INLINE s_index' #
# INLINE elemIndexFrom' #
# INLINE drop' #
# INLINE substring' #
| Parameters to the 'process' function
^ Open tag.
^ Tag attribute.
^ End open t... | # LANGUAGE CPP #
# LANGUAGE BinaryLiterals #
# LANGUAGE LambdaCase #
# LANGUAGE NamedFieldPuns #
# LANGUAGE ScopedTypeVariables #
| SAX parser and API for XML .
module Xeno.SAX
( process
, Process(..)
, StringLike(..)
, fold
, validate
, validateEx
, dump
, skipDoctype
) where
... |
ea97e9a84d6d4d84bfe6b0b20273de146010102d498d96790a72e92f18701f0d | JunSuzukiJapan/cl-reex | first-test.lisp | (defpackage first-test
(:use :cl
:cl-reex
:cl-reex-test.logger
:prove)
(:shadowing-import-from :cl-reex :skip))
(in-package :first-test)
NOTE : To run this test file , execute ` ( asdf : test - system : cl - reex ) ' in your Lisp .
(plan 6)
;; blah blah blah.
(defparameter logger (make-instance 'l... | null | https://raw.githubusercontent.com/JunSuzukiJapan/cl-reex/94928c7949c235b41902138d9e4a5654b92d67eb/tests/first-test.lisp | lisp | blah blah blah. | (defpackage first-test
(:use :cl
:cl-reex
:cl-reex-test.logger
:prove)
(:shadowing-import-from :cl-reex :skip))
(in-package :first-test)
NOTE : To run this test file , execute ` ( asdf : test - system : cl - reex ) ' in your Lisp .
(plan 6)
(defparameter logger (make-instance 'logger))
(defparame... |
1fe7cbfaf4f90d8526c68f9def53db97e4d54f3854407d524374bb1e7d5e15eb | mmontone/gestalt | interactive.lisp | Some thoughts on using conditions restarts as an interactive entry to our framework.
Suppose we have an interface to satisfy. We can:
1) Do nothing. For example, just document the thing.
2) Signal an error
3) Signal a warning.
4) Signal a restartable condition.
For example, in pwb we had permissions per button. The ... | null | https://raw.githubusercontent.com/mmontone/gestalt/fd019c0ca03b4efc73b9ddd3db1e3ed211233428/src/interactive.lisp | lisp | Some thoughts on using conditions restarts as an interactive entry to our framework.
Suppose we have an interface to satisfy. We can:
1) Do nothing. For example, just document the thing.
2) Signal an error
3) Signal a warning.
4) Signal a restartable condition.
For example, in pwb we had permissions per button. The ... | |
726f9c78eca66a152830b088e88f806a0bed4a993e9753b306cca36262b61a12 | exercism/clojurescript | binary_search.cljs | (ns binary-search)
(defn search-for [])
(defn middle [])
| null | https://raw.githubusercontent.com/exercism/clojurescript/0135bc589c556557397650fe5e52ac7df3d4ddb5/exercises/practice/binary-search/src/binary_search.cljs | clojure | (ns binary-search)
(defn search-for [])
(defn middle [])
| |
b64ffb753f85d9754b23753a138d83b9b43f1b4854a7fec9504bf43babdd4278 | oakes/Paravim | repl.clj | (ns paravim.repl
(:require [clojure.string :as str]
[clojure.main])
(:import [clojure.lang LineNumberingPushbackReader]
[java.io PipedWriter PipedReader PrintWriter]))
(defn remove-returns [^String s]
(str/escape s {\return ""}))
(def ^:const repl-buffer-size 32)
(def *current-ns (atom ni... | null | https://raw.githubusercontent.com/oakes/Paravim/871b9adf4e9819a7b9f2c63466c55640f0f8c280/src/paravim/repl.clj | clojure | prevent thread from being flooded
newline in case the last line of `content` is a comment
newline to force repl to finish | (ns paravim.repl
(:require [clojure.string :as str]
[clojure.main])
(:import [clojure.lang LineNumberingPushbackReader]
[java.io PipedWriter PipedReader PrintWriter]))
(defn remove-returns [^String s]
(str/escape s {\return ""}))
(def ^:const repl-buffer-size 32)
(def *current-ns (atom ni... |
286cd75b32726669b500e72886a92eab1adb1aa18d6cb0368adfc4004ad629b6 | locusmath/locus | permutation.clj | (ns locus.set.mapping.effects.local.permutation
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.con.core.setpart :refer :all]
[locus.con.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
... | null | https://raw.githubusercontent.com/locusmath/locus/fb6068bd78977b51fd3c5783545a5f9986e4235c/src/clojure/locus/set/mapping/effects/local/permutation.clj | clojure | Local permutation
A local permutation is an automorphism of Sets localized to some lens. It is also a special
type of invertible function, as described by the fact that it is a permutation. | (ns locus.set.mapping.effects.local.permutation
(:require [locus.set.logic.core.set :refer :all]
[locus.set.logic.limit.product :refer :all]
[locus.con.core.setpart :refer :all]
[locus.con.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
... |
46d5e1c60e636d430a12592746308a607077e86c85e2eeab12b1da520d0e8e54 | lehins/Color | Rec470.hs | # LANGUAGE DataKinds #
{-# LANGUAGE DeriveTraversable #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternSynonyms #
# LANGUAGE PolyKinds #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
-- |
-- Module ... | null | https://raw.githubusercontent.com/lehins/Color/8f17d4d17dc9b899af702f54b69d49f3a5752e7b/Color/src/Graphics/Color/Space/RGB/ITU/Rec470.hs | haskell | # LANGUAGE DeriveTraversable #
|
Module : Graphics.Color.Space.RGB.ITU.Rec470
License : BSD3
Stability : experimental
Portability : non-portable
----------------------------------
------------
----------------------------------
# INLINE transfer #
----------------------------------
------------
-------... | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE PatternSynonyms #
# LANGUAGE PolyKinds #
# LANGUAGE StandaloneDeriving #
# LANGUAGE TypeFamilies #
Copyright : ( c ) 2019 - 2020
Maintainer ... |
ada841df7c06c89074ad65dc89b5a973f7fee5ac646a9bf3338cb6554e8a2ea0 | markus-git/co-feldspar | Arrays.hs | {-# language FlexibleContexts #-}
{-# language ScopedTypeVariables #-}
{-# language TypeFamilies #-}
module Arrays where
import Prelude hiding ((<))
import Language.Syntactic (Syntactic(..))
import Feldspar
import Feldspar.Software
import Feldspar.Software as Soft (icompile)
import Feldspar.Hardware
import Feldsp... | null | https://raw.githubusercontent.com/markus-git/co-feldspar/bf598c803d41e03ed894bbcb490da855cce9250e/examples/Arrays.hs | haskell | # language FlexibleContexts #
# language ScopedTypeVariables #
# language TypeFamilies #
------------------------------------------------------------------------------
* Example of arrays in co-feldspar.
------------------------------------------------------------------------------
...
...
...
...
----------------... |
module Arrays where
import Prelude hiding ((<))
import Language.Syntactic (Syntactic(..))
import Feldspar
import Feldspar.Software
import Feldspar.Software as Soft (icompile)
import Feldspar.Hardware
import Feldspar.Hardware as Hard (icompile)
arrays
:: forall m dom expr
. ( MonadComp m
, Finite (Ex... |
f10b72b2183ef8bf5760ce7ae9c49cc3a15cac5d009104ff32626bbd950960f4 | haskus/packages | Finite.hs | # LANGUAGE TypeFamilies #
# LANGUAGE TypeApplications #
# LANGUAGE FlexibleContexts #
# LANGUAGE ConstrainedClassMethods #
# LANGUAGE MagicHash #
{-# LANGUAGE BangPatterns #-}
# LANGUAGE CPP #
# LANGUAGE DefaultSignatures #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
-- | Types with finite bit count
module... | null | https://raw.githubusercontent.com/haskus/packages/40ea6101cea84e2c1466bc55cdb22bed92f642a2/haskus-binary/src/lib/Haskus/Binary/Bits/Finite.hs | haskell | # LANGUAGE BangPatterns #
| Types with finite bit count
| Type representable by a fixed amount of bits
| Number of bits
| Number of bits (the value is ignored)
| Complement | # LANGUAGE TypeFamilies #
# LANGUAGE TypeApplications #
# LANGUAGE FlexibleContexts #
# LANGUAGE ConstrainedClassMethods #
# LANGUAGE MagicHash #
# LANGUAGE CPP #
# LANGUAGE DefaultSignatures #
# LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
module Haskus.Binary.Bits.Finite
( FiniteBits (..)
)
where
imp... |
4facdfd579d7a1107a98eb9985a25e6e593f48296991ff186ba5d585a8ddac6f | hexlet-basics/exercises-clojure | index.clj | (ns index)
;BEGIN
(defn transit [first-acc second-acc amount]
(await (send first-acc - amount))
(await (send second-acc + amount))
[@first-acc @second-acc])
;END
| null | https://raw.githubusercontent.com/hexlet-basics/exercises-clojure/ede14102d01f9ef736e0af811cd92f5b22a83bc2/modules/45-state/30-about-agents/index.clj | clojure | BEGIN
END | (ns index)
(defn transit [first-acc second-acc amount]
(await (send first-acc - amount))
(await (send second-acc + amount))
[@first-acc @second-acc])
|
cd09f9d61b25c02f6c49591aa70d353fc6a0ffe39b274ae519059ff059cd0d17 | mpenet/eddy | ring1.clj | (ns s-exp.eddy.http.interceptor.ring1
"adapted/taken from ring.util.servlet"
(:require
[s-exp.eddy.http.server.request :as request]
[s-exp.eddy.http.server.response :as response]
[exoscale.interceptor :as ix]
[s-exp.eddy.http.interceptor.ring1 :as ring1]
[qbits.auspex :as ax])
(:import (org.eclipse... | null | https://raw.githubusercontent.com/mpenet/eddy/a6252cfad7f8a12887006f9caffa606181571634/src/s_exp/eddy/http/interceptor/ring1.clj | clojure | interceptors | (ns s-exp.eddy.http.interceptor.ring1
"adapted/taken from ring.util.servlet"
(:require
[s-exp.eddy.http.server.request :as request]
[s-exp.eddy.http.server.response :as response]
[exoscale.interceptor :as ix]
[s-exp.eddy.http.interceptor.ring1 :as ring1]
[qbits.auspex :as ax])
(:import (org.eclipse... |
5eccd04e43d1bfe573c0d29700e644fe1e3a37123707c7949385367865b187eb | binaryage/env-config | platform.cljs | (ns env-config.impl.platform
"Platform dependent code: ClojureScript implementation."
(:require [clojure.string :as string]
[cljs.tools.reader :as reader]
[env-config.impl.types :refer [->Coerced]]))
(def string-starts-with? string/starts-with?)
(defn get-ex-message [e]
(or (.-message e)... | null | https://raw.githubusercontent.com/binaryage/env-config/27a99a5c2d5ca0941339508484853c45de555a49/src/lib/env_config/impl/platform.cljs | clojure | throws in case of errors
see | (ns env-config.impl.platform
"Platform dependent code: ClojureScript implementation."
(:require [clojure.string :as string]
[cljs.tools.reader :as reader]
[env-config.impl.types :refer [->Coerced]]))
(def string-starts-with? string/starts-with?)
(defn get-ex-message [e]
(or (.-message e)... |
94331c1e48ccabc1710e5881d2f186e70ae59e1bd968dd5fa40f8265a083fa8b | fare/fare-scripts | bazel.lisp | Shell aliases for working with ...
(uiop:define-package :fare-scripts/bazel
(:use :cl :fare-utils :uiop :inferior-shell :optima :optima.ppcre :cl-scripting)
(:export #:*bazel-dir* #:*bazel* #:bazel #:ss #:ngr #:make-bazel
#:*java-home*))
(in-package :fare-scripts/bazel)
(exporting-definitions
(def... | null | https://raw.githubusercontent.com/fare/fare-scripts/fee32edbbe4ca486e63922d94305027a8b5603a5/bazel.lisp | lisp | exporting-definitions | Shell aliases for working with ...
(uiop:define-package :fare-scripts/bazel
(:use :cl :fare-utils :uiop :inferior-shell :optima :optima.ppcre :cl-scripting)
(:export #:*bazel-dir* #:*bazel* #:bazel #:ss #:ngr #:make-bazel
#:*java-home*))
(in-package :fare-scripts/bazel)
(exporting-definitions
(def... |
34cb5ef4d3c7d0bca1f3e88ecf1bf12e79e57c88bffc16bd3fc90f7eb494545a | ocaml/merlin | newline_in_quotes.ml | let string = "s"
let foo =
let _ = {| Look at this: '
'
Foo|} in
let () = ignore string in
"Onoes, Foo_bar_lol baz"
;;
| null | https://raw.githubusercontent.com/ocaml/merlin/e576bc75f11323ec8489d2e58a701264f5a7fe0e/tests/test-dirs/locate/reconstruct-identifier/newlines.t/newline_in_quotes.ml | ocaml | let string = "s"
let foo =
let _ = {| Look at this: '
'
Foo|} in
let () = ignore string in
"Onoes, Foo_bar_lol baz"
;;
| |
af0fef8e5e0275bdd77614b2ff6bcc427e85ea7aa42c71c226e9113ad2fa0f59 | rizo/snowflake-os | myocamlbuild_config.mli |
(* Configuration options for building snowflake *)
val prefix_C_tools : string
val _gcc : string
val _as : string
val _ar : string
val _ranlib : string
val _ld : string
| null | https://raw.githubusercontent.com/rizo/snowflake-os/51df43d9ba715532d325e8880d3b8b2c589cd075/myocamlbuild_config.mli | ocaml | Configuration options for building snowflake |
val prefix_C_tools : string
val _gcc : string
val _as : string
val _ar : string
val _ranlib : string
val _ld : string
|
0850746e8d5164286dc7f72608355b6c4caa2b2b13ad03e082bc3026693b09d0 | yi-editor/yi | Help.hs | {-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_HADDOCK show-extensions #-}
-- |
Module : Yi . . Vim . Ex . Commands .
-- License : GPL-2
-- Maintainer :
-- Stability : experimental
-- Portability : portable
module Yi.Keymap.Vim.Ex.Commands.Help (parse) where
import Control.Monad ... | null | https://raw.githubusercontent.com/yi-editor/yi/58c239e3a77cef8f4f77e94677bd6a295f585f5f/yi-keymap-vim/src/Yi/Keymap/Vim/Ex/Commands/Help.hs | haskell | # LANGUAGE OverloadedStrings #
# OPTIONS_HADDOCK show-extensions #
|
License : GPL-2
Maintainer :
Stability : experimental
Portability : portable |
Module : Yi . . Vim . Ex . Commands .
module Yi.Keymap.Vim.Ex.Commands.Help (parse) where
import Control.Monad (void)
import qualified Data.Text as T (append, pack)
import qualified Data.Attoparsec.Text as P (anyChar, many1, option, space, ... |
be897cd0af556b5c8c76252abc691b3d60059a29e5bcd9c0aeedf7e6d3d63e1f | AdRoll/rebar3_typer | dummy.erl | -module(dummy).
-include("inc.hrl").
-include("inc2.hrl").
-export([a/0]).
a() ->
?FRUITS ++ ?MORE.
| null | https://raw.githubusercontent.com/AdRoll/rebar3_typer/a77f3311e3bc0c94836226c343ecbe215180f896/test/files/dummy/src/dummy.erl | erlang | -module(dummy).
-include("inc.hrl").
-include("inc2.hrl").
-export([a/0]).
a() ->
?FRUITS ++ ?MORE.
| |
e555b4cc8b54471f99d80180da54f7c17a3fd1170524605aa2bcaad4726178cf | DanielG/ghc-mod | Logging.hs | ghc - mod : Happy Haskell Hacking
Copyright ( C ) 2015 < dxld ÄT darkboxed DOT org >
--
-- This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
-- (... | null | https://raw.githubusercontent.com/DanielG/ghc-mod/391e187a5dfef4421aab2508fa6ff7875cc8259d/core/GhcMod/Logging.hs | haskell |
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 Affero General... | ghc - mod : Happy Haskell Hacking
Copyright ( C ) 2015 < dxld ÄT darkboxed DOT org >
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation , either version 3 of the License , or
You should have received a copy of the GNU Affero General Public License
# L... |
d728f0d1b566a2211b79dec763e58a095a10e4d2e3ce6681fb8e0d9e4ba05188 | elm-lang/elm-repl | Completion.hs | {-# LANGUAGE OverloadedStrings #-}
module Completion (complete) where
import Control.Monad.State (get)
import qualified Data.ByteString.Char8 as BS
import qualified Data.Trie as Trie
import System.Console.Haskeline.Completion (Completion(Completion), CompletionFunc, completeWord)
import qualified Environment as Env
... | null | https://raw.githubusercontent.com/elm-lang/elm-repl/cc258c37636e04b6f3d4a4840881910f5effe119/src/Completion.hs | haskell | # LANGUAGE OverloadedStrings # | module Completion (complete) where
import Control.Monad.State (get)
import qualified Data.ByteString.Char8 as BS
import qualified Data.Trie as Trie
import System.Console.Haskeline.Completion (Completion(Completion), CompletionFunc, completeWord)
import qualified Environment as Env
complete :: CompletionFunc Env.Tas... |
c7794cfb0ce8a4681b0385332f0bf19d3ff91435f7bcec2b111a84590f35ef71 | ku-fpg/hermit | Types.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE FunctionalDependencies #
{-# LANGUAGE GADTs #-}
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RankNTypes #-}
# LANGUAGE Scoped... | null | https://raw.githubusercontent.com/ku-fpg/hermit/3e7be430fae74a9e3860b8b574f36efbf9648dec/src/HERMIT/Shell/Types.hs | haskell | # LANGUAGE ConstraintKinds #
# LANGUAGE GADTs #
# LANGUAGE OverloadedStrings #
# LANGUAGE RankNTypes #
--------------------------------------------------------------------------------
should be impossible
--------------------------------------------------------------------------------
back (up) the derivation tree
--... | # LANGUAGE FlexibleContexts #
# LANGUAGE FunctionalDependencies #
# LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE KindSignatures #
# LANGUAGE InstanceSigs #
# LANGUAGE LambdaCase #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
module HERMIT.Shell.Types where
impor... |
b34b2c51d3fe5f2cf0f80516c1a809335bc4e332b111c708b1459f8d5c8ac18f | pascal-knodel/haskell-craft | E'4'23.hs | --
--
--
-----------------
Exercise 4.23 .
-----------------
--
--
--
module E'4'23 where
import Test.QuickCheck ( quickCheck )
-- Subsection 4.5 (extended definition) ...
regions' :: Integer -> Integer
regions' n
| n < 0 = 0
| n == 0 = 1
| otherwise = regions' ( n - 1 ) + n
-- Subsect... | null | https://raw.githubusercontent.com/pascal-knodel/haskell-craft/c03d6eb857abd8b4785b6de075b094ec3653c968/Chapter%204/E'4'23.hs | haskell |
---------------
---------------
Subsection 4.5 (extended definition) ...
Subsection 4.5 ...
...
Other solution:
GHCi> quickCheck prop_regions | Exercise 4.23 .
module E'4'23 where
import Test.QuickCheck ( quickCheck )
regions' :: Integer -> Integer
regions' n
| n < 0 = 0
| n == 0 = 1
| otherwise = regions' ( n - 1 ) + n
sumFun :: (Integer -> Integer) -> Integer -> Integer
sumFun f n
| n == 0 = f 0
| otherwise ... |
f49f9e43e887b42137cbbf6bd6aadd3dd748ac567b9b1756c8900c2a95dd48b0 | 2600hz-archive/whistle | whistle_couch_app.erl | -module(whistle_couch_app).
-behaviour(application).
%% Application callbacks
-export([start/2, stop/1]).
%% ===================================================================
%% Application callbacks
%% ===================================================================
start(_StartType, _StartArgs) ->
whistl... | null | https://raw.githubusercontent.com/2600hz-archive/whistle/1a256604f0d037fac409ad5a55b6b17e545dcbf9/lib/whistle_couch-1.0.0/src/whistle_couch_app.erl | erlang | Application callbacks
===================================================================
Application callbacks
=================================================================== | -module(whistle_couch_app).
-behaviour(application).
-export([start/2, stop/1]).
start(_StartType, _StartArgs) ->
whistle_couch:start_link().
stop(_State) ->
ok.
|
df43213a8fd386a0a7c5876a5234139a5ffc16e8e55cdc565a437ea72da61356 | sbcl/sbcl | seq.impure.lisp | ;;;; tests related to sequences
This file is impure because we want to be able to use DEFUN .
This software is part of the SBCL system . See the README file for
;;;; more information.
;;;;
While most of SBCL is derived from the CMU CL system , the test
;;;; files (like this one) were written from scratch after ... | null | https://raw.githubusercontent.com/sbcl/sbcl/00f290ce428a7049ea264b385d8c80c6f70bab3b/tests/seq.impure.lisp | lisp | tests related to sequences
more information.
files (like this one) were written from scratch after the fork
This software is in the public domain and is provided with
absolutely no warranty. See the COPYING and CREDITS files for
more information.
user-defined mock sequence class for testing generic versions of... |
This file is impure because we want to be able to use DEFUN .
This software is part of the SBCL system . See the README file for
While most of SBCL is derived from the CMU CL system , the test
from CMU CL .
(shadow 'reset)
(defclass list-backed-sequence (standard-object
seque... |
f374ce8bfc04877b43528aa6861380effd81fb1c1c0aa8a95ba78651289d7ec8 | philopon/apiary | Logger.hs | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
{-# LANGUAGE Rank2Types #-}
# LANGUAGE CPP #
module Web.Apiary.Logger
( Logger
-- * co... | null | https://raw.githubusercontent.com/philopon/apiary/7da306fcbfcdec85d073746968298de4540d7235/apiary-logger/src/Web/Apiary/Logger.hs | haskell | # LANGUAGE Rank2Types #
* configuration
* initialize
* action
* wrapper
| logger extension data type.
| logger initializer.
| push log. | # LANGUAGE GeneralizedNewtypeDeriving #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE RecordWildCards #
# LANGUAGE TypeFamilies #
# LANGUAGE CPP #
module Web.Apiary.Logger
( Logger
, LogDest(..), LogConfig(..)
, ... |
009f5598e6bc4ecc058f51e6c67e2476644ed8c812ba7750993532246d74e299 | gonimo/gonimo | UI.hs | # LANGUAGE GADTs #
{-# LANGUAGE RecursiveDo #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
module Gonimo.Client.MessageBox.UI where
import Control.Lens
import Data.Text (Text)
import Reflex.Dom.Core
import G... | null | https://raw.githubusercontent.com/gonimo/gonimo/f4072db9e56f0c853a9f07e048e254eaa671283b/front/src/Gonimo/Client/MessageBox/UI.hs | haskell | # LANGUAGE RecursiveDo # | # LANGUAGE GADTs #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TupleSections #
module Gonimo.Client.MessageBox.UI where
import Control.Lens
import Data.Text (Text)
import Reflex.Dom.Core
import Gonimo.Client.MessageBox.Internal
impo... |
40f292a9cd5b604e43efd94de2c6f7eaa4f825f8550d00d640d701547f8a8096 | totalperspective/oolon | agent.cljc | (ns oolon.agent
(:refer-clojure :exclude [agent])
(:require [oolon.table :as t]
[oolon.datalog :as d]
[oolon.module :as m]
[oolon.schema :as s]
[oolon.db :as db]
[oolon.utils :as u]))
(def empty-facts
{:assertions #{}
:retractions #{}
:out #{}})
... | null | https://raw.githubusercontent.com/totalperspective/oolon/a457d2a2d440a25f663bd0508a95e6877eae6f81/src/cljc/oolon/agent.cljc | clojure | (ns oolon.agent
(:refer-clojure :exclude [agent])
(:require [oolon.table :as t]
[oolon.datalog :as d]
[oolon.module :as m]
[oolon.schema :as s]
[oolon.db :as db]
[oolon.utils :as u]))
(def empty-facts
{:assertions #{}
:retractions #{}
:out #{}})
... | |
179957a0a0f176afde623151265fb95f5ad4511e8c05b6f45a0916e191cf27f6 | garrigue/lablgtk | gPango.mli | (**************************************************************************)
(* Lablgtk *)
(* *)
(* This program is free software; you can redistribute it *)
and/or ... | null | https://raw.githubusercontent.com/garrigue/lablgtk/504fac1257e900e6044c638025a4d6c5a321284c/src/gPango.mli | ocaml | ************************************************************************
Lablgtk
This program is free software; you can redistribute it
comes with the library. ... | and/or modify it under the terms of the GNU Library General
Public License as published by the Free Software Foundation
version 2 , with the exception described in file COPYING which
GNU Library General Public License for more details .
You should have r... |
ac861adb22dadadc5dafb97c858fd5d1fdc2f6b9ed17749ce5f04bd49adea41e | johnlawrenceaspden/hobby-code | gospershack.clj | ;; unsigned nexthi_same_count_ones(unsigned a) {
;; /* works for any word length */
;; unsigned c = (a & -a);
;; unsigned r = a+c;
return ( ( ( r ^ a ) > > 2 ) / c ) | r ) ;
;; }
(defn gosper [a]
(let [_ (println "a=" (Long/toBinaryString a))
1111111111
_ (println "b=" (Long/toBinaryString b))
1
... | null | https://raw.githubusercontent.com/johnlawrenceaspden/hobby-code/48e2a89d28557994c72299962cd8e3ace6a75b2d/gospershack.clj | clojure | unsigned nexthi_same_count_ones(unsigned a) {
/* works for any word length */
unsigned c = (a & -a);
unsigned r = a+c;
}
-> ([0 0])
-> ([1 0]) |
(defn gosper [a]
(let [_ (println "a=" (Long/toBinaryString a))
1111111111
_ (println "b=" (Long/toBinaryString b))
1
_ (println "c (least significant bit) =" (Long/toBinaryString c))
10
_ (println "r=" (Long/toBinaryString r))
11
_ (println "s=" (Long/toBinaryString s))
0
_... |
0937040773b1db3b3d93f0c3f1dcecf639d1adbe7ff919b74bcbbf4da1cace33 | fantasytree/fancy_game_server | emysql_auth.erl | Copyright ( c ) 2009
< >
< >
< >
%%
%% Permission is hereby granted, free of charge, to any person
%% obtaining a copy of this software and associated documentation
files ( the " Software " ) , to deal in the Software without
%% restriction, including without limitation the rights to use,
%% copy, mo... | null | https://raw.githubusercontent.com/fantasytree/fancy_game_server/4ca93486fc0d5b6630170e79b48fb31e9c6e2358/apps/emysql/src/emysql_auth.erl | erlang |
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
Software is furnished to do so, subject to the following
condit... | Copyright ( c ) 2009
< >
< >
< >
files ( the " Software " ) , to deal in the Software without
copies of the Software , and to permit persons to whom the
included in all copies or substantial portions of the Software .
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND ,
-module(e... |
e14701dd47ef88e645fc6fa0d5537a321e453f012b5b487edb2dfa2bad83e686 | haskell/haskell-language-server | Format.hs | # LANGUAGE CPP #
{-# LANGUAGE OverloadedStrings #-}
module Format (tests) where
import Control.Lens ((^.))
import Control.Monad.IO.Class
import Data.Aeson
import qualified Data.ByteString.Lazy as BS
import qualified Data.Text as T
import qualifie... | null | https://raw.githubusercontent.com/haskell/haskell-language-server/702053253743f64853afb2b8dd73dfbab0032d0c/test/functional/Format.hs | haskell | # LANGUAGE OverloadedStrings #
No formatter
| The same as 'formatLspConfig' but using the legacy section name | # LANGUAGE CPP #
module Format (tests) where
import Control.Lens ((^.))
import Control.Monad.IO.Class
import Data.Aeson
import qualified Data.ByteString.Lazy as BS
import qualified Data.Text as T
import qualified Data.Text.Encoding as T
impo... |
ca12d40ab4a0b34dce2feee73ed16fa5c841489a98cab2185004c7d2ce8bba85 | lisp/de.setf.xml | namespace.lisp | -*- Mode : lisp ; Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*-
(in-package :xml-query-data-model)
(setq xml-query-data-model:*namespace*
(xml-query-data-model:defnamespace "/"
(:use)
(:ni... | null | https://raw.githubusercontent.com/lisp/de.setf.xml/827681c969342096c3b95735d84b447befa69fa6/namespaces/xmlns-com/wot/0-1/namespace.lisp | lisp | Syntax : ansi - common - lisp ; Base : 10 ; Package : xml - query - data - model ; -*-
(xqdm:find-namespace "/" :if-does-not-exist :load) |
(in-package :xml-query-data-model)
(setq xml-query-data-model:*namespace*
(xml-query-data-model:defnamespace "/"
(:use)
(:nicknames)
(:export)
(:docu... |
0e14c74e8bdf84fd52bece452afa2706a223f9f9384a0ab8d60e5c86c1fe1ef6 | den1k/root | views.cljs | (ns examples.datascript.views
(:require [root.impl.core :as rc]
[reagent.core :as r]
[reagent.dom :as rdom]
[posh.reagent :refer [pull q posh!]]
[datascript.core :as d]
[react-markdown :as md]
[clojure.string :as str]
[examples.datasc... | null | https://raw.githubusercontent.com/den1k/root/1d12a77737f29c183f0c7d394edb5e079a2614ac/dev/examples/datascript/views.cljs | clojure | (ns examples.datascript.views
(:require [root.impl.core :as rc]
[reagent.core :as r]
[reagent.dom :as rdom]
[posh.reagent :refer [pull q posh!]]
[datascript.core :as d]
[react-markdown :as md]
[clojure.string :as str]
[examples.datasc... | |
8d0e916cb0d2986062daa23c720bc6f9d4707c63d383766758d97961053ff128 | vtan/spanout | Graphics.hs | # LANGUAGE RecordWildCards #
# LANGUAGE TypeOperators #
module Spanout.Graphics
( gamePic
, countdownPic
, levelEndPic
) where
import Spanout.Common
import Data.Monoid
import qualified Graphics.Gloss as Gloss
import Linear
-- The view of a game state
gamePic :: GameState -> Gloss.Picture
gamePic GameSta... | null | https://raw.githubusercontent.com/vtan/spanout/d0b2c1b428b4143ec12637dd09b044d627e53767/src/Spanout/Graphics.hs | haskell | The view of a game state
The view of a countdown timer
A static picture after a level
The color of the border of an object | # LANGUAGE RecordWildCards #
# LANGUAGE TypeOperators #
module Spanout.Graphics
( gamePic
, countdownPic
, levelEndPic
) where
import Spanout.Common
import Data.Monoid
import qualified Graphics.Gloss as Gloss
import Linear
gamePic :: GameState -> Gloss.Picture
gamePic GameState{..} = Gloss.pictures $
... |
fe8753374a50d8856d6d487eab75a95327ce14ad8fa6cce37b28b5e2dc4e9288 | ghcjs/ghcjs-dom | SVGPathSegLinetoHorizontalAbs.hs | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
-- For HasCallStack compatibility
{-# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures #-}
module GHCJS.DOM.JSFFI.Generated.SVGPathSegLinetoHorizontalAbs
(js_setX, setX, js_getX, getX, SVGPathSegLinetoHorizontal... | null | https://raw.githubusercontent.com/ghcjs/ghcjs-dom/749963557d878d866be2d0184079836f367dd0ea/ghcjs-dom-jsffi/src/GHCJS/DOM/JSFFI/Generated/SVGPathSegLinetoHorizontalAbs.hs | haskell | For HasCallStack compatibility
# LANGUAGE ImplicitParams, ConstraintKinds, KindSignatures # | # LANGUAGE PatternSynonyms #
# LANGUAGE ForeignFunctionInterface #
# LANGUAGE JavaScriptFFI #
module GHCJS.DOM.JSFFI.Generated.SVGPathSegLinetoHorizontalAbs
(js_setX, setX, js_getX, getX, SVGPathSegLinetoHorizontalAbs(..),
gTypeSVGPathSegLinetoHorizontalAbs)
where
import Prelude ((.), (==), (>>=),... |
432736c327a2a30bfe0c744ed09cf4d44992e9d81cfa96185413a03a89682451 | solita/mnt-teet | thk_mapping.clj | (ns teet.thk.thk-mapping
"Mapping of information between THK CSV and TEET attribute keywords"
(:require [clojure.string :as str]
[clojure.java.io :as io]
[teet.integration.integration-id :as integration-id])
(:import (java.text SimpleDateFormat)))
(defn- blank? [s]
(or (not s)
(st... | null | https://raw.githubusercontent.com/solita/mnt-teet/8d973440542a02ced0095e41f06386f5462ae168/app/backend/src/clj/teet/thk/thk_mapping.clj | clojure | using "." as the decimal separator.
FIXME: how to map "Eelproj"?
we skip those as they should be removed in
the future.
Pöhiprojekt
OJV
Tee Ohutus Audit
Eelproj
Proj. tingimused
Unmapped status
:activity.status/other
If id is a string of digits: it is a person id without EE prefix
Object/project fields
"ob... | (ns teet.thk.thk-mapping
"Mapping of information between THK CSV and TEET attribute keywords"
(:require [clojure.string :as str]
[clojure.java.io :as io]
[teet.integration.integration-id :as integration-id])
(:import (java.text SimpleDateFormat)))
(defn- blank? [s]
(or (not s)
(st... |
c6b87bf4ed46f0a509480feae3580b5d5f0e4229a45b279df52f29ea952b4695 | xoken/xoken-core | Keys.hs | |
Module : Network . . Keys
Copyright : Xoken Labs
License : Open BSV License
Stability : experimental
Portability : POSIX
ECDSA private and public keys , extended keys ( BIP-32 ) and mnemonic sentences
( BIP-39 ) .
Module : Network.Xoken.Keys
Copyright : Xoken Labs
License ... | null | https://raw.githubusercontent.com/xoken/xoken-core/34399655febdc8c0940da7983489f0c9d58c35d2/core/src/Network/Xoken/Keys.hs | haskell | |
Module : Network . . Keys
Copyright : Xoken Labs
License : Open BSV License
Stability : experimental
Portability : POSIX
ECDSA private and public keys , extended keys ( BIP-32 ) and mnemonic sentences
( BIP-39 ) .
Module : Network.Xoken.Keys
Copyright : Xoken Labs
License ... | |
61a7fdba8fcb8ad8261442c2b25e3b4ca36b3ac010285ac984c248b0c3b1855d | onedata/op-worker | onenv_api_test_runner.erl | %%%-------------------------------------------------------------------
@author
( C ) 2020 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
%%% @end
%%%-------------------------------------------------------------------
%%% @doc
%%% Functions running test combination... | null | https://raw.githubusercontent.com/onedata/op-worker/11d01d6aab7f9bab939754369cf7e739ba93f74c/test_distributed/utils/api/onenv_api_test_runner.erl | erlang | -------------------------------------------------------------------
@end
-------------------------------------------------------------------
@doc
Functions running test combinations as specified in scenario for API
(REST + gs) tests.
/--------------------------------------------------\
metadata on sp... | @author
( C ) 2020 ACK CYFRONET AGH
This software is released under the MIT license
cited in ' LICENSE.txt ' .
| ! ! ! COMMON ( when writing api tests ) ! ! ! |
\--------------------------------------------------/
1 ) Using setup_fun ( ) to renew the exact same data every time ( e.g. j... |
c14e306a105f519ac1662a6697e424ca23feae6df85c66ea8693bb9fc3aaf004 | ghcjs/ghcjs | Combinators.hs | {-# LANGUAGE OverloadedStrings #-}
module Compiler.JMacro.Combinators where
import Compiler.JMacro.Base
import Compiler.JMacro.Symbols
import Prelude
import Data.Maybe
import Data.Text (Text)
import qualified Data.Text as T
import Data.String
instance Num JExpr where
x + y = InfixExpr AddOp x y
x - y = Infix... | null | https://raw.githubusercontent.com/ghcjs/ghcjs/e4cd4232a31f6371c761acd93853702f4c7ca74c/src/Compiler/JMacro/Combinators.hs | haskell | # LANGUAGE OverloadedStrings #
tuple returns
shorthand
if(e) { s1 } else { s2 }
if(e) { s }
e1 ? e2 : e3
"for" loop with increment at end of body
lifted arrays
byte arrays | module Compiler.JMacro.Combinators where
import Compiler.JMacro.Base
import Compiler.JMacro.Symbols
import Prelude
import Data.Maybe
import Data.Text (Text)
import qualified Data.Text as T
import Data.String
instance Num JExpr where
x + y = InfixExpr AddOp x y
x - y = InfixExpr SubOp x y
abs x = math_abs... |
25615c3b4518675025cb01b12d864eab3e5eab2caf8f029d9ba7bd2acd4615a0 | statebox/cql | Main.hs |
SPDX - License - Identifier : AGPL-3.0 - only
This file is part of ` statebox / cql ` , the categorical query language .
Copyright ( C ) 2019 <
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free So... | null | https://raw.githubusercontent.com/statebox/cql/b155e737ef4977ec753e44790f236686ff6a4558/http/Main.hs | haskell |
SPDX - License - Identifier : AGPL-3.0 - only
This file is part of ` statebox / cql ` , the categorical query language .
Copyright ( C ) 2019 <
This program is free software : you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free So... | |
5313af7920e0a8110c1afaf8b51e62b3e6bb672361b19e1d8e0257a9b6788b57 | hellertime/time-recurrence | Moment.hs | module Data.Time.Moment
(
module ReExport
)
where
import Data.Time.Moment.FutureMoments as ReExport
import Data.Time.Moment.Interval as ReExport
import Data.Time.Moment.Moment as ReExport
import Data.Time.Moment.StartOfWeek as ReExport
| null | https://raw.githubusercontent.com/hellertime/time-recurrence/56efaf58c48860d4547a664df9bded176a5860e9/src/Data/Time/Moment.hs | haskell | module Data.Time.Moment
(
module ReExport
)
where
import Data.Time.Moment.FutureMoments as ReExport
import Data.Time.Moment.Interval as ReExport
import Data.Time.Moment.Moment as ReExport
import Data.Time.Moment.StartOfWeek as ReExport
| |
ad06fcbd1cb87034c5f276893252bf78a3b05e12ec063eda44b6cc7a568b14f0 | kayceesrk/Quelea | MicroBlog1.hs | # LANGUAGE TemplateHaskell , ScopedTypeVariables #
import Quelea.Shim
import Quelea.ClientMonad
import Quelea.Marshall
import Quelea.NameService.Types
import Quelea.NameService.SimpleBroker
import Quelea.TH
import Language.Haskell.TH
import Language.Haskell.TH.Syntax (Exp (..))
import System . Process ( runCommand... | null | https://raw.githubusercontent.com/kayceesrk/Quelea/73db79a5d5513b9aeeb475867a67bacb6a5313d0/tests/Microblog/MicroBlog1.hs | haskell | For user input parsing
Removing typesig for the following results in ambiguous type error. | # LANGUAGE TemplateHaskell , ScopedTypeVariables #
import Quelea.Shim
import Quelea.ClientMonad
import Quelea.Marshall
import Quelea.NameService.Types
import Quelea.NameService.SimpleBroker
import Quelea.TH
import Language.Haskell.TH
import Language.Haskell.TH.Syntax (Exp (..))
import System . Process ( runCommand... |
3420526c3a71681f97bf579176c79ceeb4a9a4bb24c7af6aed1b799661d092f3 | moon-chilled/loop | nconc-clause.scm | (defclass nconc-clause (list-accumulation-clause) ())
(defclass nconc-it-clause (nconc-clause it-mixin) ()
(body-form (clause end-tag)
`(if (null? ,*list-tail-accumulation-variable*)
(begin (set! ,*accumulation-variable*
,*it-var*)
(set! ,*list-tail-accumulation-var... | null | https://raw.githubusercontent.com/moon-chilled/loop/4391ac8fc0ed17473e68b75737f9c4dd04994783/src/nconc-clause.scm | scheme | (defclass nconc-clause (list-accumulation-clause) ())
(defclass nconc-it-clause (nconc-clause it-mixin) ()
(body-form (clause end-tag)
`(if (null? ,*list-tail-accumulation-variable*)
(begin (set! ,*accumulation-variable*
,*it-var*)
(set! ,*list-tail-accumulation-var... | |
55b497592a13854cce49c192f0b0f72a223470c1a829c996197d2aa9a37445d8 | jacius/lispbuilder | squashed.lisp | ( C ) 2006 , minor changes by
Additional changes by
(in-package #:lispbuilder-sdl-examples)
(defun show-score (score)
(sdl:set-caption (format nil "Squashed - Score: ~a" score) "Squashed"))
(defun load-image (filename)
(sdl:convert-surface :surface (sdl:load-image (merge-pathnames filename sdl:*default... | null | https://raw.githubusercontent.com/jacius/lispbuilder/e693651b95f6818e3cab70f0074af9f9511584c3/lispbuilder-sdl/examples/squashed.lisp | lisp | Open the audio mixer. Use a smaller buffer for lower latency.
check if squashed
increase the bug jumping speed
Play the swatting sound effect.
fill the background with white
draw images | ( C ) 2006 , minor changes by
Additional changes by
(in-package #:lispbuilder-sdl-examples)
(defun show-score (score)
(sdl:set-caption (format nil "Squashed - Score: ~a" score) "Squashed"))
(defun load-image (filename)
(sdl:convert-surface :surface (sdl:load-image (merge-pathnames filename sdl:*default... |
ca53f023ff678c24aae72d43997599105d253a820851dc0fab9c057b4e51e8c7 | vikram/lisplibraries | standard-session-frame.lisp | ;; -*- lisp -*-
(in-package :it.bese.ucw)
;;;; ** STANDARD-SESSION-FRAME
TODO make a single isolation slot and store one of : per - invocation : once - only or nil
TODO isolated actions could be dropped for gc purposes . probably has only limited effects ...
(defstruct (action-entry (:conc-name action-) (:constr... | null | https://raw.githubusercontent.com/vikram/lisplibraries/105e3ef2d165275eb78f36f5090c9e2cdd0754dd/site/ucw-boxset/ucw_ajax/src/rerl/standard-session-frame.lisp | lisp | -*- lisp -*-
** STANDARD-SESSION-FRAME
invalid actions are never called
keep track of a list of invocation id's that the client
sent with the invocations and only run the action once for
each invocation id (i.e. reloading the page does not trigger
the action again, but clicking it does (as opposed to
the list o... |
(in-package :it.bese.ucw)
TODO make a single isolation slot and store one of : per - invocation : once - only or nil
TODO isolated actions could be dropped for gc purposes . probably has only limited effects ...
(defstruct (action-entry (:conc-name action-) (:constructor %make-action-entry))
(lambda nil :type ... |
17c93a0e4d74a686eab8949d74fbe3927cb52dbab70a22e9dcfcef1f1d3b506a | ndmitchell/rattle | FSATrace.hs | # LANGUAGE RecordWildCards #
module Benchmark.FSATrace(main) where
import Benchmark.VsMake
import Development.Shake.Command
import Data.List.Extra
main :: Args -> IO ()
main = vsMake VsMake{..}
where
broken = ["eafc609","ad2c880","70a3926","8f298b3","c56947b"]
repo = ""
master = "master"... | null | https://raw.githubusercontent.com/ndmitchell/rattle/f1f10504ef175dd005c8affdddfc1fb615c040f2/benchmark/Benchmark/FSATrace.hs | haskell | # LANGUAGE RecordWildCards #
module Benchmark.FSATrace(main) where
import Benchmark.VsMake
import Development.Shake.Command
import Data.List.Extra
main :: Args -> IO ()
main = vsMake VsMake{..}
where
broken = ["eafc609","ad2c880","70a3926","8f298b3","c56947b"]
repo = ""
master = "master"... | |
0eb0a86332ed82cb4b1144942fa767a3d76329268f27808fac1f0a4f445aa711 | chrisa/acts_as_encrypted | new_mochiweb.erl | #!/usr/bin/env escript
%% -*- mode: erlang -*-
-export([main/1]).
%% External API
main([Name]) ->
main([Name, "."]);
main([Name, Dest]) ->
ensure(),
DestDir = filename:absname(Dest),
ok = mochiweb_skel:skelcopy(DestDir, Name);
main(_) ->
usage().
%% Internal API
ensure() ->
code:add_patha(fi... | null | https://raw.githubusercontent.com/chrisa/acts_as_encrypted/587558a31876dfbbc47d7ab2070782fd3d9395d7/server/deps/mochiweb-src/scripts/new_mochiweb.erl | erlang | -*- mode: erlang -*-
External API
Internal API | #!/usr/bin/env escript
-export([main/1]).
main([Name]) ->
main([Name, "."]);
main([Name, Dest]) ->
ensure(),
DestDir = filename:absname(Dest),
ok = mochiweb_skel:skelcopy(DestDir, Name);
main(_) ->
usage().
ensure() ->
code:add_patha(filename:join(filename:dirname(escript:script_name()),
... |
095936df3b9c1ca3ee01f34bf9d25cf18f1309f721e90b7ab475ed970e8a1dbe | evertedsphere/noether | Main.hs | -- It is generally a good idea to keep all your business logic in your library
-- and only use it in the executable. Doing so allows others to use what you
-- wrote in their libraries.
import Lemmata
main :: IO ()
main = putText "cool and good"
| null | https://raw.githubusercontent.com/evertedsphere/noether/c4223f64b9df5b0dbbeec1fea726bfff7f5810f5/executable/Main.hs | haskell | It is generally a good idea to keep all your business logic in your library
and only use it in the executable. Doing so allows others to use what you
wrote in their libraries. |
import Lemmata
main :: IO ()
main = putText "cool and good"
|
c5e41843ba5fec49669a9fd241462ea5462b02dc6f3f2c0fb7781c120de36e27 | schwering/golog | World.hs | module World
(Direction(..), ColorString, TrafficLightState(..), StreetLUT, Street, World,
color, maxX, maxY, streetLut, carLut, switchLights, mkStreet, mkWorld,
direction, successor, reachable) where
import Data.List (minimumBy)
import Data.Maybe (catMaybes, isNothing)
import qualified Data.Map as Map
data D... | null | https://raw.githubusercontent.com/schwering/golog/e5a0dba9598d616762271b5bef9fd51a53c1f829/golog-examples/traffic/World.hs | haskell | | Points legally reachable from the current coordinate.
This depends on the road segments and the current traffic lights. | module World
(Direction(..), ColorString, TrafficLightState(..), StreetLUT, Street, World,
color, maxX, maxY, streetLut, carLut, switchLights, mkStreet, mkWorld,
direction, successor, reachable) where
import Data.List (minimumBy)
import Data.Maybe (catMaybes, isNothing)
import qualified Data.Map as Map
data D... |
72fd957b63b9f5e3bc4d8f0f9f8c385e824bbd311a160064c7920021c1e9ad5a | ori-sky/hs-etch | Semantics.hs | {-# LANGUAGE ConstraintKinds #-}
# LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
module Etch.Analysis.Semantics where
import qualified Data.HashMap.Lazy as HM
import Control.Monad.Except
import Control.Monad.State
import Control.Lens (use, (%=))
import Text.Show.Pretty (ppShow)
import qualified Etch.Types.Synta... | null | https://raw.githubusercontent.com/ori-sky/hs-etch/9a90df6090f0a9bf64962bd41ffe4469a9dcbd68/src/Etch/Analysis/Semantics.hs | haskell | # LANGUAGE ConstraintKinds #
XXX: need scopes
XXX: need scopes
else fail ("expected type `" ++ show expectedTy ++ "` does not match actual type `" ++ show actualTy ++ "`: " ++ show sig) | # LANGUAGE FlexibleContexts #
# LANGUAGE LambdaCase #
module Etch.Analysis.Semantics where
import qualified Data.HashMap.Lazy as HM
import Control.Monad.Except
import Control.Monad.State
import Control.Lens (use, (%=))
import Text.Show.Pretty (ppShow)
import qualified Etch.Types.SyntaxTree as Syntax
import Etch.Types... |
f9dd00e23a05b752cf4d0092741ba768835fdd90bdab0d941776761663927587 | erlangonrails/devdb | tmanager.erl | Copyright 2007 - 2010 fuer Informationstechnik Berlin
%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
% -2.0
%
% Unless required by applicable law or agreed to i... | null | https://raw.githubusercontent.com/erlangonrails/devdb/0e7eaa6bd810ec3892bfc3d933439560620d0941/dev/scalaris/src/transstore/tmanager.erl | erlang |
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language go... | Copyright 2007 - 2010 fuer Informationstechnik Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
Author : < >
Created : 11 Feb 2007 by < >
@author < >
2007 - 2008 fuer Informationst... |
c666b8158b66cfed22178345904f2fdf7c133dcf8a10a3d512505b10b16b7990 | karetsu/xmonad-aloysius | FlatWhite.hs | -- |
module Theme.FlatWhite where
= " # 232530 "
basebg = "#f7f3ee"
basefg = "#605a52"
base00 = "#605a52" -- darkest black
base01 = "#93836c" -- dark black
base02 = "#b9a992" -- black
base03 = "#dcd3c6" -- bright black
base04 = "#e4ddd2" -- dark white
base05 = "#f1ece4" -- white
base06 = "#f7f3ee" -- bright white
ba... | null | https://raw.githubusercontent.com/karetsu/xmonad-aloysius/9910c8db4bb75600fc9af51b9e64ab5704e8126c/app/Theme/FlatWhite.hs | haskell | |
darkest black
dark black
black
bright black
dark white
white
bright white
teal
cyan
blue
dark blue
red
orange
yellow
green
violet |
module Theme.FlatWhite where
= " # 232530 "
basebg = "#f7f3ee"
basefg = "#605a52"
fontsize :: String
fontsize = "12"
sansserif :: String
sansserif = "xft:Rounded Mplus 1c Medium:style=Regular:size=" ++ fontsize
sansserif' :: String
sansserif' = "Rounded Mplus 1c Medium-" ++ fontsize
monospace :: String
monospace... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.