_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 |
|---|---|---|---|---|---|---|---|---|
e7a3972c3c830d609cd68dd2841018a7f3f3eff3376cd8206241b8eb17379049 | archaelus/tsung | ts_sup.erl | This code was developped by IDEALX ( / ) and
%%% contributors (their names can be found in the CONTRIBUTORS file).
Copyright ( C ) 2000 - 2001 IDEALX
%%%
%%% 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 S... | null | https://raw.githubusercontent.com/archaelus/tsung/b4ea0419c6902d8bb63795200964d25b19e46532/src/tsung/ts_sup.erl | erlang | contributors (their names can be found in the CONTRIBUTORS file).
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
MERCHANT... | This code was developped by IDEALX ( / ) and
Copyright ( C ) 2000 - 2001 IDEALX
it under the terms of the GNU General Public License as published by
the Free Software Foundation ; either version 2 of the License , or
You should have received a copy of the GNU General Public License
Foundation , Inc. ,... |
2dcd5db90eb09c0f65b3a42d9d5a7bd17449587afd77eb030d135142794f220b | ekmett/ekmett.github.com | Applicative.hs | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , GeneralizedNewtypeDeriving , FlexibleContexts , TypeOperators #
-----------------------------------------------------------------------------
-- |
-- Module : Data.Monoid.Applicative
Copyright : ( c ) 2009
-- License : BSD-style
-- Maintainer ... | null | https://raw.githubusercontent.com/ekmett/ekmett.github.com/8d3abab5b66db631e148e1d046d18909bece5893/haskell/monoids/_darcs/pristine/Data/Monoid/Applicative.hs | haskell | ---------------------------------------------------------------------------
|
Module : Data.Monoid.Applicative
License : BSD-style
Maintainer :
Stability : experimental
Portability : non-portable (MPTCs)
---------------------------------------------------------------------------
| A 'Traversa... | # LANGUAGE FlexibleInstances , MultiParamTypeClasses , GeneralizedNewtypeDeriving , FlexibleContexts , TypeOperators #
Copyright : ( c ) 2009
Monoids for working with an ' Applicative ' ' Functor ' .
module Data.Monoid.Applicative
( module Data.Monoid.Reducer
, module Data.Ring.Module
, Traver... |
ffe777d1f36583b0130a7e2cc9b0998c311356c1b860ae9373b6fbd3cd8b5b14 | ChrisTitusTech/gimphelp | 210_sketch_quick-sketch.scm | ; 210_sketch_quick-sketch.scm
last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
;==================================================
;
; Installation:
; This script should be placed in the user or system-wide script folder.
;
; Windows 7/10
C:\Program Files\GIMP 2\share\gimp\2.0\sc... | null | https://raw.githubusercontent.com/ChrisTitusTech/gimphelp/fdbc7e3671ce6bd74cefd83ecf7216e5ee0f1542/gimp_scripts-2.10/210_sketch_quick-sketch.scm | scheme | 210_sketch_quick-sketch.scm
==================================================
Installation:
This script should be placed in the user or system-wide script folder.
Windows 7/10
or
Linux
/home/yourname/.config/GIMP/2.10/scripts
or
Linux system-wide
/usr/share/gimp/2.0/scripts
======... | last modified / tested by [ gimphelp.org ]
05/11/2019 on GIMP 2.10.10
C:\Program Files\GIMP 2\share\gimp\2.0\scripts
C:\Users\YOUR - NAME\AppData\Roaming\GIMP\2.10\scripts
Modified by
in accordence with post by char101 on
it under the terms of the GNU General Public License as pub... |
9c9ee93f31c3910708941eb53723c287f10166a02578253a51c39777a69a1fcb | wargrey/graphics | image.rkt | #lang typed/racket/base
(provide (all-defined-out))
(require typed/racket/unsafe)
(require "../base.rkt")
(require "convert.rkt")
(require "source.rkt")
(module unsafe racket/base
(provide (all-defined-out))
(require "pangocairo.rkt")
(require "paint.rkt")
(require (submod "pixman.rkt" unsafe))
(requi... | null | https://raw.githubusercontent.com/wargrey/graphics/94fe8c6292701804a334189d4ba9f3b5cfaa95f7/bitmap/digitama/unsafe/image.rkt | racket | #lang typed/racket/base
(provide (all-defined-out))
(require typed/racket/unsafe)
(require "../base.rkt")
(require "convert.rkt")
(require "source.rkt")
(module unsafe racket/base
(provide (all-defined-out))
(require "pangocairo.rkt")
(require "paint.rkt")
(require (submod "pixman.rkt" unsafe))
(requi... | |
df83daabfd117e21e724a30989e2b8ab46bac3761d161bb3ade74120dbc1102f | mokus0/junkbox | fmap.hs | {-# OPTIONS -fth #-}
- " fmap.hs "
- ( c ) 2008
- "fmap.hs"
- (c) 2008 James Cook
-}
module Fmap where
import Prelude hiding (fmap)
import Language.Haskell.TH
import qualified Data.Map as M
import Control.Monad hiding (fmap)
typeVars :: Type -> [Name]
typeVars (ForallT vars _ t) = vars
typeVa... | null | https://raw.githubusercontent.com/mokus0/junkbox/151014bbef9db2b9205209df66c418d6d58b0d9e/Haskell/Template%20Haskell/fmap.hs | haskell | # OPTIONS -fth # |
- " fmap.hs "
- ( c ) 2008
- "fmap.hs"
- (c) 2008 James Cook
-}
module Fmap where
import Prelude hiding (fmap)
import Language.Haskell.TH
import qualified Data.Map as M
import Control.Monad hiding (fmap)
typeVars :: Type -> [Name]
typeVars (ForallT vars _ t) = vars
typeVars _ ... |
04dd373837305c627fe2e4a6bc2bae506be844af6b16641a588dd11c1de3c4a3 | mainland/dph | Segmented.hs | # LANGUAGE CPP #
#include "fusion-phases.h"
-- | Parallel combinators for segmented unboxed arrays
module Data.Array.Parallel.Unlifted.Parallel.Segmented
( replicateRSUP
, appendSUP
, appendSUP_old
, appendSUPV
, foldRUP
, sumRUP)
where
import Data.Array.Parallel.Unlift... | null | https://raw.githubusercontent.com/mainland/dph/742078c9e18b7dcf6526348e08d2dd16e2334739/dph-prim-par/Data/Array/Parallel/Unlifted/Parallel/Segmented.hs | haskell | | Parallel combinators for segmented unboxed arrays
for unboxed primops
replicate ------------------------------------------------------------------
| Segmented replication.
Each element in the vector is replicated the given number of times.
Append ----------------------------------------------------------... | # LANGUAGE CPP #
#include "fusion-phases.h"
module Data.Array.Parallel.Unlifted.Parallel.Segmented
( replicateRSUP
, appendSUP
, appendSUP_old
, appendSUPV
, foldRUP
, sumRUP)
where
import Data.Array.Parallel.Unlifted.Distributed
import Data.Array.Parallel.Unlifted.Dist... |
769c4ae590e20e0fff3df984aadfcfa54fa46e9c5a37ac7e4387bc9649df72cf | 0xd34df00d/hwc | Dispatch.hs | # LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
module Data.Dispatch where
import Control.Monad
import Language.Haskell.TH
import Data.WordCount
dispatch :: Name -> Name -> Q Exp
dispatch fun bs = reify ''Statistics >>= \case
TyConI (DataD _ _ _ _ cons _) -> do
let consNames = [ name | NormalC name _ <- ... | null | https://raw.githubusercontent.com/0xd34df00d/hwc/84cd881be879ecbab704b5c6636d954771de98a0/src/Data/Dispatch.hs | haskell | # LANGUAGE LambdaCase #
# LANGUAGE TemplateHaskell #
module Data.Dispatch where
import Control.Monad
import Language.Haskell.TH
import Data.WordCount
dispatch :: Name -> Name -> Q Exp
dispatch fun bs = reify ''Statistics >>= \case
TyConI (DataD _ _ _ _ cons _) -> do
let consNames = [ name | NormalC name _ <- ... | |
5babfca48ecf0f163b605864ed31e4c6478fbeab48a74de241006eaadf47955a | sru-systems/protobuf-simple | FileDesc.hs | -- |
Module : Parser . FileDesc
Copyright : ( c ) 2015 - 2016 < >
License : MIT
Maintainer : < >
--
-- File Descriptor type and functions.
module Parser.FileDesc
( FileDesc
, new
, getName
, getPackage
, setPackage
, addMessageDesc
, addMessageDescs
, getMe... | null | https://raw.githubusercontent.com/sru-systems/protobuf-simple/ee0f26b6a8588ed9f105bc9ee72c38943133ed4d/src/Parser/FileDesc.hs | haskell | |
File Descriptor type and functions. | Module : Parser . FileDesc
Copyright : ( c ) 2015 - 2016 < >
License : MIT
Maintainer : < >
module Parser.FileDesc
( FileDesc
, new
, getName
, getPackage
, setPackage
, addMessageDesc
, addMessageDescs
, getMessageDescs
, addEnumDesc
, addEnumDescs... |
097262295bd1c0a03bcb16b34509e96643b596651c2c6804ee3ccd5cebd85c63 | horie-t/iacc-riscv | test_cases.scm | (define test-cases
'(
("imm int posi num" 1 "1\n")
("imm int zero num" 0 "0\n")
("imm int minus" -1 "-1\n")
("imm int max" 536870911 "536870911\n")
("imm int min" -536870912 "-536870912\n")
("imm false" #f "#f\n")
("imm true" ... | null | https://raw.githubusercontent.com/horie-t/iacc-riscv/2aea0b27f712f4b9354ecf04a7a0cb08f5c2117e/10_ProperTailCalls/test_cases.scm | scheme | (define test-cases
'(
("imm int posi num" 1 "1\n")
("imm int zero num" 0 "0\n")
("imm int minus" -1 "-1\n")
("imm int max" 536870911 "536870911\n")
("imm int min" -536870912 "-536870912\n")
("imm false" #f "#f\n")
("imm true" ... | |
195535bf3708c8967437725c882c5bd5e9a46a2a27a5d418d8952effa36995bb | mirage/irmin | irmin_bench.mli |
* Copyright ( c ) 2013 - 2022 < >
* Copyright ( c ) 2019
*
* 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 ... | null | https://raw.githubusercontent.com/mirage/irmin/abeee121a6db7b085b3c68af50ef24a8d8f9ed05/src/irmin-test/irmin_bench.mli | ocaml |
* Copyright ( c ) 2013 - 2022 < >
* Copyright ( c ) 2019
*
* 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 ... | |
1c93c85618bd2fd67c423fad0dc05fe12029b72167d30178f0a6704a50649bec | ucsd-progsys/nate | fileselect.ml | (*************************************************************************)
(* *)
(* Objective Caml LablTk library *)
(* *)
,... | null | https://raw.githubusercontent.com/ucsd-progsys/nate/8b1267cd8b10283d8bc239d16a28c654a4cb8942/eval/sherrloc/easyocaml%2B%2B/otherlibs/labltk/browser/fileselect.ml | ocaml | ***********************************************************************
Objective Caml LablTk library
... | , Kyoto University RIMS
Copyright 1999 Institut National de Recherche en Informatique et
en Automatique and Kyoto University . All rights reserved .
This file is distributed under the terms of the GNU Library
$ I d : fileselect.ml , v 1.21 2005/... |
42162c4b438883b3da1d429205a28a9d96ffece33c83e41dcc004a4312e6562f | tweag/ormolu | operators-7-out.hs | foo c = case c of { _ -> c } : []
| null | https://raw.githubusercontent.com/tweag/ormolu/e38a7cd5a4377d22a6f38ced4e14eccd863bf6e9/data/examples/declaration/value/function/operators-7-out.hs | haskell | foo c = case c of { _ -> c } : []
| |
3cca74009f4a3b69297096f854a30897f3e2e19d505c9a71d213a87add5962cd | esl/MongooseIM | bosh_interleave_reqs.erl | -module(bosh_interleave_reqs).
-behaviour(proper_statem).
-include_lib("proper/include/proper.hrl").
% -include_lib("eqc/include/eqc_statem.hrl").
% -include_lib("eqc/include/eqc.hrl").
-include_lib("escalus/include/escalus.hrl").
-include_lib("exml/include/exml.hrl").
-export([test/1, sample/0, prop/1]).
-export([... | null | https://raw.githubusercontent.com/esl/MongooseIM/8b8c294b1b01dc178eed1b3b28ca0fbbd73f382c/big_tests/tests/bosh_interleave_reqs.erl | erlang | -include_lib("eqc/include/eqc_statem.hrl").
-include_lib("eqc/include/eqc.hrl"). | -module(bosh_interleave_reqs).
-behaviour(proper_statem).
-include_lib("proper/include/proper.hrl").
-include_lib("escalus/include/escalus.hrl").
-include_lib("exml/include/exml.hrl").
-export([test/1, sample/0, prop/1]).
-export([initial_state/0, initial_state/1, command/1, precondition/2, postcondition/3,
... |
ed5c980f3b19015298edf7836cc21f76eff8e074e83eea4221bb146ab1b770a8 | nachivpn/mt | hm.erl | -module(hm).
-export([solve/1,solvePreds/2]).
-export([unify/2]).
-export([emptySub/0,comp/2,subE/2
,subT/2,subP/2
,subPs/2,free/1
,isTVar/1]).
-export([bt/2,funt/3,tvar/2,tcon/3,forall/4]).
-export([freshen/1,generalize/3,eqType/2,fresh/1]).
-export([getLn/1,pretty/1,prettyCs/2,prettify/2,replaceLn/3]).
-e... | null | https://raw.githubusercontent.com/nachivpn/mt/fcffbcb770cfe0b19c189e6c8ce2ccab61062195/etc/src/hm.erl | erlang | Map <tvar(),type()>
Type variable constructors
apply new substitution to remaining constraints
compose substitutions
Unification algorithm
unify is left biased (this is a crucial property relied upon!)
i.e., unify(T1,T2) returns substitution for T1 in terms of T2
union (Y_, entries in X whose keys are not in Y)... | -module(hm).
-export([solve/1,solvePreds/2]).
-export([unify/2]).
-export([emptySub/0,comp/2,subE/2
,subT/2,subP/2
,subPs/2,free/1
,isTVar/1]).
-export([bt/2,funt/3,tvar/2,tcon/3,forall/4]).
-export([freshen/1,generalize/3,eqType/2,fresh/1]).
-export([getLn/1,pretty/1,prettyCs/2,prettify/2,replaceLn/3]).
-e... |
624b27c9d85863e21237bbf8f022f27af6906172ce16a84e9245d7e78178f50e | input-output-hk/cardano-sl | TxPayload.hs | # LANGUAGE RecordWildCards #
module Pos.Chain.Txp.TxPayload
( TxPayload (..)
, mkTxPayload
, checkTxPayload
, txpTxs
, txpWitnesses
) where
import Universum
import Control.Lens (makeLenses)
import Control.Monad.Except (MonadError)
import ... | null | https://raw.githubusercontent.com/input-output-hk/cardano-sl/1499214d93767b703b9599369a431e67d83f10a2/chain/src/Pos/Chain/Txp/TxPayload.hs | haskell | | Payload of Txp component which is part of main block. Constructor
is unsafe, because it lets one create invalid payload, for example
with different number of transactions and witnesses.
| Transactions are the main payload.
| Witnesses for each transaction.
The payload is invalid if this list is not of the same ... | # LANGUAGE RecordWildCards #
module Pos.Chain.Txp.TxPayload
( TxPayload (..)
, mkTxPayload
, checkTxPayload
, txpTxs
, txpWitnesses
) where
import Universum
import Control.Lens (makeLenses)
import Control.Monad.Except (MonadError)
import ... |
3ae237e9b4d2def1637c0bd2af9ff2a8c6644ebdfdba675bb440e0a5e51c475f | kupl/LearnML | original.ml | let rec uniq (lst : 'a list) : 'b list =
let rec is_member n (lst' : 'a list) : bool =
match lst' with
| [] -> false
| hd :: tl -> if hd = n then true else is_member n tl
in
let rec loop (lbuf : 'a list) : 'a list =
match lbuf with
| [] -> []
| hd :: tl ->
let rbuf : 'a list = loo... | null | https://raw.githubusercontent.com/kupl/LearnML/c98ef2b95ef67e657b8158a2c504330e9cfb7700/result/cafe2/uniq/sub18/original.ml | ocaml | let rec uniq (lst : 'a list) : 'b list =
let rec is_member n (lst' : 'a list) : bool =
match lst' with
| [] -> false
| hd :: tl -> if hd = n then true else is_member n tl
in
let rec loop (lbuf : 'a list) : 'a list =
match lbuf with
| [] -> []
| hd :: tl ->
let rbuf : 'a list = loo... | |
40d74285accfb73e2c8d4ea92de6f2548bd60a05b7bf160cd5f4b297eafedbb4 | gedge-platform/gedge-platform | eetcd_lock_gen.erl | %%%-------------------------------------------------------------------
@doc Behaviour to implement for eectd . Lock
@private
%% All detail documents please visit -io/etcd/blob/master/Documentation/dev-guide/api_reference_v3.md
%% @end
%%%-------------------------------------------------------------------
This ... | null | https://raw.githubusercontent.com/gedge-platform/gedge-platform/97c1e87faf28ba2942a77196b6be0a952bff1c3e/gs-broker/broker-server/deps/eetcd/src/clients/eetcd_lock_gen.erl | erlang | -------------------------------------------------------------------
All detail documents please visit -io/etcd/blob/master/Documentation/dev-guide/api_reference_v3.md
@end
-------------------------------------------------------------------
@doc Unary RPC for service at path "/v3lockpb.Lock/Lock"
@doc Unary RPC fo... | @doc Behaviour to implement for eectd . Lock
@private
This module was generated on 2020 - 04 - 02T02:00:46 + 00:00 and should not be modified manually
-module(eetcd_lock_gen).
-export([lock/1]).
-export([unlock/1]).
-spec lock(router_pb:'Etcd.LockRequest'()) ->
{ok, router_pb:'Etcd.LockResponse'()}|{erro... |
b7a302d1d771d769683f00aa525a8803d9a95f8d43984846e4adb64521fc48d9 | c-cube/ocaml-containers | CCTimer.ml | type job = Job : float * (unit -> 'a) -> job
let ( <= ) (a : float) b = Stdlib.( <= ) a b
let ( >= ) (a : float) b = Stdlib.( >= ) a b
let ( < ) (a : float) b = Stdlib.( < ) a b
let ( > ) (a : float) b = Stdlib.( > ) a b
module TaskHeap = CCHeap.Make (struct
type t = job
let leq (Job (f1, _)) (Job (f2, _)) = f1 ... | null | https://raw.githubusercontent.com/c-cube/ocaml-containers/69f2805f1073c4ebd1063bbd58380d17e62f6324/src/threads/CCTimer.ml | ocaml | when no task is scheduled, this is the amount of time that is waited
in a row for something to happen. This is also the maximal delay
between the call to {!stop} and the actual termination of the
thread.
accepted time diff for actions.
check next task
now!
The main thread function: wait for next event... | type job = Job : float * (unit -> 'a) -> job
let ( <= ) (a : float) b = Stdlib.( <= ) a b
let ( >= ) (a : float) b = Stdlib.( >= ) a b
let ( < ) (a : float) b = Stdlib.( < ) a b
let ( > ) (a : float) b = Stdlib.( > ) a b
module TaskHeap = CCHeap.Make (struct
type t = job
let leq (Job (f1, _)) (Job (f2, _)) = f1 ... |
6c596587ae478644bad3d7b0f3f824edfec6c0eafe46dfbc939fd38b3bacafaa | onaio/vega-viewer | histogram_test.cljs | (ns vega-viewer.vega.specs.histogram-test
(:require-macros [cljs.test :refer [deftest testing]])
(:require [vega-viewer.vega.specs-test-utils
:refer [test-validity]]
[vega-viewer.vega.specs.histogram
:refer [generate-histogram-chart-vega-spec]]))
(deftest histogram-spec-is-veg... | null | https://raw.githubusercontent.com/onaio/vega-viewer/591c310131d2b662d96aef21546a718fcc0752a8/test/vega_viewer/vega/specs/histogram_test.cljs | clojure | (ns vega-viewer.vega.specs.histogram-test
(:require-macros [cljs.test :refer [deftest testing]])
(:require [vega-viewer.vega.specs-test-utils
:refer [test-validity]]
[vega-viewer.vega.specs.histogram
:refer [generate-histogram-chart-vega-spec]]))
(deftest histogram-spec-is-veg... | |
e7e477d164301ea0d3cd4470403163acf096b3d0807b7a7f71abff15cc5f9b74 | ucsd-progsys/liquid-fixpoint | Parse.hs | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE NoMonomorphismRestriction #
{-# LANGUAGE UndecidableInstances #-}
# LANGUAGE DeriveGeneric #
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -Wno-name-shadowing #-}
module Language.Fixpoint.Parse (
... | null | https://raw.githubusercontent.com/ucsd-progsys/liquid-fixpoint/39b73238b2b6184815ede2c8c64a87eafe5506f6/src/Language/Fixpoint/Parse.hs | haskell | # LANGUAGE UndecidableInstances #
# LANGUAGE OverloadedStrings #
# OPTIONS_GHC -Wno-name-shadowing #
* Top Level Class for Parseable Values
* Top Level Class for Parseable Values
* Some Important keyword and parsers
* Parsing basic entities
fTyConP -- Type constructors
Lower-case identifiers
Uppe... | # LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE NoMonomorphismRestriction #
# LANGUAGE DeriveGeneric #
module Language.Fixpoint.Parse (
Inputable (..)
, Parser
, reserved, reservedOp
, locReserved
, parens , brackets, angles, braces
, semi ,... |
fb3ae546683a7a6871451242541a48b7bbf0bd4164e6701bde15f3b2f69e9e95 | bennn/dissertation | basics.rkt | #lang racket
;; ---------------------------------------------------------------------------------------------------
;; basic game ontology and data structures for simple concepts (hotels, cash, shares)
;; ---------------------------------------------------------------------------------------------------
(provide
hot... | null | https://raw.githubusercontent.com/bennn/dissertation/779bfe6f8fee19092849b7e2cfc476df33e9357b/dissertation/scrbl/jfp-2019/benchmarks/acquire/untyped/basics.rkt | racket | ---------------------------------------------------------------------------------------------------
basic game ontology and data structures for simple concepts (hotels, cash, shares)
---------------------------------------------------------------------------------------------------
(-> Any Boolean)
(-> Hotel Hotel... | #lang racket
(provide
hotel?
hotel<=?
ALL-HOTELS
( Listof Hotel ) , also sorted
SAFE# FINAL#
Natural
hotel->label
hotel->color
shares?
banker-shares0
player-shares0
shares-order?
SHARES-PER-TURN#
Natural
shares++
(rename-out [ext:shares-- shares--])
Precondition : ( shares - availabl... |
4f2d90ef12dc20256f8f0c449261f97587de71c93a7870c4efe1c22f71d7e588 | dongcarl/guix | docker.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2017 < >
Copyright © 2017 , 2018 , 2019 , 2021 < >
Copyright © 2018 < >
Copyright © 2021 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU G... | null | https://raw.githubusercontent.com/dongcarl/guix/d2b30db788f1743f9f8738cb1de977b77748567f/guix/docker.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2017 < >
Copyright © 2017 , 2018 , 2019 , 2021 < >
Copyright © 2018 < >
Copyright © 2021 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module ... |
d7814aca6bfea2973138ab37266db1f860661da5894eb9e5088fb6716c903d7a | ivarref/clj-paginate | ticker.clj | (ns com.github.ivarref.clj-paginate.ticker
(:require [clojure.string :as str])
(:import (clojure.lang IFn)
(java.lang AutoCloseable)))
(def is-cursive?
(try
(require '[cursive.repl.runtime])
true
(catch Exception _
false)))
(defn ticker [total]
(let [total (long total)
sta... | null | https://raw.githubusercontent.com/ivarref/clj-paginate/500f429382ee17a04a6eea731f12fe6e6e327032/test/com/github/ivarref/clj_paginate/ticker.clj | clojure | (ns com.github.ivarref.clj-paginate.ticker
(:require [clojure.string :as str])
(:import (clojure.lang IFn)
(java.lang AutoCloseable)))
(def is-cursive?
(try
(require '[cursive.repl.runtime])
true
(catch Exception _
false)))
(defn ticker [total]
(let [total (long total)
sta... | |
ab796d29ccd2219d27012a3d81820463b13c6e3d86385b1d1fd2f21c97bb35e7 | imdea-software/leap | PairsExpression.ml |
(***********************************************************************)
(* *)
LEAP
(* *)
, IMDEA ... | null | https://raw.githubusercontent.com/imdea-software/leap/5f946163c0f80ff9162db605a75b7ce2e27926ef/src/theories/pairs/PairsExpression.ml | ocaml | *********************************************************************
... |
LEAP
, IMDEA Software Institute
Copyright 2011 IMDEA Software Institute
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
you may not use this file except in compl... |
7a59460f12ba9e42fc2ce2db831c7105ede931b08a69e449464afc1b7ef26ce1 | lopec/LoPEC | master_node.erl | %%%-------------------------------------------------------------------
@author < >
( C ) 2009 ,
%%% @doc
%%% This module handles start of master node application.
%%% Currently it is not using any parameters.
%%% TODO: Once logger is up and running, stop function will log when
%%% application is stopped.
%%%... | null | https://raw.githubusercontent.com/lopec/LoPEC/29a3989c48a60e5990615dea17bad9d24d770f7b/branches/stable-1/lib/master/src/master_node.erl | erlang | -------------------------------------------------------------------
@doc
This module handles start of master node application.
Currently it is not using any parameters.
TODO: Once logger is up and running, stop function will log when
application is stopped.
@end
--------------------------------------------------... | @author < >
( C ) 2009 ,
Created : Oct 1 , 2009 by
-module(master_node).
-behaviour(application).
-export([start/2, stop/1]).
Returns : { ok , Pid } |
{ ok , Pid , State } |
start(_Type, _StartArgs) ->
chronicler:info("~w application started~n", [?MODULE]),
case master_sup:s... |
e6558aa874aa9f588f5206a78c64f21f06a3a39b1da8e7778938932ab540e6db | herd/herdtools7 | getModel.mli | (****************************************************************************)
(* the diy toolsuite *)
(* *)
, University College London , UK .
, INRIA Par... | null | https://raw.githubusercontent.com/herd/herdtools7/574c59e111deda09afbba1f2bdd94353f437faaf/herd/getModel.mli | ocaml | **************************************************************************
the diy toolsuite
en Automatique and ... | , University College London , UK .
, INRIA Paris - Rocquencourt , France .
Copyright 2023 - present Institut National de Recherche en Informatique et
This software is governed by the CeCILL - B license under French law and
modify and/ or redistribu... |
e7880b25d87d9ca138911e626aaab5501da1ccde739474ea273cfa2daadbd5e4 | vmchale/atspkg | Newtype.hs | module Newtype where
newtype IntType = IntType Int
| null | https://raw.githubusercontent.com/vmchale/atspkg/45be7ece6b9e9b09a7151efe53ff7e278112e84d/hs2ats/test/data/Newtype.hs | haskell | module Newtype where
newtype IntType = IntType Int
| |
3bd4f8a3ff06c47075d00e7c9ff2a56b6f116d245ebc8864d3c9721b5b05bc56 | amuletml/amulet | Implicits.hs | # LANGUAGE StandaloneDeriving , FlexibleContexts , FlexibleInstances ,
UndecidableInstances , ScopedTypeVariables , TemplateHaskell , MultiParamTypeClasses , GADTs #
UndecidableInstances, ScopedTypeVariables, TemplateHaskell, MultiParamTypeClasses, GADTs #-}
module Syntax.Implicits
( ImplicitScope
, Obligat... | null | https://raw.githubusercontent.com/amuletml/amulet/fcba0b7e198b8d354e95722bbe118bccc8483f4e/src/Syntax/Implicits.hs | haskell | | An obligation the solver needs to resolve if it chose this
implicit parameter.
| An implicit parameter to an implicit value.
| A concrete representation of /one/ implicit parameter, stored in an
implicit parameter scope (a trie, indexed by the 'head').
| The choice for this implicit parameter
^ The 'head' of t... | # LANGUAGE StandaloneDeriving , FlexibleContexts , FlexibleInstances ,
UndecidableInstances , ScopedTypeVariables , TemplateHaskell , MultiParamTypeClasses , GADTs #
UndecidableInstances, ScopedTypeVariables, TemplateHaskell, MultiParamTypeClasses, GADTs #-}
module Syntax.Implicits
( ImplicitScope
, Obligat... |
0ff55f9465d2b4e438f9719c2076c0b60e887826319fd04250e6aec555abd58a | tsloughter/kuberl | kuberl_v1beta1_custom_resource_definition_condition.erl | -module(kuberl_v1beta1_custom_resource_definition_condition).
-export([encode/1]).
-export_type([kuberl_v1beta1_custom_resource_definition_condition/0]).
-type kuberl_v1beta1_custom_resource_definition_condition() ::
#{ 'lastTransitionTime' => kuberl_date_time:kuberl_date_time(),
'message' => binary(),
... | null | https://raw.githubusercontent.com/tsloughter/kuberl/f02ae6680d6ea5db6e8b6c7acbee8c4f9df482e2/gen/kuberl_v1beta1_custom_resource_definition_condition.erl | erlang | -module(kuberl_v1beta1_custom_resource_definition_condition).
-export([encode/1]).
-export_type([kuberl_v1beta1_custom_resource_definition_condition/0]).
-type kuberl_v1beta1_custom_resource_definition_condition() ::
#{ 'lastTransitionTime' => kuberl_date_time:kuberl_date_time(),
'message' => binary(),
... | |
5e711285373265708fa50e892f566905d20858388fe2f05c3b1757d7951f1601 | alaricsp/chicken-scheme | chicken-ffi-syntax.scm | ;;;; chicken-ffi-syntax.scm
;
Copyright ( c ) 2000 - 2007 ,
Copyright ( c ) 2008 - 2009 , The Chicken Team
; 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 co... | null | https://raw.githubusercontent.com/alaricsp/chicken-scheme/1eb14684c26b7c2250ca9b944c6b671cb62cafbc/chicken-ffi-syntax.scm | scheme | chicken-ffi-syntax.scm
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 retain the above copyright notice, this list of conditions and the following
discl... | Copyright ( c ) 2000 - 2007 ,
Copyright ( c ) 2008 - 2009 , The Chicken Team
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS " AS IS " AND ANY EXPRESS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT , INDIRECT , INCIDENTAL , SPECIAL , EXEMPLARY , OR
CONSEQUENTIAL DAMAGES ( INCLUDING , BUT NOT LIM... |
8c4bad0bb8dac6559c872aee531bd2ad04868395c6c6cbe0b1473d1fd5e73d2d | LdBeth/CLFSWM | contrib-example.lisp | ;;; --------------------------------------------------------------------------
;;; CLFSWM - FullScreen Window Manager
;;;
;;; --------------------------------------------------------------------------
;;; Documentation: A contrib example.
;;; --------------------------------------------------------------------------
;;... | null | https://raw.githubusercontent.com/LdBeth/CLFSWM/4e936552d1388718d2947a5f6ca3eada19643e75/contrib/contrib-example.lisp | lisp | --------------------------------------------------------------------------
CLFSWM - FullScreen Window Manager
--------------------------------------------------------------------------
Documentation: A contrib example.
--------------------------------------------------------------------------
This program is f... | ( C ) 2015 < >
it under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
Foundation , Inc. , 59 Temple Place - Suite 330 , Boston , MA 02111 - 1307 , USA .
(in-package :clfswm)
(format t "Loading Contrib Example code... ")
(forma... |
915e2adfa0e133f947a68ff785df704b7bd2e15c9d9b01e6f67b570853afc9ab | ledger/ledger4 | Print.hs | # LANGUAGE FlexibleContexts #
{-# LANGUAGE ImpredicativeTypes #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PackageImports #-}
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Ledger.Commodity.Print
( printBalance
, balance
) where
import Control.Applicative
import ... | null | https://raw.githubusercontent.com/ledger/ledger4/0dd4d772dbd6a94ef83398e79e9acab2029a5a3a/commodities/Ledger/Commodity/Print.hs | haskell | # LANGUAGE ImpredicativeTypes #
# LANGUAGE OverloadedStrings #
# LANGUAGE PackageImports #
import qualified Data.Text.Lazy as TL | # LANGUAGE FlexibleContexts #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeFamilies #
module Ledger.Commodity.Print
( printBalance
, balance
) where
import Control.Applicative
import Control.Lens
import Control.Monad
import "mtl" Control.Monad.Reader.Class
import ... |
6dbb35f6ad1755ec64cbd68b4f54dbd7f9ab11319a36ecb56ab36498a5071bf3 | bobzhang/fan | rec.ml | (* rec.ml *)
value rec x = 42;
| null | https://raw.githubusercontent.com/bobzhang/fan/7ed527d96c5a006da43d3813f32ad8a5baa31b7f/src/todoml/test/fixtures/rec.ml | ocaml | rec.ml | value rec x = 42;
|
ac6acc946a04cb7b530aa715d1edcad7b79050055d4238cb92523769150629a1 | gsakkas/rite | 2919.ml |
let rec clone x n =
match n with | 0 -> [] | a -> if a < 0 then [] else (clone x (n - 1)) @ [x];;
let padZero l1 l2 =
if (List.length l1) > (List.length l2)
then (l1, (List.append (clone 0 ((List.length l1) - (List.length l2))) l2))
else ((List.append (clone 0 ((List.length l2) - (List.length l1))) l1), l2);;... | null | https://raw.githubusercontent.com/gsakkas/rite/958a0ad2460e15734447bc07bd181f5d35956d3b/data/sp14/2919.ml | ocaml |
let rec clone x n =
match n with | 0 -> [] | a -> if a < 0 then [] else (clone x (n - 1)) @ [x];;
let padZero l1 l2 =
if (List.length l1) > (List.length l2)
then (l1, (List.append (clone 0 ((List.length l1) - (List.length l2))) l2))
else ((List.append (clone 0 ((List.length l2) - (List.length l1))) l1), l2);;... | |
c0d95a16277aa19d43a766d37014029570881967ebd964f9c6a4d15697364edd | typelead/eta | Tc232.hs | # LANGUAGE FlexibleContexts #
{ - # OPTIONS_GHC -fno - warn - redundant - constraints # - }
This one fixed the constraint solver ( error )
See Trac # 1494
module Tc232 where
import Control.Monad.State
newtype L m r = L (StateT Int m r)
instance Functor (L m) where
fmap = undefined
instance Applicative (L... | null | https://raw.githubusercontent.com/typelead/eta/97ee2251bbc52294efbf60fa4342ce6f52c0d25c/tests/suite/typecheck/compile/tc232/Tc232.hs | haskell | # LANGUAGE FlexibleContexts #
{ - # OPTIONS_GHC -fno - warn - redundant - constraints # - }
This one fixed the constraint solver ( error )
See Trac # 1494
module Tc232 where
import Control.Monad.State
newtype L m r = L (StateT Int m r)
instance Functor (L m) where
fmap = undefined
instance Applicative (L... | |
3634a9c9df6c912b8377ff3215da42905da145c2c96dd68631eef287c1cc2b88 | ArulselvanMadhavan/haskell-first-principles | SemigroupUtils.hs | module SemigroupUtils where
import qualified Data.List.NonEmpty as N
import Data.Semigroup
import Test.QuickCheck
semiGroupAssoc :: (Eq s, Semigroup s) => s -> s -> s -> Bool
semiGroupAssoc a b c =
(a <> b) <> c == a <> (b <> c)
testStringNonEmptyList :: IO()
testStringNonEmptyList =
quick... | null | https://raw.githubusercontent.com/ArulselvanMadhavan/haskell-first-principles/06e0c71c502848c8e75c8109dd49c0954d815bba/chapter15/test/SemigroupUtils.hs | haskell | module SemigroupUtils where
import qualified Data.List.NonEmpty as N
import Data.Semigroup
import Test.QuickCheck
semiGroupAssoc :: (Eq s, Semigroup s) => s -> s -> s -> Bool
semiGroupAssoc a b c =
(a <> b) <> c == a <> (b <> c)
testStringNonEmptyList :: IO()
testStringNonEmptyList =
quick... | |
b994de6277e3148a8ea2dfd42a29b08e325750f6d514d72e60280aef337d056d | pedestal/samples | server.clj | (ns jboss.server
for -main method in uberjar
(:require [jboss.service :as service]
[io.pedestal.service.http :as bootstrap]))
(def service-instance
"Global var to hold service instance."
nil)
(defn get-context
[]
(let [servlet (::bootstrap/servlet service-instance)
context (.getServlet... | null | https://raw.githubusercontent.com/pedestal/samples/caaf04afe255586f8f4e1235deeb0c1904179355/jboss/src/jboss/server.clj | clojure | (service/init-url-for (get-context)) | (ns jboss.server
for -main method in uberjar
(:require [jboss.service :as service]
[io.pedestal.service.http :as bootstrap]))
(def service-instance
"Global var to hold service instance."
nil)
(defn get-context
[]
(let [servlet (::bootstrap/servlet service-instance)
context (.getServlet... |
0c8b550e665c4a8843799bf2ddbbed2af2c3c9f24d0d6973cd0458d251ccf15a | dbuenzli/gg | checkm.ml | ---------------------------------------------------------------------------
Copyright ( c ) 2013 The gg programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... | null | https://raw.githubusercontent.com/dbuenzli/gg/89c2b8a8a3d3bf60316d722fc2eec3b20252eb01/test/checkm.ml | ocaml | test_seed : int
Pretty print paragraphs.
paragraphs from string.
Misc pretty printers.
short cut.
Pretty printing failures.
Pretty print murders
Pretty print test ends
timings < min_time are not reported.
Loggers.
kill the line.
Tests
current test number in the list of tests.
Global test list... | ---------------------------------------------------------------------------
Copyright ( c ) 2013 The gg programmers . All rights reserved .
Distributed under the ISC license , see terms at the end of the file .
---------------------------------------------------------------------------
Copyright (c) 20... |
03e708224d2473cb90ed178249b0d9effc3ac32f5cd0936ccdba6b6a2ecb249d | ygmpkk/house | StdIOBasic.hs | -----------------------------------------------------------------------------
-- |
-- Module : StdIOBasic
Copyright : ( c ) 2002
-- License : BSD-style
--
-- Maintainer :
-- Stability : provisional
-- Portability : portable
--
StdIOBasic defines basic types and access functions for the I\/... | null | https://raw.githubusercontent.com/ygmpkk/house/1ed0eed82139869e85e3c5532f2b579cf2566fa2/ghc-6.2/libraries/ObjectIO/Graphics/UI/ObjectIO/StdIOBasic.hs | haskell | ---------------------------------------------------------------------------
|
Module : StdIOBasic
License : BSD-style
Maintainer :
Stability : provisional
Portability : portable
---------------------------------------------------------------------------
General type constructors for composi... | Copyright : ( c ) 2002
StdIOBasic defines basic types and access functions for the I\/O library .
module Graphics.UI.ObjectIO.StdIOBasic (module Graphics.UI.ObjectIO.StdIOBasic) where
class Zero a where
zero :: a
class One a where
one :: a
This used to be ~ in Clean , but in Haskell ~ is reserve... |
28eb7cbe003c1baea2e9766af0c5d9e2896839417337f915026bbb1064de9ab4 | mirage/irmin | fold.ml |
* Copyright ( c ) 2022 Tarides < >
*
* 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/mirage/irmin/66c8afbc02d83268354c16ec761caca7faae5249/examples/fold.ml | ocaml | example of using tree fold
Not accumulating anything so use unit as accumulator type |
* Copyright ( c ) 2022 Tarides < >
*
* 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 ... |
16bb7bfd74bc748c10c92f31915cdf4520fb54ce52bc4e3334b468bbd90f3a3a | racket/mzscheme | installer.rkt | #lang racket/base
(require launcher
compiler/embed
racket/file
racket/path
setup/dirs)
(provide installer)
(define (installer path coll user? no-main?)
(unless no-main?
(do-installer path coll user? #f)
(when (and (not user?)
(find-config-tethered-console-b... | null | https://raw.githubusercontent.com/racket/mzscheme/39f323980a452aff1c3dd53003cdd661190ef698/mzscheme-lib/mzscheme/installer.rkt | racket | #lang racket/base
(require launcher
compiler/embed
racket/file
racket/path
setup/dirs)
(provide installer)
(define (installer path coll user? no-main?)
(unless no-main?
(do-installer path coll user? #f)
(when (and (not user?)
(find-config-tethered-console-b... | |
55e76a35244aec71fc3aaa5d860f993a72c90100068abc4b956e4aa0100970e4 | dparis/gen-phzr | properties.clj | (ns gen-phzr.codegen.forms.properties
(:require [cljfmt.core :as cfmt]
[cuerdas.core :as str]
[gen-phzr.util :as u]))
(defn ^:private read-only?
[p]
(boolean (:readonly p)))
(defn ^:private build-keyword-name-map
[cs]
(into (sorted-map)
(for [c cs
:let [cn (:na... | null | https://raw.githubusercontent.com/dparis/gen-phzr/e4c7b272e225ac343718dc15fc84f5f0dce68023/src/gen_phzr/codegen/forms/properties.clj | clojure | (ns gen-phzr.codegen.forms.properties
(:require [cljfmt.core :as cfmt]
[cuerdas.core :as str]
[gen-phzr.util :as u]))
(defn ^:private read-only?
[p]
(boolean (:readonly p)))
(defn ^:private build-keyword-name-map
[cs]
(into (sorted-map)
(for [c cs
:let [cn (:na... | |
8919baeb6526fb6eb2365a6e40f4dd2695ddf752f1fc90bd7a124ce5ae0ec967 | borkdude/dynaload | lib.cljc | (ns borkdude.lib)
(defn foo [] 1)
| null | https://raw.githubusercontent.com/borkdude/dynaload/ed3ab89b31a01f7369672385a7ae5bb6e6677c47/test/borkdude/lib.cljc | clojure | (ns borkdude.lib)
(defn foo [] 1)
| |
cd3a097aac3c248e1d08aeecf46156712d3e241f5680c528a89c594105387d19 | haskell-effectful/effectful | Unlift.hs | # LANGUAGE CPP #
module Unlift (unliftBenchmark) where
#ifdef VERSION_criterion
import Criterion
#endif
#ifdef VERSION_tasty_bench
import Test.Tasty.Bench
#endif
import qualified UnliftIO as U
import Effectful
import Effectful.State.Dynamic
import Utils
import qualified Effectful.Concurrent.Async as A
unliftBenchm... | null | https://raw.githubusercontent.com/haskell-effectful/effectful/cc25dc9ef4d06c8df391ede07642d3bbfbab6aca/effectful/bench/Unlift.hs | haskell | --------------------------------------
-------------------------------------- | # LANGUAGE CPP #
module Unlift (unliftBenchmark) where
#ifdef VERSION_criterion
import Criterion
#endif
#ifdef VERSION_tasty_bench
import Test.Tasty.Bench
#endif
import qualified UnliftIO as U
import Effectful
import Effectful.State.Dynamic
import Utils
import qualified Effectful.Concurrent.Async as A
unliftBenchm... |
84588a951d0f4bcebe92dc1b681b81223e9e25b4138dec324336e613783d5e9d | jwiegley/trade-journal | Entry.hs | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MonadComprehensions #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module Ledger.Entry where
import Control.... | null | https://raw.githubusercontent.com/jwiegley/trade-journal/774f8db4879c5a49c576b53f56bc82b1e81acf97/src/Ledger/Entry.hs | haskell | | Fold from the given entry type into its corresponding Ledger transaction. | # LANGUAGE DataKinds #
# LANGUAGE FlexibleContexts #
# LANGUAGE FlexibleInstances #
# LANGUAGE KindSignatures #
# LANGUAGE MonadComprehensions #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE ScopedTypeVariables #
# LANGUAGE TypeApplications #
# LANGUAGE UndecidableInstances #
module Ledger.Entry where
import Control.... |
0ee8a23582d8b5db4108095479a3c8d9a0650dcdb2c1c4a2b13e59dc08a9716c | conjure-cp/conjure | Active.hs | # LANGUAGE DeriveGeneric , DeriveDataTypeable , DeriveFunctor , , DeriveFoldable #
module Conjure.Language.Expression.Op.Active where
import Conjure.Prelude
import Conjure.Language.Expression.Op.Internal.Common
import qualified Data.Aeson as JSON -- aeson
import qualified Data.HashMap.Strict as M ... | null | https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/src/Conjure/Language/Expression/Op/Active.hs | haskell | aeson
unordered-containers
vector | # LANGUAGE DeriveGeneric , DeriveDataTypeable , DeriveFunctor , , DeriveFoldable #
module Conjure.Language.Expression.Op.Active where
import Conjure.Prelude
import Conjure.Language.Expression.Op.Internal.Common
data OpActive x = OpActive x Name
deriving (Eq, Ord, Show, Data, Functor, Traversable, Foldable, Ty... |
951fe311ad67990aeb783e2f0828d73f67bb450cc2373af1df460f556150d723 | haskell-servant/servant | Machines.hs | {-# LANGUAGE DataKinds #-}
# LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
{-# LANGUAGE ScopedTypeVariables #-}
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
| This module exports ' ToSourceIO ' and ' FromSourceIO ' for ' Ma... | null | https://raw.githubusercontent.com/haskell-servant/servant/d06b65c4e6116f992debbac2eeeb83eafb960321/servant-machines/src/Servant/Machines.hs | haskell | # LANGUAGE DataKinds #
# LANGUAGE ScopedTypeVariables #
| Helper class to implement @'ToSourceIO' 'MachineT'@ instance
for various monads. | # LANGUAGE FlexibleInstances #
# LANGUAGE GADTs #
# LANGUAGE MultiParamTypeClasses #
# LANGUAGE UndecidableInstances #
# OPTIONS_GHC -Wno - orphans #
| This module exports ' ToSourceIO ' and ' FromSourceIO ' for ' MachineT ' instances .
module Servant.Machines (
MachineToSourceIO (..),
... |
cfef4a3f0a72c5bc4cce4464d43e91421a79d2106dd9ddb3d0c1bf308cccc347 | rems-project/cerberus | core_parser_driver.ml | open Cerb_frontend
open Core_parser_util
let genparse mode std filename =
let read f input =
let channel = open_in input in
let result = f channel in
let () = close_in channel in
result
in
let module Parser = Core_parser.Make (struct
let mode = mode
let std = std
end) in
let par... | null | https://raw.githubusercontent.com/rems-project/cerberus/cd52d95cd7d4826f4638e9806f081a65da443e71/parsers/core/core_parser_driver.ml | ocaml | | SD_Pointee _
| SD_PredOutput _ | open Cerb_frontend
open Core_parser_util
let genparse mode std filename =
let read f input =
let channel = open_in input in
let result = f channel in
let () = close_in channel in
result
in
let module Parser = Core_parser.Make (struct
let mode = mode
let std = std
end) in
let par... |
bd714f1ea6349c93fa2eae313cd7542d32e00bb8c7ae96fd9898ad044277e2b7 | silverbullettt/SICP | 3.24.rkt | (define (make-table pred)
(let ((local-table (list '*table*))
(same-key? pred))
(define (assoc key records)
(cond ((null? records) #f)
((same-key? key (caar records)) (car records))
(else (assoc key (cdr records)))))
(define (lookup key-1 key-2)
(let ((subtable (ass... | null | https://raw.githubusercontent.com/silverbullettt/SICP/e773a8071ae2fae768846a2b295b5ed96b019f8d/3.24.rkt | racket | (define (make-table pred)
(let ((local-table (list '*table*))
(same-key? pred))
(define (assoc key records)
(cond ((null? records) #f)
((same-key? key (caar records)) (car records))
(else (assoc key (cdr records)))))
(define (lookup key-1 key-2)
(let ((subtable (ass... | |
69258657478e7f5a4db7bd5cb7e43974f85a45dfc0f3f13fc284c9bd72fd58b1 | logicmoo/wam_common_lisp | cmpmap.lsp | Copyright ( c ) 1984 , and .
Copyright ( c ) 1990 , .
;;;;
;;;; This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation ; either
version 2 of the License , or ( at your op... | null | https://raw.githubusercontent.com/logicmoo/wam_common_lisp/4396d9e26b050f68182d65c9a2d5a939557616dd/prolog/wam_cl/src/cmp/cmpmap.lsp | lisp |
This program is free software; you can redistribute it and/or
either
See file '../Copyright' for full details.
---------------------------------------------------------------------- | Copyright ( c ) 1984 , and .
Copyright ( c ) 1990 , .
modify it under the terms of the GNU Library General Public
version 2 of the License , or ( at your option ) any later version .
CMPMAP Map functions .
(in-package 'compiler)
(defun c1map-functions (name car-p args &aux funob info)
(wh... |
9b274f21ec56ea564b5d1915669897bca3b905a25e025c756c204f1ff0ddd59e | MaskRay/OJHaskell | 26.hs | import Data.List
import Data.Ord
main = print . fst . maximumBy (comparing snd) $ [(n, f n) | n <- [2..999]]
where f n = g 1 n []
g r 0 xs = 0
g r n xs = let r' = r `mod` n
in case elemIndex r' xs of
Just i -> i+1
Nothi... | null | https://raw.githubusercontent.com/MaskRay/OJHaskell/ba24050b2480619f10daa7d37fca558182ba006c/Project%20Euler/26.hs | haskell | import Data.List
import Data.Ord
main = print . fst . maximumBy (comparing snd) $ [(n, f n) | n <- [2..999]]
where f n = g 1 n []
g r 0 xs = 0
g r n xs = let r' = r `mod` n
in case elemIndex r' xs of
Just i -> i+1
Nothi... | |
17f8a8cd3c8fa244532a3fa8b9b81a26557d1d5406268e3de02f010cf0dfd62c | locusmath/locus | object.clj | (ns locus.ab.action.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.quiver.structure.core.protocols :refer :all]
[locus.set.copresheaf.structure.core... | null | https://raw.githubusercontent.com/locusmath/locus/12061072ccfe6a28f87eb8bd4489397dcf4b93d8/src/clojure/locus/ab/action/object.clj | clojure | An abelian group with operators is an abelian copresheaf of a monoid F: M -> Ab. So they are
one of the most basic types of abelian copresheaves. An important point is that, for any
given module it there is an underlying abelian group with operators.
Generalized conversion routines for abelian groups with operators... | (ns locus.ab.action.object
(:require [locus.set.logic.core.set :refer :all]
[locus.set.mapping.general.core.object :refer :all]
[locus.set.logic.structure.protocols :refer :all]
[locus.set.quiver.structure.core.protocols :refer :all]
[locus.set.copresheaf.structure.core... |
8525257b7604035d61a8c86fa6b9d8e04dde4e5f79bf88217e08f584adbdb3ed | cky/guile | syntax.scm | ;;; Guile VM specific syntaxes and utilities
Copyright ( C ) 2001 , 2009 Free Software Foundation , Inc
;;; This library is free software; you can redistribute it and/or
;;; modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation ; either
version 3 of the ... | null | https://raw.githubusercontent.com/cky/guile/89ce9fb31b00f1f243fe6f2450db50372cc0b86d/module/system/base/syntax.scm | scheme | Guile VM specific syntaxes and utilities
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
either
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY ... |
Copyright ( C ) 2001 , 2009 Free Software Foundation , Inc
version 3 of the License , or ( at your option ) any later version .
You should have received a copy of the GNU Lesser General Public
Foundation , Inc. , 51 Franklin Street , Fifth Floor , Boston , USA
(define-module (system base syntax)
#:exp... |
0af210a923e9d30a71072ddb6b795f886ad85d34317c84f8d60101814f310fda | exercism/ocaml | rectangles.mli | val count_rectangles : string array -> int
| null | https://raw.githubusercontent.com/exercism/ocaml/bfd6121f757817865a34db06c3188b5e0ccab518/exercises/practice/rectangles/rectangles.mli | ocaml | val count_rectangles : string array -> int
| |
4961b3b8e4a6ad4cfc7c9254ba583f63d8bd0fc1873b17099e6e96d41c028c5f | kaos/ecapnp | ecapnp_capability.erl | %%
Copyright 2013 , < >
%%
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at
%%
%% -2.0
%%
%% Unless required by applicable law or agreed to in writing, software
dis... | null | https://raw.githubusercontent.com/kaos/ecapnp/f351c07730ba134b41b137dd6a6b93069a0908fc/src/ecapnp_capability.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 gov... | Copyright 2013 , < >
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
2013 ,
@author < >
-module(ecapnp_capability).
-author("Andreas Stenius <>").
-behaviour(gen_server).
-export([start/1, start_link/1,... |
6cf2517c0e6d7d2709eb79784bddf6b53dcf21e8967faa2a6c1f774b01a9445f | funimage/funimage | project.clj | (ns funimage.project
(:gen-class)
(:use [funimage imp])
(:require [clojure.string :as string])
(:import ;[mpicbg.imglib.image Image]
[ mpicbg.imglib.cursor Cursor ]
]
[ mpicbg.imglib.type.numeric ]
[ij IJ ImagePlus]
[java.awt Button]
[java.awt.event ActionListener]
... | null | https://raw.githubusercontent.com/funimage/funimage/397d1ed9a1c11287f8562d05c10040ce24717f04/src/funimage/project.clj | clojure | [mpicbg.imglib.image Image]
(IJ/log (str "Project directory: " (project-directory)))
(IJ/log "Making directory") | (ns funimage.project
(:gen-class)
(:use [funimage imp])
(:require [clojure.string :as string])
[ mpicbg.imglib.cursor Cursor ]
]
[ mpicbg.imglib.type.numeric ]
[ij IJ ImagePlus]
[java.awt Button]
[java.awt.event ActionListener]
[java.io File]))
(defonce params
(... |
a194b54ca733d33daeee8eee106ef29d67f1b640905ec70b34f59b574d73d778 | aphyr/mastodon-utils | mastodon_utils_test.clj | (ns com.aphyr.mastodon-utils-test
(:require [clojure.test :refer :all]
[com.aphyr.mastodon-utils :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| null | https://raw.githubusercontent.com/aphyr/mastodon-utils/0c9a4557d1c5bd205b570f9f37a4b2078e5c79c8/test/com/aphyr/mastodon_utils_test.clj | clojure | (ns com.aphyr.mastodon-utils-test
(:require [clojure.test :refer :all]
[com.aphyr.mastodon-utils :refer :all]))
(deftest a-test
(testing "FIXME, I fail."
(is (= 0 1))))
| |
06509f77467237b2442d5c06b3236df60852acaf8a4c04af721e0166af6797f0 | wwezhuimeng/kazoo | rebar_port_compiler.erl | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
%% ex: ts=4 sw=4 et
%% -------------------------------------------------------------------
%%
rebar : Erlang Build Tools
%%
Copyright ( c ) 2009 ( )
%%
%% Permission is hereby granted, free of charge, to any person obtaining a copy
%% of this softw... | null | https://raw.githubusercontent.com/wwezhuimeng/kazoo/06a15811dbf123ae1601dc7a4ced956a7e04f58a/utils/rebar/src/rebar_port_compiler.erl | erlang | ex: ts=4 sw=4 et
-------------------------------------------------------------------
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
to use, copy, modify, merge, publish, distribute, sublicense, and/or sel... | -*- erlang - indent - level : 4;indent - tabs - mode : nil -*-
rebar : Erlang Build Tools
Copyright ( c ) 2009 ( )
in the Software without restriction , including without limitation the rights
copies of the Software , and to permit persons to whom the Software is
all copies or substantial portions of the... |
3c55bcdaaaf026228810ecb2930deccf360274851061870652a982c814e22cf9 | verystable/warframe-autobuilder | RivenMods.hs | # LANGUAGE NoImplicitPrelude #
{-# LANGUAGE OverloadedStrings #-}
-- |
Module : Builder . Mods . ShotgunMods . RivenMods
-- Maintainer :
-- Stability : experimental
--
-- Contains Riven mods or functions.
module Builder.Mods.ShotgunMods.RivenMods where
import ClassyPrelude
import Cont... | null | https://raw.githubusercontent.com/verystable/warframe-autobuilder/015e0bb6812711ea27071816d054cbaa1c65770b/src/Builder/Mods/ShotgunMods/RivenMods.hs | haskell | # LANGUAGE OverloadedStrings #
|
Maintainer :
Stability : experimental
Contains Riven mods or functions.
| Shotgun Example Riven | Boar [+120% Critical Chance, -50% Reload Time] | # LANGUAGE NoImplicitPrelude #
Module : Builder . Mods . ShotgunMods . RivenMods
module Builder.Mods.ShotgunMods.RivenMods where
import ClassyPrelude
import Control.Lens ( (^.) )
import GenericFunctions.GenericFunctions
import Types.GenericWeapon
sho... |
4951f35ffc9adda0f9be893375cb59b8d060e0c0702c41242211af1f071fe31f | lesguillemets/sicp-haskell | 1.19.hs | module OneNineteen where
-- |p+q q | |a|
-- | q p | |b|
A^2 = ( ( ( p+q)^2 + q^2 , 2pq+q^2 ) , ( 2pq+q^2 , p^2+q^2 ) )
-- | fibonacci, which runs in a logarithmic number of steps.
> > > map fib [ 1 .. 10 ]
-- [1,1,2,3,5,8,13,21,34,55]
fib = fibIter 1 0 0 1
fibIter a b p q count
| count == 0 = b
| even ... | null | https://raw.githubusercontent.com/lesguillemets/sicp-haskell/df524a1e28c45fb16a56f539cad8babc881d0431/exercise/chap01/sect2/1.19.hs | haskell | |p+q q | |a|
| q p | |b|
| fibonacci, which runs in a logarithmic number of steps.
[1,1,2,3,5,8,13,21,34,55] | module OneNineteen where
A^2 = ( ( ( p+q)^2 + q^2 , 2pq+q^2 ) , ( 2pq+q^2 , p^2+q^2 ) )
> > > map fib [ 1 .. 10 ]
fib = fibIter 1 0 0 1
fibIter a b p q count
| count == 0 = b
| even count = fibIter a b (sq p + sq q) (2*p*q + sq q) (halve count)
| otherwise = fibIter (b*q + a*q + a*p) (b*p+a*q) p q (co... |
dbfc4a4c3ef8e10eef51eb2dc34f6ed94b740e516defe0a47cd0258dbdcac58d | tweag/asterius | StgPrimFloat.hs | # LANGUAGE DuplicateRecordFields #
{-# LANGUAGE OverloadedStrings #-}
module Asterius.Builtins.StgPrimFloat
( stgPrimFloatCBits,
)
where
import Asterius.EDSL
import Asterius.Types
stgPrimFloatCBits :: AsteriusModule
stgPrimFloatCBits = wordEncodeDouble <> wordEncodeFloat
wordEncodeDouble, wordEncodeFloat :: Ast... | null | https://raw.githubusercontent.com/tweag/asterius/e7b823c87499656860f87b9b468eb0567add1de8/asterius/src/Asterius/Builtins/StgPrimFloat.hs | haskell | # LANGUAGE OverloadedStrings # | # LANGUAGE DuplicateRecordFields #
module Asterius.Builtins.StgPrimFloat
( stgPrimFloatCBits,
)
where
import Asterius.EDSL
import Asterius.Types
stgPrimFloatCBits :: AsteriusModule
stgPrimFloatCBits = wordEncodeDouble <> wordEncodeFloat
wordEncodeDouble, wordEncodeFloat :: AsteriusModule
wordEncodeDouble = runE... |
12f281a197d25cba33984f3600920197f5266bb9a537495921853d41dbb4a60f | wireapp/wire-server | Util.hs | # OPTIONS_GHC -Wno - incomplete - uni - patterns #
-- Disabling to stop warnings on HasCallStack
{-# OPTIONS_GHC -Wno-redundant-constraints #-}
-- This file is part of the Wire Server implementation.
--
Copyright ( C ) 2022 Wire Swiss GmbH < >
--
-- This program is free software: you can redistribute it and/or modi... | null | https://raw.githubusercontent.com/wireapp/wire-server/72a03a776d4a8607b0a9c3e622003467be914894/services/brig/test/integration/API/User/Util.hs | haskell | Disabling to stop warnings on HasCallStack
# OPTIONS_GHC -Wno-redundant-constraints #
This file is part of the Wire Server implementation.
This program is free software: you can redistribute it and/or modify it under
later version.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY... | # OPTIONS_GHC -Wno - incomplete - uni - patterns #
Copyright ( C ) 2022 Wire Swiss GmbH < >
the terms of the GNU Affero General Public License as published by the Free
Software Foundation , either version 3 of the License , or ( at your option ) any
You should have received a copy of the GNU Affero General Pu... |
1ec768a95497661dfa19a12286fe6ef45022fad8f04b4899e4094812ea928270 | scalaris-team/scalaris | rm_loop.erl | 2010 - 2016 Zuse Institute 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 in writing, software
d... | null | https://raw.githubusercontent.com/scalaris-team/scalaris/feb894d54e642bb3530e709e730156b0ecc1635f/src/rm_loop.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 gov... | 2010 - 2016 Zuse Institute Berlin
Licensed under the Apache License , Version 2.0 ( the " License " ) ;
distributed under the License is distributed on an " AS IS " BASIS ,
@author < >
-module(rm_loop).
-author('').
-include("scalaris.hrl").
-define(TRACE(X,Y), ok).
-define(TRACE_SEND(Pid, Msg), ?T... |
0e9e3da4f53154ddb60bf7304eaa9f673f8cc2e98740d71defb40d4e0f7d3fac | jyh/metaprl | ma_event__systems.mli | extends Nuprl_event__systems
open Tactic_type
open Tactic_type.Tacticals
topval es_invariantT: tactic
topval alle_at_predT : tactic
| null | https://raw.githubusercontent.com/jyh/metaprl/51ba0bbbf409ecb7f96f5abbeb91902fdec47a19/theories/mesa/ma_event__systems.mli | ocaml | extends Nuprl_event__systems
open Tactic_type
open Tactic_type.Tacticals
topval es_invariantT: tactic
topval alle_at_predT : tactic
| |
d0f2ca3e1c27a382f1fa048d75acb489db0b502ccece29b94c8f4abf9e94fe7f | igarnier/prbnmcn-dagger | identity_monad.ml | module M : Intf.Core with type 'a t = 'a = struct
type 'a t = 'a
let return x = x
let bind m f = f m
let map m f = f m
let map2 m1 m2 f = f m1 m2
let map_array m f = f m
let if_ c body = body c
module Infix = struct
let ( let* ) = bind
let ( let+ ) = map
let ( and+ ) m m' = map2 m m... | null | https://raw.githubusercontent.com/igarnier/prbnmcn-dagger/360e196be3e28cbcc67691a1fd68f1cd93743e35/src/identity_monad.ml | ocaml | module M : Intf.Core with type 'a t = 'a = struct
type 'a t = 'a
let return x = x
let bind m f = f m
let map m f = f m
let map2 m1 m2 f = f m1 m2
let map_array m f = f m
let if_ c body = body c
module Infix = struct
let ( let* ) = bind
let ( let+ ) = map
let ( and+ ) m m' = map2 m m... | |
c54b0f2e2894cd78f6e6131f39a840c2e5a44ecd7098eb1b7933ae90316299d6 | ndmitchell/catch | Bundle.hs | -- Make a complete bundle of all the source modules to build Catch and create a package
import System.Directory
import System.Environment
import System.Cmd
import System.IO
import Control.Monad
import System.FilePath
import Data.List
import Data.Char
main = do
b <- doesDirectoryExist "release"
when b $ remov... | null | https://raw.githubusercontent.com/ndmitchell/catch/5d834416a27b4df3f7ce7830c4757d4505aaf96e/Bundle.hs | haskell | Make a complete bundle of all the source modules to build Catch and create a package |
import System.Directory
import System.Environment
import System.Cmd
import System.IO
import Control.Monad
import System.FilePath
import Data.List
import Data.Char
main = do
b <- doesDirectoryExist "release"
when b $ removeDirectoryRecursive "release"
createDirectory "release"
createDirectory "release... |
fa8d792bc253482f10865f9074962cf549edc797063f84ae250a35891e1a786d | sharetribe/harmony | uuid_test.clj | (ns harmony.util.uuid-test
(:require [clojure.string :as str]
[harmony.util.uuid :as sut]
[clj-uuid :as uuid]
[clojure.test :refer :all]))
(deftest conversion-is-lossless
(let [ids (repeatedly 1000 #(java.util.UUID/randomUUID))
roundtripped (map #(-> %
... | null | https://raw.githubusercontent.com/sharetribe/harmony/756d1388e11a62773c83d0276da4c4f1d942ea91/test/harmony/util/uuid_test.clj | clojure | (ns harmony.util.uuid-test
(:require [clojure.string :as str]
[harmony.util.uuid :as sut]
[clj-uuid :as uuid]
[clojure.test :refer :all]))
(deftest conversion-is-lossless
(let [ids (repeatedly 1000 #(java.util.UUID/randomUUID))
roundtripped (map #(-> %
... | |
e7e556aac7a930a41f9874f37e03bcb8f97b9f868b6e4a8003a466aa7b8e9adf | jeapostrophe/adqc | main.rkt | #lang racket/base
(require (for-syntax racket/base
racket/syntax)
adqc
chk
racket/match
racket/stxparam
syntax/parse/define)
;; This assumes the same representation used by the evaluator for data types.
(define (raw-value ty v)
(match ty
[(? IntT?... | null | https://raw.githubusercontent.com/jeapostrophe/adqc/59030f17f603356786a2cf19b78e54ccb1181848/t/main.rkt | racket | This assumes the same representation used by the evaluator for data types.
XXX Once linked-program-write exists, we can automatically
convert arguments into the data layout expected by linked-program-run.
Floating point arithmetic
Floating point comparisons
Cast
Simple unions
XXX How to test Fail?
Private fun... | #lang racket/base
(require (for-syntax racket/base
racket/syntax)
adqc
chk
racket/match
racket/stxparam
syntax/parse/define)
(define (raw-value ty v)
(match ty
[(? IntT?) (Int-val v)]
[(? FloT?) (Flo-val v)]
[(RecT f->ty _ c-order)
(f... |
21fa85efcb9464d35d0c2853714592ebfe484d216c9971c5bd92e6dc886bf11b | michaelklishin/monger | collection.clj | This source code is dual - licensed under the Apache License , version
2.0 , and the Eclipse Public License , version 1.0 .
;;
;; The APL v2.0:
;;
;; ----------------------------------------------------------------------------------
Copyright ( c ) 2011 - 2018 , , and the ClojureWerkz Team
Copyright ( c ) ... | null | https://raw.githubusercontent.com/michaelklishin/monger/84170f7c51973e3d789736cdeb3cd8ad013071c3/src/clojure/monger/collection.clj | clojure |
The APL v2.0:
----------------------------------------------------------------------------------
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
-2.0
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDIT... | This source code is dual - licensed under the Apache License , version
2.0 , and the Eclipse Public License , version 1.0 .
Copyright ( c ) 2011 - 2018 , , and the ClojureWerkz Team
Copyright ( c ) 2012
Copyright ( c ) 2012
distributed under the License is distributed on an " AS IS " BASIS ,
The ... |
cd56490338a2eba8d4edd084b108c7dbe9acc858cc4fdc5710cbe551614f3da6 | synduce/Synduce | composed_unkwns.ml |
let s0 = 0
let f0 x0 = x0
let f2 x1 = x1
let f1 x2 = x2
let join x3 x4 = x4 + x3
let rec hsum =
function CNil -> s0 | Single(a) -> f0 a
| Concat(x, y) -> join (f1 (hsum x)) (f2 (hsum y))
| null | https://raw.githubusercontent.com/synduce/Synduce/d453b04cfb507395908a270b1906f5ac34298d29/extras/solutions/misc/composed_unkwns.ml | ocaml |
let s0 = 0
let f0 x0 = x0
let f2 x1 = x1
let f1 x2 = x2
let join x3 x4 = x4 + x3
let rec hsum =
function CNil -> s0 | Single(a) -> f0 a
| Concat(x, y) -> join (f1 (hsum x)) (f2 (hsum y))
| |
0f26a2125169fd1fbd68fa278f87ce4dcf33fd6afbf07ff2027ca03c1636473f | claw/claw | project.clj | (defproject org.claw/claw "0.4.0"
:description "Claw is a full stack, monolithic web framework for Clojure."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
;; TODO: Break out plugins into subprojects, so that
... | null | https://raw.githubusercontent.com/claw/claw/5a83b8351e6fc89a8c7961c3485ea934ac92553b/project.clj | clojure | TODO: Break out plugins into subprojects, so that
you don't need to have dependencies around that
are only needed for plugins you aren't actually
using.
Authentication
Web
Routes
Easily start and stop the webserver
General purpose utilities
read config from environment
Read/write compressed files
Enhanced t... | (defproject org.claw/claw "0.4.0"
:description "Claw is a full stack, monolithic web framework for Clojure."
:url ""
:license {:name "Eclipse Public License"
:url "-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
Ring extensions
[ring.middleware.logger "... |
f49af0d9d5f53b0dda97878be8d1bfc9619e614b2bb8da87788ea9fc721c56d3 | cerebro/ggp-clj-players | core.clj | (ns ggp-clj-players.core
(:require [clojure.java.shell :as shell]))
(defn kiosk []
(shell/sh "java" "-cp" "target/ggp-clj-players-0.1.1-standalone.jar" "org.ggp.base.apps.kiosk.Kiosk")
(System/exit 0))
(defn play []
(println (:out (shell/sh "java" "-cp" "target/ggp-clj-players-0.1.1-standalone.jar" "org.ggp.b... | null | https://raw.githubusercontent.com/cerebro/ggp-clj-players/dca13fbc4024fa12a2fd8aac162c1e9a03e2560f/src/ggp_clj_players/core.clj | clojure | (ns ggp-clj-players.core
(:require [clojure.java.shell :as shell]))
(defn kiosk []
(shell/sh "java" "-cp" "target/ggp-clj-players-0.1.1-standalone.jar" "org.ggp.base.apps.kiosk.Kiosk")
(System/exit 0))
(defn play []
(println (:out (shell/sh "java" "-cp" "target/ggp-clj-players-0.1.1-standalone.jar" "org.ggp.b... | |
e5654244180c5c12760309005ac9d320d3f3063198d67ed7e0a14ddcaa1ef96d | int-index/kalium | Convert.hs | # LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE TemplateHaskell #
module Kalium.Pascal.Convert (convert) where
import Kalium.Prelude
import Kalium.Util
import Control.Monad.Reader
import Control.Monad.Except
import Control.Monad.Rename
imp... | null | https://raw.githubusercontent.com/int-index/kalium/0653b4229001880322acf3016de595360de726ec/src/Kalium/Pascal/Convert.hs | haskell | S for Src, D for Dest
use typecastConv to get typecasting | # LANGUAGE FlexibleInstances #
# LANGUAGE FlexibleContexts #
# LANGUAGE TypeFamilies #
# LANGUAGE TypeOperators #
# LANGUAGE TemplateHaskell #
module Kalium.Pascal.Convert (convert) where
import Kalium.Prelude
import Kalium.Util
import Control.Monad.Reader
import Control.Monad.Except
import Control.Monad.Rename
imp... |
4c902868c5d011bb88c7863b8b903ea5ddd74f8247b1bc317c3e5f179c3dd80b | DavidAlphaFox/RabbitMQ | mochiapp.erl | %% @author {{author}}
{ { year } } { { author } }
%% @doc {{appid}}.
-module({{appid}}).
-author("{{author}}").
-export([start/0, stop/0]).
ensure_started(App) ->
case application:start(App) of
ok ->
ok;
{error, {already_started, App}} ->
ok
end.
@spec start ( )... | null | https://raw.githubusercontent.com/DavidAlphaFox/RabbitMQ/0a64e6f0464a9a4ce85c6baa52fb1c584689f49a/plugins-src/mochiweb-wrapper/mochiweb-git/support/templates/mochiwebapp_skel/src/mochiapp.erl | erlang | @author {{author}}
@doc {{appid}}.
@doc Start the {{appid}} server.
@doc Stop the {{appid}} server. | { { year } } { { author } }
-module({{appid}}).
-author("{{author}}").
-export([start/0, stop/0]).
ensure_started(App) ->
case application:start(App) of
ok ->
ok;
{error, {already_started, App}} ->
ok
end.
@spec start ( ) - > ok
start() ->
{{appid}}_deps:ens... |
bdf9f86ac8e52d113d0b795d434ec4b0cb0ba4360ccf9dba69471d4d31054e96 | josefs/Gradualizer | unary_negate_union_with_user_type_pass.erl | -module(unary_negate_union_with_user_type_pass).
-type price() :: integer().
-spec price(_) -> float() | price().
price(_) -> 100.
-spec f(_, _) -> boolean().
f(G, ReversePaymentG) ->
price(G) =:= - price(ReversePaymentG).
| null | https://raw.githubusercontent.com/josefs/Gradualizer/ba5481cf1c208a0c29d15e5ab241b5af58dde28d/test/should_pass/unary_negate_union_with_user_type_pass.erl | erlang | -module(unary_negate_union_with_user_type_pass).
-type price() :: integer().
-spec price(_) -> float() | price().
price(_) -> 100.
-spec f(_, _) -> boolean().
f(G, ReversePaymentG) ->
price(G) =:= - price(ReversePaymentG).
| |
c60a29a60974bb81d90feb498e34a1bb66a73ef036121030435edf339a2fa738 | flavioc/cl-hurd | file-getcontrol.lisp |
(in-package :hurd-translator)
;; Return control port for this filesystem.
(def-fs-interface :file-getcontrol ((file port)
(control port-pointer)
(control-type :pointer))
(with-lookup protid file
(block file-getcontrol
(unless (is... | null | https://raw.githubusercontent.com/flavioc/cl-hurd/982232f47d1a0ff4df5fde2edad03b9df871470a/translator/interfaces/file-getcontrol.lisp | lisp | Return control port for this filesystem. |
(in-package :hurd-translator)
(def-fs-interface :file-getcontrol ((file port)
(control port-pointer)
(control-type :pointer))
(with-lookup protid file
(block file-getcontrol
(unless (is-controller-p (get-node protid)
... |
6881056ab7cf1d3022a33e72d04b1b649137b53d24e16af5a4369ba1a34a8df1 | sheepduke/silver-brain | util.lisp | (in-package silver-brain.server)
(defvar *app* (make-instance 'ningle:app))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; Exceptions ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-condition not-found ... | null | https://raw.githubusercontent.com/sheepduke/silver-brain/9d088bcd30948decc174f3569e2ad7bc0b3b50c1/backend/src/server/util.lisp | lisp |
Exceptions ;;;;
Request & Response ;;;;
JSON ;;;;
| (in-package silver-brain.server)
(defvar *app* (make-instance 'ningle:app))
(define-condition not-found (error) ())
(define-condition bad-request (error) ())
(defun concept-summary (concept)
"Return an alist representing summary information of given `concept`."
`((:uuid . ,(concept-uuid concept))
(:name . ,... |
cc56687fd42403848b016ea5c543e3c5c8b8f2cbe5f0a79d7044cbe8d2c8bb71 | scicloj/notespace | kindness.clj | (ns scicloj.notespace.v4.kindness
(:require [scicloj.kindly.v1.kindness :as kindness]
[scicloj.kindly.v1.kind :as kind]
[scicloj.kindly.v1.api :as kindly]
[scicloj.notespace.v4.image :as image]))
(extend-protocol kindness/Kindness
;;
java.awt.image.BufferedImage
(->behaviour... | null | https://raw.githubusercontent.com/scicloj/notespace/e8e583eb064412da32683bc8d18f97a43bdc9184/src/scicloj/notespace/v4/kindness.clj | clojure | (ns scicloj.notespace.v4.kindness
(:require [scicloj.kindly.v1.kindness :as kindness]
[scicloj.kindly.v1.kind :as kind]
[scicloj.kindly.v1.api :as kindly]
[scicloj.notespace.v4.image :as image]))
(extend-protocol kindness/Kindness
java.awt.image.BufferedImage
(->behaviour [thi... | |
9a8e2576c88581d0b9ff415300a46bcee2385e7980dada0b7889cf27adc53bf8 | logseq/mldoc | test_zip.ml | open Zip
open QCheck
let g =
Gen.(
of_l
<$> sized
@@ fix (fun self n ->
match n with
| 0 -> map leaf nat
| n ->
frequency
[ ( 5
, branch
<$> ( 0 -- (n / 2) >>= fun n' ->
... | null | https://raw.githubusercontent.com/logseq/mldoc/60e1e18c009530dbfee02bfa220c66e98611b48e/test/test_zip.ml | ocaml | sum zipper using next
sum zipper using prev | open Zip
open QCheck
let g =
Gen.(
of_l
<$> sized
@@ fix (fun self n ->
match n with
| 0 -> map leaf nat
| n ->
frequency
[ ( 5
, branch
<$> ( 0 -- (n / 2) >>= fun n' ->
... |
bb0ac67e18d451dc6f567d6738a2409cb66cc76bf27c61ad59ffe47ced657ad4 | Quid2/zm | Bits52.hs | {-# LANGUAGE DeriveAnyClass #-}
{-# LANGUAGE DeriveGeneric #-}
module ZM.Type.Bits52 where
import ZM.Type.Bit
import Flat
import Data.Model
data Bits52 =
Bits52
{ bit0 :: Bit
, bit1 :: Bit
, bit2 :: Bit
, bit3 :: Bit
, bit4 :: Bit
, bit5 :: Bit
, b... | null | https://raw.githubusercontent.com/Quid2/zm/02c0514777a75ac054bfd6251edd884372faddea/src/ZM/Type/Bits52.hs | haskell | # LANGUAGE DeriveAnyClass #
# LANGUAGE DeriveGeneric # | module ZM.Type.Bits52 where
import ZM.Type.Bit
import Flat
import Data.Model
data Bits52 =
Bits52
{ bit0 :: Bit
, bit1 :: Bit
, bit2 :: Bit
, bit3 :: Bit
, bit4 :: Bit
, bit5 :: Bit
, bit6 :: Bit
, bit7 :: Bit
, bit8 :: Bit
... |
07fe775e060c612b28ac98e77e9a2244b3349287bb24002066756172236a5a08 | tezos/tezos-mirror | injector_tags.ml | (*****************************************************************************)
(* *)
(* Open Source License *)
Copyright ( c ) 2022 Nomadic Labs , < >
(* ... | null | https://raw.githubusercontent.com/tezos/tezos-mirror/8a1c0d2236bfa9c0143704ac0cdacb6e89b208b0/src/lib_injector/injector_tags.ml | ocaml | ***************************************************************************
Open Source License
Permission is h... | Copyright ( c ) 2022 Nomadic Labs , < >
to deal in the Software without restriction , including without limitation
and/or sell copies of the Software , and to permit persons to whom the
THE SOFTWARE IS PROVIDED " AS IS " , WITHOUT WARRANTY OF ANY KIND , EXPRESS OR
LIABILITY , WHETHER IN A... |
547c688dcb86ba232a3c910af51665eae1559871fea9e2164104e1e256053d76 | typelead/etlas | Tree.hs | # LANGUAGE DeriveFunctor , , DeriveTraversable #
module Distribution.Solver.Modular.Tree
( FailReason(..)
, POption(..)
, Tree(..)
, TreeF(..)
, Weight
, ana
, cata
, inn
, innM
, para
, trav
, zeroOrOneChoices
) where
import Control.Monad hiding (mapM, sequence)
im... | null | https://raw.githubusercontent.com/typelead/etlas/bbd7c558169e1fda086e759e1a6f8c8ca2807583/etlas/Distribution/Solver/Modular/Tree.hs | haskell | | Type of the search tree. Inlining the choice nodes for now. Weights on
package, flag, and stanza choices control the traversal order.
The tree can hold additional data on 'Done' nodes (type 'd') and choice nodes
(type 'c'). For example, during the final traversal, choice nodes contain the
variables that introdu... | # LANGUAGE DeriveFunctor , , DeriveTraversable #
module Distribution.Solver.Modular.Tree
( FailReason(..)
, POption(..)
, Tree(..)
, TreeF(..)
, Weight
, ana
, cata
, inn
, innM
, para
, trav
, zeroOrOneChoices
) where
import Control.Monad hiding (mapM, sequence)
im... |
107a6f5ab1ba58c1fa355971abf95f3d86baeeb87022c4afe83a826c4c54d29a | bartavelle/language-puppet | Puppetlabs.hs | # LANGUAGE OverloadedLists #
-- | Contains an Haskell implementation (or mock implementation) of some ruby functions found in puppetlabs modules.
module Puppet.Runner.Puppetlabs (extFunctions) where
import XPrelude
import Crypto.Hash as Crypto
import Data.Char (isDigit)... | null | https://raw.githubusercontent.com/bartavelle/language-puppet/6af7458e094440816c8b9b7b387050612e87a70f/src/Puppet/Runner/Puppetlabs.hs | haskell | | Contains an Haskell implementation (or mock implementation) of some ruby functions found in puppetlabs modules.
| Build the map of available external functions.
If the ruby/puppet file is not found on the local filesystem the record is ignored. This is to avoid potential namespace conflict.
| The function is pur... | # LANGUAGE OverloadedLists #
module Puppet.Runner.Puppetlabs (extFunctions) where
import XPrelude
import Crypto.Hash as Crypto
import Data.Char (isDigit)
import qualified Data.HashMap.Strict as Map
import Data.Scientific as Sci
import qualified Data.Text ... |
a4923fed842aa2462c3f188f073bfd50c9a5935646bdb3b123df9458185faa75 | nathanmarz/cascalog | defops_test.clj | (ns cascalog.logic.defops-test
(:use cascalog.api
clojure.test
[midje sweet cascalog]))
(use-fixtures :once
(fn [f]
(set-cascading-platform!)
(f)
(set-in-memory-platform!)
(f)))
(defmapop ident [x] x)
(defmapop ident-doc
"Identity operation."
[x] x)
(defmapop ident-meta
{:g... | null | https://raw.githubusercontent.com/nathanmarz/cascalog/deaad977aa98985f68f3d1cc3e081d345184c0c8/cascalog-core/test/cascalog/logic/defops_test.clj | clojure | all of | (ns cascalog.logic.defops-test
(:use cascalog.api
clojure.test
[midje sweet cascalog]))
(use-fixtures :once
(fn [f]
(set-cascading-platform!)
(f)
(set-in-memory-platform!)
(f)))
(defmapop ident [x] x)
(defmapop ident-doc
"Identity operation."
[x] x)
(defmapop ident-meta
{:g... |
a78352bb9cec630b1173f8758f7275977820a32e30535f30a41f61f5492593d2 | mfoemmel/erlang-otp | wxPrintData.erl | %%
%% %CopyrightBegin%
%%
Copyright Ericsson AB 2008 - 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 Pub... | null | https://raw.githubusercontent.com/mfoemmel/erlang-otp/9c6fdd21e4e6573ca6f567053ff3ac454d742bc2/lib/wx/src/gen/wxPrintData.erl | erlang |
%CopyrightBegin%
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at /.
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limita... | Copyright Ericsson AB 2008 - 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 "
-module(wxPrintData).
-include("wxe.hrl")... |
3e39a2d2dec1d45e03566b67f1ae13504951d984609969964b4e80ecd3c51cbf | ekarayel/sync-mht | RunSpec.hs | module Sync.MerkleTree.RunSpec (spec) where
import Control.Monad
import Data.Ix
import Data.List
import Sync.MerkleTree.Analyse
import Sync.MerkleTree.Run hiding (Local)
import System.Directory
import System.FilePath
import System.IO.Temp
import System.PosixCompat.Files
import System.Process
import Test.Hspec
spec ::... | null | https://raw.githubusercontent.com/ekarayel/sync-mht/57d724781fad9eed4e57b4e4f8416633605bdb4b/test/Sync/MerkleTree/RunSpec.hs | haskell | module Sync.MerkleTree.RunSpec (spec) where
import Control.Monad
import Data.Ix
import Data.List
import Sync.MerkleTree.Analyse
import Sync.MerkleTree.Run hiding (Local)
import System.Directory
import System.FilePath
import System.IO.Temp
import System.PosixCompat.Files
import System.Process
import Test.Hspec
spec ::... | |
ecf73becceef31319cada9ed960cb40292fc5b544492c133b1a20079e693fb75 | dongcarl/guix | uuid.scm | ;;; GNU Guix --- Functional package management for GNU
Copyright © 2016 , 2017 , 2018 , 2019 < >
Copyright © 2017 < >
Copyright © 2019 , 2020 < >
;;;
;;; This file is part of GNU Guix.
;;;
GNU is free software ; you can redistribute it and/or modify it
under the terms of the GNU General Public Lic... | null | https://raw.githubusercontent.com/dongcarl/guix/82543e9649da2da9a5285ede4ec4f718fd740fcb/gnu/system/uuid.scm | scheme | GNU Guix --- Functional package management for GNU
This file is part of GNU Guix.
you can redistribute it and/or modify it
either version 3 of the License , or ( at
your option) any later version.
GNU Guix is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied wa... | Copyright © 2016 , 2017 , 2018 , 2019 < >
Copyright © 2017 < >
Copyright © 2019 , 2020 < >
under the terms of the GNU General Public License as published by
You should have received a copy of the GNU General Public License
along with GNU . If not , see < / > .
(define-module (gnu system uuid)... |
77f7f9e15a670cd00ba6baa1c6354d19870b92571aba46437c4e0e07e5f5f384 | rbkmoney/consuela | consuela_presence_session.erl | %%%
%%% Presence session
%%%
%%% A server which keeps _presence_ in the Consul catalog by registering a service on startup and
%%% deregistering on shutdown.
-module(consuela_presence_session).
%%
-type name() :: consuela_health:service_name().
-type client() :: consuela_client:t().
-type seconds() :: non_neg_integ... | null | https://raw.githubusercontent.com/rbkmoney/consuela/56d065bff0f1c8de4cede40d670b9061942b4ea8/src/consuela_presence_session.erl | erlang |
Presence session
A server which keeps _presence_ in the Consul catalog by registering a service on startup and
deregistering on shutdown.
gen server
Only alphanumeric sequences with dashes and underscores allowed for metadata
keys.
See: #L104
Best effort heuristics.
> #serviceaddress
name_ with us. _No... |
-module(consuela_presence_session).
-type name() :: consuela_health:service_name().
-type client() :: consuela_client:t().
-type seconds() :: non_neg_integer().
-type service() :: #{
id := consuela_health:service_id(),
name := name(),
address := inet:ip_address(),
tags => [consuela_health:tag()]
}.... |
97de93db38487751c1460e93b7614ba5c528bf04dc3e3acf8b353ccfbd985219 | zippy/anansi | dom-helpers.cljs | Copyright ( c ) . All rights reserved .
; The use and distribution terms for this software are covered by the
; Eclipse Public License 1.0 (-1.0.php)
; which can be found in the file epl-v10.html at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; ... | null | https://raw.githubusercontent.com/zippy/anansi/881aa279e5e7836f3002fc2ef7623f2ee1860c9a/public/ss/src/dom-helpers.cljs | clojure | The use and distribution terms for this software are covered by the
Eclipse Public License 1.0 (-1.0.php)
which can be found in the file epl-v10.html at the root of this distribution.
By using this software in any fashion, you are agreeing to be bound by
the terms of this license.
You must not remove ... | Copyright ( c ) . All rights reserved .
(ns ss.dom-helpers
(:require [clojure.string :as string]
[goog.dom :as dom]
[goog.style :as style]
))
(defn get-element
"Return the element with the passed id."
[id]
(dom/getElement (name id)))
(defn append
"Append all childr... |
d8c998d7878d6b96ca56b843fba337f67908b6f03ab3bbe4e0199bdac65ea954 | conjure-cp/conjure | BubbleUp.hs | # LANGUAGE QuasiQuotes #
module Conjure.Rules.BubbleUp where
import Conjure.Rules.Import
rule_MergeNested :: Rule
rule_MergeNested = "bubble-up-merge-nested" `namedRule` theRule where
theRule (WithLocals (WithLocals body (DefinednessConstraints locals1)) (DefinednessConstraints locals2)) =
return
... | null | https://raw.githubusercontent.com/conjure-cp/conjure/dd5a27df138af2ccbbb970274c2b8f22ac6b26a0/src/Conjure/Rules/BubbleUp.hs | haskell | if anything in a comprehension is undefined, the whole comprehension is undefined
this is for the non-bool case.
no other generators, only GenDomainHasRepr
no lettings
do not bubble-up if it is attached to a bool
TODO: what to do with the conditions?
should we `dontCare unless condition`?
discard for now
speci... | # LANGUAGE QuasiQuotes #
module Conjure.Rules.BubbleUp where
import Conjure.Rules.Import
rule_MergeNested :: Rule
rule_MergeNested = "bubble-up-merge-nested" `namedRule` theRule where
theRule (WithLocals (WithLocals body (DefinednessConstraints locals1)) (DefinednessConstraints locals2)) =
return
... |
402527e958c77a35e82e6699a20463de635a0cfb7bb56fb212d0d6e9f737a860 | haskell/aeson | Instances.hs | # LANGUAGE FlexibleInstances #
{-# LANGUAGE GADTs #-}
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
module DataFamilies.Instances () where
import Prelude.Compat
import Data.Aeson.TH
import Data.Aeson.Types (FromJSON(..))
import DataFamili... | null | https://raw.githubusercontent.com/haskell/aeson/d711df76b826942f4a9e791712512c6b19b8c1c8/tests/DataFamilies/Instances.hs | haskell | # LANGUAGE GADTs #
We must write the FromJSON instance head ourselves | # LANGUAGE FlexibleInstances #
# LANGUAGE NoImplicitPrelude #
# LANGUAGE TemplateHaskell #
# LANGUAGE TypeFamilies #
# OPTIONS_GHC -fno - warn - orphans #
module DataFamilies.Instances () where
import Prelude.Compat
import Data.Aeson.TH
import Data.Aeson.Types (FromJSON(..))
import DataFamilies.Types
import Test.Qu... |
e096dc8cebe63359c4a32e33fbe0ba92bf6ef20b64df38cbd378a661dae418c7 | ghc/testsuite | tcfail083.hs | module ShouldFail where
data Bar = Bar { flag :: Bool } deriving( Show )
data State = State { bar :: Bar, baz :: Float }
display :: State -> IO ()
display (State{ bar = Bar { flag = f, baz = b }}) = print (f,b)
-- Typo! The line above should better be:
-- display (State{ bar = Bar { flag = f }, baz = b }) = print (... | null | https://raw.githubusercontent.com/ghc/testsuite/998a816ae89c4fd573f4abd7c6abb346cf7ee9af/tests/typecheck/should_fail/tcfail083.hs | haskell | Typo! The line above should better be:
display (State{ bar = Bar { flag = f }, baz = b }) = print (f,b)
panic! (the `impossible' happened): tcLookupValue: b{-r4n-} | module ShouldFail where
data Bar = Bar { flag :: Bool } deriving( Show )
data State = State { bar :: Bar, baz :: Float }
display :: State -> IO ()
display (State{ bar = Bar { flag = f, baz = b }}) = print (f,b)
GHC 4.04 ( as released ) crashed with
Bug reported by
|
9b42f575d616951044a373e0917694c00d3051edb504ea41c7e7d90f840a02f6 | avsm/platform | opamRepositoryName.ml | (**************************************************************************)
(* *)
Copyright 2012 - 2015 OCamlPro
Copyright 2012 INRIA
(* ... | null | https://raw.githubusercontent.com/avsm/platform/b254e3c6b60f3c0c09dfdcde92eb1abdc267fa1c/duniverse/opam-client.2.0.5%2Bdune/src/format/opamRepositoryName.ml | ocaml | ************************************************************************
All rights reserved. This file is distributed under the terms of the
exception on linking descr... | Copyright 2012 - 2015 OCamlPro
Copyright 2012 INRIA
GNU Lesser General Public License version 2.1 , with the special
include OpamStd.AbstractString
let default = of_string "default"
|
cd55ed7c5000f15cb33b1c3e05c18e9a9405ae433d78936b1d7d48719a46e1d7 | re-ops/re-cog | archive.clj | (ns re-cog.resources.archive
"Archive resource support"
(:require
[clojure.java.shell :refer (sh)]
[re-cog.resources.package]
[re-cog.common.defs :refer (def-serial)]
[me.raynes.fs :as fs]))
(def-serial unzip
"Unzip resource:
(unzip \"foo.zip\" \"/tmp/foo\")
"
[src dest]
(do
(when-not ... | null | https://raw.githubusercontent.com/re-ops/re-cog/4b8fa5ab81f51af2f6e41a6f5e2655128b4be5cb/src/re_cog/resources/archive.clj | clojure | (ns re-cog.resources.archive
"Archive resource support"
(:require
[clojure.java.shell :refer (sh)]
[re-cog.resources.package]
[re-cog.common.defs :refer (def-serial)]
[me.raynes.fs :as fs]))
(def-serial unzip
"Unzip resource:
(unzip \"foo.zip\" \"/tmp/foo\")
"
[src dest]
(do
(when-not ... | |
fa975802ce6646ead6f2072595e29be0fdfea1d44741e7196bab1d548ec7c3ac | glv2/cl-monero-tools | spanish.lisp | ;;;; This file is part of monero-tools
Copyright 2016 - 2017
Distributed under the GNU GPL v3 or later .
;;;; See the file LICENSE for terms of use and distribution.
(in-package :monero-tools)
(add-word-list :spanish
4
#("ábaco"
"abdomen"
"abeja... | null | https://raw.githubusercontent.com/glv2/cl-monero-tools/ab972ac3a7c5489cf23e3bdaa5d390d5cff1732b/monero-tools/mnemonic/spanish.lisp | lisp | This file is part of monero-tools
See the file LICENSE for terms of use and distribution. | Copyright 2016 - 2017
Distributed under the GNU GPL v3 or later .
(in-package :monero-tools)
(add-word-list :spanish
4
#("ábaco"
"abdomen"
"abeja"
"abierto"
"abogado"
"abono"
"a... |
765a710569e4b0eec2cba127770e1fc72861d697dc29444e7f6b24ffc616aff2 | racket/typed-racket | function-contract.rkt | #lang racket/base
;; Performance test for generated contracts. This exists to measure
;; whether contract generation interferes with contract
;; system optimizations.
(module server typed/racket/base
(: f (Integer -> Integer))
(provide f)
(define (f x) x))
(require (submod "." server))
(time
(for ([x (in-ran... | null | https://raw.githubusercontent.com/racket/typed-racket/0236151e3b95d6d39276353cb5005197843e16e4/typed-racket-test/performance/function-contract.rkt | racket | Performance test for generated contracts. This exists to measure
whether contract generation interferes with contract
system optimizations. | #lang racket/base
(module server typed/racket/base
(: f (Integer -> Integer))
(provide f)
(define (f x) x))
(require (submod "." server))
(time
(for ([x (in-range 100000)])
(f 1) (f 2) (f 3) (f 4) (f 5)
(f 1) (f 2) (f 3) (f 4) (f 5)
(f 1) (f 2) (f 3) (f 4) (f 5)
(f 1) (f 2) (f 3) (f 4) (f 5)
(... |
1e330c72d5928763f650ae0bb4881406c8611e6bf763dec9d2dc6e3797af5b01 | ghollisjr/cl-ana | h5ex-d-checksum.lisp | Copyright by The HDF Group .
;;;; All rights reserved.
;;;;
This file is part of hdf5 - cffi .
The full hdf5 - cffi copyright notice , including terms governing
;;;; use, modification, and redistribution, is contained in the file COPYING,
;;;; which can be found at th... | null | https://raw.githubusercontent.com/ghollisjr/cl-ana/5cb4c0b0c9c4957452ad2a769d6ff9e8d5df0b10/hdf-cffi/examples/datasets/h5ex-d-checksum.lisp | lisp | All rights reserved.
use, modification, and redistribution, is contained in the file COPYING,
which can be found at the root of the source code distribution tree.
If you do not have access to this file, you may request a copy from
.
This example shows how to read and write data to a dataset
the data, checks if ... | Copyright by The HDF Group .
This file is part of hdf5 - cffi .
The full hdf5 - cffi copyright notice , including terms governing
using the checksum filter . The program first
checks if the filter is available , then if it
is it writes integers to a dataset... |
17dd0a8754aa6c3ab8d1b8fc3d1ed7f8433709daf9104bc48a197df63b4bd275 | quil/quil | rendering.cljc | (ns quil.snippets.rendering
(:require #?(:clj [quil.snippets.macro :refer [defsnippet]])
[quil.core :as q :include-macros true]
quil.snippets.all-snippets-internal)
#?(:cljs
(:use-macros [quil.snippets.macro :only [defsnippet]])))
#?(:clj
(defsnippet hint
"hint"
{:renderer... | null | https://raw.githubusercontent.com/quil/quil/1f214e712d834ede311fdc652eafe9cc0232c96e/src/cljc/quil/snippets/rendering.cljc | clojure | (ns quil.snippets.rendering
(:require #?(:clj [quil.snippets.macro :refer [defsnippet]])
[quil.core :as q :include-macros true]
quil.snippets.all-snippets-internal)
#?(:cljs
(:use-macros [quil.snippets.macro :only [defsnippet]])))
#?(:clj
(defsnippet hint
"hint"
{:renderer... | |
9ada9cbe272bb501f393aa85945e5b384ad72c891fb4c2e257fa9cee2b2b016d | technomancy/leiningen | project.clj | (def clj-version "1.3.0")
(defproject mgmt "0.99.0-SNAPSHOT"
:description "A test project"
:managed-dependencies [[~(symbol "org.clojure" "clojure") ~clj-version]
[rome ~(str "0." "9")]
[ring/ring "1.0.0"]
[ring/ring-codec "1.0.1"]
[ring/ring-hea... | null | https://raw.githubusercontent.com/technomancy/leiningen/24fb93936133bd7fc30c393c127e9e69bb5f2392/test_projects/managed-deps-snapshot/project.clj | clojure | (def clj-version "1.3.0")
(defproject mgmt "0.99.0-SNAPSHOT"
:description "A test project"
:managed-dependencies [[~(symbol "org.clojure" "clojure") ~clj-version]
[rome ~(str "0." "9")]
[ring/ring "1.0.0"]
[ring/ring-codec "1.0.1"]
[ring/ring-hea... | |
b60866d148343a6caae5b064e1e899c378949c59eb1bd15f9725f78a2366c74e | soegaard/little-helper | priority-queue--knights-tour.scm | knights-tour.scm --
(require (planet "priority-queue.scm" ("soegaard" "galore.plt" 2 1)))
; This example shows the use of priority queues for
; combinatorial seaching.
; PROBLEM: Place a knight in the corner of an nxm board.
Find a tour i.e. a sequence of moves ,
; the k... | null | https://raw.githubusercontent.com/soegaard/little-helper/26249c688e5adf1e2535c405c6289030eff561b4/planet/galore.plt/2/2/examples/priority-queue--knights-tour.scm | scheme | This example shows the use of priority queues for
combinatorial seaching.
PROBLEM: Place a knight in the corner of an nxm board.
the knight visits all squares exactly once.
The problem with many illustrations and variations:
<>
A prolog solution can be found at
<#knights>
All square... | knights-tour.scm --
(require (planet "priority-queue.scm" ("soegaard" "galore.plt" 2 1)))
Find a tour i.e. a sequence of moves ,
(define n 6)
(define m 4)
We surround the nxm board with a border of width 2 .
Thus for and m=3 we look at :
# # # # # # # #
# # #... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.